checkpoint-cli 0.5.1 → 0.5.2

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 +12 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -501,14 +501,18 @@ function loginWithBrowser() {
501
501
  const loginUrl = `${APP_URL}/cli/auth?callback=${encodeURIComponent(callbackUrl)}`;
502
502
  console.log(` ${chalk_1.default.cyan(loginUrl)}`);
503
503
  console.log('');
504
- const rl = readline_1.default.createInterface({ input: process.stdin, output: process.stdout });
505
- rl.question(chalk_1.default.gray(' Press ENTER to open the browser...'), () => {
504
+ process.stdout.write(chalk_1.default.gray(' Press ENTER to open the browser...'));
505
+ process.stdin.setRawMode?.(false);
506
+ process.stdin.resume();
507
+ process.stdin.setEncoding('utf8');
508
+ const onKey = () => {
509
+ process.stdin.removeListener('data', onKey);
510
+ process.stdout.write('\n');
506
511
  openBrowser(loginUrl);
507
- // Keep stdin open so the HTTP server stays alive to receive the callback.
508
- // Pause instead of closing so the event loop doesn't drain.
509
- rl.close();
510
- process.stdin.resume();
511
- });
512
+ // Keep stdin resumed so the HTTP server's event loop stays alive
513
+ // until the browser callback arrives.
514
+ };
515
+ process.stdin.on('data', onKey);
512
516
  });
513
517
  // Timeout after 10 minutes
514
518
  setTimeout(() => {
@@ -522,7 +526,7 @@ const program = new commander_1.Command();
522
526
  program
523
527
  .name('checkpoint')
524
528
  .description('Share your localhost with reviewers — get visual feedback directly on the page.\n\nQuick start:\n 1. checkpoint login Sign in to your Checkpoint account\n 2. checkpoint start -p 3000 Start tunneling and get a share link\n\nReuse a tunnel name to keep the same share URL and preserve all comments.')
525
- .version('0.5.1');
529
+ .version('0.5.2');
526
530
  // ── checkpoint login ──
527
531
  program
528
532
  .command('login')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "checkpoint-cli",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Share your localhost with reviewers — get visual feedback directly on the page",
5
5
  "keywords": [
6
6
  "checkpoint",