rnxsim 0.1.376 → 0.1.378
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 +28 -25
- package/cli/app-config.ts +9 -12
- package/cli/app-fonts.ts +3 -3
- package/cli/app-project.ts +8 -8
- package/cli/auth.ts +7 -9
- package/cli/bin.ts +16 -31
- package/cli/bridge-flow-runner.ts +3 -3
- package/cli/browser-backend.ts +44 -0
- package/cli/command-contract.ts +221 -0
- package/cli/command-registry.ts +291 -0
- package/cli/commands/agent-wrapper.ts +2 -2
- package/cli/commands/app-fonts.ts +2 -2
- package/cli/commands/assert.ts +3 -3
- package/cli/commands/auth.ts +1 -1
- package/cli/commands/box/cloud-box.ts +1 -1
- package/cli/commands/box/plane-share.ts +2 -2
- package/cli/commands/box.ts +4 -6
- package/cli/commands/compat.ts +1 -1
- package/cli/commands/config.ts +2 -2
- package/cli/commands/control.ts +29 -29
- package/cli/commands/cpu-profile.ts +7 -7
- package/cli/commands/daemon-mac-app.ts +7 -7
- package/cli/commands/daemon.ts +10 -10
- package/cli/commands/debug.ts +11 -11
- package/cli/commands/detox.ts +13 -13
- package/cli/commands/diagnose.ts +6 -6
- package/cli/commands/do-chain.ts +1 -2
- package/cli/commands/electron.ts +1 -3
- package/cli/commands/film.ts +3 -3
- package/cli/commands/flow.ts +43 -43
- package/cli/commands/inspect/count.ts +1 -1
- package/cli/commands/inspect/describe.ts +1 -1
- package/cli/commands/inspect/env.ts +2 -2
- package/cli/commands/inspect/get-layout.ts +1 -1
- package/cli/commands/inspect/keyboard.ts +1 -1
- package/cli/commands/inspect/list.ts +1 -1
- package/cli/commands/inspect/memory.ts +1 -1
- package/cli/commands/inspect/resolve-target.ts +1 -1
- package/cli/commands/inspect/screens.ts +1 -1
- package/cli/commands/inspect/tree.ts +1 -1
- package/cli/commands/inspect/url.ts +1 -1
- package/cli/commands/inspect/wait-event.ts +5 -5
- package/cli/commands/inspect.ts +34 -34
- package/cli/commands/install-desktop.ts +3 -3
- package/cli/commands/login.ts +6 -6
- package/cli/commands/maestro-generate.ts +5 -5
- package/cli/commands/maestro.ts +5 -5
- package/cli/commands/profile.ts +1 -1
- package/cli/commands/record.ts +9 -9
- package/cli/commands/runtime.ts +18 -18
- package/cli/commands/screenshot-command.ts +1 -1
- package/cli/commands/screenshot-layers.ts +5 -5
- package/cli/commands/screenshot-mode.ts +1 -1
- package/cli/commands/screenshot.ts +8 -8
- package/cli/commands/screenshots-capture.ts +5 -5
- package/cli/commands/serve.ts +3 -3
- package/cli/commands/setup.ts +20 -12
- package/cli/commands/skills.ts +5 -5
- package/cli/commands/slides.ts +1 -1
- package/cli/commands/telemetry.ts +1 -1
- package/cli/commands/three-mode.ts +1 -1
- package/cli/commands/timeline.ts +8 -8
- package/cli/commands/upgrade.ts +116 -131
- package/cli/commands/upload.ts +12 -12
- package/cli/commands/version.ts +7 -7
- package/cli/commands/what-happened.ts +9 -9
- package/cli/current-sim.ts +3 -3
- package/cli/desktop-companion.ts +1 -1
- package/cli/drivers/playwright.ts +9 -9
- package/cli/drivers/registry.ts +1 -1
- package/cli/drivers/types.ts +1 -1
- package/cli/flow-file.ts +2 -2
- package/cli/flow-session.ts +1 -1
- package/cli/help-core.ts +136 -0
- package/cli/help.ts +17 -53
- package/cli/hints.ts +5 -5
- package/cli/inspect-notice-state.ts +1 -1
- package/cli/maestro-js.ts +1 -1
- package/cli/outbound-endpoints.ts +23 -5
- package/cli/parse-args.ts +19 -66
- package/cli/recording-access.ts +1 -1
- package/cli/registry.ts +1 -0
- package/cli/run-registry.ts +1 -1
- package/cli/run-rnx-core.ts +148 -0
- package/cli/run-rnx.ts +6 -9
- package/cli/runtime-notes.ts +3 -3
- package/cli/standalone.ts +4 -0
- package/cli/ws-bridge.ts +8 -8
- package/detox/config-loader.ts +2 -2
- package/detox/index.ts +8 -8
- package/detox/jest-preset.cjs +1 -1
- package/detox/navigation.ts +2 -2
- package/dist-lib/agent-daemon-client.cjs +5 -5
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +2 -2
- package/dist-lib/agent-sessions.cjs +10 -10
- package/dist-lib/attached-projects.cjs +6 -6
- package/dist-lib/auth/shared-session.cjs +6 -6
- 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/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +25 -25
- package/dist-lib/detox/index.cjs +73 -31
- package/dist-lib/detox/jest-preset.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +29 -29
- package/dist-lib/host/bridge-host.cjs +128 -49
- 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 +14 -14
- 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 +8 -8
- package/dist-lib/profiles.cjs +12 -12
- 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 +8 -8
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +329 -160
- package/dist-lib/vite.cjs +9 -9
- package/package.json +4 -11
- package/scripts/dev-server-scanner.ts +2 -2
- package/scripts/optional-demo-registry.ts +1 -1
- package/skills/contrast/SKILL.md +3 -3
- package/skills/rnx-debug/SKILL.md +1 -1
- package/skills/rnx-test/SKILL.md +2 -2
- package/src/agent-identity.ts +1 -1
- package/src/agent-sessions.ts +7 -5
- package/src/cli-version.ts +12 -4
- package/src/config.ts +26 -28
- package/src/disk-cleanup.ts +11 -11
- package/src/home-paths.ts +28 -28
- package/src/host/bridge-host.ts +16 -16
- package/src/metro-plugin.ts +2 -2
- package/src/profiles.ts +2 -2
- package/src/runtime-assets.ts +7 -7
- package/src/runtime-delivery.ts +13 -13
- package/src/screenshots/orchestrate.ts +1 -1
- package/src/screenshots/schema.ts +2 -2
- package/src/skills/builtin/a11y-review.ts +2 -2
- package/src/skills/builtin/compat-check.ts +2 -2
- package/src/skills/builtin/maestro-test.ts +2 -2
- package/src/skills/builtin/perf-profile.ts +2 -2
- package/src/skills/builtin/screenshot-all.ts +2 -2
- package/src/skills/builtin/visual-diff.ts +2 -2
- package/src/skills/registry.ts +8 -8
- package/src/skills/types.ts +1 -1
- package/src/vite-plugin-one.ts +3 -3
- package/src/vite-plugin.ts +15 -2
- package/dist-cli/bin.js +0 -15
- package/dist-cli/chunks/agent-H42FCKFF.js +0 -48
- package/dist-cli/chunks/agent-wrapper-BBZKTZS6.js +0 -17
- package/dist-cli/chunks/app-fonts-43VXIKF4.js +0 -4
- package/dist-cli/chunks/assert-IXOLVO5Z.js +0 -49
- package/dist-cli/chunks/auth-KFMFB6FU.js +0 -12
- package/dist-cli/chunks/beta-5AO3SJB7.js +0 -4
- package/dist-cli/chunks/box-ZHM66L6K.js +0 -1730
- package/dist-cli/chunks/camera-FNJVFCDQ.js +0 -33
- package/dist-cli/chunks/chunk-37MCSPTE.js +0 -71
- package/dist-cli/chunks/chunk-3PEMSUAQ.js +0 -30
- package/dist-cli/chunks/chunk-4TQ5HOK3.js +0 -7
- package/dist-cli/chunks/chunk-5YZYDEMI.js +0 -4
- package/dist-cli/chunks/chunk-6CV3R3XD.js +0 -15
- package/dist-cli/chunks/chunk-7LGK5XU6.js +0 -4
- package/dist-cli/chunks/chunk-7R2TK2NY.js +0 -4
- package/dist-cli/chunks/chunk-7VZZQQEE.js +0 -497
- package/dist-cli/chunks/chunk-AFOVILIL.js +0 -130
- package/dist-cli/chunks/chunk-BEU7CD7E.js +0 -9
- package/dist-cli/chunks/chunk-CE4JQJ6Y.js +0 -6
- package/dist-cli/chunks/chunk-CIE6CZXL.js +0 -142
- package/dist-cli/chunks/chunk-CSJ7L7ZL.js +0 -312
- package/dist-cli/chunks/chunk-CWCQP53A.js +0 -27
- package/dist-cli/chunks/chunk-DCS5FK5N.js +0 -7
- package/dist-cli/chunks/chunk-DEV3E3MV.js +0 -4
- package/dist-cli/chunks/chunk-DGJMIVZM.js +0 -5
- package/dist-cli/chunks/chunk-DGX3MN65.js +0 -5
- package/dist-cli/chunks/chunk-DNPQMTW5.js +0 -4
- package/dist-cli/chunks/chunk-DOVBJBVD.js +0 -5
- package/dist-cli/chunks/chunk-DPBJ3S3J.js +0 -3
- package/dist-cli/chunks/chunk-FVZBGPCU.js +0 -4
- package/dist-cli/chunks/chunk-GDKMOIUT.js +0 -4
- package/dist-cli/chunks/chunk-GIF2NJCS.js +0 -32
- package/dist-cli/chunks/chunk-GZE57ORL.js +0 -4
- package/dist-cli/chunks/chunk-H3U56DKI.js +0 -24
- package/dist-cli/chunks/chunk-HZLOYAPH.js +0 -4
- package/dist-cli/chunks/chunk-J2IKAEU2.js +0 -4
- package/dist-cli/chunks/chunk-JXAXYK7W.js +0 -11
- package/dist-cli/chunks/chunk-KJE2O2GK.js +0 -4
- package/dist-cli/chunks/chunk-KMNVDZZI.js +0 -423
- package/dist-cli/chunks/chunk-LC3QRIRB.js +0 -10
- package/dist-cli/chunks/chunk-LGFTAQYC.js +0 -4
- package/dist-cli/chunks/chunk-LQMUA5IY.js +0 -4
- package/dist-cli/chunks/chunk-MFIQTWC5.js +0 -4
- package/dist-cli/chunks/chunk-MGALNF2F.js +0 -7
- package/dist-cli/chunks/chunk-MLBZZHOY.js +0 -4
- package/dist-cli/chunks/chunk-NNRF7GIB.js +0 -107
- package/dist-cli/chunks/chunk-NORLYTTO.js +0 -7
- package/dist-cli/chunks/chunk-P6KVGV3H.js +0 -14
- package/dist-cli/chunks/chunk-PAJTUK33.js +0 -4
- package/dist-cli/chunks/chunk-QELIC5XP.js +0 -4
- package/dist-cli/chunks/chunk-QRDF33WD.js +0 -11
- package/dist-cli/chunks/chunk-R76BA7C7.js +0 -535
- package/dist-cli/chunks/chunk-RVEB4CZ2.js +0 -4
- package/dist-cli/chunks/chunk-SK4M7NXT.js +0 -5
- package/dist-cli/chunks/chunk-SKMG5DD7.js +0 -5
- package/dist-cli/chunks/chunk-TEESPOYR.js +0 -4
- package/dist-cli/chunks/chunk-TH2UFGVP.js +0 -4
- package/dist-cli/chunks/chunk-TLP3T3VO.js +0 -4
- package/dist-cli/chunks/chunk-TZUABDIJ.js +0 -38
- package/dist-cli/chunks/chunk-UB2W6OQM.js +0 -99
- package/dist-cli/chunks/chunk-UYVXALPB.js +0 -506
- package/dist-cli/chunks/chunk-VQDYFFIG.js +0 -5
- package/dist-cli/chunks/chunk-VWCNJPCJ.js +0 -5
- package/dist-cli/chunks/chunk-VZIK4WIS.js +0 -74
- package/dist-cli/chunks/chunk-W3FNXAQP.js +0 -4
- package/dist-cli/chunks/chunk-XCDNVNP3.js +0 -4
- package/dist-cli/chunks/chunk-XSVILA4Z.js +0 -4
- package/dist-cli/chunks/chunk-XUTJ7ZWD.js +0 -4
- package/dist-cli/chunks/chunk-YTXY3MHW.js +0 -4
- package/dist-cli/chunks/chunk-ZF7PVX44.js +0 -28
- package/dist-cli/chunks/chunk-ZSSG7OR7.js +0 -4
- package/dist-cli/chunks/cleanup-MLOK2OZA.js +0 -25
- package/dist-cli/chunks/cli-version-OBNR366V.js +0 -4
- package/dist-cli/chunks/compat-SHMFSKU7.js +0 -23
- package/dist-cli/chunks/config-TPEAEUJ2.js +0 -13
- package/dist-cli/chunks/connect-3LEXWTE5.js +0 -4
- package/dist-cli/chunks/control-Z3FWA6BO.js +0 -4
- package/dist-cli/chunks/daemon-RSVYSC65.js +0 -4
- package/dist-cli/chunks/debug-GUVAK2KR.js +0 -200
- package/dist-cli/chunks/desktop-OOP2PTKP.js +0 -31
- package/dist-cli/chunks/detox-C2ILVBEC.js +0 -52
- package/dist-cli/chunks/device-NXIQQJWR.js +0 -18
- package/dist-cli/chunks/diagnose-2JBGYE5L.js +0 -43
- package/dist-cli/chunks/disk-cleanup-VURWJYQV.js +0 -4
- package/dist-cli/chunks/do-chain-DJ4UQC7A.js +0 -5
- package/dist-cli/chunks/drivers-JMA2OIKU.js +0 -4
- package/dist-cli/chunks/env-KTNPKEZR.js +0 -4
- package/dist-cli/chunks/film-DCPS7EID.js +0 -74
- package/dist-cli/chunks/flow-4DZ7B2OA.js +0 -4
- package/dist-cli/chunks/help-34CJMQY2.js +0 -4
- package/dist-cli/chunks/hidden-runtime-alias-HHT2C7WE.js +0 -4
- package/dist-cli/chunks/home-paths-KTPGCPMS.js +0 -4
- package/dist-cli/chunks/inspect-JF5WYJRD.js +0 -4
- package/dist-cli/chunks/install-desktop-ZIC4CDXI.js +0 -4
- package/dist-cli/chunks/login-TTJAOI2Q.js +0 -26
- package/dist-cli/chunks/logout-ERAQ6SKW.js +0 -4
- package/dist-cli/chunks/maestro-W46QCF77.js +0 -108
- package/dist-cli/chunks/maestro-generate-VBLM3MTU.js +0 -36
- package/dist-cli/chunks/mode-ZEDZK7R7.js +0 -26
- package/dist-cli/chunks/optional-demo-registry-ZUTPSVYQ.js +0 -4
- package/dist-cli/chunks/perf-YVT2WXT4.js +0 -48
- package/dist-cli/chunks/permissions-L7VVDHFP.js +0 -13
- package/dist-cli/chunks/platform-7TJOU2FB.js +0 -6
- package/dist-cli/chunks/privacy-57UOTB5J.js +0 -4
- package/dist-cli/chunks/record-VXG37P7U.js +0 -72
- package/dist-cli/chunks/report-issue-WNNOBZHC.js +0 -29
- package/dist-cli/chunks/reset-H5NBFE5U.js +0 -4
- package/dist-cli/chunks/resolve-target-57TK5WLE.js +0 -4
- package/dist-cli/chunks/runtime-QU2NIF2K.js +0 -4
- package/dist-cli/chunks/screenshot-command-AN56TTG7.js +0 -159
- package/dist-cli/chunks/screenshot-layers-3W5R7DB2.js +0 -20
- package/dist-cli/chunks/screenshots-capture-6AWJY7XZ.js +0 -42
- package/dist-cli/chunks/serve-GLYO5Q7J.js +0 -56
- package/dist-cli/chunks/setup-UA2HLD7S.js +0 -4
- package/dist-cli/chunks/sim-client-5C2RDQQO.js +0 -4
- package/dist-cli/chunks/skills-EYXWBRNQ.js +0 -50
- package/dist-cli/chunks/state-REJ7W6K3.js +0 -14
- package/dist-cli/chunks/storage-CFMDHI3V.js +0 -37
- package/dist-cli/chunks/store-XMCUA45G.js +0 -4
- package/dist-cli/chunks/telemetry-FBL3NAKB.js +0 -4
- package/dist-cli/chunks/timeline-HMCHN5FO.js +0 -24
- package/dist-cli/chunks/upgrade-2QSPAA3P.js +0 -7
- package/dist-cli/chunks/upload-DUQBKZYV.js +0 -4
- package/dist-cli/chunks/version-IOA6QFGB.js +0 -6
- package/dist-cli/chunks/web-NCGUYVCJ.js +0 -4
- package/dist-cli/chunks/welcome-QYGSQCWQ.js +0 -5
- package/dist-cli/chunks/what-happened-YTOUK4LO.js +0 -25
- package/dist-cli/chunks/ws-bridge-OF4OZARG.js +0 -4
- package/scripts/postinstall.cjs +0 -3
- package/scripts/preuninstall.cjs +0 -118
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.378 | (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;
|
|
@@ -132,20 +132,20 @@ function isLoopbackHost(hostname) {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
// src/config.ts
|
|
135
|
-
var
|
|
135
|
+
var RNX_CONFIG_QUERY_PARAM = "rnxConfig";
|
|
136
136
|
function hasOwnKeys(value) {
|
|
137
137
|
return !!value && Object.keys(value).length > 0;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function hasRNXConfig(config) {
|
|
140
140
|
if (!config) return false;
|
|
141
141
|
return typeof config.runtimeVersion === "string" && config.runtimeVersion.length > 0 || hasOwnKeys(config.modules) || hasOwnKeys(config.turboModules) || hasOwnKeys(config.nativeModules) || hasOwnKeys(config.env) || hasOwnKeys(config.network?.remap) || hasOwnKeys(config.settings) || hasOwnKeys(config.initialState);
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function applyRNXConfigToUrl(url, config) {
|
|
144
144
|
const parsed = new URL(url);
|
|
145
|
-
if (
|
|
146
|
-
parsed.searchParams.set(
|
|
145
|
+
if (hasRNXConfig(config)) {
|
|
146
|
+
parsed.searchParams.set(RNX_CONFIG_QUERY_PARAM, JSON.stringify(config));
|
|
147
147
|
} else {
|
|
148
|
-
parsed.searchParams.delete(
|
|
148
|
+
parsed.searchParams.delete(RNX_CONFIG_QUERY_PARAM);
|
|
149
149
|
}
|
|
150
150
|
return parsed.toString();
|
|
151
151
|
}
|
|
@@ -819,7 +819,7 @@ function withRuntimeConfig(port, bundleUrl, projectCwd) {
|
|
|
819
819
|
}) : [];
|
|
820
820
|
const exactKnownApps = knownApps.filter((app) => app.preferredPort === port);
|
|
821
821
|
const knownApp = exactKnownApps.length === 1 ? exactKnownApps[0] : exactKnownApps.length === 0 && knownApps.length === 1 ? knownApps[0] : void 0;
|
|
822
|
-
const configured = knownApp?.runtimeConfig ?
|
|
822
|
+
const configured = knownApp?.runtimeConfig ? applyRNXConfigToUrl(bundleUrl, knownApp.runtimeConfig) : bundleUrl;
|
|
823
823
|
return normalizeNativeDevBundleUrl(configured);
|
|
824
824
|
}
|
|
825
825
|
function isDirectOneBundleUrl(bundleUrl) {
|
|
@@ -1173,6 +1173,10 @@ var import_meta = {};
|
|
|
1173
1173
|
var cached2 = null;
|
|
1174
1174
|
function getCliVersion() {
|
|
1175
1175
|
if (cached2 != null) return cached2;
|
|
1176
|
+
if (typeof __RNX_CLI_VERSION__ !== "undefined" && typeof __RNX_CLI_VERSION__ === "string" && __RNX_CLI_VERSION__) {
|
|
1177
|
+
cached2 = __RNX_CLI_VERSION__;
|
|
1178
|
+
return cached2;
|
|
1179
|
+
}
|
|
1176
1180
|
const candidates = [
|
|
1177
1181
|
() => (0, import_node_url2.fileURLToPath)(import_meta.resolve(`${rnxPublicBrand.packageName}/package.json`)),
|
|
1178
1182
|
() => (0, import_node_url2.fileURLToPath)(new URL("../package.json", __sootsim_import_meta_url))
|
|
@@ -1196,16 +1200,16 @@ var import_node_crypto = require("node:crypto");
|
|
|
1196
1200
|
var import_node_fs4 = __toESM(require("node:fs"), 1);
|
|
1197
1201
|
var import_node_os = require("node:os");
|
|
1198
1202
|
var import_node_path4 = __toESM(require("node:path"), 1);
|
|
1199
|
-
var
|
|
1203
|
+
var RNX_HOME_ENV = "RNX_HOME";
|
|
1200
1204
|
var ACTIVE_RUNTIME_FILE = "active";
|
|
1201
1205
|
var DAEMON_LOCKFILE = "daemon.json";
|
|
1202
1206
|
var DEV_BRIDGES_DIR = "dev-bridges";
|
|
1203
1207
|
var CONFIG_FILE = "config.json";
|
|
1204
1208
|
var DAEMON_HEARTBEAT_STALE_MS = 3e4;
|
|
1205
|
-
function
|
|
1206
|
-
const override = process.env[
|
|
1209
|
+
function rnxHomeDir() {
|
|
1210
|
+
const override = process.env[RNX_HOME_ENV];
|
|
1207
1211
|
if (override && override.length > 0) return import_node_path4.default.resolve(override);
|
|
1208
|
-
return import_node_path4.default.join((0, import_node_os.homedir)(), ".
|
|
1212
|
+
return import_node_path4.default.join((0, import_node_os.homedir)(), ".rnx");
|
|
1209
1213
|
}
|
|
1210
1214
|
function isSootsimDevCheckout() {
|
|
1211
1215
|
if (process.env.SOOTSIM_FORCE_DAEMON_INSTALL === "1") return false;
|
|
@@ -1222,7 +1226,7 @@ function isSootsimDevCheckout() {
|
|
|
1222
1226
|
}
|
|
1223
1227
|
}
|
|
1224
1228
|
function runtimesDir() {
|
|
1225
|
-
return import_node_path4.default.join(
|
|
1229
|
+
return import_node_path4.default.join(rnxHomeDir(), "runtimes");
|
|
1226
1230
|
}
|
|
1227
1231
|
function runtimeDir(version) {
|
|
1228
1232
|
return import_node_path4.default.join(runtimesDir(), version);
|
|
@@ -1231,25 +1235,25 @@ function activeRuntimeFile() {
|
|
|
1231
1235
|
return import_node_path4.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
|
|
1232
1236
|
}
|
|
1233
1237
|
function electronDir() {
|
|
1234
|
-
return import_node_path4.default.join(
|
|
1238
|
+
return import_node_path4.default.join(rnxHomeDir(), "electron");
|
|
1235
1239
|
}
|
|
1236
1240
|
function electronUserDataDir() {
|
|
1237
1241
|
return import_node_path4.default.join(electronDir(), "userData");
|
|
1238
1242
|
}
|
|
1239
1243
|
function profilesDir() {
|
|
1240
|
-
return import_node_path4.default.join(
|
|
1244
|
+
return import_node_path4.default.join(rnxHomeDir(), "profiles");
|
|
1241
1245
|
}
|
|
1242
1246
|
function cameraFixturesDir() {
|
|
1243
|
-
return import_node_path4.default.join(
|
|
1247
|
+
return import_node_path4.default.join(rnxHomeDir(), "camera-fixtures");
|
|
1244
1248
|
}
|
|
1245
1249
|
function cacheDir() {
|
|
1246
|
-
return import_node_path4.default.join(
|
|
1250
|
+
return import_node_path4.default.join(rnxHomeDir(), "cache");
|
|
1247
1251
|
}
|
|
1248
1252
|
function daemonLockfilePath() {
|
|
1249
|
-
return import_node_path4.default.join(
|
|
1253
|
+
return import_node_path4.default.join(rnxHomeDir(), DAEMON_LOCKFILE);
|
|
1250
1254
|
}
|
|
1251
1255
|
function devBridgesDir() {
|
|
1252
|
-
return import_node_path4.default.join(
|
|
1256
|
+
return import_node_path4.default.join(rnxHomeDir(), DEV_BRIDGES_DIR);
|
|
1253
1257
|
}
|
|
1254
1258
|
function devBridgeLockfilePath(bridgePort) {
|
|
1255
1259
|
if (!Number.isInteger(bridgePort) || bridgePort <= 0) {
|
|
@@ -1258,7 +1262,7 @@ function devBridgeLockfilePath(bridgePort) {
|
|
|
1258
1262
|
return import_node_path4.default.join(devBridgesDir(), `${bridgePort}.json`);
|
|
1259
1263
|
}
|
|
1260
1264
|
function configFilePath() {
|
|
1261
|
-
return import_node_path4.default.join(
|
|
1265
|
+
return import_node_path4.default.join(rnxHomeDir(), CONFIG_FILE);
|
|
1262
1266
|
}
|
|
1263
1267
|
function readSharedConfig() {
|
|
1264
1268
|
try {
|
|
@@ -1270,7 +1274,7 @@ function readSharedConfig() {
|
|
|
1270
1274
|
}
|
|
1271
1275
|
}
|
|
1272
1276
|
function writeSharedConfig(patch) {
|
|
1273
|
-
|
|
1277
|
+
ensureRnxHome();
|
|
1274
1278
|
const current = readSharedConfig();
|
|
1275
1279
|
const next = { ...current, ...patch };
|
|
1276
1280
|
if (patch.settings && typeof patch.settings === "object") {
|
|
@@ -1286,17 +1290,17 @@ function writeSharedConfig(patch) {
|
|
|
1286
1290
|
return next;
|
|
1287
1291
|
}
|
|
1288
1292
|
function runtimeUpgradeNoticePath() {
|
|
1289
|
-
return import_node_path4.default.join(
|
|
1293
|
+
return import_node_path4.default.join(rnxHomeDir(), "runtime-upgraded.json");
|
|
1290
1294
|
}
|
|
1291
1295
|
function writeRuntimeUpgradeNotice(notice) {
|
|
1292
|
-
|
|
1296
|
+
ensureRnxHome();
|
|
1293
1297
|
const tmp = `${runtimeUpgradeNoticePath()}.tmp`;
|
|
1294
1298
|
import_node_fs4.default.writeFileSync(tmp, `${JSON.stringify(notice)}
|
|
1295
1299
|
`, "utf8");
|
|
1296
1300
|
import_node_fs4.default.renameSync(tmp, runtimeUpgradeNoticePath());
|
|
1297
1301
|
}
|
|
1298
|
-
function
|
|
1299
|
-
import_node_fs4.default.mkdirSync(
|
|
1302
|
+
function ensureRnxHome() {
|
|
1303
|
+
import_node_fs4.default.mkdirSync(rnxHomeDir(), { recursive: true });
|
|
1300
1304
|
import_node_fs4.default.mkdirSync(runtimesDir(), { recursive: true });
|
|
1301
1305
|
import_node_fs4.default.mkdirSync(electronDir(), { recursive: true });
|
|
1302
1306
|
import_node_fs4.default.mkdirSync(profilesDir(), { recursive: true });
|
|
@@ -1368,7 +1372,7 @@ function isDaemonLockfileFresh(lock, now = Date.now()) {
|
|
|
1368
1372
|
}
|
|
1369
1373
|
}
|
|
1370
1374
|
function writeDaemonLockfile(data) {
|
|
1371
|
-
|
|
1375
|
+
ensureRnxHome();
|
|
1372
1376
|
const lockfilePath = daemonLockfilePath();
|
|
1373
1377
|
const existing = readDaemonLockfile();
|
|
1374
1378
|
if (!existing) {
|
|
@@ -1498,7 +1502,7 @@ function releaseDaemonClaim(owner) {
|
|
|
1498
1502
|
}
|
|
1499
1503
|
}
|
|
1500
1504
|
function claimDaemonLockfile(data) {
|
|
1501
|
-
|
|
1505
|
+
ensureRnxHome();
|
|
1502
1506
|
if (!acquireDaemonClaim(data)) return false;
|
|
1503
1507
|
try {
|
|
1504
1508
|
const existing = readDaemonLockfile();
|
|
@@ -1972,7 +1976,7 @@ function findMonorepoRoot() {
|
|
|
1972
1976
|
return null;
|
|
1973
1977
|
}
|
|
1974
1978
|
function resolveDevCheckoutRuntimeRoot() {
|
|
1975
|
-
if (process.env.
|
|
1979
|
+
if (process.env.RNX_HOME && readActiveRuntime()) return null;
|
|
1976
1980
|
const root = findMonorepoRoot();
|
|
1977
1981
|
if (!root) return null;
|
|
1978
1982
|
const devBuild = import_path.default.join(root, "public/sootsim");
|
|
@@ -2022,9 +2026,9 @@ function resolveRuntimeRootForHostname(hostname) {
|
|
|
2022
2026
|
|
|
2023
2027
|
// src/runtime-delivery.ts
|
|
2024
2028
|
var DEFAULT_RUNTIME_CDN_ORIGIN = "https://contrast.dev";
|
|
2025
|
-
var
|
|
2026
|
-
var
|
|
2027
|
-
id: "
|
|
2029
|
+
var RNX_CHANGELOG_URL = `${rnxPublicBrand.origin}/changelog`;
|
|
2030
|
+
var RNX_RUNTIME_PRODUCT = {
|
|
2031
|
+
id: "rnx",
|
|
2028
2032
|
defaultCdnOrigin: DEFAULT_RUNTIME_CDN_ORIGIN,
|
|
2029
2033
|
manifestPath: "/runtimes/manifest.json",
|
|
2030
2034
|
tarballPath: (version) => `/runtimes/sootsim-runtime-${version}.tar.gz`,
|
|
@@ -2033,10 +2037,10 @@ var SOOTSIM_RUNTIME_PRODUCT = {
|
|
|
2033
2037
|
// vite/metro plugins serve, so its absence means the tarball is not one.
|
|
2034
2038
|
installedMarker: "index.html",
|
|
2035
2039
|
env: {
|
|
2036
|
-
cdnOrigin: "
|
|
2037
|
-
channel: "
|
|
2040
|
+
cdnOrigin: "RNX_CDN_ORIGIN",
|
|
2041
|
+
channel: "RNX_RUNTIME_CHANNEL"
|
|
2038
2042
|
},
|
|
2039
|
-
ensureHome:
|
|
2043
|
+
ensureHome: ensureRnxHome,
|
|
2040
2044
|
configFile: configFilePath,
|
|
2041
2045
|
runtimesDir,
|
|
2042
2046
|
runtimeDir,
|
|
@@ -2044,7 +2048,7 @@ var SOOTSIM_RUNTIME_PRODUCT = {
|
|
|
2044
2048
|
readActiveRuntime,
|
|
2045
2049
|
writeActiveRuntime
|
|
2046
2050
|
};
|
|
2047
|
-
var
|
|
2051
|
+
var rnxRuntime = createRuntimeDelivery(RNX_RUNTIME_PRODUCT);
|
|
2048
2052
|
|
|
2049
2053
|
// src/host/agent-host.ts
|
|
2050
2054
|
var import_node_fs9 = __toESM(require("node:fs"), 1);
|
|
@@ -2398,8 +2402,8 @@ function pidIsAlive(pid, sessionId) {
|
|
|
2398
2402
|
return true;
|
|
2399
2403
|
}
|
|
2400
2404
|
function resolveSootsimInvocation() {
|
|
2401
|
-
if (process.env.
|
|
2402
|
-
return { cmd: process.env.
|
|
2405
|
+
if (process.env.RNX_BIN) {
|
|
2406
|
+
return { cmd: process.env.RNX_BIN, prefixArgs: [] };
|
|
2403
2407
|
}
|
|
2404
2408
|
if (process.versions.electron) {
|
|
2405
2409
|
const resourcesPath = process.resourcesPath;
|
|
@@ -2422,7 +2426,7 @@ function resolveSootsimInvocation() {
|
|
|
2422
2426
|
}
|
|
2423
2427
|
if (!argv1 || argv1.includes("/.bin/")) {
|
|
2424
2428
|
throw new Error(
|
|
2425
|
-
"rnx CLI not found. set
|
|
2429
|
+
"rnx CLI not found. set RNX_BIN to the path of the rnx binary, or build the workspace CLI via `bun run --cwd packages/sootsim build:cli`."
|
|
2426
2430
|
);
|
|
2427
2431
|
}
|
|
2428
2432
|
return { cmd: argv0, prefixArgs: [] };
|
|
@@ -2431,7 +2435,7 @@ function tryWorkspaceSootsim() {
|
|
|
2431
2435
|
try {
|
|
2432
2436
|
const sootsimDir = resolveSootsimPackageDir();
|
|
2433
2437
|
if (!sootsimDir) return null;
|
|
2434
|
-
const binaryName = `
|
|
2438
|
+
const binaryName = `rnx-${process.platform === "win32" ? "windows" : process.platform}-${process.arch}${process.platform === "win32" ? ".exe" : ""}`;
|
|
2435
2439
|
const distBinary = import_node_path8.default.join(sootsimDir, "dist-bin", binaryName);
|
|
2436
2440
|
if (import_node_fs8.default.existsSync(distBinary)) return { cmd: distBinary, prefixArgs: [] };
|
|
2437
2441
|
const distBin = import_node_path8.default.join(sootsimDir, "dist-cli", "bin.js");
|
|
@@ -3782,7 +3786,82 @@ async function openUrl(url, options = {}) {
|
|
|
3782
3786
|
// src/host/plane-host.ts
|
|
3783
3787
|
var import_node_fs11 = __toESM(require("node:fs"), 1);
|
|
3784
3788
|
var import_node_path11 = __toESM(require("node:path"), 1);
|
|
3785
|
-
|
|
3789
|
+
|
|
3790
|
+
// ../contrast-harness/src/planeProtocol.ts
|
|
3791
|
+
var PLANE_FLAG_READ_ONLY = 1;
|
|
3792
|
+
var PLANE_FLAG_BINARY = 2;
|
|
3793
|
+
function encodeBase64(bytes) {
|
|
3794
|
+
let binary = "";
|
|
3795
|
+
const CHUNK = 32768;
|
|
3796
|
+
for (let i = 0; i < bytes.length; i += CHUNK) {
|
|
3797
|
+
binary += String.fromCharCode(...bytes.subarray(i, i + CHUNK));
|
|
3798
|
+
}
|
|
3799
|
+
return btoa(binary);
|
|
3800
|
+
}
|
|
3801
|
+
function decodeBase64(value) {
|
|
3802
|
+
const binary = atob(value);
|
|
3803
|
+
const bytes = new Uint8Array(binary.length);
|
|
3804
|
+
for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
|
|
3805
|
+
return bytes;
|
|
3806
|
+
}
|
|
3807
|
+
function indexVersion(index) {
|
|
3808
|
+
let a = 2166136261;
|
|
3809
|
+
let b = 16777619;
|
|
3810
|
+
for (const key of [...index.keys()].sort()) {
|
|
3811
|
+
const meta = index.get(key);
|
|
3812
|
+
if (!meta) continue;
|
|
3813
|
+
const line = `${key} ${meta.size} ${meta.readOnly ? 1 : 0}${meta.binary ? 1 : 0} ${meta.hash ?? ""}`;
|
|
3814
|
+
for (let i = 0; i < line.length; i++) {
|
|
3815
|
+
const c = line.charCodeAt(i);
|
|
3816
|
+
a = Math.imul(a ^ c, 16777619);
|
|
3817
|
+
b = Math.imul(b + c, 2246822507) ^ b >>> 13;
|
|
3818
|
+
}
|
|
3819
|
+
}
|
|
3820
|
+
return `${(a >>> 0).toString(36)}${(b >>> 0).toString(36)}-${index.size}`;
|
|
3821
|
+
}
|
|
3822
|
+
function serializeIndex(index) {
|
|
3823
|
+
const out = [];
|
|
3824
|
+
for (const [key, meta] of index) {
|
|
3825
|
+
const flags = (meta.readOnly ? PLANE_FLAG_READ_ONLY : 0) | (meta.binary ? PLANE_FLAG_BINARY : 0);
|
|
3826
|
+
out.push(meta.hash ? [key, meta.size, flags, meta.hash] : [key, meta.size, flags]);
|
|
3827
|
+
}
|
|
3828
|
+
return out;
|
|
3829
|
+
}
|
|
3830
|
+
async function dispatchPlaneCommand(plane, type, msg, mutationOptions) {
|
|
3831
|
+
switch (type) {
|
|
3832
|
+
case "plane:index":
|
|
3833
|
+
case "plane:refresh": {
|
|
3834
|
+
await plane.refresh();
|
|
3835
|
+
const version = indexVersion(plane.index());
|
|
3836
|
+
if (msg.sinceVersion && msg.sinceVersion === version) {
|
|
3837
|
+
return { result: { version, unchanged: true }, version };
|
|
3838
|
+
}
|
|
3839
|
+
return { result: { version, entries: serializeIndex(plane.index()) }, version };
|
|
3840
|
+
}
|
|
3841
|
+
case "plane:read":
|
|
3842
|
+
return { result: { content: await plane.read(String(msg.path)) } };
|
|
3843
|
+
case "plane:read-bytes":
|
|
3844
|
+
return { result: { base64: encodeBase64(await plane.readBytes(String(msg.path))) } };
|
|
3845
|
+
case "plane:write": {
|
|
3846
|
+
mutationOptions?.signal?.throwIfAborted();
|
|
3847
|
+
await plane.write(
|
|
3848
|
+
String(msg.path),
|
|
3849
|
+
decodeBase64(String(msg.base64 ?? "")),
|
|
3850
|
+
mutationOptions
|
|
3851
|
+
);
|
|
3852
|
+
const version = indexVersion(plane.index());
|
|
3853
|
+
return { result: { version }, version };
|
|
3854
|
+
}
|
|
3855
|
+
case "plane:delete": {
|
|
3856
|
+
mutationOptions?.signal?.throwIfAborted();
|
|
3857
|
+
await plane.delete(String(msg.path), mutationOptions);
|
|
3858
|
+
const version = indexVersion(plane.index());
|
|
3859
|
+
return { result: { version }, version };
|
|
3860
|
+
}
|
|
3861
|
+
default:
|
|
3862
|
+
return null;
|
|
3863
|
+
}
|
|
3864
|
+
}
|
|
3786
3865
|
|
|
3787
3866
|
// cli/commands/box/checkout-plane.ts
|
|
3788
3867
|
var import_node_child_process4 = require("node:child_process");
|
|
@@ -3993,7 +4072,7 @@ var PlaneHost = class {
|
|
|
3993
4072
|
const entry = {
|
|
3994
4073
|
root,
|
|
3995
4074
|
plane,
|
|
3996
|
-
version:
|
|
4075
|
+
version: indexVersion(plane.index()),
|
|
3997
4076
|
sockets: /* @__PURE__ */ new Set([ws])
|
|
3998
4077
|
};
|
|
3999
4078
|
this.open.set(planeId, entry);
|
|
@@ -4007,7 +4086,7 @@ var PlaneHost = class {
|
|
|
4007
4086
|
}
|
|
4008
4087
|
default: {
|
|
4009
4088
|
const entry = this.entry(msg);
|
|
4010
|
-
const handled = await
|
|
4089
|
+
const handled = await dispatchPlaneCommand(entry.plane, type, msg);
|
|
4011
4090
|
if (!handled) throw new Error(`unknown plane command: ${type}`);
|
|
4012
4091
|
if (handled.version) entry.version = handled.version;
|
|
4013
4092
|
return handled.result;
|
|
@@ -4761,7 +4840,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
4761
4840
|
return;
|
|
4762
4841
|
}
|
|
4763
4842
|
if (msg.type === "runtime:list") {
|
|
4764
|
-
const versions =
|
|
4843
|
+
const versions = rnxRuntime.listInstalled();
|
|
4765
4844
|
const active = this.getActiveRuntime();
|
|
4766
4845
|
const reply = {
|
|
4767
4846
|
type: "runtime:list:ok",
|
|
@@ -4778,7 +4857,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
4778
4857
|
}
|
|
4779
4858
|
if (msg.type === "runtime:use") {
|
|
4780
4859
|
const version = typeof msg.version === "string" ? msg.version : "";
|
|
4781
|
-
const installed =
|
|
4860
|
+
const installed = rnxRuntime.listInstalled();
|
|
4782
4861
|
if (!installed.includes(version)) {
|
|
4783
4862
|
try {
|
|
4784
4863
|
ws.send(
|
|
@@ -5141,7 +5220,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
5141
5220
|
this.wsHeartbeatTimer.unref();
|
|
5142
5221
|
if (this.shouldWriteLockfile) {
|
|
5143
5222
|
try {
|
|
5144
|
-
|
|
5223
|
+
ensureRnxHome();
|
|
5145
5224
|
const claimed = claimDaemonLockfile(this.buildLockfileSnapshot());
|
|
5146
5225
|
if (!claimed) {
|
|
5147
5226
|
throw new Error(
|
|
@@ -5271,7 +5350,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
5271
5350
|
return this.inflightScan;
|
|
5272
5351
|
}
|
|
5273
5352
|
// serves one staged camera fixture. addressed by basename inside
|
|
5274
|
-
// ~/.
|
|
5353
|
+
// ~/.rnx/camera-fixtures, never by a caller-supplied path, so there is
|
|
5275
5354
|
// no traversal surface to defend: a name that is not a plain basename is
|
|
5276
5355
|
// rejected outright. range support is not optional here — chrome asks for
|
|
5277
5356
|
// byte ranges on media and cannot seek or loop a fixture without it.
|
|
@@ -5381,8 +5460,8 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
5381
5460
|
}
|
|
5382
5461
|
startRuntimeUpdater() {
|
|
5383
5462
|
if (!this.shouldWriteLockfile || this.runtimeUpdateTimer) return;
|
|
5384
|
-
if (import_fs2.default.existsSync(import_path2.default.join(
|
|
5385
|
-
if (process.env.
|
|
5463
|
+
if (import_fs2.default.existsSync(import_path2.default.join(rnxHomeDir(), "runtime-update-disabled"))) return;
|
|
5464
|
+
if (process.env.RNX_HOME && isSootsimDevCheckout() && !readActiveRuntime()) {
|
|
5386
5465
|
return;
|
|
5387
5466
|
}
|
|
5388
5467
|
void this.runRuntimeUpdate("startup");
|
|
@@ -5399,7 +5478,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
5399
5478
|
if (reason === "startup") {
|
|
5400
5479
|
process.stderr.write("rnx: checking for runtime updates\u2026\n");
|
|
5401
5480
|
}
|
|
5402
|
-
const result = await
|
|
5481
|
+
const result = await rnxRuntime.updateToLatest({
|
|
5403
5482
|
protectVersions: this.connectedRuntimeVersions()
|
|
5404
5483
|
});
|
|
5405
5484
|
if (!result.updated || !result.latestVersion) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.378 | (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.378 | (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.378 | (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.378 | (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.378 | (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.378 | (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;
|
|
@@ -212,7 +212,7 @@ function tryBuildDarwinCommFfi() {
|
|
|
212
212
|
var CURRENT_SIM_VERSION = 1;
|
|
213
213
|
var CURRENT_SIM_PATH_ENV = "SOOTSIM_CLI_CURRENT_SIM_PATH";
|
|
214
214
|
var IDENTITY_ENV_VARS = [
|
|
215
|
-
"
|
|
215
|
+
"RNX_CLI_IDENTITY",
|
|
216
216
|
// explicit override — fastest path, skips all pid lookups
|
|
217
217
|
"TM_SESSION",
|
|
218
218
|
// Team Machine session id; routes prompt-bar followups back to this agent
|
|
@@ -280,7 +280,7 @@ function getCurrentSimPath() {
|
|
|
280
280
|
return (0, import_path.resolve)(process.env[CURRENT_SIM_PATH_ENV]);
|
|
281
281
|
}
|
|
282
282
|
const key = getCliIdentityKey();
|
|
283
|
-
return (0, import_path.join)((0, import_os.tmpdir)(), `
|
|
283
|
+
return (0, import_path.join)((0, import_os.tmpdir)(), `rnx-current-sim-${key}.json`);
|
|
284
284
|
}
|
|
285
285
|
function readCurrentSim() {
|
|
286
286
|
const filepath = getCurrentSimPath();
|
|
@@ -343,18 +343,18 @@ var DEFAULT_SOOTSIM_SHELL_URL = "http://localhost:5173/";
|
|
|
343
343
|
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
344
344
|
var import_node_os = require("node:os");
|
|
345
345
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
346
|
-
var
|
|
346
|
+
var RNX_HOME_ENV = "RNX_HOME";
|
|
347
347
|
var ACTIVE_RUNTIME_FILE = "active";
|
|
348
348
|
var DAEMON_LOCKFILE = "daemon.json";
|
|
349
349
|
var DEV_BRIDGES_DIR = "dev-bridges";
|
|
350
350
|
var DAEMON_HEARTBEAT_STALE_MS = 3e4;
|
|
351
|
-
function
|
|
352
|
-
const override = process.env[
|
|
351
|
+
function rnxHomeDir() {
|
|
352
|
+
const override = process.env[RNX_HOME_ENV];
|
|
353
353
|
if (override && override.length > 0) return import_node_path.default.resolve(override);
|
|
354
|
-
return import_node_path.default.join((0, import_node_os.homedir)(), ".
|
|
354
|
+
return import_node_path.default.join((0, import_node_os.homedir)(), ".rnx");
|
|
355
355
|
}
|
|
356
356
|
function runtimesDir() {
|
|
357
|
-
return import_node_path.default.join(
|
|
357
|
+
return import_node_path.default.join(rnxHomeDir(), "runtimes");
|
|
358
358
|
}
|
|
359
359
|
function runtimeDir(version) {
|
|
360
360
|
return import_node_path.default.join(runtimesDir(), version);
|
|
@@ -363,10 +363,10 @@ function activeRuntimeFile() {
|
|
|
363
363
|
return import_node_path.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
|
|
364
364
|
}
|
|
365
365
|
function daemonLockfilePath() {
|
|
366
|
-
return import_node_path.default.join(
|
|
366
|
+
return import_node_path.default.join(rnxHomeDir(), DAEMON_LOCKFILE);
|
|
367
367
|
}
|
|
368
368
|
function devBridgesDir() {
|
|
369
|
-
return import_node_path.default.join(
|
|
369
|
+
return import_node_path.default.join(rnxHomeDir(), DEV_BRIDGES_DIR);
|
|
370
370
|
}
|
|
371
371
|
function readActiveRuntime() {
|
|
372
372
|
try {
|
|
@@ -511,7 +511,7 @@ function resolveDefaultDevBridgeLockfile() {
|
|
|
511
511
|
return lockfiles.find((lockfile) => lockfile.bridgePort === DEFAULT_SOOTSIM_BRIDGE_PORT) ?? lockfiles[0];
|
|
512
512
|
}
|
|
513
513
|
function resolveBridgeWorld() {
|
|
514
|
-
const homeDir =
|
|
514
|
+
const homeDir = rnxHomeDir();
|
|
515
515
|
if (resolvedWorld?.homeDir === homeDir) return resolvedWorld.world;
|
|
516
516
|
const world = resolveBridgeWorldFresh();
|
|
517
517
|
resolvedWorld = { homeDir, world };
|
|
@@ -2934,7 +2934,7 @@ function findMonorepoRoot() {
|
|
|
2934
2934
|
return null;
|
|
2935
2935
|
}
|
|
2936
2936
|
function resolveDevCheckoutRuntimeRoot() {
|
|
2937
|
-
if (process.env.
|
|
2937
|
+
if (process.env.RNX_HOME && readActiveRuntime()) return null;
|
|
2938
2938
|
const root = findMonorepoRoot();
|
|
2939
2939
|
if (!root) return null;
|
|
2940
2940
|
const devBuild = import_path2.default.join(root, "public/sootsim");
|
|
@@ -3171,7 +3171,7 @@ function rnxPlugin(options = {}) {
|
|
|
3171
3171
|
const port = configuredPort;
|
|
3172
3172
|
const sootsimUrl = `http://localhost:${port}${prefix2}/`;
|
|
3173
3173
|
console.log(`[rnx] serving at ${sootsimUrl}`);
|
|
3174
|
-
if (appName && !process.env.CI && !process.env.
|
|
3174
|
+
if (appName && !process.env.CI && !process.env.RNX_NO_OPEN) {
|
|
3175
3175
|
server.httpServer?.once("listening", () => {
|
|
3176
3176
|
const openPort = listeningPort();
|
|
3177
3177
|
launchRnxDesktop(
|
|
@@ -3427,7 +3427,7 @@ function withRNX(config, options = {}) {
|
|
|
3427
3427
|
return server;
|
|
3428
3428
|
}
|
|
3429
3429
|
};
|
|
3430
|
-
if (appName && !process.env.CI && !process.env.
|
|
3430
|
+
if (appName && !process.env.CI && !process.env.RNX_NO_OPEN) {
|
|
3431
3431
|
void openRnxDesktopWhenMetroIsReady({
|
|
3432
3432
|
port,
|
|
3433
3433
|
bundleUrl: resolveRnxDesktopLaunchTarget(port, bundleUrl),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.378 | (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.378 | (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.378 | (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/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.378 | (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;
|
|
@@ -442,15 +442,15 @@ function isValidRuntimeVersion(value) {
|
|
|
442
442
|
var import_node_fs2 = __toESM(require("node:fs"), 1);
|
|
443
443
|
var import_node_os = require("node:os");
|
|
444
444
|
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
445
|
-
var
|
|
445
|
+
var RNX_HOME_ENV = "RNX_HOME";
|
|
446
446
|
var ACTIVE_RUNTIME_FILE = "active";
|
|
447
|
-
function
|
|
448
|
-
const override = process.env[
|
|
447
|
+
function rnxHomeDir() {
|
|
448
|
+
const override = process.env[RNX_HOME_ENV];
|
|
449
449
|
if (override && override.length > 0) return import_node_path3.default.resolve(override);
|
|
450
|
-
return import_node_path3.default.join((0, import_node_os.homedir)(), ".
|
|
450
|
+
return import_node_path3.default.join((0, import_node_os.homedir)(), ".rnx");
|
|
451
451
|
}
|
|
452
452
|
function runtimesDir() {
|
|
453
|
-
return import_node_path3.default.join(
|
|
453
|
+
return import_node_path3.default.join(rnxHomeDir(), "runtimes");
|
|
454
454
|
}
|
|
455
455
|
function runtimeDir(version) {
|
|
456
456
|
return import_node_path3.default.join(runtimesDir(), version);
|
|
@@ -485,7 +485,7 @@ function findMonorepoRoot() {
|
|
|
485
485
|
return null;
|
|
486
486
|
}
|
|
487
487
|
function resolveDevCheckoutRuntimeRoot() {
|
|
488
|
-
if (process.env.
|
|
488
|
+
if (process.env.RNX_HOME && readActiveRuntime()) return null;
|
|
489
489
|
const root = findMonorepoRoot();
|
|
490
490
|
if (!root) return null;
|
|
491
491
|
const devBuild = import_path.default.join(root, "public/sootsim");
|
|
@@ -832,7 +832,7 @@ function withRNX(config, options = {}) {
|
|
|
832
832
|
return server;
|
|
833
833
|
}
|
|
834
834
|
};
|
|
835
|
-
if (appName && !process.env.CI && !process.env.
|
|
835
|
+
if (appName && !process.env.CI && !process.env.RNX_NO_OPEN) {
|
|
836
836
|
void openRnxDesktopWhenMetroIsReady({
|
|
837
837
|
port,
|
|
838
838
|
bundleUrl: resolveRnxDesktopLaunchTarget(port, bundleUrl),
|