rnxsim 0.1.376 → 0.1.378
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/README.md +28 -25
- package/cli/app-config.ts +9 -12
- package/cli/app-fonts.ts +3 -3
- package/cli/app-project.ts +8 -8
- package/cli/auth.ts +7 -9
- package/cli/bin.ts +16 -31
- package/cli/bridge-flow-runner.ts +3 -3
- package/cli/browser-backend.ts +44 -0
- package/cli/command-contract.ts +221 -0
- package/cli/command-registry.ts +291 -0
- package/cli/commands/agent-wrapper.ts +2 -2
- package/cli/commands/app-fonts.ts +2 -2
- package/cli/commands/assert.ts +3 -3
- package/cli/commands/auth.ts +1 -1
- package/cli/commands/box/cloud-box.ts +1 -1
- package/cli/commands/box/plane-share.ts +2 -2
- package/cli/commands/box.ts +4 -6
- package/cli/commands/compat.ts +1 -1
- package/cli/commands/config.ts +2 -2
- package/cli/commands/control.ts +29 -29
- package/cli/commands/cpu-profile.ts +7 -7
- package/cli/commands/daemon-mac-app.ts +7 -7
- package/cli/commands/daemon.ts +10 -10
- package/cli/commands/debug.ts +11 -11
- package/cli/commands/detox.ts +13 -13
- package/cli/commands/diagnose.ts +6 -6
- package/cli/commands/do-chain.ts +1 -2
- package/cli/commands/electron.ts +1 -3
- package/cli/commands/film.ts +3 -3
- package/cli/commands/flow.ts +43 -43
- package/cli/commands/inspect/count.ts +1 -1
- package/cli/commands/inspect/describe.ts +1 -1
- package/cli/commands/inspect/env.ts +2 -2
- package/cli/commands/inspect/get-layout.ts +1 -1
- package/cli/commands/inspect/keyboard.ts +1 -1
- package/cli/commands/inspect/list.ts +1 -1
- package/cli/commands/inspect/memory.ts +1 -1
- package/cli/commands/inspect/resolve-target.ts +1 -1
- package/cli/commands/inspect/screens.ts +1 -1
- package/cli/commands/inspect/tree.ts +1 -1
- package/cli/commands/inspect/url.ts +1 -1
- package/cli/commands/inspect/wait-event.ts +5 -5
- package/cli/commands/inspect.ts +34 -34
- package/cli/commands/install-desktop.ts +3 -3
- package/cli/commands/login.ts +6 -6
- package/cli/commands/maestro-generate.ts +5 -5
- package/cli/commands/maestro.ts +5 -5
- package/cli/commands/profile.ts +1 -1
- package/cli/commands/record.ts +9 -9
- package/cli/commands/runtime.ts +18 -18
- package/cli/commands/screenshot-command.ts +1 -1
- package/cli/commands/screenshot-layers.ts +5 -5
- package/cli/commands/screenshot-mode.ts +1 -1
- package/cli/commands/screenshot.ts +8 -8
- package/cli/commands/screenshots-capture.ts +5 -5
- package/cli/commands/serve.ts +3 -3
- package/cli/commands/setup.ts +20 -12
- package/cli/commands/skills.ts +5 -5
- package/cli/commands/slides.ts +1 -1
- package/cli/commands/telemetry.ts +1 -1
- package/cli/commands/three-mode.ts +1 -1
- package/cli/commands/timeline.ts +8 -8
- package/cli/commands/upgrade.ts +116 -131
- package/cli/commands/upload.ts +12 -12
- package/cli/commands/version.ts +7 -7
- package/cli/commands/what-happened.ts +9 -9
- package/cli/current-sim.ts +3 -3
- package/cli/desktop-companion.ts +1 -1
- package/cli/drivers/playwright.ts +9 -9
- package/cli/drivers/registry.ts +1 -1
- package/cli/drivers/types.ts +1 -1
- package/cli/flow-file.ts +2 -2
- package/cli/flow-session.ts +1 -1
- package/cli/help-core.ts +136 -0
- package/cli/help.ts +17 -53
- package/cli/hints.ts +5 -5
- package/cli/inspect-notice-state.ts +1 -1
- package/cli/maestro-js.ts +1 -1
- package/cli/outbound-endpoints.ts +23 -5
- package/cli/parse-args.ts +19 -66
- package/cli/recording-access.ts +1 -1
- package/cli/registry.ts +1 -0
- package/cli/run-registry.ts +1 -1
- package/cli/run-rnx-core.ts +148 -0
- package/cli/run-rnx.ts +6 -9
- package/cli/runtime-notes.ts +3 -3
- package/cli/standalone.ts +4 -0
- package/cli/ws-bridge.ts +8 -8
- package/detox/config-loader.ts +2 -2
- package/detox/index.ts +8 -8
- package/detox/jest-preset.cjs +1 -1
- package/detox/navigation.ts +2 -2
- package/dist-lib/agent-daemon-client.cjs +5 -5
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +2 -2
- package/dist-lib/agent-sessions.cjs +10 -10
- package/dist-lib/attached-projects.cjs +6 -6
- package/dist-lib/auth/shared-session.cjs +6 -6
- 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/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +25 -25
- package/dist-lib/detox/index.cjs +73 -31
- package/dist-lib/detox/jest-preset.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +29 -29
- package/dist-lib/host/bridge-host.cjs +128 -49
- 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 +14 -14
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.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 +8 -8
- package/dist-lib/profiles.cjs +12 -12
- 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 +8 -8
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +329 -160
- package/dist-lib/vite.cjs +9 -9
- package/package.json +4 -11
- package/scripts/dev-server-scanner.ts +2 -2
- package/scripts/optional-demo-registry.ts +1 -1
- package/skills/contrast/SKILL.md +3 -3
- package/skills/rnx-debug/SKILL.md +1 -1
- package/skills/rnx-test/SKILL.md +2 -2
- package/src/agent-identity.ts +1 -1
- package/src/agent-sessions.ts +7 -5
- package/src/cli-version.ts +12 -4
- package/src/config.ts +26 -28
- package/src/disk-cleanup.ts +11 -11
- package/src/home-paths.ts +28 -28
- package/src/host/bridge-host.ts +16 -16
- package/src/metro-plugin.ts +2 -2
- package/src/profiles.ts +2 -2
- package/src/runtime-assets.ts +7 -7
- package/src/runtime-delivery.ts +13 -13
- package/src/screenshots/orchestrate.ts +1 -1
- package/src/screenshots/schema.ts +2 -2
- package/src/skills/builtin/a11y-review.ts +2 -2
- package/src/skills/builtin/compat-check.ts +2 -2
- package/src/skills/builtin/maestro-test.ts +2 -2
- package/src/skills/builtin/perf-profile.ts +2 -2
- package/src/skills/builtin/screenshot-all.ts +2 -2
- package/src/skills/builtin/visual-diff.ts +2 -2
- package/src/skills/registry.ts +8 -8
- package/src/skills/types.ts +1 -1
- package/src/vite-plugin-one.ts +3 -3
- package/src/vite-plugin.ts +15 -2
- package/dist-cli/bin.js +0 -15
- package/dist-cli/chunks/agent-H42FCKFF.js +0 -48
- package/dist-cli/chunks/agent-wrapper-BBZKTZS6.js +0 -17
- package/dist-cli/chunks/app-fonts-43VXIKF4.js +0 -4
- package/dist-cli/chunks/assert-IXOLVO5Z.js +0 -49
- package/dist-cli/chunks/auth-KFMFB6FU.js +0 -12
- package/dist-cli/chunks/beta-5AO3SJB7.js +0 -4
- package/dist-cli/chunks/box-ZHM66L6K.js +0 -1730
- package/dist-cli/chunks/camera-FNJVFCDQ.js +0 -33
- package/dist-cli/chunks/chunk-37MCSPTE.js +0 -71
- package/dist-cli/chunks/chunk-3PEMSUAQ.js +0 -30
- package/dist-cli/chunks/chunk-4TQ5HOK3.js +0 -7
- package/dist-cli/chunks/chunk-5YZYDEMI.js +0 -4
- package/dist-cli/chunks/chunk-6CV3R3XD.js +0 -15
- package/dist-cli/chunks/chunk-7LGK5XU6.js +0 -4
- package/dist-cli/chunks/chunk-7R2TK2NY.js +0 -4
- package/dist-cli/chunks/chunk-7VZZQQEE.js +0 -497
- package/dist-cli/chunks/chunk-AFOVILIL.js +0 -130
- package/dist-cli/chunks/chunk-BEU7CD7E.js +0 -9
- package/dist-cli/chunks/chunk-CE4JQJ6Y.js +0 -6
- package/dist-cli/chunks/chunk-CIE6CZXL.js +0 -142
- package/dist-cli/chunks/chunk-CSJ7L7ZL.js +0 -312
- package/dist-cli/chunks/chunk-CWCQP53A.js +0 -27
- package/dist-cli/chunks/chunk-DCS5FK5N.js +0 -7
- package/dist-cli/chunks/chunk-DEV3E3MV.js +0 -4
- package/dist-cli/chunks/chunk-DGJMIVZM.js +0 -5
- package/dist-cli/chunks/chunk-DGX3MN65.js +0 -5
- package/dist-cli/chunks/chunk-DNPQMTW5.js +0 -4
- package/dist-cli/chunks/chunk-DOVBJBVD.js +0 -5
- package/dist-cli/chunks/chunk-DPBJ3S3J.js +0 -3
- package/dist-cli/chunks/chunk-FVZBGPCU.js +0 -4
- package/dist-cli/chunks/chunk-GDKMOIUT.js +0 -4
- package/dist-cli/chunks/chunk-GIF2NJCS.js +0 -32
- package/dist-cli/chunks/chunk-GZE57ORL.js +0 -4
- package/dist-cli/chunks/chunk-H3U56DKI.js +0 -24
- package/dist-cli/chunks/chunk-HZLOYAPH.js +0 -4
- package/dist-cli/chunks/chunk-J2IKAEU2.js +0 -4
- package/dist-cli/chunks/chunk-JXAXYK7W.js +0 -11
- package/dist-cli/chunks/chunk-KJE2O2GK.js +0 -4
- package/dist-cli/chunks/chunk-KMNVDZZI.js +0 -423
- package/dist-cli/chunks/chunk-LC3QRIRB.js +0 -10
- package/dist-cli/chunks/chunk-LGFTAQYC.js +0 -4
- package/dist-cli/chunks/chunk-LQMUA5IY.js +0 -4
- package/dist-cli/chunks/chunk-MFIQTWC5.js +0 -4
- package/dist-cli/chunks/chunk-MGALNF2F.js +0 -7
- package/dist-cli/chunks/chunk-MLBZZHOY.js +0 -4
- package/dist-cli/chunks/chunk-NNRF7GIB.js +0 -107
- package/dist-cli/chunks/chunk-NORLYTTO.js +0 -7
- package/dist-cli/chunks/chunk-P6KVGV3H.js +0 -14
- package/dist-cli/chunks/chunk-PAJTUK33.js +0 -4
- package/dist-cli/chunks/chunk-QELIC5XP.js +0 -4
- package/dist-cli/chunks/chunk-QRDF33WD.js +0 -11
- package/dist-cli/chunks/chunk-R76BA7C7.js +0 -535
- package/dist-cli/chunks/chunk-RVEB4CZ2.js +0 -4
- package/dist-cli/chunks/chunk-SK4M7NXT.js +0 -5
- package/dist-cli/chunks/chunk-SKMG5DD7.js +0 -5
- package/dist-cli/chunks/chunk-TEESPOYR.js +0 -4
- package/dist-cli/chunks/chunk-TH2UFGVP.js +0 -4
- package/dist-cli/chunks/chunk-TLP3T3VO.js +0 -4
- package/dist-cli/chunks/chunk-TZUABDIJ.js +0 -38
- package/dist-cli/chunks/chunk-UB2W6OQM.js +0 -99
- package/dist-cli/chunks/chunk-UYVXALPB.js +0 -506
- package/dist-cli/chunks/chunk-VQDYFFIG.js +0 -5
- package/dist-cli/chunks/chunk-VWCNJPCJ.js +0 -5
- package/dist-cli/chunks/chunk-VZIK4WIS.js +0 -74
- package/dist-cli/chunks/chunk-W3FNXAQP.js +0 -4
- package/dist-cli/chunks/chunk-XCDNVNP3.js +0 -4
- package/dist-cli/chunks/chunk-XSVILA4Z.js +0 -4
- package/dist-cli/chunks/chunk-XUTJ7ZWD.js +0 -4
- package/dist-cli/chunks/chunk-YTXY3MHW.js +0 -4
- package/dist-cli/chunks/chunk-ZF7PVX44.js +0 -28
- package/dist-cli/chunks/chunk-ZSSG7OR7.js +0 -4
- package/dist-cli/chunks/cleanup-MLOK2OZA.js +0 -25
- package/dist-cli/chunks/cli-version-OBNR366V.js +0 -4
- package/dist-cli/chunks/compat-SHMFSKU7.js +0 -23
- package/dist-cli/chunks/config-TPEAEUJ2.js +0 -13
- package/dist-cli/chunks/connect-3LEXWTE5.js +0 -4
- package/dist-cli/chunks/control-Z3FWA6BO.js +0 -4
- package/dist-cli/chunks/daemon-RSVYSC65.js +0 -4
- package/dist-cli/chunks/debug-GUVAK2KR.js +0 -200
- package/dist-cli/chunks/desktop-OOP2PTKP.js +0 -31
- package/dist-cli/chunks/detox-C2ILVBEC.js +0 -52
- package/dist-cli/chunks/device-NXIQQJWR.js +0 -18
- package/dist-cli/chunks/diagnose-2JBGYE5L.js +0 -43
- package/dist-cli/chunks/disk-cleanup-VURWJYQV.js +0 -4
- package/dist-cli/chunks/do-chain-DJ4UQC7A.js +0 -5
- package/dist-cli/chunks/drivers-JMA2OIKU.js +0 -4
- package/dist-cli/chunks/env-KTNPKEZR.js +0 -4
- package/dist-cli/chunks/film-DCPS7EID.js +0 -74
- package/dist-cli/chunks/flow-4DZ7B2OA.js +0 -4
- package/dist-cli/chunks/help-34CJMQY2.js +0 -4
- package/dist-cli/chunks/hidden-runtime-alias-HHT2C7WE.js +0 -4
- package/dist-cli/chunks/home-paths-KTPGCPMS.js +0 -4
- package/dist-cli/chunks/inspect-JF5WYJRD.js +0 -4
- package/dist-cli/chunks/install-desktop-ZIC4CDXI.js +0 -4
- package/dist-cli/chunks/login-TTJAOI2Q.js +0 -26
- package/dist-cli/chunks/logout-ERAQ6SKW.js +0 -4
- package/dist-cli/chunks/maestro-W46QCF77.js +0 -108
- package/dist-cli/chunks/maestro-generate-VBLM3MTU.js +0 -36
- package/dist-cli/chunks/mode-ZEDZK7R7.js +0 -26
- package/dist-cli/chunks/optional-demo-registry-ZUTPSVYQ.js +0 -4
- package/dist-cli/chunks/perf-YVT2WXT4.js +0 -48
- package/dist-cli/chunks/permissions-L7VVDHFP.js +0 -13
- package/dist-cli/chunks/platform-7TJOU2FB.js +0 -6
- package/dist-cli/chunks/privacy-57UOTB5J.js +0 -4
- package/dist-cli/chunks/record-VXG37P7U.js +0 -72
- package/dist-cli/chunks/report-issue-WNNOBZHC.js +0 -29
- package/dist-cli/chunks/reset-H5NBFE5U.js +0 -4
- package/dist-cli/chunks/resolve-target-57TK5WLE.js +0 -4
- package/dist-cli/chunks/runtime-QU2NIF2K.js +0 -4
- package/dist-cli/chunks/screenshot-command-AN56TTG7.js +0 -159
- package/dist-cli/chunks/screenshot-layers-3W5R7DB2.js +0 -20
- package/dist-cli/chunks/screenshots-capture-6AWJY7XZ.js +0 -42
- package/dist-cli/chunks/serve-GLYO5Q7J.js +0 -56
- package/dist-cli/chunks/setup-UA2HLD7S.js +0 -4
- package/dist-cli/chunks/sim-client-5C2RDQQO.js +0 -4
- package/dist-cli/chunks/skills-EYXWBRNQ.js +0 -50
- package/dist-cli/chunks/state-REJ7W6K3.js +0 -14
- package/dist-cli/chunks/storage-CFMDHI3V.js +0 -37
- package/dist-cli/chunks/store-XMCUA45G.js +0 -4
- package/dist-cli/chunks/telemetry-FBL3NAKB.js +0 -4
- package/dist-cli/chunks/timeline-HMCHN5FO.js +0 -24
- package/dist-cli/chunks/upgrade-2QSPAA3P.js +0 -7
- package/dist-cli/chunks/upload-DUQBKZYV.js +0 -4
- package/dist-cli/chunks/version-IOA6QFGB.js +0 -6
- package/dist-cli/chunks/web-NCGUYVCJ.js +0 -4
- package/dist-cli/chunks/welcome-QYGSQCWQ.js +0 -5
- package/dist-cli/chunks/what-happened-YTOUK4LO.js +0 -25
- package/dist-cli/chunks/ws-bridge-OF4OZARG.js +0 -4
- package/scripts/postinstall.cjs +0 -3
- package/scripts/preuninstall.cjs +0 -118
package/dist-lib/detox/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.378 | (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;
|
|
@@ -216,7 +216,8 @@ var import_playwright = require("playwright");
|
|
|
216
216
|
// ../../scripts/lib/reap-browser.ts
|
|
217
217
|
var import_node_child_process = require("node:child_process");
|
|
218
218
|
var discoveredChromePids = /* @__PURE__ */ new WeakMap();
|
|
219
|
-
var
|
|
219
|
+
var discoveredChromeProcesses = /* @__PURE__ */ new WeakMap();
|
|
220
|
+
var reapPids = /* @__PURE__ */ new Map();
|
|
220
221
|
var installed = false;
|
|
221
222
|
function currentRuntime() {
|
|
222
223
|
return { platform: process.platform, env: process.env };
|
|
@@ -226,6 +227,18 @@ function processCommand(pid) {
|
|
|
226
227
|
encoding: "utf8"
|
|
227
228
|
}).trim();
|
|
228
229
|
}
|
|
230
|
+
function processIdentity(pid) {
|
|
231
|
+
try {
|
|
232
|
+
const identity = (0, import_node_child_process.execFileSync)(
|
|
233
|
+
"/bin/ps",
|
|
234
|
+
["-p", String(pid), "-o", "lstart=", "-o", "command="],
|
|
235
|
+
{ encoding: "utf8" }
|
|
236
|
+
).trim();
|
|
237
|
+
return identity || null;
|
|
238
|
+
} catch {
|
|
239
|
+
return null;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
229
242
|
function softwareChromeAllowed(runtime = currentRuntime()) {
|
|
230
243
|
return runtime.platform === "linux" && runtime.env.GITHUB_ACTIONS === "true" && runtime.env.RUNNER_OS === "Linux";
|
|
231
244
|
}
|
|
@@ -351,6 +364,25 @@ function killTree(pid) {
|
|
|
351
364
|
} catch {
|
|
352
365
|
}
|
|
353
366
|
}
|
|
367
|
+
function killOwnedTree(tracked) {
|
|
368
|
+
if (tracked.readIdentity(tracked.pid) !== tracked.identity) return;
|
|
369
|
+
killTree(tracked.pid);
|
|
370
|
+
}
|
|
371
|
+
function trackReapPid(pid, readIdentity = processIdentity) {
|
|
372
|
+
const identity = readIdentity(pid);
|
|
373
|
+
if (identity === null) return null;
|
|
374
|
+
const current = reapPids.get(pid);
|
|
375
|
+
if (current?.identity === identity && current.readIdentity === readIdentity) {
|
|
376
|
+
return current;
|
|
377
|
+
}
|
|
378
|
+
const tracked = { pid, identity, readIdentity };
|
|
379
|
+
reapPids.set(pid, tracked);
|
|
380
|
+
installReaper();
|
|
381
|
+
return tracked;
|
|
382
|
+
}
|
|
383
|
+
function untrackReapPid(tracked) {
|
|
384
|
+
if (reapPids.get(tracked.pid) === tracked) reapPids.delete(tracked.pid);
|
|
385
|
+
}
|
|
354
386
|
function browserControl(b) {
|
|
355
387
|
const candidate = b;
|
|
356
388
|
if (!candidate || typeof candidate !== "object") return null;
|
|
@@ -365,11 +397,15 @@ function browserControl(b) {
|
|
|
365
397
|
return null;
|
|
366
398
|
}
|
|
367
399
|
}
|
|
368
|
-
function registerChromePid(browser, control, pid) {
|
|
400
|
+
function registerChromePid(browser, control, pid, readIdentity = processIdentity) {
|
|
369
401
|
if (browser && typeof browser === "object") discoveredChromePids.set(browser, pid);
|
|
370
402
|
discoveredChromePids.set(control, pid);
|
|
371
|
-
|
|
372
|
-
|
|
403
|
+
const tracked = trackReapPid(pid, readIdentity);
|
|
404
|
+
if (tracked === null) return;
|
|
405
|
+
if (browser && typeof browser === "object") {
|
|
406
|
+
discoveredChromeProcesses.set(browser, tracked);
|
|
407
|
+
}
|
|
408
|
+
discoveredChromeProcesses.set(control, tracked);
|
|
373
409
|
}
|
|
374
410
|
async function discoverChromePid(browser) {
|
|
375
411
|
const known = rootChromePid(browser);
|
|
@@ -387,10 +423,10 @@ async function discoverChromePid(browser) {
|
|
|
387
423
|
}
|
|
388
424
|
}
|
|
389
425
|
async function rejectLaunchedBrowser(browser) {
|
|
390
|
-
const
|
|
391
|
-
if (
|
|
392
|
-
|
|
393
|
-
|
|
426
|
+
const tracked = browser && typeof browser === "object" ? discoveredChromeProcesses.get(browser) : void 0;
|
|
427
|
+
if (tracked) {
|
|
428
|
+
killOwnedTree(tracked);
|
|
429
|
+
untrackReapPid(tracked);
|
|
394
430
|
return;
|
|
395
431
|
}
|
|
396
432
|
const candidate = browser;
|
|
@@ -401,12 +437,12 @@ async function rejectLaunchedBrowser(browser) {
|
|
|
401
437
|
}
|
|
402
438
|
}
|
|
403
439
|
}
|
|
404
|
-
async function validateLaunchedGpuBrowser(browser, runtime, rendererTarget, commandForPid = processCommand) {
|
|
440
|
+
async function validateLaunchedGpuBrowser(browser, runtime, rendererTarget, commandForPid = processCommand, readIdentity = processIdentity) {
|
|
405
441
|
if (softwareChromeAllowed(runtime)) return;
|
|
406
442
|
const root = rootChromePid(browser);
|
|
407
443
|
const launchedControl = browserControl(browser);
|
|
408
444
|
if (root !== null && launchedControl) {
|
|
409
|
-
registerChromePid(browser, launchedControl, root);
|
|
445
|
+
registerChromePid(browser, launchedControl, root, readIdentity);
|
|
410
446
|
}
|
|
411
447
|
if (root !== null && (runtime.platform === "darwin" || runtime.platform === "linux")) {
|
|
412
448
|
assertGpuBrowserCommand(commandForPid(root), runtime);
|
|
@@ -420,7 +456,7 @@ async function validateLaunchedGpuBrowser(browser, runtime, rendererTarget, comm
|
|
|
420
456
|
if (pid === null) {
|
|
421
457
|
throw new Error("[reap-browser] Chrome did not report its browser process id");
|
|
422
458
|
}
|
|
423
|
-
registerChromePid(browser, control, pid);
|
|
459
|
+
registerChromePid(browser, control, pid, readIdentity);
|
|
424
460
|
if (rendererBrowser && typeof rendererBrowser === "object") {
|
|
425
461
|
discoveredChromePids.set(rendererBrowser, pid);
|
|
426
462
|
}
|
|
@@ -440,7 +476,7 @@ function installReaper() {
|
|
|
440
476
|
if (installed) return;
|
|
441
477
|
installed = true;
|
|
442
478
|
const reap = () => {
|
|
443
|
-
for (const
|
|
479
|
+
for (const tracked of reapPids.values()) killOwnedTree(tracked);
|
|
444
480
|
};
|
|
445
481
|
if (!signalShutdownClaimed) {
|
|
446
482
|
process.on("SIGTERM", () => {
|
|
@@ -454,7 +490,7 @@ function installReaper() {
|
|
|
454
490
|
}
|
|
455
491
|
process.on("exit", reap);
|
|
456
492
|
}
|
|
457
|
-
async function launchReapedScoped(launch) {
|
|
493
|
+
async function launchReapedScoped(launch, readIdentity = processIdentity) {
|
|
458
494
|
const browser = await launch();
|
|
459
495
|
let root = rootChromePid(browser);
|
|
460
496
|
if (root === null) {
|
|
@@ -466,22 +502,24 @@ async function launchReapedScoped(launch) {
|
|
|
466
502
|
}
|
|
467
503
|
const mine = /* @__PURE__ */ new Set();
|
|
468
504
|
if (root != null) {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
installReaper();
|
|
505
|
+
const tracked = trackReapPid(root, readIdentity);
|
|
506
|
+
if (tracked !== null) mine.add(tracked);
|
|
472
507
|
}
|
|
473
508
|
const evented = browserControl(browser) ?? browser;
|
|
474
509
|
if (typeof evented.on === "function") {
|
|
475
510
|
const disconnectEvent = typeof evented.newBrowserCDPSession === "function" ? "disconnected" : "close";
|
|
476
511
|
evented.on(disconnectEvent, () => {
|
|
477
|
-
for (const
|
|
512
|
+
for (const tracked of mine) {
|
|
513
|
+
killOwnedTree(tracked);
|
|
514
|
+
untrackReapPid(tracked);
|
|
515
|
+
}
|
|
478
516
|
mine.clear();
|
|
479
517
|
});
|
|
480
518
|
}
|
|
481
519
|
const reapNow = () => {
|
|
482
|
-
for (const
|
|
483
|
-
|
|
484
|
-
|
|
520
|
+
for (const tracked of mine) {
|
|
521
|
+
killOwnedTree(tracked);
|
|
522
|
+
untrackReapPid(tracked);
|
|
485
523
|
}
|
|
486
524
|
mine.clear();
|
|
487
525
|
};
|
|
@@ -573,7 +611,8 @@ function platformChromeLaunch(launch, opts, rendererTarget, policy = {}) {
|
|
|
573
611
|
browser,
|
|
574
612
|
runtime,
|
|
575
613
|
rendererTarget,
|
|
576
|
-
policy.processCommand
|
|
614
|
+
policy.processCommand,
|
|
615
|
+
policy.processIdentity
|
|
577
616
|
);
|
|
578
617
|
} catch (err) {
|
|
579
618
|
await rejectLaunchedBrowser(browser);
|
|
@@ -614,7 +653,10 @@ function chromeLaunchOptions(opts = {}, runtime = currentRuntime()) {
|
|
|
614
653
|
return softwareChromeAllowed(runtime) ? softwareChromeLaunchOptions(opts) : gpuChromeLaunchOptions(opts, runtime);
|
|
615
654
|
}
|
|
616
655
|
async function launchReapedChromeScoped(launch, opts = {}, rendererTarget, policy = {}) {
|
|
617
|
-
return launchReapedScoped(
|
|
656
|
+
return launchReapedScoped(
|
|
657
|
+
platformChromeLaunch(launch, opts, rendererTarget, policy),
|
|
658
|
+
policy.processIdentity
|
|
659
|
+
);
|
|
618
660
|
}
|
|
619
661
|
|
|
620
662
|
// src/poll-until.ts
|
|
@@ -1453,9 +1495,9 @@ var by = {
|
|
|
1453
1495
|
// detox/index.ts
|
|
1454
1496
|
var import_motion_change = __toESM(require_motion_change(), 1);
|
|
1455
1497
|
var import_proof_frame = __toESM(require_proof_frame(), 1);
|
|
1456
|
-
var BASE_URL = process.env.
|
|
1457
|
-
var SCREENSHOT_DIR = process.env.
|
|
1458
|
-
var DETOX_PLATFORM = process.env.
|
|
1498
|
+
var BASE_URL = process.env.RNX_URL || "http://localhost:5173";
|
|
1499
|
+
var SCREENSHOT_DIR = process.env.RNX_SCREENSHOT_DIR || path.join(process.cwd(), "test", "detox-driver", "screenshots");
|
|
1500
|
+
var DETOX_PLATFORM = process.env.RNX_PLATFORM === "android" ? "android" : "ios";
|
|
1459
1501
|
var _browser = null;
|
|
1460
1502
|
var _reapBrowserNow = null;
|
|
1461
1503
|
var _context = null;
|
|
@@ -1923,7 +1965,7 @@ function decodePngDataUrl(dataUrl) {
|
|
|
1923
1965
|
const match = /^data:image\/png;base64,(.+)$/.exec(dataUrl);
|
|
1924
1966
|
if (!match) {
|
|
1925
1967
|
throw new Error(
|
|
1926
|
-
`
|
|
1968
|
+
`rnx screenshot bridge returned a non-png payload: ${JSON.stringify(dataUrl.slice(0, 120))}`
|
|
1927
1969
|
);
|
|
1928
1970
|
}
|
|
1929
1971
|
return Buffer.from(match[1], "base64");
|
|
@@ -1947,14 +1989,14 @@ async function captureSootsimPngFast(opts) {
|
|
|
1947
1989
|
async (captureOpts) => {
|
|
1948
1990
|
const screenshot = window.SootSim?.bridges?.screenshot;
|
|
1949
1991
|
if (typeof screenshot !== "function") {
|
|
1950
|
-
throw new Error("
|
|
1992
|
+
throw new Error("rnx screenshot bridge is not installed");
|
|
1951
1993
|
}
|
|
1952
1994
|
return screenshot(captureOpts);
|
|
1953
1995
|
},
|
|
1954
1996
|
{ crop: opts?.crop, format: "png" }
|
|
1955
1997
|
);
|
|
1956
1998
|
if (!dataUrl) {
|
|
1957
|
-
throw new Error("
|
|
1999
|
+
throw new Error("rnx screenshot bridge returned an empty image");
|
|
1958
2000
|
}
|
|
1959
2001
|
return decodePngDataUrl(dataUrl);
|
|
1960
2002
|
}
|
|
@@ -1988,7 +2030,7 @@ async function captureSootsimPng(opts) {
|
|
|
1988
2030
|
previous = current;
|
|
1989
2031
|
}
|
|
1990
2032
|
throw new Error(
|
|
1991
|
-
`
|
|
2033
|
+
`rnx screenshot did not reach ${import_proof_frame.REQUIRED_IDENTICAL_PROOF_FRAMES} identical idle frames in ${attempts} captures`
|
|
1992
2034
|
);
|
|
1993
2035
|
} finally {
|
|
1994
2036
|
await setSootsimCursorCaptureActive(page, false);
|
|
@@ -2981,7 +3023,7 @@ var device = {
|
|
|
2981
3023
|
async (input) => {
|
|
2982
3024
|
const screenshot = window.SootSim?.bridges?.screenshot;
|
|
2983
3025
|
if (typeof screenshot !== "function") {
|
|
2984
|
-
throw new Error("
|
|
3026
|
+
throw new Error("rnx screenshot bridge is not installed");
|
|
2985
3027
|
}
|
|
2986
3028
|
const start = Date.now();
|
|
2987
3029
|
const out = [];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// jest preset for running existing detox suites against sootsim.
|
|
2
2
|
//
|
|
3
3
|
// users drop `preset: 'sootsim/detox/jest-preset'` into their jest config
|
|
4
|
-
// (or `
|
|
4
|
+
// (or `rnx-detox.config.cjs`) and their `import { by, device, element,
|
|
5
5
|
// expect, waitFor } from 'detox'` calls resolve to the sootsim driver.
|
|
6
6
|
|
|
7
7
|
const path = require('path')
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.378 | (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.378 | (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;
|
|
@@ -37,7 +37,7 @@ __export(home_paths_exports, {
|
|
|
37
37
|
DAEMON_HEARTBEAT_STALE_MS: () => DAEMON_HEARTBEAT_STALE_MS,
|
|
38
38
|
DAEMON_LOCKFILE: () => DAEMON_LOCKFILE,
|
|
39
39
|
DEV_BRIDGES_DIR: () => DEV_BRIDGES_DIR,
|
|
40
|
-
|
|
40
|
+
RNX_HOME_ENV: () => RNX_HOME_ENV,
|
|
41
41
|
activeRuntimeDir: () => activeRuntimeDir,
|
|
42
42
|
activeRuntimeFile: () => activeRuntimeFile,
|
|
43
43
|
cacheDir: () => cacheDir,
|
|
@@ -54,7 +54,7 @@ __export(home_paths_exports, {
|
|
|
54
54
|
electronDir: () => electronDir,
|
|
55
55
|
electronUserDataDir: () => electronUserDataDir,
|
|
56
56
|
electronVersionDir: () => electronVersionDir,
|
|
57
|
-
|
|
57
|
+
ensureRnxHome: () => ensureRnxHome,
|
|
58
58
|
isDaemonLockfileFresh: () => isDaemonLockfileFresh,
|
|
59
59
|
isDevBridgeLockfileFresh: () => isDevBridgeLockfileFresh,
|
|
60
60
|
isDevWorkstation: () => isDevWorkstation,
|
|
@@ -71,11 +71,11 @@ __export(home_paths_exports, {
|
|
|
71
71
|
readSimulatorDriverPreference: () => readSimulatorDriverPreference,
|
|
72
72
|
removeDaemonLockfile: () => removeDaemonLockfile,
|
|
73
73
|
removeDevBridgeLockfile: () => removeDevBridgeLockfile,
|
|
74
|
+
rnxHomeDir: () => rnxHomeDir,
|
|
74
75
|
runtimeDir: () => runtimeDir,
|
|
75
76
|
runtimeUpgradeNoticePath: () => runtimeUpgradeNoticePath,
|
|
76
77
|
runtimesDir: () => runtimesDir,
|
|
77
78
|
shouldSkipPersistentDaemon: () => shouldSkipPersistentDaemon,
|
|
78
|
-
sootsimHomeDir: () => sootsimHomeDir,
|
|
79
79
|
writeActiveRuntime: () => writeActiveRuntime,
|
|
80
80
|
writeDaemonLockfile: () => writeDaemonLockfile,
|
|
81
81
|
writeDevBridgeLockfile: () => writeDevBridgeLockfile,
|
|
@@ -89,16 +89,16 @@ var import_node_crypto = require("node:crypto");
|
|
|
89
89
|
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
90
90
|
var import_node_os = require("node:os");
|
|
91
91
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
92
|
-
var
|
|
92
|
+
var RNX_HOME_ENV = "RNX_HOME";
|
|
93
93
|
var ACTIVE_RUNTIME_FILE = "active";
|
|
94
94
|
var DAEMON_LOCKFILE = "daemon.json";
|
|
95
95
|
var DEV_BRIDGES_DIR = "dev-bridges";
|
|
96
96
|
var CONFIG_FILE = "config.json";
|
|
97
97
|
var DAEMON_HEARTBEAT_STALE_MS = 3e4;
|
|
98
|
-
function
|
|
99
|
-
const override = process.env[
|
|
98
|
+
function rnxHomeDir() {
|
|
99
|
+
const override = process.env[RNX_HOME_ENV];
|
|
100
100
|
if (override && override.length > 0) return import_node_path.default.resolve(override);
|
|
101
|
-
return import_node_path.default.join((0, import_node_os.homedir)(), ".
|
|
101
|
+
return import_node_path.default.join((0, import_node_os.homedir)(), ".rnx");
|
|
102
102
|
}
|
|
103
103
|
function isSootsimDevCheckout() {
|
|
104
104
|
if (process.env.SOOTSIM_FORCE_DAEMON_INSTALL === "1") return false;
|
|
@@ -122,7 +122,7 @@ function shouldSkipPersistentDaemon() {
|
|
|
122
122
|
return isSootsimDevCheckout() || isDevWorkstation();
|
|
123
123
|
}
|
|
124
124
|
function runtimesDir() {
|
|
125
|
-
return import_node_path.default.join(
|
|
125
|
+
return import_node_path.default.join(rnxHomeDir(), "runtimes");
|
|
126
126
|
}
|
|
127
127
|
function runtimeDir(version) {
|
|
128
128
|
return import_node_path.default.join(runtimesDir(), version);
|
|
@@ -131,7 +131,7 @@ function activeRuntimeFile() {
|
|
|
131
131
|
return import_node_path.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
|
|
132
132
|
}
|
|
133
133
|
function electronDir() {
|
|
134
|
-
return import_node_path.default.join(
|
|
134
|
+
return import_node_path.default.join(rnxHomeDir(), "electron");
|
|
135
135
|
}
|
|
136
136
|
function electronUserDataDir() {
|
|
137
137
|
return import_node_path.default.join(electronDir(), "userData");
|
|
@@ -140,28 +140,28 @@ function electronVersionDir(version) {
|
|
|
140
140
|
return import_node_path.default.join(electronDir(), version);
|
|
141
141
|
}
|
|
142
142
|
function profilesDir() {
|
|
143
|
-
return import_node_path.default.join(
|
|
143
|
+
return import_node_path.default.join(rnxHomeDir(), "profiles");
|
|
144
144
|
}
|
|
145
145
|
function cameraFixturesDir() {
|
|
146
|
-
return import_node_path.default.join(
|
|
146
|
+
return import_node_path.default.join(rnxHomeDir(), "camera-fixtures");
|
|
147
147
|
}
|
|
148
148
|
function daemonAppDir() {
|
|
149
|
-
return import_node_path.default.join(
|
|
149
|
+
return import_node_path.default.join(rnxHomeDir(), "daemon-app");
|
|
150
150
|
}
|
|
151
151
|
function daemonAppBundlePath() {
|
|
152
|
-
return import_node_path.default.join(daemonAppDir(), "
|
|
152
|
+
return import_node_path.default.join(daemonAppDir(), "RNX Daemon.app");
|
|
153
153
|
}
|
|
154
154
|
function daemonAppLauncherPath() {
|
|
155
|
-
return import_node_path.default.join(daemonAppBundlePath(), "Contents", "MacOS", "
|
|
155
|
+
return import_node_path.default.join(daemonAppBundlePath(), "Contents", "MacOS", "rnx-daemon");
|
|
156
156
|
}
|
|
157
157
|
function cacheDir() {
|
|
158
|
-
return import_node_path.default.join(
|
|
158
|
+
return import_node_path.default.join(rnxHomeDir(), "cache");
|
|
159
159
|
}
|
|
160
160
|
function daemonLockfilePath() {
|
|
161
|
-
return import_node_path.default.join(
|
|
161
|
+
return import_node_path.default.join(rnxHomeDir(), DAEMON_LOCKFILE);
|
|
162
162
|
}
|
|
163
163
|
function devBridgesDir() {
|
|
164
|
-
return import_node_path.default.join(
|
|
164
|
+
return import_node_path.default.join(rnxHomeDir(), DEV_BRIDGES_DIR);
|
|
165
165
|
}
|
|
166
166
|
function devBridgeLockfilePath(bridgePort) {
|
|
167
167
|
if (!Number.isInteger(bridgePort) || bridgePort <= 0) {
|
|
@@ -170,7 +170,7 @@ function devBridgeLockfilePath(bridgePort) {
|
|
|
170
170
|
return import_node_path.default.join(devBridgesDir(), `${bridgePort}.json`);
|
|
171
171
|
}
|
|
172
172
|
function configFilePath() {
|
|
173
|
-
return import_node_path.default.join(
|
|
173
|
+
return import_node_path.default.join(rnxHomeDir(), CONFIG_FILE);
|
|
174
174
|
}
|
|
175
175
|
function readSharedConfig() {
|
|
176
176
|
try {
|
|
@@ -182,7 +182,7 @@ function readSharedConfig() {
|
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
function writeSharedConfig(patch) {
|
|
185
|
-
|
|
185
|
+
ensureRnxHome();
|
|
186
186
|
const current = readSharedConfig();
|
|
187
187
|
const next = { ...current, ...patch };
|
|
188
188
|
if (patch.settings && typeof patch.settings === "object") {
|
|
@@ -237,10 +237,10 @@ function readOrCreateAnonymousId() {
|
|
|
237
237
|
return created;
|
|
238
238
|
}
|
|
239
239
|
function runtimeUpgradeNoticePath() {
|
|
240
|
-
return import_node_path.default.join(
|
|
240
|
+
return import_node_path.default.join(rnxHomeDir(), "runtime-upgraded.json");
|
|
241
241
|
}
|
|
242
242
|
function writeRuntimeUpgradeNotice(notice) {
|
|
243
|
-
|
|
243
|
+
ensureRnxHome();
|
|
244
244
|
const tmp = `${runtimeUpgradeNoticePath()}.tmp`;
|
|
245
245
|
import_node_fs.default.writeFileSync(tmp, `${JSON.stringify(notice)}
|
|
246
246
|
`, "utf8");
|
|
@@ -261,8 +261,8 @@ function consumeRuntimeUpgradeNotice() {
|
|
|
261
261
|
return null;
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
function
|
|
265
|
-
import_node_fs.default.mkdirSync(
|
|
264
|
+
function ensureRnxHome() {
|
|
265
|
+
import_node_fs.default.mkdirSync(rnxHomeDir(), { recursive: true });
|
|
266
266
|
import_node_fs.default.mkdirSync(runtimesDir(), { recursive: true });
|
|
267
267
|
import_node_fs.default.mkdirSync(electronDir(), { recursive: true });
|
|
268
268
|
import_node_fs.default.mkdirSync(profilesDir(), { recursive: true });
|
|
@@ -387,7 +387,7 @@ function readLiveRuntimeVersions() {
|
|
|
387
387
|
return [...versions].sort();
|
|
388
388
|
}
|
|
389
389
|
function writeDaemonLockfile(data) {
|
|
390
|
-
|
|
390
|
+
ensureRnxHome();
|
|
391
391
|
const lockfilePath = daemonLockfilePath();
|
|
392
392
|
const existing = readDaemonLockfile();
|
|
393
393
|
if (!existing) {
|
|
@@ -517,7 +517,7 @@ function releaseDaemonClaim(owner) {
|
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
function claimDaemonLockfile(data) {
|
|
520
|
-
|
|
520
|
+
ensureRnxHome();
|
|
521
521
|
if (!acquireDaemonClaim(data)) return false;
|
|
522
522
|
try {
|
|
523
523
|
const existing = readDaemonLockfile();
|
|
@@ -565,7 +565,7 @@ function removeDevBridgeLockfile(owner) {
|
|
|
565
565
|
DAEMON_HEARTBEAT_STALE_MS,
|
|
566
566
|
DAEMON_LOCKFILE,
|
|
567
567
|
DEV_BRIDGES_DIR,
|
|
568
|
-
|
|
568
|
+
RNX_HOME_ENV,
|
|
569
569
|
activeRuntimeDir,
|
|
570
570
|
activeRuntimeFile,
|
|
571
571
|
cacheDir,
|
|
@@ -582,7 +582,7 @@ function removeDevBridgeLockfile(owner) {
|
|
|
582
582
|
electronDir,
|
|
583
583
|
electronUserDataDir,
|
|
584
584
|
electronVersionDir,
|
|
585
|
-
|
|
585
|
+
ensureRnxHome,
|
|
586
586
|
isDaemonLockfileFresh,
|
|
587
587
|
isDevBridgeLockfileFresh,
|
|
588
588
|
isDevWorkstation,
|
|
@@ -599,11 +599,11 @@ function removeDevBridgeLockfile(owner) {
|
|
|
599
599
|
readSimulatorDriverPreference,
|
|
600
600
|
removeDaemonLockfile,
|
|
601
601
|
removeDevBridgeLockfile,
|
|
602
|
+
rnxHomeDir,
|
|
602
603
|
runtimeDir,
|
|
603
604
|
runtimeUpgradeNoticePath,
|
|
604
605
|
runtimesDir,
|
|
605
606
|
shouldSkipPersistentDaemon,
|
|
606
|
-
sootsimHomeDir,
|
|
607
607
|
writeActiveRuntime,
|
|
608
608
|
writeDaemonLockfile,
|
|
609
609
|
writeDevBridgeLockfile,
|