@kjanat/dreamcli 2.5.0 → 3.0.0-rc.2
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 +153 -1
- package/README.md +9 -2
- package/dist/core/cli/dispatch.mjs +214 -1
- package/dist/core/cli/help-links.mjs +41 -1
- package/dist/core/cli/index.d.mts +109 -16
- package/dist/core/cli/index.mjs +901 -1
- package/dist/core/cli/planner.d.mts +27 -5
- package/dist/core/cli/planner.mjs +300 -1
- package/dist/core/cli/plugin.mjs +41 -1
- package/dist/core/cli/propagate.mjs +57 -1
- package/dist/core/cli/root-help.d.mts +16 -2
- package/dist/core/cli/root-help.mjs +208 -6
- package/dist/core/cli/root-surface.d.mts +18 -3
- package/dist/core/cli/root-surface.mjs +27 -1
- package/dist/core/cli/runtime-preflight.d.mts +16 -1
- package/dist/core/cli/runtime-preflight.mjs +168 -1
- package/dist/core/completion/index.d.mts +32 -1
- package/dist/core/completion/index.mjs +90 -1
- package/dist/core/completion/shells/bash.mjs +304 -3
- package/dist/core/completion/shells/fish.mjs +159 -2
- package/dist/core/completion/shells/powershell.mjs +353 -2
- package/dist/core/completion/shells/shared.d.mts +10 -0
- package/dist/core/completion/shells/shared.mjs +154 -1
- package/dist/core/completion/shells/zsh.mjs +244 -2
- package/dist/core/config/index.mjs +246 -1
- package/dist/core/config/package-json.mjs +385 -3
- package/dist/core/errors/index.mjs +87 -1
- package/dist/core/execution/index.mjs +189 -1
- package/dist/core/help/ansi.mjs +122 -2
- package/dist/core/help/index.d.mts +45 -1
- package/dist/core/help/index.mjs +329 -7
- package/dist/core/json-schema/index.mjs +487 -9
- package/dist/core/json-schema/meta-descriptions.generated.d.mts +38 -38
- package/dist/core/json-schema/meta-descriptions.generated.mjs +93 -28
- package/dist/core/output/activity.mjs +452 -1
- package/dist/core/output/bind.mjs +56 -1
- package/dist/core/output/contracts.mjs +57 -1
- package/dist/core/output/display-value.mjs +32 -1
- package/dist/core/output/index.d.mts +21 -0
- package/dist/core/output/index.mjs +442 -2
- package/dist/core/output/renderers.mjs +46 -1
- package/dist/core/output/writer.mjs +12 -1
- package/dist/core/parse/index.d.mts +15 -1
- package/dist/core/parse/index.mjs +555 -1
- package/dist/core/prompt/index.d.mts +11 -4
- package/dist/core/prompt/index.mjs +348 -6
- package/dist/core/resolve/args.mjs +105 -1
- package/dist/core/resolve/coerce.mjs +279 -1
- package/dist/core/resolve/config.mjs +19 -1
- package/dist/core/resolve/errors.mjs +140 -2
- package/dist/core/resolve/flags.mjs +196 -1
- package/dist/core/resolve/index.mjs +85 -1
- package/dist/core/resolve/property.d.mts +2 -1
- package/dist/core/resolve/property.mjs +45 -1
- package/dist/core/schema/arg.d.mts +90 -10
- package/dist/core/schema/arg.mjs +463 -1
- package/dist/core/schema/command.d.mts +21 -1
- package/dist/core/schema/command.mjs +712 -1
- package/dist/core/schema/flag.d.mts +92 -2
- package/dist/core/schema/flag.mjs +453 -1
- package/dist/core/schema/index.d.mts +2 -1
- package/dist/core/schema/middleware.mjs +41 -1
- package/dist/core/schema/number-constraints.d.mts +96 -0
- package/dist/core/schema/number-constraints.mjs +60 -0
- package/dist/core/schema/prompt.d.mts +15 -0
- package/dist/core/schema/run.d.mts +4 -4
- package/dist/core/schema-dsl/runtime.mjs +271 -2
- package/dist/core/schema-dsl/to-json-schema.mjs +74 -1
- package/dist/core/testkit/index.d.mts +9 -5
- package/dist/core/testkit/index.mjs +83 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.mjs +22 -1
- package/dist/runtime/adapter.mjs +82 -1
- package/dist/runtime/auto.mjs +46 -1
- package/dist/runtime/bun.mjs +28 -1
- package/dist/runtime/deno.mjs +217 -2
- package/dist/runtime/detect.mjs +45 -1
- package/dist/runtime/node.mjs +169 -2
- package/dist/runtime/paths.mjs +48 -1
- package/dist/runtime.mjs +7 -1
- package/dist/strings.mjs +22 -1
- package/dist/testkit.mjs +5 -1
- package/dist/version.mjs +7 -1
- package/examples/basic.ts +5 -1
- package/examples/gh/package.json +2 -7
- package/examples/pwsh-demo/package.json +1 -7
- package/examples/pwsh-demo/src/main.test.ts +1 -4
- package/examples/pwsh-demo/src/main.ts +14 -4
- package/examples/transport-launcher.ts +85 -0
- package/package.json +23 -41
- package/dist/runtime/support.d.mts +0 -42
- package/dist/runtime/support.mjs +0 -1
- package/src/core/cli/dispatch.ts +0 -349
- package/src/core/cli/help-links.ts +0 -82
- package/src/core/cli/index.ts +0 -1413
- package/src/core/cli/planner.ts +0 -487
- package/src/core/cli/plugin.ts +0 -117
- package/src/core/cli/propagate.ts +0 -97
- package/src/core/cli/root-help.ts +0 -252
- package/src/core/cli/root-surface.ts +0 -74
- package/src/core/cli/runtime-preflight.ts +0 -438
- package/src/core/completion/index.ts +0 -88
- package/src/core/completion/shells/bash.ts +0 -459
- package/src/core/completion/shells/fish.ts +0 -259
- package/src/core/completion/shells/powershell.ts +0 -439
- package/src/core/completion/shells/shared.ts +0 -283
- package/src/core/completion/shells/zsh.ts +0 -381
- package/src/core/config/index.ts +0 -417
- package/src/core/config/package-json.ts +0 -560
- package/src/core/errors/index.ts +0 -193
- package/src/core/execution/index.ts +0 -268
- package/src/core/help/ansi.ts +0 -144
- package/src/core/help/index.ts +0 -516
- package/src/core/json-schema/index.ts +0 -891
- package/src/core/json-schema/meta-descriptions.generated.ts +0 -185
- package/src/core/output/activity.ts +0 -575
- package/src/core/output/bind.ts +0 -59
- package/src/core/output/contracts.ts +0 -194
- package/src/core/output/display-value.ts +0 -48
- package/src/core/output/index.ts +0 -704
- package/src/core/output/renderers.ts +0 -125
- package/src/core/output/writer.ts +0 -46
- package/src/core/parse/index.ts +0 -681
- package/src/core/prompt/index.ts +0 -583
- package/src/core/resolve/args.ts +0 -144
- package/src/core/resolve/coerce.ts +0 -432
- package/src/core/resolve/config.ts +0 -26
- package/src/core/resolve/contracts.ts +0 -135
- package/src/core/resolve/errors.ts +0 -227
- package/src/core/resolve/flags.ts +0 -255
- package/src/core/resolve/index.ts +0 -108
- package/src/core/resolve/property.ts +0 -99
- package/src/core/schema/activity.ts +0 -240
- package/src/core/schema/arg.ts +0 -719
- package/src/core/schema/command.ts +0 -1498
- package/src/core/schema/flag.ts +0 -801
- package/src/core/schema/index.ts +0 -91
- package/src/core/schema/middleware.ts +0 -171
- package/src/core/schema/prompt.ts +0 -156
- package/src/core/schema/run.ts +0 -198
- package/src/core/schema-dsl/index.ts +0 -109
- package/src/core/schema-dsl/parse.ts +0 -262
- package/src/core/schema-dsl/runtime.ts +0 -609
- package/src/core/schema-dsl/to-json-schema.ts +0 -102
- package/src/core/testkit/index.ts +0 -123
- package/src/index.ts +0 -179
- package/src/runtime/adapter.ts +0 -303
- package/src/runtime/auto.ts +0 -110
- package/src/runtime/bun.ts +0 -55
- package/src/runtime/deno.ts +0 -369
- package/src/runtime/detect.ts +0 -105
- package/src/runtime/index.ts +0 -21
- package/src/runtime/node-builtins.d.ts +0 -27
- package/src/runtime/node.ts +0 -300
- package/src/runtime/paths.ts +0 -64
- package/src/runtime/support.ts +0 -135
- package/src/runtime.ts +0 -31
- package/src/strings.ts +0 -34
- package/src/testkit.ts +0 -25
- package/src/version.ts +0 -20
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated definition meta-schema descriptions from normalized TypeDoc output.
|
|
3
|
-
*
|
|
4
|
-
* @module
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const definitionMetaSchemaDescriptions = {
|
|
8
|
-
root: {
|
|
9
|
-
description: "Runtime descriptor for the CLI program.\n\nStores the program name, version, description, and registered commands.\\\nBuilt incrementally by CLIBuilder.",
|
|
10
|
-
properties: {
|
|
11
|
-
"name": {
|
|
12
|
-
description: "Program name (used in help text, usage lines, and completion scripts).",
|
|
13
|
-
},
|
|
14
|
-
"version": {
|
|
15
|
-
description: "Program version (shown by `--version`).",
|
|
16
|
-
},
|
|
17
|
-
"description": {
|
|
18
|
-
description: "Program description (shown in root help).",
|
|
19
|
-
},
|
|
20
|
-
"defaultCommand": {
|
|
21
|
-
description: "Default command dispatched when no subcommand matches.\n\nWhen set, the CLI root behaves like a hybrid command group: subcommands\ndispatch by name as usual, but empty argv or flags-only argv falls\nthrough to this command instead of showing root help.\n\nSet via the .default() builder method.",
|
|
22
|
-
},
|
|
23
|
-
"commands": {
|
|
24
|
-
description: "Registered commands (type-erased for heterogeneous storage).",
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
defs: {
|
|
29
|
-
"command": {
|
|
30
|
-
description: "Runtime descriptor produced by CommandBuilder.\n\nConsumers (parser, help generator, CLI dispatcher) read this to\nunderstand the command's shape — flags, args, aliases, subcommands,\nmiddleware, and interactive resolver.",
|
|
31
|
-
properties: {
|
|
32
|
-
"name": {
|
|
33
|
-
description: "The command name (used for dispatch, e.g. `'deploy'`).",
|
|
34
|
-
},
|
|
35
|
-
"description": {
|
|
36
|
-
description: "Human-readable description for help text.",
|
|
37
|
-
},
|
|
38
|
-
"aliases": {
|
|
39
|
-
description: "Alternative names for this command.",
|
|
40
|
-
},
|
|
41
|
-
"hidden": {
|
|
42
|
-
description: "Whether this command is hidden from help listings.",
|
|
43
|
-
},
|
|
44
|
-
"examples": {
|
|
45
|
-
description: "Usage examples for help text.",
|
|
46
|
-
},
|
|
47
|
-
"flags": {
|
|
48
|
-
description: "Named flag schemas, keyed by flag name.",
|
|
49
|
-
},
|
|
50
|
-
"args": {
|
|
51
|
-
description: "Ordered positional arg entries (name + schema).",
|
|
52
|
-
},
|
|
53
|
-
"commands": {
|
|
54
|
-
description: "Nested subcommand schemas (for help rendering and completion).\n\nPure data — no execution closures. Populated by `.command()` on\n`CommandBuilder`. Empty for leaf commands.",
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
"flag": {
|
|
59
|
-
description: "The runtime descriptor stored inside every FlagBuilder. Consumers (parser,\nhelp generator, resolution chain) read this to understand the flag's shape\nwithout touching generics.",
|
|
60
|
-
properties: {
|
|
61
|
-
"kind": {
|
|
62
|
-
description: "What kind of value this flag accepts.",
|
|
63
|
-
},
|
|
64
|
-
"presence": {
|
|
65
|
-
description: "Presence describes whether a flag value is guaranteed to exist when the\naction handler runs:\n\n- `'optional'` — not required; unresolved value follows the kind-specific\n optional fallback (`undefined` for most flags, `[]` for arrays)\n- `'required'` — must be supplied; error if missing\n- `'defaulted'` — always present (falls back to default value)",
|
|
66
|
-
},
|
|
67
|
-
"defaultValue": {
|
|
68
|
-
description: "Runtime default value (if any).",
|
|
69
|
-
},
|
|
70
|
-
"aliases": {
|
|
71
|
-
description: "Short/long aliases (e.g. `[{ name: 'f', hidden: false }]` for `--force`).",
|
|
72
|
-
},
|
|
73
|
-
"envVar": {
|
|
74
|
-
description: "Environment variable name for v0.2+ resolution.",
|
|
75
|
-
},
|
|
76
|
-
"configPath": {
|
|
77
|
-
description: "Dotted config path for v0.2+ resolution (e.g. `'deploy.region'`).",
|
|
78
|
-
},
|
|
79
|
-
"description": {
|
|
80
|
-
description: "Human-readable description for help text.",
|
|
81
|
-
},
|
|
82
|
-
"enumValues": {
|
|
83
|
-
description: "Allowed literal values when `kind === 'enum'`.",
|
|
84
|
-
},
|
|
85
|
-
"elementSchema": {
|
|
86
|
-
description: "Element schema when `kind === 'array'`.",
|
|
87
|
-
},
|
|
88
|
-
"prompt": {
|
|
89
|
-
description: "Interactive prompt configuration for v0.3+ resolution.",
|
|
90
|
-
},
|
|
91
|
-
"deprecated": {
|
|
92
|
-
description: "Deprecation marker.\n\n- `undefined` — not deprecated (default)\n- `true` — deprecated with no migration message\n- `string` — deprecated with a reason/migration message\n\nWhen a deprecated flag is used, a warning is emitted to stderr.\nHelp text shows `[deprecated]` or `[deprecated: <reason>]`.",
|
|
93
|
-
},
|
|
94
|
-
"propagate": {
|
|
95
|
-
description: "Whether this flag propagates to subcommands in nested command trees.\n\nWhen `true`, the flag is automatically available to all descendant\ncommands. A child command that defines a flag with the same name\nshadows the propagated parent flag.",
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
"arg": {
|
|
100
|
-
description: "The runtime descriptor stored inside every ArgBuilder. Consumers (parser,\nhelp generator) read this to understand the arg's shape without touching\ngenerics.",
|
|
101
|
-
properties: {
|
|
102
|
-
"name": {
|
|
103
|
-
description: "A named positional argument entry in the command schema.\n\nPairs a user-facing arg name with its ArgSchema descriptor.\nThe array ordering in CommandSchema.args determines CLI position.",
|
|
104
|
-
},
|
|
105
|
-
"kind": {
|
|
106
|
-
description: "What kind of value this arg accepts.",
|
|
107
|
-
},
|
|
108
|
-
"presence": {
|
|
109
|
-
description: "Presence describes whether a positional arg is guaranteed to exist when the\naction handler runs:\n\n- `'required'` — must be supplied; error if missing (default)\n- `'optional'` — may be `undefined` if not supplied\n- `'defaulted'` — always present (falls back to default value)",
|
|
110
|
-
},
|
|
111
|
-
"variadic": {
|
|
112
|
-
description: "Whether this arg consumes all remaining positionals.",
|
|
113
|
-
},
|
|
114
|
-
"stdinMode": {
|
|
115
|
-
description: "Whether this arg may read from stdin during resolution.",
|
|
116
|
-
},
|
|
117
|
-
"defaultValue": {
|
|
118
|
-
description: "Runtime default value (if any).",
|
|
119
|
-
},
|
|
120
|
-
"description": {
|
|
121
|
-
description: "Human-readable description for help text.",
|
|
122
|
-
},
|
|
123
|
-
"envVar": {
|
|
124
|
-
description: "Environment variable name for env resolution.\n\nWhen set and the CLI value is absent, the resolver reads this env var\nand coerces the string to the arg's declared kind.",
|
|
125
|
-
},
|
|
126
|
-
"enumValues": {
|
|
127
|
-
description: "Allowed literal values when `kind === 'enum'`.",
|
|
128
|
-
},
|
|
129
|
-
"deprecated": {
|
|
130
|
-
description: "Deprecation marker.\n\n- `undefined` — not deprecated (default)\n- `true` — deprecated with no migration message\n- `string` — deprecated with a reason/migration message\n\nWhen a deprecated arg is used, a warning is emitted to stderr.\nHelp text shows `[deprecated]` or `[deprecated: <reason>]`.",
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
"prompt": {
|
|
135
|
-
description: "Discriminated union of all prompt configurations.\n\nUse the `kind` field to narrow:\n```ts\nif (config.kind === 'select') {\n config.choices // readonly SelectChoice[] | undefined\n}\n```",
|
|
136
|
-
properties: {
|
|
137
|
-
"kind": {
|
|
138
|
-
description: "The kind of interactive prompt to present.\n\n- `'confirm'` — yes/no boolean question\n- `'input'` — free-text string input\n- `'select'` — single selection from a list\n- `'multiselect'` — multiple selections from a list",
|
|
139
|
-
},
|
|
140
|
-
"message": {
|
|
141
|
-
description: "The question displayed to the user.",
|
|
142
|
-
},
|
|
143
|
-
"placeholder": {
|
|
144
|
-
description: "Placeholder text shown before user types (informational only).",
|
|
145
|
-
},
|
|
146
|
-
"choices": {
|
|
147
|
-
description: "Available choices. When omitted for `enum` flags, the enum values\nfrom the flag schema are used automatically.",
|
|
148
|
-
},
|
|
149
|
-
"min": {
|
|
150
|
-
description: "Minimum number of selections required.",
|
|
151
|
-
},
|
|
152
|
-
"max": {
|
|
153
|
-
description: "Maximum number of selections allowed.",
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
"choice": {
|
|
158
|
-
description: "A selectable option for SelectPromptConfig and MultiselectPromptConfig prompts.",
|
|
159
|
-
properties: {
|
|
160
|
-
"value": {
|
|
161
|
-
description: "The value returned when this choice is selected.",
|
|
162
|
-
},
|
|
163
|
-
"label": {
|
|
164
|
-
description: "Display label shown to the user.",
|
|
165
|
-
},
|
|
166
|
-
"description": {
|
|
167
|
-
description: "Optional description shown alongside the choice.",
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
"example": {
|
|
172
|
-
description: "A single usage example shown in help text.",
|
|
173
|
-
properties: {
|
|
174
|
-
"command": {
|
|
175
|
-
description: "The command invocation (e.g. `'deploy production --force'`).",
|
|
176
|
-
},
|
|
177
|
-
"description": {
|
|
178
|
-
description: "Optional description of what this example does.",
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
} as const;
|
|
184
|
-
|
|
185
|
-
export { definitionMetaSchemaDescriptions };
|