rnxsim 0.1.338 → 0.1.340
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/app-config.ts +21 -1
- package/dist-cli/bin.js +5 -5
- package/dist-cli/chunks/{agent-G3HSUEJN.js → agent-DZRALHKK.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-ZENL34KG.js → agent-wrapper-FFCII533.js} +2 -2
- package/dist-cli/chunks/{app-fonts-NTEGG7VL.js → app-fonts-P5TIE2BI.js} +2 -2
- package/dist-cli/chunks/{assert-RHXGX3N6.js → assert-L6YWZZH7.js} +2 -2
- package/dist-cli/chunks/{auth-VTG6JRJU.js → auth-2QUOSD3D.js} +2 -2
- package/dist-cli/chunks/{beta-AJV7FIZT.js → beta-DSQASQV7.js} +2 -2
- package/dist-cli/chunks/{camera-AUFHAGV5.js → camera-KONNW6GF.js} +2 -2
- package/dist-cli/chunks/{chunk-OHBAH7R5.js → chunk-2C7MJXES.js} +1 -1
- package/dist-cli/chunks/{chunk-6XWHJHRR.js → chunk-2FT3GZ2P.js} +2 -2
- package/dist-cli/chunks/{chunk-ZFVOCM7E.js → chunk-3KDMR5FE.js} +2 -2
- package/dist-cli/chunks/{chunk-NWUML3LH.js → chunk-52LBSDBQ.js} +3 -3
- package/dist-cli/chunks/{chunk-ETGM26S2.js → chunk-5JKZGU2L.js} +1 -1
- package/dist-cli/chunks/{chunk-YYJRLMSR.js → chunk-5ULMLFND.js} +1 -1
- package/dist-cli/chunks/{chunk-3KNPTXSK.js → chunk-6HQ2CUG5.js} +1 -1
- package/dist-cli/chunks/{chunk-GGDORRTI.js → chunk-7IBTDBHW.js} +2 -2
- package/dist-cli/chunks/{chunk-T47EKPO2.js → chunk-AV323BT6.js} +2 -2
- package/dist-cli/chunks/{chunk-ZERYUNU4.js → chunk-AVGWPMGX.js} +1 -1
- package/dist-cli/chunks/{chunk-G3W7FC3J.js → chunk-AZWECMXO.js} +2 -2
- package/dist-cli/chunks/{chunk-OQVGMLDW.js → chunk-BCGO3XWB.js} +2 -2
- package/dist-cli/chunks/{chunk-63H3GSZP.js → chunk-CA3D6BWR.js} +2 -2
- package/dist-cli/chunks/{chunk-Q4NOTYIM.js → chunk-CKK6IEZD.js} +1 -1
- package/dist-cli/chunks/{chunk-6WP2UV2D.js → chunk-CKKJUPAA.js} +1 -1
- package/dist-cli/chunks/{chunk-7ISR3ZYK.js → chunk-CYAEO7E3.js} +2 -2
- package/dist-cli/chunks/{chunk-BQG5LZKW.js → chunk-DB4DBTM2.js} +2 -2
- package/dist-cli/chunks/{chunk-4D345WIF.js → chunk-DEK47I44.js} +3 -3
- package/dist-cli/chunks/{chunk-OK6SVPSL.js → chunk-DMAUBOZ2.js} +1 -1
- package/dist-cli/chunks/{chunk-VYRYAB3X.js → chunk-EZ2WX6EK.js} +3 -3
- package/dist-cli/chunks/{chunk-BK7DKLML.js → chunk-F4SGYRAP.js} +1 -1
- package/dist-cli/chunks/chunk-HWIUC6SX.js +4 -0
- package/dist-cli/chunks/{chunk-UOJDJDCM.js → chunk-J2EHW26I.js} +2 -2
- package/dist-cli/chunks/{chunk-XFELRGXJ.js → chunk-JJKRVEA6.js} +1 -1
- package/dist-cli/chunks/{chunk-OVPCCCEU.js → chunk-JRJDACNV.js} +2 -2
- package/dist-cli/chunks/{chunk-BQY3EZKT.js → chunk-JX5LGYG2.js} +2 -2
- package/dist-cli/chunks/{chunk-3FI5EY2N.js → chunk-L6FANSWV.js} +1 -1
- package/dist-cli/chunks/{chunk-N4PXLKEX.js → chunk-LQIMPJRD.js} +2 -2
- package/dist-cli/chunks/{chunk-AVPACXQK.js → chunk-LXED7YNR.js} +1 -1
- package/dist-cli/chunks/{chunk-MQFPZ7KI.js → chunk-M76E72WP.js} +2 -2
- package/dist-cli/chunks/{chunk-4MTCA7VV.js → chunk-MKFOWHFO.js} +1 -1
- package/dist-cli/chunks/{chunk-6QRPJ7QO.js → chunk-MXXR5IDW.js} +3 -3
- package/dist-cli/chunks/{chunk-5QAP5T2V.js → chunk-MYTUISZ3.js} +2 -2
- package/dist-cli/chunks/{chunk-MAPLEBCD.js → chunk-NAG3Y5BF.js} +1 -1
- package/dist-cli/chunks/{chunk-HJLU4FAF.js → chunk-NZVA5ZGD.js} +1 -1
- package/dist-cli/chunks/{chunk-SVMKZXCM.js → chunk-PH37P7G2.js} +2 -2
- package/dist-cli/chunks/{chunk-FJXYAQK6.js → chunk-PYZHCZFD.js} +2 -2
- package/dist-cli/chunks/{chunk-JR4ASV7X.js → chunk-QRHLTYK7.js} +2 -2
- package/dist-cli/chunks/{chunk-Q53GTRNP.js → chunk-RYXIRFY2.js} +2 -2
- package/dist-cli/chunks/{chunk-XYABVE4V.js → chunk-TAPZRN4C.js} +1 -1
- package/dist-cli/chunks/{chunk-D27DTXJU.js → chunk-TRGIXJN4.js} +2 -2
- package/dist-cli/chunks/{chunk-ABEKWF72.js → chunk-U4ZHMDGL.js} +1 -1
- package/dist-cli/chunks/{chunk-FRX3JK7N.js → chunk-UH2S5SLV.js} +2 -2
- package/dist-cli/chunks/{chunk-2PFMT5AC.js → chunk-UKKT5KM4.js} +2 -2
- package/dist-cli/chunks/{chunk-OF2LP2DA.js → chunk-UOK37RTL.js} +1 -1
- package/dist-cli/chunks/{chunk-YUX3I7IO.js → chunk-VP7D322G.js} +1 -1
- package/dist-cli/chunks/{chunk-DU3JBQ5L.js → chunk-W34ZT5MF.js} +2 -2
- package/dist-cli/chunks/{chunk-5RB27SUB.js → chunk-WRNCAZIB.js} +2 -2
- package/dist-cli/chunks/{chunk-XDIAP767.js → chunk-WRPLAFZP.js} +2 -2
- package/dist-cli/chunks/{chunk-5RSKW7VT.js → chunk-X5C3SLYU.js} +1 -1
- package/dist-cli/chunks/{chunk-AFJL467O.js → chunk-YNS55EN5.js} +2 -2
- package/dist-cli/chunks/{chunk-WN3NNF46.js → chunk-Z7ILCEXG.js} +2 -2
- package/dist-cli/chunks/{chunk-NBA5FHEJ.js → chunk-ZEU5RFAH.js} +2 -2
- package/dist-cli/chunks/{cleanup-FQMQ47H7.js → cleanup-BPGPA6WN.js} +2 -2
- package/dist-cli/chunks/cli-version-GJ55D3JI.js +4 -0
- package/dist-cli/chunks/{compat-R5FQB2ZB.js → compat-2L5FPDKU.js} +2 -2
- package/dist-cli/chunks/{config-ZRS3QCQJ.js → config-NRXBYFB7.js} +2 -2
- package/dist-cli/chunks/{control-XTYASILQ.js → control-G5SMCB2U.js} +2 -2
- package/dist-cli/chunks/daemon-HDNSS5A3.js +4 -0
- package/dist-cli/chunks/{debug-FYSQEAS7.js → debug-CTYLINPI.js} +3 -3
- package/dist-cli/chunks/{desktop-VX3UUDUZ.js → desktop-JNYUDHX5.js} +3 -3
- package/dist-cli/chunks/{detox-BIFMEK3W.js → detox-ZWP5MUPJ.js} +2 -2
- package/dist-cli/chunks/{device-TRZDOVET.js → device-Y7ANIQJY.js} +2 -2
- package/dist-cli/chunks/{diagnose-TOIYZFHR.js → diagnose-GFPN44ER.js} +2 -2
- package/dist-cli/chunks/{disk-cleanup-QFZDBLIK.js → disk-cleanup-OUHB2MKC.js} +2 -2
- package/dist-cli/chunks/drivers-3PUAZF6B.js +4 -0
- package/dist-cli/chunks/{film-3PDSRZRE.js → film-RNPYZHQA.js} +3 -3
- package/dist-cli/chunks/flow-XQUTMOQZ.js +4 -0
- package/dist-cli/chunks/help-C7Y5IENX.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-OWQOMYHE.js → hidden-runtime-alias-DGMIDDY6.js} +2 -2
- package/dist-cli/chunks/{home-paths-QPFJMOU3.js → home-paths-YEFW63N5.js} +2 -2
- package/dist-cli/chunks/inspect-4NF3PPRZ.js +4 -0
- package/dist-cli/chunks/install-desktop-66LPKLQI.js +4 -0
- package/dist-cli/chunks/{login-BP6PCAAP.js → login-ASAFHSEL.js} +4 -4
- package/dist-cli/chunks/{logout-F6BR2WA3.js → logout-F3B5TUCU.js} +2 -2
- package/dist-cli/chunks/{maestro-IQTNAPMZ.js → maestro-MJD54Z7R.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-E5ZM2CYW.js → maestro-generate-PQZ33V42.js} +3 -3
- package/dist-cli/chunks/{mode-2LXFTCJS.js → mode-TKOOHJNS.js} +2 -2
- package/dist-cli/chunks/{optional-demo-registry-SZOI4M4R.js → optional-demo-registry-VX3WVJXT.js} +2 -2
- package/dist-cli/chunks/{perf-EVZFEIYZ.js → perf-JRREHJB6.js} +2 -2
- package/dist-cli/chunks/{permissions-JCUAAO2E.js → permissions-RQZLGYVF.js} +2 -2
- package/dist-cli/chunks/{record-RTM7BU3G.js → record-LBNBJ6U4.js} +3 -3
- package/dist-cli/chunks/{report-issue-ITCSZI37.js → report-issue-O63Z4GXO.js} +2 -2
- package/dist-cli/chunks/reset-734HPURU.js +4 -0
- package/dist-cli/chunks/runtime-PRF4VZAB.js +4 -0
- package/dist-cli/chunks/{screenshot-command-KZWCLIE5.js → screenshot-command-OLZIGKZR.js} +3 -3
- package/dist-cli/chunks/{screenshot-layers-4ZPGWQA5.js → screenshot-layers-ZCKD62ME.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-6LP2Q7EJ.js → screenshots-capture-CJFJACD7.js} +2 -2
- package/dist-cli/chunks/serve-L6QW4B55.js +118 -0
- package/dist-cli/chunks/{setup-JS3YUIDS.js → setup-CHUHRWKS.js} +2 -2
- package/dist-cli/chunks/{skills-7JXM6WME.js → skills-J44O4CRY.js} +2 -2
- package/dist-cli/chunks/{state-VZOMFRIR.js → state-MSTCUB5E.js} +2 -2
- package/dist-cli/chunks/{storage-U5ORNYJL.js → storage-23Y5YSD3.js} +2 -2
- package/dist-cli/chunks/store-IK5DQZ2G.js +4 -0
- package/dist-cli/chunks/telemetry-SCC2A4KF.js +4 -0
- package/dist-cli/chunks/{timeline-NDQ74JBZ.js → timeline-R7VNARZ5.js} +2 -2
- package/dist-cli/chunks/{upgrade-QKR4MCC5.js → upgrade-YUASBYYN.js} +2 -2
- package/dist-cli/chunks/upload-BFCTC54P.js +4 -0
- package/dist-cli/chunks/{version-XI54TYIM.js → version-FSV3NQBN.js} +2 -2
- package/dist-cli/chunks/{web-OGA7GXQV.js → web-LZH2QIJ5.js} +2 -2
- package/dist-cli/chunks/{what-happened-BMSZA2Y4.js → what-happened-F45IZ34K.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 +203 -8
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +236 -0
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +195 -8
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +371 -155
- package/dist-lib/vite.cjs +188 -1
- package/package.json +6 -2
- package/src/host/bridge-host.ts +9 -0
- package/src/host/replacement-module-handler.ts +220 -0
- package/src/vite-plugin-one.ts +7 -0
- package/dist-cli/chunks/chunk-K2OH5YB6.js +0 -4
- package/dist-cli/chunks/cli-version-D4SIGBIX.js +0 -4
- package/dist-cli/chunks/daemon-TEADGBF4.js +0 -4
- package/dist-cli/chunks/drivers-KWT23MPE.js +0 -4
- package/dist-cli/chunks/flow-AYXLKDJR.js +0 -4
- package/dist-cli/chunks/help-47DWCNK3.js +0 -4
- package/dist-cli/chunks/inspect-HFXM4CFS.js +0 -4
- package/dist-cli/chunks/install-desktop-CVEMNOP7.js +0 -4
- package/dist-cli/chunks/reset-VJGTLBQK.js +0 -4
- package/dist-cli/chunks/runtime-VJ6MCWZ4.js +0 -4
- package/dist-cli/chunks/serve-4UUCD73E.js +0 -44
- package/dist-cli/chunks/store-LQNKXV7U.js +0 -4
- package/dist-cli/chunks/telemetry-R6WP54HP.js +0 -4
- package/dist-cli/chunks/upload-AUD6TX4C.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.340 | (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;
|
|
@@ -273,9 +273,9 @@ function safeChildPlistName(value) {
|
|
|
273
273
|
name: file.toLowerCase().endsWith(".plist") ? file : `${file}.plist`
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
|
-
async function readableSettingsBundle(
|
|
276
|
+
async function readableSettingsBundle(path10) {
|
|
277
277
|
try {
|
|
278
|
-
const root = await (0, import_promises.stat)((0, import_node_path.join)(
|
|
278
|
+
const root = await (0, import_promises.stat)((0, import_node_path.join)(path10, "Root.plist"));
|
|
279
279
|
return root.isFile() && root.size <= MAX_PLIST_BYTES;
|
|
280
280
|
} catch {
|
|
281
281
|
return false;
|
|
@@ -320,11 +320,11 @@ async function settingsBundleFingerprint(bundlePath) {
|
|
|
320
320
|
return null;
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
|
-
async function parsePlistRecord(
|
|
323
|
+
async function parsePlistRecord(path10) {
|
|
324
324
|
try {
|
|
325
|
-
const metadata = await (0, import_promises.stat)(
|
|
325
|
+
const metadata = await (0, import_promises.stat)(path10);
|
|
326
326
|
if (!metadata.isFile() || metadata.size > MAX_PLIST_BYTES) return null;
|
|
327
|
-
const source = await (0, import_promises.readFile)(
|
|
327
|
+
const source = await (0, import_promises.readFile)(path10, "utf8");
|
|
328
328
|
const parsed = parsePlistSource(source);
|
|
329
329
|
return isRecord2(parsed) ? parsed : null;
|
|
330
330
|
} catch {
|
|
@@ -531,10 +531,10 @@ function tcpPing(port, timeout = TCP_GATE_MS) {
|
|
|
531
531
|
sock.connect(port, "localhost");
|
|
532
532
|
});
|
|
533
533
|
}
|
|
534
|
-
function httpGet(port,
|
|
534
|
+
function httpGet(port, path10, method = "GET", timeout = TIMEOUT_MS, headers = {}) {
|
|
535
535
|
return new Promise((resolve2) => {
|
|
536
536
|
const req = import_http.default.request(
|
|
537
|
-
{ hostname: "localhost", port, path:
|
|
537
|
+
{ hostname: "localhost", port, path: path10, method, timeout, headers },
|
|
538
538
|
(res) => {
|
|
539
539
|
let body = "";
|
|
540
540
|
res.on("data", (c) => body += c.toString());
|
|
@@ -3490,6 +3490,197 @@ async function openUrl(url, options = {}) {
|
|
|
3490
3490
|
await launchUrl(url, options);
|
|
3491
3491
|
}
|
|
3492
3492
|
|
|
3493
|
+
// src/host/replacement-module-handler.ts
|
|
3494
|
+
var import_promises5 = __toESM(require("node:fs/promises"), 1);
|
|
3495
|
+
var import_node_path10 = __toESM(require("node:path"), 1);
|
|
3496
|
+
var import_esbuild = require("esbuild");
|
|
3497
|
+
var REPLACEMENT_MODULE_ROUTE = "/__sootsim-replacement-module";
|
|
3498
|
+
var REPLACEMENT_RUNTIME_PREFIX = "/__sootsim-replacement-runtime";
|
|
3499
|
+
function getReplacementLoader(filePath) {
|
|
3500
|
+
const ext = import_node_path10.default.extname(filePath).toLowerCase();
|
|
3501
|
+
switch (ext) {
|
|
3502
|
+
case ".js":
|
|
3503
|
+
return "js";
|
|
3504
|
+
case ".jsx":
|
|
3505
|
+
return "jsx";
|
|
3506
|
+
case ".ts":
|
|
3507
|
+
return "ts";
|
|
3508
|
+
case ".tsx":
|
|
3509
|
+
return "tsx";
|
|
3510
|
+
default:
|
|
3511
|
+
return null;
|
|
3512
|
+
}
|
|
3513
|
+
}
|
|
3514
|
+
function reactRuntimeSource(reactBridgeUrl) {
|
|
3515
|
+
if (reactBridgeUrl) {
|
|
3516
|
+
return `export * from ${JSON.stringify(reactBridgeUrl)};
|
|
3517
|
+
import React from ${JSON.stringify(reactBridgeUrl)};
|
|
3518
|
+
export default React;
|
|
3519
|
+
`;
|
|
3520
|
+
}
|
|
3521
|
+
return `const bridge = globalThis.__sootsim_react_bridge
|
|
3522
|
+
if (!bridge) throw new Error('[rnx] replacement React bridge is not ready')
|
|
3523
|
+
export default bridge.default
|
|
3524
|
+
export const Activity = bridge.Activity
|
|
3525
|
+
export const Children = bridge.Children
|
|
3526
|
+
export const Component = bridge.Component
|
|
3527
|
+
export const Fragment = bridge.Fragment
|
|
3528
|
+
export const Profiler = bridge.Profiler
|
|
3529
|
+
export const PureComponent = bridge.PureComponent
|
|
3530
|
+
export const StrictMode = bridge.StrictMode
|
|
3531
|
+
export const Suspense = bridge.Suspense
|
|
3532
|
+
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
|
|
3533
|
+
export const __COMPILER_RUNTIME = bridge.__COMPILER_RUNTIME
|
|
3534
|
+
export const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = bridge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
|
3535
|
+
export const act = bridge.act
|
|
3536
|
+
export const cache = bridge.cache
|
|
3537
|
+
export const cacheSignal = bridge.cacheSignal
|
|
3538
|
+
export const captureOwnerStack = bridge.captureOwnerStack
|
|
3539
|
+
export const cloneElement = bridge.cloneElement
|
|
3540
|
+
export const createContext = bridge.createContext
|
|
3541
|
+
export const createElement = bridge.createElement
|
|
3542
|
+
export const createRef = bridge.createRef
|
|
3543
|
+
export const forwardRef = bridge.forwardRef
|
|
3544
|
+
export const isValidElement = bridge.isValidElement
|
|
3545
|
+
export const lazy = bridge.lazy
|
|
3546
|
+
export const memo = bridge.memo
|
|
3547
|
+
export const startTransition = bridge.startTransition
|
|
3548
|
+
export const unstable_useCacheRefresh = bridge.unstable_useCacheRefresh
|
|
3549
|
+
export const use = bridge.use
|
|
3550
|
+
export const useActionState = bridge.useActionState
|
|
3551
|
+
export const useCallback = bridge.useCallback
|
|
3552
|
+
export const useContext = bridge.useContext
|
|
3553
|
+
export const useDebugValue = bridge.useDebugValue
|
|
3554
|
+
export const useDeferredValue = bridge.useDeferredValue
|
|
3555
|
+
export const useEffect = bridge.useEffect
|
|
3556
|
+
export const useEffectEvent = bridge.useEffectEvent
|
|
3557
|
+
export const useId = bridge.useId
|
|
3558
|
+
export const useImperativeHandle = bridge.useImperativeHandle
|
|
3559
|
+
export const useInsertionEffect = bridge.useInsertionEffect
|
|
3560
|
+
export const useLayoutEffect = bridge.useLayoutEffect
|
|
3561
|
+
export const useMemo = bridge.useMemo
|
|
3562
|
+
export const useOptimistic = bridge.useOptimistic
|
|
3563
|
+
export const useReducer = bridge.useReducer
|
|
3564
|
+
export const useRef = bridge.useRef
|
|
3565
|
+
export const useState = bridge.useState
|
|
3566
|
+
export const useSyncExternalStore = bridge.useSyncExternalStore
|
|
3567
|
+
export const useTransition = bridge.useTransition
|
|
3568
|
+
export const version = bridge.version
|
|
3569
|
+
`;
|
|
3570
|
+
}
|
|
3571
|
+
function reactNativeRuntimeSource() {
|
|
3572
|
+
return `const rn = globalThis.__sootsim_components__ || {}
|
|
3573
|
+
export default rn
|
|
3574
|
+
export const View = rn.View
|
|
3575
|
+
export const Text = rn.Text
|
|
3576
|
+
export const Image = rn.Image
|
|
3577
|
+
export const ScrollView = rn.ScrollView
|
|
3578
|
+
export const FlatList = rn.FlatList
|
|
3579
|
+
export const Pressable = rn.Pressable
|
|
3580
|
+
export const TouchableOpacity = rn.TouchableOpacity
|
|
3581
|
+
export const TouchableWithoutFeedback = rn.TouchableWithoutFeedback
|
|
3582
|
+
export const TouchableHighlight = rn.TouchableHighlight
|
|
3583
|
+
export const TextInput = rn.TextInput
|
|
3584
|
+
export const ActivityIndicator = rn.ActivityIndicator
|
|
3585
|
+
export const KeyboardAvoidingView = rn.KeyboardAvoidingView
|
|
3586
|
+
export const Button = rn.Button
|
|
3587
|
+
export const Modal = rn.Modal
|
|
3588
|
+
export const Switch = rn.Switch
|
|
3589
|
+
export const StyleSheet = rn.StyleSheet
|
|
3590
|
+
export const Platform = rn.Platform
|
|
3591
|
+
export const Keyboard = rn.Keyboard
|
|
3592
|
+
export const Dimensions = rn.Dimensions
|
|
3593
|
+
export const Appearance = rn.Appearance
|
|
3594
|
+
`;
|
|
3595
|
+
}
|
|
3596
|
+
function sendJavaScript(req, res, source) {
|
|
3597
|
+
res.writeHead(200, {
|
|
3598
|
+
"Content-Type": "application/javascript; charset=utf-8",
|
|
3599
|
+
"Cache-Control": "no-cache"
|
|
3600
|
+
});
|
|
3601
|
+
res.end(req.method === "HEAD" ? void 0 : source);
|
|
3602
|
+
}
|
|
3603
|
+
function isReplacementModuleRequestUrl(rawUrl) {
|
|
3604
|
+
if (!rawUrl) return false;
|
|
3605
|
+
try {
|
|
3606
|
+
const pathname = new URL(rawUrl, "http://rnx.local").pathname;
|
|
3607
|
+
return pathname === REPLACEMENT_MODULE_ROUTE || pathname.startsWith(`${REPLACEMENT_RUNTIME_PREFIX}/`);
|
|
3608
|
+
} catch {
|
|
3609
|
+
return false;
|
|
3610
|
+
}
|
|
3611
|
+
}
|
|
3612
|
+
async function handleReplacementModuleRequest(req, res, options = {}) {
|
|
3613
|
+
const rawUrl = req.url || "";
|
|
3614
|
+
let url;
|
|
3615
|
+
try {
|
|
3616
|
+
url = new URL(rawUrl, "http://rnx.local");
|
|
3617
|
+
} catch {
|
|
3618
|
+
return false;
|
|
3619
|
+
}
|
|
3620
|
+
if (url.pathname === `${REPLACEMENT_RUNTIME_PREFIX}/react`) {
|
|
3621
|
+
sendJavaScript(req, res, reactRuntimeSource(options.reactBridgeUrl));
|
|
3622
|
+
return true;
|
|
3623
|
+
}
|
|
3624
|
+
if (url.pathname === `${REPLACEMENT_RUNTIME_PREFIX}/react-native`) {
|
|
3625
|
+
sendJavaScript(req, res, reactNativeRuntimeSource());
|
|
3626
|
+
return true;
|
|
3627
|
+
}
|
|
3628
|
+
if (url.pathname !== REPLACEMENT_MODULE_ROUTE) return false;
|
|
3629
|
+
const targetPath = url.searchParams.get("path");
|
|
3630
|
+
if (!targetPath) {
|
|
3631
|
+
res.writeHead(400, { "Content-Type": "text/plain; charset=utf-8" });
|
|
3632
|
+
res.end("missing path param");
|
|
3633
|
+
return true;
|
|
3634
|
+
}
|
|
3635
|
+
const loader = getReplacementLoader(targetPath);
|
|
3636
|
+
if (!loader) {
|
|
3637
|
+
res.writeHead(400, { "Content-Type": "text/plain; charset=utf-8" });
|
|
3638
|
+
res.end("replacement files must be .js, .jsx, .ts, or .tsx");
|
|
3639
|
+
return true;
|
|
3640
|
+
}
|
|
3641
|
+
try {
|
|
3642
|
+
await import_promises5.default.access(targetPath);
|
|
3643
|
+
} catch (error) {
|
|
3644
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
3645
|
+
res.writeHead(404, { "Content-Type": "text/plain; charset=utf-8" });
|
|
3646
|
+
res.end(`replacement file not found: ${message}`);
|
|
3647
|
+
return true;
|
|
3648
|
+
}
|
|
3649
|
+
try {
|
|
3650
|
+
const result = await (0, import_esbuild.build)({
|
|
3651
|
+
entryPoints: [targetPath],
|
|
3652
|
+
bundle: true,
|
|
3653
|
+
write: false,
|
|
3654
|
+
format: "esm",
|
|
3655
|
+
platform: "browser",
|
|
3656
|
+
target: "es2022",
|
|
3657
|
+
jsx: "transform",
|
|
3658
|
+
jsxFactory: "React.createElement",
|
|
3659
|
+
jsxFragment: "React.Fragment",
|
|
3660
|
+
tsconfigRaw: { compilerOptions: { jsx: "react" } },
|
|
3661
|
+
sourcemap: "inline",
|
|
3662
|
+
logLevel: "silent",
|
|
3663
|
+
external: ["react", "react-native"]
|
|
3664
|
+
});
|
|
3665
|
+
const bundledCode = result.outputFiles[0]?.text ?? "";
|
|
3666
|
+
const hasReactBinding = /\bimport\s+(?:\*\s+as\s+React|React(?:\s*,|\s+from)|\{[^}]*\bdefault\s+as\s+React\b)/.test(
|
|
3667
|
+
bundledCode
|
|
3668
|
+
);
|
|
3669
|
+
const reactImport = /\bReact\.(?:createElement|Fragment)\b/.test(bundledCode) && !hasReactBinding ? `import * as React from '${REPLACEMENT_RUNTIME_PREFIX}/react';
|
|
3670
|
+
` : "";
|
|
3671
|
+
const runtimeCode = (reactImport + bundledCode).replace(
|
|
3672
|
+
/from\s*["']react-native["']/g,
|
|
3673
|
+
`from '${REPLACEMENT_RUNTIME_PREFIX}/react-native'`
|
|
3674
|
+
).replace(/from\s*["']react["']/g, `from '${REPLACEMENT_RUNTIME_PREFIX}/react'`);
|
|
3675
|
+
sendJavaScript(req, res, runtimeCode);
|
|
3676
|
+
} catch (error) {
|
|
3677
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
3678
|
+
res.writeHead(500, { "Content-Type": "text/plain; charset=utf-8" });
|
|
3679
|
+
res.end(`replacement bundle failed: ${message}`);
|
|
3680
|
+
}
|
|
3681
|
+
return true;
|
|
3682
|
+
}
|
|
3683
|
+
|
|
3493
3684
|
// src/host/websocket-proxy.ts
|
|
3494
3685
|
var import_ws = require("ws");
|
|
3495
3686
|
var WEBSOCKET_PROXY_PATH = "/__websocket-proxy";
|
|
@@ -4742,6 +4933,10 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
4742
4933
|
if (isAppApiRequestUrl(req.url) && handleAppApiRequest(req, res)) {
|
|
4743
4934
|
return;
|
|
4744
4935
|
}
|
|
4936
|
+
if (isReplacementModuleRequestUrl(req.url)) {
|
|
4937
|
+
void handleReplacementModuleRequest(req, res);
|
|
4938
|
+
return;
|
|
4939
|
+
}
|
|
4745
4940
|
const method = (req.method || "GET").toUpperCase();
|
|
4746
4941
|
let url;
|
|
4747
4942
|
try {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.340 | (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.340 | (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.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/host/fetch-proxy-overrides.ts
|
|
4
4
|
var FETCH_PROXY_BROWSER_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36";
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/*! rnx v0.1.340 | (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 __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
|
+
|
|
32
|
+
// src/host/replacement-module-handler.ts
|
|
33
|
+
var replacement_module_handler_exports = {};
|
|
34
|
+
__export(replacement_module_handler_exports, {
|
|
35
|
+
REPLACEMENT_MODULE_ROUTE: () => REPLACEMENT_MODULE_ROUTE,
|
|
36
|
+
REPLACEMENT_RUNTIME_PREFIX: () => REPLACEMENT_RUNTIME_PREFIX,
|
|
37
|
+
handleReplacementModuleRequest: () => handleReplacementModuleRequest,
|
|
38
|
+
isReplacementModuleRequestUrl: () => isReplacementModuleRequestUrl
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(replacement_module_handler_exports);
|
|
41
|
+
var import_promises = __toESM(require("node:fs/promises"), 1);
|
|
42
|
+
var import_node_path = __toESM(require("node:path"), 1);
|
|
43
|
+
var import_esbuild = require("esbuild");
|
|
44
|
+
var REPLACEMENT_MODULE_ROUTE = "/__sootsim-replacement-module";
|
|
45
|
+
var REPLACEMENT_RUNTIME_PREFIX = "/__sootsim-replacement-runtime";
|
|
46
|
+
function getReplacementLoader(filePath) {
|
|
47
|
+
const ext = import_node_path.default.extname(filePath).toLowerCase();
|
|
48
|
+
switch (ext) {
|
|
49
|
+
case ".js":
|
|
50
|
+
return "js";
|
|
51
|
+
case ".jsx":
|
|
52
|
+
return "jsx";
|
|
53
|
+
case ".ts":
|
|
54
|
+
return "ts";
|
|
55
|
+
case ".tsx":
|
|
56
|
+
return "tsx";
|
|
57
|
+
default:
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function reactRuntimeSource(reactBridgeUrl) {
|
|
62
|
+
if (reactBridgeUrl) {
|
|
63
|
+
return `export * from ${JSON.stringify(reactBridgeUrl)};
|
|
64
|
+
import React from ${JSON.stringify(reactBridgeUrl)};
|
|
65
|
+
export default React;
|
|
66
|
+
`;
|
|
67
|
+
}
|
|
68
|
+
return `const bridge = globalThis.__sootsim_react_bridge
|
|
69
|
+
if (!bridge) throw new Error('[rnx] replacement React bridge is not ready')
|
|
70
|
+
export default bridge.default
|
|
71
|
+
export const Activity = bridge.Activity
|
|
72
|
+
export const Children = bridge.Children
|
|
73
|
+
export const Component = bridge.Component
|
|
74
|
+
export const Fragment = bridge.Fragment
|
|
75
|
+
export const Profiler = bridge.Profiler
|
|
76
|
+
export const PureComponent = bridge.PureComponent
|
|
77
|
+
export const StrictMode = bridge.StrictMode
|
|
78
|
+
export const Suspense = bridge.Suspense
|
|
79
|
+
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
|
|
80
|
+
export const __COMPILER_RUNTIME = bridge.__COMPILER_RUNTIME
|
|
81
|
+
export const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = bridge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
|
82
|
+
export const act = bridge.act
|
|
83
|
+
export const cache = bridge.cache
|
|
84
|
+
export const cacheSignal = bridge.cacheSignal
|
|
85
|
+
export const captureOwnerStack = bridge.captureOwnerStack
|
|
86
|
+
export const cloneElement = bridge.cloneElement
|
|
87
|
+
export const createContext = bridge.createContext
|
|
88
|
+
export const createElement = bridge.createElement
|
|
89
|
+
export const createRef = bridge.createRef
|
|
90
|
+
export const forwardRef = bridge.forwardRef
|
|
91
|
+
export const isValidElement = bridge.isValidElement
|
|
92
|
+
export const lazy = bridge.lazy
|
|
93
|
+
export const memo = bridge.memo
|
|
94
|
+
export const startTransition = bridge.startTransition
|
|
95
|
+
export const unstable_useCacheRefresh = bridge.unstable_useCacheRefresh
|
|
96
|
+
export const use = bridge.use
|
|
97
|
+
export const useActionState = bridge.useActionState
|
|
98
|
+
export const useCallback = bridge.useCallback
|
|
99
|
+
export const useContext = bridge.useContext
|
|
100
|
+
export const useDebugValue = bridge.useDebugValue
|
|
101
|
+
export const useDeferredValue = bridge.useDeferredValue
|
|
102
|
+
export const useEffect = bridge.useEffect
|
|
103
|
+
export const useEffectEvent = bridge.useEffectEvent
|
|
104
|
+
export const useId = bridge.useId
|
|
105
|
+
export const useImperativeHandle = bridge.useImperativeHandle
|
|
106
|
+
export const useInsertionEffect = bridge.useInsertionEffect
|
|
107
|
+
export const useLayoutEffect = bridge.useLayoutEffect
|
|
108
|
+
export const useMemo = bridge.useMemo
|
|
109
|
+
export const useOptimistic = bridge.useOptimistic
|
|
110
|
+
export const useReducer = bridge.useReducer
|
|
111
|
+
export const useRef = bridge.useRef
|
|
112
|
+
export const useState = bridge.useState
|
|
113
|
+
export const useSyncExternalStore = bridge.useSyncExternalStore
|
|
114
|
+
export const useTransition = bridge.useTransition
|
|
115
|
+
export const version = bridge.version
|
|
116
|
+
`;
|
|
117
|
+
}
|
|
118
|
+
function reactNativeRuntimeSource() {
|
|
119
|
+
return `const rn = globalThis.__sootsim_components__ || {}
|
|
120
|
+
export default rn
|
|
121
|
+
export const View = rn.View
|
|
122
|
+
export const Text = rn.Text
|
|
123
|
+
export const Image = rn.Image
|
|
124
|
+
export const ScrollView = rn.ScrollView
|
|
125
|
+
export const FlatList = rn.FlatList
|
|
126
|
+
export const Pressable = rn.Pressable
|
|
127
|
+
export const TouchableOpacity = rn.TouchableOpacity
|
|
128
|
+
export const TouchableWithoutFeedback = rn.TouchableWithoutFeedback
|
|
129
|
+
export const TouchableHighlight = rn.TouchableHighlight
|
|
130
|
+
export const TextInput = rn.TextInput
|
|
131
|
+
export const ActivityIndicator = rn.ActivityIndicator
|
|
132
|
+
export const KeyboardAvoidingView = rn.KeyboardAvoidingView
|
|
133
|
+
export const Button = rn.Button
|
|
134
|
+
export const Modal = rn.Modal
|
|
135
|
+
export const Switch = rn.Switch
|
|
136
|
+
export const StyleSheet = rn.StyleSheet
|
|
137
|
+
export const Platform = rn.Platform
|
|
138
|
+
export const Keyboard = rn.Keyboard
|
|
139
|
+
export const Dimensions = rn.Dimensions
|
|
140
|
+
export const Appearance = rn.Appearance
|
|
141
|
+
`;
|
|
142
|
+
}
|
|
143
|
+
function sendJavaScript(req, res, source) {
|
|
144
|
+
res.writeHead(200, {
|
|
145
|
+
"Content-Type": "application/javascript; charset=utf-8",
|
|
146
|
+
"Cache-Control": "no-cache"
|
|
147
|
+
});
|
|
148
|
+
res.end(req.method === "HEAD" ? void 0 : source);
|
|
149
|
+
}
|
|
150
|
+
function isReplacementModuleRequestUrl(rawUrl) {
|
|
151
|
+
if (!rawUrl) return false;
|
|
152
|
+
try {
|
|
153
|
+
const pathname = new URL(rawUrl, "http://rnx.local").pathname;
|
|
154
|
+
return pathname === REPLACEMENT_MODULE_ROUTE || pathname.startsWith(`${REPLACEMENT_RUNTIME_PREFIX}/`);
|
|
155
|
+
} catch {
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
async function handleReplacementModuleRequest(req, res, options = {}) {
|
|
160
|
+
const rawUrl = req.url || "";
|
|
161
|
+
let url;
|
|
162
|
+
try {
|
|
163
|
+
url = new URL(rawUrl, "http://rnx.local");
|
|
164
|
+
} catch {
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
if (url.pathname === `${REPLACEMENT_RUNTIME_PREFIX}/react`) {
|
|
168
|
+
sendJavaScript(req, res, reactRuntimeSource(options.reactBridgeUrl));
|
|
169
|
+
return true;
|
|
170
|
+
}
|
|
171
|
+
if (url.pathname === `${REPLACEMENT_RUNTIME_PREFIX}/react-native`) {
|
|
172
|
+
sendJavaScript(req, res, reactNativeRuntimeSource());
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
if (url.pathname !== REPLACEMENT_MODULE_ROUTE) return false;
|
|
176
|
+
const targetPath = url.searchParams.get("path");
|
|
177
|
+
if (!targetPath) {
|
|
178
|
+
res.writeHead(400, { "Content-Type": "text/plain; charset=utf-8" });
|
|
179
|
+
res.end("missing path param");
|
|
180
|
+
return true;
|
|
181
|
+
}
|
|
182
|
+
const loader = getReplacementLoader(targetPath);
|
|
183
|
+
if (!loader) {
|
|
184
|
+
res.writeHead(400, { "Content-Type": "text/plain; charset=utf-8" });
|
|
185
|
+
res.end("replacement files must be .js, .jsx, .ts, or .tsx");
|
|
186
|
+
return true;
|
|
187
|
+
}
|
|
188
|
+
try {
|
|
189
|
+
await import_promises.default.access(targetPath);
|
|
190
|
+
} catch (error) {
|
|
191
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
192
|
+
res.writeHead(404, { "Content-Type": "text/plain; charset=utf-8" });
|
|
193
|
+
res.end(`replacement file not found: ${message}`);
|
|
194
|
+
return true;
|
|
195
|
+
}
|
|
196
|
+
try {
|
|
197
|
+
const result = await (0, import_esbuild.build)({
|
|
198
|
+
entryPoints: [targetPath],
|
|
199
|
+
bundle: true,
|
|
200
|
+
write: false,
|
|
201
|
+
format: "esm",
|
|
202
|
+
platform: "browser",
|
|
203
|
+
target: "es2022",
|
|
204
|
+
jsx: "transform",
|
|
205
|
+
jsxFactory: "React.createElement",
|
|
206
|
+
jsxFragment: "React.Fragment",
|
|
207
|
+
tsconfigRaw: { compilerOptions: { jsx: "react" } },
|
|
208
|
+
sourcemap: "inline",
|
|
209
|
+
logLevel: "silent",
|
|
210
|
+
external: ["react", "react-native"]
|
|
211
|
+
});
|
|
212
|
+
const bundledCode = result.outputFiles[0]?.text ?? "";
|
|
213
|
+
const hasReactBinding = /\bimport\s+(?:\*\s+as\s+React|React(?:\s*,|\s+from)|\{[^}]*\bdefault\s+as\s+React\b)/.test(
|
|
214
|
+
bundledCode
|
|
215
|
+
);
|
|
216
|
+
const reactImport = /\bReact\.(?:createElement|Fragment)\b/.test(bundledCode) && !hasReactBinding ? `import * as React from '${REPLACEMENT_RUNTIME_PREFIX}/react';
|
|
217
|
+
` : "";
|
|
218
|
+
const runtimeCode = (reactImport + bundledCode).replace(
|
|
219
|
+
/from\s*["']react-native["']/g,
|
|
220
|
+
`from '${REPLACEMENT_RUNTIME_PREFIX}/react-native'`
|
|
221
|
+
).replace(/from\s*["']react["']/g, `from '${REPLACEMENT_RUNTIME_PREFIX}/react'`);
|
|
222
|
+
sendJavaScript(req, res, runtimeCode);
|
|
223
|
+
} catch (error) {
|
|
224
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
225
|
+
res.writeHead(500, { "Content-Type": "text/plain; charset=utf-8" });
|
|
226
|
+
res.end(`replacement bundle failed: ${message}`);
|
|
227
|
+
}
|
|
228
|
+
return true;
|
|
229
|
+
}
|
|
230
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
231
|
+
0 && (module.exports = {
|
|
232
|
+
REPLACEMENT_MODULE_ROUTE,
|
|
233
|
+
REPLACEMENT_RUNTIME_PREFIX,
|
|
234
|
+
handleReplacementModuleRequest,
|
|
235
|
+
isReplacementModuleRequestUrl
|
|
236
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.340 | (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;
|