checkpoint-cli 0.5.2 → 1.0.0
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 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -372,6 +372,12 @@ async function registerTunnel(sb, opts) {
|
|
|
372
372
|
console.log(chalk_1.default.yellow(` ⚠ Could not register: ${error?.message ?? 'unknown'}`));
|
|
373
373
|
return null;
|
|
374
374
|
}
|
|
375
|
+
await sb.from('tunnel_members').insert({
|
|
376
|
+
tunnel_id: data.id,
|
|
377
|
+
user_id: userId,
|
|
378
|
+
role: 'owner',
|
|
379
|
+
status: 'active',
|
|
380
|
+
});
|
|
375
381
|
return { shareUrl: `${APP_URL}/share/${shareId}`, tunnelId: data.id };
|
|
376
382
|
}
|
|
377
383
|
async function deactivateTunnel(sb, tunnelId) {
|
|
@@ -760,6 +766,12 @@ program
|
|
|
760
766
|
console.log(chalk_1.default.red(` Failed: ${error?.message ?? 'unknown error'}`));
|
|
761
767
|
process.exit(1);
|
|
762
768
|
}
|
|
769
|
+
await sb.from('tunnel_members').insert({
|
|
770
|
+
tunnel_id: data.id,
|
|
771
|
+
user_id: userData.user.id,
|
|
772
|
+
role: 'owner',
|
|
773
|
+
status: 'active',
|
|
774
|
+
});
|
|
763
775
|
const shareUrl = `${APP_URL}/share/${shareId}`;
|
|
764
776
|
console.log(chalk_1.default.green(' ✓ Registered'));
|
|
765
777
|
console.log(` ${chalk_1.default.gray('Tunnel URL:')} ${chalk_1.default.cyan(opts.url)}`);
|