rnxsim 0.0.0 → 0.1.313
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/LICENSE +21 -0
- package/README.md +512 -0
- package/detox/colors.ts +54 -0
- package/detox/config-loader.ts +135 -0
- package/detox/element-types.ts +39 -0
- package/detox/expectations.ts +537 -0
- package/detox/gestures.ts +480 -0
- package/detox/index.ts +2118 -0
- package/detox/jest-preset.cjs +51 -0
- package/detox/jest-setup-after-env.cjs +18 -0
- package/detox/matchers.ts +30 -0
- package/detox/motion-change.cjs +109 -0
- package/detox/motion-change.d.cts +35 -0
- package/detox/navigation.ts +43 -0
- package/detox/screenshots/animated-color-test-rest-norngh.png +0 -0
- package/detox/screenshots/color-test-after-drag-norngh.png +0 -0
- package/detox/screenshots/color-test-rest-norngh.png +0 -0
- package/detox/screenshots/theme-blue-toggle.png +0 -0
- package/detox/screenshots/theme-blue.png +0 -0
- package/detox/screenshots/theme-red-toggle.png +0 -0
- package/detox/screenshots/theme-red.png +0 -0
- package/dist-cli/bin.js +15 -0
- package/dist-cli/chunks/agent-XZ2KTPCU.js +48 -0
- package/dist-cli/chunks/agent-wrapper-JJYYW2WH.js +17 -0
- package/dist-cli/chunks/app-fonts-IXRNQG6B.js +4 -0
- package/dist-cli/chunks/assert-54T5SK5F.js +49 -0
- package/dist-cli/chunks/auth-FI5UDI45.js +12 -0
- package/dist-cli/chunks/beta-JV6UKADW.js +4 -0
- package/dist-cli/chunks/camera-VL73YIKP.js +22 -0
- package/dist-cli/chunks/chunk-2D2UPBBR.js +4 -0
- package/dist-cli/chunks/chunk-2YR5BGA5.js +5 -0
- package/dist-cli/chunks/chunk-3NV2NCNX.js +4 -0
- package/dist-cli/chunks/chunk-46EUUFJ5.js +4 -0
- package/dist-cli/chunks/chunk-4NPPOV2N.js +5 -0
- package/dist-cli/chunks/chunk-5DHC6KHQ.js +7 -0
- package/dist-cli/chunks/chunk-5TEF3ET3.js +74 -0
- package/dist-cli/chunks/chunk-5TPRP5QT.js +4 -0
- package/dist-cli/chunks/chunk-5YJCOWCH.js +4 -0
- package/dist-cli/chunks/chunk-7GN3LVWB.js +4 -0
- package/dist-cli/chunks/chunk-BBULZ7CG.js +568 -0
- package/dist-cli/chunks/chunk-BTWORNNG.js +71 -0
- package/dist-cli/chunks/chunk-D4FFVGI5.js +5 -0
- package/dist-cli/chunks/chunk-DCEMHR2Y.js +4 -0
- package/dist-cli/chunks/chunk-DZS6WPUI.js +4 -0
- package/dist-cli/chunks/chunk-F5ZRSS3C.js +3 -0
- package/dist-cli/chunks/chunk-FSUYIVJ6.js +9 -0
- package/dist-cli/chunks/chunk-G2WW6L2C.js +23 -0
- package/dist-cli/chunks/chunk-GASE6UBA.js +4 -0
- package/dist-cli/chunks/chunk-GGRX24GF.js +142 -0
- package/dist-cli/chunks/chunk-HI5TFJWN.js +5 -0
- package/dist-cli/chunks/chunk-IJ5CAZZC.js +5 -0
- package/dist-cli/chunks/chunk-IJO63TDP.js +4 -0
- package/dist-cli/chunks/chunk-KTHV3RUS.js +26 -0
- package/dist-cli/chunks/chunk-LF2ZVT7O.js +6 -0
- package/dist-cli/chunks/chunk-MJRLLB4R.js +38 -0
- package/dist-cli/chunks/chunk-NFK7T35W.js +4 -0
- package/dist-cli/chunks/chunk-NMF2ZMZQ.js +15 -0
- package/dist-cli/chunks/chunk-OHAZNXLK.js +4 -0
- package/dist-cli/chunks/chunk-OVFJFXUD.js +101 -0
- package/dist-cli/chunks/chunk-OZSSI4WN.js +28 -0
- package/dist-cli/chunks/chunk-QKDWYITG.js +25 -0
- package/dist-cli/chunks/chunk-RSZWCKNT.js +30 -0
- package/dist-cli/chunks/chunk-RTN5C5RL.js +4 -0
- package/dist-cli/chunks/chunk-TIVZIMMW.js +4 -0
- package/dist-cli/chunks/chunk-TZFFR3SD.js +7 -0
- package/dist-cli/chunks/chunk-UC6U3MML.js +5 -0
- package/dist-cli/chunks/chunk-VFCMSYZK.js +6 -0
- package/dist-cli/chunks/chunk-VNQEB4L7.js +5 -0
- package/dist-cli/chunks/chunk-VZXWHRUZ.js +983 -0
- package/dist-cli/chunks/chunk-W6K4EFPH.js +107 -0
- package/dist-cli/chunks/chunk-WEXDAC74.js +4 -0
- package/dist-cli/chunks/chunk-WF3T4SVI.js +14 -0
- package/dist-cli/chunks/chunk-WINYQ44O.js +4 -0
- package/dist-cli/chunks/chunk-WMIIKMGK.js +10 -0
- package/dist-cli/chunks/chunk-WUSWBCWA.js +507 -0
- package/dist-cli/chunks/chunk-WWZIXIRD.js +4 -0
- package/dist-cli/chunks/chunk-XEVZYVIW.js +766 -0
- package/dist-cli/chunks/chunk-YDGQTMQL.js +4 -0
- package/dist-cli/chunks/chunk-YIFT42WN.js +4 -0
- package/dist-cli/chunks/chunk-ZMJD5GEC.js +125 -0
- package/dist-cli/chunks/cleanup-P27PA6JI.js +25 -0
- package/dist-cli/chunks/cli-version-WWLPBDQ7.js +4 -0
- package/dist-cli/chunks/compat-ZD65FED3.js +20 -0
- package/dist-cli/chunks/config-XMJRNM2A.js +13 -0
- package/dist-cli/chunks/control-KMIQT3QP.js +4 -0
- package/dist-cli/chunks/daemon-G2ME7NLB.js +4 -0
- package/dist-cli/chunks/debug-PT4HOP7N.js +200 -0
- package/dist-cli/chunks/desktop-S3FG72AK.js +31 -0
- package/dist-cli/chunks/detox-B3D4IFCN.js +52 -0
- package/dist-cli/chunks/device-XBNDSB2R.js +18 -0
- package/dist-cli/chunks/diagnose-HMQXJE5N.js +43 -0
- package/dist-cli/chunks/disk-cleanup-BLCZ5BSZ.js +4 -0
- package/dist-cli/chunks/drivers-LDECZGP2.js +4 -0
- package/dist-cli/chunks/film-BJGTBYZB.js +74 -0
- package/dist-cli/chunks/flow-UEQNVTU7.js +4 -0
- package/dist-cli/chunks/help-T5FYSVGB.js +4 -0
- package/dist-cli/chunks/hidden-runtime-alias-ANOYADHM.js +4 -0
- package/dist-cli/chunks/home-paths-GT3LFNOR.js +4 -0
- package/dist-cli/chunks/inspect-ZA6XF5LD.js +4 -0
- package/dist-cli/chunks/install-desktop-TIMUDHPL.js +4 -0
- package/dist-cli/chunks/login-FJ737MWG.js +28 -0
- package/dist-cli/chunks/logout-ZCNMMHMY.js +4 -0
- package/dist-cli/chunks/maestro-SZTNKLDF.js +104 -0
- package/dist-cli/chunks/maestro-generate-DCFAIZ4H.js +36 -0
- package/dist-cli/chunks/mode-GRMQCRXR.js +26 -0
- package/dist-cli/chunks/optional-demo-registry-W36EWFFB.js +4 -0
- package/dist-cli/chunks/perf-QYBAAUZG.js +48 -0
- package/dist-cli/chunks/permissions-3QCQ6VF4.js +13 -0
- package/dist-cli/chunks/record-QPPC2S4E.js +72 -0
- package/dist-cli/chunks/report-issue-7NMFP4HK.js +29 -0
- package/dist-cli/chunks/runtime-XOAXMSTU.js +4 -0
- package/dist-cli/chunks/screenshot-command-67AECJFB.js +159 -0
- package/dist-cli/chunks/screenshot-layers-ASWBYPJL.js +20 -0
- package/dist-cli/chunks/screenshots-capture-PXA3HFQK.js +42 -0
- package/dist-cli/chunks/serve-BI2NBAXG.js +44 -0
- package/dist-cli/chunks/setup-7DWPMRSB.js +32 -0
- package/dist-cli/chunks/skills-S3Y22TUA.js +50 -0
- package/dist-cli/chunks/storage-XUIMJWAJ.js +37 -0
- package/dist-cli/chunks/store-JTHEJLAZ.js +4 -0
- package/dist-cli/chunks/telemetry-ZYJGD2DB.js +4 -0
- package/dist-cli/chunks/timeline-TMPLQPSP.js +24 -0
- package/dist-cli/chunks/upgrade-7HDSIM7K.js +7 -0
- package/dist-cli/chunks/upload-GMSZPWM6.js +4 -0
- package/dist-cli/chunks/version-HOCHZ37L.js +6 -0
- package/dist-cli/chunks/web-DG3WBYD3.js +4 -0
- package/dist-cli/chunks/what-happened-XFVUTZR7.js +25 -0
- package/dist-lib/agent-daemon-client.cjs +468 -0
- package/dist-lib/agent-events.cjs +48 -0
- package/dist-lib/agent-identity.cjs +53 -0
- package/dist-lib/agent-sessions.cjs +725 -0
- package/dist-lib/attached-projects.cjs +526 -0
- package/dist-lib/auth/shared-session.cjs +195 -0
- package/dist-lib/backend-origin.cjs +70 -0
- package/dist-lib/beta.cjs +41 -0
- package/dist-lib/beta.mjs +13 -0
- package/dist-lib/bridge-constants.cjs +161 -0
- package/dist-lib/cli-constants.cjs +32 -0
- package/dist-lib/config.cjs +96 -0
- package/dist-lib/detox/index.cjs +2863 -0
- package/dist-lib/detox/jest-preset.cjs +51 -0
- package/dist-lib/dev-bundle-resolution.cjs +223 -0
- package/dist-lib/home-paths.cjs +421 -0
- package/dist-lib/host/bridge-host.cjs +5600 -0
- package/dist-lib/host/fetch-proxy-handler.cjs +373 -0
- package/dist-lib/host/fetch-proxy-overrides.cjs +63 -0
- package/dist-lib/host/fetch-proxy-overrides.mjs +37 -0
- package/dist-lib/host/websocket-proxy.cjs +214 -0
- package/dist-lib/index.cjs +513 -0
- package/dist-lib/jump-to-source-babel.cjs +93 -0
- package/dist-lib/menu.cjs +620 -0
- package/dist-lib/menu.mjs +581 -0
- package/dist-lib/metro.cjs +297 -0
- package/dist-lib/profiles.cjs +246 -0
- package/dist-lib/public-brand.cjs +39 -0
- package/dist-lib/render-mode.cjs +54 -0
- package/dist-lib/scripts/dev-server-scanner.cjs +1034 -0
- package/dist-lib/sdk.cjs +2333 -0
- package/dist-lib/sdk.mjs +2240 -0
- package/dist-lib/skills.cjs +23922 -0
- package/dist-lib/vite.cjs +358 -0
- package/package.json +189 -18
- package/scripts/dev-server-scanner.ts +941 -0
- package/scripts/optional-demo-registry.ts +113 -0
- package/scripts/postinstall.cjs +3 -0
- package/scripts/preuninstall.cjs +118 -0
- package/skills/contrast/SKILL.md +171 -0
- package/skills/rnx-debug/SKILL.md +425 -0
- package/skills/rnx-perf/SKILL.md +295 -0
- package/skills/rnx-setup/SKILL.md +160 -0
- package/skills/rnx-test/SKILL.md +292 -0
- package/skills/rnx-visual/SKILL.md +122 -0
- package/src/agent-daemon-client.ts +410 -0
- package/src/agent-events.ts +71 -0
- package/src/agent-identity.ts +23 -0
- package/src/agent-prompt.ts +71 -0
- package/src/agent-sessions.ts +573 -0
- package/src/attached-projects.ts +539 -0
- package/src/auth/shared-session.ts +204 -0
- package/src/backend-origin.ts +49 -0
- package/src/beta.ts +19 -0
- package/src/bridge-constants.ts +171 -0
- package/src/browser-cache.ts +16 -0
- package/src/cli-constants.ts +1 -0
- package/src/cli-version.ts +32 -0
- package/src/codex-client.ts +215 -0
- package/src/config.ts +134 -0
- package/src/dev-bundle-resolution.ts +236 -0
- package/src/disk-cleanup.ts +466 -0
- package/src/home-paths.ts +552 -0
- package/src/host/agent-host.ts +666 -0
- package/src/host/bridge-host.ts +2626 -0
- package/src/host/fetch-proxy-handler.ts +397 -0
- package/src/host/fetch-proxy-overrides.ts +51 -0
- package/src/host/open-url.ts +89 -0
- package/src/host/websocket-proxy.ts +210 -0
- package/src/index.ts +12 -705
- package/src/jump-to-source-babel.ts +135 -0
- package/src/menu.ts +734 -0
- package/src/metro-plugin.ts +139 -0
- package/src/native-dev-bundle-url.ts +96 -0
- package/src/native-seam-manifest.ts +341 -0
- package/src/plist.ts +27 -0
- package/src/poll-until.ts +92 -0
- package/src/profiles.ts +179 -0
- package/src/public-brand.ts +9 -0
- package/src/render-mode.ts +27 -0
- package/src/runtime-assets.ts +228 -0
- package/src/runtime-delivery.ts +54 -0
- package/src/screenshots/compose.ts +422 -0
- package/src/screenshots/frame-compose.ts +454 -0
- package/src/screenshots/orchestrate.ts +256 -0
- package/src/screenshots/org-deck.ts +91 -0
- package/src/screenshots/registry.ts +58 -0
- package/src/screenshots/schema.ts +364 -0
- package/src/sdk.ts +7 -0
- package/src/settings-bundle.ts +418 -0
- package/src/skills/builtin/a11y-review.ts +132 -0
- package/src/skills/builtin/compat-check.ts +71 -0
- package/src/skills/builtin/maestro-test.ts +121 -0
- package/src/skills/builtin/perf-profile.ts +90 -0
- package/src/skills/builtin/screenshot-all.ts +52 -0
- package/src/skills/builtin/visual-diff.ts +100 -0
- package/src/skills/registry.ts +107 -0
- package/src/skills/types.ts +41 -0
- package/src/team-machine-prompt.ts +73 -0
- package/src/vite-plugin-one.ts +190 -0
- package/src/vite-plugin.ts +1750 -0
- package/src/worklets-babel.ts +134 -0
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
/*! rnx v0.1.313 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
|
+
"use strict";
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
|
+
|
|
32
|
+
// src/metro-plugin.ts
|
|
33
|
+
var metro_plugin_exports = {};
|
|
34
|
+
__export(metro_plugin_exports, {
|
|
35
|
+
default: () => metro_plugin_default,
|
|
36
|
+
withSootsim: () => withSootsim
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(metro_plugin_exports);
|
|
39
|
+
var import_fs2 = __toESM(require("fs"), 1);
|
|
40
|
+
var import_path2 = __toESM(require("path"), 1);
|
|
41
|
+
|
|
42
|
+
// src/runtime-assets.ts
|
|
43
|
+
var import_fs = __toESM(require("fs"), 1);
|
|
44
|
+
var import_path = __toESM(require("path"), 1);
|
|
45
|
+
var import_url = require("url");
|
|
46
|
+
|
|
47
|
+
// ../contrast-runtime-delivery/src/product.ts
|
|
48
|
+
function isValidRuntimeVersion(value) {
|
|
49
|
+
return value.length <= 100 && /^[0-9A-Za-z][0-9A-Za-z._+-]*$/.test(value);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// src/home-paths.ts
|
|
53
|
+
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
54
|
+
var import_node_os = require("node:os");
|
|
55
|
+
var import_node_path = __toESM(require("node:path"), 1);
|
|
56
|
+
var SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
|
|
57
|
+
var ACTIVE_RUNTIME_FILE = "active";
|
|
58
|
+
function sootsimHomeDir() {
|
|
59
|
+
const override = process.env[SOOTSIM_HOME_ENV];
|
|
60
|
+
if (override && override.length > 0) return import_node_path.default.resolve(override);
|
|
61
|
+
return import_node_path.default.join((0, import_node_os.homedir)(), ".sootsim");
|
|
62
|
+
}
|
|
63
|
+
function runtimesDir() {
|
|
64
|
+
return import_node_path.default.join(sootsimHomeDir(), "runtimes");
|
|
65
|
+
}
|
|
66
|
+
function runtimeDir(version) {
|
|
67
|
+
return import_node_path.default.join(runtimesDir(), version);
|
|
68
|
+
}
|
|
69
|
+
function activeRuntimeFile() {
|
|
70
|
+
return import_node_path.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
|
|
71
|
+
}
|
|
72
|
+
function readActiveRuntime() {
|
|
73
|
+
try {
|
|
74
|
+
const value = import_node_fs.default.readFileSync(activeRuntimeFile(), "utf8").trim();
|
|
75
|
+
return value.length > 0 ? value : null;
|
|
76
|
+
} catch {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
|
|
81
|
+
|
|
82
|
+
// src/runtime-assets.ts
|
|
83
|
+
var SOOTSIM_RUNTIME_MISSING_MESSAGE = "[rnx] no engine runtime installed \u2014 run `rnxsim setup`, or `rnxsim runtime install`";
|
|
84
|
+
var _monorepoRootCache;
|
|
85
|
+
function findMonorepoRoot() {
|
|
86
|
+
if (_monorepoRootCache !== void 0) return _monorepoRootCache;
|
|
87
|
+
let dir = import_path.default.dirname((0, import_url.fileURLToPath)(__sootsim_import_meta_url));
|
|
88
|
+
for (let i = 0; i < 12 && dir !== import_path.default.dirname(dir); i++) {
|
|
89
|
+
if (import_fs.default.existsSync(import_path.default.join(dir, "packages/sootsim-engine/package.json")) && import_fs.default.existsSync(import_path.default.join(dir, "public/sootsim"))) {
|
|
90
|
+
_monorepoRootCache = dir;
|
|
91
|
+
return dir;
|
|
92
|
+
}
|
|
93
|
+
dir = import_path.default.dirname(dir);
|
|
94
|
+
}
|
|
95
|
+
_monorepoRootCache = null;
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
function resolveDevCheckoutRuntimeRoot() {
|
|
99
|
+
if (process.env.SOOTSIM_HOME && readActiveRuntime()) return null;
|
|
100
|
+
const root = findMonorepoRoot();
|
|
101
|
+
if (!root) return null;
|
|
102
|
+
const devBuild = import_path.default.join(root, "public/sootsim");
|
|
103
|
+
if (import_fs.default.existsSync(import_path.default.join(devBuild, "index.html")) && import_fs.default.existsSync(import_path.default.join(devBuild, "engine/index.html")) && import_fs.default.existsSync(import_path.default.join(devBuild, "engine-tenant/worker.js"))) {
|
|
104
|
+
return devBuild;
|
|
105
|
+
}
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
var MIME_TYPES = {
|
|
109
|
+
".js": "application/javascript",
|
|
110
|
+
".mjs": "application/javascript",
|
|
111
|
+
".css": "text/css",
|
|
112
|
+
".html": "text/html",
|
|
113
|
+
".wasm": "application/wasm",
|
|
114
|
+
".json": "application/json",
|
|
115
|
+
".jpg": "image/jpeg",
|
|
116
|
+
".jpeg": "image/jpeg",
|
|
117
|
+
".png": "image/png",
|
|
118
|
+
".svg": "image/svg+xml",
|
|
119
|
+
".webp": "image/webp",
|
|
120
|
+
".glb": "model/gltf-binary",
|
|
121
|
+
".ttf": "font/ttf",
|
|
122
|
+
".otf": "font/otf",
|
|
123
|
+
".woff": "font/woff",
|
|
124
|
+
".woff2": "font/woff2",
|
|
125
|
+
".mp3": "audio/mpeg",
|
|
126
|
+
".wav": "audio/wav"
|
|
127
|
+
};
|
|
128
|
+
var ROOT_RUNTIME_PATHS = [
|
|
129
|
+
"/assets/",
|
|
130
|
+
"/engine/",
|
|
131
|
+
"/engine-tenant/",
|
|
132
|
+
"/photos/",
|
|
133
|
+
"/three-mode/",
|
|
134
|
+
"/fonts/",
|
|
135
|
+
"/icons/",
|
|
136
|
+
"/sounds/",
|
|
137
|
+
"/spike/",
|
|
138
|
+
"/test-wallpaper.jpg",
|
|
139
|
+
"/preview-sw.js",
|
|
140
|
+
"/sootsim.svg"
|
|
141
|
+
];
|
|
142
|
+
function resolveActiveRuntimeRoot() {
|
|
143
|
+
const devRoot = resolveDevCheckoutRuntimeRoot();
|
|
144
|
+
if (devRoot) return devRoot;
|
|
145
|
+
const active = readActiveRuntime();
|
|
146
|
+
if (!active) return null;
|
|
147
|
+
const dir = runtimeDir(active);
|
|
148
|
+
if (!import_fs.default.existsSync(import_path.default.join(dir, "index.html"))) return null;
|
|
149
|
+
return dir;
|
|
150
|
+
}
|
|
151
|
+
var RUNTIME_VERSION_HOSTNAME_SUFFIX = ".runtime.localhost";
|
|
152
|
+
function isRuntimeVersionHostname(hostname) {
|
|
153
|
+
return hostname.toLowerCase().endsWith(RUNTIME_VERSION_HOSTNAME_SUFFIX);
|
|
154
|
+
}
|
|
155
|
+
function runtimeVersionFromHostname(hostname) {
|
|
156
|
+
if (!isRuntimeVersionHostname(hostname)) return null;
|
|
157
|
+
const labels = hostname.slice(0, -RUNTIME_VERSION_HOSTNAME_SUFFIX.length).split(".");
|
|
158
|
+
if (labels.length === 0 || labels.some((label) => !/^[0-9a-f]{1,60}$/i.test(label))) {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
const encoded = labels.join("");
|
|
162
|
+
if (encoded.length % 2 !== 0) return null;
|
|
163
|
+
try {
|
|
164
|
+
const version = Buffer.from(encoded, "hex").toString("utf8");
|
|
165
|
+
return isValidRuntimeVersion(version) ? version : null;
|
|
166
|
+
} catch {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
function resolveInstalledRuntimeRoot(version) {
|
|
171
|
+
const dir = runtimeDir(version);
|
|
172
|
+
if (!import_fs.default.existsSync(import_path.default.join(dir, "index.html"))) return null;
|
|
173
|
+
return dir;
|
|
174
|
+
}
|
|
175
|
+
function resolveRuntimeRootForHostname(hostname) {
|
|
176
|
+
if (!isRuntimeVersionHostname(hostname)) return resolveActiveRuntimeRoot();
|
|
177
|
+
const version = runtimeVersionFromHostname(hostname);
|
|
178
|
+
return version ? resolveInstalledRuntimeRoot(version) : null;
|
|
179
|
+
}
|
|
180
|
+
function resolveRuntimeRootForRequestHost(host) {
|
|
181
|
+
if (!host) return resolveActiveRuntimeRoot();
|
|
182
|
+
try {
|
|
183
|
+
return resolveRuntimeRootForHostname(new URL(`http://${host}`).hostname);
|
|
184
|
+
} catch {
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function isRootRuntimeAssetPath(pathname) {
|
|
189
|
+
return ROOT_RUNTIME_PATHS.some((p) => pathname === p || pathname.startsWith(p));
|
|
190
|
+
}
|
|
191
|
+
function resolveRuntimeFilePath(runtimeRoot, pathname) {
|
|
192
|
+
if (!pathname.startsWith("/")) return null;
|
|
193
|
+
if (pathname.includes("\0") || pathname.includes("\\")) return null;
|
|
194
|
+
for (const segment of pathname.split("/")) {
|
|
195
|
+
if (segment === "..") return null;
|
|
196
|
+
}
|
|
197
|
+
const fullPath = import_path.default.resolve(runtimeRoot, pathname.replace(/^\/+/, ""));
|
|
198
|
+
const rootWithSep = runtimeRoot.endsWith(import_path.default.sep) ? runtimeRoot : runtimeRoot + import_path.default.sep;
|
|
199
|
+
if (!fullPath.startsWith(rootWithSep) && fullPath !== runtimeRoot) return null;
|
|
200
|
+
if (!import_fs.default.existsSync(fullPath) || !import_fs.default.statSync(fullPath).isFile()) return null;
|
|
201
|
+
return fullPath;
|
|
202
|
+
}
|
|
203
|
+
function serveRuntimeFile(req, res, fullPath) {
|
|
204
|
+
const ext = import_path.default.extname(fullPath);
|
|
205
|
+
const stat = import_fs.default.statSync(fullPath);
|
|
206
|
+
const lastModified = stat.mtime.toUTCString();
|
|
207
|
+
res.setHeader("content-type", MIME_TYPES[ext] || "application/octet-stream");
|
|
208
|
+
res.setHeader("cache-control", "no-cache");
|
|
209
|
+
res.setHeader("last-modified", lastModified);
|
|
210
|
+
if (req?.headers?.["if-modified-since"] === lastModified) {
|
|
211
|
+
res.statusCode = 304;
|
|
212
|
+
res.end();
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
import_fs.default.createReadStream(fullPath).pipe(res);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// src/metro-plugin.ts
|
|
219
|
+
var prefix = "/__soot";
|
|
220
|
+
function withSootsim(config, options = {}) {
|
|
221
|
+
if (options.enabled === false) return config;
|
|
222
|
+
const bundleUrl = options.bundleUrl || "/index.bundle?platform=ios&dev=true&hot=true&minify=false";
|
|
223
|
+
const cfgServer = config.server;
|
|
224
|
+
const existingEnhance = cfgServer?.enhanceMiddleware;
|
|
225
|
+
const serverConfig = {
|
|
226
|
+
...cfgServer,
|
|
227
|
+
enhanceMiddleware: (metroMiddleware, metroServer) => {
|
|
228
|
+
let middleware = metroMiddleware;
|
|
229
|
+
if (existingEnhance) {
|
|
230
|
+
middleware = existingEnhance(metroMiddleware, metroServer);
|
|
231
|
+
}
|
|
232
|
+
let connect;
|
|
233
|
+
try {
|
|
234
|
+
connect = require("connect");
|
|
235
|
+
} catch {
|
|
236
|
+
console.warn("[rnx] connect not available");
|
|
237
|
+
return middleware;
|
|
238
|
+
}
|
|
239
|
+
const server = connect();
|
|
240
|
+
server.use((req, res, next) => {
|
|
241
|
+
const url = req.url || "";
|
|
242
|
+
const pathname = url.split("?")[0];
|
|
243
|
+
const runtimeRoot = resolveRuntimeRootForRequestHost(req.headers?.host);
|
|
244
|
+
if (!runtimeRoot) {
|
|
245
|
+
if (pathname === prefix || pathname === prefix + "/") {
|
|
246
|
+
res.statusCode = 500;
|
|
247
|
+
res.end(SOOTSIM_RUNTIME_MISSING_MESSAGE);
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
next();
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
if (isRootRuntimeAssetPath(pathname)) {
|
|
254
|
+
const fullPath = resolveRuntimeFilePath(runtimeRoot, pathname);
|
|
255
|
+
if (fullPath) {
|
|
256
|
+
serveRuntimeFile(req, res, fullPath);
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
if (pathname.startsWith(prefix + "/")) {
|
|
261
|
+
const fullPath = resolveRuntimeFilePath(
|
|
262
|
+
runtimeRoot,
|
|
263
|
+
pathname.slice(prefix.length)
|
|
264
|
+
);
|
|
265
|
+
if (fullPath) {
|
|
266
|
+
serveRuntimeFile(req, res, fullPath);
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
if (pathname === prefix || pathname === prefix + "/" || pathname.startsWith(prefix + "/")) {
|
|
271
|
+
const ext = import_path2.default.extname(pathname);
|
|
272
|
+
if (!ext) {
|
|
273
|
+
const htmlPath = import_path2.default.join(runtimeRoot, "index.html");
|
|
274
|
+
let html = import_fs2.default.readFileSync(htmlPath, "utf8");
|
|
275
|
+
html = html.replace(
|
|
276
|
+
"</head>",
|
|
277
|
+
`<script>history.replaceState(null,'','${prefix}/?bundle=${encodeURIComponent(bundleUrl)}')</script></head>`
|
|
278
|
+
);
|
|
279
|
+
res.setHeader("content-type", "text/html");
|
|
280
|
+
res.end(html);
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
next();
|
|
285
|
+
});
|
|
286
|
+
server.use(middleware);
|
|
287
|
+
console.log(`[rnx] serving at ${prefix}/`);
|
|
288
|
+
return server;
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
return { ...config, server: serverConfig };
|
|
292
|
+
}
|
|
293
|
+
var metro_plugin_default = withSootsim;
|
|
294
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
295
|
+
0 && (module.exports = {
|
|
296
|
+
withSootsim
|
|
297
|
+
});
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/*! rnx v0.1.313 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
|
+
"use strict";
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
|
+
|
|
32
|
+
// src/profiles.ts
|
|
33
|
+
var profiles_exports = {};
|
|
34
|
+
__export(profiles_exports, {
|
|
35
|
+
DEFAULT_PROFILE_ID: () => DEFAULT_PROFILE_ID,
|
|
36
|
+
clearProfileStorage: () => clearProfileStorage,
|
|
37
|
+
createProfile: () => createProfile,
|
|
38
|
+
deleteProfile: () => deleteProfile,
|
|
39
|
+
electronProfilePartition: () => electronProfilePartition,
|
|
40
|
+
electronProfilePartitionDir: () => electronProfilePartitionDir,
|
|
41
|
+
electronProfilePartitionName: () => electronProfilePartitionName,
|
|
42
|
+
ensureProfile: () => ensureProfile,
|
|
43
|
+
getProfile: () => getProfile,
|
|
44
|
+
listProfiles: () => listProfiles,
|
|
45
|
+
nextGeneratedProfileId: () => nextGeneratedProfileId,
|
|
46
|
+
normalizeProfileId: () => normalizeProfileId,
|
|
47
|
+
playwrightProfileUserDataDir: () => playwrightProfileUserDataDir,
|
|
48
|
+
profileIndexPath: () => profileIndexPath
|
|
49
|
+
});
|
|
50
|
+
module.exports = __toCommonJS(profiles_exports);
|
|
51
|
+
var import_fs = __toESM(require("fs"), 1);
|
|
52
|
+
var import_path = __toESM(require("path"), 1);
|
|
53
|
+
|
|
54
|
+
// src/home-paths.ts
|
|
55
|
+
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
56
|
+
var import_node_os = require("node:os");
|
|
57
|
+
var import_node_path = __toESM(require("node:path"), 1);
|
|
58
|
+
var SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
|
|
59
|
+
function sootsimHomeDir() {
|
|
60
|
+
const override = process.env[SOOTSIM_HOME_ENV];
|
|
61
|
+
if (override && override.length > 0) return import_node_path.default.resolve(override);
|
|
62
|
+
return import_node_path.default.join((0, import_node_os.homedir)(), ".sootsim");
|
|
63
|
+
}
|
|
64
|
+
function runtimesDir() {
|
|
65
|
+
return import_node_path.default.join(sootsimHomeDir(), "runtimes");
|
|
66
|
+
}
|
|
67
|
+
function electronDir() {
|
|
68
|
+
return import_node_path.default.join(sootsimHomeDir(), "electron");
|
|
69
|
+
}
|
|
70
|
+
function electronUserDataDir() {
|
|
71
|
+
return import_node_path.default.join(electronDir(), "userData");
|
|
72
|
+
}
|
|
73
|
+
function profilesDir() {
|
|
74
|
+
return import_node_path.default.join(sootsimHomeDir(), "profiles");
|
|
75
|
+
}
|
|
76
|
+
function cacheDir() {
|
|
77
|
+
return import_node_path.default.join(sootsimHomeDir(), "cache");
|
|
78
|
+
}
|
|
79
|
+
function ensureSootsimHome() {
|
|
80
|
+
import_node_fs.default.mkdirSync(sootsimHomeDir(), { recursive: true });
|
|
81
|
+
import_node_fs.default.mkdirSync(runtimesDir(), { recursive: true });
|
|
82
|
+
import_node_fs.default.mkdirSync(electronDir(), { recursive: true });
|
|
83
|
+
import_node_fs.default.mkdirSync(profilesDir(), { recursive: true });
|
|
84
|
+
import_node_fs.default.mkdirSync(cacheDir(), { recursive: true });
|
|
85
|
+
}
|
|
86
|
+
var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
|
|
87
|
+
|
|
88
|
+
// src/profiles.ts
|
|
89
|
+
var DEFAULT_PROFILE_ID = "default";
|
|
90
|
+
var PROFILE_INDEX_FILE = "profiles.json";
|
|
91
|
+
var PROFILE_INDEX_VERSION = 1;
|
|
92
|
+
function normalizeProfileId(input) {
|
|
93
|
+
const id = input.trim();
|
|
94
|
+
if (!id) throw new Error("profile id is required");
|
|
95
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(id)) {
|
|
96
|
+
throw new Error(
|
|
97
|
+
"profile ids must start with a letter or number and contain only letters, numbers, dot, dash, or underscore"
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
if (id === "." || id === "..") throw new Error(`invalid profile id: ${id}`);
|
|
101
|
+
return id;
|
|
102
|
+
}
|
|
103
|
+
function profileIndexPath() {
|
|
104
|
+
return import_path.default.join(profilesDir(), PROFILE_INDEX_FILE);
|
|
105
|
+
}
|
|
106
|
+
function electronProfilePartitionName(profileId) {
|
|
107
|
+
return `sootsim-profile-${normalizeProfileId(profileId)}`;
|
|
108
|
+
}
|
|
109
|
+
function electronProfilePartition(profileId) {
|
|
110
|
+
return `persist:${electronProfilePartitionName(profileId)}`;
|
|
111
|
+
}
|
|
112
|
+
function electronProfilePartitionDir(profileId) {
|
|
113
|
+
return import_path.default.join(
|
|
114
|
+
electronUserDataDir(),
|
|
115
|
+
"Partitions",
|
|
116
|
+
electronProfilePartitionName(profileId)
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
function playwrightProfileUserDataDir(profileId) {
|
|
120
|
+
return import_path.default.join(profilesDir(), "playwright", normalizeProfileId(profileId));
|
|
121
|
+
}
|
|
122
|
+
function readIndexRaw() {
|
|
123
|
+
try {
|
|
124
|
+
const parsed = JSON.parse(
|
|
125
|
+
import_fs.default.readFileSync(profileIndexPath(), "utf8")
|
|
126
|
+
);
|
|
127
|
+
if (!parsed || parsed.version !== PROFILE_INDEX_VERSION) {
|
|
128
|
+
return { version: PROFILE_INDEX_VERSION, profiles: [] };
|
|
129
|
+
}
|
|
130
|
+
const profiles = Array.isArray(parsed.profiles) ? parsed.profiles.filter(
|
|
131
|
+
(profile) => !!profile && typeof profile.id === "string" && typeof profile.createdAt === "string" && typeof profile.updatedAt === "string"
|
|
132
|
+
).map((profile) => ({
|
|
133
|
+
id: normalizeProfileId(profile.id),
|
|
134
|
+
createdAt: profile.createdAt,
|
|
135
|
+
updatedAt: profile.updatedAt
|
|
136
|
+
})) : [];
|
|
137
|
+
return { version: PROFILE_INDEX_VERSION, profiles };
|
|
138
|
+
} catch {
|
|
139
|
+
return { version: PROFILE_INDEX_VERSION, profiles: [] };
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function sortProfiles(profiles) {
|
|
143
|
+
return [...profiles].sort((a, b) => {
|
|
144
|
+
if (a.id === DEFAULT_PROFILE_ID) return -1;
|
|
145
|
+
if (b.id === DEFAULT_PROFILE_ID) return 1;
|
|
146
|
+
return a.id.localeCompare(b.id);
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function withDefault(index) {
|
|
150
|
+
if (index.profiles.some((profile) => profile.id === DEFAULT_PROFILE_ID)) {
|
|
151
|
+
return { ...index, profiles: sortProfiles(index.profiles) };
|
|
152
|
+
}
|
|
153
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
154
|
+
return {
|
|
155
|
+
version: PROFILE_INDEX_VERSION,
|
|
156
|
+
profiles: sortProfiles([
|
|
157
|
+
{ id: DEFAULT_PROFILE_ID, createdAt: now, updatedAt: now },
|
|
158
|
+
...index.profiles
|
|
159
|
+
])
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function writeIndex(index) {
|
|
163
|
+
ensureSootsimHome();
|
|
164
|
+
const next = withDefault(index);
|
|
165
|
+
const tmp = `${profileIndexPath()}.tmp`;
|
|
166
|
+
import_fs.default.writeFileSync(tmp, `${JSON.stringify(next, null, 2)}
|
|
167
|
+
`, "utf8");
|
|
168
|
+
import_fs.default.renameSync(tmp, profileIndexPath());
|
|
169
|
+
return next;
|
|
170
|
+
}
|
|
171
|
+
function listProfiles() {
|
|
172
|
+
return writeIndex(readIndexRaw()).profiles;
|
|
173
|
+
}
|
|
174
|
+
function getProfile(id) {
|
|
175
|
+
const normalized = normalizeProfileId(id);
|
|
176
|
+
return listProfiles().find((profile) => profile.id === normalized) ?? null;
|
|
177
|
+
}
|
|
178
|
+
function ensureProfile(id = DEFAULT_PROFILE_ID) {
|
|
179
|
+
const normalized = normalizeProfileId(id);
|
|
180
|
+
const existing = getProfile(normalized);
|
|
181
|
+
if (existing) return existing;
|
|
182
|
+
return createProfile(normalized);
|
|
183
|
+
}
|
|
184
|
+
function createProfile(id) {
|
|
185
|
+
const normalized = normalizeProfileId(id);
|
|
186
|
+
const index = withDefault(readIndexRaw());
|
|
187
|
+
if (index.profiles.some((profile2) => profile2.id === normalized)) {
|
|
188
|
+
throw new Error(`profile already exists: ${normalized}`);
|
|
189
|
+
}
|
|
190
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
191
|
+
const profile = { id: normalized, createdAt: now, updatedAt: now };
|
|
192
|
+
writeIndex({ version: PROFILE_INDEX_VERSION, profiles: [...index.profiles, profile] });
|
|
193
|
+
return profile;
|
|
194
|
+
}
|
|
195
|
+
function nextGeneratedProfileId() {
|
|
196
|
+
const existing = new Set(listProfiles().map((profile) => profile.id));
|
|
197
|
+
for (let i = 1; i < 1e4; i++) {
|
|
198
|
+
const id = `profile-${i}`;
|
|
199
|
+
if (!existing.has(id)) return id;
|
|
200
|
+
}
|
|
201
|
+
throw new Error("could not allocate a new profile id");
|
|
202
|
+
}
|
|
203
|
+
function deleteProfile(id) {
|
|
204
|
+
const normalized = normalizeProfileId(id);
|
|
205
|
+
if (normalized === DEFAULT_PROFILE_ID) {
|
|
206
|
+
throw new Error("the default profile cannot be deleted; clear it instead");
|
|
207
|
+
}
|
|
208
|
+
const index = withDefault(readIndexRaw());
|
|
209
|
+
const profile = index.profiles.find((entry) => entry.id === normalized);
|
|
210
|
+
if (!profile) throw new Error(`profile not found: ${normalized}`);
|
|
211
|
+
writeIndex({
|
|
212
|
+
version: PROFILE_INDEX_VERSION,
|
|
213
|
+
profiles: index.profiles.filter((entry) => entry.id !== normalized)
|
|
214
|
+
});
|
|
215
|
+
clearProfileStorage(normalized);
|
|
216
|
+
return profile;
|
|
217
|
+
}
|
|
218
|
+
function clearProfileStorage(id) {
|
|
219
|
+
const normalized = normalizeProfileId(id);
|
|
220
|
+
for (const dir of [
|
|
221
|
+
electronProfilePartitionDir(normalized),
|
|
222
|
+
playwrightProfileUserDataDir(normalized)
|
|
223
|
+
]) {
|
|
224
|
+
try {
|
|
225
|
+
import_fs.default.rmSync(dir, { recursive: true, force: true });
|
|
226
|
+
} catch {
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
231
|
+
0 && (module.exports = {
|
|
232
|
+
DEFAULT_PROFILE_ID,
|
|
233
|
+
clearProfileStorage,
|
|
234
|
+
createProfile,
|
|
235
|
+
deleteProfile,
|
|
236
|
+
electronProfilePartition,
|
|
237
|
+
electronProfilePartitionDir,
|
|
238
|
+
electronProfilePartitionName,
|
|
239
|
+
ensureProfile,
|
|
240
|
+
getProfile,
|
|
241
|
+
listProfiles,
|
|
242
|
+
nextGeneratedProfileId,
|
|
243
|
+
normalizeProfileId,
|
|
244
|
+
playwrightProfileUserDataDir,
|
|
245
|
+
profileIndexPath
|
|
246
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*! rnx v0.1.313 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name2 in all)
|
|
10
|
+
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// src/public-brand.ts
|
|
23
|
+
var public_brand_exports = {};
|
|
24
|
+
__export(public_brand_exports, {
|
|
25
|
+
rnxPublicBrand: () => rnxPublicBrand
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(public_brand_exports);
|
|
28
|
+
var name = "rnx";
|
|
29
|
+
var rnxPublicBrand = Object.freeze({
|
|
30
|
+
name,
|
|
31
|
+
packageName: "rnxsim",
|
|
32
|
+
commandName: "rnxsim",
|
|
33
|
+
domain: "rnxsim.com",
|
|
34
|
+
origin: "https://rnxsim.com"
|
|
35
|
+
});
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
rnxPublicBrand
|
|
39
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*! rnx v0.1.313 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// src/render-mode.ts
|
|
23
|
+
var render_mode_exports = {};
|
|
24
|
+
__export(render_mode_exports, {
|
|
25
|
+
getRenderMode: () => getRenderMode,
|
|
26
|
+
hasRenderWorkerBootstrap: () => hasRenderWorkerBootstrap,
|
|
27
|
+
isRenderMainMode: () => isRenderMainMode,
|
|
28
|
+
isRenderWorkerMode: () => isRenderWorkerMode,
|
|
29
|
+
shouldEnableRenderWorker: () => shouldEnableRenderWorker
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(render_mode_exports);
|
|
32
|
+
function getRenderMode(_searchParams) {
|
|
33
|
+
return "worker";
|
|
34
|
+
}
|
|
35
|
+
function isRenderWorkerMode(_searchParams) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
function isRenderMainMode(_searchParams) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
function hasRenderWorkerBootstrap(workerModuleBaseUrl) {
|
|
42
|
+
return typeof workerModuleBaseUrl === "string" && workerModuleBaseUrl.length > 0;
|
|
43
|
+
}
|
|
44
|
+
function shouldEnableRenderWorker(_searchParams, workerModuleBaseUrl) {
|
|
45
|
+
return hasRenderWorkerBootstrap(workerModuleBaseUrl);
|
|
46
|
+
}
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
getRenderMode,
|
|
50
|
+
hasRenderWorkerBootstrap,
|
|
51
|
+
isRenderMainMode,
|
|
52
|
+
isRenderWorkerMode,
|
|
53
|
+
shouldEnableRenderWorker
|
|
54
|
+
});
|