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.
Files changed (272) hide show
  1. package/README.md +104 -76
  2. package/cli/auth.ts +2 -2
  3. package/cli/bin.ts +7 -3
  4. package/cli/bridge-flow-runner.ts +2 -2
  5. package/cli/commands/agent-wrapper.ts +1 -1
  6. package/cli/commands/agent.ts +12 -12
  7. package/cli/commands/app-fonts.ts +1 -1
  8. package/cli/commands/assert.ts +7 -7
  9. package/cli/commands/auth.ts +4 -4
  10. package/cli/commands/camera.ts +13 -13
  11. package/cli/commands/cleanup.ts +6 -6
  12. package/cli/commands/compat.ts +4 -4
  13. package/cli/commands/config.ts +2 -2
  14. package/cli/commands/control.ts +37 -43
  15. package/cli/commands/cpu-profile.ts +2 -2
  16. package/cli/commands/daemon-mac-app.ts +2 -2
  17. package/cli/commands/daemon.ts +12 -12
  18. package/cli/commands/debug.ts +22 -22
  19. package/cli/commands/desktop.ts +3 -3
  20. package/cli/commands/detox.ts +17 -17
  21. package/cli/commands/device.ts +9 -9
  22. package/cli/commands/diagnose.ts +11 -11
  23. package/cli/commands/electron.ts +7 -7
  24. package/cli/commands/film.ts +6 -6
  25. package/cli/commands/inspect/core.ts +6 -7
  26. package/cli/commands/inspect/find.ts +2 -2
  27. package/cli/commands/inspect.ts +36 -36
  28. package/cli/commands/install-desktop.ts +8 -8
  29. package/cli/commands/login.ts +6 -6
  30. package/cli/commands/maestro-generate.ts +2 -2
  31. package/cli/commands/maestro.ts +23 -23
  32. package/cli/commands/mode.ts +4 -4
  33. package/cli/commands/no-bridge-hint.ts +9 -9
  34. package/cli/commands/perf.ts +11 -11
  35. package/cli/commands/permissions.ts +5 -5
  36. package/cli/commands/profile.ts +11 -11
  37. package/cli/commands/react.ts +15 -15
  38. package/cli/commands/record.ts +15 -15
  39. package/cli/commands/report-issue.ts +2 -2
  40. package/cli/commands/reset.ts +2 -2
  41. package/cli/commands/runtime.ts +18 -18
  42. package/cli/commands/screenshot-mode.ts +5 -5
  43. package/cli/commands/screenshot.ts +12 -12
  44. package/cli/commands/screenshots-capture.ts +7 -7
  45. package/cli/commands/screenshots.ts +6 -6
  46. package/cli/commands/serve.ts +6 -6
  47. package/cli/commands/setup.ts +13 -15
  48. package/cli/commands/skills.ts +14 -14
  49. package/cli/commands/slides.ts +19 -23
  50. package/cli/commands/state.ts +2 -2
  51. package/cli/commands/storage.ts +3 -3
  52. package/cli/commands/telemetry.ts +1 -1
  53. package/cli/commands/three-mode.ts +16 -16
  54. package/cli/commands/timeline.ts +4 -4
  55. package/cli/commands/upgrade.ts +1 -1
  56. package/cli/commands/upload.ts +11 -11
  57. package/cli/commands/version.ts +3 -5
  58. package/cli/commands/what-happened.ts +11 -11
  59. package/cli/drivers/electron.ts +3 -3
  60. package/cli/hints.ts +8 -8
  61. package/cli/recording-access.ts +1 -1
  62. package/cli/ws-bridge.ts +5 -5
  63. package/dist-cli/bin.js +5 -5
  64. package/dist-cli/chunks/{agent-XSJMAFVA.js → agent-QQ3RJNRY.js} +14 -14
  65. package/dist-cli/chunks/{agent-wrapper-NFLJ5K64.js → agent-wrapper-M6SQSMRY.js} +3 -3
  66. package/dist-cli/chunks/app-fonts-F6NDV3XC.js +4 -0
  67. package/dist-cli/chunks/{assert-ILAXIYB5.js → assert-5VB3KQNK.js} +12 -12
  68. package/dist-cli/chunks/auth-PFXODKFN.js +12 -0
  69. package/dist-cli/chunks/{beta-TDR6UKJU.js → beta-WUWYHT4F.js} +2 -2
  70. package/dist-cli/chunks/camera-V3MMTKP7.js +33 -0
  71. package/dist-cli/chunks/{chunk-INBPUR4T.js → chunk-2ANFH72P.js} +11 -11
  72. package/dist-cli/chunks/chunk-2GIA5T6B.js +74 -0
  73. package/dist-cli/chunks/{chunk-GP6QEBZA.js → chunk-4FRSEZ7Z.js} +1 -1
  74. package/dist-cli/chunks/{chunk-USGOQ3YJ.js → chunk-4GXBZHNA.js} +2 -2
  75. package/dist-cli/chunks/{chunk-R3CMECGC.js → chunk-4HESY5E7.js} +4 -4
  76. package/dist-cli/chunks/{chunk-WKT7YM5Q.js → chunk-4VJEXQGD.js} +1 -1
  77. package/dist-cli/chunks/{chunk-FE6ZHPKD.js → chunk-5LJNNHZH.js} +1 -1
  78. package/dist-cli/chunks/{chunk-I2HQB5NN.js → chunk-5QXGSTYI.js} +2 -2
  79. package/dist-cli/chunks/{chunk-FJSHIWAM.js → chunk-5SHAOQHJ.js} +2 -2
  80. package/dist-cli/chunks/{chunk-CGZWLSYD.js → chunk-5UPRBMIG.js} +1 -1
  81. package/dist-cli/chunks/{chunk-ZTM2MKNI.js → chunk-5ZEFRPCC.js} +1 -1
  82. package/dist-cli/chunks/{chunk-RTD3CPDQ.js → chunk-6ART4XVJ.js} +23 -23
  83. package/dist-cli/chunks/{chunk-MTD6IAEA.js → chunk-6CAUT2LH.js} +1 -1
  84. package/dist-cli/chunks/{chunk-ZYHCWCMM.js → chunk-7ATIH7OU.js} +1 -1
  85. package/dist-cli/chunks/{chunk-RVUGKXJD.js → chunk-7Q4QKHMA.js} +1 -1
  86. package/dist-cli/chunks/{chunk-MTNIDSOA.js → chunk-ABK2V2PR.js} +1 -1
  87. package/dist-cli/chunks/{chunk-TL4DNDDY.js → chunk-B53ILAHI.js} +2 -2
  88. package/dist-cli/chunks/{chunk-POC3QTA6.js → chunk-BSSVLFZR.js} +2 -2
  89. package/dist-cli/chunks/chunk-BVOBXTPN.js +30 -0
  90. package/dist-cli/chunks/{chunk-4KC35DMK.js → chunk-CPDEUWL5.js} +2 -2
  91. package/dist-cli/chunks/{chunk-HNQLZZJA.js → chunk-DINU267S.js} +2 -2
  92. package/dist-cli/chunks/{chunk-DCDKJ4NC.js → chunk-DQQ4CZVC.js} +2 -2
  93. package/dist-cli/chunks/{chunk-JWAY6DIH.js → chunk-EDWN2HOO.js} +18 -18
  94. package/dist-cli/chunks/{chunk-3CS4EUMG.js → chunk-EWVG4A3B.js} +2 -2
  95. package/dist-cli/chunks/{chunk-RTEJXUXN.js → chunk-F3NKCQHM.js} +6 -6
  96. package/dist-cli/chunks/{chunk-M7CBQ5I4.js → chunk-GEAGFYKP.js} +1 -1
  97. package/dist-cli/chunks/chunk-GGNH44PZ.js +5 -0
  98. package/dist-cli/chunks/{chunk-YSUIYK6B.js → chunk-HAHJJJUC.js} +2 -2
  99. package/dist-cli/chunks/chunk-HPJ5EKIZ.js +4 -0
  100. package/dist-cli/chunks/{chunk-IN2PZBQD.js → chunk-IBTHGFKE.js} +2 -2
  101. package/dist-cli/chunks/{chunk-ZZWO6Y7X.js → chunk-J6BYRRZQ.js} +2 -2
  102. package/dist-cli/chunks/{chunk-6Y3PVPTF.js → chunk-JK4OZ2TQ.js} +5 -5
  103. package/dist-cli/chunks/{chunk-PO3TOAED.js → chunk-KGQAO25M.js} +2 -2
  104. package/dist-cli/chunks/{chunk-J7XFINJG.js → chunk-L6UUIQE7.js} +2 -2
  105. package/dist-cli/chunks/{chunk-35XNGT5C.js → chunk-LXYLCETR.js} +1 -1
  106. package/dist-cli/chunks/{chunk-JWK5WD44.js → chunk-LZAL3DMP.js} +2 -2
  107. package/dist-cli/chunks/{chunk-3ZDOPKHE.js → chunk-M43UU7UG.js} +4 -4
  108. package/dist-cli/chunks/{chunk-ROPHZJ6P.js → chunk-M4LGUVBM.js} +2 -2
  109. package/dist-cli/chunks/{chunk-RELRA5VW.js → chunk-NCG6C5AH.js} +2 -2
  110. package/dist-cli/chunks/{chunk-42KDXJUD.js → chunk-NR5TSR2Y.js} +2 -2
  111. package/dist-cli/chunks/{chunk-R2UL5VFY.js → chunk-OCPWXT73.js} +3 -3
  112. package/dist-cli/chunks/{chunk-VV4MXLFR.js → chunk-ODKS6JUJ.js} +1 -1
  113. package/dist-cli/chunks/{chunk-F33DUJGG.js → chunk-R2WBREGQ.js} +1 -1
  114. package/dist-cli/chunks/chunk-RKY3ZNTA.js +5 -0
  115. package/dist-cli/chunks/{chunk-MGGRL2Z2.js → chunk-SW7BHOMO.js} +9 -9
  116. package/dist-cli/chunks/{chunk-GVKISFQ3.js → chunk-TJTLXG3R.js} +1 -1
  117. package/dist-cli/chunks/chunk-TNI4PW75.js +124 -0
  118. package/dist-cli/chunks/{chunk-CL3PREIE.js → chunk-UWEDNDND.js} +2 -2
  119. package/dist-cli/chunks/{chunk-IV36DY6M.js → chunk-WRID5SBV.js} +1 -1
  120. package/dist-cli/chunks/{chunk-42ALI64M.js → chunk-WUYI3XJ5.js} +2 -2
  121. package/dist-cli/chunks/{chunk-6VN5ULGQ.js → chunk-X7MHCEGG.js} +2 -2
  122. package/dist-cli/chunks/chunk-XIQFYLWD.js +15 -0
  123. package/dist-cli/chunks/{chunk-LCVUJCRJ.js → chunk-ZUK5ZQU7.js} +1 -1
  124. package/dist-cli/chunks/{cleanup-X6ZRPFDV.js → cleanup-6WBS3MUO.js} +10 -10
  125. package/dist-cli/chunks/cli-version-HUQCDGMA.js +4 -0
  126. package/dist-cli/chunks/{compat-VRXJ5J56.js → compat-2WOPKJYK.js} +9 -9
  127. package/dist-cli/chunks/{config-LHPPE4EP.js → config-FPD7WUYB.js} +5 -5
  128. package/dist-cli/chunks/{control-TVTNGSSF.js → control-B3XNER7I.js} +2 -2
  129. package/dist-cli/chunks/daemon-T4D4X2P5.js +4 -0
  130. package/dist-cli/chunks/{debug-EUHBBPGM.js → debug-LKV5CEAV.js} +17 -17
  131. package/dist-cli/chunks/desktop-EMDPOYQT.js +31 -0
  132. package/dist-cli/chunks/detox-4J4UTZE7.js +52 -0
  133. package/dist-cli/chunks/{device-PONITUZJ.js → device-PMZ7RPXQ.js} +11 -11
  134. package/dist-cli/chunks/{diagnose-2PN4K4L2.js → diagnose-MLEP727D.js} +12 -12
  135. package/dist-cli/chunks/{disk-cleanup-U2PQLOEW.js → disk-cleanup-CVEDIPEE.js} +2 -2
  136. package/dist-cli/chunks/drivers-NTUKJEL6.js +4 -0
  137. package/dist-cli/chunks/{film-XGZCFTQL.js → film-4RNECABF.js} +9 -9
  138. package/dist-cli/chunks/flow-5IOCAHVO.js +4 -0
  139. package/dist-cli/chunks/help-NUJUYEWP.js +4 -0
  140. package/dist-cli/chunks/{hidden-runtime-alias-I4MYF5CO.js → hidden-runtime-alias-YIF25W4F.js} +2 -2
  141. package/dist-cli/chunks/{home-paths-YRAPZ5LE.js → home-paths-WNJCCCCZ.js} +2 -2
  142. package/dist-cli/chunks/inspect-MFEIYUCN.js +4 -0
  143. package/dist-cli/chunks/install-desktop-NB65KI4D.js +4 -0
  144. package/dist-cli/chunks/{login-ZMAIAQ6F.js → login-VEHHGN42.js} +6 -6
  145. package/dist-cli/chunks/{logout-UQZ5JBJU.js → logout-VE7PNXL2.js} +2 -2
  146. package/dist-cli/chunks/{maestro-BQYKDUC4.js → maestro-ZXHTDEOI.js} +25 -25
  147. package/dist-cli/chunks/{maestro-generate-VQYMMQJ5.js → maestro-generate-TK33E2Z6.js} +3 -3
  148. package/dist-cli/chunks/mode-ZDKJ56NT.js +26 -0
  149. package/dist-cli/chunks/{optional-demo-registry-DUWHCLGD.js → optional-demo-registry-GBZ3WVDW.js} +2 -2
  150. package/dist-cli/chunks/{perf-7RAU7WRZ.js → perf-JXNZOUKW.js} +28 -28
  151. package/dist-cli/chunks/permissions-WQ62PW7Y.js +13 -0
  152. package/dist-cli/chunks/record-4S3ZMDIO.js +72 -0
  153. package/dist-cli/chunks/{report-issue-P376KFFU.js → report-issue-KKBADTWO.js} +4 -4
  154. package/dist-cli/chunks/reset-H5XIISJE.js +4 -0
  155. package/dist-cli/chunks/runtime-FK7EEMWA.js +4 -0
  156. package/dist-cli/chunks/{screenshot-command-NE7BKTQ2.js → screenshot-command-42U5MVQL.js} +34 -34
  157. package/dist-cli/chunks/{screenshot-layers-UE4R64PZ.js → screenshot-layers-4G42AHOX.js} +2 -2
  158. package/dist-cli/chunks/{screenshots-capture-ULXPLXMC.js → screenshots-capture-HMQ2OO3I.js} +11 -11
  159. package/dist-cli/chunks/{serve-P7BT4XHR.js → serve-S4V5EDW2.js} +16 -16
  160. package/dist-cli/chunks/setup-T43V7GA6.js +32 -0
  161. package/dist-cli/chunks/{skills-NTRYKJSF.js → skills-O426K26J.js} +16 -16
  162. package/dist-cli/chunks/{state-4D5YAM47.js → state-ZEEPDKJG.js} +5 -5
  163. package/dist-cli/chunks/storage-4GQLOFGG.js +37 -0
  164. package/dist-cli/chunks/store-RFMSNWLJ.js +4 -0
  165. package/dist-cli/chunks/telemetry-NFAAPSMN.js +4 -0
  166. package/dist-cli/chunks/{timeline-GZNFGD3Q.js → timeline-ONCYX7KW.js} +6 -6
  167. package/dist-cli/chunks/{upgrade-A46D6PEY.js → upgrade-A36T52AM.js} +2 -2
  168. package/dist-cli/chunks/upload-36O32DII.js +4 -0
  169. package/dist-cli/chunks/version-67HA253N.js +6 -0
  170. package/dist-cli/chunks/{web-H2IXO5SC.js → web-PWXQHQIE.js} +2 -2
  171. package/dist-cli/chunks/{what-happened-Z7UII5GH.js → what-happened-WNXE622R.js} +16 -16
  172. package/dist-lib/agent-daemon-client.cjs +5 -5
  173. package/dist-lib/agent-events.cjs +1 -1
  174. package/dist-lib/agent-identity.cjs +1 -1
  175. package/dist-lib/agent-sessions.cjs +4 -4
  176. package/dist-lib/attached-projects.cjs +1 -1
  177. package/dist-lib/auth/shared-session.cjs +1 -1
  178. package/dist-lib/backend-origin.cjs +1 -1
  179. package/dist-lib/beta.cjs +1 -1
  180. package/dist-lib/beta.mjs +1 -1
  181. package/dist-lib/bridge-constants.cjs +1 -1
  182. package/dist-lib/bridge-contract.cjs +1 -1
  183. package/dist-lib/cli-constants.cjs +1 -1
  184. package/dist-lib/config.cjs +1 -1
  185. package/dist-lib/detox/index.cjs +1 -1
  186. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  187. package/dist-lib/home-paths.cjs +1 -1
  188. package/dist-lib/host/bridge-host.cjs +7 -7
  189. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  190. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  191. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  192. package/dist-lib/host/websocket-proxy.cjs +1 -1
  193. package/dist-lib/index.cjs +248 -98
  194. package/dist-lib/jump-to-source-babel.cjs +1 -1
  195. package/dist-lib/menu.cjs +2 -2
  196. package/dist-lib/menu.mjs +2 -2
  197. package/dist-lib/metro-host-modules/react-dom.js +6 -0
  198. package/dist-lib/metro-host-modules/react-native-web.js +6 -0
  199. package/dist-lib/metro-host-modules/react-native.js +6 -0
  200. package/dist-lib/metro-host-modules/react.js +6 -0
  201. package/dist-lib/metro-host-modules/react__jsx-dev-runtime.js +6 -0
  202. package/dist-lib/metro-host-modules/react__jsx-runtime.js +6 -0
  203. package/dist-lib/metro-production-bundle.cjs +72 -0
  204. package/dist-lib/metro-production-bundle.mjs +44 -0
  205. package/dist-lib/metro.cjs +152 -8
  206. package/dist-lib/profiles.cjs +1 -1
  207. package/dist-lib/public-brand.cjs +2 -2
  208. package/dist-lib/react-native-host-modules.cjs +50 -0
  209. package/dist-lib/render-mode.cjs +1 -1
  210. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  211. package/dist-lib/sdk.cjs +6 -7
  212. package/dist-lib/sdk.mjs +6 -7
  213. package/dist-lib/skills.cjs +71 -77
  214. package/dist-lib/vite.cjs +104 -85
  215. package/package.json +15 -2
  216. package/scripts/preuninstall.cjs +1 -1
  217. package/skills/contrast/SKILL.md +67 -75
  218. package/skills/rnx-debug/SKILL.md +84 -84
  219. package/skills/rnx-perf/SKILL.md +8 -8
  220. package/skills/rnx-setup/SKILL.md +54 -54
  221. package/skills/rnx-test/SKILL.md +35 -35
  222. package/skills/rnx-visual/SKILL.md +18 -18
  223. package/src/agent-daemon-client.ts +2 -2
  224. package/src/agent-sessions.ts +2 -2
  225. package/src/connect.ts +6 -6
  226. package/src/disk-cleanup.ts +1 -1
  227. package/src/home-paths.ts +1 -1
  228. package/src/host/bridge-host.ts +6 -6
  229. package/src/index.ts +1 -1
  230. package/src/metro-host-modules/react-dom.js +6 -0
  231. package/src/metro-host-modules/react-native-web.js +6 -0
  232. package/src/metro-host-modules/react-native.js +6 -0
  233. package/src/metro-host-modules/react.js +6 -0
  234. package/src/metro-host-modules/react__jsx-dev-runtime.js +6 -0
  235. package/src/metro-host-modules/react__jsx-runtime.js +6 -0
  236. package/src/metro-plugin.ts +249 -10
  237. package/src/metro-production-bundle.ts +51 -0
  238. package/src/public-brand.ts +1 -1
  239. package/src/react-native-host-modules.ts +25 -0
  240. package/src/runtime-assets.ts +1 -1
  241. package/src/sim-client.ts +1 -1
  242. package/src/vite-plugin-one.ts +171 -145
  243. package/dist-cli/chunks/app-fonts-L3UXFYVE.js +0 -4
  244. package/dist-cli/chunks/auth-ISX2EUQL.js +0 -12
  245. package/dist-cli/chunks/camera-4SWTNJUA.js +0 -33
  246. package/dist-cli/chunks/chunk-BRHZEZKN.js +0 -124
  247. package/dist-cli/chunks/chunk-EJPYPJWP.js +0 -5
  248. package/dist-cli/chunks/chunk-KWCD5MOK.js +0 -15
  249. package/dist-cli/chunks/chunk-MJ7QGY7Z.js +0 -4
  250. package/dist-cli/chunks/chunk-RSA4XWHN.js +0 -5
  251. package/dist-cli/chunks/chunk-S3EIOAWZ.js +0 -74
  252. package/dist-cli/chunks/chunk-TYANJQLO.js +0 -30
  253. package/dist-cli/chunks/cli-version-NZUSWKZR.js +0 -4
  254. package/dist-cli/chunks/daemon-XUEC47EC.js +0 -4
  255. package/dist-cli/chunks/desktop-LLHMP4A3.js +0 -31
  256. package/dist-cli/chunks/detox-QLNWLXA4.js +0 -52
  257. package/dist-cli/chunks/drivers-7IU37M2E.js +0 -4
  258. package/dist-cli/chunks/flow-NZZLR4BN.js +0 -4
  259. package/dist-cli/chunks/help-D7URIJRD.js +0 -4
  260. package/dist-cli/chunks/inspect-TJYWKY56.js +0 -4
  261. package/dist-cli/chunks/install-desktop-LD3W5RS7.js +0 -4
  262. package/dist-cli/chunks/mode-ZQ6H7KWM.js +0 -26
  263. package/dist-cli/chunks/permissions-DRZ3HCFL.js +0 -13
  264. package/dist-cli/chunks/record-J5JAYW4Y.js +0 -72
  265. package/dist-cli/chunks/reset-KXYRDEFU.js +0 -4
  266. package/dist-cli/chunks/runtime-66CEPOG6.js +0 -4
  267. package/dist-cli/chunks/setup-QO5KZAX3.js +0 -32
  268. package/dist-cli/chunks/storage-X2K2MDPX.js +0 -37
  269. package/dist-cli/chunks/store-TUJPIRTT.js +0 -4
  270. package/dist-cli/chunks/telemetry-CF5DVEKI.js +0 -4
  271. package/dist-cli/chunks/upload-UIQJIBEZ.js +0 -4
  272. package/dist-cli/chunks/version-CMBB3FXL.js +0 -6
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.335 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.337 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -46,7 +46,7 @@ __export(src_exports, {
46
46
  connect: () => connect,
47
47
  jumpToSourceBabelPlugin: () => sootsimJumpToSourceBabelPlugin,
48
48
  metroPlugin: () => metro_plugin_default,
49
- sootsimPlugin: () => sootsimPlugin
49
+ rnxPlugin: () => rnxPlugin
50
50
  });
51
51
  module.exports = __toCommonJS(src_exports);
52
52
 
@@ -549,7 +549,7 @@ var BridgeSimLockedError = class extends Error {
549
549
  };
550
550
  function describeSimIdSource(source) {
551
551
  if (source === "flag") return "via --sim";
552
- if (source === "saved") return "saved via `rnxsim use`";
552
+ if (source === "saved") return "saved via `rnx use`";
553
553
  return "primary fallback \u2014 no sim pinned";
554
554
  }
555
555
  function createBridge(wsPort, opts = {}) {
@@ -612,7 +612,7 @@ function createBridge(wsPort, opts = {}) {
612
612
  \u26A0 ${msg._otherCliCount} other CLI identity/identities are driving this sim
613
613
  taps, scrolls, and keyboard input from multiple agents will collide on
614
614
  the same screen state (this is not a bridge throughput limit).
615
- use \`rnxsim open --new\` for an isolated sim per agent.
615
+ use \`rnx open --new\` for an isolated sim per agent.
616
616
 
617
617
  `
618
618
  );
@@ -676,7 +676,7 @@ function createBridge(wsPort, opts = {}) {
676
676
  if (opts.simIdSource !== "flag" && sentSimId && cmd.simId === void 0 && (message === missingSimMessage || message.startsWith(`${missingSimMessage};`))) {
677
677
  clearCurrentSimId();
678
678
  throw new Error(
679
- `saved sim ${sentSimId} is gone${message.slice(missingSimMessage.length)}; run \`rnxsim list\` and \`rnxsim use <sim>\`, or open a fresh sim`
679
+ `saved sim ${sentSimId} is gone${message.slice(missingSimMessage.length)}; run \`rnx list\` and \`rnx use <sim>\`, or open a fresh sim`
680
680
  );
681
681
  }
682
682
  throw error;
@@ -2003,7 +2003,7 @@ var WAIT_READY_PROBE = `(async () => {
2003
2003
  const loadingSignal = (value) => {
2004
2004
  const text = cleanText(value)
2005
2005
  if (!text) return ''
2006
- return /^(opening app\\b|looking for your app\\b|building bundle\\b|preparing rnxsim runtime\\b|loading native bundle\\b|loading rnx stubs\\b|loading bundle loader\\b|loading native stubs\\b|loading compat bridge\\b|loading react-native shim\\b|loading react bridge\\b|loading reconciler\\b|loading replacement modules\\b|injecting rnx modules\\b|warming sqlite engine\\b|capturing root component\\b|reloading app\\b|loading(?:[.!\u2026]*)?$|connecting(?:[.!\u2026]*)?$)/i.test(text)
2006
+ return /^(opening app\\b|looking for your app\\b|building bundle\\b|preparing rnx runtime\\b|loading native bundle\\b|loading rnx stubs\\b|loading bundle loader\\b|loading native stubs\\b|loading compat bridge\\b|loading react-native shim\\b|loading react bridge\\b|loading reconciler\\b|loading replacement modules\\b|injecting rnx modules\\b|warming sqlite engine\\b|capturing root component\\b|reloading app\\b|loading(?:[.!\u2026]*)?$|connecting(?:[.!\u2026]*)?$)/i.test(text)
2007
2007
  ? text
2008
2008
  : ''
2009
2009
  }
@@ -2143,7 +2143,7 @@ function readyProbeHasTargetContent(probe) {
2143
2143
  }
2144
2144
  function waitReadyReason(status) {
2145
2145
  if (status.bridgeError) {
2146
- return `sim unreachable: ${status.bridgeError} \u2014 the target tab is closed or no sim is connected (check \`rnxsim list\`, reopen with \`rnxsim open\`)`;
2146
+ return `sim unreachable: ${status.bridgeError} \u2014 the target tab is closed or no sim is connected (check \`rnx list\`, reopen with \`rnx open\`)`;
2147
2147
  }
2148
2148
  const base = status.externalError ? `guest app errored: ${status.externalError}` : status.loadingText ? `still showing "${status.loadingText}"` : status.externalReady === false ? "guest app is still loading" : status.flag !== true && status.targets > 0 ? "native content is rendered but the ready signal has not settled" : status.flag !== true ? "guest app has not emitted sootsim:externalAppReady" : status.targets <= 0 ? "ready flag emitted but no visible app content is inspectable yet" : "node tree is still changing";
2149
2149
  return !status.externalError && status.suppressedEntryError ? `${base} (suppressed entry error: ${status.suppressedEntryError})` : base;
@@ -2837,7 +2837,7 @@ function pickSim(sims, wanted, port) {
2837
2837
  const match = open.find((sim) => sim.id === wanted);
2838
2838
  if (!match) {
2839
2839
  throw new SimConnectError(
2840
- `no sim connected with id ${wanted} on bridge :${port}` + (open.length ? ` \u2014 connected: ${open.map((sim) => sim.id).join(", ")}` : " \u2014 no sims connected; open one with `rnxsim open <port>`")
2840
+ `no sim connected with id ${wanted} on bridge :${port}` + (open.length ? ` \u2014 connected: ${open.map((sim) => sim.id).join(", ")}` : " \u2014 no sims connected; open one with `rnx open <port>`")
2841
2841
  );
2842
2842
  }
2843
2843
  return match;
@@ -2850,7 +2850,7 @@ function pickSim(sims, wanted, port) {
2850
2850
  const primary = open.find((sim) => sim.isPrimary) ?? open[0];
2851
2851
  if (!primary) {
2852
2852
  throw new SimConnectError(
2853
- `no sims connected on bridge :${port} \u2014 open one with \`rnxsim open <port>\``
2853
+ `no sims connected on bridge :${port} \u2014 open one with \`rnx open <port>\``
2854
2854
  );
2855
2855
  }
2856
2856
  return primary;
@@ -2866,7 +2866,7 @@ async function connect(options = {}) {
2866
2866
  discovery.close();
2867
2867
  if (error instanceof SimConnectError) throw error;
2868
2868
  const message = error instanceof Error ? error.message : String(error);
2869
- throw new SimConnectError(`${message} \u2014 is the rnxsim daemon or dev shell running?`);
2869
+ throw new SimConnectError(`${message} \u2014 is the rnx daemon or dev shell running?`);
2870
2870
  }
2871
2871
  discovery.close();
2872
2872
  const bridge = createBridge(port, {
@@ -2879,8 +2879,10 @@ async function connect(options = {}) {
2879
2879
  }
2880
2880
 
2881
2881
  // src/vite-plugin-one.ts
2882
+ var import_child_process2 = require("child_process");
2882
2883
  var import_fs4 = __toESM(require("fs"), 1);
2883
2884
  var import_path3 = __toESM(require("path"), 1);
2885
+ var import_url2 = require("url");
2884
2886
 
2885
2887
  // src/runtime-assets.ts
2886
2888
  var import_fs3 = __toESM(require("fs"), 1);
@@ -2893,7 +2895,7 @@ function isValidRuntimeVersion(value) {
2893
2895
  }
2894
2896
 
2895
2897
  // src/runtime-assets.ts
2896
- var SOOTSIM_RUNTIME_MISSING_MESSAGE = "[rnx] no engine runtime installed \u2014 run `rnxsim setup`, or `rnxsim runtime install`";
2898
+ var SOOTSIM_RUNTIME_MISSING_MESSAGE = "[rnx] no engine runtime installed \u2014 run `rnx setup`, or `rnx runtime install`";
2897
2899
  var _monorepoRootCache;
2898
2900
  function findMonorepoRoot() {
2899
2901
  if (_monorepoRootCache !== void 0) return _monorepoRootCache;
@@ -3029,113 +3031,257 @@ function serveRuntimeFile(req, res, fullPath) {
3029
3031
  }
3030
3032
 
3031
3033
  // src/vite-plugin-one.ts
3032
- function sootsimPlugin(options = {}) {
3033
- if (options.enabled === false) return [];
3034
+ function rnxPlugin(options = {}) {
3034
3035
  const prefix2 = options.prefix || "/__soot";
3035
- return [
3036
- {
3037
- name: "sootsim-one",
3038
- configureServer(server) {
3039
- const bundleUrl = options.bundleUrl || "/node_modules/one/metro-entry.bundle?platform=ios&dev=true&minify=false";
3040
- const buildShellHtml = (runtimeRoot) => {
3041
- const html = import_fs4.default.readFileSync(import_path3.default.join(runtimeRoot, "index.html"), "utf8");
3042
- const lock = readDaemonLockfile();
3043
- const bridgePort = lock && isDaemonLockfileFresh(lock) && lock.bridgePort > 0 ? lock.bridgePort : DEFAULT_SOOTSIM_BRIDGE_PORT;
3044
- const inject = `<script>(function(){var u=new URL(location.href);if(!u.searchParams.has('bundle'))u.searchParams.set('bundle',${JSON.stringify(bundleUrl)});window.__sootsimBridgePort=${bridgePort};history.replaceState(null,'','${prefix2}/'+u.search)})()</script>`;
3045
- return html.replace("</head>", inject + "</head>");
3036
+ return {
3037
+ name: "sootsim-one",
3038
+ configureServer(server) {
3039
+ if (options.enabled === false) return;
3040
+ const bundleUrl = options.bundleUrl || "/node_modules/one/metro-entry.bundle?platform=ios&dev=true&minify=false";
3041
+ const buildShellHtml = (runtimeRoot) => {
3042
+ const html = import_fs4.default.readFileSync(import_path3.default.join(runtimeRoot, "index.html"), "utf8");
3043
+ const lock = readDaemonLockfile();
3044
+ const bridgePort = lock && isDaemonLockfileFresh(lock) && lock.bridgePort > 0 ? lock.bridgePort : DEFAULT_SOOTSIM_BRIDGE_PORT;
3045
+ const inject = `<script>(function(){var u=new URL(location.href);if(!u.searchParams.has('bundle'))u.searchParams.set('bundle',${JSON.stringify(bundleUrl)});window.__sootsimBridgePort=${bridgePort};history.replaceState(null,'','${prefix2}/'+u.search)})()</script>`;
3046
+ return html.replace("</head>", inject + "</head>");
3047
+ };
3048
+ server.middlewares.use((req, res, next) => {
3049
+ const origWriteHead = res.writeHead.bind(res);
3050
+ res.writeHead = function(statusCode, ...args) {
3051
+ const setCookie = res.getHeader("set-cookie");
3052
+ if (setCookie) {
3053
+ const value = Array.isArray(setCookie) ? setCookie.join(", ") : String(setCookie);
3054
+ res.setHeader("x-sootsim-set-cookie", value);
3055
+ res.setHeader("access-control-expose-headers", "x-sootsim-set-cookie");
3056
+ }
3057
+ return origWriteHead(
3058
+ statusCode,
3059
+ ...args
3060
+ );
3046
3061
  };
3047
- server.middlewares.use((req, res, next) => {
3048
- const origWriteHead = res.writeHead.bind(res);
3049
- res.writeHead = function(statusCode, ...args) {
3050
- const setCookie = res.getHeader("set-cookie");
3051
- if (setCookie) {
3052
- const value = Array.isArray(setCookie) ? setCookie.join(", ") : String(setCookie);
3053
- res.setHeader("x-sootsim-set-cookie", value);
3054
- res.setHeader("access-control-expose-headers", "x-sootsim-set-cookie");
3062
+ next();
3063
+ });
3064
+ server.middlewares.use((req, res, next) => {
3065
+ if ((req.url || "").split("?")[0] !== "/__server-scan") return next();
3066
+ const scanPort = server.config.server.port || 8081;
3067
+ const absoluteBundleUrl = bundleUrl.startsWith("http") ? bundleUrl : `http://localhost:${scanPort}${bundleUrl}`;
3068
+ res.setHeader("content-type", "application/json");
3069
+ res.end(
3070
+ JSON.stringify([
3071
+ {
3072
+ port: scanPort,
3073
+ framework: "one",
3074
+ bundleUrl: absoluteBundleUrl,
3075
+ lastSeen: Date.now()
3055
3076
  }
3056
- return origWriteHead(
3057
- statusCode,
3058
- ...args
3059
- );
3060
- };
3077
+ ])
3078
+ );
3079
+ });
3080
+ server.middlewares.use((req, res, next) => {
3081
+ const url = req.url || "";
3082
+ const pathname = url.split("?")[0];
3083
+ const runtimeRoot = resolveRuntimeRootForRequestHost(req.headers.host);
3084
+ if (!runtimeRoot) {
3085
+ if (pathname === prefix2 || pathname === prefix2 + "/" || pathname.startsWith(prefix2 + "/")) {
3086
+ res.statusCode = 500;
3087
+ res.end(SOOTSIM_RUNTIME_MISSING_MESSAGE);
3088
+ return;
3089
+ }
3061
3090
  next();
3062
- });
3063
- server.middlewares.use((req, res, next) => {
3064
- if ((req.url || "").split("?")[0] !== "/__server-scan") return next();
3065
- const scanPort = server.config.server.port || 8081;
3066
- const absoluteBundleUrl = bundleUrl.startsWith("http") ? bundleUrl : `http://localhost:${scanPort}${bundleUrl}`;
3067
- res.setHeader("content-type", "application/json");
3068
- res.end(
3069
- JSON.stringify([
3070
- {
3071
- port: scanPort,
3072
- framework: "one",
3073
- bundleUrl: absoluteBundleUrl,
3074
- lastSeen: Date.now()
3075
- }
3076
- ])
3077
- );
3078
- });
3079
- server.middlewares.use((req, res, next) => {
3080
- const url = req.url || "";
3081
- const pathname = url.split("?")[0];
3082
- const runtimeRoot = resolveRuntimeRootForRequestHost(req.headers.host);
3083
- if (!runtimeRoot) {
3084
- if (pathname === prefix2 || pathname === prefix2 + "/" || pathname.startsWith(prefix2 + "/")) {
3085
- res.statusCode = 500;
3086
- res.end(SOOTSIM_RUNTIME_MISSING_MESSAGE);
3087
- return;
3088
- }
3089
- next();
3091
+ return;
3092
+ }
3093
+ if (isRootRuntimeAssetPath(pathname)) {
3094
+ const fullPath = resolveRuntimeFilePath(runtimeRoot, pathname);
3095
+ if (fullPath) {
3096
+ serveRuntimeFile(req, res, fullPath);
3090
3097
  return;
3091
3098
  }
3092
- if (isRootRuntimeAssetPath(pathname)) {
3093
- const fullPath = resolveRuntimeFilePath(runtimeRoot, pathname);
3094
- if (fullPath) {
3095
- serveRuntimeFile(req, res, fullPath);
3096
- return;
3097
- }
3099
+ }
3100
+ if (pathname === prefix2 || pathname === prefix2 + "/") {
3101
+ res.setHeader("content-type", "text/html");
3102
+ res.end(buildShellHtml(runtimeRoot));
3103
+ return;
3104
+ }
3105
+ if (pathname.startsWith(prefix2 + "/")) {
3106
+ const fullPath = resolveRuntimeFilePath(
3107
+ runtimeRoot,
3108
+ pathname.slice(prefix2.length)
3109
+ );
3110
+ if (fullPath) {
3111
+ serveRuntimeFile(req, res, fullPath);
3112
+ return;
3098
3113
  }
3099
- if (pathname === prefix2 || pathname === prefix2 + "/") {
3114
+ const ext = import_path3.default.extname(pathname);
3115
+ if (!ext) {
3100
3116
  res.setHeader("content-type", "text/html");
3101
3117
  res.end(buildShellHtml(runtimeRoot));
3102
3118
  return;
3103
3119
  }
3104
- if (pathname.startsWith(prefix2 + "/")) {
3105
- const fullPath = resolveRuntimeFilePath(
3106
- runtimeRoot,
3107
- pathname.slice(prefix2.length)
3108
- );
3109
- if (fullPath) {
3110
- serveRuntimeFile(req, res, fullPath);
3111
- return;
3112
- }
3113
- const ext = import_path3.default.extname(pathname);
3114
- if (!ext) {
3115
- res.setHeader("content-type", "text/html");
3116
- res.end(buildShellHtml(runtimeRoot));
3117
- return;
3118
- }
3119
- }
3120
- next();
3120
+ }
3121
+ next();
3122
+ });
3123
+ const port = server.config.server.port || 8081;
3124
+ const sootsimUrl = `http://localhost:${port}${prefix2}/`;
3125
+ console.log(`[rnx] serving at ${sootsimUrl}`);
3126
+ if (options.open && !process.env.CI && !process.env.SOOTSIM_NO_OPEN) {
3127
+ server.httpServer?.once("listening", () => {
3128
+ const packageRoot = import_path3.default.resolve(
3129
+ import_path3.default.dirname((0, import_url2.fileURLToPath)(__sootsim_import_meta_url)),
3130
+ ".."
3131
+ );
3132
+ const binPath = import_path3.default.join(packageRoot, "dist-cli", "bin.js");
3133
+ const openPort = server.config.server.port || port;
3134
+ console.log(`[rnx] opening simulator for :${openPort}`);
3135
+ (0, import_child_process2.spawn)(process.execPath, [binPath, "open", String(openPort)], {
3136
+ detached: true,
3137
+ stdio: "ignore",
3138
+ windowsHide: true
3139
+ }).unref();
3121
3140
  });
3122
- const port = server.config.server.port || 8081;
3123
- const sootsimUrl = `http://localhost:${port}${prefix2}/`;
3124
- console.log(`[rnx] serving at ${sootsimUrl}`);
3125
3141
  }
3126
3142
  }
3127
- ];
3143
+ };
3128
3144
  }
3129
3145
 
3130
3146
  // src/metro-plugin.ts
3131
3147
  var import_fs5 = __toESM(require("fs"), 1);
3148
+ var import_module2 = require("module");
3132
3149
  var import_path4 = __toESM(require("path"), 1);
3150
+
3151
+ // src/metro-production-bundle.ts
3152
+ var RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION = "rnxsim";
3153
+ var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
3154
+ function createRNXMetroModulePathsFooter(modulePaths) {
3155
+ const payload = JSON.stringify(modulePaths).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/<\//g, "<\\/");
3156
+ return `
3157
+ ${RNXSIM_METRO_MODULE_PATHS_PREFIX}${payload};`;
3158
+ }
3159
+
3160
+ // src/metro-plugin.ts
3133
3161
  var prefix = "/__soot";
3134
- function withSootsim(config, options = {}) {
3135
- if (options.enabled === false) return config;
3162
+ var hostModuleSpecifiers = [
3163
+ "react",
3164
+ "react-dom",
3165
+ "react/jsx-runtime",
3166
+ "react/jsx-dev-runtime",
3167
+ "react-native",
3168
+ "react-native-web"
3169
+ ];
3170
+ function isRNXProductionBundle(graph) {
3171
+ return graph.transformOptions?.dev === false && graph.transformOptions.customTransformOptions?.[RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION] === "true";
3172
+ }
3173
+ function assertProductionEnvironment() {
3174
+ if (process.env.NODE_ENV === "production") return;
3175
+ throw new Error(
3176
+ "rnxsim: production bundle requests require NODE_ENV=production; restart Metro with NODE_ENV=production"
3177
+ );
3178
+ }
3179
+ function hostModuleFileName(specifier) {
3180
+ return `${specifier.replaceAll("/", "__")}.js`;
3181
+ }
3182
+ function resolveHostModules() {
3183
+ const root = import_path4.default.join(__dirname, "metro-host-modules");
3184
+ const files = /* @__PURE__ */ new Map();
3185
+ for (const specifier of hostModuleSpecifiers) {
3186
+ const filePath = import_path4.default.join(root, hostModuleFileName(specifier));
3187
+ files.set(specifier, filePath);
3188
+ }
3189
+ return { root, files };
3190
+ }
3191
+ function readCallableMetroExport(moduleValue, label) {
3192
+ const callable = typeof moduleValue === "function" ? moduleValue : typeof moduleValue === "object" && moduleValue !== null ? Reflect.get(moduleValue, "default") : void 0;
3193
+ if (typeof callable !== "function") {
3194
+ throw new Error(`rnxsim: Metro ${label} module did not export a function`);
3195
+ }
3196
+ return (...args) => Reflect.apply(callable, void 0, args);
3197
+ }
3198
+ function createMetroDefaultSerializer(projectRoot) {
3199
+ const projectRequire = (0, import_module2.createRequire)(import_path4.default.join(projectRoot, "package.json"));
3200
+ const metroRoot = import_path4.default.dirname(projectRequire.resolve("metro/package.json"));
3201
+ const baseJSBundle = readCallableMetroExport(
3202
+ projectRequire(import_path4.default.join(metroRoot, "src/DeltaBundler/Serializers/baseJSBundle.js")),
3203
+ "baseJSBundle"
3204
+ );
3205
+ const bundleToString = readCallableMetroExport(
3206
+ projectRequire(import_path4.default.join(metroRoot, "src/lib/bundleToString.js")),
3207
+ "bundleToString"
3208
+ );
3209
+ return (entryPoint, preModules, graph, options) => {
3210
+ const serialized = bundleToString(
3211
+ baseJSBundle(entryPoint, preModules, graph, options)
3212
+ );
3213
+ const code = typeof serialized === "object" && serialized !== null ? Reflect.get(serialized, "code") : void 0;
3214
+ if (typeof code !== "string") {
3215
+ throw new Error("rnxsim: Metro bundleToString did not return bundle code");
3216
+ }
3217
+ return code;
3218
+ };
3219
+ }
3220
+ function prependRNXModulePaths(result, graph, options, projectRoot) {
3221
+ const dependencies = graph.dependencies;
3222
+ const createModuleId = options.createModuleId;
3223
+ if (!dependencies || !createModuleId) {
3224
+ throw new Error(
3225
+ "rnxsim: Metro did not provide the production module graph and createModuleId"
3226
+ );
3227
+ }
3228
+ const modulePaths = {};
3229
+ for (const module2 of dependencies.values()) {
3230
+ modulePaths[String(createModuleId(module2.path))] = import_path4.default.relative(projectRoot, module2.path).replaceAll(import_path4.default.sep, "/");
3231
+ }
3232
+ if (Object.keys(modulePaths).length !== dependencies.size) {
3233
+ throw new Error("rnxsim: production module IDs were not unique");
3234
+ }
3235
+ const footer = createRNXMetroModulePathsFooter(modulePaths);
3236
+ return typeof result === "string" ? result + footer : { ...result, code: result.code + footer };
3237
+ }
3238
+ function withRNX(config, options = {}) {
3239
+ if (!options.devServer && !options.productionBundles) return config;
3136
3240
  const bundleUrl = options.bundleUrl || "/index.bundle?platform=ios&dev=true&hot=true&minify=false";
3137
3241
  const cfgServer = config.server;
3242
+ const cfgResolver = config.resolver;
3243
+ const cfgSerializer = config.serializer;
3244
+ const cfgProjectRoot = config.projectRoot || process.cwd();
3138
3245
  const existingEnhance = cfgServer?.enhanceMiddleware;
3246
+ const existingResolveRequest = cfgResolver?.resolveRequest;
3247
+ const existingSerializer = cfgSerializer?.customSerializer;
3248
+ let productionConfig = {};
3249
+ if (options.productionBundles) {
3250
+ const hostModules = resolveHostModules();
3251
+ let defaultSerializer;
3252
+ productionConfig = {
3253
+ watchFolders: [
3254
+ ...config.watchFolders || [],
3255
+ hostModules.root
3256
+ ],
3257
+ resolver: {
3258
+ ...cfgResolver,
3259
+ resolveRequest: (context, moduleName, platform) => {
3260
+ if (context.customResolverOptions?.[RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION] === "true") {
3261
+ assertProductionEnvironment();
3262
+ const hostModule = hostModules.files.get(moduleName);
3263
+ if (hostModule) return { type: "sourceFile", filePath: hostModule };
3264
+ }
3265
+ return existingResolveRequest ? existingResolveRequest(context, moduleName, platform) : context.resolveRequest(context, moduleName, platform);
3266
+ }
3267
+ },
3268
+ serializer: {
3269
+ ...cfgSerializer,
3270
+ customSerializer: async (entryPoint, preModules, graph, serializerOptions) => {
3271
+ const serializer = existingSerializer || (defaultSerializer ||= createMetroDefaultSerializer(cfgProjectRoot));
3272
+ const productionBundle = isRNXProductionBundle(graph);
3273
+ if (productionBundle) assertProductionEnvironment();
3274
+ const result = await serializer(
3275
+ entryPoint,
3276
+ preModules,
3277
+ graph,
3278
+ serializerOptions
3279
+ );
3280
+ return productionBundle ? prependRNXModulePaths(result, graph, serializerOptions, cfgProjectRoot) : result;
3281
+ }
3282
+ }
3283
+ };
3284
+ }
3139
3285
  const serverConfig = {
3140
3286
  ...cfgServer,
3141
3287
  enhanceMiddleware: (metroMiddleware, metroServer) => {
@@ -3202,9 +3348,13 @@ function withSootsim(config, options = {}) {
3202
3348
  return server;
3203
3349
  }
3204
3350
  };
3205
- return { ...config, server: serverConfig };
3351
+ return {
3352
+ ...config,
3353
+ ...productionConfig,
3354
+ ...options.devServer ? { server: serverConfig } : {}
3355
+ };
3206
3356
  }
3207
- var metro_plugin_default = withSootsim;
3357
+ var metro_plugin_default = withRNX;
3208
3358
 
3209
3359
  // src/jump-to-source-babel.ts
3210
3360
  function normalizeSourcePath(path6) {
@@ -3284,5 +3434,5 @@ function sootsimJumpToSourceBabelPlugin(api, options = {}) {
3284
3434
  connect,
3285
3435
  jumpToSourceBabelPlugin,
3286
3436
  metroPlugin,
3287
- sootsimPlugin
3437
+ rnxPlugin
3288
3438
  });
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.335 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.337 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/menu.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.335 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.337 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -43,7 +43,7 @@ var name = "rnx";
43
43
  var rnxPublicBrand = Object.freeze({
44
44
  name,
45
45
  packageName: "rnxsim",
46
- commandName: "rnxsim",
46
+ commandName: "rnx",
47
47
  domain: "rnxsim.com",
48
48
  origin: "https://rnxsim.com"
49
49
  });
package/dist-lib/menu.mjs CHANGED
@@ -1,11 +1,11 @@
1
- /*! rnx v0.1.335 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.337 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/public-brand.ts
4
4
  var name = "rnx";
5
5
  var rnxPublicBrand = Object.freeze({
6
6
  name,
7
7
  packageName: "rnxsim",
8
- commandName: "rnxsim",
8
+ commandName: "rnx",
9
9
  domain: "rnxsim.com",
10
10
  origin: "https://rnxsim.com"
11
11
  });
@@ -0,0 +1,6 @@
1
+ const name = 'react-dom'
2
+ const host = globalThis.__contrastHostModules
3
+ if (!host || !(name in host)) {
4
+ throw new Error(`rnxsim: runtime did not publish __contrastHostModules[${name}]`)
5
+ }
6
+ module.exports = host[name]
@@ -0,0 +1,6 @@
1
+ const name = 'react-native-web'
2
+ const host = globalThis.__contrastHostModules
3
+ if (!host || !(name in host)) {
4
+ throw new Error(`rnxsim: runtime did not publish __contrastHostModules[${name}]`)
5
+ }
6
+ module.exports = host[name]
@@ -0,0 +1,6 @@
1
+ const name = 'react-native'
2
+ const host = globalThis.__contrastHostModules
3
+ if (!host || !(name in host)) {
4
+ throw new Error(`rnxsim: runtime did not publish __contrastHostModules[${name}]`)
5
+ }
6
+ module.exports = host[name]
@@ -0,0 +1,6 @@
1
+ const name = 'react'
2
+ const host = globalThis.__contrastHostModules
3
+ if (!host || !(name in host)) {
4
+ throw new Error(`rnxsim: runtime did not publish __contrastHostModules[${name}]`)
5
+ }
6
+ module.exports = host[name]
@@ -0,0 +1,6 @@
1
+ const name = 'react/jsx-dev-runtime'
2
+ const host = globalThis.__contrastHostModules
3
+ if (!host || !(name in host)) {
4
+ throw new Error(`rnxsim: runtime did not publish __contrastHostModules[${name}]`)
5
+ }
6
+ module.exports = host[name]
@@ -0,0 +1,6 @@
1
+ const name = 'react/jsx-runtime'
2
+ const host = globalThis.__contrastHostModules
3
+ if (!host || !(name in host)) {
4
+ throw new Error(`rnxsim: runtime did not publish __contrastHostModules[${name}]`)
5
+ }
6
+ module.exports = host[name]
@@ -0,0 +1,72 @@
1
+ /*! rnx v0.1.337 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
+ "use strict";
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+
22
+ // src/metro-production-bundle.ts
23
+ var metro_production_bundle_exports = {};
24
+ __export(metro_production_bundle_exports, {
25
+ RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION: () => RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION,
26
+ createRNXMetroModulePathsFooter: () => createRNXMetroModulePathsFooter,
27
+ readRNXMetroModuleIdentity: () => readRNXMetroModuleIdentity,
28
+ toRNXProductionBundleUrl: () => toRNXProductionBundleUrl
29
+ });
30
+ module.exports = __toCommonJS(metro_production_bundle_exports);
31
+ var RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION = "rnxsim";
32
+ var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
33
+ function toRNXProductionBundleUrl(bundleUrl) {
34
+ const relative = bundleUrl.startsWith("/");
35
+ const url = new URL(bundleUrl, "http://rnxsim.local");
36
+ url.searchParams.set("dev", "false");
37
+ url.searchParams.set("hot", "false");
38
+ url.searchParams.set("minify", "true");
39
+ url.searchParams.set(`resolver.${RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION}`, "true");
40
+ url.searchParams.set(`transform.${RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION}`, "true");
41
+ return relative ? `${url.pathname}${url.search}${url.hash}` : url.toString();
42
+ }
43
+ function createRNXMetroModulePathsFooter(modulePaths) {
44
+ const payload = JSON.stringify(modulePaths).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/<\//g, "<\\/");
45
+ return `
46
+ ${RNXSIM_METRO_MODULE_PATHS_PREFIX}${payload};`;
47
+ }
48
+ function readRNXMetroModuleIdentity(bundleText) {
49
+ const footerPrefix = `
50
+ ${RNXSIM_METRO_MODULE_PATHS_PREFIX}`;
51
+ const footerStart = bundleText.lastIndexOf(footerPrefix);
52
+ if (footerStart < 0 || !bundleText.endsWith(";")) return null;
53
+ const parsed = JSON.parse(
54
+ bundleText.slice(footerStart + footerPrefix.length, -1)
55
+ );
56
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
57
+ return null;
58
+ }
59
+ const modulePaths = {};
60
+ for (const [moduleId, modulePath] of Object.entries(parsed)) {
61
+ if (typeof modulePath !== "string") return null;
62
+ modulePaths[moduleId] = modulePath;
63
+ }
64
+ return { source: bundleText.slice(0, footerStart), modulePaths };
65
+ }
66
+ // Annotate the CommonJS export names for ESM import in node:
67
+ 0 && (module.exports = {
68
+ RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION,
69
+ createRNXMetroModulePathsFooter,
70
+ readRNXMetroModuleIdentity,
71
+ toRNXProductionBundleUrl
72
+ });