@kjanat/dreamcli 3.0.0-rc.4 → 3.0.0-rc.7
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 +82 -1
- package/dist/core/cli/dispatch.d.mts +0 -1
- package/dist/core/cli/dispatch.mjs +1 -1
- package/dist/core/cli/help-links.d.mts +0 -1
- package/dist/core/cli/index.d.mts +0 -1
- package/dist/core/cli/index.mjs +16 -7
- package/dist/core/cli/planner.d.mts +0 -1
- package/dist/core/cli/planner.mjs +3 -3
- package/dist/core/cli/plugin.d.mts +1 -1
- package/dist/core/cli/propagate.d.mts +1 -1
- package/dist/core/cli/root-help.d.mts +0 -1
- package/dist/core/cli/root-help.mjs +6 -1
- package/dist/core/cli/root-surface.d.mts +0 -1
- package/dist/core/cli/runtime-preflight.d.mts +5 -1
- package/dist/core/cli/runtime-preflight.mjs +2 -1
- package/dist/core/completion/index.d.mts +0 -1
- package/dist/core/completion/index.mjs +1 -1
- package/dist/core/completion/shells/bash.d.mts +0 -1
- package/dist/core/completion/shells/bash.mjs +3 -2
- package/dist/core/completion/shells/fish.d.mts +0 -1
- package/dist/core/completion/shells/fish.mjs +3 -2
- package/dist/core/completion/shells/powershell.d.mts +0 -1
- package/dist/core/completion/shells/powershell.mjs +2 -1
- package/dist/core/completion/shells/shared.d.mts +1 -1
- package/dist/core/completion/shells/shared.mjs +5 -0
- package/dist/core/completion/shells/zsh.d.mts +0 -1
- package/dist/core/completion/shells/zsh.mjs +3 -2
- package/dist/core/config/index.d.mts +0 -1
- package/dist/core/config/index.mjs +2 -2
- package/dist/core/config/package-json.d.mts +0 -1
- package/dist/core/execution/index.d.mts +0 -1
- package/dist/core/execution/index.mjs +3 -2
- package/dist/core/help/ansi.mjs +3 -2
- package/dist/core/help/index.d.mts +1 -1
- package/dist/core/help/index.mjs +12 -6
- package/dist/core/json-schema/index.d.mts +1 -1
- package/dist/core/json-schema/index.mjs +25 -7
- package/dist/core/output/activity.d.mts +0 -1
- package/dist/core/output/contracts.d.mts +0 -1
- package/dist/core/output/contracts.mjs +1 -1
- package/dist/core/output/index.d.mts +0 -1
- package/dist/core/output/index.mjs +1 -1
- package/dist/core/output/renderers.d.mts +0 -1
- package/dist/core/parse/index.d.mts +1 -1
- package/dist/core/parse/index.mjs +75 -9
- package/dist/core/prompt/index.d.mts +1 -0
- package/dist/core/resolve/args.d.mts +1 -1
- package/dist/core/resolve/coerce.d.mts +1 -1
- package/dist/core/resolve/coerce.mjs +71 -14
- package/dist/core/resolve/contracts.d.mts +6 -1
- package/dist/core/resolve/errors.d.mts +0 -1
- package/dist/core/resolve/flags.d.mts +7 -2
- package/dist/core/resolve/flags.mjs +61 -6
- package/dist/core/resolve/index.d.mts +1 -1
- package/dist/core/resolve/index.mjs +1 -1
- package/dist/core/resolve/property.d.mts +3 -0
- package/dist/core/resolve/property.mjs +11 -3
- package/dist/core/schema/activity.d.mts +31 -11
- package/dist/core/schema/arg.d.mts +1 -2
- package/dist/core/schema/command.d.mts +8 -6
- package/dist/core/schema/command.mjs +3 -1
- package/dist/core/schema/flag.d.mts +337 -10
- package/dist/core/schema/flag.mjs +185 -3
- package/dist/core/schema/index.d.mts +4 -2
- package/dist/core/schema/middleware.d.mts +4 -3
- package/dist/core/schema/prompt.d.mts +5 -2
- package/dist/core/schema/run.d.mts +9 -1
- package/dist/core/schema/string-constraints.d.mts +97 -0
- package/dist/core/schema/string-constraints.mjs +69 -0
- package/dist/core/schema/value-parsers.d.mts +78 -0
- package/dist/core/schema/value-parsers.mjs +142 -0
- package/dist/core/schema-dsl/to-json-schema.d.mts +0 -1
- package/dist/core/testkit/index.d.mts +0 -31
- package/dist/core/testkit/index.mjs +1 -1
- package/dist/index.d.mts +5 -2
- package/dist/index.mjs +5 -5
- package/dist/runtime/adapter.d.mts +38 -2
- package/dist/runtime/adapter.mjs +5 -0
- package/dist/runtime/auto.d.mts +2 -3
- package/dist/runtime/auto.mjs +4 -5
- package/dist/runtime/deno.d.mts +24 -5
- package/dist/runtime/deno.mjs +45 -0
- package/dist/runtime/index.d.mts +3 -4
- package/dist/runtime/node.d.mts +8 -2
- package/dist/runtime/node.mjs +51 -0
- package/dist/runtime.d.mts +4 -4
- package/dist/runtime.mjs +2 -3
- package/dist/testkit.d.mts +1 -0
- package/dist/version.mjs +2 -2
- package/dreamcli.schema.json +3 -1
- package/package.json +13 -15
- package/dist/runtime/bun.d.mts +0 -28
- package/dist/runtime/bun.mjs +0 -28
package/dist/runtime.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { createNodeAdapter } from "./runtime/node.mjs";
|
|
2
|
-
import { createBunAdapter } from "./runtime/bun.mjs";
|
|
3
1
|
import { createDenoAdapter } from "./runtime/deno.mjs";
|
|
4
2
|
import { RUNTIMES, detectRuntime } from "./runtime/detect.mjs";
|
|
3
|
+
import { createNodeAdapter } from "./runtime/node.mjs";
|
|
5
4
|
import { createAdapter } from "./runtime/auto.mjs";
|
|
6
5
|
import { ExitError } from "./runtime/adapter.mjs";
|
|
7
|
-
export { ExitError, RUNTIMES, createAdapter,
|
|
6
|
+
export { ExitError, RUNTIMES, createAdapter, createDenoAdapter, createNodeAdapter, detectRuntime };
|
package/dist/testkit.d.mts
CHANGED
|
@@ -3,4 +3,5 @@ import { PROMPT_CANCEL, TestAnswer, TestPrompterOptions, createTestPrompter } fr
|
|
|
3
3
|
import { RunOptions, RunResult } from "./core/schema/run.mjs";
|
|
4
4
|
import { TestAdapterOptions, createTestAdapter } from "./runtime/adapter.mjs";
|
|
5
5
|
import { runCommand } from "./core/testkit/index.mjs";
|
|
6
|
+
import "./runtime/index.mjs";
|
|
6
7
|
export { type CapturedOutput, PROMPT_CANCEL, type RunOptions, type RunResult, type TestAdapterOptions, type TestAnswer, type TestPrompterOptions, createCaptureOutput, createTestAdapter, createTestPrompter, runCommand };
|
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.7";
|
|
4
4
|
/** Git short SHA (e.g. `"f9b5f1a"`). `"dev"` when running unbundled. */
|
|
5
|
-
const DREAMCLI_REVISION = "
|
|
5
|
+
const DREAMCLI_REVISION = "e87f393";
|
|
6
6
|
//#endregion
|
|
7
7
|
export { DREAMCLI_REVISION, DREAMCLI_VERSION };
|
package/dreamcli.schema.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kjanat/dreamcli",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.7",
|
|
4
4
|
"description": "Schema-first, fully typed TypeScript CLI framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dreamcli",
|
|
@@ -100,9 +100,8 @@
|
|
|
100
100
|
"test:gh": "run --dir examples/gh test",
|
|
101
101
|
"test:node": "npx -y vitest run",
|
|
102
102
|
"test:watch": "vitest",
|
|
103
|
-
"typecheck": "
|
|
103
|
+
"typecheck": "bun node_modules/@typescript/native/bin/tsc --noEmit",
|
|
104
104
|
"typecheck:gh": "run --dir examples/gh typecheck",
|
|
105
|
-
"typecheck:tsc": "tsc --noEmit",
|
|
106
105
|
"upgrade": "bun update --latest && bun add -D vitepress@next",
|
|
107
106
|
"version:check": "bun scripts/check-version-sync.ts"
|
|
108
107
|
},
|
|
@@ -113,29 +112,29 @@
|
|
|
113
112
|
"ansispeck": "^0.1.2"
|
|
114
113
|
},
|
|
115
114
|
"devDependencies": {
|
|
116
|
-
"@arethetypeswrong/core": "^0.18.
|
|
115
|
+
"@arethetypeswrong/core": "^0.18.5",
|
|
117
116
|
"@biomejs/biome": "^2.5.2",
|
|
118
117
|
"@iarna/toml": "^2.2.5",
|
|
119
118
|
"@shikijs/transformers": "^4.3.1",
|
|
120
119
|
"@shikijs/vitepress-twoslash": "^4.3.1",
|
|
121
120
|
"@types/bun": "^1.3.14",
|
|
122
121
|
"@types/deno": "^2.7.0",
|
|
123
|
-
"@types/node": ">=26.1.
|
|
124
|
-
"@typescript/native
|
|
122
|
+
"@types/node": ">=26.1.1",
|
|
123
|
+
"@typescript/native": "npm:typescript@^7.0.2",
|
|
125
124
|
"@vitest/coverage-v8": "^4.1.10",
|
|
126
125
|
"dprint": "^0.55.1",
|
|
127
126
|
"floating-vue": "^5.2.2",
|
|
128
|
-
"knip": "^6.
|
|
127
|
+
"knip": "^6.25.0",
|
|
129
128
|
"mermaid": "^11.16.0",
|
|
130
129
|
"publint": "^0.3.21",
|
|
131
130
|
"runner-run": "0.19.1",
|
|
132
|
-
"tsdown": "^0.22.
|
|
131
|
+
"tsdown": "^0.22.4",
|
|
133
132
|
"typedoc": "^0.28.20",
|
|
134
|
-
"typescript": "^6.0.
|
|
135
|
-
"vite": "^8.1.
|
|
133
|
+
"typescript": "^6.0.2",
|
|
134
|
+
"vite": "^8.1.4",
|
|
136
135
|
"vitepress": "^2.0.0-alpha.18",
|
|
137
136
|
"vitest": "^4.1.10",
|
|
138
|
-
"wrangler": "^4.
|
|
137
|
+
"wrangler": "^4.110.0",
|
|
139
138
|
"yaml": "^2.9.0"
|
|
140
139
|
},
|
|
141
140
|
"packageManager": "bun@1.3.14",
|
|
@@ -159,12 +158,11 @@
|
|
|
159
158
|
"npm": "11.18.0"
|
|
160
159
|
},
|
|
161
160
|
"publishConfig": {
|
|
162
|
-
"access": "public"
|
|
163
|
-
"provenance": true
|
|
161
|
+
"access": "public"
|
|
164
162
|
},
|
|
165
163
|
"catalog": {
|
|
166
164
|
"@types/bun": "^1.3.14",
|
|
167
|
-
"@types/node": ">=26.1.
|
|
168
|
-
"typescript": "^6.0.
|
|
165
|
+
"@types/node": ">=26.1.1",
|
|
166
|
+
"typescript": "^6.0.2"
|
|
169
167
|
}
|
|
170
168
|
}
|
package/dist/runtime/bun.d.mts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { RuntimeAdapter } from "./adapter.mjs";
|
|
2
|
-
import { NodeProcess } from "./node.mjs";
|
|
3
|
-
|
|
4
|
-
//#region src/runtime/bun.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Create a runtime adapter backed by Bun's Node-compatible `process` global.
|
|
7
|
-
*
|
|
8
|
-
* Bun exposes `globalThis.process` with the same shape as Node.js, so this
|
|
9
|
-
* delegates entirely to {@link createNodeAdapter}. If Bun-specific optimizations
|
|
10
|
-
* are needed in the future (e.g. `Bun.write` for I/O), they can be layered
|
|
11
|
-
* here without changing the public API.
|
|
12
|
-
*
|
|
13
|
-
* @param proc - Override the process object (useful for testing the adapter itself).
|
|
14
|
-
* @returns A {@linkcode RuntimeAdapter} backed by Bun's process state.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```ts
|
|
18
|
-
* import { cli } from '@kjanat/dreamcli';
|
|
19
|
-
* import { createBunAdapter } from '@kjanat/dreamcli/runtime';
|
|
20
|
-
*
|
|
21
|
-
* cli('mycli')
|
|
22
|
-
* .command(deploy)
|
|
23
|
-
* .run({ adapter: createBunAdapter() });
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
declare function createBunAdapter(proc?: NodeProcess): RuntimeAdapter;
|
|
27
|
-
//#endregion
|
|
28
|
-
export { createBunAdapter };
|
package/dist/runtime/bun.mjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { createNodeAdapter } from "./node.mjs";
|
|
2
|
-
//#region src/runtime/bun.ts
|
|
3
|
-
/**
|
|
4
|
-
* Create a runtime adapter backed by Bun's Node-compatible `process` global.
|
|
5
|
-
*
|
|
6
|
-
* Bun exposes `globalThis.process` with the same shape as Node.js, so this
|
|
7
|
-
* delegates entirely to {@link createNodeAdapter}. If Bun-specific optimizations
|
|
8
|
-
* are needed in the future (e.g. `Bun.write` for I/O), they can be layered
|
|
9
|
-
* here without changing the public API.
|
|
10
|
-
*
|
|
11
|
-
* @param proc - Override the process object (useful for testing the adapter itself).
|
|
12
|
-
* @returns A {@linkcode RuntimeAdapter} backed by Bun's process state.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* import { cli } from '@kjanat/dreamcli';
|
|
17
|
-
* import { createBunAdapter } from '@kjanat/dreamcli/runtime';
|
|
18
|
-
*
|
|
19
|
-
* cli('mycli')
|
|
20
|
-
* .command(deploy)
|
|
21
|
-
* .run({ adapter: createBunAdapter() });
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
function createBunAdapter(proc) {
|
|
25
|
-
return createNodeAdapter(proc);
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
export { createBunAdapter };
|