@guanghechen/commander 4.7.6 → 4.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +8 -1
- package/lib/cjs/browser.cjs +2715 -1454
- package/lib/cjs/node.cjs +2715 -1454
- package/lib/esm/browser.mjs +2716 -1454
- package/lib/esm/node.mjs +2716 -1454
- package/lib/schema/preset.schema.json +152 -0
- package/lib/types/browser.d.ts +190 -125
- package/lib/types/node.d.ts +190 -125
- package/package.json +1 -1
package/lib/types/node.d.ts
CHANGED
|
@@ -1,13 +1,31 @@
|
|
|
1
1
|
import { IReporter } from '@guanghechen/reporter';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Type definitions for @guanghechen/commander
|
|
5
|
-
*
|
|
6
|
-
* @module @guanghechen/commander
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
3
|
/** Token type: long option, short option, or positional */
|
|
10
4
|
type ICommandTokenType = 'long' | 'short' | 'none';
|
|
5
|
+
/** Token source kind */
|
|
6
|
+
type ICommandTokenSource = 'user' | 'preset';
|
|
7
|
+
/** Preset metadata carried by token/issue source tracing */
|
|
8
|
+
interface ICommandPresetIssueMeta {
|
|
9
|
+
file?: string;
|
|
10
|
+
profile?: string;
|
|
11
|
+
variant?: string;
|
|
12
|
+
optionKey?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Preset source snapshot metadata carried by ctx.sources.preset.meta */
|
|
15
|
+
interface ICommandPresetSourceMeta {
|
|
16
|
+
applied: boolean;
|
|
17
|
+
file?: string;
|
|
18
|
+
profile?: string;
|
|
19
|
+
variant?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Preset execution state in input source snapshot */
|
|
22
|
+
type ICommandPresetSourceState = 'skipped' | 'none' | 'applied';
|
|
23
|
+
/** Input segment before tokenize, preserving source attribution */
|
|
24
|
+
interface ICommandArgvSegment {
|
|
25
|
+
value: string;
|
|
26
|
+
source: ICommandTokenSource;
|
|
27
|
+
preset?: ICommandPresetIssueMeta;
|
|
28
|
+
}
|
|
11
29
|
/**
|
|
12
30
|
* Command token after preprocessing.
|
|
13
31
|
*
|
|
@@ -25,46 +43,12 @@ interface ICommandToken {
|
|
|
25
43
|
name: string;
|
|
26
44
|
/** Token type */
|
|
27
45
|
type: ICommandTokenType;
|
|
46
|
+
/** Source of this token */
|
|
47
|
+
source: ICommandTokenSource;
|
|
48
|
+
/** Preset metadata when source='preset' */
|
|
49
|
+
preset?: ICommandPresetIssueMeta;
|
|
28
50
|
}
|
|
29
|
-
|
|
30
|
-
type ICommandOptionType = 'boolean' | 'number' | 'string';
|
|
31
|
-
/** Option argument mode */
|
|
32
|
-
type ICommandOptionArgs = 'none' | 'required' | 'optional' | 'variadic';
|
|
33
|
-
/**
|
|
34
|
-
* Option configuration.
|
|
35
|
-
*
|
|
36
|
-
* `type` and `args` must be specified together. Valid combinations:
|
|
37
|
-
* - boolean + none → boolean
|
|
38
|
-
* - string + required → string
|
|
39
|
-
* - string + optional → string | undefined
|
|
40
|
-
* - number + required → number
|
|
41
|
-
* - string + variadic → string[]
|
|
42
|
-
* - number + variadic → number[]
|
|
43
|
-
*
|
|
44
|
-
* @template T - The type of the option value
|
|
45
|
-
*/
|
|
46
|
-
interface ICommandOptionConfig<T = unknown> {
|
|
47
|
-
/** Long option name (camelCase, required) */
|
|
48
|
-
long: string;
|
|
49
|
-
/** Short option (single character) */
|
|
50
|
-
short?: string;
|
|
51
|
-
/** Value type (required) */
|
|
52
|
-
type: ICommandOptionType;
|
|
53
|
-
/** Argument mode (required) */
|
|
54
|
-
args: ICommandOptionArgs;
|
|
55
|
-
/** Description for help text */
|
|
56
|
-
desc: string;
|
|
57
|
-
/** Whether this option is required (mutually exclusive with default) */
|
|
58
|
-
required?: boolean;
|
|
59
|
-
/** Default value when not provided */
|
|
60
|
-
default?: T;
|
|
61
|
-
/** Allowed values for validation and completion */
|
|
62
|
-
choices?: T extends Array<infer U> ? U[] : T[];
|
|
63
|
-
/** Single value transformation (called for each value, before choices validation) */
|
|
64
|
-
coerce?: (rawValue: string) => T extends Array<infer U> ? U : T;
|
|
65
|
-
/** Callback after parsing, applies value to context */
|
|
66
|
-
apply?: (value: T, ctx: ICommandContext) => void;
|
|
67
|
-
}
|
|
51
|
+
|
|
68
52
|
/** Argument kind */
|
|
69
53
|
type ICommandArgumentKind = 'required' | 'optional' | 'variadic' | 'some';
|
|
70
54
|
/** Argument value type */
|
|
@@ -95,11 +79,14 @@ interface ICommandArgumentConfig<T = unknown> {
|
|
|
95
79
|
/** Custom value transformation (takes precedence over type conversion) */
|
|
96
80
|
coerce?: (rawValue: string) => T;
|
|
97
81
|
}
|
|
82
|
+
|
|
98
83
|
interface ICommandBuiltinOptionConfig {
|
|
99
84
|
/** Enable built-in --version option (requires configured version on target command) */
|
|
100
85
|
version?: boolean;
|
|
101
86
|
/** Enable built-in --color/--no-color option for help rendering (defaults respect NO_COLOR) */
|
|
102
87
|
color?: boolean;
|
|
88
|
+
/** Enable built-in --devmode option */
|
|
89
|
+
devmode?: boolean;
|
|
103
90
|
/** Enable built-in --log-level option */
|
|
104
91
|
logLevel?: boolean;
|
|
105
92
|
/** Enable built-in --silent option */
|
|
@@ -214,6 +201,7 @@ interface ICommand {
|
|
|
214
201
|
readonly examples: ICommandExample[];
|
|
215
202
|
readonly subcommands: Map<string, ICommand>;
|
|
216
203
|
}
|
|
204
|
+
|
|
217
205
|
/** Execution context */
|
|
218
206
|
interface ICommandContext {
|
|
219
207
|
/** Current command node */
|
|
@@ -233,6 +221,8 @@ interface ICommandContext {
|
|
|
233
221
|
interface ICommandActionParams {
|
|
234
222
|
/** Execution context */
|
|
235
223
|
ctx: ICommandContext;
|
|
224
|
+
/** Effective built-in options for current leaf command */
|
|
225
|
+
builtin: ICommandBuiltinParsedOptions;
|
|
236
226
|
/** Parsed options (keyed by long name) */
|
|
237
227
|
opts: ICommandParsedOpts;
|
|
238
228
|
/** Parsed positional arguments (keyed by argument name) */
|
|
@@ -255,6 +245,92 @@ interface ICommandRunParams {
|
|
|
255
245
|
type ICommandParsedOpts = Record<string, unknown>;
|
|
256
246
|
/** Parsed arguments record */
|
|
257
247
|
type ICommandParsedArgs = Record<string, unknown>;
|
|
248
|
+
/** Input source snapshots for debugging/tracing */
|
|
249
|
+
interface ICommandInputSources {
|
|
250
|
+
preset: {
|
|
251
|
+
state: ICommandPresetSourceState;
|
|
252
|
+
argv: string[];
|
|
253
|
+
envs: Record<string, string>;
|
|
254
|
+
meta?: ICommandPresetSourceMeta;
|
|
255
|
+
};
|
|
256
|
+
user: {
|
|
257
|
+
/** Routed command tokens (name/alias as entered by user) */
|
|
258
|
+
cmds: string[];
|
|
259
|
+
/** Clean user tail argv after removing command chain/control/preset directives */
|
|
260
|
+
argv: string[];
|
|
261
|
+
/** Raw env snapshot from run/parse params */
|
|
262
|
+
envs: Record<string, string | undefined>;
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
/** Built-in run controls */
|
|
266
|
+
interface ICommandControls {
|
|
267
|
+
help: boolean;
|
|
268
|
+
version: boolean;
|
|
269
|
+
}
|
|
270
|
+
/** Built-in option resolution result (internal) */
|
|
271
|
+
interface ICommandBuiltinOptionResolved {
|
|
272
|
+
version: boolean;
|
|
273
|
+
color: boolean;
|
|
274
|
+
devmode: boolean;
|
|
275
|
+
logLevel: boolean;
|
|
276
|
+
silent: boolean;
|
|
277
|
+
logDate: boolean;
|
|
278
|
+
logColorful: boolean;
|
|
279
|
+
}
|
|
280
|
+
/** Built-in config resolution result (internal) */
|
|
281
|
+
interface ICommandBuiltinResolved {
|
|
282
|
+
option: ICommandBuiltinOptionResolved;
|
|
283
|
+
}
|
|
284
|
+
/** Effective built-in options exposed to action/parse result */
|
|
285
|
+
interface ICommandBuiltinParsedOptions {
|
|
286
|
+
devmode: boolean;
|
|
287
|
+
color?: boolean;
|
|
288
|
+
logLevel?: string;
|
|
289
|
+
silent?: boolean;
|
|
290
|
+
logDate?: boolean;
|
|
291
|
+
logColorful?: boolean;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/** Option value type */
|
|
295
|
+
type ICommandOptionType = 'boolean' | 'number' | 'string';
|
|
296
|
+
/** Option argument mode */
|
|
297
|
+
type ICommandOptionArgs = 'none' | 'required' | 'optional' | 'variadic';
|
|
298
|
+
/**
|
|
299
|
+
* Option configuration.
|
|
300
|
+
*
|
|
301
|
+
* `type` and `args` must be specified together. Valid combinations:
|
|
302
|
+
* - boolean + none -> boolean
|
|
303
|
+
* - string + required -> string
|
|
304
|
+
* - string + optional -> string | undefined
|
|
305
|
+
* - number + required -> number
|
|
306
|
+
* - string + variadic -> string[]
|
|
307
|
+
* - number + variadic -> number[]
|
|
308
|
+
*
|
|
309
|
+
* @template T - The type of the option value
|
|
310
|
+
*/
|
|
311
|
+
interface ICommandOptionConfig<T = unknown> {
|
|
312
|
+
/** Long option name (camelCase, required) */
|
|
313
|
+
long: string;
|
|
314
|
+
/** Short option (single character) */
|
|
315
|
+
short?: string;
|
|
316
|
+
/** Value type (required) */
|
|
317
|
+
type: ICommandOptionType;
|
|
318
|
+
/** Argument mode (required) */
|
|
319
|
+
args: ICommandOptionArgs;
|
|
320
|
+
/** Description for help text */
|
|
321
|
+
desc: string;
|
|
322
|
+
/** Whether this option is required (mutually exclusive with default) */
|
|
323
|
+
required?: boolean;
|
|
324
|
+
/** Default value when not provided */
|
|
325
|
+
default?: T;
|
|
326
|
+
/** Allowed values for validation and completion */
|
|
327
|
+
choices?: T extends Array<infer U> ? U[] : T[];
|
|
328
|
+
/** Single value transformation (called for each value, before choices validation) */
|
|
329
|
+
coerce?: (rawValue: string) => T extends Array<infer U> ? U : T;
|
|
330
|
+
/** Callback after parsing, applies value to context */
|
|
331
|
+
apply?: (value: T, ctx: ICommandContext) => void;
|
|
332
|
+
}
|
|
333
|
+
|
|
258
334
|
/** Route stage result */
|
|
259
335
|
interface ICommandRouteResult<TCommand = ICommand> {
|
|
260
336
|
/** Command chain from root to leaf */
|
|
@@ -279,6 +355,8 @@ interface ICommandPresetResult {
|
|
|
279
355
|
tailArgv: string[];
|
|
280
356
|
/** Effective envs after preset merge */
|
|
281
357
|
envs: Record<string, string | undefined>;
|
|
358
|
+
/** Source-attributed argv segments consumed by tokenize */
|
|
359
|
+
segments: ICommandArgvSegment[];
|
|
282
360
|
}
|
|
283
361
|
/** Tokenize stage result */
|
|
284
362
|
interface ICommandTokenizeResult {
|
|
@@ -301,50 +379,6 @@ interface ICommandShiftResult {
|
|
|
301
379
|
/** Remaining tokens to pass to parent */
|
|
302
380
|
remaining: ICommandToken[];
|
|
303
381
|
}
|
|
304
|
-
/** Parse stage result */
|
|
305
|
-
interface ICommandParseResult {
|
|
306
|
-
/** Execution context */
|
|
307
|
-
ctx: ICommandContext;
|
|
308
|
-
/** Parsed options */
|
|
309
|
-
opts: ICommandParsedOpts;
|
|
310
|
-
/** Parsed arguments */
|
|
311
|
-
args: ICommandParsedArgs;
|
|
312
|
-
/** Raw argument strings */
|
|
313
|
-
rawArgs: string[];
|
|
314
|
-
}
|
|
315
|
-
/** Input source snapshots for debugging/tracing */
|
|
316
|
-
interface ICommandInputSources {
|
|
317
|
-
preset: {
|
|
318
|
-
argv: string[];
|
|
319
|
-
envs: Record<string, string>;
|
|
320
|
-
};
|
|
321
|
-
user: {
|
|
322
|
-
/** Routed command tokens (name/alias as entered by user) */
|
|
323
|
-
cmds: string[];
|
|
324
|
-
/** Clean user tail argv after removing command chain/control/preset directives */
|
|
325
|
-
argv: string[];
|
|
326
|
-
/** Raw env snapshot from run/parse params */
|
|
327
|
-
envs: Record<string, string | undefined>;
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
/** Built-in run controls */
|
|
331
|
-
interface ICommandControls {
|
|
332
|
-
help: boolean;
|
|
333
|
-
version: boolean;
|
|
334
|
-
}
|
|
335
|
-
/** Built-in option resolution result (internal) */
|
|
336
|
-
interface ICommandBuiltinOptionResolved {
|
|
337
|
-
version: boolean;
|
|
338
|
-
color: boolean;
|
|
339
|
-
logLevel: boolean;
|
|
340
|
-
silent: boolean;
|
|
341
|
-
logDate: boolean;
|
|
342
|
-
logColorful: boolean;
|
|
343
|
-
}
|
|
344
|
-
/** Built-in config resolution result (internal) */
|
|
345
|
-
interface ICommandBuiltinResolved {
|
|
346
|
-
option: ICommandBuiltinOptionResolved;
|
|
347
|
-
}
|
|
348
382
|
/** Subcommand registry entry (internal) */
|
|
349
383
|
interface ISubcommandEntry<TCommand = ICommand> {
|
|
350
384
|
name: string;
|
|
@@ -381,16 +415,77 @@ interface IHelpData {
|
|
|
381
415
|
commands: IHelpCommandLine[];
|
|
382
416
|
examples: IHelpExampleLine[];
|
|
383
417
|
}
|
|
418
|
+
/** Parse stage result */
|
|
419
|
+
interface ICommandParseResult {
|
|
420
|
+
/** Execution context */
|
|
421
|
+
ctx: ICommandContext;
|
|
422
|
+
/** Effective built-in options for current leaf command */
|
|
423
|
+
builtin: ICommandBuiltinParsedOptions;
|
|
424
|
+
/** Parsed options */
|
|
425
|
+
opts: ICommandParsedOpts;
|
|
426
|
+
/** Parsed arguments */
|
|
427
|
+
args: ICommandParsedArgs;
|
|
428
|
+
/** Raw argument strings */
|
|
429
|
+
rawArgs: string[];
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
type ICommandStage = 'route' | 'control-scan' | 'control-run' | 'preset' | 'tokenize' | 'builtin-resolve' | 'resolve' | 'parse' | 'run';
|
|
433
|
+
type ICommandIssueKind = 'error' | 'hint';
|
|
434
|
+
interface ICommandIssueSourceAttribution {
|
|
435
|
+
primary?: ICommandTokenSource;
|
|
436
|
+
related?: ICommandTokenSource[];
|
|
437
|
+
}
|
|
438
|
+
type ICommandIssueScope = 'control' | 'preset' | 'option' | 'argument' | 'command' | 'runtime' | 'action';
|
|
439
|
+
type ICommandErrorIssueCode = 'invalid_option_format' | 'invalid_negative_option' | 'negative_option_with_value' | 'negative_option_type' | 'unknown_option' | 'unknown_subcommand' | 'unexpected_argument' | 'missing_value' | 'invalid_type' | 'unsupported_short_syntax' | 'option_conflict' | 'missing_required' | 'invalid_choice' | 'invalid_boolean_value' | 'missing_required_argument' | 'too_many_arguments' | 'configuration_error' | 'action_failed';
|
|
440
|
+
type ICommandHintIssueCode = 'preset_token_injected' | 'mixed_source_conflict' | 'did_you_mean_subcommand' | 'command_does_not_accept_positional_arguments';
|
|
441
|
+
type ICommandIssueCode = ICommandErrorIssueCode | ICommandHintIssueCode;
|
|
442
|
+
interface ICommandIssueReason {
|
|
443
|
+
code: ICommandIssueCode;
|
|
444
|
+
message: string;
|
|
445
|
+
details?: Record<string, unknown>;
|
|
446
|
+
}
|
|
447
|
+
interface ICommandIssueBase {
|
|
448
|
+
kind: ICommandIssueKind;
|
|
449
|
+
stage: ICommandStage;
|
|
450
|
+
originStage?: ICommandStage;
|
|
451
|
+
source?: ICommandIssueSourceAttribution;
|
|
452
|
+
scope: ICommandIssueScope;
|
|
453
|
+
preset?: ICommandPresetIssueMeta;
|
|
454
|
+
}
|
|
455
|
+
interface ICommandErrorIssue extends ICommandIssueBase {
|
|
456
|
+
kind: 'error';
|
|
457
|
+
reason: Omit<ICommandIssueReason, 'code'> & {
|
|
458
|
+
code: ICommandErrorIssueCode;
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
interface ICommandHintIssue extends ICommandIssueBase {
|
|
462
|
+
kind: 'hint';
|
|
463
|
+
reason: Omit<ICommandIssueReason, 'code'> & {
|
|
464
|
+
code: ICommandHintIssueCode;
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
type ICommandIssue = ICommandErrorIssue | ICommandHintIssue;
|
|
468
|
+
interface ICommandErrorMeta {
|
|
469
|
+
commandPath: string;
|
|
470
|
+
token?: string;
|
|
471
|
+
option?: string;
|
|
472
|
+
argument?: string;
|
|
473
|
+
issues: ICommandIssue[];
|
|
474
|
+
}
|
|
384
475
|
/** Error kinds for command parsing */
|
|
385
|
-
type ICommanderErrorKind = 'InvalidOptionFormat' | 'InvalidNegativeOption' | 'NegativeOptionWithValue' | 'NegativeOptionType' | 'UnknownOption' | 'UnknownSubcommand' | 'UnexpectedArgument' | 'MissingValue' | 'InvalidType' | 'UnsupportedShortSyntax' | 'OptionConflict' | 'MissingRequired' | 'InvalidChoice' | 'InvalidBooleanValue' | 'MissingRequiredArgument' | 'TooManyArguments' | 'ConfigurationError';
|
|
476
|
+
type ICommanderErrorKind = 'InvalidOptionFormat' | 'InvalidNegativeOption' | 'NegativeOptionWithValue' | 'NegativeOptionType' | 'UnknownOption' | 'UnknownSubcommand' | 'UnexpectedArgument' | 'MissingValue' | 'InvalidType' | 'UnsupportedShortSyntax' | 'OptionConflict' | 'MissingRequired' | 'InvalidChoice' | 'InvalidBooleanValue' | 'MissingRequiredArgument' | 'TooManyArguments' | 'ConfigurationError' | 'ActionFailed';
|
|
386
477
|
/** Commander error with structured information */
|
|
387
478
|
declare class CommanderError extends Error {
|
|
388
479
|
readonly kind: ICommanderErrorKind;
|
|
389
480
|
readonly commandPath: string;
|
|
390
|
-
|
|
481
|
+
readonly meta: ICommandErrorMeta | undefined;
|
|
482
|
+
constructor(kind: ICommanderErrorKind, message: string, commandPath: string, meta?: ICommandErrorMeta);
|
|
483
|
+
withIssue(issue: ICommandIssue): CommanderError;
|
|
484
|
+
withIssues(issues: ICommandIssue[]): CommanderError;
|
|
391
485
|
/** Format error with help hint */
|
|
392
486
|
format(): string;
|
|
393
487
|
}
|
|
488
|
+
|
|
394
489
|
/** Shell type for completion */
|
|
395
490
|
type ICompletionShellType = 'bash' | 'fish' | 'pwsh';
|
|
396
491
|
/** Option metadata for completion */
|
|
@@ -462,7 +557,7 @@ declare function createNodeCommandRuntime(): ICommandRuntime;
|
|
|
462
557
|
/**
|
|
463
558
|
* Command class - CLI command builder with fluent API
|
|
464
559
|
*
|
|
465
|
-
* Execution flow: route → control-scan → run
|
|
560
|
+
* Execution flow: route → control-scan → control-run(run) → preset → tokenize → builtin-resolve → resolve → parse → run
|
|
466
561
|
*
|
|
467
562
|
* @module @guanghechen/commander
|
|
468
563
|
*/
|
|
@@ -521,36 +616,6 @@ declare function isDomain(rawValue: string): boolean;
|
|
|
521
616
|
* @module @guanghechen/commander/options
|
|
522
617
|
*/
|
|
523
618
|
|
|
524
|
-
/**
|
|
525
|
-
* Pre-defined --log-level option for setting log verbosity.
|
|
526
|
-
*
|
|
527
|
-
* Supports: debug | info | hint | warn | error (case-insensitive)
|
|
528
|
-
*
|
|
529
|
-
* | Property | Value |
|
|
530
|
-
* | --------- | ---------------------------------- |
|
|
531
|
-
* | long | 'logLevel' |
|
|
532
|
-
* | type | 'string' |
|
|
533
|
-
* | args | 'required' |
|
|
534
|
-
* | default | 'info' |
|
|
535
|
-
* | choices | LOG_LEVELS |
|
|
536
|
-
* | coerce | resolveLogLevel (case-insensitive) |
|
|
537
|
-
* | apply | ctx.reporter.setLevel(value) |
|
|
538
|
-
*
|
|
539
|
-
* @example
|
|
540
|
-
* ```typescript
|
|
541
|
-
* import { logLevelOption } from '@guanghechen/commander'
|
|
542
|
-
*
|
|
543
|
-
* const cmd = new Command('app')
|
|
544
|
-
* .option(logLevelOption)
|
|
545
|
-
* .action(({ opts }) => {
|
|
546
|
-
* console.log(opts.logLevel) // 'debug' | 'info' | 'hint' | 'warn' | 'error'
|
|
547
|
-
* })
|
|
548
|
-
*
|
|
549
|
-
* // Override with spread syntax
|
|
550
|
-
* .option({ ...logLevelOption, default: 'warn' })
|
|
551
|
-
* ```
|
|
552
|
-
*/
|
|
553
|
-
declare const logLevelOption: ICommandOptionConfig<string>;
|
|
554
619
|
/**
|
|
555
620
|
* Pre-defined --log-date option for controlling timestamp output.
|
|
556
621
|
*
|
|
@@ -585,7 +650,7 @@ declare const logColorfulOption: ICommandOptionConfig<boolean>;
|
|
|
585
650
|
*
|
|
586
651
|
* @example
|
|
587
652
|
* ```typescript
|
|
588
|
-
* import { silentOption } from '@guanghechen/commander'
|
|
653
|
+
* import { silentOption } from '@guanghechen/commander/browser'
|
|
589
654
|
*
|
|
590
655
|
* const cmd = new Command('app')
|
|
591
656
|
* .option(silentOption)
|
|
@@ -660,5 +725,5 @@ declare class PwshCompletion {
|
|
|
660
725
|
generate(): string;
|
|
661
726
|
}
|
|
662
727
|
|
|
663
|
-
export { BashCompletion, Coerce, Command, CommanderError, CompletionCommand, FishCompletion, PwshCompletion, createBrowserCommandRuntime, createNodeCommandRuntime, getDefaultCommandRuntime, isDomain, isIp, isIpv4, isIpv6, logColorfulOption, logDateOption,
|
|
664
|
-
export type { ICommand, ICommandAction, ICommandActionParams, ICommandArgumentConfig, ICommandArgumentKind, ICommandArgumentType, ICommandBuiltinConfig, ICommandBuiltinOptionConfig, ICommandBuiltinOptionResolved, ICommandBuiltinResolved, ICommandConfig, ICommandContext, ICommandControlScanResult, ICommandControls, ICommandExample, ICommandInputSources, ICommandOptionArgs, ICommandOptionConfig, ICommandOptionType, ICommandParseResult, ICommandParsedArgs, ICommandParsedOpts, ICommandPresetConfig, ICommandPresetProfileDefaults, ICommandPresetProfileItem, ICommandPresetProfileManifest, ICommandPresetProfileOptionValue, ICommandPresetProfileVariantItem, ICommandPresetResult, ICommandResolveResult, ICommandRouteResult, ICommandRunParams, ICommandRuntime, ICommandRuntimeStats, ICommandShiftResult, ICommandToken, ICommandTokenType, ICommandTokenizeResult, ICommanderErrorKind, ICompletionArgumentMeta, ICompletionCommandConfig, ICompletionMeta, ICompletionOptionMeta, ICompletionPaths, ICompletionShellType, IHelpArgumentLine, IHelpCommandLine, IHelpData, IHelpExampleLine, IHelpOptionLine, ISubcommandEntry };
|
|
728
|
+
export { BashCompletion, Coerce, Command, CommanderError, CompletionCommand, FishCompletion, PwshCompletion, createBrowserCommandRuntime, createNodeCommandRuntime, getDefaultCommandRuntime, isDomain, isIp, isIpv4, isIpv6, logColorfulOption, logDateOption, setDefaultCommandRuntime, silentOption };
|
|
729
|
+
export type { ICommand, ICommandAction, ICommandActionParams, ICommandArgumentConfig, ICommandArgumentKind, ICommandArgumentType, ICommandArgvSegment, ICommandBuiltinConfig, ICommandBuiltinOptionConfig, ICommandBuiltinOptionResolved, ICommandBuiltinParsedOptions, ICommandBuiltinResolved, ICommandConfig, ICommandContext, ICommandControlScanResult, ICommandControls, ICommandErrorIssue, ICommandErrorIssueCode, ICommandErrorMeta, ICommandExample, ICommandHintIssue, ICommandHintIssueCode, ICommandInputSources, ICommandIssue, ICommandIssueBase, ICommandIssueCode, ICommandIssueKind, ICommandIssueReason, ICommandIssueScope, ICommandIssueSourceAttribution, ICommandOptionArgs, ICommandOptionConfig, ICommandOptionType, ICommandParseResult, ICommandParsedArgs, ICommandParsedOpts, ICommandPresetConfig, ICommandPresetIssueMeta, ICommandPresetProfileDefaults, ICommandPresetProfileItem, ICommandPresetProfileManifest, ICommandPresetProfileOptionValue, ICommandPresetProfileVariantItem, ICommandPresetResult, ICommandPresetSourceMeta, ICommandPresetSourceState, ICommandResolveResult, ICommandRouteResult, ICommandRunParams, ICommandRuntime, ICommandRuntimeStats, ICommandShiftResult, ICommandStage, ICommandToken, ICommandTokenSource, ICommandTokenType, ICommandTokenizeResult, ICommanderErrorKind, ICompletionArgumentMeta, ICompletionCommandConfig, ICompletionMeta, ICompletionOptionMeta, ICompletionPaths, ICompletionShellType, IHelpArgumentLine, IHelpCommandLine, IHelpData, IHelpExampleLine, IHelpOptionLine, ISubcommandEntry };
|