@syengup/friday-channel-next 0.1.19 → 0.1.20
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/install.js +18 -29
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -96,7 +96,6 @@ if (!hasOpenclaw()) {
|
|
|
96
96
|
// --------------- install plugin package ---------------
|
|
97
97
|
|
|
98
98
|
log("Installing Friday Next channel plugin...");
|
|
99
|
-
let installed = false;
|
|
100
99
|
|
|
101
100
|
try {
|
|
102
101
|
const out = execSync(
|
|
@@ -104,7 +103,6 @@ try {
|
|
|
104
103
|
{ encoding: "utf8", stdio: "pipe", timeout: 120000 }
|
|
105
104
|
);
|
|
106
105
|
if (out.trim()) console.log(out.trim());
|
|
107
|
-
installed = true;
|
|
108
106
|
log("Plugin registered with install record — auto-upgrade enabled.");
|
|
109
107
|
|
|
110
108
|
// Remove old manual install to avoid "duplicate plugin id" warning.
|
|
@@ -115,25 +113,9 @@ try {
|
|
|
115
113
|
}
|
|
116
114
|
} catch (e) {
|
|
117
115
|
const msg = (e.stderr || e.stdout || e.message || "").toString();
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
// --------------- fallback: manual install ---------------
|
|
123
|
-
|
|
124
|
-
if (!installed) {
|
|
125
|
-
const PKG = has("npm") ? "npm" : has("pnpm") ? "pnpm" : null;
|
|
126
|
-
if (!PKG) {
|
|
127
|
-
err("npm is required for manual install. Install Node.js first.");
|
|
128
|
-
process.exit(1);
|
|
129
|
-
}
|
|
130
|
-
warn("Manual install complete, but auto-upgrade is NOT available.");
|
|
131
|
-
warn("To enable auto-upgrade later, run: openclaw plugins install @syengup/friday-channel-next --force");
|
|
132
|
-
// Clean up legacy dir even in fallback to avoid duplicate warnings
|
|
133
|
-
if (existsSync(join(USER_HOME, ".openclaw", "extensions", "friday-channel-next"))) {
|
|
134
|
-
warn("Legacy install detected. Remove it to avoid duplicate warnings:");
|
|
135
|
-
warn(" rm -rf ~/.openclaw/extensions/friday-channel-next");
|
|
136
|
-
}
|
|
116
|
+
err("Plugin install failed: " + (msg.trim().split("\n").pop() || "unknown error"));
|
|
117
|
+
err("Fix the error above and re-run: npx -y @syengup/friday-channel-next");
|
|
118
|
+
process.exit(1);
|
|
137
119
|
}
|
|
138
120
|
|
|
139
121
|
// --------------- configure OpenClaw ---------------
|
|
@@ -326,17 +308,24 @@ async function verifyGateway(url, token, retries = 30) {
|
|
|
326
308
|
log("Verifying gateway...");
|
|
327
309
|
const verified = await verifyGateway(verifyUrl, gatewayToken);
|
|
328
310
|
|
|
329
|
-
// --------------- show connection info ---------------
|
|
330
|
-
|
|
331
311
|
const BOLD_YELLOW = (s) => `\x1b[1;33m${s}\x1b[0m`;
|
|
332
312
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
313
|
+
// Hard gate: if the gateway didn't verify, the install did NOT succeed — stop here
|
|
314
|
+
// with a non-zero exit and do NOT print the QR / URL / "complete" block, so a failure
|
|
315
|
+
// can never look like a success.
|
|
316
|
+
if (!verified) {
|
|
317
|
+
log("--------------------------------------------------");
|
|
318
|
+
err("Installation FAILED: the Friday Next gateway did not come up.");
|
|
319
|
+
err("Diagnose with: openclaw gateway status");
|
|
320
|
+
err("Then restart: openclaw gateway restart");
|
|
321
|
+
err("And re-run: npx -y @syengup/friday-channel-next");
|
|
322
|
+
process.exit(1);
|
|
339
323
|
}
|
|
324
|
+
|
|
325
|
+
// --------------- show connection info ---------------
|
|
326
|
+
|
|
327
|
+
log("--------------------------------------------------");
|
|
328
|
+
log("Installation complete! Friday Next channel is now active.");
|
|
340
329
|
log("");
|
|
341
330
|
|
|
342
331
|
// --------------- QR code ---------------
|