Skip to content

Commit ee77e0c

Browse files
committed
docs(api): regenerate documentation
1 parent 5e1e5b5 commit ee77e0c

File tree

108 files changed

+1026
-697
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1026
-697
lines changed

docs/api/src/exports/classes/CliError.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Class: CliError
88

9-
Defined in: [src/error.ts:132](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/error.ts#L132)
9+
Defined in: [src/error.ts:141](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/error.ts#L141)
1010

1111
Represents a CLI-specific error with suggested exit code and other
1212
properties. As `CliError` has built-in support for cause chaining, this class
@@ -32,7 +32,7 @@ can be used as a simple wrapper around other errors.
3232

3333
> **new CliError**(`reason`?, `options`?): [`CliError`](CliError.md)
3434
35-
Defined in: [src/error.ts:142](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/error.ts#L142)
35+
Defined in: [src/error.ts:151](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/error.ts#L151)
3636

3737
Represents a CLI-specific error, optionally with suggested exit code and
3838
other context.
@@ -59,7 +59,7 @@ other context.
5959

6060
> **new CliError**(`reason`, `options`, `message`, `superOptions`): [`CliError`](CliError.md)
6161
62-
Defined in: [src/error.ts:147](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/error.ts#L147)
62+
Defined in: [src/error.ts:156](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/error.ts#L156)
6363

6464
This constructor syntax is used by subclasses when calling this constructor
6565
via `super`.
@@ -96,7 +96,7 @@ via `super`.
9696

9797
> **\[$type\]**: `string`[]
9898
99-
Defined in: [src/error.ts:137](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/error.ts#L137)
99+
Defined in: [src/error.ts:146](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/error.ts#L146)
100100

101101
***
102102

@@ -120,7 +120,7 @@ Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:26
120120

121121
> **dangerouslyFatal**: `boolean` = `false`
122122
123-
Defined in: [src/error.ts:135](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/error.ts#L135)
123+
Defined in: [src/error.ts:144](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/error.ts#L144)
124124

125125
This option is similar in intent to yargs's `exitProcess()` function,
126126
except applied more granularly.
@@ -177,13 +177,20 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076
177177

178178
### showHelp
179179

180-
> **showHelp**: `boolean` = `false`
180+
> **showHelp**: `undefined` \| `boolean` \| `"full"` \| `"short"` \| `"default"`
181181
182-
Defined in: [src/error.ts:134](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/error.ts#L134)
182+
Defined in: [src/error.ts:143](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/error.ts#L143)
183183

184-
If `true`, help text will be sent to stderr _before this exception finishes
185-
bubbling_. Where the exception is thrown will determine which instance is
186-
responsible for error text generation.
184+
If truthy, help text will be sent to stderr _before this exception finishes
185+
bubbling_.
186+
187+
Specifically, if `showHelp` is set to `"full"`, the full help text will be
188+
sent to stderr, including the entire `usage` string. If set to `"short"`
189+
(or `true`), the same help text will be sent to stderr except only the
190+
first line of usage will be included. If set to `"default"`, the value of
191+
`ExecutionContext::state.showHelpOnFail` will be used. If set to
192+
`false` (the default), no help text will be sent to stderr related to this
193+
error.
187194

188195
#### Default
189196

@@ -213,7 +220,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
213220

214221
> **suggestedExitCode**: [`FrameworkExitCode`](../enumerations/FrameworkExitCode.md) = `FrameworkExitCode.DefaultError`
215222
216-
Defined in: [src/error.ts:133](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/error.ts#L133)
223+
Defined in: [src/error.ts:142](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/error.ts#L142)
217224

218225
The exit code that will be returned when the application exits, given
219226
nothing else goes wrong in the interim.

docs/api/src/exports/classes/GracefulEarlyExitError.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Class: GracefulEarlyExitError
88

9-
Defined in: [src/error.ts:218](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/error.ts#L218)
9+
Defined in: [src/error.ts:227](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/error.ts#L227)
1010

1111
Represents an exceptional event that should result in the immediate
1212
termination of the application but with an exit code indicating success
@@ -25,7 +25,7 @@ ignored.
2525

2626
> **new GracefulEarlyExitError**(`error`?, `options`?): [`GracefulEarlyExitError`](GracefulEarlyExitError.md)
2727
28-
Defined in: [src/error.ts:229](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/error.ts#L229)
28+
Defined in: [src/error.ts:238](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/error.ts#L238)
2929

3030
Represents an exceptional event that should result in the immediate
3131
termination of the application but with an exit code indicating success
@@ -58,7 +58,7 @@ ignored.
5858

5959
> **\[$type\]**: `string`[]
6060
61-
Defined in: [src/error.ts:220](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/error.ts#L220)
61+
Defined in: [src/error.ts:229](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/error.ts#L229)
6262

6363
#### Overrides
6464

@@ -82,7 +82,7 @@ Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:26
8282

8383
> **dangerouslyFatal**: `boolean` = `false`
8484
85-
Defined in: [src/error.ts:135](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/error.ts#L135)
85+
Defined in: [src/error.ts:144](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/error.ts#L144)
8686

8787
This option is similar in intent to yargs's `exitProcess()` function,
8888
except applied more granularly.
@@ -139,13 +139,20 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076
139139

140140
### showHelp
141141

142-
> **showHelp**: `boolean` = `false`
142+
> **showHelp**: `undefined` \| `boolean` \| `"full"` \| `"short"` \| `"default"`
143143
144-
Defined in: [src/error.ts:134](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/error.ts#L134)
144+
Defined in: [src/error.ts:143](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/error.ts#L143)
145145

146-
If `true`, help text will be sent to stderr _before this exception finishes
147-
bubbling_. Where the exception is thrown will determine which instance is
148-
responsible for error text generation.
146+
If truthy, help text will be sent to stderr _before this exception finishes
147+
bubbling_.
148+
149+
Specifically, if `showHelp` is set to `"full"`, the full help text will be
150+
sent to stderr, including the entire `usage` string. If set to `"short"`
151+
(or `true`), the same help text will be sent to stderr except only the
152+
first line of usage will be included. If set to `"default"`, the value of
153+
`ExecutionContext::state.showHelpOnFail` will be used. If set to
154+
`false` (the default), no help text will be sent to stderr related to this
155+
error.
149156

150157
#### Default
151158

@@ -175,7 +182,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
175182

176183
> **suggestedExitCode**: [`FrameworkExitCode`](../enumerations/FrameworkExitCode.md) = `FrameworkExitCode.DefaultError`
177184
178-
Defined in: [src/error.ts:133](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/error.ts#L133)
185+
Defined in: [src/error.ts:142](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/error.ts#L142)
179186

180187
The exit code that will be returned when the application exits, given
181188
nothing else goes wrong in the interim.

docs/api/src/exports/enumerations/FrameworkExitCode.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Enumeration: FrameworkExitCode
88

9-
Defined in: [src/constant.ts:51](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/constant.ts#L51)
9+
Defined in: [src/constant.ts:51](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/constant.ts#L51)
1010

1111
Well-known exit codes shared across CLI implementations.
1212

@@ -16,7 +16,7 @@ Well-known exit codes shared across CLI implementations.
1616

1717
> **AssertionFailed**: `3`
1818
19-
Defined in: [src/constant.ts:75](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/constant.ts#L75)
19+
Defined in: [src/constant.ts:75](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/constant.ts#L75)
2020

2121
The exit code used when a sanity check fails. This includes (but is not
2222
limited to) all _framework errors_.
@@ -34,7 +34,7 @@ of Black Flag by the developer.
3434

3535
> **DefaultError**: `1`
3636
37-
Defined in: [src/constant.ts:59](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/constant.ts#L59)
37+
Defined in: [src/constant.ts:59](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/constant.ts#L59)
3838

3939
Hard-coded default fallback exit code when fatal errors occur.
4040

@@ -44,7 +44,7 @@ Hard-coded default fallback exit code when fatal errors occur.
4444

4545
> **NotImplemented**: `2`
4646
47-
Defined in: [src/constant.ts:63](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/constant.ts#L63)
47+
Defined in: [src/constant.ts:63](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/constant.ts#L63)
4848

4949
The exit code used when executing an unimplemented child command.
5050

@@ -54,6 +54,6 @@ The exit code used when executing an unimplemented child command.
5454

5555
> **Ok**: `0`
5656
57-
Defined in: [src/constant.ts:55](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/constant.ts#L55)
57+
Defined in: [src/constant.ts:55](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/constant.ts#L55)
5858

5959
The exit code used when execution succeeds and exits gracefully.

docs/api/src/exports/functions/configureProgram.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> **configureProgram**(`commandModulesPath`, `configurationHooks`?): `Promise`\<[`PreExecutionContext`](../util/type-aliases/PreExecutionContext.md)\>
1010
11-
Defined in: [src/index.ts:188](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/index.ts#L188)
11+
Defined in: [src/index.ts:188](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/index.ts#L188)
1212

1313
Create and return a [PreExecutionContext](../util/type-aliases/PreExecutionContext.md) containing fully-configured
1414
[Program](../util/type-aliases/Program.md) instances and an [Executor](../util/type-aliases/Executor.md) entry point function.

docs/api/src/exports/functions/isCliError.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> **isCliError**(`parameter`): `parameter is CliError`
1010
11-
Defined in: [src/error.ts:31](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/error.ts#L31)
11+
Defined in: [src/error.ts:33](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/error.ts#L33)
1212

1313
Type guard for [CliError](../classes/CliError.md).
1414

docs/api/src/exports/functions/isGracefulEarlyExitError.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> **isGracefulEarlyExitError**(`parameter`): `parameter is GracefulEarlyExitError`
1010
11-
Defined in: [src/error.ts:44](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/error.ts#L44)
11+
Defined in: [src/error.ts:46](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/error.ts#L46)
1212

1313
Type guard for [GracefulEarlyExitError](../classes/GracefulEarlyExitError.md).
1414

docs/api/src/exports/functions/runProgram.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
> **runProgram**\<`CustomCliArguments`\>(`commandModulesPath`): [`RunProgramReturnType`](../type-aliases/RunProgramReturnType.md)\<`CustomCliArguments`\>
1212
13-
Defined in: [src/index.ts:668](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/index.ts#L668)
13+
Defined in: [src/index.ts:674](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/index.ts#L674)
1414

1515
Invokes the dynamically imported
1616
`configureProgram(commandModulesPath).execute()` function.
@@ -46,7 +46,7 @@ if any other exception occurs, or `Arguments` otherwise.
4646

4747
> **runProgram**\<`CustomCliArguments`\>(`commandModulesPath`, `configurationHooks`): [`RunProgramReturnType`](../type-aliases/RunProgramReturnType.md)\<`CustomCliArguments`\>
4848
49-
Defined in: [src/index.ts:688](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/index.ts#L688)
49+
Defined in: [src/index.ts:694](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/index.ts#L694)
5050

5151
Invokes the dynamically imported `configureProgram(commandModulesPath,
5252
configurationHooks).execute()` function.
@@ -86,7 +86,7 @@ if any other exception occurs, or `Arguments` otherwise.
8686

8787
> **runProgram**\<`CustomCliArguments`\>(`commandModulesPath`, `preExecutionContext`): [`RunProgramReturnType`](../type-aliases/RunProgramReturnType.md)\<`CustomCliArguments`\>
8888
89-
Defined in: [src/index.ts:712](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/index.ts#L712)
89+
Defined in: [src/index.ts:718](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/index.ts#L718)
9090

9191
Invokes the `preExecutionContext.execute()` function.
9292

@@ -127,7 +127,7 @@ if any other exception occurs, or `Arguments` otherwise.
127127

128128
> **runProgram**\<`CustomCliArguments`\>(`commandModulesPath`, `argv`): [`RunProgramReturnType`](../type-aliases/RunProgramReturnType.md)\<`CustomCliArguments`\>
129129
130-
Defined in: [src/index.ts:736](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/index.ts#L736)
130+
Defined in: [src/index.ts:742](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/index.ts#L742)
131131

132132
Invokes the dynamically imported
133133
`configureProgram(commandModulesPath).execute(argv)` function. If `argv` is a
@@ -168,7 +168,7 @@ if any other exception occurs, or `Arguments` otherwise.
168168

169169
> **runProgram**\<`CustomCliArguments`\>(`commandModulesPath`, `argv`, `configurationHooks`): [`RunProgramReturnType`](../type-aliases/RunProgramReturnType.md)\<`CustomCliArguments`\>
170170
171-
Defined in: [src/index.ts:760](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/index.ts#L760)
171+
Defined in: [src/index.ts:766](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/index.ts#L766)
172172

173173
Invokes the dynamically imported `configureProgram(commandModulesPath,
174174
configurationHooks).execute(argv)` function. If `argv` is a string, `argv =
@@ -213,7 +213,7 @@ if any other exception occurs, or `Arguments` otherwise.
213213

214214
> **runProgram**\<`CustomCliArguments`\>(`commandModulesPath`, `argv`, `preExecutionContext`): [`RunProgramReturnType`](../type-aliases/RunProgramReturnType.md)\<`CustomCliArguments`\>
215215
216-
Defined in: [src/index.ts:786](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/index.ts#L786)
216+
Defined in: [src/index.ts:792](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/index.ts#L792)
217217

218218
Invokes the `preExecutionContext.execute(argv)` function. If `argv` is a
219219
string, `argv = argv.split(' ')` is applied first.
@@ -259,7 +259,7 @@ if any other exception occurs, or `Arguments` otherwise.
259259

260260
> **runProgram**\<`CustomCliArguments`\>(...`args`): [`RunProgramReturnType`](../type-aliases/RunProgramReturnType.md)\<`CustomCliArguments`\>
261261
262-
Defined in: [src/index.ts:806](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/index.ts#L806)
262+
Defined in: [src/index.ts:812](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/index.ts#L812)
263263

264264
Run the given program with the configuration given in `args`.
265265

docs/api/src/exports/type-aliases/Arguments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> **Arguments**\<`CustomCliArguments`, `CustomExecutionContext`\>: `_Arguments`\<[`FrameworkArguments`](../util/type-aliases/FrameworkArguments.md)\<`CustomExecutionContext`\> & `CustomCliArguments`\>
1010
11-
Defined in: [src/types/program.ts:19](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/types/program.ts#L19)
11+
Defined in: [src/types/program.ts:19](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/types/program.ts#L19)
1212

1313
Represents the parsed CLI arguments, plus `_` and `$0`, any (hidden)
1414
arguments/properties specific to Black Flag, and an indexer falling back to

docs/api/src/exports/type-aliases/ChildConfiguration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> **ChildConfiguration**\<`CustomCliArguments`, `CustomExecutionContext`\>: `Partial`\<[`Configuration`](Configuration.md)\<`CustomCliArguments`, `CustomExecutionContext`\>\>
1010
11-
Defined in: [src/types/module.ts:162](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/types/module.ts#L162)
11+
Defined in: [src/types/module.ts:170](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/types/module.ts#L170)
1212

1313
A partial extension to the [Configuration](Configuration.md) interface for child
1414
configurations. This type was designed for use in external ESM/CJS module

docs/api/src/exports/type-aliases/Configuration.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> **Configuration**\<`CustomCliArguments`, `CustomExecutionContext`\>: `object`
1010
11-
Defined in: [src/types/module.ts:15](https://github.com/Xunnamius/black-flag/blob/41bcd587ae1e5e4c88c48238363c70e315cd242a/src/types/module.ts#L15)
11+
Defined in: [src/types/module.ts:15](https://github.com/Xunnamius/black-flag/blob/5e1e5b553c79657a97e5923bcba77a292781de9e/src/types/module.ts#L15)
1212

1313
A replacement for the `CommandModule` type that comes with yargs.
1414
Auto-discovered configuration modules must implement this interface or a
@@ -76,7 +76,9 @@ first invoked** and so aren't available until a little later.
7676

7777
> **command**: `"$0"` \| `` `$0 ${string}` ``
7878
79-
The command as interpreted by yargs. May contain positional arguments.
79+
The command as interpreted by yargs. May contain positional arguments
80+
declared using the [`yargs::command`
81+
DSL](https://github.com/yargs/yargs/blob/main/docs/advanced.md#positional-arguments).
8082

8183
It is usually unnecessary to change or use this property if you're not
8284
using positional arguments. If you want to change your command's name, use
@@ -123,7 +125,8 @@ be considered "hidden" by yargs.
123125
A function called when this command is invoked. It will receive an object
124126
of parsed arguments.
125127

126-
If `undefined`, a `CommandNotImplementedError` will be thrown.
128+
If `undefined`, the command will be considered "unimplemented" and a
129+
`CommandNotImplementedError` will be thrown.
127130

128131
#### Parameters
129132

@@ -159,6 +162,11 @@ filename without extension is "index".
159162
160163
Set a usage message shown at the top of the command's help text.
161164

165+
Depending on the value of `ExecutionContext::state.showHelpOnFail`, either
166+
the "short" first line of usage text will be output during errors or the
167+
"full" usage string. Either way, whenever help text is explicitly requested
168+
(e.g. `--help` is given), the full usage string will be output.
169+
162170
Several replacements are made to the `usage` string before it is output. In
163171
order:
164172

0 commit comments

Comments
 (0)