@vibelet/cli 1.2.121 → 1.2.125
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/runtime-version.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var c=require("node:fs"),n=require("node:path"),p="@vibelet/cli";function i(r){try{let e=JSON.parse((0,c.readFileSync)(r,"utf8"));if(e.name===p&&typeof e.version=="string"&&e.version.length>0)return e.version}catch{}return null}function l(){return"1.2.
|
|
1
|
+
var c=require("node:fs"),n=require("node:path"),p="@vibelet/cli";function i(r){try{let e=JSON.parse((0,c.readFileSync)(r,"utf8"));if(e.name===p&&typeof e.version=="string"&&e.version.length>0)return e.version}catch{}return null}function l(){return"1.2.125"}var a=l();process.stdout.write(`${a}
|
|
2
2
|
`);
|
package/dist/vibelet.mjs
CHANGED
|
@@ -13111,11 +13111,12 @@ function describeLaunchctlResult(result) {
|
|
|
13111
13111
|
/* harmony export */ Gv: () => (/* binding */ buildWebUiUrl),
|
|
13112
13112
|
/* harmony export */ N7: () => (/* binding */ buildPairingDeepLink),
|
|
13113
13113
|
/* harmony export */ No: () => (/* binding */ normalizePairingConnections),
|
|
13114
|
+
/* harmony export */ SF: () => (/* binding */ selectWebUiConnectionTarget),
|
|
13114
13115
|
/* harmony export */ YP: () => (/* binding */ createCompactPairingPayload),
|
|
13115
13116
|
/* harmony export */ dE: () => (/* binding */ findUnsafeCleartextHosts),
|
|
13116
13117
|
/* harmony export */ uR: () => (/* binding */ formatConnectionSummary)
|
|
13117
13118
|
/* harmony export */ });
|
|
13118
|
-
/* unused harmony exports normalizeHostValue, isIpv4Host, isTailscaleHost, isSharedIpv4Host, isLocalNetworkHost, isLoopbackHost, isPlainLocalHostname, isTrustedCleartextHost, parseCommaSeparatedHosts, isQuickTunnelHost, buildLegacyConnection, formatConnectionSourceLabel, buildConnectionHttpUrl, encodePairingPayloadForUrlFragment */
|
|
13119
|
+
/* unused harmony exports normalizeHostValue, isIpv4Host, isTailscaleHost, isSharedIpv4Host, isLocalNetworkHost, isLoopbackHost, isPlainLocalHostname, isTrustedCleartextHost, parseCommaSeparatedHosts, isQuickTunnelHost, buildLegacyConnection, formatConnectionSourceLabel, buildConnectionHttpUrl, isPreferredWebUiHost, encodePairingPayloadForUrlFragment */
|
|
13119
13120
|
function normalizeHostValue(host) {
|
|
13120
13121
|
if (typeof host !== 'string') {
|
|
13121
13122
|
return '';
|
|
@@ -13344,6 +13345,27 @@ function buildConnectionHttpUrl(target) {
|
|
|
13344
13345
|
return `${scheme}://${formatUrlHost(target.host)}${portSuffix}`;
|
|
13345
13346
|
}
|
|
13346
13347
|
|
|
13348
|
+
function isMdnsLocalHost(host) {
|
|
13349
|
+
return normalizeHostValue(host).endsWith('.local');
|
|
13350
|
+
}
|
|
13351
|
+
|
|
13352
|
+
function isPreferredWebUiHost(host) {
|
|
13353
|
+
const normalized = normalizeHostValue(host);
|
|
13354
|
+
return (
|
|
13355
|
+
Boolean(normalized) &&
|
|
13356
|
+
!isLoopbackHost(normalized) &&
|
|
13357
|
+
!isMdnsLocalHost(normalized) &&
|
|
13358
|
+
!isPlainLocalHostname(normalized)
|
|
13359
|
+
);
|
|
13360
|
+
}
|
|
13361
|
+
|
|
13362
|
+
function selectWebUiConnectionTarget(connections) {
|
|
13363
|
+
if (!Array.isArray(connections) || connections.length === 0) {
|
|
13364
|
+
return undefined;
|
|
13365
|
+
}
|
|
13366
|
+
return connections.find((target) => target && isPreferredWebUiHost(target.host)) ?? connections[0];
|
|
13367
|
+
}
|
|
13368
|
+
|
|
13347
13369
|
function encodePairingPayloadForUrlFragment(pairingPayload) {
|
|
13348
13370
|
return Buffer.from(JSON.stringify(pairingPayload), 'utf8').toString('base64url');
|
|
13349
13371
|
}
|
|
@@ -14454,6 +14476,7 @@ async function printPairingSummary(existingHealth = null) {
|
|
|
14454
14476
|
const pairingPayload = await postJson('/pair/open');
|
|
14455
14477
|
const connections = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_13__/* .normalizePairingConnections */ .No)(pairingPayload);
|
|
14456
14478
|
const [preferredConnection, ...otherConnections] = connections;
|
|
14479
|
+
const webUiConnection = (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_13__/* .selectWebUiConnectionTarget */ .SF)(connections);
|
|
14457
14480
|
|
|
14458
14481
|
process.stdout.write(`Vibelet daemon is ready.\n\n`);
|
|
14459
14482
|
process.stdout.write(`Device: ${health.displayName}\n`);
|
|
@@ -14469,10 +14492,8 @@ async function printPairingSummary(existingHealth = null) {
|
|
|
14469
14492
|
process.stdout.write(` - ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_13__/* .formatConnectionSummary */ .uR)(target)}\n`);
|
|
14470
14493
|
});
|
|
14471
14494
|
}
|
|
14472
|
-
if (
|
|
14473
|
-
process.stdout.write(
|
|
14474
|
-
`Web UI: ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_13__/* .buildWebUiUrl */ .Gv)(preferredConnection, (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_13__/* .createCompactPairingPayload */ .YP)(pairingPayload))}\n`,
|
|
14475
|
-
);
|
|
14495
|
+
if (webUiConnection) {
|
|
14496
|
+
process.stdout.write(`Web UI: ${(0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_13__/* .buildWebUiUrl */ .Gv)(webUiConnection, (0,_vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_13__/* .createCompactPairingPayload */ .YP)(pairingPayload))}\n`);
|
|
14476
14497
|
}
|
|
14477
14498
|
process.stdout.write(`Paired devices: ${health.pairedDevices}\n`);
|
|
14478
14499
|
await printPairingQr(pairingPayload);
|