rnxsim 0.1.335 → 0.1.337
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 +104 -76
- package/cli/auth.ts +2 -2
- package/cli/bin.ts +7 -3
- package/cli/bridge-flow-runner.ts +2 -2
- package/cli/commands/agent-wrapper.ts +1 -1
- package/cli/commands/agent.ts +12 -12
- package/cli/commands/app-fonts.ts +1 -1
- package/cli/commands/assert.ts +7 -7
- package/cli/commands/auth.ts +4 -4
- package/cli/commands/camera.ts +13 -13
- package/cli/commands/cleanup.ts +6 -6
- package/cli/commands/compat.ts +4 -4
- package/cli/commands/config.ts +2 -2
- package/cli/commands/control.ts +37 -43
- package/cli/commands/cpu-profile.ts +2 -2
- package/cli/commands/daemon-mac-app.ts +2 -2
- package/cli/commands/daemon.ts +12 -12
- package/cli/commands/debug.ts +22 -22
- package/cli/commands/desktop.ts +3 -3
- package/cli/commands/detox.ts +17 -17
- package/cli/commands/device.ts +9 -9
- package/cli/commands/diagnose.ts +11 -11
- package/cli/commands/electron.ts +7 -7
- package/cli/commands/film.ts +6 -6
- package/cli/commands/inspect/core.ts +6 -7
- package/cli/commands/inspect/find.ts +2 -2
- package/cli/commands/inspect.ts +36 -36
- package/cli/commands/install-desktop.ts +8 -8
- package/cli/commands/login.ts +6 -6
- package/cli/commands/maestro-generate.ts +2 -2
- package/cli/commands/maestro.ts +23 -23
- package/cli/commands/mode.ts +4 -4
- package/cli/commands/no-bridge-hint.ts +9 -9
- package/cli/commands/perf.ts +11 -11
- package/cli/commands/permissions.ts +5 -5
- package/cli/commands/profile.ts +11 -11
- package/cli/commands/react.ts +15 -15
- package/cli/commands/record.ts +15 -15
- package/cli/commands/report-issue.ts +2 -2
- package/cli/commands/reset.ts +2 -2
- package/cli/commands/runtime.ts +18 -18
- package/cli/commands/screenshot-mode.ts +5 -5
- package/cli/commands/screenshot.ts +12 -12
- package/cli/commands/screenshots-capture.ts +7 -7
- package/cli/commands/screenshots.ts +6 -6
- package/cli/commands/serve.ts +6 -6
- package/cli/commands/setup.ts +13 -15
- package/cli/commands/skills.ts +14 -14
- package/cli/commands/slides.ts +19 -23
- package/cli/commands/state.ts +2 -2
- package/cli/commands/storage.ts +3 -3
- package/cli/commands/telemetry.ts +1 -1
- package/cli/commands/three-mode.ts +16 -16
- package/cli/commands/timeline.ts +4 -4
- package/cli/commands/upgrade.ts +1 -1
- package/cli/commands/upload.ts +11 -11
- package/cli/commands/version.ts +3 -5
- package/cli/commands/what-happened.ts +11 -11
- package/cli/drivers/electron.ts +3 -3
- package/cli/hints.ts +8 -8
- package/cli/recording-access.ts +1 -1
- package/cli/ws-bridge.ts +5 -5
- package/dist-cli/bin.js +5 -5
- package/dist-cli/chunks/{agent-XSJMAFVA.js → agent-QQ3RJNRY.js} +14 -14
- package/dist-cli/chunks/{agent-wrapper-NFLJ5K64.js → agent-wrapper-M6SQSMRY.js} +3 -3
- package/dist-cli/chunks/app-fonts-F6NDV3XC.js +4 -0
- package/dist-cli/chunks/{assert-ILAXIYB5.js → assert-5VB3KQNK.js} +12 -12
- package/dist-cli/chunks/auth-PFXODKFN.js +12 -0
- package/dist-cli/chunks/{beta-TDR6UKJU.js → beta-WUWYHT4F.js} +2 -2
- package/dist-cli/chunks/camera-V3MMTKP7.js +33 -0
- package/dist-cli/chunks/{chunk-INBPUR4T.js → chunk-2ANFH72P.js} +11 -11
- package/dist-cli/chunks/chunk-2GIA5T6B.js +74 -0
- package/dist-cli/chunks/{chunk-GP6QEBZA.js → chunk-4FRSEZ7Z.js} +1 -1
- package/dist-cli/chunks/{chunk-USGOQ3YJ.js → chunk-4GXBZHNA.js} +2 -2
- package/dist-cli/chunks/{chunk-R3CMECGC.js → chunk-4HESY5E7.js} +4 -4
- package/dist-cli/chunks/{chunk-WKT7YM5Q.js → chunk-4VJEXQGD.js} +1 -1
- package/dist-cli/chunks/{chunk-FE6ZHPKD.js → chunk-5LJNNHZH.js} +1 -1
- package/dist-cli/chunks/{chunk-I2HQB5NN.js → chunk-5QXGSTYI.js} +2 -2
- package/dist-cli/chunks/{chunk-FJSHIWAM.js → chunk-5SHAOQHJ.js} +2 -2
- package/dist-cli/chunks/{chunk-CGZWLSYD.js → chunk-5UPRBMIG.js} +1 -1
- package/dist-cli/chunks/{chunk-ZTM2MKNI.js → chunk-5ZEFRPCC.js} +1 -1
- package/dist-cli/chunks/{chunk-RTD3CPDQ.js → chunk-6ART4XVJ.js} +23 -23
- package/dist-cli/chunks/{chunk-MTD6IAEA.js → chunk-6CAUT2LH.js} +1 -1
- package/dist-cli/chunks/{chunk-ZYHCWCMM.js → chunk-7ATIH7OU.js} +1 -1
- package/dist-cli/chunks/{chunk-RVUGKXJD.js → chunk-7Q4QKHMA.js} +1 -1
- package/dist-cli/chunks/{chunk-MTNIDSOA.js → chunk-ABK2V2PR.js} +1 -1
- package/dist-cli/chunks/{chunk-TL4DNDDY.js → chunk-B53ILAHI.js} +2 -2
- package/dist-cli/chunks/{chunk-POC3QTA6.js → chunk-BSSVLFZR.js} +2 -2
- package/dist-cli/chunks/chunk-BVOBXTPN.js +30 -0
- package/dist-cli/chunks/{chunk-4KC35DMK.js → chunk-CPDEUWL5.js} +2 -2
- package/dist-cli/chunks/{chunk-HNQLZZJA.js → chunk-DINU267S.js} +2 -2
- package/dist-cli/chunks/{chunk-DCDKJ4NC.js → chunk-DQQ4CZVC.js} +2 -2
- package/dist-cli/chunks/{chunk-JWAY6DIH.js → chunk-EDWN2HOO.js} +18 -18
- package/dist-cli/chunks/{chunk-3CS4EUMG.js → chunk-EWVG4A3B.js} +2 -2
- package/dist-cli/chunks/{chunk-RTEJXUXN.js → chunk-F3NKCQHM.js} +6 -6
- package/dist-cli/chunks/{chunk-M7CBQ5I4.js → chunk-GEAGFYKP.js} +1 -1
- package/dist-cli/chunks/chunk-GGNH44PZ.js +5 -0
- package/dist-cli/chunks/{chunk-YSUIYK6B.js → chunk-HAHJJJUC.js} +2 -2
- package/dist-cli/chunks/chunk-HPJ5EKIZ.js +4 -0
- package/dist-cli/chunks/{chunk-IN2PZBQD.js → chunk-IBTHGFKE.js} +2 -2
- package/dist-cli/chunks/{chunk-ZZWO6Y7X.js → chunk-J6BYRRZQ.js} +2 -2
- package/dist-cli/chunks/{chunk-6Y3PVPTF.js → chunk-JK4OZ2TQ.js} +5 -5
- package/dist-cli/chunks/{chunk-PO3TOAED.js → chunk-KGQAO25M.js} +2 -2
- package/dist-cli/chunks/{chunk-J7XFINJG.js → chunk-L6UUIQE7.js} +2 -2
- package/dist-cli/chunks/{chunk-35XNGT5C.js → chunk-LXYLCETR.js} +1 -1
- package/dist-cli/chunks/{chunk-JWK5WD44.js → chunk-LZAL3DMP.js} +2 -2
- package/dist-cli/chunks/{chunk-3ZDOPKHE.js → chunk-M43UU7UG.js} +4 -4
- package/dist-cli/chunks/{chunk-ROPHZJ6P.js → chunk-M4LGUVBM.js} +2 -2
- package/dist-cli/chunks/{chunk-RELRA5VW.js → chunk-NCG6C5AH.js} +2 -2
- package/dist-cli/chunks/{chunk-42KDXJUD.js → chunk-NR5TSR2Y.js} +2 -2
- package/dist-cli/chunks/{chunk-R2UL5VFY.js → chunk-OCPWXT73.js} +3 -3
- package/dist-cli/chunks/{chunk-VV4MXLFR.js → chunk-ODKS6JUJ.js} +1 -1
- package/dist-cli/chunks/{chunk-F33DUJGG.js → chunk-R2WBREGQ.js} +1 -1
- package/dist-cli/chunks/chunk-RKY3ZNTA.js +5 -0
- package/dist-cli/chunks/{chunk-MGGRL2Z2.js → chunk-SW7BHOMO.js} +9 -9
- package/dist-cli/chunks/{chunk-GVKISFQ3.js → chunk-TJTLXG3R.js} +1 -1
- package/dist-cli/chunks/chunk-TNI4PW75.js +124 -0
- package/dist-cli/chunks/{chunk-CL3PREIE.js → chunk-UWEDNDND.js} +2 -2
- package/dist-cli/chunks/{chunk-IV36DY6M.js → chunk-WRID5SBV.js} +1 -1
- package/dist-cli/chunks/{chunk-42ALI64M.js → chunk-WUYI3XJ5.js} +2 -2
- package/dist-cli/chunks/{chunk-6VN5ULGQ.js → chunk-X7MHCEGG.js} +2 -2
- package/dist-cli/chunks/chunk-XIQFYLWD.js +15 -0
- package/dist-cli/chunks/{chunk-LCVUJCRJ.js → chunk-ZUK5ZQU7.js} +1 -1
- package/dist-cli/chunks/{cleanup-X6ZRPFDV.js → cleanup-6WBS3MUO.js} +10 -10
- package/dist-cli/chunks/cli-version-HUQCDGMA.js +4 -0
- package/dist-cli/chunks/{compat-VRXJ5J56.js → compat-2WOPKJYK.js} +9 -9
- package/dist-cli/chunks/{config-LHPPE4EP.js → config-FPD7WUYB.js} +5 -5
- package/dist-cli/chunks/{control-TVTNGSSF.js → control-B3XNER7I.js} +2 -2
- package/dist-cli/chunks/daemon-T4D4X2P5.js +4 -0
- package/dist-cli/chunks/{debug-EUHBBPGM.js → debug-LKV5CEAV.js} +17 -17
- package/dist-cli/chunks/desktop-EMDPOYQT.js +31 -0
- package/dist-cli/chunks/detox-4J4UTZE7.js +52 -0
- package/dist-cli/chunks/{device-PONITUZJ.js → device-PMZ7RPXQ.js} +11 -11
- package/dist-cli/chunks/{diagnose-2PN4K4L2.js → diagnose-MLEP727D.js} +12 -12
- package/dist-cli/chunks/{disk-cleanup-U2PQLOEW.js → disk-cleanup-CVEDIPEE.js} +2 -2
- package/dist-cli/chunks/drivers-NTUKJEL6.js +4 -0
- package/dist-cli/chunks/{film-XGZCFTQL.js → film-4RNECABF.js} +9 -9
- package/dist-cli/chunks/flow-5IOCAHVO.js +4 -0
- package/dist-cli/chunks/help-NUJUYEWP.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-I4MYF5CO.js → hidden-runtime-alias-YIF25W4F.js} +2 -2
- package/dist-cli/chunks/{home-paths-YRAPZ5LE.js → home-paths-WNJCCCCZ.js} +2 -2
- package/dist-cli/chunks/inspect-MFEIYUCN.js +4 -0
- package/dist-cli/chunks/install-desktop-NB65KI4D.js +4 -0
- package/dist-cli/chunks/{login-ZMAIAQ6F.js → login-VEHHGN42.js} +6 -6
- package/dist-cli/chunks/{logout-UQZ5JBJU.js → logout-VE7PNXL2.js} +2 -2
- package/dist-cli/chunks/{maestro-BQYKDUC4.js → maestro-ZXHTDEOI.js} +25 -25
- package/dist-cli/chunks/{maestro-generate-VQYMMQJ5.js → maestro-generate-TK33E2Z6.js} +3 -3
- package/dist-cli/chunks/mode-ZDKJ56NT.js +26 -0
- package/dist-cli/chunks/{optional-demo-registry-DUWHCLGD.js → optional-demo-registry-GBZ3WVDW.js} +2 -2
- package/dist-cli/chunks/{perf-7RAU7WRZ.js → perf-JXNZOUKW.js} +28 -28
- package/dist-cli/chunks/permissions-WQ62PW7Y.js +13 -0
- package/dist-cli/chunks/record-4S3ZMDIO.js +72 -0
- package/dist-cli/chunks/{report-issue-P376KFFU.js → report-issue-KKBADTWO.js} +4 -4
- package/dist-cli/chunks/reset-H5XIISJE.js +4 -0
- package/dist-cli/chunks/runtime-FK7EEMWA.js +4 -0
- package/dist-cli/chunks/{screenshot-command-NE7BKTQ2.js → screenshot-command-42U5MVQL.js} +34 -34
- package/dist-cli/chunks/{screenshot-layers-UE4R64PZ.js → screenshot-layers-4G42AHOX.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-ULXPLXMC.js → screenshots-capture-HMQ2OO3I.js} +11 -11
- package/dist-cli/chunks/{serve-P7BT4XHR.js → serve-S4V5EDW2.js} +16 -16
- package/dist-cli/chunks/setup-T43V7GA6.js +32 -0
- package/dist-cli/chunks/{skills-NTRYKJSF.js → skills-O426K26J.js} +16 -16
- package/dist-cli/chunks/{state-4D5YAM47.js → state-ZEEPDKJG.js} +5 -5
- package/dist-cli/chunks/storage-4GQLOFGG.js +37 -0
- package/dist-cli/chunks/store-RFMSNWLJ.js +4 -0
- package/dist-cli/chunks/telemetry-NFAAPSMN.js +4 -0
- package/dist-cli/chunks/{timeline-GZNFGD3Q.js → timeline-ONCYX7KW.js} +6 -6
- package/dist-cli/chunks/{upgrade-A46D6PEY.js → upgrade-A36T52AM.js} +2 -2
- package/dist-cli/chunks/upload-36O32DII.js +4 -0
- package/dist-cli/chunks/version-67HA253N.js +6 -0
- package/dist-cli/chunks/{web-H2IXO5SC.js → web-PWXQHQIE.js} +2 -2
- package/dist-cli/chunks/{what-happened-Z7UII5GH.js → what-happened-WNXE622R.js} +16 -16
- package/dist-lib/agent-daemon-client.cjs +5 -5
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +4 -4
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- 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 +7 -7
- 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/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +248 -98
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +2 -2
- package/dist-lib/menu.mjs +2 -2
- package/dist-lib/metro-host-modules/react-dom.js +6 -0
- package/dist-lib/metro-host-modules/react-native-web.js +6 -0
- package/dist-lib/metro-host-modules/react-native.js +6 -0
- package/dist-lib/metro-host-modules/react.js +6 -0
- package/dist-lib/metro-host-modules/react__jsx-dev-runtime.js +6 -0
- package/dist-lib/metro-host-modules/react__jsx-runtime.js +6 -0
- package/dist-lib/metro-production-bundle.cjs +72 -0
- package/dist-lib/metro-production-bundle.mjs +44 -0
- package/dist-lib/metro.cjs +152 -8
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +2 -2
- package/dist-lib/react-native-host-modules.cjs +50 -0
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +6 -7
- package/dist-lib/sdk.mjs +6 -7
- package/dist-lib/skills.cjs +71 -77
- package/dist-lib/vite.cjs +104 -85
- package/package.json +15 -2
- package/scripts/preuninstall.cjs +1 -1
- package/skills/contrast/SKILL.md +67 -75
- package/skills/rnx-debug/SKILL.md +84 -84
- package/skills/rnx-perf/SKILL.md +8 -8
- package/skills/rnx-setup/SKILL.md +54 -54
- package/skills/rnx-test/SKILL.md +35 -35
- package/skills/rnx-visual/SKILL.md +18 -18
- package/src/agent-daemon-client.ts +2 -2
- package/src/agent-sessions.ts +2 -2
- package/src/connect.ts +6 -6
- package/src/disk-cleanup.ts +1 -1
- package/src/home-paths.ts +1 -1
- package/src/host/bridge-host.ts +6 -6
- package/src/index.ts +1 -1
- package/src/metro-host-modules/react-dom.js +6 -0
- package/src/metro-host-modules/react-native-web.js +6 -0
- package/src/metro-host-modules/react-native.js +6 -0
- package/src/metro-host-modules/react.js +6 -0
- package/src/metro-host-modules/react__jsx-dev-runtime.js +6 -0
- package/src/metro-host-modules/react__jsx-runtime.js +6 -0
- package/src/metro-plugin.ts +249 -10
- package/src/metro-production-bundle.ts +51 -0
- package/src/public-brand.ts +1 -1
- package/src/react-native-host-modules.ts +25 -0
- package/src/runtime-assets.ts +1 -1
- package/src/sim-client.ts +1 -1
- package/src/vite-plugin-one.ts +171 -145
- package/dist-cli/chunks/app-fonts-L3UXFYVE.js +0 -4
- package/dist-cli/chunks/auth-ISX2EUQL.js +0 -12
- package/dist-cli/chunks/camera-4SWTNJUA.js +0 -33
- package/dist-cli/chunks/chunk-BRHZEZKN.js +0 -124
- package/dist-cli/chunks/chunk-EJPYPJWP.js +0 -5
- package/dist-cli/chunks/chunk-KWCD5MOK.js +0 -15
- package/dist-cli/chunks/chunk-MJ7QGY7Z.js +0 -4
- package/dist-cli/chunks/chunk-RSA4XWHN.js +0 -5
- package/dist-cli/chunks/chunk-S3EIOAWZ.js +0 -74
- package/dist-cli/chunks/chunk-TYANJQLO.js +0 -30
- package/dist-cli/chunks/cli-version-NZUSWKZR.js +0 -4
- package/dist-cli/chunks/daemon-XUEC47EC.js +0 -4
- package/dist-cli/chunks/desktop-LLHMP4A3.js +0 -31
- package/dist-cli/chunks/detox-QLNWLXA4.js +0 -52
- package/dist-cli/chunks/drivers-7IU37M2E.js +0 -4
- package/dist-cli/chunks/flow-NZZLR4BN.js +0 -4
- package/dist-cli/chunks/help-D7URIJRD.js +0 -4
- package/dist-cli/chunks/inspect-TJYWKY56.js +0 -4
- package/dist-cli/chunks/install-desktop-LD3W5RS7.js +0 -4
- package/dist-cli/chunks/mode-ZQ6H7KWM.js +0 -26
- package/dist-cli/chunks/permissions-DRZ3HCFL.js +0 -13
- package/dist-cli/chunks/record-J5JAYW4Y.js +0 -72
- package/dist-cli/chunks/reset-KXYRDEFU.js +0 -4
- package/dist-cli/chunks/runtime-66CEPOG6.js +0 -4
- package/dist-cli/chunks/setup-QO5KZAX3.js +0 -32
- package/dist-cli/chunks/storage-X2K2MDPX.js +0 -37
- package/dist-cli/chunks/store-TUJPIRTT.js +0 -4
- package/dist-cli/chunks/telemetry-CF5DVEKI.js +0 -4
- package/dist-cli/chunks/upload-UIQJIBEZ.js +0 -4
- package/dist-cli/chunks/version-CMBB3FXL.js +0 -6
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.337 | (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;
|
|
@@ -33,11 +33,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
33
33
|
var vite_plugin_one_exports = {};
|
|
34
34
|
__export(vite_plugin_one_exports, {
|
|
35
35
|
default: () => vite_plugin_one_default,
|
|
36
|
+
rnxPlugin: () => rnxPlugin,
|
|
36
37
|
sootsimPlugin: () => sootsimPlugin
|
|
37
38
|
});
|
|
38
39
|
module.exports = __toCommonJS(vite_plugin_one_exports);
|
|
40
|
+
var import_child_process = require("child_process");
|
|
39
41
|
var import_fs2 = __toESM(require("fs"), 1);
|
|
40
42
|
var import_path2 = __toESM(require("path"), 1);
|
|
43
|
+
var import_url2 = require("url");
|
|
41
44
|
|
|
42
45
|
// src/bridge-constants.ts
|
|
43
46
|
var DEFAULT_SOOTSIM_BRIDGE_PORT = 7668;
|
|
@@ -118,7 +121,7 @@ function isValidRuntimeVersion(value) {
|
|
|
118
121
|
}
|
|
119
122
|
|
|
120
123
|
// src/runtime-assets.ts
|
|
121
|
-
var SOOTSIM_RUNTIME_MISSING_MESSAGE = "[rnx] no engine runtime installed \u2014 run `
|
|
124
|
+
var SOOTSIM_RUNTIME_MISSING_MESSAGE = "[rnx] no engine runtime installed \u2014 run `rnx setup`, or `rnx runtime install`";
|
|
122
125
|
var _monorepoRootCache;
|
|
123
126
|
function findMonorepoRoot() {
|
|
124
127
|
if (_monorepoRootCache !== void 0) return _monorepoRootCache;
|
|
@@ -254,105 +257,121 @@ function serveRuntimeFile(req, res, fullPath) {
|
|
|
254
257
|
}
|
|
255
258
|
|
|
256
259
|
// src/vite-plugin-one.ts
|
|
257
|
-
function
|
|
258
|
-
if (options.enabled === false) return [];
|
|
260
|
+
function rnxPlugin(options = {}) {
|
|
259
261
|
const prefix = options.prefix || "/__soot";
|
|
260
|
-
return
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
262
|
+
return {
|
|
263
|
+
name: "sootsim-one",
|
|
264
|
+
configureServer(server) {
|
|
265
|
+
if (options.enabled === false) return;
|
|
266
|
+
const bundleUrl = options.bundleUrl || "/node_modules/one/metro-entry.bundle?platform=ios&dev=true&minify=false";
|
|
267
|
+
const buildShellHtml = (runtimeRoot) => {
|
|
268
|
+
const html = import_fs2.default.readFileSync(import_path2.default.join(runtimeRoot, "index.html"), "utf8");
|
|
269
|
+
const lock = readDaemonLockfile();
|
|
270
|
+
const bridgePort = lock && isDaemonLockfileFresh(lock) && lock.bridgePort > 0 ? lock.bridgePort : DEFAULT_SOOTSIM_BRIDGE_PORT;
|
|
271
|
+
const inject = `<script>(function(){var u=new URL(location.href);if(!u.searchParams.has('bundle'))u.searchParams.set('bundle',${JSON.stringify(bundleUrl)});window.__sootsimBridgePort=${bridgePort};history.replaceState(null,'','${prefix}/'+u.search)})()</script>`;
|
|
272
|
+
return html.replace("</head>", inject + "</head>");
|
|
273
|
+
};
|
|
274
|
+
server.middlewares.use((req, res, next) => {
|
|
275
|
+
const origWriteHead = res.writeHead.bind(res);
|
|
276
|
+
res.writeHead = function(statusCode, ...args) {
|
|
277
|
+
const setCookie = res.getHeader("set-cookie");
|
|
278
|
+
if (setCookie) {
|
|
279
|
+
const value = Array.isArray(setCookie) ? setCookie.join(", ") : String(setCookie);
|
|
280
|
+
res.setHeader("x-sootsim-set-cookie", value);
|
|
281
|
+
res.setHeader("access-control-expose-headers", "x-sootsim-set-cookie");
|
|
282
|
+
}
|
|
283
|
+
return origWriteHead(
|
|
284
|
+
statusCode,
|
|
285
|
+
...args
|
|
286
|
+
);
|
|
271
287
|
};
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
288
|
+
next();
|
|
289
|
+
});
|
|
290
|
+
server.middlewares.use((req, res, next) => {
|
|
291
|
+
if ((req.url || "").split("?")[0] !== "/__server-scan") return next();
|
|
292
|
+
const scanPort = server.config.server.port || 8081;
|
|
293
|
+
const absoluteBundleUrl = bundleUrl.startsWith("http") ? bundleUrl : `http://localhost:${scanPort}${bundleUrl}`;
|
|
294
|
+
res.setHeader("content-type", "application/json");
|
|
295
|
+
res.end(
|
|
296
|
+
JSON.stringify([
|
|
297
|
+
{
|
|
298
|
+
port: scanPort,
|
|
299
|
+
framework: "one",
|
|
300
|
+
bundleUrl: absoluteBundleUrl,
|
|
301
|
+
lastSeen: Date.now()
|
|
280
302
|
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
303
|
+
])
|
|
304
|
+
);
|
|
305
|
+
});
|
|
306
|
+
server.middlewares.use((req, res, next) => {
|
|
307
|
+
const url = req.url || "";
|
|
308
|
+
const pathname = url.split("?")[0];
|
|
309
|
+
const runtimeRoot = resolveRuntimeRootForRequestHost(req.headers.host);
|
|
310
|
+
if (!runtimeRoot) {
|
|
311
|
+
if (pathname === prefix || pathname === prefix + "/" || pathname.startsWith(prefix + "/")) {
|
|
312
|
+
res.statusCode = 500;
|
|
313
|
+
res.end(SOOTSIM_RUNTIME_MISSING_MESSAGE);
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
286
316
|
next();
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
res.end(
|
|
294
|
-
JSON.stringify([
|
|
295
|
-
{
|
|
296
|
-
port: scanPort,
|
|
297
|
-
framework: "one",
|
|
298
|
-
bundleUrl: absoluteBundleUrl,
|
|
299
|
-
lastSeen: Date.now()
|
|
300
|
-
}
|
|
301
|
-
])
|
|
302
|
-
);
|
|
303
|
-
});
|
|
304
|
-
server.middlewares.use((req, res, next) => {
|
|
305
|
-
const url = req.url || "";
|
|
306
|
-
const pathname = url.split("?")[0];
|
|
307
|
-
const runtimeRoot = resolveRuntimeRootForRequestHost(req.headers.host);
|
|
308
|
-
if (!runtimeRoot) {
|
|
309
|
-
if (pathname === prefix || pathname === prefix + "/" || pathname.startsWith(prefix + "/")) {
|
|
310
|
-
res.statusCode = 500;
|
|
311
|
-
res.end(SOOTSIM_RUNTIME_MISSING_MESSAGE);
|
|
312
|
-
return;
|
|
313
|
-
}
|
|
314
|
-
next();
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
if (isRootRuntimeAssetPath(pathname)) {
|
|
320
|
+
const fullPath = resolveRuntimeFilePath(runtimeRoot, pathname);
|
|
321
|
+
if (fullPath) {
|
|
322
|
+
serveRuntimeFile(req, res, fullPath);
|
|
315
323
|
return;
|
|
316
324
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
325
|
+
}
|
|
326
|
+
if (pathname === prefix || pathname === prefix + "/") {
|
|
327
|
+
res.setHeader("content-type", "text/html");
|
|
328
|
+
res.end(buildShellHtml(runtimeRoot));
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
if (pathname.startsWith(prefix + "/")) {
|
|
332
|
+
const fullPath = resolveRuntimeFilePath(
|
|
333
|
+
runtimeRoot,
|
|
334
|
+
pathname.slice(prefix.length)
|
|
335
|
+
);
|
|
336
|
+
if (fullPath) {
|
|
337
|
+
serveRuntimeFile(req, res, fullPath);
|
|
338
|
+
return;
|
|
323
339
|
}
|
|
324
|
-
|
|
340
|
+
const ext = import_path2.default.extname(pathname);
|
|
341
|
+
if (!ext) {
|
|
325
342
|
res.setHeader("content-type", "text/html");
|
|
326
343
|
res.end(buildShellHtml(runtimeRoot));
|
|
327
344
|
return;
|
|
328
345
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
+
}
|
|
347
|
+
next();
|
|
348
|
+
});
|
|
349
|
+
const port = server.config.server.port || 8081;
|
|
350
|
+
const sootsimUrl = `http://localhost:${port}${prefix}/`;
|
|
351
|
+
console.log(`[rnx] serving at ${sootsimUrl}`);
|
|
352
|
+
if (options.open && !process.env.CI && !process.env.SOOTSIM_NO_OPEN) {
|
|
353
|
+
server.httpServer?.once("listening", () => {
|
|
354
|
+
const packageRoot = import_path2.default.resolve(
|
|
355
|
+
import_path2.default.dirname((0, import_url2.fileURLToPath)(__sootsim_import_meta_url)),
|
|
356
|
+
".."
|
|
357
|
+
);
|
|
358
|
+
const binPath = import_path2.default.join(packageRoot, "dist-cli", "bin.js");
|
|
359
|
+
const openPort = server.config.server.port || port;
|
|
360
|
+
console.log(`[rnx] opening simulator for :${openPort}`);
|
|
361
|
+
(0, import_child_process.spawn)(process.execPath, [binPath, "open", String(openPort)], {
|
|
362
|
+
detached: true,
|
|
363
|
+
stdio: "ignore",
|
|
364
|
+
windowsHide: true
|
|
365
|
+
}).unref();
|
|
346
366
|
});
|
|
347
|
-
const port = server.config.server.port || 8081;
|
|
348
|
-
const sootsimUrl = `http://localhost:${port}${prefix}/`;
|
|
349
|
-
console.log(`[rnx] serving at ${sootsimUrl}`);
|
|
350
367
|
}
|
|
351
368
|
}
|
|
352
|
-
|
|
369
|
+
};
|
|
353
370
|
}
|
|
354
|
-
var
|
|
371
|
+
var sootsimPlugin = rnxPlugin;
|
|
372
|
+
var vite_plugin_one_default = rnxPlugin;
|
|
355
373
|
// Annotate the CommonJS export names for ESM import in node:
|
|
356
374
|
0 && (module.exports = {
|
|
375
|
+
rnxPlugin,
|
|
357
376
|
sootsimPlugin
|
|
358
377
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rnxsim",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.337",
|
|
4
|
+
"description": "rnx CLI, Vite and Metro plugins, and agent skills for driving React Native apps in the browser.",
|
|
5
5
|
"author": "Tamagui LLC",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"repository": {
|
|
@@ -37,6 +37,18 @@
|
|
|
37
37
|
"source": "./src/metro-plugin.ts",
|
|
38
38
|
"default": "./dist-lib/metro.cjs"
|
|
39
39
|
},
|
|
40
|
+
"./metro-production-bundle": {
|
|
41
|
+
"types": "./src/metro-production-bundle.ts",
|
|
42
|
+
"source": "./src/metro-production-bundle.ts",
|
|
43
|
+
"import": "./dist-lib/metro-production-bundle.mjs",
|
|
44
|
+
"default": "./dist-lib/metro-production-bundle.cjs"
|
|
45
|
+
},
|
|
46
|
+
"./react-native-host-modules": {
|
|
47
|
+
"types": "./src/react-native-host-modules.ts",
|
|
48
|
+
"source": "./src/react-native-host-modules.ts",
|
|
49
|
+
"bun": "./src/react-native-host-modules.ts",
|
|
50
|
+
"default": "./dist-lib/react-native-host-modules.cjs"
|
|
51
|
+
},
|
|
40
52
|
"./jump-to-source-babel": {
|
|
41
53
|
"source": "./src/jump-to-source-babel.ts",
|
|
42
54
|
"default": "./dist-lib/jump-to-source-babel.cjs"
|
|
@@ -154,6 +166,7 @@
|
|
|
154
166
|
"./package.json": "./package.json"
|
|
155
167
|
},
|
|
156
168
|
"bin": {
|
|
169
|
+
"rnx": "dist-cli/bin.js",
|
|
157
170
|
"rnxsim": "dist-cli/bin.js"
|
|
158
171
|
},
|
|
159
172
|
"files": [
|
package/scripts/preuninstall.cjs
CHANGED
|
@@ -44,7 +44,7 @@ if (!pkgDir.includes(`${path.sep}node_modules${path.sep}`)) {
|
|
|
44
44
|
const isRoot = typeof process.getuid === 'function' && process.getuid() === 0
|
|
45
45
|
if (isRoot && process.env.SUDO_USER) {
|
|
46
46
|
console.log(
|
|
47
|
-
'rnx: preuninstall skipped under sudo — run `
|
|
47
|
+
'rnx: preuninstall skipped under sudo — run `rnx daemon uninstall` ' +
|
|
48
48
|
'as your user first to remove ~/.sootsim and the bridge daemon',
|
|
49
49
|
)
|
|
50
50
|
process.exit(0)
|
package/skills/contrast/SKILL.md
CHANGED
|
@@ -14,65 +14,65 @@ overview of all available skills and CLI commands in this repo.
|
|
|
14
14
|
|
|
15
15
|
## rnx CLI commands
|
|
16
16
|
|
|
17
|
-
the `
|
|
17
|
+
the `rnx` CLI is the operational surface for booting shells, driving
|
|
18
18
|
automation, inspecting the render tree, and managing sims.
|
|
19
19
|
|
|
20
20
|
| command | description |
|
|
21
21
|
| --- | --- |
|
|
22
|
-
| `
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
22
|
+
| `rnx maestro` | author, generate, and run Maestro YAML flows against rnx |
|
|
23
|
+
| `rnx detox` | run existing Detox suites against rnx on headless Chromium |
|
|
24
|
+
| `rnx cleanup` | inspect and reclaim local rnx disk usage |
|
|
25
|
+
| `rnx record` | capture the live sim as webm/mp4/gif, or sample N png frames (--frames) |
|
|
26
|
+
| `rnx film` | record a flow on the flat canvas, replay it on the 3d device stage under a camera cinematic, save a clip |
|
|
27
|
+
| `rnx storage` | manage guest app storage and launch profiles |
|
|
28
|
+
| `rnx permissions` | inspect and change simulated operating-system permissions |
|
|
29
|
+
| `rnx perf` | CPU, React render, shell frame, and scroll-layer profiling |
|
|
30
|
+
| `rnx describe` | curated human-readable UI summary (default inspection tool) |
|
|
31
|
+
| `rnx find` | locate nodes by text / testID / role / type / predicate |
|
|
32
|
+
| `rnx assert` | run any read verb and convert its output into an exit code |
|
|
33
|
+
| `rnx screenshot` | capture PNGs and manage App Store screenshot assets |
|
|
34
|
+
| `rnx get` | read runtime state (tree, a11y, layout, url, count, errors, …) |
|
|
35
|
+
| `rnx do` | drive the app (tap, type, scroll, swipe, key, reload, …) |
|
|
36
|
+
| `rnx wait` | block until the runtime reaches a known state |
|
|
37
|
+
| `rnx shell` | drive shell state and simulator chrome |
|
|
38
|
+
| `rnx mode` | toggle screenshot and 3D display modes |
|
|
39
|
+
| `rnx device` | inspect or change the live device preset for a sim |
|
|
40
|
+
| `rnx network` | inspect live network traffic from the running rnx worker |
|
|
41
|
+
| `rnx logs` | inspect live console output from the running rnx worker |
|
|
42
|
+
| `rnx debug` | drive __sootsimDebug: channels, snapshots, and inspectors |
|
|
43
|
+
| `rnx what-happened` | show recent semantic events: toasts, keyboards, screens, alerts, fetches, errors |
|
|
44
|
+
| `rnx timeline` | control the semantic event timeline (enable opt-in kinds, clear, dump) |
|
|
45
|
+
| `rnx open` | load a target into the current sim or open a new one |
|
|
46
|
+
| `rnx list` | list connected sims or available launch drivers |
|
|
47
|
+
| `rnx use` | select a connected sim |
|
|
48
|
+
| `rnx skill` | install and inspect bundled rnx agent skills |
|
|
49
|
+
| `rnx claim` | take an exclusive lease on a sim |
|
|
50
|
+
| `rnx agent` | attached projects + local agent sessions (codex/claude) |
|
|
51
|
+
| `rnx close` | close a connected sim |
|
|
52
|
+
| `rnx setup` | check local setup and install the recommended bridge daemon |
|
|
53
|
+
| `rnx compat` | check package compatibility |
|
|
54
|
+
| `rnx report-issue` | send an explicitly approved compatibility report |
|
|
55
|
+
| `rnx desktop` | launch or install the desktop companion |
|
|
56
|
+
| `rnx daemon` | manage the optional background bridge service |
|
|
57
|
+
| `rnx version` | show the CLI + engine runtime versions you are running |
|
|
58
|
+
| `rnx upgrade` | update the rnx CLI and engine runtime to the latest |
|
|
59
|
+
| `rnx serve` | run the rnx bridge in the foreground |
|
|
60
|
+
| `rnx runtime` | manage engine runtimes under ~/.sootsim/runtimes/ |
|
|
61
|
+
| `rnx auth` | inspect active CLI auth |
|
|
62
|
+
| `rnx login` | sign in for preview uploads |
|
|
63
|
+
| `rnx logout` | clear the local desktop auth session |
|
|
64
|
+
| `rnx config` | manage local CLI preferences |
|
|
65
65
|
|
|
66
66
|
### runtime verb groups
|
|
67
67
|
|
|
68
68
|
every runtime verb is organized under one of these grouping prefixes.
|
|
69
|
-
run `
|
|
69
|
+
run `rnx --help` to see the full list under each group.
|
|
70
70
|
|
|
71
|
-
- `
|
|
72
|
-
- `
|
|
73
|
-
- `
|
|
74
|
-
- `
|
|
75
|
-
- `
|
|
71
|
+
- `rnx describe` — summarize the current UI
|
|
72
|
+
- `rnx find <...>` — unified finder (bare text, --testid, --role, --type, --pressable, --visible)
|
|
73
|
+
- `rnx get <noun>` — read runtime state (tree, a11y, url, count, errors, warnings, requests, globals, layout, node)
|
|
74
|
+
- `rnx do <action>` — drive the app (tap, tap-text, tap-id, type, type-into, key, dismiss, scroll, drag, swipe, pinch, reload, shell, sleep, settle, wait)
|
|
75
|
+
- `rnx debug <tool>` — instrumentation (state, js, eval, perf, sample-color, enable/disable channels, snapshots, diff, record, recent)
|
|
76
76
|
|
|
77
77
|
### global flags
|
|
78
78
|
|
|
@@ -90,9 +90,9 @@ skills for working with the rnx native preview engine:
|
|
|
90
90
|
|
|
91
91
|
| skill | description |
|
|
92
92
|
| --- | --- |
|
|
93
|
-
| `/rnx-debug` | Debug rendering, animation, gesture, performance, and accessibility issues in a React Native app running under rnx. Reach for this whenever an animation looks wrong (janky, stutters, snaps, only updates once, or doesn't move at all), a swipe/transition/gesture misbehaves or feels broken, scrolling drops frames or feels slow, the UI renders the wrong tree/props, or a screen reader can't reach something — and drive the
|
|
93
|
+
| `/rnx-debug` | Debug rendering, animation, gesture, performance, and accessibility issues in a React Native app running under rnx. Reach for this whenever an animation looks wrong (janky, stutters, snaps, only updates once, or doesn't move at all), a swipe/transition/gesture misbehaves or feels broken, scrolling drops frames or feels slow, the UI renders the wrong tree/props, or a screen reader can't reach something — and drive the rnx CLI debug tooling first, not screenshots or ad-hoc logging. |
|
|
94
94
|
| `/rnx-perf` | Optimize rnx engine and app performance — scroll jank, dropped frames, slow animation, idle CPU, memory growth, and "smooth normally but laggy under load" (video calls, busy machines). Covers measuring on the right thread with the right browser, proving each perf tier actually engages via its counters, a CPU-contention test harness, and the map of existing perf machinery so you improve it instead of reinventing it. For general app debugging load /rnx-debug first. |
|
|
95
|
-
| `/rnx-setup` | Get rnx connected to your React Native app — from `
|
|
95
|
+
| `/rnx-setup` | Get rnx connected to your React Native app — from `rnx setup` to a driveable sim |
|
|
96
96
|
| `/rnx-test` | Run automated tests against your React Native app under rnx with Maestro YAML or Detox/Jest |
|
|
97
97
|
| `/rnx-visual` | Pixel-level rendering comparison between rnx and native iOS — fonts, gradients, shadows, image fidelity |
|
|
98
98
|
|
|
@@ -117,8 +117,8 @@ commands in your own `sleep` or chain `do settle` "just to be safe"**.
|
|
|
117
117
|
|
|
118
118
|
what this means:
|
|
119
119
|
|
|
120
|
-
- `
|
|
121
|
-
- you only need `
|
|
120
|
+
- `rnx do tap-id login` then `rnx find "Welcome"` Just Works™.
|
|
121
|
+
- you only need `rnx do settle <seconds>` or `rnx wait idle
|
|
122
122
|
--max-ms <N>` when the CLI explicitly prints
|
|
123
123
|
`⚠ auto-wait timed out after Nms — next command may see mid-animation
|
|
124
124
|
state`, or when the transition you care about lasts longer than ~400 ms
|
|
@@ -136,35 +136,27 @@ what this means:
|
|
|
136
136
|
|
|
137
137
|
```sh
|
|
138
138
|
bun dev # start everything
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
rnx dev -- pnpm dev # wrap a bundler
|
|
140
|
+
rnx open 8081 # load an app
|
|
141
|
+
rnx describe # inspect the UI tree
|
|
142
142
|
```
|
|
143
143
|
|
|
144
144
|
### debugging
|
|
145
145
|
|
|
146
146
|
```sh
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
### testing
|
|
155
|
-
|
|
156
|
-
```sh
|
|
157
|
-
rnxsim maestro test .maestro/ # run Maestro YAML flows
|
|
158
|
-
rnxsim maestro generate "login" # generate and run a Maestro flow
|
|
159
|
-
rnxsim detox # run Detox/Jest suites
|
|
147
|
+
rnx get errors 5 # recent console errors
|
|
148
|
+
rnx get requests 5 # recent failed requests
|
|
149
|
+
rnx debug snapshot before # capture state
|
|
150
|
+
rnx debug diff before after # compare snapshots
|
|
151
|
+
rnx debug state shell # runtime state dump
|
|
160
152
|
```
|
|
161
153
|
|
|
162
154
|
### inspection
|
|
163
155
|
|
|
164
156
|
```sh
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
157
|
+
rnx describe # visible elements
|
|
158
|
+
rnx find "Sign in" # find by text
|
|
159
|
+
rnx find --testid loginButton # find by testID
|
|
160
|
+
rnx do tap-text "Submit" # tap by text
|
|
161
|
+
rnx do type "hello" # type text
|
|
170
162
|
```
|