@collectui/cli 0.2.11 → 0.2.12
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/package.json +1 -1
- package/src/cli.mjs +10 -10
- package/src/commands/add.mjs +7 -7
- package/src/commands/common.mjs +1 -1
- package/src/commands/dash.mjs +4 -4
- package/src/commands/doctor.mjs +1 -1
- package/src/commands/libs.mjs +1 -1
- package/src/commands/mcp.mjs +4 -4
- package/src/commands/setup.mjs +4 -4
- package/src/commands/update.mjs +2 -2
- package/src/http.mjs +3 -3
- package/src/login.mjs +3 -3
- package/src/mcp.mjs +1 -1
- package/src/project.mjs +1 -1
- package/src/scaffold.mjs +9 -9
- package/src/update.mjs +4 -4
package/package.json
CHANGED
package/src/cli.mjs
CHANGED
|
@@ -76,15 +76,15 @@ Global options:
|
|
|
76
76
|
--version, -V Show version
|
|
77
77
|
|
|
78
78
|
Examples:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
COLLECTUI_TOKEN=dpat_...
|
|
79
|
+
cui login
|
|
80
|
+
cui libs --json
|
|
81
|
+
cui init --libs reui,arc --yes --no-install # fresh verify project under the OS temp dir
|
|
82
|
+
cui init /tmp/my-app --libs all --yes --no-install
|
|
83
|
+
cui configure . --libs all --dry-run
|
|
84
|
+
cui add reui data-grid
|
|
85
|
+
cui mcp show --json
|
|
86
|
+
cui dash repos --json
|
|
87
|
+
COLLECTUI_TOKEN=dpat_... cui whoami --json
|
|
88
88
|
|
|
89
89
|
Environment:
|
|
90
90
|
COLLECTUI_TOKEN Dash PAT (headless/CI)
|
|
@@ -157,7 +157,7 @@ async function main() {
|
|
|
157
157
|
}
|
|
158
158
|
const command = findCommand(name);
|
|
159
159
|
if (!command) {
|
|
160
|
-
throw usageError(`Unknown command "${name}".`, "Run `
|
|
160
|
+
throw usageError(`Unknown command "${name}".`, "Run `cui help` to see the command list.");
|
|
161
161
|
}
|
|
162
162
|
const rest = positionals.slice(1);
|
|
163
163
|
const token = resolveToken(flags);
|
package/src/commands/add.mjs
CHANGED
|
@@ -8,26 +8,26 @@ import { detectProjectRoot, mergeRegistries, parseEnvText } from "../project.mjs
|
|
|
8
8
|
import { loadMe } from "./common.mjs";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* cui add <lib> <component...>
|
|
12
12
|
* 全部库都走 shadcn registry 通道:npx shadcn@latest add @scope/<component> --yes
|
|
13
13
|
*/
|
|
14
14
|
export async function addCmd(flags, rest, reporter) {
|
|
15
15
|
const libSlug = rest[0];
|
|
16
16
|
const rawComponents = rest.slice(1);
|
|
17
17
|
if (!libSlug || rawComponents.length === 0) {
|
|
18
|
-
throw usageError("Usage:
|
|
19
|
-
hint: "Examples:
|
|
18
|
+
throw usageError("Usage: cui add <library> <component...>", {
|
|
19
|
+
hint: "Examples: cui add reui data-grid · cui add arc pro/dock · cui add studio blocks/hero-01",
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const lib = libBySlug(libSlug);
|
|
24
|
-
if (!lib) throw usageError(`Unknown library "${libSlug}".`, { hint: "Run `
|
|
24
|
+
if (!lib) throw usageError(`Unknown library "${libSlug}".`, { hint: "Run `cui libs`." });
|
|
25
25
|
|
|
26
26
|
const detected = detectProjectRoot(flags.cwd ? resolve(String(flags.cwd)) : process.cwd());
|
|
27
27
|
const root = detected.root;
|
|
28
28
|
if (!existsSync(join(root, "components.json"))) {
|
|
29
29
|
throw new CliError(`No components.json under ${root}.`, {
|
|
30
|
-
hint: "Run `
|
|
30
|
+
hint: "Run `cui init` first, or --cwd into a shadcn project.",
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -72,14 +72,14 @@ function addViaRegistry({ flags, reporter, lib, rawComponents, root, cliKey, fil
|
|
|
72
72
|
if (flags["no-auto-configure"]) {
|
|
73
73
|
throw new CliError(
|
|
74
74
|
`${root} is missing registry scope(s): ${missing.join(", ")}.`,
|
|
75
|
-
{ hint: `Run \`
|
|
75
|
+
{ hint: `Run \`cui configure ${root} --libs ${lib.site}\` first.` }
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
78
|
if (flags.print) {
|
|
79
79
|
reporter.warn(`Missing registry scope(s) ${missing.join(", ")} — a real run would auto-configure them.`);
|
|
80
80
|
} else if (!cliKey && needsKey) {
|
|
81
81
|
throw new CliError(`Cannot auto-configure ${lib.siteName}: no CLI key is bound.`, {
|
|
82
|
-
hint: "Run `
|
|
82
|
+
hint: "Run `cui configure` after binding a key in Dash.",
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
}
|
package/src/commands/common.mjs
CHANGED
|
@@ -15,7 +15,7 @@ export function requireToken(flags, reporter) {
|
|
|
15
15
|
const token = resolveToken(flags);
|
|
16
16
|
if (!token) {
|
|
17
17
|
throw authError("Not logged in.", {
|
|
18
|
-
hint: "Run `
|
|
18
|
+
hint: "Run `cui login` (opens Dash in your browser), or pass --token / set COLLECTUI_TOKEN.",
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
reporter?.addSecrets([token]);
|
package/src/commands/dash.mjs
CHANGED
|
@@ -8,7 +8,7 @@ export async function dashCmd(flags, rest, reporter) {
|
|
|
8
8
|
const sub = rest[0] ?? "me";
|
|
9
9
|
if (!ALLOWED.has(sub)) {
|
|
10
10
|
throw usageError(`Unknown dash subcommand "${sub}".`, {
|
|
11
|
-
hint: "Usage:
|
|
11
|
+
hint: "Usage: cui dash <me|repos|download|feedback|tools|call>",
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
const token = requireToken(flags, reporter);
|
|
@@ -42,7 +42,7 @@ export async function dashCmd(flags, rest, reporter) {
|
|
|
42
42
|
|
|
43
43
|
if (sub === "download") {
|
|
44
44
|
const repo = rest[1];
|
|
45
|
-
if (!repo) throw usageError("Usage:
|
|
45
|
+
if (!repo) throw usageError("Usage: cui dash download <owner/repo>");
|
|
46
46
|
const result = await dashMcpTool(token, "download_repo", { repo }, { reporter });
|
|
47
47
|
if (reporter.json) reporter.result(result);
|
|
48
48
|
else {
|
|
@@ -61,7 +61,7 @@ export async function dashCmd(flags, rest, reporter) {
|
|
|
61
61
|
|
|
62
62
|
if (sub === "feedback") {
|
|
63
63
|
const message = rest.slice(1).join(" ").trim();
|
|
64
|
-
if (!message) throw usageError("Usage:
|
|
64
|
+
if (!message) throw usageError("Usage: cui dash feedback <message> [--site reui]");
|
|
65
65
|
const result = await dashMcpTool(
|
|
66
66
|
token,
|
|
67
67
|
"submit_feedback",
|
|
@@ -75,7 +75,7 @@ export async function dashCmd(flags, rest, reporter) {
|
|
|
75
75
|
|
|
76
76
|
if (sub === "call") {
|
|
77
77
|
const name = rest[1];
|
|
78
|
-
if (!name) throw usageError("Usage:
|
|
78
|
+
if (!name) throw usageError("Usage: cui dash call <tool> [--args '<json>']");
|
|
79
79
|
let args = {};
|
|
80
80
|
if (flags.args) {
|
|
81
81
|
try {
|
package/src/commands/doctor.mjs
CHANGED
|
@@ -21,7 +21,7 @@ export async function doctorCmd(flags, rest, reporter) {
|
|
|
21
21
|
|
|
22
22
|
const token = resolveToken(flags);
|
|
23
23
|
const source = tokenSource(flags);
|
|
24
|
-
add("credentials", token ? "ok" : "fail", token ? `PAT from ${source}` : "no PAT (run
|
|
24
|
+
add("credentials", token ? "ok" : "fail", token ? `PAT from ${source}` : "no PAT (run cui login)");
|
|
25
25
|
|
|
26
26
|
let me = null;
|
|
27
27
|
if (token) {
|
package/src/commands/libs.mjs
CHANGED
|
@@ -44,6 +44,6 @@ export async function libsCmd(flags, rest, reporter) {
|
|
|
44
44
|
])
|
|
45
45
|
);
|
|
46
46
|
if (!me) {
|
|
47
|
-
reporter.info("Run `
|
|
47
|
+
reporter.info("Run `cui login` to see which libraries your account owns and to bind keys.");
|
|
48
48
|
}
|
|
49
49
|
}
|
package/src/commands/mcp.mjs
CHANGED
|
@@ -103,7 +103,7 @@ async function dashMcpCommand(sub, flags, rest, reporter) {
|
|
|
103
103
|
|
|
104
104
|
if (sub === "call") {
|
|
105
105
|
const name = rest[0];
|
|
106
|
-
if (!name) throw usageError("Usage:
|
|
106
|
+
if (!name) throw usageError("Usage: cui mcp call <tool> [--args '<json>']");
|
|
107
107
|
let args = {};
|
|
108
108
|
if (flags.args) {
|
|
109
109
|
try {
|
|
@@ -141,7 +141,7 @@ async function dashMcpCommand(sub, flags, rest, reporter) {
|
|
|
141
141
|
|
|
142
142
|
if (sub === "download") {
|
|
143
143
|
const repo = rest[0];
|
|
144
|
-
if (!repo) throw usageError("Usage:
|
|
144
|
+
if (!repo) throw usageError("Usage: cui mcp download <owner/repo>");
|
|
145
145
|
const result = await dashMcpTool(token, "download_repo", { repo }, { reporter });
|
|
146
146
|
if (reporter.json) reporter.result(result);
|
|
147
147
|
else {
|
|
@@ -163,7 +163,7 @@ async function dashMcpCommand(sub, flags, rest, reporter) {
|
|
|
163
163
|
|
|
164
164
|
if (sub === "feedback") {
|
|
165
165
|
const message = rest.join(" ").trim();
|
|
166
|
-
if (!message) throw usageError("Usage:
|
|
166
|
+
if (!message) throw usageError("Usage: cui mcp feedback <message> [--site reui,arc]");
|
|
167
167
|
const result = await dashMcpTool(
|
|
168
168
|
token,
|
|
169
169
|
"submit_feedback",
|
|
@@ -178,7 +178,7 @@ async function dashMcpCommand(sub, flags, rest, reporter) {
|
|
|
178
178
|
throw usageError(`Unknown mcp subcommand "${sub}".`, { hint: MCP_HELP });
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
const MCP_HELP = `Usage:
|
|
181
|
+
const MCP_HELP = `Usage: cui mcp <show|init|tools|call|me|repos|download|feedback>
|
|
182
182
|
|
|
183
183
|
show Print MCP server config for the selected libraries and clients
|
|
184
184
|
init Write/merge MCP configs (same as configure's MCP step)
|
package/src/commands/setup.mjs
CHANGED
|
@@ -66,7 +66,7 @@ export async function runSetup({ flags, rest = [], reporter, mode }) {
|
|
|
66
66
|
if (reporter.headless) {
|
|
67
67
|
throw new CliError("Not logged in (headless).", {
|
|
68
68
|
code: 3,
|
|
69
|
-
hint: "Pass --token dpat_... or set COLLECTUI_TOKEN. `
|
|
69
|
+
hint: "Pass --token dpat_... or set COLLECTUI_TOKEN. `cui login` opens Dash for you in a terminal.",
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
reporter.info("No saved session — starting login first.");
|
|
@@ -104,7 +104,7 @@ export async function runSetup({ flags, rest = [], reporter, mode }) {
|
|
|
104
104
|
|
|
105
105
|
if (mode === "configure" && !hasComponents) {
|
|
106
106
|
throw new CliError(`${target} has no components.json.`, {
|
|
107
|
-
hint: "Point at a shadcn project, or run `
|
|
107
|
+
hint: "Point at a shadcn project, or run `cui init` to create one.",
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
if (mode === "init" && hasComponents) {
|
|
@@ -206,8 +206,8 @@ export async function runSetup({ flags, rest = [], reporter, mode }) {
|
|
|
206
206
|
next: [
|
|
207
207
|
mode === "init" && !hasComponents ? `cd ${target}` : null,
|
|
208
208
|
install ? `dependencies installing via ${pm}` : "npm install (if dependencies are missing)",
|
|
209
|
-
`
|
|
210
|
-
"
|
|
209
|
+
`cui add ${units[0]?.site ?? "<site>"} <component>`,
|
|
210
|
+
"cui doctor",
|
|
211
211
|
].filter(Boolean),
|
|
212
212
|
};
|
|
213
213
|
if (reporter.headless) {
|
package/src/commands/update.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { CliError } from "../errors.mjs";
|
|
|
4
4
|
import * as p from "@clack/prompts";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* cui update 手动立即更新(前台,看着跑)
|
|
8
|
+
* cui update --check 只查不更(打 registry,不走缓存)
|
|
9
9
|
*/
|
|
10
10
|
export async function updateCmd(flags, _rest, reporter) {
|
|
11
11
|
reporter.step(1, 2, "Checking npm for the latest @collectui/cli");
|
package/src/http.mjs
CHANGED
|
@@ -109,7 +109,7 @@ export async function jsonRequest(url, options = {}) {
|
|
|
109
109
|
code: out.res.status === 401 || out.res.status === 403 ? 3 : 1,
|
|
110
110
|
hint:
|
|
111
111
|
out.res.status === 401
|
|
112
|
-
? "Run `
|
|
112
|
+
? "Run `cui login` again (or pass --token) — your PAT may be missing, revoked or expired."
|
|
113
113
|
: undefined,
|
|
114
114
|
});
|
|
115
115
|
}
|
|
@@ -155,7 +155,7 @@ export async function mcpCall({ base, token, method, params, reporter, id = 1 })
|
|
|
155
155
|
} catch {
|
|
156
156
|
if (out.res.status === 404) {
|
|
157
157
|
throw new CliError("Dash MCP is not enabled for this server/account (HTTP 404).", {
|
|
158
|
-
hint: "Ask the operator to enable dashFeatures.mcpServer, or use `
|
|
158
|
+
hint: "Ask the operator to enable dashFeatures.mcpServer, or use `cui whoami` / the REST API instead.",
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
if (!out.res.ok) {
|
|
@@ -167,7 +167,7 @@ export async function mcpCall({ base, token, method, params, reporter, id = 1 })
|
|
|
167
167
|
if (!out.res.ok) {
|
|
168
168
|
if (out.res.status === 404) {
|
|
169
169
|
throw new CliError("Dash MCP is not enabled for this server/account (HTTP 404).", {
|
|
170
|
-
hint: "Ask the operator to enable dashFeatures.mcpServer, or use `
|
|
170
|
+
hint: "Ask the operator to enable dashFeatures.mcpServer, or use `cui whoami` / the REST API instead.",
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
throw new CliError(
|
package/src/login.mjs
CHANGED
|
@@ -37,7 +37,7 @@ export function saveSession(token, me, { reporter } = {}) {
|
|
|
37
37
|
* 1. 本地起 127.0.0.1 回调监听(带随机 secret 路径 + state 校验)
|
|
38
38
|
* 2. 打开 Dash 的 /authorize 授权页(登录态下点一次「授权」,Dash 建好 PAT
|
|
39
39
|
* 并把明文 redirect 回本机回调,全程无需复制粘贴)
|
|
40
|
-
* 3. 无浏览器场景(CI / 远程 / ssh)用 `
|
|
40
|
+
* 3. 无浏览器场景(CI / 远程 / ssh)用 `cui login --pat` 粘贴 PAT,
|
|
41
41
|
* 或 headless 下 --token / COLLECTUI_TOKEN / stdin
|
|
42
42
|
*
|
|
43
43
|
* 无头模式(--json / 非 TTY):从 --token / 环境变量 / stdin 取 PAT,绝不弹交互。
|
|
@@ -115,10 +115,10 @@ export async function login({
|
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
} else {
|
|
118
|
-
reporter.warn("--no-verify: token saved without checking it. Run `
|
|
118
|
+
reporter.warn("--no-verify: token saved without checking it. Run `cui whoami` to verify.");
|
|
119
119
|
}
|
|
120
120
|
saveSession(token, me, { reporter });
|
|
121
|
-
reporter.outro("Login complete. Try `
|
|
121
|
+
reporter.outro("Login complete. Try `cui libs`.");
|
|
122
122
|
return { token, me };
|
|
123
123
|
}
|
|
124
124
|
|
package/src/mcp.mjs
CHANGED
|
@@ -105,7 +105,7 @@ export function buildMcpEntries({ units, me, dashToken, registryBase, dashBase,
|
|
|
105
105
|
key: dashToken,
|
|
106
106
|
});
|
|
107
107
|
} else {
|
|
108
|
-
reporter?.warn("No Dash PAT; collectui-dash MCP was skipped. Run `
|
|
108
|
+
reporter?.warn("No Dash PAT; collectui-dash MCP was skipped. Run `cui login` to add it.");
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
package/src/project.mjs
CHANGED
|
@@ -184,7 +184,7 @@ export function planProjectConfig(cs, { projectDir, units, me, registryBase, for
|
|
|
184
184
|
const componentsPath = join(projectDir, "components.json");
|
|
185
185
|
if (!cs.exists(componentsPath)) {
|
|
186
186
|
throw new CliError(`No components.json in ${projectDir}.`, {
|
|
187
|
-
hint: "Run `
|
|
187
|
+
hint: "Run `cui init` to scaffold a project, or point --cwd at an existing shadcn project.",
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
190
|
const before = cs.readJson(componentsPath, {});
|
package/src/scaffold.mjs
CHANGED
|
@@ -149,10 +149,10 @@ ${manifest.mcpClients.map((c) => `- ${c}`).join("\n") || "- (none)"}
|
|
|
149
149
|
|
|
150
150
|
## Commands
|
|
151
151
|
|
|
152
|
-
- Configure another library: \`
|
|
153
|
-
- Install a component: \`
|
|
154
|
-
- Re-check setup: \`
|
|
155
|
-
- Dash account: \`
|
|
152
|
+
- Configure another library: \`cui configure . --libs <site>\`
|
|
153
|
+
- Install a component: \`cui add <site> <component>\`
|
|
154
|
+
- Re-check setup: \`cui doctor\`
|
|
155
|
+
- Dash account: \`cui whoami\`
|
|
156
156
|
|
|
157
157
|
Secrets live in \`.env.local\` and the MCP config files (both are gitignored by
|
|
158
158
|
the scaffold). Never commit them.
|
|
@@ -250,7 +250,7 @@ export default function App() {
|
|
|
250
250
|
<main className="flex min-h-screen flex-col items-center justify-center gap-4 bg-background text-foreground">
|
|
251
251
|
<h1 className="font-semibold text-2xl">CollectUI project</h1>
|
|
252
252
|
<p className="text-muted-foreground text-sm">
|
|
253
|
-
Run <code className="font-mono">
|
|
253
|
+
Run <code className="font-mono">cui add <site> <component></code> to install components.
|
|
254
254
|
</p>
|
|
255
255
|
<Button>Ready</Button>
|
|
256
256
|
</main>
|
|
@@ -418,7 +418,7 @@ dist/
|
|
|
418
418
|
.mcp.json
|
|
419
419
|
.cursor/mcp.json
|
|
420
420
|
.vscode/mcp.json
|
|
421
|
-
# MCP configs above may contain access tokens; regenerate them with \`
|
|
421
|
+
# MCP configs above may contain access tokens; regenerate them with \`cui configure\`.
|
|
422
422
|
`;
|
|
423
423
|
|
|
424
424
|
const README = (name) => `# ${name}
|
|
@@ -436,15 +436,15 @@ npm run dev
|
|
|
436
436
|
## Install components
|
|
437
437
|
|
|
438
438
|
\`\`\`bash
|
|
439
|
-
|
|
440
|
-
# e.g.
|
|
439
|
+
cui add <site> <component>
|
|
440
|
+
# e.g. cui add reui data-grid
|
|
441
441
|
# or: npx shadcn@latest add @reui/data-grid
|
|
442
442
|
\`\`\`
|
|
443
443
|
|
|
444
444
|
## Add another library
|
|
445
445
|
|
|
446
446
|
\`\`\`bash
|
|
447
|
-
|
|
447
|
+
cui configure . --libs <site>
|
|
448
448
|
\`\`\`
|
|
449
449
|
|
|
450
450
|
See \`.collectui/environment.md\` for the machine-readable setup record.
|
package/src/update.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { CLI_VERSION } from "./version.mjs";
|
|
|
9
9
|
* 更新检查(2026-12-01 起只提醒不自动装):
|
|
10
10
|
* - CLI 是一次性进程,没有「后台周期任务」——每次运行命令时即时异步查一次 npm
|
|
11
11
|
* (与命令并行,命令结束时最多再等 1 秒收结果)
|
|
12
|
-
* - 发现新版 → 打一行显式提醒,装不装由用户跑 `
|
|
12
|
+
* - 发现新版 → 打一行显式提醒,装不装由用户跑 `cui update` 决定
|
|
13
13
|
* - headless/--json 完全不碰(Agent/CI 输出契约不被搅动);npx 临时跑不需要
|
|
14
14
|
* - COLLECTUI_NO_AUTO_UPDATE=1:连检查带提示全静默(CI 显式意图)
|
|
15
15
|
*/
|
|
@@ -100,7 +100,7 @@ export function startBackgroundUpdate(reporter, deps = {}) {
|
|
|
100
100
|
const cache = readUpdateCache();
|
|
101
101
|
if (cache.latest && compareVersions(cache.latest, CLI_VERSION) > 0) {
|
|
102
102
|
reporter.info(
|
|
103
|
-
`⬆ ${NPM_PACKAGE} ${CLI_VERSION} → ${cache.latest} available — run \`
|
|
103
|
+
`⬆ ${NPM_PACKAGE} ${CLI_VERSION} → ${cache.latest} available — run \`cui update\` to upgrade.`
|
|
104
104
|
);
|
|
105
105
|
notified = true;
|
|
106
106
|
}
|
|
@@ -109,7 +109,7 @@ export function startBackgroundUpdate(reporter, deps = {}) {
|
|
|
109
109
|
writeUpdateCache({ lastCheck: Date.now(), latest });
|
|
110
110
|
if (!notified && compareVersions(latest, CLI_VERSION) > 0) {
|
|
111
111
|
reporter.info(
|
|
112
|
-
`⬆ ${NPM_PACKAGE} ${CLI_VERSION} → ${latest} available — run \`
|
|
112
|
+
`⬆ ${NPM_PACKAGE} ${CLI_VERSION} → ${latest} available — run \`cui update\` to upgrade.`
|
|
113
113
|
);
|
|
114
114
|
notified = true;
|
|
115
115
|
}
|
|
@@ -118,7 +118,7 @@ export function startBackgroundUpdate(reporter, deps = {}) {
|
|
|
118
118
|
return { done };
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
/** 手动更新(`
|
|
121
|
+
/** 手动更新(`cui update`):异步 spawn + 捕获输出(不 inherit——往 clack 的
|
|
122
122
|
* frame 里插行会把边框打断;捕获后失败时调用方直接展示 stderr)。
|
|
123
123
|
* runner 可注入(测试):返回 { status, stdout, stderr }(或其 Promise)。 */
|
|
124
124
|
export function runManualUpdate({ runner } = {}) {
|