rnxsim 0.1.344 → 0.1.346
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -31
- package/cli/app-fonts.ts +8 -28
- package/cli/app-project.ts +12 -184
- package/cli/app-splash.ts +3 -17
- package/cli/bin.ts +15 -28
- package/cli/commands/control.ts +20 -30
- package/cli/commands/daemon.ts +19 -44
- package/cli/commands/flow.ts +0 -27
- package/cli/commands/install-desktop.ts +2 -16
- package/cli/commands/login.ts +3 -43
- package/cli/commands/logout.ts +0 -7
- package/cli/commands/serve.ts +2 -32
- package/cli/commands/setup.ts +20 -194
- package/cli/commands/telemetry.ts +7 -5
- package/cli/commands/upload.ts +1 -48
- package/cli/commands/welcome.ts +64 -0
- package/cli/outbound-endpoints.ts +586 -0
- package/cli/privacy.ts +53 -0
- package/cli/runtime-notes.ts +2 -2
- package/cli/telemetry.ts +46 -149
- package/dist-cli/bin.js +6 -6
- package/dist-cli/chunks/{agent-HTSE5FA4.js → agent-U6HZUHAQ.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-L6X2AEZL.js → agent-wrapper-IM2VL6XP.js} +2 -2
- package/dist-cli/chunks/{app-fonts-FGF3ETYH.js → app-fonts-LHVTPWCN.js} +2 -2
- package/dist-cli/chunks/{assert-HA2ZYVDN.js → assert-UMGCZXWN.js} +2 -2
- package/dist-cli/chunks/{auth-HONDAV75.js → auth-PQY57FPY.js} +2 -2
- package/dist-cli/chunks/{beta-U7EE4GMR.js → beta-3MMNRHL7.js} +2 -2
- package/dist-cli/chunks/{camera-RTKNUTIX.js → camera-UKISEHMH.js} +2 -2
- package/dist-cli/chunks/{chunk-CNLPLCO2.js → chunk-36P343FE.js} +2 -2
- package/dist-cli/chunks/{chunk-IWR4HFC4.js → chunk-3KPJVR63.js} +2 -2
- package/dist-cli/chunks/chunk-54Y5IXWQ.js +15 -0
- package/dist-cli/chunks/{chunk-EPEZZ6YS.js → chunk-5KMV7NAJ.js} +2 -2
- package/dist-cli/chunks/{chunk-NDGAF5OF.js → chunk-5WIYZI5H.js} +2 -2
- package/dist-cli/chunks/{chunk-KBSVSAAE.js → chunk-6GXUQ3DM.js} +2 -2
- package/dist-cli/chunks/{chunk-KT6WMCUS.js → chunk-6MUEKKJ4.js} +1 -1
- package/dist-cli/chunks/{chunk-TOHQI2II.js → chunk-6Q6S53R7.js} +1 -1
- package/dist-cli/chunks/{chunk-63NZGJ4A.js → chunk-6SQCDLTJ.js} +1 -1
- package/dist-cli/chunks/{chunk-Q2B6EQPB.js → chunk-6UW6O575.js} +2 -2
- package/dist-cli/chunks/chunk-6VH3UUYQ.js +4 -0
- package/dist-cli/chunks/{chunk-BGLWR43R.js → chunk-6XJGGFMD.js} +1 -1
- package/dist-cli/chunks/{chunk-TZNRKIS3.js → chunk-75LMZXF5.js} +2 -2
- package/dist-cli/chunks/{chunk-FZ5DRZJE.js → chunk-7CJNUNQA.js} +3 -3
- package/dist-cli/chunks/{chunk-UCVQOQCY.js → chunk-BQDGFR4B.js} +2 -2
- package/dist-cli/chunks/{chunk-H4J7EWZC.js → chunk-BSIVS2SQ.js} +1 -1
- package/dist-cli/chunks/{chunk-6E6SBYIO.js → chunk-CD2LITQX.js} +1 -1
- package/dist-cli/chunks/{chunk-PNMCALX5.js → chunk-DGH3D6WS.js} +2 -2
- package/dist-cli/chunks/chunk-EP6XBKPM.js +11 -0
- package/dist-cli/chunks/{chunk-OCUXAA6O.js → chunk-EVX6Y7ZM.js} +2 -2
- package/dist-cli/chunks/chunk-EYRKIWHE.js +4 -0
- package/dist-cli/chunks/{chunk-N5PFDTFL.js → chunk-FSYB2S6Q.js} +17 -17
- package/dist-cli/chunks/{chunk-6PEZSVIG.js → chunk-HPCTBEAP.js} +1 -1
- package/dist-cli/chunks/chunk-HS2BME6V.js +6 -0
- package/dist-cli/chunks/{chunk-G6IPT2PS.js → chunk-I3GUDHG2.js} +2 -2
- package/dist-cli/chunks/{chunk-MWUXQIA3.js → chunk-I4HVFKLM.js} +2 -2
- package/dist-cli/chunks/{chunk-ZPTFL5FQ.js → chunk-IBNK7SWL.js} +2 -2
- package/dist-cli/chunks/chunk-IUG4GWQC.js +25 -0
- package/dist-cli/chunks/{chunk-XQFDEY3F.js → chunk-IUIKD2YI.js} +1 -1
- package/dist-cli/chunks/{chunk-JFUVWIJT.js → chunk-JPVXLY7X.js} +1 -1
- package/dist-cli/chunks/{chunk-JLUEQPEF.js → chunk-K4PZLT2K.js} +1 -1
- package/dist-cli/chunks/{chunk-CRWYKW67.js → chunk-KNIKUJPD.js} +1 -1
- package/dist-cli/chunks/{chunk-EZLLZDYX.js → chunk-L6GWDWGZ.js} +2 -2
- package/dist-cli/chunks/chunk-LAVDDUQR.js +4 -0
- package/dist-cli/chunks/{chunk-22WJPMTQ.js → chunk-LPXKPZ4B.js} +1 -1
- package/dist-cli/chunks/{chunk-IPC45HTT.js → chunk-LYLK5VRP.js} +2 -2
- package/dist-cli/chunks/{chunk-S6LBAUWH.js → chunk-ME46FC4L.js} +1 -1
- package/dist-cli/chunks/chunk-NNXSLD76.js +99 -0
- package/dist-cli/chunks/{chunk-7V4ULF3U.js → chunk-PNH3YBZ4.js} +2 -2
- package/dist-cli/chunks/{chunk-GRX6NSBG.js → chunk-PPEJMNRO.js} +2 -2
- package/dist-cli/chunks/{chunk-K3VNCCEJ.js → chunk-SEWGXJG6.js} +3 -3
- package/dist-cli/chunks/{chunk-R3UYHE6G.js → chunk-T4JPZI32.js} +1 -1
- package/dist-cli/chunks/{chunk-NRTHFEPM.js → chunk-TAQYETRH.js} +2 -2
- package/dist-cli/chunks/{chunk-7JEEO33Y.js → chunk-TBVBWJJL.js} +2 -2
- package/dist-cli/chunks/{chunk-HRBMD2FS.js → chunk-UA54YLWR.js} +26 -26
- package/dist-cli/chunks/{chunk-G3UAFZE2.js → chunk-UV3TXNMG.js} +1 -1
- package/dist-cli/chunks/{chunk-EH35QQG4.js → chunk-VZ6YFPIN.js} +45 -45
- package/dist-cli/chunks/chunk-W54SRZ5K.js +14 -0
- package/dist-cli/chunks/chunk-WAC75WN6.js +4 -0
- package/dist-cli/chunks/{chunk-S7CSBQ6G.js → chunk-X2WIEZ7Q.js} +1 -1
- package/dist-cli/chunks/{chunk-EN32LN2B.js → chunk-XWTYFWZ3.js} +2 -2
- package/dist-cli/chunks/chunk-Y2C3CZVD.js +4 -0
- package/dist-cli/chunks/chunk-YM4L2CFB.js +4 -0
- package/dist-cli/chunks/{chunk-ZZSBCGHC.js → chunk-YXDR4CAQ.js} +1 -1
- package/dist-cli/chunks/{chunk-6NLWKL7Y.js → chunk-Z6P427WC.js} +2 -2
- package/dist-cli/chunks/{cleanup-EMYD5WZG.js → cleanup-KXPS5VSK.js} +2 -2
- package/dist-cli/chunks/cli-version-LJ6NFLBP.js +4 -0
- package/dist-cli/chunks/{compat-W2N5QTVG.js → compat-JWF7N3VO.js} +2 -2
- package/dist-cli/chunks/config-M42VJXNK.js +13 -0
- package/dist-cli/chunks/{control-4SFBROUE.js → control-HMZDIS6P.js} +2 -2
- package/dist-cli/chunks/daemon-MQ4UYKNQ.js +4 -0
- package/dist-cli/chunks/{debug-HCR2KFUA.js → debug-F44GWYMF.js} +3 -3
- package/dist-cli/chunks/{desktop-T2KS5PBJ.js → desktop-YJMWW6MW.js} +3 -3
- package/dist-cli/chunks/{detox-5S7EHINH.js → detox-5B4ASTJO.js} +2 -2
- package/dist-cli/chunks/{device-LVM3MZRJ.js → device-2544YZNY.js} +2 -2
- package/dist-cli/chunks/{diagnose-WK37XKLI.js → diagnose-LS4245JR.js} +2 -2
- package/dist-cli/chunks/{disk-cleanup-X7VJOXMS.js → disk-cleanup-XYL2HQQY.js} +2 -2
- package/dist-cli/chunks/drivers-P5CRSKH6.js +4 -0
- package/dist-cli/chunks/{film-7KLTI3ER.js → film-LS3TIZRM.js} +3 -3
- package/dist-cli/chunks/flow-7V77GXAB.js +4 -0
- package/dist-cli/chunks/help-HRESIFZX.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-4RVGUVFO.js → hidden-runtime-alias-HGN2EEQR.js} +2 -2
- package/dist-cli/chunks/{home-paths-5DHSAEGZ.js → home-paths-T3NTXE4U.js} +2 -2
- package/dist-cli/chunks/inspect-UC44UH4M.js +4 -0
- package/dist-cli/chunks/install-desktop-RDV66JHG.js +4 -0
- package/dist-cli/chunks/login-WVP5H5NQ.js +26 -0
- package/dist-cli/chunks/logout-GXX5OY6X.js +4 -0
- package/dist-cli/chunks/{maestro-HTRLQDJE.js → maestro-MQMGBNOB.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-GX2QNA3F.js → maestro-generate-CO355QV2.js} +3 -3
- package/dist-cli/chunks/{mode-GM6KZHQP.js → mode-QFB3M2AA.js} +2 -2
- package/dist-cli/chunks/{optional-demo-registry-B4TD7JQP.js → optional-demo-registry-UIPVSBHV.js} +2 -2
- package/dist-cli/chunks/{perf-3PRXJQIC.js → perf-TDOSW3LD.js} +2 -2
- package/dist-cli/chunks/{permissions-TJZIRF2S.js → permissions-TEVQLCGJ.js} +2 -2
- package/dist-cli/chunks/privacy-DVHAMHR6.js +4 -0
- package/dist-cli/chunks/{record-LI55DTPE.js → record-OFEQLSWA.js} +3 -3
- package/dist-cli/chunks/{report-issue-TBGJVQIQ.js → report-issue-B2UPOERJ.js} +2 -2
- package/dist-cli/chunks/reset-XQQYM55B.js +4 -0
- package/dist-cli/chunks/runtime-GN6HITVB.js +4 -0
- package/dist-cli/chunks/{screenshot-command-BEN7YYIF.js → screenshot-command-NTLAY7QN.js} +3 -3
- package/dist-cli/chunks/{screenshot-layers-3IU4KYNO.js → screenshot-layers-BBLKNRQU.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-ZRC54ST6.js → screenshots-capture-6GHIRCTG.js} +2 -2
- package/dist-cli/chunks/serve-H6GJ4OHW.js +118 -0
- package/dist-cli/chunks/setup-6YLKSMWS.js +30 -0
- package/dist-cli/chunks/{skills-GKBR2HQB.js → skills-FUL7D6C7.js} +2 -2
- package/dist-cli/chunks/{state-LIHZJSL7.js → state-O2HE7XSR.js} +2 -2
- package/dist-cli/chunks/{storage-4TPN3NFB.js → storage-WIZTF7RN.js} +4 -4
- package/dist-cli/chunks/store-NJ2MBZC2.js +4 -0
- package/dist-cli/chunks/telemetry-BEC6W5WP.js +4 -0
- package/dist-cli/chunks/{timeline-EX63UNWU.js → timeline-MA4JT7UJ.js} +2 -2
- package/dist-cli/chunks/{upgrade-O6Y6EINE.js → upgrade-H5LSDXBH.js} +2 -2
- package/dist-cli/chunks/upload-Q4DWKIA4.js +4 -0
- package/dist-cli/chunks/{version-HLNL3NFB.js → version-4UWEEDVP.js} +2 -2
- package/dist-cli/chunks/{web-4EDPYPW7.js → web-F3LXRN3K.js} +2 -2
- package/dist-cli/chunks/welcome-AZBOSIG2.js +5 -0
- package/dist-cli/chunks/{what-happened-77VNUEPK.js → what-happened-6OSNLOAY.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 +13 -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 +43 -13
- package/dist-lib/home-paths.cjs +145 -11
- package/dist-lib/host/bridge-host.cjs +326 -78
- 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 +71 -4
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +337 -37
- 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 +484 -14
- 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 +120 -50
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +493 -439
- package/dist-lib/vite.cjs +193 -37
- package/package.json +2 -1
- package/scripts/dev-server-scanner.ts +112 -51
- package/skills/rnx-test/SKILL.md +4 -0
- package/src/backend-origin.ts +15 -1
- package/src/dev-bundle-resolution.ts +42 -18
- package/src/dev-server-open.ts +197 -0
- package/src/home-paths.ts +168 -15
- package/src/host/bridge-host.ts +2 -2
- package/src/host/replacement-module-handler.ts +68 -2
- package/src/metro-plugin.ts +83 -5
- package/src/native-dev-bundle-url.ts +22 -0
- package/src/vite-plugin-one.ts +42 -28
- package/dist-cli/chunks/chunk-3JC7H4PR.js +0 -25
- package/dist-cli/chunks/chunk-6DLIC7BZ.js +0 -4
- package/dist-cli/chunks/chunk-7TNPO2OJ.js +0 -9
- package/dist-cli/chunks/chunk-AMF5KTOI.js +0 -4
- package/dist-cli/chunks/chunk-BX5VXTOQ.js +0 -101
- package/dist-cli/chunks/chunk-D73H7ACZ.js +0 -4
- package/dist-cli/chunks/chunk-DY4O7KYI.js +0 -4
- package/dist-cli/chunks/chunk-GU2V4JDG.js +0 -15
- package/dist-cli/chunks/chunk-POOCKX5B.js +0 -14
- package/dist-cli/chunks/chunk-Z2HMSVSN.js +0 -4
- package/dist-cli/chunks/cli-version-CN3NTKLH.js +0 -4
- package/dist-cli/chunks/config-SELKGT4F.js +0 -13
- package/dist-cli/chunks/daemon-V2SFCU2E.js +0 -4
- package/dist-cli/chunks/drivers-3YFTJ5WA.js +0 -4
- package/dist-cli/chunks/flow-36ANTMJU.js +0 -4
- package/dist-cli/chunks/help-ZGL26SPK.js +0 -4
- package/dist-cli/chunks/inspect-R3B55RTS.js +0 -4
- package/dist-cli/chunks/install-desktop-TZ3H3VWK.js +0 -4
- package/dist-cli/chunks/login-4DFULI7S.js +0 -28
- package/dist-cli/chunks/logout-QMCVYMBB.js +0 -4
- package/dist-cli/chunks/reset-O6MW6X7X.js +0 -4
- package/dist-cli/chunks/runtime-JESXBHRQ.js +0 -4
- package/dist-cli/chunks/serve-QGKTWPNF.js +0 -118
- package/dist-cli/chunks/setup-3WPWATCX.js +0 -32
- package/dist-cli/chunks/store-VBX3L46S.js +0 -4
- package/dist-cli/chunks/telemetry-ACNNIQIG.js +0 -4
- package/dist-cli/chunks/upload-OD2UQHMM.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.346 | (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.346 | (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/config.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.346 | (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/detox/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.346 | (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.346 | (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;
|
|
@@ -30,9 +30,15 @@ __export(dev_bundle_resolution_exports, {
|
|
|
30
30
|
module.exports = __toCommonJS(dev_bundle_resolution_exports);
|
|
31
31
|
|
|
32
32
|
// src/backend-origin.ts
|
|
33
|
+
var LOOPBACK_PROBE_HOSTNAMES = ["::1", "127.0.0.1"];
|
|
33
34
|
function normalizeHostname(hostname) {
|
|
34
35
|
return hostname.replace(/^\[|\]$/g, "").toLowerCase();
|
|
35
36
|
}
|
|
37
|
+
function buildLoopbackProbeBaseUrl(protocol, hostname, port) {
|
|
38
|
+
const normalizedHostname = normalizeHostname(hostname);
|
|
39
|
+
const urlHost = normalizedHostname.includes(":") ? `[${normalizedHostname}]` : normalizedHostname;
|
|
40
|
+
return `${protocol}//${urlHost}:${port}`;
|
|
41
|
+
}
|
|
36
42
|
function isLoopbackHost(hostname) {
|
|
37
43
|
const normalized = normalizeHostname(hostname);
|
|
38
44
|
return normalized === "localhost" || normalized.endsWith(".localhost") || normalized === "0.0.0.0" || normalized === "::1" || /^127(?:\.\d{1,3}){3}$/.test(normalized);
|
|
@@ -46,6 +52,19 @@ function isAbsoluteHttpUrl(url) {
|
|
|
46
52
|
function isNativeDevBundlePath(pathname) {
|
|
47
53
|
return pathname.endsWith(".bundle");
|
|
48
54
|
}
|
|
55
|
+
function alignLoopbackBundleUrlWithProbe(bundleUrl, probeBaseUrl) {
|
|
56
|
+
try {
|
|
57
|
+
const bundle = new URL(bundleUrl);
|
|
58
|
+
const probe = new URL(probeBaseUrl);
|
|
59
|
+
if (!isLoopbackHost(bundle.hostname) || !isLoopbackHost(probe.hostname)) {
|
|
60
|
+
return bundleUrl;
|
|
61
|
+
}
|
|
62
|
+
bundle.hostname = probe.hostname;
|
|
63
|
+
return bundle.toString();
|
|
64
|
+
} catch {
|
|
65
|
+
return bundleUrl;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
49
68
|
function applyPreviewProdBundle(parsed) {
|
|
50
69
|
if (!process.env.SOOTSIM_PREVIEW_PROD_BUNDLE) return;
|
|
51
70
|
parsed.searchParams.set("dev", "false");
|
|
@@ -125,8 +144,8 @@ async function resolvePortViaServerScan(port) {
|
|
|
125
144
|
if (!match) return null;
|
|
126
145
|
return {
|
|
127
146
|
// normalize exactly like the manifest-probe branch below — the scan
|
|
128
|
-
// returns metro's
|
|
129
|
-
// apps), but sootsim loads ONE self-contained bundle into the tenant
|
|
147
|
+
// returns metro's manifest launchAsset url (lazy=true for code-split
|
|
148
|
+
// one/vxrn apps), but sootsim loads ONE self-contained bundle into the tenant
|
|
130
149
|
// worker, so a deferred React.lazy chunk throws "Requiring unknown module
|
|
131
150
|
// <id>". normalizeNativeDevBundleUrl forces lazy=false + strips bytecode.
|
|
132
151
|
bundleUrl: normalizeNativeDevBundleUrl(match.bundleUrl),
|
|
@@ -138,15 +157,8 @@ async function resolvePortViaServerScan(port) {
|
|
|
138
157
|
return null;
|
|
139
158
|
}
|
|
140
159
|
}
|
|
141
|
-
async function
|
|
160
|
+
async function probeBaseUrlBundleDirect(baseUrl, port) {
|
|
142
161
|
const normalizedBaseUrl = baseUrl.replace(/\/+$/, "");
|
|
143
|
-
try {
|
|
144
|
-
if (isLoopbackHost(new URL(normalizedBaseUrl).hostname)) {
|
|
145
|
-
const viaScan = await resolvePortViaServerScan(port);
|
|
146
|
-
if (viaScan) return viaScan;
|
|
147
|
-
}
|
|
148
|
-
} catch {
|
|
149
|
-
}
|
|
150
162
|
try {
|
|
151
163
|
const manifestRes = await fetchDevProbe(`${normalizedBaseUrl}/`, {
|
|
152
164
|
headers: { "expo-platform": "ios" }
|
|
@@ -154,7 +166,8 @@ async function probeBaseUrlBundle(baseUrl, port) {
|
|
|
154
166
|
if (manifestRes.ok) {
|
|
155
167
|
const manifest = await manifestRes.json();
|
|
156
168
|
const client = manifest?.extra?.expoClient || manifest?.extra || {};
|
|
157
|
-
const
|
|
169
|
+
const rawLaunchUrl = typeof manifest?.launchAsset?.url === "string" ? manifest.launchAsset.url : void 0;
|
|
170
|
+
const launchUrl = rawLaunchUrl ? alignLoopbackBundleUrlWithProbe(rawLaunchUrl, normalizedBaseUrl) : void 0;
|
|
158
171
|
if (launchUrl || client.name) {
|
|
159
172
|
return {
|
|
160
173
|
bundleUrl: normalizeNativeDevBundleUrl(
|
|
@@ -184,8 +197,25 @@ async function probeBaseUrlBundle(baseUrl, port) {
|
|
|
184
197
|
}
|
|
185
198
|
return null;
|
|
186
199
|
}
|
|
200
|
+
async function probeBaseUrlBundle(baseUrl, port) {
|
|
201
|
+
try {
|
|
202
|
+
if (isLoopbackHost(new URL(baseUrl).hostname)) {
|
|
203
|
+
const viaScan = await resolvePortViaServerScan(port);
|
|
204
|
+
if (viaScan) return viaScan;
|
|
205
|
+
}
|
|
206
|
+
} catch {
|
|
207
|
+
}
|
|
208
|
+
return probeBaseUrlBundleDirect(baseUrl, port);
|
|
209
|
+
}
|
|
187
210
|
async function probePortBundle(port) {
|
|
188
|
-
|
|
211
|
+
const viaScan = await resolvePortViaServerScan(port);
|
|
212
|
+
if (viaScan) return viaScan;
|
|
213
|
+
const candidates = await Promise.all(
|
|
214
|
+
LOOPBACK_PROBE_HOSTNAMES.map(
|
|
215
|
+
(hostname) => probeBaseUrlBundleDirect(buildLoopbackProbeBaseUrl("http:", hostname, port), port)
|
|
216
|
+
)
|
|
217
|
+
);
|
|
218
|
+
return candidates.find((candidate) => candidate !== null) ?? null;
|
|
189
219
|
}
|
|
190
220
|
async function resolveConnectionInput(input) {
|
|
191
221
|
const trimmed = input.trim();
|
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.346 | (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;
|
|
@@ -199,8 +199,8 @@ function readPrivacyPreferences() {
|
|
|
199
199
|
const productAnalytics = settings?.productAnalytics;
|
|
200
200
|
const crashReports = settings?.crashReports;
|
|
201
201
|
return {
|
|
202
|
-
productAnalytics: typeof productAnalytics === "boolean" ? productAnalytics :
|
|
203
|
-
crashReports: typeof crashReports === "boolean" ? crashReports :
|
|
202
|
+
productAnalytics: typeof productAnalytics === "boolean" ? productAnalytics : false,
|
|
203
|
+
crashReports: typeof crashReports === "boolean" ? crashReports : false,
|
|
204
204
|
configured: typeof productAnalytics === "boolean" && typeof crashReports === "boolean"
|
|
205
205
|
};
|
|
206
206
|
}
|
|
@@ -275,6 +275,7 @@ function activeRuntimeDir() {
|
|
|
275
275
|
return null;
|
|
276
276
|
}
|
|
277
277
|
var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
|
|
278
|
+
var DAEMON_CLAIM_STALE_MS = 3e4;
|
|
278
279
|
function readDaemonLockfile() {
|
|
279
280
|
try {
|
|
280
281
|
const fd = import_node_fs.default.openSync(daemonLockfilePath(), "r");
|
|
@@ -370,10 +371,30 @@ function readLiveRuntimeVersions() {
|
|
|
370
371
|
}
|
|
371
372
|
function writeDaemonLockfile(data) {
|
|
372
373
|
ensureSootsimHome();
|
|
373
|
-
const
|
|
374
|
+
const lockfilePath = daemonLockfilePath();
|
|
375
|
+
const existing = readDaemonLockfile();
|
|
376
|
+
if (!existing) {
|
|
377
|
+
if (createDaemonLockfileExclusive(data)) return;
|
|
378
|
+
throw new Error("another rnx daemon claimed the lockfile before this write");
|
|
379
|
+
}
|
|
380
|
+
if (!sameDaemonOwner(existing, data)) {
|
|
381
|
+
throw new Error("refusing to overwrite another rnx daemon lockfile");
|
|
382
|
+
}
|
|
383
|
+
const tmp = `${lockfilePath}.${data.pid}.${(0, import_node_crypto.randomUUID)()}.tmp`;
|
|
374
384
|
import_node_fs.default.writeFileSync(tmp, `${JSON.stringify(data, null, 2)}
|
|
375
385
|
`, "utf8");
|
|
376
|
-
|
|
386
|
+
try {
|
|
387
|
+
const current = readDaemonLockfile();
|
|
388
|
+
if (!current || !sameDaemonOwner(current, data)) {
|
|
389
|
+
throw new Error("rnx daemon lock ownership changed during heartbeat");
|
|
390
|
+
}
|
|
391
|
+
import_node_fs.default.renameSync(tmp, lockfilePath);
|
|
392
|
+
} finally {
|
|
393
|
+
try {
|
|
394
|
+
import_node_fs.default.unlinkSync(tmp);
|
|
395
|
+
} catch {
|
|
396
|
+
}
|
|
397
|
+
}
|
|
377
398
|
}
|
|
378
399
|
function writeDevBridgeLockfile(data) {
|
|
379
400
|
import_node_fs.default.mkdirSync(devBridgesDir(), { recursive: true });
|
|
@@ -383,17 +404,130 @@ function writeDevBridgeLockfile(data) {
|
|
|
383
404
|
`, "utf8");
|
|
384
405
|
import_node_fs.default.renameSync(tmp, lockfilePath);
|
|
385
406
|
}
|
|
407
|
+
function sameDaemonOwner(left, right) {
|
|
408
|
+
return left.pid === right.pid && left.startedAt === right.startedAt;
|
|
409
|
+
}
|
|
410
|
+
function isAlreadyExists(error) {
|
|
411
|
+
return error instanceof Error && "code" in error && Reflect.get(error, "code") === "EEXIST";
|
|
412
|
+
}
|
|
413
|
+
function createDaemonLockfileExclusive(data) {
|
|
414
|
+
const lockfilePath = daemonLockfilePath();
|
|
415
|
+
const tmp = `${lockfilePath}.${data.pid}.${(0, import_node_crypto.randomUUID)()}.claim`;
|
|
416
|
+
import_node_fs.default.writeFileSync(tmp, `${JSON.stringify(data, null, 2)}
|
|
417
|
+
`, "utf8");
|
|
418
|
+
try {
|
|
419
|
+
import_node_fs.default.linkSync(tmp, lockfilePath);
|
|
420
|
+
return true;
|
|
421
|
+
} catch (error) {
|
|
422
|
+
if (isAlreadyExists(error)) return false;
|
|
423
|
+
throw error;
|
|
424
|
+
} finally {
|
|
425
|
+
try {
|
|
426
|
+
import_node_fs.default.unlinkSync(tmp);
|
|
427
|
+
} catch {
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
function daemonClaimPath() {
|
|
432
|
+
return `${daemonLockfilePath()}.claim`;
|
|
433
|
+
}
|
|
434
|
+
function parseDaemonClaim(raw) {
|
|
435
|
+
try {
|
|
436
|
+
const value = JSON.parse(raw);
|
|
437
|
+
if (value !== null && typeof value === "object" && typeof Reflect.get(value, "pid") === "number" && typeof Reflect.get(value, "startedAt") === "number" && typeof Reflect.get(value, "createdAt") === "number") {
|
|
438
|
+
return {
|
|
439
|
+
pid: Reflect.get(value, "pid"),
|
|
440
|
+
startedAt: Reflect.get(value, "startedAt"),
|
|
441
|
+
createdAt: Reflect.get(value, "createdAt")
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
} catch {
|
|
445
|
+
}
|
|
446
|
+
return null;
|
|
447
|
+
}
|
|
448
|
+
function readDaemonClaim() {
|
|
449
|
+
try {
|
|
450
|
+
return parseDaemonClaim(import_node_fs.default.readFileSync(daemonClaimPath(), "utf8"));
|
|
451
|
+
} catch {
|
|
452
|
+
return null;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
function isDaemonClaimFresh(claim, now = Date.now()) {
|
|
456
|
+
if (now - claim.createdAt > DAEMON_CLAIM_STALE_MS) return false;
|
|
457
|
+
try {
|
|
458
|
+
process.kill(claim.pid, 0);
|
|
459
|
+
return true;
|
|
460
|
+
} catch {
|
|
461
|
+
return false;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
function acquireDaemonClaim(data) {
|
|
465
|
+
const claim = {
|
|
466
|
+
pid: data.pid,
|
|
467
|
+
startedAt: data.startedAt,
|
|
468
|
+
createdAt: Date.now()
|
|
469
|
+
};
|
|
470
|
+
const serialized = `${JSON.stringify(claim)}
|
|
471
|
+
`;
|
|
472
|
+
for (let attempt = 0; attempt < 8; attempt++) {
|
|
473
|
+
try {
|
|
474
|
+
import_node_fs.default.writeFileSync(daemonClaimPath(), serialized, { encoding: "utf8", flag: "wx" });
|
|
475
|
+
return true;
|
|
476
|
+
} catch (error) {
|
|
477
|
+
if (!isAlreadyExists(error)) throw error;
|
|
478
|
+
}
|
|
479
|
+
const existing = readDaemonClaim();
|
|
480
|
+
if (existing && sameDaemonOwner(existing, claim)) return true;
|
|
481
|
+
if (existing && isDaemonClaimFresh(existing)) return false;
|
|
482
|
+
let before;
|
|
483
|
+
try {
|
|
484
|
+
before = import_node_fs.default.readFileSync(daemonClaimPath(), "utf8");
|
|
485
|
+
const latest = parseDaemonClaim(before);
|
|
486
|
+
if (latest && isDaemonClaimFresh(latest)) return false;
|
|
487
|
+
if (import_node_fs.default.readFileSync(daemonClaimPath(), "utf8") !== before) continue;
|
|
488
|
+
import_node_fs.default.unlinkSync(daemonClaimPath());
|
|
489
|
+
} catch {
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
return false;
|
|
493
|
+
}
|
|
494
|
+
function releaseDaemonClaim(owner) {
|
|
495
|
+
try {
|
|
496
|
+
const claim = readDaemonClaim();
|
|
497
|
+
if (!claim || !sameDaemonOwner(claim, owner)) return;
|
|
498
|
+
import_node_fs.default.unlinkSync(daemonClaimPath());
|
|
499
|
+
} catch {
|
|
500
|
+
}
|
|
501
|
+
}
|
|
386
502
|
function claimDaemonLockfile(data) {
|
|
387
503
|
ensureSootsimHome();
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
504
|
+
if (!acquireDaemonClaim(data)) return false;
|
|
505
|
+
try {
|
|
506
|
+
const existing = readDaemonLockfile();
|
|
507
|
+
if (existing && sameDaemonOwner(existing, data)) {
|
|
508
|
+
writeDaemonLockfile(data);
|
|
509
|
+
return true;
|
|
510
|
+
}
|
|
511
|
+
if (existing && isDaemonLockfileFresh(existing)) return false;
|
|
512
|
+
if (existing) {
|
|
513
|
+
const latest = readDaemonLockfile();
|
|
514
|
+
if (!latest || !sameDaemonOwner(latest, existing)) return false;
|
|
515
|
+
if (isDaemonLockfileFresh(latest)) return false;
|
|
516
|
+
try {
|
|
517
|
+
import_node_fs.default.unlinkSync(daemonLockfilePath());
|
|
518
|
+
} catch {
|
|
519
|
+
return false;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
return createDaemonLockfileExclusive(data);
|
|
523
|
+
} finally {
|
|
524
|
+
releaseDaemonClaim(data);
|
|
391
525
|
}
|
|
392
|
-
writeDaemonLockfile(data);
|
|
393
|
-
return true;
|
|
394
526
|
}
|
|
395
|
-
function removeDaemonLockfile() {
|
|
527
|
+
function removeDaemonLockfile(owner) {
|
|
396
528
|
try {
|
|
529
|
+
const lockfile = readDaemonLockfile();
|
|
530
|
+
if (!lockfile || !sameDaemonOwner(lockfile, owner)) return;
|
|
397
531
|
import_node_fs.default.unlinkSync(daemonLockfilePath());
|
|
398
532
|
} catch {
|
|
399
533
|
}
|