cli-tunnel 1.2.0-beta.12 → 1.2.0-beta.13
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/dist/index.js +15 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -736,6 +736,21 @@ async function main() {
|
|
|
736
736
|
// Keep process alive
|
|
737
737
|
await new Promise(() => { });
|
|
738
738
|
}
|
|
739
|
+
// Wait for user to scan QR / copy URL before starting the CLI tool
|
|
740
|
+
if (hasTunnel) {
|
|
741
|
+
console.log(` ${BOLD}Press any key to start ${command}...${RESET}`);
|
|
742
|
+
await new Promise((resolve) => {
|
|
743
|
+
if (process.stdin.isTTY)
|
|
744
|
+
process.stdin.setRawMode(true);
|
|
745
|
+
process.stdin.resume();
|
|
746
|
+
process.stdin.once('data', () => {
|
|
747
|
+
if (process.stdin.isTTY)
|
|
748
|
+
process.stdin.setRawMode(false);
|
|
749
|
+
process.stdin.pause();
|
|
750
|
+
resolve();
|
|
751
|
+
});
|
|
752
|
+
});
|
|
753
|
+
}
|
|
739
754
|
console.log(` ${DIM}Starting ${command}...${RESET}\n`);
|
|
740
755
|
// Spawn PTY
|
|
741
756
|
const nodePty = await import('node-pty');
|