MCPcopy
hub / github.com/Effect-TS/effect / process

Function process

packages/cli/test/Options.test.ts:31–47  ·  view source on GitHub ↗
(
  options: Options.Options<A>,
  args: ReadonlyArray<string>,
  config: CliConfig.CliConfig
)

Source from the content-addressed store, hash-verified

29): Promise<A> => Effect.provide(self, NodeContext.layer).pipe(Effect.runPromise)
30
31const process = <A>(
32 options: Options.Options<A>,
33 args: ReadonlyArray<string>,
34 config: CliConfig.CliConfig
35): Effect.Effect<
36 [ReadonlyArray<string>, A],
37 ValidationError.ValidationError,
38 NodeContext.NodeContext
39> =>
40 Options.processCommandLine(options, args, config).pipe(
41 Effect.flatMap(([err, rest, a]) =>
42 Option.match(err, {
43 onNone: () => Effect.succeed([rest, a]),
44 onSome: Effect.fail
45 })
46 )
47 )
48
49describe("Options", () => {
50 it("should validate without ambiguity", () =>

Callers 1

Options.test.tsFile · 0.70

Calls 1

pipeMethod · 0.65

Tested by

no test coverage detected