@stricli/core
Advanced tools
+29
-11
@@ -584,2 +584,11 @@ /** | ||
| readonly default?: boolean; | ||
| /** | ||
| * Whether to generate a negated version of this flag (e.g., `--no-foo` for `--foo`). | ||
| * | ||
| * By default, boolean flags with a non-false default value automatically generate a negated version. | ||
| * Set this to `false` to disable the negated flag generation. | ||
| * | ||
| * Defaults to `true`. | ||
| */ | ||
| readonly withNegated?: boolean; | ||
| } | ||
@@ -664,4 +673,5 @@ type RequiredBooleanFlagParameter = BaseBooleanFlagParameter & { | ||
| * Default input value if one is not provided at runtime. | ||
| * For variadic flags, this can be an array of default values. | ||
| */ | ||
| readonly default?: T; | ||
| readonly default?: T | readonly T[]; | ||
| readonly optional?: boolean; | ||
@@ -702,5 +712,6 @@ readonly hidden?: boolean; | ||
| /** | ||
| * Default values are not supported for variadic parameters. | ||
| * Default values to use if no arguments are provided at runtime. | ||
| * Values must be valid members of the enum values array. | ||
| */ | ||
| readonly default?: undefined; | ||
| readonly default?: readonly T[]; | ||
| /** | ||
@@ -725,5 +736,7 @@ * Optional variadic parameter will parse to an empty array if no arguments are found. | ||
| /** | ||
| * Default values are not supported for variadic parameters. | ||
| * Default values to use if no arguments are provided at runtime. | ||
| * Values must be valid members of the enum values array. | ||
| * If a default is provided, the parameter becomes optional at runtime. | ||
| */ | ||
| readonly default?: undefined; | ||
| readonly default?: readonly T[]; | ||
| /** | ||
@@ -735,3 +748,3 @@ * Parameter is required and cannot be set as optional. | ||
| /** | ||
| * Parameter is required and cannot be set as hidden. | ||
| * Parameter is required and cannot be set as hidden without a default value. | ||
| */ | ||
@@ -755,4 +768,5 @@ readonly hidden?: false; | ||
| * Default input value if one is not provided at runtime. | ||
| * For variadic flags, this can be an array of input strings to be parsed. | ||
| */ | ||
| readonly default?: string; | ||
| readonly default?: string | readonly string[]; | ||
| /** | ||
@@ -825,5 +839,6 @@ * If flag is specified with no corresponding input, infer an empty string `""` as the input. | ||
| /** | ||
| * Default values are not supported for variadic parameters. | ||
| * Default input values to parse if no arguments are provided at runtime. | ||
| * These will be parsed using the flag's parse function. | ||
| */ | ||
| readonly default?: undefined; | ||
| readonly default?: readonly string[]; | ||
| } | ||
@@ -845,5 +860,7 @@ interface RequiredVariadicParsedFlagParameter<T, CONTEXT extends CommandContext> extends BaseParsedFlagParameter<T, CONTEXT> { | ||
| /** | ||
| * Default values are not supported for variadic parameters. | ||
| * Default input values to parse if no arguments are provided at runtime. | ||
| * These will be parsed using the flag's parse function. | ||
| * If a default is provided, the parameter becomes optional at runtime. | ||
| */ | ||
| readonly default?: undefined; | ||
| readonly default?: readonly string[]; | ||
| } | ||
@@ -1054,2 +1071,3 @@ type TypedFlagParameter_Optional<T, CONTEXT extends CommandContext> = [T] extends [readonly (infer A)[]] ? [A] extends [string] ? OptionalVariadicParsedFlagParameter<A, CONTEXT> | OptionalParsedFlagParameter<T, CONTEXT> | OptionalVariadicEnumFlagParameter<A> : OptionalVariadicParsedFlagParameter<A, CONTEXT> | OptionalParsedFlagParameter<T, CONTEXT> : [T] extends [boolean] ? OptionalBooleanFlagParameter | OptionalParsedFlagParameter<boolean, CONTEXT> : [T] extends [number] ? OptionalCounterFlagParameter | OptionalParsedFlagParameter<number, CONTEXT> : string extends T ? OptionalParsedFlagParameter<string, CONTEXT> : [T] extends [string] ? OptionalEnumFlagParameter<T> | OptionalParsedFlagParameter<T, CONTEXT> : OptionalParsedFlagParameter<T, CONTEXT>; | ||
| readonly brief: string; | ||
| readonly fullDescription: string | undefined; | ||
| readonly formatUsageLine: (args: UsageFormattingArguments) => string; | ||
@@ -1056,0 +1074,0 @@ readonly formatHelp: (args: HelpFormattingArguments) => string; |
+29
-11
@@ -584,2 +584,11 @@ /** | ||
| readonly default?: boolean; | ||
| /** | ||
| * Whether to generate a negated version of this flag (e.g., `--no-foo` for `--foo`). | ||
| * | ||
| * By default, boolean flags with a non-false default value automatically generate a negated version. | ||
| * Set this to `false` to disable the negated flag generation. | ||
| * | ||
| * Defaults to `true`. | ||
| */ | ||
| readonly withNegated?: boolean; | ||
| } | ||
@@ -664,4 +673,5 @@ type RequiredBooleanFlagParameter = BaseBooleanFlagParameter & { | ||
| * Default input value if one is not provided at runtime. | ||
| * For variadic flags, this can be an array of default values. | ||
| */ | ||
| readonly default?: T; | ||
| readonly default?: T | readonly T[]; | ||
| readonly optional?: boolean; | ||
@@ -702,5 +712,6 @@ readonly hidden?: boolean; | ||
| /** | ||
| * Default values are not supported for variadic parameters. | ||
| * Default values to use if no arguments are provided at runtime. | ||
| * Values must be valid members of the enum values array. | ||
| */ | ||
| readonly default?: undefined; | ||
| readonly default?: readonly T[]; | ||
| /** | ||
@@ -725,5 +736,7 @@ * Optional variadic parameter will parse to an empty array if no arguments are found. | ||
| /** | ||
| * Default values are not supported for variadic parameters. | ||
| * Default values to use if no arguments are provided at runtime. | ||
| * Values must be valid members of the enum values array. | ||
| * If a default is provided, the parameter becomes optional at runtime. | ||
| */ | ||
| readonly default?: undefined; | ||
| readonly default?: readonly T[]; | ||
| /** | ||
@@ -735,3 +748,3 @@ * Parameter is required and cannot be set as optional. | ||
| /** | ||
| * Parameter is required and cannot be set as hidden. | ||
| * Parameter is required and cannot be set as hidden without a default value. | ||
| */ | ||
@@ -755,4 +768,5 @@ readonly hidden?: false; | ||
| * Default input value if one is not provided at runtime. | ||
| * For variadic flags, this can be an array of input strings to be parsed. | ||
| */ | ||
| readonly default?: string; | ||
| readonly default?: string | readonly string[]; | ||
| /** | ||
@@ -825,5 +839,6 @@ * If flag is specified with no corresponding input, infer an empty string `""` as the input. | ||
| /** | ||
| * Default values are not supported for variadic parameters. | ||
| * Default input values to parse if no arguments are provided at runtime. | ||
| * These will be parsed using the flag's parse function. | ||
| */ | ||
| readonly default?: undefined; | ||
| readonly default?: readonly string[]; | ||
| } | ||
@@ -845,5 +860,7 @@ interface RequiredVariadicParsedFlagParameter<T, CONTEXT extends CommandContext> extends BaseParsedFlagParameter<T, CONTEXT> { | ||
| /** | ||
| * Default values are not supported for variadic parameters. | ||
| * Default input values to parse if no arguments are provided at runtime. | ||
| * These will be parsed using the flag's parse function. | ||
| * If a default is provided, the parameter becomes optional at runtime. | ||
| */ | ||
| readonly default?: undefined; | ||
| readonly default?: readonly string[]; | ||
| } | ||
@@ -1054,2 +1071,3 @@ type TypedFlagParameter_Optional<T, CONTEXT extends CommandContext> = [T] extends [readonly (infer A)[]] ? [A] extends [string] ? OptionalVariadicParsedFlagParameter<A, CONTEXT> | OptionalParsedFlagParameter<T, CONTEXT> | OptionalVariadicEnumFlagParameter<A> : OptionalVariadicParsedFlagParameter<A, CONTEXT> | OptionalParsedFlagParameter<T, CONTEXT> : [T] extends [boolean] ? OptionalBooleanFlagParameter | OptionalParsedFlagParameter<boolean, CONTEXT> : [T] extends [number] ? OptionalCounterFlagParameter | OptionalParsedFlagParameter<number, CONTEXT> : string extends T ? OptionalParsedFlagParameter<string, CONTEXT> : [T] extends [string] ? OptionalEnumFlagParameter<T> | OptionalParsedFlagParameter<T, CONTEXT> : OptionalParsedFlagParameter<T, CONTEXT>; | ||
| readonly brief: string; | ||
| readonly fullDescription: string | undefined; | ||
| readonly formatUsageLine: (args: UsageFormattingArguments) => string; | ||
@@ -1056,0 +1074,0 @@ readonly formatHelp: (args: HelpFormattingArguments) => string; |
+4
-20
| { | ||
| "name": "@stricli/core", | ||
| "version": "1.2.4", | ||
| "version": "1.2.5", | ||
| "description": "Build complex CLIs with type safety and no dependencies", | ||
@@ -26,21 +26,9 @@ "license": "Apache-2.0", | ||
| "typecheck": "tsc -p tsconfig.json --noEmit", | ||
| "test": "mocha", | ||
| "test": "vitest --run", | ||
| "test:clear-baseline": "node scripts/clear_baseline", | ||
| "test:accept-baseline": "node scripts/accept_baseline", | ||
| "coverage": "c8 npm test", | ||
| "coverage": "vitest --run --coverage.enabled", | ||
| "build": "tsup --silent", | ||
| "prepublishOnly": "npm run build" | ||
| }, | ||
| "mocha": { | ||
| "import": "tsx/esm", | ||
| "spec": "tests/**/*.spec.ts" | ||
| }, | ||
| "c8": { | ||
| "reporter": [ | ||
| "text", | ||
| "lcovonly" | ||
| ], | ||
| "check-coverage": true, | ||
| "skip-full": true | ||
| }, | ||
| "tsup": { | ||
@@ -56,3 +44,3 @@ "entry": [ | ||
| "dts": true, | ||
| "minify": true, | ||
| "minify": false, | ||
| "clean": true | ||
@@ -63,8 +51,5 @@ }, | ||
| "@types/fs-extra": "^11.0.4", | ||
| "@types/mocha": "^10.0.6", | ||
| "@types/sinon": "^17.0.2", | ||
| "@typescript-eslint/eslint-plugin": "^8.2.0", | ||
| "@typescript-eslint/parser": "^8.2.0", | ||
| "c8": "^8.0.1", | ||
| "chai": "^4.3.10", | ||
| "eslint": "^8.57.0", | ||
@@ -75,3 +60,2 @@ "eslint-plugin-header": "^3.1.1", | ||
| "fs-extra": "^11.2.0", | ||
| "mocha": "^10.2.0", | ||
| "prettier": "^3.2.5", | ||
@@ -78,0 +62,0 @@ "sinon": "^17.0.1", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
274807
50.64%15
-21.05%5885
250.72%1
-66.67%4
Infinity%1
Infinity%