fluxy-bot 0.5.61 → 0.5.62
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/bin/cli.js +47 -6
- package/package.json +1 -1
- package/workspace/.backend.log +1 -0
package/bin/cli.js
CHANGED
|
@@ -403,6 +403,28 @@ function banner() {
|
|
|
403
403
|
${c.dim}v${pkg.version} · Self-hosted AI agent${c.reset}`);
|
|
404
404
|
}
|
|
405
405
|
|
|
406
|
+
function tunnelFailedMessage(localUrl) {
|
|
407
|
+
console.log(`
|
|
408
|
+
${c.dim}─────────────────────────────────${c.reset}
|
|
409
|
+
|
|
410
|
+
${c.yellow}⚠${c.reset} ${c.bold}${c.white}Tunnel failed to connect${c.reset}
|
|
411
|
+
|
|
412
|
+
${c.dim}CloudFlare quick tunnels are rate-limited.${c.reset}
|
|
413
|
+
${c.dim}This usually resolves itself after a few minutes.${c.reset}
|
|
414
|
+
|
|
415
|
+
${c.bold}${c.white}Your dashboard is available locally:${c.reset}
|
|
416
|
+
|
|
417
|
+
${c.blue}${c.bold}${link(localUrl)}${c.reset}
|
|
418
|
+
${c.dim}(cmd+click or ctrl+click to open)${c.reset}
|
|
419
|
+
|
|
420
|
+
${c.bold}${c.white}To retry the tunnel:${c.reset}
|
|
421
|
+
${c.pink}fluxy start${c.reset}
|
|
422
|
+
|
|
423
|
+
${c.bold}${c.white}For a persistent tunnel, use a named tunnel:${c.reset}
|
|
424
|
+
${c.pink}fluxy tunnel setup${c.reset}
|
|
425
|
+
`);
|
|
426
|
+
}
|
|
427
|
+
|
|
406
428
|
function finalMessage(tunnelUrl, relayUrl) {
|
|
407
429
|
console.log(`
|
|
408
430
|
${c.dim}─────────────────────────────────${c.reset}
|
|
@@ -539,6 +561,7 @@ function bootServer({ onTunnelUp, onReady } = {}) {
|
|
|
539
561
|
let resolved = false;
|
|
540
562
|
let stderrBuf = '';
|
|
541
563
|
let tunnelFired = false;
|
|
564
|
+
let tunnelFailed = false;
|
|
542
565
|
|
|
543
566
|
// Vite warmup tracking
|
|
544
567
|
let viteWarmResolve;
|
|
@@ -554,6 +577,7 @@ function bootServer({ onTunnelUp, onReady } = {}) {
|
|
|
554
577
|
child,
|
|
555
578
|
tunnelUrl: tunnelUrl || `http://localhost:${config.port}`,
|
|
556
579
|
relayUrl: relayUrl || config.relay?.url || null,
|
|
580
|
+
tunnelFailed,
|
|
557
581
|
viteWarm,
|
|
558
582
|
});
|
|
559
583
|
};
|
|
@@ -580,6 +604,7 @@ function bootServer({ onTunnelUp, onReady } = {}) {
|
|
|
580
604
|
}
|
|
581
605
|
|
|
582
606
|
if (text.includes('__TUNNEL_FAILED__')) {
|
|
607
|
+
tunnelFailed = true;
|
|
583
608
|
doResolve();
|
|
584
609
|
}
|
|
585
610
|
};
|
|
@@ -687,7 +712,7 @@ async function init() {
|
|
|
687
712
|
console.error(` ${c.dim}${err.message}${c.reset}\n`);
|
|
688
713
|
process.exit(1);
|
|
689
714
|
}
|
|
690
|
-
const { child, tunnelUrl, relayUrl, viteWarm } = result;
|
|
715
|
+
const { child, tunnelUrl, relayUrl, tunnelFailed, viteWarm } = result;
|
|
691
716
|
|
|
692
717
|
// Wait for Vite to finish pre-transforming all modules (with timeout)
|
|
693
718
|
await Promise.race([viteWarm, new Promise(r => setTimeout(r, 30_000))]);
|
|
@@ -704,7 +729,11 @@ async function init() {
|
|
|
704
729
|
});
|
|
705
730
|
stepper.advance();
|
|
706
731
|
stepper.finish();
|
|
707
|
-
|
|
732
|
+
if (tunnelFailed) {
|
|
733
|
+
tunnelFailedMessage(tunnelUrl);
|
|
734
|
+
} else {
|
|
735
|
+
finalMessage(tunnelUrl, relayUrl);
|
|
736
|
+
}
|
|
708
737
|
if (res.status === 0) {
|
|
709
738
|
console.log(` ${c.blue}✔${c.reset} Daemon installed — Fluxy will auto-start on boot.`);
|
|
710
739
|
} else {
|
|
@@ -715,7 +744,11 @@ async function init() {
|
|
|
715
744
|
}
|
|
716
745
|
|
|
717
746
|
stepper.finish();
|
|
718
|
-
|
|
747
|
+
if (tunnelFailed) {
|
|
748
|
+
tunnelFailedMessage(tunnelUrl);
|
|
749
|
+
} else {
|
|
750
|
+
finalMessage(tunnelUrl, relayUrl);
|
|
751
|
+
}
|
|
719
752
|
|
|
720
753
|
child.stdout.on('data', (d) => {
|
|
721
754
|
process.stdout.write(` ${c.dim}${d.toString().trim()}${c.reset}\n`);
|
|
@@ -795,7 +828,7 @@ async function start() {
|
|
|
795
828
|
console.error(` ${c.dim}${err.message}${c.reset}\n`);
|
|
796
829
|
process.exit(1);
|
|
797
830
|
}
|
|
798
|
-
const { child, tunnelUrl, relayUrl, viteWarm } = result;
|
|
831
|
+
const { child, tunnelUrl, relayUrl, tunnelFailed, viteWarm } = result;
|
|
799
832
|
|
|
800
833
|
// Wait for Vite to finish pre-transforming all modules (with timeout)
|
|
801
834
|
await Promise.race([viteWarm, new Promise(r => setTimeout(r, 30_000))]);
|
|
@@ -812,7 +845,11 @@ async function start() {
|
|
|
812
845
|
});
|
|
813
846
|
stepper.advance();
|
|
814
847
|
stepper.finish();
|
|
815
|
-
|
|
848
|
+
if (tunnelFailed) {
|
|
849
|
+
tunnelFailedMessage(tunnelUrl);
|
|
850
|
+
} else {
|
|
851
|
+
finalMessage(tunnelUrl, relayUrl);
|
|
852
|
+
}
|
|
816
853
|
if (res.status === 0) {
|
|
817
854
|
console.log(` ${c.blue}✔${c.reset} Daemon installed — Fluxy will auto-start on boot.`);
|
|
818
855
|
} else {
|
|
@@ -823,7 +860,11 @@ async function start() {
|
|
|
823
860
|
}
|
|
824
861
|
|
|
825
862
|
stepper.finish();
|
|
826
|
-
|
|
863
|
+
if (tunnelFailed) {
|
|
864
|
+
tunnelFailedMessage(tunnelUrl);
|
|
865
|
+
} else {
|
|
866
|
+
finalMessage(tunnelUrl, relayUrl);
|
|
867
|
+
}
|
|
827
868
|
|
|
828
869
|
child.stdout.on('data', (d) => {
|
|
829
870
|
process.stdout.write(` ${c.dim}${d.toString().trim()}${c.reset}\n`);
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[backend] Listening on port 3004
|