github Effect-TS/effect @effect/cli@0.39.1

latest releases: @effect/sql-sqlite-wasm@0.20.4, @effect/typeclass@0.29.13, @effect/vitest@0.13.13...
3 months ago

Patch Changes

  • #3329 b8e3ab6 Thanks @IMax153! - The Prompt.all method now supports taking in a record of Prompts to be more
    consistent with other all 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 the Prompt.all JSDoc and add example

  • Updated dependencies [f241154]:

    • @effect/schema@0.69.1
    • @effect/platform@0.60.1

Don't miss a new effect release

NewReleases is sending notifications on new releases.