@kjanat/dreamcli 3.0.0-rc.1 → 3.0.0-rc.11
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 +227 -1
- package/dist/core/cli/dispatch.d.mts +6 -5
- package/dist/core/cli/dispatch.mjs +205 -1
- package/dist/core/cli/help-links.d.mts +0 -1
- package/dist/core/cli/help-links.mjs +41 -1
- package/dist/core/cli/index.d.mts +81 -8
- package/dist/core/cli/index.mjs +945 -1
- package/dist/core/cli/planner.d.mts +5 -1
- package/dist/core/cli/planner.mjs +300 -1
- package/dist/core/cli/plugin.d.mts +1 -1
- package/dist/core/cli/plugin.mjs +41 -1
- package/dist/core/cli/propagate.d.mts +1 -1
- package/dist/core/cli/propagate.mjs +57 -1
- package/dist/core/cli/root-help.d.mts +2 -1
- package/dist/core/cli/root-help.mjs +226 -4
- package/dist/core/cli/root-surface.d.mts +12 -1
- package/dist/core/cli/root-surface.mjs +28 -1
- package/dist/core/cli/runtime-preflight.d.mts +14 -2
- package/dist/core/cli/runtime-preflight.mjs +169 -1
- package/dist/core/completion/index.d.mts +0 -1
- package/dist/core/completion/index.mjs +90 -1
- package/dist/core/completion/shells/bash.d.mts +0 -1
- package/dist/core/completion/shells/bash.mjs +308 -3
- package/dist/core/completion/shells/fish.d.mts +0 -1
- package/dist/core/completion/shells/fish.mjs +162 -2
- package/dist/core/completion/shells/powershell.d.mts +0 -1
- package/dist/core/completion/shells/powershell.mjs +358 -2
- package/dist/core/completion/shells/shared.d.mts +13 -2
- package/dist/core/completion/shells/shared.mjs +176 -1
- package/dist/core/completion/shells/zsh.d.mts +0 -1
- package/dist/core/completion/shells/zsh.mjs +251 -2
- package/dist/core/config/index.d.mts +2 -3
- package/dist/core/config/index.mjs +246 -1
- package/dist/core/config/package-json.d.mts +27 -4
- package/dist/core/config/package-json.mjs +386 -3
- package/dist/core/errors/index.d.mts +3 -3
- package/dist/core/errors/index.mjs +87 -1
- package/dist/core/execution/index.d.mts +0 -1
- package/dist/core/execution/index.mjs +201 -1
- package/dist/core/help/ansi.d.mts +11 -5
- package/dist/core/help/ansi.mjs +121 -2
- package/dist/core/help/index.d.mts +22 -3
- package/dist/core/help/index.mjs +341 -7
- package/dist/core/help/theme.d.mts +68 -0
- package/dist/core/help/theme.mjs +46 -0
- package/dist/core/json-schema/index.d.mts +15 -2
- package/dist/core/json-schema/index.mjs +536 -12
- package/dist/core/json-schema/meta-descriptions.generated.d.mts +55 -38
- package/dist/core/json-schema/meta-descriptions.generated.mjs +102 -28
- package/dist/core/output/activity.d.mts +0 -1
- package/dist/core/output/activity.mjs +452 -1
- package/dist/core/output/bind.mjs +56 -1
- package/dist/core/output/contracts.d.mts +4 -5
- 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 -1
- package/dist/core/output/index.mjs +442 -2
- package/dist/core/output/renderers.d.mts +0 -1
- package/dist/core/output/renderers.mjs +46 -1
- package/dist/core/output/writer.mjs +12 -1
- package/dist/core/parse/index.d.mts +40 -7
- package/dist/core/parse/index.mjs +727 -1
- package/dist/core/prompt/index.d.mts +1 -1
- package/dist/core/prompt/index.mjs +348 -6
- package/dist/core/resolve/args.d.mts +1 -1
- package/dist/core/resolve/args.mjs +105 -1
- package/dist/core/resolve/coerce.d.mts +1 -1
- package/dist/core/resolve/coerce.mjs +336 -1
- package/dist/core/resolve/config.mjs +19 -1
- package/dist/core/resolve/contracts.d.mts +9 -4
- package/dist/core/resolve/errors.d.mts +0 -1
- package/dist/core/resolve/errors.mjs +140 -2
- package/dist/core/resolve/flags.d.mts +7 -2
- package/dist/core/resolve/flags.mjs +251 -1
- package/dist/core/resolve/index.d.mts +2 -2
- package/dist/core/resolve/index.mjs +85 -1
- package/dist/core/resolve/property.d.mts +4 -2
- package/dist/core/resolve/property.mjs +53 -1
- package/dist/core/schema/activity.d.mts +31 -11
- package/dist/core/schema/arg.d.mts +3 -4
- package/dist/core/schema/arg.mjs +463 -1
- package/dist/core/schema/command.d.mts +26 -6
- package/dist/core/schema/command.mjs +726 -1
- package/dist/core/schema/flag.d.mts +485 -19
- package/dist/core/schema/flag.mjs +705 -1
- package/dist/core/schema/index.d.mts +4 -2
- package/dist/core/schema/middleware.d.mts +4 -3
- package/dist/core/schema/middleware.mjs +41 -1
- package/dist/core/schema/number-constraints.mjs +60 -1
- package/dist/core/schema/prompt.d.mts +6 -3
- package/dist/core/schema/run.d.mts +20 -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/runtime.mjs +271 -2
- package/dist/core/schema-dsl/to-json-schema.d.mts +0 -1
- package/dist/core/schema-dsl/to-json-schema.mjs +74 -1
- package/dist/core/testkit/index.d.mts +0 -31
- package/dist/core/testkit/index.mjs +83 -1
- package/dist/index.d.mts +11 -6
- package/dist/index.mjs +22 -1
- package/dist/runtime/adapter.d.mts +38 -2
- package/dist/runtime/adapter.mjs +87 -1
- package/dist/runtime/auto.d.mts +2 -3
- package/dist/runtime/auto.mjs +45 -1
- package/dist/runtime/deno.d.mts +24 -5
- package/dist/runtime/deno.mjs +262 -2
- package/dist/runtime/detect.mjs +45 -1
- package/dist/runtime/index.d.mts +3 -4
- package/dist/runtime/node.d.mts +8 -2
- package/dist/runtime/node.mjs +220 -2
- package/dist/runtime/paths.mjs +48 -1
- package/dist/runtime.d.mts +4 -4
- package/dist/runtime.mjs +6 -1
- package/dist/strings.mjs +22 -1
- package/dist/testkit.d.mts +1 -0
- package/dist/testkit.mjs +5 -1
- package/dist/version.d.mts +7 -3
- package/dist/version.mjs +7 -1
- package/dreamcli.schema.json +36 -7
- package/package.json +45 -42
- package/dist/runtime/bun.d.mts +0 -28
- package/dist/runtime/bun.mjs +0 -1
- package/src/core/cli/dispatch.ts +0 -355
- package/src/core/cli/help-links.ts +0 -82
- package/src/core/cli/index.ts +0 -1614
- package/src/core/cli/planner.ts +0 -656
- package/src/core/cli/plugin.ts +0 -117
- package/src/core/cli/propagate.ts +0 -97
- package/src/core/cli/root-help.ts +0 -342
- package/src/core/cli/root-surface.ts +0 -87
- package/src/core/cli/runtime-preflight.ts +0 -456
- package/src/core/completion/index.ts +0 -138
- 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 -310
- 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 -265
- package/src/core/help/ansi.ts +0 -144
- package/src/core/help/index.ts +0 -563
- package/src/core/json-schema/index.ts +0 -910
- package/src/core/json-schema/meta-descriptions.generated.ts +0 -202
- 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 -742
- package/src/core/prompt/index.ts +0 -623
- package/src/core/resolve/args.ts +0 -144
- package/src/core/resolve/coerce.ts +0 -500
- 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 -269
- 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 -841
- package/src/core/schema/command.ts +0 -1500
- package/src/core/schema/flag.ts +0 -917
- package/src/core/schema/index.ts +0 -96
- package/src/core/schema/middleware.ts +0 -171
- package/src/core/schema/number-constraints.ts +0 -153
- package/src/core/schema/prompt.ts +0 -171
- 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 -147
- package/src/index.ts +0 -181
- package/src/runtime/adapter.ts +0 -303
- package/src/runtime/auto.ts +0 -86
- package/src/runtime/bun.ts +0 -48
- package/src/runtime/deno.ts +0 -367
- 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 -289
- package/src/runtime/paths.ts +0 -64
- package/src/runtime/support.ts +0 -77
- package/src/runtime.ts +0 -31
- package/src/schema.ts +0 -16
- package/src/strings.ts +0 -34
- package/src/testkit.ts +0 -25
- package/src/version.ts +0 -20
package/dist/runtime/node.mjs
CHANGED
|
@@ -1,2 +1,220 @@
|
|
|
1
|
-
import{resolveConfigDirectory
|
|
2
|
-
|
|
1
|
+
import { resolveConfigDirectory, resolveHomeDirectory } from "./paths.mjs";
|
|
2
|
+
//#region src/runtime/node.ts
|
|
3
|
+
/**
|
|
4
|
+
* Access the global `process` object without importing `@types/node`.
|
|
5
|
+
*
|
|
6
|
+
* Cast through `unknown` to avoid TypeScript errors when `@types/node`
|
|
7
|
+
* isn't installed. Safe because this adapter is only used on Node/Bun
|
|
8
|
+
* where `globalThis.process` is always defined.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
function getNodeProcess() {
|
|
13
|
+
return globalThis.process;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Detect whether an unknown thrown value is a Node.js system error
|
|
17
|
+
* with a string `code` property (e.g. `'ENOENT'`, `'EACCES'`).
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
function isNodeSystemError(err) {
|
|
22
|
+
if (typeof err !== "object" || err === null || !("code" in err)) return false;
|
|
23
|
+
return typeof err.code === "string";
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Resolve the user's home directory from environment variables.
|
|
27
|
+
*
|
|
28
|
+
* **Windows** (`win32`): `USERPROFILE` → `HOMEDRIVE`+`HOMEPATH` (both required) → `HOME` → `C:\`
|
|
29
|
+
* **Unix**: `HOME` → `/`
|
|
30
|
+
*
|
|
31
|
+
* `HOMEPATH` alone is never used — it is a relative fragment (e.g. `\Users\alice`) that only
|
|
32
|
+
* makes sense when combined with `HOMEDRIVE` (e.g. `C:`). Using `HOMEPATH` without `HOMEDRIVE`
|
|
33
|
+
* could resolve against the working drive, producing an incorrect path.
|
|
34
|
+
*
|
|
35
|
+
* We avoid importing `node:os` to keep the factory synchronous and
|
|
36
|
+
* to maintain the pattern of deriving everything from the process object.
|
|
37
|
+
*
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
function resolveHomedir(env, platform) {
|
|
41
|
+
return resolveHomeDirectory(env, platform === "win32");
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Resolve the platform-specific user configuration directory.
|
|
45
|
+
*
|
|
46
|
+
* - Unix: `$XDG_CONFIG_HOME` (if set), otherwise `~/.config`
|
|
47
|
+
* - Windows: `%APPDATA%` (if set), otherwise `~\AppData\Roaming`
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
function resolveConfigDir(env, platform, homedir) {
|
|
52
|
+
return resolveConfigDirectory(env, platform === "win32", homedir);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Create a runtime adapter backed by Node.js `process` globals.
|
|
56
|
+
*
|
|
57
|
+
* Reads `process.argv`, `process.env`, `process.cwd()`, and wraps
|
|
58
|
+
* `process.stdout.write`/`process.stderr.write` as {@linkcode WriteFn} functions.
|
|
59
|
+
*
|
|
60
|
+
* Also works on Bun, which provides a Node-compatible `process` global.
|
|
61
|
+
*
|
|
62
|
+
* @param proc - Override the process object (useful for testing the adapter itself).
|
|
63
|
+
* @returns A {@linkcode RuntimeAdapter} backed by Node.js process state.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* import { cli } from '@kjanat/dreamcli';
|
|
68
|
+
* import { createNodeAdapter } from '@kjanat/dreamcli/runtime/node';
|
|
69
|
+
*
|
|
70
|
+
* cli('mycli')
|
|
71
|
+
* .command(deploy)
|
|
72
|
+
* .run({ adapter: createNodeAdapter() });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
function createNodeAdapter(proc) {
|
|
76
|
+
const p = proc ?? getNodeProcess();
|
|
77
|
+
const stdoutWrite = (data) => {
|
|
78
|
+
p.stdout.write(data);
|
|
79
|
+
};
|
|
80
|
+
const stderrWrite = (data) => {
|
|
81
|
+
p.stderr.write(data);
|
|
82
|
+
};
|
|
83
|
+
const stdinRead = createNodeReadLine(p);
|
|
84
|
+
const readFile = async (path) => {
|
|
85
|
+
const fs = await import("node:fs/promises");
|
|
86
|
+
try {
|
|
87
|
+
return await fs.readFile(path, "utf8");
|
|
88
|
+
} catch (err) {
|
|
89
|
+
if (isNodeSystemError(err) && err.code === "ENOENT") return null;
|
|
90
|
+
throw err;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
const stat = async (path) => {
|
|
94
|
+
const fs = await import("node:fs/promises");
|
|
95
|
+
try {
|
|
96
|
+
return (await fs.stat(path)).isDirectory() ? "directory" : "file";
|
|
97
|
+
} catch (err) {
|
|
98
|
+
if (isNodeSystemError(err) && (err.code === "ENOENT" || err.code === "ENOTDIR")) return null;
|
|
99
|
+
throw err;
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
const homedir = resolveHomedir(p.env, p.platform);
|
|
103
|
+
const configDir = resolveConfigDir(p.env, p.platform, homedir);
|
|
104
|
+
const stdinIsTTY = p.stdin.isTTY === true;
|
|
105
|
+
return {
|
|
106
|
+
argv: p.argv,
|
|
107
|
+
env: p.env,
|
|
108
|
+
cwd: p.cwd(),
|
|
109
|
+
stdout: stdoutWrite,
|
|
110
|
+
stderr: stderrWrite,
|
|
111
|
+
stdin: stdinRead,
|
|
112
|
+
readStdin: () => readNodeStdinAll(p, stdinIsTTY),
|
|
113
|
+
isTTY: p.stdout.isTTY === true,
|
|
114
|
+
stdinIsTTY,
|
|
115
|
+
getTerminalSize: () => readNodeTerminalSize(p),
|
|
116
|
+
onTerminalResize: (listener) => onNodeTerminalResize(p, listener),
|
|
117
|
+
exit: (code) => p.exit(code),
|
|
118
|
+
readFile,
|
|
119
|
+
stat,
|
|
120
|
+
homedir,
|
|
121
|
+
configDir
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/** Normalize terminal dimensions and discard unusable values. @internal */
|
|
125
|
+
function normalizeTerminalSize(columns, rows) {
|
|
126
|
+
if (columns === void 0 || rows === void 0) return void 0;
|
|
127
|
+
if (!Number.isFinite(columns) || !Number.isFinite(rows)) return void 0;
|
|
128
|
+
if (columns <= 0 || rows <= 0) return void 0;
|
|
129
|
+
return {
|
|
130
|
+
columns,
|
|
131
|
+
rows
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
/** Read Node/Bun terminal dimensions from stdout. @internal */
|
|
135
|
+
function readNodeTerminalSize(proc) {
|
|
136
|
+
if (proc.stdout.isTTY !== true) return void 0;
|
|
137
|
+
try {
|
|
138
|
+
const size = proc.stdout.getWindowSize?.();
|
|
139
|
+
if (size !== void 0) {
|
|
140
|
+
const [columns, rows] = size;
|
|
141
|
+
const normalized = normalizeTerminalSize(columns, rows);
|
|
142
|
+
if (normalized !== void 0) return normalized;
|
|
143
|
+
}
|
|
144
|
+
} catch {}
|
|
145
|
+
return normalizeTerminalSize(proc.stdout.columns, proc.stdout.rows);
|
|
146
|
+
}
|
|
147
|
+
/** Subscribe to Node/Bun stdout resize events when available. @internal */
|
|
148
|
+
function onNodeTerminalResize(proc, listener) {
|
|
149
|
+
if (proc.stdout.isTTY !== true || proc.stdout.on === void 0) return void 0;
|
|
150
|
+
if (proc.stdout.off !== void 0) {
|
|
151
|
+
proc.stdout.on("resize", listener);
|
|
152
|
+
return () => {
|
|
153
|
+
proc.stdout.off?.("resize", listener);
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
if (proc.stdout.removeListener !== void 0) {
|
|
157
|
+
proc.stdout.on("resize", listener);
|
|
158
|
+
return () => {
|
|
159
|
+
proc.stdout.removeListener?.("resize", listener);
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Read all of stdin as a single string (for piped data).
|
|
165
|
+
*
|
|
166
|
+
* Returns `null` immediately if stdin is a TTY — the user is typing
|
|
167
|
+
* interactively, so there's no piped data to consume. When stdin is
|
|
168
|
+
* piped, collects all chunks via the async iterator until EOF and
|
|
169
|
+
* returns the decoded string, which may be empty for an empty pipe.
|
|
170
|
+
*
|
|
171
|
+
* @internal
|
|
172
|
+
*/
|
|
173
|
+
async function readNodeStdinAll(proc, stdinIsTTY) {
|
|
174
|
+
if (stdinIsTTY) return null;
|
|
175
|
+
const chunks = [];
|
|
176
|
+
const decoder = new TextDecoder();
|
|
177
|
+
for await (const chunk of proc.stdin) chunks.push(decoder.decode(chunk, { stream: true }));
|
|
178
|
+
chunks.push(decoder.decode());
|
|
179
|
+
return chunks.join("");
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Read a single line from Node's stdin via its async iterator.
|
|
183
|
+
*
|
|
184
|
+
* Iterates stdin chunks manually (without `for-await` to avoid calling
|
|
185
|
+
* `iterator.return()` which would close the stream). Returns `null`
|
|
186
|
+
* on EOF.
|
|
187
|
+
*
|
|
188
|
+
* @internal
|
|
189
|
+
*/
|
|
190
|
+
function createNodeReadLine(proc) {
|
|
191
|
+
const iter = proc.stdin[Symbol.asyncIterator]();
|
|
192
|
+
const decoder = new TextDecoder();
|
|
193
|
+
let buffer = "";
|
|
194
|
+
let done = false;
|
|
195
|
+
return async () => {
|
|
196
|
+
for (;;) {
|
|
197
|
+
const nlIndex = buffer.indexOf("\n");
|
|
198
|
+
if (nlIndex !== -1) {
|
|
199
|
+
const line = buffer.slice(0, nlIndex).replace(/\r$/, "");
|
|
200
|
+
buffer = buffer.slice(nlIndex + 1);
|
|
201
|
+
return line;
|
|
202
|
+
}
|
|
203
|
+
if (done) {
|
|
204
|
+
if (buffer.length === 0) return null;
|
|
205
|
+
const line = buffer;
|
|
206
|
+
buffer = "";
|
|
207
|
+
return line;
|
|
208
|
+
}
|
|
209
|
+
const result = await iter.next();
|
|
210
|
+
if (result.done) {
|
|
211
|
+
buffer += decoder.decode();
|
|
212
|
+
done = true;
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
buffer += decoder.decode(result.value, { stream: true });
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
//#endregion
|
|
220
|
+
export { createNodeAdapter };
|
package/dist/runtime/paths.mjs
CHANGED
|
@@ -1 +1,48 @@
|
|
|
1
|
-
import{stripTrailing
|
|
1
|
+
import { stripTrailing } from "../strings.mjs";
|
|
2
|
+
//#region src/runtime/paths.ts
|
|
3
|
+
/**
|
|
4
|
+
* Shared env-based path resolution for runtime adapters.
|
|
5
|
+
*
|
|
6
|
+
* Node, Bun, and Deno all need the same user home/config directory behavior.
|
|
7
|
+
* These helpers keep the fallback chain identical across runtimes while
|
|
8
|
+
* letting each adapter supply its own platform detection.
|
|
9
|
+
*
|
|
10
|
+
* @module @kjanat/dreamcli/runtime/paths
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Resolve the user's home directory from environment variables.
|
|
14
|
+
*
|
|
15
|
+
* @param env - Environment variable map.
|
|
16
|
+
* @param isWindows - Whether the platform is Windows.
|
|
17
|
+
* @returns Absolute path to the home directory.
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
function resolveHomeDirectory(env, isWindows) {
|
|
21
|
+
if (isWindows) {
|
|
22
|
+
if (env.USERPROFILE) return env.USERPROFILE;
|
|
23
|
+
if (env.HOMEDRIVE && env.HOMEPATH) return env.HOMEDRIVE + env.HOMEPATH;
|
|
24
|
+
return env.HOME || "C:\\";
|
|
25
|
+
}
|
|
26
|
+
return env.HOME || "/";
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Resolve the user's config directory (`XDG_CONFIG_HOME` / `APPDATA`).
|
|
30
|
+
*
|
|
31
|
+
* @param env - Environment variable map.
|
|
32
|
+
* @param isWindows - Whether the platform is Windows.
|
|
33
|
+
* @param homedir - Pre-resolved home directory (from {@link resolveHomeDirectory}).
|
|
34
|
+
* @returns Absolute path to the config directory.
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
function resolveConfigDirectory(env, isWindows, homedir) {
|
|
38
|
+
if (isWindows) {
|
|
39
|
+
if (env.APPDATA !== void 0 && env.APPDATA !== "") return env.APPDATA;
|
|
40
|
+
return `${stripTrailing(homedir, [47, 92]) || homedir}\\AppData\\Roaming`;
|
|
41
|
+
}
|
|
42
|
+
const normalizedHome = stripTrailing(homedir, [47]);
|
|
43
|
+
if (env.XDG_CONFIG_HOME !== void 0 && env.XDG_CONFIG_HOME !== "") return env.XDG_CONFIG_HOME;
|
|
44
|
+
if (normalizedHome.length === 0) return "/.config";
|
|
45
|
+
return `${normalizedHome}/.config`;
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { resolveConfigDirectory, resolveHomeDirectory };
|
package/dist/runtime.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ExitError, RuntimeAdapter } from "./runtime/adapter.mjs";
|
|
1
|
+
import { ExitError, RuntimeAdapter, TerminalSize } from "./runtime/adapter.mjs";
|
|
2
2
|
import { RUNTIMES, Runtime, detectRuntime } from "./runtime/detect.mjs";
|
|
3
3
|
import { createAdapter } from "./runtime/auto.mjs";
|
|
4
|
-
import { createNodeAdapter } from "./runtime/node.mjs";
|
|
5
|
-
import { createBunAdapter } from "./runtime/bun.mjs";
|
|
6
4
|
import { createDenoAdapter } from "./runtime/deno.mjs";
|
|
7
|
-
|
|
5
|
+
import { createNodeAdapter } from "./runtime/node.mjs";
|
|
6
|
+
import "./runtime/index.mjs";
|
|
7
|
+
export { ExitError, RUNTIMES, type Runtime, type RuntimeAdapter, type TerminalSize, createAdapter, createDenoAdapter, createNodeAdapter, detectRuntime };
|
package/dist/runtime.mjs
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createDenoAdapter } from "./runtime/deno.mjs";
|
|
2
|
+
import { RUNTIMES, detectRuntime } from "./runtime/detect.mjs";
|
|
3
|
+
import { createNodeAdapter } from "./runtime/node.mjs";
|
|
4
|
+
import { createAdapter } from "./runtime/auto.mjs";
|
|
5
|
+
import { ExitError } from "./runtime/adapter.mjs";
|
|
6
|
+
export { ExitError, RUNTIMES, createAdapter, createDenoAdapter, createNodeAdapter, detectRuntime };
|
package/dist/strings.mjs
CHANGED
|
@@ -1 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/strings.ts
|
|
2
|
+
/**
|
|
3
|
+
* Remove trailing characters whose code points appear in `codes`.
|
|
4
|
+
*
|
|
5
|
+
* Linear-time replacement for trailing-character regexes such as
|
|
6
|
+
* `/[\\/]+$/`. Those patterns are polynomial-ReDoS prone: the engine
|
|
7
|
+
* greedily consumes the run, fails the end anchor, backtracks one
|
|
8
|
+
* character at a time, and repeats that work from every start position —
|
|
9
|
+
* O(n²) on adversarial input. This scan is O(n) with no backtracking.
|
|
10
|
+
*
|
|
11
|
+
* @param input - Source string.
|
|
12
|
+
* @param codes - Character codes to strip from the end of `input`.
|
|
13
|
+
* @returns `input` with all trailing matching characters removed.
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
function stripTrailing(input, codes) {
|
|
17
|
+
let end = input.length;
|
|
18
|
+
while (end > 0 && codes.includes(input.charCodeAt(end - 1))) end -= 1;
|
|
19
|
+
return end === input.length ? input : input.slice(0, end);
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { stripTrailing };
|
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/testkit.mjs
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
import{createCaptureOutput
|
|
1
|
+
import { createCaptureOutput } from "./core/output/index.mjs";
|
|
2
|
+
import { PROMPT_CANCEL, createTestPrompter } from "./core/prompt/index.mjs";
|
|
3
|
+
import { runCommand } from "./core/testkit/index.mjs";
|
|
4
|
+
import { createTestAdapter } from "./runtime/adapter.mjs";
|
|
5
|
+
export { PROMPT_CANCEL, createCaptureOutput, createTestAdapter, createTestPrompter, runCommand };
|
package/dist/version.d.mts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
//#region src/version.d.ts
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* DreamCLI's own build-time version constants.
|
|
4
|
+
*
|
|
5
|
+
* Not the app version configured via `cli().version(...)` — these identify
|
|
6
|
+
* the framework build itself (diagnostics, bug reports, completion-script
|
|
7
|
+
* stamps). Kept on a dedicated subpath so they stay out of root-entrypoint
|
|
8
|
+
* import completions.
|
|
4
9
|
*
|
|
5
10
|
* Replaced by tsdown `define` during bundling. In development (unbundled),
|
|
6
11
|
* the declared globals resolve to the `'dev'` fallback.
|
|
7
12
|
*
|
|
8
|
-
* @module dreamcli/version
|
|
9
|
-
* @internal
|
|
13
|
+
* @module @kjanat/dreamcli/version
|
|
10
14
|
*/
|
|
11
15
|
/** Package version (e.g. `"0.9.1"`). `"dev"` when running unbundled. */
|
|
12
16
|
declare const DREAMCLI_VERSION: string;
|
package/dist/version.mjs
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/version.ts
|
|
2
|
+
/** Package version (e.g. `"0.9.1"`). `"dev"` when running unbundled. */
|
|
3
|
+
const DREAMCLI_VERSION = "3.0.0-rc.11";
|
|
4
|
+
/** Git short SHA (e.g. `"f9b5f1a"`). `"dev"` when running unbundled. */
|
|
5
|
+
const DREAMCLI_REVISION = "0324e9c";
|
|
6
|
+
//#endregion
|
|
7
|
+
export { DREAMCLI_REVISION, DREAMCLI_VERSION };
|
package/dreamcli.schema.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"description": "Program description (shown in root help)."
|
|
23
23
|
},
|
|
24
24
|
"defaultCommand": {
|
|
25
|
-
"
|
|
25
|
+
"$ref": "#/$defs/command",
|
|
26
26
|
"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."
|
|
27
27
|
},
|
|
28
28
|
"commands": {
|
|
@@ -110,7 +110,9 @@
|
|
|
110
110
|
"boolean",
|
|
111
111
|
"enum",
|
|
112
112
|
"array",
|
|
113
|
-
"custom"
|
|
113
|
+
"custom",
|
|
114
|
+
"count",
|
|
115
|
+
"keyValue"
|
|
114
116
|
],
|
|
115
117
|
"description": "What kind of value this flag accepts."
|
|
116
118
|
},
|
|
@@ -172,7 +174,19 @@
|
|
|
172
174
|
},
|
|
173
175
|
"propagate": {
|
|
174
176
|
"const": true,
|
|
175
|
-
"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
|
|
177
|
+
"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.\n\nDefault: `false`"
|
|
178
|
+
},
|
|
179
|
+
"negation": {
|
|
180
|
+
"$ref": "#/$defs/negation",
|
|
181
|
+
"description": "Negation settings when `kind === 'boolean'` and `.negatable()` was\ncalled (`undefined` otherwise). See FlagNegation."
|
|
182
|
+
},
|
|
183
|
+
"duplicates": {
|
|
184
|
+
"enum": [
|
|
185
|
+
"last",
|
|
186
|
+
"first",
|
|
187
|
+
"error"
|
|
188
|
+
],
|
|
189
|
+
"description": "How repeated CLI occurrences of a singleton flag combine.\n\n- `'last'` — last occurrence wins (matches historic behavior)\n- `'first'` — first occurrence wins; later ones parse but are ignored\n- `'error'` — a second occurrence is a `ParseError` (`DUPLICATE_FLAG`)\n\nApplies to CLI token occurrences only — env/config/prompt/default\nresolution keeps its precedence semantics and never raises duplicates.\nOccurrences are counted per *logical* flag: aliases and the negated\nspelling all count toward the same flag.\n\nDefault: `'last'`"
|
|
176
190
|
}
|
|
177
191
|
},
|
|
178
192
|
"required": [
|
|
@@ -181,6 +195,21 @@
|
|
|
181
195
|
],
|
|
182
196
|
"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."
|
|
183
197
|
},
|
|
198
|
+
"negation": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"additionalProperties": false,
|
|
201
|
+
"properties": {
|
|
202
|
+
"alias": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"description": "Explicit negated spelling without the `--` prefix (e.g. `'no-sandbox'`).\n`undefined` synthesizes `no-<flagName>` wherever the flag name is known."
|
|
205
|
+
},
|
|
206
|
+
"hidden": {
|
|
207
|
+
"const": true,
|
|
208
|
+
"description": "Hide the negated spelling from help, completions, and suggestions."
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"description": "Negation settings for a boolean flag (set by `.negatable()`).\n\nThe negated spelling and the positive form are two spellings of ONE\nlogical flag: they share duplicate policy, and the last CLI occurrence\nwins across both. The negated spelling is presence-only — `--no-foo=x`\nis rejected."
|
|
212
|
+
},
|
|
184
213
|
"arg": {
|
|
185
214
|
"type": "object",
|
|
186
215
|
"additionalProperties": false,
|
|
@@ -212,7 +241,7 @@
|
|
|
212
241
|
},
|
|
213
242
|
"stdinMode": {
|
|
214
243
|
"const": true,
|
|
215
|
-
"description": "Whether this arg may read from stdin during resolution
|
|
244
|
+
"description": "Whether this arg may read from stdin during resolution.\n\nDefault: `false`"
|
|
216
245
|
},
|
|
217
246
|
"defaultValue": {
|
|
218
247
|
"description": "Runtime default value (if any)."
|
|
@@ -281,11 +310,11 @@
|
|
|
281
310
|
},
|
|
282
311
|
"min": {
|
|
283
312
|
"type": "integer",
|
|
284
|
-
"description": "Minimum number of selections required
|
|
313
|
+
"description": "Minimum number of selections required.\n\nDefault: `0`"
|
|
285
314
|
},
|
|
286
315
|
"max": {
|
|
287
316
|
"type": "integer",
|
|
288
|
-
"description": "Maximum number of selections allowed
|
|
317
|
+
"description": "Maximum number of selections allowed.\n\nDefault: `Infinity`"
|
|
289
318
|
}
|
|
290
319
|
},
|
|
291
320
|
"required": [
|
|
@@ -304,7 +333,7 @@
|
|
|
304
333
|
},
|
|
305
334
|
"label": {
|
|
306
335
|
"type": "string",
|
|
307
|
-
"description": "Display label shown to the user
|
|
336
|
+
"description": "Display label shown to the user.\n\nDefault: value"
|
|
308
337
|
},
|
|
309
338
|
"description": {
|
|
310
339
|
"type": "string",
|
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.11",
|
|
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"
|
|
@@ -29,37 +37,29 @@
|
|
|
29
37
|
"exports": {
|
|
30
38
|
".": {
|
|
31
39
|
"types": "./dist/index.d.mts",
|
|
32
|
-
"bun": "./src/index.ts",
|
|
33
|
-
"deno": "./src/index.ts",
|
|
34
40
|
"default": "./dist/index.mjs"
|
|
35
41
|
},
|
|
36
42
|
"./runtime": {
|
|
37
43
|
"types": "./dist/runtime.d.mts",
|
|
38
|
-
"bun": "./src/runtime.ts",
|
|
39
|
-
"deno": "./src/runtime.ts",
|
|
40
44
|
"default": "./dist/runtime.mjs"
|
|
41
45
|
},
|
|
42
46
|
"./testkit": {
|
|
43
47
|
"types": "./dist/testkit.d.mts",
|
|
44
|
-
"bun": "./src/testkit.ts",
|
|
45
|
-
"deno": "./src/testkit.ts",
|
|
46
48
|
"default": "./dist/testkit.mjs"
|
|
47
49
|
},
|
|
48
|
-
"./
|
|
49
|
-
|
|
50
|
+
"./version": {
|
|
51
|
+
"types": "./dist/version.d.mts",
|
|
52
|
+
"default": "./dist/version.mjs"
|
|
53
|
+
},
|
|
54
|
+
"./package.json": "./package.json",
|
|
55
|
+
"./schema": "./dreamcli.schema.json"
|
|
50
56
|
},
|
|
51
57
|
"files": [
|
|
52
58
|
"CHANGELOG.md",
|
|
53
|
-
"LICENSE",
|
|
54
|
-
"README.md",
|
|
55
59
|
"dist",
|
|
56
60
|
"dreamcli.schema.json",
|
|
57
61
|
"examples",
|
|
58
|
-
"
|
|
59
|
-
"package.json",
|
|
60
|
-
"src",
|
|
61
|
-
"!src/**/*.test.ts",
|
|
62
|
-
"!src/**/*test-helpers.ts",
|
|
62
|
+
"!**/.cache",
|
|
63
63
|
"!**/AGENTS.md"
|
|
64
64
|
],
|
|
65
65
|
"workspaces": ["./examples/*"],
|
|
@@ -75,8 +75,9 @@
|
|
|
75
75
|
"docs:dev": "bun --bun vitepress dev docs --host --port ${PORT:-5173}",
|
|
76
76
|
"docs:preview": "bun --bun vitepress preview docs",
|
|
77
77
|
"docs:upload": "wrangler versions upload",
|
|
78
|
-
"fmt": "
|
|
78
|
+
"fmt": "run -s lint:fix fmt:dprint",
|
|
79
79
|
"fmt:autofix": "dprint fmt --allow-no-files --excludes .github",
|
|
80
|
+
"fmt:dprint": "dprint fmt",
|
|
80
81
|
"fmt:update": "dprint config update --yes --recursive",
|
|
81
82
|
"format": "dprint fmt",
|
|
82
83
|
"format:check": "dprint check",
|
|
@@ -87,9 +88,9 @@
|
|
|
87
88
|
"gh-project:start": "bun gh-project start",
|
|
88
89
|
"gh-project:sync": "bun gh-project sync",
|
|
89
90
|
"knip": "knip",
|
|
90
|
-
"lint": "biome
|
|
91
|
+
"lint": "biome check",
|
|
91
92
|
"lint:autofix": "biome check --skip-parse-errors --no-errors-on-unmatched --changed --write",
|
|
92
|
-
"lint:fix": "biome
|
|
93
|
+
"lint:fix": "biome check --fix",
|
|
93
94
|
"meta-descriptions": "bun --bun scripts/build-meta-descriptions.ts",
|
|
94
95
|
"meta-descriptions:check": "bun --bun scripts/build-meta-descriptions.ts --check",
|
|
95
96
|
"prepack": "bun --bun tsdown --logLevel silent",
|
|
@@ -100,39 +101,41 @@
|
|
|
100
101
|
"test:gh": "run --dir examples/gh test",
|
|
101
102
|
"test:node": "npx -y vitest run",
|
|
102
103
|
"test:watch": "vitest",
|
|
103
|
-
"typecheck": "
|
|
104
|
+
"typecheck": "bunx @typescript/native --noEmit",
|
|
104
105
|
"typecheck:gh": "run --dir examples/gh typecheck",
|
|
105
|
-
"typecheck:tsc": "tsc --noEmit",
|
|
106
106
|
"upgrade": "bun update --latest && bun add -D vitepress@next",
|
|
107
107
|
"version:check": "bun scripts/check-version-sync.ts"
|
|
108
108
|
},
|
|
109
109
|
"overrides": {
|
|
110
110
|
"vitepress": "next"
|
|
111
111
|
},
|
|
112
|
+
"dependencies": {
|
|
113
|
+
"ansispeck": "^0.2.0"
|
|
114
|
+
},
|
|
112
115
|
"devDependencies": {
|
|
113
|
-
"@arethetypeswrong/core": "^0.18.
|
|
114
|
-
"@biomejs/biome": "
|
|
116
|
+
"@arethetypeswrong/core": "^0.18.5",
|
|
117
|
+
"@biomejs/biome": "<=2.5.2 || >=2.5.4",
|
|
115
118
|
"@iarna/toml": "^2.2.5",
|
|
116
|
-
"@shikijs/transformers": "^4.3.
|
|
117
|
-
"@shikijs/vitepress-twoslash": "^4.3.
|
|
119
|
+
"@shikijs/transformers": "^4.3.1",
|
|
120
|
+
"@shikijs/vitepress-twoslash": "^4.3.1",
|
|
118
121
|
"@types/bun": "^1.3.14",
|
|
119
122
|
"@types/deno": "^2.7.0",
|
|
120
|
-
"@types/node": ">=26.
|
|
121
|
-
"@typescript/native
|
|
122
|
-
"@vitest/coverage-v8": "^4.1.
|
|
123
|
+
"@types/node": ">=26.1.1",
|
|
124
|
+
"@typescript/native": "npm:typescript@^7",
|
|
125
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
123
126
|
"dprint": "^0.55.1",
|
|
124
127
|
"floating-vue": "^5.2.2",
|
|
125
|
-
"knip": "^6.
|
|
128
|
+
"knip": "^6.25.0",
|
|
126
129
|
"mermaid": "^11.16.0",
|
|
127
130
|
"publint": "^0.3.21",
|
|
128
|
-
"runner-run": "0.
|
|
129
|
-
"tsdown": "^0.22.
|
|
130
|
-
"typedoc": "^0.28.
|
|
131
|
-
"typescript": "
|
|
132
|
-
"vite": "^8.1.
|
|
133
|
-
"vitepress": "^2.0.0-alpha.
|
|
134
|
-
"vitest": "^4.1.
|
|
135
|
-
"wrangler": "^4.
|
|
131
|
+
"runner-run": "0.19.1",
|
|
132
|
+
"tsdown": "^0.22.4",
|
|
133
|
+
"typedoc": "^0.28.20",
|
|
134
|
+
"typescript": ">=6,<7",
|
|
135
|
+
"vite": "^8.1.4",
|
|
136
|
+
"vitepress": "^2.0.0-alpha.18",
|
|
137
|
+
"vitest": "^4.1.10",
|
|
138
|
+
"wrangler": "^4.110.0",
|
|
136
139
|
"yaml": "^2.9.0"
|
|
137
140
|
},
|
|
138
141
|
"packageManager": "bun@1.3.14",
|
|
@@ -156,12 +159,12 @@
|
|
|
156
159
|
"npm": "11.18.0"
|
|
157
160
|
},
|
|
158
161
|
"publishConfig": {
|
|
159
|
-
"access": "public"
|
|
160
|
-
"provenance": true
|
|
162
|
+
"access": "public"
|
|
161
163
|
},
|
|
162
164
|
"catalog": {
|
|
163
165
|
"@types/bun": "^1.3.14",
|
|
164
|
-
"@types/node": ">=26.
|
|
165
|
-
"typescript": "
|
|
166
|
+
"@types/node": ">=26.1.1",
|
|
167
|
+
"@typescript/native": "npm:typescript@^7",
|
|
168
|
+
"typescript": ">=6,<7"
|
|
166
169
|
}
|
|
167
170
|
}
|
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 +0,0 @@
|
|
|
1
|
-
import{createNodeAdapter as e}from"./node.mjs";function t(t){return e(t)}export{t as createBunAdapter};
|