@kjanat/dreamcli 3.0.0-rc.3 → 3.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -1
- package/dist/core/cli/index.d.mts +54 -6
- package/dist/core/cli/index.mjs +24 -6
- package/dist/core/cli/planner.d.mts +2 -0
- package/dist/core/cli/planner.mjs +1 -1
- package/dist/core/cli/root-help.d.mts +2 -0
- package/dist/core/cli/root-help.mjs +3 -2
- package/dist/core/cli/root-surface.d.mts +12 -0
- package/dist/core/cli/root-surface.mjs +2 -1
- package/dist/core/cli/runtime-preflight.d.mts +2 -0
- package/dist/index.d.mts +2 -2
- package/dist/version.mjs +2 -2
- package/package.json +15 -7
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,20 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [3.0.0-rc.4] - 2026-07-06
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`.default(cmd, { route: true })`** — expose a default command under its own
|
|
15
|
+
name as a routable top-level command, in addition to the bare/flags-only root
|
|
16
|
+
surface. `mycli` and `mycli <name>` then run the same command object, and it
|
|
17
|
+
is listed in the root `Commands:` section (tagged `(default)`) beside its
|
|
18
|
+
siblings. Lets CLIs keep both a short root shorthand and an explicit,
|
|
19
|
+
documented named command without duplicating the builder (#55). Opt-in only
|
|
20
|
+
— the surface-only default remains the default behavior. With `route: true`
|
|
21
|
+
the name wins over positional interpretation, so a positional value equal to
|
|
22
|
+
the command's own name must be passed after `--`.
|
|
23
|
+
|
|
10
24
|
## [3.0.0-rc.3] - 2026-07-06
|
|
11
25
|
|
|
12
26
|
### Added
|
|
@@ -1038,7 +1052,8 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
1038
1052
|
- MIT License.
|
|
1039
1053
|
- Markdownlint configuration.
|
|
1040
1054
|
|
|
1041
|
-
[Unreleased]: https://github.com/kjanat/dreamcli/compare/v3.0.0-rc.
|
|
1055
|
+
[Unreleased]: https://github.com/kjanat/dreamcli/compare/v3.0.0-rc.4...HEAD
|
|
1056
|
+
[3.0.0-rc.4]: https://github.com/kjanat/dreamcli/compare/v3.0.0-rc.3...v3.0.0-rc.4
|
|
1042
1057
|
[3.0.0-rc.3]: https://github.com/kjanat/dreamcli/compare/v3.0.0-rc.2...v3.0.0-rc.3
|
|
1043
1058
|
[3.0.0-rc.2]: https://github.com/kjanat/dreamcli/compare/v3.0.0-rc.1...v3.0.0-rc.2
|
|
1044
1059
|
[3.0.0-rc.1]: https://github.com/kjanat/dreamcli/compare/v2.5.0...v3.0.0-rc.1
|
|
@@ -43,6 +43,15 @@ interface CLISchema {
|
|
|
43
43
|
* Set via the {@linkcode CLIBuilder.default | .default()} builder method.
|
|
44
44
|
*/
|
|
45
45
|
readonly defaultCommand: ErasedCommand | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the default command is also exposed as a named top-level route.
|
|
48
|
+
*
|
|
49
|
+
* Set by `.default(cmd, { route: true })`. When `true`, `mycli <name>`
|
|
50
|
+
* dispatches to the default command (in addition to the bare/flags-only root
|
|
51
|
+
* surface behavior) and the command is listed in the root `Commands:`
|
|
52
|
+
* section. When `false` (the default), the default is the root surface only.
|
|
53
|
+
*/
|
|
54
|
+
readonly defaultCommandRouted: boolean;
|
|
46
55
|
/**
|
|
47
56
|
* Config discovery settings.
|
|
48
57
|
*
|
|
@@ -241,6 +250,29 @@ interface CLIRunOptions extends Omit<RunOptions, 'meta' | 'mergedSchema'> {
|
|
|
241
250
|
*/
|
|
242
251
|
readonly adapter?: RuntimeAdapter;
|
|
243
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* Options for {@linkcode CLIBuilder.default | .default()}.
|
|
255
|
+
*/
|
|
256
|
+
interface DefaultCommandOptions {
|
|
257
|
+
/**
|
|
258
|
+
* Also expose the default command under its own name as a routable
|
|
259
|
+
* top-level command.
|
|
260
|
+
*
|
|
261
|
+
* By default a default command is the root *surface* only — `mycli` (bare or
|
|
262
|
+
* flags-only) runs it, but `mycli <its-name>` does not route to it (the token
|
|
263
|
+
* is consumed as the default's first positional). Set `route: true` for CLIs
|
|
264
|
+
* that intentionally expose both forms: `mycli` and `mycli <its-name>` become
|
|
265
|
+
* the same command, and it is listed in the root `Commands:` section beside
|
|
266
|
+
* its siblings.
|
|
267
|
+
*
|
|
268
|
+
* The name wins over positional interpretation: with `route: true`, a
|
|
269
|
+
* positional value equal to the command's own name is consumed as the route,
|
|
270
|
+
* so pass such a value after `--` (`mycli -- <name>`).
|
|
271
|
+
*
|
|
272
|
+
* @defaultValue `false`
|
|
273
|
+
*/
|
|
274
|
+
readonly route?: boolean;
|
|
275
|
+
}
|
|
244
276
|
/**
|
|
245
277
|
* Immutable CLI program builder.
|
|
246
278
|
*
|
|
@@ -543,10 +575,17 @@ declare class CLIBuilder {
|
|
|
543
575
|
* this command instead of showing root help.
|
|
544
576
|
*
|
|
545
577
|
* The default command is the CLI's root *surface*: its flags and arguments
|
|
546
|
-
* are rendered inline in root help.
|
|
547
|
-
* cannot be invoked by its own name (`mycli mycmd` does not
|
|
548
|
-
* it is omitted from the root `Commands:` list
|
|
549
|
-
* `.help({ showDefaultInCommands: true })`). Only one default is
|
|
578
|
+
* are rendered inline in root help. By default it is **not** a named
|
|
579
|
+
* subcommand — it cannot be invoked by its own name (`mycli mycmd` does not
|
|
580
|
+
* route to it) and it is omitted from the root `Commands:` list (re-enable
|
|
581
|
+
* listing with `.help({ showDefaultInCommands: true })`). Only one default is
|
|
582
|
+
* allowed.
|
|
583
|
+
*
|
|
584
|
+
* Pass `{ route: true }` to *also* expose the command under its own name as a
|
|
585
|
+
* routable top-level command: `mycli` and `mycli <name>` then run the same
|
|
586
|
+
* command object, and it is listed in `Commands:` beside its siblings. This
|
|
587
|
+
* avoids duplicating the command just to keep both forms equivalent during a
|
|
588
|
+
* v3 migration.
|
|
550
589
|
*
|
|
551
590
|
* @example
|
|
552
591
|
* ```ts
|
|
@@ -563,12 +602,21 @@ declare class CLIBuilder {
|
|
|
563
602
|
* .default(deploy)
|
|
564
603
|
* .command(status)
|
|
565
604
|
* .run();
|
|
605
|
+
*
|
|
606
|
+
* // Default that is also a named route — `mytool` and `mytool status` are
|
|
607
|
+
* // the same surface, and `status` is listed beside `logs`:
|
|
608
|
+
* cli('mytool')
|
|
609
|
+
* .default(status, { route: true })
|
|
610
|
+
* .command(logs)
|
|
611
|
+
* .run();
|
|
566
612
|
* ```
|
|
567
613
|
*
|
|
568
614
|
* @param cmd - {@link CommandBuilder} to register as the default.
|
|
615
|
+
* @param options - Default-command options. `{ route: true }` also exposes
|
|
616
|
+
* the command under its own name (see {@link DefaultCommandOptions}).
|
|
569
617
|
* @returns The builder (for chaining).
|
|
570
618
|
*/
|
|
571
|
-
default<F extends Record<string, FlagBuilder<FlagConfig>>, A extends Record<string, ArgBuilder<ArgConfig>>, C extends Record<string, unknown>>(cmd: CommandBuilder<F, A, C
|
|
619
|
+
default<F extends Record<string, FlagBuilder<FlagConfig>>, A extends Record<string, ArgBuilder<ArgConfig>>, C extends Record<string, unknown>>(cmd: CommandBuilder<F, A, C>, options?: DefaultCommandOptions): CLIBuilder;
|
|
572
620
|
/**
|
|
573
621
|
* Register a CLI plugin.
|
|
574
622
|
*
|
|
@@ -730,4 +778,4 @@ declare function cli(name: string): CLIBuilder;
|
|
|
730
778
|
/** Create a new CLI program builder from an options object. */
|
|
731
779
|
declare function cli(options: CLIOptions): CLIBuilder;
|
|
732
780
|
//#endregion
|
|
733
|
-
export { type BeforeParseParams, CLIBuilder, type CLIOptions, type CLIPlugin, type CLIPluginHooks, type CLIRunOptions, type CLISchema, type CompletionsFlagConfig, type ConfigSettings, type HelpConfig, type HelpLinks, type InferNameOption, type ManifestPresetSettings, type ManifestSettings, type PackageJsonSettings, type PluginCommandContext, type ResolvedCommandParams, type ResolvedManifestSettings, cli, formatRootHelp, plugin };
|
|
781
|
+
export { type BeforeParseParams, CLIBuilder, type CLIOptions, type CLIPlugin, type CLIPluginHooks, type CLIRunOptions, type CLISchema, type CompletionsFlagConfig, type ConfigSettings, type DefaultCommandOptions, type HelpConfig, type HelpLinks, type InferNameOption, type ManifestPresetSettings, type ManifestSettings, type PackageJsonSettings, type PluginCommandContext, type ResolvedCommandParams, type ResolvedManifestSettings, cli, formatRootHelp, plugin };
|
package/dist/core/cli/index.mjs
CHANGED
|
@@ -375,10 +375,17 @@ var CLIBuilder = class CLIBuilder {
|
|
|
375
375
|
* this command instead of showing root help.
|
|
376
376
|
*
|
|
377
377
|
* The default command is the CLI's root *surface*: its flags and arguments
|
|
378
|
-
* are rendered inline in root help.
|
|
379
|
-
* cannot be invoked by its own name (`mycli mycmd` does not
|
|
380
|
-
* it is omitted from the root `Commands:` list
|
|
381
|
-
* `.help({ showDefaultInCommands: true })`). Only one default is
|
|
378
|
+
* are rendered inline in root help. By default it is **not** a named
|
|
379
|
+
* subcommand — it cannot be invoked by its own name (`mycli mycmd` does not
|
|
380
|
+
* route to it) and it is omitted from the root `Commands:` list (re-enable
|
|
381
|
+
* listing with `.help({ showDefaultInCommands: true })`). Only one default is
|
|
382
|
+
* allowed.
|
|
383
|
+
*
|
|
384
|
+
* Pass `{ route: true }` to *also* expose the command under its own name as a
|
|
385
|
+
* routable top-level command: `mycli` and `mycli <name>` then run the same
|
|
386
|
+
* command object, and it is listed in `Commands:` beside its siblings. This
|
|
387
|
+
* avoids duplicating the command just to keep both forms equivalent during a
|
|
388
|
+
* v3 migration.
|
|
382
389
|
*
|
|
383
390
|
* @example
|
|
384
391
|
* ```ts
|
|
@@ -395,12 +402,21 @@ var CLIBuilder = class CLIBuilder {
|
|
|
395
402
|
* .default(deploy)
|
|
396
403
|
* .command(status)
|
|
397
404
|
* .run();
|
|
405
|
+
*
|
|
406
|
+
* // Default that is also a named route — `mytool` and `mytool status` are
|
|
407
|
+
* // the same surface, and `status` is listed beside `logs`:
|
|
408
|
+
* cli('mytool')
|
|
409
|
+
* .default(status, { route: true })
|
|
410
|
+
* .command(logs)
|
|
411
|
+
* .run();
|
|
398
412
|
* ```
|
|
399
413
|
*
|
|
400
414
|
* @param cmd - {@link CommandBuilder} to register as the default.
|
|
415
|
+
* @param options - Default-command options. `{ route: true }` also exposes
|
|
416
|
+
* the command under its own name (see {@link DefaultCommandOptions}).
|
|
401
417
|
* @returns The builder (for chaining).
|
|
402
418
|
*/
|
|
403
|
-
default(cmd) {
|
|
419
|
+
default(cmd, options) {
|
|
404
420
|
if (this.schema.defaultCommand !== void 0) throw new CLIError("Only one default command is allowed", {
|
|
405
421
|
code: "DUPLICATE_DEFAULT",
|
|
406
422
|
suggest: "Call .default() only once when building the CLI"
|
|
@@ -410,7 +426,8 @@ var CLIBuilder = class CLIBuilder {
|
|
|
410
426
|
const erased = eraseCommand(cmd);
|
|
411
427
|
return new CLIBuilder({
|
|
412
428
|
...this.schema,
|
|
413
|
-
defaultCommand: erased
|
|
429
|
+
defaultCommand: erased,
|
|
430
|
+
defaultCommandRouted: options?.route ?? false
|
|
414
431
|
});
|
|
415
432
|
}
|
|
416
433
|
/**
|
|
@@ -888,6 +905,7 @@ function cli(nameOrOptions) {
|
|
|
888
905
|
description: void 0,
|
|
889
906
|
commands: [],
|
|
890
907
|
defaultCommand: void 0,
|
|
908
|
+
defaultCommandRouted: false,
|
|
891
909
|
configSettings: void 0,
|
|
892
910
|
packageJsonSettings: void 0,
|
|
893
911
|
helpLinks: void 0,
|
|
@@ -23,6 +23,8 @@ interface PlannerSchemaLike {
|
|
|
23
23
|
readonly commands: readonly ErasedCommand[];
|
|
24
24
|
/** Fallback command when no subcommand token matches. */
|
|
25
25
|
readonly defaultCommand: ErasedCommand | undefined;
|
|
26
|
+
/** Whether the default command is also exposed as a named top-level route. */
|
|
27
|
+
readonly defaultCommandRouted: boolean;
|
|
26
28
|
/**
|
|
27
29
|
* Eager `--completions <shell>` flag configuration, when `.completions()`
|
|
28
30
|
* was registered with `{ as: 'flag' }`. `undefined` disables interception.
|
|
@@ -243,7 +243,7 @@ function planInvocation(options) {
|
|
|
243
243
|
kind: "root-help",
|
|
244
244
|
help: options.help
|
|
245
245
|
};
|
|
246
|
-
const result = dispatch(filteredArgv, buildRootCommandMap(options.schema.commands), [], rootValueFlags);
|
|
246
|
+
const result = dispatch(filteredArgv, buildRootCommandMap(defaultCommand !== void 0 && options.schema.defaultCommandRouted ? [...options.schema.commands, defaultCommand] : options.schema.commands), [], rootValueFlags);
|
|
247
247
|
switch (result.kind) {
|
|
248
248
|
case "unknown": {
|
|
249
249
|
if (defaultCommand !== void 0 && result.parentPath.length === 0) {
|
|
@@ -13,6 +13,8 @@ interface CLISchemaLike {
|
|
|
13
13
|
readonly defaultCommand: {
|
|
14
14
|
readonly schema: CommandSchema;
|
|
15
15
|
} | undefined;
|
|
16
|
+
/** Whether the default is also a named route — listed in `Commands:` when so. */
|
|
17
|
+
readonly defaultCommandRouted?: boolean | undefined;
|
|
16
18
|
readonly helpLinks?: {
|
|
17
19
|
readonly name: string | undefined;
|
|
18
20
|
readonly version: string | undefined;
|
|
@@ -49,8 +49,9 @@ function formatRootHelp(schema, options) {
|
|
|
49
49
|
const surfaceUsage = surfaceSections.shift();
|
|
50
50
|
if (inline && surfaceUsage !== void 0 && inlineDefaultCommand !== void 0) sections.push(surface.hasVisibleSubcommands ? mergeUsageSections(rootUsage, surfaceUsage) : surfaceUsage);
|
|
51
51
|
else sections.push(rootUsage);
|
|
52
|
-
const
|
|
53
|
-
|
|
52
|
+
const listDefaultInCommands = defaultCommand !== void 0 && (surface.defaultRouted || showDefaultInCommands);
|
|
53
|
+
const listedCommands = listDefaultInCommands ? [...surface.visibleSubcommands, defaultCommand] : surface.visibleSubcommands;
|
|
54
|
+
if (listedCommands.length > 0) sections.push(formatRootCommandsSection(listedCommands, listDefaultInCommands ? defaultCommand?.name : void 0, width));
|
|
54
55
|
if (inline && surfaceCommand !== void 0) {
|
|
55
56
|
if (surfaceCommand.description !== void 0 && surfaceCommand.description === schema.description && surfaceSections[0] === surfaceCommand.description) surfaceSections.shift();
|
|
56
57
|
sections.push(...surfaceSections);
|
|
@@ -16,6 +16,12 @@ interface RootSurfaceSchemaLike {
|
|
|
16
16
|
readonly defaultCommand: {
|
|
17
17
|
readonly schema: CommandSchema;
|
|
18
18
|
} | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the default command is also exposed as a named route
|
|
21
|
+
* (`.default(cmd, { route: true })`). Optional so hand-built schema-like
|
|
22
|
+
* objects default to the surface-only behavior.
|
|
23
|
+
*/
|
|
24
|
+
readonly defaultCommandRouted?: boolean | undefined;
|
|
19
25
|
}
|
|
20
26
|
/**
|
|
21
27
|
* Normalized root shape shared by help and completion logic.
|
|
@@ -40,6 +46,12 @@ interface RootSurface {
|
|
|
40
46
|
readonly hasVisibleDefault: boolean;
|
|
41
47
|
/** Whether any visible real subcommands exist (the default does not count). */
|
|
42
48
|
readonly hasVisibleSubcommands: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the visible default is also a named route (`.default(cmd, { route:
|
|
51
|
+
* true })`), meaning it should be listed in `Commands:` beside its siblings
|
|
52
|
+
* in addition to being rendered as the root surface.
|
|
53
|
+
*/
|
|
54
|
+
readonly defaultRouted: boolean;
|
|
43
55
|
}
|
|
44
56
|
/**
|
|
45
57
|
* Resolve the visible shape of the CLI root.
|
|
@@ -20,7 +20,8 @@ function resolveRootSurface(schema) {
|
|
|
20
20
|
visibleSubcommands,
|
|
21
21
|
visibleDefaultCommand,
|
|
22
22
|
hasVisibleDefault: visibleDefaultCommand !== void 0,
|
|
23
|
-
hasVisibleSubcommands: visibleSubcommands.length > 0
|
|
23
|
+
hasVisibleSubcommands: visibleSubcommands.length > 0,
|
|
24
|
+
defaultRouted: visibleDefaultCommand !== void 0 && schema.defaultCommandRouted === true
|
|
24
25
|
};
|
|
25
26
|
}
|
|
26
27
|
//#endregion
|
|
@@ -58,6 +58,8 @@ interface RuntimePreflightSchemaLike {
|
|
|
58
58
|
readonly commands: readonly ErasedCommand[];
|
|
59
59
|
/** Fallback command when no subcommand token matches. */
|
|
60
60
|
readonly defaultCommand: ErasedCommand | undefined;
|
|
61
|
+
/** Whether the default command is also exposed as a named top-level route. */
|
|
62
|
+
readonly defaultCommandRouted: boolean;
|
|
61
63
|
/** Config file discovery settings; `undefined` disables config loading. */
|
|
62
64
|
readonly configSettings: RuntimeConfigSettings | undefined;
|
|
63
65
|
/** Package.json discovery settings; `undefined` disables package.json inference. */
|
package/dist/index.d.mts
CHANGED
|
@@ -26,7 +26,7 @@ import { generatePowerShellCompletion } from "./core/completion/shells/powershel
|
|
|
26
26
|
import { generateZshCompletion } from "./core/completion/shells/zsh.mjs";
|
|
27
27
|
import { SHELLS, Shell, generateCompletion } from "./core/completion/index.mjs";
|
|
28
28
|
import { ConfigAdapter, ConfigDiscoveryOptions, ConfigDiscoveryResult, ConfigFound, ConfigNotFound, FormatLoader, buildConfigSearchPaths, configFormat, discoverConfig } from "./core/config/index.mjs";
|
|
29
|
-
import { CLIBuilder, CLIOptions, CLIRunOptions, CLISchema, ConfigSettings, InferNameOption, ManifestPresetSettings, ManifestSettings, PackageJsonSettings, ResolvedManifestSettings, cli } from "./core/cli/index.mjs";
|
|
29
|
+
import { CLIBuilder, CLIOptions, CLIRunOptions, CLISchema, ConfigSettings, DefaultCommandOptions, InferNameOption, ManifestPresetSettings, ManifestSettings, PackageJsonSettings, ResolvedManifestSettings, cli } from "./core/cli/index.mjs";
|
|
30
30
|
import { JsonSchemaOptions, definitionMetaSchema, generateInputSchema, generateSchema } from "./core/json-schema/index.mjs";
|
|
31
31
|
import { Colors } from "ansispeck";
|
|
32
|
-
export { type ActionHandler, type ActionParams, type ActivityEvent, type AnyCommandBuilder, ArgBuilder, type ArgConfig, type ArgFactory, type ArgKind, type ArgParseFn, type ArgPresence, type ArgSchema, type BeforeParseParams, CLIBuilder, CLIError, type CLIErrorJSON, type CLIErrorOptions, type CLIOptions, type CLIPlugin, type CLIPluginHooks, type CLIRunOptions, type CLISchema, type Colors, type CommandArgEntry, CommandBuilder, type CommandConfig, type CommandExample, type CommandMeta, type CommandSchema, type CompletionOptions, type ConfigAdapter, type ConfigDiscoveryOptions, type ConfigDiscoveryResult, type ConfigFound, type ConfigNotFound, type ConfigSettings, type ConfirmPromptConfig, type DeprecationWarning, type DeriveHandler, type DeriveParams, type ErrorCode, type Fallback, FlagBuilder, type FlagConfig, type FlagFactory, type FlagKind, type FlagParseFn, type FlagPresence, type FlagSchema, type FormatLoader, type HelpLinks, type HelpOptions, type InferArg, type InferArgs, type InferFlag, type InferFlags, type InferNameOption, type InputPromptConfig, type InteractiveParams, type InteractiveResolver, type InteractiveResult, type JsonSchemaOptions, type ManifestDiscoveryOptions, type ManifestPresetSettings, type ManifestSettings, type Middleware, type MiddlewareHandler, type MiddlewareParams, type MultiselectPromptConfig, type NumberConstraintViolation, type NumberConstraints, type Out, type OutputOptions, type PackageJsonAdapter, type PackageJsonData, type PackageJsonSettings, type PackageRepository, ParseError, type ParseErrorCode, type ParseErrorOptions, type ParseResult, type PluginCommandContext, type ProgressHandle, type ProgressOptions, type PromptConfig, type PromptConfigBase, type PromptEngine, type PromptKind, type PromptResult, type ReadFn, type ResolveOptions, type ResolveResult, type ResolvedArgValue, type ResolvedCommandParams, type ResolvedManifestSettings, type ResolvedMultiselectPromptConfig, type ResolvedPromptConfig, type ResolvedSelectPromptConfig, type ResolvedValue, type RunResult, SHELLS, type SelectChoice, type SelectPromptConfig, type Shell, type SpinnerHandle, type SpinnerOptions, type TableColumn, type TableFormat, type TableOptions, type TableStream, type Token, ValidationError, type ValidationErrorCode, type ValidationErrorOptions, type Verbosity, type WithArgPresence, type WithPresence, type WithVariadic, type WriteFn, arg, buildConfigSearchPaths, cli, command, configFormat, createArgSchema, createOutput, createSchema, createTerminalPrompter, definitionMetaSchema, discoverConfig, discoverManifest, discoverPackageJson, flag, formatHelp, generateBashCompletion, generateCompletion, generateFishCompletion, generateInputSchema, generatePowerShellCompletion, generateSchema, generateZshCompletion, group, inferCliName, isCLIError, isParseError, isValidationError, middleware, osc8, packageRepositoryUrl, parse, plugin, resolve, resolvePromptConfig, tokenize, visibleWidth };
|
|
32
|
+
export { type ActionHandler, type ActionParams, type ActivityEvent, type AnyCommandBuilder, ArgBuilder, type ArgConfig, type ArgFactory, type ArgKind, type ArgParseFn, type ArgPresence, type ArgSchema, type BeforeParseParams, CLIBuilder, CLIError, type CLIErrorJSON, type CLIErrorOptions, type CLIOptions, type CLIPlugin, type CLIPluginHooks, type CLIRunOptions, type CLISchema, type Colors, type CommandArgEntry, CommandBuilder, type CommandConfig, type CommandExample, type CommandMeta, type CommandSchema, type CompletionOptions, type ConfigAdapter, type ConfigDiscoveryOptions, type ConfigDiscoveryResult, type ConfigFound, type ConfigNotFound, type ConfigSettings, type ConfirmPromptConfig, type DefaultCommandOptions, type DeprecationWarning, type DeriveHandler, type DeriveParams, type ErrorCode, type Fallback, FlagBuilder, type FlagConfig, type FlagFactory, type FlagKind, type FlagParseFn, type FlagPresence, type FlagSchema, type FormatLoader, type HelpLinks, type HelpOptions, type InferArg, type InferArgs, type InferFlag, type InferFlags, type InferNameOption, type InputPromptConfig, type InteractiveParams, type InteractiveResolver, type InteractiveResult, type JsonSchemaOptions, type ManifestDiscoveryOptions, type ManifestPresetSettings, type ManifestSettings, type Middleware, type MiddlewareHandler, type MiddlewareParams, type MultiselectPromptConfig, type NumberConstraintViolation, type NumberConstraints, type Out, type OutputOptions, type PackageJsonAdapter, type PackageJsonData, type PackageJsonSettings, type PackageRepository, ParseError, type ParseErrorCode, type ParseErrorOptions, type ParseResult, type PluginCommandContext, type ProgressHandle, type ProgressOptions, type PromptConfig, type PromptConfigBase, type PromptEngine, type PromptKind, type PromptResult, type ReadFn, type ResolveOptions, type ResolveResult, type ResolvedArgValue, type ResolvedCommandParams, type ResolvedManifestSettings, type ResolvedMultiselectPromptConfig, type ResolvedPromptConfig, type ResolvedSelectPromptConfig, type ResolvedValue, type RunResult, SHELLS, type SelectChoice, type SelectPromptConfig, type Shell, type SpinnerHandle, type SpinnerOptions, type TableColumn, type TableFormat, type TableOptions, type TableStream, type Token, ValidationError, type ValidationErrorCode, type ValidationErrorOptions, type Verbosity, type WithArgPresence, type WithPresence, type WithVariadic, type WriteFn, arg, buildConfigSearchPaths, cli, command, configFormat, createArgSchema, createOutput, createSchema, createTerminalPrompter, definitionMetaSchema, discoverConfig, discoverManifest, discoverPackageJson, flag, formatHelp, generateBashCompletion, generateCompletion, generateFishCompletion, generateInputSchema, generatePowerShellCompletion, generateSchema, generateZshCompletion, group, inferCliName, isCLIError, isParseError, isValidationError, middleware, osc8, packageRepositoryUrl, parse, plugin, resolve, resolvePromptConfig, tokenize, visibleWidth };
|
package/dist/version.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region src/version.ts
|
|
2
2
|
/** Package version (e.g. `"0.9.1"`). `"dev"` when running unbundled. */
|
|
3
|
-
const DREAMCLI_VERSION = "3.0.0-rc.
|
|
3
|
+
const DREAMCLI_VERSION = "3.0.0-rc.4";
|
|
4
4
|
/** Git short SHA (e.g. `"f9b5f1a"`). `"dev"` when running unbundled. */
|
|
5
|
-
const DREAMCLI_REVISION = "
|
|
5
|
+
const DREAMCLI_REVISION = "7314c6f";
|
|
6
6
|
//#endregion
|
|
7
7
|
export { DREAMCLI_REVISION, DREAMCLI_VERSION };
|
package/package.json
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kjanat/dreamcli",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.4",
|
|
4
4
|
"description": "Schema-first, fully typed TypeScript CLI framework",
|
|
5
|
-
"keywords": [
|
|
5
|
+
"keywords": [
|
|
6
|
+
"dreamcli",
|
|
7
|
+
"cli",
|
|
8
|
+
"typescript",
|
|
9
|
+
"framework",
|
|
10
|
+
"schema-first",
|
|
11
|
+
"command-line",
|
|
12
|
+
"ansispeck"
|
|
13
|
+
],
|
|
6
14
|
"homepage": "https://dreamcli.kjanat.dev",
|
|
7
15
|
"bugs": {
|
|
8
16
|
"url": "https://github.com/kjanat/dreamcli/issues"
|
|
@@ -113,8 +121,8 @@
|
|
|
113
121
|
"@types/bun": "^1.3.14",
|
|
114
122
|
"@types/deno": "^2.7.0",
|
|
115
123
|
"@types/node": ">=26.1.0",
|
|
116
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
117
|
-
"@vitest/coverage-v8": "^4.1.
|
|
124
|
+
"@typescript/native-preview": "^7.0.0-dev.20260706.1",
|
|
125
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
118
126
|
"dprint": "^0.55.1",
|
|
119
127
|
"floating-vue": "^5.2.2",
|
|
120
128
|
"knip": "^6.24.0",
|
|
@@ -122,11 +130,11 @@
|
|
|
122
130
|
"publint": "^0.3.21",
|
|
123
131
|
"runner-run": "0.19.1",
|
|
124
132
|
"tsdown": "^0.22.3",
|
|
125
|
-
"typedoc": "^0.28.
|
|
133
|
+
"typedoc": "^0.28.20",
|
|
126
134
|
"typescript": "^6.0.3",
|
|
127
135
|
"vite": "^8.1.3",
|
|
128
|
-
"vitepress": "^2.0.0-alpha.
|
|
129
|
-
"vitest": "^4.1.
|
|
136
|
+
"vitepress": "^2.0.0-alpha.18",
|
|
137
|
+
"vitest": "^4.1.10",
|
|
130
138
|
"wrangler": "^4.107.0",
|
|
131
139
|
"yaml": "^2.9.0"
|
|
132
140
|
},
|