rnxsim 0.1.427 → 0.1.429
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/commands/control.ts +17 -1
- package/cli/commands/flow.ts +5 -9
- package/cli/commands/inspect/core.ts +1 -0
- package/cli/outbound-endpoints.ts +5 -2
- package/cli/self-invocation.ts +24 -0
- package/detox/index.ts +10 -36
- package/dist-lib/agent-daemon-client.cjs +48 -24
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +100 -76
- 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-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +2 -25
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +324 -218
- 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 +162 -78
- 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-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +43 -24
- package/dist-lib/metro-production-bundle.mjs +43 -24
- 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 +452 -336
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/host/websocket-proxy.ts +197 -92
- package/src/metro-production-bundle.ts +55 -30
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.429 | (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.429 | (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.429 | (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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.429 | (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.429 | (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;
|
|
@@ -22,13 +22,19 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
// src/host/websocket-proxy.ts
|
|
23
23
|
var websocket_proxy_exports = {};
|
|
24
24
|
__export(websocket_proxy_exports, {
|
|
25
|
+
WEBSOCKET_PROXY_HANDSHAKE_TIMEOUT_MS: () => WEBSOCKET_PROXY_HANDSHAKE_TIMEOUT_MS,
|
|
25
26
|
WEBSOCKET_PROXY_PATH: () => WEBSOCKET_PROXY_PATH,
|
|
26
27
|
handleWebSocketProxyUpgrade: () => handleWebSocketProxyUpgrade,
|
|
27
28
|
isWebSocketProxyRequestUrl: () => isWebSocketProxyRequestUrl
|
|
28
29
|
});
|
|
29
30
|
module.exports = __toCommonJS(websocket_proxy_exports);
|
|
30
|
-
var
|
|
31
|
+
var import_crypto = require("crypto");
|
|
32
|
+
var import_http = require("http");
|
|
33
|
+
var import_https = require("https");
|
|
31
34
|
var WEBSOCKET_PROXY_PATH = "/__websocket-proxy";
|
|
35
|
+
var WEBSOCKET_PROXY_HANDSHAKE_TIMEOUT_MS = 1e4;
|
|
36
|
+
var WEBSOCKET_PROTOCOL_TOKEN = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
37
|
+
var WEBSOCKET_KEY = /^[+/0-9A-Za-z]{22}==$/;
|
|
32
38
|
var STRIP_UPSTREAM_HEADERS = /* @__PURE__ */ new Set([
|
|
33
39
|
"host",
|
|
34
40
|
"connection",
|
|
@@ -41,20 +47,62 @@ var STRIP_UPSTREAM_HEADERS = /* @__PURE__ */ new Set([
|
|
|
41
47
|
"sec-websocket-protocol",
|
|
42
48
|
"sec-websocket-version"
|
|
43
49
|
]);
|
|
44
|
-
function rejectUpgrade(socket, status, message) {
|
|
50
|
+
function rejectUpgrade(socket, status, message, headers = {}) {
|
|
45
51
|
try {
|
|
52
|
+
const extraHeaders = Object.entries(headers).map(([name, value]) => `${name}: ${value}\r
|
|
53
|
+
`).join("");
|
|
46
54
|
socket.write(
|
|
47
55
|
`HTTP/1.1 ${status} ${message}\r
|
|
48
56
|
Connection: close\r
|
|
49
57
|
Content-Type: text/plain\r
|
|
50
58
|
Content-Length: ${message.length}\r
|
|
51
|
-
\r
|
|
59
|
+
${extraHeaders}\r
|
|
52
60
|
${message}`
|
|
53
61
|
);
|
|
54
62
|
} catch {
|
|
55
63
|
}
|
|
56
64
|
socket.destroy();
|
|
57
65
|
}
|
|
66
|
+
function hasHeaderToken(value, token) {
|
|
67
|
+
return (value || "").split(",").some((part) => part.trim().toLowerCase() === token);
|
|
68
|
+
}
|
|
69
|
+
function hasValidProtocolOffer(value) {
|
|
70
|
+
if (value === void 0) return true;
|
|
71
|
+
if (!WEBSOCKET_PROTOCOL_TOKEN.test(value[0] || "")) return false;
|
|
72
|
+
if (!WEBSOCKET_PROTOCOL_TOKEN.test(value[value.length - 1] || "")) return false;
|
|
73
|
+
const protocols = /* @__PURE__ */ new Set();
|
|
74
|
+
for (const part of value.split(",")) {
|
|
75
|
+
const protocol = part.trim();
|
|
76
|
+
if (!WEBSOCKET_PROTOCOL_TOKEN.test(protocol) || protocols.has(protocol)) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
protocols.add(protocol);
|
|
80
|
+
}
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
function validateUpgradeRequest(req) {
|
|
84
|
+
if (req.method !== "GET") {
|
|
85
|
+
return { status: 405, message: "invalid websocket http method" };
|
|
86
|
+
}
|
|
87
|
+
if (!hasHeaderToken(req.headers.connection, "upgrade") || !hasHeaderToken(req.headers.upgrade, "websocket")) {
|
|
88
|
+
return { status: 400, message: "invalid websocket upgrade headers" };
|
|
89
|
+
}
|
|
90
|
+
const key = req.headers["sec-websocket-key"];
|
|
91
|
+
if (typeof key !== "string" || !WEBSOCKET_KEY.test(key) || Buffer.from(key, "base64").byteLength !== 16 || Buffer.from(key, "base64").toString("base64") !== key) {
|
|
92
|
+
return { status: 400, message: "invalid websocket key" };
|
|
93
|
+
}
|
|
94
|
+
if (req.headers["sec-websocket-version"] !== "13") {
|
|
95
|
+
return {
|
|
96
|
+
status: 400,
|
|
97
|
+
message: "invalid websocket version",
|
|
98
|
+
headers: { "Sec-WebSocket-Version": "13" }
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
if (!hasValidProtocolOffer(req.headers["sec-websocket-protocol"])) {
|
|
102
|
+
return { status: 400, message: "invalid websocket protocol offer" };
|
|
103
|
+
}
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
58
106
|
function isSameOriginUpgrade(req) {
|
|
59
107
|
const origin = req.headers.origin;
|
|
60
108
|
const host = req.headers.host;
|
|
@@ -84,61 +132,29 @@ function getDefaultWebSocketOrigin(targetUrl) {
|
|
|
84
132
|
origin.protocol = targetUrl.protocol === "wss:" ? "https:" : "http:";
|
|
85
133
|
return origin.origin;
|
|
86
134
|
}
|
|
87
|
-
function
|
|
88
|
-
const header = req.headers["sec-websocket-protocol"];
|
|
89
|
-
const value = Array.isArray(header) ? header.join(",") : header || "";
|
|
90
|
-
return value.split(",").map((part) => part.trim()).filter(Boolean);
|
|
91
|
-
}
|
|
92
|
-
function safeClose(ws, code, reason) {
|
|
93
|
-
if (ws.readyState === import_ws.WebSocket.CLOSED || ws.readyState === import_ws.WebSocket.CLOSING) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
try {
|
|
97
|
-
ws.close(code, reason);
|
|
98
|
-
} catch {
|
|
99
|
-
ws.terminate();
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
function connectProxyPair(clientWs, upstream) {
|
|
103
|
-
let closing = false;
|
|
104
|
-
const closeBoth = (source, target, code, reason) => {
|
|
105
|
-
if (closing) return;
|
|
106
|
-
closing = true;
|
|
107
|
-
safeClose(target, code, reason.toString());
|
|
108
|
-
if (source.readyState === import_ws.WebSocket.OPEN) {
|
|
109
|
-
safeClose(source, code, reason.toString());
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
clientWs.on("message", (data, isBinary) => {
|
|
113
|
-
if (upstream.readyState === import_ws.WebSocket.OPEN) {
|
|
114
|
-
upstream.send(data, { binary: isBinary });
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
upstream.on("message", (data, isBinary) => {
|
|
118
|
-
if (clientWs.readyState === import_ws.WebSocket.OPEN) {
|
|
119
|
-
clientWs.send(data, { binary: isBinary });
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
clientWs.on("close", (code, reason) => closeBoth(clientWs, upstream, code, reason));
|
|
123
|
-
upstream.on("close", (code, reason) => closeBoth(upstream, clientWs, code, reason));
|
|
124
|
-
clientWs.on("error", () => safeClose(upstream, 1011, "proxy client error"));
|
|
125
|
-
upstream.on("error", () => safeClose(clientWs, 1011, "upstream websocket error"));
|
|
126
|
-
}
|
|
127
|
-
function createUpstreamWebSocket(targetUrl, protocols, headers, forwardOrigin) {
|
|
135
|
+
function createUpstreamHeaders(req, targetUrl, headers, forwardOrigin) {
|
|
128
136
|
const upstreamHeaders = { ...headers };
|
|
129
137
|
const originKeys = Object.keys(upstreamHeaders).filter(
|
|
130
|
-
(
|
|
138
|
+
(key2) => key2.toLowerCase() === "origin"
|
|
131
139
|
);
|
|
132
140
|
if (forwardOrigin && originKeys.length === 0) {
|
|
133
141
|
upstreamHeaders.origin = getDefaultWebSocketOrigin(targetUrl);
|
|
134
142
|
} else if (!forwardOrigin) {
|
|
135
|
-
for (const
|
|
143
|
+
for (const key2 of originKeys) delete upstreamHeaders[key2];
|
|
136
144
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
145
|
+
upstreamHeaders.connection = "Upgrade";
|
|
146
|
+
upstreamHeaders.upgrade = "websocket";
|
|
147
|
+
const key = req.headers["sec-websocket-key"];
|
|
148
|
+
if (typeof key === "string") upstreamHeaders["sec-websocket-key"] = key;
|
|
149
|
+
const version = req.headers["sec-websocket-version"];
|
|
150
|
+
if (typeof version === "string") upstreamHeaders["sec-websocket-version"] = version;
|
|
151
|
+
const protocol = req.headers["sec-websocket-protocol"];
|
|
152
|
+
if (typeof protocol === "string") upstreamHeaders["sec-websocket-protocol"] = protocol;
|
|
153
|
+
const extensions = req.headers["sec-websocket-extensions"];
|
|
154
|
+
if (typeof extensions === "string") {
|
|
155
|
+
upstreamHeaders["sec-websocket-extensions"] = extensions;
|
|
156
|
+
}
|
|
157
|
+
return upstreamHeaders;
|
|
142
158
|
}
|
|
143
159
|
function isWebSocketProxyRequestUrl(rawUrl) {
|
|
144
160
|
if (!rawUrl) return false;
|
|
@@ -154,6 +170,16 @@ function handleWebSocketProxyUpgrade(req, socket, head, forwardOrigin = true) {
|
|
|
154
170
|
rejectUpgrade(socket, 403, "forbidden websocket proxy origin");
|
|
155
171
|
return true;
|
|
156
172
|
}
|
|
173
|
+
const upgradeRejection = validateUpgradeRequest(req);
|
|
174
|
+
if (upgradeRejection) {
|
|
175
|
+
rejectUpgrade(
|
|
176
|
+
socket,
|
|
177
|
+
upgradeRejection.status,
|
|
178
|
+
upgradeRejection.message,
|
|
179
|
+
upgradeRejection.headers
|
|
180
|
+
);
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
157
183
|
let targetUrl;
|
|
158
184
|
let headers;
|
|
159
185
|
try {
|
|
@@ -173,41 +199,99 @@ function handleWebSocketProxyUpgrade(req, socket, head, forwardOrigin = true) {
|
|
|
173
199
|
rejectUpgrade(socket, 400, "invalid websocket proxy request");
|
|
174
200
|
return true;
|
|
175
201
|
}
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
202
|
+
const upstreamHeaders = createUpstreamHeaders(req, targetUrl, headers, forwardOrigin);
|
|
203
|
+
let settled = false;
|
|
204
|
+
const request = targetUrl.protocol === "wss:" ? import_https.request : import_http.request;
|
|
205
|
+
const upstreamRequestUrl = new URL(targetUrl);
|
|
206
|
+
upstreamRequestUrl.protocol = targetUrl.protocol === "wss:" ? "https:" : "http:";
|
|
207
|
+
const upstreamRequest = request(upstreamRequestUrl, {
|
|
208
|
+
method: "GET",
|
|
209
|
+
headers: upstreamHeaders
|
|
210
|
+
});
|
|
211
|
+
let destroyUpstreamSocket = () => {
|
|
212
|
+
};
|
|
213
|
+
upstreamRequest.once("socket", (upstreamSocket) => {
|
|
214
|
+
destroyUpstreamSocket = () => upstreamSocket.destroy();
|
|
215
|
+
});
|
|
216
|
+
const fail = (status, message) => {
|
|
217
|
+
if (settled) return;
|
|
218
|
+
settled = true;
|
|
219
|
+
clearTimeout(timer);
|
|
220
|
+
upstreamRequest.destroy();
|
|
221
|
+
destroyUpstreamSocket();
|
|
222
|
+
rejectUpgrade(socket, status, message);
|
|
223
|
+
};
|
|
224
|
+
const timer = setTimeout(() => {
|
|
225
|
+
fail(504, "upstream websocket handshake timeout");
|
|
226
|
+
}, WEBSOCKET_PROXY_HANDSHAKE_TIMEOUT_MS);
|
|
179
227
|
socket.once("close", () => {
|
|
180
|
-
if (!
|
|
228
|
+
if (!settled) {
|
|
229
|
+
settled = true;
|
|
230
|
+
clearTimeout(timer);
|
|
231
|
+
}
|
|
232
|
+
upstreamRequest.destroy();
|
|
233
|
+
destroyUpstreamSocket();
|
|
181
234
|
});
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
const selectedProtocol = upstream.protocol;
|
|
186
|
-
const proxyServer = new import_ws.WebSocketServer({
|
|
187
|
-
noServer: true,
|
|
188
|
-
clientTracking: false,
|
|
189
|
-
handleProtocols(requestedProtocols) {
|
|
190
|
-
return selectedProtocol || requestedProtocols.values().next().value || false;
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
proxyServer.handleUpgrade(req, socket, head, (clientWs) => {
|
|
194
|
-
connectProxyPair(clientWs, upstream);
|
|
195
|
-
});
|
|
235
|
+
upstreamRequest.once("response", (response) => {
|
|
236
|
+
response.resume();
|
|
237
|
+
fail(502, "upstream websocket rejected upgrade");
|
|
196
238
|
});
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
completed = true;
|
|
200
|
-
rejectUpgrade(socket, 502, "upstream websocket error");
|
|
239
|
+
upstreamRequest.once("error", () => {
|
|
240
|
+
fail(502, "upstream websocket error");
|
|
201
241
|
});
|
|
202
|
-
|
|
203
|
-
if (
|
|
204
|
-
|
|
205
|
-
|
|
242
|
+
upstreamRequest.once("upgrade", (response, upstreamSocket, upstreamHead) => {
|
|
243
|
+
if (settled) {
|
|
244
|
+
upstreamSocket.destroy();
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
const accept = response.headers["sec-websocket-accept"];
|
|
248
|
+
const upgrade = response.headers.upgrade;
|
|
249
|
+
const requestKey = req.headers["sec-websocket-key"];
|
|
250
|
+
const expectedAccept = typeof requestKey === "string" ? (0, import_crypto.createHash)("sha1").update(`${requestKey}258EAFA5-E914-47DA-95CA-C5AB0DC85B11`).digest("base64") : "";
|
|
251
|
+
if (typeof accept !== "string" || accept !== expectedAccept || typeof upgrade !== "string" || upgrade.toLowerCase() !== "websocket") {
|
|
252
|
+
upstreamSocket.destroy();
|
|
253
|
+
fail(502, "upstream websocket handshake is invalid");
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
const selectedProtocol = response.headers["sec-websocket-protocol"];
|
|
257
|
+
const requestedProtocols = (req.headers["sec-websocket-protocol"] || "").split(",").map((protocol) => protocol.trim());
|
|
258
|
+
if (typeof selectedProtocol === "string" && !requestedProtocols.includes(selectedProtocol)) {
|
|
259
|
+
upstreamSocket.destroy();
|
|
260
|
+
fail(502, "upstream websocket selected an unrequested protocol");
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
settled = true;
|
|
264
|
+
clearTimeout(timer);
|
|
265
|
+
const responseHeaders = [
|
|
266
|
+
"HTTP/1.1 101 Switching Protocols",
|
|
267
|
+
"Upgrade: websocket",
|
|
268
|
+
"Connection: Upgrade",
|
|
269
|
+
`Sec-WebSocket-Accept: ${accept}`
|
|
270
|
+
];
|
|
271
|
+
if (typeof selectedProtocol === "string") {
|
|
272
|
+
responseHeaders.push(`Sec-WebSocket-Protocol: ${selectedProtocol}`);
|
|
273
|
+
}
|
|
274
|
+
const selectedExtensions = response.headers["sec-websocket-extensions"];
|
|
275
|
+
if (typeof selectedExtensions === "string") {
|
|
276
|
+
responseHeaders.push(`Sec-WebSocket-Extensions: ${selectedExtensions}`);
|
|
277
|
+
}
|
|
278
|
+
socket.write(`${responseHeaders.join("\r\n")}\r
|
|
279
|
+
\r
|
|
280
|
+
`);
|
|
281
|
+
if (head.length > 0) upstreamSocket.write(head);
|
|
282
|
+
if (upstreamHead.length > 0) socket.write(upstreamHead);
|
|
283
|
+
socket.once("close", () => upstreamSocket.destroy());
|
|
284
|
+
socket.once("error", () => upstreamSocket.destroy());
|
|
285
|
+
upstreamSocket.once("error", () => socket.destroy());
|
|
286
|
+
socket.pipe(upstreamSocket);
|
|
287
|
+
upstreamSocket.pipe(socket);
|
|
206
288
|
});
|
|
289
|
+
upstreamRequest.end();
|
|
207
290
|
return true;
|
|
208
291
|
}
|
|
209
292
|
// Annotate the CommonJS export names for ESM import in node:
|
|
210
293
|
0 && (module.exports = {
|
|
294
|
+
WEBSOCKET_PROXY_HANDSHAKE_TIMEOUT_MS,
|
|
211
295
|
WEBSOCKET_PROXY_PATH,
|
|
212
296
|
handleWebSocketProxyUpgrade,
|
|
213
297
|
isWebSocketProxyRequestUrl
|
package/dist-lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.429 | (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.429 | (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/menu.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.429 | (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/menu.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.429 | (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.429 | (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;
|
|
@@ -93,35 +93,54 @@ ${RNXSIM_METRO_MODULE_PATHS_PREFIX}`;
|
|
|
93
93
|
throw new Error("Metro module identity footer is malformed");
|
|
94
94
|
}
|
|
95
95
|
const version = Reflect.get(parsed, "version");
|
|
96
|
-
if (version === void 0)
|
|
96
|
+
if (version === void 0) {
|
|
97
|
+
const modulePaths2 = Object.fromEntries(
|
|
98
|
+
Object.entries(parsed).map(([moduleId, modulePath]) => {
|
|
99
|
+
if (typeof modulePath !== "string") {
|
|
100
|
+
throw new Error(`Metro module identity has an invalid path for ${moduleId}`);
|
|
101
|
+
}
|
|
102
|
+
return [moduleId, modulePath];
|
|
103
|
+
})
|
|
104
|
+
);
|
|
105
|
+
return {
|
|
106
|
+
source: withoutMap.slice(0, footerStart),
|
|
107
|
+
version: RNX_METRO_MODULE_IDENTITY_VERSION,
|
|
108
|
+
identitySource: "rnx-plugin",
|
|
109
|
+
modulePaths: modulePaths2,
|
|
110
|
+
logicalSpecifiers: {},
|
|
111
|
+
sourceMappingUrl: detached.sourceMappingUrl
|
|
112
|
+
};
|
|
113
|
+
}
|
|
97
114
|
const identitySource = Reflect.get(parsed, "identitySource");
|
|
98
115
|
const parsedModulePaths = Reflect.get(parsed, "modulePaths");
|
|
99
116
|
const parsedLogicalSpecifiers = Reflect.get(parsed, "logicalSpecifiers");
|
|
100
117
|
if (version !== RNX_METRO_MODULE_IDENTITY_VERSION || identitySource !== "rnx-plugin" && identitySource !== "contrast-bundler" && identitySource !== "metro-source-map" || typeof parsedModulePaths !== "object" || parsedModulePaths === null || Array.isArray(parsedModulePaths) || typeof parsedLogicalSpecifiers !== "object" || parsedLogicalSpecifiers === null || Array.isArray(parsedLogicalSpecifiers)) {
|
|
101
118
|
throw new Error("Metro module identity footer is malformed");
|
|
102
119
|
}
|
|
103
|
-
const modulePaths =
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
const modulePaths = Object.fromEntries(
|
|
121
|
+
Object.entries(parsedModulePaths).map(([moduleId, modulePath]) => {
|
|
122
|
+
if (typeof modulePath !== "string") {
|
|
123
|
+
throw new Error(`Metro module identity has an invalid path for ${moduleId}`);
|
|
124
|
+
}
|
|
125
|
+
return [moduleId, modulePath];
|
|
126
|
+
})
|
|
127
|
+
);
|
|
128
|
+
const logicalSpecifiers = Object.fromEntries(
|
|
129
|
+
Object.entries(parsedLogicalSpecifiers).map(([moduleId, specifiers]) => {
|
|
130
|
+
if (!Array.isArray(specifiers) || specifiers.length === 0 || !specifiers.every(
|
|
131
|
+
(specifier) => typeof specifier === "string" && specifier.length > 0
|
|
132
|
+
)) {
|
|
133
|
+
throw new Error(`Metro module identity has invalid specifiers for ${moduleId}`);
|
|
134
|
+
}
|
|
135
|
+
const unique = [...new Set(specifiers)].sort(
|
|
136
|
+
(left, right) => left.localeCompare(right)
|
|
137
|
+
);
|
|
138
|
+
if (unique.length !== specifiers.length) {
|
|
139
|
+
throw new Error(`Metro module identity repeats a specifier for ${moduleId}`);
|
|
140
|
+
}
|
|
141
|
+
return [moduleId, unique];
|
|
142
|
+
})
|
|
143
|
+
);
|
|
125
144
|
return {
|
|
126
145
|
source: withoutMap.slice(0, footerStart),
|
|
127
146
|
version,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.429 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/metro-production-bundle.ts
|
|
4
4
|
var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
|
|
@@ -60,35 +60,54 @@ ${RNXSIM_METRO_MODULE_PATHS_PREFIX}`;
|
|
|
60
60
|
throw new Error("Metro module identity footer is malformed");
|
|
61
61
|
}
|
|
62
62
|
const version = Reflect.get(parsed, "version");
|
|
63
|
-
if (version === void 0)
|
|
63
|
+
if (version === void 0) {
|
|
64
|
+
const modulePaths2 = Object.fromEntries(
|
|
65
|
+
Object.entries(parsed).map(([moduleId, modulePath]) => {
|
|
66
|
+
if (typeof modulePath !== "string") {
|
|
67
|
+
throw new Error(`Metro module identity has an invalid path for ${moduleId}`);
|
|
68
|
+
}
|
|
69
|
+
return [moduleId, modulePath];
|
|
70
|
+
})
|
|
71
|
+
);
|
|
72
|
+
return {
|
|
73
|
+
source: withoutMap.slice(0, footerStart),
|
|
74
|
+
version: RNX_METRO_MODULE_IDENTITY_VERSION,
|
|
75
|
+
identitySource: "rnx-plugin",
|
|
76
|
+
modulePaths: modulePaths2,
|
|
77
|
+
logicalSpecifiers: {},
|
|
78
|
+
sourceMappingUrl: detached.sourceMappingUrl
|
|
79
|
+
};
|
|
80
|
+
}
|
|
64
81
|
const identitySource = Reflect.get(parsed, "identitySource");
|
|
65
82
|
const parsedModulePaths = Reflect.get(parsed, "modulePaths");
|
|
66
83
|
const parsedLogicalSpecifiers = Reflect.get(parsed, "logicalSpecifiers");
|
|
67
84
|
if (version !== RNX_METRO_MODULE_IDENTITY_VERSION || identitySource !== "rnx-plugin" && identitySource !== "contrast-bundler" && identitySource !== "metro-source-map" || typeof parsedModulePaths !== "object" || parsedModulePaths === null || Array.isArray(parsedModulePaths) || typeof parsedLogicalSpecifiers !== "object" || parsedLogicalSpecifiers === null || Array.isArray(parsedLogicalSpecifiers)) {
|
|
68
85
|
throw new Error("Metro module identity footer is malformed");
|
|
69
86
|
}
|
|
70
|
-
const modulePaths =
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
const modulePaths = Object.fromEntries(
|
|
88
|
+
Object.entries(parsedModulePaths).map(([moduleId, modulePath]) => {
|
|
89
|
+
if (typeof modulePath !== "string") {
|
|
90
|
+
throw new Error(`Metro module identity has an invalid path for ${moduleId}`);
|
|
91
|
+
}
|
|
92
|
+
return [moduleId, modulePath];
|
|
93
|
+
})
|
|
94
|
+
);
|
|
95
|
+
const logicalSpecifiers = Object.fromEntries(
|
|
96
|
+
Object.entries(parsedLogicalSpecifiers).map(([moduleId, specifiers]) => {
|
|
97
|
+
if (!Array.isArray(specifiers) || specifiers.length === 0 || !specifiers.every(
|
|
98
|
+
(specifier) => typeof specifier === "string" && specifier.length > 0
|
|
99
|
+
)) {
|
|
100
|
+
throw new Error(`Metro module identity has invalid specifiers for ${moduleId}`);
|
|
101
|
+
}
|
|
102
|
+
const unique = [...new Set(specifiers)].sort(
|
|
103
|
+
(left, right) => left.localeCompare(right)
|
|
104
|
+
);
|
|
105
|
+
if (unique.length !== specifiers.length) {
|
|
106
|
+
throw new Error(`Metro module identity repeats a specifier for ${moduleId}`);
|
|
107
|
+
}
|
|
108
|
+
return [moduleId, unique];
|
|
109
|
+
})
|
|
110
|
+
);
|
|
92
111
|
return {
|
|
93
112
|
source: withoutMap.slice(0, footerStart),
|
|
94
113
|
version,
|
package/dist-lib/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.429 | (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/profiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.429 | (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.429 | (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.429 | (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.429 | (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.429 | (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.429 | (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.429 | (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);
|