vibelet 0.1.28 → 0.1.30
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/vibelet.mjs +9 -5
- package/dist/index.cjs +43 -42
- package/package.json +19 -1
package/bin/vibelet.mjs
CHANGED
|
@@ -120,6 +120,7 @@ function fetchLatestVersionInBackground() {
|
|
|
120
120
|
const child = spawn(process.execPath, ['--input-type=module', '-e', script], {
|
|
121
121
|
detached: true,
|
|
122
122
|
stdio: 'ignore',
|
|
123
|
+
windowsHide: true,
|
|
123
124
|
});
|
|
124
125
|
child.unref();
|
|
125
126
|
}
|
|
@@ -598,8 +599,8 @@ function printHelp() {
|
|
|
598
599
|
process.stdout.write(`Usage:\n`);
|
|
599
600
|
process.stdout.write(` npx ${packageJson.name} Install/start the daemon and print a pairing QR code\n`);
|
|
600
601
|
process.stdout.write(` npx ${packageJson.name} start Same as above\n`);
|
|
601
|
-
process.stdout.write(` npx ${packageJson.name} --
|
|
602
|
-
process.stdout.write(` npx ${packageJson.name} --
|
|
602
|
+
process.stdout.write(` npx ${packageJson.name} --remote Auto-start a Cloudflare Tunnel for remote access\n`);
|
|
603
|
+
process.stdout.write(` npx ${packageJson.name} --remote --force Force a new tunnel (discard existing)\n`);
|
|
603
604
|
process.stdout.write(` npx ${packageJson.name} --relay <url> Use a custom tunnel URL for remote access\n`);
|
|
604
605
|
process.stdout.write(` npx ${packageJson.name} --host <ip> Set the primary host/IP address\n`);
|
|
605
606
|
process.stdout.write(` npx ${packageJson.name} --fallback-hosts <ips> Comma-separated fallback IPs\n`);
|
|
@@ -616,7 +617,7 @@ function printHelp() {
|
|
|
616
617
|
process.stdout.write(` vibelet\n\n`);
|
|
617
618
|
process.stdout.write(`Remote access:\n`);
|
|
618
619
|
process.stdout.write(` # Easiest — one command, powered by Cloudflare Tunnel (free, no account)\n`);
|
|
619
|
-
process.stdout.write(` npx ${packageJson.name} --
|
|
620
|
+
process.stdout.write(` npx ${packageJson.name} --remote\n\n`);
|
|
620
621
|
process.stdout.write(` # Or bring your own tunnel and pass the URL manually:\n`);
|
|
621
622
|
process.stdout.write(` npx cloudflared tunnel --protocol http2 --url http://localhost:${port}\n`);
|
|
622
623
|
process.stdout.write(` ngrok http ${port}\n`);
|
|
@@ -780,7 +781,7 @@ async function main() {
|
|
|
780
781
|
checkForUpdateFromCache();
|
|
781
782
|
fetchLatestVersionInBackground();
|
|
782
783
|
|
|
783
|
-
const tunnelFlag = consumeFlag('tunnel') || readNpmConfigFlag('tunnel');
|
|
784
|
+
const tunnelFlag = consumeFlag('remote') || consumeFlag('tunnel') || readNpmConfigFlag('remote') || readNpmConfigFlag('tunnel');
|
|
784
785
|
const forceFlag = consumeFlag('force') || readNpmConfigFlag('force');
|
|
785
786
|
const relayArg = parseRelayArg();
|
|
786
787
|
const hostArg = parseNamedArg('host', '100.x.x.x');
|
|
@@ -964,4 +965,7 @@ process.on('SIGINT', () => process.exit(0));
|
|
|
964
965
|
process.on('SIGTERM', () => process.exit(0));
|
|
965
966
|
process.on('exit', printOfficialSite);
|
|
966
967
|
await main();
|
|
967
|
-
process.exit(0)
|
|
968
|
+
// On Windows + Node 24, process.exit(0) can trigger a libuv assertion
|
|
969
|
+
// (UV_HANDLE_CLOSING) when detached child handles haven't fully released.
|
|
970
|
+
// Letting the event loop drain naturally avoids this.
|
|
971
|
+
if (process.platform !== 'win32') process.exit(0);
|