rnxsim 0.1.363 → 0.1.365

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 (176) hide show
  1. package/cli/outbound-endpoints.ts +2 -6
  2. package/dist-cli/bin.js +5 -5
  3. package/dist-cli/chunks/{agent-EN7USQWO.js → agent-BVMNQFKF.js} +2 -2
  4. package/dist-cli/chunks/{agent-wrapper-4K2P2EBF.js → agent-wrapper-B6YFXGC3.js} +2 -2
  5. package/dist-cli/chunks/app-fonts-MEI6R6XR.js +4 -0
  6. package/dist-cli/chunks/{assert-WEQDRDJ2.js → assert-JGHI53HV.js} +2 -2
  7. package/dist-cli/chunks/{auth-U5GBY5SE.js → auth-STEOXUS7.js} +2 -2
  8. package/dist-cli/chunks/{beta-WOKLQLOJ.js → beta-HT3FLS5T.js} +2 -2
  9. package/dist-cli/chunks/{camera-GRMP2HT3.js → camera-ZCLFSLON.js} +2 -2
  10. package/dist-cli/chunks/{chunk-TIZP26F4.js → chunk-25BTVHK2.js} +2 -2
  11. package/dist-cli/chunks/{chunk-YFF6YFYJ.js → chunk-2CXHDTQ5.js} +1 -1
  12. package/dist-cli/chunks/{chunk-TK4ZQQAL.js → chunk-2JFZ5Z7Q.js} +1 -1
  13. package/dist-cli/chunks/{chunk-QVUS7OHN.js → chunk-2SFMW5K6.js} +1 -1
  14. package/dist-cli/chunks/{chunk-6BGR523F.js → chunk-4WFN4DFR.js} +2 -2
  15. package/dist-cli/chunks/{chunk-4QK74NWP.js → chunk-52ES4API.js} +2 -2
  16. package/dist-cli/chunks/{chunk-FFWDCXTD.js → chunk-5AS7S6HY.js} +2 -2
  17. package/dist-cli/chunks/{chunk-SIKPB3GL.js → chunk-5VHWQGGF.js} +1 -1
  18. package/dist-cli/chunks/{chunk-GLYEL265.js → chunk-622E4JET.js} +1 -1
  19. package/dist-cli/chunks/{chunk-DK764ET6.js → chunk-67ATAITF.js} +2 -2
  20. package/dist-cli/chunks/{chunk-2AELGO56.js → chunk-6BAF6GFS.js} +1 -1
  21. package/dist-cli/chunks/{chunk-ZSFETJZV.js → chunk-BGRGP3QR.js} +1 -1
  22. package/dist-cli/chunks/{chunk-7CT75XQF.js → chunk-CYIE65QN.js} +1 -1
  23. package/dist-cli/chunks/{chunk-PDGEVGHU.js → chunk-DBJZUCFP.js} +2 -2
  24. package/dist-cli/chunks/{chunk-KCHXGTYQ.js → chunk-DQFOHIRF.js} +1 -1
  25. package/dist-cli/chunks/{chunk-MOC4QX3B.js → chunk-EAFKG5R3.js} +2 -2
  26. package/dist-cli/chunks/{chunk-DFL5AISK.js → chunk-EFL2ASZO.js} +1 -1
  27. package/dist-cli/chunks/{chunk-GMW6T2K6.js → chunk-EFXNSJ55.js} +2 -2
  28. package/dist-cli/chunks/{chunk-NUU3SWLR.js → chunk-EVBQDQVY.js} +1 -1
  29. package/dist-cli/chunks/{chunk-X2ITJOHZ.js → chunk-FHWZPUGC.js} +1 -1
  30. package/dist-cli/chunks/{chunk-23MIH7SN.js → chunk-FIXRGPUT.js} +1 -1
  31. package/dist-cli/chunks/{chunk-EAXYIY5U.js → chunk-GK7PGYFH.js} +1 -1
  32. package/dist-cli/chunks/{chunk-BPYGMBOL.js → chunk-GZEUDDAW.js} +2 -2
  33. package/dist-cli/chunks/{chunk-WIV5YAQT.js → chunk-HIDS3PYC.js} +2 -2
  34. package/dist-cli/chunks/{chunk-WYD5DEEU.js → chunk-IWPS3EKJ.js} +2 -2
  35. package/dist-cli/chunks/{chunk-5N5BWVZK.js → chunk-J66US2OZ.js} +1 -1
  36. package/dist-cli/chunks/{chunk-MM2XAXTN.js → chunk-JAFF4RAU.js} +1 -1
  37. package/dist-cli/chunks/{chunk-GKKO7RE2.js → chunk-JRPU5TFI.js} +3 -3
  38. package/dist-cli/chunks/{chunk-ZSLOAO3P.js → chunk-M5KJCLUW.js} +3 -3
  39. package/dist-cli/chunks/{chunk-4ZGUXZ6U.js → chunk-MACI34ST.js} +3 -3
  40. package/dist-cli/chunks/chunk-MCHKBFUL.js +4 -0
  41. package/dist-cli/chunks/{chunk-42O6RKCS.js → chunk-MR3YPNUI.js} +2 -2
  42. package/dist-cli/chunks/{chunk-QXBFDUCQ.js → chunk-MRNW4GVL.js} +2 -2
  43. package/dist-cli/chunks/{chunk-VXN2HAHP.js → chunk-NEH4T67X.js} +2 -2
  44. package/dist-cli/chunks/{chunk-ZCHCE6WJ.js → chunk-O2ORLK6W.js} +2 -2
  45. package/dist-cli/chunks/{chunk-KWFRIVXW.js → chunk-O6P4N2JD.js} +2 -2
  46. package/dist-cli/chunks/{chunk-BWTDQWRB.js → chunk-OSZ5HZSI.js} +2 -2
  47. package/dist-cli/chunks/{chunk-HJN6LXR5.js → chunk-QIQL7Y5V.js} +2 -2
  48. package/dist-cli/chunks/{chunk-LV4BJLQU.js → chunk-R4FQZXJC.js} +2 -2
  49. package/dist-cli/chunks/{chunk-74RRQIWF.js → chunk-RI3NS77J.js} +1 -1
  50. package/dist-cli/chunks/{chunk-BAPVTWIM.js → chunk-TKCGP3DD.js} +2 -2
  51. package/dist-cli/chunks/{chunk-S6CNNXSR.js → chunk-TULWPOAY.js} +2 -2
  52. package/dist-cli/chunks/{chunk-FADHHMJU.js → chunk-UR345KM3.js} +2 -2
  53. package/dist-cli/chunks/{chunk-IY2WWLFH.js → chunk-W3UIDI3W.js} +2 -2
  54. package/dist-cli/chunks/{chunk-FNVWTY57.js → chunk-WGNDJARS.js} +1 -1
  55. package/dist-cli/chunks/{chunk-XYPCBRGY.js → chunk-X5ZOZVHC.js} +1 -1
  56. package/dist-cli/chunks/{chunk-HGPDQPIG.js → chunk-XKRUNS7A.js} +2 -2
  57. package/dist-cli/chunks/{chunk-FAWMDCMJ.js → chunk-XPOTXF5Q.js} +2 -2
  58. package/dist-cli/chunks/{chunk-WPXQ7CNQ.js → chunk-XR4KID25.js} +2 -2
  59. package/dist-cli/chunks/{chunk-AGUR7LE7.js → chunk-XRO5WQXP.js} +1 -1
  60. package/dist-cli/chunks/{chunk-YSLE3K2S.js → chunk-XXNPISER.js} +2 -2
  61. package/dist-cli/chunks/{chunk-PH4W36KI.js → chunk-YE3M3YD4.js} +3 -3
  62. package/dist-cli/chunks/{chunk-46BMZYP7.js → chunk-ZCP4CRP6.js} +2 -2
  63. package/dist-cli/chunks/{chunk-KJ5SZIXX.js → chunk-ZGD7GZRI.js} +2 -2
  64. package/dist-cli/chunks/{chunk-2IVWNQDE.js → chunk-ZGH5U4AJ.js} +2 -2
  65. package/dist-cli/chunks/{chunk-4CMRJ7UX.js → chunk-ZTWUNK45.js} +2 -2
  66. package/dist-cli/chunks/{cleanup-ZVQLJLTY.js → cleanup-G4TEYVKY.js} +2 -2
  67. package/dist-cli/chunks/cli-version-ZM3PVKQ5.js +4 -0
  68. package/dist-cli/chunks/{compat-7T2VZZDL.js → compat-EZ5NP32J.js} +2 -2
  69. package/dist-cli/chunks/{config-E7OULENQ.js → config-27M2DGCS.js} +2 -2
  70. package/dist-cli/chunks/{control-X5O5UXPP.js → control-4QR43FXV.js} +2 -2
  71. package/dist-cli/chunks/daemon-2U4CJ6AT.js +4 -0
  72. package/dist-cli/chunks/{debug-LK6GRYHR.js → debug-EXU3D7PC.js} +3 -3
  73. package/dist-cli/chunks/{desktop-2LAHHUP6.js → desktop-SHHPZAWQ.js} +3 -3
  74. package/dist-cli/chunks/{detox-7GF6V6E6.js → detox-RQ6FFSBS.js} +2 -2
  75. package/dist-cli/chunks/{device-G3IF4IRA.js → device-4NI26HG6.js} +2 -2
  76. package/dist-cli/chunks/{diagnose-6G2RJWVP.js → diagnose-P4SFXH6J.js} +2 -2
  77. package/dist-cli/chunks/{disk-cleanup-PRAJROKV.js → disk-cleanup-BUAKWYMY.js} +2 -2
  78. package/dist-cli/chunks/drivers-OVCUPQTM.js +4 -0
  79. package/dist-cli/chunks/{film-CGVAWXPR.js → film-Y2BAQINB.js} +3 -3
  80. package/dist-cli/chunks/flow-ELTLKKZ3.js +4 -0
  81. package/dist-cli/chunks/help-CDEZAG2L.js +4 -0
  82. package/dist-cli/chunks/{hidden-runtime-alias-FCDWZQM3.js → hidden-runtime-alias-U2MAY2XV.js} +2 -2
  83. package/dist-cli/chunks/{home-paths-JEUBFYPY.js → home-paths-PAJMZCOS.js} +2 -2
  84. package/dist-cli/chunks/inspect-VVQRPJLS.js +4 -0
  85. package/dist-cli/chunks/install-desktop-YXSRKR35.js +4 -0
  86. package/dist-cli/chunks/{login-HBPZL3QX.js → login-D53XKBEO.js} +2 -2
  87. package/dist-cli/chunks/{logout-SVBZGGEI.js → logout-HZQKLNUJ.js} +2 -2
  88. package/dist-cli/chunks/{maestro-445CMWSH.js → maestro-XSS2KX6L.js} +3 -3
  89. package/dist-cli/chunks/{maestro-generate-4JWKONR2.js → maestro-generate-DNDQX3JQ.js} +3 -3
  90. package/dist-cli/chunks/{mode-M6GVNTDZ.js → mode-LEVGOKI3.js} +2 -2
  91. package/dist-cli/chunks/{optional-demo-registry-Q5CATNHD.js → optional-demo-registry-2XZIJNDG.js} +2 -2
  92. package/dist-cli/chunks/{perf-MBNYDE6X.js → perf-OKMAXDLB.js} +2 -2
  93. package/dist-cli/chunks/{permissions-HNLQIZJD.js → permissions-VG5TBUTN.js} +2 -2
  94. package/dist-cli/chunks/privacy-MNRHREME.js +4 -0
  95. package/dist-cli/chunks/{record-MH3BLHON.js → record-BQYGZOMV.js} +3 -3
  96. package/dist-cli/chunks/{report-issue-6HQHCFBG.js → report-issue-HCPZESWE.js} +2 -2
  97. package/dist-cli/chunks/reset-R4E4W4YI.js +4 -0
  98. package/dist-cli/chunks/runtime-XRQZ7W34.js +4 -0
  99. package/dist-cli/chunks/{screenshot-command-D6VS6GDA.js → screenshot-command-DWEYPJE7.js} +3 -3
  100. package/dist-cli/chunks/{screenshot-layers-MC7JHOO2.js → screenshot-layers-5GMBXLO7.js} +2 -2
  101. package/dist-cli/chunks/{screenshots-capture-PUQTDG5I.js → screenshots-capture-5KCI7IZD.js} +2 -2
  102. package/dist-cli/chunks/serve-QNKTA2HR.js +56 -0
  103. package/dist-cli/chunks/setup-RNMM5GO5.js +4 -0
  104. package/dist-cli/chunks/{skills-IJDXM6IC.js → skills-DOEALD3X.js} +2 -2
  105. package/dist-cli/chunks/{state-KCBXBFZZ.js → state-3HH2IHIF.js} +2 -2
  106. package/dist-cli/chunks/{storage-RBYDWRJC.js → storage-E7WUWN3E.js} +2 -2
  107. package/dist-cli/chunks/store-HUPZUCFG.js +4 -0
  108. package/dist-cli/chunks/telemetry-IJ53XR2Y.js +4 -0
  109. package/dist-cli/chunks/{timeline-RPEEEB3A.js → timeline-IKNUGQ2A.js} +2 -2
  110. package/dist-cli/chunks/{upgrade-TFLWCW3P.js → upgrade-VS3OKXE2.js} +2 -2
  111. package/dist-cli/chunks/upload-A57NAAHF.js +4 -0
  112. package/dist-cli/chunks/{version-LHPE2VT4.js → version-F4XHNTBZ.js} +2 -2
  113. package/dist-cli/chunks/{web-QJ74GCNZ.js → web-F72724QL.js} +2 -2
  114. package/dist-cli/chunks/welcome-B72RRMBW.js +5 -0
  115. package/dist-cli/chunks/{what-happened-JXBBC5U7.js → what-happened-APK7YKOV.js} +2 -2
  116. package/dist-lib/agent-daemon-client.cjs +1 -1
  117. package/dist-lib/agent-events.cjs +1 -1
  118. package/dist-lib/agent-identity.cjs +1 -1
  119. package/dist-lib/agent-sessions.cjs +1 -1
  120. package/dist-lib/attached-projects.cjs +1 -1
  121. package/dist-lib/auth/shared-session.cjs +1 -1
  122. package/dist-lib/backend-origin.cjs +1 -1
  123. package/dist-lib/beta.cjs +1 -1
  124. package/dist-lib/beta.mjs +1 -1
  125. package/dist-lib/bridge-constants.cjs +1 -1
  126. package/dist-lib/bridge-contract.cjs +1 -1
  127. package/dist-lib/cli-constants.cjs +1 -1
  128. package/dist-lib/config.cjs +1 -1
  129. package/dist-lib/detox/index.cjs +1 -1
  130. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  131. package/dist-lib/home-paths.cjs +1 -1
  132. package/dist-lib/host/bridge-host.cjs +89 -154
  133. package/dist-lib/host/fetch-proxy-handler.cjs +36 -3
  134. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  135. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  136. package/dist-lib/host/replacement-module-handler.cjs +60 -107
  137. package/dist-lib/host/websocket-proxy.cjs +1 -1
  138. package/dist-lib/index.cjs +60 -105
  139. package/dist-lib/jump-to-source-babel.cjs +1 -1
  140. package/dist-lib/menu.cjs +1 -1
  141. package/dist-lib/menu.mjs +1 -1
  142. package/dist-lib/metro-production-bundle.cjs +1 -1
  143. package/dist-lib/metro-production-bundle.mjs +1 -1
  144. package/dist-lib/metro.cjs +60 -105
  145. package/dist-lib/profiles.cjs +1 -1
  146. package/dist-lib/public-brand.cjs +1 -1
  147. package/dist-lib/react-native-host-modules.cjs +1 -1
  148. package/dist-lib/react-native-host-modules.mjs +1 -1
  149. package/dist-lib/render-mode.cjs +1 -1
  150. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  151. package/dist-lib/sdk.cjs +1 -1
  152. package/dist-lib/sdk.mjs +1 -1
  153. package/dist-lib/skills.cjs +126 -189
  154. package/dist-lib/vite.cjs +59 -104
  155. package/package.json +1 -1
  156. package/src/host/bridge-host.ts +2 -50
  157. package/src/host/fetch-proxy-handler.ts +40 -3
  158. package/src/host/replacement-module-handler.ts +65 -117
  159. package/dist-cli/chunks/app-fonts-7B5E7UDM.js +0 -4
  160. package/dist-cli/chunks/chunk-FQGTATLA.js +0 -4
  161. package/dist-cli/chunks/cli-version-KAVMACHT.js +0 -4
  162. package/dist-cli/chunks/daemon-GEDFARBC.js +0 -4
  163. package/dist-cli/chunks/drivers-4WSF4T4I.js +0 -4
  164. package/dist-cli/chunks/flow-MEDCS46T.js +0 -4
  165. package/dist-cli/chunks/help-KOAHGOH4.js +0 -4
  166. package/dist-cli/chunks/inspect-IU5HFVKF.js +0 -4
  167. package/dist-cli/chunks/install-desktop-5Q2WB4QO.js +0 -4
  168. package/dist-cli/chunks/privacy-UL6QT67W.js +0 -4
  169. package/dist-cli/chunks/reset-GHLOGMF3.js +0 -4
  170. package/dist-cli/chunks/runtime-JK43NPS6.js +0 -4
  171. package/dist-cli/chunks/serve-4UDVILST.js +0 -118
  172. package/dist-cli/chunks/setup-5IHFDPBA.js +0 -4
  173. package/dist-cli/chunks/store-O2PYGAXL.js +0 -4
  174. package/dist-cli/chunks/telemetry-B2CPDQID.js +0 -4
  175. package/dist-cli/chunks/upload-2GJWZG6R.js +0 -4
  176. package/dist-cli/chunks/welcome-5XJPBRJD.js +0 -5
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.365 | (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;
@@ -212,7 +212,6 @@ function isLoopbackHost(hostname) {
212
212
 
213
213
  // src/host/replacement-module-handler.ts
214
214
  var REPLACEMENT_MODULE_ROUTE = "/__sootsim-replacement-module";
215
- var REPLACEMENT_RUNTIME_PREFIX = "/__sootsim-replacement-runtime";
216
215
  function getReplacementLoader(filePath) {
217
216
  const ext = import_node_path2.default.extname(filePath).toLowerCase();
218
217
  switch (ext) {
@@ -228,88 +227,6 @@ function getReplacementLoader(filePath) {
228
227
  return null;
229
228
  }
230
229
  }
231
- function reactRuntimeSource(reactBridgeUrl) {
232
- if (reactBridgeUrl) {
233
- return `export * from ${JSON.stringify(reactBridgeUrl)};
234
- import React from ${JSON.stringify(reactBridgeUrl)};
235
- export default React;
236
- `;
237
- }
238
- return `const bridge = globalThis.__sootsim_react_bridge
239
- if (!bridge) throw new Error('[rnx] replacement React bridge is not ready')
240
- export default bridge.default
241
- export const Activity = bridge.Activity
242
- export const Children = bridge.Children
243
- export const Component = bridge.Component
244
- export const Fragment = bridge.Fragment
245
- export const Profiler = bridge.Profiler
246
- export const PureComponent = bridge.PureComponent
247
- export const StrictMode = bridge.StrictMode
248
- export const Suspense = bridge.Suspense
249
- export const __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = bridge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
250
- export const __COMPILER_RUNTIME = bridge.__COMPILER_RUNTIME
251
- export const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = bridge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
252
- export const act = bridge.act
253
- export const cache = bridge.cache
254
- export const cacheSignal = bridge.cacheSignal
255
- export const captureOwnerStack = bridge.captureOwnerStack
256
- export const cloneElement = bridge.cloneElement
257
- export const createContext = bridge.createContext
258
- export const createElement = bridge.createElement
259
- export const createRef = bridge.createRef
260
- export const forwardRef = bridge.forwardRef
261
- export const isValidElement = bridge.isValidElement
262
- export const lazy = bridge.lazy
263
- export const memo = bridge.memo
264
- export const startTransition = bridge.startTransition
265
- export const unstable_useCacheRefresh = bridge.unstable_useCacheRefresh
266
- export const use = bridge.use
267
- export const useActionState = bridge.useActionState
268
- export const useCallback = bridge.useCallback
269
- export const useContext = bridge.useContext
270
- export const useDebugValue = bridge.useDebugValue
271
- export const useDeferredValue = bridge.useDeferredValue
272
- export const useEffect = bridge.useEffect
273
- export const useEffectEvent = bridge.useEffectEvent
274
- export const useId = bridge.useId
275
- export const useImperativeHandle = bridge.useImperativeHandle
276
- export const useInsertionEffect = bridge.useInsertionEffect
277
- export const useLayoutEffect = bridge.useLayoutEffect
278
- export const useMemo = bridge.useMemo
279
- export const useOptimistic = bridge.useOptimistic
280
- export const useReducer = bridge.useReducer
281
- export const useRef = bridge.useRef
282
- export const useState = bridge.useState
283
- export const useSyncExternalStore = bridge.useSyncExternalStore
284
- export const useTransition = bridge.useTransition
285
- export const version = bridge.version
286
- `;
287
- }
288
- function reactNativeRuntimeSource() {
289
- return `const rn = globalThis.__sootsim_components__ || {}
290
- export default rn
291
- export const View = rn.View
292
- export const Text = rn.Text
293
- export const Image = rn.Image
294
- export const ScrollView = rn.ScrollView
295
- export const FlatList = rn.FlatList
296
- export const Pressable = rn.Pressable
297
- export const TouchableOpacity = rn.TouchableOpacity
298
- export const TouchableWithoutFeedback = rn.TouchableWithoutFeedback
299
- export const TouchableHighlight = rn.TouchableHighlight
300
- export const TextInput = rn.TextInput
301
- export const ActivityIndicator = rn.ActivityIndicator
302
- export const KeyboardAvoidingView = rn.KeyboardAvoidingView
303
- export const Button = rn.Button
304
- export const Modal = rn.Modal
305
- export const Switch = rn.Switch
306
- export const StyleSheet = rn.StyleSheet
307
- export const Platform = rn.Platform
308
- export const Keyboard = rn.Keyboard
309
- export const Dimensions = rn.Dimensions
310
- export const Appearance = rn.Appearance
311
- `;
312
- }
313
230
  function sendJavaScript(req, res, source) {
314
231
  const origin = req.headers.origin;
315
232
  let allowedOrigin;
@@ -330,7 +247,7 @@ function isReplacementModuleRequestUrl(rawUrl) {
330
247
  if (!rawUrl) return false;
331
248
  try {
332
249
  const pathname = new URL(rawUrl, "http://rnx.local").pathname;
333
- return pathname === REPLACEMENT_MODULE_ROUTE || pathname.startsWith(`${REPLACEMENT_RUNTIME_PREFIX}/`);
250
+ return pathname === REPLACEMENT_MODULE_ROUTE;
334
251
  } catch {
335
252
  return false;
336
253
  }
@@ -360,14 +277,6 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
360
277
  return true;
361
278
  }
362
279
  }
363
- if (url.pathname === `${REPLACEMENT_RUNTIME_PREFIX}/react`) {
364
- sendJavaScript(req, res, reactRuntimeSource(options.reactBridgeUrl));
365
- return true;
366
- }
367
- if (url.pathname === `${REPLACEMENT_RUNTIME_PREFIX}/react-native`) {
368
- sendJavaScript(req, res, reactNativeRuntimeSource());
369
- return true;
370
- }
371
280
  if (url.pathname !== REPLACEMENT_MODULE_ROUTE) return false;
372
281
  if (options.requestToken && url.searchParams.get("token") !== options.requestToken) {
373
282
  res.writeHead(403, { "Content-Type": "text/plain; charset=utf-8" });
@@ -391,6 +300,7 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
391
300
  res.end("replacement file path must be absolute");
392
301
  return true;
393
302
  }
303
+ const runtimePackages = new Set(url.searchParams.getAll("runtimePackage"));
394
304
  let resolvedProjectRoot;
395
305
  if (options.projectRoot) {
396
306
  const lexicalProjectRoot = import_node_path2.default.resolve(options.projectRoot);
@@ -433,19 +343,64 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
433
343
  tsconfigRaw: { compilerOptions: { jsx: "react" } },
434
344
  sourcemap: "inline",
435
345
  logLevel: "silent",
436
- external: ["react", "react-native"]
346
+ plugins: [
347
+ {
348
+ name: "sootsim-replacement-runtime",
349
+ setup(runtimeBuild) {
350
+ runtimeBuild.onResolve(
351
+ {
352
+ filter: /^(react|react-native|react\/jsx-runtime|react\/jsx-dev-runtime)$/
353
+ },
354
+ (args) => ({ path: args.path, namespace: "sootsim-replacement-runtime" })
355
+ );
356
+ runtimeBuild.onResolve(
357
+ { filter: /.*/ },
358
+ (args) => runtimePackages.has(args.path) ? { path: args.path, namespace: "sootsim-replacement-runtime" } : void 0
359
+ );
360
+ runtimeBuild.onLoad(
361
+ { filter: /.*/, namespace: "sootsim-replacement-runtime" },
362
+ (args) => {
363
+ if (args.path === "react-native") {
364
+ return {
365
+ contents: `const bridge = globalThis.__sootsim_components__
366
+ if (!bridge) throw new Error('[rnx] replacement React Native bridge is not ready')
367
+ module.exports = bridge`,
368
+ loader: "js"
369
+ };
370
+ }
371
+ if (args.path === "react") {
372
+ return {
373
+ contents: `const bridge = globalThis.__sootsim_react_bridge
374
+ if (!bridge) throw new Error('[rnx] replacement React bridge is not ready')
375
+ module.exports = bridge`,
376
+ loader: "js"
377
+ };
378
+ }
379
+ if (args.path !== "react/jsx-runtime" && args.path !== "react/jsx-dev-runtime") {
380
+ return {
381
+ contents: `const packages = globalThis.__sootsim_config_package_modules
382
+ const bridge = packages?.[${JSON.stringify(args.path)}]
383
+ if (!bridge) throw new Error(${JSON.stringify(`[rnx] replacement package bridge ${args.path} is not ready`)})
384
+ module.exports = bridge`,
385
+ loader: "js"
386
+ };
387
+ }
388
+ return {
389
+ contents: `const React = globalThis.__sootsim_react_bridge
390
+ if (!React) throw new Error('[rnx] replacement React bridge is not ready')
391
+ exports.Fragment = React.Fragment
392
+ exports.jsx = (type, props, key) => React.createElement(type, key === undefined ? props : { ...props, key })
393
+ exports.jsxs = exports.jsx
394
+ exports.jsxDEV = exports.jsx`,
395
+ loader: "js"
396
+ };
397
+ }
398
+ );
399
+ }
400
+ }
401
+ ]
437
402
  });
438
- const bundledCode = result.outputFiles[0]?.text ?? "";
439
- const hasReactBinding = /\bimport\s+(?:\*\s+as\s+React|React(?:\s*,|\s+from)|\{[^}]*\bdefault\s+as\s+React\b)/.test(
440
- bundledCode
441
- );
442
- const reactImport = /\bReact\.(?:createElement|Fragment)\b/.test(bundledCode) && !hasReactBinding ? `import * as React from '${REPLACEMENT_RUNTIME_PREFIX}/react';
443
- ` : "";
444
- const runtimeCode = (reactImport + bundledCode).replace(
445
- /from\s*["']react-native["']/g,
446
- `from '${REPLACEMENT_RUNTIME_PREFIX}/react-native'`
447
- ).replace(/from\s*["']react["']/g, `from '${REPLACEMENT_RUNTIME_PREFIX}/react'`);
448
- sendJavaScript(req, res, runtimeCode);
403
+ sendJavaScript(req, res, result.outputFiles[0]?.text ?? "");
449
404
  } catch (error) {
450
405
  const message = error instanceof Error ? error.message : String(error);
451
406
  res.writeHead(500, { "Content-Type": "text/plain; charset=utf-8" });
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.365 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.365 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.365 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/react-native-host-modules.ts
4
4
  var REACT_NATIVE_PASSTHROUGH_SPECIFIERS = [
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.365 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.365 | (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;
package/dist-lib/sdk.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.365 | (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/sdk.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.363 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.365 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);