airloom 0.1.0 → 0.1.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 +3 -8
- package/dist/viewer/assets/browser-Dl0EROMD.js +1 -0
- package/dist/viewer/assets/index-B-Rf55SG.js +20 -0
- package/dist/viewer/assets/index-BoCit9Kx.js +72 -0
- package/dist/viewer/assets/index-mDTBX0lq.css +1 -0
- package/dist/viewer/index.html +88 -0
- package/dist/viewer/sw.js +108 -0
- package/package.json +12 -3
package/dist/index.js
CHANGED
|
@@ -1363,20 +1363,15 @@ async function main() {
|
|
|
1363
1363
|
const lanIP = getLanIP();
|
|
1364
1364
|
const host = lanIP ?? "localhost";
|
|
1365
1365
|
const baseUrl = `http://${host}:${port}`;
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
const pairingBase64 = Buffer.from(pairingJSON).toString("base64url");
|
|
1369
|
-
qrContent = `${baseUrl}/viewer/#${pairingBase64}`;
|
|
1370
|
-
} else {
|
|
1371
|
-
qrContent = pairingJSON;
|
|
1372
|
-
}
|
|
1366
|
+
const pairingBase64 = Buffer.from(pairingJSON).toString("base64url");
|
|
1367
|
+
const qrContent = viewerDir ? `${baseUrl}/viewer/#${pairingBase64}` : `${baseUrl}/#${pairingBase64}`;
|
|
1373
1368
|
const qrDataUrl = await QRCode.toDataURL(qrContent, { width: 300, margin: 2 });
|
|
1374
1369
|
const qrTerminal = await QRCode.toString(qrContent, { type: "terminal", small: true });
|
|
1375
1370
|
state.pairingQR = qrDataUrl;
|
|
1376
1371
|
console.log("\nPairing QR Code:");
|
|
1377
1372
|
console.log(qrTerminal);
|
|
1378
1373
|
console.log(`Pairing Code: ${displayCode}`);
|
|
1379
|
-
if (
|
|
1374
|
+
if (lanIP) {
|
|
1380
1375
|
console.log(`Viewer URL: ${qrContent}`);
|
|
1381
1376
|
}
|
|
1382
1377
|
if (!useAbly) console.log(`Relay: ${RELAY_URL}`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as c}from"./index-BoCit9Kx.js";function f(t,i){for(var o=0;o<i.length;o++){const e=i[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(e,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var n,a;function b(){return a||(a=1,n=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}),n}var u=b();const w=c(u),p=f({__proto__:null,default:w},[u]);export{p as b};
|