@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/index.js
CHANGED
|
@@ -7099,10 +7099,10 @@ function runAction(fn, opts = {}) {
|
|
|
7099
7099
|
function printBanner(opts = {}) {
|
|
7100
7100
|
const ui = getUI();
|
|
7101
7101
|
if (opts.compact) {
|
|
7102
|
-
ui.smallHeader("Runtime CLI v1.9.
|
|
7102
|
+
ui.smallHeader("Runtime CLI v1.9.7");
|
|
7103
7103
|
return;
|
|
7104
7104
|
}
|
|
7105
|
-
ui.banner("Runtime CLI v1.9.
|
|
7105
|
+
ui.banner("Runtime CLI v1.9.7", { full: true });
|
|
7106
7106
|
}
|
|
7107
7107
|
function ok(label, detail) {
|
|
7108
7108
|
getUI().ok(label, detail);
|
|
@@ -9833,9 +9833,13 @@ function buildSetupCommand() {
|
|
|
9833
9833
|
if (configExists(paths) && !opts.force) {
|
|
9834
9834
|
const cfg = loadConfig(paths);
|
|
9835
9835
|
if (opts.json) {
|
|
9836
|
-
printJson({ ok: true, alreadyConfigured: true, config: paths.configFile, daemonId: cfg.daemon_id });
|
|
9836
|
+
printJson({ ok: true, alreadyConfigured: true, config: paths.configFile, daemonId: cfg.daemon_id, daemonStartRequested: shouldStart });
|
|
9837
9837
|
} else {
|
|
9838
9838
|
warn("Already configured", paths.configFile);
|
|
9839
|
+
if (shouldStart) {
|
|
9840
|
+
startDaemonDetached(paths.root);
|
|
9841
|
+
ok("Daemon start requested");
|
|
9842
|
+
}
|
|
9839
9843
|
tip("prismer setup --force <api-key>", "overwrite config");
|
|
9840
9844
|
}
|
|
9841
9845
|
return;
|
|
@@ -9918,14 +9922,15 @@ function waitForSetupCallback(server, expectedState) {
|
|
|
9918
9922
|
}
|
|
9919
9923
|
const state = url.searchParams.get("state");
|
|
9920
9924
|
const key = url.searchParams.get("key");
|
|
9925
|
+
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>';
|
|
9921
9926
|
if (state !== expectedState || !key || !/^sk-prismer-/.test(key)) {
|
|
9922
9927
|
res.writeHead(400, { "Content-Type": "text/html; charset=utf-8" });
|
|
9923
|
-
res.end("
|
|
9928
|
+
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>`);
|
|
9924
9929
|
reject(new Error("setup: invalid browser callback"));
|
|
9925
9930
|
return;
|
|
9926
9931
|
}
|
|
9927
9932
|
res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
|
|
9928
|
-
res.end("
|
|
9933
|
+
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>`);
|
|
9929
9934
|
resolve3(key);
|
|
9930
9935
|
} catch (err) {
|
|
9931
9936
|
reject(err);
|
|
@@ -10462,7 +10467,7 @@ async function readResponseError(res) {
|
|
|
10462
10467
|
}
|
|
10463
10468
|
|
|
10464
10469
|
// src/cli/index.ts
|
|
10465
|
-
var VERSION = "1.9.
|
|
10470
|
+
var VERSION = "1.9.7";
|
|
10466
10471
|
function buildProgram() {
|
|
10467
10472
|
const program = new Command18("prismer").description("Prismer Cloud daemon CLI (TS-only).").version(VERSION);
|
|
10468
10473
|
program.addCommand(buildBannerCommand());
|