Skip to content

Commit 6ed277e

Browse files
committed
release: @black-flag/[email protected] [skip ci]
## 🪄 Fixes - **packages/extensions:** improve `safeDeepClone` to account for own symbol properties ([119919e][2]) - **readme:** update quick start example ([bdafbf8][3]) - **readme:** use latest interface to extract positional in quick start example ([33895e7][4]) - **src:** do not make context descriptors unenumerable ([2e6c05b][5]) ## ⚙️ Build System - **deps:** bump @-xun/js from 1.0.0 to 1.1.0 ([0adf956][6]) - **deps:** bump @-xun/js from 1.1.0 to 1.1.1 ([f3f1f74][7]) [1]: https://github.com/Xunnamius/black-flag/compare/@black-flag/[email protected]...@black-flag/[email protected] [2]: 119919e [3]: bdafbf8 [4]: 33895e7 [5]: 2e6c05b [6]: 0adf956 [7]: f3f1f74
1 parent 80aa4a3 commit 6ed277e

Some content is hidden

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

61 files changed

+236
-213
lines changed

Diff for: CHANGELOG.md

+110-87
Large diffs are not rendered by default.

Diff for: docs/api/src/exports/classes/CliError.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Class: CliError
88

9-
Defined in: [src/error.ts:156](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/error.ts#L156)
9+
Defined in: [src/error.ts:156](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/error.ts#L156)
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
@@ -33,7 +33,7 @@ can be used as a simple wrapper around other errors.
3333

3434
> **new CliError**(`reason`?, `options`?): `CliError`
3535
36-
Defined in: [src/error.ts:169](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/error.ts#L169)
36+
Defined in: [src/error.ts:169](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/error.ts#L169)
3737

3838
Represents a CLI-specific error, optionally with suggested exit code and
3939
other context.
@@ -60,7 +60,7 @@ other context.
6060

6161
> **new CliError**(`reason`, `options`, `message`, `superOptions`): `CliError`
6262
63-
Defined in: [src/error.ts:174](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/error.ts#L174)
63+
Defined in: [src/error.ts:174](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/error.ts#L174)
6464

6565
This constructor syntax is used by subclasses when calling this constructor
6666
via `super`.
@@ -97,7 +97,7 @@ via `super`.
9797

9898
> **\[$type\]**: `string`[]
9999
100-
Defined in: [src/error.ts:164](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/error.ts#L164)
100+
Defined in: [src/error.ts:164](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/error.ts#L164)
101101

102102
***
103103

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

122122
> **dangerouslyFatal**: `boolean` = `false`
123123
124-
Defined in: [src/error.ts:162](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/error.ts#L162)
124+
Defined in: [src/error.ts:162](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/error.ts#L162)
125125

126126
This option is similar in intent to Yargs's `exitProcess()` function,
127127
except applied more granularly.
@@ -186,7 +186,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1076
186186

187187
> **showHelp**: `NonNullable`\<`undefined` \| `false` \| `"short"` \| `"full"` \| `"default"`\>
188188
189-
Defined in: [src/error.ts:161](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/error.ts#L161)
189+
Defined in: [src/error.ts:161](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/error.ts#L161)
190190

191191
If `showHelp` is set to a string that isn't `"default"`, help text will be
192192
sent to stderr. Note that help text is always sent _before this exception
@@ -237,7 +237,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
237237

238238
> **suggestedExitCode**: [`FrameworkExitCode`](../enumerations/FrameworkExitCode.md) = `FrameworkExitCode.DefaultError`
239239
240-
Defined in: [src/error.ts:160](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/error.ts#L160)
240+
Defined in: [src/error.ts:160](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/error.ts#L160)
241241

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

Diff for: docs/api/src/exports/classes/GracefulEarlyExitError.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Class: GracefulEarlyExitError
88

9-
Defined in: [src/error.ts:246](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/error.ts#L246)
9+
Defined in: [src/error.ts:246](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/error.ts#L246)
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`
2727
28-
Defined in: [src/error.ts:257](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/error.ts#L257)
28+
Defined in: [src/error.ts:257](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/error.ts#L257)
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:248](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/error.ts#L248)
61+
Defined in: [src/error.ts:248](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/error.ts#L248)
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:162](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/error.ts#L162)
85+
Defined in: [src/error.ts:162](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/error.ts#L162)
8686

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

148148
> **showHelp**: `NonNullable`\<`undefined` \| `false` \| `"short"` \| `"full"` \| `"default"`\>
149149
150-
Defined in: [src/error.ts:161](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/error.ts#L161)
150+
Defined in: [src/error.ts:161](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/error.ts#L161)
151151

152152
If `showHelp` is set to a string that isn't `"default"`, help text will be
153153
sent to stderr. Note that help text is always sent _before this exception
@@ -198,7 +198,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1078
198198

199199
> **suggestedExitCode**: [`FrameworkExitCode`](../enumerations/FrameworkExitCode.md) = `FrameworkExitCode.DefaultError`
200200
201-
Defined in: [src/error.ts:160](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/error.ts#L160)
201+
Defined in: [src/error.ts:160](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/error.ts#L160)
202202

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

Diff for: docs/api/src/exports/enumerations/FrameworkExitCode.md

+5-5
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/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/constant.ts#L51)
9+
Defined in: [src/constant.ts:51](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/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/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/constant.ts#L75)
19+
Defined in: [src/constant.ts:75](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/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/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/constant.ts#L59)
37+
Defined in: [src/constant.ts:59](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/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/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/constant.ts#L63)
47+
Defined in: [src/constant.ts:63](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/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/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/constant.ts#L55)
57+
Defined in: [src/constant.ts:55](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/constant.ts#L55)
5858

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

Diff for: docs/api/src/exports/functions/configureProgram.md

+1-1
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/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/index.ts#L188)
11+
Defined in: [src/index.ts:189](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/index.ts#L189)
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.

Diff for: docs/api/src/exports/functions/isCliError.md

+1-1
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:33](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/error.ts#L33)
11+
Defined in: [src/error.ts:33](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/error.ts#L33)
1212

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

Diff for: docs/api/src/exports/functions/isGracefulEarlyExitError.md

+1-1
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:46](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/error.ts#L46)
11+
Defined in: [src/error.ts:46](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/error.ts#L46)
1212

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

Diff for: docs/api/src/exports/functions/runProgram.md

+7-7
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:674](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/index.ts#L674)
13+
Defined in: [src/index.ts:671](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/index.ts#L671)
1414

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

4949
> **runProgram**\<`CustomCliArguments`\>(`commandModulesPath`, `configurationHooks`): [`RunProgramReturnType`](../type-aliases/RunProgramReturnType.md)\<`CustomCliArguments`\>
5050
51-
Defined in: [src/index.ts:694](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/index.ts#L694)
51+
Defined in: [src/index.ts:691](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/index.ts#L691)
5252

5353
Invokes the dynamically imported `configureProgram(commandModulesPath,
5454
configurationHooks).execute()` function.
@@ -90,7 +90,7 @@ if any other exception occurs, or `Arguments` otherwise.
9090

9191
> **runProgram**\<`CustomCliArguments`\>(`commandModulesPath`, `preExecutionContext`): [`RunProgramReturnType`](../type-aliases/RunProgramReturnType.md)\<`CustomCliArguments`\>
9292
93-
Defined in: [src/index.ts:718](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/index.ts#L718)
93+
Defined in: [src/index.ts:715](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/index.ts#L715)
9494

9595
Invokes the `preExecutionContext.execute()` function.
9696

@@ -133,7 +133,7 @@ if any other exception occurs, or `Arguments` otherwise.
133133

134134
> **runProgram**\<`CustomCliArguments`\>(`commandModulesPath`, `argv`): [`RunProgramReturnType`](../type-aliases/RunProgramReturnType.md)\<`CustomCliArguments`\>
135135
136-
Defined in: [src/index.ts:742](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/index.ts#L742)
136+
Defined in: [src/index.ts:739](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/index.ts#L739)
137137

138138
Invokes the dynamically imported
139139
`configureProgram(commandModulesPath).execute(argv)` function. If `argv` is a
@@ -176,7 +176,7 @@ if any other exception occurs, or `Arguments` otherwise.
176176

177177
> **runProgram**\<`CustomCliArguments`\>(`commandModulesPath`, `argv`, `configurationHooks`): [`RunProgramReturnType`](../type-aliases/RunProgramReturnType.md)\<`CustomCliArguments`\>
178178
179-
Defined in: [src/index.ts:766](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/index.ts#L766)
179+
Defined in: [src/index.ts:763](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/index.ts#L763)
180180

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

224224
> **runProgram**\<`CustomCliArguments`\>(`commandModulesPath`, `argv`, `preExecutionContext`): [`RunProgramReturnType`](../type-aliases/RunProgramReturnType.md)\<`CustomCliArguments`\>
225225
226-
Defined in: [src/index.ts:792](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/index.ts#L792)
226+
Defined in: [src/index.ts:789](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/index.ts#L789)
227227

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

272272
> **runProgram**\<`CustomCliArguments`\>(...`args`): [`RunProgramReturnType`](../type-aliases/RunProgramReturnType.md)\<`CustomCliArguments`\>
273273
274-
Defined in: [src/index.ts:812](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/index.ts#L812)
274+
Defined in: [src/index.ts:809](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/index.ts#L809)
275275

276276
Run the given program with the configuration given in `args`.
277277

Diff for: docs/api/src/exports/type-aliases/Arguments.md

+1-1
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:29](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/types/program.ts#L29)
11+
Defined in: [src/types/program.ts:29](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/src/types/program.ts#L29)
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

Diff for: docs/api/src/exports/type-aliases/ChildConfiguration.md

+1-1
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:170](https://github.com/Xunnamius/black-flag/blob/6975ac4841c42ac3213d392b5cb06d13a72628a4/src/types/module.ts#L170)
11+
Defined in: [src/types/module.ts:170](https://github.com/Xunnamius/black-flag/blob/80aa4a39c172096a78cb27464b3ff055c511121d/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

0 commit comments

Comments
 (0)