@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.cjs
CHANGED
|
@@ -7163,10 +7163,10 @@ function runAction(fn, opts = {}) {
|
|
|
7163
7163
|
function printBanner(opts = {}) {
|
|
7164
7164
|
const ui = getUI();
|
|
7165
7165
|
if (opts.compact) {
|
|
7166
|
-
ui.smallHeader("Runtime CLI v1.9.
|
|
7166
|
+
ui.smallHeader("Runtime CLI v1.9.7");
|
|
7167
7167
|
return;
|
|
7168
7168
|
}
|
|
7169
|
-
ui.banner("Runtime CLI v1.9.
|
|
7169
|
+
ui.banner("Runtime CLI v1.9.7", { full: true });
|
|
7170
7170
|
}
|
|
7171
7171
|
function ok(label, detail) {
|
|
7172
7172
|
getUI().ok(label, detail);
|
|
@@ -9897,9 +9897,13 @@ function buildSetupCommand() {
|
|
|
9897
9897
|
if (configExists(paths) && !opts.force) {
|
|
9898
9898
|
const cfg = loadConfig(paths);
|
|
9899
9899
|
if (opts.json) {
|
|
9900
|
-
printJson({ ok: true, alreadyConfigured: true, config: paths.configFile, daemonId: cfg.daemon_id });
|
|
9900
|
+
printJson({ ok: true, alreadyConfigured: true, config: paths.configFile, daemonId: cfg.daemon_id, daemonStartRequested: shouldStart });
|
|
9901
9901
|
} else {
|
|
9902
9902
|
warn("Already configured", paths.configFile);
|
|
9903
|
+
if (shouldStart) {
|
|
9904
|
+
startDaemonDetached(paths.root);
|
|
9905
|
+
ok("Daemon start requested");
|
|
9906
|
+
}
|
|
9903
9907
|
tip("prismer setup --force <api-key>", "overwrite config");
|
|
9904
9908
|
}
|
|
9905
9909
|
return;
|
|
@@ -9982,14 +9986,15 @@ function waitForSetupCallback(server, expectedState) {
|
|
|
9982
9986
|
}
|
|
9983
9987
|
const state = url.searchParams.get("state");
|
|
9984
9988
|
const key = url.searchParams.get("key");
|
|
9989
|
+
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>';
|
|
9985
9990
|
if (state !== expectedState || !key || !/^sk-prismer-/.test(key)) {
|
|
9986
9991
|
res.writeHead(400, { "Content-Type": "text/html; charset=utf-8" });
|
|
9987
|
-
res.end("
|
|
9992
|
+
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>`);
|
|
9988
9993
|
reject(new Error("setup: invalid browser callback"));
|
|
9989
9994
|
return;
|
|
9990
9995
|
}
|
|
9991
9996
|
res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
|
|
9992
|
-
res.end("
|
|
9997
|
+
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>`);
|
|
9993
9998
|
resolve3(key);
|
|
9994
9999
|
} catch (err) {
|
|
9995
10000
|
reject(err);
|
|
@@ -10526,7 +10531,7 @@ async function readResponseError(res) {
|
|
|
10526
10531
|
}
|
|
10527
10532
|
|
|
10528
10533
|
// src/cli/index.ts
|
|
10529
|
-
var VERSION = "1.9.
|
|
10534
|
+
var VERSION = "1.9.7";
|
|
10530
10535
|
function buildProgram() {
|
|
10531
10536
|
const program = new import_commander18.Command("prismer").description("Prismer Cloud daemon CLI (TS-only).").version(VERSION);
|
|
10532
10537
|
program.addCommand(buildBannerCommand());
|