rnxsim 0.1.393 → 0.1.394
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/cloud-client.ts +74 -52
- package/cli/cloud-dispatch.ts +2 -1
- package/cli/commands/inspect/core.ts +33 -2
- package/cli/commands/platform.ts +34 -9
- 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-input.cjs +12 -1
- package/dist-lib/bridge-contract-input.mjs +10 -1
- package/dist-lib/bridge-contract.cjs +7 -1
- package/dist-lib/bridge-contract.mjs +5 -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 +29 -3
- package/dist-lib/cloud-contract.mjs +26 -2
- 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 +1 -1
- 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 +23 -3
- 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 +132 -3
- package/dist-lib/metro-production-bundle.mjs +129 -2
- 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 +24 -3
- package/dist-lib/sdk.mjs +24 -3
- package/dist-lib/skills.cjs +28 -25
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/bridge-contract-input.ts +12 -0
- package/src/bridge-contract.ts +7 -0
- package/src/cloud-contract.ts +29 -0
- package/src/metro-production-bundle.ts +200 -0
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.394 | (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.394 | (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.394 | (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.394 | (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.394 | (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.394 | (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.394 | (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/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.394 | (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;
|
|
@@ -506,6 +506,25 @@ function isDevBridgeLockfileFresh(lock, now = Date.now()) {
|
|
|
506
506
|
// src/cloud-contract.ts
|
|
507
507
|
var RNX_CLOUD_MAX_ARTIFACT_BYTES = 20 * 1024 * 1024;
|
|
508
508
|
var RNX_CLOUD_DESIGN_MAX_STORAGE_BYTES = 1024 * 1024;
|
|
509
|
+
var RNX_CLOUD_COMMAND_TYPES = Object.freeze([
|
|
510
|
+
"state",
|
|
511
|
+
"query",
|
|
512
|
+
"resolve",
|
|
513
|
+
"perform",
|
|
514
|
+
"waitFor",
|
|
515
|
+
"reset",
|
|
516
|
+
"screenshot",
|
|
517
|
+
"capture",
|
|
518
|
+
"captureRegions",
|
|
519
|
+
"settle",
|
|
520
|
+
"setAppearance",
|
|
521
|
+
"openUrl",
|
|
522
|
+
"tree",
|
|
523
|
+
"tap",
|
|
524
|
+
"longPress",
|
|
525
|
+
"memory"
|
|
526
|
+
]);
|
|
527
|
+
var RNX_CLOUD_COMMAND_TYPE_SET = new Set(RNX_CLOUD_COMMAND_TYPES);
|
|
509
528
|
|
|
510
529
|
// src/public-brand.ts
|
|
511
530
|
var name = "rnx";
|
|
@@ -1934,8 +1953,9 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
|
|
|
1934
1953
|
};
|
|
1935
1954
|
}
|
|
1936
1955
|
const probe = result.probe;
|
|
1956
|
+
const externalError = probe?.externalError ?? "";
|
|
1937
1957
|
const status = {
|
|
1938
|
-
ready: result.matched,
|
|
1958
|
+
ready: result.matched && !externalError,
|
|
1939
1959
|
elapsedMs: result.elapsedMs,
|
|
1940
1960
|
nodes: probe?.nodes ?? 0,
|
|
1941
1961
|
targets: probe?.targets ?? 0,
|
|
@@ -1946,7 +1966,7 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
|
|
|
1946
1966
|
loadingText: probe?.loadingText ?? "",
|
|
1947
1967
|
externalReady: probe?.externalReady ?? null,
|
|
1948
1968
|
externalStatus: probe?.externalStatus ?? "",
|
|
1949
|
-
externalError
|
|
1969
|
+
externalError,
|
|
1950
1970
|
suppressedEntryError: probe?.suppressedEntryError ?? "",
|
|
1951
1971
|
errors: probe?.errors ?? 0,
|
|
1952
1972
|
bridgeError: result.error ?? ""
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.394 | (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.394 | (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.394 | (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;
|
|
@@ -24,8 +24,10 @@ var metro_production_bundle_exports = {};
|
|
|
24
24
|
__export(metro_production_bundle_exports, {
|
|
25
25
|
RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION: () => RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION,
|
|
26
26
|
createRNXMetroModulePathsFooter: () => createRNXMetroModulePathsFooter,
|
|
27
|
+
readRNXMetroBundleLayout: () => readRNXMetroBundleLayout,
|
|
27
28
|
readRNXMetroModuleIdentity: () => readRNXMetroModuleIdentity,
|
|
28
|
-
toRNXProductionBundleUrl: () => toRNXProductionBundleUrl
|
|
29
|
+
toRNXProductionBundleUrl: () => toRNXProductionBundleUrl,
|
|
30
|
+
validateRNXMetroModulePaths: () => validateRNXMetroModulePaths
|
|
29
31
|
});
|
|
30
32
|
module.exports = __toCommonJS(metro_production_bundle_exports);
|
|
31
33
|
var RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION = "rnxsim";
|
|
@@ -63,10 +65,137 @@ ${RNXSIM_METRO_MODULE_PATHS_PREFIX}`;
|
|
|
63
65
|
}
|
|
64
66
|
return { source: bundleText.slice(0, footerStart), modulePaths };
|
|
65
67
|
}
|
|
68
|
+
function readDefineTail(source, start, end) {
|
|
69
|
+
let cursor = end;
|
|
70
|
+
while (cursor > start && (source[cursor] === " " || source[cursor] === "\n" || source[cursor] === " " || source[cursor] === ";")) {
|
|
71
|
+
cursor--;
|
|
72
|
+
}
|
|
73
|
+
if (source[cursor] !== ")") return null;
|
|
74
|
+
cursor--;
|
|
75
|
+
while (cursor > start && /\s/.test(source[cursor])) cursor--;
|
|
76
|
+
if (source[cursor] !== "]") return null;
|
|
77
|
+
const dependenciesEnd = cursor + 1;
|
|
78
|
+
let depth = 1;
|
|
79
|
+
cursor--;
|
|
80
|
+
while (cursor > start && depth > 0) {
|
|
81
|
+
const character = source[cursor];
|
|
82
|
+
if (character === "]") depth++;
|
|
83
|
+
else if (character === "[") depth--;
|
|
84
|
+
if (depth === 0) break;
|
|
85
|
+
cursor--;
|
|
86
|
+
}
|
|
87
|
+
if (depth !== 0) return null;
|
|
88
|
+
const dependenciesStart = cursor;
|
|
89
|
+
let idEnd = cursor - 1;
|
|
90
|
+
while (idEnd > start && /\s/.test(source[idEnd])) idEnd--;
|
|
91
|
+
if (source[idEnd] !== ",") return null;
|
|
92
|
+
let idStart = idEnd;
|
|
93
|
+
while (idStart > start && /[0-9a-fA-FxX.+\-]/.test(source[idStart - 1])) idStart--;
|
|
94
|
+
const literal = source.slice(idStart, idEnd);
|
|
95
|
+
if (!/^-?(?:0[xXbBoO][0-9a-fA-F]+|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)$/.test(literal)) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
const moduleId = Number(literal);
|
|
99
|
+
if (!Number.isSafeInteger(moduleId)) return null;
|
|
100
|
+
let factoryEnd = idStart - 1;
|
|
101
|
+
while (factoryEnd > start && /\s/.test(source[factoryEnd])) factoryEnd--;
|
|
102
|
+
if (source[factoryEnd] !== ",") return null;
|
|
103
|
+
return {
|
|
104
|
+
moduleId,
|
|
105
|
+
factoryEnd,
|
|
106
|
+
dependenciesStart,
|
|
107
|
+
dependenciesEnd
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function readRNXMetroBundleLayout(source) {
|
|
111
|
+
const lineOffsets = [0];
|
|
112
|
+
for (let index = 0; index < source.length; index++) {
|
|
113
|
+
if (source.charCodeAt(index) === 10) lineOffsets.push(index + 1);
|
|
114
|
+
}
|
|
115
|
+
const boundaries = [];
|
|
116
|
+
for (let lineIndex = 0; lineIndex < lineOffsets.length; lineIndex++) {
|
|
117
|
+
const start = lineOffsets[lineIndex];
|
|
118
|
+
if (source.startsWith("__d(", start) || source.startsWith("__r(", start)) {
|
|
119
|
+
boundaries.push(lineIndex);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
const statements = [];
|
|
123
|
+
let moduleIdFailures = 0;
|
|
124
|
+
for (let index = 0; index < boundaries.length; index++) {
|
|
125
|
+
const lineIndex = boundaries[index];
|
|
126
|
+
const start = lineOffsets[lineIndex];
|
|
127
|
+
const nextLineIndex = boundaries[index + 1];
|
|
128
|
+
const endLineIndex = nextLineIndex !== void 0 ? nextLineIndex - 1 : lineOffsets.length - 1;
|
|
129
|
+
const end = nextLineIndex !== void 0 ? lineOffsets[nextLineIndex] : source.length;
|
|
130
|
+
if (!source.startsWith("__d(", start)) {
|
|
131
|
+
statements.push({ kind: "run", start, end, lineIndex, endLineIndex });
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
const tail = readDefineTail(source, start, end - 1);
|
|
135
|
+
if (!tail) {
|
|
136
|
+
moduleIdFailures++;
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
statements.push({
|
|
140
|
+
kind: "define",
|
|
141
|
+
moduleId: tail.moduleId,
|
|
142
|
+
start,
|
|
143
|
+
end,
|
|
144
|
+
lineIndex,
|
|
145
|
+
endLineIndex,
|
|
146
|
+
factory: { start: start + "__d(".length, end: tail.factoryEnd },
|
|
147
|
+
dependencies: { start: tail.dependenciesStart, end: tail.dependenciesEnd }
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
return {
|
|
151
|
+
prelude: source.slice(
|
|
152
|
+
0,
|
|
153
|
+
boundaries.length > 0 ? lineOffsets[boundaries[0]] : source.length
|
|
154
|
+
),
|
|
155
|
+
statements,
|
|
156
|
+
moduleIdFailures
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function validateRNXMetroModulePaths(source, modulePaths) {
|
|
160
|
+
const layout = readRNXMetroBundleLayout(source);
|
|
161
|
+
if (layout.moduleIdFailures > 0) {
|
|
162
|
+
throw new Error(
|
|
163
|
+
`Metro module identity could not read ${layout.moduleIdFailures} module IDs`
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
const definedIds = /* @__PURE__ */ new Set();
|
|
167
|
+
for (const statement of layout.statements) {
|
|
168
|
+
if (statement.kind !== "define") continue;
|
|
169
|
+
if (definedIds.has(statement.moduleId)) {
|
|
170
|
+
throw new Error(`Metro module identity has duplicate module ${statement.moduleId}`);
|
|
171
|
+
}
|
|
172
|
+
definedIds.add(statement.moduleId);
|
|
173
|
+
if (!Object.prototype.hasOwnProperty.call(modulePaths, String(statement.moduleId))) {
|
|
174
|
+
throw new Error(`Metro module identity is missing ${statement.moduleId}`);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (definedIds.size === 0) {
|
|
178
|
+
throw new Error("Metro module identity found no canonical JavaScript modules");
|
|
179
|
+
}
|
|
180
|
+
for (const [key, modulePath] of Object.entries(modulePaths)) {
|
|
181
|
+
const moduleId = Number(key);
|
|
182
|
+
if (!Number.isSafeInteger(moduleId) || String(moduleId) !== key) {
|
|
183
|
+
throw new Error(`Metro module identity has invalid module ID ${key}`);
|
|
184
|
+
}
|
|
185
|
+
if (typeof modulePath !== "string" || modulePath.length === 0) {
|
|
186
|
+
throw new Error(`Metro module identity has no path for ${key}`);
|
|
187
|
+
}
|
|
188
|
+
if (!definedIds.has(moduleId)) {
|
|
189
|
+
throw new Error(`Metro module identity has no module ${key}`);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
66
193
|
// Annotate the CommonJS export names for ESM import in node:
|
|
67
194
|
0 && (module.exports = {
|
|
68
195
|
RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION,
|
|
69
196
|
createRNXMetroModulePathsFooter,
|
|
197
|
+
readRNXMetroBundleLayout,
|
|
70
198
|
readRNXMetroModuleIdentity,
|
|
71
|
-
toRNXProductionBundleUrl
|
|
199
|
+
toRNXProductionBundleUrl,
|
|
200
|
+
validateRNXMetroModulePaths
|
|
72
201
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.394 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/metro-production-bundle.ts
|
|
4
4
|
var RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION = "rnxsim";
|
|
@@ -36,9 +36,136 @@ ${RNXSIM_METRO_MODULE_PATHS_PREFIX}`;
|
|
|
36
36
|
}
|
|
37
37
|
return { source: bundleText.slice(0, footerStart), modulePaths };
|
|
38
38
|
}
|
|
39
|
+
function readDefineTail(source, start, end) {
|
|
40
|
+
let cursor = end;
|
|
41
|
+
while (cursor > start && (source[cursor] === " " || source[cursor] === "\n" || source[cursor] === " " || source[cursor] === ";")) {
|
|
42
|
+
cursor--;
|
|
43
|
+
}
|
|
44
|
+
if (source[cursor] !== ")") return null;
|
|
45
|
+
cursor--;
|
|
46
|
+
while (cursor > start && /\s/.test(source[cursor])) cursor--;
|
|
47
|
+
if (source[cursor] !== "]") return null;
|
|
48
|
+
const dependenciesEnd = cursor + 1;
|
|
49
|
+
let depth = 1;
|
|
50
|
+
cursor--;
|
|
51
|
+
while (cursor > start && depth > 0) {
|
|
52
|
+
const character = source[cursor];
|
|
53
|
+
if (character === "]") depth++;
|
|
54
|
+
else if (character === "[") depth--;
|
|
55
|
+
if (depth === 0) break;
|
|
56
|
+
cursor--;
|
|
57
|
+
}
|
|
58
|
+
if (depth !== 0) return null;
|
|
59
|
+
const dependenciesStart = cursor;
|
|
60
|
+
let idEnd = cursor - 1;
|
|
61
|
+
while (idEnd > start && /\s/.test(source[idEnd])) idEnd--;
|
|
62
|
+
if (source[idEnd] !== ",") return null;
|
|
63
|
+
let idStart = idEnd;
|
|
64
|
+
while (idStart > start && /[0-9a-fA-FxX.+\-]/.test(source[idStart - 1])) idStart--;
|
|
65
|
+
const literal = source.slice(idStart, idEnd);
|
|
66
|
+
if (!/^-?(?:0[xXbBoO][0-9a-fA-F]+|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)$/.test(literal)) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
const moduleId = Number(literal);
|
|
70
|
+
if (!Number.isSafeInteger(moduleId)) return null;
|
|
71
|
+
let factoryEnd = idStart - 1;
|
|
72
|
+
while (factoryEnd > start && /\s/.test(source[factoryEnd])) factoryEnd--;
|
|
73
|
+
if (source[factoryEnd] !== ",") return null;
|
|
74
|
+
return {
|
|
75
|
+
moduleId,
|
|
76
|
+
factoryEnd,
|
|
77
|
+
dependenciesStart,
|
|
78
|
+
dependenciesEnd
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function readRNXMetroBundleLayout(source) {
|
|
82
|
+
const lineOffsets = [0];
|
|
83
|
+
for (let index = 0; index < source.length; index++) {
|
|
84
|
+
if (source.charCodeAt(index) === 10) lineOffsets.push(index + 1);
|
|
85
|
+
}
|
|
86
|
+
const boundaries = [];
|
|
87
|
+
for (let lineIndex = 0; lineIndex < lineOffsets.length; lineIndex++) {
|
|
88
|
+
const start = lineOffsets[lineIndex];
|
|
89
|
+
if (source.startsWith("__d(", start) || source.startsWith("__r(", start)) {
|
|
90
|
+
boundaries.push(lineIndex);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const statements = [];
|
|
94
|
+
let moduleIdFailures = 0;
|
|
95
|
+
for (let index = 0; index < boundaries.length; index++) {
|
|
96
|
+
const lineIndex = boundaries[index];
|
|
97
|
+
const start = lineOffsets[lineIndex];
|
|
98
|
+
const nextLineIndex = boundaries[index + 1];
|
|
99
|
+
const endLineIndex = nextLineIndex !== void 0 ? nextLineIndex - 1 : lineOffsets.length - 1;
|
|
100
|
+
const end = nextLineIndex !== void 0 ? lineOffsets[nextLineIndex] : source.length;
|
|
101
|
+
if (!source.startsWith("__d(", start)) {
|
|
102
|
+
statements.push({ kind: "run", start, end, lineIndex, endLineIndex });
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
const tail = readDefineTail(source, start, end - 1);
|
|
106
|
+
if (!tail) {
|
|
107
|
+
moduleIdFailures++;
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
statements.push({
|
|
111
|
+
kind: "define",
|
|
112
|
+
moduleId: tail.moduleId,
|
|
113
|
+
start,
|
|
114
|
+
end,
|
|
115
|
+
lineIndex,
|
|
116
|
+
endLineIndex,
|
|
117
|
+
factory: { start: start + "__d(".length, end: tail.factoryEnd },
|
|
118
|
+
dependencies: { start: tail.dependenciesStart, end: tail.dependenciesEnd }
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
prelude: source.slice(
|
|
123
|
+
0,
|
|
124
|
+
boundaries.length > 0 ? lineOffsets[boundaries[0]] : source.length
|
|
125
|
+
),
|
|
126
|
+
statements,
|
|
127
|
+
moduleIdFailures
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function validateRNXMetroModulePaths(source, modulePaths) {
|
|
131
|
+
const layout = readRNXMetroBundleLayout(source);
|
|
132
|
+
if (layout.moduleIdFailures > 0) {
|
|
133
|
+
throw new Error(
|
|
134
|
+
`Metro module identity could not read ${layout.moduleIdFailures} module IDs`
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
const definedIds = /* @__PURE__ */ new Set();
|
|
138
|
+
for (const statement of layout.statements) {
|
|
139
|
+
if (statement.kind !== "define") continue;
|
|
140
|
+
if (definedIds.has(statement.moduleId)) {
|
|
141
|
+
throw new Error(`Metro module identity has duplicate module ${statement.moduleId}`);
|
|
142
|
+
}
|
|
143
|
+
definedIds.add(statement.moduleId);
|
|
144
|
+
if (!Object.prototype.hasOwnProperty.call(modulePaths, String(statement.moduleId))) {
|
|
145
|
+
throw new Error(`Metro module identity is missing ${statement.moduleId}`);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (definedIds.size === 0) {
|
|
149
|
+
throw new Error("Metro module identity found no canonical JavaScript modules");
|
|
150
|
+
}
|
|
151
|
+
for (const [key, modulePath] of Object.entries(modulePaths)) {
|
|
152
|
+
const moduleId = Number(key);
|
|
153
|
+
if (!Number.isSafeInteger(moduleId) || String(moduleId) !== key) {
|
|
154
|
+
throw new Error(`Metro module identity has invalid module ID ${key}`);
|
|
155
|
+
}
|
|
156
|
+
if (typeof modulePath !== "string" || modulePath.length === 0) {
|
|
157
|
+
throw new Error(`Metro module identity has no path for ${key}`);
|
|
158
|
+
}
|
|
159
|
+
if (!definedIds.has(moduleId)) {
|
|
160
|
+
throw new Error(`Metro module identity has no module ${key}`);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
39
164
|
export {
|
|
40
165
|
RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION,
|
|
41
166
|
createRNXMetroModulePathsFooter,
|
|
167
|
+
readRNXMetroBundleLayout,
|
|
42
168
|
readRNXMetroModuleIdentity,
|
|
43
|
-
toRNXProductionBundleUrl
|
|
169
|
+
toRNXProductionBundleUrl,
|
|
170
|
+
validateRNXMetroModulePaths
|
|
44
171
|
};
|
package/dist-lib/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.394 | (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.394 | (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.394 | (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.394 | (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.394 | (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.394 | (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.394 | (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;
|
|
@@ -1402,8 +1402,9 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
|
|
|
1402
1402
|
};
|
|
1403
1403
|
}
|
|
1404
1404
|
const probe = result.probe;
|
|
1405
|
+
const externalError = probe?.externalError ?? "";
|
|
1405
1406
|
const status = {
|
|
1406
|
-
ready: result.matched,
|
|
1407
|
+
ready: result.matched && !externalError,
|
|
1407
1408
|
elapsedMs: result.elapsedMs,
|
|
1408
1409
|
nodes: probe?.nodes ?? 0,
|
|
1409
1410
|
targets: probe?.targets ?? 0,
|
|
@@ -1414,7 +1415,7 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
|
|
|
1414
1415
|
loadingText: probe?.loadingText ?? "",
|
|
1415
1416
|
externalReady: probe?.externalReady ?? null,
|
|
1416
1417
|
externalStatus: probe?.externalStatus ?? "",
|
|
1417
|
-
externalError
|
|
1418
|
+
externalError,
|
|
1418
1419
|
suppressedEntryError: probe?.suppressedEntryError ?? "",
|
|
1419
1420
|
errors: probe?.errors ?? 0,
|
|
1420
1421
|
bridgeError: result.error ?? ""
|
|
@@ -1783,6 +1784,26 @@ async function setDebugChannels(bridge, action, channels) {
|
|
|
1783
1784
|
});
|
|
1784
1785
|
}
|
|
1785
1786
|
async function inspectMemory(bridge) {
|
|
1787
|
+
if (bridge.plane === "cloud") {
|
|
1788
|
+
const value = await bridge.send({ type: "memory" });
|
|
1789
|
+
const rawWasmHeapBytes = typeof value === "object" && value !== null ? Reflect.get(value, "wasmHeapBytes") : null;
|
|
1790
|
+
const wasmHeapBytes = typeof rawWasmHeapBytes === "number" ? rawWasmHeapBytes : null;
|
|
1791
|
+
return {
|
|
1792
|
+
tenant: {
|
|
1793
|
+
nodesRegistered: null,
|
|
1794
|
+
nodesDetached: null,
|
|
1795
|
+
detachedTypes: null,
|
|
1796
|
+
objects: null,
|
|
1797
|
+
activeNativeAnimations: null,
|
|
1798
|
+
imageLoader: null,
|
|
1799
|
+
workerHeap: null,
|
|
1800
|
+
wasmHeapBytes
|
|
1801
|
+
},
|
|
1802
|
+
shell: null,
|
|
1803
|
+
compositor: null,
|
|
1804
|
+
hostHeap: null
|
|
1805
|
+
};
|
|
1806
|
+
}
|
|
1786
1807
|
const result = await bridge.send({
|
|
1787
1808
|
type: "evaluate",
|
|
1788
1809
|
code: `(async () => {
|
package/dist-lib/sdk.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.394 | (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);
|
|
@@ -1307,8 +1307,9 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
|
|
|
1307
1307
|
};
|
|
1308
1308
|
}
|
|
1309
1309
|
const probe = result.probe;
|
|
1310
|
+
const externalError = probe?.externalError ?? "";
|
|
1310
1311
|
const status = {
|
|
1311
|
-
ready: result.matched,
|
|
1312
|
+
ready: result.matched && !externalError,
|
|
1312
1313
|
elapsedMs: result.elapsedMs,
|
|
1313
1314
|
nodes: probe?.nodes ?? 0,
|
|
1314
1315
|
targets: probe?.targets ?? 0,
|
|
@@ -1319,7 +1320,7 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
|
|
|
1319
1320
|
loadingText: probe?.loadingText ?? "",
|
|
1320
1321
|
externalReady: probe?.externalReady ?? null,
|
|
1321
1322
|
externalStatus: probe?.externalStatus ?? "",
|
|
1322
|
-
externalError
|
|
1323
|
+
externalError,
|
|
1323
1324
|
suppressedEntryError: probe?.suppressedEntryError ?? "",
|
|
1324
1325
|
errors: probe?.errors ?? 0,
|
|
1325
1326
|
bridgeError: result.error ?? ""
|
|
@@ -1688,6 +1689,26 @@ async function setDebugChannels(bridge, action, channels) {
|
|
|
1688
1689
|
});
|
|
1689
1690
|
}
|
|
1690
1691
|
async function inspectMemory(bridge) {
|
|
1692
|
+
if (bridge.plane === "cloud") {
|
|
1693
|
+
const value = await bridge.send({ type: "memory" });
|
|
1694
|
+
const rawWasmHeapBytes = typeof value === "object" && value !== null ? Reflect.get(value, "wasmHeapBytes") : null;
|
|
1695
|
+
const wasmHeapBytes = typeof rawWasmHeapBytes === "number" ? rawWasmHeapBytes : null;
|
|
1696
|
+
return {
|
|
1697
|
+
tenant: {
|
|
1698
|
+
nodesRegistered: null,
|
|
1699
|
+
nodesDetached: null,
|
|
1700
|
+
detachedTypes: null,
|
|
1701
|
+
objects: null,
|
|
1702
|
+
activeNativeAnimations: null,
|
|
1703
|
+
imageLoader: null,
|
|
1704
|
+
workerHeap: null,
|
|
1705
|
+
wasmHeapBytes
|
|
1706
|
+
},
|
|
1707
|
+
shell: null,
|
|
1708
|
+
compositor: null,
|
|
1709
|
+
hostHeap: null
|
|
1710
|
+
};
|
|
1711
|
+
}
|
|
1691
1712
|
const result = await bridge.send({
|
|
1692
1713
|
type: "evaluate",
|
|
1693
1714
|
code: `(async () => {
|
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.394 | (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;
|
|
@@ -21396,12 +21396,34 @@ var init_cli_constants = __esm({
|
|
|
21396
21396
|
});
|
|
21397
21397
|
|
|
21398
21398
|
// src/cloud-contract.ts
|
|
21399
|
-
|
|
21399
|
+
function isRnxCloudCommandType(value) {
|
|
21400
|
+
return RNX_CLOUD_COMMAND_TYPE_SET.has(value);
|
|
21401
|
+
}
|
|
21402
|
+
var RNX_CLOUD_MAX_ARTIFACT_BYTES, RNX_CLOUD_DESIGN_MAX_STORAGE_BYTES, RNX_CLOUD_COMMAND_TYPES, RNX_CLOUD_COMMAND_TYPE_SET;
|
|
21400
21403
|
var init_cloud_contract = __esm({
|
|
21401
21404
|
"src/cloud-contract.ts"() {
|
|
21402
21405
|
"use strict";
|
|
21403
21406
|
RNX_CLOUD_MAX_ARTIFACT_BYTES = 20 * 1024 * 1024;
|
|
21404
21407
|
RNX_CLOUD_DESIGN_MAX_STORAGE_BYTES = 1024 * 1024;
|
|
21408
|
+
RNX_CLOUD_COMMAND_TYPES = Object.freeze([
|
|
21409
|
+
"state",
|
|
21410
|
+
"query",
|
|
21411
|
+
"resolve",
|
|
21412
|
+
"perform",
|
|
21413
|
+
"waitFor",
|
|
21414
|
+
"reset",
|
|
21415
|
+
"screenshot",
|
|
21416
|
+
"capture",
|
|
21417
|
+
"captureRegions",
|
|
21418
|
+
"settle",
|
|
21419
|
+
"setAppearance",
|
|
21420
|
+
"openUrl",
|
|
21421
|
+
"tree",
|
|
21422
|
+
"tap",
|
|
21423
|
+
"longPress",
|
|
21424
|
+
"memory"
|
|
21425
|
+
]);
|
|
21426
|
+
RNX_CLOUD_COMMAND_TYPE_SET = new Set(RNX_CLOUD_COMMAND_TYPES);
|
|
21405
21427
|
}
|
|
21406
21428
|
});
|
|
21407
21429
|
|
|
@@ -21520,27 +21542,7 @@ function cloudCommand(command) {
|
|
|
21520
21542
|
for (const [key, value] of Object.entries(command)) {
|
|
21521
21543
|
if (key !== "id" && key !== "simId") clean[key] = value;
|
|
21522
21544
|
}
|
|
21523
|
-
if (command.type
|
|
21524
|
-
const query = command.query;
|
|
21525
|
-
if (!isRecord4(query) || query.kind !== "tree" && query.kind !== "find" && query.kind !== "count") {
|
|
21526
|
-
throw new Error("RNX Cloud supports only structured tree, node, and count queries");
|
|
21527
|
-
}
|
|
21528
|
-
return clean;
|
|
21529
|
-
}
|
|
21530
|
-
if (command.type === "waitFor") {
|
|
21531
|
-
const options = command.waitForOptions;
|
|
21532
|
-
const condition = isRecord4(options) ? options.condition : null;
|
|
21533
|
-
if (!isRecord4(condition) || condition.type !== "ready" && condition.type !== "present" && condition.type !== "absent") {
|
|
21534
|
-
throw new Error("RNX Cloud supports only ready and selector waits");
|
|
21535
|
-
}
|
|
21536
|
-
return clean;
|
|
21537
|
-
}
|
|
21538
|
-
if (command.type === "state") return clean;
|
|
21539
|
-
if (command.type === "capture" || command.type === "captureRegions") return clean;
|
|
21540
|
-
if (command.type === "setAppearance" || command.type === "openUrl") return clean;
|
|
21541
|
-
if (command.type === "screenshot" && command.crop === void 0 && command.captureFilter === void 0 && (command.layers === void 0 || command.layers === "tenant")) {
|
|
21542
|
-
return clean;
|
|
21543
|
-
}
|
|
21545
|
+
if (isRnxCloudCommandType(command.type)) return clean;
|
|
21544
21546
|
throw new Error(`RNX Cloud does not support bridge command type ${command.type}`);
|
|
21545
21547
|
}
|
|
21546
21548
|
function createCloudBridgeForParsed(parsed) {
|
|
@@ -23604,8 +23606,9 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
|
|
|
23604
23606
|
};
|
|
23605
23607
|
}
|
|
23606
23608
|
const probe3 = result.probe;
|
|
23609
|
+
const externalError = probe3?.externalError ?? "";
|
|
23607
23610
|
const status = {
|
|
23608
|
-
ready: result.matched,
|
|
23611
|
+
ready: result.matched && !externalError,
|
|
23609
23612
|
elapsedMs: result.elapsedMs,
|
|
23610
23613
|
nodes: probe3?.nodes ?? 0,
|
|
23611
23614
|
targets: probe3?.targets ?? 0,
|
|
@@ -23616,7 +23619,7 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
|
|
|
23616
23619
|
loadingText: probe3?.loadingText ?? "",
|
|
23617
23620
|
externalReady: probe3?.externalReady ?? null,
|
|
23618
23621
|
externalStatus: probe3?.externalStatus ?? "",
|
|
23619
|
-
externalError
|
|
23622
|
+
externalError,
|
|
23620
23623
|
suppressedEntryError: probe3?.suppressedEntryError ?? "",
|
|
23621
23624
|
errors: probe3?.errors ?? 0,
|
|
23622
23625
|
bridgeError: result.error ?? ""
|