rnxsim 0.1.366 → 0.1.367
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 +14 -2
- package/cli/bin.ts +18 -0
- package/cli/bridge-flow-runner.ts +14 -151
- package/cli/commands/assert.ts +1 -1
- package/cli/commands/box/checkout-plane.ts +126 -0
- package/cli/commands/box/rnx-command.ts +68 -0
- package/cli/commands/box.ts +200 -0
- package/cli/commands/control.ts +12 -32
- package/cli/commands/do-chain.ts +412 -0
- package/cli/commands/flow.ts +0 -10
- package/cli/commands/inspect/core.ts +302 -725
- package/cli/commands/inspect/describe.ts +3 -76
- package/cli/commands/inspect/find.ts +3 -6
- package/cli/commands/inspect/get-layout.ts +14 -1
- package/cli/commands/inspect/resolve-target.ts +41 -47
- package/cli/commands/inspect/shared.ts +28 -123
- package/cli/commands/inspect/tree.ts +6 -15
- package/cli/commands/inspect/wait-ready.ts +2 -2
- package/cli/commands/inspect/wait-selector.ts +4 -8
- package/cli/commands/inspect.ts +23 -17
- package/cli/commands/install-desktop.ts +44 -7
- package/cli/commands/maestro-generate.ts +0 -2
- package/cli/commands/platform.ts +68 -0
- package/cli/commands/state.ts +5 -2
- package/cli/outbound-endpoints.ts +6 -1
- package/cli/parse-args.ts +13 -2
- package/cli/ws-bridge.ts +30 -2
- package/detox/index.ts +34 -17
- package/dist-cli/bin.js +5 -5
- package/dist-cli/chunks/{agent-SO6IOPRK.js → agent-EKKIAKP5.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-PMYCB2KO.js → agent-wrapper-MHLQUGA6.js} +2 -2
- package/dist-cli/chunks/{app-fonts-LULQGFY7.js → app-fonts-HN6ADRTQ.js} +2 -2
- package/dist-cli/chunks/{assert-WGNCD4ZU.js → assert-IMR6QCN6.js} +3 -3
- package/dist-cli/chunks/{auth-G7CCHH3M.js → auth-27LPMQNH.js} +2 -2
- package/dist-cli/chunks/{beta-N4LXL5TO.js → beta-6RXBB5AI.js} +2 -2
- package/dist-cli/chunks/box-DORLF3GP.js +1709 -0
- package/dist-cli/chunks/{camera-4JHCYBQS.js → camera-2G7JZ5DL.js} +2 -2
- package/dist-cli/chunks/{chunk-2UXU53MG.js → chunk-3QZJLNYY.js} +1 -1
- package/dist-cli/chunks/{chunk-YXXKSL6R.js → chunk-3VBVEDDA.js} +1 -1
- package/dist-cli/chunks/{chunk-ZJIS3CTW.js → chunk-4BWGLTKU.js} +2 -2
- package/dist-cli/chunks/chunk-4XSNO374.js +423 -0
- package/dist-cli/chunks/{chunk-RYIMSKDO.js → chunk-5DGMFUZG.js} +2 -2
- package/dist-cli/chunks/{chunk-M3BNCF7E.js → chunk-6DBS5EGX.js} +2 -2
- package/dist-cli/chunks/{chunk-ONORMKWX.js → chunk-6SO6I3D5.js} +2 -2
- package/dist-cli/chunks/chunk-75EFOPXE.js +32 -0
- package/dist-cli/chunks/{chunk-5NMCF5VF.js → chunk-A5AJFVOF.js} +1 -1
- package/dist-cli/chunks/{chunk-N3UC7HIX.js → chunk-AM2ODYAN.js} +1 -1
- package/dist-cli/chunks/{chunk-I6KIM6PN.js → chunk-AVOROGA3.js} +1 -1
- package/dist-cli/chunks/chunk-AXMMLO7D.js +130 -0
- package/dist-cli/chunks/{chunk-ORWP2E7R.js → chunk-BSEXEYNX.js} +2 -2
- package/dist-cli/chunks/{chunk-NQFJOCSF.js → chunk-CM6ZKZW7.js} +2 -2
- package/dist-cli/chunks/{chunk-ZMJ75EDG.js → chunk-DNVABCEC.js} +2 -2
- package/dist-cli/chunks/{chunk-2S7BKUP2.js → chunk-E33A4AIR.js} +2 -2
- package/dist-cli/chunks/{chunk-GXAB52K7.js → chunk-EFMOXYDD.js} +2 -2
- package/dist-cli/chunks/{chunk-TIAEYO6I.js → chunk-EV4P5UBP.js} +2 -2
- package/dist-cli/chunks/{chunk-JHXETDVC.js → chunk-G5IUIGGC.js} +1 -1
- package/dist-cli/chunks/chunk-GMLOCV3E.js +312 -0
- package/dist-cli/chunks/{chunk-ZLVRYXZ7.js → chunk-GRN2FHVW.js} +1 -1
- package/dist-cli/chunks/{chunk-A5FXX5PJ.js → chunk-HFFXPUEP.js} +1 -1
- package/dist-cli/chunks/chunk-HG6T4OOR.js +4 -0
- package/dist-cli/chunks/{chunk-OW5XHAA4.js → chunk-HNT2OXPZ.js} +1 -1
- package/dist-cli/chunks/chunk-IPEURNLI.js +24 -0
- package/dist-cli/chunks/chunk-IR44SFBA.js +5 -0
- package/dist-cli/chunks/chunk-JMSLXZFW.js +4 -0
- package/dist-cli/chunks/{chunk-EFR5DVNP.js → chunk-JPXQKLNH.js} +1 -1
- package/dist-cli/chunks/chunk-K3EC6JDE.js +4 -0
- package/dist-cli/chunks/{chunk-YGMEDJKJ.js → chunk-KHX65HAU.js} +2 -2
- package/dist-cli/chunks/{chunk-EQK5MJCU.js → chunk-LWOVKHRC.js} +2 -2
- package/dist-cli/chunks/{chunk-5OK3LCEJ.js → chunk-MQN5DWTI.js} +2 -2
- package/dist-cli/chunks/{chunk-TTASWLKM.js → chunk-N3BXQEUF.js} +1 -1
- package/dist-cli/chunks/{chunk-UCHW7ZHR.js → chunk-N5OSV26B.js} +2 -2
- package/dist-cli/chunks/chunk-PHNURIH3.js +4 -0
- package/dist-cli/chunks/{chunk-AFV32WZT.js → chunk-PP2KNVXP.js} +3 -3
- package/dist-cli/chunks/{chunk-XJU2QIRY.js → chunk-PROKNJVY.js} +2 -2
- package/dist-cli/chunks/chunk-QXLLY4IM.js +7 -0
- package/dist-cli/chunks/{chunk-HT6GFZOZ.js → chunk-RNQTOGM7.js} +1 -1
- package/dist-cli/chunks/{chunk-CN6XYYEA.js → chunk-RPNKKVBN.js} +27 -27
- package/dist-cli/chunks/{chunk-LN3RNW6X.js → chunk-RSNLI2NH.js} +2 -2
- package/dist-cli/chunks/{chunk-YCCCPFWT.js → chunk-RZGHV2WI.js} +2 -2
- package/dist-cli/chunks/chunk-SGGL3AFV.js +497 -0
- package/dist-cli/chunks/chunk-SH5ETJKG.js +4 -0
- package/dist-cli/chunks/{chunk-77ZHQJZR.js → chunk-T6J4YP56.js} +2 -2
- package/dist-cli/chunks/{chunk-MGDSJZ37.js → chunk-TWUE7WF5.js} +2 -2
- package/dist-cli/chunks/{chunk-SA6XVI55.js → chunk-U44VEQRN.js} +1 -1
- package/dist-cli/chunks/{chunk-IZKHOM37.js → chunk-URLVQHC3.js} +1 -1
- package/dist-cli/chunks/{chunk-GAJQSITE.js → chunk-VANZFTUE.js} +1 -1
- package/dist-cli/chunks/{chunk-EGAGZHO6.js → chunk-VB2YBH46.js} +1 -1
- package/dist-cli/chunks/{chunk-H23KWIKA.js → chunk-VFU2SJ7M.js} +2 -2
- package/dist-cli/chunks/{chunk-34IQM22N.js → chunk-VUBJ6FXU.js} +15 -15
- package/dist-cli/chunks/{chunk-NM2L2QV4.js → chunk-W5PATILQ.js} +2 -2
- package/dist-cli/chunks/chunk-WI5V4TYG.js +38 -0
- package/dist-cli/chunks/{chunk-6PL2CCGP.js → chunk-XTRHQAOV.js} +2 -2
- package/dist-cli/chunks/chunk-XWUTJLBM.js +27 -0
- package/dist-cli/chunks/{chunk-5DAIA77C.js → chunk-XYRUQQUR.js} +2 -2
- package/dist-cli/chunks/chunk-YBFB3RM7.js +4 -0
- package/dist-cli/chunks/chunk-YGQVQ2VG.js +4 -0
- package/dist-cli/chunks/{chunk-CTG7HBCA.js → chunk-YINACV32.js} +1 -1
- package/dist-cli/chunks/chunk-YV7ERO2V.js +5 -0
- package/dist-cli/chunks/{cleanup-KRIATKFH.js → cleanup-GVFHQ3KH.js} +2 -2
- package/dist-cli/chunks/cli-version-DPX5MA2M.js +4 -0
- package/dist-cli/chunks/{compat-6PTQ3QEA.js → compat-AYRTXYAM.js} +2 -2
- package/dist-cli/chunks/{config-ETGDUANO.js → config-K7LOOV62.js} +2 -2
- package/dist-cli/chunks/connect-H3CNY4IO.js +4 -0
- package/dist-cli/chunks/control-SMHZ2CF5.js +4 -0
- package/dist-cli/chunks/daemon-TEZUNI73.js +4 -0
- package/dist-cli/chunks/{debug-WIIB6ZKC.js → debug-ELGHG57T.js} +3 -3
- package/dist-cli/chunks/{desktop-TD7Q5LNB.js → desktop-4G7FK3MP.js} +3 -3
- package/dist-cli/chunks/{detox-7GNR33VM.js → detox-JKXGEJIZ.js} +2 -2
- package/dist-cli/chunks/{device-QOR3PGUF.js → device-IV3AR6KG.js} +2 -2
- package/dist-cli/chunks/{diagnose-RRCBLP6E.js → diagnose-3ERGF7EW.js} +2 -2
- package/dist-cli/chunks/{disk-cleanup-MJUGJPXT.js → disk-cleanup-ALFEVZ4B.js} +2 -2
- package/dist-cli/chunks/do-chain-K2B4OHM7.js +5 -0
- package/dist-cli/chunks/drivers-KJYXA3M3.js +4 -0
- package/dist-cli/chunks/env-2KF6IYZE.js +4 -0
- package/dist-cli/chunks/{film-D7Y64LID.js → film-UQXJFAD5.js} +3 -3
- package/dist-cli/chunks/flow-ASTUH56E.js +4 -0
- package/dist-cli/chunks/help-SNNYFELA.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-JGURVR2Z.js → hidden-runtime-alias-VJCWCFVO.js} +2 -2
- package/dist-cli/chunks/{home-paths-4ICFIGXO.js → home-paths-EGUZZ6J6.js} +2 -2
- package/dist-cli/chunks/inspect-XANAADQT.js +4 -0
- package/dist-cli/chunks/install-desktop-JKQA7UY6.js +4 -0
- package/dist-cli/chunks/{login-RU33QR2G.js → login-6KQGD7HK.js} +2 -2
- package/dist-cli/chunks/{logout-2IUG3Y5J.js → logout-2FCOVLBC.js} +2 -2
- package/dist-cli/chunks/{maestro-2MXTGG7I.js → maestro-HPSSEVJD.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-2PYIFGLR.js → maestro-generate-KQQ6JHMR.js} +5 -5
- package/dist-cli/chunks/{mode-3DAPG3HF.js → mode-SH7KRZET.js} +2 -2
- package/dist-cli/chunks/{optional-demo-registry-BWSDJF2Z.js → optional-demo-registry-NAMCAVFX.js} +2 -2
- package/dist-cli/chunks/{perf-2TKPWB4N.js → perf-LWKAHXUL.js} +2 -2
- package/dist-cli/chunks/{permissions-5CSMHYNA.js → permissions-EZTKWTXV.js} +2 -2
- package/dist-cli/chunks/platform-KSOJIVN5.js +6 -0
- package/dist-cli/chunks/privacy-EJULWP7L.js +4 -0
- package/dist-cli/chunks/{record-I2HJCFP3.js → record-2IC7BAQN.js} +3 -3
- package/dist-cli/chunks/{report-issue-A4FZWBOC.js → report-issue-MMX6HOQO.js} +2 -2
- package/dist-cli/chunks/reset-PKFZA4NC.js +4 -0
- package/dist-cli/chunks/resolve-target-AFKU3BRE.js +4 -0
- package/dist-cli/chunks/runtime-XHWWPOIN.js +4 -0
- package/dist-cli/chunks/{screenshot-command-UFW5BFHP.js → screenshot-command-JYUXDVSA.js} +3 -3
- package/dist-cli/chunks/{screenshot-layers-5BIAL4YN.js → screenshot-layers-OGRY6AA3.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-EHYS3BV2.js → screenshots-capture-QHDN65XS.js} +2 -2
- package/dist-cli/chunks/{serve-O4FDM3AC.js → serve-W4BKAG4J.js} +3 -3
- package/dist-cli/chunks/setup-WJPMPSAC.js +4 -0
- package/dist-cli/chunks/sim-client-UOQGFBPO.js +4 -0
- package/dist-cli/chunks/{skills-ZK55SY32.js → skills-OPPXOD63.js} +2 -2
- package/dist-cli/chunks/state-TDAN7BOM.js +14 -0
- package/dist-cli/chunks/{storage-WP33ISEM.js → storage-CFB2YGLY.js} +2 -2
- package/dist-cli/chunks/store-4TEED4ZU.js +4 -0
- package/dist-cli/chunks/telemetry-S6N7CV6G.js +4 -0
- package/dist-cli/chunks/{timeline-DKGW5S4I.js → timeline-ASOOVP4C.js} +2 -2
- package/dist-cli/chunks/{upgrade-LL7G4B7G.js → upgrade-6MVJISHG.js} +2 -2
- package/dist-cli/chunks/upload-CBNIRFEW.js +4 -0
- package/dist-cli/chunks/{version-YLWR5G4F.js → version-5GS7CWRL.js} +2 -2
- package/dist-cli/chunks/{web-QELZ4CP6.js → web-QRRMYMV4.js} +2 -2
- package/dist-cli/chunks/welcome-33FXMAMB.js +5 -0
- package/dist-cli/chunks/{what-happened-MIOMZWM5.js → what-happened-GAZJGKXX.js} +2 -2
- package/dist-cli/chunks/ws-bridge-DIXUAPLQ.js +4 -0
- 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 +1 -1
- 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 +336 -0
- package/dist-lib/bridge-contract-input.mjs +303 -0
- package/dist-lib/bridge-contract.cjs +29 -1
- package/dist-lib/bridge-contract.mjs +19 -0
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +32 -18
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +5 -1
- 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 +214 -594
- 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 +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 +273 -657
- package/dist-lib/sdk.mjs +271 -652
- package/dist-lib/skills.cjs +190 -287
- package/dist-lib/vite.cjs +1 -1
- package/package.json +9 -6
- package/skills/contrast/SKILL.md +3 -0
- package/skills/rnx-debug/SKILL.md +8 -0
- package/skills/rnx-test/SKILL.md +21 -0
- package/src/bridge-contract-input.ts +359 -0
- package/src/bridge-contract.ts +121 -1
- package/src/host/bridge-host.ts +7 -12
- package/src/index.ts +7 -0
- package/src/sim-client.ts +12 -3
- package/dist-cli/chunks/chunk-3X6IBUBX.js +0 -38
- package/dist-cli/chunks/chunk-7B37IZBN.js +0 -15
- package/dist-cli/chunks/chunk-DMPF2D24.js +0 -4
- package/dist-cli/chunks/chunk-DW37EVX5.js +0 -767
- package/dist-cli/chunks/chunk-DWFIH7CB.js +0 -32
- package/dist-cli/chunks/chunk-GUI3PDH2.js +0 -27
- package/dist-cli/chunks/chunk-KLF3K6ZZ.js +0 -4
- package/dist-cli/chunks/chunk-M5QCGLXR.js +0 -944
- package/dist-cli/chunks/chunk-M6SKQGAN.js +0 -5
- package/dist-cli/chunks/chunk-NAYLPOC5.js +0 -24
- package/dist-cli/chunks/chunk-VIND4SP3.js +0 -124
- package/dist-cli/chunks/chunk-XXNLYR64.js +0 -5
- package/dist-cli/chunks/chunk-ZFM24DOX.js +0 -4
- package/dist-cli/chunks/cli-version-SYGNHGFR.js +0 -4
- package/dist-cli/chunks/control-RBTNOLQM.js +0 -4
- package/dist-cli/chunks/daemon-N3SC5DK6.js +0 -4
- package/dist-cli/chunks/drivers-W6E3BZH4.js +0 -4
- package/dist-cli/chunks/flow-7QAE2V5Y.js +0 -4
- package/dist-cli/chunks/help-NLD6KWVG.js +0 -4
- package/dist-cli/chunks/inspect-C347BG52.js +0 -4
- package/dist-cli/chunks/install-desktop-YR6TWZYK.js +0 -4
- package/dist-cli/chunks/privacy-PWWC2BXO.js +0 -4
- package/dist-cli/chunks/reset-Y3PBPFYA.js +0 -4
- package/dist-cli/chunks/runtime-IC6NVVGA.js +0 -4
- package/dist-cli/chunks/setup-Y4QGSJBM.js +0 -4
- package/dist-cli/chunks/state-KFLAZNEY.js +0 -14
- package/dist-cli/chunks/store-VEE22CAY.js +0 -4
- package/dist-cli/chunks/telemetry-PZV4BISJ.js +0 -4
- package/dist-cli/chunks/upload-Y4C3YZDK.js +0 -4
- package/dist-cli/chunks/welcome-ZPKA5PZJ.js +0 -5
- package/dist-lib/mcp.cjs +0 -673
- package/dist-lib/mcp.mjs +0 -641
- package/src/mcp.ts +0 -791
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{m as O}from"./chunk-
|
|
4
|
+
import{m as O}from"./chunk-WI5V4TYG.js";import"./chunk-GMLOCV3E.js";import{t as E,v as F,x as N}from"./chunk-XWUTJLBM.js";import"./chunk-VANZFTUE.js";import{r as S}from"./chunk-3VBVEDDA.js";import"./chunk-G5IUIGGC.js";import{createHash as I,randomUUID as q}from"node:crypto";import{createReadStream as D}from"node:fs";import m from"node:fs/promises";import f from"node:path";var T="/__camera-fixtures/",J=new Set([".m4v",".mov",".mp4",".webm"]);function _(){console.log(`
|
|
5
5
|
rnx camera \u2014 control the simulator camera source
|
|
6
6
|
|
|
7
7
|
usage:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
4
|
import{execFileSync as S,execSync as x}from"node:child_process";var g=new WeakMap,l=new Set,b=!1;function f(){return{platform:process.platform,env:process.env}}function A(e){return S("/bin/ps",["-p",String(e),"-o","command="],{encoding:"utf8"}).trim()}function w(e=f()){return e.platform==="linux"&&e.env.GITHUB_ACTIONS==="true"&&e.env.RUNNER_OS==="Linux"}function L(e){let r=String(e);return/^--disable-gpu(?:=.*)?$/i.test(r)||/^--enable-unsafe-swiftshader(?:=.*)?$/i.test(r)||/^--use-angle=(?:swiftshader|swiftshader-webgl)$/i.test(r)||/^--use-gl=swiftshader$/i.test(r)}function I(e){return e.match(/(?:^|\s)(--disable-gpu(?:=[^\s]+)?|--enable-unsafe-swiftshader(?:=[^\s]+)?|--use-angle=(?:swiftshader|swiftshader-webgl)|--use-gl=swiftshader)(?=\s|$)/i)?.[1]??null}function k(e){return e==="darwin"?"metal":e==="linux"?"vulkan":"default"}function y(e,r=f()){if(w(r))return;let n=I(e);if(n)throw new Error(`[reap-browser] refused software-rendering Chrome process argument ${n}`);let o=k(r.platform),t=e.split(/\s+/);if(!t.includes(`--use-angle=${o}`)||!t.includes("--enable-gpu"))throw new Error(`[reap-browser] Chrome process did not retain the required ${o} GPU arguments`);if(r.platform==="darwin"&&e.includes("/Applications/Google Chrome.app/"))throw new Error("[reap-browser] refused the user's installed Google Chrome; use Playwright channel chromium")}function E(e){if(!e||typeof e!="object")return[];let n=e.gpu;if(!n||typeof n!="object")return[];let o=n,t=[],a=o.auxAttributes;if(a&&typeof a=="object")for(let s of Object.values(a))typeof s=="string"&&t.push(s);let i=o.devices;if(Array.isArray(i)){for(let s of i)if(!(!s||typeof s!="object"))for(let u of Object.values(s))typeof u=="string"&&t.push(u)}return t}function B(e){if(!e||typeof e!="object")return null;let r=e;if(!Array.isArray(r.processInfo))return null;for(let n of r.processInfo){if(!n||typeof n!="object")continue;let o=n;if(o.type==="browser"&&typeof o.id=="number"&&Number.isInteger(o.id)&&o.id>0)return o.id}return null}function G(e,r=f()){if(w(r))return;let o=E(e).join(" | ");if(!o||/swiftshader|llvmpipe|software rasterizer/i.test(o))throw new Error(`[reap-browser] Chrome reported a software renderer${o?`: ${o}`:""}`);if(r.platform==="darwin"&&!/metal/i.test(o))throw new Error(`[reap-browser] Chrome did not report an ANGLE Metal renderer: ${o}`)}function p(e){if(e&&typeof e=="object"){let n=g.get(e);if(n!==void 0)return n}let r=e;if(r&&typeof r.process=="function")try{let n=r.process();if(n&&typeof n.pid=="number"&&n.pid>0)return n.pid}catch{}if(r&&typeof r.browser=="function")try{let n=r.browser();if(n)return p(n)}catch{}return null}function h(e){let r=[];try{r=x(`pgrep -P ${e} || true`).toString().split(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
4
|
import{randomUUID as x}from"node:crypto";import n from"node:fs";import{homedir as I}from"node:os";import i from"node:path";var $="SOOTSIM_HOME",B="active",M="daemon.json",T="dev-bridges",J="config.json",L=3e4;function s(){let e=process.env[$];return e&&e.length>0?i.resolve(e):i.join(I(),".sootsim")}function U(){if(process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1")return!1;let e=process.env.SOOTSIM_DEV;if(e==="1"||e==="true")return!0;if(e==="0"||e==="false")return!1;let t=process.argv[1];if(!t)return!1;try{return n.realpathSync(t).includes(`${i.sep}packages${i.sep}sootsim${i.sep}`)}catch{return!1}}function V(){return process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1"?!1:process.env.IS_TAMAGUI_DEV==="1"}function ce(){return U()||V()}function v(){return i.join(s(),"runtimes")}function H(e){return i.join(v(),e)}function w(){return i.join(v(),B)}function A(){return i.join(s(),"electron")}function se(){return i.join(A(),"userData")}function ae(e){return i.join(A(),e)}function G(){return i.join(s(),"profiles")}function ue(){return i.join(s(),"camera-fixtures")}function K(){return i.join(s(),"daemon-app")}function X(){return i.join(K(),"SootSim Daemon.app")}function fe(){return i.join(X(),"Contents","MacOS","sootsim-daemon")}function q(){return i.join(s(),"cache")}function m(){return i.join(s(),M)}function y(){return i.join(s(),T)}function O(e){if(!Number.isInteger(e)||e<=0)throw new Error(`invalid development bridge port: ${e}`);return i.join(y(),`${e}.json`)}function b(){return i.join(s(),J)}function p(){try{let e=n.readFileSync(b(),"utf8"),t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function P(e){h();let t=p(),r={...t,...e};e.settings&&typeof e.settings=="object"&&(r.settings={...t.settings&&typeof t.settings=="object"?t.settings:{},...e.settings});let c=`${b()}.tmp`;return n.writeFileSync(c,`${JSON.stringify(r,null,2)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{e as p}from"./chunk-
|
|
4
|
+
import{e as p}from"./chunk-VUBJ6FXU.js";import{a as c,b as l}from"./chunk-EFMOXYDD.js";import{a}from"./chunk-N5OSV26B.js";async function g(e,i){if(i)return i.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let r=a();return r?.origin?r.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function x(e,i={}){let r=c();if(r||(process.stderr.write(`
|
|
5
5
|
rnx ${e} needs auth before it can check recording access.
|
|
6
6
|
|
|
7
7
|
pick one:
|
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
/*! rnx v0.1.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
async function p({bridge:t,simId:a,maxMs:n,pollMs:s=50,stablePolls:o=3,strict:i=!1}){let c=await t.send({type:"evaluate",simId:a,code:`(async () => {
|
|
5
|
+
const start = Date.now()
|
|
6
|
+
const deadline = start + ${Math.max(0,Math.round(n))}
|
|
7
|
+
const pollMs = ${Math.max(1,Math.round(s))}
|
|
8
|
+
const requiredStablePolls = ${Math.max(1,Math.round(o))}
|
|
9
|
+
const strict = ${i?"true":"false"}
|
|
10
|
+
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
|
|
11
|
+
|
|
12
|
+
// route-aware settle: a tap that pushes/pops a screen is async \u2014 the
|
|
13
|
+
// old screen still renders for a moment, then the new one mounts and
|
|
14
|
+
// its content loads. a pure layout-hash check reports "idle" on the
|
|
15
|
+
// outgoing screen or on the incoming skeleton, so a driver re-taps
|
|
16
|
+
// and stacks duplicate navigations. drain any in-flight screen
|
|
17
|
+
// transition FIRST, bounded by the overall budget. when no
|
|
18
|
+
// transition is happening this returns in ~80ms (startWindowMs), so
|
|
19
|
+
// a plain button tap barely pays for it.
|
|
20
|
+
try {
|
|
21
|
+
const wfst = window.__sootsimTest?.waitForScreenTransitions
|
|
22
|
+
if (typeof wfst === 'function') {
|
|
23
|
+
const remaining = deadline - Date.now()
|
|
24
|
+
if (remaining > 120) {
|
|
25
|
+
await wfst({
|
|
26
|
+
timeoutMs: Math.min(remaining - 80, 4000),
|
|
27
|
+
settleMs: 64,
|
|
28
|
+
startWindowMs: 80,
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
} catch {}
|
|
33
|
+
|
|
34
|
+
const readSnapshot = async () => {
|
|
35
|
+
let animating = false
|
|
36
|
+
let layoutDirty = false
|
|
37
|
+
let pendingFetches = 0
|
|
38
|
+
let requestTotal = 0
|
|
39
|
+
let requestInFlight = 0
|
|
40
|
+
let renderStatsAvailable = false
|
|
41
|
+
try {
|
|
42
|
+
const stats = await window.__sootsimRenderHost?.queryStats?.()
|
|
43
|
+
if (stats) {
|
|
44
|
+
renderStatsAvailable = true
|
|
45
|
+
animating =
|
|
46
|
+
stats.hasActiveAnims === true ||
|
|
47
|
+
stats.hasActiveNativeAnimations === true ||
|
|
48
|
+
stats.hasPendingAnimationFrames === true
|
|
49
|
+
layoutDirty =
|
|
50
|
+
stats.layoutDirty === true && stats.renderRequested === true
|
|
51
|
+
// a freshly-pushed screen showing a skeleton is layout-stable
|
|
52
|
+
// but not actually settled \u2014 its data/images are still in
|
|
53
|
+
// flight. treat bounded image-loader fetches as not-idle so
|
|
54
|
+
// settle waits for real content, capped by the budget.
|
|
55
|
+
const pf = stats.memory && stats.memory.imageLoader
|
|
56
|
+
? stats.memory.imageLoader.pendingFetches
|
|
57
|
+
: 0
|
|
58
|
+
pendingFetches = typeof pf === 'number' ? pf : 0
|
|
59
|
+
}
|
|
60
|
+
} catch {}
|
|
61
|
+
try {
|
|
62
|
+
const counts = await window.__sootsimTest?.getRequestCounts?.()
|
|
63
|
+
requestTotal = typeof counts?.total === 'number' ? counts.total : 0
|
|
64
|
+
requestInFlight = typeof counts?.inFlight === 'number' ? counts.inFlight : 0
|
|
65
|
+
} catch {}
|
|
66
|
+
const root = window.__sootsimRoot
|
|
67
|
+
const nodes = []
|
|
68
|
+
if (root) {
|
|
69
|
+
const walk = (n) => {
|
|
70
|
+
if (n.layout && n.layout.width > 0) {
|
|
71
|
+
nodes.push(Math.round(n.layout.x) + ',' + Math.round(n.layout.y) + ',' + Math.round(n.layout.width))
|
|
72
|
+
}
|
|
73
|
+
for (const c of n.children || []) walk(c)
|
|
74
|
+
}
|
|
75
|
+
walk(root)
|
|
76
|
+
}
|
|
77
|
+
return { layout: nodes.join(';'), animating, layoutDirty, pendingFetches, renderStatsAvailable, requestTotal, requestInFlight }
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// how long generic background network is allowed to keep us waiting AFTER
|
|
81
|
+
// the screen is otherwise visually settled. apps with continuous traffic
|
|
82
|
+
// (polling, realtime sockets, a tap that fires 20-50 fetches) never reach
|
|
83
|
+
// requestInFlight===0 / a stable requestTotal, so requiring full network
|
|
84
|
+
// quiet burns the ENTIRE budget on every command \u2014 the leading idle that
|
|
85
|
+
// failed PR-preview recordings for network-heavy apps (3pc fight-pulse).
|
|
86
|
+
// layout-stability + the image-loader already prove visible content
|
|
87
|
+
// loaded (a data load changes layout; an image load shows in the loader),
|
|
88
|
+
// so the generic request counters are a courtesy, not a gate: honor them
|
|
89
|
+
// only within this grace once the screen is visually still.
|
|
90
|
+
const networkQuietGraceMs = 1200
|
|
91
|
+
let lastLayout = ''
|
|
92
|
+
let lastRequestTotal = -1
|
|
93
|
+
let stable = 0
|
|
94
|
+
let visuallyStillSince = 0
|
|
95
|
+
while (Date.now() < deadline) {
|
|
96
|
+
const snapshot = await readSnapshot()
|
|
97
|
+
const strictOk =
|
|
98
|
+
!strict ||
|
|
99
|
+
(snapshot.renderStatsAvailable && !snapshot.animating && !snapshot.layoutDirty)
|
|
100
|
+
// visually settled: no animations, no image content loading, layout
|
|
101
|
+
// unchanged since the last poll.
|
|
102
|
+
const visuallyStill =
|
|
103
|
+
strictOk && snapshot.pendingFetches === 0 && snapshot.layout === lastLayout
|
|
104
|
+
// generic network quiet: nothing in flight and no new requests issued.
|
|
105
|
+
const networkQuiet =
|
|
106
|
+
snapshot.requestInFlight === 0 && snapshot.requestTotal === lastRequestTotal
|
|
107
|
+
if (visuallyStill) {
|
|
108
|
+
stable++
|
|
109
|
+
if (visuallyStillSince === 0) visuallyStillSince = Date.now()
|
|
110
|
+
// settle once the screen has held still long enough AND either the
|
|
111
|
+
// network is genuinely quiet OR it has refused to quiet within the
|
|
112
|
+
// grace (continuous background traffic must not block forever).
|
|
113
|
+
if (
|
|
114
|
+
stable >= requiredStablePolls &&
|
|
115
|
+
(networkQuiet || Date.now() - visuallyStillSince >= networkQuietGraceMs)
|
|
116
|
+
) {
|
|
117
|
+
return { settled: true, elapsed: Date.now() - start }
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
stable = 0
|
|
121
|
+
visuallyStillSince = 0
|
|
122
|
+
}
|
|
123
|
+
lastLayout = snapshot.layout
|
|
124
|
+
lastRequestTotal = snapshot.requestTotal
|
|
125
|
+
await sleep(pollMs)
|
|
126
|
+
}
|
|
127
|
+
return { settled: false, elapsed: Date.now() - start }
|
|
128
|
+
})()`},{timeoutMs:n+1e3}),{elapsed:r,settled:e}=c??{};return{elapsed:typeof r=="number"?r:n,settled:e===!0}}var g=`(() => {
|
|
129
|
+
const spec = window.SootSim?.state?.engineSnapshot?.windowState?.deviceSpec
|
|
130
|
+
return spec && spec.width > 0 && spec.height > 0
|
|
131
|
+
? { width: spec.width, height: spec.height }
|
|
132
|
+
: null
|
|
133
|
+
})()`,m={initialWaitMs:3e3,deadlineMs:5e3,retryWaitMs:700},b={initialWaitMs:1200,deadlineMs:2500,retryWaitMs:700};function T(t,a={}){return{...t?m:b,...a}}function x(t){return!(!t||t.hit===!1||t.ok===!1||t.requestedTargetMatched===!1||t.pointerTapHandled===!1&&!t.keyboardOpened&&!t.isTextInput)}function I(t,a){return{nodeId:t.target?.nodeId??t.match?.nodeId??t.node?.nodeId??null,id:t.target?.id??t.match?.id??t.node?.id??null,testID:t.target?.testID??t.match?.testID??t.node?.testID??null,text:t.target?.text??t.target?.accessibilityLabel??t.match?.text??t.match?.accessibilityLabel??t.node?.text??a??null,type:t.target?.type??t.match?.type??t.node?.type??null}}async function h(t,a){let n=T(!!a.agent,a.timing),s=0,o=null,i=null;try{await p({bridge:t,maxMs:n.initialWaitMs,pollMs:32,stablePolls:2})}catch{}let c=Date.now()+n.deadlineMs,r=null;for(;Date.now()<=c||s===0;){s++;let e=await a.resolve();if(o=e,e?.error==="bridge-not-ready"||e?.ambiguous||e?.nthOutOfRange)return{payload:e,result:null,attempts:s,failure:"special"};if(e&&typeof e.cx=="number"&&typeof e.cy=="number")if(e.offscreen){i={hit:!1,reason:"offscreen",x:e.cx,y:e.cy,screen:e.screen};let d=`${Math.round(e.cx)},${Math.round(e.cy)}`;if(r===d)return{payload:e,result:i,attempts:s,failure:"missed"};r=d}else{r=null;let d=I(e,a.textFallback),l=await t.send({type:"evaluate",code:`(async () => {
|
|
134
|
+
const t = window.__sootsimTest
|
|
135
|
+
if (
|
|
136
|
+
!t ||
|
|
137
|
+
typeof t.inspectAt !== 'function' ||
|
|
138
|
+
typeof t.resolveTapTarget !== 'function'
|
|
139
|
+
) {
|
|
140
|
+
return { error: 'tap-target-inspection-unavailable' }
|
|
141
|
+
}
|
|
142
|
+
const requestedTarget = ${JSON.stringify(d)}
|
|
143
|
+
const inspected = await t.inspectAt(${e.cx}, ${e.cy})
|
|
144
|
+
const resolved =
|
|
145
|
+
inspected && typeof inspected.nodeId === 'number'
|
|
146
|
+
? await t.resolveTapTarget(inspected.nodeId)
|
|
147
|
+
: null
|
|
148
|
+
const node = (resolved && resolved.target) || inspected
|
|
149
|
+
const coordinateTarget = node
|
|
150
|
+
? {
|
|
151
|
+
nodeId: node.nodeId ?? null,
|
|
152
|
+
id: node.id ?? null,
|
|
153
|
+
testID: node.testID ?? null,
|
|
154
|
+
text: node.text ?? node.accessibilityLabel ?? null,
|
|
155
|
+
type: node.type ?? null,
|
|
156
|
+
}
|
|
157
|
+
: null
|
|
158
|
+
const coordinateAncestors = Array.isArray(inspected?.ancestors)
|
|
159
|
+
? inspected.ancestors
|
|
160
|
+
: []
|
|
161
|
+
const ancestorMatchesRequested = coordinateAncestors.some(
|
|
162
|
+
(ancestor) =>
|
|
163
|
+
(typeof requestedTarget.nodeId === 'number' &&
|
|
164
|
+
ancestor?.nodeId === requestedTarget.nodeId) ||
|
|
165
|
+
(requestedTarget.testID &&
|
|
166
|
+
ancestor?.testID === requestedTarget.testID) ||
|
|
167
|
+
(requestedTarget.id && ancestor?.id === requestedTarget.id),
|
|
168
|
+
)
|
|
169
|
+
const requestedTargetMatched =
|
|
170
|
+
coordinateTarget === null
|
|
171
|
+
? false
|
|
172
|
+
: typeof requestedTarget.nodeId === 'number' &&
|
|
173
|
+
typeof coordinateTarget.nodeId === 'number'
|
|
174
|
+
? requestedTarget.nodeId === coordinateTarget.nodeId ||
|
|
175
|
+
ancestorMatchesRequested
|
|
176
|
+
: requestedTarget.testID && coordinateTarget.testID
|
|
177
|
+
? requestedTarget.testID === coordinateTarget.testID
|
|
178
|
+
|| ancestorMatchesRequested
|
|
179
|
+
: requestedTarget.id && coordinateTarget.id
|
|
180
|
+
? requestedTarget.id === coordinateTarget.id
|
|
181
|
+
|| ancestorMatchesRequested
|
|
182
|
+
: ancestorMatchesRequested
|
|
183
|
+
if (!requestedTargetMatched) {
|
|
184
|
+
return {
|
|
185
|
+
requestedTargetMatched,
|
|
186
|
+
requestedTarget,
|
|
187
|
+
coordinateTarget,
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
if (typeof t.activatePressAt !== 'function') {
|
|
191
|
+
return { error: 'tap-target-activation-unavailable' }
|
|
192
|
+
}
|
|
193
|
+
const activation = await t.activatePressAt(
|
|
194
|
+
${e.cx},
|
|
195
|
+
${e.cy},
|
|
196
|
+
requestedTarget.nodeId,
|
|
197
|
+
)
|
|
198
|
+
if (activation?.ok) {
|
|
199
|
+
window.dispatchEvent(
|
|
200
|
+
new CustomEvent('sootsim:agentAction', {
|
|
201
|
+
detail: {
|
|
202
|
+
type: 'tap',
|
|
203
|
+
x: ${e.cx},
|
|
204
|
+
y: ${e.cy},
|
|
205
|
+
target: requestedTarget,
|
|
206
|
+
},
|
|
207
|
+
}),
|
|
208
|
+
)
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
activation,
|
|
212
|
+
requestedTargetMatched,
|
|
213
|
+
requestedTarget,
|
|
214
|
+
coordinateTarget,
|
|
215
|
+
}
|
|
216
|
+
})()`});if(l?.error)return{payload:e,result:{hit:!1,reason:l.error,requestedTarget:d},attempts:s,failure:"special"};if(l?.requestedTargetMatched===!1)return{payload:e,result:{hit:!1,reason:"target-covered",...l},attempts:s,failure:"missed"};let y=l?.activation?.tap??l?.activation,f=y&&typeof y=="object"?{...y,...l?.activation,...l}:{hit:!!y,...l};if(i=f,x(f))return{payload:e,result:f,attempts:s}}let u=c-Date.now();if(u<=0)break;try{await p({bridge:t,maxMs:Math.min(u,n.retryWaitMs),pollMs:32,stablePolls:2})}catch{await new Promise(d=>setTimeout(d,Math.min(120,u)))}}return{payload:o,result:i,attempts:s,failure:o&&typeof o.cx=="number"?"missed":"not-found"}}async function F(t,a,n,s){return t.send({type:"tap",x:a,y:n,...s?{target:s}:{}})}async function q(t,a,n={}){let s=JSON.stringify(a);return h(t,{agent:n.agent,timing:n.timing,resolve:()=>t.send({type:"evaluate",code:`(async () => {
|
|
217
|
+
const t = window.__sootsimTest
|
|
218
|
+
if (!t) return null
|
|
219
|
+
const n = (await t.findByTestId(${s})) || (await t.findById(${s}))
|
|
220
|
+
if (!n || !n.absolutePosition || !n.layout) return { cx: null }
|
|
221
|
+
const resolved =
|
|
222
|
+
typeof n.nodeId === 'number' && typeof t.resolveTapTarget === 'function'
|
|
223
|
+
? await t.resolveTapTarget(n.nodeId)
|
|
224
|
+
: null
|
|
225
|
+
const target = (resolved && resolved.target) || n
|
|
226
|
+
const cx =
|
|
227
|
+
resolved && typeof resolved.cx === 'number'
|
|
228
|
+
? resolved.cx
|
|
229
|
+
: n.absolutePosition.x + (n.layout.width || 0) / 2
|
|
230
|
+
const cy =
|
|
231
|
+
resolved && typeof resolved.cy === 'number'
|
|
232
|
+
? resolved.cy
|
|
233
|
+
: n.absolutePosition.y + (n.layout.height || 0) / 2
|
|
234
|
+
const scr = ${g}
|
|
235
|
+
const offscreen =
|
|
236
|
+
!!scr && (cx < 0 || cy < 0 || cx > scr.width || cy > scr.height)
|
|
237
|
+
return {
|
|
238
|
+
cx,
|
|
239
|
+
cy,
|
|
240
|
+
...(offscreen ? { offscreen: true, screen: scr } : {}),
|
|
241
|
+
match: {
|
|
242
|
+
nodeId: n.nodeId ?? null,
|
|
243
|
+
id: n.id,
|
|
244
|
+
testID: n.testID,
|
|
245
|
+
text: n.text ?? n.accessibilityLabel ?? null,
|
|
246
|
+
type: n.type,
|
|
247
|
+
},
|
|
248
|
+
target: {
|
|
249
|
+
nodeId: target.nodeId ?? null,
|
|
250
|
+
id: target.id,
|
|
251
|
+
testID: target.testID,
|
|
252
|
+
text:
|
|
253
|
+
target.text ??
|
|
254
|
+
target.accessibilityLabel ??
|
|
255
|
+
n.text ??
|
|
256
|
+
n.accessibilityLabel ??
|
|
257
|
+
null,
|
|
258
|
+
type: target.type,
|
|
259
|
+
},
|
|
260
|
+
strategy: (resolved && resolved.strategy) || 'matched-node',
|
|
261
|
+
}
|
|
262
|
+
})()`})})}async function M(t,a,n={},s={}){let o=JSON.stringify({query:a,exact:!!n.exact,role:n.role??null,within:n.within??null,minX:n.minX??null,maxX:n.maxX??null,minY:n.minY??null,maxY:n.maxY??null,near:n.near??null,nth:n.nth??null,first:!!n.first});return h(t,{agent:s.agent,timing:s.timing,textFallback:a,resolve:()=>t.send({type:"evaluate",code:`(async () => {
|
|
263
|
+
const t = window.__sootsimTest
|
|
264
|
+
if (!t) return { error: 'bridge-not-ready' }
|
|
265
|
+
const F = ${o}
|
|
266
|
+
|
|
267
|
+
const res = await t.queryTextCandidates({
|
|
268
|
+
query: F.query,
|
|
269
|
+
exact: !!F.exact,
|
|
270
|
+
...(F.role ? { role: F.role } : {}),
|
|
271
|
+
})
|
|
272
|
+
|
|
273
|
+
let candidates = res.candidates || []
|
|
274
|
+
|
|
275
|
+
candidates = candidates.filter((c) => {
|
|
276
|
+
const ax = c.info.absolutePosition && c.info.absolutePosition.x
|
|
277
|
+
const ay = c.info.absolutePosition && c.info.absolutePosition.y
|
|
278
|
+
if (F.minX !== null && !(ax >= F.minX)) return false
|
|
279
|
+
if (F.maxX !== null && !(ax <= F.maxX)) return false
|
|
280
|
+
if (F.minY !== null && !(ay >= F.minY)) return false
|
|
281
|
+
if (F.maxY !== null && !(ay <= F.maxY)) return false
|
|
282
|
+
if (F.within && !c.ancestorTestIDs.includes(F.within)) return false
|
|
283
|
+
return true
|
|
284
|
+
})
|
|
285
|
+
|
|
286
|
+
if (F.near) {
|
|
287
|
+
candidates.sort((a, b) => {
|
|
288
|
+
const ax = (a.info.absolutePosition && a.info.absolutePosition.x) || 0
|
|
289
|
+
const ay = (a.info.absolutePosition && a.info.absolutePosition.y) || 0
|
|
290
|
+
const bx = (b.info.absolutePosition && b.info.absolutePosition.x) || 0
|
|
291
|
+
const by = (b.info.absolutePosition && b.info.absolutePosition.y) || 0
|
|
292
|
+
return (
|
|
293
|
+
Math.hypot(ax - F.near.x, ay - F.near.y) -
|
|
294
|
+
Math.hypot(bx - F.near.x, by - F.near.y)
|
|
295
|
+
)
|
|
296
|
+
})
|
|
297
|
+
} else {
|
|
298
|
+
candidates.sort((a, b) => {
|
|
299
|
+
const ay = (a.info.absolutePosition && a.info.absolutePosition.y) || 0
|
|
300
|
+
const by = (b.info.absolutePosition && b.info.absolutePosition.y) || 0
|
|
301
|
+
if (Math.abs(ay - by) > 2) return ay - by
|
|
302
|
+
const ax = (a.info.absolutePosition && a.info.absolutePosition.x) || 0
|
|
303
|
+
const bx = (b.info.absolutePosition && b.info.absolutePosition.x) || 0
|
|
304
|
+
return ax - bx
|
|
305
|
+
})
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
const total = candidates.length
|
|
309
|
+
if (total === 0) return { matched: 0, total: 0 }
|
|
310
|
+
|
|
311
|
+
let idx = 0
|
|
312
|
+
if (F.nth !== null) {
|
|
313
|
+
idx = F.nth < 0 ? total + F.nth : F.nth
|
|
314
|
+
if (idx < 0 || idx >= total) {
|
|
315
|
+
return { matched: 0, total, nthOutOfRange: true, nth: F.nth }
|
|
316
|
+
}
|
|
317
|
+
} else if (total > 1 && !F.first && !F.near) {
|
|
318
|
+
return {
|
|
319
|
+
ambiguous: true,
|
|
320
|
+
total,
|
|
321
|
+
candidates: candidates.slice(0, 10).map((c, i) => ({
|
|
322
|
+
idx: i,
|
|
323
|
+
nodeId: c.info.nodeId,
|
|
324
|
+
type: c.info.type,
|
|
325
|
+
testID: c.info.testID,
|
|
326
|
+
text: (c.info.text || '').slice(0, 60),
|
|
327
|
+
abs: c.info.absolutePosition,
|
|
328
|
+
layout: c.info.layout
|
|
329
|
+
? {
|
|
330
|
+
width: Math.round(c.info.layout.width || 0),
|
|
331
|
+
height: Math.round(c.info.layout.height || 0),
|
|
332
|
+
}
|
|
333
|
+
: null,
|
|
334
|
+
ancestorTestIDs: (c.ancestorTestIDs || []).slice(0, 5),
|
|
335
|
+
})),
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
const picked = candidates[idx]
|
|
340
|
+
const n = picked.info
|
|
341
|
+
if (!n.absolutePosition || !n.layout) return { matched: 0, total }
|
|
342
|
+
|
|
343
|
+
const resolved =
|
|
344
|
+
typeof n.nodeId === 'number' &&
|
|
345
|
+
typeof t.resolveTapTarget === 'function'
|
|
346
|
+
? await t.resolveTapTarget(n.nodeId)
|
|
347
|
+
: null
|
|
348
|
+
const target = (resolved && resolved.target) || n
|
|
349
|
+
const cx =
|
|
350
|
+
resolved && typeof resolved.cx === 'number'
|
|
351
|
+
? resolved.cx
|
|
352
|
+
: n.absolutePosition.x + (n.layout.width || 0) / 2
|
|
353
|
+
const cy =
|
|
354
|
+
resolved && typeof resolved.cy === 'number'
|
|
355
|
+
? resolved.cy
|
|
356
|
+
: n.absolutePosition.y + (n.layout.height || 0) / 2
|
|
357
|
+
const scr = ${g}
|
|
358
|
+
const offscreen =
|
|
359
|
+
!!scr && (cx < 0 || cy < 0 || cx > scr.width || cy > scr.height)
|
|
360
|
+
return {
|
|
361
|
+
cx,
|
|
362
|
+
cy,
|
|
363
|
+
...(offscreen ? { offscreen: true, screen: scr } : {}),
|
|
364
|
+
match: {
|
|
365
|
+
nodeId: n.nodeId ?? null,
|
|
366
|
+
id: n.id,
|
|
367
|
+
testID: n.testID,
|
|
368
|
+
type: n.type,
|
|
369
|
+
},
|
|
370
|
+
target: {
|
|
371
|
+
nodeId: target.nodeId ?? null,
|
|
372
|
+
id: target.id,
|
|
373
|
+
testID: target.testID,
|
|
374
|
+
text:
|
|
375
|
+
target.text ??
|
|
376
|
+
target.accessibilityLabel ??
|
|
377
|
+
n.text ??
|
|
378
|
+
n.accessibilityLabel ??
|
|
379
|
+
null,
|
|
380
|
+
type: target.type,
|
|
381
|
+
},
|
|
382
|
+
strategy: (resolved && resolved.strategy) || 'matched-node',
|
|
383
|
+
total,
|
|
384
|
+
idx,
|
|
385
|
+
}
|
|
386
|
+
})()`})})}async function P(t,a,n={}){let s=JSON.stringify(a);return h(t,{agent:n.agent,timing:n.timing,textFallback:a,resolve:async()=>{let o=await t.send({type:"evaluate",code:`(async () => {
|
|
387
|
+
const t = window.__sootsimTest
|
|
388
|
+
if (!t) return { error: 'bridge-not-ready' }
|
|
389
|
+
const byTestId =
|
|
390
|
+
(await t.findByTestId(${s})) || (await t.findById(${s}))
|
|
391
|
+
if (byTestId && byTestId.absolutePosition && byTestId.layout) {
|
|
392
|
+
return {
|
|
393
|
+
strategy: 'testid',
|
|
394
|
+
node: {
|
|
395
|
+
nodeId: byTestId.nodeId ?? null,
|
|
396
|
+
id: byTestId.id,
|
|
397
|
+
testID: byTestId.testID,
|
|
398
|
+
type: byTestId.type,
|
|
399
|
+
text: byTestId.text,
|
|
400
|
+
absolutePosition: byTestId.absolutePosition,
|
|
401
|
+
layout: byTestId.layout,
|
|
402
|
+
},
|
|
403
|
+
screen: ${g},
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
const byText = await t.findByText(${s})
|
|
407
|
+
if (byText && byText.absolutePosition && byText.layout) {
|
|
408
|
+
return {
|
|
409
|
+
strategy: 'text',
|
|
410
|
+
node: {
|
|
411
|
+
nodeId: byText.nodeId ?? null,
|
|
412
|
+
id: byText.id,
|
|
413
|
+
testID: byText.testID,
|
|
414
|
+
type: byText.type,
|
|
415
|
+
text: byText.text,
|
|
416
|
+
absolutePosition: byText.absolutePosition,
|
|
417
|
+
layout: byText.layout,
|
|
418
|
+
},
|
|
419
|
+
screen: ${g},
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
return { strategy: 'none' }
|
|
423
|
+
})()`});if(!o||!("node"in o))return o;let i=o.node,c=i.absolutePosition.x+i.layout.width/2,r=i.absolutePosition.y+i.layout.height/2,e=o.screen??null,u=!!e&&(c<0||r<0||c>e.width||r>e.height);return{...o,cx:c,cy:r,...u?{offscreen:!0,screen:e}:{},target:{id:i.id,testID:i.testID,text:o.strategy==="text"?a:i.text,type:i.type}}}})}export{p as a,x as b,h as c,F as d,q as e,M as f,P as g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a as c}from"./chunk-
|
|
4
|
+
import{a as c}from"./chunk-T6J4YP56.js";import{M as u,l}from"./chunk-3VBVEDDA.js";import r from"fs";import e from"path";import{fileURLToPath as m}from"url";var s;function p(){if(s!==void 0)return s;let t=e.dirname(m(import.meta.url));for(let n=0;n<12&&t!==e.dirname(t);n++){if(r.existsSync(e.join(t,"packages/sootsim-engine/package.json"))&&r.existsSync(e.join(t,"public/sootsim")))return s=t,t;t=e.dirname(t)}return s=null,null}function d(){if(process.env.SOOTSIM_HOME&&u())return null;let t=p();if(!t)return null;let n=e.join(t,"public/sootsim");return r.existsSync(e.join(n,"index.html"))&&r.existsSync(e.join(n,"engine/index.html"))&&r.existsSync(e.join(n,"engine-tenant/worker.js"))?n:null}function g(){let t=d();if(t)return t;let n=u();if(!n)return null;let o=l(n);return r.existsSync(e.join(o,"index.html"))?o:null}var a=".runtime.localhost";function y(t){let n=t.trim();if(!c(n))throw new Error(`invalid rnx runtime version: ${t}`);let i=Buffer.from(n,"utf8").toString("hex").match(/.{1,60}/g);if(!i)throw new Error(`invalid rnx runtime version: ${t}`);return`${i.join(".")}${a}`}function f(t){return t.toLowerCase().endsWith(a)}function x(t){if(!f(t))return null;let n=t.slice(0,-a.length).split(".");if(n.length===0||n.some(i=>!/^[0-9a-f]{1,60}$/i.test(i)))return null;let o=n.join("");if(o.length%2!==0)return null;try{let i=Buffer.from(o,"hex").toString("utf8");return c(i)?i:null}catch{return null}}function S(t){let n=l(t);return r.existsSync(e.join(n,"index.html"))?n:null}function M(t){if(!f(t))return g();let n=x(t);return n?S(n):null}export{d as a,y as b,f as c,x as d,M as e};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{
|
|
4
|
+
import{t as j,v as A,y as K,z as v}from"./chunk-XWUTJLBM.js";import{createHash as Y}from"node:crypto";import{mkdirSync as L,readFileSync as W,readdirSync as Q,unlinkSync as X,writeFileSync as D}from"node:fs";import{dirname as q,extname as Z,resolve as B}from"node:path";function H(t){let e=t[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function U(t,e,n){let o=j(t,{port:e.port}),i=H(o.positional),u=A({...o,commandTimeoutMs:5e3});try{let a=!!(await K(u,"SootSim.bridges.settings.get"))?.[n.modeKey],m=i==="on"?!0:i==="off"?!1:!a;if(a===m)return console.log(` ${n.displayName}: already ${m?"on":"off"}`),{current:a,target:m,changed:!1};if(!await u.send({type:"evaluate",acquireLock:!0,code:`(async () => {
|
|
5
5
|
const modeKey = ${JSON.stringify(n.modeKey)}
|
|
6
6
|
const target = ${JSON.stringify(m)}
|
|
7
7
|
window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a as t}from"./chunk-
|
|
4
|
+
import{a as t}from"./chunk-A5AJFVOF.js";import{readFileSync as a}from"node:fs";import{fileURLToPath as n}from"node:url";var r=null;function f(){if(r!=null)return r;let o=[()=>n(import.meta.resolve(`${t.packageName}/package.json`)),()=>n(new URL("../package.json",import.meta.url))];for(let i of o)try{let e=JSON.parse(a(i(),"utf8")).version;if(typeof e=="string"&&e)return r=e,r}catch{}return r="0.0.0",r}export{f as a};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*! rnx v0.1.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{a as G,b as V,c as W,d as v}from"./chunk-YBFB3RM7.js";import{a as L}from"./chunk-IPEURNLI.js";import{q as F}from"./chunk-QXLLY4IM.js";import{a as M}from"./chunk-AVOROGA3.js";import{b as Y,c as g}from"./chunk-RSNLI2NH.js";import{f as c}from"./chunk-T6J4YP56.js";import{c as B}from"./chunk-RZGHV2WI.js";import{a as p,b as C,c as y,d as h,f as E,g as a,h as w,i as f,j as N}from"./chunk-AM2ODYAN.js";import{a as A}from"./chunk-URLVQHC3.js";import{D as O,E as j,F as $,G as T,M as I,l as P}from"./chunk-3VBVEDDA.js";import{a as q}from"./chunk-6SO6I3D5.js";import J from"node:os";import K from"node:path";async function Pe(e,n={}){if(e.includes("--help")||e.includes("-h")){ue();return}let r=ee(e),o=n.launchConnectRN??(!r.ci&&!r.yes&&!r.json&&!r.dryRun&&process.stdin.isTTY);try{ce(r);let t=G(r.appDir),i=Y(),z=$(),R=await te(r,i);!R&&!i.installed&&!r.json&&console.log(` ${y("Enable it later with")} ${p("rnx daemon install")}`);let u=await oe(r),Q=r.json?await c.fetchManifest():await w("Checking the rnx runtime",()=>c.fetchManifest()),l=c.resolveVersion(Q,{channel:"stable"}).version,b=q();if(b==="0.0.0")throw new Error("could not resolve the installed rnx CLI version");let S=!1;if(!r.dryRun){let d=I(),x=()=>c.install({version:l,channel:"stable",setActive:!0,protectVersions:d?[d]:[]});S=(r.json?await x():await w(`Preparing runtime ${l}`,x)).installed}let D=i.installed;R&&!i.installed&&!r.dryRun&&(r.json?await g({port:7668,force:!1}):(console.log(`
|
|
5
|
+
${p("\u25C6")} ${C("Enabling the background service")}`),await g({port:7668,force:!1})),D=!0),u==="electron"&&!r.dryRun&&!M()&&await L(["--yes"]),o&&(console.log(`
|
|
6
|
+
${p("\u25C6")} Opening ConnectRN`),await F(["ConnectRN","--driver",u,"--no-describe","--quiet"]));let X=await ie(r,z),Z=!1,s=t?V({appDir:t,cliVersion:b}):null,m=await se(r,s);if(m&&s){if(!r.json)for(let d of v(s))console.log(` ${y(r.dryRun?"Would run":"Running")} ${d}`);await W(s,{dryRun:r.dryRun,json:r.json})}r.dryRun||(T({productAnalytics:X,crashReports:Z}),j(u));let k={runtimeVersion:l,serviceInstalled:D,repositoryPrepared:m,simulatorDriver:u};return r.json?console.log(JSON.stringify({...k,runtimeInstalled:S,dryRun:r.dryRun,cache:ae(l),repositoryOperations:m&&s?v(s):[]},null,2)):console.log(`
|
|
7
|
+
${h("\u2713")} ${o?"ConnectRN is open. ":""}rnx is ready.`),k}catch(t){throw B(t),t}}function ee(e){let n=e.indexOf("--app"),r=n>=0?e[n+1]:void 0;if(n>=0&&(!r||r.startsWith("-")))throw new Error("--app requires a directory");return{appDir:K.resolve(r??process.cwd()),ci:e.includes("--ci")||A(),dryRun:e.includes("--dry-run"),json:e.includes("--json"),yes:e.includes("--yes")||e.includes("-y"),service:H(e,"--service","--no-service"),repository:H(e,"--repo","--no-repo"),productAnalytics:ne(e,"--analytics"),simulatorDriver:re(e)}}function re(e){let n=e.includes("--desktop"),r=e.includes("--browser");if(n&&r)throw new Error("--desktop and --browser cannot be used together");if(n)return"electron";if(r)return"playwright"}function H(e,n,r){if(e.includes(n)&&e.includes(r))throw new Error(`${n} and ${r} cannot be used together`);if(e.includes(n))return!0;if(e.includes(r))return!1}function ne(e,n){let r=e.find(i=>i.startsWith(`${n}=`)),o=e.indexOf(n),t=r?.slice(n.length+1)??(o>=0?e[o+1]:void 0);if(t!==void 0){if(t==="on"||t==="yes"||t==="true")return!0;if(t==="off"||t==="no"||t==="false")return!1;throw new Error(`${n} must be on or off`)}}async function te(e,n){if(e.ci){if(e.service===!0)throw new Error("--ci cannot install a machine service");return!1}return n.supported?n.installed&&e.service===void 0?(e.json||console.log(` ${h("\u2713")} Background service is ready`),!0):e.service!==void 0?e.service:e.yes?!0:(U(e,"--service or --no-service"),a("Background service",["Keeps the local bridge and runtime ready between commands.","Agent inspection, interaction, and test commands start much faster."]),f("Enable the background service?",!0)):(e.json||a("Background service",["The persistent service is currently available on macOS and Linux.","rnx will start the bridge when needed on this platform."]),!1)}async function oe(e){if(e.simulatorDriver)return e.simulatorDriver;let n=O();if(n)return n;if(e.ci||e.yes)return"playwright";U(e,"--desktop or --browser");let r=process.platform==="darwin"?"Desktop downloads a DMG and installs rnx.app.":process.platform==="win32"?"Desktop downloads and runs the rnx installer.":"Desktop downloads the matching rnx AppImage.",o=process.platform==="darwin"?"Desktop app Installs rnx.app from a DMG":process.platform==="win32"?"Desktop app Runs the rnx installer":"Desktop app Installs the matching AppImage";return a("Simulator window",["Browser opens immediately in an isolated Chrome window.",r,"The Desktop app opens in a dedicated native window."]),await N("Where should rnx open?",["Browser (recommended) No additional download",o])===0?"playwright":"electron"}async function ie(e,n){return e.productAnalytics!==void 0?e.productAnalytics:n.configured?n.productAnalytics:e.yes||e.ci||!process.stdin.isTTY?!1:(a("Private by default",["Diagnostics stay off unless you opt in.","Reports can contain package compatibility or an error class.","They never contain your code or app data."]),f("Share bounded diagnostics to improve rnx?",!1))}async function se(e,n){if(!n){if(e.repository===!0)throw new Error("--repo requires a package.json inside a Git repository");return!1}return n.operations.length===0?!0:e.repository!==void 0?e.repository:e.yes||e.ci||!process.stdin.isTTY?!1:(a("Share rnx with your team",["rnx already works here with no project setup.","This only adds an exact rnxsim dev dependency and an rnx script for teammates."]),f(`Add rnx to ${K.basename(n.appDir)}?`,!1))}function U(e,n){if(!(process.stdin.isTTY&&!e.ci))throw new Error(`non-interactive setup requires ${n}, or --yes to accept defaults`)}function ae(e){let n=J.platform(),r=J.arch();return{path:P(e),key:`sootsim-runtime-${n}-${r}-${e}`,inputs:{platform:n,arch:r,runtimeVersion:e}}}function ce(e){e.json||E("Run any React Native app in a local simulator. No project setup required.")}function ue(){console.log(`
|
|
8
|
+
rnx setup - configure optional local conveniences
|
|
9
|
+
|
|
10
|
+
rnx works without project setup. This command can enable the faster background
|
|
11
|
+
service, choose Browser or Desktop, configure private diagnostics, and optionally
|
|
12
|
+
add an exact rnxsim dependency plus an rnx script for teammates.
|
|
13
|
+
|
|
14
|
+
usage:
|
|
15
|
+
rnx setup
|
|
16
|
+
rnx setup --yes
|
|
17
|
+
rnx setup --ci --yes --json
|
|
18
|
+
rnx setup --dry-run --yes
|
|
19
|
+
|
|
20
|
+
choices:
|
|
21
|
+
--service | --no-service
|
|
22
|
+
--desktop | --browser
|
|
23
|
+
--analytics on|off
|
|
24
|
+
--repo | --no-repo
|
|
25
|
+
|
|
26
|
+
automation:
|
|
27
|
+
--yes accept recommended machine defaults; diagnostics and repo changes stay off
|
|
28
|
+
--ci never prompt or install a background service
|
|
29
|
+
--json emit runtime and cache metadata as JSON
|
|
30
|
+
--dry-run show choices and repository operations without changing anything
|
|
31
|
+
--app DIR inspect DIR for an optional repository installation
|
|
32
|
+
`)}export{Pe as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
4
|
var n=Object.freeze({name:"rnx",packageName:"rnxsim",commandName:"rnx",domain:"rnxsim.com",origin:"https://rnxsim.com"});export{n as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
4
|
var f="\x1B[0m",p="\x1B[1m",a="\x1B[2m",m="\x1B[38;2;42;95;255m",x="\x1B[38;5;84m",d="\x1B[38;5;203m";function c(n,t){return!process.stdout.isTTY||process.env.NO_COLOR!==void 0?t:`${n}${t}${f}`}function s(n){return c(m,n)}function u(n){return c(p,n)}function i(n){return c(a,n)}function w(n){return c(x,n)}function h(n){return c(d,n)}function v(n){console.log(),console.log(` ${s("\u25E4\u25E2")} ${u("rnx")}`),n&&console.log(` ${i(n)}`)}function y(n,t){console.log(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
4
|
import{execFileSync as m,spawn as g}from"child_process";import{existsSync as s,readdirSync as x}from"fs";import{dirname as h,join as c,resolve as a}from"path";import{fileURLToPath as w}from"url";var l;function p(){if(l!==void 0)return l;try{l=h(w(import.meta.resolve("sootsim-engine/package.json")))}catch{l=null}return l}var k="dev.sootsim.simulator";function v(){let e=p();if(!e)return null;let n=c(e,"dist-electron/main.cjs");if(!s(n))return null;let i=P(e);return i?{path:i,platform:process.platform,kind:"dev-electron",engineDir:e}:null}function I(){let e=p();return e?s(c(e,"src-electron/main.ts")):!1}function P(e){let n=e;for(let i=0;i<6;i++){let r=c(n,"node_modules/.bin/electron");if(s(r))return r;let t=h(n);if(t===n)break;n=t}return null}function b(){let e=p(),i=["/Applications/rnx.app",a(process.env.HOME||"","Applications/rnx.app"),...e?[a(e,"app/rnx.app")]:[]].find(r=>s(r));if(i)return{path:i,platform:"darwin",kind:"mac-app"};try{let r=m("mdfind",[`kMDItemCFBundleIdentifier == "${k}"`],{encoding:"utf8",timeout:3e3}).trim();if(r)return{path:r.split(`
|