fied 0.2.9 → 0.2.11
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/bin.js +12 -2
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -428,7 +428,7 @@ var RelayBridge = class {
|
|
|
428
428
|
if (!this.silent) {
|
|
429
429
|
await printShareLinkWithQr("interactive", interactiveUrl);
|
|
430
430
|
if (this.showReadonlyLink) {
|
|
431
|
-
await printShareLinkWithQr("view-only", readonlyUrl);
|
|
431
|
+
await printShareLinkWithQr("view-only", readonlyUrl, false);
|
|
432
432
|
}
|
|
433
433
|
console.log("");
|
|
434
434
|
console.log(" \x1B[2mThe encryption key is in the URL fragment (#) \u2014 the server never sees it.\x1B[0m");
|
|
@@ -596,10 +596,13 @@ function parseResizePayload(payload) {
|
|
|
596
596
|
if (rows < RESIZE_MIN_ROWS || rows > RESIZE_MAX_ROWS) return null;
|
|
597
597
|
return { cols, rows };
|
|
598
598
|
}
|
|
599
|
-
async function printShareLinkWithQr(label, url) {
|
|
599
|
+
async function printShareLinkWithQr(label, url, includeQr = true) {
|
|
600
600
|
console.log(` \x1B[1mShare (${label}):\x1B[0m`);
|
|
601
601
|
console.log(` \x1B[4m\x1B[36m${url}\x1B[0m`);
|
|
602
602
|
console.log("");
|
|
603
|
+
if (!includeQr) {
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
603
606
|
try {
|
|
604
607
|
const qr = await QRCode.toString(url, {
|
|
605
608
|
type: "terminal",
|
|
@@ -808,6 +811,13 @@ async function main() {
|
|
|
808
811
|
allowInsecureRelay,
|
|
809
812
|
showReadonlyLink,
|
|
810
813
|
onShareUrl: async (url) => {
|
|
814
|
+
const startNow = await confirm("Start sharing this session now?", true);
|
|
815
|
+
if (!startNow) {
|
|
816
|
+
console.error("");
|
|
817
|
+
console.error(" Share cancelled.");
|
|
818
|
+
console.error("");
|
|
819
|
+
process.exit(0);
|
|
820
|
+
}
|
|
811
821
|
const background = await confirm("Run in background?");
|
|
812
822
|
if (!background) {
|
|
813
823
|
return;
|