fluxy-bot 0.5.60 → 0.5.61
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 +8 -20
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -139,6 +139,7 @@ function chooseTunnelMode() {
|
|
|
139
139
|
const options = [
|
|
140
140
|
{
|
|
141
141
|
label: 'Quick Tunnel',
|
|
142
|
+
mode: 'quick',
|
|
142
143
|
tag: 'FREE',
|
|
143
144
|
tagColor: c.green,
|
|
144
145
|
desc: [
|
|
@@ -148,6 +149,7 @@ function chooseTunnelMode() {
|
|
|
148
149
|
},
|
|
149
150
|
{
|
|
150
151
|
label: 'Named Tunnel',
|
|
152
|
+
mode: 'named',
|
|
151
153
|
tag: 'Advanced',
|
|
152
154
|
tagColor: c.yellow,
|
|
153
155
|
desc: [
|
|
@@ -155,15 +157,6 @@ function chooseTunnelMode() {
|
|
|
155
157
|
'Requires a CloudFlare account + domain',
|
|
156
158
|
],
|
|
157
159
|
},
|
|
158
|
-
{
|
|
159
|
-
label: 'Offline',
|
|
160
|
-
tag: 'Local only',
|
|
161
|
-
tagColor: c.dim,
|
|
162
|
-
desc: [
|
|
163
|
-
'No internet access — localhost only',
|
|
164
|
-
`Accessible at ${c.reset}${c.white}http://localhost:3000${c.reset}${c.dim}`,
|
|
165
|
-
],
|
|
166
|
-
},
|
|
167
160
|
];
|
|
168
161
|
|
|
169
162
|
let selected = 0;
|
|
@@ -217,8 +210,7 @@ function chooseTunnelMode() {
|
|
|
217
210
|
process.stdin.setRawMode(false);
|
|
218
211
|
process.stdin.pause();
|
|
219
212
|
process.stdin.removeListener('data', onKey);
|
|
220
|
-
|
|
221
|
-
resolve(modes[selected]);
|
|
213
|
+
resolve(options[selected].mode);
|
|
222
214
|
} else if (key === '\x03') { // Ctrl+C
|
|
223
215
|
process.stdout.write('\n');
|
|
224
216
|
process.exit(0);
|
|
@@ -646,13 +638,13 @@ async function init() {
|
|
|
646
638
|
|
|
647
639
|
const isLinux = os.platform() === 'linux';
|
|
648
640
|
const hasSystemd = isLinux && (() => { try { execSync('systemctl --version', { stdio: 'ignore' }); return true; } catch { return false; } })();
|
|
649
|
-
const hasTunnel = tunnelMode !== 'off';
|
|
650
641
|
|
|
651
642
|
const steps = [
|
|
652
643
|
'Creating config',
|
|
653
|
-
|
|
644
|
+
'Installing cloudflared',
|
|
654
645
|
'Starting server',
|
|
655
|
-
|
|
646
|
+
'Connecting tunnel',
|
|
647
|
+
'Verifying connection',
|
|
656
648
|
'Preparing dashboard',
|
|
657
649
|
...(hasSystemd ? ['Setting up auto-start daemon'] : []),
|
|
658
650
|
];
|
|
@@ -664,12 +656,10 @@ async function init() {
|
|
|
664
656
|
stepper.advance();
|
|
665
657
|
|
|
666
658
|
// Cloudflared (skip for named — already installed during setup)
|
|
667
|
-
if (
|
|
659
|
+
if (tunnelMode !== 'named') {
|
|
668
660
|
await installCloudflared();
|
|
669
|
-
stepper.advance();
|
|
670
|
-
} else if (hasTunnel) {
|
|
671
|
-
stepper.advance(); // named: already installed
|
|
672
661
|
}
|
|
662
|
+
stepper.advance();
|
|
673
663
|
|
|
674
664
|
// Server + Tunnel
|
|
675
665
|
stepper.advance();
|
|
@@ -677,7 +667,6 @@ async function init() {
|
|
|
677
667
|
try {
|
|
678
668
|
result = await bootServer({
|
|
679
669
|
onTunnelUp: (url) => {
|
|
680
|
-
if (!hasTunnel) return;
|
|
681
670
|
stepper.advance(); // Connecting tunnel done
|
|
682
671
|
// Show the direct URL while waiting for the custom domain to become reachable
|
|
683
672
|
if (config.relay?.url) {
|
|
@@ -688,7 +677,6 @@ async function init() {
|
|
|
688
677
|
}
|
|
689
678
|
},
|
|
690
679
|
onReady: () => {
|
|
691
|
-
if (!hasTunnel) return;
|
|
692
680
|
stepper.setInfo([]);
|
|
693
681
|
stepper.advance(); // Verifying connection done
|
|
694
682
|
},
|