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.
Files changed (2) hide show
  1. package/dist/index.js +15 -0
  2. 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');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cli-tunnel",
3
- "version": "1.2.0-beta.12",
3
+ "version": "1.2.0-beta.13",
4
4
  "description": "Tunnel any CLI app to your phone — PTY + devtunnel + xterm.js",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",