closeclaw 3.0.14 → 3.0.16
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/dist/cli.cjs +34 -8
- package/dist/cli.jsc +0 -0
- package/dist/index.jsc +0 -0
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -8310,7 +8310,7 @@ async function commandOnboard() {
|
|
|
8310
8310
|
console.log(` ${c.green}${c.bold}Setup complete.${c.reset} Start the server with:`);
|
|
8311
8311
|
console.log("");
|
|
8312
8312
|
if (config.domain) {
|
|
8313
|
-
console.log(` ${c.cyan}closeclaw start
|
|
8313
|
+
console.log(` ${c.cyan}closeclaw start${c.reset}`);
|
|
8314
8314
|
console.log("");
|
|
8315
8315
|
console.log(` Then open ${c.bold}https://${config.domain}${c.reset} in your browser.`);
|
|
8316
8316
|
} else if (licenseKey) {
|
|
@@ -8348,7 +8348,13 @@ async function commandStart(args) {
|
|
|
8348
8348
|
const host2 = values.host;
|
|
8349
8349
|
let licenseKey = values.key || getSavedLicenseKey() || "";
|
|
8350
8350
|
const dataDir = values["data-dir"];
|
|
8351
|
-
|
|
8351
|
+
let domain = values.domain;
|
|
8352
|
+
if (!domain) {
|
|
8353
|
+
try {
|
|
8354
|
+
domain = JSON.parse((0, import_node_fs7.readFileSync)((0, import_node_path6.join)(CONFIG_DIR, "config.json"), "utf-8")).domain || "";
|
|
8355
|
+
} catch {
|
|
8356
|
+
}
|
|
8357
|
+
}
|
|
8352
8358
|
process.env.PORT = String(port2);
|
|
8353
8359
|
process.env.HOST = host2;
|
|
8354
8360
|
if (licenseKey) process.env.PLATFORM_LICENSE_KEY = licenseKey;
|
|
@@ -8416,16 +8422,32 @@ async function commandStart(args) {
|
|
|
8416
8422
|
const caddyBin = (0, import_node_path6.join)(CONFIG_DIR, "bin", "caddy");
|
|
8417
8423
|
if ((0, import_node_fs7.existsSync)(caddyBin)) {
|
|
8418
8424
|
console.log(` ${c.dim}Starting Caddy reverse proxy for ${effectiveDomain}...${c.reset}`);
|
|
8425
|
+
const caddyfilePath = (0, import_node_path6.join)(CONFIG_DIR, "Caddyfile");
|
|
8426
|
+
const caddyfileContent = [
|
|
8427
|
+
`${effectiveDomain} {`,
|
|
8428
|
+
` # OpenClaw dashboard \u2014 proxied at /openclaw/`,
|
|
8429
|
+
` # Protected by OpenClaw's own token auth`,
|
|
8430
|
+
` handle_path /openclaw/* {`,
|
|
8431
|
+
` reverse_proxy localhost:18789`,
|
|
8432
|
+
` }`,
|
|
8433
|
+
``,
|
|
8434
|
+
` # CloseClaw platform \u2014 everything else`,
|
|
8435
|
+
` handle {`,
|
|
8436
|
+
` reverse_proxy localhost:${port2}`,
|
|
8437
|
+
` }`,
|
|
8438
|
+
`}`
|
|
8439
|
+
].join("\n");
|
|
8440
|
+
(0, import_node_fs7.writeFileSync)(caddyfilePath, caddyfileContent);
|
|
8419
8441
|
const { spawn: spawnChild } = require("child_process");
|
|
8420
8442
|
caddyProcess = spawnChild(caddyBin, [
|
|
8421
|
-
"
|
|
8422
|
-
"--
|
|
8423
|
-
|
|
8424
|
-
"--to",
|
|
8425
|
-
`localhost:${port2}`
|
|
8443
|
+
"run",
|
|
8444
|
+
"--config",
|
|
8445
|
+
caddyfilePath
|
|
8426
8446
|
], {
|
|
8427
8447
|
stdio: ["ignore", "pipe", "pipe"],
|
|
8428
|
-
detached: false
|
|
8448
|
+
detached: false,
|
|
8449
|
+
env: { ...process.env, HOME: CONFIG_DIR }
|
|
8450
|
+
// Caddy stores certs here
|
|
8429
8451
|
});
|
|
8430
8452
|
caddyProcess.stdout?.on("data", (d) => {
|
|
8431
8453
|
const msg = d.toString().trim();
|
|
@@ -8469,6 +8491,10 @@ async function commandStart(args) {
|
|
|
8469
8491
|
}
|
|
8470
8492
|
if (publicUrl) {
|
|
8471
8493
|
console.log(` ${c.green}${c.bold}\u2551${c.reset} ${c.dim}SSL: auto (Let's Encrypt via Caddy)${" ".repeat(5)}${c.reset}${c.green}${c.bold}\u2551${c.reset}`);
|
|
8494
|
+
if (openclawPath) {
|
|
8495
|
+
const ocUrl = `https://${effectiveDomain}/openclaw/`;
|
|
8496
|
+
console.log(` ${c.green}${c.bold}\u2551${c.reset} ${c.dim}OpenClaw UI: ${ocUrl.padEnd(28)}${c.reset}${c.green}${c.bold}\u2551${c.reset}`);
|
|
8497
|
+
}
|
|
8472
8498
|
}
|
|
8473
8499
|
console.log(` ${c.green}${c.bold}\u2551 \u2551${c.reset}`);
|
|
8474
8500
|
console.log(` ${c.green}${c.bold}\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D${c.reset}`);
|
package/dist/cli.jsc
CHANGED
|
Binary file
|
package/dist/index.jsc
CHANGED
|
Binary file
|