diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e27dbdd..437ed79 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,8 +31,12 @@ jobs: - name: Upload pages artifact if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: actions/upload-pages-artifact@v2 + - name: Build pages Jekyll + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: actions/jekyll-build-pages@v1 with: - path: docs/ + source: ./docs + destination: ./_site - name: Create Release Pull Request or Publish if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: changesets/action@v1 diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index 868123b..0000000 --- a/docs/_config.yml +++ /dev/null @@ -1,9 +0,0 @@ -remote_theme: mikearnaldi/just-the-docs - -# Enable or disable the site search -search_enabled: true - -# Aux links for the upper right navigation -aux_links: - '@effect/cli on GitHub': - - 'https://github.com/Effect-TS/cli' \ No newline at end of file diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index d77a441..0000000 --- a/docs/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Home -nav_order: 1 ---- diff --git a/docs/modules/Args.ts.md b/docs/modules/Args.ts.md deleted file mode 100644 index 48af178..0000000 --- a/docs/modules/Args.ts.md +++ /dev/null @@ -1,506 +0,0 @@ ---- -title: Args.ts -nav_order: 1 -parent: Modules ---- - -## Args overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [combinators](#combinators) - - [atLeast](#atleast) - - [atMost](#atmost) - - [between](#between) - - [repeated](#repeated) - - [repeatedAtLeastOnce](#repeatedatleastonce) - - [toRegularLanguage](#toregularlanguage) -- [constructors](#constructors) - - [all](#all) - - [boolean](#boolean) - - [choice](#choice) - - [date](#date) - - [directory](#directory) - - [file](#file) - - [float](#float) - - [integer](#integer) - - [none](#none) - - [path](#path) - - [text](#text) -- [mapping](#mapping) - - [map](#map) - - [mapOrFail](#maporfail) - - [mapTryCatch](#maptrycatch) -- [models](#models) - - [Args (interface)](#args-interface) -- [refinements](#refinements) - - [isArgs](#isargs) -- [symbols](#symbols) - - [ArgsTypeId](#argstypeid) - - [ArgsTypeId (type alias)](#argstypeid-type-alias) -- [utils](#utils) - - [All (namespace)](#all-namespace) - - [ArgsAny (type alias)](#argsany-type-alias) - - [Return (type alias)](#return-type-alias) - - [ReturnIterable (type alias)](#returniterable-type-alias) - - [ReturnObject (type alias)](#returnobject-type-alias) - - [ReturnTuple (type alias)](#returntuple-type-alias) - - [Args (namespace)](#args-namespace) - - [BaseArgsConfig (interface)](#baseargsconfig-interface) - - [PathArgsConfig (interface)](#pathargsconfig-interface) - - [Variance (interface)](#variance-interface) - ---- - -# combinators - -## atLeast - -**Signature** - -```ts -export declare const atLeast: { - (times: 0): (self: Args) => Args - (times: number): (self: Args) => Args - (self: Args, times: 0): Args - (self: Args, times: number): Args -} -``` - -Added in v1.0.0 - -## atMost - -**Signature** - -```ts -export declare const atMost: { - (times: number): (self: Args) => Args - (self: Args, times: number): Args -} -``` - -Added in v1.0.0 - -## between - -**Signature** - -```ts -export declare const between: { - (min: 0, max: number): (self: Args) => Args - (min: number, max: number): (self: Args) => Args - (self: Args, min: 0, max: number): Args - (self: Args, min: number, max: number): Args -} -``` - -Added in v1.0.0 - -## repeated - -**Signature** - -```ts -export declare const repeated: (self: Args) => Args -``` - -Added in v1.0.0 - -## repeatedAtLeastOnce - -**Signature** - -```ts -export declare const repeatedAtLeastOnce: (self: Args) => Args -``` - -Added in v1.0.0 - -## toRegularLanguage - -Returns a `RegularLanguage` whose accepted language is equivalent to the language accepted by the provided `Args`. - -**Signature** - -```ts -export declare const toRegularLanguage: (self: Args) => RegularLanguage -``` - -Added in v1.0.0 - -# constructors - -## all - -**Signature** - -```ts -export declare const all: > | Record>>( - arg: Arg -) => All.Return -``` - -Added in v1.0.0 - -## boolean - -Creates a boolean argument. - -Can optionally provide a custom argument name (defaults to `"boolean"`). - -**Signature** - -```ts -export declare const boolean: (options?: Args.BaseArgsConfig) => Args -``` - -Added in v1.0.0 - -## choice - -Creates a choice argument. - -Can optionally provide a custom argument name (defaults to `"choice"`). - -**Signature** - -```ts -export declare const choice: ( - choices: readonly [[string, A], ...[string, A][]], - config?: Args.BaseArgsConfig -) => Args -``` - -Added in v1.0.0 - -## date - -Creates a date argument. - -Can optionally provide a custom argument name (defaults to `"date"`). - -**Signature** - -```ts -export declare const date: (config?: Args.BaseArgsConfig) => Args -``` - -Added in v1.0.0 - -## directory - -Creates a directory argument. - -Can optionally provide a custom argument name (defaults to `"directory"`). - -**Signature** - -```ts -export declare const directory: (config?: Args.PathArgsConfig) => Args -``` - -Added in v1.0.0 - -## file - -Creates a file argument. - -Can optionally provide a custom argument name (defaults to `"file"`). - -**Signature** - -```ts -export declare const file: (config?: Args.PathArgsConfig) => Args -``` - -Added in v1.0.0 - -## float - -Creates a floating point number argument. - -Can optionally provide a custom argument name (defaults to `"float"`). - -**Signature** - -```ts -export declare const float: (config?: Args.BaseArgsConfig) => Args -``` - -Added in v1.0.0 - -## integer - -Creates an integer argument. - -Can optionally provide a custom argument name (defaults to `"integer"`). - -**Signature** - -```ts -export declare const integer: (config?: Args.BaseArgsConfig) => Args -``` - -Added in v1.0.0 - -## none - -Creates an empty argument. - -**Signature** - -```ts -export declare const none: Args -``` - -Added in v1.0.0 - -## path - -Creates a path argument. - -Can optionally provide a custom argument name (defaults to `"path"`). - -**Signature** - -```ts -export declare const path: (config?: Args.PathArgsConfig) => Args -``` - -Added in v1.0.0 - -## text - -Creates a text argument. - -Can optionally provide a custom argument name (defaults to `"text"`). - -**Signature** - -```ts -export declare const text: (config?: Args.BaseArgsConfig) => Args -``` - -Added in v1.0.0 - -# mapping - -## map - -**Signature** - -```ts -export declare const map: { - (f: (a: A) => B): (self: Args) => Args - (self: Args, f: (a: A) => B): Args -} -``` - -Added in v1.0.0 - -## mapOrFail - -**Signature** - -```ts -export declare const mapOrFail: { - (f: (a: A) => Either): (self: Args) => Args - (self: Args, f: (a: A) => Either): Args -} -``` - -Added in v1.0.0 - -## mapTryCatch - -**Signature** - -```ts -export declare const mapTryCatch: { - (f: (a: A) => B, onError: (e: unknown) => HelpDoc): (self: Args) => Args - (self: Args, f: (a: A) => B, onError: (e: unknown) => HelpDoc): Args -} -``` - -Added in v1.0.0 - -# models - -## Args (interface) - -Represents arguments that can be passed to a command-line application. - -**Signature** - -```ts -export interface Args extends Args.Variance, Parameter, Pipeable { - get maxSize(): number - get minSize(): number - get identifier(): Option - get usage(): Usage - validate( - args: ReadonlyArray, - config: CliConfig - ): Effect, A]> - addDescription(description: string): Args -} -``` - -Added in v1.0.0 - -# refinements - -## isArgs - -**Signature** - -```ts -export declare const isArgs: (u: unknown) => u is Args -``` - -Added in v1.0.0 - -# symbols - -## ArgsTypeId - -**Signature** - -```ts -export declare const ArgsTypeId: typeof ArgsTypeId -``` - -Added in v1.0.0 - -## ArgsTypeId (type alias) - -**Signature** - -```ts -export type ArgsTypeId = typeof ArgsTypeId -``` - -Added in v1.0.0 - -# utils - -## All (namespace) - -Added in v1.0.0 - -### ArgsAny (type alias) - -**Signature** - -```ts -export type ArgsAny = Args -``` - -Added in v1.0.0 - -### Return (type alias) - -**Signature** - -```ts -export type Return | Record> = [Arg] extends [ReadonlyArray] - ? ReturnTuple - : [Arg] extends [Iterable] - ? ReturnIterable - : [Arg] extends [Record] - ? ReturnObject - : never -``` - -Added in v1.0.0 - -### ReturnIterable (type alias) - -**Signature** - -```ts -export type ReturnIterable> = [T] extends [Iterable>] - ? Args> - : never -``` - -Added in v1.0.0 - -### ReturnObject (type alias) - -**Signature** - -```ts -export type ReturnObject = [T] extends [{ [K: string]: ArgsAny }] - ? Args<{ - -readonly [K in keyof T]: [T[K]] extends [Args.Variance] ? _A : never - }> - : never -``` - -Added in v1.0.0 - -### ReturnTuple (type alias) - -**Signature** - -```ts -export type ReturnTuple> = Args< - T[number] extends never - ? [] - : { - -readonly [K in keyof T]: [T[K]] extends [Args.Variance] ? _A : never - } -> extends infer X - ? X - : never -``` - -Added in v1.0.0 - -## Args (namespace) - -Added in v1.0.0 - -### BaseArgsConfig (interface) - -**Signature** - -```ts -export interface BaseArgsConfig { - readonly name?: string -} -``` - -Added in v1.0.0 - -### PathArgsConfig (interface) - -**Signature** - -```ts -export interface PathArgsConfig extends BaseArgsConfig { - readonly exists?: Primitive.PathExists -} -``` - -Added in v1.0.0 - -### Variance (interface) - -**Signature** - -```ts -export interface Variance { - readonly [ArgsTypeId]: { - readonly _A: (_: never) => A - } -} -``` - -Added in v1.0.0 diff --git a/docs/modules/AutoCorrect.ts.md b/docs/modules/AutoCorrect.ts.md deleted file mode 100644 index a163c52..0000000 --- a/docs/modules/AutoCorrect.ts.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: AutoCorrect.ts -nav_order: 2 -parent: Modules ---- - -## AutoCorrect overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [utilities](#utilities) - - [levensteinDistance](#levensteindistance) - ---- - -# utilities - -## levensteinDistance - -**Signature** - -```ts -export declare const levensteinDistance: (first: string, second: string, config: CliConfig) => number -``` - -Added in v1.0.0 diff --git a/docs/modules/BuiltInOptions.ts.md b/docs/modules/BuiltInOptions.ts.md deleted file mode 100644 index d18f178..0000000 --- a/docs/modules/BuiltInOptions.ts.md +++ /dev/null @@ -1,201 +0,0 @@ ---- -title: BuiltInOptions.ts -nav_order: 3 -parent: Modules ---- - -## BuiltInOptions overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [constructors](#constructors) - - [showCompletionScript](#showcompletionscript) - - [showCompletions](#showcompletions) - - [showHelp](#showhelp) - - [showWizard](#showwizard) -- [models](#models) - - [BuiltInOptions (type alias)](#builtinoptions-type-alias) - - [ShowCompletionScript (interface)](#showcompletionscript-interface) - - [ShowCompletions (interface)](#showcompletions-interface) - - [ShowHelp (interface)](#showhelp-interface) - - [ShowWizard (interface)](#showwizard-interface) -- [options](#options) - - [builtInOptions](#builtinoptions) -- [refinements](#refinements) - - [isShowCompletionScript](#isshowcompletionscript) - - [isShowCompletions](#isshowcompletions) - - [isShowHelp](#isshowhelp) - - [isShowWizard](#isshowwizard) - ---- - -# constructors - -## showCompletionScript - -**Signature** - -```ts -export declare const showCompletionScript: (pathToExecutable: string, shellType: ShellType) => BuiltInOptions -``` - -Added in v1.0.0 - -## showCompletions - -**Signature** - -```ts -export declare const showCompletions: (index: number, shellType: ShellType) => BuiltInOptions -``` - -Added in v1.0.0 - -## showHelp - -**Signature** - -```ts -export declare const showHelp: (usage: Usage, helpDoc: HelpDoc) => BuiltInOptions -``` - -Added in v1.0.0 - -## showWizard - -**Signature** - -```ts -export declare const showWizard: (commmand: Command) => BuiltInOptions -``` - -Added in v1.0.0 - -# models - -## BuiltInOptions (type alias) - -**Signature** - -```ts -export type BuiltInOptions = ShowHelp | ShowCompletionScript | ShowCompletions | ShowWizard -``` - -Added in v1.0.0 - -## ShowCompletionScript (interface) - -**Signature** - -```ts -export interface ShowCompletionScript { - readonly _tag: "ShowCompletionScript" - readonly pathToExecutable: string - readonly shellType: ShellType -} -``` - -Added in v1.0.0 - -## ShowCompletions (interface) - -**Signature** - -```ts -export interface ShowCompletions { - readonly _tag: "ShowCompletions" - readonly index: number - readonly shellType: ShellType -} -``` - -Added in v1.0.0 - -## ShowHelp (interface) - -**Signature** - -```ts -export interface ShowHelp { - readonly _tag: "ShowHelp" - readonly usage: Usage - readonly helpDoc: HelpDoc -} -``` - -Added in v1.0.0 - -## ShowWizard (interface) - -**Signature** - -```ts -export interface ShowWizard { - readonly _tag: "ShowWizard" - readonly commmand: Command -} -``` - -Added in v1.0.0 - -# options - -## builtInOptions - -**Signature** - -```ts -export declare const builtInOptions:
( - command: Command, - usage: Usage, - helpDoc: HelpDoc -) => Options> -``` - -Added in v1.0.0 - -# refinements - -## isShowCompletionScript - -**Signature** - -```ts -export declare const isShowCompletionScript: (self: BuiltInOptions) => self is ShowCompletionScript -``` - -Added in v1.0.0 - -## isShowCompletions - -**Signature** - -```ts -export declare const isShowCompletions: (self: BuiltInOptions) => self is ShowCompletions -``` - -Added in v1.0.0 - -## isShowHelp - -**Signature** - -```ts -export declare const isShowHelp: (self: BuiltInOptions) => self is ShowHelp -``` - -Added in v1.0.0 - -## isShowWizard - -**Signature** - -```ts -export declare const isShowWizard: (self: BuiltInOptions) => self is ShowWizard -``` - -Added in v1.0.0 diff --git a/docs/modules/CliApp.ts.md b/docs/modules/CliApp.ts.md deleted file mode 100644 index fef2ca6..0000000 --- a/docs/modules/CliApp.ts.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: CliApp.ts -nav_order: 4 -parent: Modules ---- - -## CliApp overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [constructors](#constructors) - - [make](#make) -- [execution](#execution) - - [run](#run) -- [models](#models) - - [CliApp (interface)](#cliapp-interface) -- [utils](#utils) - - [CliApp (namespace)](#cliapp-namespace) - - [Environment (type alias)](#environment-type-alias) - ---- - -# constructors - -## make - -**Signature** - -```ts -export declare const make:
(config: { - name: string - version: string - command: Command - summary?: Span | undefined - footer?: HelpDoc | undefined -}) => CliApp -``` - -Added in v1.0.0 - -# execution - -## run - -**Signature** - -```ts -export declare const run: { - ( - args: ReadonlyArray, - execute: (a: A) => Effect - ): (self: CliApp) => Effect - ( - self: CliApp, - args: ReadonlyArray, - execute: (a: A) => Effect - ): Effect -} -``` - -Added in v1.0.0 - -# models - -## CliApp (interface) - -A `CliApp` is a complete description of a command-line application. - -**Signature** - -```ts -export interface CliApp { - readonly name: string - readonly version: string - readonly command: Command - readonly summary: Span - readonly footer: HelpDoc -} -``` - -Added in v1.0.0 - -# utils - -## CliApp (namespace) - -Added in v1.0.0 - -### Environment (type alias) - -**Signature** - -```ts -export type Environment = CommandExecutor | FileSystem | Path -``` - -Added in v1.0.0 diff --git a/docs/modules/CliConfig.ts.md b/docs/modules/CliConfig.ts.md deleted file mode 100644 index a103188..0000000 --- a/docs/modules/CliConfig.ts.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: CliConfig.ts -nav_order: 5 -parent: Modules ---- - -## CliConfig overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [constructors](#constructors) - - [defaultConfig](#defaultconfig) - - [make](#make) -- [context](#context) - - [CliConfig](#cliconfig) - - [defaultLayer](#defaultlayer) - - [layer](#layer) -- [models](#models) - - [CliConfig (interface)](#cliconfig-interface) -- [utilities](#utilities) - - [normalizeCase](#normalizecase) - ---- - -# constructors - -## defaultConfig - -**Signature** - -```ts -export declare const defaultConfig: CliConfig -``` - -Added in v1.0.0 - -## make - -**Signature** - -```ts -export declare const make: (params: Partial) => CliConfig -``` - -Added in v1.0.0 - -# context - -## CliConfig - -**Signature** - -```ts -export declare const CliConfig: Context.Tag -``` - -Added in v1.0.0 - -## defaultLayer - -**Signature** - -```ts -export declare const defaultLayer: Layer.Layer -``` - -Added in v1.0.0 - -## layer - -**Signature** - -```ts -export declare const layer: (config?: Partial) => Layer.Layer -``` - -Added in v1.0.0 - -# models - -## CliConfig (interface) - -Represents how arguments from the command-line are to be parsed. - -**Signature** - -```ts -export interface CliConfig { - /** - * Whether or not the argument parser should be case sensitive. - */ - readonly isCaseSensitive: boolean - /** - * Threshold for when to show auto correct suggestions. - */ - readonly autoCorrectLimit: number - /** - * Whether or not to perform a final check of the command-line arguments for - * a built-in option, even if the provided command is not valid. - */ - readonly finalCheckBuiltIn: boolean - /** - * Whether or not to display all the names of an option in the usage of a - * particular command. - */ - readonly showAllNames: boolean - /** - * Whether or not to display the type of an option in the usage of a - * particular command. - */ - readonly showTypes: boolean -} -``` - -Added in v1.0.0 - -# utilities - -## normalizeCase - -**Signature** - -```ts -export declare const normalizeCase: { - (text: string): (self: CliConfig) => string - (self: CliConfig, text: string): string -} -``` - -Added in v1.0.0 diff --git a/docs/modules/Command.ts.md b/docs/modules/Command.ts.md deleted file mode 100644 index 914a25d..0000000 --- a/docs/modules/Command.ts.md +++ /dev/null @@ -1,315 +0,0 @@ ---- -title: Command.ts -nav_order: 6 -parent: Modules ---- - -## Command overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [combinators](#combinators) - - [orElse](#orelse) - - [orElseEither](#orelseeither) - - [subcommands](#subcommands) - - [toRegularLanguage](#toregularlanguage) - - [withHelp](#withhelp) -- [constructors](#constructors) - - [prompt](#prompt) - - [standard](#standard) -- [mapping](#mapping) - - [map](#map) -- [models](#models) - - [Command (interface)](#command-interface) -- [symbols](#symbols) - - [CommandTypeId](#commandtypeid) - - [CommandTypeId (type alias)](#commandtypeid-type-alias) -- [utils](#utils) - - [Command (namespace)](#command-namespace) - - [ConstructorConfig (interface)](#constructorconfig-interface) - - [Variance (interface)](#variance-interface) - - [ComputeParsedType (type alias)](#computeparsedtype-type-alias) - - [GetParsedType (type alias)](#getparsedtype-type-alias) - - [ParsedStandardCommand (type alias)](#parsedstandardcommand-type-alias) - - [ParsedSubcommand (type alias)](#parsedsubcommand-type-alias) - - [ParsedUserInputCommand (type alias)](#parseduserinputcommand-type-alias) - - [Subcommands (type alias)](#subcommands-type-alias) - ---- - -# combinators - -## orElse - -**Signature** - -```ts -export declare const orElse: { - (that: Command):
(self: Command) => Command - (self: Command, that: Command): Command -} -``` - -Added in v1.0.0 - -## orElseEither - -**Signature** - -```ts -export declare const orElseEither: { - (that: Command): (self: Command) => Command> - (self: Command, that: Command): Command> -} -``` - -Added in v1.0.0 - -## subcommands - -**Signature** - -```ts -export declare const subcommands: { - , ...Command[]]>( - subcommands: [...Subcommands] - ): ( - self: Command - ) => Command< - Command.ComputeParsedType> }>> - > - , ...Command[]]>( - self: Command, - subcommands: [...Subcommands] - ): Command< - Command.ComputeParsedType> }>> - > -} -``` - -Added in v1.0.0 - -## toRegularLanguage - -Returns a `RegularLanguage` whose accepted language is equivalent to the -language accepted by the provided `Command`. - -**Signature** - -```ts -export declare const toRegularLanguage: { - (allowAlias: boolean): (self: Command) => RegularLanguage - (self: Command, allowAlias: boolean): RegularLanguage -} -``` - -Added in v1.0.0 - -## withHelp - -**Signature** - -```ts -export declare const withHelp: { - (help: string | HelpDoc): (self: Command) => Command - (self: Command, help: string | HelpDoc): Command -} -``` - -Added in v1.0.0 - -# constructors - -## prompt - -**Signature** - -```ts -export declare const prompt: ( - name: Name, - prompt: Prompt -) => Command<{ readonly name: Name; readonly value: A }> -``` - -Added in v1.0.0 - -## standard - -**Signature** - -```ts -export declare const standard: ( - name: Name, - config?: Command.ConstructorConfig | undefined -) => Command<{ readonly name: Name; readonly options: OptionsType; readonly args: ArgsType }> -``` - -Added in v1.0.0 - -# mapping - -## map - -**Signature** - -```ts -export declare const map: { - (f: (a: A) => B): (self: Command) => Command - (self: Command, f: (a: A) => B): Command -} -``` - -Added in v1.0.0 - -# models - -## Command (interface) - -A `Command` represents a command in a command-line application. - -Every command-line application will have at least one command: the -application itself. Other command-line applications may support multiple -commands. - -**Signature** - -```ts -export interface Command extends Command.Variance, Named, Pipeable { - get usage(): Usage - get subcommands(): HashMap> - parse( - args: ReadonlyArray, - config: CliConfig - ): Effect> -} -``` - -Added in v1.0.0 - -# symbols - -## CommandTypeId - -**Signature** - -```ts -export declare const CommandTypeId: typeof CommandTypeId -``` - -Added in v1.0.0 - -## CommandTypeId (type alias) - -**Signature** - -```ts -export type CommandTypeId = typeof CommandTypeId -``` - -Added in v1.0.0 - -# utils - -## Command (namespace) - -Added in v1.0.0 - -### ConstructorConfig (interface) - -**Signature** - -```ts -export interface ConstructorConfig { - readonly options?: Options - readonly args?: Args -} -``` - -Added in v1.0.0 - -### Variance (interface) - -**Signature** - -```ts -export interface Variance { - readonly [CommandTypeId]: { - readonly _A: (_: never) => A - } -} -``` - -Added in v1.0.0 - -### ComputeParsedType (type alias) - -**Signature** - -```ts -export type ComputeParsedType = { [K in keyof A]: A[K] } extends infer X ? X : never -``` - -Added in v1.0.0 - -### GetParsedType (type alias) - -**Signature** - -```ts -export type GetParsedType = C extends Command ? P : never -``` - -Added in v1.0.0 - -### ParsedStandardCommand (type alias) - -**Signature** - -```ts -export type ParsedStandardCommand = Command.ComputeParsedType<{ - readonly name: Name - readonly options: OptionsType - readonly args: ArgsType -}> -``` - -Added in v1.0.0 - -### ParsedSubcommand (type alias) - -**Signature** - -```ts -export type ParsedSubcommand> = A[number] extends Command - ? GetParsedType - : never -``` - -Added in v1.0.0 - -### ParsedUserInputCommand (type alias) - -**Signature** - -```ts -export type ParsedUserInputCommand = Command.ComputeParsedType<{ - readonly name: Name - readonly value: ValueType -}> -``` - -Added in v1.0.0 - -### Subcommands (type alias) - -**Signature** - -```ts -export type Subcommands>> = GetParsedType -``` - -Added in v1.0.0 diff --git a/docs/modules/CommandDirective.ts.md b/docs/modules/CommandDirective.ts.md deleted file mode 100644 index c12540e..0000000 --- a/docs/modules/CommandDirective.ts.md +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: CommandDirective.ts -nav_order: 7 -parent: Modules ---- - -## CommandDirective overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [constructors](#constructors) - - [builtIn](#builtin) - - [userDefined](#userdefined) -- [mapping](#mapping) - - [map](#map) -- [models](#models) - - [BuiltIn (interface)](#builtin-interface) - - [CommandDirective (type alias)](#commanddirective-type-alias) - - [UserDefined (interface)](#userdefined-interface) -- [refinements](#refinements) - - [isBuiltIn](#isbuiltin) - - [isUserDefined](#isuserdefined) - ---- - -# constructors - -## builtIn - -**Signature** - -```ts -export declare const builtIn: (option: BuiltInOptions) => CommandDirective -``` - -Added in v1.0.0 - -## userDefined - -**Signature** - -```ts -export declare const userDefined:
(leftover: ReadonlyArray, value: A) => CommandDirective -``` - -Added in v1.0.0 - -# mapping - -## map - -**Signature** - -```ts -export declare const map: { - (f: (a: A) => B): (self: CommandDirective) => CommandDirective - (self: CommandDirective, f: (a: A) => B): CommandDirective -} -``` - -Added in v1.0.0 - -# models - -## BuiltIn (interface) - -**Signature** - -```ts -export interface BuiltIn { - readonly _tag: "BuiltIn" - readonly option: BuiltInOptions -} -``` - -Added in v1.0.0 - -## CommandDirective (type alias) - -**Signature** - -```ts -export type CommandDirective = BuiltIn | UserDefined -``` - -Added in v1.0.0 - -## UserDefined (interface) - -**Signature** - -```ts -export interface UserDefined { - readonly _tag: "UserDefined" - readonly leftover: ReadonlyArray - readonly value: A -} -``` - -Added in v1.0.0 - -# refinements - -## isBuiltIn - -**Signature** - -```ts -export declare const isBuiltIn: (self: CommandDirective) => self is BuiltIn -``` - -Added in v1.0.0 - -## isUserDefined - -**Signature** - -```ts -export declare const isUserDefined: (self: CommandDirective) => self is UserDefined -``` - -Added in v1.0.0 diff --git a/docs/modules/Compgen.ts.md b/docs/modules/Compgen.ts.md deleted file mode 100644 index 101e9cc..0000000 --- a/docs/modules/Compgen.ts.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: Compgen.ts -nav_order: 8 -parent: Modules ---- - -## Compgen overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [context](#context) - - [Compgen](#compgen) - - [LiveCompgen](#livecompgen) - - [TestCompgen](#testcompgen) -- [models](#models) - - [Compgen (interface)](#compgen-interface) - ---- - -# context - -## Compgen - -**Signature** - -```ts -export declare const Compgen: Tag -``` - -Added in v1.0.0 - -## LiveCompgen - -**Signature** - -```ts -export declare const LiveCompgen: Layer -``` - -Added in v1.0.0 - -## TestCompgen - -**Signature** - -```ts -export declare const TestCompgen: (workingDirectory: string) => Layer -``` - -Added in v1.0.0 - -# models - -## Compgen (interface) - -`Compgen` simplifies the process of calling Bash's built-in `compgen` command. - -**Signature** - -```ts -export interface Compgen { - completeFileNames(word: string): Effect> - completeDirectoryNames(word: string): Effect> -} -``` - -Added in v1.0.0 diff --git a/docs/modules/Completion.ts.md b/docs/modules/Completion.ts.md deleted file mode 100644 index 0f6af33..0000000 --- a/docs/modules/Completion.ts.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: Completion.ts -nav_order: 9 -parent: Modules ---- - -## Completion overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [completions](#completions) - - [getCompletionScript](#getcompletionscript) - - [getCompletions](#getcompletions) - ---- - -# completions - -## getCompletionScript - -**Signature** - -```ts -export declare const getCompletionScript: ( - pathToExecutable: string, - programNames: readonly [string, ...string[]], - shellType: ShellType, - path: Path -) => string -``` - -Added in v1.0.0 - -## getCompletions - -**Signature** - -```ts -export declare const getCompletions:
( - words: ReadonlyArray, - index: number, - command: Command, - config: CliConfig, - compgen: Compgen -) => Effect> -``` - -Added in v1.0.0 diff --git a/docs/modules/HelpDoc.ts.md b/docs/modules/HelpDoc.ts.md deleted file mode 100644 index 0a7b7df..0000000 --- a/docs/modules/HelpDoc.ts.md +++ /dev/null @@ -1,366 +0,0 @@ ---- -title: HelpDoc.ts -nav_order: 10 -parent: Modules ---- - -## HelpDoc overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [combinators](#combinators) - - [orElse](#orelse) - - [sequence](#sequence) -- [constructors](#constructors) - - [blocks](#blocks) - - [descriptionList](#descriptionlist) - - [empty](#empty) - - [enumeration](#enumeration) - - [h1](#h1) - - [h2](#h2) - - [h3](#h3) - - [p](#p) -- [getters](#getters) - - [getSpan](#getspan) -- [mapping](#mapping) - - [mapDescriptionList](#mapdescriptionlist) -- [models](#models) - - [DescriptionList (interface)](#descriptionlist-interface) - - [Empty (interface)](#empty-interface) - - [Enumeration (interface)](#enumeration-interface) - - [Header (interface)](#header-interface) - - [HelpDoc (type alias)](#helpdoc-type-alias) - - [Paragraph (interface)](#paragraph-interface) - - [Sequence (interface)](#sequence-interface) -- [refinements](#refinements) - - [isDescriptionList](#isdescriptionlist) - - [isEmpty](#isempty) - - [isEnumeration](#isenumeration) - - [isHeader](#isheader) - - [isParagraph](#isparagraph) - - [isSequence](#issequence) -- [rendering](#rendering) - - [toAnsiDoc](#toansidoc) - - [toAnsiText](#toansitext) - ---- - -# combinators - -## orElse - -**Signature** - -```ts -export declare const orElse: { (that: HelpDoc): (self: HelpDoc) => HelpDoc; (self: HelpDoc, that: HelpDoc): HelpDoc } -``` - -Added in v1.0.0 - -## sequence - -**Signature** - -```ts -export declare const sequence: { (that: HelpDoc): (self: HelpDoc) => HelpDoc; (self: HelpDoc, that: HelpDoc): HelpDoc } -``` - -Added in v1.0.0 - -# constructors - -## blocks - -**Signature** - -```ts -export declare const blocks: (helpDocs: Iterable) => HelpDoc -``` - -Added in v1.0.0 - -## descriptionList - -**Signature** - -```ts -export declare const descriptionList: (definitions: readonly [[Span, HelpDoc], ...[Span, HelpDoc][]]) => HelpDoc -``` - -Added in v1.0.0 - -## empty - -**Signature** - -```ts -export declare const empty: HelpDoc -``` - -Added in v1.0.0 - -## enumeration - -**Signature** - -```ts -export declare const enumeration: (elements: readonly [HelpDoc, ...HelpDoc[]]) => HelpDoc -``` - -Added in v1.0.0 - -## h1 - -**Signature** - -```ts -export declare const h1: (value: string | Span) => HelpDoc -``` - -Added in v1.0.0 - -## h2 - -**Signature** - -```ts -export declare const h2: (value: string | Span) => HelpDoc -``` - -Added in v1.0.0 - -## h3 - -**Signature** - -```ts -export declare const h3: (value: string | Span) => HelpDoc -``` - -Added in v1.0.0 - -## p - -**Signature** - -```ts -export declare const p: (value: string | Span) => HelpDoc -``` - -Added in v1.0.0 - -# getters - -## getSpan - -**Signature** - -```ts -export declare const getSpan: (self: HelpDoc) => Span -``` - -Added in v1.0.0 - -# mapping - -## mapDescriptionList - -**Signature** - -```ts -export declare const mapDescriptionList: { - (f: (span: Span, helpDoc: HelpDoc) => readonly [Span, HelpDoc]): (self: HelpDoc) => HelpDoc - (self: HelpDoc, f: (span: Span, helpDoc: HelpDoc) => readonly [Span, HelpDoc]): HelpDoc -} -``` - -Added in v1.0.0 - -# models - -## DescriptionList (interface) - -**Signature** - -```ts -export interface DescriptionList { - readonly _tag: "DescriptionList" - readonly definitions: NonEmptyReadonlyArray -} -``` - -Added in v1.0.0 - -## Empty (interface) - -**Signature** - -```ts -export interface Empty { - readonly _tag: "Empty" -} -``` - -Added in v1.0.0 - -## Enumeration (interface) - -**Signature** - -```ts -export interface Enumeration { - readonly _tag: "Enumeration" - readonly elements: NonEmptyReadonlyArray -} -``` - -Added in v1.0.0 - -## Header (interface) - -**Signature** - -```ts -export interface Header { - readonly _tag: "Header" - readonly value: Span - readonly level: number -} -``` - -Added in v1.0.0 - -## HelpDoc (type alias) - -A `HelpDoc` models the full documentation for a command-line application. - -`HelpDoc` is composed of optional header and footers, and in-between, a -list of HelpDoc-level content items. - -HelpDoc-level content items, in turn, can be headers, paragraphs, description -lists, and enumerations. - -A `HelpDoc` can be converted into plaintext, JSON, and HTML. - -**Signature** - -```ts -export type HelpDoc = Empty | Header | Paragraph | DescriptionList | Enumeration | Sequence -``` - -Added in v1.0.0 - -## Paragraph (interface) - -**Signature** - -```ts -export interface Paragraph { - readonly _tag: "Paragraph" - readonly value: Span -} -``` - -Added in v1.0.0 - -## Sequence (interface) - -**Signature** - -```ts -export interface Sequence { - readonly _tag: "Sequence" - readonly left: HelpDoc - readonly right: HelpDoc -} -``` - -Added in v1.0.0 - -# refinements - -## isDescriptionList - -**Signature** - -```ts -export declare const isDescriptionList: (helpDoc: HelpDoc) => helpDoc is DescriptionList -``` - -Added in v1.0.0 - -## isEmpty - -**Signature** - -```ts -export declare const isEmpty: (helpDoc: HelpDoc) => helpDoc is Empty -``` - -Added in v1.0.0 - -## isEnumeration - -**Signature** - -```ts -export declare const isEnumeration: (helpDoc: HelpDoc) => helpDoc is Enumeration -``` - -Added in v1.0.0 - -## isHeader - -**Signature** - -```ts -export declare const isHeader: (helpDoc: HelpDoc) => helpDoc is Header -``` - -Added in v1.0.0 - -## isParagraph - -**Signature** - -```ts -export declare const isParagraph: (helpDoc: HelpDoc) => helpDoc is Paragraph -``` - -Added in v1.0.0 - -## isSequence - -**Signature** - -```ts -export declare const isSequence: (helpDoc: HelpDoc) => helpDoc is Sequence -``` - -Added in v1.0.0 - -# rendering - -## toAnsiDoc - -**Signature** - -```ts -export declare const toAnsiDoc: (self: HelpDoc) => AnsiDoc -``` - -Added in v1.0.0 - -## toAnsiText - -**Signature** - -```ts -export declare const toAnsiText: (self: HelpDoc) => string -``` - -Added in v1.0.0 diff --git a/docs/modules/HelpDoc/Span.ts.md b/docs/modules/HelpDoc/Span.ts.md deleted file mode 100644 index cbe5196..0000000 --- a/docs/modules/HelpDoc/Span.ts.md +++ /dev/null @@ -1,314 +0,0 @@ ---- -title: HelpDoc/Span.ts -nav_order: 11 -parent: Modules ---- - -## Span overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [combinators](#combinators) - - [concat](#concat) - - [spans](#spans) -- [constructors](#constructors) - - [code](#code) - - [empty](#empty) - - [error](#error) - - [space](#space) - - [strong](#strong) - - [text](#text) - - [uri](#uri) - - [weak](#weak) -- [models](#models) - - [Code (interface)](#code-interface) - - [Error (interface)](#error-interface) - - [Sequence (interface)](#sequence-interface) - - [Span (type alias)](#span-type-alias) - - [Strong (interface)](#strong-interface) - - [Text (interface)](#text-interface) - - [URI (interface)](#uri-interface) - - [Weak (interface)](#weak-interface) -- [refinements](#refinements) - - [isError](#iserror) - - [isSequence](#issequence) - - [isStrong](#isstrong) - - [isText](#istext) - - [isUri](#isuri) - - [isWeak](#isweak) - ---- - -# combinators - -## concat - -**Signature** - -```ts -export declare const concat: { (that: Span): (self: Span) => Span; (self: Span, that: Span): Span } -``` - -Added in v1.0.0 - -## spans - -**Signature** - -```ts -export declare const spans: (spans: Iterable) => Span -``` - -Added in v1.0.0 - -# constructors - -## code - -**Signature** - -```ts -export declare const code: (value: string) => Span -``` - -Added in v1.0.0 - -## empty - -**Signature** - -```ts -export declare const empty: Span -``` - -Added in v1.0.0 - -## error - -**Signature** - -```ts -export declare const error: (value: string | Span) => Span -``` - -Added in v1.0.0 - -## space - -**Signature** - -```ts -export declare const space: Span -``` - -Added in v1.0.0 - -## strong - -**Signature** - -```ts -export declare const strong: (value: string | Span) => Span -``` - -Added in v1.0.0 - -## text - -**Signature** - -```ts -export declare const text: (value: string) => Span -``` - -Added in v1.0.0 - -## uri - -**Signature** - -```ts -export declare const uri: (value: string) => Span -``` - -Added in v1.0.0 - -## weak - -**Signature** - -```ts -export declare const weak: (value: string | Span) => Span -``` - -Added in v1.0.0 - -# models - -## Code (interface) - -**Signature** - -```ts -export interface Code { - readonly _tag: "Code" - readonly value: string -} -``` - -Added in v1.0.0 - -## Error (interface) - -**Signature** - -```ts -export interface Error { - readonly _tag: "Error" - readonly value: Span -} -``` - -Added in v1.0.0 - -## Sequence (interface) - -**Signature** - -```ts -export interface Sequence { - readonly _tag: "Sequence" - readonly left: Span - readonly right: Span -} -``` - -Added in v1.0.0 - -## Span (type alias) - -**Signature** - -```ts -export type Span = Text | Code | Error | Weak | Strong | URI | Sequence -``` - -Added in v1.0.0 - -## Strong (interface) - -**Signature** - -```ts -export interface Strong { - readonly _tag: "Strong" - readonly value: Span -} -``` - -Added in v1.0.0 - -## Text (interface) - -**Signature** - -```ts -export interface Text { - readonly _tag: "Text" - readonly value: string -} -``` - -Added in v1.0.0 - -## URI (interface) - -**Signature** - -```ts -export interface URI { - readonly _tag: "URI" - readonly value: string -} -``` - -Added in v1.0.0 - -## Weak (interface) - -**Signature** - -```ts -export interface Weak { - readonly _tag: "Weak" - readonly value: Span -} -``` - -Added in v1.0.0 - -# refinements - -## isError - -**Signature** - -```ts -export declare const isError: (self: Span) => self is Error -``` - -Added in v1.0.0 - -## isSequence - -**Signature** - -```ts -export declare const isSequence: (self: Span) => self is Sequence -``` - -Added in v1.0.0 - -## isStrong - -**Signature** - -```ts -export declare const isStrong: (self: Span) => self is Strong -``` - -Added in v1.0.0 - -## isText - -**Signature** - -```ts -export declare const isText: (self: Span) => self is Text -``` - -Added in v1.0.0 - -## isUri - -**Signature** - -```ts -export declare const isUri: (self: Span) => self is URI -``` - -Added in v1.0.0 - -## isWeak - -**Signature** - -```ts -export declare const isWeak: (self: Span) => self is Weak -``` - -Added in v1.0.0 diff --git a/docs/modules/Options.ts.md b/docs/modules/Options.ts.md deleted file mode 100644 index a5d4290..0000000 --- a/docs/modules/Options.ts.md +++ /dev/null @@ -1,601 +0,0 @@ ---- -title: Options.ts -nav_order: 13 -parent: Modules ---- - -## Options overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [combinators](#combinators) - - [filterMap](#filtermap) - - [isBool](#isbool) - - [map](#map) - - [mapOrFail](#maporfail) - - [mapTryCatch](#maptrycatch) - - [optional](#optional) - - [orElse](#orelse) - - [orElseEither](#orelseeither) - - [toRegularLanguage](#toregularlanguage) - - [validate](#validate) - - [withAlias](#withalias) - - [withDefault](#withdefault) - - [withDescription](#withdescription) - - [withPseudoName](#withpseudoname) -- [constructors](#constructors) - - [all](#all) - - [boolean](#boolean) - - [choice](#choice) - - [choiceWithValue](#choicewithvalue) - - [date](#date) - - [directory](#directory) - - [file](#file) - - [float](#float) - - [integer](#integer) - - [keyValueMap](#keyvaluemap) - - [none](#none) - - [text](#text) -- [models](#models) - - [Options (interface)](#options-interface) -- [refinements](#refinements) - - [isOptions](#isoptions) -- [symbols](#symbols) - - [OptionsTypeId](#optionstypeid) - - [OptionsTypeId (type alias)](#optionstypeid-type-alias) -- [utils](#utils) - - [All (namespace)](#all-namespace) - - [OptionsAny (type alias)](#optionsany-type-alias) - - [Return (type alias)](#return-type-alias) - - [ReturnIterable (type alias)](#returniterable-type-alias) - - [ReturnObject (type alias)](#returnobject-type-alias) - - [ReturnTuple (type alias)](#returntuple-type-alias) - - [Options (namespace)](#options-namespace) - - [BooleanOptionsConfig (interface)](#booleanoptionsconfig-interface) - - [PathOptionsConfig (interface)](#pathoptionsconfig-interface) - - [Variance (interface)](#variance-interface) - ---- - -# combinators - -## filterMap - -**Signature** - -```ts -export declare const filterMap: { - (f: (a: A) => Option, message: string): (self: Options
) => Options - (self: Options, f: (a: A) => Option, message: string): Options -} -``` - -Added in v1.0.0 - -## isBool - -Returns `true` if the specified `Options` is a boolean flag, `false` -otherwise. - -**Signature** - -```ts -export declare const isBool: (self: Options) => boolean -``` - -Added in v1.0.0 - -## map - -**Signature** - -```ts -export declare const map: { - (f: (a: A) => B): (self: Options) => Options - (self: Options, f: (a: A) => B): Options -} -``` - -Added in v1.0.0 - -## mapOrFail - -**Signature** - -```ts -export declare const mapOrFail: { - (f: (a: A) => Either): (self: Options) => Options - (self: Options, f: (a: A) => Either): Options -} -``` - -Added in v1.0.0 - -## mapTryCatch - -**Signature** - -```ts -export declare const mapTryCatch: { - (f: (a: A) => B, onError: (e: unknown) => HelpDoc): (self: Options) => Options - (self: Options, f: (a: A) => B, onError: (e: unknown) => HelpDoc): Options -} -``` - -Added in v1.0.0 - -## optional - -**Signature** - -```ts -export declare const optional: (self: Options) => Options> -``` - -Added in v1.0.0 - -## orElse - -**Signature** - -```ts -export declare const orElse: { - (that: Options): (self: Options) => Options - (self: Options, that: Options): Options -} -``` - -Added in v1.0.0 - -## orElseEither - -**Signature** - -```ts -export declare const orElseEither: { - (that: Options): (self: Options) => Options> - (self: Options, that: Options): Options> -} -``` - -Added in v1.0.0 - -## toRegularLanguage - -Returns a `RegularLanguage` whose accepted language is equivalent to the language accepted by the provided -`Options`. - -**Signature** - -```ts -export declare const toRegularLanguage: (self: Options) => RegularLanguage -``` - -Added in v1.0.0 - -## validate - -**Signature** - -```ts -export declare const validate: { - ( - args: ReadonlyArray, - config: CliConfig - ): ( - self: Options - ) => Effect, readonly string[], A]> - ( - self: Options, - args: ReadonlyArray, - config: CliConfig - ): Effect, readonly string[], A]> -} -``` - -Added in v1.0.0 - -## withAlias - -**Signature** - -```ts -export declare const withAlias: { - (alias: string): (self: Options) => Options - (self: Options, alias: string): Options -} -``` - -Added in v1.0.0 - -## withDefault - -**Signature** - -```ts -export declare const withDefault: { - (fallback: A): (self: Options) => Options - (self: Options, fallback: A): Options -} -``` - -Added in v1.0.0 - -## withDescription - -**Signature** - -```ts -export declare const withDescription: { - (description: string): (self: Options) => Options - (self: Options, description: string): Options -} -``` - -Added in v1.0.0 - -## withPseudoName - -**Signature** - -```ts -export declare const withPseudoName: { - (pseudoName: string): (self: Options) => Options - (self: Options, pseudoName: string): Options -} -``` - -Added in v1.0.0 - -# constructors - -## all - -**Signature** - -```ts -export declare const all: > | Record>>( - arg: Arg -) => All.Return -``` - -Added in v1.0.0 - -## boolean - -**Signature** - -```ts -export declare const boolean: (name: string, options?: Options.BooleanOptionsConfig) => Options -``` - -Added in v1.0.0 - -## choice - -Constructs command-line `Options` that represent a choice between several -inputs. The input will be mapped to it's associated value during parsing. - -**Signature** - -```ts -export declare const choice: ( - name: string, - choices: C -) => Options -``` - -**Example** - -```ts -import * as Options from "@effect/cli/Options" - -export const animal: Options.Options<"dog" | "cat"> = Options.choice("animal", ["dog", "cat"]) -``` - -Added in v1.0.0 - -## choiceWithValue - -Constructs command-line `Options` that represent a choice between several -inputs. The input will be mapped to it's associated value during parsing. - -**Signature** - -```ts -export declare const choiceWithValue: ( - name: string, - choices: C -) => Options -``` - -**Example** - -```ts -import * as Options from "@effect/cli/Options" -import * as Data from "effect/Data" - -export type Animal = Dog | Cat - -export interface Dog extends Data.Case { - readonly _tag: "Dog" -} - -export const Dog = Data.tagged("Dog") - -export interface Cat extends Data.Case { - readonly _tag: "Cat" -} - -export const Cat = Data.tagged("Cat") - -export const animal: Options.Options = Options.choiceWithValue("animal", [ - ["dog", Dog()], - ["cat", Cat()] -]) -``` - -Added in v1.0.0 - -## date - -**Signature** - -```ts -export declare const date: (name: string) => Options -``` - -Added in v1.0.0 - -## directory - -Creates a parameter expecting path to a directory. - -**Signature** - -```ts -export declare const directory: (name: string, config: Options.PathOptionsConfig) => Options -``` - -Added in v1.0.0 - -## file - -Creates a parameter expecting path to a file. - -**Signature** - -```ts -export declare const file: (name: string, config: Options.PathOptionsConfig) => Options -``` - -Added in v1.0.0 - -## float - -**Signature** - -```ts -export declare const float: (name: string) => Options -``` - -Added in v1.0.0 - -## integer - -**Signature** - -```ts -export declare const integer: (name: string) => Options -``` - -Added in v1.0.0 - -## keyValueMap - -**Signature** - -```ts -export declare const keyValueMap: (name: string) => Options> -``` - -Added in v1.0.0 - -## none - -**Signature** - -```ts -export declare const none: Options -``` - -Added in v1.0.0 - -## text - -**Signature** - -```ts -export declare const text: (name: string) => Options -``` - -Added in v1.0.0 - -# models - -## Options (interface) - -**Signature** - -```ts -export interface Options extends Options.Variance, Parameter, Pipeable { - get identifier(): Option - get usage(): Usage - get flattened(): ReadonlyArray - validate(args: HashMap>, config: CliConfig): Effect - /** @internal */ - modifySingle(f: <_>(single: InternalOptions.Single<_>) => InternalOptions.Single<_>): Options -} -``` - -Added in v1.0.0 - -# refinements - -## isOptions - -**Signature** - -```ts -export declare const isOptions: (u: unknown) => u is Options -``` - -Added in v1.0.0 - -# symbols - -## OptionsTypeId - -**Signature** - -```ts -export declare const OptionsTypeId: typeof OptionsTypeId -``` - -Added in v1.0.0 - -## OptionsTypeId (type alias) - -**Signature** - -```ts -export type OptionsTypeId = typeof OptionsTypeId -``` - -Added in v1.0.0 - -# utils - -## All (namespace) - -Added in v1.0.0 - -### OptionsAny (type alias) - -**Signature** - -```ts -export type OptionsAny = Options -``` - -Added in v1.0.0 - -### Return (type alias) - -**Signature** - -```ts -export type Return | Record> = [Arg] extends [ - ReadonlyArray -] - ? ReturnTuple - : [Arg] extends [Iterable] - ? ReturnIterable - : [Arg] extends [Record] - ? ReturnObject - : never -``` - -Added in v1.0.0 - -### ReturnIterable (type alias) - -**Signature** - -```ts -export type ReturnIterable> = [T] extends [Iterable>] - ? Options> - : never -``` - -Added in v1.0.0 - -### ReturnObject (type alias) - -**Signature** - -```ts -export type ReturnObject = [T] extends [{ [K: string]: OptionsAny }] - ? Options<{ - -readonly [K in keyof T]: [T[K]] extends [Options.Variance] ? _A : never - }> - : never -``` - -Added in v1.0.0 - -### ReturnTuple (type alias) - -**Signature** - -```ts -export type ReturnTuple> = Options< - T[number] extends never - ? [] - : { - -readonly [K in keyof T]: [T[K]] extends [Options.Variance] ? _A : never - } -> extends infer X - ? X - : never -``` - -Added in v1.0.0 - -## Options (namespace) - -Added in v1.0.0 - -### BooleanOptionsConfig (interface) - -**Signature** - -```ts -export interface BooleanOptionsConfig { - readonly ifPresent?: boolean - readonly negationNames?: NonEmptyReadonlyArray - readonly aliases?: NonEmptyReadonlyArray -} -``` - -Added in v1.0.0 - -### PathOptionsConfig (interface) - -**Signature** - -```ts -export interface PathOptionsConfig { - readonly exists?: Primitive.PathExists -} -``` - -Added in v1.0.0 - -### Variance (interface) - -**Signature** - -```ts -export interface Variance { - readonly [OptionsTypeId]: { - _A: (_: never) => A - } -} -``` - -Added in v1.0.0 diff --git a/docs/modules/Parameter.ts.md b/docs/modules/Parameter.ts.md deleted file mode 100644 index 81a7b49..0000000 --- a/docs/modules/Parameter.ts.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Parameter.ts -nav_order: 14 -parent: Modules ---- - -## Parameter overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [utils](#utils) - - [Input (interface)](#input-interface) - - [Named (interface)](#named-interface) - - [Parameter (interface)](#parameter-interface) - ---- - -# utils - -## Input (interface) - -Input is used to obtain a parameter from user. - -**Signature** - -```ts -export interface Input extends Parameter { - isValid(input: string, config: CliConfig): Effect> - parse( - args: ReadonlyArray, - config: CliConfig - ): Effect, ReadonlyArray]> -} -``` - -Added in v1.0.0 - -## Named (interface) - -Represent a parameter with name to be used as the options in Alternatives. - -**Signature** - -```ts -export interface Named extends Parameter { - get names(): HashSet -} -``` - -Added in v1.0.0 - -## Parameter (interface) - -Abstraction employed by Wizard class. Parameter trait encompass `Command`, -`Options` and `Args` interfaces. - -The `Wizard` processes subtypes of `Parameter` in different manners. - -**Signature** - -```ts -export interface Parameter { - get help(): HelpDoc - get shortDescription(): string -} -``` - -Added in v1.0.0 diff --git a/docs/modules/Primitive.ts.md b/docs/modules/Primitive.ts.md deleted file mode 100644 index cfbe687..0000000 --- a/docs/modules/Primitive.ts.md +++ /dev/null @@ -1,211 +0,0 @@ ---- -title: Primitive.ts -nav_order: 15 -parent: Modules ---- - -## Primitive overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [Predicates](#predicates) - - [isBool](#isbool) -- [constructors](#constructors) - - [boolean](#boolean) - - [choice](#choice) - - [date](#date) - - [float](#float) - - [integer](#integer) - - [text](#text) -- [models](#models) - - [Primitive (interface)](#primitive-interface) -- [symbol](#symbol) - - [PrimitiveTypeId](#primitivetypeid) - - [PrimitiveTypeId (type alias)](#primitivetypeid-type-alias) -- [utils](#utils) - - [Primitive (namespace)](#primitive-namespace) - - [Variance (interface)](#variance-interface) - - [PathExists (type alias)](#pathexists-type-alias) - - [PathType (type alias)](#pathtype-type-alias) - - [ValueType (type alias)](#valuetype-type-alias) - ---- - -# Predicates - -## isBool - -**Signature** - -```ts -export declare const isBool:
(self: Primitive) => boolean -``` - -Added in v1.0.0 - -# constructors - -## boolean - -**Signature** - -```ts -export declare const boolean: (defaultValue: Option) => Primitive -``` - -Added in v1.0.0 - -## choice - -**Signature** - -```ts -export declare const choice: (alternatives: readonly [[string, A], ...[string, A][]]) => Primitive -``` - -Added in v1.0.0 - -## date - -**Signature** - -```ts -export declare const date: Primitive -``` - -Added in v1.0.0 - -## float - -**Signature** - -```ts -export declare const float: Primitive -``` - -Added in v1.0.0 - -## integer - -**Signature** - -```ts -export declare const integer: Primitive -``` - -Added in v1.0.0 - -## text - -**Signature** - -```ts -export declare const text: Primitive -``` - -Added in v1.0.0 - -# models - -## Primitive (interface) - -A `Primitive` represents the primitive types supported by Effect CLI. - -Each primitive type has a way to parse and validate from a string. - -**Signature** - -```ts -export interface Primitive extends Primitive.Variance { - get typeName(): string - get help(): Span - get choices(): Option - validate(value: Option, config: CliConfig): Effect -} -``` - -Added in v1.0.0 - -# symbol - -## PrimitiveTypeId - -**Signature** - -```ts -export declare const PrimitiveTypeId: typeof PrimitiveTypeId -``` - -Added in v1.0.0 - -## PrimitiveTypeId (type alias) - -**Signature** - -```ts -export type PrimitiveTypeId = typeof PrimitiveTypeId -``` - -Added in v1.0.0 - -# utils - -## Primitive (namespace) - -Added in v1.0.0 - -### Variance (interface) - -**Signature** - -```ts -export interface Variance extends Pipeable { - readonly [PrimitiveTypeId]: { - readonly _A: (_: never) => A - } -} -``` - -Added in v1.0.0 - -### PathExists (type alias) - -**Signature** - -```ts -export type PathExists = "yes" | "no" | "either" -``` - -Added in v1.0.0 - -### PathType (type alias) - -**Signature** - -```ts -export type PathType = "file" | "directory" | "either" -``` - -Added in v1.0.0 - -### ValueType (type alias) - -**Signature** - -```ts -export type ValueType

= [P] extends [ - { - readonly [PrimitiveTypeId]: { - readonly _A: (_: never) => infer A - } - } -] - ? A - : never -``` - -Added in v1.0.0 diff --git a/docs/modules/Prompt.ts.md b/docs/modules/Prompt.ts.md deleted file mode 100644 index c178f97..0000000 --- a/docs/modules/Prompt.ts.md +++ /dev/null @@ -1,379 +0,0 @@ ---- -title: Prompt.ts -nav_order: 16 -parent: Modules ---- - -## Prompt overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [collecting & elements](#collecting--elements) - - [all](#all) -- [combinators](#combinators) - - [flatMap](#flatmap) - - [map](#map) -- [constructors](#constructors) - - [custom](#custom) - - [float](#float) - - [integer](#integer) - - [select](#select) - - [succeed](#succeed) - - [text](#text) -- [execution](#execution) - - [run](#run) -- [models](#models) - - [Prompt (interface)](#prompt-interface) -- [symbols](#symbols) - - [PromptTypeId](#prompttypeid) - - [PromptTypeId (type alias)](#prompttypeid-type-alias) -- [utils](#utils) - - [All (namespace)](#all-namespace) - - [PromptAny (type alias)](#promptany-type-alias) - - [Return (type alias)](#return-type-alias) - - [ReturnIterable (type alias)](#returniterable-type-alias) - - [ReturnTuple (type alias)](#returntuple-type-alias) - - [Prompt (namespace)](#prompt-namespace) - - [FloatOptions (interface)](#floatoptions-interface) - - [IntegerOptions (interface)](#integeroptions-interface) - - [SelectOptions (interface)](#selectoptions-interface) - - [TextOptions (interface)](#textoptions-interface) - - [Variance (interface)](#variance-interface) - - [VarianceStruct (interface)](#variancestruct-interface) - - [Action (type alias)](#action-type-alias) - ---- - -# collecting & elements - -## all - -Runs all the provided prompts in sequence respecting the structure provided -in input. - -Supports multiple arguments, a single argument tuple / array or record / -struct. - -**Signature** - -```ts -export declare const all: >>(arg: Arg) => All.Return -``` - -Added in v1.0.0 - -# combinators - -## flatMap - -**Signature** - -```ts -export declare const flatMap: { - (f: (output: Output) => Prompt): (self: Prompt) => Prompt - (self: Prompt, f: (output: Output) => Prompt): Prompt -} -``` - -Added in v1.0.0 - -## map - -**Signature** - -```ts -export declare const map: { - (f: (output: Output) => Output2): (self: Prompt) => Prompt - (self: Prompt, f: (output: Output) => Output2): Prompt -} -``` - -Added in v1.0.0 - -# constructors - -## custom - -Creates a custom `Prompt` from the provided `render` and `process` functions -with the specified initial state. - -The `render` function will be used to render the terminal prompt to a user -and is invoked at the beginning of each terminal render frame. The `process` -function is invoked immediately after a user presses a key. - -**Signature** - -```ts -export declare const custom: ( - initialState: State, - render: (state: State, action: Prompt.Action) => Effect.Effect, - process: (input: Terminal.UserInput, state: State) => Effect.Effect> -) => Prompt -``` - -Added in v1.0.0 - -## float - -**Signature** - -```ts -export declare const float: (options: Prompt.FloatOptions) => Prompt -``` - -Added in v1.0.0 - -## integer - -**Signature** - -```ts -export declare const integer: (options: Prompt.IntegerOptions) => Prompt -``` - -Added in v1.0.0 - -## select - -**Signature** - -```ts -export declare const select: (options: Prompt.SelectOptions) => Prompt -``` - -Added in v1.0.0 - -## succeed - -Creates a `Prompt` which immediately succeeds with the specified value. - -**NOTE**: This method will not attempt to obtain user input or render -anything to the screen. - -**Signature** - -```ts -export declare const succeed:
(value: A) => Prompt -``` - -Added in v1.0.0 - -## text - -**Signature** - -```ts -export declare const text: (options: Prompt.TextOptions) => Prompt -``` - -Added in v1.0.0 - -# execution - -## run - -Executes the specified `Prompt`. - -**Signature** - -```ts -export declare const run: (self: Prompt) => Effect.Effect -``` - -Added in v1.0.0 - -# models - -## Prompt (interface) - -**Signature** - -```ts -export interface Prompt - extends Prompt.Variance, - Pipeable.Pipeable, - Effect.Effect {} -``` - -Added in v1.0.0 - -# symbols - -## PromptTypeId - -**Signature** - -```ts -export declare const PromptTypeId: typeof PromptTypeId -``` - -Added in v1.0.0 - -## PromptTypeId (type alias) - -**Signature** - -```ts -export type PromptTypeId = typeof PromptTypeId -``` - -Added in v1.0.0 - -# utils - -## All (namespace) - -Added in v1.0.0 - -### PromptAny (type alias) - -**Signature** - -```ts -export type PromptAny = Prompt -``` - -Added in v1.0.0 - -### Return (type alias) - -**Signature** - -```ts -export type Return> = [Arg] extends [ReadonlyArray] - ? ReturnTuple - : [Arg] extends [Iterable] - ? ReturnIterable - : never -``` - -Added in v1.0.0 - -### ReturnIterable (type alias) - -**Signature** - -```ts -export type ReturnIterable> = [T] extends [Iterable>] - ? Prompt> - : never -``` - -Added in v1.0.0 - -### ReturnTuple (type alias) - -**Signature** - -```ts -export type ReturnTuple> = Prompt< - T[number] extends never ? [] : { -readonly [K in keyof T]: [T[K]] extends [Prompt.Variance] ? _A : never } -> extends infer X - ? X - : never -``` - -Added in v1.0.0 - -## Prompt (namespace) - -Added in v1.0.0 - -### FloatOptions (interface) - -**Signature** - -```ts -export interface FloatOptions extends IntegerOptions { - readonly precision?: number -} -``` - -Added in v1.0.0 - -### IntegerOptions (interface) - -**Signature** - -```ts -export interface IntegerOptions { - readonly message: string - readonly min?: number - readonly max?: number - readonly incrementBy?: number - readonly decrementBy?: number - readonly validate?: (value: number) => Effect.Effect -} -``` - -Added in v1.0.0 - -### SelectOptions (interface) - -**Signature** - -```ts -export interface SelectOptions { - readonly message: string - readonly choices: ReadonlyArray<{ - readonly title: string - readonly description?: string - readonly value: string - }> -} -``` - -Added in v1.0.0 - -### TextOptions (interface) - -**Signature** - -```ts -export interface TextOptions { - readonly message: string - readonly type?: "hidden" | "password" | "text" - readonly default?: string - readonly validate?: (value: string) => Effect.Effect -} -``` - -Added in v1.0.0 - -### Variance (interface) - -**Signature** - -```ts -export interface Variance { - readonly [PromptTypeId]: Prompt.VarianceStruct -} -``` - -Added in v1.0.0 - -### VarianceStruct (interface) - -**Signature** - -```ts -export interface VarianceStruct { - readonly _Output: (_: never) => Output -} -``` - -Added in v1.0.0 - -### Action (type alias) - -**Signature** - -```ts -export type Action = PromptAction -``` - -Added in v1.0.0 diff --git a/docs/modules/Prompt/Action.ts.md b/docs/modules/Prompt/Action.ts.md deleted file mode 100644 index a5b499c..0000000 --- a/docs/modules/Prompt/Action.ts.md +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: Prompt/Action.ts -nav_order: 17 -parent: Modules ---- - -## Action overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [constructors](#constructors) - - [beep](#beep) - - [error](#error) - - [nextFrame](#nextframe) - - [submit](#submit) -- [models](#models) - - [Beep (interface)](#beep-interface) - - [Error (interface)](#error-interface) - - [NextFrame (interface)](#nextframe-interface) - - [PromptAction (type alias)](#promptaction-type-alias) - - [Submit (interface)](#submit-interface) - ---- - -# constructors - -## beep - -**Signature** - -```ts -export declare const beep: PromptAction -``` - -Added in v1.0.0 - -## error - -**Signature** - -```ts -export declare const error: (message: string) => PromptAction -``` - -Added in v1.0.0 - -## nextFrame - -**Signature** - -```ts -export declare const nextFrame: (state: State) => PromptAction -``` - -Added in v1.0.0 - -## submit - -**Signature** - -```ts -export declare const submit: (value: Output) => PromptAction -``` - -Added in v1.0.0 - -# models - -## Beep (interface) - -**Signature** - -```ts -export interface Beep { - readonly _tag: "Beep" -} -``` - -Added in v1.0.0 - -## Error (interface) - -**Signature** - -```ts -export interface Error { - readonly _tag: "Error" - readonly message: string -} -``` - -Added in v1.0.0 - -## NextFrame (interface) - -**Signature** - -```ts -export interface NextFrame { - readonly _tag: "NextFrame" - readonly state: State -} -``` - -Added in v1.0.0 - -## PromptAction (type alias) - -**Signature** - -```ts -export type PromptAction = Beep | Error | NextFrame | Submit -``` - -Added in v1.0.0 - -## Submit (interface) - -**Signature** - -```ts -export interface Submit { - readonly _tag: "Submit" - readonly value: Output -} -``` - -Added in v1.0.0 diff --git a/docs/modules/RegularLanguage.ts.md b/docs/modules/RegularLanguage.ts.md deleted file mode 100644 index efa4e88..0000000 --- a/docs/modules/RegularLanguage.ts.md +++ /dev/null @@ -1,599 +0,0 @@ ---- -title: RegularLanguage.ts -nav_order: 18 -parent: Modules ---- - -## RegularLanguage overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [combinators](#combinators) - - [concat](#concat) - - [contains](#contains) - - [derive](#derive) - - [firstTokens](#firsttokens) - - [isNullable](#isnullable) - - [optional](#optional) - - [orElse](#orelse) - - [repeated](#repeated) -- [constructors](#constructors) - - [anyString](#anystring) - - [empty](#empty) - - [epsilon](#epsilon) - - [permutation](#permutation) - - [primitive](#primitive) - - [string](#string) -- [models](#models) - - [Alt (interface)](#alt-interface) - - [AnyStringToken (interface)](#anystringtoken-interface) - - [Cat (interface)](#cat-interface) - - [Empty (interface)](#empty-interface) - - [Epsilon (interface)](#epsilon-interface) - - [Permutation (interface)](#permutation-interface) - - [PrimitiveToken (interface)](#primitivetoken-interface) - - [RegularLanguage (type alias)](#regularlanguage-type-alias) - - [Repeat (interface)](#repeat-interface) - - [StringToken (interface)](#stringtoken-interface) -- [refinements](#refinements) - - [isAlt](#isalt) - - [isAnyStringToken](#isanystringtoken) - - [isCat](#iscat) - - [isEmpty](#isempty) - - [isEpsilon](#isepsilon) - - [isPermutation](#ispermutation) - - [isPrimitiveToken](#isprimitivetoken) - - [isRegularLanguage](#isregularlanguage) - - [isRepeat](#isrepeat) - - [isStringToken](#isstringtoken) -- [symbols](#symbols) - - [RegularLanguageTypeId](#regularlanguagetypeid) - - [RegularLanguageTypeId (type alias)](#regularlanguagetypeid-type-alias) -- [utils](#utils) - - [RegularLanguage (namespace)](#regularlanguage-namespace) - - [Proto (interface)](#proto-interface) - - [RepetitionConfiguration (interface)](#repetitionconfiguration-interface) - ---- - -# combinators - -## concat - -**Signature** - -```ts -export declare const concat: { - (that: string | RegularLanguage): (self: RegularLanguage) => RegularLanguage - (self: RegularLanguage, that: string | RegularLanguage): RegularLanguage -} -``` - -Added in v1.0.0 - -## contains - -Checks to see if the input token list is a member of the language. - -Returns `true` if and only if `tokens` is in the language. - -**Signature** - -```ts -export declare const contains: { - (tokens: ReadonlyArray, config: CliConfig): (self: RegularLanguage) => Effect - (self: RegularLanguage, tokens: ReadonlyArray, config: CliConfig): Effect -} -``` - -Added in v1.0.0 - -## derive - -Calculate the Brzozowski derivative of this language with respect to the given string. This is an effectful -function because it can call PrimType.validate (e.g., when validating file paths, etc.). - -**Signature** - -```ts -export declare const derive: { - (token: string, config: CliConfig): (self: RegularLanguage) => Effect - (self: RegularLanguage, token: string, config: CliConfig): Effect -} -``` - -Added in v1.0.0 - -## firstTokens - -Returns a set consisting of the first token of all strings in this language -that are useful for CLI tab completion. For infinite or unwieldly languages, -it is perfectly fine to return the empty set: This will simply not display -any completions to the user. - -If you'd like the cursor to advance to the next word when tab completion -unambiguously matches the prefix to a token, append a space (`" "`) character -to the end of the returned token. Otherwise, the cursor will skip to the end -of the completed token in the terminal. - -Some examples of different use cases: - -1. Completing file/directory names: - - Append a space to the ends of file names (e.g., `"bippy.pdf"`). This - is because we want the cursor to jump to the next argument position if - tab completion unambiguously succeeds. - -- Do not append a space to the end of a directory name (e.g., `"foo/"`). - This is because we want the user to be able to press tab again to - gradually complete a lengthy file path. - -- Append a space to the ends of string tokens. - -You may be asking why we don't try to use the `-o nospace` setting of -`compgen` and `complete`. The answer is they appear to be all or nothing: For -a given tab completion execution, you have to choose one behavior or the -other. This does not work well when completing both file names and directory -names at the same time. - -**Signature** - -```ts -export declare const firstTokens: (( - prefix: string, - compgen: Compgen -) => (self: RegularLanguage) => Effect>) & - ((self: RegularLanguage, prefix: string, compgen: Compgen) => Effect>) -``` - -Added in v1.0.0 - -## isNullable - -This is the delta (`δ`) predicate from "Parsing With Derivatives", indicating -whether this language contains the empty string. - -Returns `true` if and only if this language contains the empty string. - -**Signature** - -```ts -export declare const isNullable: (self: RegularLanguage) => boolean -``` - -Added in v1.0.0 - -## optional - -**Signature** - -```ts -export declare const optional: (self: RegularLanguage) => RegularLanguage -``` - -Added in v1.0.0 - -## orElse - -**Signature** - -```ts -export declare const orElse: { - (that: string | RegularLanguage): (self: RegularLanguage) => RegularLanguage - (self: RegularLanguage, that: string | RegularLanguage): RegularLanguage -} -``` - -Added in v1.0.0 - -## repeated - -**Signature** - -```ts -export declare const repeated: { - (params?: Partial): (self: RegularLanguage) => RegularLanguage - (self: RegularLanguage, params?: Partial): RegularLanguage -} -``` - -Added in v1.0.0 - -# constructors - -## anyString - -**Signature** - -```ts -export declare const anyString: RegularLanguage -``` - -Added in v1.0.0 - -## empty - -**Signature** - -```ts -export declare const empty: RegularLanguage -``` - -Added in v1.0.0 - -## epsilon - -**Signature** - -```ts -export declare const epsilon: RegularLanguage -``` - -Added in v1.0.0 - -## permutation - -**Signature** - -```ts -export declare const permutation: (values: ReadonlyArray) => RegularLanguage -``` - -Added in v1.0.0 - -## primitive - -**Signature** - -```ts -export declare const primitive: (primitive: Primitive) => RegularLanguage -``` - -Added in v1.0.0 - -## string - -**Signature** - -```ts -export declare const string: (value: string) => RegularLanguage -``` - -Added in v1.0.0 - -# models - -## Alt (interface) - -`Alt` represents the union of two regular languages. We call it "Alt" for -consistency with the names used in the "Parsing With Derivatives" paper. - -**Signature** - -```ts -export interface Alt extends RegularLanguage.Proto, Case, Pipeable { - readonly _tag: "Alt" - readonly left: RegularLanguage - readonly right: RegularLanguage -} -``` - -Added in v1.0.0 - -## AnyStringToken (interface) - -`AnyStringToken` represents the set of all strings. For tab completion -purposes, this is used to represent the name of the executable (It may be -aliased or renamed to be different). - -**Signature** - -```ts -export interface AnyStringToken extends RegularLanguage.Proto, Case, Pipeable { - readonly _tag: "AnyStringToken" -} -``` - -Added in v1.0.0 - -## Cat (interface) - -`Cat` represents the concatenation of two regular languages. - -**Signature** - -```ts -export interface Cat extends RegularLanguage.Proto, Case, Pipeable { - readonly _tag: "Cat" - readonly left: RegularLanguage - readonly right: RegularLanguage -} -``` - -Added in v1.0.0 - -## Empty (interface) - -The `Empty` language (`∅`) accepts no strings. - -**Signature** - -```ts -export interface Empty extends RegularLanguage.Proto, Case, Pipeable { - readonly _tag: "Empty" -} -``` - -Added in v1.0.0 - -## Epsilon (interface) - -The `Epsilon` language (`ε`) accepts only the empty string. - -**Signature** - -```ts -export interface Epsilon extends RegularLanguage.Proto, Case, Pipeable { - readonly _tag: "Epsilon" -} -``` - -Added in v1.0.0 - -## Permutation (interface) - -Permutation is like `Cat`, but it is a commutative monoid. A -`Permutation(a_1, a_2, ..., a_{k})` is equivalent to the following language: - -``` -a2 ~ Permutation(a_1, a_3, ..., a_k) | a1 ~ Permutation(a_2, a_3, ..., a_k) | ... ak ~ Permutation(a_1, a_2, ..., a_{k - 1}) -``` - -So when we calculate its derivative, we apply the above "desugaring" -transformation, then compute the derivative as usual. - -**Signature** - -```ts -export interface Permutation extends RegularLanguage.Proto, Case, Pipeable { - readonly _tag: "Permutation" - readonly values: ReadonlyArray -} -``` - -Added in v1.0.0 - -## PrimitiveToken (interface) - -A `PrimitiveToken` language represents the regular language containing any -strings `s` where `value.validate(s)` succeeds. - -**Signature** - -```ts -export interface PrimitiveToken extends RegularLanguage.Proto, Case, Pipeable { - readonly _tag: "PrimitiveToken" - readonly primitive: Primitive -} -``` - -Added in v1.0.0 - -## RegularLanguage (type alias) - -`RegularLanguage` is an implementation of "Parsing With Derivatives" (Might -et al. 2011) that is used for CLI tab completion. Unlike your usual regular -languages that are sets of strings of symbols, our regular languages are sets -of lists of tokens, where tokens can be strings or `Primitive` instances. (If -you think about it, `Primitive.validate` is an intensional definition of a -set of strings.) - -**Signature** - -```ts -export type RegularLanguage = - | Empty - | Epsilon - | StringToken - | AnyStringToken - | PrimitiveToken - | Cat - | Alt - | Repeat - | Permutation -``` - -Added in v1.0.0 - -## Repeat (interface) - -`Repeat` represents the repetition of `language`. The number of repetitions -can be bounded via `min` and `max`. Setting `max=None` represents the -"Kleene star" of `language`. - -**Signature** - -```ts -export interface Repeat extends RegularLanguage.Proto, Case, Pipeable { - readonly _tag: "Repeat" - readonly language: RegularLanguage - readonly min: Option - readonly max: Option -} -``` - -Added in v1.0.0 - -## StringToken (interface) - -A `StringToken` language represents the regular language that contains only -`value`. - -**Signature** - -```ts -export interface StringToken extends RegularLanguage.Proto, Case, Pipeable { - readonly _tag: "StringToken" - readonly value: string -} -``` - -Added in v1.0.0 - -# refinements - -## isAlt - -**Signature** - -```ts -export declare const isAlt: (self: RegularLanguage) => self is Alt -``` - -Added in v1.0.0 - -## isAnyStringToken - -**Signature** - -```ts -export declare const isAnyStringToken: (self: RegularLanguage) => self is AnyStringToken -``` - -Added in v1.0.0 - -## isCat - -**Signature** - -```ts -export declare const isCat: (self: RegularLanguage) => self is Cat -``` - -Added in v1.0.0 - -## isEmpty - -**Signature** - -```ts -export declare const isEmpty: (self: RegularLanguage) => self is Empty -``` - -Added in v1.0.0 - -## isEpsilon - -**Signature** - -```ts -export declare const isEpsilon: (self: RegularLanguage) => self is Epsilon -``` - -Added in v1.0.0 - -## isPermutation - -**Signature** - -```ts -export declare const isPermutation: (self: RegularLanguage) => self is Permutation -``` - -Added in v1.0.0 - -## isPrimitiveToken - -**Signature** - -```ts -export declare const isPrimitiveToken: (self: RegularLanguage) => self is PrimitiveToken -``` - -Added in v1.0.0 - -## isRegularLanguage - -**Signature** - -```ts -export declare const isRegularLanguage: (u: unknown) => u is RegularLanguage -``` - -Added in v1.0.0 - -## isRepeat - -**Signature** - -```ts -export declare const isRepeat: (self: RegularLanguage) => self is Repeat -``` - -Added in v1.0.0 - -## isStringToken - -**Signature** - -```ts -export declare const isStringToken: (self: RegularLanguage) => self is StringToken -``` - -Added in v1.0.0 - -# symbols - -## RegularLanguageTypeId - -**Signature** - -```ts -export declare const RegularLanguageTypeId: typeof RegularLanguageTypeId -``` - -Added in v1.0.0 - -## RegularLanguageTypeId (type alias) - -**Signature** - -```ts -export type RegularLanguageTypeId = typeof RegularLanguageTypeId -``` - -Added in v1.0.0 - -# utils - -## RegularLanguage (namespace) - -Added in v1.0.0 - -### Proto (interface) - -**Signature** - -```ts -export interface Proto { - readonly [RegularLanguageTypeId]: (_: never) => never -} -``` - -Added in v1.0.0 - -### RepetitionConfiguration (interface) - -**Signature** - -```ts -export interface RepetitionConfiguration { - readonly min?: number - readonly max?: number -} -``` - -Added in v1.0.0 diff --git a/docs/modules/ShellType.ts.md b/docs/modules/ShellType.ts.md deleted file mode 100644 index b7e9471..0000000 --- a/docs/modules/ShellType.ts.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: ShellType.ts -nav_order: 19 -parent: Modules ---- - -## ShellType overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [constructors](#constructors) - - [bash](#bash) - - [fish](#fish) - - [zsh](#zsh) -- [models](#models) - - [Bash (interface)](#bash-interface) - - [Fish (interface)](#fish-interface) - - [ShellType (type alias)](#shelltype-type-alias) - - [Zsh (interface)](#zsh-interface) -- [options](#options) - - [shellOption](#shelloption) - ---- - -# constructors - -## bash - -**Signature** - -```ts -export declare const bash: ShellType -``` - -Added in v1.0.0 - -## fish - -**Signature** - -```ts -export declare const fish: ShellType -``` - -Added in v1.0.0 - -## zsh - -**Signature** - -```ts -export declare const zsh: ShellType -``` - -Added in v1.0.0 - -# models - -## Bash (interface) - -**Signature** - -```ts -export interface Bash { - readonly _tag: "Bash" -} -``` - -Added in v1.0.0 - -## Fish (interface) - -**Signature** - -```ts -export interface Fish { - readonly _tag: "Fish" -} -``` - -Added in v1.0.0 - -## ShellType (type alias) - -**Signature** - -```ts -export type ShellType = Bash | Fish | Zsh -``` - -Added in v1.0.0 - -## Zsh (interface) - -**Signature** - -```ts -export interface Zsh { - readonly _tag: "Zsh" -} -``` - -Added in v1.0.0 - -# options - -## shellOption - -**Signature** - -```ts -export declare const shellOption: Options -``` - -Added in v1.0.0 diff --git a/docs/modules/Terminal.ts.md b/docs/modules/Terminal.ts.md deleted file mode 100644 index 66e0bc8..0000000 --- a/docs/modules/Terminal.ts.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -title: Terminal.ts -nav_order: 20 -parent: Modules ---- - -## Terminal overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [context](#context) - - [LiveTerminal](#liveterminal) - - [Terminal](#terminal) -- [models](#models) - - [Terminal (interface)](#terminal-interface) -- [utils](#utils) - - [Terminal (namespace)](#terminal-namespace) - - [UserInput (interface)](#userinput-interface) - - [Action (type alias)](#action-type-alias) - ---- - -# context - -## LiveTerminal - -**Signature** - -```ts -export declare const LiveTerminal: Layer.Layer -``` - -Added in v1.0.0 - -## Terminal - -**Signature** - -```ts -export declare const Terminal: Context.Tag -``` - -Added in v1.0.0 - -# models - -## Terminal (interface) - -Represents a teletype-style (TTY) terminal interface that allows for -obtaining user input and rendering text. - -**Signature** - -```ts -export interface Terminal { - /** - * Obtains the user's input from the terminal. - */ - readonly getUserInput: Effect.Effect - /** - * Displays the provided message to the terminal. - */ - display(message: string): Effect.Effect -} -``` - -Added in v1.0.0 - -# utils - -## Terminal (namespace) - -Added in v1.0.0 - -### UserInput (interface) - -Represents a user's input to a terminal. - -**Signature** - -```ts -export interface UserInput { - readonly action: Action - readonly value: string -} -``` - -Added in v1.0.0 - -### Action (type alias) - -Represents the action parsed from a user's input to a terminal. - -**Signature** - -```ts -export type Action = - | "Backspace" - | "CursorFirst" - | "CursorLast" - | "CursorUp" - | "CursorDown" - | "CursorLeft" - | "CursorRight" - | "Delete" - | "End" - | "Exit" - | "Next" - | "NextPage" - | "PreviousPage" - | "Reset" - | "Retry" - | "Start" - | "Submit" -``` - -Added in v1.0.0 diff --git a/docs/modules/Usage.ts.md b/docs/modules/Usage.ts.md deleted file mode 100644 index 80ce5ae..0000000 --- a/docs/modules/Usage.ts.md +++ /dev/null @@ -1,237 +0,0 @@ ---- -title: Usage.ts -nav_order: 21 -parent: Modules ---- - -## Usage overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [combinators](#combinators) - - [alternation](#alternation) - - [concat](#concat) - - [getHelp](#gethelp) - - [optional](#optional) - - [repeated](#repeated) -- [constructors](#constructors) - - [empty](#empty) - - [enumerate](#enumerate) - - [mixed](#mixed) - - [named](#named) -- [models](#models) - - [Alternation (interface)](#alternation-interface) - - [Concat (interface)](#concat-interface) - - [Empty (interface)](#empty-interface) - - [Mixed (interface)](#mixed-interface) - - [Named (interface)](#named-interface) - - [Optional (interface)](#optional-interface) - - [Repeated (interface)](#repeated-interface) - - [Usage (type alias)](#usage-type-alias) - ---- - -# combinators - -## alternation - -**Signature** - -```ts -export declare const alternation: { (that: Usage): (self: Usage) => Usage; (self: Usage, that: Usage): Usage } -``` - -Added in v1.0.0 - -## concat - -**Signature** - -```ts -export declare const concat: { (that: Usage): (self: Usage) => Usage; (self: Usage, that: Usage): Usage } -``` - -Added in v1.0.0 - -## getHelp - -**Signature** - -```ts -export declare const getHelp: (self: Usage) => HelpDoc -``` - -Added in v1.0.0 - -## optional - -**Signature** - -```ts -export declare const optional: (self: Usage) => Usage -``` - -Added in v1.0.0 - -## repeated - -**Signature** - -```ts -export declare const repeated: (self: Usage) => Usage -``` - -Added in v1.0.0 - -# constructors - -## empty - -**Signature** - -```ts -export declare const empty: Usage -``` - -Added in v1.0.0 - -## enumerate - -**Signature** - -```ts -export declare const enumerate: { - (config: CliConfig): (self: Usage) => ReadonlyArray - (self: Usage, config: CliConfig): ReadonlyArray -} -``` - -Added in v1.0.0 - -## mixed - -**Signature** - -```ts -export declare const mixed: Usage -``` - -Added in v1.0.0 - -## named - -**Signature** - -```ts -export declare const named: (names: ReadonlyArray, acceptedValues: Option) => Usage -``` - -Added in v1.0.0 - -# models - -## Alternation (interface) - -**Signature** - -```ts -export interface Alternation { - readonly _tag: "Alternation" - readonly left: Usage - readonly right: Usage -} -``` - -Added in v1.0.0 - -## Concat (interface) - -**Signature** - -```ts -export interface Concat { - readonly _tag: "Concat" - readonly left: Usage - readonly right: Usage -} -``` - -Added in v1.0.0 - -## Empty (interface) - -**Signature** - -```ts -export interface Empty { - readonly _tag: "Empty" -} -``` - -Added in v1.0.0 - -## Mixed (interface) - -**Signature** - -```ts -export interface Mixed { - readonly _tag: "Mixed" -} -``` - -Added in v1.0.0 - -## Named (interface) - -**Signature** - -```ts -export interface Named { - readonly _tag: "Named" - readonly names: ReadonlyArray - readonly acceptedValues: Option -} -``` - -Added in v1.0.0 - -## Optional (interface) - -**Signature** - -```ts -export interface Optional { - readonly _tag: "Optional" - readonly usage: Usage -} -``` - -Added in v1.0.0 - -## Repeated (interface) - -**Signature** - -```ts -export interface Repeated { - readonly _tag: "Repeated" - readonly usage: Usage -} -``` - -Added in v1.0.0 - -## Usage (type alias) - -**Signature** - -```ts -export type Usage = Empty | Mixed | Named | Optional | Repeated | Alternation | Concat -``` - -Added in v1.0.0 diff --git a/docs/modules/ValidationError.ts.md b/docs/modules/ValidationError.ts.md deleted file mode 100644 index 18ed5b0..0000000 --- a/docs/modules/ValidationError.ts.md +++ /dev/null @@ -1,450 +0,0 @@ ---- -title: ValidationError.ts -nav_order: 22 -parent: Modules ---- - -## ValidationError overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [constructors](#constructors) - - [commandMismatch](#commandmismatch) - - [correctedFlag](#correctedflag) - - [invalidArgument](#invalidargument) - - [invalidValue](#invalidvalue) - - [keyValuesDetected](#keyvaluesdetected) - - [missingFlag](#missingflag) - - [missingSubcommand](#missingsubcommand) - - [missingValue](#missingvalue) - - [noBuiltInMatch](#nobuiltinmatch) - - [unclusteredFlag](#unclusteredflag) -- [models](#models) - - [CommandMismatch (interface)](#commandmismatch-interface) - - [CorrectedFlag (interface)](#correctedflag-interface) - - [InvalidArgument (interface)](#invalidargument-interface) - - [InvalidValue (interface)](#invalidvalue-interface) - - [KeyValuesDetected (interface)](#keyvaluesdetected-interface) - - [MissingFlag (interface)](#missingflag-interface) - - [MissingSubcommand (interface)](#missingsubcommand-interface) - - [MissingValue (interface)](#missingvalue-interface) - - [NoBuiltInMatch (interface)](#nobuiltinmatch-interface) - - [UnclusteredFlag (interface)](#unclusteredflag-interface) - - [ValidationError (type alias)](#validationerror-type-alias) -- [refinements](#refinements) - - [isCommandMismatch](#iscommandmismatch) - - [isCorrectedFlag](#iscorrectedflag) - - [isInvalidArgument](#isinvalidargument) - - [isInvalidValue](#isinvalidvalue) - - [isKeyValuesDetected](#iskeyvaluesdetected) - - [isMissingFlag](#ismissingflag) - - [isMissingSubcommand](#ismissingsubcommand) - - [isMissingValue](#ismissingvalue) - - [isNoBuiltInMatch](#isnobuiltinmatch) - - [isUnclusteredFlag](#isunclusteredflag) -- [symbols](#symbols) - - [ValidationErrorTypeId](#validationerrortypeid) - - [ValidationErrorTypeId (type alias)](#validationerrortypeid-type-alias) -- [utils](#utils) - - [ValidationError (namespace)](#validationerror-namespace) - - [Proto (interface)](#proto-interface) - ---- - -# constructors - -## commandMismatch - -**Signature** - -```ts -export declare const commandMismatch: (error: HelpDoc) => ValidationError -``` - -Added in v1.0.0 - -## correctedFlag - -**Signature** - -```ts -export declare const correctedFlag: (error: HelpDoc) => ValidationError -``` - -Added in v1.0.0 - -## invalidArgument - -**Signature** - -```ts -export declare const invalidArgument: (error: HelpDoc) => ValidationError -``` - -Added in v1.0.0 - -## invalidValue - -**Signature** - -```ts -export declare const invalidValue: (error: HelpDoc) => ValidationError -``` - -Added in v1.0.0 - -## keyValuesDetected - -**Signature** - -```ts -export declare const keyValuesDetected: (error: HelpDoc, keyValues: ReadonlyArray) => ValidationError -``` - -Added in v1.0.0 - -## missingFlag - -**Signature** - -```ts -export declare const missingFlag: (error: HelpDoc) => ValidationError -``` - -Added in v1.0.0 - -## missingSubcommand - -**Signature** - -```ts -export declare const missingSubcommand: (error: HelpDoc) => ValidationError -``` - -Added in v1.0.0 - -## missingValue - -**Signature** - -```ts -export declare const missingValue: (error: HelpDoc) => ValidationError -``` - -Added in v1.0.0 - -## noBuiltInMatch - -**Signature** - -```ts -export declare const noBuiltInMatch: (error: HelpDoc) => ValidationError -``` - -Added in v1.0.0 - -## unclusteredFlag - -**Signature** - -```ts -export declare const unclusteredFlag: ( - error: HelpDoc, - unclustered: ReadonlyArray, - rest: ReadonlyArray -) => ValidationError -``` - -Added in v1.0.0 - -# models - -## CommandMismatch (interface) - -**Signature** - -```ts -export interface CommandMismatch extends ValidationError.Proto { - readonly _tag: "CommandMismatch" -} -``` - -Added in v1.0.0 - -## CorrectedFlag (interface) - -**Signature** - -```ts -export interface CorrectedFlag extends ValidationError.Proto { - readonly _tag: "CorrectedFlag" -} -``` - -Added in v1.0.0 - -## InvalidArgument (interface) - -**Signature** - -```ts -export interface InvalidArgument extends ValidationError.Proto { - readonly _tag: "InvalidArgument" -} -``` - -Added in v1.0.0 - -## InvalidValue (interface) - -**Signature** - -```ts -export interface InvalidValue extends ValidationError.Proto { - readonly _tag: "InvalidValue" -} -``` - -Added in v1.0.0 - -## KeyValuesDetected (interface) - -**Signature** - -```ts -export interface KeyValuesDetected extends ValidationError.Proto { - readonly _tag: "KeyValuesDetected" - readonly keyValues: ReadonlyArray -} -``` - -Added in v1.0.0 - -## MissingFlag (interface) - -**Signature** - -```ts -export interface MissingFlag extends ValidationError.Proto { - readonly _tag: "MissingFlag" -} -``` - -Added in v1.0.0 - -## MissingSubcommand (interface) - -**Signature** - -```ts -export interface MissingSubcommand extends ValidationError.Proto { - readonly _tag: "MissingSubcommand" -} -``` - -Added in v1.0.0 - -## MissingValue (interface) - -**Signature** - -```ts -export interface MissingValue extends ValidationError.Proto { - readonly _tag: "MissingValue" -} -``` - -Added in v1.0.0 - -## NoBuiltInMatch (interface) - -**Signature** - -```ts -export interface NoBuiltInMatch extends ValidationError.Proto { - readonly _tag: "NoBuiltInMatch" -} -``` - -Added in v1.0.0 - -## UnclusteredFlag (interface) - -**Signature** - -```ts -export interface UnclusteredFlag extends ValidationError.Proto { - readonly _tag: "UnclusteredFlag" - readonly unclustered: ReadonlyArray - readonly rest: ReadonlyArray -} -``` - -Added in v1.0.0 - -## ValidationError (type alias) - -**Signature** - -```ts -export type ValidationError = - | CommandMismatch - | CorrectedFlag - | InvalidArgument - | InvalidValue - | KeyValuesDetected - | MissingValue - | MissingFlag - | MissingSubcommand - | NoBuiltInMatch - | UnclusteredFlag -``` - -Added in v1.0.0 - -# refinements - -## isCommandMismatch - -**Signature** - -```ts -export declare const isCommandMismatch: (self: ValidationError) => self is CommandMismatch -``` - -Added in v1.0.0 - -## isCorrectedFlag - -**Signature** - -```ts -export declare const isCorrectedFlag: (self: ValidationError) => self is CorrectedFlag -``` - -Added in v1.0.0 - -## isInvalidArgument - -**Signature** - -```ts -export declare const isInvalidArgument: (self: ValidationError) => self is InvalidArgument -``` - -Added in v1.0.0 - -## isInvalidValue - -**Signature** - -```ts -export declare const isInvalidValue: (self: ValidationError) => self is InvalidValue -``` - -Added in v1.0.0 - -## isKeyValuesDetected - -**Signature** - -```ts -export declare const isKeyValuesDetected: (self: ValidationError) => self is KeyValuesDetected -``` - -Added in v1.0.0 - -## isMissingFlag - -**Signature** - -```ts -export declare const isMissingFlag: (self: ValidationError) => self is MissingFlag -``` - -Added in v1.0.0 - -## isMissingSubcommand - -**Signature** - -```ts -export declare const isMissingSubcommand: (self: ValidationError) => self is MissingSubcommand -``` - -Added in v1.0.0 - -## isMissingValue - -**Signature** - -```ts -export declare const isMissingValue: (self: ValidationError) => self is MissingValue -``` - -Added in v1.0.0 - -## isNoBuiltInMatch - -**Signature** - -```ts -export declare const isNoBuiltInMatch: (self: ValidationError) => self is NoBuiltInMatch -``` - -Added in v1.0.0 - -## isUnclusteredFlag - -**Signature** - -```ts -export declare const isUnclusteredFlag: (self: ValidationError) => self is UnclusteredFlag -``` - -Added in v1.0.0 - -# symbols - -## ValidationErrorTypeId - -**Signature** - -```ts -export declare const ValidationErrorTypeId: typeof ValidationErrorTypeId -``` - -Added in v1.0.0 - -## ValidationErrorTypeId (type alias) - -**Signature** - -```ts -export type ValidationErrorTypeId = typeof ValidationErrorTypeId -``` - -Added in v1.0.0 - -# utils - -## ValidationError (namespace) - -Added in v1.0.0 - -### Proto (interface) - -**Signature** - -```ts -export interface Proto { - readonly [ValidationErrorTypeId]: ValidationErrorTypeId - readonly error: HelpDoc -} -``` - -Added in v1.0.0 diff --git a/docs/modules/index.md b/docs/modules/index.md deleted file mode 100644 index 7dc3164..0000000 --- a/docs/modules/index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Modules -has_children: true -permalink: /docs/modules -nav_order: 2 ---- \ No newline at end of file diff --git a/docs/modules/index.ts.md b/docs/modules/index.ts.md deleted file mode 100644 index c08a6b2..0000000 --- a/docs/modules/index.ts.md +++ /dev/null @@ -1,266 +0,0 @@ ---- -title: index.ts -nav_order: 12 -parent: Modules ---- - -## index overview - -Added in v1.0.0 - ---- - -

Table of contents

- -- [exports](#exports) - - [From "./Args.js"](#from-argsjs) - - [From "./AutoCorrect.js"](#from-autocorrectjs) - - [From "./BuiltInOptions.js"](#from-builtinoptionsjs) - - [From "./CliApp.js"](#from-cliappjs) - - [From "./CliConfig.js"](#from-cliconfigjs) - - [From "./Command.js"](#from-commandjs) - - [From "./CommandDirective.js"](#from-commanddirectivejs) - - [From "./Compgen.js"](#from-compgenjs) - - [From "./Completion.js"](#from-completionjs) - - [From "./HelpDoc.js"](#from-helpdocjs) - - [From "./Options.js"](#from-optionsjs) - - [From "./Parameter.js"](#from-parameterjs) - - [From "./Primitive.js"](#from-primitivejs) - - [From "./Prompt.js"](#from-promptjs) - - [From "./RegularLanguage.js"](#from-regularlanguagejs) - - [From "./ShellType.js"](#from-shelltypejs) - - [From "./Terminal.js"](#from-terminaljs) - - [From "./Usage.js"](#from-usagejs) - - [From "./ValidationError.js"](#from-validationerrorjs) - ---- - -# exports - -## From "./Args.js" - -Re-exports all named exports from the "./Args.js" module as `Args`. - -**Signature** - -```ts -export * as Args from "./Args.js" -``` - -Added in v1.0.0 - -## From "./AutoCorrect.js" - -Re-exports all named exports from the "./AutoCorrect.js" module as `AutoCorrect`. - -**Signature** - -```ts -export * as AutoCorrect from "./AutoCorrect.js" -``` - -Added in v1.0.0 - -## From "./BuiltInOptions.js" - -Re-exports all named exports from the "./BuiltInOptions.js" module as `BuiltInOptions`. - -**Signature** - -```ts -export * as BuiltInOptions from "./BuiltInOptions.js" -``` - -Added in v1.0.0 - -## From "./CliApp.js" - -Re-exports all named exports from the "./CliApp.js" module as `CliApp`. - -**Signature** - -```ts -export * as CliApp from "./CliApp.js" -``` - -Added in v1.0.0 - -## From "./CliConfig.js" - -Re-exports all named exports from the "./CliConfig.js" module as `CliConfig`. - -**Signature** - -```ts -export * as CliConfig from "./CliConfig.js" -``` - -Added in v1.0.0 - -## From "./Command.js" - -Re-exports all named exports from the "./Command.js" module as `Command`. - -**Signature** - -```ts -export * as Command from "./Command.js" -``` - -Added in v1.0.0 - -## From "./CommandDirective.js" - -Re-exports all named exports from the "./CommandDirective.js" module as `CommandDirective`. - -**Signature** - -```ts -export * as CommandDirective from "./CommandDirective.js" -``` - -Added in v1.0.0 - -## From "./Compgen.js" - -Re-exports all named exports from the "./Compgen.js" module as `Compgen`. - -**Signature** - -```ts -export * as Compgen from "./Compgen.js" -``` - -Added in v1.0.0 - -## From "./Completion.js" - -Re-exports all named exports from the "./Completion.js" module as `Completion`. - -**Signature** - -```ts -export * as Completion from "./Completion.js" -``` - -Added in v1.0.0 - -## From "./HelpDoc.js" - -Re-exports all named exports from the "./HelpDoc.js" module as `HelpDoc`. - -**Signature** - -```ts -export * as HelpDoc from "./HelpDoc.js" -``` - -Added in v1.0.0 - -## From "./Options.js" - -Re-exports all named exports from the "./Options.js" module as `Options`. - -**Signature** - -```ts -export * as Options from "./Options.js" -``` - -Added in v1.0.0 - -## From "./Parameter.js" - -Re-exports all named exports from the "./Parameter.js" module as `Parameter`. - -**Signature** - -```ts -export * as Parameter from "./Parameter.js" -``` - -Added in v1.0.0 - -## From "./Primitive.js" - -Re-exports all named exports from the "./Primitive.js" module as `Primitive`. - -**Signature** - -```ts -export * as Primitive from "./Primitive.js" -``` - -Added in v1.0.0 - -## From "./Prompt.js" - -Re-exports all named exports from the "./Prompt.js" module as `Prompt`. - -**Signature** - -```ts -export * as Prompt from "./Prompt.js" -``` - -Added in v1.0.0 - -## From "./RegularLanguage.js" - -Re-exports all named exports from the "./RegularLanguage.js" module as `RegularLanguage`. - -**Signature** - -```ts -export * as RegularLanguage from "./RegularLanguage.js" -``` - -Added in v1.0.0 - -## From "./ShellType.js" - -Re-exports all named exports from the "./ShellType.js" module as `ShellType`. - -**Signature** - -```ts -export * as ShellType from "./ShellType.js" -``` - -Added in v1.0.0 - -## From "./Terminal.js" - -Re-exports all named exports from the "./Terminal.js" module as `Terminal`. - -**Signature** - -```ts -export * as Terminal from "./Terminal.js" -``` - -Added in v1.0.0 - -## From "./Usage.js" - -Re-exports all named exports from the "./Usage.js" module as `Usage`. - -**Signature** - -```ts -export * as Usage from "./Usage.js" -``` - -Added in v1.0.0 - -## From "./ValidationError.js" - -Re-exports all named exports from the "./ValidationError.js" module as `ValidationError`. - -**Signature** - -```ts -export * as ValidationError from "./ValidationError.js" -``` - -Added in v1.0.0