rnxsim 0.1.335 → 0.1.337
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 +104 -76
- package/cli/auth.ts +2 -2
- package/cli/bin.ts +7 -3
- package/cli/bridge-flow-runner.ts +2 -2
- package/cli/commands/agent-wrapper.ts +1 -1
- package/cli/commands/agent.ts +12 -12
- package/cli/commands/app-fonts.ts +1 -1
- package/cli/commands/assert.ts +7 -7
- package/cli/commands/auth.ts +4 -4
- package/cli/commands/camera.ts +13 -13
- package/cli/commands/cleanup.ts +6 -6
- package/cli/commands/compat.ts +4 -4
- package/cli/commands/config.ts +2 -2
- package/cli/commands/control.ts +37 -43
- package/cli/commands/cpu-profile.ts +2 -2
- package/cli/commands/daemon-mac-app.ts +2 -2
- package/cli/commands/daemon.ts +12 -12
- package/cli/commands/debug.ts +22 -22
- package/cli/commands/desktop.ts +3 -3
- package/cli/commands/detox.ts +17 -17
- package/cli/commands/device.ts +9 -9
- package/cli/commands/diagnose.ts +11 -11
- package/cli/commands/electron.ts +7 -7
- package/cli/commands/film.ts +6 -6
- package/cli/commands/inspect/core.ts +6 -7
- package/cli/commands/inspect/find.ts +2 -2
- package/cli/commands/inspect.ts +36 -36
- package/cli/commands/install-desktop.ts +8 -8
- package/cli/commands/login.ts +6 -6
- package/cli/commands/maestro-generate.ts +2 -2
- package/cli/commands/maestro.ts +23 -23
- package/cli/commands/mode.ts +4 -4
- package/cli/commands/no-bridge-hint.ts +9 -9
- package/cli/commands/perf.ts +11 -11
- package/cli/commands/permissions.ts +5 -5
- package/cli/commands/profile.ts +11 -11
- package/cli/commands/react.ts +15 -15
- package/cli/commands/record.ts +15 -15
- package/cli/commands/report-issue.ts +2 -2
- package/cli/commands/reset.ts +2 -2
- package/cli/commands/runtime.ts +18 -18
- package/cli/commands/screenshot-mode.ts +5 -5
- package/cli/commands/screenshot.ts +12 -12
- package/cli/commands/screenshots-capture.ts +7 -7
- package/cli/commands/screenshots.ts +6 -6
- package/cli/commands/serve.ts +6 -6
- package/cli/commands/setup.ts +13 -15
- package/cli/commands/skills.ts +14 -14
- package/cli/commands/slides.ts +19 -23
- package/cli/commands/state.ts +2 -2
- package/cli/commands/storage.ts +3 -3
- package/cli/commands/telemetry.ts +1 -1
- package/cli/commands/three-mode.ts +16 -16
- package/cli/commands/timeline.ts +4 -4
- package/cli/commands/upgrade.ts +1 -1
- package/cli/commands/upload.ts +11 -11
- package/cli/commands/version.ts +3 -5
- package/cli/commands/what-happened.ts +11 -11
- package/cli/drivers/electron.ts +3 -3
- package/cli/hints.ts +8 -8
- package/cli/recording-access.ts +1 -1
- package/cli/ws-bridge.ts +5 -5
- package/dist-cli/bin.js +5 -5
- package/dist-cli/chunks/{agent-XSJMAFVA.js → agent-QQ3RJNRY.js} +14 -14
- package/dist-cli/chunks/{agent-wrapper-NFLJ5K64.js → agent-wrapper-M6SQSMRY.js} +3 -3
- package/dist-cli/chunks/app-fonts-F6NDV3XC.js +4 -0
- package/dist-cli/chunks/{assert-ILAXIYB5.js → assert-5VB3KQNK.js} +12 -12
- package/dist-cli/chunks/auth-PFXODKFN.js +12 -0
- package/dist-cli/chunks/{beta-TDR6UKJU.js → beta-WUWYHT4F.js} +2 -2
- package/dist-cli/chunks/camera-V3MMTKP7.js +33 -0
- package/dist-cli/chunks/{chunk-INBPUR4T.js → chunk-2ANFH72P.js} +11 -11
- package/dist-cli/chunks/chunk-2GIA5T6B.js +74 -0
- package/dist-cli/chunks/{chunk-GP6QEBZA.js → chunk-4FRSEZ7Z.js} +1 -1
- package/dist-cli/chunks/{chunk-USGOQ3YJ.js → chunk-4GXBZHNA.js} +2 -2
- package/dist-cli/chunks/{chunk-R3CMECGC.js → chunk-4HESY5E7.js} +4 -4
- package/dist-cli/chunks/{chunk-WKT7YM5Q.js → chunk-4VJEXQGD.js} +1 -1
- package/dist-cli/chunks/{chunk-FE6ZHPKD.js → chunk-5LJNNHZH.js} +1 -1
- package/dist-cli/chunks/{chunk-I2HQB5NN.js → chunk-5QXGSTYI.js} +2 -2
- package/dist-cli/chunks/{chunk-FJSHIWAM.js → chunk-5SHAOQHJ.js} +2 -2
- package/dist-cli/chunks/{chunk-CGZWLSYD.js → chunk-5UPRBMIG.js} +1 -1
- package/dist-cli/chunks/{chunk-ZTM2MKNI.js → chunk-5ZEFRPCC.js} +1 -1
- package/dist-cli/chunks/{chunk-RTD3CPDQ.js → chunk-6ART4XVJ.js} +23 -23
- package/dist-cli/chunks/{chunk-MTD6IAEA.js → chunk-6CAUT2LH.js} +1 -1
- package/dist-cli/chunks/{chunk-ZYHCWCMM.js → chunk-7ATIH7OU.js} +1 -1
- package/dist-cli/chunks/{chunk-RVUGKXJD.js → chunk-7Q4QKHMA.js} +1 -1
- package/dist-cli/chunks/{chunk-MTNIDSOA.js → chunk-ABK2V2PR.js} +1 -1
- package/dist-cli/chunks/{chunk-TL4DNDDY.js → chunk-B53ILAHI.js} +2 -2
- package/dist-cli/chunks/{chunk-POC3QTA6.js → chunk-BSSVLFZR.js} +2 -2
- package/dist-cli/chunks/chunk-BVOBXTPN.js +30 -0
- package/dist-cli/chunks/{chunk-4KC35DMK.js → chunk-CPDEUWL5.js} +2 -2
- package/dist-cli/chunks/{chunk-HNQLZZJA.js → chunk-DINU267S.js} +2 -2
- package/dist-cli/chunks/{chunk-DCDKJ4NC.js → chunk-DQQ4CZVC.js} +2 -2
- package/dist-cli/chunks/{chunk-JWAY6DIH.js → chunk-EDWN2HOO.js} +18 -18
- package/dist-cli/chunks/{chunk-3CS4EUMG.js → chunk-EWVG4A3B.js} +2 -2
- package/dist-cli/chunks/{chunk-RTEJXUXN.js → chunk-F3NKCQHM.js} +6 -6
- package/dist-cli/chunks/{chunk-M7CBQ5I4.js → chunk-GEAGFYKP.js} +1 -1
- package/dist-cli/chunks/chunk-GGNH44PZ.js +5 -0
- package/dist-cli/chunks/{chunk-YSUIYK6B.js → chunk-HAHJJJUC.js} +2 -2
- package/dist-cli/chunks/chunk-HPJ5EKIZ.js +4 -0
- package/dist-cli/chunks/{chunk-IN2PZBQD.js → chunk-IBTHGFKE.js} +2 -2
- package/dist-cli/chunks/{chunk-ZZWO6Y7X.js → chunk-J6BYRRZQ.js} +2 -2
- package/dist-cli/chunks/{chunk-6Y3PVPTF.js → chunk-JK4OZ2TQ.js} +5 -5
- package/dist-cli/chunks/{chunk-PO3TOAED.js → chunk-KGQAO25M.js} +2 -2
- package/dist-cli/chunks/{chunk-J7XFINJG.js → chunk-L6UUIQE7.js} +2 -2
- package/dist-cli/chunks/{chunk-35XNGT5C.js → chunk-LXYLCETR.js} +1 -1
- package/dist-cli/chunks/{chunk-JWK5WD44.js → chunk-LZAL3DMP.js} +2 -2
- package/dist-cli/chunks/{chunk-3ZDOPKHE.js → chunk-M43UU7UG.js} +4 -4
- package/dist-cli/chunks/{chunk-ROPHZJ6P.js → chunk-M4LGUVBM.js} +2 -2
- package/dist-cli/chunks/{chunk-RELRA5VW.js → chunk-NCG6C5AH.js} +2 -2
- package/dist-cli/chunks/{chunk-42KDXJUD.js → chunk-NR5TSR2Y.js} +2 -2
- package/dist-cli/chunks/{chunk-R2UL5VFY.js → chunk-OCPWXT73.js} +3 -3
- package/dist-cli/chunks/{chunk-VV4MXLFR.js → chunk-ODKS6JUJ.js} +1 -1
- package/dist-cli/chunks/{chunk-F33DUJGG.js → chunk-R2WBREGQ.js} +1 -1
- package/dist-cli/chunks/chunk-RKY3ZNTA.js +5 -0
- package/dist-cli/chunks/{chunk-MGGRL2Z2.js → chunk-SW7BHOMO.js} +9 -9
- package/dist-cli/chunks/{chunk-GVKISFQ3.js → chunk-TJTLXG3R.js} +1 -1
- package/dist-cli/chunks/chunk-TNI4PW75.js +124 -0
- package/dist-cli/chunks/{chunk-CL3PREIE.js → chunk-UWEDNDND.js} +2 -2
- package/dist-cli/chunks/{chunk-IV36DY6M.js → chunk-WRID5SBV.js} +1 -1
- package/dist-cli/chunks/{chunk-42ALI64M.js → chunk-WUYI3XJ5.js} +2 -2
- package/dist-cli/chunks/{chunk-6VN5ULGQ.js → chunk-X7MHCEGG.js} +2 -2
- package/dist-cli/chunks/chunk-XIQFYLWD.js +15 -0
- package/dist-cli/chunks/{chunk-LCVUJCRJ.js → chunk-ZUK5ZQU7.js} +1 -1
- package/dist-cli/chunks/{cleanup-X6ZRPFDV.js → cleanup-6WBS3MUO.js} +10 -10
- package/dist-cli/chunks/cli-version-HUQCDGMA.js +4 -0
- package/dist-cli/chunks/{compat-VRXJ5J56.js → compat-2WOPKJYK.js} +9 -9
- package/dist-cli/chunks/{config-LHPPE4EP.js → config-FPD7WUYB.js} +5 -5
- package/dist-cli/chunks/{control-TVTNGSSF.js → control-B3XNER7I.js} +2 -2
- package/dist-cli/chunks/daemon-T4D4X2P5.js +4 -0
- package/dist-cli/chunks/{debug-EUHBBPGM.js → debug-LKV5CEAV.js} +17 -17
- package/dist-cli/chunks/desktop-EMDPOYQT.js +31 -0
- package/dist-cli/chunks/detox-4J4UTZE7.js +52 -0
- package/dist-cli/chunks/{device-PONITUZJ.js → device-PMZ7RPXQ.js} +11 -11
- package/dist-cli/chunks/{diagnose-2PN4K4L2.js → diagnose-MLEP727D.js} +12 -12
- package/dist-cli/chunks/{disk-cleanup-U2PQLOEW.js → disk-cleanup-CVEDIPEE.js} +2 -2
- package/dist-cli/chunks/drivers-NTUKJEL6.js +4 -0
- package/dist-cli/chunks/{film-XGZCFTQL.js → film-4RNECABF.js} +9 -9
- package/dist-cli/chunks/flow-5IOCAHVO.js +4 -0
- package/dist-cli/chunks/help-NUJUYEWP.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-I4MYF5CO.js → hidden-runtime-alias-YIF25W4F.js} +2 -2
- package/dist-cli/chunks/{home-paths-YRAPZ5LE.js → home-paths-WNJCCCCZ.js} +2 -2
- package/dist-cli/chunks/inspect-MFEIYUCN.js +4 -0
- package/dist-cli/chunks/install-desktop-NB65KI4D.js +4 -0
- package/dist-cli/chunks/{login-ZMAIAQ6F.js → login-VEHHGN42.js} +6 -6
- package/dist-cli/chunks/{logout-UQZ5JBJU.js → logout-VE7PNXL2.js} +2 -2
- package/dist-cli/chunks/{maestro-BQYKDUC4.js → maestro-ZXHTDEOI.js} +25 -25
- package/dist-cli/chunks/{maestro-generate-VQYMMQJ5.js → maestro-generate-TK33E2Z6.js} +3 -3
- package/dist-cli/chunks/mode-ZDKJ56NT.js +26 -0
- package/dist-cli/chunks/{optional-demo-registry-DUWHCLGD.js → optional-demo-registry-GBZ3WVDW.js} +2 -2
- package/dist-cli/chunks/{perf-7RAU7WRZ.js → perf-JXNZOUKW.js} +28 -28
- package/dist-cli/chunks/permissions-WQ62PW7Y.js +13 -0
- package/dist-cli/chunks/record-4S3ZMDIO.js +72 -0
- package/dist-cli/chunks/{report-issue-P376KFFU.js → report-issue-KKBADTWO.js} +4 -4
- package/dist-cli/chunks/reset-H5XIISJE.js +4 -0
- package/dist-cli/chunks/runtime-FK7EEMWA.js +4 -0
- package/dist-cli/chunks/{screenshot-command-NE7BKTQ2.js → screenshot-command-42U5MVQL.js} +34 -34
- package/dist-cli/chunks/{screenshot-layers-UE4R64PZ.js → screenshot-layers-4G42AHOX.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-ULXPLXMC.js → screenshots-capture-HMQ2OO3I.js} +11 -11
- package/dist-cli/chunks/{serve-P7BT4XHR.js → serve-S4V5EDW2.js} +16 -16
- package/dist-cli/chunks/setup-T43V7GA6.js +32 -0
- package/dist-cli/chunks/{skills-NTRYKJSF.js → skills-O426K26J.js} +16 -16
- package/dist-cli/chunks/{state-4D5YAM47.js → state-ZEEPDKJG.js} +5 -5
- package/dist-cli/chunks/storage-4GQLOFGG.js +37 -0
- package/dist-cli/chunks/store-RFMSNWLJ.js +4 -0
- package/dist-cli/chunks/telemetry-NFAAPSMN.js +4 -0
- package/dist-cli/chunks/{timeline-GZNFGD3Q.js → timeline-ONCYX7KW.js} +6 -6
- package/dist-cli/chunks/{upgrade-A46D6PEY.js → upgrade-A36T52AM.js} +2 -2
- package/dist-cli/chunks/upload-36O32DII.js +4 -0
- package/dist-cli/chunks/version-67HA253N.js +6 -0
- package/dist-cli/chunks/{web-H2IXO5SC.js → web-PWXQHQIE.js} +2 -2
- package/dist-cli/chunks/{what-happened-Z7UII5GH.js → what-happened-WNXE622R.js} +16 -16
- package/dist-lib/agent-daemon-client.cjs +5 -5
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +4 -4
- 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.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +7 -7
- 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/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +248 -98
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +2 -2
- package/dist-lib/menu.mjs +2 -2
- package/dist-lib/metro-host-modules/react-dom.js +6 -0
- package/dist-lib/metro-host-modules/react-native-web.js +6 -0
- package/dist-lib/metro-host-modules/react-native.js +6 -0
- package/dist-lib/metro-host-modules/react.js +6 -0
- package/dist-lib/metro-host-modules/react__jsx-dev-runtime.js +6 -0
- package/dist-lib/metro-host-modules/react__jsx-runtime.js +6 -0
- package/dist-lib/metro-production-bundle.cjs +72 -0
- package/dist-lib/metro-production-bundle.mjs +44 -0
- package/dist-lib/metro.cjs +152 -8
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +2 -2
- package/dist-lib/react-native-host-modules.cjs +50 -0
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +6 -7
- package/dist-lib/sdk.mjs +6 -7
- package/dist-lib/skills.cjs +71 -77
- package/dist-lib/vite.cjs +104 -85
- package/package.json +15 -2
- package/scripts/preuninstall.cjs +1 -1
- package/skills/contrast/SKILL.md +67 -75
- package/skills/rnx-debug/SKILL.md +84 -84
- package/skills/rnx-perf/SKILL.md +8 -8
- package/skills/rnx-setup/SKILL.md +54 -54
- package/skills/rnx-test/SKILL.md +35 -35
- package/skills/rnx-visual/SKILL.md +18 -18
- package/src/agent-daemon-client.ts +2 -2
- package/src/agent-sessions.ts +2 -2
- package/src/connect.ts +6 -6
- package/src/disk-cleanup.ts +1 -1
- package/src/home-paths.ts +1 -1
- package/src/host/bridge-host.ts +6 -6
- package/src/index.ts +1 -1
- package/src/metro-host-modules/react-dom.js +6 -0
- package/src/metro-host-modules/react-native-web.js +6 -0
- package/src/metro-host-modules/react-native.js +6 -0
- package/src/metro-host-modules/react.js +6 -0
- package/src/metro-host-modules/react__jsx-dev-runtime.js +6 -0
- package/src/metro-host-modules/react__jsx-runtime.js +6 -0
- package/src/metro-plugin.ts +249 -10
- package/src/metro-production-bundle.ts +51 -0
- package/src/public-brand.ts +1 -1
- package/src/react-native-host-modules.ts +25 -0
- package/src/runtime-assets.ts +1 -1
- package/src/sim-client.ts +1 -1
- package/src/vite-plugin-one.ts +171 -145
- package/dist-cli/chunks/app-fonts-L3UXFYVE.js +0 -4
- package/dist-cli/chunks/auth-ISX2EUQL.js +0 -12
- package/dist-cli/chunks/camera-4SWTNJUA.js +0 -33
- package/dist-cli/chunks/chunk-BRHZEZKN.js +0 -124
- package/dist-cli/chunks/chunk-EJPYPJWP.js +0 -5
- package/dist-cli/chunks/chunk-KWCD5MOK.js +0 -15
- package/dist-cli/chunks/chunk-MJ7QGY7Z.js +0 -4
- package/dist-cli/chunks/chunk-RSA4XWHN.js +0 -5
- package/dist-cli/chunks/chunk-S3EIOAWZ.js +0 -74
- package/dist-cli/chunks/chunk-TYANJQLO.js +0 -30
- package/dist-cli/chunks/cli-version-NZUSWKZR.js +0 -4
- package/dist-cli/chunks/daemon-XUEC47EC.js +0 -4
- package/dist-cli/chunks/desktop-LLHMP4A3.js +0 -31
- package/dist-cli/chunks/detox-QLNWLXA4.js +0 -52
- package/dist-cli/chunks/drivers-7IU37M2E.js +0 -4
- package/dist-cli/chunks/flow-NZZLR4BN.js +0 -4
- package/dist-cli/chunks/help-D7URIJRD.js +0 -4
- package/dist-cli/chunks/inspect-TJYWKY56.js +0 -4
- package/dist-cli/chunks/install-desktop-LD3W5RS7.js +0 -4
- package/dist-cli/chunks/mode-ZQ6H7KWM.js +0 -26
- package/dist-cli/chunks/permissions-DRZ3HCFL.js +0 -13
- package/dist-cli/chunks/record-J5JAYW4Y.js +0 -72
- package/dist-cli/chunks/reset-KXYRDEFU.js +0 -4
- package/dist-cli/chunks/runtime-66CEPOG6.js +0 -4
- package/dist-cli/chunks/setup-QO5KZAX3.js +0 -32
- package/dist-cli/chunks/storage-X2K2MDPX.js +0 -37
- package/dist-cli/chunks/store-TUJPIRTT.js +0 -4
- package/dist-cli/chunks/telemetry-CF5DVEKI.js +0 -4
- package/dist-cli/chunks/upload-UIQJIBEZ.js +0 -4
- package/dist-cli/chunks/version-CMBB3FXL.js +0 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.337 | (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-EWVG4A3B.js";import{J as u,l}from"./chunk-4FRSEZ7Z.js";function m(t){return t.replace(/^\[|\]$/g,"").toLowerCase()}function R(t){let n=m(t);return n==="localhost"||n.endsWith(".localhost")||n==="0.0.0.0"||n==="::1"||/^127(?:\.\d{1,3}){3}$/.test(n)}import o from"fs";import e from"path";import{fileURLToPath as d}from"url";var s;function g(){if(s!==void 0)return s;let t=e.dirname(d(import.meta.url));for(let n=0;n<12&&t!==e.dirname(t);n++){if(o.existsSync(e.join(t,"packages/sootsim-engine/package.json"))&&o.existsSync(e.join(t,"public/sootsim")))return s=t,t;t=e.dirname(t)}return s=null,null}function p(){if(process.env.SOOTSIM_HOME&&u())return null;let t=g();if(!t)return null;let n=e.join(t,"public/sootsim");return o.existsSync(e.join(n,"index.html"))&&o.existsSync(e.join(n,"engine/index.html"))&&o.existsSync(e.join(n,"engine-tenant/worker.js"))?n:null}function x(){let t=p();if(t)return t;let n=u();if(!n)return null;let i=l(n);return o.existsSync(e.join(i,"index.html"))?i:null}var a=".runtime.localhost";function H(t){let n=t.trim();if(!c(n))throw new Error(`invalid rnx runtime version: ${t}`);let r=Buffer.from(n,"utf8").toString("hex").match(/.{1,60}/g);if(!r)throw new Error(`invalid rnx runtime version: ${t}`);return`${r.join(".")}${a}`}function f(t){return t.toLowerCase().endsWith(a)}function h(t){if(!f(t))return null;let n=t.slice(0,-a.length).split(".");if(n.length===0||n.some(r=>!/^[0-9a-f]{1,60}$/i.test(r)))return null;let i=n.join("");if(i.length%2!==0)return null;try{let r=Buffer.from(i,"hex").toString("utf8");return c(r)?r:null}catch{return null}}function v(t){let n=l(t);return o.existsSync(e.join(n,"index.html"))?n:null}function T(t){if(!f(t))return x();let n=h(t);return n?v(n):null}export{R as a,p as b,H as c,f as d,h as e,T as f};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.337 | (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 d}from"./chunk-
|
|
4
|
+
import{a as d}from"./chunk-4GXBZHNA.js";import{a as s}from"./chunk-RKY3ZNTA.js";import{a as e}from"./chunk-BSSVLFZR.js";import{a as n}from"./chunk-F3NKCQHM.js";import{d as m,e as p,f as u}from"./chunk-TNI4PW75.js";import{a}from"./chunk-IBTHGFKE.js";import{a as i}from"./chunk-UWEDNDND.js";import{a as f,c}from"./chunk-ODKS6JUJ.js";function g(){return`${i.commandName} CLI v${a()} \xB7 ${d().primary}`}function E(){let r=p({bridgePort:7668,defaultShellUrl:n},e()),o=`
|
|
5
5
|
${c}
|
|
6
6
|
`;console.log(`${g()}
|
|
7
7
|
${o}${r}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.337 | (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{c as P,k as m,l as S,m as R,n as _,o as v}from"./chunk-
|
|
4
|
+
import{c as P,k as m,l as S,m as R,n as _,o as v}from"./chunk-GGNH44PZ.js";var k="sootsim:settings",d=["productAnalytics","crashReports","colorScheme","reduceMotion","boldText","fontSize","largerAccessibilitySizes","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","alwaysShowLiveWebViews","showFrame","showMenuBar","showRail","solidWindow","ambientGlow","agentProvider"];function p(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function l(e){let t={};for(let n of d){if(!(n in e))continue;let o=e[n],i=S[n];i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||(t[n]=o)}return t}function K(e){let t={};for(let n of d)t[n]=e[n];return t}function M(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(k);return e?l(JSON.parse(e)):{}}catch{return{}}}function T(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(k,JSON.stringify(e))}catch{}}function x(){let t=p()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:l(t)}function A(e){let t=p();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:e})}catch{}}async function L(e){let t=p();return t?.writeSharedConfig?(await t.writeSharedConfig({settings:e}),!0):!1}function b(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function O(){let e=b()?.settings;return!e||typeof e!="object"?{}:l(e)}function B(e){if(!b())return;let t={settings:e};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}async function F(e){if(!b()||typeof fetch>"u")return!1;let t=await fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:e}),keepalive:!0});if(!t.ok)throw new Error(`shared settings reset failed with HTTP ${t.status}`);return await t.text(),!0}function D(){let e=M(),t=O(),n=x();return{...e,...t,...n}}function V(e,t={}){let n=K(e);for(let o of d)t[o]!==void 0&&(n[o]=t[o]);T(n),A(n),B(n)}async function I(e,t={}){let n=K(e);for(let o of d)t[o]!==void 0&&(n[o]=t[o]);T(n),!await L(n)&&await F(n)}function j(e){if(typeof window>"u")return()=>{};let t=r=>{if(!(r.key!==k||r.newValue==null))try{e(l(JSON.parse(r.newValue)))}catch{}};window.addEventListener("storage",t);let n=p(),o;n?.onSharedConfigChanged&&(o=n.onSharedConfigChanged(r=>{let f=r?.settings;!f||typeof f!="object"||e(l(f))}));let a=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(r=>{let f=r?.settings;!f||typeof f!="object"||e(l(f))});return()=>{window.removeEventListener("storage",t),o?.(),a?.()}}var N=_(),q=v(),y=D(),c=new Set,g={};for(let e of d)N[e]!==void 0&&(c.add(e),y[e]!==void 0&&(g[e]=y[e]),delete y[e]);var s={...q,...y},w=[],u=null;function h(){for(let e of w)e()}function E(){h(),V(s,g)}function C(e,t){let n=S[e];return n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]===t?!1:(s={...s,[e]:t},e==="deviceModel"&&(u=null),!0)}j(e=>{let t={...s},n=!1;for(let[o,i]of Object.entries(e)){let a=o;if(c.has(a)){g[a]=i;continue}t[a]!==i&&(t[a]=i,n=!0)}n&&(s=t,u=null,h())});var z={get(e){return s[e]},set(e,t){C(e,t)&&E()},setRuntime(e,t){c.has(e)||(c.add(e),d.includes(e)&&(g[e]=s[e])),C(e,t)&&h()},isRuntimeControlled(e){return c.has(e)},getAll(){return s},apply(e){let t=!1,n={...s};for(let[o,i]of Object.entries(e)){if(i===void 0)continue;let a=o,r=S[a];r&&(r.validate&&!r.validate(i)||r.options&&!r.options.includes(i)||n[a]!==i&&(n[a]=i,t=!0))}t&&(s=n,u=null,E())},applyRuntime(e){let t=!1;for(let n of Object.keys(e)){let o=e[n];o!==void 0&&(c.has(n)||(c.add(n),d.includes(n)&&(g[n]=s[n])),C(n,o)&&(t=!0))}t&&h()},reset(){s=v(),u=null,E()},async resetDeviceContent(){let e=m.filter(n=>!c.has(n)).map(n=>[n,R[n]]),t=e.some(([n,o])=>s[n]!==o);s={...s,...Object.fromEntries(e)};for(let n of m)c.has(n)&&(g[n]=R[n]);t&&h(),await I(s,g)},subscribe(e){return w.push(e),()=>{w=w.filter(t=>t!==e)}},getDeviceSpec(){return u||(u=P(s.deviceModel)),u},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{z as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.337 | (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{b as jt,c as qt}from"./chunk-
|
|
4
|
+
import{b as jt,c as qt}from"./chunk-HPJ5EKIZ.js";import{a as Dt,b as Bt}from"./chunk-7Q4QKHMA.js";import{a as de}from"./chunk-5QXGSTYI.js";import{k as Ct}from"./chunk-XIQFYLWD.js";import{a as oe,b as C,c as B,d as Me,e as ae,f as X,g as pe,h as ye,i as Et,j as At,k as Ne,l as _t}from"./chunk-M4LGUVBM.js";import{A as Mt,B as Nt,C as Ft,F as Ot,H as Pt,J as ue,K as Rt,Q as We,a as Ie,b as mt,c as ft,d as gt,e as yt,f as ht,g as bt,h as wt,i as xt,j as $t,k as Ce,l as je,r as qe,s as St,t as vt,u as ge,v as kt,w as Te,x as Le,y as It,z as Tt}from"./chunk-M43UU7UG.js";import{a as st}from"./chunk-4VJEXQGD.js";import{a as Q}from"./chunk-RKY3ZNTA.js";import{e as it,j as at,o as lt,q as ct,s as dt,t as ut,u as pt,v as ce}from"./chunk-F3NKCQHM.js";import{c as nt,d as Be,f as rt}from"./chunk-TNI4PW75.js";function Je(e){return`(async () => {
|
|
5
5
|
const bridge = globalThis.SootSim && globalThis.SootSim.bridges && globalThis.SootSim.bridges.hotRemount
|
|
6
6
|
if (!bridge || typeof bridge.reloadExternalApp !== 'function') return false
|
|
7
7
|
await bridge.reloadExternalApp({ resetStorage: ${e?"true":"false"} })
|
|
@@ -462,8 +462,8 @@ import{b as jt,c as qt}from"./chunk-MJ7QGY7Z.js";import{a as Dt,b as Bt}from"./c
|
|
|
462
462
|
if (!t) return { ok: false, error: 'timeline bridge missing' }
|
|
463
463
|
return { ok: true, result: await t.recent(${JSON.stringify(D)}) }
|
|
464
464
|
})()`});(!R||!R.ok)&&(console.error(` could not query timeline: ${R&&"error"in R?R.error:"unknown"}`),process.exit(1));let A=R.result.events??[];for(let J of A)if(ms(J,{filter:h,equals:I})){let U=Date.now()-M;console.log(g?JSON.stringify({found:!0,elapsedMs:U,event:J}):` ${r} event after ${U}ms${h?` (filter: ${h})`:""}${I?` (equals: ${I})`:""}`);return}R.result.watermark&&R.result.watermark>O&&(O=R.result.watermark),await new Promise(J=>setTimeout(J,_))}let c=Date.now()-M;g?console.log(JSON.stringify({found:!1,elapsedMs:c,kind:r,filter:h,equals:I})):console.error(` \u26A0 wait event ${r} timed out after ${c}ms${h?` (filter: ${h})`:""}${I?` (equals: ${I})`:""}`),process.exit(1)}async function go(e){let{bridge:t,args:s}=e,i=s.includes("--strict"),d=Ie(s,3e3),{elapsed:r,settled:p}=await se({bridge:t,maxMs:d,strict:i});p?console.log(` idle in ${r}ms`):(console.error(` \u26A0 wait idle timed out after ${r}ms (may still be animating)`),process.exit(1))}async function yo(e){let{bridge:t,args:s}=e,i=Ie(s,2e4),{ready:d,elapsedMs:r,nodes:p,targets:b,liveFrameActive:h,liveFrameChannels:I,flag:w,loadingText:g,externalReady:M,externalError:x,suppressedEntryError:_,errors:O,bridgeError:c}=await St(t,i,{onProgress(R){console.error(` still waiting after ${R.elapsedMs}ms \u2014 ${qe(R)} (nodes: ${R.nodes}, targets: ${R.targets}, live surfaces: ${R.liveFrameActive?R.liveFrameChannels:0}, errors: ${R.errors})`)}});if(d){let R=i-r,A=Math.max(100,Math.min(1e4,R)),J=await se({bridge:t,maxMs:A,pollMs:32,stablePolls:2});J.settled||(console.error(` \u26A0 wait ready timed out after ${r+J.elapsed}ms \u2014 app mounted but did not settle (nodes: ${p}, targets: ${b})`),process.exit(1)),console.log(` ready in ${r+J.elapsed}ms: ${p} nodes, ${b} targets${h?`, ${I} live surfaces`:""}`);return}let D=qe({externalError:x,loadingText:g,externalReady:M,flag:w,targets:b,suppressedEntryError:_,bridgeError:c});console.error(` \u26A0 wait ready timed out after ${r}ms \u2014 ${D} (nodes: ${p}, targets: ${b}, live surfaces: ${h?I:0}, errors: ${O})`),process.exit(1)}async function ho(e){let{bridge:t,args:s,positional:i,inspectUsage:d}=e,r=i[1];r||(console.error(d("selector","<testid> [--max-ms 5000] [--gone]")),process.exit(1));let p=s.indexOf("--max-ms"),b=p>=0&&s[p+1]?Math.max(100,Number(s[p+1])):5e3,h=s.includes("--gone"),{found:I,node:w,elapsed:g}=await vt(t,r,b,{gone:h});if(h){I?console.log(` #${r} gone after ${g}ms`):(console.error(` \u26A0 wait selector #${r} --gone timed out after ${g??b}ms (still present)`),process.exit(1));return}if(I&&w){let M=w.absolutePosition?`@(${Math.round(w.absolutePosition.x)},${Math.round(w.absolutePosition.y)})`:"",x=w.layout?`${Math.round(w.layout.width)}x${Math.round(w.layout.height)}`:"?x?";console.log(` found #${r} in ${g}ms ${x} ${M}`)}else console.error(` \u26A0 wait selector #${r} timed out after ${g??b}ms`),process.exit(1)}function No(e){return e==null?"\u2014":e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}K`:`${(e/1024/1024).toFixed(1)}M`}function Fo(e){return e==null?" \u2026":e<1e3?`${e}ms`.padStart(5):`${(e/1e3).toFixed(2)}s`.padStart(5)}function bo(){process.stderr.write(` the sim is not responding. recover it with:
|
|
465
|
-
|
|
466
|
-
|
|
465
|
+
rnx close --sim <id> # force-close the wedged sim
|
|
466
|
+
rnx list # confirm it's gone
|
|
467
467
|
`)}async function $e(e,t){let s=await e.send({type:"perform",steps:[t]}),i=s?.steps?.[0],d=i?.error??s?.error;return{ok:s?.ok===!0,value:i?.value,...d?{error:d}:{}}}async function gs(e){try{return await e.send({type:"evaluate",code:"1"},{timeoutMs:3e3}),!0}catch{return!1}}async function ys(e,t){try{let s=await e.send({type:"evaluate",code:`(async () => {
|
|
468
468
|
const t = window.__sootsimTest
|
|
469
469
|
if (!t || typeof t.queryAll !== 'function') return []
|
|
@@ -524,7 +524,7 @@ import{b as jt,c as qt}from"./chunk-MJ7QGY7Z.js";import{a as Dt,b as Bt}from"./c
|
|
|
524
524
|
frame: runtimeSnapshot?.keyboard?.frame ?? null,
|
|
525
525
|
focusedRect: runtimeSnapshot?.focused?.rect ?? null,
|
|
526
526
|
}
|
|
527
|
-
})()`}).then(t=>et(t))}function ks(e,t,s){if(!e.visible)return!1;let i=e.focusedInput;return!(t&&i&&!(i.testID===t||i.id===t)||s!==null&&we(e)!==s)}async function Is(e,t=600,s={}){let i=Date.now()+t;for(;Date.now()<=i;){let d=await ot(e);if(ks(d,s.targetId??null,s.secureTextEntry??null))return d;await oe(30)}return ot(e)}async function De(e,t){let s=await ot(e);if(s.visible&&(s.focusedInput||s.hostedEditorFocused))return s;s.visible&&(console.error(` ${t} requires a focused editable control. the iOS keyboard is visible, but no input owns focus.`),process.exit(1)),console.error(` ${t} requires the iOS keyboard to be visible. focus an input first with
|
|
527
|
+
})()`}).then(t=>et(t))}function ks(e,t,s){if(!e.visible)return!1;let i=e.focusedInput;return!(t&&i&&!(i.testID===t||i.id===t)||s!==null&&we(e)!==s)}async function Is(e,t=600,s={}){let i=Date.now()+t;for(;Date.now()<=i;){let d=await ot(e);if(ks(d,s.targetId??null,s.secureTextEntry??null))return d;await oe(30)}return ot(e)}async function De(e,t){let s=await ot(e);if(s.visible&&(s.focusedInput||s.hostedEditorFocused))return s;s.visible&&(console.error(` ${t} requires a focused editable control. the iOS keyboard is visible, but no input owns focus.`),process.exit(1)),console.error(` ${t} requires the iOS keyboard to be visible. focus an input first with rnx do tap-id/tap-text or rnx do type-into.`),process.exit(1)}async function To(e,t,s){return t==="appearance"?e.send({type:"evaluate",code:`(async () => {
|
|
528
528
|
const requested = ${JSON.stringify(s??"toggle")}
|
|
529
529
|
// the engine owns toggle + auto resolution (settingsStore is the single
|
|
530
530
|
// source of truth). never infer the current scheme client-side \u2014 the old
|
|
@@ -547,14 +547,14 @@ import{b as jt,c as qt}from"./chunk-MJ7QGY7Z.js";import{a as Dt,b as Bt}from"./c
|
|
|
547
547
|
})()`}):e.send({type:"evaluate",code:`(async () => {
|
|
548
548
|
window.dispatchEvent(new CustomEvent('sootsim:shake'))
|
|
549
549
|
return { ok: true, action: 'shake' }
|
|
550
|
-
})()`})}function Ts(e){let t={Enter:"return",NumpadEnter:"return",Backspace:"delete",Delete:"delete",Space:"space",ShiftLeft:"shift",ShiftRight:"shift"};if(t[e])return t[e];let s=e.match(/^Digit([0-9])$/);if(s)return s[1];let i=e.match(/^Key([A-Z])$/);return i?i[1].toLowerCase():null}function Ms(e){if(typeof e!="string")return null;let t=e.replace(/\s+/g," ").trim();return t?t.slice(0,80):null}function Oo(...e){for(let t of e){if(typeof t!="string")continue;let s=t.trim();if(s)return s}return null}function Ns(e){let t=e.indexOf("--node-id");if(t<0)return null;let s=e[t+1];if(!s)return null;let i=Number(s);return Number.isInteger(i)&&i>0?i:null}async function W(e,t,s){let i=Pe({source:e,step:t,summary:s});i.active&&(i.replaced?console.error(` draft: replaced unkept action "${i.replaced.summary}" \u2014 \`maestro keep\` commits one action at a time`):console.error(" draft: action pending \u2014 `
|
|
550
|
+
})()`})}function Ts(e){let t={Enter:"return",NumpadEnter:"return",Backspace:"delete",Delete:"delete",Space:"space",ShiftLeft:"shift",ShiftRight:"shift"};if(t[e])return t[e];let s=e.match(/^Digit([0-9])$/);if(s)return s[1];let i=e.match(/^Key([A-Z])$/);return i?i[1].toLowerCase():null}function Ms(e){if(typeof e!="string")return null;let t=e.replace(/\s+/g," ").trim();return t?t.slice(0,80):null}function Oo(...e){for(let t of e){if(typeof t!="string")continue;let s=t.trim();if(s)return s}return null}function Ns(e){let t=e.indexOf("--node-id");if(t<0)return null;let s=e[t+1];if(!s)return null;let i=Number(s);return Number.isInteger(i)&&i>0?i:null}async function W(e,t,s){let i=Pe({source:e,step:t,summary:s});i.active&&(i.replaced?console.error(` draft: replaced unkept action "${i.replaced.summary}" \u2014 \`maestro keep\` commits one action at a time`):console.error(" draft: action pending \u2014 `rnx maestro keep` to commit"))}function Mo(e,t,s){if(!s||s.hit===!1)return null;let i=Oo(s.responderTestID,s.testID);if(i)return{step:{tapOn:{id:i}},summary:`tap #${i}`};let d=Ms(s.text);return d?{step:{tapOn:d},summary:`tap "${d}"`}:{step:{tapAtCoords:{x:e,y:t}},summary:`tap @${Math.round(e)},${Math.round(t)}`}}function tt(e,t,s){let i=Oo(t?.testID,t?.id);return i?{step:{tapOn:{id:i}},summary:`tap #${i}`}:s==="id"?{step:{tapOn:{id:e}},summary:`tap #${e}`}:{step:{tapOn:e},summary:`tap "${e}"`}}async function _r(e,t){let s=e[0]==="get"||e[0]==="do"||e[0]==="debug"||e[0]==="wait"?e[0]:null,i=s?e.slice(1):e,d=ct(i,{port:t.port,commandTimeoutMs:t.timeoutMs,stripBooleanFlags:["--verbose","-v","--help","-h","--clear-state","--json","--all","--watch","-w","--strict","--no-wait","--dump","--failed","--slow","--tail","-f","--interactive-targets","--actions","--internal","--compact","--no-xy","--no-clipped","--include-occluded"],stripValueFlags:["--output","--nth","--index","--testid","--test-id","--text","--node-id","--max-ms","--filter","--limit","--level","--threshold","--equals","--since","--testid-like","--only","--subtree"]}),r=d.positional,p=r[0],b=s,h=typeof i[0]=="string"&&st.has(i[0]),I=h?i[0]:null,w=S=>{if(t.internalPerfCommand&&S==="perf")return`rnx perf ${t.internalPerfCommand}`;if(h&&S===i[0])return`rnx ${S}`;let o=b??nt(S)?.group;return o?`rnx ${o} ${S}`:`rnx ${S}`},g=(S,o)=>` usage: ${w(S)}${o?` ${o}`:""}`;if(!p||e.includes("--help")||e.includes("-h")){let S={bridgePort:7668,defaultShellUrl:at};if(b==="do"||b==="get"||b==="debug"||b==="wait"){let n=Be(b,S);n&&(console.log(`${n}
|
|
551
551
|
`),process.exit(0))}if(I==="shell"){let n=rt("shell",S);n&&(console.log(`${n}
|
|
552
552
|
`),process.exit(0))}let o=["do","get","debug","wait"].map(n=>Be(n,S)).filter(n=>n!=null).join(`
|
|
553
553
|
|
|
554
554
|
`);console.log(`${o}
|
|
555
|
-
`),process.exit(0)}let M=d.wsPort,x=d.simId,_=d.simIdSource,O=d.commandTimeoutMs;if(b==="get"&&p==="diagnosis"){let S=i.indexOf("diagnosis"),o=S>=0?[...i.slice(0,S),...i.slice(S+1)]:i,{runDiagnose:n}=await import("./diagnose-
|
|
556
|
-
`);let n=Math.max(...o.map(l=>l.id.length),6),a=Math.max(...o.map(l=>l.kind.length),4);for(let l of o){let u=l.available?"\u2713":"\u2717",m=l.id.padEnd(n),f=l.kind.padEnd(a);console.log(` ${u} ${m} ${f} ${l.description}`),l.available&&l.detail?console.log(` ${l.detail}`):!l.available&&l.reason&&console.log(` unavailable: ${l.reason}`)}return}let c=dt(d),D=x||"default",R=new Set(["errors","warnings","requests","js","reload","globals","perf","storage-clear","list","wait","sleep"]),A=200;function J(S){let o=S.replace(/\s+/g," ").trim();if(!o)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(o)){let a=/<title[^>]*>([^<]+)<\/title>/i.exec(S)?.[1]?.trim(),l=/<body[^>]*>([\s\S]*?)<\//i.exec(S)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),u=a||l||"html error page";return`<html ${S.length}B> "${u}" (body elided \u2014 add --json for the full payload)`}return o.length<=A?o:`${o.slice(0,A)}\u2026 (+${o.length-A} more bytes)`}function U(S){let o=S.displayUrl||S.url;return S.status!=null?`${S.method} ${o} -> ${S.status}${S.statusText?` ${S.statusText}`:""}`:S.error?`${S.method} ${o} -> ${S.error}`:`${S.method} ${o}`}async function T(S){let o=fe()?400:200;try{let{settled:n,elapsed:a}=await se({bridge:S,maxMs:o,pollMs:32,stablePolls:2});n||process.stderr.write(` \u26A0 auto-wait timed out after ${a??o}ms \u2014 next command may see mid-animation state. use \`
|
|
557
|
-
`)}catch{}}function P(S,o){if(o.result?.reason==="offscreen"){let{x:n,y:a,screen:l}=o.result;console.error(` tap failed: ${S} resolved to (${Math.round(n)},${Math.round(a)}), outside the ${l?.width}x${l?.height} screen`),console.error(" the node exists but is scrolled out of view \u2014 scroll it on-screen first (
|
|
555
|
+
`),process.exit(0)}let M=d.wsPort,x=d.simId,_=d.simIdSource,O=d.commandTimeoutMs;if(b==="get"&&p==="diagnosis"){let S=i.indexOf("diagnosis"),o=S>=0?[...i.slice(0,S),...i.slice(S+1)]:i,{runDiagnose:n}=await import("./diagnose-MLEP727D.js"),a=await n(["recent",...o],t);process.exitCode=a;return}if(b==="do"&&p==="scan"){let{runCamera:S}=await import("./camera-V3MMTKP7.js");process.exitCode=await S(i,{port:t.port});return}if(p==="list"&&i.some(S=>S==="--drivers"||S==="-D")){let{buildDriverListRows:S}=await import("./drivers-NTUKJEL6.js"),o=S();console.log(` available drivers (${o.length}):
|
|
556
|
+
`);let n=Math.max(...o.map(l=>l.id.length),6),a=Math.max(...o.map(l=>l.kind.length),4);for(let l of o){let u=l.available?"\u2713":"\u2717",m=l.id.padEnd(n),f=l.kind.padEnd(a);console.log(` ${u} ${m} ${f} ${l.description}`),l.available&&l.detail?console.log(` ${l.detail}`):!l.available&&l.reason&&console.log(` unavailable: ${l.reason}`)}return}let c=dt(d),D=x||"default",R=new Set(["errors","warnings","requests","js","reload","globals","perf","storage-clear","list","wait","sleep"]),A=200;function J(S){let o=S.replace(/\s+/g," ").trim();if(!o)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(o)){let a=/<title[^>]*>([^<]+)<\/title>/i.exec(S)?.[1]?.trim(),l=/<body[^>]*>([\s\S]*?)<\//i.exec(S)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),u=a||l||"html error page";return`<html ${S.length}B> "${u}" (body elided \u2014 add --json for the full payload)`}return o.length<=A?o:`${o.slice(0,A)}\u2026 (+${o.length-A} more bytes)`}function U(S){let o=S.displayUrl||S.url;return S.status!=null?`${S.method} ${o} -> ${S.status}${S.statusText?` ${S.statusText}`:""}`:S.error?`${S.method} ${o} -> ${S.error}`:`${S.method} ${o}`}async function T(S){let o=fe()?400:200;try{let{settled:n,elapsed:a}=await se({bridge:S,maxMs:o,pollMs:32,stablePolls:2});n||process.stderr.write(` \u26A0 auto-wait timed out after ${a??o}ms \u2014 next command may see mid-animation state. use \`rnx do settle\` for a longer wait.
|
|
557
|
+
`)}catch{}}function P(S,o){if(o.result?.reason==="offscreen"){let{x:n,y:a,screen:l}=o.result;console.error(` tap failed: ${S} resolved to (${Math.round(n)},${Math.round(a)}), outside the ${l?.width}x${l?.height} screen`),console.error(" the node exists but is scrolled out of view \u2014 scroll it on-screen first (rnx do scroll / swipe), then tap.");return}console.error(` tap failed: ${S} stayed visible but did not receive a hittable press after ${o.attempts} attempt${o.attempts===1?"":"s"}`),o.result&&console.error(` last result: ${JSON.stringify(o.result)}`)}async function H(){try{return await c.send({type:"evaluate",code:`(() => ({
|
|
558
558
|
console: ${Te},
|
|
559
559
|
requests: window.__sootsimTest?.getRequestCounts?.() || null,
|
|
560
560
|
}))()`})||{console:null,requests:null}}catch{return{console:null,requests:null}}}async function K(S={}){let o=S.counts!==void 0?S.counts:await X(c,"getRequestCounts");if(!o||typeof o!="object")return;let n=Math.max(0,Number(o.failed)||0);if(n===0||!S.includeTail&&!ze("requests",D,String(n))||(console.log(`
|
|
@@ -581,7 +581,7 @@ import{b as jt,c as qt}from"./chunk-MJ7QGY7Z.js";import{a as Dt,b as Bt}from"./c
|
|
|
581
581
|
}
|
|
582
582
|
return summary ? { summary, consoleSplit } : null
|
|
583
583
|
})()`)}catch{return}if(!n||!n.summary||!n.summary.total)return;let a=n.summary.byKind??{},l=[],u=new Set;for(let m of ie){let f=a[m];if(f)if(u.add(m),m==="console"&&n.consoleSplit){let{error:$,warn:y}=n.consoleSplit;$>0&&l.push(`${$} error${$===1?"":"s"}`),y>0&&l.push(`${y} warning${y===1?"":"s"}`)}else l.push(`${f} ${m}${f===1?"":"s"}`)}for(let[m,f]of Object.entries(a))!u.has(m)&&f&&l.push(`${f} ${m}${f===1?"":"s"}`);if(l.length!==0&&(console.error(`
|
|
584
|
-
since last: ${l.join(" \xB7 ")} \u2014
|
|
584
|
+
since last: ${l.join(" \xB7 ")} \u2014 rnx what-happened`),n.summary.lastAt))try{await ce(S,"SootSim.bridges.timeline.cursorAdvance",o,n.summary.lastAt)}catch{}}let q=new Set(["tap","double-tap","tap-text","tap-id","type","type-into","key","key-sequence","keycode","drag","swipe","long-press","touch","gesture","pinch","scroll","shell","storage-clear"]),le=new Set(["a11y","capture","count","double-tap","drag","find","gesture","layout","long-press","node","pinch","sample-color","scroll","screenshot","swipe","tap","tap-id","tap-text","touch","tree","type-into"]),ve=(e.includes("--verbose")||e.includes("-v"))&&!e.includes("--json");b==="do"&&p==="shell"&&(console.error(" `rnx do shell` was removed. use `rnx shell ...` instead."),process.exit(1)),q.has(p)&&await ut(c),le.has(p)&&await pe(c,{verbose:ve});try{let S=q.has(p)?await Ot(c):[];switch(p){case"list":{lt(d.wsPort),await so({bridge:c,simId:x,args:i});break}case"tree":{await co({bridge:c,args:i,positional:r});break}case"a11y":{let o=await xt(c);if(!Array.isArray(o)||o.length===0){console.log(" no accessible nodes found");break}if(e.includes("--json"))console.log(JSON.stringify(o,null,2));else{console.log(` accessibility tree (${o.length} nodes):
|
|
585
585
|
`);for(let n of o){let a=[];if(a.push(`[${n.role}]`),n.label){let l=n.label.length>50?n.label.slice(0,47)+"...":n.label;a.push(`"${l}"`)}if(n.hint&&a.push(`(hint: "${n.hint}")`),n.testID&&a.push(`#${n.testID}`),n.state){let l=[];n.state.disabled&&l.push("disabled"),n.state.selected&&l.push("selected"),n.state.checked===!0&&l.push("checked"),n.state.checked==="mixed"&&l.push("mixed"),n.state.busy&&l.push("busy"),n.state.expanded===!0&&l.push("expanded"),n.state.expanded===!1&&l.push("collapsed"),l.length&&a.push(`{${l.join(", ")}}`)}n.position&&a.push(`@(${n.position.x},${n.position.y})`),n.size&&a.push(`${n.size.w}x${n.size.h}`),console.log(" "+a.join(" "))}}break}case"find":{await eo({bridge:c,args:e,effectiveArgs:i,positional:r,inspectUsage:g});break}case"count":{await Qt(c,{args:i});break}case"keyboard":{await oo(c,{json:e.includes("--json")});break}case"screens":{await io(c,{json:e.includes("--json")});break}case"memory":{await ro(c,{args:i});break}case"wait":{await po({wsPort:M,commandTimeoutMs:O,simId:x,simIdSource:_,positional:r});break}case"sleep":{await lo({positional:r,inspectUsage:g});break}case"settle":{await ao({bridge:c,args:e,positional:r});break}case"ready":{await yo({bridge:c,args:e});break}case"idle":{await go({bridge:c,args:e,positional:r});break}case"selector":{await ho({bridge:c,args:e,positional:r,inspectUsage:g});break}case"event":{await fo({bridge:c,args:e,positional:r,inspectUsage:g});break}case"layout":{let o=r[1];if(!o){await to({bridge:c,args:i});break}let n=await c.send({type:"evaluate",code:`(async () => await window.__sootsimTest.getLayout(${JSON.stringify(o)}))()`});console.log(JSON.stringify(n,null,2));break}case"capture":case"screenshot":{let n=e.find(($,y)=>e[y-1]==="--output")||"/tmp/sootsim-inspect.png",a=await vo(e,c),l={type:"screenshot"};a&&(l.crop=a);let m=(await c.send(l)).replace(/^data:image\/png;base64,/,"");a&&console.log(` area: x=${a.x} y=${a.y} w=${a.w} h=${a.h}`),(await import("fs")).writeFileSync(n,Buffer.from(m,"base64")),console.log(` saved: ${n}`);break}case"sample-color":{let o=await vo(e,c);o||(console.error(g("sample-color","<x> <y> [w] [h] | --id <testID> | --text <text>")),console.error(" samples an averaged color from the canvas. coords are logical rnx units."),process.exit(1));let n=await c.send({type:"evaluate",code:Bt(o)});if(e.includes("--json"))console.log(JSON.stringify(n,null,2));else{let{r:a,g:l,b:u,a:m,hex:f,samples:$}=n,y=o.w===1&&o.h===1?`@(${o.x},${o.y})`:`@(${o.x},${o.y}) ${o.w}x${o.h}`;console.log(` ${f} rgba(${a}, ${l}, ${u}, ${m}) ${y} ${$} samples`)}break}case"node":{let o=r[1];o||(console.error(g("node","<matcher>")),console.error(" resolves testID, id, then text \u2014 dumps full node info as JSON"),process.exit(1));let n=await c.send({type:"evaluate",code:`(async () => {
|
|
586
586
|
const t = window.__sootsimTest
|
|
587
587
|
const q = ${JSON.stringify(o)}
|
|
@@ -638,7 +638,7 @@ import{b as jt,c as qt}from"./chunk-MJ7QGY7Z.js";import{a as Dt,b as Bt}from"./c
|
|
|
638
638
|
transform,
|
|
639
639
|
parentChain,
|
|
640
640
|
}
|
|
641
|
-
})()`});console.log(JSON.stringify(n,null,2));break}case"tap":{let o=Number(r[1]),n=Number(r[2]),a=xe(e,r);if(a){let m=await be(c,{agent:fe(),textFallback:a.mode==="text"?a.value:void 0,resolve:async()=>{let y=await Ee(c,a);return y?{cx:y.x,cy:y.y,match:{id:a.mode==="testid"?a.value:y.id??null,testID:a.mode==="testid"?a.value:y.testID??null,text:a.mode==="text"?a.value:y.text??null,type:y.type??null},target:{id:y.id??null,testID:y.testID??null,text:y.text??null,type:y.type??null}}:null}}),f=m.payload;(!f||typeof f.cx!="number")&&(console.error(` not found: ${a.value}`),a.mode==="testid"&&Q("wait-selector-for-missing-testid",a.value),process.exit(1)),me(m.result)||(P(`${a.mode} "${a.value}"`,m),process.exit(1));let $=Mo(f.cx,f.cy,m.result);$&&await W("inspect tap",$.step,$.summary),console.log(JSON.stringify({...m.attempts>1?{attempts:m.attempts}:{},...m.result},null,2));break}(!Number.isFinite(o)||!Number.isFinite(n))&&(console.error(g("tap","<testid> | <x> <y> | --testid <id> | --text <t>")),process.exit(1));let l=await Yt(c,o,n),u=Mo(o,n,l);u&&await W("inspect tap",u.step,u.summary),console.log(JSON.stringify(l,null,2));break}case"drag":case"swipe":{let o=Number(r[1]),n=Number(r[2]),a=Number(r[3]),l=Number(r[4]),u=p==="swipe"?10:12,m=p==="swipe"?8:16,f=r[5]?Number(r[5]):u,$=r[6]?Number(r[6]):m;(!Number.isFinite(o)||!Number.isFinite(n)||!Number.isFinite(a)||!Number.isFinite(l)||!Number.isFinite(f)||!Number.isFinite($))&&(console.error(g(p,"<x1> <y1> <x2> <y2> [steps] [stepMs]")),process.exit(1));let y=await $e(c,{type:"drag",fromX:o,fromY:n,toX:a,toY:l,steps:Math.max(1,Math.round(f)),stepMs:Math.max(0,Math.round($))});if(y?.ok){let k=Math.max(1,Math.round(Math.max(1,f)*Math.max(0,$)));await W(`inspect ${p}`,{swipe:{start:`${o}, ${n}`,end:`${a}, ${l}`,duration:k}},`${p} ${o},${n} -> ${a},${l}`)}console.log(JSON.stringify(y,null,2));break}case"pinch":{let o=Number(r[1]),n=Number(r[2]),a=Number(r[3]),l=Number(r[4]),u=Number(r[5]),m=Number(r[6]),f=Number(r[7]),$=Number(r[8]),y=r[9]?Number(r[9]):12,k=r[10]?Number(r[10]):16;(!Number.isFinite(o)||!Number.isFinite(n)||!Number.isFinite(a)||!Number.isFinite(l)||!Number.isFinite(u)||!Number.isFinite(m)||!Number.isFinite(f)||!Number.isFinite($)||!Number.isFinite(y)||!Number.isFinite(k))&&(console.error(g("pinch","<x1> <y1> <x2> <y2> <x1'> <y1'> <x2'> <y2'> [steps] [stepMs]")),process.exit(1));let L=await $e(c,{type:"pinch",fromX1:o,fromY1:n,fromX2:a,fromY2:l,toX1:u,toY1:m,toX2:f,toY2:$,steps:Math.max(1,Math.round(y)),stepMs:Math.max(0,Math.round(k))});L?.ok&&await W("inspect pinch",{pinch:{from:[o,n,a,l],to:[u,m,f,$],steps:Math.max(1,Math.round(y)),stepMs:Math.max(0,Math.round(k))}},`pinch (${o},${n}) (${a},${l}) -> (${u},${m}) (${f},${$})`),console.log(JSON.stringify(L,null,2));break}case"tap-text":{let o=r[1];o||(console.error(g("tap-text","<text>")),process.exit(1));let n=z=>{let j=e.indexOf(z);return j>=0&&j+1<e.length?e[j+1]:null},a=z=>e.includes(z),l=n("--nth")??n("--index"),u=l!==null?Number(l):null;u!==null&&!Number.isFinite(u)&&(console.error(` --nth/--index requires an integer, got: ${l}`),process.exit(1));let m=n("--within"),f=n("--role"),$=a("--exact"),y=a("--first"),k=n("--min-y"),L=n("--max-y"),V=n("--min-x"),G=n("--max-x");for(let[z,j]of[["--min-y",k],["--max-y",L],["--min-x",V],["--max-x",G]])j!==null&&!Number.isFinite(Number(j))&&(console.error(` ${z} requires a number, got: ${j}`),process.exit(1));let Y=e.indexOf("--near"),E=null;if(Y>=0){let z=Number(e[Y+1]),j=Number(e[Y+2]);(!Number.isFinite(z)||!Number.isFinite(j))&&(console.error(" --near requires two numbers: --near <x> <y>"),process.exit(1)),E={x:z,y:j}}let v={exact:$,role:f,within:m,minX:V!==null?Number(V):null,maxX:G!==null?Number(G):null,minY:k!==null?Number(k):null,maxY:L!==null?Number(L):null,near:E,nth:u,first:y},N=await Xt(c,o,v,{agent:fe()}),F=N.payload;if(F?.error==="bridge-not-ready"&&(console.error("
|
|
641
|
+
})()`});console.log(JSON.stringify(n,null,2));break}case"tap":{let o=Number(r[1]),n=Number(r[2]),a=xe(e,r);if(a){let m=await be(c,{agent:fe(),textFallback:a.mode==="text"?a.value:void 0,resolve:async()=>{let y=await Ee(c,a);return y?{cx:y.x,cy:y.y,match:{id:a.mode==="testid"?a.value:y.id??null,testID:a.mode==="testid"?a.value:y.testID??null,text:a.mode==="text"?a.value:y.text??null,type:y.type??null},target:{id:y.id??null,testID:y.testID??null,text:y.text??null,type:y.type??null}}:null}}),f=m.payload;(!f||typeof f.cx!="number")&&(console.error(` not found: ${a.value}`),a.mode==="testid"&&Q("wait-selector-for-missing-testid",a.value),process.exit(1)),me(m.result)||(P(`${a.mode} "${a.value}"`,m),process.exit(1));let $=Mo(f.cx,f.cy,m.result);$&&await W("inspect tap",$.step,$.summary),console.log(JSON.stringify({...m.attempts>1?{attempts:m.attempts}:{},...m.result},null,2));break}(!Number.isFinite(o)||!Number.isFinite(n))&&(console.error(g("tap","<testid> | <x> <y> | --testid <id> | --text <t>")),process.exit(1));let l=await Yt(c,o,n),u=Mo(o,n,l);u&&await W("inspect tap",u.step,u.summary),console.log(JSON.stringify(l,null,2));break}case"drag":case"swipe":{let o=Number(r[1]),n=Number(r[2]),a=Number(r[3]),l=Number(r[4]),u=p==="swipe"?10:12,m=p==="swipe"?8:16,f=r[5]?Number(r[5]):u,$=r[6]?Number(r[6]):m;(!Number.isFinite(o)||!Number.isFinite(n)||!Number.isFinite(a)||!Number.isFinite(l)||!Number.isFinite(f)||!Number.isFinite($))&&(console.error(g(p,"<x1> <y1> <x2> <y2> [steps] [stepMs]")),process.exit(1));let y=await $e(c,{type:"drag",fromX:o,fromY:n,toX:a,toY:l,steps:Math.max(1,Math.round(f)),stepMs:Math.max(0,Math.round($))});if(y?.ok){let k=Math.max(1,Math.round(Math.max(1,f)*Math.max(0,$)));await W(`inspect ${p}`,{swipe:{start:`${o}, ${n}`,end:`${a}, ${l}`,duration:k}},`${p} ${o},${n} -> ${a},${l}`)}console.log(JSON.stringify(y,null,2));break}case"pinch":{let o=Number(r[1]),n=Number(r[2]),a=Number(r[3]),l=Number(r[4]),u=Number(r[5]),m=Number(r[6]),f=Number(r[7]),$=Number(r[8]),y=r[9]?Number(r[9]):12,k=r[10]?Number(r[10]):16;(!Number.isFinite(o)||!Number.isFinite(n)||!Number.isFinite(a)||!Number.isFinite(l)||!Number.isFinite(u)||!Number.isFinite(m)||!Number.isFinite(f)||!Number.isFinite($)||!Number.isFinite(y)||!Number.isFinite(k))&&(console.error(g("pinch","<x1> <y1> <x2> <y2> <x1'> <y1'> <x2'> <y2'> [steps] [stepMs]")),process.exit(1));let L=await $e(c,{type:"pinch",fromX1:o,fromY1:n,fromX2:a,fromY2:l,toX1:u,toY1:m,toX2:f,toY2:$,steps:Math.max(1,Math.round(y)),stepMs:Math.max(0,Math.round(k))});L?.ok&&await W("inspect pinch",{pinch:{from:[o,n,a,l],to:[u,m,f,$],steps:Math.max(1,Math.round(y)),stepMs:Math.max(0,Math.round(k))}},`pinch (${o},${n}) (${a},${l}) -> (${u},${m}) (${f},${$})`),console.log(JSON.stringify(L,null,2));break}case"tap-text":{let o=r[1];o||(console.error(g("tap-text","<text>")),process.exit(1));let n=z=>{let j=e.indexOf(z);return j>=0&&j+1<e.length?e[j+1]:null},a=z=>e.includes(z),l=n("--nth")??n("--index"),u=l!==null?Number(l):null;u!==null&&!Number.isFinite(u)&&(console.error(` --nth/--index requires an integer, got: ${l}`),process.exit(1));let m=n("--within"),f=n("--role"),$=a("--exact"),y=a("--first"),k=n("--min-y"),L=n("--max-y"),V=n("--min-x"),G=n("--max-x");for(let[z,j]of[["--min-y",k],["--max-y",L],["--min-x",V],["--max-x",G]])j!==null&&!Number.isFinite(Number(j))&&(console.error(` ${z} requires a number, got: ${j}`),process.exit(1));let Y=e.indexOf("--near"),E=null;if(Y>=0){let z=Number(e[Y+1]),j=Number(e[Y+2]);(!Number.isFinite(z)||!Number.isFinite(j))&&(console.error(" --near requires two numbers: --near <x> <y>"),process.exit(1)),E={x:z,y:j}}let v={exact:$,role:f,within:m,minX:V!==null?Number(V):null,maxX:G!==null?Number(G):null,minY:k!==null?Number(k):null,maxY:L!==null?Number(L):null,near:E,nth:u,first:y},N=await Xt(c,o,v,{agent:fe()}),F=N.payload;if(F?.error==="bridge-not-ready"&&(console.error(" rnx test bridge not ready"),process.exit(1)),F?.ambiguous){let z=F.candidates;console.error(` ambiguous: ${F.total} matches for "${o}"`);for(let j of z){let ke=j.abs?`@(${Math.round(j.abs.x)},${Math.round(j.abs.y)})`:"",Po=j.layout?` ${j.layout.width}x${j.layout.height}`:"",Ro=j.testID?` #${j.testID}`:"",Eo=j.text?` "${j.text}"`:"",Ao=j.ancestorTestIDs.length>0?` within ${j.ancestorTestIDs.slice(0,3).map(_o=>`#${_o}`).join(" > ")}`:"";console.error(` [${j.idx}] <${j.type}>${Eo}${Ro} ${ke}${Po}${Ao}`)}F.total>z.length&&console.error(` ... and ${F.total-z.length} more`),console.error(" pick one:"),console.error(" --nth <index> pick the nth match (top-to-bottom, left-to-right; negatives from end)"),console.error(" --within <testID> narrow to descendants of a node"),console.error(" --min-y / --max-y geometric filter (pixels, absolute)"),console.error(" --min-x / --max-x geometric filter (pixels, absolute)"),console.error(" --near <x> <y> pick the closest match to a point"),console.error(" --exact exact text match (default is substring)"),console.error(" --role <role> narrow to accessibilityRole"),console.error(" --first keep the old pick-first-silently behavior"),process.exit(2)}F?.nthOutOfRange&&(console.error(` not found: nth ${F.nth} of ${F.total} match${F.total===1?"":"es"} for "${o}"`),process.exit(1)),(!F||typeof F.cx!="number")&&(console.error(` not found: ${o}`),process.exit(1)),me(N.result)||(P(`text "${o}"`,N),process.exit(1));let ne=tt(o,{id:F.target?.id??null,testID:F.target?.testID??null,type:F.target?.type??null,cx:F.cx,cy:F.cy},"text");await W("inspect tap-text",ne.step,ne.summary),console.log(JSON.stringify({matched:F.match,tapped:{nodeId:F.target?.nodeId??null,id:F.target?.id??null,testID:F.target?.testID??null,type:F.target?.type??null,cx:F.cx,cy:F.cy},...F.strategy&&F.strategy!=="matched-node"?{strategy:F.strategy}:{},...F.total>1||u!==null?{nth:{index:F.idx,total:F.total}}:{},...N.attempts>1?{attempts:N.attempts}:{},result:N.result},null,2));break}case"tap-best":{let o=r[1];o||(console.error(g("tap-best","<query>")),process.exit(1));let n=await Vt(c,o,{agent:fe()}),a=n.payload;a||(console.error(` tap-best: no testID or visible text matched "${o}". try \`rnx find --interactive-targets\` to list candidates.`),process.exit(1)),"error"in a&&(console.error(` ${a.error}`),process.exit(1)),a.strategy==="none"&&(console.error(` tap-best: no testID or visible text matched "${o}". try \`rnx find --interactive-targets\` to list candidates.`),process.exit(1));let l=a.node;me(n.result)||(P(`best "${o}"`,n),process.exit(1));let u=tt(o,{id:l.id,testID:l.testID,type:l.type,cx:a.cx,cy:a.cy},a.strategy==="testid"?"id":"text");await W("inspect tap-best",u.step,u.summary),console.log(JSON.stringify({matched:{strategy:a.strategy,nodeId:l.nodeId,id:l.id,testID:l.testID,type:l.type,text:l.text},tapped:{cx:a.cx,cy:a.cy},...n.attempts>1?{attempts:n.attempts}:{},result:n.result},null,2));break}case"tap-id":{let o=r[1];o||(console.error(g("tap-id","<id>")),process.exit(1));let n=await zt(c,o,{agent:fe()}),a=n.payload;(!a||typeof a.cx!="number")&&(console.error(` not found: ${o}`),await ys(c,o),process.exit(1)),me(n.result)||(P(`id "${o}"`,n),process.exit(1));let l=tt(o,{id:a.target?.id??null,testID:a.target?.testID??null,type:a.target?.type??null,cx:a.cx,cy:a.cy},"id");await W("inspect tap-id",l.step,l.summary),console.log(JSON.stringify({matched:a.match,tapped:{nodeId:a.target?.nodeId??null,id:a.target?.id??null,testID:a.target?.testID??null,type:a.target?.type??null,cx:a.cx,cy:a.cy},...a.strategy&&a.strategy!=="matched-node"?{strategy:a.strategy}:{},...n.attempts>1?{attempts:n.attempts}:{},result:n.result},null,2));break}case"type-into":{let o=r[1],n=r.slice(2).join(" ");(!o||!n)&&(console.error(g("type-into","<id> <text>")),process.exit(1));let a=JSON.stringify(o),l=await c.send({type:"evaluate",code:`(async () => {
|
|
642
642
|
const t = window.__sootsimTest
|
|
643
643
|
if (!t) return null
|
|
644
644
|
const n = await (t.findByTestId(${a}) || t.findById(${a}))
|
|
@@ -789,7 +789,7 @@ import{b as jt,c as qt}from"./chunk-MJ7QGY7Z.js";import{a as Dt,b as Bt}from"./c
|
|
|
789
789
|
`).slice(0,2);for(let L of k)console.log(` ${L.trim()}`)}}}}catch{}m&&!m.ready&&(process.exitCode=1);break}case"storage-clear":{if(await Le(c),await c.send({type:"evaluate",code:Je(!0)})!==!0){C(i)?B({cleared:!1,ready:!1,error:"external app reload bridge is unavailable"}):console.error(" storage clear failed: external app reload bridge is unavailable"),process.exitCode=1;break}let l=await Ne(c,{timeoutMs:1e4,errorGraceMs:3e3});if(C(i)){B({cleared:!0,ready:l.ready,reload:l}),l.ready||(process.exitCode=1);break}if(l.ready){let u=l.source==="nodes-fallback"?" (no ready signal, node-count fallback)":"";console.log(` cleared tenant storage; ready in ${l.elapsedMs}ms: ${l.nodes} nodes${u}`)}else if(l.source==="error-bail")console.log(` \u26A0 storage clear reloaded but bailed after ${l.elapsedMs}ms: ${l.errors} console error(s), ready signal never fired`);else{let u=wo(l);console.log(` \u26A0 storage clear reloaded but timed out after ${l.elapsedMs}ms \u2014 ${u} (nodes: ${l.nodes}, targets: ${l.targets}, errors: ${l.errors})`)}try{let u=await ge(c,10);if(Array.isArray(u)&&u.length>0){console.log(`
|
|
790
790
|
\u26A0 ${u.length} error(s) during mount:
|
|
791
791
|
`);for(let m of u){let f=m.args.map($=>typeof $=="object"?JSON.stringify($):$).join(" ");if(console.log(` ${f}`),m.stack){let $=m.stack.split(`
|
|
792
|
-
`).slice(0,2);for(let y of $)console.log(` ${y.trim()}`)}}}}catch{}l.ready||(process.exitCode=1);break}case"js":{let o=r.slice(1).join(" ");if(o||(console.error(g("js","<javascript>")),console.error(""),console.error(" runs the snippet in the engine realm. SootSim is the"),console.error(" canonical state surface \u2014 reach into it directly."),console.error(""),console.error(" examples:"),console.error(` ${w("js")} SootSim.bridges.test.findByText("Sign in")`),console.error(` ${w("js")} SootSim.bridges.debug.snapshot("before")`),console.error(` ${w("js")} SootSim.bridges.keyboard.type("hello")`),console.error(` ${w("js")} SootSim.state.root.children.length`),process.exit(1)),e.includes("--tenant")){let m=r.slice(1).filter($=>$!=="--tenant").join(" "),f=await c.send({type:"evaluate",code:`(async () => SootSim.bridges.test.evalInTenant(${JSON.stringify(m)}))()`});console.log(JSON.stringify(f,null,2));break}let n=o;n.startsWith("(async")||(n=`(async () => ${n})()`);let a=await c.send({type:"evaluate",code:n});console.log(JSON.stringify(a,null,2));let l=o.toLowerCase(),u=[];(l.includes("sootsim:gohome")||l.includes("gohome"))&&u.push("
|
|
792
|
+
`).slice(0,2);for(let y of $)console.log(` ${y.trim()}`)}}}}catch{}l.ready||(process.exitCode=1);break}case"js":{let o=r.slice(1).join(" ");if(o||(console.error(g("js","<javascript>")),console.error(""),console.error(" runs the snippet in the engine realm. SootSim is the"),console.error(" canonical state surface \u2014 reach into it directly."),console.error(""),console.error(" examples:"),console.error(` ${w("js")} SootSim.bridges.test.findByText("Sign in")`),console.error(` ${w("js")} SootSim.bridges.debug.snapshot("before")`),console.error(` ${w("js")} SootSim.bridges.keyboard.type("hello")`),console.error(` ${w("js")} SootSim.state.root.children.length`),process.exit(1)),e.includes("--tenant")){let m=r.slice(1).filter($=>$!=="--tenant").join(" "),f=await c.send({type:"evaluate",code:`(async () => SootSim.bridges.test.evalInTenant(${JSON.stringify(m)}))()`});console.log(JSON.stringify(f,null,2));break}let n=o;n.startsWith("(async")||(n=`(async () => ${n})()`);let a=await c.send({type:"evaluate",code:n});console.log(JSON.stringify(a,null,2));let l=o.toLowerCase(),u=[];(l.includes("sootsim:gohome")||l.includes("gohome"))&&u.push("rnx shell home"),(l.includes("sootsim:appswitcher")||l.includes("appswitcher"))&&u.push("rnx shell switcher"),(l.includes("keyboard.isvisible")||l.includes("keyboard.getmode"))&&u.push("rnx debug state keyboard"),l.includes("interact.tap")&&u.push("rnx do tap <x> <y>"),l.includes("keyboard.type")&&u.push("rnx do type <text>"),(l.includes("keyboard.press")||l.includes("keyboard.dispatchkey"))&&u.push("rnx do key <name>"),l.includes("keyboard.dismiss")&&u.push("rnx do dismiss"),l.includes("dumptree")&&u.push("rnx get tree"),l.includes("dumpaccessibilitytree")&&u.push("rnx get a11y"),l.includes("getnodecount")&&u.push("rnx get count"),l.includes("findbytext")&&u.push("rnx find <text>"),(l.includes("findbytestid")||l.includes("findbyid"))&&u.push("rnx find --testid <id>"),l.includes("document.hidden")&&u.push("rnx debug state keyboard (includes tab health)"),u.length>0&&Q("prefer-cli-over-eval",u);break}case"globals":{let o=await c.send({type:"evaluate",code:`(async () => {
|
|
793
793
|
const globals = {}
|
|
794
794
|
|
|
795
795
|
// test bridge (proxy in worker mode)
|
|
@@ -827,7 +827,7 @@ import{b as jt,c as qt}from"./chunk-MJ7QGY7Z.js";import{a as Dt,b as Bt}from"./c
|
|
|
827
827
|
|
|
828
828
|
return globals
|
|
829
829
|
})()`});console.log(` rnx JS API:
|
|
830
|
-
`);for(let[n,a]of Object.entries(o)){console.log(` ${n}:`);for(let l of a)console.log(` .${l}`);console.log("")}console.log(` use: ${w("js")} <expression>`),console.log(` example: ${w("js")} test.findByText("Sign in")`);break}case"describe":{await Zt({bridge:c,args:e,positional:r});break}case"perf":{b==="debug"&&!t.internalPerfCommand&&(console.error(" `
|
|
830
|
+
`);for(let[n,a]of Object.entries(o)){console.log(` ${n}:`);for(let l of a)console.log(` .${l}`);console.log("")}console.log(` use: ${w("js")} <expression>`),console.log(` example: ${w("js")} test.findByText("Sign in")`);break}case"describe":{await Zt({bridge:c,args:e,positional:r});break}case"perf":{b==="debug"&&!t.internalPerfCommand&&(console.error(" `rnx debug perf` was removed. use `rnx perf shell ...`."),process.exit(1));let o=r[1];if(t.internalPerfCommand==="scroll"){if(!o||o==="--help"||o==="-h"){console.log(`
|
|
831
831
|
${w("perf")} <start|stop> [options]
|
|
832
832
|
|
|
833
833
|
records per-frame scroll offsets from the tenant worker, shell worker,
|
|
@@ -914,7 +914,7 @@ import{b as jt,c as qt}from"./chunk-MJ7QGY7Z.js";import{a as Dt,b as Bt}from"./c
|
|
|
914
914
|
`).slice(0,3);for(let $ of f)console.log(` ${$.trim()}`)}}break}case"warnings":{let o=r[1]?Number(r[1]):20,n=await kt(c,o);if(C(i)){B(n);break}if(n.length===0){console.log(" no warnings captured");break}console.log(` ${n.length} warning(s):
|
|
915
915
|
`);for(let a of n){let l=ae(a.timestamp),u=a.args.map(m=>typeof m=="object"?JSON.stringify(m):m).join(" ");console.log(` [${l}] ${u}`)}break}case"animations":{let o=await X(c,"listAnimations")??[];if(e.includes("--json")){console.log(JSON.stringify(o,null,2));break}if(o.length===0){console.log(" no active animations");break}console.log(` ${o.length} active animation(s):
|
|
916
916
|
`);for(let n of o){let a=String(n.realm??"tenant").padEnd(6),l=String(n.kind).padEnd(10),u=typeof n.from=="number"&&typeof n.to=="number"?`${n.from.toFixed(2)}\u2192${n.to.toFixed(2)}`:"\u2014",m=Number(n.current??0).toFixed(2),f=typeof n.progress=="number"?`${Math.round(n.progress*100)}%`:"\u2014",$=`${Math.round(n.elapsedMs??0)}ms`,y=[n.loop?"loop":null,n.layoutBound?"layout":null,n.remoteDriven?"remote-driven":n.graphBacked?"graph":null,n.visible===!1?"offscreen":null].filter(Boolean),k=y.length>0?` [${y.join(" ")}]`:"";console.log(` #${n.id} ${a} ${l} ${u.padEnd(14)} cur=${m.padEnd(7)} ${f.padStart(4)} ${$}${k}`)}break}case"animation":{let o=r[1];(!o||o==="--help"||o==="-h")&&(console.error(` usage: ${w("animation")} <id>`),process.exit(1));let n=Number(o);Number.isFinite(n)||(console.error(` invalid id: ${o}`),process.exit(1));let a=await X(c,"getAnimation",n);console.log(JSON.stringify(a,null,2));break}case"stop-animation":{let o=r[1];(!o||o==="--help"||o==="-h")&&(console.error(` usage: ${w("stop-animation")} <id|all>`),process.exit(1));let n=o==="all"?"all":Number(o);n!=="all"&&!Number.isFinite(n)&&(console.error(` invalid id: ${o}`),process.exit(1));let a=await X(c,"stopAnimation",n);console.log(` stopped ${a??0} animation(s)`);break}case"requests":{let o=r[1];if(o==="clear"){await Tt(c),C(i)?B({cleared:!0}):console.log(" request buffer cleared");break}let n=o==="all",a=n?r[2]:o,l=a?Number(a):20,u=await It(c,{failed:!n,limit:l});if(C(i)){B(u);break}if(u.length===0){console.log(n?" no requests captured":" no failed requests captured");break}console.log(` ${u.length} ${n?"request(s)":"failed request(s)"}:
|
|
917
|
-
`);for(let m of u){let f=ae(m.timestamp);console.log(` [${f}] ${U(m)}`),m.responseBody?console.log(` ${m.responseBody}`):m.error&&console.log(` ${m.error}`)}break}case"network":{let o=r[1],n=null,a=null,l=!1,u=!1,m=1e3,f=!1,$=!1;for(let E=0;E<i.length;E++){let v=i[E];if(v==="--filter")n=i[E+1]??null,E++;else if(v==="--limit"){let N=Number(i[E+1]);Number.isFinite(N)&&(a=N),E++}else if(v==="--threshold"){let N=Number(i[E+1]);Number.isFinite(N)&&N>0&&(m=N),E++}else v==="--failed"?l=!0:v==="--slow"?u=!0:v==="--tail"||v==="-f"?f=!0:v==="--json"&&($=!0)}if(o==="clear"){await c.send({type:"evaluate",code:'window.__sootsimObservability?.network.clear(); "cleared"'}),console.log(" network buffer cleared");break}if(o==="get"){let E=r[2];E||(console.error(" usage:
|
|
917
|
+
`);for(let m of u){let f=ae(m.timestamp);console.log(` [${f}] ${U(m)}`),m.responseBody?console.log(` ${m.responseBody}`):m.error&&console.log(` ${m.error}`)}break}case"network":{let o=r[1],n=null,a=null,l=!1,u=!1,m=1e3,f=!1,$=!1;for(let E=0;E<i.length;E++){let v=i[E];if(v==="--filter")n=i[E+1]??null,E++;else if(v==="--limit"){let N=Number(i[E+1]);Number.isFinite(N)&&(a=N),E++}else if(v==="--threshold"){let N=Number(i[E+1]);Number.isFinite(N)&&N>0&&(m=N),E++}else v==="--failed"?l=!0:v==="--slow"?u=!0:v==="--tail"||v==="-f"?f=!0:v==="--json"&&($=!0)}if(o==="clear"){await c.send({type:"evaluate",code:'window.__sootsimObservability?.network.clear(); "cleared"'}),console.log(" network buffer cleared");break}if(o==="get"){let E=r[2];E||(console.error(" usage: rnx network get <id>"),process.exit(1));let v=await c.send({type:"evaluate",code:`(() => {
|
|
918
918
|
const obs = window.__sootsimObservability;
|
|
919
919
|
if (!obs) return null;
|
|
920
920
|
return obs.network.getSnapshot().find(e => e.id === ${JSON.stringify(E)}) || null;
|
|
@@ -929,9 +929,9 @@ import{b as jt,c as qt}from"./chunk-MJ7QGY7Z.js";import{a as Dt,b as Bt}from"./c
|
|
|
929
929
|
`);let V=new Set,G=!0,Y=()=>{G=!1};process.on("SIGINT",Y);try{for(;G;){let E=await k(),v=L(E);for(let N of v)N.durationMs!=null&&(V.has(N.id)||(V.add(N.id),$?console.log(JSON.stringify(N)):xo(N)));await oe(250)}}finally{process.off("SIGINT",Y)}break}case"logs":{let o=r[1],n=null,a=null,l=null,u=!1,m=!1,f=!1;for(let v=0;v<i.length;v++){let N=i[v];if(N==="--filter")n=i[v+1]??null,v++;else if(N==="--limit"){let F=Number(i[v+1]);Number.isFinite(F)&&(a=F),v++}else N==="--level"?(l=i[v+1]??null,v++):N==="--tail"||N==="-f"?u=!0:N==="--json"?m=!0:(N==="--internal"||N==="--all")&&(f=!0)}let $=l?new Set(l.split(",").map(v=>v.trim()).filter(v=>v==="log"||v==="info"||v==="warn"||v==="error"||v==="debug")):null;if(o==="clear"){await Nt(c),console.log(" log buffer cleared");break}let y=!m&&process.stdout.isTTY===!0,k=a??(u?500:o?Number(o):50);Number.isFinite(k)||(console.error(` invalid limit: ${o} \u2014 \`logs\` takes a numeric count (e.g. ${w("logs")} 100).
|
|
930
930
|
to target a specific sim, use \`--sim ${o}\` instead.`),process.exit(1));let L=()=>Mt(c),V=v=>Ft(v,{level:$,filter:n,showInternal:f});if(!u){let v=await L(),N=V(v).slice(-k);if(m){console.log(JSON.stringify(N,null,2));break}if(N.length===0){console.log(v.length===0?" no logs captured":" no matching logs");break}console.log(` ${N.length} log(s):
|
|
931
931
|
`);for(let F of N)So(F,y);break}console.log(` tailing logs (ctrl-c to stop)...
|
|
932
|
-
`);let G=new Set,Y=!0,E=()=>{Y=!1};process.on("SIGINT",E);try{for(;Y;){let v=await L(),N=V(v);for(let F of N)G.has(F.id)||(G.add(F.id),m?console.log(JSON.stringify(F)):So(F,y));await oe(250)}}finally{process.off("SIGINT",E)}break}default:console.error(` unknown subcommand: ${p}`),process.exit(1)}if(q.has(p)&&!e.includes("--no-wait")&&process.env.SOOTSIM_NO_AUTO_WAIT!=="1"&&!await mt(c,p)&&await T(c),S.length>0&&ee(S),!R.has(p))try{await Se(c)}catch{}}catch(S){let o=S instanceof Error?S.message:String(S);console.error(` ${p??"
|
|
932
|
+
`);let G=new Set,Y=!0,E=()=>{Y=!1};process.on("SIGINT",E);try{for(;Y;){let v=await L(),N=V(v);for(let F of N)G.has(F.id)||(G.add(F.id),m?console.log(JSON.stringify(F)):So(F,y));await oe(250)}}finally{process.off("SIGINT",E)}break}default:console.error(` unknown subcommand: ${p}`),process.exit(1)}if(q.has(p)&&!e.includes("--no-wait")&&process.env.SOOTSIM_NO_AUTO_WAIT!=="1"&&!await mt(c,p)&&await T(c),S.length>0&&ee(S),!R.has(p))try{await Se(c)}catch{}}catch(S){let o=S instanceof Error?S.message:String(S);console.error(` ${p??"rnx"} failed: ${o}`);let n=/^no sim connected with id ([^;]+)(?:; connected sims: .+)?$/.exec(o),a=/^command timed out after (\d+)s$/.exec(o),l=o.startsWith("sim disconnected:")||o.startsWith("bridge never reconnected")||o.startsWith("could not connect to ws://");if(n)await qt(c,M,n[1]);else if(/^no sim connected$/.test(o))jt(M);else if(a)if(await gs(c)){let m=p??"describe";process.stderr.write(` the sim is still responsive \u2014 '${m}' just exceeded the ${a[1]}s command budget.
|
|
933
933
|
the screen's node tree is large; narrow the query or raise the budget:
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
934
|
+
rnx ${m} --testid <id> # scope to one subtree
|
|
935
|
+
rnx find --testid <id> # targeted single-node lookup
|
|
936
|
+
rnx ${m} --timeout 60000 # raise per-command budget (ms)
|
|
937
937
|
`)}else bo();else if(l)bo();else{try{await _t(c)}catch{}try{await te({includeTail:!0})}catch{}try{await K({includeTail:!0})}catch{}}process.exit(1)}finally{c.close()}}export{Je as a,Do as b,Ps as c,Cs as d,js as e,qs as f,Ls as g,se as h,Io as i,_r as j};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.337 | (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{I as F,J as j,K as H,k as N,l as U,v as _,z as E}from"./chunk-
|
|
4
|
+
import{I as F,J as j,K as H,k as N,l as U,v as _,z as E}from"./chunk-4FRSEZ7Z.js";import{a as L}from"./chunk-UWEDNDND.js";import G from"node:fs";import Z from"node:path";function A(e){return e.length<=100&&/^[0-9A-Za-z][0-9A-Za-z._+-]*$/.test(e)}function D(e){try{return G.readdirSync(e.runtimesDir(),{withFileTypes:!0}).filter(c=>c.isDirectory()).map(c=>c.name).sort(k)}catch{return[]}}function M(e,c){return Z.posix.basename(e.tarballPath(c))}function k(e,c){let l=f=>{let v=f.indexOf("-"),V=v>=0?f.slice(0,v):f,T=v>=0?f.slice(v+1):"",$=V.split(".").map(S=>Number.parseInt(S,10));return $.some(S=>!Number.isFinite(S))?[[Number.POSITIVE_INFINITY],f]:[$,T]},[m,u]=l(e),[R,x]=l(c);for(let f=0;f<Math.max(m.length,R.length);f++){let v=m[f]??0,V=R[f]??0;if(v!==V)return v-V}return u===x?0:u?x?u<x?-1:1:-1:1}import{spawn as B}from"node:child_process";import J from"node:crypto";import o from"node:fs";import Y from"node:os";import y from"node:path";import{Readable as q}from"node:stream";import{pipeline as K}from"node:stream/promises";var Q=2;function W(e){function c(){try{let n=JSON.parse(o.readFileSync(e.configFile(),"utf8"));return n&&typeof n=="object"?n:{}}catch{return{}}}function l(n){let t=c();return(n||process.env[e.env.cdnOrigin]||t.cdnOrigin||e.defaultCdnOrigin).replace(/\/+$/,"")}function m(n){let t=c();return n||process.env[e.env.channel]||t.runtimeChannel||"stable"}function u(){if(!e.env.pin)return null;let n=process.env[e.env.pin];if(n&&n.trim())return n.trim();let t=c();return typeof t.runtimeVersion=="string"&&t.runtimeVersion.trim()?t.runtimeVersion.trim():null}function R(n){let t=new URL(`${l(n)}${e.manifestPath}`);return t.searchParams.set("t",String(Date.now())),t.toString()}function x(n,t){return`${l(t)}${e.tarballPath(n)}`}async function f(n){let t=R(n),r=await fetch(t,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${t})`);return await r.json()}function v(n,t={}){let r=m(t.channel),i=t.version||u()||n.channels[r]?.latest;if(!i)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);if(!A(i))throw new Error(`invalid runtime version: ${i}`);let h=n.versions[i];if(!h)throw new Error(`version ${i} not found in manifest; available: ${Object.keys(n.versions).slice(-10).join(", ")||"(none)"}`);return{version:i,channel:r,entry:h}}async function V(n={}){e.ensureHome();let t=l(n.cdnOrigin),r=await f(t),{version:i,channel:h,entry:a}=v(r,n),d=e.runtimeDir(i),g=n.setActive!==!1,O=[i,...n.protectVersions??[]];if(I({protectVersions:O}),!n.force&&o.existsSync(y.join(d,e.installedMarker)))return g&&e.writeActiveRuntime(i),I({protectVersions:O}),{version:i,channel:h,cdnOrigin:t,runtimeDir:d,installed:!1,activated:g,manifest:r};let P=a.tarball||x(i,t),b=o.mkdtempSync(y.join(Y.tmpdir(),`${e.id}-runtime-download-`)),w=y.join(b,M(e,i)),p=y.join(y.dirname(d),`.installing-${i}-${process.pid}`);o.rmSync(p,{recursive:!0,force:!0});try{process.stderr.write(`${e.id}: downloading runtime ${i}\u2026
|
|
5
5
|
`),await X(P,w),process.stderr.write(`${e.id}: extracting runtime ${i}\u2026
|
|
6
6
|
`);let s=await ee(w);if(s!==a.sha256)throw new Error(`sha256 mismatch for runtime ${i}: expected ${a.sha256}, actual ${s}`);if(o.mkdirSync(p,{recursive:!0}),await ne(w,p),!o.existsSync(y.join(p,e.installedMarker)))throw new Error(`extracted tarball for runtime ${i} is missing ${e.installedMarker}`);o.rmSync(d,{recursive:!0,force:!0}),o.renameSync(p,d)}catch(s){throw o.rmSync(p,{recursive:!0,force:!0}),s}finally{o.rmSync(b,{recursive:!0,force:!0})}return g&&e.writeActiveRuntime(i),I({protectVersions:O}),{version:i,channel:h,cdnOrigin:t,runtimeDir:d,installed:!0,activated:g,manifest:r}}async function T(n={}){e.ensureHome(),I({protectVersions:n.protectVersions});let t=l(n.cdnOrigin),r=m(n.channel),i=u();if(i){let p=e.readActiveRuntime(),s=o.existsSync(y.join(e.runtimeDir(i),e.installedMarker));if(p===i&&s)return{checked:!0,updated:!1,reason:`runtime is pinned to ${i}`,activeVersion:p,latestVersion:i};let C=await V({version:i,channel:r,cdnOrigin:t,setActive:!1,protectVersions:n.protectVersions});return{checked:!0,updated:!0,reason:`runtime is pinned to ${i}`,activeVersion:i,latestVersion:i,install:C}}let h=await f(t),a=h.channels[r]?.latest;if(!a)return{checked:!0,updated:!1,reason:`channel '${r}' has no latest runtime`,activeVersion:e.readActiveRuntime()};if(!h.versions[a])return{checked:!0,updated:!1,reason:`manifest is missing version ${a}`,activeVersion:e.readActiveRuntime(),latestVersion:a};let g=e.readActiveRuntime(),O=g?e.runtimeDir(g):null,P=O?o.existsSync(y.join(O,e.installedMarker)):!1;if(!(!g||!P||k(a,g)>0))return{checked:!0,updated:!1,reason:"active runtime is current",activeVersion:g,latestVersion:a};let w=await V({version:a,channel:r,cdnOrigin:t,setActive:!1,protectVersions:n.protectVersions});return{checked:!0,updated:!0,activeVersion:a,latestVersion:a,install:w}}async function $(n={}){let t=e.readActiveRuntime(),r=u();if(r)return{active:t,latest:r,pinned:r,outdated:t!==r};try{let i=await f(l(n.cdnOrigin)),h=m(n.channel),a=i.channels[h]?.latest??null,d=!!(a&&(!t||k(a,t)>0));return{active:t,latest:a,pinned:null,outdated:d}}catch{return{active:t,latest:null,pinned:null,outdated:!1}}}function S(n={}){e.ensureHome();let t=Math.max(1,Math.floor(n.retainVersions??Q)),r=D(e),i=new Set(r),h=e.readActiveRuntime(),a=u(),d=new Set;for(let s of[h,a,...n.protectVersions??[]])s&&i.has(s)&&d.add(s);for(let s of[...r].reverse()){if(d.size>=t)break;d.add(s)}let g="__RUNTIME_VERSION__",O=M(e,g),P=O.indexOf(g),b=O.slice(0,P),w=O.slice(P+g.length),p=[];if(P>=0)try{p=o.readdirSync(e.cacheDir(),{withFileTypes:!0}).filter(s=>{if(!s.isFile())return!1;let C=s.name.startsWith(b)&&s.name.endsWith(w),z=s.name.startsWith(b)&&s.name.endsWith(`${w}.partial`);return C||z}).map(s=>y.join(e.cacheDir(),s.name)).sort()}catch{}return{activeVersion:h,pinnedVersion:a,keepVersions:r.filter(s=>d.has(s)),removeVersions:r.filter(s=>!d.has(s)),removeCacheFiles:p}}function I(n={}){let t=S(n);for(let r of t.removeVersions)o.rmSync(e.runtimeDir(r),{recursive:!0,force:!0});for(let r of t.removeCacheFiles)o.rmSync(r,{force:!0});return t}return{product:e,resolveCdnOrigin:l,resolveChannel:m,resolvePin:u,manifestUrl:R,tarballUrl:x,fetchManifest:f,resolveVersion:v,install:V,updateToLatest:T,checkUpToDate:$,planLocalRetention:S,pruneLocalRetention:I,listInstalled:()=>D(e)}}async function X(e,c){let l=await fetch(e);if(!l.ok||!l.body)throw new Error(`download failed: ${l.status} ${l.statusText} (${e})`);o.mkdirSync(y.dirname(c),{recursive:!0});let m=`${c}.partial`;try{await K(q.fromWeb(l.body),o.createWriteStream(m)),o.renameSync(m,c)}catch(u){try{o.unlinkSync(m)}catch{}throw u}}function ee(e){return new Promise((c,l)=>{let m=J.createHash("sha256"),u=o.createReadStream(e);u.on("data",R=>m.update(R)),u.on("error",l),u.on("end",()=>c(m.digest("hex")))})}function ne(e,c){return new Promise((l,m)=>{let u=B("tar",["-xzf",e,"-C",c],{stdio:["ignore","inherit","inherit"]});u.on("error",m),u.on("exit",R=>{R===0?l():m(new Error(`tar exited with code ${R}`))})})}var te="https://contrast.dev",ye=`${L.origin}/changelog`,Ve="https://contrast.dev/api/changelog/sootsim",ie={id:"sootsim",defaultCdnOrigin:te,manifestPath:"/runtimes/manifest.json",tarballPath:e=>`/runtimes/sootsim-runtime-${e}.tar.gz`,installedMarker:"index.html",env:{cdnOrigin:"SOOTSIM_CDN_ORIGIN",channel:"SOOTSIM_RUNTIME_CHANNEL"},ensureHome:F,configFile:E,runtimesDir:N,runtimeDir:U,cacheDir:_,readActiveRuntime:j,writeActiveRuntime:H},we=W(ie);export{A as a,k as b,te as c,ye as d,Ve as e,we as f};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.337 | (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 O,b as B}from"./chunk-
|
|
4
|
+
import{a as O,b as B}from"./chunk-TJTLXG3R.js";import{M as T,N,O as _,P as W,g as F}from"./chunk-4FRSEZ7Z.js";var Ie="http://localhost:7668/";function H(e){if(typeof e=="number")return Number.isInteger(e)&&e>0?e:null;if(typeof e!="string")return null;let t=e.trim();if(!t)return null;let r=Number(t);return Number.isInteger(r)&&r>0?r:null}function X(e){let t=H(e);return t===null?0:t}function V(e={}){let t=H(e.explicitPort);return t!==null?t:7668+X(e.portOffset)}var z=5173;var Q=2e3;function Pe(e){let t=e-7668;return t<0||t>Q?null:`http://localhost:${z+t}/`}var ye=4001,Te="sootsim close";import{existsSync as Z,mkdirSync as ee,readFileSync as te,rmSync as E,writeFileSync as re}from"fs";import{tmpdir as ne}from"os";import{dirname as ie,join as oe,resolve as se}from"path";var v=1,G="SOOTSIM_CLI_CURRENT_SIM_PATH",le=["SOOTSIM_CLI_IDENTITY","TM_SESSION","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","TERM_SESSION_ID","ITERM_SESSION_ID","TMUX_PANE","STY","KITTY_WINDOW_ID","WEZTERM_PANE","ALACRITTY_WINDOW_ID","WINDOWID","VSCODE_INJECTION"],j=/^(?:tmux|screen)|^tm$/i;function q(e,t=20){let r=e,n=O(e);if(!n||n<=1){let o=B(e);return e>1&&o&&!j.test(o)?e:null}for(let o=0;o<t;o++){let s=B(n);if(s&&j.test(s))return r;let u=O(n);if(!u||u<=1)return s?n:r;r=n,n=u}return n}function x(){for(let t of le){let r=process.env[t];if(r&&r.trim())return{key:`${t}:${r.trim()}`,source:t,stable:!0}}let e=q(process.ppid);return e&&e>1?{key:`gppid-${e}`,source:"grand-ppid",stable:!0}:{key:`pid-${process.ppid}`,source:"ppid",stable:!1}}function ce(){return x().key}function ve(){return q(process.ppid)}function k(){if(process.env[G])return se(process.env[G]);let e=ce();return oe(ne(),`sootsim-current-sim-${e}.json`)}function de(){let e=k();if(!Z(e))return null;try{let t=JSON.parse(te(e,"utf8"));return t.version!==v||typeof t.simId!="string"||!t.simId.trim()||typeof t.updatedAt!="string"?(E(e,{force:!0}),null):{version:v,simId:t.simId.trim(),updatedAt:t.updatedAt}}catch{return E(e,{force:!0}),null}}function R(){return de()?.simId||null}function xe(e){let t=e.trim();if(!t)return;let r=k();ee(ie(r),{recursive:!0}),re(r,JSON.stringify({version:v,simId:t,updatedAt:new Date().toISOString()},null,2)+`
|
|
5
5
|
`)}function J(){E(k(),{force:!0})}var h="http://localhost:5173/";import ue from"node:fs";import S from"node:path";import{WebSocket as D}from"ws";var C=null;function M(){return N().filter(e=>W(e))}function Y(e){let t=S.resolve(e);for(;;){if(ue.existsSync(S.join(t,".git")))return t;let r=S.dirname(t);if(r===t)return null;t=r}}function K(e,t){let r=S.relative(e,t);return r===""||r!==".."&&!r.startsWith(`..${S.sep}`)&&!S.isAbsolute(r)}function ae(){let e=M();if(e.length===0)return null;if(process.env.SOOTSIM_BRIDGE_PORT!==void 0||process.env.PORT_OFFSET!==void 0){let r=V({explicitPort:process.env.SOOTSIM_BRIDGE_PORT,portOffset:process.env.PORT_OFFSET}),n=e.find(o=>o.bridgePort===r);if(n)return n}let t=null;try{t=process.cwd()}catch{}if(t){let r=Y(t),n=e.filter(o=>{let s=Y(o.cwd);return r&&s?r===s:K(t,o.cwd)||K(o.cwd,t)});if(n.length>0)return n.find(o=>o.bridgePort===7668)??n[0]}return e.find(r=>r.bridgePort===7668)??e[0]}function me(){let e=F();if(C?.homeDir===e)return C.world;let t=fe();return C={homeDir:e,world:t},t}function fe(){let e=ae();if(e)return{source:"dev-bridge",bridgePort:e.bridgePort,shellBaseUrl:e.shellPort?`http://localhost:${e.shellPort}/`:h};let t=T();return t&&_(t)?{source:"daemon",bridgePort:t.bridgePort,shellBaseUrl:t.runtimePort>0?`http://localhost:${t.runtimePort}/`:h}:{source:"default",bridgePort:7668,shellBaseUrl:h}}function ge(e){let t=M().find(n=>n.bridgePort===e);if(t)return{source:"dev-bridge",shellBaseUrl:t.shellPort?`http://localhost:${t.shellPort}/`:h};let r=T();return r&&_(r)&&r.bridgePort===e?{source:"daemon",shellBaseUrl:r.runtimePort>0?`http://localhost:${r.runtimePort}/`:h}:null}function Fe(e){let t;try{let o=new URL(e);t=o.port?Number(o.port):o.protocol==="https:"?443:80}catch{return null}if(!Number.isFinite(t)||t<=0)return null;let r=M().find(o=>o.shellPort===t||o.runtimePort===t||o.bridgePort===t);if(r)return r.bridgePort;let n=T();return n&&_(n)&&(n.runtimePort===t||n.bridgePort===t)?n.bridgePort:null}function pe(){return me().bridgePort}function Ne(e,t){let r=ge(e),n=r?.source==="dev-bridge"?"dev bridge":r?.source==="daemon"?"daemon bridge":"bridge",o=r?.source==="dev-bridge"?`dev-bridges/${e}.json`:r?.source==="daemon"?"daemon.json":"no lockfile",s=t??r?.shellBaseUrl;process.stderr.write(` \u2192 ${n} :${e} (${s?`shell ${s}, `:""}${o})
|
|
6
|
-
`)}var A=class extends Error{lock;constructor(t,r){super(t),this.name="BridgeSimLockedError",this.lock=r}};function he(e){return e==="flag"?"via --sim":e==="saved"?"saved via `
|
|
6
|
+
`)}var A=class extends Error{lock;constructor(t,r){super(t),this.name="BridgeSimLockedError",this.lock=r}};function he(e){return e==="flag"?"via --sim":e==="saved"?"saved via `rnx use`":"primary fallback \u2014 no sim pinned"}function We(e,t={}){let r=new Set,n=t.port??pe(),o=t.port!==void 0,s=t.commandTimeoutMs??15e3,u,a="none",I=new Set(t.stripBooleanFlags??[]),P=new Set(t.stripValueFlags??[]);for(let l=0;l<e.length;l++){let i=e[l];if(i==="--port"||i==="-p"){r.add(l),o=!0,l+1<e.length&&(r.add(l+1),n=Number(e[l+1])),l++;continue}if(i.startsWith("--port=")){r.add(l),o=!0,n=Number(i.slice(7));continue}if(i==="--timeout"){r.add(l),l+1<e.length&&(r.add(l+1),s=Number(e[l+1])),l++;continue}if(i==="--sim"||i==="--session"||i==="--tab"){r.add(l),l+1<e.length&&(r.add(l+1),u=e[l+1]?.trim()||void 0,a="flag"),l++;continue}let c=i.startsWith("--sim=")?i.slice(6):i.startsWith("--session=")?i.slice(10):i.startsWith("--tab=")?i.slice(6):void 0;if(c!==void 0){r.add(l),u=c.trim()||void 0,a="flag";continue}if(I.has(i)){r.add(l);continue}P.has(i)&&(r.add(l),l+1<e.length&&r.add(l+1),l++)}if(!u){let l=R();l&&(u=l.trim()||void 0,a="saved")}return{positional:e.filter((l,i)=>!r.has(i)),wsPort:n,explicitPort:o,simId:u,simIdSource:a,commandTimeoutMs:s}}function Se(e,t={}){let r=1,n=t.commandTimeoutMs??15e3,o=new Map,s=new D(`ws://localhost:${e}`),u=x(),a=new Promise((i,c)=>{s.on("open",()=>{try{s.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:u.key,cliIdentitySource:u.source,cliLabel:t.cliLabel}))}catch{}i()}),s.on("error",d=>{let m=d.message?`: ${d.message}`:"";c(new Error(`could not connect to ws://localhost:${e}${m}`))})});a.catch(()=>{});let I=!1,P=!1;function l(i,c){if(P||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||i.startsWith("bridge:")||i==="focus"||i==="close")return;P=!0;let d=c??"primary",m=he(c?t.simIdSource:"none");process.stderr.write(` \u2192 ${d} (${m})
|
|
7
7
|
`)}return s.on("message",i=>{let c;try{c=JSON.parse(i.toString())}catch{return}if(c.id===0)return;let d=o.get(c.id);d&&(o.delete(c.id),c._otherCliCount>0&&!I&&(I=!0,process.stderr.write(`
|
|
8
8
|
\u26A0 ${c._otherCliCount} other CLI identity/identities are driving this sim
|
|
9
9
|
taps, scrolls, and keyboard input from multiple agents will collide on
|
|
10
10
|
the same screen state (this is not a bridge throughput limit).
|
|
11
|
-
use \`
|
|
11
|
+
use \`rnx open --new\` for an isolated sim per agent.
|
|
12
12
|
|
|
13
|
-
`)),c.error?c._locked?d.reject(new A(c.error,c._locked)):d.reject(new Error(c.error)):d.resolve(c.result))}),s.on("close",(i,c)=>{let d=c?.toString()||"connection closed";for(let[m,p]of o)o.delete(m),p.reject(new Error(`sim disconnected: ${d} (code ${i})`))}),{async send(i,c){let d=c?.timeoutMs??n,m=async f=>{await a;let g=r++;return new Promise((b,U)=>{let $=setTimeout(()=>{o.delete(g),U(new Error(`command timed out after ${Math.round(d/1e3)}s`))},d);o.set(g,{resolve:w=>{clearTimeout($),b(w)},reject:w=>{clearTimeout($),U(w)}});let y={...i,id:g};y.simId===void 0&&f&&(y.simId=f),l(i.type??"",y.simId),s.send(JSON.stringify(y))})},p=t.simIdSource==="flag"?t.simId:R()??t.simId;try{return await m(p)}catch(f){let g=f instanceof Error?f.message:String(f),b=`no sim connected with id ${p}`;throw t.simIdSource!=="flag"&&p&&i.simId===void 0&&(g===b||g.startsWith(`${b};`))?(J(),new Error(`saved sim ${p} is gone${g.slice(b.length)}; run \`
|
|
13
|
+
`)),c.error?c._locked?d.reject(new A(c.error,c._locked)):d.reject(new Error(c.error)):d.resolve(c.result))}),s.on("close",(i,c)=>{let d=c?.toString()||"connection closed";for(let[m,p]of o)o.delete(m),p.reject(new Error(`sim disconnected: ${d} (code ${i})`))}),{async send(i,c){let d=c?.timeoutMs??n,m=async f=>{await a;let g=r++;return new Promise((b,U)=>{let $=setTimeout(()=>{o.delete(g),U(new Error(`command timed out after ${Math.round(d/1e3)}s`))},d);o.set(g,{resolve:w=>{clearTimeout($),b(w)},reject:w=>{clearTimeout($),U(w)}});let y={...i,id:g};y.simId===void 0&&f&&(y.simId=f),l(i.type??"",y.simId),s.send(JSON.stringify(y))})},p=t.simIdSource==="flag"?t.simId:R()??t.simId;try{return await m(p)}catch(f){let g=f instanceof Error?f.message:String(f),b=`no sim connected with id ${p}`;throw t.simIdSource!=="flag"&&p&&i.simId===void 0&&(g===b||g.startsWith(`${b};`))?(J(),new Error(`saved sim ${p} is gone${g.slice(b.length)}; run \`rnx list\` and \`rnx use <sim>\`, or open a fresh sim`)):f}},async listSims(){let i=await this.send({type:"bridge:list-sims"});return Array.isArray(i)?i:[]},async focusSim(i){return this.send({type:"focus",simId:i})},async closeSim(i){return this.send({type:"close",simId:i})},async claim(i,c={}){return await this.send({type:"bridge:claim",simId:i,force:c.force===!0})},close(){try{s.readyState===D.OPEN&&s.send(JSON.stringify({type:"bridge:bye",id:0}))}catch{}s.close();let i=setTimeout(()=>{s.readyState!==D.CLOSED&&s.terminate()},250)}}}function He(e){return Se(e.wsPort,{commandTimeoutMs:e.commandTimeoutMs,simId:e.simId,simIdSource:e.simIdSource})}function be(e,t){let r=e.filter(s=>s.readyState==="open"&&s.id!==t),n=r.find(s=>s.userFocused)??r.find(s=>s.userVisible===!0&&s.isPrimary)??r.find(s=>s.userVisible===!0)??r.find(s=>s.isPrimary);if(!n)return null;let o=[n.isPrimary?"primary":null,n.userVisible===!1?"hidden":n.userVisible===!0?"visible":null,n.userFocused?"focused":null].filter(Boolean);return`${n.id}${o.length?` [${o.join(", ")}]`:""}`}async function Ve(e){try{let t=await e.send({type:"evaluate",code:`(() => ({
|
|
14
14
|
hidden: document.hidden,
|
|
15
15
|
visibilityState: document.visibilityState,
|
|
16
16
|
hasFocus: typeof document.hasFocus === 'function' ? document.hasFocus() : null,
|
|
@@ -22,6 +22,6 @@ import{a as O,b as B}from"./chunk-GVKISFQ3.js";import{M as T,N,O as _,P as W,g a
|
|
|
22
22
|
`:"")+` animations and rAF callbacks are throttled \u2014 coordinates may be wrong
|
|
23
23
|
and launch/transition animations will not complete.
|
|
24
24
|
`+(o?` another open sim looks usable: ${o}; target it with --sim.
|
|
25
|
-
`:" run `
|
|
25
|
+
`:" run `rnx list` to find the visible sim and target it with --sim.\n")+` page-level window.focus() cannot unhide a browser tab.
|
|
26
26
|
|
|
27
27
|
`),{hidden:!0,warned:!0,simId:r.simId}}return{hidden:!1,warned:!1,simId:r.simId}}catch{return{hidden:!1,warned:!1}}}async function Ge(e,t,r={}){let n={type:"evaluate",code:t};return r.acquireLock&&(n.acquireLock=!0),e.send(n)}async function je(e,t,...r){return e.send({type:"call",path:t,args:r})}async function qe(e,t,...r){return e.send({type:"call",path:t,args:r,acquireLock:!0})}export{Ie as a,Pe as b,ye as c,Te as d,ce as e,ve as f,R as g,xe as h,J as i,h as j,me as k,ge as l,Fe as m,pe as n,Ne as o,A as p,We as q,Se as r,He as s,Ve as t,Ge as u,je as v,qe as w};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.337 | (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 a=["Cache","Code Cache","DawnCache","DawnGraphiteCache","DawnWebGPUCache","GPUCache","GrShaderCache","ShaderCache"],r=new Set(a);function s(e){return r.has(e)}export{a,s as b};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*! rnx v0.1.337 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
function i(t,o,a,c){return{width:3,ringToggle:{side:"left",top:t[0],height:t[1]},volumeUp:{side:"left",top:o[0],height:o[1]},volumeDown:{side:"left",top:a[0],height:a[1]},lock:{side:"right",top:c[0],height:c[1]}}}var E={width:2.5,lock:{side:"right",top:188.7,height:68.1},ringToggle:{side:"left",top:113.2,height:36},volumeUp:{side:"left",top:188.2,height:68.1},volumeDown:{side:"left",top:269,height:68.1}},y={width:3,lock:{side:"right",top:671/2.625,height:163/2.625},ringToggle:{side:"left",top:-1e3,height:0},volumeUp:{side:"right",top:971/2.625,height:165/2.625},volumeDown:{side:"right",top:1136/2.625,height:166/2.625}},A={width:3,lock:{side:"right",top:248,height:72},ringToggle:{side:"left",top:-1e3,height:0},volumeUp:{side:"right",top:144,height:62},volumeDown:{side:"right",top:216,height:62}},s=24,d="17",u=37,T=1080/2.625,O=2400/2.625,h=132/2.625;function r(t){return{top:t,right:t,bottom:t,left:t}}function N(t){let o=(t.frameInsets.top+t.frameInsets.right+t.frameInsets.bottom+t.frameInsets.left)/4,a=Math.max(Math.abs(t.frameInsets.top-o),Math.abs(t.frameInsets.right-o),Math.abs(t.frameInsets.bottom-o),Math.abs(t.frameInsets.left-o));return{frameRadius:t.cornerRadius+o,frameRadiusApproximationError:a,screenRadius:t.cornerRadius}}function _(t){return{...N(t),frameHeight:t.frameInsets.top+t.height+t.frameInsets.bottom,frameWidth:t.frameInsets.left+t.width+t.frameInsets.right,screenBottomInset:t.frameInsets.bottom,screenLeft:t.frameInsets.left,screenRightInset:t.frameInsets.right,screenTop:t.frameInsets.top}}function n(t){return{...t,platform:"ios",navigationBarHeight:0,navigationBarMode:t.homeIndicatorHeight>0?"gesture":"none",displayCutout:{top:t.dynamicIsland?t.statusBarHeight:0,bottom:0,left:0,right:0},cameraCutout:null,osVersion:t.iosVersion,androidApiLevel:null,systemName:"iOS",manufacturer:"Apple",brand:"Apple",modelName:t.name}}var C={"canvas-workspace":n({name:"Canvas Workspace",width:1440,height:900,scale:1,statusBarHeight:0,homeIndicatorHeight:0,cornerRadius:0,continuousCornerRadius:0,frameInsets:r(16),dynamicIsland:null,safeAreaInsets:{top:0,bottom:0,left:0,right:0},iosVersion:"26.4",physicalPPI:110,hardwareButtons:i([185.8,41.7],[258.2,67.6],[344,67.6],[281.5,106.9]),experimental:!0}),"iphone-se":n({name:"iPhone SE",width:375,height:667,scale:2,statusBarHeight:20,homeIndicatorHeight:0,cornerRadius:0,continuousCornerRadius:0,frameInsets:r(28.7),dynamicIsland:null,safeAreaInsets:{top:20,bottom:0,left:0,right:0},iosVersion:"15.8",physicalPPI:326,hardwareButtons:E}),"iphone-14":n({name:"iPhone 14",width:390,height:844,scale:3,statusBarHeight:47,homeIndicatorHeight:34,cornerRadius:46.2,continuousCornerRadius:67.462,frameInsets:r(19.5),dynamicIsland:null,safeAreaInsets:{top:47,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:i([141.7,29.7],[205.9,69.6],[289.5,69.6],[228.9,114.5])}),"iphone-15":n({name:"iPhone 15",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:73.402,frameInsets:r(18.2),dynamicIsland:{width:126,height:37.3,top:14.1},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:i([171.7,32],[235.8,65.3],[320.5,65.3],[280.6,105.2])}),"iphone-15-plus":n({name:"iPhone 15 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:74.654,frameInsets:r(17.3),dynamicIsland:{width:126,height:37.3,top:11.4},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:i([172.1,33],[236.1,66.6],[321.2,66.6],[281,106.8])}),"iphone-15-pro":n({name:"iPhone 15 Pro",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:73.402,frameInsets:r(15.3),dynamicIsland:{width:126,height:38,top:13.4},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:i([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-15-pro-max":n({name:"iPhone 15 Pro Max",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:74.654,frameInsets:r(15.3),dynamicIsland:{width:126,height:38,top:13.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:i([173.3,32.2],[253.4,61.7],[343.3,61.7],[268.5,98.5])}),"iphone-16":n({name:"iPhone 16",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:73.402,frameInsets:r(15.3),dynamicIsland:{width:126,height:37.3,top:11},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-16-plus":n({name:"iPhone 16 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:74.654,frameInsets:r(15.3),dynamicIsland:{width:126,height:37.3,top:11.4},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([173.3,32.2],[253.4,61.7],[343.3,61.7],[268.5,98.5])}),"iphone-16-pro":n({name:"iPhone 16 Pro",width:402,height:874,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:61,continuousCornerRadius:84.661,frameInsets:r(15.3),dynamicIsland:{width:126,height:38,top:13.5},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-16-pro-max":n({name:"iPhone 16 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:61.3,continuousCornerRadius:85.163,frameInsets:r(15.4),dynamicIsland:{width:126,height:38,top:14},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"iphone-17":n({name:"iPhone 17",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:61,continuousCornerRadius:84.661,frameInsets:r(15.3),dynamicIsland:{width:126,height:37.3,top:14},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-17-air":n({name:"iPhone Air",width:420,height:912,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:64.6,continuousCornerRadius:88.313,frameInsets:r(10.7),dynamicIsland:{width:126,height:38,top:20},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"iphone-17-pro":n({name:"iPhone 17 Pro",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:61,continuousCornerRadius:84.661,frameInsets:r(15.3),dynamicIsland:{width:126,height:38,top:14},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-17-pro-max":n({name:"iPhone 17 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:61.3,continuousCornerRadius:85.163,frameInsets:r(15.4),dynamicIsland:{width:126,height:38,top:14},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"pixel-8":{platform:"android",name:"Pixel 8",width:T,height:O,scale:2.625,statusBarHeight:h,homeIndicatorHeight:0,navigationBarHeight:s,navigationBarMode:"gesture",displayCutout:{top:h,bottom:0,left:0,right:0},cornerRadius:39,continuousCornerRadius:39,frameInsets:{top:55/2.625,right:50/2.625,bottom:58/2.625,left:49/2.625},dynamicIsland:null,cameraCutout:{diameter:72.5/2.625},safeAreaInsets:{top:h,bottom:s,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:y},"pixel-8-three-button":{platform:"android",name:"Pixel 8 (3-button)",width:T,height:O,scale:2.625,statusBarHeight:h,homeIndicatorHeight:0,navigationBarHeight:48,navigationBarMode:"three-button",displayCutout:{top:h,bottom:0,left:0,right:0},cornerRadius:39,continuousCornerRadius:39,frameInsets:{top:55/2.625,right:50/2.625,bottom:58/2.625,left:49/2.625},dynamicIsland:null,cameraCutout:{diameter:72.5/2.625},safeAreaInsets:{top:h,bottom:48,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:y},"pixel-9-pro-xl":{platform:"android",name:"Pixel 9 Pro XL",width:448,height:997,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:s,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:41,continuousCornerRadius:41,frameInsets:r(12),dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:s,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 9 Pro XL",physicalPPI:486,hardwareButtons:y},"pixel-10":{platform:"android",name:"Pixel 10",width:360,height:808,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:s,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:40,continuousCornerRadius:40,frameInsets:r(18),dynamicIsland:null,cameraCutout:{diameter:26},safeAreaInsets:{top:40,bottom:s,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 10",physicalPPI:422,hardwareButtons:y},"galaxy-s24":{platform:"android",name:"Galaxy S24",width:360,height:780,scale:3,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:s,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:36,continuousCornerRadius:36,frameInsets:r(8),dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:s,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S921B",physicalPPI:416,hardwareButtons:A},"galaxy-s24-ultra":{platform:"android",name:"Galaxy S24 Ultra",width:384,height:832,scale:3.75,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:s,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:24,continuousCornerRadius:24,frameInsets:r(9),dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:s,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S928B",physicalPPI:505,hardwareButtons:A}},R="iphone-17-pro";function G(t){return C[t]}function v(){return Object.keys(C)}function U(){return v().filter(t=>!C[t].experimental)}var H="rnx",W=Object.freeze({name:H,packageName:"rnxsim",commandName:"rnx",domain:"rnxsim.com",origin:"https://rnxsim.com"});var D=["off","soft","full"];function k(t){return t==="off"||t==="soft"||t==="full"}var S={"iphone-6-9":{name:"iphone-6-9",label:'iPhone 6.7"',width:1284,height:2778,store:"apple"},"iphone-6-1":{name:"iphone-6-1",label:'iPhone 6.5"',width:1242,height:2688,store:"apple"},"android-phone":{name:"android-phone",label:"Google Play phone",width:1080,height:1920,store:"google"},"android-tablet-7":{name:"android-tablet-7",label:'Google Play 7" tablet',width:1200,height:1920,store:"google"},"android-tablet-10":{name:"android-tablet-10",label:'Google Play 10" tablet',width:1600,height:2560,store:"google"}},w={dark:{type:"gradient",direction:180,glow:"#4caeff",stops:[{offset:0,color:"#111827"},{offset:40,color:"#101725"},{offset:100,color:"#06080d"}]},cyan:{type:"gradient",direction:180,glow:"#25c3ec",stops:[{offset:0,color:"#1b465c"},{offset:32,color:"#122336"},{offset:100,color:"#05070b"}]},gold:{type:"gradient",direction:180,glow:"#ffc25a",stops:[{offset:0,color:"#3b2f1a"},{offset:34,color:"#18140d"},{offset:100,color:"#050505"}]},red:{type:"gradient",direction:180,glow:"#ff6178",stops:[{offset:0,color:"#3e1018"},{offset:35,color:"#17080c"},{offset:100,color:"#050405"}]}},$={color:"#25c3ec",blur:120,spread:52,opacity:.34},X="iphone-17-pro";var L=[{name:"white",value:"#ffffff"},{name:"gray-light",value:"#d1d5db"},{name:"gray",value:"#6b7280"},{name:"gray-dark",value:"#3b4350"},{name:"slate",value:"#2a3644"},{name:"black",value:"#000000"},{name:"cyan",value:"#25c3ec"},{name:"blue",value:"#3f7cff"},{name:"teal",value:"#1fc7b4"},{name:"green",value:"#42c95d"},{name:"lime",value:"#92d21b"},{name:"gold",value:"#f5c518"},{name:"orange",value:"#ff912e"},{name:"coral",value:"#ff6f5b"},{name:"red",value:"#ff4f6f"},{name:"berry",value:"#d054ff"},{name:"magenta",value:"#ff4eb8"}],B=Object.fromEntries(L.map(t=>[t.name,t.value]));function q(t){return B[t]??B.gray}function Z(t){return Object.prototype.hasOwnProperty.call(S,t)?S[t]:null}function z(t){return{type:t.type,color:t.color,direction:t.direction,glow:t.glow,stops:t.stops?.map(o=>({...o}))}}function Q(t){return Object.prototype.hasOwnProperty.call(w,t)?z(w[t]):null}var F=[.823,.882,.941,1,1.118,1.235,1.353,1.786,2.143,2.643,3.143,3.571];function e(t,o){return Object.freeze({fontSize:t,lineHeight:o})}var ee=Object.freeze({xs:Object.freeze({largeTitle:e(31,44.408775),title1:e(25,37.128102),title2:e(19,27.816685),title3:e(17,23.807109),headline:e(14,20.161577),body:e(14,20.161577),callout:e(13,18.942243),subheadline:e(12,16.720313),footnote:e(12,16.986979),caption1:e(11,15.564453),caption2:e(11,16.126953)}),s:Object.freeze({largeTitle:e(32,45.797256),title1:e(26,38.556756),title2:e(20,29.22433),title3:e(18,25.160469),headline:e(15,21.536754),body:e(15,21.536754),callout:e(14,20.326079),subheadline:e(13,18.213672),footnote:e(12,16.986979),caption1:e(11,15.564453),caption2:e(11,16.126953)}),m:Object.freeze({largeTitle:e(33,47.185737),title1:e(27,39.985409),title2:e(21,30.631975),title3:e(19,26.513828),headline:e(16,22.911932),body:e(16,22.911932),callout:e(15,21.709914),subheadline:e(14,19.557031),footnote:e(12,16.986979),caption1:e(11,15.564453),caption2:e(11,16.126953)}),l:Object.freeze({largeTitle:e(34,48.574219),title1:e(28,41.414063),title2:e(22,32.253906),title3:e(20,27.867187),headline:e(17,24.287109),body:e(17,24.287109),callout:e(16,23.09375),subheadline:e(15,20.900391),footnote:e(13,18.513672),caption1:e(12,17.320313),caption2:e(11,16.126953)}),xl:Object.freeze({largeTitle:e(36,51.351181),title1:e(30,44.271369),title2:e(24,35.069196),title3:e(22,30.733906),headline:e(19,27.037464),body:e(19,27.037464),callout:e(18,25.861421),subheadline:e(17,23.587109),footnote:e(15,21.233724),caption1:e(14,20.269531),caption2:e(13,19.667518)}),xxl:Object.freeze({largeTitle:e(38,54.323266),title1:e(32,47.128676),title2:e(26,37.884487),title3:e(24,33.440625),headline:e(21,29.78782),body:e(21,29.78782),callout:e(20,28.629092),subheadline:e(19,26.273828),footnote:e(17,23.953776),caption1:e(16,23.03125),caption2:e(15,22.515775)}),xxxl:Object.freeze({largeTitle:e(40,57.100229),title1:e(34,50.221278),title2:e(28,40.699777),title3:e(26,36.147344),headline:e(23,32.719993),body:e(23,32.719993),callout:e(22,31.58724),subheadline:e(21,28.960547),footnote:e(19,26.673828),caption1:e(18,25.792969),caption2:e(17,25.364032)}),ax1:Object.freeze({largeTitle:e(44,62.654154),title1:e(38,56.171186),title2:e(34,49.359933),title3:e(31,43.074141),headline:e(28,39.595881),body:e(28,39.595881),callout:e(26,37.122582),subheadline:e(25,34.483984),footnote:e(23,32.280599),caption1:e(22,31.316406),caption2:e(20,29.636418)}),ax2:Object.freeze({largeTitle:e(48,68.403201),title1:e(43,63.314453),title2:e(39,56.612444),title3:e(37,51.194297),headline:e(33,46.653587),body:e(33,46.653587),callout:e(32,45.616071),subheadline:e(30,41.200781),footnote:e(27,37.720703),caption1:e(26,37.027344),caption2:e(24,35.332933)}),ax3:Object.freeze({largeTitle:e(52,73.957127),title1:e(48,70.693015),title2:e(44,63.65067),title3:e(43,59.474453),headline:e(40,56.461648),body:e(40,56.461648),callout:e(38,54.109561),subheadline:e(36,49.410937),footnote:e(33,46.047526),caption1:e(32,45.5),caption2:e(29,42.684345)}),ax4:Object.freeze({largeTitle:e(56,79.706174),title1:e(53,77.600988),title2:e(50,72.310826),title3:e(49,67.754609),headline:e(47,65.360618),body:e(47,66.269709),callout:e(44,62.412574),subheadline:e(42,57.621094),footnote:e(38,53.014323),caption1:e(37,52.404297),caption2:e(34,50.035757)}),ax5:Object.freeze({largeTitle:e(60,85.260099),title1:e(58,85.214844),title2:e(56,80.970982),title3:e(55,76.034766),headline:e(53,74.520774),body:e(53,74.520774),callout:e(51,72.2899),subheadline:e(49,67.174609),footnote:e(44,61.174479),caption1:e(43,60.876953),caption2:e(40,58.811298)})});function M(t){return F.some(o=>Object.is(o,t))}var ae=["colorScheme","reduceMotion","boldText","fontSize","largerAccessibilitySizes"],l={deviceModel:{type:"enum",default:R,description:"device model to simulate",cliFlag:"device",cliFlagShort:"d",options:v(),group:"device"},orientation:{type:"enum",default:"portrait",description:"screen orientation",cliFlag:"orientation",options:["portrait","landscape"],group:"device"},colorScheme:{type:"enum",default:"auto",description:"color scheme (auto follows system preference)",cliFlag:"theme",cliFlagShort:"t",options:["light","dark","auto"],group:"appearance"},reduceMotion:{type:"boolean",default:!1,description:"reduce motion",group:"appearance"},boldText:{type:"boolean",default:!1,description:"bold text",group:"appearance"},fontSize:{type:"number",default:1,description:"font size multiplier (1.0 = default)",group:"appearance",validate:t=>t>=.5&&t<=4},largerAccessibilitySizes:{type:"boolean",default:!1,description:"show accessibility categories in the dynamic type size picker",group:"appearance"},networkCondition:{type:"enum",default:"wifi",description:"simulated network condition",cliFlag:"network",options:["wifi","lte","fast-3g","slow-3g","offline"],group:"network"},language:{type:"string",default:"en",description:"language code (ISO 639-1)",cliFlag:"language",group:"locale"},region:{type:"string",default:"US",description:"region code (ISO 3166-1)",cliFlag:"region",group:"locale"},renderDensity:{type:"number",default:0,description:"render density override in device pixels per point for high-resolution capture (0 = device native)",group:"simulator",validate:t=>t===0||t>=1&&t<=9},showTouches:{type:"boolean",default:!1,description:"show touch indicators",group:"simulator"},showFrame:{type:"boolean",default:!0,description:"show device frame",cliFlag:"frame",group:"simulator"},showMenuBar:{type:"boolean",default:!0,description:"keep the menu bar visible instead of revealing it at the top edge",group:"simulator"},showRail:{type:"boolean",default:!0,description:"keep the rail visible instead of revealing it on hover",group:"simulator"},solidWindow:{type:"boolean",default:!1,description:"desktop app: always use the solid, freely-resizable window instead of the device-shaped transparent one (3d mode uses it regardless)",group:"simulator"},ambientGlow:{type:"enum",default:"off",description:"bleed the app's own edge colors outward behind the device, like bias lighting behind a TV (off, soft, full)",options:D,cliFlag:"ambient-glow",group:"simulator"},screenshotMode:{type:"boolean",default:!1,description:"show screenshot composition mode in the browser shell",group:"simulator"},screenshotCanvasEditing:{type:"boolean",default:!1,description:"experimental figma-style slide editing: draggable copy block, drop-in image layers (owner review pending)",group:"simulator"},threeMode:{type:"boolean",default:!1,description:"show the experimental 3d device stage in the browser shell",group:"simulator"},threeRecordingEditor:{type:"boolean",default:!1,description:"dock the 3d recording editor in the 3d stage (toggled from its rail)",group:"simulator"},screenshotCanvas:{type:"enum",default:"iphone-6-9",description:"target app-store canvas preset for screenshot mode",options:Object.keys(S),group:"simulator"},screenshotBackground:{type:"enum",default:"dark",description:"background preset rendered inside the screenshot canvas",options:Object.keys(w),group:"simulator"},screenshotText:{type:"enum",default:"bold-top",description:"text layout preset for the screenshot canvas",options:["bold-top","editorial-left","minimal-bottom","none"],group:"simulator"},screenshotPose:{type:"enum",default:"straight",description:"device pose preset inside the screenshot canvas",options:["straight","tilted-left","tilted-right","cut-bottom","cut-top"],group:"simulator"},screenshotDynamicSize:{type:"boolean",default:!1,description:"let the screenshot canvas rect fit available space (off = pin to exact preset pixels)",group:"simulator"},showStatusBar:{type:"boolean",default:!0,description:"show status bar",group:"simulator"},showHomeIndicator:{type:"boolean",default:!0,description:"show home indicator",group:"simulator"},alwaysShowLiveWebViews:{type:"boolean",default:!1,description:"always render WebViews as live browser views",group:"simulator"},a11yMode:{type:"enum",default:"delayed",description:"accessibility tree sync mode (off, delayed=100ms, active=30ms)",options:["off","delayed","active"],group:"simulator"},a11yDepth:{type:"enum",default:"deep",description:"accessibility tree structure depth (shallow or deep)",options:["shallow","deep"],group:"simulator"},inspectMode:{type:"boolean",default:!1,description:"inspect mode",group:"simulator"},productAnalytics:{type:"boolean",default:!0,description:"send bounded product usage analytics",group:"privacy"},crashReports:{type:"boolean",default:!0,description:"send anonymous crash reports",group:"privacy"},agentProvider:{type:"enum",default:"codex",description:"ai agent used by the sootsim agent prompt bar",options:["codex","claude"],group:"agent"}},se={colorScheme:l.colorScheme.default,reduceMotion:l.reduceMotion.default,boldText:l.boldText.default,fontSize:l.fontSize.default,largerAccessibilitySizes:l.largerAccessibilitySizes.default};function V(){if(typeof window>"u")return{};let t={};try{let o=new URLSearchParams(window.location.search),a=o.get("device");a&&l.deviceModel.options?.includes(a)&&(t.deviceModel=a),o.get("ssMode")==="1"&&(t.screenshotMode=!0),o.get("filmStage")==="1"&&(t.threeMode=!0,a||(t.deviceModel="iphone-17-air"));let c=Number(o.get("renderDensity"));Number.isFinite(c)&&c>=1&&c<=9&&(t.renderDensity=c),o.get("ssEdit")==="1"&&(t.screenshotCanvasEditing=!0);let I=o.get("colorScheme")??o.get("theme");I&&l.colorScheme.options?.includes(I)&&(t.colorScheme=I);let p=o.get("reduceMotion");p==="1"||p==="true"?t.reduceMotion=!0:(p==="0"||p==="false")&&(t.reduceMotion=!1);let m=o.get("boldText");m==="1"||m==="true"?t.boldText=!0:(m==="0"||m==="false")&&(t.boldText=!1);let x=Number(o.get("fontSize"));Number.isFinite(x)&&M(x)&&(t.fontSize=x);let g=o.get("largerAccessibilitySizes");g==="1"||g==="true"?t.largerAccessibilitySizes=!0:(g==="0"||g==="false")&&(t.largerAccessibilitySizes=!1);let f=o.get("alwaysShowLiveWebViews");f==="1"||f==="true"?t.alwaysShowLiveWebViews=!0:(f==="0"||f==="false")&&(t.alwaysShowLiveWebViews=!1);let b=o.get("showFrame");b==="1"||b==="true"?t.showFrame=!0:(b==="0"||b==="false")&&(t.showFrame=!1);let P=o.get("ambientGlow");k(P)&&(t.ambientGlow=P)}catch{}return t}function le(){let t={};for(let[o,a]of Object.entries(l))t[o]=a.default;return Object.assign(t,V()),t}export{_ as a,C as b,G as c,U as d,$ as e,X as f,q as g,Z as h,z as i,Q as j,ae as k,l,se as m,V as n,le as o};
|
|
5
|
+
/*! rnx v0.1.337 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.337 | (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-LXYLCETR.js";import{a as i}from"./chunk-EWVG4A3B.js";import{a as n}from"./chunk-UWEDNDND.js";import{createRequire as f}from"node:module";import{createJiti as s}from"jiti";var m=f(import.meta.url);function t(e){return e===void 0||e!==null&&typeof e=="object"&&!Array.isArray(e)}function p(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let o=Reflect.get(e,"runtimeVersion"),r=Reflect.get(e,"network");return(o===void 0||typeof o=="string"&&o===o.trim()&&i(o))&&t(Reflect.get(e,"modules"))&&t(Reflect.get(e,"turboModules"))&&t(Reflect.get(e,"nativeModules"))&&t(Reflect.get(e,"env"))&&t(r)&&t(Reflect.get(e,"settings"))&&t(Reflect.get(e,"initialState"))}async function a(e){if(e?.configPath)try{let r=await s(import.meta.url,{interopDefault:!0,alias:{[`${n.packageName}/config`]:m.resolve(`${n.packageName}/config`)}}).import(e.configPath,{default:!0});if(!p(r))throw new Error("the default export must be an rnx config object");return r}catch(o){let r=o instanceof Error?o.message:String(o);throw new Error(`could not load ${e.configPath}: ${r}`)}}async function R(e=process.cwd()){let o=c(e);return{project:o,config:await a(o)}}export{a,R as b};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! rnx v0.1.337 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
function p(){console.error(" no rnx desktop companion found."),console.error(""),console.error(" install the desktop app:"),console.error(" rnx desktop install"),console.error(""),console.error(" or run setup to install the background daemon:"),console.error(" rnx setup"),console.error("")}function t(r){console.error(""),console.error(` no sim is connected to the rnx bridge on port ${r}.`),console.error(""),console.error(" start your app dev server, then open it in rnx:"),console.error(" npx expo start --localhost --port 8081"),console.error(" rnx open 8081"),console.error(""),console.error(" then inspect the live app:"),console.error(" rnx describe")}async function a(r,n,s){let e=[];try{e=await r.listSims()}catch{}if(console.error(""),e.length===0){t(n);return}console.error(` no sim with id "${s}" is connected to the bridge on port ${n}.`),console.error(""),console.error(" connected sims:");for(let o of e){let i=[o.isPrimary?"primary":null,o.readyState,o.userVisible===!1?"hidden":o.userVisible===!0?"visible":null,o.userFocused?"focused":null].filter(Boolean).join(", ");console.error(` ${o.id} (${i})`)}console.error(""),console.error(" pass a valid --sim id, or run `rnx list` to see all sessions.")}export{p as a,t as b,a as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.337 | (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-UWEDNDND.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};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.337 | (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{o as d}from"./chunk-
|
|
4
|
+
import{o as d}from"./chunk-4FRSEZ7Z.js";import{chmodSync as S,existsSync as f,mkdirSync as A,readFileSync as k,rmSync as o,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://contrast.dev";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,isAdmin:e.isAdmin===!0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",i=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:i,validatedAt:h}}function b(){let t=a();if(!f(t))return null;try{let e=JSON.parse(k(t,"utf8")),r=v(e);return r||(o(t,{force:!0}),null)}catch{return o(t,{force:!0}),null}}function O(t){let e=a();A(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
|
|
5
5
|
`);try{S(e,384)}catch{}return r}function l(){o(a(),{force:!0})}async function E(t){let e=b();if(!e?.token)return null;let r=t||e.origin||u;try{let n=await fetch(`${r.replace(/\/$/,"")}/api/auth/me`,{headers:{authorization:`Bearer ${e.token}`}});if(n.status===401)return l(),null;if(!n.ok)return e;let i=await n.json();return i.user?.id?O({token:e.token,user:i.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(l(),null)}catch{return e}}export{b as a,O as b,l as c,E as d};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.337 | (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 a}from"./chunk-
|
|
5
|
-
|
|
4
|
+
import{m as a}from"./chunk-M4LGUVBM.js";import{q as l,s as i}from"./chunk-F3NKCQHM.js";function c(r){if(!r||typeof r!="object")return!1;let t=Reflect.get(r,"strategy");return typeof Reflect.get(r,"ok")=="boolean"&&(t==="data"||t==="full")&&Array.isArray(Reflect.get(r,"cleared"))&&typeof Reflect.get(r,"relaunched")=="boolean"}function d(){console.log(`
|
|
5
|
+
rnx reset - clear the current guest app and relaunch it
|
|
6
6
|
|
|
7
7
|
usage:
|
|
8
|
-
|
|
8
|
+
rnx reset [--full] [--json] [--sim <id>]
|
|
9
9
|
|
|
10
10
|
options:
|
|
11
11
|
--full also clear keychain, user defaults, and permissions
|
|
12
12
|
--json print the structured reset result
|
|
13
13
|
--sim <id> target a specific sim
|
|
14
14
|
--port <p> WS bridge port
|
|
15
|
-
`)}async function f(r,t={}){if(r.includes("--help")||r.includes("-h"))return d(),0;let o=l(r,{port:t.port,stripBooleanFlags:["--full","--json"]});if(o.positional.length>0)return console.error(` unexpected reset argument: ${o.positional[0]}`),1;let
|
|
15
|
+
`)}async function f(r,t={}){if(r.includes("--help")||r.includes("-h"))return d(),0;let o=l(r,{port:t.port,stripBooleanFlags:["--full","--json"]});if(o.positional.length>0)return console.error(` unexpected reset argument: ${o.positional[0]}`),1;let n=i(o);try{let e=await n.send({type:"reset",resetOptions:{strategy:r.includes("--full")?"full":"data"}});if(!c(e))throw new Error("reset bridge returned an invalid result");if(r.includes("--json"))console.log(JSON.stringify(e));else{console.log(` ${e.strategy} reset ${e.ok?"complete":"failed"}`),console.log(e.cleared.length>0?` cleared: ${e.cleared.join(", ")}`:" cleared: none");for(let s of e.skipped??[])console.log(` skipped ${s.store}: ${s.reason}`);console.log(` app: ${e.relaunched?"relaunched":"not relaunched"}`),console.log(` worker: ${e.workerReloaded?"restarted":"preserved in place"}`),e.error&&console.error(` error: ${e.error}`)}return e.ok?0:1}catch(e){return console.error(` reset failed: ${e instanceof Error?e.message:e}`),await a(n),1}finally{n.close()}}export{f as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.337 | (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 f,b as S}from"./chunk-
|
|
4
|
+
import{a as f,b as S}from"./chunk-WRID5SBV.js";import{a as y,c as P}from"./chunk-WUYI3XJ5.js";import{a as v}from"./chunk-GEAGFYKP.js";import{b}from"./chunk-TJTLXG3R.js";function M(){let e=f();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"rnx desktop app not installed (run `rnx desktop install`)"}}async function A(e){let o=f();if(!o)return{launched:!1,message:"rnx desktop app not installed"};try{let r=await S(e.url,o,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile,ownerPid:e.ownerPid});return r.launched?{launched:!0,message:e.url?`electron launched via ${r.via} \u2192 ${e.url}`:`electron launched via ${r.via}`,target:r.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(r){return{launched:!1,message:`electron launch failed: ${r instanceof Error?r.message:String(r)}`}}}var k={id:"electron",name:"electron",description:"rnx desktop companion app (native window, menu bar)",kind:"native",availability:M,launch:A};import{spawn as B}from"child_process";import{closeSync as F,mkdtempSync as G,openSync as U,readFileSync as q}from"fs";import{tmpdir as T}from"os";import{join as I}from"path";import{spawnSync as O}from"node:child_process";import{existsSync as _,readFileSync as R}from"node:fs";import{createRequire as L}from"node:module";import{dirname as W,join as N}from"node:path";var $=`
|
|
5
5
|
const { existsSync } = require('node:fs');
|
|
6
6
|
const modulePath = process.env.SOOTSIM_PW_MODULE;
|
|
7
7
|
try {
|