rnxsim 0.1.345 → 0.1.347
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 +9 -3
- package/cli/commands/welcome.ts +19 -17
- package/cli/outbound-endpoints.ts +1 -1
- package/dist-cli/bin.js +5 -5
- package/dist-cli/chunks/{agent-52G55XTO.js → agent-VVY2A5YV.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-BOZM43ON.js → agent-wrapper-YBMTZ3KU.js} +2 -2
- package/dist-cli/chunks/{app-fonts-A2L6V5EZ.js → app-fonts-EF7FM3VP.js} +2 -2
- package/dist-cli/chunks/{assert-CJKIP4LN.js → assert-J7N6WGMS.js} +2 -2
- package/dist-cli/chunks/{auth-VHHN3TOB.js → auth-YGX3WVEL.js} +2 -2
- package/dist-cli/chunks/{beta-EBDIGV3E.js → beta-JXYFAOHO.js} +2 -2
- package/dist-cli/chunks/{camera-5F4KKCQ3.js → camera-WIVF3UQ3.js} +2 -2
- package/dist-cli/chunks/{chunk-PLB6UVVX.js → chunk-23WNLQUB.js} +2 -2
- package/dist-cli/chunks/{chunk-KZFJNDH3.js → chunk-24Q4J4U6.js} +1 -1
- package/dist-cli/chunks/chunk-2E5KDIGN.js +14 -0
- package/dist-cli/chunks/{chunk-XJBFJGNT.js → chunk-2PAG4FBP.js} +2 -2
- package/dist-cli/chunks/{chunk-7LGINKM6.js → chunk-2UZ6QQ6S.js} +2 -2
- package/dist-cli/chunks/{chunk-7V4KPZ7O.js → chunk-2W4ME6YI.js} +2 -2
- package/dist-cli/chunks/{chunk-5GXRRUOA.js → chunk-3HBHHU5F.js} +3 -3
- package/dist-cli/chunks/{chunk-E2RGSCHT.js → chunk-3SPBSEVL.js} +1 -1
- package/dist-cli/chunks/{chunk-QNBBKRCA.js → chunk-4KK5IRA6.js} +2 -2
- package/dist-cli/chunks/{chunk-4OKV7T5D.js → chunk-4KOWLH77.js} +2 -2
- package/dist-cli/chunks/{chunk-DPP2M4AJ.js → chunk-4RI6KXVH.js} +1 -1
- package/dist-cli/chunks/{chunk-DHM3JDCK.js → chunk-6CGQWXXT.js} +2 -2
- package/dist-cli/chunks/{chunk-ZMTZ5G5H.js → chunk-7C6XE6AT.js} +2 -2
- package/dist-cli/chunks/{chunk-7YMQRA6L.js → chunk-7D56NCJ3.js} +2 -2
- package/dist-cli/chunks/{chunk-4ZILDTZX.js → chunk-ABBCVE5V.js} +2 -2
- package/dist-cli/chunks/{chunk-JC33TOAF.js → chunk-ANANQDHB.js} +1 -1
- package/dist-cli/chunks/{chunk-BFTDL2GX.js → chunk-BA45ZZKU.js} +2 -2
- package/dist-cli/chunks/{chunk-RB4VFUNM.js → chunk-BAXXUHKV.js} +2 -2
- package/dist-cli/chunks/{chunk-LAQGSSTT.js → chunk-DC4MQAR3.js} +1 -1
- package/dist-cli/chunks/{chunk-KA4PJNTE.js → chunk-DTNRKFSE.js} +2 -2
- package/dist-cli/chunks/{chunk-A2Q76LJV.js → chunk-EEZEVA2C.js} +2 -2
- package/dist-cli/chunks/{chunk-7UIIAHVU.js → chunk-EIIZZ2XK.js} +2 -2
- package/dist-cli/chunks/{chunk-TEU5NGUA.js → chunk-FQ3OHHCY.js} +2 -2
- package/dist-cli/chunks/{chunk-BCQV63BW.js → chunk-HWAGFGV7.js} +3 -3
- package/dist-cli/chunks/{chunk-XXZLK4BY.js → chunk-HY7XOD5E.js} +1 -1
- package/dist-cli/chunks/{chunk-T7SBFG5I.js → chunk-IQWQ6KI7.js} +2 -2
- package/dist-cli/chunks/{chunk-TMRD5MHL.js → chunk-IS2LT6MN.js} +2 -2
- package/dist-cli/chunks/{chunk-NUPRHZQW.js → chunk-JG2TIZ7E.js} +2 -2
- package/dist-cli/chunks/{chunk-YVSUFVVB.js → chunk-JKRVWCTC.js} +1 -1
- package/dist-cli/chunks/{chunk-3DBTS4MC.js → chunk-JP4FCK5J.js} +6 -6
- package/dist-cli/chunks/{chunk-RTDHX6CW.js → chunk-JQTBZERT.js} +2 -2
- package/dist-cli/chunks/{chunk-OPHT4DUO.js → chunk-KYTBJ2QV.js} +1 -1
- package/dist-cli/chunks/{chunk-63ASUHOV.js → chunk-LRRQI4TP.js} +2 -2
- package/dist-cli/chunks/{chunk-RT3DXTDP.js → chunk-LWE2HRS4.js} +2 -2
- package/dist-cli/chunks/{chunk-U5YHXQHH.js → chunk-NJ2JVAGV.js} +2 -2
- package/dist-cli/chunks/{chunk-4BIPA7MD.js → chunk-O7WPHIYQ.js} +1 -1
- package/dist-cli/chunks/{chunk-WPPGU5IK.js → chunk-OG3KGU4V.js} +2 -2
- package/dist-cli/chunks/{chunk-KH777UAO.js → chunk-PCU2CQCI.js} +3 -3
- package/dist-cli/chunks/{chunk-KRZPFXVN.js → chunk-QJYUHYQS.js} +1 -1
- package/dist-cli/chunks/{chunk-HK7YKH6N.js → chunk-QK2U5IW3.js} +2 -2
- package/dist-cli/chunks/{chunk-3N7M5HMJ.js → chunk-SMLCC5EP.js} +1 -1
- package/dist-cli/chunks/{chunk-QNRWPAOA.js → chunk-SNBSRIKO.js} +2 -2
- package/dist-cli/chunks/{chunk-R7ZNRGQN.js → chunk-SYQZTZTR.js} +1 -1
- package/dist-cli/chunks/{chunk-7GO2DSYQ.js → chunk-TAYE2YII.js} +1 -1
- package/dist-cli/chunks/{chunk-EPLVIDPC.js → chunk-U6CJ3EHB.js} +1 -1
- package/dist-cli/chunks/{chunk-GKGXULJK.js → chunk-UM7IG4DE.js} +2 -2
- package/dist-cli/chunks/{chunk-VLBN3KRC.js → chunk-VENH5KLL.js} +1 -1
- package/dist-cli/chunks/{chunk-P2CGGMU2.js → chunk-W4MASUQ7.js} +2 -2
- package/dist-cli/chunks/{chunk-WU72KL6Z.js → chunk-WIYBEKBM.js} +2 -2
- package/dist-cli/chunks/{chunk-LRM2XCEQ.js → chunk-WNZOJDBL.js} +1 -1
- package/dist-cli/chunks/{chunk-UVOEHIGP.js → chunk-XB7DLZNQ.js} +1 -1
- package/dist-cli/chunks/{chunk-PLUWN2V5.js → chunk-XGUCAKZM.js} +1 -1
- package/dist-cli/chunks/{chunk-DGTV3KOW.js → chunk-Z6K6TD7X.js} +1 -1
- package/dist-cli/chunks/{chunk-BHKSCNDC.js → chunk-ZPCQFQEN.js} +1 -1
- package/dist-cli/chunks/{chunk-HXE344V3.js → chunk-ZY44NCRQ.js} +1 -1
- package/dist-cli/chunks/{cleanup-MAVZJXVW.js → cleanup-ZIDQQLEN.js} +2 -2
- package/dist-cli/chunks/cli-version-BEJJXF35.js +4 -0
- package/dist-cli/chunks/{compat-7AURLGCS.js → compat-5PFPTBBK.js} +2 -2
- package/dist-cli/chunks/{config-TN3Y4J5N.js → config-CG73FOTM.js} +2 -2
- package/dist-cli/chunks/{control-EV2ELU5R.js → control-7IYIDOOI.js} +2 -2
- package/dist-cli/chunks/daemon-G6VR7LJI.js +4 -0
- package/dist-cli/chunks/{debug-JICITUB6.js → debug-6AQQXXE3.js} +3 -3
- package/dist-cli/chunks/{desktop-4F5HGLLX.js → desktop-HJE5B4XO.js} +3 -3
- package/dist-cli/chunks/{detox-ZC7NHLJI.js → detox-KUZ7EYOP.js} +2 -2
- package/dist-cli/chunks/{device-V57GHRXX.js → device-O6WI4PQT.js} +2 -2
- package/dist-cli/chunks/{diagnose-FF4IWYXC.js → diagnose-FTCJGH2Q.js} +2 -2
- package/dist-cli/chunks/{disk-cleanup-T277L6ZO.js → disk-cleanup-YAXG52EZ.js} +2 -2
- package/dist-cli/chunks/drivers-6QOL2SON.js +4 -0
- package/dist-cli/chunks/{film-G7ZAPWB7.js → film-KTLKRCJR.js} +3 -3
- package/dist-cli/chunks/flow-6VQN4VNW.js +4 -0
- package/dist-cli/chunks/help-22OURA2E.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-VSJNNSNI.js → hidden-runtime-alias-W375XBOM.js} +2 -2
- package/dist-cli/chunks/{home-paths-75HP3HKA.js → home-paths-CIGRWLDB.js} +2 -2
- package/dist-cli/chunks/inspect-36A2IEJL.js +4 -0
- package/dist-cli/chunks/install-desktop-KOW3XXUF.js +4 -0
- package/dist-cli/chunks/{login-ZSIHGHUK.js → login-AJWLXLPQ.js} +2 -2
- package/dist-cli/chunks/{logout-Q4DXMI2C.js → logout-CEJLZIOI.js} +2 -2
- package/dist-cli/chunks/{maestro-LE5LCRBL.js → maestro-YF4M6M6L.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-D3ZIJCRL.js → maestro-generate-FJWDLMEB.js} +3 -3
- package/dist-cli/chunks/{mode-BWX6MDPJ.js → mode-6BJ523BY.js} +2 -2
- package/dist-cli/chunks/{optional-demo-registry-6CVASL3S.js → optional-demo-registry-5CKCN2TP.js} +2 -2
- package/dist-cli/chunks/{perf-NXQZISN6.js → perf-WE6QTFJU.js} +2 -2
- package/dist-cli/chunks/{permissions-5PD67RRO.js → permissions-OZZZZFPB.js} +2 -2
- package/dist-cli/chunks/privacy-3BERNBUM.js +4 -0
- package/dist-cli/chunks/{record-YJF4KXMR.js → record-QHQS2524.js} +3 -3
- package/dist-cli/chunks/{report-issue-XOL5FQBG.js → report-issue-SEMVVJUH.js} +2 -2
- package/dist-cli/chunks/reset-A5AA5ML6.js +4 -0
- package/dist-cli/chunks/runtime-R26QWA2M.js +4 -0
- package/dist-cli/chunks/{screenshot-command-VRPJXWFS.js → screenshot-command-WW33MAB3.js} +3 -3
- package/dist-cli/chunks/{screenshot-layers-QP4WA2F5.js → screenshot-layers-2GJTEQ4T.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-O2IBAVSP.js → screenshots-capture-J5HKONCC.js} +2 -2
- package/dist-cli/chunks/{serve-WC6RZNJL.js → serve-FEBNDKUD.js} +2 -2
- package/dist-cli/chunks/{setup-A6BIG3KL.js → setup-NGZWS373.js} +2 -2
- package/dist-cli/chunks/{skills-A7YC6RL5.js → skills-CFCZFEME.js} +2 -2
- package/dist-cli/chunks/{state-IJI5YROJ.js → state-XWRKK7FW.js} +2 -2
- package/dist-cli/chunks/{storage-Z2DBO2PQ.js → storage-C5GNK4XB.js} +2 -2
- package/dist-cli/chunks/store-L3A4CLND.js +4 -0
- package/dist-cli/chunks/telemetry-O67J22QU.js +4 -0
- package/dist-cli/chunks/{timeline-N7V2M6QA.js → timeline-7RA7ZILQ.js} +2 -2
- package/dist-cli/chunks/{upgrade-P2NH3BOR.js → upgrade-ZW6IJ5LX.js} +2 -2
- package/dist-cli/chunks/upload-UKUN6HCD.js +4 -0
- package/dist-cli/chunks/{version-OUHCSCUS.js → version-N3E4OIMM.js} +2 -2
- package/dist-cli/chunks/{web-6NRTF3UV.js → web-UC2SFEBA.js} +2 -2
- package/dist-cli/chunks/welcome-DAZPCMES.js +5 -0
- package/dist-cli/chunks/{what-happened-FUEL3BEF.js → what-happened-VUNKID5W.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 +26 -10
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +101 -58
- 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 +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- 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 +106 -59
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +127 -72
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/scripts/dev-server-scanner.ts +101 -47
- package/src/backend-origin.ts +15 -1
- package/src/dev-bundle-resolution.ts +29 -12
- package/dist-cli/chunks/chunk-TOF5TA5X.js +0 -14
- package/dist-cli/chunks/cli-version-2B4KRNML.js +0 -4
- package/dist-cli/chunks/daemon-KKDG5MYR.js +0 -4
- package/dist-cli/chunks/drivers-LCX7S76X.js +0 -4
- package/dist-cli/chunks/flow-ONZGGFGD.js +0 -4
- package/dist-cli/chunks/help-DROVDXJM.js +0 -4
- package/dist-cli/chunks/inspect-MDA7ESGQ.js +0 -4
- package/dist-cli/chunks/install-desktop-EIVZHIFA.js +0 -4
- package/dist-cli/chunks/privacy-H5KNRNIZ.js +0 -4
- package/dist-cli/chunks/reset-5LZN5P5B.js +0 -4
- package/dist-cli/chunks/runtime-U36VWBH3.js +0 -4
- package/dist-cli/chunks/store-BYTCKNIC.js +0 -4
- package/dist-cli/chunks/telemetry-JLHFMD7N.js +0 -4
- package/dist-cli/chunks/upload-Z2WX5DCD.js +0 -4
- package/dist-cli/chunks/welcome-6RS7PEJW.js +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.347 | (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;
|
|
@@ -53,6 +53,21 @@ var import_net = __toESM(require("net"), 1);
|
|
|
53
53
|
var import_node_path3 = require("node:path");
|
|
54
54
|
var import_util = require("util");
|
|
55
55
|
|
|
56
|
+
// src/backend-origin.ts
|
|
57
|
+
var LOOPBACK_PROBE_HOSTNAMES = ["::1", "127.0.0.1"];
|
|
58
|
+
function normalizeHostname(hostname) {
|
|
59
|
+
return hostname.replace(/^\[|\]$/g, "").toLowerCase();
|
|
60
|
+
}
|
|
61
|
+
function buildLoopbackProbeBaseUrl(protocol, hostname, port) {
|
|
62
|
+
const normalizedHostname = normalizeHostname(hostname);
|
|
63
|
+
const urlHost = normalizedHostname.includes(":") ? `[${normalizedHostname}]` : normalizedHostname;
|
|
64
|
+
return `${protocol}//${urlHost}:${port}`;
|
|
65
|
+
}
|
|
66
|
+
function isLoopbackHost(hostname) {
|
|
67
|
+
const normalized = normalizeHostname(hostname);
|
|
68
|
+
return normalized === "localhost" || normalized.endsWith(".localhost") || normalized === "0.0.0.0" || normalized === "::1" || /^127(?:\.\d{1,3}){3}$/.test(normalized);
|
|
69
|
+
}
|
|
70
|
+
|
|
56
71
|
// src/config.ts
|
|
57
72
|
var SOOTSIM_CONFIG_QUERY_PARAM = "sootsimConfig";
|
|
58
73
|
function hasOwnKeys(value) {
|
|
@@ -72,15 +87,6 @@ function applySootSimConfigToUrl(url, config) {
|
|
|
72
87
|
return parsed.toString();
|
|
73
88
|
}
|
|
74
89
|
|
|
75
|
-
// src/backend-origin.ts
|
|
76
|
-
function normalizeHostname(hostname) {
|
|
77
|
-
return hostname.replace(/^\[|\]$/g, "").toLowerCase();
|
|
78
|
-
}
|
|
79
|
-
function isLoopbackHost(hostname) {
|
|
80
|
-
const normalized = normalizeHostname(hostname);
|
|
81
|
-
return normalized === "localhost" || normalized.endsWith(".localhost") || normalized === "0.0.0.0" || normalized === "::1" || /^127(?:\.\d{1,3}){3}$/.test(normalized);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
90
|
// src/native-dev-bundle-url.ts
|
|
85
91
|
function isAbsoluteHttpUrl(url) {
|
|
86
92
|
return /^https?:\/\//i.test(url);
|
|
@@ -516,27 +522,36 @@ var execP = (0, import_util.promisify)(import_child_process.exec);
|
|
|
516
522
|
var TIMEOUT_MS = 250;
|
|
517
523
|
var MANIFEST_TIMEOUT_MS = 1500;
|
|
518
524
|
var TCP_GATE_MS = 120;
|
|
519
|
-
function tcpPing(port, timeout = TCP_GATE_MS) {
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
525
|
+
async function tcpPing(port, timeout = TCP_GATE_MS) {
|
|
526
|
+
try {
|
|
527
|
+
return await Promise.any(
|
|
528
|
+
LOOPBACK_PROBE_HOSTNAMES.map(
|
|
529
|
+
(hostname) => new Promise((resolve2, reject) => {
|
|
530
|
+
const sock = new import_net.default.Socket();
|
|
531
|
+
let settled = false;
|
|
532
|
+
const done = (reachable) => {
|
|
533
|
+
if (settled) return;
|
|
534
|
+
settled = true;
|
|
535
|
+
sock.destroy();
|
|
536
|
+
if (reachable) resolve2(hostname);
|
|
537
|
+
else reject(new Error(`unreachable loopback host ${hostname}`));
|
|
538
|
+
};
|
|
539
|
+
sock.setTimeout(timeout);
|
|
540
|
+
sock.once("connect", () => done(true));
|
|
541
|
+
sock.once("timeout", () => done(false));
|
|
542
|
+
sock.once("error", () => done(false));
|
|
543
|
+
sock.connect(port, hostname);
|
|
544
|
+
})
|
|
545
|
+
)
|
|
546
|
+
);
|
|
547
|
+
} catch {
|
|
548
|
+
return null;
|
|
549
|
+
}
|
|
535
550
|
}
|
|
536
|
-
function httpGet(port, path, method = "GET", timeout = TIMEOUT_MS, headers = {}) {
|
|
551
|
+
function httpGet(hostname, port, path, method = "GET", timeout = TIMEOUT_MS, headers = {}) {
|
|
537
552
|
return new Promise((resolve2) => {
|
|
538
553
|
const req = import_http.default.request(
|
|
539
|
-
{ hostname
|
|
554
|
+
{ hostname, port, path, method, timeout, headers },
|
|
540
555
|
(res) => {
|
|
541
556
|
let body = "";
|
|
542
557
|
res.on("data", (c) => body += c.toString());
|
|
@@ -548,7 +563,12 @@ function httpGet(port, path, method = "GET", timeout = TIMEOUT_MS, headers = {})
|
|
|
548
563
|
})();
|
|
549
564
|
res.on(
|
|
550
565
|
"end",
|
|
551
|
-
() => resolve2({
|
|
566
|
+
() => resolve2({
|
|
567
|
+
statusCode: res.statusCode || 0,
|
|
568
|
+
body,
|
|
569
|
+
contentType,
|
|
570
|
+
hostname
|
|
571
|
+
})
|
|
552
572
|
);
|
|
553
573
|
}
|
|
554
574
|
);
|
|
@@ -704,16 +724,16 @@ async function resolveProcessCwd(pid) {
|
|
|
704
724
|
}
|
|
705
725
|
return null;
|
|
706
726
|
}
|
|
707
|
-
function makeResult(port, framework, owner) {
|
|
727
|
+
function makeResult(hostname, port, framework, owner) {
|
|
708
728
|
return {
|
|
709
729
|
port,
|
|
710
730
|
framework,
|
|
711
731
|
bundleUrl: withRuntimeConfig(
|
|
712
732
|
port,
|
|
713
|
-
|
|
733
|
+
`${buildLoopbackProbeBaseUrl("http:", hostname, port)}/index.bundle?platform=ios&dev=true&hot=true&minify=false`,
|
|
714
734
|
owner.cwd
|
|
715
735
|
),
|
|
716
|
-
hmrUrl:
|
|
736
|
+
hmrUrl: `${buildLoopbackProbeBaseUrl("ws:", hostname, port)}/hot`,
|
|
717
737
|
lastSeen: Date.now(),
|
|
718
738
|
...owner
|
|
719
739
|
};
|
|
@@ -745,7 +765,10 @@ function applyManifest(result, manifestRes, buildIconProxyUrl) {
|
|
|
745
765
|
if (client.ios?.bundleIdentifier) result.bundleId = client.ios.bundleIdentifier;
|
|
746
766
|
if (result.framework === "metro" && client.sdkVersion) result.framework = "expo";
|
|
747
767
|
const rawLaunchUrl = manifest?.launchAsset?.url;
|
|
748
|
-
const launchUrl = typeof rawLaunchUrl === "string" ? alignLoopbackBundleUrlWithProbe(
|
|
768
|
+
const launchUrl = typeof rawLaunchUrl === "string" ? alignLoopbackBundleUrlWithProbe(
|
|
769
|
+
rawLaunchUrl,
|
|
770
|
+
buildLoopbackProbeBaseUrl("http:", manifestRes.hostname, result.port)
|
|
771
|
+
) : rawLaunchUrl;
|
|
749
772
|
if (launchUrl && !result.patched && !isDirectOneBundleUrl(result.bundleUrl)) {
|
|
750
773
|
result.bundleUrl = withRuntimeConfig(result.port, launchUrl, result.cwd);
|
|
751
774
|
}
|
|
@@ -758,11 +781,11 @@ function applyManifest(result, manifestRes, buildIconProxyUrl) {
|
|
|
758
781
|
} else {
|
|
759
782
|
const cleanPath = rawIconUrl.replace(/^\.\//, "");
|
|
760
783
|
result.iconUrl = buildIconProxyUrl(
|
|
761
|
-
|
|
784
|
+
`${buildLoopbackProbeBaseUrl("http:", manifestRes.hostname, result.port)}/assets/${cleanPath}`
|
|
762
785
|
);
|
|
763
786
|
}
|
|
764
787
|
} else {
|
|
765
|
-
result.iconUrl = rawIconUrl.startsWith("http") ? rawIconUrl :
|
|
788
|
+
result.iconUrl = rawIconUrl.startsWith("http") ? rawIconUrl : `${buildLoopbackProbeBaseUrl("http:", manifestRes.hostname, result.port)}/assets/${rawIconUrl.replace(/^\.\//, "")}`;
|
|
766
789
|
}
|
|
767
790
|
}
|
|
768
791
|
} catch {
|
|
@@ -770,7 +793,11 @@ function applyManifest(result, manifestRes, buildIconProxyUrl) {
|
|
|
770
793
|
return result;
|
|
771
794
|
}
|
|
772
795
|
function __applyManifestForTests(result, manifestBody) {
|
|
773
|
-
return applyManifest(result, {
|
|
796
|
+
return applyManifest(result, {
|
|
797
|
+
statusCode: 200,
|
|
798
|
+
body: manifestBody,
|
|
799
|
+
hostname: new URL(result.bundleUrl).hostname
|
|
800
|
+
});
|
|
774
801
|
}
|
|
775
802
|
var ENRICH_TIMEOUT_MS = 2e4;
|
|
776
803
|
var enrichmentCache = /* @__PURE__ */ new Map();
|
|
@@ -789,38 +816,51 @@ function enrichWithManifest(result, buildIconProxyUrl) {
|
|
|
789
816
|
}
|
|
790
817
|
if (!enrichmentInFlight.has(result.port)) {
|
|
791
818
|
enrichmentInFlight.add(result.port);
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
() => enrichmentInFlight.delete(port)
|
|
819
|
+
void fetchManifestEnrichment(result, buildIconProxyUrl).finally(
|
|
820
|
+
() => enrichmentInFlight.delete(result.port)
|
|
795
821
|
);
|
|
796
822
|
}
|
|
797
823
|
return result;
|
|
798
824
|
}
|
|
799
|
-
async function fetchManifestEnrichment(
|
|
800
|
-
const
|
|
801
|
-
|
|
802
|
-
|
|
825
|
+
async function fetchManifestEnrichment(result, buildIconProxyUrl) {
|
|
826
|
+
const hostname = normalizeHostname(new URL(result.bundleUrl).hostname);
|
|
827
|
+
const manifestRes = await httpGet(
|
|
828
|
+
hostname,
|
|
829
|
+
result.port,
|
|
830
|
+
"/",
|
|
831
|
+
"GET",
|
|
832
|
+
ENRICH_TIMEOUT_MS,
|
|
833
|
+
{
|
|
834
|
+
"expo-platform": "ios"
|
|
835
|
+
}
|
|
836
|
+
);
|
|
803
837
|
if (!manifestRes || manifestRes.statusCode !== 200) return;
|
|
804
838
|
const parsed = applyManifest(
|
|
805
|
-
{
|
|
839
|
+
{
|
|
840
|
+
port: result.port,
|
|
841
|
+
framework: "one",
|
|
842
|
+
bundleUrl: `${buildLoopbackProbeBaseUrl("http:", hostname, result.port)}/index.bundle`,
|
|
843
|
+
lastSeen: 0
|
|
844
|
+
},
|
|
806
845
|
manifestRes,
|
|
807
846
|
buildIconProxyUrl
|
|
808
847
|
);
|
|
809
848
|
if (!parsed.projectName && !parsed.iconUrl) return;
|
|
810
|
-
enrichmentCache.set(port, {
|
|
849
|
+
enrichmentCache.set(result.port, {
|
|
811
850
|
projectName: parsed.projectName,
|
|
812
851
|
iconUrl: parsed.iconUrl,
|
|
813
852
|
iconPath: parsed.iconPath,
|
|
814
853
|
bundleId: parsed.bundleId
|
|
815
854
|
});
|
|
816
|
-
portCache.delete(port);
|
|
855
|
+
portCache.delete(result.port);
|
|
817
856
|
}
|
|
818
857
|
var knownNonPatched = /* @__PURE__ */ new Set();
|
|
819
858
|
var knownNonExpo = /* @__PURE__ */ new Set();
|
|
820
859
|
var knownOne = /* @__PURE__ */ new Set();
|
|
821
860
|
async function probePort(port, buildIconProxyUrl, listeningProcess) {
|
|
822
861
|
await loadOptionalDemoApps();
|
|
823
|
-
|
|
862
|
+
const probeHostname = await tcpPing(port);
|
|
863
|
+
if (!probeHostname) return null;
|
|
824
864
|
const suppliedPid = listeningProcess?.pid;
|
|
825
865
|
const ownerPid = suppliedPid && suppliedPid > 0 ? suppliedPid : await resolveListeningPid(port);
|
|
826
866
|
const ownerCwd = ownerPid ? await resolveProcessCwd(ownerPid) : null;
|
|
@@ -830,10 +870,12 @@ async function probePort(port, buildIconProxyUrl, listeningProcess) {
|
|
|
830
870
|
};
|
|
831
871
|
const onePath = `/node_modules/one/metro-entry.bundle?platform=ios&dev=true`;
|
|
832
872
|
const [sootsimRes, statusRes, manifestRes, expoRes] = await Promise.all([
|
|
833
|
-
knownNonPatched.has(port) ? Promise.resolve(null) : httpGet(port, "/__soot/"),
|
|
834
|
-
httpGet(port, "/status"),
|
|
835
|
-
knownOne.has(port) ? Promise.resolve(null) : httpGet(port, "/", "GET", MANIFEST_TIMEOUT_MS, {
|
|
836
|
-
|
|
873
|
+
knownNonPatched.has(port) ? Promise.resolve(null) : httpGet(probeHostname, port, "/__soot/"),
|
|
874
|
+
httpGet(probeHostname, port, "/status"),
|
|
875
|
+
knownOne.has(port) ? Promise.resolve(null) : httpGet(probeHostname, port, "/", "GET", MANIFEST_TIMEOUT_MS, {
|
|
876
|
+
"expo-platform": "ios"
|
|
877
|
+
}),
|
|
878
|
+
knownNonExpo.has(port) ? Promise.resolve(null) : httpGet(probeHostname, port, "/_expo/status")
|
|
837
879
|
]);
|
|
838
880
|
if (expoRes && expoRes.statusCode === 200) {
|
|
839
881
|
knownNonExpo.delete(port);
|
|
@@ -845,7 +887,7 @@ async function probePort(port, buildIconProxyUrl, listeningProcess) {
|
|
|
845
887
|
const manifestClient = manifestParsed?.extra?.expoClient || manifestParsed?.extra || {};
|
|
846
888
|
if (manifestParsed && (manifestLaunchUrl || typeof manifestClient.name === "string")) {
|
|
847
889
|
knownNonPatched.add(port);
|
|
848
|
-
const launchUrl = manifestLaunchUrl ||
|
|
890
|
+
const launchUrl = manifestLaunchUrl || `${buildLoopbackProbeBaseUrl("http:", probeHostname, port)}/index.bundle?platform=ios&dev=true&hot=true&minify=false`;
|
|
849
891
|
const framework = launchUrl.includes(
|
|
850
892
|
"/one/metro-entry.bundle"
|
|
851
893
|
) ? "one" : "expo";
|
|
@@ -854,7 +896,7 @@ async function probePort(port, buildIconProxyUrl, listeningProcess) {
|
|
|
854
896
|
port,
|
|
855
897
|
framework,
|
|
856
898
|
bundleUrl: withRuntimeConfig(port, launchUrl, owner.cwd),
|
|
857
|
-
hmrUrl:
|
|
899
|
+
hmrUrl: `${buildLoopbackProbeBaseUrl("ws:", probeHostname, port)}/hot`,
|
|
858
900
|
lastSeen: Date.now(),
|
|
859
901
|
...owner
|
|
860
902
|
},
|
|
@@ -866,7 +908,12 @@ async function probePort(port, buildIconProxyUrl, listeningProcess) {
|
|
|
866
908
|
knownNonPatched.add(port);
|
|
867
909
|
return enrichWithManifest(
|
|
868
910
|
applyManifest(
|
|
869
|
-
makeResult(
|
|
911
|
+
makeResult(
|
|
912
|
+
probeHostname,
|
|
913
|
+
port,
|
|
914
|
+
expoRes && expoRes.statusCode === 200 ? "expo" : "metro",
|
|
915
|
+
owner
|
|
916
|
+
),
|
|
870
917
|
manifestRes,
|
|
871
918
|
buildIconProxyUrl
|
|
872
919
|
),
|
|
@@ -882,10 +929,10 @@ async function probePort(port, buildIconProxyUrl, listeningProcess) {
|
|
|
882
929
|
framework: "one",
|
|
883
930
|
bundleUrl: withRuntimeConfig(
|
|
884
931
|
port,
|
|
885
|
-
|
|
932
|
+
`${buildLoopbackProbeBaseUrl("http:", probeHostname, port)}/__soot/bundle.js`,
|
|
886
933
|
owner.cwd
|
|
887
934
|
),
|
|
888
|
-
hmrUrl:
|
|
935
|
+
hmrUrl: `${buildLoopbackProbeBaseUrl("ws:", probeHostname, port)}/hot`,
|
|
889
936
|
lastSeen: Date.now(),
|
|
890
937
|
patched: true,
|
|
891
938
|
...owner
|
|
@@ -900,7 +947,7 @@ async function probePort(port, buildIconProxyUrl, listeningProcess) {
|
|
|
900
947
|
if (looksLikeMetroPackager) {
|
|
901
948
|
return null;
|
|
902
949
|
}
|
|
903
|
-
const oneRes = await httpGet(port, onePath, "HEAD");
|
|
950
|
+
const oneRes = await httpGet(probeHostname, port, onePath, "HEAD");
|
|
904
951
|
if (oneRes && oneRes.statusCode > 0 && oneRes.statusCode < 400 && /application\/javascript/i.test(oneRes.contentType || "")) {
|
|
905
952
|
knownNonPatched.add(port);
|
|
906
953
|
knownOne.add(port);
|
|
@@ -911,10 +958,10 @@ async function probePort(port, buildIconProxyUrl, listeningProcess) {
|
|
|
911
958
|
framework: "one",
|
|
912
959
|
bundleUrl: withRuntimeConfig(
|
|
913
960
|
port,
|
|
914
|
-
|
|
961
|
+
`${buildLoopbackProbeBaseUrl("http:", probeHostname, port)}${onePath}&minify=false`,
|
|
915
962
|
owner.cwd
|
|
916
963
|
),
|
|
917
|
-
hmrUrl:
|
|
964
|
+
hmrUrl: `${buildLoopbackProbeBaseUrl("ws:", probeHostname, port)}/hot`,
|
|
918
965
|
lastSeen: Date.now(),
|
|
919
966
|
...owner
|
|
920
967
|
},
|
package/dist-lib/sdk.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.347 | (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.347 | (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);
|