Patch Changes
-
#3329
b8e3ab6
Thanks @IMax153! - ThePrompt.all
method now supports taking in a record ofPrompt
s to be more
consistent with otherall
APIs throughout the Effect ecosystem.You can now do:
import * as Prompt from "@effect/cli/Prompt" import * as NodeContext from "@effect/platform-node/NodeContext" import * as Runtime from "@effect/platform-node/NodeRuntime" import * as Effect from "effect/Effect" const program = Prompt.all({ username: Prompt.text({ message: "Enter your username" }), password: Prompt.password({ message: "Enter your password: ", validate: (value) => value.length === 0 ? Effect.fail("Password cannot be empty") : Effect.succeed(value) }) }) program.pipe( Effect.flatMap(({ username, password }) => /* Your logic here */ ), Effect.provide(NodeContext.layer), NodeRuntime.runMain )
-
#3332
c8f8690
Thanks @IMax153! - improve thePrompt.all
JSDoc and add example -
Updated dependencies [
f241154
]:- @effect/schema@0.69.1
- @effect/platform@0.60.1