checkpoint-cli 0.4.0 → 0.4.1
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 -12
- package/dist/tracking-script-minimal.js +14 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -446,12 +446,12 @@ function loginWithBrowser() {
|
|
|
446
446
|
const program = new commander_1.Command();
|
|
447
447
|
program
|
|
448
448
|
.name('checkpoint')
|
|
449
|
-
.description('Share your localhost with reviewers — get visual feedback directly on the page')
|
|
450
|
-
.version('0.4.
|
|
449
|
+
.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.')
|
|
450
|
+
.version('0.4.1');
|
|
451
451
|
// ── checkpoint login ──
|
|
452
452
|
program
|
|
453
453
|
.command('login')
|
|
454
|
-
.description('
|
|
454
|
+
.description('Sign in to your Checkpoint account. Opens the browser for authentication.')
|
|
455
455
|
.action(async () => {
|
|
456
456
|
console.log('');
|
|
457
457
|
console.log(chalk_1.default.blue.bold(' ⟐ Checkpoint'));
|
|
@@ -497,7 +497,7 @@ program
|
|
|
497
497
|
// ── checkpoint logout ──
|
|
498
498
|
program
|
|
499
499
|
.command('logout')
|
|
500
|
-
.description('Sign out and
|
|
500
|
+
.description('Sign out and clear saved credentials from this machine.')
|
|
501
501
|
.action(() => {
|
|
502
502
|
console.log('');
|
|
503
503
|
console.log(chalk_1.default.blue.bold(' ⟐ Checkpoint'));
|
|
@@ -509,9 +509,9 @@ program
|
|
|
509
509
|
// ── checkpoint start ──
|
|
510
510
|
program
|
|
511
511
|
.command('start')
|
|
512
|
-
.description('
|
|
513
|
-
.requiredOption('-p, --port <port>', 'Local port
|
|
514
|
-
.option('-n, --name <name>', '
|
|
512
|
+
.description('Start tunneling a local port and get a shareable link for reviewers.\nIf a tunnel with the same name already exists, it reconnects to it —\nkeeping the same share URL and all previous comments intact.')
|
|
513
|
+
.requiredOption('-p, --port <port>', 'Local port your dev server is running on (e.g. 3000, 5173)', '3000')
|
|
514
|
+
.option('-n, --name <name>', 'Tunnel name. Reuse a name to resume the same share URL.')
|
|
515
515
|
.option('--provider <provider>', 'Tunnel provider: cloudflared (default) or ngrok')
|
|
516
516
|
.action(async (opts) => {
|
|
517
517
|
requireAuth();
|
|
@@ -611,10 +611,10 @@ program
|
|
|
611
611
|
// ── checkpoint share ──
|
|
612
612
|
program
|
|
613
613
|
.command('share')
|
|
614
|
-
.description('Register an existing tunnel URL with Checkpoint')
|
|
615
|
-
.requiredOption('-u, --url <url>', '
|
|
614
|
+
.description('Register an existing tunnel URL (e.g. from ngrok) with Checkpoint.\nUse this if you already have a tunnel running and just need a share link.')
|
|
615
|
+
.requiredOption('-u, --url <url>', 'The public tunnel URL to register (https://...)')
|
|
616
616
|
.option('-n, --name <name>', 'Name for this tunnel', 'My Tunnel')
|
|
617
|
-
.option('-p, --port <port>', 'Local port
|
|
617
|
+
.option('-p, --port <port>', 'Local port for reference', '3000')
|
|
618
618
|
.action(async (opts) => {
|
|
619
619
|
requireAuth();
|
|
620
620
|
console.log('');
|
|
@@ -673,7 +673,7 @@ program
|
|
|
673
673
|
// ── checkpoint status ──
|
|
674
674
|
program
|
|
675
675
|
.command('status')
|
|
676
|
-
.description('
|
|
676
|
+
.description('Show login status and which tunnel providers are installed.')
|
|
677
677
|
.action(async () => {
|
|
678
678
|
console.log('');
|
|
679
679
|
console.log(chalk_1.default.blue.bold(' ⟐ Checkpoint — Status'));
|
|
@@ -711,7 +711,7 @@ program
|
|
|
711
711
|
// ── checkpoint whoami ──
|
|
712
712
|
program
|
|
713
713
|
.command('whoami')
|
|
714
|
-
.description('
|
|
714
|
+
.description('Print the email of the currently logged-in user.')
|
|
715
715
|
.action(async () => {
|
|
716
716
|
const config = (0, config_js_1.loadConfig)();
|
|
717
717
|
if (!config) {
|
|
@@ -451,29 +451,19 @@ function buildMinimalTrackingScript() {
|
|
|
451
451
|
return { coordFallback:null, strategy:'none', matchedSelector:null, status:'none' };
|
|
452
452
|
}
|
|
453
453
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
var source='(no source)';
|
|
468
|
-
if(anchor){
|
|
469
|
-
var file=anchor.source_file?String(anchor.source_file).split(/[\\/]/).pop():'';
|
|
470
|
-
if(file&&typeof anchor.source_line==='number') source=file+':'+anchor.source_line;
|
|
471
|
-
else if(file) source=file;
|
|
472
|
-
else if(anchor.component_name) source=anchor.component_name;
|
|
473
|
-
if(anchor.explicit_id) source=source+' · #'+anchor.explicit_id;
|
|
474
|
-
}
|
|
475
|
-
return selector+'\n'+source;
|
|
476
|
-
}
|
|
454
|
+
function getInspectLabelText(target){
|
|
455
|
+
if(!target||!target.tagName) return '';
|
|
456
|
+
var tag=String(target.tagName).toLowerCase();
|
|
457
|
+
var id=target.id?('#'+target.id):'';
|
|
458
|
+
var cls='';
|
|
459
|
+
try{
|
|
460
|
+
var classes=(target.className&&typeof target.className==='string')
|
|
461
|
+
? target.className.trim().split(/\s+/).filter(Boolean).slice(0,3)
|
|
462
|
+
: [];
|
|
463
|
+
if(classes.length>0) cls='.'+classes.join('.');
|
|
464
|
+
}catch(e){}
|
|
465
|
+
return shortText(tag+id+cls);
|
|
466
|
+
}
|
|
477
467
|
|
|
478
468
|
function ensureInspectUi(){
|
|
479
469
|
if(!document.body) return;
|
|
@@ -505,7 +495,7 @@ inspectBox.style.border='2px solid #F26522';
|
|
|
505
495
|
inspectLabel.style.background='rgba(15,23,42,0.96)';
|
|
506
496
|
inspectLabel.style.color='#e2e8f0';
|
|
507
497
|
inspectLabel.style.font='12px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace';
|
|
508
|
-
inspectLabel.style.whiteSpace='
|
|
498
|
+
inspectLabel.style.whiteSpace='nowrap';
|
|
509
499
|
inspectLabel.style.wordBreak='break-word';
|
|
510
500
|
inspectLabel.style.pointerEvents='none';
|
|
511
501
|
inspectLabel.style.zIndex='2147483647';
|