@kjanat/dreamcli 2.4.1 → 3.0.0-rc.1
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 +169 -1
- package/README.md +14 -7
- package/dist/core/cli/index.d.mts +283 -81
- package/dist/core/cli/index.mjs +1 -1
- package/dist/core/cli/planner.d.mts +27 -5
- package/dist/core/cli/planner.mjs +1 -1
- package/dist/core/cli/root-help.d.mts +16 -2
- package/dist/core/cli/root-help.mjs +3 -5
- package/dist/core/cli/root-surface.d.mts +18 -3
- package/dist/core/cli/root-surface.mjs +1 -1
- package/dist/core/cli/runtime-preflight.d.mts +31 -5
- package/dist/core/cli/runtime-preflight.mjs +1 -1
- package/dist/core/completion/index.d.mts +32 -1
- package/dist/core/completion/index.mjs +1 -1
- package/dist/core/completion/shells/shared.d.mts +10 -0
- package/dist/core/completion/shells/shared.mjs +1 -1
- package/dist/core/config/index.d.mts +2 -2
- package/dist/core/config/package-json.d.mts +93 -20
- package/dist/core/config/package-json.mjs +3 -1
- package/dist/core/help/index.d.mts +45 -1
- package/dist/core/help/index.mjs +6 -6
- package/dist/core/json-schema/index.mjs +1 -1
- package/dist/core/json-schema/meta-descriptions.generated.d.mts +38 -38
- package/dist/core/parse/index.d.mts +15 -1
- package/dist/core/parse/index.mjs +1 -1
- package/dist/core/prompt/index.d.mts +11 -3
- package/dist/core/prompt/index.mjs +3 -3
- package/dist/core/resolve/coerce.mjs +1 -1
- package/dist/core/resolve/flags.mjs +1 -1
- package/dist/core/resolve/property.d.mts +2 -0
- package/dist/core/resolve/property.mjs +1 -1
- package/dist/core/schema/arg.d.mts +90 -10
- package/dist/core/schema/arg.mjs +1 -1
- package/dist/core/schema/command.d.mts +3 -1
- package/dist/core/schema/flag.d.mts +92 -2
- package/dist/core/schema/flag.mjs +1 -1
- package/dist/core/schema/index.d.mts +2 -1
- package/dist/core/schema/number-constraints.d.mts +96 -0
- package/dist/core/schema/number-constraints.mjs +1 -0
- package/dist/core/schema/prompt.d.mts +15 -0
- package/dist/core/schema/run.d.mts +4 -4
- package/dist/core/testkit/index.d.mts +9 -5
- package/dist/core/testkit/index.mjs +1 -1
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +1 -1
- package/dist/runtime/auto.mjs +1 -1
- package/dist/runtime/bun.mjs +1 -1
- package/dist/runtime/deno.mjs +2 -2
- package/dist/runtime/node.mjs +2 -2
- package/dist/version.mjs +1 -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 +15 -24
- package/src/core/cli/dispatch.ts +7 -1
- package/src/core/cli/index.ts +521 -122
- package/src/core/cli/planner.ts +192 -23
- package/src/core/cli/root-help.ts +195 -105
- package/src/core/cli/root-surface.ts +25 -12
- package/src/core/cli/runtime-preflight.ts +43 -8
- package/src/core/completion/index.ts +50 -0
- package/src/core/completion/shells/powershell.ts +2 -2
- package/src/core/completion/shells/shared.ts +30 -3
- package/src/core/config/index.ts +12 -2
- package/src/core/config/package-json.ts +250 -41
- package/src/core/execution/index.ts +1 -4
- package/src/core/help/index.ts +57 -10
- package/src/core/json-schema/index.ts +23 -4
- package/src/core/json-schema/meta-descriptions.generated.ts +115 -98
- package/src/core/parse/index.ts +62 -1
- package/src/core/prompt/index.ts +54 -14
- package/src/core/resolve/coerce.ts +73 -5
- package/src/core/resolve/flags.ts +14 -0
- package/src/core/resolve/property.ts +4 -4
- package/src/core/schema/arg.ts +125 -3
- package/src/core/schema/command.ts +3 -1
- package/src/core/schema/flag.ts +120 -4
- package/src/core/schema/index.ts +5 -0
- package/src/core/schema/number-constraints.ts +153 -0
- package/src/core/schema/prompt.ts +15 -0
- package/src/core/schema/run.ts +4 -4
- package/src/core/testkit/index.ts +32 -8
- package/src/index.ts +8 -0
- package/src/runtime/auto.ts +0 -24
- package/src/runtime/bun.ts +0 -7
- package/src/runtime/deno.ts +0 -2
- package/src/runtime/node.ts +0 -11
- package/src/runtime/support.ts +1 -59
- package/src/schema.ts +16 -0
- package/dist/runtime/support.d.mts +0 -42
- package/dist/runtime/support.mjs +0 -1
package/package.json
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kjanat/dreamcli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-rc.1",
|
|
4
4
|
"description": "Schema-first, fully typed TypeScript CLI framework",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"dreamcli",
|
|
7
|
-
"cli",
|
|
8
|
-
"typescript",
|
|
9
|
-
"framework",
|
|
10
|
-
"schema-first",
|
|
11
|
-
"command-line"
|
|
12
|
-
],
|
|
5
|
+
"keywords": ["dreamcli", "cli", "typescript", "framework", "schema-first", "command-line"],
|
|
13
6
|
"homepage": "https://dreamcli.kjanat.dev",
|
|
14
7
|
"bugs": {
|
|
15
8
|
"url": "https://github.com/kjanat/dreamcli/issues"
|
|
@@ -69,9 +62,7 @@
|
|
|
69
62
|
"!src/**/*test-helpers.ts",
|
|
70
63
|
"!**/AGENTS.md"
|
|
71
64
|
],
|
|
72
|
-
"workspaces": [
|
|
73
|
-
"./examples/*"
|
|
74
|
-
],
|
|
65
|
+
"workspaces": ["./examples/*"],
|
|
75
66
|
"scripts": {
|
|
76
67
|
"bd": "run build",
|
|
77
68
|
"build": "bun --bun tsdown",
|
|
@@ -122,26 +113,26 @@
|
|
|
122
113
|
"@arethetypeswrong/core": "^0.18.4",
|
|
123
114
|
"@biomejs/biome": "^2.5.1",
|
|
124
115
|
"@iarna/toml": "^2.2.5",
|
|
125
|
-
"@shikijs/transformers": "^4.
|
|
126
|
-
"@shikijs/vitepress-twoslash": "^4.
|
|
116
|
+
"@shikijs/transformers": "^4.3.0",
|
|
117
|
+
"@shikijs/vitepress-twoslash": "^4.3.0",
|
|
127
118
|
"@types/bun": "^1.3.14",
|
|
128
119
|
"@types/deno": "^2.7.0",
|
|
129
|
-
"@types/node": ">=
|
|
130
|
-
"@typescript/native-preview": "^7.0.0-dev",
|
|
120
|
+
"@types/node": ">=26.0.1",
|
|
121
|
+
"@typescript/native-preview": "^7.0.0-dev.20260629.1",
|
|
131
122
|
"@vitest/coverage-v8": "^4.1.9",
|
|
132
|
-
"dprint": "^0.
|
|
123
|
+
"dprint": "^0.55.1",
|
|
133
124
|
"floating-vue": "^5.2.2",
|
|
134
|
-
"knip": "^6.
|
|
135
|
-
"mermaid": "^11.
|
|
125
|
+
"knip": "^6.23.0",
|
|
126
|
+
"mermaid": "^11.16.0",
|
|
136
127
|
"publint": "^0.3.21",
|
|
137
|
-
"runner-run": "0.
|
|
128
|
+
"runner-run": "0.15.0",
|
|
138
129
|
"tsdown": "^0.22.3",
|
|
139
130
|
"typedoc": "^0.28.19",
|
|
140
131
|
"typescript": "^6.0.3",
|
|
141
132
|
"vite": "^8.1.0",
|
|
142
133
|
"vitepress": "^2.0.0-alpha.17",
|
|
143
134
|
"vitest": "^4.1.9",
|
|
144
|
-
"wrangler": "^4.
|
|
135
|
+
"wrangler": "^4.105.0",
|
|
145
136
|
"yaml": "^2.9.0"
|
|
146
137
|
},
|
|
147
138
|
"packageManager": "bun@1.3.14",
|
|
@@ -161,8 +152,8 @@
|
|
|
161
152
|
}
|
|
162
153
|
},
|
|
163
154
|
"volta": {
|
|
164
|
-
"node": "26.
|
|
165
|
-
"npm": "11.
|
|
155
|
+
"node": "26.4.0",
|
|
156
|
+
"npm": "11.18.0"
|
|
166
157
|
},
|
|
167
158
|
"publishConfig": {
|
|
168
159
|
"access": "public",
|
|
@@ -170,7 +161,7 @@
|
|
|
170
161
|
},
|
|
171
162
|
"catalog": {
|
|
172
163
|
"@types/bun": "^1.3.14",
|
|
173
|
-
"@types/node": ">=
|
|
164
|
+
"@types/node": ">=26.0.1",
|
|
174
165
|
"typescript": "^6.0.3"
|
|
175
166
|
}
|
|
176
167
|
}
|
package/src/core/cli/dispatch.ts
CHANGED
|
@@ -345,5 +345,11 @@ function uniqueCommands(commands: ReadonlyMap<string, ErasedCommand>): readonly
|
|
|
345
345
|
|
|
346
346
|
// --- Exports
|
|
347
347
|
|
|
348
|
-
export type {
|
|
348
|
+
export type {
|
|
349
|
+
DispatchMatch,
|
|
350
|
+
DispatchNeedsSubcommand,
|
|
351
|
+
DispatchResult,
|
|
352
|
+
DispatchUnknown,
|
|
353
|
+
ValueFlagLookup,
|
|
354
|
+
};
|
|
349
355
|
export { consumesFollowingToken, dispatch, findClosestCommand, levenshtein, uniqueCommands };
|