@black-flag/core
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -15,2 +15,8 @@ "use strict"; | ||
exports.resetInternalState = resetInternalState; | ||
require("core-js/modules/es.array.push.js"); | ||
require("core-js/modules/esnext.iterator.constructor.js"); | ||
require("core-js/modules/esnext.iterator.filter.js"); | ||
require("core-js/modules/esnext.iterator.flat-map.js"); | ||
require("core-js/modules/esnext.iterator.for-each.js"); | ||
require("core-js/modules/esnext.iterator.some.js"); | ||
require("core-js/modules/esnext.set.difference.v2.js"); | ||
@@ -23,8 +29,2 @@ require("core-js/modules/esnext.set.intersection.v2.js"); | ||
require("core-js/modules/esnext.set.union.v2.js"); | ||
require("core-js/modules/es.array.push.js"); | ||
require("core-js/modules/esnext.iterator.constructor.js"); | ||
require("core-js/modules/esnext.iterator.filter.js"); | ||
require("core-js/modules/esnext.iterator.flat-map.js"); | ||
require("core-js/modules/esnext.iterator.for-each.js"); | ||
require("core-js/modules/esnext.iterator.some.js"); | ||
var _debugExtended = require("../debug-extended/index.js"); | ||
@@ -31,0 +31,0 @@ exports.extendedDebugFactory = _debugExtended.debugFactory; |
/** | ||
* @internal | ||
*/ | ||
export declare function getRootDebugLogger(): import("../lib/rejoinder").ExtendedDebugger; | ||
export declare function getRootDebugLogger(): import("../lib/debug-extended").ExtendedDebugger; |
@@ -7,7 +7,7 @@ "use strict"; | ||
exports.discoverCommands = discoverCommands; | ||
require("core-js/modules/es.array.push.js"); | ||
require("core-js/modules/esnext.iterator.constructor.js"); | ||
require("core-js/modules/esnext.iterator.filter.js"); | ||
require("core-js/modules/esnext.iterator.for-each.js"); | ||
require("core-js/modules/esnext.iterator.map.js"); | ||
require("core-js/modules/esnext.iterator.for-each.js"); | ||
require("core-js/modules/es.array.push.js"); | ||
require("core-js/modules/esnext.iterator.some.js"); | ||
@@ -14,0 +14,0 @@ var _nodeAssert = _interopRequireDefault(require("node:assert")); |
@@ -9,3 +9,3 @@ import type { Promisable } from 'type-fest'; | ||
*/ | ||
export type Configuration<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>> = { | ||
export type Configuration<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>, CustomExecutionContext extends ExecutionContext = ExecutionContext> = { | ||
/** | ||
@@ -50,3 +50,3 @@ * An array of `command` aliases [as | ||
[key: string]: _Options; | ||
} | ((blackFlag: Omit<EffectorProgram<CustomCliArguments>, 'parseAsync' | 'fail' | 'command' | 'command_deferred' | 'command_finalize_deferred'>, helpOrVersionSet: boolean, argv?: Arguments<CustomCliArguments>) => void | EffectorProgram<CustomCliArguments> | { | ||
} | ((blackFlag: Omit<EffectorProgram<CustomCliArguments, CustomExecutionContext>, 'parseAsync' | 'fail' | 'command' | 'command_deferred' | 'command_finalize_deferred'>, helpOrVersionSet: boolean, argv?: Arguments<CustomCliArguments, CustomExecutionContext>) => void | EffectorProgram<CustomCliArguments, CustomExecutionContext> | { | ||
[key: string]: _Options; | ||
@@ -88,3 +88,3 @@ } | _Program); | ||
*/ | ||
handler: (argv: Arguments<CustomCliArguments>) => Promisable<void>; | ||
handler: (argv: Arguments<CustomCliArguments, CustomExecutionContext>) => Promisable<void>; | ||
/** | ||
@@ -120,3 +120,3 @@ * The name of the command. Any spaces will be replaced with hyphens. | ||
*/ | ||
export type RootConfiguration<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>> = Partial<ParentConfiguration<CustomCliArguments>>; | ||
export type RootConfiguration<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>, CustomExecutionContext extends ExecutionContext = ExecutionContext> = Partial<ParentConfiguration<CustomCliArguments, CustomExecutionContext>>; | ||
/** | ||
@@ -127,3 +127,3 @@ * A partial extension to the {@link Configuration} interface for non-root | ||
*/ | ||
export type ParentConfiguration<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>> = Partial<Configuration<CustomCliArguments>>; | ||
export type ParentConfiguration<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>, CustomExecutionContext extends ExecutionContext = ExecutionContext> = Partial<Configuration<CustomCliArguments, CustomExecutionContext>>; | ||
/** | ||
@@ -134,3 +134,3 @@ * A partial extension to the {@link Configuration} interface for child | ||
*/ | ||
export type ChildConfiguration<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>> = Partial<Configuration<CustomCliArguments>>; | ||
export type ChildConfiguration<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>, CustomExecutionContext extends ExecutionContext = ExecutionContext> = Partial<Configuration<CustomCliArguments, CustomExecutionContext>>; | ||
/** | ||
@@ -141,4 +141,4 @@ * Represents a Configuration object imported from a CJS/ESM module external to | ||
*/ | ||
export type ImportedConfigurationModule<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>> = (((context: ExecutionContext) => Promisable<Partial<RootConfiguration<CustomCliArguments> | ParentConfiguration<CustomCliArguments> | ChildConfiguration<CustomCliArguments>>>) | Partial<RootConfiguration<CustomCliArguments> | ParentConfiguration<CustomCliArguments> | ChildConfiguration<CustomCliArguments>>) & { | ||
default?: ImportedConfigurationModule<CustomCliArguments>; | ||
export type ImportedConfigurationModule<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>, CustomExecutionContext extends ExecutionContext = ExecutionContext> = (((context: ExecutionContext) => Promisable<Partial<RootConfiguration<CustomCliArguments, CustomExecutionContext> | ParentConfiguration<CustomCliArguments, CustomExecutionContext> | ChildConfiguration<CustomCliArguments, CustomExecutionContext>>>) | Partial<RootConfiguration<CustomCliArguments, CustomExecutionContext> | ParentConfiguration<CustomCliArguments, CustomExecutionContext> | ChildConfiguration<CustomCliArguments, CustomExecutionContext>>) & { | ||
default?: ImportedConfigurationModule<CustomCliArguments, CustomExecutionContext>; | ||
}; |
@@ -12,3 +12,3 @@ import type { ArgumentsCamelCase as _Arguments, Argv as _Program } from 'yargs'; | ||
*/ | ||
export type Arguments<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>> = _Arguments<FrameworkArguments & CustomCliArguments>; | ||
export type Arguments<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>, CustomExecutionContext extends ExecutionContext = ExecutionContext> = _Arguments<FrameworkArguments<CustomExecutionContext> & CustomCliArguments>; | ||
/** | ||
@@ -21,6 +21,6 @@ * Represents an empty or "null" `Arguments` object devoid of useful data. | ||
*/ | ||
export type NullArguments = { | ||
export type NullArguments<CustomExecutionContext extends ExecutionContext = ExecutionContext> = { | ||
$0: '<NullArguments: no parse result available due to exception>'; | ||
_: []; | ||
} & FrameworkArguments; | ||
} & FrameworkArguments<CustomExecutionContext>; | ||
/** | ||
@@ -33,3 +33,3 @@ * Represents a pre-configured yargs instance ready for argument parsing and | ||
*/ | ||
export type Program<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>> = Omit<_Program<FrameworkArguments & CustomCliArguments>, 'command' | 'onFinishCommand' | 'showHelpOnFail' | 'version' | 'help' | 'exitProcess' | 'commandDir' | 'parse' | 'parsed' | 'parseSync' | 'argv'> & { | ||
export type Program<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>, CustomExecutionContext extends ExecutionContext = ExecutionContext> = Omit<_Program<FrameworkArguments<CustomExecutionContext> & CustomCliArguments>, 'command' | 'onFinishCommand' | 'showHelpOnFail' | 'version' | 'help' | 'exitProcess' | 'commandDir' | 'parse' | 'parsed' | 'parseSync' | 'argv'> & { | ||
/** | ||
@@ -40,3 +40,3 @@ * @see {@link _Program.command} | ||
command: { | ||
(command: string[], description: Configuration<CustomCliArguments>['description'], builder: ((yargs: _Program, helpOrVersionSet: boolean) => _Program) | Record<string, never>, handler: Configuration<CustomCliArguments>['handler'], middlewares: [], deprecated: Configuration<CustomCliArguments>['deprecated']): Program<CustomCliArguments>; | ||
(command: string[], description: Configuration<CustomCliArguments, CustomExecutionContext>['description'], builder: ((yargs: _Program, helpOrVersionSet: boolean) => _Program) | Record<string, never>, handler: Configuration<CustomCliArguments, CustomExecutionContext>['handler'], middlewares: [], deprecated: Configuration<CustomCliArguments, CustomExecutionContext>['deprecated']): Program<CustomCliArguments, CustomExecutionContext>; | ||
}; | ||
@@ -54,3 +54,3 @@ /** | ||
*/ | ||
showHelpOnFail: (enabled: boolean) => Program<CustomCliArguments>; | ||
showHelpOnFail: (enabled: boolean) => Program<CustomCliArguments, CustomExecutionContext>; | ||
/** | ||
@@ -63,3 +63,3 @@ * Identical to `yargs::command` except its execution is enqueued and | ||
*/ | ||
command_deferred: Program<CustomCliArguments>['command']; | ||
command_deferred: Program<CustomCliArguments, CustomExecutionContext>['command']; | ||
/** | ||
@@ -74,11 +74,11 @@ * @see {@link Program.command_deferred} | ||
*/ | ||
export type EffectorProgram<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>> = Omit<Program<CustomCliArguments>, 'command_deferred' | 'command_finalize_deferred'>; | ||
export type EffectorProgram<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>, CustomExecutionContext extends ExecutionContext = ExecutionContext> = Omit<Program<CustomCliArguments, CustomExecutionContext>, 'command_deferred' | 'command_finalize_deferred'>; | ||
/** | ||
* Represents an "helper" {@link Program} instance. | ||
*/ | ||
export type HelperProgram<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>> = Omit<Program<CustomCliArguments>, 'demand' | 'demandCommand' | 'command'>; | ||
export type HelperProgram<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>, CustomExecutionContext extends ExecutionContext = ExecutionContext> = Omit<Program<CustomCliArguments, CustomExecutionContext>, 'demand' | 'demandCommand' | 'command'>; | ||
/** | ||
* Represents an "router" {@link Program} instance. | ||
*/ | ||
export type RouterProgram<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>> = Pick<Program<CustomCliArguments>, 'parseAsync' | 'command'>; | ||
export type RouterProgram<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>, CustomExecutionContext extends ExecutionContext = ExecutionContext> = Pick<Program<CustomCliArguments, CustomExecutionContext>, 'parseAsync' | 'command'>; | ||
/** | ||
@@ -95,3 +95,3 @@ * Represents valid {@link Configuration} module types that can be loaded. | ||
*/ | ||
export type DescriptorToProgram<Descriptor extends ProgramDescriptor, CustomCliArguments extends Record<string, unknown> = Record<string, unknown>> = 'effector' extends Descriptor ? EffectorProgram<CustomCliArguments> : 'helper' extends Descriptor ? HelperProgram<CustomCliArguments> : RouterProgram<CustomCliArguments>; | ||
export type DescriptorToProgram<Descriptor extends ProgramDescriptor, CustomCliArguments extends Record<string, unknown> = Record<string, unknown>, CustomExecutionContext extends ExecutionContext = ExecutionContext> = 'effector' extends Descriptor ? EffectorProgram<CustomCliArguments, CustomExecutionContext> : 'helper' extends Descriptor ? HelperProgram<CustomCliArguments, CustomExecutionContext> : RouterProgram<CustomCliArguments, CustomExecutionContext>; | ||
/** | ||
@@ -101,4 +101,4 @@ * Represents the program types that represent every Black Flag command as | ||
*/ | ||
export type Programs<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>> = { | ||
[Descriptor in ProgramDescriptor]: DescriptorToProgram<Descriptor, CustomCliArguments>; | ||
export type Programs<CustomCliArguments extends Record<string, unknown> = Record<string, unknown>, CustomExecutionContext extends ExecutionContext = ExecutionContext> = { | ||
[Descriptor in ProgramDescriptor]: DescriptorToProgram<Descriptor, CustomCliArguments, CustomExecutionContext>; | ||
}; | ||
@@ -177,4 +177,4 @@ /** | ||
*/ | ||
export type FrameworkArguments = { | ||
[$executionContext]: ExecutionContext; | ||
export type FrameworkArguments<CustomExecutionContext extends ExecutionContext = ExecutionContext> = { | ||
[$executionContext]: CustomExecutionContext; | ||
}; | ||
@@ -181,0 +181,0 @@ /** |
{ | ||
"name": "@black-flag/core", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "A declarative framework for building fluent, deeply hierarchical command line interfaces with yargs", | ||
@@ -94,3 +94,3 @@ "keywords": [ | ||
"alpha-sort": "^5.0.0", | ||
"core-js": "3.35.0", | ||
"core-js": "3.36.0", | ||
"debug": "^4.3.4", | ||
@@ -103,10 +103,10 @@ "merge-descriptors": "^2.0.0", | ||
"devDependencies": { | ||
"@arethetypeswrong/cli": "^0.13.5", | ||
"@babel/cli": "^7.23.4", | ||
"@babel/eslint-parser": "^7.23.3", | ||
"@arethetypeswrong/cli": "^0.15.1", | ||
"@babel/cli": "^7.23.9", | ||
"@babel/eslint-parser": "^7.23.10", | ||
"@babel/plugin-proposal-export-default-from": "^7.23.3", | ||
"@babel/preset-env": "^7.23.7", | ||
"@babel/preset-env": "^7.24.0", | ||
"@babel/preset-typescript": "^7.23.3", | ||
"@commitlint/cli": "^18.4.3", | ||
"@commitlint/config-conventional": "^18.4.3", | ||
"@commitlint/cli": "^19.2.0", | ||
"@commitlint/config-conventional": "^19.1.0", | ||
"@semantic-release/changelog": "^6.0.3", | ||
@@ -116,8 +116,8 @@ "@semantic-release/exec": "^6.0.3", | ||
"@types/glob": "^8.1.0", | ||
"@types/jest": "^29.5.11", | ||
"@types/jest": "^29.5.12", | ||
"@types/lodash.mergewith": "^4.6.9", | ||
"@types/merge-descriptors": "^1.0.3", | ||
"@types/node": "^20.10.6", | ||
"@typescript-eslint/eslint-plugin": "^6.16.0", | ||
"@typescript-eslint/parser": "^6.16.0", | ||
"@types/node": "^20.11.28", | ||
"@typescript-eslint/eslint-plugin": "^7.2.0", | ||
"@typescript-eslint/parser": "^7.2.0", | ||
"@xunnamius/conventional-changelog-projector": "^1.2.1", | ||
@@ -132,4 +132,4 @@ "@xunnamius/jest-types": "^1.1.3", | ||
"doctoc": "^2.2.1", | ||
"dotenv": "^16.3.1", | ||
"eslint": "^8.56.0", | ||
"dotenv": "^16.4.5", | ||
"eslint": "^8.57.0", | ||
"eslint-import-resolver-alias": "^1.1.2", | ||
@@ -139,15 +139,15 @@ "eslint-import-resolver-babel-module": "^5.3.2", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-jest": "^27.6.0", | ||
"eslint-plugin-jest": "^27.9.0", | ||
"eslint-plugin-module-resolver": "^1.5.0", | ||
"eslint-plugin-unicorn": "^50.0.1", | ||
"eslint-plugin-unicorn": "^51.0.1", | ||
"execa": "^5.1.1", | ||
"glob": "^10.3.10", | ||
"glob-gitignore": "^1.0.14", | ||
"husky": "^8.0.3", | ||
"husky": "^9.0.11", | ||
"jest": "^29.7.0", | ||
"jest-circus": "^29.7.0", | ||
"jest-extended": "^4.0.2", | ||
"lint-staged": "^15.2.0", | ||
"lint-staged": "^15.2.2", | ||
"lodash.mergewith": "^4.6.2", | ||
"prettier": "^3.1.1", | ||
"prettier": "^3.2.5", | ||
"remark-capitalize-headings": "^2.0.1", | ||
@@ -202,3 +202,3 @@ "remark-cli": "^12.0.0", | ||
"semantic-release": "https://xunn.at/semantic-release-atam@22.0.7", | ||
"semver": "^7.5.4", | ||
"semver": "^7.6.0", | ||
"sort-package-json": "https://xunn.at/sort-package-json@2.3.0", | ||
@@ -208,6 +208,6 @@ "spellchecker": "^3.7.1", | ||
"tsconfig-replace-paths": "^0.0.14", | ||
"type-fest": "^4.9.0", | ||
"typedoc": "^0.25.4", | ||
"type-fest": "^4.12.0", | ||
"typedoc": "^0.25.12", | ||
"typedoc-plugin-markdown": "^3.17.1", | ||
"typescript": "^5.3.3", | ||
"typescript": "^5.4.2", | ||
"unique-filename": "^3.0.0" | ||
@@ -214,0 +214,0 @@ }, |
227706
2884
+ Addedcore-js@3.36.0(transitive)
- Removedcore-js@3.35.0(transitive)
Updatedcore-js@3.36.0