@syengup/friday-channel-next 0.0.15 → 0.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/install.js +8 -2
- package/install.sh +18 -2
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -235,14 +235,20 @@ async function verifyGateway(url, token, retries = 6) {
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
log("Verifying gateway...");
|
|
238
|
-
await verifyGateway(gatewayUrl, gatewayToken);
|
|
238
|
+
const verified = await verifyGateway(gatewayUrl, gatewayToken);
|
|
239
239
|
|
|
240
240
|
// --------------- show connection info ---------------
|
|
241
241
|
|
|
242
242
|
const BOLD_YELLOW = (s) => `\x1b[1;33m${s}\x1b[0m`;
|
|
243
243
|
|
|
244
244
|
log("--------------------------------------------------");
|
|
245
|
-
|
|
245
|
+
if (verified) {
|
|
246
|
+
log("Installation complete! Friday Next channel is now active.");
|
|
247
|
+
} else {
|
|
248
|
+
warn("Installation complete, but gateway verification failed.");
|
|
249
|
+
warn("Check 'openclaw gateway status' and restart the gateway if needed.");
|
|
250
|
+
warn("Also ensure OpenClaw is updated to 2026.5.7 or above: openclaw update");
|
|
251
|
+
}
|
|
246
252
|
log("");
|
|
247
253
|
|
|
248
254
|
// --------------- QR code ---------------
|
package/install.sh
CHANGED
|
@@ -129,6 +129,7 @@ openclaw gateway restart
|
|
|
129
129
|
|
|
130
130
|
# Verify gateway is up
|
|
131
131
|
log "Verifying gateway..."
|
|
132
|
+
VERIFY_LOG=$(mktemp)
|
|
132
133
|
node --input-type=module -e '
|
|
133
134
|
import { readFileSync } from "node:fs";
|
|
134
135
|
import { networkInterfaces } from "node:os";
|
|
@@ -151,6 +152,7 @@ const token = config.gateway?.auth?.token || "";
|
|
|
151
152
|
const bind = config.gateway?.bind || "localhost";
|
|
152
153
|
const host = bind === "lan" ? getLanIp() : "127.0.0.1";
|
|
153
154
|
|
|
155
|
+
let ok = false;
|
|
154
156
|
async function verifyGateway() {
|
|
155
157
|
for (let i = 1; i <= 6; i++) {
|
|
156
158
|
await new Promise((r) => setTimeout(r, 1000));
|
|
@@ -170,6 +172,7 @@ async function verifyGateway() {
|
|
|
170
172
|
const data = JSON.parse(res.body);
|
|
171
173
|
if (data.ok) {
|
|
172
174
|
console.log(" Gateway verified OK (friday-next " + data.version + ", " + data.connections + " connections).");
|
|
175
|
+
ok = true;
|
|
173
176
|
return;
|
|
174
177
|
}
|
|
175
178
|
console.log(" ! Plugin responded but ok=false — " + JSON.stringify(data));
|
|
@@ -201,7 +204,14 @@ async function verifyGateway() {
|
|
|
201
204
|
console.log(" ! Gateway verification timed out — check '\''openclaw gateway status'\'' manually.");
|
|
202
205
|
}
|
|
203
206
|
await verifyGateway();
|
|
204
|
-
|
|
207
|
+
console.log(ok ? "VERIFY_OK" : "VERIFY_FAIL");
|
|
208
|
+
' "$OPENCLAW_CONFIG" 2>&1 | tee "$VERIFY_LOG"
|
|
209
|
+
if grep -q "VERIFY_OK" "$VERIFY_LOG"; then
|
|
210
|
+
VERIFY_PASS=1
|
|
211
|
+
else
|
|
212
|
+
VERIFY_PASS=0
|
|
213
|
+
fi
|
|
214
|
+
rm -f "$VERIFY_LOG"
|
|
205
215
|
|
|
206
216
|
# Show connection info
|
|
207
217
|
node --input-type=module -e '
|
|
@@ -275,5 +285,11 @@ if (classifyIp(host) === "tailscale") {
|
|
|
275
285
|
' "$OPENCLAW_CONFIG"
|
|
276
286
|
|
|
277
287
|
log "--------------------------------------------------"
|
|
278
|
-
|
|
288
|
+
if [ "$VERIFY_PASS" = "1" ]; then
|
|
289
|
+
log "Installation complete! Friday Next channel is now active."
|
|
290
|
+
else
|
|
291
|
+
warn "Installation complete, but gateway verification failed."
|
|
292
|
+
warn "Check 'openclaw gateway status' and restart the gateway if needed."
|
|
293
|
+
warn "Also ensure OpenClaw is updated to 2026.5.7 or above: openclaw update"
|
|
294
|
+
fi
|
|
279
295
|
log "--------------------------------------------------"
|