(
args: ReadonlyArray<string>
)
| 567 | } |
| 568 | }) |
| 569 | const parseUserDefinedArgs = ( |
| 570 | args: ReadonlyArray<string> |
| 571 | ): Effect.Effect< |
| 572 | Directive.CommandDirective<unknown>, |
| 573 | ValidationError.ValidationError, |
| 574 | FileSystem.FileSystem | Path.Path | Terminal.Terminal |
| 575 | > => |
| 576 | parseCommandLine(self, args).pipe(Effect.flatMap((commandOptionsAndArgs) => { |
| 577 | const [optionsAndArgs, forcedCommandArgs] = splitForcedArgs(commandOptionsAndArgs) |
| 578 | return InternalOptions.processCommandLine(self.options, optionsAndArgs, config).pipe( |
| 579 | Effect.flatMap(([error, commandArgs, optionsType]) => |
| 580 | InternalArgs.validate( |
| 581 | self.args, |
| 582 | Arr.appendAll(commandArgs, forcedCommandArgs), |
| 583 | config |
| 584 | ).pipe( |
| 585 | Effect.catchAll((e) => |
| 586 | Option.match(error, { |
| 587 | onNone: () => Effect.fail(e), |
| 588 | onSome: (err) => Effect.fail(err) |
| 589 | }) |
| 590 | ), |
| 591 | Effect.map(([argsLeftover, argsType]) => |
| 592 | InternalCommandDirective.userDefined(argsLeftover, { |
| 593 | name: self.name, |
| 594 | options: optionsType, |
| 595 | args: argsType |
| 596 | }) |
| 597 | ) |
| 598 | ) |
| 599 | ) |
| 600 | ) |
| 601 | })) |
| 602 | const exhaustiveSearch = ( |
| 603 | args: ReadonlyArray<string> |
| 604 | ): Effect.Effect< |
no test coverage detected
searching dependent graphs…