@kjanat/dreamcli 4.1.0 → 4.2.0
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/dist/{adapter-YM5QGi3M.d.mts → adapter-DsmEc0WO.d.mts} +5 -1
- package/dist/{completion-CUMeOnAz.mjs → completion-BYhuYn2Q.mjs} +4 -4
- package/dist/completion.d.mts +1 -1
- package/dist/completion.mjs +1 -1
- package/dist/config-BgJZ-X4r.mjs +1 -0
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/core-B4Twhd48.mjs +18 -0
- package/dist/index-B3_9MlHz.d.mts +131 -0
- package/dist/{index-BziI2aKc.d.mts → index-B6oD4_8b.d.mts} +74 -12
- package/dist/{index-DWsnGZlx.d.mts → index-B_1Dmsdq.d.mts} +12 -136
- package/dist/{index-3l8uj16E.d.mts → index-C5CYWtxn.d.mts} +9 -6
- package/dist/{index-Cap0MA2V.d.mts → index-CaRNJH2R.d.mts} +5 -1
- package/dist/{index-Cp9kt2t-.d.mts → index-Cj7kXwQH.d.mts} +1 -1
- package/dist/{index-BAj2y70U.d.mts → index-eF7SkQzQ.d.mts} +4 -4
- package/dist/index.d.mts +8 -7
- package/dist/index.mjs +1 -1
- package/dist/json-schema-DVyfq4bA.mjs +52 -0
- package/dist/json-schema.d.mts +1 -1
- package/dist/json-schema.mjs +1 -1
- package/dist/package-json-fYhxDdWD.mjs +3 -0
- package/dist/prompt.d.mts +36 -3
- package/dist/prompt.mjs +1 -1
- package/dist/runtime.d.mts +2 -2
- package/dist/runtime.mjs +1 -1
- package/dist/session-CQsnVijE.mjs +1 -0
- package/dist/terminal-cbye9mKF.mjs +7 -0
- package/dist/test-prompter-Ddkt9n5A.mjs +1 -0
- package/dist/testkit.d.mts +4 -4
- package/dist/testkit.mjs +1 -1
- package/dist/version.mjs +1 -1
- package/dreamcli.schema.json +15 -1
- package/package.json +20 -20
- package/skills/cli-creation/SKILL.md +1 -1
- package/skills/cli-creation/scripts/scaffold_cli.py +12 -4
- package/dist/config-CrlScpYX.mjs +0 -1
- package/dist/core-DvXUolc_.mjs +0 -17
- package/dist/json-schema-DRlrz_IV.mjs +0 -52
- package/dist/package-json-BgE9YjjQ.mjs +0 -3
- package/dist/terminal-C8KTXjv5.mjs +0 -6
- package/dist/test-prompter-v__jT2yG.mjs +0 -1
|
@@ -322,12 +322,13 @@ type NumberConstraintViolation = {
|
|
|
322
322
|
* @module dreamcli/core/schema/prompt
|
|
323
323
|
*/
|
|
324
324
|
/** All prompt kind discriminators as a runtime array. */
|
|
325
|
-
declare const PROMPT_KINDS: readonly ["confirm", "input", "select", "multiselect"];
|
|
325
|
+
declare const PROMPT_KINDS: readonly ["confirm", "input", "password", "select", "multiselect"];
|
|
326
326
|
/**
|
|
327
327
|
* The kind of interactive prompt to present.
|
|
328
328
|
*
|
|
329
329
|
* - `'confirm'` — yes/no boolean question
|
|
330
330
|
* - `'input'` — free-text string input
|
|
331
|
+
* - `'password'` — hidden text input, preserving whitespace
|
|
331
332
|
* - `'select'` — single selection from a list
|
|
332
333
|
* - `'multiselect'` — multiple selections from a list
|
|
333
334
|
*/
|
|
@@ -336,6 +337,8 @@ type PromptKind = (typeof PROMPT_KINDS)[number];
|
|
|
336
337
|
interface PromptConfigBase {
|
|
337
338
|
/** The question displayed to the user. */
|
|
338
339
|
readonly message: string;
|
|
340
|
+
/** Suppress framework-controlled value hints and diagnostics. */
|
|
341
|
+
readonly sensitive?: boolean;
|
|
339
342
|
}
|
|
340
343
|
/** Yes/no confirmation prompt — maps to `boolean` flags. Part of {@link PromptConfig}. */
|
|
341
344
|
interface ConfirmPromptConfig extends PromptConfigBase {
|
|
@@ -354,6 +357,10 @@ interface InputPromptConfig extends PromptConfigBase {
|
|
|
354
357
|
readonly kind: 'input';
|
|
355
358
|
/** Placeholder text shown before user types (informational only). */
|
|
356
359
|
readonly placeholder?: string;
|
|
360
|
+
/** Trim surrounding whitespace. Defaults to `true` for compatibility. */
|
|
361
|
+
readonly trim?: boolean;
|
|
362
|
+
/** Empty submission policy. Defaults to `skip` (fall through to input defaults). */
|
|
363
|
+
readonly empty?: 'skip' | 'accept' | 'retry';
|
|
357
364
|
/**
|
|
358
365
|
* Value used when the user submits an empty line (presses Enter), shown in
|
|
359
366
|
* the hint as `(default: <value>)`. When set, an empty submission resolves
|
|
@@ -367,7 +374,16 @@ interface InputPromptConfig extends PromptConfigBase {
|
|
|
367
374
|
* Inline validation function. Return `true` if valid, or a string
|
|
368
375
|
* error message if invalid. Called before coercion to flag kind.
|
|
369
376
|
*/
|
|
370
|
-
readonly validate?: (value: string) => true | string
|
|
377
|
+
readonly validate?: (value: string) => true | string | Promise<true | string>;
|
|
378
|
+
}
|
|
379
|
+
/** Hidden text entry. Whitespace is preserved and defaults are never displayed or accepted. */
|
|
380
|
+
interface PasswordPromptConfig extends PromptConfigBase {
|
|
381
|
+
/** Request terminal echo suppression; unsupported hosts must reject before reading. */
|
|
382
|
+
readonly kind: 'password';
|
|
383
|
+
/** Empty submission policy. Defaults to `retry`. */
|
|
384
|
+
readonly empty?: 'accept' | 'retry';
|
|
385
|
+
/** Validate the unchanged password; invalid answers may be corrected. */
|
|
386
|
+
readonly validate?: (value: string) => true | string | Promise<true | string>;
|
|
371
387
|
}
|
|
372
388
|
/** Single-selection prompt — maps to `enum` flags or any flag with {@link SelectChoice choices}. Part of {@link PromptConfig}. */
|
|
373
389
|
interface SelectPromptConfig extends PromptConfigBase {
|
|
@@ -424,12 +440,12 @@ interface SelectChoice {
|
|
|
424
440
|
* }
|
|
425
441
|
* ```
|
|
426
442
|
*/
|
|
427
|
-
type PromptConfig = ConfirmPromptConfig | InputPromptConfig | SelectPromptConfig | MultiselectPromptConfig;
|
|
443
|
+
type PromptConfig = ConfirmPromptConfig | InputPromptConfig | PasswordPromptConfig | SelectPromptConfig | MultiselectPromptConfig;
|
|
428
444
|
/**
|
|
429
445
|
* The raw result returned by a prompt engine for a single prompt.
|
|
430
446
|
*
|
|
431
447
|
* - `answered: true` — user provided a value
|
|
432
|
-
* - `answered: false` —
|
|
448
|
+
* - `answered: false` — no answer; cancellation unless `reason: 'invalid'`
|
|
433
449
|
*
|
|
434
450
|
* Coercion to the flag's kind is the resolver's responsibility, not the
|
|
435
451
|
* prompt engine's.
|
|
@@ -440,8 +456,10 @@ type PromptResult = {
|
|
|
440
456
|
/** The raw value from the prompt engine (not yet coerced). */
|
|
441
457
|
readonly value: unknown;
|
|
442
458
|
} | {
|
|
443
|
-
/**
|
|
459
|
+
/** No answer was provided. */
|
|
444
460
|
readonly answered: false;
|
|
461
|
+
/** Retry exhaustion; omitted for cancellation or EOF. */
|
|
462
|
+
readonly reason?: 'invalid';
|
|
445
463
|
};
|
|
446
464
|
//#endregion
|
|
447
465
|
//#region src/core/schema/standard.d.ts
|
|
@@ -871,7 +889,7 @@ type InferFlags<T extends Record<string, FlagBuilder<FlagConfig>>> = { [K in key
|
|
|
871
889
|
* - `'count'` / `'keyValue'` → `never` (not promptable)
|
|
872
890
|
*/
|
|
873
891
|
type PromptConfigByFlagKind = {
|
|
874
|
-
readonly string: InputPromptConfig | SelectPromptConfig;
|
|
892
|
+
readonly string: InputPromptConfig | PasswordPromptConfig | SelectPromptConfig;
|
|
875
893
|
readonly number: InputPromptConfig;
|
|
876
894
|
readonly boolean: ConfirmPromptConfig;
|
|
877
895
|
readonly enum: SelectPromptConfig | InputPromptConfig;
|
|
@@ -2456,7 +2474,7 @@ type ArgDefaultValue<C extends ArgConfig> = C['argKind'] extends 'keyValue' ? C[
|
|
|
2456
2474
|
* - `'keyValue'` → `never` (not promptable)
|
|
2457
2475
|
*/
|
|
2458
2476
|
type PromptConfigByArgKind = {
|
|
2459
|
-
readonly string: InputPromptConfig | SelectPromptConfig;
|
|
2477
|
+
readonly string: InputPromptConfig | PasswordPromptConfig | SelectPromptConfig;
|
|
2460
2478
|
readonly number: InputPromptConfig;
|
|
2461
2479
|
readonly boolean: ConfirmPromptConfig;
|
|
2462
2480
|
readonly enum: SelectPromptConfig | InputPromptConfig;
|
|
@@ -3829,6 +3847,39 @@ declare const OUTPUT_VERBOSITY_LEVELS: readonly ["normal", "quiet"];
|
|
|
3829
3847
|
/** Stable text verbosity labels. */
|
|
3830
3848
|
type Verbosity = (typeof OUTPUT_VERBOSITY_LEVELS)[number];
|
|
3831
3849
|
//#endregion
|
|
3850
|
+
//#region src/core/prompt/definitions.d.ts
|
|
3851
|
+
/** Infer an answer, preserving literal choice values. */
|
|
3852
|
+
type InferPrompt<C extends PromptConfig> = C extends ConfirmPromptConfig ? boolean : C extends {
|
|
3853
|
+
readonly kind: 'multiselect';
|
|
3854
|
+
readonly choices: readonly (infer Choice extends SelectChoice)[];
|
|
3855
|
+
} ? Choice['value'][] : C extends {
|
|
3856
|
+
readonly kind: 'select';
|
|
3857
|
+
readonly choices: readonly (infer Choice extends SelectChoice)[];
|
|
3858
|
+
} ? Choice['value'] : C extends MultiselectPromptConfig ? string[] : string;
|
|
3859
|
+
/** Standalone selections cannot inherit choices from a flag or argument schema. */
|
|
3860
|
+
type StandalonePromptConfig = InputPromptConfig | PasswordPromptConfig | ConfirmPromptConfig | ((SelectPromptConfig | MultiselectPromptConfig) & {
|
|
3861
|
+
readonly choices: readonly [SelectChoice, ...SelectChoice[]];
|
|
3862
|
+
});
|
|
3863
|
+
/** Ask one question with explicit, non-empty selection choices. Cancellation rejects with `PromptCancelledError`. */
|
|
3864
|
+
type Ask = <const C extends StandalonePromptConfig>(config: C) => Promise<InferPrompt<C>>;
|
|
3865
|
+
/** Build reusable definitions for schemas, handler-level `ask`, and standalone sessions. */
|
|
3866
|
+
declare const prompt: {
|
|
3867
|
+
/** Text input; empty answers retry unless an explicit policy/default is supplied. */
|
|
3868
|
+
input(options: Omit<InputPromptConfig, 'kind'>): InputPromptConfig;
|
|
3869
|
+
/** Hidden input, preserving all surrounding whitespace. */
|
|
3870
|
+
password(options: Omit<PasswordPromptConfig, 'kind'>): PasswordPromptConfig;
|
|
3871
|
+
/** Yes/no question. */
|
|
3872
|
+
confirm(options: Omit<ConfirmPromptConfig, 'kind'>): ConfirmPromptConfig;
|
|
3873
|
+
/** Select one typed string value. Standalone definitions require explicit choices. */
|
|
3874
|
+
select<const C extends Omit<SelectPromptConfig, 'kind'>>(options: C): C & {
|
|
3875
|
+
kind: 'select';
|
|
3876
|
+
};
|
|
3877
|
+
/** Select several typed string values. */
|
|
3878
|
+
multiselect<const C extends Omit<MultiselectPromptConfig, 'kind'>>(options: C): C & {
|
|
3879
|
+
kind: 'multiselect';
|
|
3880
|
+
};
|
|
3881
|
+
};
|
|
3882
|
+
//#endregion
|
|
3832
3883
|
//#region src/core/schema/middleware.d.ts
|
|
3833
3884
|
/**
|
|
3834
3885
|
* Parameters received by a middleware function at runtime.
|
|
@@ -3854,6 +3905,8 @@ interface MiddlewareParams {
|
|
|
3854
3905
|
readonly ctx: Readonly<Record<string, unknown>>;
|
|
3855
3906
|
/** Output channel. */
|
|
3856
3907
|
readonly out: Out;
|
|
3908
|
+
/** Invocation-scoped interactive questions. */
|
|
3909
|
+
readonly ask: Ask;
|
|
3857
3910
|
/** CLI program metadata (name, bin, version, command). */
|
|
3858
3911
|
readonly meta: CommandMeta;
|
|
3859
3912
|
/**
|
|
@@ -3884,6 +3937,8 @@ type MiddlewareHandler<Output extends Record<string, unknown>> = (params: {
|
|
|
3884
3937
|
readonly sources: ErasedInputSources;
|
|
3885
3938
|
readonly ctx: Readonly<Record<string, unknown>>;
|
|
3886
3939
|
readonly out: Out;
|
|
3940
|
+
/** Invocation-scoped interactive questions. */
|
|
3941
|
+
readonly ask: Ask;
|
|
3887
3942
|
readonly meta: CommandMeta;
|
|
3888
3943
|
/** Pass context additions downstream. Must include all `Output` properties. */
|
|
3889
3944
|
readonly next: (additions: Output) => Promise<void>;
|
|
@@ -4367,6 +4422,8 @@ interface ActionParams<F extends Record<string, FlagBuilder<FlagConfig>>, A exte
|
|
|
4367
4422
|
readonly ctx: Readonly<C>;
|
|
4368
4423
|
/** Structured output channel for stdout, stderr, JSON, tables, and spinners. */
|
|
4369
4424
|
readonly out: Out;
|
|
4425
|
+
/** Ask a typed question after selecting the operation or receiving a server challenge. */
|
|
4426
|
+
readonly ask: Ask;
|
|
4370
4427
|
/** Runtime metadata about the CLI program and current command. */
|
|
4371
4428
|
readonly meta: CommandMeta;
|
|
4372
4429
|
}
|
|
@@ -4396,6 +4453,8 @@ type ErasedActionHandler = (params: {
|
|
|
4396
4453
|
readonly sources: ErasedInputSources;
|
|
4397
4454
|
readonly ctx: Readonly<Record<string, unknown>>;
|
|
4398
4455
|
readonly out: Out;
|
|
4456
|
+
/** Ask a typed question after selecting the operation or receiving a server challenge. */
|
|
4457
|
+
readonly ask: Ask;
|
|
4399
4458
|
readonly meta: CommandMeta;
|
|
4400
4459
|
}) => void | Promise<void>;
|
|
4401
4460
|
/**
|
|
@@ -4432,6 +4491,8 @@ type ErasedDeriveHandler = (params: {
|
|
|
4432
4491
|
readonly sources: ErasedInputSources;
|
|
4433
4492
|
readonly ctx: Readonly<Record<string, unknown>>;
|
|
4434
4493
|
readonly out: Out;
|
|
4494
|
+
/** Ask a typed question after selecting the operation or receiving a server challenge. */
|
|
4495
|
+
readonly ask: Ask;
|
|
4435
4496
|
readonly meta: CommandMeta;
|
|
4436
4497
|
}) => undefined | Readonly<Record<string, unknown>> | Promise<undefined | Readonly<Record<string, unknown>>>;
|
|
4437
4498
|
/**
|
|
@@ -5167,7 +5228,7 @@ declare function group(name: string): CommandBuilder;
|
|
|
5167
5228
|
* The resolution chain populates choices from `FlagSchema.enumValues`
|
|
5168
5229
|
* when the user's {@linkcode PromptConfig} omits them.
|
|
5169
5230
|
*/
|
|
5170
|
-
interface ResolvedSelectPromptConfig {
|
|
5231
|
+
interface ResolvedSelectPromptConfig extends PromptConfigBase {
|
|
5171
5232
|
/** Discriminant — single-choice selection prompt. */
|
|
5172
5233
|
readonly kind: 'select';
|
|
5173
5234
|
/** User-facing question text. */
|
|
@@ -5181,7 +5242,7 @@ interface ResolvedSelectPromptConfig {
|
|
|
5181
5242
|
* Same guarantee as {@linkcode ResolvedSelectPromptConfig} — choices are always
|
|
5182
5243
|
* present and non-empty.
|
|
5183
5244
|
*/
|
|
5184
|
-
interface ResolvedMultiselectPromptConfig {
|
|
5245
|
+
interface ResolvedMultiselectPromptConfig extends PromptConfigBase {
|
|
5185
5246
|
/** Discriminant — multiple-choice selection prompt. */
|
|
5186
5247
|
readonly kind: 'multiselect';
|
|
5187
5248
|
/** User-facing question text. */
|
|
@@ -5200,7 +5261,7 @@ interface ResolvedMultiselectPromptConfig {
|
|
|
5200
5261
|
*
|
|
5201
5262
|
* confirm and input configs pass through unchanged.
|
|
5202
5263
|
*/
|
|
5203
|
-
type ResolvedPromptConfig = ConfirmPromptConfig | InputPromptConfig | ResolvedSelectPromptConfig | ResolvedMultiselectPromptConfig;
|
|
5264
|
+
type ResolvedPromptConfig = ConfirmPromptConfig | InputPromptConfig | PasswordPromptConfig | ResolvedSelectPromptConfig | ResolvedMultiselectPromptConfig;
|
|
5204
5265
|
/**
|
|
5205
5266
|
* Prompt engine interface.
|
|
5206
5267
|
*
|
|
@@ -5228,7 +5289,8 @@ interface PromptEngine {
|
|
|
5228
5289
|
*
|
|
5229
5290
|
* @param config - The resolved prompt configuration (choices guaranteed
|
|
5230
5291
|
* for select/multiselect).
|
|
5231
|
-
* @returns The user's answer,
|
|
5292
|
+
* @returns The user's answer, `{ answered: false }` if cancelled, or
|
|
5293
|
+
* `{ answered: false, reason: 'invalid' }` when invalid attempts are exhausted.
|
|
5232
5294
|
*/
|
|
5233
5295
|
promptOne(config: ResolvedPromptConfig): Promise<PromptResult>;
|
|
5234
5296
|
}
|
|
@@ -5437,4 +5499,4 @@ interface CapturedOutput {
|
|
|
5437
5499
|
*/
|
|
5438
5500
|
declare function createCaptureOutput(options?: Omit<OutputOptions, 'stdout' | 'stderr'>): [out: Out, captured: CapturedOutput];
|
|
5439
5501
|
//#endregion
|
|
5440
|
-
export {
|
|
5502
|
+
export { ArgDefinitionOverrides as $, StringElementConfig as $t, Out as A, PasswordPromptConfig as An, BooleanFlagDefinition as At, MiddlewareHandler as B, HelpTheme as Bn, FlagDefinitionByKind as Bt, ErasedActionHandler as C, StandardSchemaV1Props as Cn, SourceSplitBinding as Ct, InteractiveParams as D, ConfirmPromptConfig as Dn, SplitPolicy as Dt, ExecutionStep as E, StandardSchemaV1Types as En, SplitOptions as Et, InputSources as F, SelectChoice as Fn, EnumFlagDefinition as Ft, prompt as G, ProgressOptions as Gn, FlagParseFn as Gt, middleware as H, ActivityEvent as Hn, FlagFactory as Ht, ResolutionProvenance as I, SelectPromptConfig as In, FlagBuilder as It, ArgConfig as J, TableColumn as Jn, InferFlag as Jt, Verbosity as K, SpinnerHandle as Kn, FlagPresence as Kt, SourcesOf as L, NumberConstraintViolation as Ln, FlagConfig as Lt, createCommandSchema as M, PromptConfigBase as Mn, CustomFlagDefinition as Mt, group as N, PromptKind as Nn, DefaultValueOptions as Nt, InteractiveResolver as O, InputPromptConfig as On, SplitSetting as Ot, resolveExampleCommand as P, PromptResult as Pn, DuplicatePolicy as Pt, ArgDefinitionByKind as Q, schemaBrand as Qn, ResolvedValue as Qt, wasExplicit as R, NumberConstraints as Rn, FlagDefinition as Rt, DeriveParams as S, StandardSchemaV1PathSegment as Sn, SPLIT_FORMATS as St, ExampleMeta as T, StandardSchemaV1SuccessResult as Tn, SplitFormat as Tt, Ask as U, Fallback as Un, FlagKind as Ut, MiddlewareParams as V, HelpThemeFactory as Vn, FlagDefinitionOverrides as Vt, InferPrompt as W, ProgressHandle as Wn, FlagNegation as Wt, ArgDefinition as X, TableOptions as Xn, KeyValueFlagDefinition as Xt, ArgDefaultValue as Y, TableFormat as Yn, InferFlags as Yt, ArgDefinitionBase as Z, TableStream as Zn, NumberFlagDefinition as Zt, CommandDefinition as _, InferStandardOutput as _n, WithoutArgElementEligibility as _t, WriteFn as a, getFlagNegatedName as an, BooleanArgDefinition as at, CommandSchema as b, StandardSchemaV1Issue as bn, DUPLICATE_KEYS as bt, ResolvedMultiselectPromptConfig as c, PathFlagOptions as cn, InferArg as ct, resolvePromptConfig as d, StringConstraints as dn, NumberArgDefinition as dt, StringFlagDefinition as en, ArgFactory as et, ActionHandler as f, StdinBinding as fn, ResolvedArgValue as ft, CommandBuilder as g, InferStandardInput as gn, WithVariadic as gt, CommandArgEntryDefinition as h, StdinWhen as hn, WithArgPresence as ht, createOutput as i, flag as in, ArgSchema as it, command as j, PromptConfig as jn, CountFlagDefinition as jt, InteractiveResult as k, MultiselectPromptConfig as kn, ArrayFlagDefinition as kt, ResolvedPromptConfig as l, UrlFlagOptions as ln, InferArgs as lt, CommandArgEntry as m, StdinOptions as mn, StringArgElementConfig as mt, OutputOptions as n, WithoutElementEligibility as nn, ArgParseFn as nt, PromptEngine as o, DateFlagOptions as on, CustomArgDefinition as ot, ActionParams as p, StdinConsume as pn, StringArgDefinition as pt, ArgBuilder as q, SpinnerOptions as qn, FlagSchema as qt, createCaptureOutput as r, createFlagSchema as rn, ArgPresence as rt, ReadFn as s, PathChecks as sn, EnumArgDefinition as st, CapturedOutput as t, WithPresence as tn, ArgKind as tt, ResolvedSelectPromptConfig as u, StringConstraintViolation as un, KeyValueArgDefinition as ut, CommandExample as v, StandardSchemaV1 as vn, arg as vt, ExampleCommand as w, StandardSchemaV1Result as wn, SplitBinding as wt, DeriveHandler as x, StandardSchemaV1Options as xn, DuplicateKeys as xt, CommandMeta as y, StandardSchemaV1FailureResult as yn, createArgSchema as yt, Middleware as z, HelpDescription as zn, FlagDefinitionBase as zt };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { A as Out,
|
|
1
|
+
import { A as Out, Hn as ActivityEvent, I as ResolutionProvenance, K as Verbosity, Qn as schemaBrand, Vn as HelpThemeFactory, b as CommandSchema, o as PromptEngine, y as CommandMeta } from "./index-B6oD4_8b.mjs";
|
|
2
|
+
import { t as CLIError } from "./index-B3_9MlHz.mjs";
|
|
2
3
|
import { Colors } from "ansispeck";
|
|
3
4
|
//#region src/core/cli/builtins.d.ts
|
|
4
5
|
/** A built-in flag a consumer can take over. */
|
|
@@ -45,136 +46,6 @@ interface Builtins {
|
|
|
45
46
|
readonly quiet: BuiltinMode;
|
|
46
47
|
}
|
|
47
48
|
//#endregion
|
|
48
|
-
//#region src/core/errors/index.d.ts
|
|
49
|
-
/**
|
|
50
|
-
* Structured error types for DreamCLI.
|
|
51
|
-
*
|
|
52
|
-
* Base {@linkcode CLIError} carries stable code, exit code, suggestion, and structured
|
|
53
|
-
* details. {@linkcode ParseError} and {@linkcode ValidationError} derive from it with
|
|
54
|
-
* category-appropriate defaults.
|
|
55
|
-
*
|
|
56
|
-
* @module dreamcli/core/errors
|
|
57
|
-
*/
|
|
58
|
-
/** Codes emitted during argv parsing. */
|
|
59
|
-
type ParseErrorCode = 'UNKNOWN_FLAG' | 'UNKNOWN_COMMAND' | 'MISSING_VALUE' | 'INVALID_VALUE' | 'INVALID_SCHEMA' | 'DUPLICATE_FLAG' | 'UNEXPECTED_POSITIONAL';
|
|
60
|
-
/** Codes emitted during post-parse validation / resolution. */
|
|
61
|
-
type ValidationErrorCode = 'REQUIRED_FLAG' | 'REQUIRED_ARG' | 'MISSING_STDIN' | 'INVALID_ENUM' | 'TYPE_MISMATCH' | 'CONSTRAINT_VIOLATED';
|
|
62
|
-
/** Any framework error code (extensible via `string & {}`). */
|
|
63
|
-
type ErrorCode = ParseErrorCode | ValidationErrorCode | (string & {});
|
|
64
|
-
/** Options accepted by the `CLIError` constructor. */
|
|
65
|
-
interface CLIErrorOptions {
|
|
66
|
-
/** Stable machine-readable identifier (e.g. `"UNKNOWN_FLAG"`). */
|
|
67
|
-
readonly code: ErrorCode;
|
|
68
|
-
/**
|
|
69
|
-
* Process exit code.
|
|
70
|
-
* @defaultValue `1`
|
|
71
|
-
*/
|
|
72
|
-
readonly exitCode?: number;
|
|
73
|
-
/** One-liner actionable hint shown to the user. */
|
|
74
|
-
readonly suggest?: string;
|
|
75
|
-
/** Arbitrary structured payload (serialised in `--json` mode). */
|
|
76
|
-
readonly details?: Readonly<Record<string, unknown>>;
|
|
77
|
-
/** Original error, if this wraps another. */
|
|
78
|
-
readonly cause?: unknown;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Base structured error for DreamCLI.
|
|
82
|
-
*
|
|
83
|
-
* Every error surfaced by the framework extends this class, ensuring a
|
|
84
|
-
* consistent shape for rendering (TTY pretty-print, `--json`, test assertions).
|
|
85
|
-
*/
|
|
86
|
-
declare class CLIError extends Error {
|
|
87
|
-
/** Error class name, always `'CLIError'` for the base class. @override */
|
|
88
|
-
readonly name: string;
|
|
89
|
-
/** Stable machine-readable identifier. */
|
|
90
|
-
readonly code: ErrorCode;
|
|
91
|
-
/** Process exit code (defaults to `1`). */
|
|
92
|
-
readonly exitCode: number;
|
|
93
|
-
/** One-liner actionable hint. */
|
|
94
|
-
readonly suggest: string | undefined;
|
|
95
|
-
/** Structured payload for machine output. */
|
|
96
|
-
readonly details: Readonly<Record<string, unknown>> | undefined;
|
|
97
|
-
/** Create a structured CLI error from a human message and machine-readable options. */
|
|
98
|
-
constructor(message: string, options: CLIErrorOptions);
|
|
99
|
-
/**
|
|
100
|
-
* Serialise to a plain object suitable for JSON output.
|
|
101
|
-
*
|
|
102
|
-
* `details` is projected onto JSON-representable values: bigints become
|
|
103
|
-
* decimal digits and entries JSON cannot carry are omitted. The error
|
|
104
|
-
* object itself keeps the runtime values.
|
|
105
|
-
*
|
|
106
|
-
* @sealed
|
|
107
|
-
*/
|
|
108
|
-
toJSON(): CLIErrorJSON;
|
|
109
|
-
}
|
|
110
|
-
/** Shape returned by {@linkcode CLIError}.toJSON(). */
|
|
111
|
-
interface CLIErrorJSON {
|
|
112
|
-
/** Error class name (e.g. `'CLIError'`, `'ParseError'`). */
|
|
113
|
-
readonly name: string;
|
|
114
|
-
/** Stable machine-readable identifier for programmatic matching. */
|
|
115
|
-
readonly code: ErrorCode;
|
|
116
|
-
/** Human-readable description of what went wrong. */
|
|
117
|
-
readonly message: string;
|
|
118
|
-
/** Process exit code associated with this error. */
|
|
119
|
-
readonly exitCode: number;
|
|
120
|
-
/** Actionable hint shown to the user, when available. */
|
|
121
|
-
readonly suggest?: string;
|
|
122
|
-
/** Structured payload for machine consumers, when available. */
|
|
123
|
-
readonly details?: Readonly<Record<string, unknown>>;
|
|
124
|
-
}
|
|
125
|
-
/** Options for {@linkcode ParseError}. Code is narrowed to parse-specific codes. */
|
|
126
|
-
interface ParseErrorOptions extends Omit<CLIErrorOptions, 'code' | 'exitCode'> {
|
|
127
|
-
/** Parse-category error code (e.g. `'UNKNOWN_FLAG'`, `'MISSING_VALUE'`). */
|
|
128
|
-
readonly code: ParseErrorCode;
|
|
129
|
-
/**
|
|
130
|
-
* Process exit code for parse failures.
|
|
131
|
-
* @defaultValue `2`
|
|
132
|
-
*/
|
|
133
|
-
readonly exitCode?: number;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Error thrown when argv tokenization / parsing fails.
|
|
137
|
-
*
|
|
138
|
-
* Exit code defaults to `2` (standard for CLI usage errors).
|
|
139
|
-
*/
|
|
140
|
-
declare class ParseError extends CLIError {
|
|
141
|
-
/** Always `'ParseError'`. @override */
|
|
142
|
-
readonly name: "ParseError";
|
|
143
|
-
/** Narrowed to parse-category codes. */
|
|
144
|
-
readonly code: ParseErrorCode;
|
|
145
|
-
/** Create a parse error with exit code defaulting to `2`. */
|
|
146
|
-
constructor(message: string, options: ParseErrorOptions);
|
|
147
|
-
}
|
|
148
|
-
/** Options for {@linkcode ValidationError}. Code is narrowed to validation-specific codes. */
|
|
149
|
-
interface ValidationErrorOptions extends Omit<CLIErrorOptions, 'code' | 'exitCode'> {
|
|
150
|
-
/** Validation-category error code (e.g. `'REQUIRED_FLAG'`, `'INVALID_ENUM'`). */
|
|
151
|
-
readonly code: ValidationErrorCode;
|
|
152
|
-
/**
|
|
153
|
-
* Process exit code for validation failures.
|
|
154
|
-
* @defaultValue `2`
|
|
155
|
-
*/
|
|
156
|
-
readonly exitCode?: number;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Error thrown when resolved values fail validation constraints.
|
|
160
|
-
*
|
|
161
|
-
* Exit code defaults to `2` (standard for CLI usage errors).
|
|
162
|
-
*/
|
|
163
|
-
declare class ValidationError extends CLIError {
|
|
164
|
-
/** Always `'ValidationError'`. @override */
|
|
165
|
-
readonly name: "ValidationError";
|
|
166
|
-
/** Narrowed to validation-category codes. */
|
|
167
|
-
readonly code: ValidationErrorCode;
|
|
168
|
-
/** Create a validation error with exit code defaulting to `2`. */
|
|
169
|
-
constructor(message: string, options: ValidationErrorOptions);
|
|
170
|
-
}
|
|
171
|
-
/** Narrows an unknown value to `CLIError`. */
|
|
172
|
-
declare function isCLIError(value: unknown): value is CLIError;
|
|
173
|
-
/** Narrows an unknown value to `ParseError`. */
|
|
174
|
-
declare function isParseError(value: unknown): value is ParseError;
|
|
175
|
-
/** Narrows an unknown value to `ValidationError`. */
|
|
176
|
-
declare function isValidationError(value: unknown): value is ValidationError;
|
|
177
|
-
//#endregion
|
|
178
49
|
//#region src/core/parse/index.d.ts
|
|
179
50
|
/**
|
|
180
51
|
* Token discriminated union.
|
|
@@ -616,10 +487,10 @@ declare const PROMPT_CANCEL: unique symbol;
|
|
|
616
487
|
/**
|
|
617
488
|
* A queued answer consumed by {@link createTestPrompter}.
|
|
618
489
|
*
|
|
619
|
-
* The test prompter
|
|
620
|
-
*
|
|
621
|
-
*
|
|
622
|
-
*
|
|
490
|
+
* The test prompter leaves malformed non-string values intact for resolver
|
|
491
|
+
* error tests. Text answers use the same whitespace, empty-answer, default,
|
|
492
|
+
* and validation policy as the terminal prompter. Passwords retry invalid
|
|
493
|
+
* answers; ordinary input retains its cancellation fallback (see {@link createTestPrompter}).
|
|
623
494
|
* The normal resolution pipeline performs any later type coercion, so tests can
|
|
624
495
|
* supply values in the same shapes real prompts would yield:
|
|
625
496
|
*
|
|
@@ -658,6 +529,11 @@ interface TestPrompterOptions {
|
|
|
658
529
|
* is rejected as a cancellation (`{ answered: false }`) — mirroring the terminal
|
|
659
530
|
* prompter exhausting its retries — so prompt validation is integration-testable
|
|
660
531
|
* via {@linkcode runCommand} rather than silently accepted as the resolved value.
|
|
532
|
+
* Password prompts instead consume further queued answers on validation failure,
|
|
533
|
+
* and reject with `PROMPT_INVALID` after ten invalid attempts. Input prompts
|
|
534
|
+
* also retry empty answers when `empty: 'retry'`; ordinary validator failures
|
|
535
|
+
* retain their cancellation fallback. `PROMPT_CANCEL`
|
|
536
|
+
* remains a distinct user cancellation.
|
|
661
537
|
*
|
|
662
538
|
* @param answers - Ordered queue of answers. Use `PROMPT_CANCEL` for
|
|
663
539
|
* cancellation.
|
|
@@ -828,4 +704,4 @@ interface RunResult {
|
|
|
828
704
|
readonly error: CLIError | undefined;
|
|
829
705
|
}
|
|
830
706
|
//#endregion
|
|
831
|
-
export {
|
|
707
|
+
export { BuiltinsConfig as A, includesBeforeSeparator as C, BuiltinMode as D, tokenize as E, BuiltinName as O, Token as S, stripBeforeSeparator as T, ResolutionProvenanceRecord as _, TestPrompterOptions as a, ParseOptions as b, formatHelp as c, CLIPluginHooks as d, PluginCommandContext as f, DeprecationWarning as g, resolve as h, TestAnswer as i, Builtins as k, BeforeParseParams as l, plugin as m, RunResult as n, createTestPrompter as o, ResolvedCommandParams as p, PROMPT_CANCEL as r, HelpOptions as s, RunOptions as t, CLIPlugin as u, ResolveOptions as v, parse as w, ParseResult as x, ResolveResult as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
3
|
-
import { o as CLISchema } from "./index-
|
|
1
|
+
import { Kt as FlagPresence, Nn as PromptKind, Pt as DuplicatePolicy, Rn as NumberConstraints, T as ExampleMeta, Ut as FlagKind, b as CommandSchema, rt as ArgPresence, tt as ArgKind, xt as DuplicateKeys } from "./index-B6oD4_8b.mjs";
|
|
2
|
+
import "./index-B_1Dmsdq.mjs";
|
|
3
|
+
import { o as CLISchema } from "./index-eF7SkQzQ.mjs";
|
|
4
4
|
//#region src/core/json-schema/constants.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Identifiers of the definition document format.
|
|
@@ -78,14 +78,17 @@ type PromptChoiceFragmentV1 = {
|
|
|
78
78
|
* Validation callbacks are dropped. Only the serializable description of the
|
|
79
79
|
* prompt survives.
|
|
80
80
|
*/
|
|
81
|
-
type PromptDefinitionFragmentV1 = {
|
|
82
|
-
readonly kind:
|
|
81
|
+
type PromptDefinitionFragmentV1 = { [K in PromptKind]: {
|
|
82
|
+
readonly kind: K;
|
|
83
83
|
readonly message: string;
|
|
84
84
|
readonly placeholder?: string;
|
|
85
|
+
readonly trim?: boolean;
|
|
86
|
+
readonly empty?: K extends 'password' ? 'accept' | 'retry' : 'skip' | 'accept' | 'retry';
|
|
87
|
+
readonly sensitive?: boolean;
|
|
85
88
|
readonly choices?: readonly PromptChoiceFragmentV1[];
|
|
86
89
|
readonly min?: number;
|
|
87
90
|
readonly max?: number;
|
|
88
|
-
};
|
|
91
|
+
}; }[PromptKind];
|
|
89
92
|
/**
|
|
90
93
|
* Stdin binding of a flag or arg fragment.
|
|
91
94
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as RuntimeAdapter } from "./adapter-
|
|
1
|
+
import { n as RuntimeAdapter } from "./adapter-DsmEc0WO.mjs";
|
|
2
2
|
//#region src/runtime/detect.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Auto-detects the current JavaScript runtime environment.
|
|
@@ -160,6 +160,8 @@ interface DenoNamespace {
|
|
|
160
160
|
};
|
|
161
161
|
/** Standard input — TTY detection and readable byte stream. */
|
|
162
162
|
readonly stdin: {
|
|
163
|
+
/** Toggle raw terminal input; disabling restores the saved terminal configuration. */
|
|
164
|
+
setRaw?(mode: boolean): void;
|
|
163
165
|
/** Whether stdin is connected to a TTY. */
|
|
164
166
|
isTerminal(): boolean;
|
|
165
167
|
/** Readable stream for stdin bytes. */
|
|
@@ -228,6 +230,8 @@ interface NodeProcess {
|
|
|
228
230
|
/** Standard input stream with TTY detection and async iteration. */
|
|
229
231
|
readonly stdin: {
|
|
230
232
|
readonly isTTY?: boolean;
|
|
233
|
+
readonly isRaw?: boolean;
|
|
234
|
+
setRawMode?(mode: boolean): unknown;
|
|
231
235
|
/** Async iterable for reading all of stdin (used by readStdin). */
|
|
232
236
|
[Symbol.asyncIterator](): AsyncIterator<Uint8Array>;
|
|
233
237
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as ErasedActionHandler, E as ExecutionStep,
|
|
2
|
-
import {
|
|
3
|
-
import { n as RuntimeAdapter } from "./adapter-
|
|
4
|
-
import { h as PackageJsonData, s as FormatLoader } from "./index-
|
|
1
|
+
import { C as ErasedActionHandler, E as ExecutionStep, It as FlagBuilder, J as ArgConfig, K as Verbosity, Lt as FlagConfig, Qn as schemaBrand, Vn as HelpThemeFactory, _ as CommandDefinition, b as CommandSchema, g as CommandBuilder, q as ArgBuilder } from "./index-B6oD4_8b.mjs";
|
|
2
|
+
import { A as BuiltinsConfig, b as ParseOptions, k as Builtins, n as RunResult, t as RunOptions, u as CLIPlugin } from "./index-B_1Dmsdq.mjs";
|
|
3
|
+
import { n as RuntimeAdapter } from "./adapter-DsmEc0WO.mjs";
|
|
4
|
+
import { h as PackageJsonData, s as FormatLoader } from "./index-Cj7kXwQH.mjs";
|
|
5
5
|
import { Colors } from "ansispeck";
|
|
6
6
|
//#region src/core/completion/shells/shared.d.ts
|
|
7
7
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { A as
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { $ as ArgDefinitionOverrides, $t as StringElementConfig, A as Out, An as PasswordPromptConfig, At as BooleanFlagDefinition, B as MiddlewareHandler, Bn as HelpTheme, Bt as FlagDefinitionByKind, Cn as StandardSchemaV1Props, Ct as SourceSplitBinding, D as InteractiveParams, Dn as ConfirmPromptConfig, Dt as SplitPolicy, En as StandardSchemaV1Types, Et as SplitOptions, F as InputSources, Fn as SelectChoice, Ft as EnumFlagDefinition, Gn as ProgressOptions, Gt as FlagParseFn, H as middleware, Hn as ActivityEvent, Ht as FlagFactory, I as ResolutionProvenance, In as SelectPromptConfig, It as FlagBuilder, J as ArgConfig, Jn as TableColumn, Jt as InferFlag, K as Verbosity, Kn as SpinnerHandle, Kt as FlagPresence, L as SourcesOf, Ln as NumberConstraintViolation, Lt as FlagConfig, M as createCommandSchema, Mn as PromptConfigBase, Mt as CustomFlagDefinition, N as group, Nn as PromptKind, Nt as DefaultValueOptions, O as InteractiveResolver, On as InputPromptConfig, Ot as SplitSetting, P as resolveExampleCommand, Pn as PromptResult, Pt as DuplicatePolicy, Q as ArgDefinitionByKind, Qt as ResolvedValue, R as wasExplicit, Rn as NumberConstraints, Rt as FlagDefinition, S as DeriveParams, Sn as StandardSchemaV1PathSegment, St as SPLIT_FORMATS, T as ExampleMeta, Tn as StandardSchemaV1SuccessResult, Tt as SplitFormat, U as Ask, Un as Fallback, Ut as FlagKind, V as MiddlewareParams, Vn as HelpThemeFactory, Vt as FlagDefinitionOverrides, W as InferPrompt, Wn as ProgressHandle, Wt as FlagNegation, X as ArgDefinition, Xn as TableOptions, Xt as KeyValueFlagDefinition, Y as ArgDefaultValue, Yn as TableFormat, Yt as InferFlags, Z as ArgDefinitionBase, Zn as TableStream, Zt as NumberFlagDefinition, _ as CommandDefinition, _n as InferStandardOutput, _t as WithoutArgElementEligibility, a as WriteFn, an as getFlagNegatedName, at as BooleanArgDefinition, b as CommandSchema, bn as StandardSchemaV1Issue, bt as DUPLICATE_KEYS, c as ResolvedMultiselectPromptConfig, cn as PathFlagOptions, ct as InferArg, d as resolvePromptConfig, dn as StringConstraints, dt as NumberArgDefinition, en as StringFlagDefinition, et as ArgFactory, f as ActionHandler, fn as StdinBinding, ft as ResolvedArgValue, g as CommandBuilder, gn as InferStandardInput, gt as WithVariadic, h as CommandArgEntryDefinition, hn as StdinWhen, ht as WithArgPresence, i as createOutput, in as flag, it as ArgSchema, j as command, jn as PromptConfig, jt as CountFlagDefinition, k as InteractiveResult, kn as MultiselectPromptConfig, kt as ArrayFlagDefinition, l as ResolvedPromptConfig, ln as UrlFlagOptions, lt as InferArgs, m as CommandArgEntry, mn as StdinOptions, mt as StringArgElementConfig, n as OutputOptions, nn as WithoutElementEligibility, nt as ArgParseFn, o as PromptEngine, on as DateFlagOptions, ot as CustomArgDefinition, p as ActionParams, pn as StdinConsume, pt as StringArgDefinition, q as ArgBuilder, qn as SpinnerOptions, qt as FlagSchema, rn as createFlagSchema, rt as ArgPresence, s as ReadFn, sn as PathChecks, st as EnumArgDefinition, tn as WithPresence, tt as ArgKind, u as ResolvedSelectPromptConfig, un as StringConstraintViolation, ut as KeyValueArgDefinition, v as CommandExample, vn as StandardSchemaV1, vt as arg, w as ExampleCommand, wn as StandardSchemaV1Result, wt as SplitBinding, x as DeriveHandler, xn as StandardSchemaV1Options, xt as DuplicateKeys, y as CommandMeta, yn as StandardSchemaV1FailureResult, yt as createArgSchema, z as Middleware, zn as HelpDescription, zt as FlagDefinitionBase } from "./index-B6oD4_8b.mjs";
|
|
2
|
+
import { A as BuiltinsConfig, C as includesBeforeSeparator, D as BuiltinMode, E as tokenize, O as BuiltinName, S as Token, T as stripBeforeSeparator, _ as ResolutionProvenanceRecord, b as ParseOptions, c as formatHelp, d as CLIPluginHooks, f as PluginCommandContext, g as DeprecationWarning, h as resolve, k as Builtins, l as BeforeParseParams, m as plugin, n as RunResult, p as ResolvedCommandParams, s as HelpOptions, u as CLIPlugin, v as ResolveOptions, w as parse, x as ParseResult, y as ResolveResult } from "./index-B_1Dmsdq.mjs";
|
|
3
|
+
import { a as ParseError, c as ValidationError, d as isCLIError, f as isParseError, i as ErrorCode, l as ValidationErrorCode, n as CLIErrorJSON, o as ParseErrorCode, p as isValidationError, r as CLIErrorOptions, s as ParseErrorOptions, t as CLIError, u as ValidationErrorOptions } from "./index-B3_9MlHz.mjs";
|
|
4
|
+
import { C as SHELLS, S as HelpLinks, T as CompletionOptions, _ as ResolvedManifestSettings, a as CLIRunOptions, b as isMainModule, c as CompletionsFlagConfig, d as DefaultCommandOptions, f as HelpConfig, g as RenderContextOptions, h as RenderContext, i as CLIOptions, l as ConfigSettings, m as ManifestSettings, n as CLIDefinition, o as CLISchema, p as InferNameOption, r as CLIExecuteOptions, s as CompletionRegistrationOptions, t as CLIBuilder, u as ConfigSettingsDefinition, v as cli, w as Shell, x as resolveRenderContext, y as createCLISchema } from "./index-eF7SkQzQ.mjs";
|
|
5
|
+
import { n as RuntimeAdapter } from "./adapter-DsmEc0WO.mjs";
|
|
6
|
+
import { a as ConfigNotFound, d as PackageRepositoryUrlOptions, g as PackageRepository, h as PackageJsonData, i as ConfigFound, m as PackageJsonAdapter, n as ConfigDiscoveryOptions, o as ConfigSearchPathOptions, p as ManifestDiscoveryOptions, r as ConfigDiscoveryResult, s as FormatLoader, t as ConfigAdapter } from "./index-Cj7kXwQH.mjs";
|
|
7
|
+
import { D as DEFINITION_SCHEMA_URL, O as DEFINITION_SCHEMA_VERSION, S as StdinBindingFragmentV1, _ as JsonSchemaOptions, a as CommandDefinitionFragmentV1, b as SourceSplitFragmentV1, c as ExampleDefinitionFragmentV1, d as FlagNegationFragmentV1, f as FlagPathChecksFragmentV1, g as InputSchemaProperty, h as InputSchemaDocument, i as CommandDefinitionDocumentV1, l as FlagDefinitionFragmentV1, m as InputSchemaBranch, n as ArgElementFragmentV1, o as DefinitionDocument, p as FlagStringConstraintsFragmentV1, r as CommandDefinitionDocument, s as DefinitionDocumentV1, t as ArgDefinitionFragmentV1, u as FlagElementFragmentV1, v as PromptChoiceFragmentV1, x as SplitPolicyFragmentV1, y as PromptDefinitionFragmentV1 } from "./index-C5CYWtxn.mjs";
|
|
7
8
|
import { Colors } from "ansispeck";
|
|
8
9
|
//#region src/core/help/ansi.d.ts
|
|
9
10
|
/**
|
|
@@ -188,4 +189,4 @@ interface ReadFlagsOptions<F extends FlagMap = FlagMap> extends ResolveOptions {
|
|
|
188
189
|
*/
|
|
189
190
|
declare function readFlags<const F extends FlagMap>(definitions: F, options?: ReadFlagsOptions<F>): Promise<InferFlags<F>>;
|
|
190
191
|
//#endregion
|
|
191
|
-
export { type ActionHandler, type ActionParams, type ActivityEvent, ArgBuilder, type ArgConfig, type ArgDefaultValue, type ArgDefinition, type ArgDefinitionBase, type ArgDefinitionByKind, type ArgDefinitionFragmentV1, type ArgDefinitionOverrides, type ArgElementFragmentV1, type ArgFactory, type ArgKind, type ArgParseFn, type ArgPresence, type ArgSchema, type ArrayFlagDefinition, type BeforeParseParams, type BooleanArgDefinition, type BooleanFlagDefinition, type BuiltinMode, type BuiltinName, type Builtins, type BuiltinsConfig, CLIBuilder, type CLIDefinition, CLIError, type CLIErrorJSON, type CLIErrorOptions, type CLIExecuteOptions, type CLIOptions, type CLIPlugin, type CLIPluginHooks, type CLIRunOptions, type CLISchema, type Colors, type CommandArgEntry, type CommandArgEntryDefinition, CommandBuilder, type CommandDefinition, type CommandDefinitionDocument, type CommandDefinitionDocumentV1, type CommandDefinitionFragmentV1, type CommandExample, type CommandMeta, type CommandSchema, type CompletionOptions, type CompletionRegistrationOptions, type CompletionsFlagConfig, type ConfigAdapter, type ConfigDiscoveryOptions, type ConfigDiscoveryResult, type ConfigFound, type ConfigNotFound, type ConfigSearchPathOptions, type ConfigSettings, type ConfigSettingsDefinition, type ConfirmPromptConfig, type CountFlagDefinition, type CustomArgDefinition, type CustomFlagDefinition, DEFINITION_SCHEMA_URL, DEFINITION_SCHEMA_VERSION, DUPLICATE_KEYS, type DateFlagOptions, type DefaultCommandOptions, type DefaultValueOptions, type DefinitionDocument, type DefinitionDocumentV1, type DeprecationWarning, type DeriveHandler, type DeriveParams, type DuplicateKeys, type DuplicatePolicy, type EnumArgDefinition, type EnumFlagDefinition, type ErrorCode, type ExampleCommand, type ExampleDefinitionFragmentV1, type ExampleMeta, type Fallback, FlagBuilder, type FlagConfig, type FlagDefinition, type FlagDefinitionBase, type FlagDefinitionByKind, type FlagDefinitionFragmentV1, type FlagDefinitionOverrides, type FlagElementFragmentV1, type FlagFactory, type FlagKind, type FlagMap, type FlagNegation, type FlagNegationFragmentV1, type FlagParseFn, type FlagPathChecksFragmentV1, type FlagPresence, type FlagSchema, type FlagStringConstraintsFragmentV1, type FormatLoader, type HelpConfig, type HelpDescription, type HelpLinks, type HelpOptions, type HelpTheme, type HelpThemeFactory, type InferArg, type InferArgs, type InferFlag, type InferFlags, type InferNameOption, type InferStandardInput, type InferStandardOutput, type InputPromptConfig, type InputSchemaBranch, type InputSchemaDocument, type InputSchemaProperty, type InputSources, type InteractiveParams, type InteractiveResolver, type InteractiveResult, type JsonSchemaOptions, type KeyValueArgDefinition, type KeyValueFlagDefinition, type ManifestDiscoveryOptions, type ManifestSettings, type Middleware, type MiddlewareHandler, type MiddlewareParams, type MultiselectPromptConfig, type NumberArgDefinition, type NumberConstraintViolation, type NumberConstraints, type NumberFlagDefinition, type Out, type OutputOptions, type PackageJsonAdapter, type PackageJsonData, type PackageRepository, type PackageRepositoryUrlOptions, ParseError, type ParseErrorCode, type ParseErrorOptions, type ParseOptions, type ParseResult, type PathChecks, type PathFlagOptions, type PluginCommandContext, type ProgressHandle, type ProgressOptions, type PromptChoiceFragmentV1, type PromptConfig, type PromptConfigBase, type PromptDefinitionFragmentV1, type PromptEngine, type PromptKind, type PromptResult, type ReadFlagsOptions, type ReadFn, type RenderContext, type RenderContextOptions, type ResolutionProvenance, type ResolutionProvenanceRecord, type ResolveOptions, type ResolveResult, type ResolvedArgValue, type ResolvedCommandParams, type ResolvedManifestSettings, type ResolvedMultiselectPromptConfig, type ResolvedPromptConfig, type ResolvedSelectPromptConfig, type ResolvedValue, type RunResult, SHELLS, SPLIT_FORMATS, type SelectChoice, type SelectPromptConfig, type Shell, type SourceSplitBinding, type SourceSplitFragmentV1, type SourcesOf, type SpinnerHandle, type SpinnerOptions, type SplitBinding, type SplitFormat, type SplitOptions, type SplitPolicy, type SplitPolicyFragmentV1, type SplitSetting, type StandardSchemaV1, type StandardSchemaV1FailureResult, type StandardSchemaV1Issue, type StandardSchemaV1Options, type StandardSchemaV1PathSegment, type StandardSchemaV1Props, type StandardSchemaV1Result, type StandardSchemaV1SuccessResult, type StandardSchemaV1Types, type StdinBinding, type StdinBindingFragmentV1, type StdinConsume, type StdinOptions, type StdinWhen, type StringArgDefinition, type StringArgElementConfig, type StringConstraintViolation, type StringConstraints, type StringElementConfig, type StringFlagDefinition, type TableColumn, type TableFormat, type TableOptions, type TableStream, type Token, type UrlFlagOptions, ValidationError, type ValidationErrorCode, type ValidationErrorOptions, type Verbosity, type WithArgPresence, type WithPresence, type WithVariadic, type WithoutArgElementEligibility, type WithoutElementEligibility, type WriteFn, arg, cli, command, createArgSchema, createCLISchema, createCommandSchema, createFlagSchema, createOutput, flag, formatHelp, getFlagNegatedName, group, includesBeforeSeparator, isCLIError, isMainModule, isParseError, isValidationError, middleware, osc8, parse, plugin, readFlags, resolve, resolveExampleCommand, resolvePromptConfig, resolveRenderContext, stripBeforeSeparator, tokenize, visibleWidth, wasExplicit };
|
|
192
|
+
export { type ActionHandler, type ActionParams, type ActivityEvent, ArgBuilder, type ArgConfig, type ArgDefaultValue, type ArgDefinition, type ArgDefinitionBase, type ArgDefinitionByKind, type ArgDefinitionFragmentV1, type ArgDefinitionOverrides, type ArgElementFragmentV1, type ArgFactory, type ArgKind, type ArgParseFn, type ArgPresence, type ArgSchema, type ArrayFlagDefinition, type Ask, type BeforeParseParams, type BooleanArgDefinition, type BooleanFlagDefinition, type BuiltinMode, type BuiltinName, type Builtins, type BuiltinsConfig, CLIBuilder, type CLIDefinition, CLIError, type CLIErrorJSON, type CLIErrorOptions, type CLIExecuteOptions, type CLIOptions, type CLIPlugin, type CLIPluginHooks, type CLIRunOptions, type CLISchema, type Colors, type CommandArgEntry, type CommandArgEntryDefinition, CommandBuilder, type CommandDefinition, type CommandDefinitionDocument, type CommandDefinitionDocumentV1, type CommandDefinitionFragmentV1, type CommandExample, type CommandMeta, type CommandSchema, type CompletionOptions, type CompletionRegistrationOptions, type CompletionsFlagConfig, type ConfigAdapter, type ConfigDiscoveryOptions, type ConfigDiscoveryResult, type ConfigFound, type ConfigNotFound, type ConfigSearchPathOptions, type ConfigSettings, type ConfigSettingsDefinition, type ConfirmPromptConfig, type CountFlagDefinition, type CustomArgDefinition, type CustomFlagDefinition, DEFINITION_SCHEMA_URL, DEFINITION_SCHEMA_VERSION, DUPLICATE_KEYS, type DateFlagOptions, type DefaultCommandOptions, type DefaultValueOptions, type DefinitionDocument, type DefinitionDocumentV1, type DeprecationWarning, type DeriveHandler, type DeriveParams, type DuplicateKeys, type DuplicatePolicy, type EnumArgDefinition, type EnumFlagDefinition, type ErrorCode, type ExampleCommand, type ExampleDefinitionFragmentV1, type ExampleMeta, type Fallback, FlagBuilder, type FlagConfig, type FlagDefinition, type FlagDefinitionBase, type FlagDefinitionByKind, type FlagDefinitionFragmentV1, type FlagDefinitionOverrides, type FlagElementFragmentV1, type FlagFactory, type FlagKind, type FlagMap, type FlagNegation, type FlagNegationFragmentV1, type FlagParseFn, type FlagPathChecksFragmentV1, type FlagPresence, type FlagSchema, type FlagStringConstraintsFragmentV1, type FormatLoader, type HelpConfig, type HelpDescription, type HelpLinks, type HelpOptions, type HelpTheme, type HelpThemeFactory, type InferArg, type InferArgs, type InferFlag, type InferFlags, type InferNameOption, type InferPrompt, type InferStandardInput, type InferStandardOutput, type InputPromptConfig, type InputSchemaBranch, type InputSchemaDocument, type InputSchemaProperty, type InputSources, type InteractiveParams, type InteractiveResolver, type InteractiveResult, type JsonSchemaOptions, type KeyValueArgDefinition, type KeyValueFlagDefinition, type ManifestDiscoveryOptions, type ManifestSettings, type Middleware, type MiddlewareHandler, type MiddlewareParams, type MultiselectPromptConfig, type NumberArgDefinition, type NumberConstraintViolation, type NumberConstraints, type NumberFlagDefinition, type Out, type OutputOptions, type PackageJsonAdapter, type PackageJsonData, type PackageRepository, type PackageRepositoryUrlOptions, ParseError, type ParseErrorCode, type ParseErrorOptions, type ParseOptions, type ParseResult, type PasswordPromptConfig, type PathChecks, type PathFlagOptions, type PluginCommandContext, type ProgressHandle, type ProgressOptions, type PromptChoiceFragmentV1, type PromptConfig, type PromptConfigBase, type PromptDefinitionFragmentV1, type PromptEngine, type PromptKind, type PromptResult, type ReadFlagsOptions, type ReadFn, type RenderContext, type RenderContextOptions, type ResolutionProvenance, type ResolutionProvenanceRecord, type ResolveOptions, type ResolveResult, type ResolvedArgValue, type ResolvedCommandParams, type ResolvedManifestSettings, type ResolvedMultiselectPromptConfig, type ResolvedPromptConfig, type ResolvedSelectPromptConfig, type ResolvedValue, type RunResult, SHELLS, SPLIT_FORMATS, type SelectChoice, type SelectPromptConfig, type Shell, type SourceSplitBinding, type SourceSplitFragmentV1, type SourcesOf, type SpinnerHandle, type SpinnerOptions, type SplitBinding, type SplitFormat, type SplitOptions, type SplitPolicy, type SplitPolicyFragmentV1, type SplitSetting, type StandardSchemaV1, type StandardSchemaV1FailureResult, type StandardSchemaV1Issue, type StandardSchemaV1Options, type StandardSchemaV1PathSegment, type StandardSchemaV1Props, type StandardSchemaV1Result, type StandardSchemaV1SuccessResult, type StandardSchemaV1Types, type StdinBinding, type StdinBindingFragmentV1, type StdinConsume, type StdinOptions, type StdinWhen, type StringArgDefinition, type StringArgElementConfig, type StringConstraintViolation, type StringConstraints, type StringElementConfig, type StringFlagDefinition, type TableColumn, type TableFormat, type TableOptions, type TableStream, type Token, type UrlFlagOptions, ValidationError, type ValidationErrorCode, type ValidationErrorOptions, type Verbosity, type WithArgPresence, type WithPresence, type WithVariadic, type WithoutArgElementEligibility, type WithoutElementEligibility, type WriteFn, arg, cli, command, createArgSchema, createCLISchema, createCommandSchema, createFlagSchema, createOutput, flag, formatHelp, getFlagNegatedName, group, includesBeforeSeparator, isCLIError, isMainModule, isParseError, isValidationError, middleware, osc8, parse, plugin, readFlags, resolve, resolveExampleCommand, resolvePromptConfig, resolveRenderContext, stripBeforeSeparator, tokenize, visibleWidth, wasExplicit };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{Y as ArgBuilder,s as CLIBuilder,tt as CLIError,z as CommandBuilder,a as DEFINITION_SCHEMA_URL,o as DEFINITION_SCHEMA_VERSION,Q as DUPLICATE_KEYS,W as FlagBuilder,nt as ParseError,st as SHELLS,$ as SPLIT_FORMATS,rt as ValidationError,X as arg,c as cli,B as command,Z as createArgSchema,l as createCLISchema,V as createCommandSchema,G as createFlagSchema,P as createOutput,K as flag,F as formatHelp,J as getFlagNegatedName,H as group,D as includesBeforeSeparator,it as isCLIError,u as isMainModule,at as isParseError,ot as isValidationError,M as middleware,L as osc8,O as parse,p as plugin,i as readFlags,C as resolve,U as resolveExampleCommand,w as resolvePromptConfig,d as resolveRenderContext,k as stripBeforeSeparator,A as tokenize,R as visibleWidth,j as wasExplicit}from"./core-B4Twhd48.mjs";
|