diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a44b28..b4aff66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,169 +4,177 @@ All notable changes to this project will be documented in this auto-generated file. The format is based on [Conventional Commits][1]; this project adheres to [Semantic Versioning][2]. -### [1.2.7][3] (2024-06-30) +## [1.3.0][3] (2024-07-12) + +#### ✨ Features + +- **`clierror`:** add `dangerouslyFatal` option, update `cause` option handling ([1c369fb][4]) + +### [1.2.7][5] (2024-06-30) #### 🪄 Fixes -- **types:** pass through `CustomExecutionContext` as context type in `ImportedConfigurationModule` ([cdc6af5][4]) +- **types:** pass through `CustomExecutionContext` as context type in `ImportedConfigurationModule` ([cdc6af5][6]) #### ⚙️ Build System -- **spellcheck-commit:** fix commit spellchecker ([6e7a268][5]) +- **spellcheck-commit:** fix commit spellchecker ([6e7a268][7]) -### [1.2.6][6] (2024-06-02) +### [1.2.6][8] (2024-06-02) #### 🪄 Fixes -- **src:** ignore --help and --version if they occur after -- in argv ([35f66cc][7]) +- **src:** ignore --help and --version if they occur after -- in argv ([35f66cc][9]) -### [1.2.5][8] (2024-05-30) +### [1.2.5][10] (2024-05-30) #### 🪄 Fixes -- **src:** permanently fix --version support regression in node\@22 ([c201c2f][9]) +- **src:** permanently fix --version support regression in node\@22 ([c201c2f][11]) #### ⚙️ Build System -- **package:** append node\@22 to supported node versions ([98815d1][10]) +- **package:** append node\@22 to supported node versions ([98815d1][12]) -### [1.2.4][11] (2024-03-27) +### [1.2.4][13] (2024-03-27) #### 🪄 Fixes -- **src:** explicitly ignore .d.ts files within command dirs ([d6618d3][12]) +- **src:** explicitly ignore .d.ts files within command dirs ([d6618d3][14]) -### [1.2.3][13] (2024-03-27) +### [1.2.3][15] (2024-03-27) #### 🪄 Fixes -- **package:** bump minimum node support to 20 LTS ([4b8c975][14]) -- **src:** ignore unknown file extension errors when discovering commands ([4babf12][15]) +- **package:** bump minimum node support to 20 LTS ([4b8c975][16]) +- **src:** ignore unknown file extension errors when discovering commands ([4babf12][17]) -### [1.2.2][16] (2024-03-21) +### [1.2.2][18] (2024-03-21) #### 🪄 Fixes -- No longer include default command when listing subcommands ([be2960a][17]) +- No longer include default command when listing subcommands ([be2960a][19]) #### ⚙️ Build System -- **husky:** update to latest hooks ([75d5c66][18]) -- **src:** do not filter to own methods when proxying and rebinding ([8bb0254][19]) +- **husky:** update to latest hooks ([75d5c66][20]) +- **src:** do not filter to own methods when proxying and rebinding ([8bb0254][21]) -### [1.2.1][20] (2024-03-19) +### [1.2.1][22] (2024-03-19) #### ⚙️ Build System -- **babel:** fix import specifier rewrite oversight ([2369534][21]) +- **babel:** fix import specifier rewrite oversight ([2369534][23]) -## [1.2.0][22] (2024-03-18) +## [1.2.0][24] (2024-03-18) #### ✨ Features -- Add `showHelp` option to `CliError` ([b5a1e58][23]) +- Add `showHelp` option to `CliError` ([b5a1e58][25]) -### [1.1.4][24] (2024-03-16) +### [1.1.4][26] (2024-03-16) #### 🪄 Fixes -- **types:** allow exported types to specify custom `ExecutionContext` ([f66599b][25]) +- **types:** allow exported types to specify custom `ExecutionContext` ([f66599b][27]) -### [1.1.3][26] (2024-03-15) +### [1.1.3][28] (2024-03-15) #### 🪄 Fixes -- Add support for `export default X` syntax ([bad391d][27]) -- Ensure `demandOption` is properly supported ([2f205c1][28]) +- Add support for `export default X` syntax ([bad391d][29]) +- Ensure `demandOption` is properly supported ([2f205c1][30]) -### [1.1.2][29] (2023-12-31) +### [1.1.2][31] (2023-12-31) #### 🪄 Fixes -- **readme:** move parserConfiguration call out of dead zone in example ([f79c114][30]) +- **readme:** move parserConfiguration call out of dead zone in example ([f79c114][32]) -### [1.1.1][31] (2023-12-31) +### [1.1.1][33] (2023-12-31) #### 🪄 Fixes -- Fix Node10 type resolution failure ([b6178c9][32]) +- Fix Node10 type resolution failure ([b6178c9][34]) -## [1.1.0][33] (2023-12-31) +## [1.1.0][35] (2023-12-31) #### ✨ Features -- **src:** support file://-style URLs ([0e5067e][34]) +- **src:** support file://-style URLs ([0e5067e][36]) #### 🪄 Fixes -- **src:** ensure --version is included in help text output when relevant ([4f159dc][35]) +- **src:** ensure --version is included in help text output when relevant ([4f159dc][37]) #### ⚙️ Build System -- **babel:** fix ESM<=>CJS interop issue ([5470091][36]) +- **babel:** fix ESM<=>CJS interop issue ([5470091][38]) -## [1.0.0][37] (2023-12-29) +## [1.0.0][39] (2023-12-29) #### ✨ Features -- **src:** disallow creating commands with conflicting names/aliases ([78bf8ff][38]) +- **src:** disallow creating commands with conflicting names/aliases ([78bf8ff][40]) #### 🪄 Fixes -- Rename package from "black-flag" to "[@black-][39]flag/core" npm typosquat workaround ([292ead5][40]) +- Rename package from "black-flag" to "[@black-][41]flag/core" npm typosquat workaround ([292ead5][42]) #### ⚙️ Build System -- Fix horrible decision by marked devs to break output for no reason ([036e350][41]) -- **jest:** ensure pkg-up is transformed ([c7f4aef][42]) -- **jest:** fix transformIgnorePatterns ([0548d34][43]) -- **jest:** transpile node\_modules ([5cf7a6c][44]) -- **tsconfig:** fix internal path resolution ([fbe3a69][45]) -- **tsconfig:** upgrade to NodeNext ([d3a499e][46]) +- Fix horrible decision by marked devs to break output for no reason ([036e350][43]) +- **jest:** ensure pkg-up is transformed ([c7f4aef][44]) +- **jest:** fix transformIgnorePatterns ([0548d34][45]) +- **jest:** transpile node\_modules ([5cf7a6c][46]) +- **tsconfig:** fix internal path resolution ([fbe3a69][47]) +- **tsconfig:** upgrade to NodeNext ([d3a499e][48]) [1]: https://conventionalcommits.org [2]: https://semver.org -[3]: https://github.com/Xunnamius/black-flag/compare/v1.2.6...v1.2.7 -[4]: https://github.com/Xunnamius/black-flag/commit/cdc6af55387aac92b7d9fc16a57790068e4b6d49 -[5]: https://github.com/Xunnamius/black-flag/commit/6e7a268bebe71f19120fd926b004f3cb9e490760 -[6]: https://github.com/Xunnamius/black-flag/compare/v1.2.5...v1.2.6 -[7]: https://github.com/Xunnamius/black-flag/commit/35f66cc9d69f8434d03db49f067b4f7e03d4c58c -[8]: https://github.com/Xunnamius/black-flag/compare/v1.2.4...v1.2.5 -[9]: https://github.com/Xunnamius/black-flag/commit/c201c2ff87c1119b9678e38acdc12918d2ed7fc2 -[10]: https://github.com/Xunnamius/black-flag/commit/98815d1ef218af56e07493a921c66294f91101cf -[11]: https://github.com/Xunnamius/black-flag/compare/v1.2.3...v1.2.4 -[12]: https://github.com/Xunnamius/black-flag/commit/d6618d370bd9a7264dad240856dc989a61071986 -[13]: https://github.com/Xunnamius/black-flag/compare/v1.2.2...v1.2.3 -[14]: https://github.com/Xunnamius/black-flag/commit/4b8c9759bc09f9b07593ce89446d4ec0e614db71 -[15]: https://github.com/Xunnamius/black-flag/commit/4babf12308b7aab0ed319077701eb6f3a1fdf1d3 -[16]: https://github.com/Xunnamius/black-flag/compare/v1.2.1...v1.2.2 -[17]: https://github.com/Xunnamius/black-flag/commit/be2960a507c43b3db598157de4dcafe22ee8906e -[18]: https://github.com/Xunnamius/black-flag/commit/75d5c66bcce8f0c2c139962f7ddd28aa0c9499d7 -[19]: https://github.com/Xunnamius/black-flag/commit/8bb025436d219c024a5d4a4a0ac59999440b7c13 -[20]: https://github.com/Xunnamius/black-flag/compare/v1.2.0...v1.2.1 -[21]: https://github.com/Xunnamius/black-flag/commit/2369534f63aa3858714bb81505d3fff4ed77c6b1 -[22]: https://github.com/Xunnamius/black-flag/compare/v1.1.4...v1.2.0 -[23]: https://github.com/Xunnamius/black-flag/commit/b5a1e58add31902fd9ec80b93dd37305b8fd0684 -[24]: https://github.com/Xunnamius/black-flag/compare/v1.1.3...v1.1.4 -[25]: https://github.com/Xunnamius/black-flag/commit/f66599bfdbb70ada6ec662e0d220a0a2e7047824 -[26]: https://github.com/Xunnamius/black-flag/compare/v1.1.2...v1.1.3 -[27]: https://github.com/Xunnamius/black-flag/commit/bad391da3019a5743a76ca2e510903f34c84ca53 -[28]: https://github.com/Xunnamius/black-flag/commit/2f205c1e8c94d3e6683816e5bbc3ae152e3c83e8 -[29]: https://github.com/Xunnamius/black-flag/compare/v1.1.1...v1.1.2 -[30]: https://github.com/Xunnamius/black-flag/commit/f79c11476de47bee3fa01e139269393b604b4271 -[31]: https://github.com/Xunnamius/black-flag/compare/v1.1.0...v1.1.1 -[32]: https://github.com/Xunnamius/black-flag/commit/b6178c9670a95084bca34424e71498f2d29ac48c -[33]: https://github.com/Xunnamius/black-flag/compare/v1.0.0...v1.1.0 -[34]: https://github.com/Xunnamius/black-flag/commit/0e5067e2b0913a19bdc6975b50b272bb5872ba98 -[35]: https://github.com/Xunnamius/black-flag/commit/4f159dc4b84223dd6b07456c0b50da16d2816bea -[36]: https://github.com/Xunnamius/black-flag/commit/5470091e385ca344e12a280ff95be793742874b8 -[37]: https://github.com/Xunnamius/black-flag/compare/d3a499e7aeddf23d392479b2cf99cc98bce8226f...v1.0.0 -[38]: https://github.com/Xunnamius/black-flag/commit/78bf8ffb0a6931fb3b131c42ce4b84146bfec842 -[39]: https://github.com/black- -[40]: https://github.com/Xunnamius/black-flag/commit/292ead5aa3f18c556d72d714830dcf07b9253e6d -[41]: https://github.com/Xunnamius/black-flag/commit/036e3506edc863da86372163c91dd650d6ac1e87 -[42]: https://github.com/Xunnamius/black-flag/commit/c7f4aef48366dc13685fb9805086be52d3561eff -[43]: https://github.com/Xunnamius/black-flag/commit/0548d34f559c3b8ba6d9514f1586aeeb3b382f72 -[44]: https://github.com/Xunnamius/black-flag/commit/5cf7a6c79bba3125ce47838e5cfd24a1a08bbd17 -[45]: https://github.com/Xunnamius/black-flag/commit/fbe3a699a9063ed7da08311a22fe798672583b0f -[46]: https://github.com/Xunnamius/black-flag/commit/d3a499e7aeddf23d392479b2cf99cc98bce8226f +[3]: https://github.com/Xunnamius/black-flag/compare/v1.2.7...v1.3.0 +[4]: https://github.com/Xunnamius/black-flag/commit/1c369fb8570c0b42acad78af66168f9b7f688dfc +[5]: https://github.com/Xunnamius/black-flag/compare/v1.2.6...v1.2.7 +[6]: https://github.com/Xunnamius/black-flag/commit/cdc6af55387aac92b7d9fc16a57790068e4b6d49 +[7]: https://github.com/Xunnamius/black-flag/commit/6e7a268bebe71f19120fd926b004f3cb9e490760 +[8]: https://github.com/Xunnamius/black-flag/compare/v1.2.5...v1.2.6 +[9]: https://github.com/Xunnamius/black-flag/commit/35f66cc9d69f8434d03db49f067b4f7e03d4c58c +[10]: https://github.com/Xunnamius/black-flag/compare/v1.2.4...v1.2.5 +[11]: https://github.com/Xunnamius/black-flag/commit/c201c2ff87c1119b9678e38acdc12918d2ed7fc2 +[12]: https://github.com/Xunnamius/black-flag/commit/98815d1ef218af56e07493a921c66294f91101cf +[13]: https://github.com/Xunnamius/black-flag/compare/v1.2.3...v1.2.4 +[14]: https://github.com/Xunnamius/black-flag/commit/d6618d370bd9a7264dad240856dc989a61071986 +[15]: https://github.com/Xunnamius/black-flag/compare/v1.2.2...v1.2.3 +[16]: https://github.com/Xunnamius/black-flag/commit/4b8c9759bc09f9b07593ce89446d4ec0e614db71 +[17]: https://github.com/Xunnamius/black-flag/commit/4babf12308b7aab0ed319077701eb6f3a1fdf1d3 +[18]: https://github.com/Xunnamius/black-flag/compare/v1.2.1...v1.2.2 +[19]: https://github.com/Xunnamius/black-flag/commit/be2960a507c43b3db598157de4dcafe22ee8906e +[20]: https://github.com/Xunnamius/black-flag/commit/75d5c66bcce8f0c2c139962f7ddd28aa0c9499d7 +[21]: https://github.com/Xunnamius/black-flag/commit/8bb025436d219c024a5d4a4a0ac59999440b7c13 +[22]: https://github.com/Xunnamius/black-flag/compare/v1.2.0...v1.2.1 +[23]: https://github.com/Xunnamius/black-flag/commit/2369534f63aa3858714bb81505d3fff4ed77c6b1 +[24]: https://github.com/Xunnamius/black-flag/compare/v1.1.4...v1.2.0 +[25]: https://github.com/Xunnamius/black-flag/commit/b5a1e58add31902fd9ec80b93dd37305b8fd0684 +[26]: https://github.com/Xunnamius/black-flag/compare/v1.1.3...v1.1.4 +[27]: https://github.com/Xunnamius/black-flag/commit/f66599bfdbb70ada6ec662e0d220a0a2e7047824 +[28]: https://github.com/Xunnamius/black-flag/compare/v1.1.2...v1.1.3 +[29]: https://github.com/Xunnamius/black-flag/commit/bad391da3019a5743a76ca2e510903f34c84ca53 +[30]: https://github.com/Xunnamius/black-flag/commit/2f205c1e8c94d3e6683816e5bbc3ae152e3c83e8 +[31]: https://github.com/Xunnamius/black-flag/compare/v1.1.1...v1.1.2 +[32]: https://github.com/Xunnamius/black-flag/commit/f79c11476de47bee3fa01e139269393b604b4271 +[33]: https://github.com/Xunnamius/black-flag/compare/v1.1.0...v1.1.1 +[34]: https://github.com/Xunnamius/black-flag/commit/b6178c9670a95084bca34424e71498f2d29ac48c +[35]: https://github.com/Xunnamius/black-flag/compare/v1.0.0...v1.1.0 +[36]: https://github.com/Xunnamius/black-flag/commit/0e5067e2b0913a19bdc6975b50b272bb5872ba98 +[37]: https://github.com/Xunnamius/black-flag/commit/4f159dc4b84223dd6b07456c0b50da16d2816bea +[38]: https://github.com/Xunnamius/black-flag/commit/5470091e385ca344e12a280ff95be793742874b8 +[39]: https://github.com/Xunnamius/black-flag/compare/d3a499e7aeddf23d392479b2cf99cc98bce8226f...v1.0.0 +[40]: https://github.com/Xunnamius/black-flag/commit/78bf8ffb0a6931fb3b131c42ce4b84146bfec842 +[41]: https://github.com/black- +[42]: https://github.com/Xunnamius/black-flag/commit/292ead5aa3f18c556d72d714830dcf07b9253e6d +[43]: https://github.com/Xunnamius/black-flag/commit/036e3506edc863da86372163c91dd650d6ac1e87 +[44]: https://github.com/Xunnamius/black-flag/commit/c7f4aef48366dc13685fb9805086be52d3561eff +[45]: https://github.com/Xunnamius/black-flag/commit/0548d34f559c3b8ba6d9514f1586aeeb3b382f72 +[46]: https://github.com/Xunnamius/black-flag/commit/5cf7a6c79bba3125ce47838e5cfd24a1a08bbd17 +[47]: https://github.com/Xunnamius/black-flag/commit/fbe3a699a9063ed7da08311a22fe798672583b0f +[48]: https://github.com/Xunnamius/black-flag/commit/d3a499e7aeddf23d392479b2cf99cc98bce8226f diff --git a/docs/index/classes/CliError.md b/docs/index/classes/CliError.md index 5c17b16..996d7aa 100644 --- a/docs/index/classes/CliError.md +++ b/docs/index/classes/CliError.md @@ -28,14 +28,14 @@ can be used as a simple wrapper around other errors. ### new CliError() -> **new CliError**(`cause`, `options`?): [`CliError`](CliError.md) +> **new CliError**(`reason`, `options`?): [`CliError`](CliError.md) Represents a CLI-specific error, optionally with suggested exit code and other context. #### Parameters -• **cause**: `string` \| `Error` +• **reason**: `string` \| `Error` • **options?**: [`CliErrorOptions`](../../util/type-aliases/CliErrorOptions.md) @@ -49,18 +49,18 @@ other context. #### Defined in -[src/error.ts:101](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L101) +[src/error.ts:140](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L140) ### new CliError() -> **new CliError**(`cause`, `options`, `message`, `superOptions`): [`CliError`](CliError.md) +> **new CliError**(`reason`, `options`, `message`, `superOptions`): [`CliError`](CliError.md) This constructor syntax is used by subclasses when calling this constructor via `super`. #### Parameters -• **cause**: `string` \| `Error` +• **reason**: `string` \| `Error` • **options**: [`CliErrorOptions`](../../util/type-aliases/CliErrorOptions.md) @@ -78,7 +78,7 @@ via `super`. #### Defined in -[src/error.ts:106](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L106) +[src/error.ts:145](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L145) ## Properties @@ -88,7 +88,7 @@ via `super`. #### Defined in -[src/error.ts:96](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L96) +[src/error.ts:135](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L135) *** @@ -96,6 +96,10 @@ via `super`. > `optional` **cause**: `unknown` +#### Implementation of + +`NonNullable.cause` + #### Inherited from `AppError.cause` @@ -106,6 +110,43 @@ node\_modules/typescript/lib/lib.es2022.error.d.ts:24 *** +### dangerouslyFatal + +> **dangerouslyFatal**: `boolean` = `false` + +This option is similar in intent to yargs's `exitProcess()` function, +except applied more granularly. + +Normally, [runProgram](../functions/runProgram.md) never throws and never calls `process.exit`, +instead setting `process.exitCode` when an error occurs. + +However, it is at times prudent to kill Node.js as soon as possible after +error handling happens. For example: the execa library struggles to abort +concurrent subcommand promises in a timely manner, and doesn't prevent them +from dumping output to stdout even after Black Flag has finished executing. +To work around this, we can set `dangerouslyFatal` to `true`, forcing Black +Flag to call `process.exit` immediately after error handling completes. + +More generally, enabling `dangerouslyFatal` is a quick way to get rid of +strange behavior that can happen when your microtask queue isn't empty +(i.e. the event loop still has work to do) by the time Black Flag's error +handling code completes. **However, doing this without proper consideration +of _why_ you still have hanging promises and/or other microtasks adding +work to the event loop can lead to faulty/glitchy/flaky software and +heisenbugs.** You will also have to specially handle `process.exit` when +running unit/integration tests and executing command handlers within other +command handlers. Tread carefully. + +#### Implementation of + +`NonNullable.dangerouslyFatal` + +#### Defined in + +[src/error.ts:133](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L133) + +*** + ### message > **message**: `string` @@ -154,7 +195,7 @@ false #### Defined in -[src/error.ts:94](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L94) +[src/error.ts:132](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L132) *** @@ -191,7 +232,7 @@ FrameworkExitCode.DefaultError #### Defined in -[src/error.ts:93](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L93) +[src/error.ts:131](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L131) *** @@ -201,10 +242,6 @@ FrameworkExitCode.DefaultError Optional override for formatting stack traces -#### See - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Parameters • **err**: `Error` @@ -215,6 +252,10 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces `any` +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + #### Inherited from `AppError.prepareStackTrace` diff --git a/docs/index/classes/GracefulEarlyExitError.md b/docs/index/classes/GracefulEarlyExitError.md index 463a6ca..eb115c8 100644 --- a/docs/index/classes/GracefulEarlyExitError.md +++ b/docs/index/classes/GracefulEarlyExitError.md @@ -34,7 +34,7 @@ termination of the application but with an exit code indicating success #### Defined in -[src/error.ts:172](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L172) +[src/error.ts:219](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L219) ## Properties @@ -48,7 +48,7 @@ termination of the application but with an exit code indicating success #### Defined in -[src/error.ts:166](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L166) +[src/error.ts:213](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L213) *** @@ -66,6 +66,43 @@ node\_modules/typescript/lib/lib.es2022.error.d.ts:24 *** +### dangerouslyFatal + +> **dangerouslyFatal**: `boolean` = `false` + +This option is similar in intent to yargs's `exitProcess()` function, +except applied more granularly. + +Normally, [runProgram](../functions/runProgram.md) never throws and never calls `process.exit`, +instead setting `process.exitCode` when an error occurs. + +However, it is at times prudent to kill Node.js as soon as possible after +error handling happens. For example: the execa library struggles to abort +concurrent subcommand promises in a timely manner, and doesn't prevent them +from dumping output to stdout even after Black Flag has finished executing. +To work around this, we can set `dangerouslyFatal` to `true`, forcing Black +Flag to call `process.exit` immediately after error handling completes. + +More generally, enabling `dangerouslyFatal` is a quick way to get rid of +strange behavior that can happen when your microtask queue isn't empty +(i.e. the event loop still has work to do) by the time Black Flag's error +handling code completes. **However, doing this without proper consideration +of _why_ you still have hanging promises and/or other microtasks adding +work to the event loop can lead to faulty/glitchy/flaky software and +heisenbugs.** You will also have to specially handle `process.exit` when +running unit/integration tests and executing command handlers within other +command handlers. Tread carefully. + +#### Inherited from + +[`CliError`](CliError.md).[`dangerouslyFatal`](CliError.md#dangerouslyfatal) + +#### Defined in + +[src/error.ts:133](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L133) + +*** + ### message > **message**: `string` @@ -114,7 +151,7 @@ false #### Defined in -[src/error.ts:94](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L94) +[src/error.ts:132](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L132) *** @@ -151,7 +188,7 @@ FrameworkExitCode.DefaultError #### Defined in -[src/error.ts:93](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L93) +[src/error.ts:131](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L131) *** @@ -161,10 +198,6 @@ FrameworkExitCode.DefaultError Optional override for formatting stack traces -#### See - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Parameters • **err**: `Error` @@ -175,6 +208,10 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces `any` +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + #### Inherited from [`CliError`](CliError.md).[`prepareStackTrace`](CliError.md#preparestacktrace) diff --git a/docs/index/enumerations/FrameworkExitCode.md b/docs/index/enumerations/FrameworkExitCode.md index a9dceed..1a4f8ac 100644 --- a/docs/index/enumerations/FrameworkExitCode.md +++ b/docs/index/enumerations/FrameworkExitCode.md @@ -22,7 +22,7 @@ In most cases, this exit code is indicative of improper use of Black Flag. #### Defined in -[src/constant.ts:60](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/constant.ts#L60) +[src/constant.ts:60](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/constant.ts#L60) *** @@ -34,7 +34,7 @@ Hard-coded default fallback exit code when fatal errors occur. #### Defined in -[src/constant.ts:48](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/constant.ts#L48) +[src/constant.ts:48](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/constant.ts#L48) *** @@ -46,7 +46,7 @@ The exit code used when executing an unimplemented child command. #### Defined in -[src/constant.ts:52](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/constant.ts#L52) +[src/constant.ts:52](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/constant.ts#L52) *** @@ -58,4 +58,4 @@ The exit code used when execution succeeds and exits gracefully. #### Defined in -[src/constant.ts:44](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/constant.ts#L44) +[src/constant.ts:44](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/constant.ts#L44) diff --git a/docs/index/functions/configureProgram.md b/docs/index/functions/configureProgram.md index 1cec9dd..a2b37c8 100644 --- a/docs/index/functions/configureProgram.md +++ b/docs/index/functions/configureProgram.md @@ -39,4 +39,4 @@ occur if no commands are loadable from the given `commandModulePath`. ## Defined in -[src/index.ts:59](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/index.ts#L59) +[src/index.ts:59](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/index.ts#L59) diff --git a/docs/index/functions/isCliError.md b/docs/index/functions/isCliError.md index 2956d44..37bbdc7 100644 --- a/docs/index/functions/isCliError.md +++ b/docs/index/functions/isCliError.md @@ -20,4 +20,4 @@ Type guard for [CliError](../classes/CliError.md). ## Defined in -[src/error.ts:25](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L25) +[src/error.ts:29](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L29) diff --git a/docs/index/functions/isGracefulEarlyExitError.md b/docs/index/functions/isGracefulEarlyExitError.md index 2cc7802..be285e1 100644 --- a/docs/index/functions/isGracefulEarlyExitError.md +++ b/docs/index/functions/isGracefulEarlyExitError.md @@ -20,4 +20,4 @@ Type guard for [GracefulEarlyExitError](../classes/GracefulEarlyExitError.md). ## Defined in -[src/error.ts:38](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L38) +[src/error.ts:42](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L42) diff --git a/docs/index/functions/runProgram.md b/docs/index/functions/runProgram.md index 6a94584..9a49e4c 100644 --- a/docs/index/functions/runProgram.md +++ b/docs/index/functions/runProgram.md @@ -38,7 +38,7 @@ if any other error occurs, or `Arguments` otherwise. ### Defined in -[src/util.ts:172](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/util.ts#L172) +[src/util.ts:173](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/util.ts#L173) ## runProgram(args) @@ -72,7 +72,7 @@ if any other error occurs, or `Arguments` otherwise. ### Defined in -[src/util.ts:193](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/util.ts#L193) +[src/util.ts:194](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/util.ts#L194) ## runProgram(args) @@ -107,7 +107,7 @@ if any other error occurs, or `Arguments` otherwise. ### Defined in -[src/util.ts:214](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/util.ts#L214) +[src/util.ts:215](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/util.ts#L215) ## runProgram(args) @@ -142,7 +142,7 @@ if any other error occurs, or `Arguments` otherwise. ### Defined in -[src/util.ts:238](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/util.ts#L238) +[src/util.ts:239](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/util.ts#L239) ## runProgram(args) @@ -177,7 +177,7 @@ if any other error occurs, or `Arguments` otherwise. ### Defined in -[src/util.ts:260](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/util.ts#L260) +[src/util.ts:261](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/util.ts#L261) ## runProgram(args) @@ -213,4 +213,4 @@ if any other error occurs, or `Arguments` otherwise. ### Defined in -[src/util.ts:286](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/util.ts#L286) +[src/util.ts:287](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/util.ts#L287) diff --git a/docs/index/type-aliases/Arguments.md b/docs/index/type-aliases/Arguments.md index 5b88025..36a8514 100644 --- a/docs/index/type-aliases/Arguments.md +++ b/docs/index/type-aliases/Arguments.md @@ -20,4 +20,4 @@ arguments/properties specific to Black Flag, and an indexer falling back to ## Defined in -[types/program.ts:18](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/program.ts#L18) +[types/program.ts:18](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/program.ts#L18) diff --git a/docs/index/type-aliases/ChildConfiguration.md b/docs/index/type-aliases/ChildConfiguration.md index 28aec68..e867933 100644 --- a/docs/index/type-aliases/ChildConfiguration.md +++ b/docs/index/type-aliases/ChildConfiguration.md @@ -20,4 +20,4 @@ files that will eventually get imported via auto-discovery. ## Defined in -[types/module.ts:158](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/module.ts#L158) +[types/module.ts:158](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/module.ts#L158) diff --git a/docs/index/type-aliases/Configuration.md b/docs/index/type-aliases/Configuration.md index e971766..55470b6 100644 --- a/docs/index/type-aliases/Configuration.md +++ b/docs/index/type-aliases/Configuration.md @@ -123,12 +123,6 @@ of parsed arguments. If `undefined`, a `CommandNotImplementedError` will be thrown. -#### Default - -```ts -undefined -``` - #### Parameters • **argv**: [`Arguments`](Arguments.md)\<`CustomCliArguments`, `CustomExecutionContext`\> @@ -137,6 +131,12 @@ undefined `Promisable`\<`void`\> +#### Default + +```ts +undefined +``` + ### name > **name**: `string` @@ -171,4 +171,4 @@ order: ## Defined in -[types/module.ts:11](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/module.ts#L11) +[types/module.ts:11](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/module.ts#L11) diff --git a/docs/index/type-aliases/ConfigurationHooks.md b/docs/index/type-aliases/ConfigurationHooks.md index e866c78..b4251a5 100644 --- a/docs/index/type-aliases/ConfigurationHooks.md +++ b/docs/index/type-aliases/ConfigurationHooks.md @@ -85,4 +85,4 @@ be thrown as-is and will NOT trigger ## Defined in -[types/configure.ts:96](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/configure.ts#L96) +[types/configure.ts:96](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/configure.ts#L96) diff --git a/docs/index/type-aliases/ConfigureArguments.md b/docs/index/type-aliases/ConfigureArguments.md index 4a94421..222c7f9 100644 --- a/docs/index/type-aliases/ConfigureArguments.md +++ b/docs/index/type-aliases/ConfigureArguments.md @@ -30,4 +30,4 @@ implemented. ## Defined in -[types/configure.ts:48](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/configure.ts#L48) +[types/configure.ts:48](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/configure.ts#L48) diff --git a/docs/index/type-aliases/ConfigureErrorHandlingEpilogue.md b/docs/index/type-aliases/ConfigureErrorHandlingEpilogue.md index 45e4eea..e762836 100644 --- a/docs/index/type-aliases/ConfigureErrorHandlingEpilogue.md +++ b/docs/index/type-aliases/ConfigureErrorHandlingEpilogue.md @@ -44,4 +44,4 @@ an argument parsing/validation error. ## Defined in -[types/configure.ts:81](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/configure.ts#L81) +[types/configure.ts:81](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/configure.ts#L81) diff --git a/docs/index/type-aliases/ConfigureExecutionContext.md b/docs/index/type-aliases/ConfigureExecutionContext.md index e088edd..1bb579d 100644 --- a/docs/index/type-aliases/ConfigureExecutionContext.md +++ b/docs/index/type-aliases/ConfigureExecutionContext.md @@ -29,4 +29,4 @@ thrown as-is and will NOT trigger [ConfigureErrorHandlingEpilogue](ConfigureErro ## Defined in -[types/configure.ts:17](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/configure.ts#L17) +[types/configure.ts:17](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/configure.ts#L17) diff --git a/docs/index/type-aliases/ConfigureExecutionEpilogue.md b/docs/index/type-aliases/ConfigureExecutionEpilogue.md index 3ab4629..6db3000 100644 --- a/docs/index/type-aliases/ConfigureExecutionEpilogue.md +++ b/docs/index/type-aliases/ConfigureExecutionEpilogue.md @@ -32,4 +32,4 @@ This function is the complement of [ConfigureExecutionPrologue](ConfigureExecuti ## Defined in -[types/configure.ts:64](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/configure.ts#L64) +[types/configure.ts:64](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/configure.ts#L64) diff --git a/docs/index/type-aliases/ConfigureExecutionPrologue.md b/docs/index/type-aliases/ConfigureExecutionPrologue.md index a16e082..949aba6 100644 --- a/docs/index/type-aliases/ConfigureExecutionPrologue.md +++ b/docs/index/type-aliases/ConfigureExecutionPrologue.md @@ -39,4 +39,4 @@ thrown as-is and will NOT trigger [ConfigureErrorHandlingEpilogue](ConfigureErro ## Defined in -[types/configure.ts:37](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/configure.ts#L37) +[types/configure.ts:37](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/configure.ts#L37) diff --git a/docs/index/type-aliases/ImportedConfigurationModule.md b/docs/index/type-aliases/ImportedConfigurationModule.md index be475a6..0c523bd 100644 --- a/docs/index/type-aliases/ImportedConfigurationModule.md +++ b/docs/index/type-aliases/ImportedConfigurationModule.md @@ -8,9 +8,9 @@ > **ImportedConfigurationModule**\<`CustomCliArguments`, `CustomExecutionContext`\>: (`context`) => `Promisable`\<`Partial`\<[`RootConfiguration`](RootConfiguration.md)\<`CustomCliArguments`, `CustomExecutionContext`\> \| [`ParentConfiguration`](ParentConfiguration.md)\<`CustomCliArguments`, `CustomExecutionContext`\> \| [`ChildConfiguration`](ChildConfiguration.md)\<`CustomCliArguments`, `CustomExecutionContext`\>\>\> \| `Partial`\<[`RootConfiguration`](RootConfiguration.md)\<`CustomCliArguments`, `CustomExecutionContext`\> \| [`ParentConfiguration`](ParentConfiguration.md)\<`CustomCliArguments`, `CustomExecutionContext`\> \| [`ChildConfiguration`](ChildConfiguration.md)\<`CustomCliArguments`, `CustomExecutionContext`\>\> & `object` -Represents a Configuration object imported from a CJS/ESM module external to -the CLI framework (e.g. importing an auto-discovered config module from a -file). +Represents a [Configuration](Configuration.md) object imported from a CJS/ESM module +external to the CLI framework (e.g. importing an auto-discovered config +module from a file). ## Type declaration @@ -26,4 +26,4 @@ file). ## Defined in -[types/module.ts:168](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/module.ts#L168) +[types/module.ts:168](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/module.ts#L168) diff --git a/docs/index/type-aliases/NullArguments.md b/docs/index/type-aliases/NullArguments.md index f5581ca..afcd5f8 100644 --- a/docs/index/type-aliases/NullArguments.md +++ b/docs/index/type-aliases/NullArguments.md @@ -30,4 +30,4 @@ yargs from returning a real `Arguments` parse result. ## Defined in -[types/program.ts:30](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/program.ts#L30) +[types/program.ts:30](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/program.ts#L30) diff --git a/docs/index/type-aliases/ParentConfiguration.md b/docs/index/type-aliases/ParentConfiguration.md index 5b5121e..6cf9979 100644 --- a/docs/index/type-aliases/ParentConfiguration.md +++ b/docs/index/type-aliases/ParentConfiguration.md @@ -20,4 +20,4 @@ module files that will eventually get imported via auto-discovery. ## Defined in -[types/module.ts:148](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/module.ts#L148) +[types/module.ts:148](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/module.ts#L148) diff --git a/docs/index/type-aliases/RootConfiguration.md b/docs/index/type-aliases/RootConfiguration.md index 9858afa..3a8b51e 100644 --- a/docs/index/type-aliases/RootConfiguration.md +++ b/docs/index/type-aliases/RootConfiguration.md @@ -20,4 +20,4 @@ files that will eventually get imported via auto-discovery. ## Defined in -[types/module.ts:138](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/module.ts#L138) +[types/module.ts:138](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/module.ts#L138) diff --git a/docs/index/variables/$executionContext.md b/docs/index/variables/$executionContext.md index 2bc77b4..b467a9f 100644 --- a/docs/index/variables/$executionContext.md +++ b/docs/index/variables/$executionContext.md @@ -13,4 +13,4 @@ each `Arguments` instance. ## Defined in -[src/constant.ts:5](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/constant.ts#L5) +[src/constant.ts:5](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/constant.ts#L5) diff --git a/docs/util/classes/AssertionFailedError.md b/docs/util/classes/AssertionFailedError.md index 6c0503d..1ab827c 100644 --- a/docs/util/classes/AssertionFailedError.md +++ b/docs/util/classes/AssertionFailedError.md @@ -34,7 +34,7 @@ Represents a failed sanity check. #### Defined in -[src/error.ts:188](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L188) +[src/error.ts:239](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L239) ## Properties @@ -48,7 +48,7 @@ Represents a failed sanity check. #### Defined in -[src/error.ts:184](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L184) +[src/error.ts:235](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L235) *** @@ -66,6 +66,43 @@ node\_modules/typescript/lib/lib.es2022.error.d.ts:24 *** +### dangerouslyFatal + +> **dangerouslyFatal**: `boolean` = `false` + +This option is similar in intent to yargs's `exitProcess()` function, +except applied more granularly. + +Normally, [runProgram](../../index/functions/runProgram.md) never throws and never calls `process.exit`, +instead setting `process.exitCode` when an error occurs. + +However, it is at times prudent to kill Node.js as soon as possible after +error handling happens. For example: the execa library struggles to abort +concurrent subcommand promises in a timely manner, and doesn't prevent them +from dumping output to stdout even after Black Flag has finished executing. +To work around this, we can set `dangerouslyFatal` to `true`, forcing Black +Flag to call `process.exit` immediately after error handling completes. + +More generally, enabling `dangerouslyFatal` is a quick way to get rid of +strange behavior that can happen when your microtask queue isn't empty +(i.e. the event loop still has work to do) by the time Black Flag's error +handling code completes. **However, doing this without proper consideration +of _why_ you still have hanging promises and/or other microtasks adding +work to the event loop can lead to faulty/glitchy/flaky software and +heisenbugs.** You will also have to specially handle `process.exit` when +running unit/integration tests and executing command handlers within other +command handlers. Tread carefully. + +#### Inherited from + +[`CliError`](../../index/classes/CliError.md).[`dangerouslyFatal`](../../index/classes/CliError.md#dangerouslyfatal) + +#### Defined in + +[src/error.ts:133](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L133) + +*** + ### message > **message**: `string` @@ -114,7 +151,7 @@ false #### Defined in -[src/error.ts:94](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L94) +[src/error.ts:132](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L132) *** @@ -151,7 +188,7 @@ FrameworkExitCode.DefaultError #### Defined in -[src/error.ts:93](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L93) +[src/error.ts:131](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L131) *** @@ -161,10 +198,6 @@ FrameworkExitCode.DefaultError Optional override for formatting stack traces -#### See - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Parameters • **err**: `Error` @@ -175,6 +208,10 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces `any` +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + #### Inherited from [`CliError`](../../index/classes/CliError.md).[`prepareStackTrace`](../../index/classes/CliError.md#preparestacktrace) diff --git a/docs/util/classes/CommandNotImplementedError.md b/docs/util/classes/CommandNotImplementedError.md index cc7c920..a72bbfe 100644 --- a/docs/util/classes/CommandNotImplementedError.md +++ b/docs/util/classes/CommandNotImplementedError.md @@ -31,7 +31,7 @@ implemented. #### Defined in -[src/error.ts:150](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L150) +[src/error.ts:197](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L197) ## Properties @@ -45,7 +45,7 @@ implemented. #### Defined in -[src/error.ts:145](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L145) +[src/error.ts:192](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L192) *** @@ -63,6 +63,43 @@ node\_modules/typescript/lib/lib.es2022.error.d.ts:24 *** +### dangerouslyFatal + +> **dangerouslyFatal**: `boolean` = `false` + +This option is similar in intent to yargs's `exitProcess()` function, +except applied more granularly. + +Normally, [runProgram](../../index/functions/runProgram.md) never throws and never calls `process.exit`, +instead setting `process.exitCode` when an error occurs. + +However, it is at times prudent to kill Node.js as soon as possible after +error handling happens. For example: the execa library struggles to abort +concurrent subcommand promises in a timely manner, and doesn't prevent them +from dumping output to stdout even after Black Flag has finished executing. +To work around this, we can set `dangerouslyFatal` to `true`, forcing Black +Flag to call `process.exit` immediately after error handling completes. + +More generally, enabling `dangerouslyFatal` is a quick way to get rid of +strange behavior that can happen when your microtask queue isn't empty +(i.e. the event loop still has work to do) by the time Black Flag's error +handling code completes. **However, doing this without proper consideration +of _why_ you still have hanging promises and/or other microtasks adding +work to the event loop can lead to faulty/glitchy/flaky software and +heisenbugs.** You will also have to specially handle `process.exit` when +running unit/integration tests and executing command handlers within other +command handlers. Tread carefully. + +#### Inherited from + +[`CliError`](../../index/classes/CliError.md).[`dangerouslyFatal`](../../index/classes/CliError.md#dangerouslyfatal) + +#### Defined in + +[src/error.ts:133](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L133) + +*** + ### message > **message**: `string` @@ -111,7 +148,7 @@ false #### Defined in -[src/error.ts:94](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L94) +[src/error.ts:132](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L132) *** @@ -148,7 +185,7 @@ FrameworkExitCode.DefaultError #### Defined in -[src/error.ts:93](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L93) +[src/error.ts:131](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L131) *** @@ -158,10 +195,6 @@ FrameworkExitCode.DefaultError Optional override for formatting stack traces -#### See - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Parameters • **err**: `Error` @@ -172,6 +205,10 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces `any` +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + #### Inherited from [`CliError`](../../index/classes/CliError.md).[`prepareStackTrace`](../../index/classes/CliError.md#preparestacktrace) diff --git a/docs/util/functions/hideBin.md b/docs/util/functions/hideBin.md index 1f9b349..76eaedd 100644 --- a/docs/util/functions/hideBin.md +++ b/docs/util/functions/hideBin.md @@ -16,6 +16,10 @@ `string`[] +## See + +https://yargs.js.org/docs/#api-reference + ## Defined in -[src/exports/util.ts:48](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/exports/util.ts#L48) +[src/exports/util.ts:48](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/exports/util.ts#L48) diff --git a/docs/util/functions/isArguments.md b/docs/util/functions/isArguments.md index a03cf9e..6948c73 100644 --- a/docs/util/functions/isArguments.md +++ b/docs/util/functions/isArguments.md @@ -20,4 +20,4 @@ Type-guard for [Arguments](../../index/type-aliases/Arguments.md). ## Defined in -[src/util.ts:458](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/util.ts#L458) +[src/util.ts:465](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/util.ts#L465) diff --git a/docs/util/functions/isAssertionSystemError.md b/docs/util/functions/isAssertionSystemError.md index 129cdf2..0ac8a06 100644 --- a/docs/util/functions/isAssertionSystemError.md +++ b/docs/util/functions/isAssertionSystemError.md @@ -20,4 +20,4 @@ Type-guard for Node's "ERR_ASSERTION" so-called `SystemError`. ## Defined in -[src/util.ts:472](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/util.ts#L472) +[src/util.ts:479](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/util.ts#L479) diff --git a/docs/util/functions/isCommandNotImplementedError.md b/docs/util/functions/isCommandNotImplementedError.md index 9742834..e569533 100644 --- a/docs/util/functions/isCommandNotImplementedError.md +++ b/docs/util/functions/isCommandNotImplementedError.md @@ -20,4 +20,4 @@ Type guard for [CommandNotImplementedError](../classes/CommandNotImplementedErro ## Defined in -[src/error.ts:53](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L53) +[src/error.ts:57](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L57) diff --git a/docs/util/functions/isNullArguments.md b/docs/util/functions/isNullArguments.md index 60ecc2e..b98d73c 100644 --- a/docs/util/functions/isNullArguments.md +++ b/docs/util/functions/isNullArguments.md @@ -20,4 +20,4 @@ Type-guard for [NullArguments](../../index/type-aliases/NullArguments.md). ## Defined in -[src/util.ts:447](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/util.ts#L447) +[src/util.ts:454](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/util.ts#L454) diff --git a/docs/util/functions/isPreExecutionContext.md b/docs/util/functions/isPreExecutionContext.md index 9f407a2..913f530 100644 --- a/docs/util/functions/isPreExecutionContext.md +++ b/docs/util/functions/isPreExecutionContext.md @@ -20,4 +20,4 @@ Type-guard for [PreExecutionContext](../type-aliases/PreExecutionContext.md). ## Defined in -[src/util.ts:434](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/util.ts#L434) +[src/util.ts:441](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/util.ts#L441) diff --git a/docs/util/functions/makeRunner.md b/docs/util/functions/makeRunner.md index d45820e..443da70 100644 --- a/docs/util/functions/makeRunner.md +++ b/docs/util/functions/makeRunner.md @@ -49,4 +49,4 @@ details. ## Defined in -[src/util.ts:50](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/util.ts#L50) +[src/util.ts:51](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/util.ts#L51) diff --git a/docs/util/type-aliases/CliErrorOptions.md b/docs/util/type-aliases/CliErrorOptions.md index a845dcb..e207ff5 100644 --- a/docs/util/type-aliases/CliErrorOptions.md +++ b/docs/util/type-aliases/CliErrorOptions.md @@ -12,6 +12,44 @@ Options available when constructing a new `CliError` object. ## Type declaration +### cause? + +> `optional` **cause**: `ErrorOptions`\[`"cause"`\] + +By default, if an Error object is passed to `CliError`, that +`Error` instance will be passed through as `CliError.cause` and that +instance's `Error.message` will be passed through as `CliError.message`. + +Use this option to override this default behavior and instead set +`CliError.cause` manually. + +### dangerouslyFatal? + +> `optional` **dangerouslyFatal**: `boolean` + +This option is similar in intent to yargs's `exitProcess()` function, +except applied more granularly. + +Normally, [runProgram](../../index/functions/runProgram.md) never throws and never calls `process.exit`, +instead setting `process.exitCode` when an error occurs. + +However, it is at times prudent to kill Node.js as soon as possible after +error handling happens. For example: the execa library struggles to abort +concurrent subcommand promises in a timely manner, and doesn't prevent them +from dumping output to stdout even after Black Flag has finished executing. +To work around this, we can set `dangerouslyFatal` to `true`, forcing Black +Flag to call `process.exit` immediately after error handling completes. + +More generally, enabling `dangerouslyFatal` is a quick way to get rid of +strange behavior that can happen when your microtask queue isn't empty +(i.e. the event loop still has work to do) by the time Black Flag's error +handling code completes. **However, doing this without proper consideration +of _why_ you still have hanging promises and/or other microtasks adding +work to the event loop can lead to faulty/glitchy/flaky software and +heisenbugs.** You will also have to specially handle `process.exit` when +running unit/integration tests and executing command handlers within other +command handlers. Tread carefully. + ### showHelp? > `optional` **showHelp**: `boolean` @@ -41,4 +79,4 @@ FrameworkExitCode.DefaultError ## Defined in -[src/error.ts:67](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L67) +[src/error.ts:71](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L71) diff --git a/docs/util/type-aliases/DescriptorToProgram.md b/docs/util/type-aliases/DescriptorToProgram.md index de7227a..dbd8271 100644 --- a/docs/util/type-aliases/DescriptorToProgram.md +++ b/docs/util/type-aliases/DescriptorToProgram.md @@ -20,4 +20,4 @@ Accepts a `Descriptor` type and maps it to one of the `XProgram` types. ## Defined in -[types/program.ts:159](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/program.ts#L159) +[types/program.ts:159](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/program.ts#L159) diff --git a/docs/util/type-aliases/EffectorProgram.md b/docs/util/type-aliases/EffectorProgram.md index c0fc5a9..50bfe43 100644 --- a/docs/util/type-aliases/EffectorProgram.md +++ b/docs/util/type-aliases/EffectorProgram.md @@ -18,4 +18,4 @@ Represents an "effector" [Program](Program.md) instance. ## Defined in -[types/program.ts:119](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/program.ts#L119) +[types/program.ts:119](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/program.ts#L119) diff --git a/docs/util/type-aliases/ExecutionContext.md b/docs/util/type-aliases/ExecutionContext.md index 36061d4..3fa26c5 100644 --- a/docs/util/type-aliases/ExecutionContext.md +++ b/docs/util/type-aliases/ExecutionContext.md @@ -272,4 +272,4 @@ true ## Defined in -[types/program.ts:328](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/program.ts#L328) +[types/program.ts:328](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/program.ts#L328) diff --git a/docs/util/type-aliases/Executor.md b/docs/util/type-aliases/Executor.md index a674031..05b78bb 100644 --- a/docs/util/type-aliases/Executor.md +++ b/docs/util/type-aliases/Executor.md @@ -34,4 +34,4 @@ instead. ## Defined in -[types/program.ts:280](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/program.ts#L280) +[types/program.ts:280](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/program.ts#L280) diff --git a/docs/util/type-aliases/FrameworkArguments.md b/docs/util/type-aliases/FrameworkArguments.md index f391999..d9a6139 100644 --- a/docs/util/type-aliases/FrameworkArguments.md +++ b/docs/util/type-aliases/FrameworkArguments.md @@ -28,4 +28,4 @@ you. ## Defined in -[types/program.ts:257](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/program.ts#L257) +[types/program.ts:257](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/program.ts#L257) diff --git a/docs/util/type-aliases/HelperProgram.md b/docs/util/type-aliases/HelperProgram.md index 1d7b62d..57fd7f2 100644 --- a/docs/util/type-aliases/HelperProgram.md +++ b/docs/util/type-aliases/HelperProgram.md @@ -18,4 +18,4 @@ Represents an "helper" [Program](Program.md) instance. ## Defined in -[types/program.ts:130](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/program.ts#L130) +[types/program.ts:130](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/program.ts#L130) diff --git a/docs/util/type-aliases/PreExecutionContext.md b/docs/util/type-aliases/PreExecutionContext.md index 231f8fd..a6e4fd4 100644 --- a/docs/util/type-aliases/PreExecutionContext.md +++ b/docs/util/type-aliases/PreExecutionContext.md @@ -54,4 +54,4 @@ instances belonging to the root command. ## Defined in -[types/program.ts:291](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/program.ts#L291) +[types/program.ts:291](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/program.ts#L291) diff --git a/docs/util/type-aliases/Program.md b/docs/util/type-aliases/Program.md index 39d0d0c..f614c7f 100644 --- a/docs/util/type-aliases/Program.md +++ b/docs/util/type-aliases/Program.md @@ -22,10 +22,6 @@ by yargs but with several differences and should be preferred. **`Internal`** -#### See - -_Program.command - #### Parameters • **command**: `string`[] @@ -44,6 +40,10 @@ _Program.command [`Program`](Program.md)\<`CustomCliArguments`, `CustomExecutionContext`\> +#### See + +_Program.command + ### command\_deferred > **command\_deferred**: [`Program`](Program.md)\<`CustomCliArguments`, `CustomExecutionContext`\>\[`"command"`\] @@ -63,14 +63,14 @@ _Program.command **`Internal`** -#### See - -Program.command_deferred - #### Returns `void` +#### See + +Program.command_deferred + ### showHelpOnFail() > **showHelpOnFail**: (`enabled`) => [`Program`](Program.md)\<`CustomCliArguments`, `CustomExecutionContext`\> @@ -83,10 +83,6 @@ message, use a configuration hook or `yargs::epilogue`. Invoking this method will affect all programs in your command hierarchy, not just the program on which it was invoked. -#### See - -_Program.showHelpOnFail - #### Parameters • **enabled**: `boolean` @@ -95,6 +91,10 @@ _Program.showHelpOnFail [`Program`](Program.md)\<`CustomCliArguments`, `CustomExecutionContext`\> +#### See + +_Program.showHelpOnFail + ## Type Parameters • **CustomCliArguments** *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\> @@ -103,4 +103,4 @@ _Program.showHelpOnFail ## Defined in -[types/program.ts:44](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/program.ts#L44) +[types/program.ts:44](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/program.ts#L44) diff --git a/docs/util/type-aliases/ProgramDescriptor.md b/docs/util/type-aliases/ProgramDescriptor.md index acf3023..0f813be 100644 --- a/docs/util/type-aliases/ProgramDescriptor.md +++ b/docs/util/type-aliases/ProgramDescriptor.md @@ -12,4 +12,4 @@ Represents the three program types that comprise any Black Flag command. ## Defined in -[types/program.ts:154](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/program.ts#L154) +[types/program.ts:154](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/program.ts#L154) diff --git a/docs/util/type-aliases/ProgramMetadata.md b/docs/util/type-aliases/ProgramMetadata.md index ecd0aec..4e5e3d4 100644 --- a/docs/util/type-aliases/ProgramMetadata.md +++ b/docs/util/type-aliases/ProgramMetadata.md @@ -88,4 +88,4 @@ module auto-discovered and loaded (invariant). ## Defined in -[types/program.ts:188](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/program.ts#L188) +[types/program.ts:188](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/program.ts#L188) diff --git a/docs/util/type-aliases/ProgramType.md b/docs/util/type-aliases/ProgramType.md index 35b85f2..b63b035 100644 --- a/docs/util/type-aliases/ProgramType.md +++ b/docs/util/type-aliases/ProgramType.md @@ -12,4 +12,4 @@ Represents valid [Configuration](../../index/type-aliases/Configuration.md) modu ## Defined in -[types/program.ts:149](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/program.ts#L149) +[types/program.ts:149](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/program.ts#L149) diff --git a/docs/util/type-aliases/Programs.md b/docs/util/type-aliases/Programs.md index 94e5f8c..4e24356 100644 --- a/docs/util/type-aliases/Programs.md +++ b/docs/util/type-aliases/Programs.md @@ -19,4 +19,4 @@ aptly-named values in an object. ## Defined in -[types/program.ts:173](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/program.ts#L173) +[types/program.ts:173](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/program.ts#L173) diff --git a/docs/util/type-aliases/RouterProgram.md b/docs/util/type-aliases/RouterProgram.md index bf4e172..a7a82b6 100644 --- a/docs/util/type-aliases/RouterProgram.md +++ b/docs/util/type-aliases/RouterProgram.md @@ -18,4 +18,4 @@ Represents an "router" [Program](Program.md) instance. ## Defined in -[types/program.ts:141](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/types/program.ts#L141) +[types/program.ts:141](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/types/program.ts#L141) diff --git a/docs/util/variables/ErrorMessage.md b/docs/util/variables/ErrorMessage.md index d3bf3dd..755c1b6 100644 --- a/docs/util/variables/ErrorMessage.md +++ b/docs/util/variables/ErrorMessage.md @@ -356,4 +356,4 @@ A collection of possible error and warning messages emitted by Black Flag. ## Defined in -[src/error.ts:200](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/error.ts#L200) +[src/error.ts:251](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/error.ts#L251) diff --git a/docs/util/variables/defaultHelpOptionName.md b/docs/util/variables/defaultHelpOptionName.md index a794a8e..2a10ee0 100644 --- a/docs/util/variables/defaultHelpOptionName.md +++ b/docs/util/variables/defaultHelpOptionName.md @@ -13,4 +13,4 @@ Hard-coded default option name for dumping help text to stdout. For example: ## Defined in -[src/constant.ts:19](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/constant.ts#L19) +[src/constant.ts:19](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/constant.ts#L19) diff --git a/docs/util/variables/defaultHelpTextDescription.md b/docs/util/variables/defaultHelpTextDescription.md index 336afcc..64ca55b 100644 --- a/docs/util/variables/defaultHelpTextDescription.md +++ b/docs/util/variables/defaultHelpTextDescription.md @@ -12,4 +12,4 @@ Hard-coded default help option description text. ## Defined in -[src/constant.ts:24](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/constant.ts#L24) +[src/constant.ts:24](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/constant.ts#L24) diff --git a/docs/util/variables/defaultUsageText.md b/docs/util/variables/defaultUsageText.md index 617cedb..1abcd53 100644 --- a/docs/util/variables/defaultUsageText.md +++ b/docs/util/variables/defaultUsageText.md @@ -15,4 +15,4 @@ description (`description` export) respectively. ## Defined in -[src/constant.ts:13](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/constant.ts#L13) +[src/constant.ts:13](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/constant.ts#L13) diff --git a/docs/util/variables/defaultVersionOptionName.md b/docs/util/variables/defaultVersionOptionName.md index 8258bbd..cf17af2 100644 --- a/docs/util/variables/defaultVersionOptionName.md +++ b/docs/util/variables/defaultVersionOptionName.md @@ -13,4 +13,4 @@ example: `--${defaultVersionOptionName}`. ## Defined in -[src/constant.ts:30](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/constant.ts#L30) +[src/constant.ts:30](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/constant.ts#L30) diff --git a/docs/util/variables/defaultVersionTextDescription.md b/docs/util/variables/defaultVersionTextDescription.md index 1e3d803..4cd0092 100644 --- a/docs/util/variables/defaultVersionTextDescription.md +++ b/docs/util/variables/defaultVersionTextDescription.md @@ -12,4 +12,4 @@ Hard-coded default version option description text. ## Defined in -[src/constant.ts:35](https://github.com/Xunnamius/black-flag/blob/cdc6af55387aac92b7d9fc16a57790068e4b6d49/src/constant.ts#L35) +[src/constant.ts:35](https://github.com/Xunnamius/black-flag/blob/20623d626b4c283cf81bd3e79356045673c5c3fb/src/constant.ts#L35) diff --git a/package-lock.json b/package-lock.json index 025e591..0263756 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@black-flag/core", - "version": "1.2.7", + "version": "1.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@black-flag/core", - "version": "1.2.7", + "version": "1.3.0", "license": "MIT", "dependencies": { "@types/debug": "^4.1.12", diff --git a/package.json b/package.json index 00b51ed..0efd5f3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@black-flag/core", - "version": "1.2.7", + "version": "1.3.0", "description": "A declarative framework for building fluent, deeply hierarchical command line interfaces with yargs", "keywords": [ "cli",