rnxsim 0.1.431 → 0.1.433
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 +20 -50
- package/cli/auth.ts +33 -3
- package/cli/cloud-client.ts +524 -88
- package/cli/cloud-dispatch.ts +5 -10
- package/cli/cloud-session.ts +5 -5
- package/cli/commands/auth.ts +13 -2
- package/cli/commands/box.ts +189 -20
- package/cli/commands/control.ts +40 -13
- package/cli/commands/device.ts +1 -1
- package/cli/commands/flow.ts +189 -43
- package/cli/commands/inspect/get-layout.ts +1 -1
- package/cli/commands/inspect.ts +8 -1
- package/cli/commands/login.ts +79 -14
- package/cli/commands/maestro-generate.ts +70 -54
- package/cli/commands/maestro.ts +69 -20
- package/cli/commands/platform.ts +30 -32
- package/cli/commands/screenshot.ts +3 -2
- package/cli/commands/upload.ts +28 -10
- package/cli/help-core.ts +11 -1
- package/cli/outbound-endpoints.ts +27 -5
- package/cli/parse-args.ts +17 -0
- package/cli/shell-init.ts +4 -4
- package/cli/ws-bridge.ts +109 -62
- 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 +17 -4
- 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 +108 -93
- package/dist-lib/cloud.mjs +106 -91
- 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 +58 -139
- 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 +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +33 -212
- 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 +436 -351
- package/dist-lib/vite.cjs +1 -1
- package/package.json +2 -1
- package/src/auth/shared-session.ts +31 -0
- package/src/cloud.ts +83 -113
- package/src/metro-plugin.ts +30 -113
- package/src/vite-plugin.ts +11 -2
package/dist-lib/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.433 | (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;
|
|
@@ -44,28 +44,8 @@ var import_node_crypto2 = require("node:crypto");
|
|
|
44
44
|
var import_path2 = __toESM(require("path"), 1);
|
|
45
45
|
|
|
46
46
|
// src/dev-server-open.ts
|
|
47
|
-
var import_node_child_process = require("node:child_process");
|
|
48
47
|
var import_node_crypto = require("node:crypto");
|
|
49
48
|
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
50
|
-
var import_node_http = __toESM(require("node:http"), 1);
|
|
51
|
-
var import_node_path = __toESM(require("node:path"), 1);
|
|
52
|
-
var import_node_url = require("node:url");
|
|
53
|
-
var scheduledMetroOpens = /* @__PURE__ */ new Set();
|
|
54
|
-
function resolveRnxDesktopAppName(open, projectRoot) {
|
|
55
|
-
if (!open) return null;
|
|
56
|
-
if (typeof open === "object") {
|
|
57
|
-
const appName = open.appName.trim();
|
|
58
|
-
if (!appName) throw new Error("rnx: open.appName must not be empty");
|
|
59
|
-
return appName;
|
|
60
|
-
}
|
|
61
|
-
const packageJsonPath = import_node_path.default.join(projectRoot, "package.json");
|
|
62
|
-
const packageJson = JSON.parse(import_node_fs.default.readFileSync(packageJsonPath, "utf8"));
|
|
63
|
-
const packageName = packageJson && typeof packageJson === "object" ? Reflect.get(packageJson, "name") : void 0;
|
|
64
|
-
if (typeof packageName !== "string" || !packageName.trim()) {
|
|
65
|
-
throw new Error(`rnx: ${packageJsonPath} must declare a package name`);
|
|
66
|
-
}
|
|
67
|
-
return packageName.trim();
|
|
68
|
-
}
|
|
69
49
|
function tagRnxBundleForPlugin(bundleUrl, replacementOrigin, replacementToken, projectRoot, appName) {
|
|
70
50
|
const absolute = /^[a-z][a-z\d+.-]*:\/\//i.test(bundleUrl);
|
|
71
51
|
const url = new URL(bundleUrl, absolute ? void 0 : "http://rnx.local");
|
|
@@ -80,127 +60,10 @@ function tagRnxBundleForPlugin(bundleUrl, replacementOrigin, replacementToken, p
|
|
|
80
60
|
url.searchParams.set("rnxReplacementToken", replacementToken);
|
|
81
61
|
return absolute ? url.toString() : `${url.pathname}${url.search}${url.hash}`;
|
|
82
62
|
}
|
|
83
|
-
function resolveRnxDesktopLaunchTarget(port, bundleUrl) {
|
|
84
|
-
return new URL(bundleUrl, `http://localhost:${port}`).toString();
|
|
85
|
-
}
|
|
86
|
-
function buildRnxDesktopOpenArgs(bundleUrl) {
|
|
87
|
-
return ["open", bundleUrl, "--new", "--driver", "electron", "--no-describe"];
|
|
88
|
-
}
|
|
89
|
-
function observeRnxDesktopLaunch(child, appName) {
|
|
90
|
-
let stderr = "";
|
|
91
|
-
let spawnFailed = false;
|
|
92
|
-
child.stderr?.setEncoding("utf8");
|
|
93
|
-
child.stderr?.on("data", (chunk) => {
|
|
94
|
-
stderr = `${stderr}${chunk}`.slice(-16384);
|
|
95
|
-
});
|
|
96
|
-
child.once("error", (error) => {
|
|
97
|
-
spawnFailed = true;
|
|
98
|
-
console.error(`[rnx] could not open ${appName}: ${error.message}`);
|
|
99
|
-
});
|
|
100
|
-
child.once("close", (code, signal) => {
|
|
101
|
-
if (spawnFailed) return;
|
|
102
|
-
if (code === 0) {
|
|
103
|
-
console.log(`[rnx] opened ${appName} in the desktop simulator`);
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
const detail = stderr.trim() || (signal ? `signal ${signal}` : `exit ${code}`);
|
|
107
|
-
console.error(`[rnx] could not open ${appName}: ${detail}`);
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
function launchRnxDesktop(bundleUrl, appName) {
|
|
111
|
-
const packageRoot = import_node_path.default.resolve(import_node_path.default.dirname((0, import_node_url.fileURLToPath)(__sootsim_import_meta_url)), "..");
|
|
112
|
-
const binPath = import_node_path.default.join(packageRoot, "dist-cli", "bin.js");
|
|
113
|
-
console.log(`[rnx] opening ${appName} in the desktop simulator`);
|
|
114
|
-
const child = (0, import_node_child_process.spawn)(
|
|
115
|
-
process.execPath,
|
|
116
|
-
[binPath, ...buildRnxDesktopOpenArgs(bundleUrl)],
|
|
117
|
-
{
|
|
118
|
-
stdio: ["ignore", "ignore", "pipe"],
|
|
119
|
-
windowsHide: true
|
|
120
|
-
}
|
|
121
|
-
);
|
|
122
|
-
observeRnxDesktopLaunch(child, appName);
|
|
123
|
-
}
|
|
124
|
-
function openRnxDesktopWhenMetroIsReady({
|
|
125
|
-
port,
|
|
126
|
-
bundleUrl,
|
|
127
|
-
appName,
|
|
128
|
-
projectRoot,
|
|
129
|
-
serverId,
|
|
130
|
-
intervalMs = 100,
|
|
131
|
-
timeoutMs = 3e4,
|
|
132
|
-
launch = launchRnxDesktop
|
|
133
|
-
}) {
|
|
134
|
-
const key = `${projectRoot}\0${port}`;
|
|
135
|
-
if (scheduledMetroOpens.has(key)) return Promise.resolve(false);
|
|
136
|
-
scheduledMetroOpens.add(key);
|
|
137
|
-
const deadline = Date.now() + timeoutMs;
|
|
138
|
-
return new Promise((resolve) => {
|
|
139
|
-
let finished = false;
|
|
140
|
-
let retryTimer;
|
|
141
|
-
const finish = (opened) => {
|
|
142
|
-
if (finished) return;
|
|
143
|
-
finished = true;
|
|
144
|
-
clearTimeout(retryTimer);
|
|
145
|
-
scheduledMetroOpens.delete(key);
|
|
146
|
-
resolve(opened);
|
|
147
|
-
};
|
|
148
|
-
const retry = () => {
|
|
149
|
-
if (finished) return;
|
|
150
|
-
if (Date.now() >= deadline) {
|
|
151
|
-
console.error(
|
|
152
|
-
`[rnx] could not open ${appName}: Metro did not become ready on port ${port}`
|
|
153
|
-
);
|
|
154
|
-
finish(false);
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
retryTimer = setTimeout(check, intervalMs);
|
|
158
|
-
};
|
|
159
|
-
const check = () => {
|
|
160
|
-
const request = import_node_http.default.get(
|
|
161
|
-
`http://127.0.0.1:${port}/__server-scan`,
|
|
162
|
-
{ headers: { Accept: "application/json" } },
|
|
163
|
-
(response) => {
|
|
164
|
-
let body = "";
|
|
165
|
-
response.setEncoding("utf8");
|
|
166
|
-
response.on("data", (chunk) => {
|
|
167
|
-
body = `${body}${chunk}`.slice(0, 65536);
|
|
168
|
-
});
|
|
169
|
-
response.once("end", () => {
|
|
170
|
-
try {
|
|
171
|
-
const scan = JSON.parse(body);
|
|
172
|
-
const matches = response.statusCode === 200 && Array.isArray(scan) && scan.some((entry) => {
|
|
173
|
-
if (!entry || typeof entry !== "object") return false;
|
|
174
|
-
const scannedPort = Reflect.get(entry, "port");
|
|
175
|
-
const projectName = Reflect.get(entry, "projectName");
|
|
176
|
-
const scannedServerId = Reflect.get(entry, "rnxServerId");
|
|
177
|
-
const scannedBundle = Reflect.get(entry, "bundleUrl");
|
|
178
|
-
if (scannedPort !== port || projectName !== appName || scannedServerId !== serverId || typeof scannedBundle !== "string") {
|
|
179
|
-
return false;
|
|
180
|
-
}
|
|
181
|
-
return new URL(scannedBundle).searchParams.get("rnxAppName") === appName;
|
|
182
|
-
});
|
|
183
|
-
if (matches) {
|
|
184
|
-
launch(bundleUrl, appName);
|
|
185
|
-
finish(true);
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
} catch {
|
|
189
|
-
}
|
|
190
|
-
retry();
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
);
|
|
194
|
-
request.setTimeout(Math.min(1e3, timeoutMs), () => request.destroy());
|
|
195
|
-
request.once("error", retry);
|
|
196
|
-
};
|
|
197
|
-
check();
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
63
|
|
|
201
64
|
// src/host/replacement-module-handler.ts
|
|
202
65
|
var import_promises = __toESM(require("node:fs/promises"), 1);
|
|
203
|
-
var
|
|
66
|
+
var import_node_path = __toESM(require("node:path"), 1);
|
|
204
67
|
var import_esbuild = require("esbuild");
|
|
205
68
|
|
|
206
69
|
// src/backend-origin.ts
|
|
@@ -215,7 +78,7 @@ function isLoopbackHost(hostname) {
|
|
|
215
78
|
// src/host/replacement-module-handler.ts
|
|
216
79
|
var REPLACEMENT_MODULE_ROUTE = "/__sootsim-replacement-module";
|
|
217
80
|
function getReplacementLoader(filePath) {
|
|
218
|
-
const ext =
|
|
81
|
+
const ext = import_node_path.default.extname(filePath).toLowerCase();
|
|
219
82
|
switch (ext) {
|
|
220
83
|
case ".js":
|
|
221
84
|
return "js";
|
|
@@ -297,7 +160,7 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
|
|
|
297
160
|
res.end("replacement files must be .js, .jsx, .ts, or .tsx");
|
|
298
161
|
return true;
|
|
299
162
|
}
|
|
300
|
-
if (!
|
|
163
|
+
if (!import_node_path.default.isAbsolute(targetPath)) {
|
|
301
164
|
res.writeHead(400, { "Content-Type": "text/plain; charset=utf-8" });
|
|
302
165
|
res.end("replacement file path must be absolute");
|
|
303
166
|
return true;
|
|
@@ -305,10 +168,10 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
|
|
|
305
168
|
const runtimePackages = new Set(url.searchParams.getAll("runtimePackage"));
|
|
306
169
|
let resolvedProjectRoot;
|
|
307
170
|
if (options.projectRoot) {
|
|
308
|
-
const lexicalProjectRoot =
|
|
171
|
+
const lexicalProjectRoot = import_node_path.default.resolve(options.projectRoot);
|
|
309
172
|
resolvedProjectRoot = await import_promises.default.realpath(options.projectRoot);
|
|
310
|
-
const lexicalTarget =
|
|
311
|
-
if (lexicalTarget.startsWith("..") ||
|
|
173
|
+
const lexicalTarget = import_node_path.default.relative(lexicalProjectRoot, targetPath);
|
|
174
|
+
if (lexicalTarget.startsWith("..") || import_node_path.default.isAbsolute(lexicalTarget)) {
|
|
312
175
|
res.writeHead(403, { "Content-Type": "text/plain; charset=utf-8" });
|
|
313
176
|
res.end("replacement file must be inside the project root");
|
|
314
177
|
return true;
|
|
@@ -324,8 +187,8 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
|
|
|
324
187
|
return true;
|
|
325
188
|
}
|
|
326
189
|
if (resolvedProjectRoot) {
|
|
327
|
-
const relativeTarget =
|
|
328
|
-
if (relativeTarget.startsWith("..") ||
|
|
190
|
+
const relativeTarget = import_node_path.default.relative(resolvedProjectRoot, resolvedTargetPath);
|
|
191
|
+
if (relativeTarget.startsWith("..") || import_node_path.default.isAbsolute(relativeTarget)) {
|
|
329
192
|
res.writeHead(403, { "Content-Type": "text/plain; charset=utf-8" });
|
|
330
193
|
res.end("replacement file must be inside the project root");
|
|
331
194
|
return true;
|
|
@@ -465,22 +328,22 @@ function isValidRuntimeVersion(value) {
|
|
|
465
328
|
// src/home-paths.ts
|
|
466
329
|
var import_node_fs2 = __toESM(require("node:fs"), 1);
|
|
467
330
|
var import_node_os = require("node:os");
|
|
468
|
-
var
|
|
331
|
+
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
469
332
|
var RNX_HOME_ENV = "RNX_HOME";
|
|
470
333
|
var ACTIVE_RUNTIME_FILE = "active";
|
|
471
334
|
function rnxHomeDir() {
|
|
472
335
|
const override = process.env[RNX_HOME_ENV];
|
|
473
|
-
if (override && override.length > 0) return
|
|
474
|
-
return
|
|
336
|
+
if (override && override.length > 0) return import_node_path2.default.resolve(override);
|
|
337
|
+
return import_node_path2.default.join((0, import_node_os.homedir)(), ".rnx");
|
|
475
338
|
}
|
|
476
339
|
function runtimesDir() {
|
|
477
|
-
return
|
|
340
|
+
return import_node_path2.default.join(rnxHomeDir(), "runtimes");
|
|
478
341
|
}
|
|
479
342
|
function runtimeDir(version) {
|
|
480
|
-
return
|
|
343
|
+
return import_node_path2.default.join(runtimesDir(), version);
|
|
481
344
|
}
|
|
482
345
|
function activeRuntimeFile() {
|
|
483
|
-
return
|
|
346
|
+
return import_node_path2.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
|
|
484
347
|
}
|
|
485
348
|
function readActiveRuntime() {
|
|
486
349
|
try {
|
|
@@ -668,7 +531,7 @@ function appendRNXModulePaths(result, graph, options, projectRoot) {
|
|
|
668
531
|
const dependencies = graph.dependencies;
|
|
669
532
|
const createModuleId = options.createModuleId;
|
|
670
533
|
if (!dependencies || !createModuleId) {
|
|
671
|
-
|
|
534
|
+
return result;
|
|
672
535
|
}
|
|
673
536
|
const modulePaths = {};
|
|
674
537
|
for (const module2 of dependencies.values()) {
|
|
@@ -702,13 +565,9 @@ function appendRNXModulePaths(result, graph, options, projectRoot) {
|
|
|
702
565
|
};
|
|
703
566
|
return typeof result === "string" ? appendRNXMetroModuleIdentityFooter(result, identity) : { ...result, code: appendRNXMetroModuleIdentityFooter(result.code, identity) };
|
|
704
567
|
}
|
|
705
|
-
function withRNX(config
|
|
706
|
-
if (!options.devServer && !options.open && !options.productionBundles && !options.developmentBundles) {
|
|
707
|
-
return config;
|
|
708
|
-
}
|
|
568
|
+
function withRNX(config) {
|
|
709
569
|
const cfgProjectRoot = config.projectRoot || process.cwd();
|
|
710
|
-
const
|
|
711
|
-
const configuredBundleUrl = options.bundleUrl || "/index.bundle?platform=ios&dev=true&hot=true&minify=false";
|
|
570
|
+
const configuredBundleUrl = "/index.bundle?platform=ios&dev=true&hot=true&minify=false";
|
|
712
571
|
const cfgServer = config.server;
|
|
713
572
|
const port = resolveMetroPort(cfgServer);
|
|
714
573
|
const metroServerId = (0, import_node_crypto2.randomUUID)();
|
|
@@ -716,32 +575,22 @@ function withRNX(config, options = {}) {
|
|
|
716
575
|
configuredBundleUrl,
|
|
717
576
|
`http://localhost:${port}`,
|
|
718
577
|
metroServerId,
|
|
719
|
-
cfgProjectRoot
|
|
720
|
-
appName
|
|
578
|
+
cfgProjectRoot
|
|
721
579
|
);
|
|
722
580
|
const cfgSerializer = config.serializer;
|
|
723
581
|
const existingEnhance = cfgServer?.enhanceMiddleware;
|
|
724
582
|
const existingSerializer = cfgSerializer?.customSerializer;
|
|
725
|
-
let
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
const result = await serializer(
|
|
734
|
-
entryPoint,
|
|
735
|
-
preModules,
|
|
736
|
-
graph,
|
|
737
|
-
serializerOptions
|
|
738
|
-
);
|
|
739
|
-
const dev = serializerOptions.dev;
|
|
740
|
-
return dev === false && options.productionBundles === true || dev === true && options.developmentBundles === true ? appendRNXModulePaths(result, graph, serializerOptions, cfgProjectRoot) : result;
|
|
741
|
-
}
|
|
583
|
+
let defaultSerializer;
|
|
584
|
+
const serializerConfig = {
|
|
585
|
+
serializer: {
|
|
586
|
+
...cfgSerializer,
|
|
587
|
+
customSerializer: async (entryPoint, preModules, graph, serializerOptions) => {
|
|
588
|
+
const serializer = existingSerializer || (defaultSerializer ||= createMetroDefaultSerializer(cfgProjectRoot));
|
|
589
|
+
const result = await serializer(entryPoint, preModules, graph, serializerOptions);
|
|
590
|
+
return appendRNXModulePaths(result, graph, serializerOptions, cfgProjectRoot);
|
|
742
591
|
}
|
|
743
|
-
}
|
|
744
|
-
}
|
|
592
|
+
}
|
|
593
|
+
};
|
|
745
594
|
const serverConfig = {
|
|
746
595
|
...cfgServer,
|
|
747
596
|
enhanceMiddleware: (metroMiddleware, metroServer) => {
|
|
@@ -770,23 +619,6 @@ function withRNX(config, options = {}) {
|
|
|
770
619
|
}
|
|
771
620
|
const url = req.url || "";
|
|
772
621
|
const pathname = url.split("?")[0];
|
|
773
|
-
if (pathname === "/__server-scan") {
|
|
774
|
-
const absoluteBundleUrl = bundleUrl.startsWith("http") ? bundleUrl : `http://localhost:${port}${bundleUrl}`;
|
|
775
|
-
res.setHeader("content-type", "application/json");
|
|
776
|
-
res.end(
|
|
777
|
-
JSON.stringify([
|
|
778
|
-
{
|
|
779
|
-
port,
|
|
780
|
-
framework: "metro",
|
|
781
|
-
rnxServerId: metroServerId,
|
|
782
|
-
bundleUrl: absoluteBundleUrl,
|
|
783
|
-
...appName ? { projectName: appName } : {},
|
|
784
|
-
lastSeen: Date.now()
|
|
785
|
-
}
|
|
786
|
-
])
|
|
787
|
-
);
|
|
788
|
-
return;
|
|
789
|
-
}
|
|
790
622
|
const runtimeRoot = resolveRuntimeRootForRequestHost(req.headers?.host);
|
|
791
623
|
if (!runtimeRoot) {
|
|
792
624
|
if (pathname === prefix || pathname === prefix + "/") {
|
|
@@ -819,10 +651,8 @@ function withRNX(config, options = {}) {
|
|
|
819
651
|
if (!ext) {
|
|
820
652
|
const htmlPath = import_path2.default.join(runtimeRoot, "index.html");
|
|
821
653
|
let html = import_fs2.default.readFileSync(htmlPath, "utf8");
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
`<script>(function(){var u=new URL(location.href);if(!u.searchParams.has('bundle'))u.searchParams.set('bundle',${JSON.stringify(bundleUrl)});history.replaceState(null,'','${prefix}/'+u.search)})()</script></head>`
|
|
825
|
-
);
|
|
654
|
+
const script = `<script>(function(){var u=new URL(location.href);if(!u.searchParams.has('bundle'))u.searchParams.set('bundle',${JSON.stringify(bundleUrl)});history.replaceState(null,'','${prefix}/'+u.search)})()</script>`;
|
|
655
|
+
html = html.includes("</head>") ? html.replace("</head>", `${script}</head>`) : `${html}${script}`;
|
|
826
656
|
res.setHeader("content-type", "text/html");
|
|
827
657
|
res.end(html);
|
|
828
658
|
return;
|
|
@@ -835,19 +665,10 @@ function withRNX(config, options = {}) {
|
|
|
835
665
|
return server;
|
|
836
666
|
}
|
|
837
667
|
};
|
|
838
|
-
if (appName && !process.env.CI && !process.env.RNX_NO_OPEN) {
|
|
839
|
-
void openRnxDesktopWhenMetroIsReady({
|
|
840
|
-
port,
|
|
841
|
-
bundleUrl: resolveRnxDesktopLaunchTarget(port, bundleUrl),
|
|
842
|
-
appName,
|
|
843
|
-
projectRoot: cfgProjectRoot,
|
|
844
|
-
serverId: metroServerId
|
|
845
|
-
});
|
|
846
|
-
}
|
|
847
668
|
return {
|
|
848
669
|
...config,
|
|
849
|
-
...
|
|
850
|
-
|
|
670
|
+
...serializerConfig,
|
|
671
|
+
server: serverConfig
|
|
851
672
|
};
|
|
852
673
|
}
|
|
853
674
|
function resolveMetroPort(server) {
|
package/dist-lib/profiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.433 | (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.433 | (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.433 | (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.433 | (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.433 | (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.433 | (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.433 | (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);
|