@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.
@@ -0,0 +1,152 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://guanghechen.github.io/sora/schemas/commander/preset.schema.json",
4
+ "title": "Commander Preset Config",
5
+ "description": "Preset profile manifest for @guanghechen/commander --preset-file.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["version", "profiles"],
9
+ "examples": [
10
+ {
11
+ "version": 1,
12
+ "defaults": { "profile": "dev:local" },
13
+ "profiles": {
14
+ "dev": {
15
+ "envFile": "dev.env",
16
+ "envs": { "NODE_ENV": "development" },
17
+ "opts": { "logLevel": "debug", "retry": 2 },
18
+ "defaultVariant": "local",
19
+ "variants": {
20
+ "local": { "opts": { "retry": 1 } },
21
+ "ci": { "envFile": "ci.env", "envs": { "CI": "1" } }
22
+ }
23
+ }
24
+ }
25
+ }
26
+ ],
27
+ "properties": {
28
+ "$schema": {
29
+ "type": "string",
30
+ "description": "Optional schema reference for editors (e.g. VSCode)."
31
+ },
32
+ "version": {
33
+ "type": "integer",
34
+ "const": 1,
35
+ "description": "Schema version."
36
+ },
37
+ "defaults": {
38
+ "type": "object",
39
+ "additionalProperties": false,
40
+ "properties": {
41
+ "profile": {
42
+ "$ref": "#/$defs/profileSelector"
43
+ }
44
+ },
45
+ "description": "Default selector when --preset-profile is not provided."
46
+ },
47
+ "profiles": {
48
+ "type": "object",
49
+ "minProperties": 1,
50
+ "propertyNames": {
51
+ "$ref": "#/$defs/profileName"
52
+ },
53
+ "additionalProperties": {
54
+ "$ref": "#/$defs/profileItem"
55
+ },
56
+ "description": "Profiles keyed by profile name."
57
+ }
58
+ },
59
+ "$defs": {
60
+ "profileName": {
61
+ "type": "string",
62
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$",
63
+ "description": "Profile/variant name."
64
+ },
65
+ "profileSelector": {
66
+ "type": "string",
67
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?::[A-Za-z0-9][A-Za-z0-9._-]*)?$",
68
+ "description": "Selector format: <profile> or <profile>:<variant>."
69
+ },
70
+ "optionName": {
71
+ "type": "string",
72
+ "pattern": "^(?:--)?(?:[a-z][a-zA-Z0-9]*|[A-Za-z][A-Za-z0-9]*(?:-[A-Za-z0-9]+)+)$",
73
+ "description": "Option key in opts map; aligned with runtime normalization."
74
+ },
75
+ "optionValue": {
76
+ "oneOf": [
77
+ { "type": "boolean" },
78
+ { "type": "string" },
79
+ { "type": "number" },
80
+ {
81
+ "type": "array",
82
+ "items": {
83
+ "oneOf": [{ "type": "string" }, { "type": "number" }]
84
+ }
85
+ }
86
+ ]
87
+ },
88
+ "envMap": {
89
+ "type": "object",
90
+ "additionalProperties": {
91
+ "type": "string"
92
+ }
93
+ },
94
+ "optsMap": {
95
+ "type": "object",
96
+ "propertyNames": {
97
+ "$ref": "#/$defs/optionName"
98
+ },
99
+ "additionalProperties": {
100
+ "$ref": "#/$defs/optionValue"
101
+ }
102
+ },
103
+ "variantItem": {
104
+ "type": "object",
105
+ "additionalProperties": false,
106
+ "properties": {
107
+ "envFile": {
108
+ "type": "string",
109
+ "minLength": 1
110
+ },
111
+ "envs": {
112
+ "$ref": "#/$defs/envMap"
113
+ },
114
+ "opts": {
115
+ "$ref": "#/$defs/optsMap"
116
+ }
117
+ }
118
+ },
119
+ "variantsMap": {
120
+ "type": "object",
121
+ "propertyNames": {
122
+ "$ref": "#/$defs/profileName"
123
+ },
124
+ "additionalProperties": {
125
+ "$ref": "#/$defs/variantItem"
126
+ }
127
+ },
128
+ "profileItem": {
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "properties": {
132
+ "envFile": {
133
+ "type": "string",
134
+ "minLength": 1
135
+ },
136
+ "envs": {
137
+ "$ref": "#/$defs/envMap"
138
+ },
139
+ "opts": {
140
+ "$ref": "#/$defs/optsMap"
141
+ },
142
+ "defaultVariant": {
143
+ "$ref": "#/$defs/profileName"
144
+ },
145
+ "variants": {
146
+ "$ref": "#/$defs/variantsMap"
147
+ }
148
+ },
149
+ "description": "defaultVariant existence in variants must still be validated by runtime."
150
+ }
151
+ }
152
+ }
@@ -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
- /** Option value type */
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
- constructor(kind: ICommanderErrorKind, message: string, commandPath: string);
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 */
@@ -454,7 +549,7 @@ interface ICompletionCommandConfig {
454
549
  /**
455
550
  * Command class - CLI command builder with fluent API
456
551
  *
457
- * Execution flow: route → control-scan → run-control(run) → preset → tokenize → resolve → parse → run
552
+ * Execution flow: route → control-scan → control-run(run) → preset → tokenize → builtin-resolve → resolve → parse → run
458
553
  *
459
554
  * @module @guanghechen/commander
460
555
  */
@@ -513,36 +608,6 @@ declare function isDomain(rawValue: string): boolean;
513
608
  * @module @guanghechen/commander/options
514
609
  */
515
610
 
516
- /**
517
- * Pre-defined --log-level option for setting log verbosity.
518
- *
519
- * Supports: debug | info | hint | warn | error (case-insensitive)
520
- *
521
- * | Property | Value |
522
- * | --------- | ---------------------------------- |
523
- * | long | 'logLevel' |
524
- * | type | 'string' |
525
- * | args | 'required' |
526
- * | default | 'info' |
527
- * | choices | LOG_LEVELS |
528
- * | coerce | resolveLogLevel (case-insensitive) |
529
- * | apply | ctx.reporter.setLevel(value) |
530
- *
531
- * @example
532
- * ```typescript
533
- * import { logLevelOption } from '@guanghechen/commander'
534
- *
535
- * const cmd = new Command('app')
536
- * .option(logLevelOption)
537
- * .action(({ opts }) => {
538
- * console.log(opts.logLevel) // 'debug' | 'info' | 'hint' | 'warn' | 'error'
539
- * })
540
- *
541
- * // Override with spread syntax
542
- * .option({ ...logLevelOption, default: 'warn' })
543
- * ```
544
- */
545
- declare const logLevelOption: ICommandOptionConfig<string>;
546
611
  /**
547
612
  * Pre-defined --log-date option for controlling timestamp output.
548
613
  *
@@ -577,7 +642,7 @@ declare const logColorfulOption: ICommandOptionConfig<boolean>;
577
642
  *
578
643
  * @example
579
644
  * ```typescript
580
- * import { silentOption } from '@guanghechen/commander'
645
+ * import { silentOption } from '@guanghechen/commander/browser'
581
646
  *
582
647
  * const cmd = new Command('app')
583
648
  * .option(silentOption)
@@ -607,5 +672,5 @@ declare function createBrowserCommandRuntime(): ICommandRuntime;
607
672
  declare function getDefaultCommandRuntime(): ICommandRuntime;
608
673
  declare function setDefaultCommandRuntime(runtime: ICommandRuntime): void;
609
674
 
610
- export { Coerce, Command, CommanderError, createBrowserCommandRuntime, getDefaultCommandRuntime, isDomain, isIp, isIpv4, isIpv6, logColorfulOption, logDateOption, logLevelOption, setDefaultCommandRuntime, silentOption };
611
- 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 };
675
+ export { Coerce, Command, CommanderError, createBrowserCommandRuntime, getDefaultCommandRuntime, isDomain, isIp, isIpv4, isIpv6, logColorfulOption, logDateOption, setDefaultCommandRuntime, silentOption };
676
+ 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 };