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.
- package/dist/index.js +12 -8
- 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
|
-
|
|
505
|
-
|
|
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
|
|
508
|
-
//
|
|
509
|
-
|
|
510
|
-
|
|
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.
|
|
529
|
+
.version('0.5.2');
|
|
526
530
|
// ── checkpoint login ──
|
|
527
531
|
program
|
|
528
532
|
.command('login')
|