closeclaw 3.0.7 → 3.0.9
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 +25 -16
- package/dist/cli.jsc +0 -0
- package/dist/index.jsc +0 -0
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -7887,11 +7887,17 @@ function whichSync(bin) {
|
|
|
7887
7887
|
}
|
|
7888
7888
|
}
|
|
7889
7889
|
function ask(question) {
|
|
7890
|
-
const rl = (0, import_node_readline.createInterface)({
|
|
7890
|
+
const rl = (0, import_node_readline.createInterface)({
|
|
7891
|
+
input: process.stdin,
|
|
7892
|
+
output: process.stdout,
|
|
7893
|
+
terminal: false
|
|
7894
|
+
// prevents line length truncation
|
|
7895
|
+
});
|
|
7896
|
+
process.stdout.write(question);
|
|
7891
7897
|
return new Promise((resolve) => {
|
|
7892
|
-
rl.
|
|
7898
|
+
rl.on("line", (line) => {
|
|
7893
7899
|
rl.close();
|
|
7894
|
-
resolve(
|
|
7900
|
+
resolve(line.trim());
|
|
7895
7901
|
});
|
|
7896
7902
|
});
|
|
7897
7903
|
}
|
|
@@ -7960,14 +7966,16 @@ async function commandOnboard() {
|
|
|
7960
7966
|
result(INFO, `Key: ${c.dim}${licenseKey.substring(0, 30)}...${c.reset}`);
|
|
7961
7967
|
} else {
|
|
7962
7968
|
result(INFO, "No license key found.");
|
|
7963
|
-
|
|
7969
|
+
console.log(` Enter ${c.cyan}dev${c.reset} for development mode, or paste your license key below:`);
|
|
7970
|
+
console.log("");
|
|
7971
|
+
const key = await ask(` > `);
|
|
7964
7972
|
if (key === "dev" || key === "development") {
|
|
7965
7973
|
process.env.NODE_ENV = "development";
|
|
7966
7974
|
result(WARN, "Development mode \u2014 no license required");
|
|
7967
7975
|
} else if (key) {
|
|
7968
7976
|
licenseKey = key;
|
|
7969
7977
|
saveLicenseKey(key);
|
|
7970
|
-
result(PASS,
|
|
7978
|
+
result(PASS, "License key saved");
|
|
7971
7979
|
} else {
|
|
7972
7980
|
result(FAIL, "No key provided. Get one from your administrator.");
|
|
7973
7981
|
process.exit(1);
|
|
@@ -8062,19 +8070,20 @@ async function commandOnboard() {
|
|
|
8062
8070
|
if (plugins.includes("platform-tools")) {
|
|
8063
8071
|
result(PASS, "platform-tools plugin installed");
|
|
8064
8072
|
} else {
|
|
8065
|
-
result(
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8073
|
+
result(INFO, "platform-tools plugin not found \u2014 installing...");
|
|
8074
|
+
try {
|
|
8075
|
+
const pluginDir = (0, import_node_path6.join)(__dirname, "..", "packages", "platform-tools");
|
|
8076
|
+
const altDir = (0, import_node_path6.join)(__dirname, "..", "..", "platform-tools");
|
|
8077
|
+
const resolved = (0, import_node_fs7.existsSync)((0, import_node_path6.join)(pluginDir, "package.json")) ? pluginDir : (0, import_node_fs7.existsSync)((0, import_node_path6.join)(altDir, "package.json")) ? altDir : null;
|
|
8078
|
+
if (resolved) {
|
|
8071
8079
|
(0, import_node_child_process3.execSync)(`${openclawPath} plugins install -l "${resolved}"`, { stdio: "pipe" });
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
result(WARN, `Auto-install failed. Run manually: ${c.dim}openclaw plugins install @prajwalshete/platform-tools${c.reset}`);
|
|
8080
|
+
} else {
|
|
8081
|
+
(0, import_node_child_process3.execSync)(`${openclawPath} plugins install @prajwalshete/platform-tools`, { stdio: "pipe", timeout: 3e4 });
|
|
8075
8082
|
}
|
|
8076
|
-
|
|
8077
|
-
|
|
8083
|
+
result(PASS, "platform-tools plugin installed");
|
|
8084
|
+
} catch (err) {
|
|
8085
|
+
result(FAIL, `Could not install plugin: ${err.message?.split("\n")[0] || err}`);
|
|
8086
|
+
result(INFO, `Try manually: ${c.dim}openclaw plugins install @prajwalshete/platform-tools${c.reset}`);
|
|
8078
8087
|
}
|
|
8079
8088
|
}
|
|
8080
8089
|
} catch {
|
package/dist/cli.jsc
CHANGED
|
Binary file
|
package/dist/index.jsc
CHANGED
|
Binary file
|