@prismer/runtime 1.9.6 → 1.9.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 +32 -0
- package/dist/cli.cjs +11 -6
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +11 -6
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +11 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2190,10 +2190,10 @@ function runAction(fn, opts = {}) {
|
|
|
2190
2190
|
function printBanner(opts = {}) {
|
|
2191
2191
|
const ui = getUI();
|
|
2192
2192
|
if (opts.compact) {
|
|
2193
|
-
ui.smallHeader("Runtime CLI v1.9.
|
|
2193
|
+
ui.smallHeader("Runtime CLI v1.9.7");
|
|
2194
2194
|
return;
|
|
2195
2195
|
}
|
|
2196
|
-
ui.banner("Runtime CLI v1.9.
|
|
2196
|
+
ui.banner("Runtime CLI v1.9.7", { full: true });
|
|
2197
2197
|
}
|
|
2198
2198
|
function ok(label, detail) {
|
|
2199
2199
|
getUI().ok(label, detail);
|
|
@@ -9588,9 +9588,13 @@ function buildSetupCommand() {
|
|
|
9588
9588
|
if (configExists(paths) && !opts.force) {
|
|
9589
9589
|
const cfg = loadConfig(paths);
|
|
9590
9590
|
if (opts.json) {
|
|
9591
|
-
printJson({ ok: true, alreadyConfigured: true, config: paths.configFile, daemonId: cfg.daemon_id });
|
|
9591
|
+
printJson({ ok: true, alreadyConfigured: true, config: paths.configFile, daemonId: cfg.daemon_id, daemonStartRequested: shouldStart });
|
|
9592
9592
|
} else {
|
|
9593
9593
|
warn("Already configured", paths.configFile);
|
|
9594
|
+
if (shouldStart) {
|
|
9595
|
+
startDaemonDetached(paths.root);
|
|
9596
|
+
ok("Daemon start requested");
|
|
9597
|
+
}
|
|
9594
9598
|
tip("prismer setup --force <api-key>", "overwrite config");
|
|
9595
9599
|
}
|
|
9596
9600
|
return;
|
|
@@ -9673,14 +9677,15 @@ function waitForSetupCallback(server, expectedState) {
|
|
|
9673
9677
|
}
|
|
9674
9678
|
const state = url.searchParams.get("state");
|
|
9675
9679
|
const key = url.searchParams.get("key");
|
|
9680
|
+
const PAGE = '<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Prismer Setup</title><style>body{background:#0a0a0a;color:#e5e5e5;font-family:system-ui,-apple-system,sans-serif;display:flex;align-items:center;justify-content:center;min-height:100vh;margin:0;text-align:center}div{max-width:480px;padding:40px}h1{font-size:28px;margin-bottom:16px}p{font-size:15px;color:#888;line-height:1.6}.check{color:#4ade80;font-size:48px;margin-bottom:16px}.cross{color:#ef4444;font-size:48px;margin-bottom:16px}</style></head><body><div>';
|
|
9676
9681
|
if (state !== expectedState || !key || !/^sk-prismer-/.test(key)) {
|
|
9677
9682
|
res.writeHead(400, { "Content-Type": "text/html; charset=utf-8" });
|
|
9678
|
-
res.end("
|
|
9683
|
+
res.end(`${PAGE}<div class="cross">✗</div><h1>Prismer setup failed</h1><p>Invalid setup callback. You can close this tab and retry.</p></div></body></html>`);
|
|
9679
9684
|
reject(new Error("setup: invalid browser callback"));
|
|
9680
9685
|
return;
|
|
9681
9686
|
}
|
|
9682
9687
|
res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
|
|
9683
|
-
res.end("
|
|
9688
|
+
res.end(`${PAGE}<div class="check">✓</div><h1>Prismer setup complete</h1><p>You can close this tab and return to your terminal.</p></div></body></html>`);
|
|
9684
9689
|
resolve3(key);
|
|
9685
9690
|
} catch (err) {
|
|
9686
9691
|
reject(err);
|
|
@@ -10217,7 +10222,7 @@ async function readResponseError(res) {
|
|
|
10217
10222
|
}
|
|
10218
10223
|
|
|
10219
10224
|
// src/cli/index.ts
|
|
10220
|
-
var VERSION = "1.9.
|
|
10225
|
+
var VERSION = "1.9.7";
|
|
10221
10226
|
function buildProgram() {
|
|
10222
10227
|
const program = new Command18("prismer").description("Prismer Cloud daemon CLI (TS-only).").version(VERSION);
|
|
10223
10228
|
program.addCommand(buildBannerCommand());
|