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.
- package/cli/outbound-endpoints.ts +2 -6
- package/dist-cli/bin.js +5 -5
- package/dist-cli/chunks/{agent-EN7USQWO.js → agent-BVMNQFKF.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-4K2P2EBF.js → agent-wrapper-B6YFXGC3.js} +2 -2
- package/dist-cli/chunks/app-fonts-MEI6R6XR.js +4 -0
- package/dist-cli/chunks/{assert-WEQDRDJ2.js → assert-JGHI53HV.js} +2 -2
- package/dist-cli/chunks/{auth-U5GBY5SE.js → auth-STEOXUS7.js} +2 -2
- package/dist-cli/chunks/{beta-WOKLQLOJ.js → beta-HT3FLS5T.js} +2 -2
- package/dist-cli/chunks/{camera-GRMP2HT3.js → camera-ZCLFSLON.js} +2 -2
- package/dist-cli/chunks/{chunk-TIZP26F4.js → chunk-25BTVHK2.js} +2 -2
- package/dist-cli/chunks/{chunk-YFF6YFYJ.js → chunk-2CXHDTQ5.js} +1 -1
- package/dist-cli/chunks/{chunk-TK4ZQQAL.js → chunk-2JFZ5Z7Q.js} +1 -1
- package/dist-cli/chunks/{chunk-QVUS7OHN.js → chunk-2SFMW5K6.js} +1 -1
- package/dist-cli/chunks/{chunk-6BGR523F.js → chunk-4WFN4DFR.js} +2 -2
- package/dist-cli/chunks/{chunk-4QK74NWP.js → chunk-52ES4API.js} +2 -2
- package/dist-cli/chunks/{chunk-FFWDCXTD.js → chunk-5AS7S6HY.js} +2 -2
- package/dist-cli/chunks/{chunk-SIKPB3GL.js → chunk-5VHWQGGF.js} +1 -1
- package/dist-cli/chunks/{chunk-GLYEL265.js → chunk-622E4JET.js} +1 -1
- package/dist-cli/chunks/{chunk-DK764ET6.js → chunk-67ATAITF.js} +2 -2
- package/dist-cli/chunks/{chunk-2AELGO56.js → chunk-6BAF6GFS.js} +1 -1
- package/dist-cli/chunks/{chunk-ZSFETJZV.js → chunk-BGRGP3QR.js} +1 -1
- package/dist-cli/chunks/{chunk-7CT75XQF.js → chunk-CYIE65QN.js} +1 -1
- package/dist-cli/chunks/{chunk-PDGEVGHU.js → chunk-DBJZUCFP.js} +2 -2
- package/dist-cli/chunks/{chunk-KCHXGTYQ.js → chunk-DQFOHIRF.js} +1 -1
- package/dist-cli/chunks/{chunk-MOC4QX3B.js → chunk-EAFKG5R3.js} +2 -2
- package/dist-cli/chunks/{chunk-DFL5AISK.js → chunk-EFL2ASZO.js} +1 -1
- package/dist-cli/chunks/{chunk-GMW6T2K6.js → chunk-EFXNSJ55.js} +2 -2
- package/dist-cli/chunks/{chunk-NUU3SWLR.js → chunk-EVBQDQVY.js} +1 -1
- package/dist-cli/chunks/{chunk-X2ITJOHZ.js → chunk-FHWZPUGC.js} +1 -1
- package/dist-cli/chunks/{chunk-23MIH7SN.js → chunk-FIXRGPUT.js} +1 -1
- package/dist-cli/chunks/{chunk-EAXYIY5U.js → chunk-GK7PGYFH.js} +1 -1
- package/dist-cli/chunks/{chunk-BPYGMBOL.js → chunk-GZEUDDAW.js} +2 -2
- package/dist-cli/chunks/{chunk-WIV5YAQT.js → chunk-HIDS3PYC.js} +2 -2
- package/dist-cli/chunks/{chunk-WYD5DEEU.js → chunk-IWPS3EKJ.js} +2 -2
- package/dist-cli/chunks/{chunk-5N5BWVZK.js → chunk-J66US2OZ.js} +1 -1
- package/dist-cli/chunks/{chunk-MM2XAXTN.js → chunk-JAFF4RAU.js} +1 -1
- package/dist-cli/chunks/{chunk-GKKO7RE2.js → chunk-JRPU5TFI.js} +3 -3
- package/dist-cli/chunks/{chunk-ZSLOAO3P.js → chunk-M5KJCLUW.js} +3 -3
- package/dist-cli/chunks/{chunk-4ZGUXZ6U.js → chunk-MACI34ST.js} +3 -3
- package/dist-cli/chunks/chunk-MCHKBFUL.js +4 -0
- package/dist-cli/chunks/{chunk-42O6RKCS.js → chunk-MR3YPNUI.js} +2 -2
- package/dist-cli/chunks/{chunk-QXBFDUCQ.js → chunk-MRNW4GVL.js} +2 -2
- package/dist-cli/chunks/{chunk-VXN2HAHP.js → chunk-NEH4T67X.js} +2 -2
- package/dist-cli/chunks/{chunk-ZCHCE6WJ.js → chunk-O2ORLK6W.js} +2 -2
- package/dist-cli/chunks/{chunk-KWFRIVXW.js → chunk-O6P4N2JD.js} +2 -2
- package/dist-cli/chunks/{chunk-BWTDQWRB.js → chunk-OSZ5HZSI.js} +2 -2
- package/dist-cli/chunks/{chunk-HJN6LXR5.js → chunk-QIQL7Y5V.js} +2 -2
- package/dist-cli/chunks/{chunk-LV4BJLQU.js → chunk-R4FQZXJC.js} +2 -2
- package/dist-cli/chunks/{chunk-74RRQIWF.js → chunk-RI3NS77J.js} +1 -1
- package/dist-cli/chunks/{chunk-BAPVTWIM.js → chunk-TKCGP3DD.js} +2 -2
- package/dist-cli/chunks/{chunk-S6CNNXSR.js → chunk-TULWPOAY.js} +2 -2
- package/dist-cli/chunks/{chunk-FADHHMJU.js → chunk-UR345KM3.js} +2 -2
- package/dist-cli/chunks/{chunk-IY2WWLFH.js → chunk-W3UIDI3W.js} +2 -2
- package/dist-cli/chunks/{chunk-FNVWTY57.js → chunk-WGNDJARS.js} +1 -1
- package/dist-cli/chunks/{chunk-XYPCBRGY.js → chunk-X5ZOZVHC.js} +1 -1
- package/dist-cli/chunks/{chunk-HGPDQPIG.js → chunk-XKRUNS7A.js} +2 -2
- package/dist-cli/chunks/{chunk-FAWMDCMJ.js → chunk-XPOTXF5Q.js} +2 -2
- package/dist-cli/chunks/{chunk-WPXQ7CNQ.js → chunk-XR4KID25.js} +2 -2
- package/dist-cli/chunks/{chunk-AGUR7LE7.js → chunk-XRO5WQXP.js} +1 -1
- package/dist-cli/chunks/{chunk-YSLE3K2S.js → chunk-XXNPISER.js} +2 -2
- package/dist-cli/chunks/{chunk-PH4W36KI.js → chunk-YE3M3YD4.js} +3 -3
- package/dist-cli/chunks/{chunk-46BMZYP7.js → chunk-ZCP4CRP6.js} +2 -2
- package/dist-cli/chunks/{chunk-KJ5SZIXX.js → chunk-ZGD7GZRI.js} +2 -2
- package/dist-cli/chunks/{chunk-2IVWNQDE.js → chunk-ZGH5U4AJ.js} +2 -2
- package/dist-cli/chunks/{chunk-4CMRJ7UX.js → chunk-ZTWUNK45.js} +2 -2
- package/dist-cli/chunks/{cleanup-ZVQLJLTY.js → cleanup-G4TEYVKY.js} +2 -2
- package/dist-cli/chunks/cli-version-ZM3PVKQ5.js +4 -0
- package/dist-cli/chunks/{compat-7T2VZZDL.js → compat-EZ5NP32J.js} +2 -2
- package/dist-cli/chunks/{config-E7OULENQ.js → config-27M2DGCS.js} +2 -2
- package/dist-cli/chunks/{control-X5O5UXPP.js → control-4QR43FXV.js} +2 -2
- package/dist-cli/chunks/daemon-2U4CJ6AT.js +4 -0
- package/dist-cli/chunks/{debug-LK6GRYHR.js → debug-EXU3D7PC.js} +3 -3
- package/dist-cli/chunks/{desktop-2LAHHUP6.js → desktop-SHHPZAWQ.js} +3 -3
- package/dist-cli/chunks/{detox-7GF6V6E6.js → detox-RQ6FFSBS.js} +2 -2
- package/dist-cli/chunks/{device-G3IF4IRA.js → device-4NI26HG6.js} +2 -2
- package/dist-cli/chunks/{diagnose-6G2RJWVP.js → diagnose-P4SFXH6J.js} +2 -2
- package/dist-cli/chunks/{disk-cleanup-PRAJROKV.js → disk-cleanup-BUAKWYMY.js} +2 -2
- package/dist-cli/chunks/drivers-OVCUPQTM.js +4 -0
- package/dist-cli/chunks/{film-CGVAWXPR.js → film-Y2BAQINB.js} +3 -3
- package/dist-cli/chunks/flow-ELTLKKZ3.js +4 -0
- package/dist-cli/chunks/help-CDEZAG2L.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-FCDWZQM3.js → hidden-runtime-alias-U2MAY2XV.js} +2 -2
- package/dist-cli/chunks/{home-paths-JEUBFYPY.js → home-paths-PAJMZCOS.js} +2 -2
- package/dist-cli/chunks/inspect-VVQRPJLS.js +4 -0
- package/dist-cli/chunks/install-desktop-YXSRKR35.js +4 -0
- package/dist-cli/chunks/{login-HBPZL3QX.js → login-D53XKBEO.js} +2 -2
- package/dist-cli/chunks/{logout-SVBZGGEI.js → logout-HZQKLNUJ.js} +2 -2
- package/dist-cli/chunks/{maestro-445CMWSH.js → maestro-XSS2KX6L.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-4JWKONR2.js → maestro-generate-DNDQX3JQ.js} +3 -3
- package/dist-cli/chunks/{mode-M6GVNTDZ.js → mode-LEVGOKI3.js} +2 -2
- package/dist-cli/chunks/{optional-demo-registry-Q5CATNHD.js → optional-demo-registry-2XZIJNDG.js} +2 -2
- package/dist-cli/chunks/{perf-MBNYDE6X.js → perf-OKMAXDLB.js} +2 -2
- package/dist-cli/chunks/{permissions-HNLQIZJD.js → permissions-VG5TBUTN.js} +2 -2
- package/dist-cli/chunks/privacy-MNRHREME.js +4 -0
- package/dist-cli/chunks/{record-MH3BLHON.js → record-BQYGZOMV.js} +3 -3
- package/dist-cli/chunks/{report-issue-6HQHCFBG.js → report-issue-HCPZESWE.js} +2 -2
- package/dist-cli/chunks/reset-R4E4W4YI.js +4 -0
- package/dist-cli/chunks/runtime-XRQZ7W34.js +4 -0
- package/dist-cli/chunks/{screenshot-command-D6VS6GDA.js → screenshot-command-DWEYPJE7.js} +3 -3
- package/dist-cli/chunks/{screenshot-layers-MC7JHOO2.js → screenshot-layers-5GMBXLO7.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-PUQTDG5I.js → screenshots-capture-5KCI7IZD.js} +2 -2
- package/dist-cli/chunks/serve-QNKTA2HR.js +56 -0
- package/dist-cli/chunks/setup-RNMM5GO5.js +4 -0
- package/dist-cli/chunks/{skills-IJDXM6IC.js → skills-DOEALD3X.js} +2 -2
- package/dist-cli/chunks/{state-KCBXBFZZ.js → state-3HH2IHIF.js} +2 -2
- package/dist-cli/chunks/{storage-RBYDWRJC.js → storage-E7WUWN3E.js} +2 -2
- package/dist-cli/chunks/store-HUPZUCFG.js +4 -0
- package/dist-cli/chunks/telemetry-IJ53XR2Y.js +4 -0
- package/dist-cli/chunks/{timeline-RPEEEB3A.js → timeline-IKNUGQ2A.js} +2 -2
- package/dist-cli/chunks/{upgrade-TFLWCW3P.js → upgrade-VS3OKXE2.js} +2 -2
- package/dist-cli/chunks/upload-A57NAAHF.js +4 -0
- package/dist-cli/chunks/{version-LHPE2VT4.js → version-F4XHNTBZ.js} +2 -2
- package/dist-cli/chunks/{web-QJ74GCNZ.js → web-F72724QL.js} +2 -2
- package/dist-cli/chunks/welcome-B72RRMBW.js +5 -0
- package/dist-cli/chunks/{what-happened-JXBBC5U7.js → what-happened-APK7YKOV.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract.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 +89 -154
- package/dist-lib/host/fetch-proxy-handler.cjs +36 -3
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +60 -107
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +60 -105
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +60 -105
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +126 -189
- package/dist-lib/vite.cjs +59 -104
- package/package.json +1 -1
- package/src/host/bridge-host.ts +2 -50
- package/src/host/fetch-proxy-handler.ts +40 -3
- package/src/host/replacement-module-handler.ts +65 -117
- package/dist-cli/chunks/app-fonts-7B5E7UDM.js +0 -4
- package/dist-cli/chunks/chunk-FQGTATLA.js +0 -4
- package/dist-cli/chunks/cli-version-KAVMACHT.js +0 -4
- package/dist-cli/chunks/daemon-GEDFARBC.js +0 -4
- package/dist-cli/chunks/drivers-4WSF4T4I.js +0 -4
- package/dist-cli/chunks/flow-MEDCS46T.js +0 -4
- package/dist-cli/chunks/help-KOAHGOH4.js +0 -4
- package/dist-cli/chunks/inspect-IU5HFVKF.js +0 -4
- package/dist-cli/chunks/install-desktop-5Q2WB4QO.js +0 -4
- package/dist-cli/chunks/privacy-UL6QT67W.js +0 -4
- package/dist-cli/chunks/reset-GHLOGMF3.js +0 -4
- package/dist-cli/chunks/runtime-JK43NPS6.js +0 -4
- package/dist-cli/chunks/serve-4UDVILST.js +0 -118
- package/dist-cli/chunks/setup-5IHFDPBA.js +0 -4
- package/dist-cli/chunks/store-O2PYGAXL.js +0 -4
- package/dist-cli/chunks/telemetry-B2CPDQID.js +0 -4
- package/dist-cli/chunks/upload-2GJWZG6R.js +0 -4
- package/dist-cli/chunks/welcome-5XJPBRJD.js +0 -5
package/dist-lib/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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" });
|
package/dist-lib/profiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
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.
|
|
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.
|
|
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/render-mode.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
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.
|
|
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.
|
|
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.
|
|
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);
|