@boxes-dev/dvb 1.0.25 → 1.0.27
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/dvb.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="715ed7b2-d59f-5125-ada3-3f07ca10b2ed")}catch(e){}}();
|
|
4
4
|
|
|
5
5
|
var __create = Object.create;
|
|
6
6
|
var __defProp = Object.defineProperty;
|
|
@@ -88615,8 +88615,8 @@ var init_otel = __esm({
|
|
|
88615
88615
|
return trimmed && trimmed.length > 0 ? trimmed : void 0;
|
|
88616
88616
|
};
|
|
88617
88617
|
readBuildMetadata = () => {
|
|
88618
|
-
const rawPackageVersion = "1.0.
|
|
88619
|
-
const rawGitSha = "
|
|
88618
|
+
const rawPackageVersion = "1.0.27";
|
|
88619
|
+
const rawGitSha = "2821c00b17041bcfe2faee30dac86a5e71409763";
|
|
88620
88620
|
const packageVersion = typeof rawPackageVersion === "string" ? rawPackageVersion : void 0;
|
|
88621
88621
|
const gitSha = typeof rawGitSha === "string" ? rawGitSha : void 0;
|
|
88622
88622
|
return { packageVersion, gitSha };
|
|
@@ -120604,9 +120604,9 @@ var init_sentry = __esm({
|
|
|
120604
120604
|
sentryEnabled = false;
|
|
120605
120605
|
uncaughtExceptionMonitorInstalled = false;
|
|
120606
120606
|
readBuildMetadata2 = () => {
|
|
120607
|
-
const rawPackageVersion = "1.0.
|
|
120608
|
-
const rawGitSha = "
|
|
120609
|
-
const rawSentryRelease = "boxes-dev-dvb@1.0.
|
|
120607
|
+
const rawPackageVersion = "1.0.27";
|
|
120608
|
+
const rawGitSha = "2821c00b17041bcfe2faee30dac86a5e71409763";
|
|
120609
|
+
const rawSentryRelease = "boxes-dev-dvb@1.0.27+2821c00b17041bcfe2faee30dac86a5e71409763";
|
|
120610
120610
|
const packageVersion = typeof rawPackageVersion === "string" ? rawPackageVersion : void 0;
|
|
120611
120611
|
const gitSha = typeof rawGitSha === "string" ? rawGitSha : void 0;
|
|
120612
120612
|
const sentryRelease = typeof rawSentryRelease === "string" ? rawSentryRelease : void 0;
|
|
@@ -153295,7 +153295,7 @@ var init_qr = __esm({
|
|
|
153295
153295
|
});
|
|
153296
153296
|
|
|
153297
153297
|
// src/devbox/commands/setup.ts
|
|
153298
|
-
var import_node_crypto12, import_promises30,
|
|
153298
|
+
var import_node_crypto12, import_promises30, trim, normalizeSiteUrl, resolveSiteUrl, MOBILE_DOWNLOAD_LINK, parseSetupArgs, promptForValue2, splitQrLines, printMobileDownloadQr, listSprites2, runSetup;
|
|
153299
153299
|
var init_setup = __esm({
|
|
153300
153300
|
"src/devbox/commands/setup.ts"() {
|
|
153301
153301
|
"use strict";
|
|
@@ -153310,11 +153310,32 @@ var init_setup = __esm({
|
|
|
153310
153310
|
init_qr();
|
|
153311
153311
|
init_statusLine();
|
|
153312
153312
|
init_completions();
|
|
153313
|
-
|
|
153314
|
-
|
|
153315
|
-
|
|
153316
|
-
|
|
153317
|
-
|
|
153313
|
+
trim = (value) => value.trim().replace(/\r/g, "");
|
|
153314
|
+
normalizeSiteUrl = (raw) => {
|
|
153315
|
+
const trimmed = trim(raw);
|
|
153316
|
+
if (!trimmed) return null;
|
|
153317
|
+
const candidate = /^[a-z][a-z0-9+.-]*:\/\//i.test(trimmed) ? trimmed : `https://${trimmed}`;
|
|
153318
|
+
try {
|
|
153319
|
+
const url = new URL(candidate);
|
|
153320
|
+
if (url.protocol !== "https:" && url.protocol !== "http:") {
|
|
153321
|
+
return null;
|
|
153322
|
+
}
|
|
153323
|
+
return `${url.protocol}//${url.host}`;
|
|
153324
|
+
} catch {
|
|
153325
|
+
return null;
|
|
153326
|
+
}
|
|
153327
|
+
};
|
|
153328
|
+
resolveSiteUrl = () => {
|
|
153329
|
+
const runtimeSiteUrl = normalizeSiteUrl(process.env.SITE_URL ?? "");
|
|
153330
|
+
if (runtimeSiteUrl) return runtimeSiteUrl;
|
|
153331
|
+
const embeddedSiteUrl = false ? normalizeSiteUrl(void 0) : null;
|
|
153332
|
+
if (embeddedSiteUrl) return embeddedSiteUrl;
|
|
153333
|
+
return "https://boxes.dev";
|
|
153334
|
+
};
|
|
153335
|
+
MOBILE_DOWNLOAD_LINK = {
|
|
153336
|
+
label: "Mobile",
|
|
153337
|
+
url: new URL("/m", resolveSiteUrl()).toString()
|
|
153338
|
+
};
|
|
153318
153339
|
parseSetupArgs = (args) => {
|
|
153319
153340
|
const parsed = { verify: true };
|
|
153320
153341
|
for (let i2 = 0; i2 < args.length; i2 += 1) {
|
|
@@ -153364,33 +153385,15 @@ var init_setup = __esm({
|
|
|
153364
153385
|
rl.close();
|
|
153365
153386
|
return answer.trim();
|
|
153366
153387
|
};
|
|
153367
|
-
padColumn = (value, width) => value.padEnd(width, " ");
|
|
153368
153388
|
splitQrLines = (qr) => qr ? qr.trimEnd().split("\n") : [];
|
|
153369
|
-
|
|
153370
|
-
const
|
|
153371
|
-
const
|
|
153372
|
-
return `${colors.style(link.label, ["bold", "cyan"])}${padded.slice(link.label.length)}`;
|
|
153373
|
-
};
|
|
153374
|
-
printMobileDownloadQrs = () => {
|
|
153375
|
-
const [leftLink, rightLink] = MOBILE_DOWNLOAD_LINKS;
|
|
153376
|
-
const leftTitle = `${leftLink.label}: ${leftLink.url}`;
|
|
153377
|
-
const rightTitle = `${rightLink.label}: ${rightLink.url}`;
|
|
153378
|
-
const leftQrLines = splitQrLines(renderTerminalQr(leftLink.url));
|
|
153379
|
-
const rightQrLines = splitQrLines(renderTerminalQr(rightLink.url));
|
|
153380
|
-
const leftWidth = Math.max(
|
|
153381
|
-
leftTitle.length,
|
|
153382
|
-
...leftQrLines.map((line) => line.length)
|
|
153383
|
-
);
|
|
153384
|
-
const rowCount = Math.max(leftQrLines.length, rightQrLines.length);
|
|
153389
|
+
printMobileDownloadQr = () => {
|
|
153390
|
+
const link = MOBILE_DOWNLOAD_LINK;
|
|
153391
|
+
const qrLines = splitQrLines(renderTerminalQr(link.url));
|
|
153385
153392
|
console.log("");
|
|
153386
153393
|
console.log(colors.boldWhite("Install the boxes.dev mobile app:"));
|
|
153387
|
-
console.log(
|
|
153388
|
-
|
|
153389
|
-
|
|
153390
|
-
for (let i2 = 0; i2 < rowCount; i2 += 1) {
|
|
153391
|
-
const left = leftQrLines[i2] ?? "";
|
|
153392
|
-
const right = rightQrLines[i2] ?? "";
|
|
153393
|
-
console.log(`${padColumn(left, leftWidth)}${QR_COLUMN_GAP}${right}`);
|
|
153394
|
+
console.log(`${colors.style(link.label, ["bold", "cyan"])}: ${link.url}`);
|
|
153395
|
+
for (const line of qrLines) {
|
|
153396
|
+
console.log(line);
|
|
153394
153397
|
}
|
|
153395
153398
|
console.log("");
|
|
153396
153399
|
};
|
|
@@ -153499,7 +153502,7 @@ var init_setup = __esm({
|
|
|
153499
153502
|
console.log(`daemon: pid ${daemon.pid}`);
|
|
153500
153503
|
console.log(`socket: ${daemon.socketPath}`);
|
|
153501
153504
|
if (process.stdout.isTTY) {
|
|
153502
|
-
|
|
153505
|
+
printMobileDownloadQr();
|
|
153503
153506
|
}
|
|
153504
153507
|
await maybeOfferCompletionsInstall();
|
|
153505
153508
|
};
|
|
@@ -155108,4 +155111,4 @@ smol-toml/dist/index.js:
|
|
|
155108
155111
|
*/
|
|
155109
155112
|
//# sourceMappingURL=dvb.cjs.map
|
|
155110
155113
|
|
|
155111
|
-
//# debugId=
|
|
155114
|
+
//# debugId=715ed7b2-d59f-5125-ada3-3f07ca10b2ed
|