peachsim 0.1.730 → 0.1.746
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/cli/bridge-flow-runner.ts +15 -2
- package/cli/commands/control.ts +13 -3
- package/cli/commands/desktop.ts +1 -0
- package/cli/commands/electron.ts +12 -8
- package/cli/commands/flow.ts +1 -3
- package/cli/commands/install-desktop.ts +105 -66
- package/cli/commands/logout.ts +5 -1
- package/cli/commands/no-bridge-hint.ts +2 -2
- package/cli/commands/swift.ts +26 -9
- package/cli/desktop-companion.ts +36 -9
- package/cli/drivers/desktop.ts +65 -0
- package/cli/drivers/electron.ts +4 -66
- package/cli/drivers/index.ts +1 -0
- package/cli/drivers/playwright-sim-host.ts +2 -0
- package/cli/drivers/playwright.ts +3 -3
- package/cli/drivers/registry.ts +7 -2
- package/cli/drivers/types.ts +4 -3
- package/cli/maestro-js.ts +10 -0
- package/cli/outbound-endpoints.ts +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +39 -9
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/capture-contract.cjs +13 -19
- package/dist-lib/capture-contract.mjs +13 -19
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +117 -11
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +32 -1
- package/dist-lib/host/bridge-host.cjs +1741 -540
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +17 -22
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +2 -1
- package/dist-lib/sdk.mjs +2 -1
- package/dist-lib/skills.cjs +2431 -1075
- package/dist-lib/swift-compile.cjs +374 -65
- package/dist-lib/swift-compile.mjs +369 -66
- package/dist-lib/swift-package.cjs +146 -9
- package/dist-lib/swift-package.mjs +144 -9
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +1690 -233
- package/dist-lib/vite.cjs +4 -4
- package/package.json +1 -1
- package/skills/contrast/SKILL.md +1 -1
- package/src/auth/shared-session.ts +45 -9
- package/src/bridge-constants.ts +7 -7
- package/src/capture-contract.ts +18 -33
- package/src/desktop-host-delivery.ts +81 -0
- package/src/home-paths.ts +30 -0
- package/src/host/bridge-host.ts +11 -6
- package/src/native-seam-manifest.ts +0 -11
- package/src/sim-client.ts +1 -0
- package/src/swift-compile.ts +479 -76
- package/src/swift-distribution.lock.json +11 -11
- package/src/swift-host.ts +338 -45
- package/src/swift-package.ts +204 -19
- package/src/swift-remote-packages.ts +255 -0
- package/src/swift-submit.ts +4 -1
- package/src/vite-plugin-one.ts +2 -2
- package/src/vite-plugin.ts +29 -9
- package/src/xcode-project.ts +612 -0
package/dist-lib/detox/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.746 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -840,6 +840,7 @@ function readBrowserCompositeCaptureRequest(value) {
|
|
|
840
840
|
var WEBVIEW_INSTANCE_ATTRIBUTE = "data-peach-webview";
|
|
841
841
|
var WEBVIEW_HOST_BINDING = "__peachWebViewHost";
|
|
842
842
|
var WEBVIEW_SCHEME_NAVIGATION_EVENT = "peach:webview-scheme-navigation";
|
|
843
|
+
var WEBVIEW_NETWORK_NAVIGATION_EVENT = "peach:webview-network-navigation";
|
|
843
844
|
var WEBVIEW_FRAME_NAME_PREFIX = "peach-webview:";
|
|
844
845
|
function readWebViewHostRequest(value) {
|
|
845
846
|
if (!value || typeof value !== "object") return null;
|
|
@@ -851,6 +852,11 @@ function readWebViewHostRequest(value) {
|
|
|
851
852
|
const instanceId = text("instanceId");
|
|
852
853
|
if (instanceId === null) return null;
|
|
853
854
|
const kind = field("kind");
|
|
855
|
+
if (kind === "navigationDecision") {
|
|
856
|
+
const requestId = field("requestId");
|
|
857
|
+
const allow = field("allow");
|
|
858
|
+
return typeof requestId === "number" && typeof allow === "boolean" ? { kind, instanceId, requestId, allow } : null;
|
|
859
|
+
}
|
|
854
860
|
if (kind === "detach") return { kind, instanceId };
|
|
855
861
|
if (kind === "evaluate") {
|
|
856
862
|
const js = text("js");
|
|
@@ -1014,6 +1020,7 @@ function webViewAutomationNames(timingName, bootstrapSource) {
|
|
|
1014
1020
|
hostBinding: WEBVIEW_HOST_BINDING,
|
|
1015
1021
|
instanceAttribute: WEBVIEW_INSTANCE_ATTRIBUTE,
|
|
1016
1022
|
schemeNavigationEvent: WEBVIEW_SCHEME_NAVIGATION_EVENT,
|
|
1023
|
+
networkNavigationEvent: WEBVIEW_NETWORK_NAVIGATION_EVENT,
|
|
1017
1024
|
configTimingName: timingName,
|
|
1018
1025
|
bootstrapSource: `(${bootstrapSource})(${JSON.stringify(timingName)});`
|
|
1019
1026
|
};
|
|
@@ -1023,6 +1030,7 @@ async function automateWebViewFrames(context, names, helpers) {
|
|
|
1023
1030
|
const browser = context.browser();
|
|
1024
1031
|
if (!browser) throw new Error("webview automation needs the browser behind its context");
|
|
1025
1032
|
const browserSession = await browser.newBrowserCDPSession();
|
|
1033
|
+
let nextNetworkDecision = 0;
|
|
1026
1034
|
const byFrameId = /* @__PURE__ */ new Map();
|
|
1027
1035
|
const byInstance = /* @__PURE__ */ new Map();
|
|
1028
1036
|
const beforeKeys = /* @__PURE__ */ new Set();
|
|
@@ -1179,6 +1187,28 @@ async function automateWebViewFrames(context, names, helpers) {
|
|
|
1179
1187
|
});
|
|
1180
1188
|
}).catch(() => browserSession.send("Fetch.continueRequest", { requestId })).catch(() => {
|
|
1181
1189
|
});
|
|
1190
|
+
const decideNavigation = async (bound, detail) => {
|
|
1191
|
+
if (!bound.navigation) return true;
|
|
1192
|
+
const requestId = ++nextNetworkDecision;
|
|
1193
|
+
const answer = new Promise(
|
|
1194
|
+
(resolve2) => bound.decisions.set(requestId, resolve2)
|
|
1195
|
+
);
|
|
1196
|
+
await bound.page.evaluate(
|
|
1197
|
+
([eventName, detail2]) => {
|
|
1198
|
+
window.dispatchEvent(new CustomEvent(eventName, { detail: detail2 }));
|
|
1199
|
+
},
|
|
1200
|
+
[
|
|
1201
|
+
names.networkNavigationEvent,
|
|
1202
|
+
{
|
|
1203
|
+
...detail,
|
|
1204
|
+
instanceId: bound.instanceId,
|
|
1205
|
+
navigation: bound.navigation.id,
|
|
1206
|
+
requestId
|
|
1207
|
+
}
|
|
1208
|
+
]
|
|
1209
|
+
);
|
|
1210
|
+
return answer;
|
|
1211
|
+
};
|
|
1182
1212
|
await browserSession.send("Fetch.enable", {
|
|
1183
1213
|
patterns: [{ urlPattern: "*", resourceType: "Document", requestStage: "Request" }]
|
|
1184
1214
|
});
|
|
@@ -1231,6 +1261,12 @@ async function automateWebViewFrames(context, names, helpers) {
|
|
|
1231
1261
|
const status = event.responseStatusCode;
|
|
1232
1262
|
const received = event.responseHeaders ?? [];
|
|
1233
1263
|
if (status >= 300 && status < 400) {
|
|
1264
|
+
const continueRedirect = () => settle("Fetch.fulfillRequest", {
|
|
1265
|
+
responseCode: status,
|
|
1266
|
+
responsePhrase: event.responseStatusText || void 0,
|
|
1267
|
+
responseHeaders: helpers.withFrameEmbedderHeaders(helpers.withoutFramingRefusals(received)).filter((header) => !/^content-(encoding|length)$/i.test(header.name)),
|
|
1268
|
+
body: ""
|
|
1269
|
+
});
|
|
1234
1270
|
const location = received.find((header) => header.name.toLowerCase() === "location");
|
|
1235
1271
|
if (location) {
|
|
1236
1272
|
let target = "";
|
|
@@ -1241,16 +1277,47 @@ async function automateWebViewFrames(context, names, helpers) {
|
|
|
1241
1277
|
if (helpers.isAppScheme(target))
|
|
1242
1278
|
reportSchemeNavigation(bound.page, bound.instanceId, target);
|
|
1243
1279
|
}
|
|
1244
|
-
|
|
1280
|
+
if (bound.navigation && location) {
|
|
1281
|
+
const target = new URL(location.value, event.request.url).href;
|
|
1282
|
+
void decideNavigation(bound, {
|
|
1283
|
+
phase: "redirect",
|
|
1284
|
+
url: target,
|
|
1285
|
+
status,
|
|
1286
|
+
mime: ""
|
|
1287
|
+
}).then(
|
|
1288
|
+
(allow) => allow ? continueRedirect() : settle("Fetch.failRequest", { errorReason: "Aborted" })
|
|
1289
|
+
);
|
|
1290
|
+
} else void continueRedirect();
|
|
1245
1291
|
return;
|
|
1246
1292
|
}
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
{
|
|
1250
|
-
|
|
1251
|
-
|
|
1293
|
+
const finishResponse = async () => {
|
|
1294
|
+
const mime = received.find((header) => header.name.toLowerCase() === "content-type")?.value.split(";")[0].trim() ?? "";
|
|
1295
|
+
if (bound.navigation && bound.navigation.type !== 2) {
|
|
1296
|
+
const allow = await decideNavigation(bound, {
|
|
1297
|
+
phase: "response",
|
|
1298
|
+
url: event.request.url,
|
|
1299
|
+
status,
|
|
1300
|
+
mime
|
|
1301
|
+
});
|
|
1302
|
+
if (!allow) {
|
|
1303
|
+
await settle("Fetch.failRequest", { errorReason: "Aborted" });
|
|
1304
|
+
return;
|
|
1305
|
+
}
|
|
1252
1306
|
}
|
|
1253
|
-
|
|
1307
|
+
if (bound.navigation) {
|
|
1308
|
+
const config = JSON.parse(bound.config);
|
|
1309
|
+
config.documentUrl = event.request.url;
|
|
1310
|
+
bound.config = JSON.stringify(config);
|
|
1311
|
+
}
|
|
1312
|
+
await fulfill(requestId, event, [
|
|
1313
|
+
...helpers.withFrameEmbedderHeaders(helpers.withoutFramingRefusals(received)),
|
|
1314
|
+
{
|
|
1315
|
+
name: "Server-Timing",
|
|
1316
|
+
value: `${names.configTimingName};desc="${encodeURIComponent(bound.config)}"`
|
|
1317
|
+
}
|
|
1318
|
+
]);
|
|
1319
|
+
};
|
|
1320
|
+
void finishResponse();
|
|
1254
1321
|
});
|
|
1255
1322
|
const evaluateIn = async (bound, scripts) => {
|
|
1256
1323
|
let frame = null;
|
|
@@ -1300,9 +1367,18 @@ async function automateWebViewFrames(context, names, helpers) {
|
|
|
1300
1367
|
}
|
|
1301
1368
|
const request = helpers.readRequest(value);
|
|
1302
1369
|
if (!request) return;
|
|
1370
|
+
if (request.kind === "navigationDecision") {
|
|
1371
|
+
const bound2 = byInstance.get(request.instanceId);
|
|
1372
|
+
const decide = bound2?.decisions.get(request.requestId);
|
|
1373
|
+
bound2?.decisions.delete(request.requestId);
|
|
1374
|
+
decide?.(request.allow);
|
|
1375
|
+
return;
|
|
1376
|
+
}
|
|
1303
1377
|
if (request.kind === "detach") {
|
|
1304
1378
|
const bound2 = byInstance.get(request.instanceId);
|
|
1305
1379
|
if (bound2) {
|
|
1380
|
+
for (const decide of bound2.decisions.values()) decide(false);
|
|
1381
|
+
bound2.decisions.clear();
|
|
1306
1382
|
byFrameId.delete(bound2.frameId);
|
|
1307
1383
|
await bound2.frameSession?.detach().catch(() => {
|
|
1308
1384
|
});
|
|
@@ -1334,11 +1410,15 @@ async function automateWebViewFrames(context, names, helpers) {
|
|
|
1334
1410
|
const frameId = described.node?.frameId;
|
|
1335
1411
|
if (!frameId) return;
|
|
1336
1412
|
const previous = byInstance.get(request.instanceId);
|
|
1413
|
+
if (previous?.frameId === frameId && previous.config === request.config) return;
|
|
1337
1414
|
if (previous) {
|
|
1415
|
+
for (const decide of previous.decisions.values()) decide(false);
|
|
1416
|
+
previous.decisions.clear();
|
|
1338
1417
|
byFrameId.delete(previous.frameId);
|
|
1339
1418
|
await previous.frameSession?.detach().catch(() => {
|
|
1340
1419
|
});
|
|
1341
1420
|
}
|
|
1421
|
+
const config = JSON.parse(request.config);
|
|
1342
1422
|
const bound = {
|
|
1343
1423
|
instanceId: request.instanceId,
|
|
1344
1424
|
page: source.page,
|
|
@@ -1346,6 +1426,8 @@ async function automateWebViewFrames(context, names, helpers) {
|
|
|
1346
1426
|
config: request.config,
|
|
1347
1427
|
afterContent: request.afterContent,
|
|
1348
1428
|
incognito: request.incognito,
|
|
1429
|
+
navigation: config.webKit ? { id: config.webKit.navigation, type: config.webKit.navigationType } : null,
|
|
1430
|
+
decisions: /* @__PURE__ */ new Map(),
|
|
1349
1431
|
load: { url: request.url, headers: request.headers },
|
|
1350
1432
|
evaluations: Promise.resolve(),
|
|
1351
1433
|
frameSession: null
|
|
@@ -1398,12 +1480,18 @@ var WEBVIEW_FRAME_BRIDGE_SOURCE = `function (config) {
|
|
|
1398
1480
|
seen.pop();
|
|
1399
1481
|
return converted;
|
|
1400
1482
|
}
|
|
1483
|
+
var scriptReplies = new Map();
|
|
1484
|
+
var nextScriptReply = 0;
|
|
1401
1485
|
function setMessageHandlers(names) {
|
|
1402
1486
|
Object.keys(window.webkit.messageHandlers).forEach(function(name) { if (names.indexOf(name) === -1) delete window.webkit.messageHandlers[name]; });
|
|
1403
1487
|
names.forEach(function(name) {
|
|
1404
1488
|
if (Object.hasOwn(window.webkit.messageHandlers, name)) return;
|
|
1405
1489
|
window.webkit.messageHandlers[name] = { postMessage: function(body) {
|
|
1406
|
-
|
|
1490
|
+
var value = nativeValue(body, []);
|
|
1491
|
+
var requestId = ++nextScriptReply;
|
|
1492
|
+
var promise = new Promise(function(resolve, reject) { scriptReplies.set(requestId, { resolve: resolve, reject: reject }); });
|
|
1493
|
+
window.parent.postMessage({ __sootsimWebViewKind: 'webKitMessage', requestId: requestId, name: name, body: value }, '*');
|
|
1494
|
+
return promise;
|
|
1407
1495
|
} };
|
|
1408
1496
|
});
|
|
1409
1497
|
}
|
|
@@ -1411,9 +1499,15 @@ var WEBVIEW_FRAME_BRIDGE_SOURCE = `function (config) {
|
|
|
1411
1499
|
var systemFont = document.createElement('style');
|
|
1412
1500
|
// srcdoc's base belongs to the app page; the system font belongs to the host.
|
|
1413
1501
|
systemFont.textContent = config.systemFontStyle;
|
|
1414
|
-
|
|
1502
|
+
var fontHeadObserver = new MutationObserver(function() {
|
|
1503
|
+
if (!document.head) return;
|
|
1504
|
+
document.head.appendChild(systemFont);
|
|
1505
|
+
fontHeadObserver.disconnect();
|
|
1506
|
+
});
|
|
1507
|
+
fontHeadObserver.observe(document, { childList: true, subtree: true });
|
|
1508
|
+
if (document.head) { document.head.appendChild(systemFont); fontHeadObserver.disconnect(); }
|
|
1415
1509
|
Object.defineProperty(window, 'devicePixelRatio', { configurable: true, get: function() { return config.deviceScale; } });
|
|
1416
|
-
window.parent.postMessage({ __sootsimWebViewKind: 'webKitCommit' }, '*');
|
|
1510
|
+
window.parent.postMessage({ __sootsimWebViewKind: 'webKitCommit', url: config.documentUrl }, '*');
|
|
1417
1511
|
window.webkit = window.webkit || {};
|
|
1418
1512
|
window.webkit.messageHandlers = Object.create(null);
|
|
1419
1513
|
setMessageHandlers(webKit.messageHandlers);
|
|
@@ -1865,6 +1959,18 @@ var WEBVIEW_FRAME_BRIDGE_SOURCE = `function (config) {
|
|
|
1865
1959
|
if (event.source !== window.parent) return;
|
|
1866
1960
|
var payload = event.data;
|
|
1867
1961
|
if (!payload || typeof payload !== 'object') return;
|
|
1962
|
+
if (payload.__sootsimWebViewKind === 'webKitScriptReply') {
|
|
1963
|
+
event.stopImmediatePropagation();
|
|
1964
|
+
var pending = scriptReplies.get(payload.requestId);
|
|
1965
|
+
if (!pending) return;
|
|
1966
|
+
scriptReplies.delete(payload.requestId);
|
|
1967
|
+
var reply = payload.reply;
|
|
1968
|
+
if (typeof reply.error === 'string') pending.reject(new Error(reply.error));
|
|
1969
|
+
else if (typeof reply.json === 'string') pending.resolve(JSON.parse(reply.json));
|
|
1970
|
+
else if (reply.undefined === true) pending.resolve(undefined);
|
|
1971
|
+
else throw new Error('WKWebView script reply is invalid');
|
|
1972
|
+
return;
|
|
1973
|
+
}
|
|
1868
1974
|
if (payload.__sootsimWebViewKind === 'setMessageHandlers') {
|
|
1869
1975
|
event.stopImmediatePropagation();
|
|
1870
1976
|
if (!webKit || !Array.isArray(payload.names) || payload.names.some(function(name) { return typeof name !== 'string'; })) throw new Error('WKWebView handler update is invalid');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.746 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.746 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -51,6 +51,8 @@ __export(home_paths_exports, {
|
|
|
51
51
|
daemonAppDir: () => daemonAppDir,
|
|
52
52
|
daemonAppLauncherPath: () => daemonAppLauncherPath,
|
|
53
53
|
daemonLockfilePath: () => daemonLockfilePath,
|
|
54
|
+
desktopHostDir: () => desktopHostDir,
|
|
55
|
+
desktopHostsDir: () => desktopHostsDir,
|
|
54
56
|
devBridgeLockfilePath: () => devBridgeLockfilePath,
|
|
55
57
|
devBridgesDir: () => devBridgesDir,
|
|
56
58
|
electronDir: () => electronDir,
|
|
@@ -64,6 +66,7 @@ __export(home_paths_exports, {
|
|
|
64
66
|
isSootsimDevCheckout: () => isSootsimDevCheckout,
|
|
65
67
|
playwrightCoreDir: () => playwrightCoreDir,
|
|
66
68
|
profilesDir: () => profilesDir,
|
|
69
|
+
readActiveDesktopHost: () => readActiveDesktopHost,
|
|
67
70
|
readActiveRuntime: () => readActiveRuntime,
|
|
68
71
|
readDaemonLockfile: () => readDaemonLockfile,
|
|
69
72
|
readDefaultBox: () => readDefaultBox,
|
|
@@ -80,6 +83,7 @@ __export(home_paths_exports, {
|
|
|
80
83
|
runtimeUpgradeNoticePath: () => runtimeUpgradeNoticePath,
|
|
81
84
|
runtimesDir: () => runtimesDir,
|
|
82
85
|
shouldSkipPersistentDaemon: () => shouldSkipPersistentDaemon,
|
|
86
|
+
writeActiveDesktopHost: () => writeActiveDesktopHost,
|
|
83
87
|
writeActiveRuntime: () => writeActiveRuntime,
|
|
84
88
|
writeDaemonLockfile: () => writeDaemonLockfile,
|
|
85
89
|
writeDefaultBox: () => writeDefaultBox,
|
|
@@ -136,6 +140,29 @@ function runtimeDir(version) {
|
|
|
136
140
|
function activeRuntimeFile() {
|
|
137
141
|
return import_node_path.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
|
|
138
142
|
}
|
|
143
|
+
function desktopHostsDir() {
|
|
144
|
+
return import_node_path.default.join(rnxHomeDir(), "desktop");
|
|
145
|
+
}
|
|
146
|
+
function desktopHostDir(version) {
|
|
147
|
+
return import_node_path.default.join(desktopHostsDir(), version);
|
|
148
|
+
}
|
|
149
|
+
function readActiveDesktopHost() {
|
|
150
|
+
try {
|
|
151
|
+
const value = import_node_fs.default.readFileSync(import_node_path.default.join(desktopHostsDir(), ACTIVE_RUNTIME_FILE), "utf8").trim();
|
|
152
|
+
return value.length > 0 ? value : null;
|
|
153
|
+
} catch {
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function writeActiveDesktopHost(version) {
|
|
158
|
+
import_node_fs.default.mkdirSync(desktopHostsDir(), { recursive: true });
|
|
159
|
+
import_node_fs.default.writeFileSync(
|
|
160
|
+
import_node_path.default.join(desktopHostsDir(), ACTIVE_RUNTIME_FILE),
|
|
161
|
+
`${version}
|
|
162
|
+
`,
|
|
163
|
+
"utf8"
|
|
164
|
+
);
|
|
165
|
+
}
|
|
139
166
|
function electronDir() {
|
|
140
167
|
return import_node_path.default.join(rnxHomeDir(), "electron");
|
|
141
168
|
}
|
|
@@ -606,6 +633,8 @@ function removeDevBridgeLockfile(owner) {
|
|
|
606
633
|
daemonAppDir,
|
|
607
634
|
daemonAppLauncherPath,
|
|
608
635
|
daemonLockfilePath,
|
|
636
|
+
desktopHostDir,
|
|
637
|
+
desktopHostsDir,
|
|
609
638
|
devBridgeLockfilePath,
|
|
610
639
|
devBridgesDir,
|
|
611
640
|
electronDir,
|
|
@@ -619,6 +648,7 @@ function removeDevBridgeLockfile(owner) {
|
|
|
619
648
|
isSootsimDevCheckout,
|
|
620
649
|
playwrightCoreDir,
|
|
621
650
|
profilesDir,
|
|
651
|
+
readActiveDesktopHost,
|
|
622
652
|
readActiveRuntime,
|
|
623
653
|
readDaemonLockfile,
|
|
624
654
|
readDefaultBox,
|
|
@@ -635,6 +665,7 @@ function removeDevBridgeLockfile(owner) {
|
|
|
635
665
|
runtimeUpgradeNoticePath,
|
|
636
666
|
runtimesDir,
|
|
637
667
|
shouldSkipPersistentDaemon,
|
|
668
|
+
writeActiveDesktopHost,
|
|
638
669
|
writeActiveRuntime,
|
|
639
670
|
writeDaemonLockfile,
|
|
640
671
|
writeDefaultBox,
|