@kjanat/dreamcli 4.2.0 → 5.0.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/README.md +3 -1
- package/dist/{adapter-DsmEc0WO.d.mts → adapter-DBeedKmD.d.mts} +1 -3
- package/dist/{completion-BYhuYn2Q.mjs → completion-Bh-qywmB.mjs} +1 -1
- package/dist/completion.d.mts +1 -11
- package/dist/completion.mjs +1 -1
- package/dist/{config-BgJZ-X4r.mjs → config-DruA8aFV.mjs} +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/core-B9YNSJeA.mjs +19 -0
- package/dist/{index-CaRNJH2R.d.mts → index-AIC5Gler.d.mts} +14 -12
- package/dist/{index-B6oD4_8b.d.mts → index-BIMjOsR6.d.mts} +245 -44
- package/dist/{index-C5CYWtxn.d.mts → index-BidVVmln.d.mts} +45 -8
- package/dist/{index-B3_9MlHz.d.mts → index-D683D09G.d.mts} +0 -2
- package/dist/{index-B_1Dmsdq.d.mts → index-DpslpOVV.d.mts} +151 -21
- package/dist/{index-eF7SkQzQ.d.mts → index-hzYPRc_O.d.mts} +65 -14
- package/dist/{index-Cj7kXwQH.d.mts → index-jq_FJRKt.d.mts} +1 -7
- package/dist/index.d.mts +18 -12
- package/dist/index.mjs +1 -1
- package/dist/json-schema-DF5fXdKQ.mjs +59 -0
- package/dist/json-schema.d.mts +2 -2
- package/dist/json-schema.mjs +1 -1
- package/dist/prompt.d.mts +2 -8
- package/dist/prompt.mjs +1 -1
- package/dist/runtime.d.mts +2 -2
- package/dist/runtime.mjs +1 -1
- package/dist/{session-CQsnVijE.mjs → session-Crtzt7LY.mjs} +1 -1
- package/dist/{terminal-cbye9mKF.mjs → terminal-DRsRn4sc.mjs} +1 -1
- package/dist/{test-prompter-Ddkt9n5A.mjs → test-prompter-BLNGCOA_.mjs} +1 -1
- package/dist/testkit.d.mts +5 -7
- package/dist/testkit.mjs +1 -1
- package/dist/version.d.mts +1 -3
- package/dist/version.mjs +1 -1
- package/dreamcli.schema.json +140 -2
- package/package.json +9 -9
- package/dist/core-B4Twhd48.mjs +0 -18
- package/dist/json-schema-DVyfq4bA.mjs +0 -52
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { A as Out,
|
|
2
|
-
import { t as CLIError } from "./index-
|
|
1
|
+
import { A as Out, Gn as HelpThemeFactory, I as ResolutionProvenance, K as Verbosity, Kn as ActivityEvent, b as CommandSchema, nr as schemaBrand, o as PromptEngine, sn as PathChecks, y as CommandMeta } from "./index-BIMjOsR6.mjs";
|
|
2
|
+
import { t as CLIError } from "./index-D683D09G.mjs";
|
|
3
3
|
import { Colors } from "ansispeck";
|
|
4
|
-
//#region src/core/cli/builtins.d.ts
|
|
5
4
|
/** A built-in flag a consumer can take over. */
|
|
6
5
|
type BuiltinName = 'help' | 'json' | 'quiet';
|
|
7
6
|
/** Whether the root keeps a built-in or releases it to commands. */
|
|
@@ -45,8 +44,6 @@ interface Builtins {
|
|
|
45
44
|
/** Whether the root owns `--quiet`/`-q`. */
|
|
46
45
|
readonly quiet: BuiltinMode;
|
|
47
46
|
}
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region src/core/parse/index.d.ts
|
|
50
47
|
/**
|
|
51
48
|
* Token discriminated union.
|
|
52
49
|
*
|
|
@@ -160,8 +157,6 @@ interface ParseOptions {
|
|
|
160
157
|
* ```
|
|
161
158
|
*/
|
|
162
159
|
declare function parse(schema: CommandSchema, argv: readonly string[], options?: ParseOptions): ParseResult;
|
|
163
|
-
//#endregion
|
|
164
|
-
//#region src/core/resolve/contracts.d.ts
|
|
165
160
|
/**
|
|
166
161
|
* External state the resolver may consult after parsing.
|
|
167
162
|
*
|
|
@@ -189,6 +184,56 @@ interface ResolveOptions {
|
|
|
189
184
|
* apply as-is.
|
|
190
185
|
*/
|
|
191
186
|
readonly mkdir?: (path: string) => Promise<void>;
|
|
187
|
+
/**
|
|
188
|
+
* What happens to a declared filesystem check that cannot run because
|
|
189
|
+
* {@link ResolveOptions.stat} (or {@link ResolveOptions.mkdir} for `create`)
|
|
190
|
+
* is absent.
|
|
191
|
+
*
|
|
192
|
+
* - `'lenient'` — the check is skipped and recorded in
|
|
193
|
+
* {@link ResolveResult.skippedPathChecks}, so a result can still report
|
|
194
|
+
* that it was never exercised.
|
|
195
|
+
* - `'strict'` — resolution fails with a `CLIError` of code
|
|
196
|
+
* `'PATH_CHECK_SKIPPED'` (exit code `1`) naming every skipped input, for
|
|
197
|
+
* tests that must exercise each declared check.
|
|
198
|
+
*
|
|
199
|
+
* Only inputs that resolved a path value are affected: an unset optional
|
|
200
|
+
* path has nothing to check in production either.
|
|
201
|
+
*
|
|
202
|
+
* @defaultValue `'lenient'`
|
|
203
|
+
*/
|
|
204
|
+
readonly pathChecks?: 'lenient' | 'strict';
|
|
205
|
+
/**
|
|
206
|
+
* Environment namespace prepended to every relative env binding, the count
|
|
207
|
+
* and templates of an indexed family included. A binding declared
|
|
208
|
+
* `absolute` is read as written. Diagnostics and provenance name the
|
|
209
|
+
* concrete variable.
|
|
210
|
+
*
|
|
211
|
+
* @defaultValue `undefined` (no namespace)
|
|
212
|
+
*/
|
|
213
|
+
readonly envPrefix?: string;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* A declared `flag.path()` / `arg.path()` check that resolution had no means
|
|
217
|
+
* to run.
|
|
218
|
+
*
|
|
219
|
+
* Recorded instead of raised when {@link ResolveOptions.pathChecks} is
|
|
220
|
+
* `'lenient'` (the default): the value resolved and the handler ran, but the
|
|
221
|
+
* filesystem was never consulted, so a passing result does not prove the real
|
|
222
|
+
* CLI would accept the same path.
|
|
223
|
+
*/
|
|
224
|
+
interface SkippedPathCheck {
|
|
225
|
+
/** Whether the path belongs to a flag or a positional arg. */
|
|
226
|
+
readonly kind: 'flag' | 'arg';
|
|
227
|
+
/** Name of the flag or arg. */
|
|
228
|
+
readonly name: string;
|
|
229
|
+
/** The checks the schema declared (`mustExist`, `type`, `create`). */
|
|
230
|
+
readonly checks: PathChecks;
|
|
231
|
+
/**
|
|
232
|
+
* The capability resolution lacked: `'stat'` when no probe was supplied so
|
|
233
|
+
* no check ran, or `'mkdir'` when the path was missing, `create` was
|
|
234
|
+
* declared, and nothing could create it.
|
|
235
|
+
*/
|
|
236
|
+
readonly missing: 'stat' | 'mkdir';
|
|
192
237
|
}
|
|
193
238
|
/** Structured deprecation notice emitted for explicitly sourced values. */
|
|
194
239
|
interface DeprecationWarning {
|
|
@@ -219,14 +264,18 @@ interface ResolveResult {
|
|
|
219
264
|
readonly args: Readonly<Record<string, unknown>>;
|
|
220
265
|
/** Deprecation notices collected during resolution (may be empty). */
|
|
221
266
|
readonly deprecations: readonly DeprecationWarning[];
|
|
267
|
+
/**
|
|
268
|
+
* Declared filesystem checks that did not run because no `stat` probe (or
|
|
269
|
+
* no `mkdir` for `create`) was supplied. Empty when every declared check
|
|
270
|
+
* ran, or when no resolved value had a check to run.
|
|
271
|
+
*/
|
|
272
|
+
readonly skippedPathChecks: readonly SkippedPathCheck[];
|
|
222
273
|
/**
|
|
223
274
|
* Which stage produced each value. Present only for inputs that resolved a
|
|
224
275
|
* value, so an unset optional input has no entry.
|
|
225
276
|
*/
|
|
226
277
|
readonly provenance: ResolutionProvenanceRecord;
|
|
227
278
|
}
|
|
228
|
-
//#endregion
|
|
229
|
-
//#region src/core/resolve/index.d.ts
|
|
230
279
|
/**
|
|
231
280
|
* Resolve parsed values against a command schema.
|
|
232
281
|
*
|
|
@@ -247,12 +296,21 @@ interface ResolveResult {
|
|
|
247
296
|
* a value. Collects **all** validation errors before throwing, so the
|
|
248
297
|
* user sees every missing field at once.
|
|
249
298
|
*
|
|
299
|
+
* `flag.path()` / `arg.path()` filesystem checks run only through the injected
|
|
300
|
+
* {@linkcode ResolveOptions.stat} probe. A check that cannot run is recorded in
|
|
301
|
+
* {@linkcode ResolveResult.skippedPathChecks}, or rejected outright when
|
|
302
|
+
* {@linkcode ResolveOptions.pathChecks} is `'strict'`.
|
|
303
|
+
*
|
|
250
304
|
* @param schema - The command schema defining flags and args
|
|
251
305
|
* @param parsed - Raw parsed values from the parser
|
|
252
306
|
* @param options - External state for the resolution chain
|
|
253
307
|
* @returns Fully resolved flag and arg values
|
|
254
308
|
* @throws {@linkcode ValidationError} if any required flag or arg is missing,
|
|
255
309
|
* or if an env/config value fails coercion
|
|
310
|
+
* @throws {@linkcode CLIError} with code `'INVALID_SCHEMA'` when
|
|
311
|
+
* {@linkcode ResolveOptions.envPrefix} is empty or carries `=`, a brace, or NUL
|
|
312
|
+
* @throws {@linkcode CLIError} with code `'PATH_CHECK_SKIPPED'` when
|
|
313
|
+
* `pathChecks: 'strict'` and a declared filesystem check could not run
|
|
256
314
|
*
|
|
257
315
|
* @example
|
|
258
316
|
* ```ts
|
|
@@ -263,8 +321,6 @@ interface ResolveResult {
|
|
|
263
321
|
* ```
|
|
264
322
|
*/
|
|
265
323
|
declare function resolve(schema: CommandSchema, parsed: ParseResult, options?: ResolveOptions): Promise<ResolveResult>;
|
|
266
|
-
//#endregion
|
|
267
|
-
//#region src/core/cli/plugin.d.ts
|
|
268
324
|
/** Shared hook payload for a concrete command execution. */
|
|
269
325
|
interface PluginCommandContext {
|
|
270
326
|
/** Runtime command schema being executed. */
|
|
@@ -287,6 +343,12 @@ interface ResolvedCommandParams extends PluginCommandContext {
|
|
|
287
343
|
readonly args: Readonly<Record<string, unknown>>;
|
|
288
344
|
/** Structured deprecation warnings collected during resolution. */
|
|
289
345
|
readonly deprecations: readonly DeprecationWarning[];
|
|
346
|
+
/**
|
|
347
|
+
* Declared `flag.path()` / `arg.path()` checks that could not run because
|
|
348
|
+
* execution supplied no `stat` probe (or no `mkdir` for `create`). Always
|
|
349
|
+
* empty under `CLIBuilder.run()`, which supplies the adapter's filesystem.
|
|
350
|
+
*/
|
|
351
|
+
readonly skippedPathChecks: readonly SkippedPathCheck[];
|
|
290
352
|
}
|
|
291
353
|
/**
|
|
292
354
|
* Individual lifecycle hooks that a plugin may implement.
|
|
@@ -353,8 +415,6 @@ interface CLIPlugin {
|
|
|
353
415
|
* @returns A frozen {@link CLIPlugin} definition.
|
|
354
416
|
*/
|
|
355
417
|
declare function plugin(hooks: CLIPluginHooks, name?: string): CLIPlugin;
|
|
356
|
-
//#endregion
|
|
357
|
-
//#region src/core/help/index.d.ts
|
|
358
418
|
/** Options for customising help output. */
|
|
359
419
|
interface HelpOptions {
|
|
360
420
|
/** Maximum line width (columns). Defaults to 80. */
|
|
@@ -381,6 +441,28 @@ interface HelpOptions {
|
|
|
381
441
|
* @defaultValue `undefined` (use `flagOrder`)
|
|
382
442
|
*/
|
|
383
443
|
readonly sortFlags?: (a: string, b: string) => number;
|
|
444
|
+
/**
|
|
445
|
+
* Spelling of long flag names, aliases, and negations in the `Flags:` table.
|
|
446
|
+
*
|
|
447
|
+
* - `'declared'` — each spelling exactly as it was declared.
|
|
448
|
+
* - `'kebab'` — the kebab-case counterpart of a camelCase spelling
|
|
449
|
+
* (`--wasm-path` for a flag keyed `wasmPath`), while the resolved value
|
|
450
|
+
* keeps its declared key. A spelling stays as declared when the parser
|
|
451
|
+
* would not read the counterpart as the same flag form: with
|
|
452
|
+
* {@link HelpOptions.caseParity} off, or when another declared flag owns it.
|
|
453
|
+
*
|
|
454
|
+
* @defaultValue `'declared'`
|
|
455
|
+
*/
|
|
456
|
+
readonly flagSpelling?: 'declared' | 'kebab';
|
|
457
|
+
/**
|
|
458
|
+
* Whether the parser accepts kebab↔camel counterpart spellings, so
|
|
459
|
+
* `flagSpelling: 'kebab'` only renders spellings the parser accepts.
|
|
460
|
+
* `CLIBuilder.execute()`/`.run()` and `readFlags()` thread their parser
|
|
461
|
+
* settings here automatically.
|
|
462
|
+
*
|
|
463
|
+
* @defaultValue `true`
|
|
464
|
+
*/
|
|
465
|
+
readonly caseParity?: boolean;
|
|
384
466
|
/**
|
|
385
467
|
* Emit OSC 8 hyperlinks where link metadata is available (currently the
|
|
386
468
|
* root-help header name/version configured via `CLIBuilder.links()`).
|
|
@@ -415,6 +497,14 @@ interface HelpOptions {
|
|
|
415
497
|
readonly footer?: boolean;
|
|
416
498
|
/** @internal Whether this usage line is being rendered as merged root/default help. */
|
|
417
499
|
readonly isDefaultHelp?: boolean;
|
|
500
|
+
/**
|
|
501
|
+
* Environment namespace applied to relative env bindings in `[env: …]`
|
|
502
|
+
* annotations, so help names the variables resolution actually reads.
|
|
503
|
+
* `CLIBuilder.execute()`/`.run()` thread the CLI's `.envPrefix()` here.
|
|
504
|
+
*
|
|
505
|
+
* @defaultValue `undefined` (names render as declared)
|
|
506
|
+
*/
|
|
507
|
+
readonly envPrefix?: string;
|
|
418
508
|
/**
|
|
419
509
|
* Gated ANSI palette used to style help output. Identity formatters mean
|
|
420
510
|
* plain text. `CLIBuilder.execute()`/`.run()` thread the output channel's
|
|
@@ -466,8 +556,6 @@ interface HelpOptions {
|
|
|
466
556
|
* ```
|
|
467
557
|
*/
|
|
468
558
|
declare function formatHelp(schema: CommandSchema, options?: HelpOptions): string;
|
|
469
|
-
//#endregion
|
|
470
|
-
//#region src/core/prompt/test-prompter.d.ts
|
|
471
559
|
/**
|
|
472
560
|
* Sentinel value representing a cancelled/aborted prompt in the test
|
|
473
561
|
* prompter's answer queue.
|
|
@@ -550,8 +638,6 @@ interface TestPrompterOptions {
|
|
|
550
638
|
* ```
|
|
551
639
|
*/
|
|
552
640
|
declare function createTestPrompter(answers: readonly TestAnswer[], options?: TestPrompterOptions): PromptEngine;
|
|
553
|
-
//#endregion
|
|
554
|
-
//#region src/core/schema/run.d.ts
|
|
555
641
|
/**
|
|
556
642
|
* Options accepted by `runCommand()` and internal command execution paths.
|
|
557
643
|
*
|
|
@@ -611,7 +697,9 @@ interface RunOptions {
|
|
|
611
697
|
*
|
|
612
698
|
* `CLIBuilder.run()` supplies the runtime adapter's probe automatically.
|
|
613
699
|
* When absent (process-free `.execute()` / `runCommand()` without an
|
|
614
|
-
* override), path checks are skipped
|
|
700
|
+
* override), path checks are skipped and each skipped input is listed in
|
|
701
|
+
* {@linkcode RunResult.skippedPathChecks}; set
|
|
702
|
+
* {@linkcode RunOptions.pathChecks} to `'strict'` to fail instead.
|
|
615
703
|
*/
|
|
616
704
|
readonly stat?: (path: string) => Promise<'file' | 'directory' | null>;
|
|
617
705
|
/**
|
|
@@ -619,9 +707,41 @@ interface RunOptions {
|
|
|
619
707
|
* checks.
|
|
620
708
|
*
|
|
621
709
|
* `CLIBuilder.run()` supplies the runtime adapter's implementation
|
|
622
|
-
* automatically. When absent, missing paths are not created
|
|
710
|
+
* automatically. When absent, missing paths are not created: the existence
|
|
711
|
+
* rules decide instead, and the input is listed in
|
|
712
|
+
* {@linkcode RunResult.skippedPathChecks} with `missing: 'mkdir'`.
|
|
623
713
|
*/
|
|
624
714
|
readonly mkdir?: (path: string) => Promise<void>;
|
|
715
|
+
/**
|
|
716
|
+
* What happens to a declared filesystem check that cannot run because
|
|
717
|
+
* `stat` (or `mkdir` for `create`) was not supplied.
|
|
718
|
+
*
|
|
719
|
+
* - `'lenient'` — skip the check and record it in
|
|
720
|
+
* {@linkcode RunResult.skippedPathChecks}; the command still runs, which
|
|
721
|
+
* keeps parser and action tests off the host filesystem.
|
|
722
|
+
* - `'strict'` — fail with a `CLIError` of code `'PATH_CHECK_SKIPPED'`
|
|
723
|
+
* (exit code `1`) naming every input whose check did not run, so a
|
|
724
|
+
* passing test proves each declared `mustExist`, `type`, and `create`
|
|
725
|
+
* check was exercised.
|
|
726
|
+
*
|
|
727
|
+
* Only inputs that resolved a path value count. `CLIBuilder.run()` always
|
|
728
|
+
* supplies the adapter's filesystem, so this matters to `.execute()` and
|
|
729
|
+
* `runCommand()`.
|
|
730
|
+
*
|
|
731
|
+
* @defaultValue `'lenient'`
|
|
732
|
+
*/
|
|
733
|
+
readonly pathChecks?: 'lenient' | 'strict';
|
|
734
|
+
/**
|
|
735
|
+
* Environment namespace prepended to every relative `.env()` binding, the
|
|
736
|
+
* same way `CLIBuilder.envPrefix()` applies one CLI-wide.
|
|
737
|
+
*
|
|
738
|
+
* `.execute()` and `.run()` default it to the CLI's own prefix, and a value
|
|
739
|
+
* here wins. Pass it to `runCommand()` to test a command under the namespace
|
|
740
|
+
* its CLI declares; without it a command reads its env names as written.
|
|
741
|
+
*
|
|
742
|
+
* @defaultValue `undefined` (no namespace)
|
|
743
|
+
*/
|
|
744
|
+
readonly envPrefix?: string;
|
|
625
745
|
/**
|
|
626
746
|
* Verbosity level for the output channel.
|
|
627
747
|
* @defaultValue `'normal'`
|
|
@@ -702,6 +822,16 @@ interface RunResult {
|
|
|
702
822
|
* unknown errors are wrapped.
|
|
703
823
|
*/
|
|
704
824
|
readonly error: CLIError | undefined;
|
|
825
|
+
/**
|
|
826
|
+
* Declared `flag.path()` / `arg.path()` checks that did not run because no
|
|
827
|
+
* `stat` probe (or no `mkdir` for `create`) was supplied.
|
|
828
|
+
*
|
|
829
|
+
* Empty when every declared check ran, when no resolved value had a check
|
|
830
|
+
* to run, or when execution ended before resolution. A successful result
|
|
831
|
+
* with entries here never consulted the filesystem, so it does not prove
|
|
832
|
+
* the real CLI accepts the same path — pass `stat` / `mkdir`, or set
|
|
833
|
+
* {@linkcode RunOptions.pathChecks} to `'strict'` to make the test fail.
|
|
834
|
+
*/
|
|
835
|
+
readonly skippedPathChecks: readonly SkippedPathCheck[];
|
|
705
836
|
}
|
|
706
|
-
|
|
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 };
|
|
837
|
+
export { Builtins as A, Token as C, tokenize as D, stripBeforeSeparator as E, BuiltinMode as O, ParseResult as S, parse as T, ResolutionProvenanceRecord as _, TestPrompterOptions as a, SkippedPathCheck as b, formatHelp as c, CLIPluginHooks as d, PluginCommandContext as f, DeprecationWarning as g, resolve as h, TestAnswer as i, BuiltinsConfig as j, BuiltinName 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, includesBeforeSeparator as w, ParseOptions as x, ResolveResult as y };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { C as ErasedActionHandler, E as ExecutionStep, It as FlagBuilder, J as ArgConfig, K as Verbosity, Lt as FlagConfig,
|
|
2
|
-
import { A as
|
|
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, Gn as HelpThemeFactory, It as FlagBuilder, J as ArgConfig, K as Verbosity, Lt as FlagConfig, _ as CommandDefinition, b as CommandSchema, g as CommandBuilder, nr as schemaBrand, q as ArgBuilder } from "./index-BIMjOsR6.mjs";
|
|
2
|
+
import { A as Builtins, j as BuiltinsConfig, n as RunResult, t as RunOptions, u as CLIPlugin, x as ParseOptions } from "./index-DpslpOVV.mjs";
|
|
3
|
+
import { n as RuntimeAdapter } from "./adapter-DBeedKmD.mjs";
|
|
4
|
+
import { h as PackageJsonData, s as FormatLoader } from "./index-jq_FJRKt.mjs";
|
|
5
5
|
import { Colors } from "ansispeck";
|
|
6
|
-
//#region src/core/completion/shells/shared.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* Options for completion script generation.
|
|
9
8
|
*
|
|
@@ -40,8 +39,6 @@ interface CompletionOptions {
|
|
|
40
39
|
*/
|
|
41
40
|
readonly rootMode?: 'subcommands' | 'surface';
|
|
42
41
|
}
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region src/core/completion/shell.d.ts
|
|
45
42
|
/**
|
|
46
43
|
* Supported shell targets for completion script generation.
|
|
47
44
|
*
|
|
@@ -58,8 +55,6 @@ type Shell = 'bash' | 'zsh' | 'fish' | 'powershell';
|
|
|
58
55
|
* @see {@link Shell} for the union type matching these entries.
|
|
59
56
|
*/
|
|
60
57
|
declare const SHELLS: Readonly<readonly ['bash', 'zsh', 'fish', 'powershell']>;
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region src/core/cli/compiled.d.ts
|
|
63
58
|
/**
|
|
64
59
|
* Executable form of one registered command.
|
|
65
60
|
*/
|
|
@@ -84,8 +79,6 @@ interface CompiledCLI {
|
|
|
84
79
|
/** Plugins in registration order. */
|
|
85
80
|
readonly plugins: readonly CLIPlugin[];
|
|
86
81
|
}
|
|
87
|
-
//#endregion
|
|
88
|
-
//#region src/core/cli/help-links.d.ts
|
|
89
82
|
/**
|
|
90
83
|
* OSC 8 hyperlink targets for the root-help header.
|
|
91
84
|
*
|
|
@@ -98,8 +91,6 @@ interface HelpLinks {
|
|
|
98
91
|
/** URL the version links to (e.g. the release tag). */
|
|
99
92
|
readonly version: string | undefined;
|
|
100
93
|
}
|
|
101
|
-
//#endregion
|
|
102
|
-
//#region src/core/cli/index.d.ts
|
|
103
94
|
/**
|
|
104
95
|
* Runtime descriptor for the CLI program.
|
|
105
96
|
*
|
|
@@ -201,6 +192,16 @@ interface CLISchema {
|
|
|
201
192
|
* releases its tokens to the commands.
|
|
202
193
|
*/
|
|
203
194
|
readonly builtins: Builtins;
|
|
195
|
+
/**
|
|
196
|
+
* CLI-wide environment namespace prepended to every relative env binding
|
|
197
|
+
* (`undefined` when none is set). `.env('TOKEN')` reads `<envPrefix>TOKEN`;
|
|
198
|
+
* a binding declared with `{ absolute: true }` is read as written.
|
|
199
|
+
*
|
|
200
|
+
* Set via the {@linkcode CLIBuilder.envPrefix | .envPrefix()} builder method
|
|
201
|
+
* or the `envPrefix` field of {@link CLIDefinition}. Fixed when declared, so
|
|
202
|
+
* neither manifest name inference nor an inherited invocation name changes it.
|
|
203
|
+
*/
|
|
204
|
+
readonly envPrefix: string | undefined;
|
|
204
205
|
}
|
|
205
206
|
/**
|
|
206
207
|
* Options for {@link CLIBuilder.completions}: the generator options plus where
|
|
@@ -280,6 +281,17 @@ interface HelpConfig {
|
|
|
280
281
|
* @defaultValue `undefined` (use `flagOrder`)
|
|
281
282
|
*/
|
|
282
283
|
readonly sortFlags?: (a: string, b: string) => number;
|
|
284
|
+
/**
|
|
285
|
+
* Spelling of long flag names, aliases, and negations in the `Flags:` table.
|
|
286
|
+
*
|
|
287
|
+
* `'kebab'` shows `--wasm-path` for a flag keyed `wasmPath` while handlers
|
|
288
|
+
* keep reading `flags.wasmPath`. A spelling stays as declared when the
|
|
289
|
+
* parser would not accept its kebab form for the same flag, such as under
|
|
290
|
+
* `cli(name, { flags: { caseParity: false } })`.
|
|
291
|
+
*
|
|
292
|
+
* @defaultValue `'declared'`
|
|
293
|
+
*/
|
|
294
|
+
readonly flagSpelling?: 'declared' | 'kebab';
|
|
283
295
|
/**
|
|
284
296
|
* Theme overrides for help output, merged over the built-in theme.
|
|
285
297
|
*
|
|
@@ -466,6 +478,12 @@ interface CLIDefinition {
|
|
|
466
478
|
* @defaultValue every built-in `'on'`
|
|
467
479
|
*/
|
|
468
480
|
readonly builtins?: BuiltinsConfig | undefined;
|
|
481
|
+
/**
|
|
482
|
+
* CLI-wide environment namespace for relative env bindings, used verbatim
|
|
483
|
+
* (`'ACME_'` turns `TOKEN` into `ACME_TOKEN`).
|
|
484
|
+
* @defaultValue `undefined` (no namespace)
|
|
485
|
+
*/
|
|
486
|
+
readonly envPrefix?: string | undefined;
|
|
469
487
|
/**
|
|
470
488
|
* Registered command definitions or built schemas, in registration order.
|
|
471
489
|
* @defaultValue `[]`
|
|
@@ -721,6 +739,40 @@ declare class CLIBuilder {
|
|
|
721
739
|
* `--version` or `-V` as a flag name, an alias, or a negated spelling.
|
|
722
740
|
*/
|
|
723
741
|
version(v: string): CLIBuilder;
|
|
742
|
+
/**
|
|
743
|
+
* Namespace every relative env binding under one CLI-wide prefix.
|
|
744
|
+
*
|
|
745
|
+
* With no argument the prefix is derived from the name passed to `cli()`:
|
|
746
|
+
* camelCase word boundaries and each run of characters outside
|
|
747
|
+
* `[A-Za-z0-9]` become `_`, the result is uppercased with leading and
|
|
748
|
+
* trailing separators dropped, and `_` is appended (`foo-bar` and `fooBar`
|
|
749
|
+
* → `FOO_BAR_`). This is the rule a name-derived `.env()` follows, minus
|
|
750
|
+
* the trailing `_`. An explicit prefix is used verbatim. Either way it is fixed
|
|
751
|
+
* here, so a manifest-inferred name or an inherited invocation name (a
|
|
752
|
+
* symlink, an alias, `npx`) never changes the environment API.
|
|
753
|
+
*
|
|
754
|
+
* Every `.env()` binding on every command then reads the prefixed name, an
|
|
755
|
+
* indexed family's count and templates included, unless declared with
|
|
756
|
+
* `{ absolute: true }`. Precedence, coercion, and validation are unchanged;
|
|
757
|
+
* help, diagnostics, and `sources` name the concrete variable.
|
|
758
|
+
*
|
|
759
|
+
* @param prefix - The namespace to use verbatim, or omit it to derive one.
|
|
760
|
+
* @returns The builder (for chaining).
|
|
761
|
+
* @throws {CLIError} With code `'INVALID_SCHEMA'` when the prefix is empty or
|
|
762
|
+
* carries `=`, a brace, or NUL, or when no prefix can be derived from the name.
|
|
763
|
+
*
|
|
764
|
+
* @example
|
|
765
|
+
* ```ts
|
|
766
|
+
* cli('foo')
|
|
767
|
+
* .envPrefix()
|
|
768
|
+
* .command(
|
|
769
|
+
* command('deploy')
|
|
770
|
+
* .flag('token', flag.string().env('TOKEN')) // FOO_TOKEN
|
|
771
|
+
* .flag('home', flag.path().env('HOME', { absolute: true })), // HOME
|
|
772
|
+
* );
|
|
773
|
+
* ```
|
|
774
|
+
*/
|
|
775
|
+
envPrefix(prefix?: string): CLIBuilder;
|
|
724
776
|
/**
|
|
725
777
|
* Choose which built-in flags the root keeps.
|
|
726
778
|
*
|
|
@@ -1231,5 +1283,4 @@ declare function cli(options: CLIOptions): CLIBuilder;
|
|
|
1231
1283
|
* ```
|
|
1232
1284
|
*/
|
|
1233
1285
|
declare function isMainModule(meta: ImportMeta): boolean;
|
|
1234
|
-
//#endregion
|
|
1235
1286
|
export { SHELLS as C, HelpLinks as S, CompletionOptions as T, ResolvedManifestSettings as _, CLIRunOptions as a, isMainModule as b, CompletionsFlagConfig as c, DefaultCommandOptions as d, HelpConfig as f, RenderContextOptions as g, RenderContext as h, CLIOptions as i, ConfigSettings as l, ManifestSettings as m, CLIDefinition as n, CLISchema as o, InferNameOption as p, CLIExecuteOptions as r, CompletionRegistrationOptions as s, CLIBuilder as t, ConfigSettingsDefinition as u, cli as v, Shell as w, resolveRenderContext as x, createCLISchema as y };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { n as RuntimeAdapter } from "./adapter-
|
|
2
|
-
//#region src/core/config/package-json.d.ts
|
|
1
|
+
import { n as RuntimeAdapter } from "./adapter-DBeedKmD.mjs";
|
|
3
2
|
/**
|
|
4
3
|
* Object form of a manifest's `repository` field
|
|
5
4
|
* (e.g. `{"type":"git","url":"git+https://github.com/u/r.git"}`).
|
|
@@ -132,8 +131,6 @@ declare function discoverManifest(adapter: PackageJsonAdapter, options?: Manifes
|
|
|
132
131
|
declare function inferCliName(pkg: PackageJsonData, options?: {
|
|
133
132
|
readonly stripScope?: boolean;
|
|
134
133
|
}): string | undefined;
|
|
135
|
-
//#endregion
|
|
136
|
-
//#region src/core/config/repository-url.d.ts
|
|
137
134
|
/** Options for {@link packageRepositoryUrl}. */
|
|
138
135
|
interface PackageRepositoryUrlOptions {
|
|
139
136
|
/**
|
|
@@ -178,8 +175,6 @@ declare function packageRepositoryUrl(pkg: PackageJsonData, options: PackageRepo
|
|
|
178
175
|
}): string;
|
|
179
176
|
/** Resolve a manifest repository URL, returning `undefined` for absent or invalid locators. */
|
|
180
177
|
declare function packageRepositoryUrl(pkg: PackageJsonData, options?: PackageRepositoryUrlOptions): string | undefined;
|
|
181
|
-
//#endregion
|
|
182
|
-
//#region src/core/config/index.d.ts
|
|
183
178
|
/**
|
|
184
179
|
* Format loader — parses file content into a config object.
|
|
185
180
|
*
|
|
@@ -366,5 +361,4 @@ declare function discoverConfig(appName: string, adapter: ConfigAdapter, options
|
|
|
366
361
|
* ```
|
|
367
362
|
*/
|
|
368
363
|
declare function configFormat(extensions: readonly string[], parse: (content: string) => unknown): FormatLoader;
|
|
369
|
-
//#endregion
|
|
370
364
|
export { discoverManifest as _, ConfigNotFound as a, buildConfigSearchPaths as c, PackageRepositoryUrlOptions as d, packageRepositoryUrl as f, PackageRepository as g, PackageJsonData as h, ConfigFound as i, configFormat as l, PackageJsonAdapter as m, ConfigDiscoveryOptions as n, ConfigSearchPathOptions as o, ManifestDiscoveryOptions as p, ConfigDiscoveryResult as r, FormatLoader as s, ConfigAdapter as t, discoverConfig as u, inferCliName as v };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { $ as ArgDefinitionOverrides, $t as StringElementConfig, A as Out, An as PasswordPromptConfig, At as BooleanFlagDefinition, B as MiddlewareHandler, Bn as
|
|
2
|
-
import { A as
|
|
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-
|
|
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-
|
|
5
|
-
import { n as RuntimeAdapter } from "./adapter-
|
|
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-
|
|
7
|
-
import {
|
|
1
|
+
import { $ as ArgDefinitionOverrides, $n as TableFormat, $t as StringElementConfig, A as Out, An as PasswordPromptConfig, At as BooleanFlagDefinition, B as MiddlewareHandler, Bn as IndexedEnvBinding, 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 HelpThemeFactory, Gt as FlagParseFn, H as middleware, Hn as IndexedValueEnvBinding, Ht as FlagFactory, I as ResolutionProvenance, In as SelectPromptConfig, It as FlagBuilder, J as ArgConfig, Jn as ProgressHandle, Jt as InferFlag, K as Verbosity, Kn as ActivityEvent, 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, Qn as TableColumn, 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 HelpDescription, Ut as FlagKind, V as MiddlewareParams, Vn as IndexedRecordEnvBinding, Vt as FlagDefinitionOverrides, W as InferPrompt, Wn as HelpTheme, Wt as FlagNegation, X as ArgDefinition, Xn as SpinnerHandle, Xt as KeyValueFlagDefinition, Y as ArgDefaultValue, Yn as ProgressOptions, Yt as InferFlags, Z as ArgDefinitionBase, Zn as SpinnerOptions, 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, er as TableOptions, 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 Fallback, qt as FlagSchema, rn as createFlagSchema, rt as ArgPresence, s as ReadFn, sn as PathChecks, st as EnumArgDefinition, tn as WithPresence, tr as TableStream, 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 EnvOptions, zt as FlagDefinitionBase } from "./index-BIMjOsR6.mjs";
|
|
2
|
+
import { A as Builtins, C as Token, D as tokenize, E as stripBeforeSeparator, O as BuiltinMode, S as ParseResult, T as parse, _ as ResolutionProvenanceRecord, b as SkippedPathCheck, c as formatHelp, d as CLIPluginHooks, f as PluginCommandContext, g as DeprecationWarning, h as resolve, j as BuiltinsConfig, k as BuiltinName, l as BeforeParseParams, m as plugin, n as RunResult, p as ResolvedCommandParams, s as HelpOptions, u as CLIPlugin, v as ResolveOptions, w as includesBeforeSeparator, x as ParseOptions, y as ResolveResult } from "./index-DpslpOVV.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-D683D09G.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-hzYPRc_O.mjs";
|
|
5
|
+
import { n as RuntimeAdapter } from "./adapter-DBeedKmD.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-jq_FJRKt.mjs";
|
|
7
|
+
import { C as StdinBindingFragmentV1, O as DEFINITION_SCHEMA_URL, S as SplitPolicyFragmentV1, _ as InputSchemaProperty, a as CommandDefinitionFragmentV1, b as PromptDefinitionFragmentV1, c as EnvIndexedFragmentV1, d as FlagElementFragmentV1, f as FlagNegationFragmentV1, g as InputSchemaDocument, h as InputSchemaBranch, i as CommandDefinitionDocumentV1, k as DEFINITION_SCHEMA_VERSION, l as ExampleDefinitionFragmentV1, m as FlagStringConstraintsFragmentV1, n as ArgElementFragmentV1, o as DefinitionDocument, p as FlagPathChecksFragmentV1, r as CommandDefinitionDocument, s as DefinitionDocumentV1, t as ArgDefinitionFragmentV1, u as FlagDefinitionFragmentV1, v as JsonSchemaOptions, x as SourceSplitFragmentV1, y as PromptChoiceFragmentV1 } from "./index-BidVVmln.mjs";
|
|
8
8
|
import { Colors } from "ansispeck";
|
|
9
|
-
//#region src/core/help/ansi.d.ts
|
|
10
9
|
/**
|
|
11
10
|
* Measure the visible column width of `text`, ignoring ANSI/OSC escapes.
|
|
12
11
|
*
|
|
@@ -45,8 +44,6 @@ declare function visibleWidth(text: string): number;
|
|
|
45
44
|
* ```
|
|
46
45
|
*/
|
|
47
46
|
declare function osc8(url: string | URL, text?: string): string;
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region src/core/read-flags/index.d.ts
|
|
50
47
|
/**
|
|
51
48
|
* A record of flag definitions keyed by canonical flag name.
|
|
52
49
|
*
|
|
@@ -102,6 +99,16 @@ interface ReadFlagsOptions<F extends FlagMap = FlagMap> extends ResolveOptions {
|
|
|
102
99
|
* @defaultValue `'on'`
|
|
103
100
|
*/
|
|
104
101
|
readonly help?: 'on' | 'off';
|
|
102
|
+
/**
|
|
103
|
+
* Spelling of long flag names, aliases, and negations in generated help.
|
|
104
|
+
*
|
|
105
|
+
* `'kebab'` shows `--wasm-path` for a definition keyed `wasmPath`, which
|
|
106
|
+
* still resolves as `wasmPath`. A spelling stays as declared when the
|
|
107
|
+
* parser would not accept its kebab form for the same flag, such as with
|
|
108
|
+
* `parse: { caseParity: false }`.
|
|
109
|
+
* @defaultValue `'declared'`
|
|
110
|
+
*/
|
|
111
|
+
readonly flagSpelling?: 'declared' | 'kebab';
|
|
105
112
|
/**
|
|
106
113
|
* Receiver for notices produced by `.deprecated()` flags.
|
|
107
114
|
* @defaultValue `undefined`, which drops the notices
|
|
@@ -188,5 +195,4 @@ interface ReadFlagsOptions<F extends FlagMap = FlagMap> extends ResolveOptions {
|
|
|
188
195
|
* ```
|
|
189
196
|
*/
|
|
190
197
|
declare function readFlags<const F extends FlagMap>(definitions: F, options?: ReadFlagsOptions<F>): Promise<InferFlags<F>>;
|
|
191
|
-
|
|
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 };
|
|
198
|
+
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 EnvIndexedFragmentV1, type EnvOptions, 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 IndexedEnvBinding, type IndexedRecordEnvBinding, type IndexedValueEnvBinding, 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 SkippedPathCheck, 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
|
-
export{
|
|
1
|
+
export{W 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,q as FlagBuilder,nt as ParseError,st as SHELLS,$ as SPLIT_FORMATS,rt as ValidationError,G as arg,c as cli,B as command,K as createArgSchema,l as createCLISchema,V as createCommandSchema,J as createFlagSchema,D as createOutput,Y as flag,O as formatHelp,Z as getFlagNegatedName,H as group,N as includesBeforeSeparator,it as isCLIError,u as isMainModule,at as isParseError,ot as isValidationError,R as middleware,A as osc8,P as parse,p as plugin,i as readFlags,C as resolve,U as resolveExampleCommand,w as resolvePromptConfig,d as resolveRenderContext,F as stripBeforeSeparator,I as tokenize,j as visibleWidth,L as wasExplicit}from"./core-B9YNSJeA.mjs";
|