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 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
var c="sootsim-agent-prompt-v1";function r(n){return typeof n=="string"?n.trim():""}function m(n){let e=r(n.text);if(!e)return"";let t=r(n.displayText),s=r(n.inspectSummary),o=r(n.inspectTrace);return!!s||!!o||/[\r\n]/.test(e)||!!t&&t!==e?JSON.stringify({__sootsimAgentPrompt:c,text:e,displayText:t,inspectSummary:s,inspectTrace:o}):e}function u(n){let e=r(n);if(!e)return null;try{let t=JSON.parse(e);if(t.__sootsimAgentPrompt!==c)return{text:e};let s=r(typeof t.text=="string"?t.text:void 0);if(!s)return null;let o=r(typeof t.displayText=="string"?t.displayText:void 0),i=r(typeof t.inspectSummary=="string"?t.inspectSummary:void 0),p=r(typeof t.inspectTrace=="string"?t.inspectTrace:void 0);return{text:s,...o?{displayText:o}:{},...i?{inspectSummary:i}:{},...p?{inspectTrace:p}:{}}}catch{return{text:e}}}export{m as a,u as b};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a as t}from"./chunk-5YZYDEMI.js";import{readFileSync as a}from"node:fs";import{fileURLToPath as n}from"node:url";var r=null;function f(){if(r!=null)return r;let o=[()=>n(import.meta.resolve(`${t.packageName}/package.json`)),()=>n(new URL("../package.json",import.meta.url))];for(let i of o)try{let e=JSON.parse(a(i(),"utf8")).version;if(typeof e=="string"&&e)return r=e,r}catch{}return r="0.0.0",r}export{f as a};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a as k}from"./chunk-GZE57ORL.js";import{createHash as L}from"node:crypto";import{createRequire as j}from"node:module";var P=/(^|\/)expo-splash-screen$/,w=/(^|\/)react-native-bootsplash$/;function A(n,e){let r=e.replace(/\/+$/,""),t=n.replace(/^\.\//,"").replace(/^\/+/,"");if(t)return`${r}/assets/${t}`}function d(n,e,r){return r?r(n):A(n,e)}function y(n){if(n==="cover")return"cover";if(n==="contain"||n==="native")return"contain"}function c(n){return typeof n=="string"&&n.length>0?n:void 0}function S(n){return typeof n=="number"&&Number.isFinite(n)?n:void 0}function R(n,e,r){if(!n||typeof n!="object")return null;let t=n,o={source:"expo-splash-screen",backgroundColor:c(t.backgroundColor)??"#ffffff"},i=c(t.image);i&&(o.imageUrl=d(i,e,r));let s=S(t.imageWidth);s!=null&&(o.imageWidthPx=s);let l=y(t.resizeMode);l&&(o.resizeMode=l);let p=t.dark;if(p&&typeof p=="object"){let u=p,g=c(u.backgroundColor),f=c(u.image);(g||f)&&(o.dark={},g&&(o.dark.backgroundColor=g),f&&(o.dark.imageUrl=d(f,e,r)))}return o}function O(n,e,r,t){let a=n[e],o=a&&typeof a=="object"?a.splash:void 0,i=n.splash,s=o&&typeof o=="object"?o:i;if(!s||typeof s!="object")return null;let p={source:"expo-legacy",backgroundColor:c(s.backgroundColor)??"#ffffff",imageWidthPx:S(s.imageWidth)??200,resizeMode:y(s.resizeMode)??"contain"},u=c(s.image);u&&(p.imageUrl=d(u,r,t));let g=s.dark;if(g&&typeof g=="object"){let f=g,m=c(f.backgroundColor),h=c(f.image);(m||h)&&(p.dark={},m&&(p.dark.backgroundColor=m),h&&(p.dark.imageUrl=d(h,r,t)))}return p}function v(n,e,r){if(!n||typeof n!="object")return null;let t=n,a=c(t.logo);if(!a)return null;let o={source:"react-native-bootsplash",backgroundColor:c(t.background)??"#fff",imageUrl:d(a,e,r),imageWidthPx:S(t.logoWidth)??100,resizeMode:"contain"},i=c(t.darkBackground),s=c(t.darkLogo);return(i||s)&&(o.dark={},i&&(o.dark.backgroundColor=i),s&&(o.dark.imageUrl=d(s,e,r))),o}function C(n,e,r,t={}){if(!n||typeof n!="object")return null;let a=n,o=a.plugins,i=null,s=null;if(Array.isArray(o))for(let l of o){let p=Array.isArray(l)?l[0]:l;if(typeof p!="string")continue;let u=Array.isArray(l)?l[1]??{}:{};!i&&P.test(p)?i=R(u,r,t.resolveAssetUrl):!s&&w.test(p)&&(s=v(u,r,t.resolveAssetUrl))}return s||i||O(a,e,r,t.resolveAssetUrl)}var b=j(import.meta.url);function E(n){try{let e=new URL(n),r=e.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r))return e.origin}catch{}return null}function G(n){let e=E(n.bundleUrl);if(!e)return null;let t=k(n.projectDir)?.appDir??null;if(!t)return null;let a=(n.platform||process.env.CONTRAST_PLATFORM||"ios").toLowerCase(),o=null;try{let s=b.resolve("@expo/config",{paths:[t]}),l=b(s);typeof l.getConfig=="function"&&(o=l.getConfig)}catch{}if(!o)return null;let i;try{let s=o(t,{skipSDKVersionRequirement:!0});s?.exp&&typeof s.exp=="object"&&(i=s.exp)}catch{}return!i||typeof i!="object"?null:C(i,a==="android"?"android":"ios",e)}function q(n){return encodeURIComponent(JSON.stringify(n))}function z(n){if(!n)return null;try{let e=JSON.parse(decodeURIComponent(n));if(!e||typeof e!="object")return null;let r=e;return r.source!=="expo-splash-screen"&&r.source!=="expo-legacy"&&r.source!=="react-native-bootsplash"||typeof r.backgroundColor!="string"?null:e}catch{return null}}function I(n){let e=new Set;return n.imageUrl&&e.add(n.imageUrl),n.dark?.imageUrl&&e.add(n.dark.imageUrl),[...e]}function M(n){let e=(n.split("?")[0].split(".").pop()||"").toLowerCase();return e==="png"?"image/png":e==="jpg"||e==="jpeg"?"image/jpeg":e==="webp"?"image/webp":e==="gif"?"image/gif":e==="svg"?"image/svg+xml":"application/octet-stream"}async function H(n,e){let r=z(n);if(!r)return[];let t=[],a=new Set;for(let o of I(r)){let i=L("sha256").update(o).digest("hex");if(!a.has(i)){a.add(i);try{let s=await fetch(o);if(!s.ok){e?.onError?.(o,new Error(`${s.status} ${s.statusText}`));continue}let l=new Uint8Array(await s.arrayBuffer());t.push({url:o,urlhash:i,contentType:M(o),bytes:l}),e?.onStaged?.({url:o,byteLength:l.byteLength})}catch(s){e?.onError?.(o,s)}}}return t}import{spawn as D}from"child_process";function U(n,e={}){if(!n)throw new Error("openUrl requires a url");let r=e.platform??process.platform;return r==="darwin"?{command:"open",args:e.background===!1?[n]:["-g",n],via:"system"}:r==="win32"?{command:"cmd",args:["/c","start","",n],via:"system"}:{command:"xdg-open",args:[n],via:"system"}}async function W(n,e,r){return new Promise((t,a)=>{let o=D(n,e,{detached:r,stdio:"ignore"});o.once("error",a),o.once("spawn",()=>{r&&o.unref(),t(o.pid)})})}async function x(n,e={}){let r=U(n,e),t=await W(r.command,r.args,e.detached??!0);return{...r,pid:t,attachUrl:n}}async function F(n,e={}){await x(n,e)}export{G as a,q as b,H as c,F as d};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{f as c}from"./chunk-CSJ7L7ZL.js";function m(e,n){let t=e.indexOf("--testid");if(t>=0&&e[t+1])return{mode:"testid",value:e[t+1]};let i=e.indexOf("--test-id");if(i>=0&&e[i+1])return{mode:"testid",value:e[i+1]};let l=e.indexOf("--text");if(l>=0&&e[l+1])return{mode:"text",value:e[l+1]};let r=n?.[1];return r&&!r.startsWith("-")&&!Number.isFinite(Number(r))?{mode:"testid",value:r}:null}async function a(e,n){let t=await e.send({type:"resolve",selector:n.mode==="testid"?{testID:n.value}:{text:n.value}});if(t===null)return null;if(typeof t!="object")throw new Error("resolve returned an invalid result");let i=Reflect.get(t,"match"),l=Reflect.get(t,"target"),r=[i,l],o=Reflect.get(t,"point"),u=o!==null&&typeof o=="object"?Reflect.get(o,"x"):void 0,d=o!==null&&typeof o=="object"?Reflect.get(o,"y"):void 0;if(!c(r)||typeof u!="number"||!Number.isFinite(u)||typeof d!="number"||!Number.isFinite(d))throw new Error("resolve returned an invalid result");let s=r[0];if(!s)throw new Error("resolve returned an invalid result");return{x:u,y:d,testID:s.testID??null,text:s.text??(n.mode==="text"?n.value:s.label),type:s.type}}export{m as a,a as b};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{e as p}from"./chunk-UB2W6OQM.js";import{a as l,b as u}from"./chunk-JXAXYK7W.js";import{a as c}from"./chunk-SKMG5DD7.js";import{c as i}from"./chunk-TH2UFGVP.js";async function d(e,t){if(t)return t.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let r=c();return r?.origin?r.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function x(e,t={}){let r=l();if(r||(process.stderr.write(`
|
|
5
|
-
rnx ${e} needs auth before it can check recording access.
|
|
6
|
-
|
|
7
|
-
pick one:
|
|
8
|
-
\u2022 run \`rnx login\`
|
|
9
|
-
\u2022 set RNX_API_KEY=sk_rnx_... (recommended for CI)
|
|
10
|
-
|
|
11
|
-
`),i(1)),r.kind==="github"&&t.allowGitHubAuth)return;let o=await d(r,t.originOverride),n;try{n=await fetch(`${o}/api/sootsim/billing/subscription`,{headers:{authorization:u(r)}})}catch(s){process.stderr.write(`
|
|
12
|
-
rnx ${e} couldn't verify recording access.
|
|
13
|
-
${s instanceof Error?s.message:String(s)}
|
|
14
|
-
|
|
15
|
-
`),i(1)}if(n.status===401&&(process.stderr.write(`
|
|
16
|
-
rnx ${e} couldn't verify recording access with the current auth against ${o}.
|
|
17
|
-
sign in again for that origin, or provide a valid RNX_API_KEY.
|
|
18
|
-
|
|
19
|
-
`),i(1)),!n.ok){let s=await n.text().catch(()=>"");process.stderr.write(`
|
|
20
|
-
rnx ${e} couldn't verify recording access (${n.status}).
|
|
21
|
-
${s||"unexpected billing response"}
|
|
22
|
-
|
|
23
|
-
`),i(1)}let a=await n.json();if(a.entitlements?.desktopRecording===!0)return;let g=a.plan??"free";process.stderr.write(`
|
|
24
|
-
rnx ${e} recording requires Personal, Team, or an active trial.
|
|
25
|
-
current plan: ${g}.
|
|
26
|
-
free keeps basic 3d mode; the trial unlocks the full Personal surface.
|
|
27
|
-
|
|
28
|
-
`),i(1)}export{x as a};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),o=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},l=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=h(b,d))||f.enumerable});return a};var p=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c,p as d};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{c as r,d as g,e as f,f as v}from"./chunk-MGALNF2F.js";import"./chunk-7R2TK2NY.js";import"./chunk-CE4JQJ6Y.js";import"./chunk-QRDF33WD.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";var $={"browser-cache":"browser caches","camera-fixture":"staged camera fixture videos",recording:"recordings and captured frames","runtime-archive":"downloaded runtime archives","runtime-version":"inactive runtime versions"};function y(s){let i=new Map;for(let o of s){let n=i.get(o.kind)??{bytes:0,count:0};n.bytes+=o.bytes,n.count++,i.set(o.kind,n)}return[...i].sort((o,n)=>n[1].bytes-o[1].bytes).map(([o,n])=>` ${$[o]}: ${r(n.bytes)} (${n.count} ${n.count===1?"item":"items"})`)}function h(){console.log(`
|
|
5
|
-
rnx cleanup \u2014 inspect and reclaim local rnx disk usage
|
|
6
|
-
|
|
7
|
-
usage:
|
|
8
|
-
rnx cleanup
|
|
9
|
-
rnx cleanup --apply
|
|
10
|
-
rnx cleanup --aggressive
|
|
11
|
-
rnx cleanup --apply --aggressive
|
|
12
|
-
|
|
13
|
-
The default is a read-only preview. --apply removes downloaded runtime archives,
|
|
14
|
-
old runtimes outside a two-version rollback window, and disposable browser
|
|
15
|
-
caches. It never removes the active runtime, a runtime serving a connected
|
|
16
|
-
simulator, cookies, localStorage, IndexedDB, service workers, or other persistent
|
|
17
|
-
app storage.
|
|
18
|
-
|
|
19
|
-
--aggressive additionally removes the rollback runtime plus user-created
|
|
20
|
-
recordings and captured frames. It still preserves the active runtime and app storage.
|
|
21
|
-
`)}async function S(s){if(s.length===1&&s[0]==="--automatic-worker")try{let e=v();return e.status==="complete"?process.stderr.write(e.reclaimedBytes>0?` rnx automatic cleanup reclaimed ${r(e.reclaimedBytes)}; active runtimes and app data were kept.
|
|
22
|
-
`:` rnx automatic cleanup found no obsolete local data.
|
|
23
|
-
`):e.status==="deferred"&&process.stderr.write(` rnx automatic cleanup reclaimed ${r(e.reclaimedBytes)}; ${r(e.deferredInUseBytes)} is in use and will be retried on a later run.
|
|
24
|
-
`),0}catch(e){return process.stderr.write(` rnx automatic cleanup will retry on the next run: ${e instanceof Error?e.message:String(e)}
|
|
25
|
-
`),0}if(s.includes("--help")||s.includes("-h"))return h(),0;let i=new Set(["--aggressive","--apply"]),o=s.find(e=>!i.has(e));if(o)return console.error(` cleanup: unknown option ${o}`),h(),1;let n=s.includes("--aggressive"),l=s.includes("--apply"),t=g({aggressive:n}),c=t.entries.filter(e=>e.selected).filter(e=>e.state==="safe"),u=t.entries.filter(e=>e.state==="aggressive"&&e.selected),d=t.entries.filter(e=>e.state==="in-use"),m=d.filter(e=>e.kind==="browser-cache"),w=d.filter(e=>e.kind==="runtime-version"),p=t.entries.find(e=>e.kind==="runtime-version"&&e.state==="aggressive");console.log(` rnx data home: ${t.home}`),console.log(` current size: ${r(t.totalBytes)}`),console.log(` active runtime: ${t.activeRuntime??"(none installed)"}`),console.log(""),console.log(l?" safe items selected for removal:":" safe to reclaim:");for(let e of y(c))console.log(e);if(c.length===0&&console.log(" nothing"),u.length>0){console.log(""),console.log(" aggressive additions:");for(let e of y(u))console.log(e)}console.log(""),console.log(" protected:"),t.activeRuntime&&console.log(` active runtime ${t.activeRuntime} (in use)`);for(let e of w)console.log(` running daemon runtime ${e.path}`);if(p&&!n&&console.log(` rollback runtime ${p.path}`),console.log(" cookies, localStorage, IndexedDB, service workers, and profile data"),n||console.log(" recordings and captured frames (use --aggressive to remove)"),m.length>0&&console.log(` ${r(m.reduce((e,b)=>e+b.bytes,0))} of browser cache is open; close rnx and rerun cleanup`),console.log(""),console.log(` reclaimable now: ${r(t.reclaimableBytes)}`),!l)return console.log(` preview only \u2014 run \`rnx cleanup --apply${n?" --aggressive":""}\` to remove these items`),0;let a=f({aggressive:n});return console.log(` removed ${a.removedPaths.length} ${a.removedPaths.length===1?"item":"items"}; reclaimed ${r(a.reclaimedBytes)}`),console.log(` remaining rnx data: ${r(a.remainingBytes)}`),0}export{S as runCleanup};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a}from"./chunk-XSVILA4Z.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";export{a as getCliVersion};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{d,g as m,i as w,j as y}from"./chunk-PAJTUK33.js";import"./chunk-ZSSG7OR7.js";import{existsSync as $,readFileSync as O}from"node:fs";import{dirname as E,join as V,relative as M,resolve as j}from"node:path";import{existsSync as a,readFileSync as g,readdirSync as R,statSync as C}from"fs";import{basename as N,dirname as J,join as c}from"path";var b=["ts","js","cjs","mjs","mts","cts"];function v(e){let n=e;for(;;){if(a(c(n,"turbo.json"))||a(c(n,"nx.json"))||a(c(n,"lerna.json"))||a(c(n,"pnpm-workspace.yaml")))return n;let t=c(n,"package.json");if(a(t))try{if(JSON.parse(g(t,"utf8")).workspaces)return n}catch{}let s=J(n);if(s===n)break;n=s}return e}function T(e){return a(c(e,"bun.lock"))||a(c(e,"bun.lockb"))?"bun":a(c(e,"pnpm-lock.yaml"))?"pnpm":a(c(e,"yarn.lock"))?"yarn":"npm"}function F(e){if(a(c(e,"turbo.json")))return"turbo";if(a(c(e,"nx.json")))return"nx";if(a(c(e,"pnpm-workspace.yaml")))return"pnpm";let n=c(e,"package.json");if(a(n))try{if(JSON.parse(g(n,"utf8")).workspaces)return"npm-workspaces"}catch{}return"single"}function W(e){return e.one?"one":e.expo?"expo":e["react-native"]?"bare":"unknown"}function h(e){let n=c(e,"package.json");if(!a(n))return null;let t;try{t=JSON.parse(g(n,"utf8"))}catch{return null}let s={...t.dependencies,...t.devDependencies},r=W(s);return r==="unknown"?null:{dir:e,name:t.name||N(e),framework:r,hasViteConfig:b.some(o=>a(c(e,`vite.config.${o}`))),hasMetroConfig:b.some(o=>a(c(e,`metro.config.${o}`))),devCommand:t.scripts?.dev||null}}function A(e){let n=[],t=c(e,"pnpm-workspace.yaml");if(a(t)){let o=g(t,"utf8").match(/packages:\s*\n((?:\s+-\s+.+\n?)+)/);if(o){let i=o[1].split(`
|
|
5
|
-
`).filter(Boolean);for(let f of i){let p=f.replace(/^\s*-\s*['"]?/,"").replace(/['"]?\s*$/,"");p&&n.push(...P(e,p))}}return n}let s=c(e,"package.json");if(a(s))try{let r=JSON.parse(g(s,"utf8")),o=Array.isArray(r.workspaces)?r.workspaces:r.workspaces?.packages||[];for(let i of o)n.push(...P(e,i))}catch{}return n}function P(e,n){let t=n.replace(/\/\*\*?$/,"").replace(/\*$/,""),s=c(e,t);if(!a(s))return[];try{return R(s).map(o=>c(s,o)).filter(o=>{try{return C(o).isDirectory()&&a(c(o,"package.json"))}catch{return!1}})}catch{return[]}}function S(e){let n=F(e),t=T(e);if(n==="single"){let i=h(e);return{root:e,type:n,packageManager:t,apps:i?[i]:[]}}let s=A(e),r=[],o=h(e);o&&r.push(o);for(let i of s){if(i===e)continue;let f=h(i);f&&r.push(f)}return{root:e,type:n,packageManager:t,apps:r}}async function z(e){if(e.includes("--help")||e.includes("-h")){console.log(`
|
|
6
|
-
rnx compat \u2014 check package compatibility
|
|
7
|
-
|
|
8
|
-
usage:
|
|
9
|
-
rnx compat [package-name]
|
|
10
|
-
rnx compat --json
|
|
11
|
-
rnx compat --brief
|
|
12
|
-
|
|
13
|
-
flags:
|
|
14
|
-
--json machine-readable output
|
|
15
|
-
--brief one-line summary
|
|
16
|
-
--app <dir> target directory (default: cwd)
|
|
17
|
-
`);return}let n=e.indexOf("--app"),t=n>=0&&e[n+1]?j(e[n+1]):process.cwd(),s=e.find((p,l)=>!p.startsWith("-")&&(n<0||l!==n+1)),r=D(t);if(!r){console.error(` no package.json found in ${t}`),process.exitCode=1;return}if(s){k(e,_(t,r,s));return}let o=d(x(t,r));if(o.packages.length>0||n>=0){k(e,o);return}let i=v(t),f=S(i).apps.flatMap(p=>{if(j(p.dir)===t)return[];let l=D(p.dir);if(!l)return[];let u=d(x(p.dir,l));return u.packages.length>0?[{dir:p.dir,result:u}]:[]});if(f.length===1){let p=f[0];console.log(`
|
|
18
|
-
scanning ${M(t,p.dir)||"."}`),k(e,p.result);return}if(f.length>1){console.log(`
|
|
19
|
-
this workspace has more than one app. scan one with --app:`);for(let p of f)console.log(` rnx compat --app ${M(t,p.dir)}`);console.log();return}k(e,o)}function k(e,n){if(e.includes("--json")){console.log(JSON.stringify(n,null,2));return}if(e.includes("--brief")){console.log(` ${m(n)}`),console.log(` ${y}`);return}console.log(`
|
|
20
|
-
rnx compatibility report`),console.log(` ${m(n)}
|
|
21
|
-
`);for(let r of w(n))console.log(` ${r}`);let t=n.packages.filter(r=>r.status==="full").length;t>0&&console.log(` supported: ${t} packages`);let s=n.packages.filter(r=>r.status==="not-relevant").length;s>0&&console.log(` not relevant at runtime: ${s} packages`),n.packages.length===0&&console.log(" no React Native ecosystem packages detected"),console.log(`
|
|
22
|
-
${y}
|
|
23
|
-
`)}function x(e,n){let t=(r,o)=>{let i=e;for(;;){let f=V(i,"node_modules",r,"package.json");if($(f)){try{let l=JSON.parse(O(f,"utf8"));if(l&&typeof l=="object"&&"version"in l){let u=l.version;if(typeof u=="string")return u}}catch{}return o}let p=E(i);if(p===i)return o;i=p}},s=r=>r&&Object.fromEntries(Object.entries(r).map(([o,i])=>[o,t(o,i)]));return{name:n.name,dependencies:s(n.dependencies),devDependencies:s(n.devDependencies)}}function D(e){let n=j(e,"package.json");if(!$(n))return null;let t=JSON.parse(O(n,"utf8"));return t&&typeof t=="object"?t:null}function _(e,n,t){let s=x(e,n),r=s.dependencies?.[t]??s.devDependencies?.[t]??"*";return d({dependencies:{[t]:r}})}export{z as runCompat};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{c as r}from"./chunk-TH2UFGVP.js";import{F as i,G as s,z as t}from"./chunk-QRDF33WD.js";import"./chunk-ZSSG7OR7.js";function f(){let e=i(),n=e.configured&&e.productAnalytics;console.log(` bounded diagnostics are ${n?"ON":"OFF"}`),console.log(" permitted fields: package name/version/unsupported API or error class"),console.log(` config: ${t()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function c(e){let n=e.find(o=>!o.startsWith("-"))?.toLowerCase();switch(n){case void 0:case"status":f();return;case"on":s({productAnalytics:!0,crashReports:!1}),console.log(" bounded diagnostics ON"),console.log(` config: ${t()}`);return;case"off":s({productAnalytics:!1,crashReports:!1}),console.log(" bounded diagnostics OFF"),console.log(` config: ${t()}`);return;default:console.error(` unknown telemetry action: ${n}`),console.error(" usage: rnx config telemetry [on|off|status]"),r(1)}}function l(){console.log(`
|
|
5
|
-
rnx config \u2014 manage local CLI preferences
|
|
6
|
-
|
|
7
|
-
usage:
|
|
8
|
-
rnx config telemetry [on|off|status]
|
|
9
|
-
|
|
10
|
-
environment:
|
|
11
|
-
SOOTSIM_HINTS=off suppress CLI hints
|
|
12
|
-
SOOTSIM_HINTS=always show every CLI hint every time
|
|
13
|
-
`)}async function p(e){if(e.includes("--help")||e.includes("-h")){l();return}let n=e.find(o=>!o.startsWith("-"));if(n==="telemetry"){let o=e.indexOf(n);await c([...e.slice(0,o),...e.slice(o+1)]);return}console.error(` unknown config command: ${n??"(missing)"}`),l(),r(1)}export{p as runConfig};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{b as s,i as p}from"./chunk-MFIQTWC5.js";import"./chunk-KMNVDZZI.js";import"./chunk-YTXY3MHW.js";import"./chunk-QELIC5XP.js";import"./chunk-CSJ7L7ZL.js";import{g as f,n as a,u as d}from"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-QRDF33WD.js";import"./chunk-ZSSG7OR7.js";function g(c,i,o){let e=c.filter(n=>n.readyState==="open");if(i){let n=e.find(r=>r.id===i);if(!n)throw new s(`no sim connected with id ${i} on bridge :${o}`+(e.length?` \u2014 connected: ${e.map(r=>r.id).join(", ")}`:" \u2014 no sims connected; open one with `rnx open <port>`"));return n}let t=f();if(t){let n=e.find(r=>r.id===t);if(n)return n}let m=e.find(n=>n.isPrimary)??e[0];if(!m)throw new s(`no sims connected on bridge :${o} \u2014 open one with \`rnx open <port>\``);return m}async function S(c={}){let i=c.port??a().bridgePort,o=c.timeoutMs??15e3,e=d(i,{commandTimeoutMs:o,cliLabel:"sdk"}),t;try{t=g(await e.listSims(),c.sim,i)}catch(n){if(e.close(),n instanceof s)throw n;let r=n instanceof Error?n.message:String(n);throw new s(`${r} \u2014 is the rnx daemon or dev shell running?`)}e.close();let m=d(i,{commandTimeoutMs:o,cliLabel:"sdk",simId:t.id,simIdSource:"flag"});return new p(m,t.id,{commandTimeoutMs:o})}export{S as connect};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x}from"./chunk-4TQ5HOK3.js";import"./chunk-KJE2O2GK.js";import"./chunk-GDKMOIUT.js";import"./chunk-UYVXALPB.js";import"./chunk-VWCNJPCJ.js";import"./chunk-XUTJ7ZWD.js";import"./chunk-P6KVGV3H.js";import"./chunk-DCS5FK5N.js";import"./chunk-TZUABDIJ.js";import"./chunk-QELIC5XP.js";import"./chunk-CSJ7L7ZL.js";import"./chunk-DNPQMTW5.js";import"./chunk-TLP3T3VO.js";import"./chunk-FVZBGPCU.js";import"./chunk-GZE57ORL.js";import"./chunk-DOVBJBVD.js";import"./chunk-DGJMIVZM.js";import"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-TH2UFGVP.js";import"./chunk-7R2TK2NY.js";import"./chunk-CE4JQJ6Y.js";import"./chunk-W3FNXAQP.js";import"./chunk-QRDF33WD.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";export{d as applyRuntimeGenerationOrigin,h as buildOpenUrl,g as buildShellUrl,v as closeSimsBulk,b as ensureBridgeForOpen,w as planBulkCloseTargets,m as playwrightHostPidForSim,j as printConnectedSims,p as printOpenedSim,c as resolveBundleTarget,e as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,f as resolveShellBaseUrlForBridgePort,u as runClaimCommand,x as runCloseCommand,t as runFocusCommand,q as runLinkCommand,r as runOpenCommand,s as runUseCommand,n as signalDriverLaunchConnected,i as summarizeSimUrl,o as terminatePlaywrightHostsForSims,k as waitForSimMatch,l as waitForSimMatchOrHostExit};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a,b,c,d,e,f}from"./chunk-VZIK4WIS.js";import"./chunk-LC3QRIRB.js";import"./chunk-MLBZZHOY.js";import"./chunk-VQDYFFIG.js";import"./chunk-TEESPOYR.js";import"./chunk-DOVBJBVD.js";import"./chunk-DGJMIVZM.js";import"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-TH2UFGVP.js";import"./chunk-AFOVILIL.js";import"./chunk-QRDF33WD.js";import"./chunk-XSVILA4Z.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,e as teardownDaemonService,d as teardownLegacyMacDaemonArtifacts,f as teardownSootsimHome};
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{f as b,m as I}from"./chunk-TZUABDIJ.js";import{I as O,J as T,K as C,L as R,M as A}from"./chunk-CSJ7L7ZL.js";import{t as S,v as N,x as D}from"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import{b as _,c as u}from"./chunk-TH2UFGVP.js";import"./chunk-QRDF33WD.js";import"./chunk-ZSSG7OR7.js";var L=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],H="__sootsimShellAnimationTrace",z="__sootsimDebugAnimation";function E(){console.log(`
|
|
5
|
-
rnx debug \u2014 drive __sootsimDebug from the terminal
|
|
6
|
-
|
|
7
|
-
usage:
|
|
8
|
-
rnx debug <subcommand> [args]
|
|
9
|
-
|
|
10
|
-
subcommands:
|
|
11
|
-
enable <channels> turn on one or more debug channels
|
|
12
|
-
channels: ${L.slice(0,-1).join(", ")}
|
|
13
|
-
or 'all' for every channel
|
|
14
|
-
disable <channels> turn off one or more debug channels (or 'all')
|
|
15
|
-
toggle <channel> flip a single channel
|
|
16
|
-
status list currently-enabled channels
|
|
17
|
-
channels list every known channel name
|
|
18
|
-
flags print the full DEBUG flag object
|
|
19
|
-
|
|
20
|
-
state <kind> ... dump raw runtime state (diagnostic \u2014 not a getter)
|
|
21
|
-
kinds: shell, worker, keyboard, node <id>,
|
|
22
|
-
scroll <id>, scroll-hit <x> <y>,
|
|
23
|
-
hit <x> <y>, gesture <x> <y>
|
|
24
|
-
|
|
25
|
-
js <code> execute javascript in the running app. SootSim
|
|
26
|
-
is the canonical state object \u2014 reach into its
|
|
27
|
-
bridges / state / chrome / debug slots directly.
|
|
28
|
-
e.g. SootSim.bridges.test.findByText("Sign in")
|
|
29
|
-
eval <code> alias for js
|
|
30
|
-
perf <sub> shell frame profiling: start, stop, transition
|
|
31
|
-
memory [--watch [s]] per-worker object counts + heaps; --watch samples
|
|
32
|
-
every --interval seconds and reports slopes
|
|
33
|
-
sample-color <...> sample averaged color from canvas (same flags as
|
|
34
|
-
screenshot)
|
|
35
|
-
|
|
36
|
-
snapshot [label] capture a tree snapshot (layout + transform + opacity)
|
|
37
|
-
snapshots list taken snapshot labels
|
|
38
|
-
diff <a> <b> compare two snapshots by label
|
|
39
|
-
clear-snapshots [label] drop a snapshot (or all if no label given)
|
|
40
|
-
|
|
41
|
-
image-audit for every image the compositor actually drew, the
|
|
42
|
-
source pixels it landed on each device pixel. a row
|
|
43
|
-
whose shortfall is well under 1.0 is an image the
|
|
44
|
-
pipeline under-resolved; 0.5 is half resolution.
|
|
45
|
-
flags: --min <ratio> (default 0.98), --all, --json
|
|
46
|
-
exits 1 when any image is under the ratio, and 2 when
|
|
47
|
-
the audit observed no image draws at all
|
|
48
|
-
|
|
49
|
-
find sheets dump Sheet.Frame-shaped nodes currently in the tree
|
|
50
|
-
find portals dump portal-host / portal-view nodes
|
|
51
|
-
find boundaries dump live paint boundaries (+ why scroll rows were
|
|
52
|
-
rejected from the auto-retained raster tier)
|
|
53
|
-
|
|
54
|
-
trace shell [cmd] opt-in shell animation trace
|
|
55
|
-
cmds: on [limit], off, status, clear, [recentLimit]
|
|
56
|
-
trace anim <sub> opt-in per-tick animation value trace
|
|
57
|
-
subs: on <id|all> [limit], off [id|all],
|
|
58
|
-
status, clear, <id> [limit]
|
|
59
|
-
record [on|off] toggle event ring buffer recording
|
|
60
|
-
recent [channel] [n] last N events (default 50), optionally filtered
|
|
61
|
-
clear-events clear the event ring buffer
|
|
62
|
-
|
|
63
|
-
options:
|
|
64
|
-
--port <port> WS bridge port (default: ${7668})
|
|
65
|
-
--sim <sim> target a specific connected sim
|
|
66
|
-
--pretty format JSON output for humans (default)
|
|
67
|
-
--json compact JSON output for pipelines
|
|
68
|
-
|
|
69
|
-
examples:
|
|
70
|
-
rnx debug enable sheets,portals
|
|
71
|
-
rnx debug snapshot before
|
|
72
|
-
rnx debug snapshot after
|
|
73
|
-
rnx debug diff before after
|
|
74
|
-
rnx debug image-audit per-image source pixels per device pixel
|
|
75
|
-
rnx debug find sheets | jq '.[] | select(.translateY != null)'
|
|
76
|
-
rnx debug trace shell on 240
|
|
77
|
-
rnx debug trace shell 120
|
|
78
|
-
rnx debug trace anim on 3 240
|
|
79
|
-
rnx debug trace anim 3 60
|
|
80
|
-
`)}function B(t){return t?t.split(",").map(a=>a.trim()).filter(Boolean):[]}function i(t,a){return t===void 0?"":JSON.stringify(t,null,a?2:0)}function x(t,a=240){let d=Number.isFinite(a)&&a>0?Math.max(1,Math.round(a)):240,g=JSON.stringify(H),p=JSON.stringify(z);return t==="on"?`(() => {
|
|
81
|
-
const root = window
|
|
82
|
-
const store = root[${g}] || (root[${g}] = {
|
|
83
|
-
enabled: false,
|
|
84
|
-
limit: ${d},
|
|
85
|
-
seq: 0,
|
|
86
|
-
samples: [],
|
|
87
|
-
prevHook: undefined,
|
|
88
|
-
hook: undefined,
|
|
89
|
-
})
|
|
90
|
-
store.limit = ${d}
|
|
91
|
-
store.enabled = true
|
|
92
|
-
const currentHook = root[${p}]
|
|
93
|
-
if (store.hook !== currentHook) {
|
|
94
|
-
store.prevHook = typeof currentHook === 'function' ? currentHook : undefined
|
|
95
|
-
}
|
|
96
|
-
if (typeof store.hook !== 'function') {
|
|
97
|
-
store.hook = (sample) => {
|
|
98
|
-
const target = root[${g}]
|
|
99
|
-
if (!target || target.enabled !== true) return
|
|
100
|
-
const samples = Array.isArray(target.samples) ? target.samples : (target.samples = [])
|
|
101
|
-
target.seq = typeof target.seq === 'number' ? target.seq + 1 : 1
|
|
102
|
-
samples.push({ seq: target.seq, ...sample })
|
|
103
|
-
if (samples.length > target.limit) {
|
|
104
|
-
samples.splice(0, samples.length - target.limit)
|
|
105
|
-
}
|
|
106
|
-
if (typeof target.prevHook === 'function') {
|
|
107
|
-
try {
|
|
108
|
-
target.prevHook(sample)
|
|
109
|
-
} catch {}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
root[${p}] = store.hook
|
|
114
|
-
return {
|
|
115
|
-
enabled: true,
|
|
116
|
-
limit: store.limit,
|
|
117
|
-
count: Array.isArray(store.samples) ? store.samples.length : 0,
|
|
118
|
-
}
|
|
119
|
-
})()`:t==="off"?`(() => {
|
|
120
|
-
const root = window
|
|
121
|
-
const store = root[${g}]
|
|
122
|
-
if (!store) return { enabled: false, limit: 0, count: 0 }
|
|
123
|
-
store.enabled = false
|
|
124
|
-
if (root[${p}] === store.hook) {
|
|
125
|
-
root[${p}] = typeof store.prevHook === 'function' ? store.prevHook : undefined
|
|
126
|
-
}
|
|
127
|
-
return {
|
|
128
|
-
enabled: false,
|
|
129
|
-
limit: typeof store.limit === 'number' ? store.limit : 0,
|
|
130
|
-
count: Array.isArray(store.samples) ? store.samples.length : 0,
|
|
131
|
-
}
|
|
132
|
-
})()`:t==="clear"?`(() => {
|
|
133
|
-
const store = window[${g}]
|
|
134
|
-
if (!store) return { cleared: true, count: 0 }
|
|
135
|
-
store.samples = []
|
|
136
|
-
store.seq = 0
|
|
137
|
-
return {
|
|
138
|
-
cleared: true,
|
|
139
|
-
enabled: store.enabled === true,
|
|
140
|
-
limit: typeof store.limit === 'number' ? store.limit : 0,
|
|
141
|
-
count: 0,
|
|
142
|
-
}
|
|
143
|
-
})()`:`(() => {
|
|
144
|
-
const store = window[${g}]
|
|
145
|
-
return {
|
|
146
|
-
enabled: !!store?.enabled,
|
|
147
|
-
limit: typeof store?.limit === 'number' ? store.limit : 0,
|
|
148
|
-
count: Array.isArray(store?.samples) ? store.samples.length : 0,
|
|
149
|
-
}
|
|
150
|
-
})()`}function J(t=50){let a=Number.isFinite(t)&&t>0?Math.max(1,Math.round(t)):50;return`(() => {
|
|
151
|
-
const store = window[${JSON.stringify(H)}]
|
|
152
|
-
const all = Array.isArray(store?.samples) ? store.samples : []
|
|
153
|
-
const samples = all.slice(-${a})
|
|
154
|
-
const first = samples[0] ?? null
|
|
155
|
-
const last = samples[samples.length - 1] ?? null
|
|
156
|
-
const uniquePhases = [...new Set(samples.map((sample) => sample?.phase).filter(Boolean))]
|
|
157
|
-
const metricRange = (key) => {
|
|
158
|
-
const values = samples
|
|
159
|
-
.map((sample) => (typeof sample?.[key] === 'number' ? sample[key] : null))
|
|
160
|
-
.filter((value) => value != null)
|
|
161
|
-
if (values.length === 0) return null
|
|
162
|
-
return {
|
|
163
|
-
min: Math.min(...values),
|
|
164
|
-
max: Math.max(...values),
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return {
|
|
168
|
-
enabled: !!store?.enabled,
|
|
169
|
-
limit: typeof store?.limit === 'number' ? store.limit : 0,
|
|
170
|
-
count: samples.length,
|
|
171
|
-
total: all.length,
|
|
172
|
-
summary: first && last ? {
|
|
173
|
-
durationMs: last.ts - first.ts,
|
|
174
|
-
phases: uniquePhases,
|
|
175
|
-
start: first,
|
|
176
|
-
end: last,
|
|
177
|
-
zoomLevel: metricRange('zoomLevel'),
|
|
178
|
-
horizontalZoom: metricRange('horizontalZoom'),
|
|
179
|
-
launchProgress: metricRange('launchProgress'),
|
|
180
|
-
dismissOffsetY: metricRange('dismissOffsetY'),
|
|
181
|
-
} : null,
|
|
182
|
-
samples,
|
|
183
|
-
}
|
|
184
|
-
})()`}async function m(t,a){return D(t,a)}function V(t,a){let d=t.indexOf(a);if(d<0)return null;let g=Number(t[d+1]);return Number.isFinite(g)?g:null}async function W(t){await m(t,"window.__sootsimCompositor.getStats(false, false, undefined, 'enable').then(() => 'enabled')"),await t.send({type:"screenshot"});let d=(await m(t,"window.__sootsimCompositor.getStats(false, false, undefined, 'disable').then((s) => ({ imageAudit: s.imageAudit }))"))?.imageAudit;if(!d)throw new Error("compositor returned no image audit");return d}function F(t){return t===null?" - ":t.toFixed(3).padStart(6)}function K(t){let a=t.sourceUri??t.testID??`node ${t.nodeId}`;return a.length<=58?a:`...${a.slice(-55)}`}function G(t,a,d){let p=t.rows.filter(c=>c.shortfall!==null).filter(c=>c.shortfall<d);if(console.log(` ${t.rows.length} images drawn (${t.draws} draws), ${p.length} below ${d} of what their source could deliver`),console.log(` sampling: mipmapped ${t.samplingCounts.mipmapped} \xB7 cubic ${t.samplingCounts.cubic} \xB7 repeat ${t.samplingCounts.repeat} \xB7 none ${t.samplingCounts.none}`),a.length===0){console.log(" every image delivered its source resolution");return}console.log(""),console.log(" short eff decoded source needed(dev) dest(pt) dpr image");for(let c of a){let $=`${c.decoded.width}x${c.decoded.height}`.padEnd(11),r=(c.vector?"vector":c.intrinsic?`${c.intrinsic.width}x${c.intrinsic.height}`:"?").padEnd(11),y=`${Math.round(c.needed.width)}x${Math.round(c.needed.height)}`.padEnd(12),v=`${Math.round(c.destination.width)}x${Math.round(c.destination.height)}`.padEnd(9);console.log(` ${F(c.shortfall)} ${F(c.effective.width)} ${$} ${r} ${y} ${v} ${c.dpr.toFixed(1)} ${K(c)}`)}}async function ne(t,a){let d=S(t,{port:a.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),g=d.positional;(!g[0]||t.includes("--help")||t.includes("-h"))&&(E(),u(0));let c=d.wsPort,$=d.simId,r=!t.includes("--json"),y=$?` --sim ${$}`:"",v=g[0],l=g.slice(1);if(new Set(["state","js","perf","memory","sample-color"]).has(v)){let{runInspect:e}=await import("./inspect-JF5WYJRD.js");await e(["debug",...t],{port:a.port,verbose:a.verbose});return}let o=N(d);try{switch(v){case"enable":{let e=B(l[0]);e.length===0&&(console.error(` usage: rnx debug enable <channel[,channel,...]>
|
|
185
|
-
known: ${L.join(", ")}`),u(1));let n=await A(o,"enable",e);console.log(i({active:n},r));break}case"disable":{let e=B(l[0]),n=await A(o,"disable",e);console.log(i({active:n},r));break}case"toggle":{let e=l[0];e||(console.error(" usage: rnx debug toggle <channel>"),u(1));let n=await m(o,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(i({[e]:n},r));break}case"status":{let e=await O(o);console.log(i(e,r));break}case"channels":{let e=await m(o,"window.__sootsimDebug.channels()");console.log(i(e,r));break}case"flags":{let e=await T(o);console.log(i(e,r));break}case"snapshot":{let e=l[0],n=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await m(o,`(() => { const s = ${n}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(i(s,r));break}case"snapshots":{let e=await m(o,"window.__sootsimDebug.snapshots()");console.log(i(e,r));break}case"diff":{let e=l[0],n=l[1];(!e||!n)&&(console.error(" usage: rnx debug diff <labelA> <labelB>"),u(1));let s=`(() => {
|
|
186
|
-
const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(n)});
|
|
187
|
-
if (!d) return null;
|
|
188
|
-
return {
|
|
189
|
-
a: d.a,
|
|
190
|
-
b: d.b,
|
|
191
|
-
counts: { added: d.added.length, removed: d.removed.length, changed: d.changed.length },
|
|
192
|
-
added: d.added,
|
|
193
|
-
removed: d.removed,
|
|
194
|
-
changed: d.changed,
|
|
195
|
-
};
|
|
196
|
-
})()`,f=await m(o,s);console.log(i(f,r));break}case"clear-snapshots":{let e=l[0],n=e?`window.__sootsimDebug.clearSnapshots(${JSON.stringify(e)})`:"window.__sootsimDebug.clearSnapshots()";await m(o,n),console.log(i({cleared:e||"all"},r));break}case"image-audit":{let e=V(t,"--min")??.98,n=await W(o);n.draws===0&&(console.error(` the audit recorded zero image draws, so an empty result proves nothing.
|
|
197
|
-
while it records, paint boundaries rebuild and raster blits are
|
|
198
|
-
bypassed, so every image on screen should reach the draw path.
|
|
199
|
-
zero draws means either nothing on screen is an image, or the audit
|
|
200
|
-
is not attached to the surface that paints.`),u(2));let s=n.rows.filter(f=>f.shortfall!==null&&f.shortfall<e);r?G(n,t.includes("--all")?n.rows:s,e):console.log(i({...n,minimum:e,under:s.length},!1)),s.length>0&&u(1);break}case"find":{let e=l[0];if(e==="sheets"||e==="portals"||e==="boundaries"){let n=await C(o,e);console.log(i(n,r))}else console.error(" usage: rnx debug find <sheets|portals|boundaries>"),u(1);break}case"trace":{let e=l[0],n=l[1];if(e==="anim"){let s=l[1];if((!s||s==="--help"||s==="-h")&&(console.error(" usage: rnx debug trace anim <on|off|status|clear|<id>> [id|limit]"),u(1)),s==="on"){let h=l[2]??"all",w=l[3]?Number(l[3]):void 0,k=h==="all"?"all":Number(h);k!=="all"&&!Number.isFinite(k)&&(console.error(` invalid target: ${h}`),u(1)),await b(o,"enableAnimationTrace",k,w);let q=await b(o,"listAnimationTraces");console.log(i({enabled:k,traces:q},r));break}if(s==="off"){let h=l[2]??"all",w=h==="all"?"all":Number(h);w!=="all"&&!Number.isFinite(w)&&(console.error(` invalid target: ${h}`),u(1)),await b(o,"disableAnimationTrace",w),console.log(i({disabled:w},r));break}if(s==="status"||s==="clear"){s==="clear"&&await b(o,"disableAnimationTrace","all");let h=await b(o,"listAnimationTraces");console.log(i({traces:h},r));break}let f=Number(s);Number.isFinite(f)||(console.error(` invalid id: ${s}`),u(1));let j=l[2]?Number(l[2]):void 0,M=await b(o,"getAnimationTrace",f,j);console.log(i({id:f,samples:M},r));break}if(e!=="shell"&&(console.error(" usage: rnx debug trace <shell|anim> [args]"),u(1)),!n||/^[0-9]+$/.test(n)){let s=n?Number(n):50,f=await m(o,J(s));console.log(i(f,r));break}if(n==="on"){let s=l[2]?Number(l[2]):240,f=await m(o,x("on",s));console.log(i(f,r));break}if(n==="off"){let s=await m(o,x("off"));console.log(i(s,r));break}if(n==="clear"){let s=await m(o,x("clear"));console.log(i(s,r));break}if(n==="status"){let s=await m(o,x("status"));console.log(i(s,r));break}console.error(" usage: rnx debug trace shell [on [limit]|off|status|clear|recentLimit]"),u(1)}case"record":{let e=l[0],s=await m(o,`window.__sootsimDebug.record(${e==="on"?"true":e==="off"?"false":"undefined"})`);console.log(i({recording:s},r));break}case"recent":{let e=l[0],n=l[1]?Number(l[1]):50,s=await R(o,e,n);console.log(i(s,r));break}case"clear-events":{await m(o,"window.__sootsimDebug.clearEvents()"),console.log(i({cleared:!0},r));break}default:console.error(` unknown subcommand: ${v}`),E(),u(1)}}catch(e){_(e),console.error(` debug failed: ${e.message}`),await I(o,{errorsCommand:`rnx get errors 5${y}`,warningsCommand:`rnx get warnings 5${y}`,requestsCommand:`rnx get requests 5${y}`}),u(1)}finally{o.close()}}export{ne as runDebug};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import"./chunk-DPBJ3S3J.js";import{a as m}from"./chunk-DEV3E3MV.js";import{a as f}from"./chunk-H3U56DKI.js";import{g as d}from"./chunk-4TQ5HOK3.js";import"./chunk-KJE2O2GK.js";import"./chunk-GDKMOIUT.js";import{a as u}from"./chunk-UYVXALPB.js";import{c as a}from"./chunk-VWCNJPCJ.js";import"./chunk-XUTJ7ZWD.js";import"./chunk-P6KVGV3H.js";import{a as l}from"./chunk-DCS5FK5N.js";import"./chunk-TZUABDIJ.js";import"./chunk-QELIC5XP.js";import"./chunk-CSJ7L7ZL.js";import"./chunk-DNPQMTW5.js";import"./chunk-TLP3T3VO.js";import"./chunk-FVZBGPCU.js";import"./chunk-GZE57ORL.js";import"./chunk-DOVBJBVD.js";import"./chunk-DGJMIVZM.js";import"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import{c as r}from"./chunk-TH2UFGVP.js";import"./chunk-7R2TK2NY.js";import"./chunk-CE4JQJ6Y.js";import{i as c}from"./chunk-BEU7CD7E.js";import"./chunk-W3FNXAQP.js";import"./chunk-QRDF33WD.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";function v(e){let t=e.indexOf("--port");if(t<0)return;let n=e[t+1],o=n?Number(n):Number.NaN;return(!Number.isInteger(o)||o<=0)&&(console.error(` invalid --port value: ${n||"(missing)"}`),r(1)),o}async function w(e,t){let n=v(e)??t.port;return n?d(String(n)):void 0}async function h(e,t){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
5
|
-
rnx desktop \u2014 launch the desktop companion
|
|
6
|
-
|
|
7
|
-
usage:
|
|
8
|
-
rnx desktop [options]
|
|
9
|
-
|
|
10
|
-
options:
|
|
11
|
-
--port <number> connect to running dev server on this port
|
|
12
|
-
--profile <id> launch with an isolated persistent storage profile
|
|
13
|
-
--ephemeral launch with a temporary isolated storage profile
|
|
14
|
-
|
|
15
|
-
examples:
|
|
16
|
-
rnx desktop
|
|
17
|
-
rnx desktop --port 5173
|
|
18
|
-
rnx desktop --profile qa
|
|
19
|
-
`),r(0));let n=e.find((k,p)=>e[p-1]==="--profile"),o=e.includes("--ephemeral");n&&o&&(console.error(" rnx desktop: --profile cannot be combined with --ephemeral"),r(1));let x=n?a(n).id:void 0,i=l();if(!i){if(m(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await c("run rnx desktop install now?",!0)){console.log();let{runInstallDesktop:p}=await import("./install-desktop-ZIC4CDXI.js");await p(["--yes"]),i=l()}i||r(1)}console.log(` launching ${i.path}`);let g=await w(e,t),s=await u.launch({url:g,device:t.device,profileId:x,ephemeralProfile:o});s.launched||(console.error(` ${s.message}`),r(1)),console.log(` ${s.message}`)}function b(){console.log(`
|
|
20
|
-
rnx desktop \u2014 launch or install the desktop companion
|
|
21
|
-
|
|
22
|
-
usage:
|
|
23
|
-
rnx desktop [options]
|
|
24
|
-
rnx desktop install [options]
|
|
25
|
-
|
|
26
|
-
options:
|
|
27
|
-
--port <number> connect to a running dev server on this port
|
|
28
|
-
--profile <id> launch with an isolated persistent storage profile
|
|
29
|
-
--ephemeral launch with a temporary isolated storage profile
|
|
30
|
-
-y, --yes install without prompting
|
|
31
|
-
`)}async function C(e,t){if(e.includes("--help")||e.includes("-h")){b();return}let n=e.find(o=>!o.startsWith("-"));if(n==="install"){let o=e.indexOf(n);await f([...e.slice(0,o),...e.slice(o+1)]);return}await h(e,t)}export{C as runDesktop};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{f as U}from"./chunk-R76BA7C7.js";import"./chunk-SK4M7NXT.js";import"./chunk-ZF7PVX44.js";import"./chunk-7VZZQQEE.js";import"./chunk-DEV3E3MV.js";import"./chunk-37MCSPTE.js";import"./chunk-CIE6CZXL.js";import{c as $,d as k,e as J}from"./chunk-UB2W6OQM.js";import{a as N}from"./chunk-JXAXYK7W.js";import"./chunk-SKMG5DD7.js";import"./chunk-KMNVDZZI.js";import"./chunk-YTXY3MHW.js";import"./chunk-4TQ5HOK3.js";import"./chunk-KJE2O2GK.js";import"./chunk-GDKMOIUT.js";import"./chunk-UYVXALPB.js";import"./chunk-VWCNJPCJ.js";import"./chunk-XUTJ7ZWD.js";import"./chunk-P6KVGV3H.js";import"./chunk-DCS5FK5N.js";import"./chunk-TZUABDIJ.js";import"./chunk-QELIC5XP.js";import"./chunk-CSJ7L7ZL.js";import"./chunk-DNPQMTW5.js";import"./chunk-TLP3T3VO.js";import"./chunk-FVZBGPCU.js";import"./chunk-GZE57ORL.js";import"./chunk-VQDYFFIG.js";import"./chunk-DOVBJBVD.js";import"./chunk-DGJMIVZM.js";import"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-LQMUA5IY.js";import{c as f}from"./chunk-TH2UFGVP.js";import"./chunk-HZLOYAPH.js";import"./chunk-AFOVILIL.js";import"./chunk-7R2TK2NY.js";import"./chunk-CE4JQJ6Y.js";import"./chunk-W3FNXAQP.js";import"./chunk-QRDF33WD.js";import{a as E}from"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";import{spawn as H}from"child_process";import{existsSync as T,mkdirSync as V,readFileSync as z,writeFileSync as I,unlinkSync as C}from"fs";import{createRequire as K}from"module";import{tmpdir as A}from"os";import{dirname as Q,resolve as a,join as y,relative as X}from"path";function Y(){try{let t=import.meta.resolve(`${E.packageName}/detox`);return Q(t.startsWith("file://")?t.slice(7):t)}catch{return a(import.meta.dirname,"..","..","detox")}}var Z=`
|
|
5
|
-
rnx detox \u2014 run detox-style tests against an rnx shell
|
|
6
|
-
|
|
7
|
-
usage:
|
|
8
|
-
rnx detox [testFiles...] run all tests under e2e/, test/e2e/, or detox/
|
|
9
|
-
rnx detox --config <path> use a specific jest config
|
|
10
|
-
rnx detox init scaffold sootsim-detox.config.cjs + sample test
|
|
11
|
-
rnx detox --watch jest watch mode
|
|
12
|
-
rnx detox --headed keep the rnx shell window visible
|
|
13
|
-
rnx detox -t <pattern> pass a jest --testNamePattern
|
|
14
|
-
rnx detox --no-launch skip auto-launching an rnx shell
|
|
15
|
-
|
|
16
|
-
rnx detox auto-launches an rnx shell if none is running on the
|
|
17
|
-
expected port. disable with --no-launch if you're managing the shell yourself.
|
|
18
|
-
`;async function xe(t,o={}){if((t.includes("--help")||t.includes("-h"))&&(console.log(Z),f(0)),t[0]==="init")return oe();let l=e=>{let s=t.indexOf(e);return s>=0?t[s+1]:void 0},n=e=>t.includes(e),u=n("--watch"),m=n("--headed"),d=n("--no-launch"),S=l("--config"),x=o.port||Number(process.env.SOOTSIM_PORT)||5173,L=t.filter((e,s)=>{if(e.startsWith("--")||e==="-t"||e==="-h")return!1;let i=t[s-1];return!(i==="--config"||i==="-t"||i==="--testNamePattern"||i==="--grep"||i==="--maxWorkers"||i==="--shard")}),W=t.flatMap((e,s)=>e==="--runInBand"||e.startsWith("--maxWorkers=")||e.startsWith("--shard=")?[e]:(e==="--maxWorkers"||e==="--shard")&&t[s+1]?[e,t[s+1]]:[]),j=["e2e","test/e2e","detox"],c=process.env.SOOTSIM_TEST_DIR?a(process.cwd(),process.env.SOOTSIM_TEST_DIR):null;if(!c)for(let e of j){let s=a(process.cwd(),e);if(T(s)){c=s;break}}c||(console.error(` error: no detox tests found. expected one of: ${j.join(", ")}
|
|
19
|
-
run 'rnx detox init' to scaffold a starter suite.`),f(1)),d||await se(x);let r=["jest"],h=S||te(["sootsim-detox.config.cjs","jest.config.cjs","jest.config.js"]),p=null;if(h)r.push("--config",a(process.cwd(),h));else{let e=a(Y(),"jest-preset.cjs");p=y(A(),`sootsim-detox-${process.pid}.config.cjs`);let s={rootDir:c,roots:["<rootDir>"],testMatch:["<rootDir>/**/*.test.ts","<rootDir>/**/*.test.js"]};I(p,`module.exports = { ...require(${JSON.stringify(e)}), ...${JSON.stringify(s)} }
|
|
20
|
-
`),r.push("--config",p)}u&&r.push("--watch");let v=l("-t")||l("--testNamePattern")||l("--grep");v&&r.push("-t",v);let b=N(),R=!u&&$({uploadedShare:!1,auth:b}),g=process.env.SOOTSIM_JEST_OUTPUT_FILE||null;process.env.SOOTSIM_JEST_JSON==="1"&&r.push("--json"),process.env.SOOTSIM_JEST_OUTPUT_FILE?r.push("--outputFile",process.env.SOOTSIM_JEST_OUTPUT_FILE):R&&(g=y(A(),`sootsim-detox-results-${process.pid}.json`),r.push("--json","--outputFile",g)),r.push(...W),r.push(...L),console.log(" rnx detox"),console.log(` test dir: ${c}`),console.log(` port: ${x}${m?" (headed)":""}`),h&&console.log(` config: ${h}`);let _=process.env.CONFORMANCE_PROOF==="1"||!!process.env.CONFORMANCE_PROOF_DIR,G=_?"node":"npx",B=_?["--no-maglev",K(y(process.cwd(),"package.json")).resolve("jest/bin/jest"),...r.slice(1)]:r,O=H(G,B,{cwd:process.cwd(),stdio:"inherit",env:{...process.env,SOOTSIM_TEST_DIR:c,SOOTSIM_PORT:String(x),SOOTSIM_HEADED:m?"1":"",SOOTSIM_URL:process.env.SOOTSIM_URL||`http://localhost:${x}`}}),F=e=>()=>{O.kill(e)},P=F("SIGTERM"),D=F("SIGINT");process.on("SIGTERM",P),process.on("SIGINT",D);let q=Date.now(),w=await new Promise((e,s)=>{O.once("error",s),O.once("exit",(i,M)=>{if(M){console.error(` error: jest terminated by ${M}`),e(1);return}e(i??1)})});if(process.off("SIGTERM",P),process.off("SIGINT",D),p)try{C(p)}catch{}if(R){let e=g?ee(g):null,s=await J(),i=await k({origin:s,kind:"detox",name:X(process.cwd(),c)||"e2e",status:w===0?"passed":"failed",summary:e?`${e.numPassedTests}/${e.numTotalTests} tests passed`:null,failureMessage:w===0?null:e?.firstFailure??null,stepCount:e?.numTotalTests??null,failedStepIndex:e?.firstFailedIndex??null,durationMs:Date.now()-q,auth:b});i&&console.log(` run: ${i.id}`)}f(w)}function ee(t){try{let o=JSON.parse(z(t,"utf8")),l=null,n=null,u=0;for(let m of o.testResults??[])for(let d of m.testResults??[]){if(n==null&&d.status==="failed"){n=u;let S=d.failureMessages?.[0]?.split(`
|
|
21
|
-
`)[0];l=[d.fullName,S].filter(Boolean).join(": ")||null}u+=1}return typeof o.numTotalTests!="number"?null:{numTotalTests:o.numTotalTests,numPassedTests:o.numPassedTests??0,firstFailure:l,firstFailedIndex:n}}catch{return null}finally{if(!process.env.SOOTSIM_JEST_OUTPUT_FILE)try{C(t)}catch{}}}function te(t){for(let o of t)if(T(a(process.cwd(),o)))return o;return null}async function se(t){await U()||console.warn(` warn: no rnx shell reachable on :${t}. start your app, then run \`rnx open <app-port>\`
|
|
22
|
-
or pass --no-launch if you're managing the shell yourself.`)}function oe(){let t=process.cwd(),o=a(t,"sootsim-detox.config.cjs");T(o)?console.log(` skip: ${o} already exists`):(I(o,`// rnx detox jest config.
|
|
23
|
-
// extends the sootsim preset, which rewrites \`import ... from 'detox'\`
|
|
24
|
-
// to the sootsim driver and keeps your jest transforms intact.
|
|
25
|
-
|
|
26
|
-
/** @type {import('@jest/types').Config.InitialOptions} */
|
|
27
|
-
module.exports = {
|
|
28
|
-
preset: 'rnxsim/detox/jest-preset',
|
|
29
|
-
rootDir: __dirname,
|
|
30
|
-
testMatch: ['<rootDir>/e2e/**/*.test.ts', '<rootDir>/e2e/**/*.test.js'],
|
|
31
|
-
}
|
|
32
|
-
`),console.log(` created ${o}`));let l=a(t,"e2e"),n=a(l,"example.test.ts");T(n)?console.log(` skip: ${n} already exists`):(V(l,{recursive:!0}),I(n,`// sample rnx detox test. resolve \`detox\` via the jest preset in
|
|
33
|
-
// sootsim-detox.config.cjs \u2014 no extra imports required.
|
|
34
|
-
|
|
35
|
-
import { by, device, element, expect, waitFor } from 'detox'
|
|
36
|
-
|
|
37
|
-
describe('example', () => {
|
|
38
|
-
beforeAll(async () => {
|
|
39
|
-
await device.launchApp()
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
it('shows the welcome text', async () => {
|
|
43
|
-
await waitFor(element(by.text('Welcome'))).toBeVisible().withTimeout(5000)
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
it('taps a button by id', async () => {
|
|
47
|
-
await element(by.id('start-button')).tap()
|
|
48
|
-
await expect(element(by.id('home-screen'))).toBeVisible()
|
|
49
|
-
})
|
|
50
|
-
})
|
|
51
|
-
`),console.log(` created ${n}`)),console.log(`
|
|
52
|
-
next:`),console.log(" rnx detox # run the sample"),console.log(" rnx detox --watch"),f(0)}export{xe as runDetox};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import"./chunk-GDKMOIUT.js";import"./chunk-DNPQMTW5.js";import"./chunk-DOVBJBVD.js";import{b as d,d as c,e as h}from"./chunk-DGJMIVZM.js";import{t as l,v as a,y as m}from"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import{c as s}from"./chunk-TH2UFGVP.js";import"./chunk-QRDF33WD.js";import"./chunk-ZSSG7OR7.js";function v(){console.log(`
|
|
5
|
-
rnx device \u2014 inspect or change the live device preset for a sim
|
|
6
|
-
|
|
7
|
-
usage:
|
|
8
|
-
rnx device
|
|
9
|
-
rnx device get
|
|
10
|
-
rnx device set <model> [--sim <id>]
|
|
11
|
-
rnx device list
|
|
12
|
-
|
|
13
|
-
examples:
|
|
14
|
-
rnx device
|
|
15
|
-
rnx device set iphone-14
|
|
16
|
-
rnx device set iphone-16-pro-max --sim a7
|
|
17
|
-
`)}function u(t){let n=c(t);console.log(` ${t.padEnd(14)} ${String(n.width).padStart(4)}x${String(n.height).padEnd(4)} pt ${String(n.width*n.scale).padStart(4)}x${String(n.height*n.scale).padEnd(4)} px ${n.name}`)}async function x(t){let n=a(t);try{let o=await m(n,"SootSim.bridges.settings.get")??{deviceModel:null},i=typeof o.deviceModel=="string"?o.deviceModel:null;if(!i||!(i in d))return null;let e=c(i);return{model:i,width:e.width,height:e.height,scale:e.scale,name:e.name}}finally{n.close()}}async function b(t,n){(t.includes("--help")||t.includes("-h"))&&(v(),s(0));let o=t[0];if(!o||o==="get"){let i=l(t,{port:n.port}),e=await x(i);e||(console.error(" error: could not read current device from the target sim"),s(1)),console.log(` ${e.model} ${e.width}x${e.height} pt ${e.width*e.scale}x${e.height*e.scale} px ${e.name}`);return}if(o==="list"){console.log(` available devices:
|
|
18
|
-
`);for(let i of h())u(i);return}if(o==="set"){let i=t[1];i||(console.error(" error: device set expects a model"),s(1)),i in d||(console.error(` error: unknown device "${i}"`),console.error(" run `rnx device list` to see valid models"),s(1));let e=l(t,{port:n.port}),g=a(e);try{let p=await m(g,"SootSim.bridges.settings.set","deviceModel",i),r=c(i);console.log(` ${p?"set":"kept"} device: ${i} (${r.width}x${r.height} pt, ${r.width*r.scale}x${r.height*r.scale} px)${p?" \u2014 reloading sim":""}`)}finally{g.close()}return}v(),console.error(` unknown subcommand: ${o}`),s(1)}export{b as runDeviceCommand};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{e as v,t as E,v as x,y as b}from"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-QRDF33WD.js";import"./chunk-ZSSG7OR7.js";function j(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(r=>typeof r=="string"?r:JSON.stringify(r)).join(" "):""}var B=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
|
|
5
|
-
rnx get diagnosis \u2014 compact "what just went wrong?" report
|
|
6
|
-
|
|
7
|
-
usage:
|
|
8
|
-
rnx get diagnosis [--since <duration>] [--include <csv>] [--json]
|
|
9
|
-
|
|
10
|
-
options:
|
|
11
|
-
--since <d> absolute window for timeline + network (e.g. 90s, 2m, 500ms; default 90s)
|
|
12
|
-
--include <csv> comma-separated dimensions: timeline, network, react, console, screen
|
|
13
|
-
(default: all)
|
|
14
|
-
--slow-threshold <n> network slow-request threshold in ms (default 1000)
|
|
15
|
-
--limit <n> rows to print per react table (default 8)
|
|
16
|
-
--json emit a single structured JSON document
|
|
17
|
-
|
|
18
|
-
the diagnose report runs every dimension in parallel against the same
|
|
19
|
-
sim and returns a grouped summary. use \`rnx what-happened\`
|
|
20
|
-
for chronological events, \`rnx network\` for full request inspection,
|
|
21
|
-
\`rnx perf react summary\` for the React tables on their own.
|
|
22
|
-
|
|
23
|
-
examples:
|
|
24
|
-
rnx get diagnosis
|
|
25
|
-
rnx get diagnosis --since 30s --include network,react
|
|
26
|
-
rnx get diagnosis --json > /tmp/diagnosis.json
|
|
27
|
-
`)}function A(e,r){if(!e)return r;let o=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(e.trim());if(!o)return r;let s=Number(o[1]),t=o[2]??"ms";return t==="s"?s*1e3:t==="m"?s*6e4:s}function D(e){if(!e)return B;let r=new Set;for(let o of e.split(",")){let s=o.trim().toLowerCase();s&&r.add(s)}return r}function k(e,r){let o=e.indexOf(r);if(o>=0&&o+1<e.length)return e[o+1];let s=`${r}=`;return e.find(t=>t.startsWith(s))?.slice(s.length)}function R(e,r,o){let s=k(e,r);if(s===void 0)return o;let t=Number(s);return Number.isFinite(t)&&t>0?Math.round(t):o}async function O(e,r){let o={limit:500,since:Date.now()-r},t=(await b(e,"SootSim.bridges.timeline.recent",o)).events??[],i={},c=[],d=[],p=[];for(let u of t){i[u.kind]=(i[u.kind]??0)+1;let l=u.data,m=l&&typeof l=="object"?l.level:void 0;u.kind==="console"&&(m==="error"||m==="warn")&&c.push(u),(u.kind==="alert"||u.kind==="actionsheet"||u.kind==="picker")&&d.push(u),(u.kind==="screen"||u.kind==="route")&&p.push(u)}return{events:t,byKind:i,total:t.length,errors:c,alerts:d,screens:p}}async function L(e,r,o){let s=await e.send({type:"evaluate",code:`(() => {
|
|
28
|
-
const obs = window.__sootsimObservability;
|
|
29
|
-
if (!obs) return { ok: false };
|
|
30
|
-
return { ok: true, entries: obs.network.getSnapshot() };
|
|
31
|
-
})()`});if(!s||!s.ok)return{error:"observability bridge not installed"};let t=s.entries??[],i=Date.now()-r,c=t.filter(l=>(l.startTs??l.startedAt??0)>=i),d=c.filter(l=>!!l.error||l.status!=null&&l.status>=400),p=c.filter(l=>l.durationMs!=null&&l.durationMs>=o).sort((l,m)=>(m.durationMs??0)-(l.durationMs??0)),u=c.filter(l=>l.durationMs==null).length;return{total:c.length,failed:d,slow:p,inFlight:u,slowThresholdMs:o}}async function C(e,r){let[o,s]=await Promise.all([b(e,"SootSim.bridges.reactProfile.slow",{limit:r}),b(e,"SootSim.bridges.reactProfile.rerenders",{limit:r})]);return{commits:o.commits??s.commits??0,slow:o.rows??[],rerenders:s.rows??[],durationWarning:o.durationWarning,error:o.error??s.error}}async function _(e,r){let o=await e.send({type:"evaluate",code:`(() => {
|
|
32
|
-
const obs = window.__sootsimObservability;
|
|
33
|
-
if (!obs) return { ok: false };
|
|
34
|
-
return { ok: true, entries: obs.logs.getSnapshot() };
|
|
35
|
-
})()`});if(!o||!o.ok)return{error:"observability bridge not installed"};let s=Date.now()-r,i=(o.entries??[]).filter(c=>j(c)>=s&&(c.level==="error"||c.level==="warn"));return{entries:i.slice(-20),total:i.length}}function T(e){let r=e.error?"err":e.status!=null?String(e.status):"...",o=(e.method??"GET").padEnd(6),s=e.durationMs!=null?`${e.durationMs.toFixed(0)}ms`:"...",t=e.displayUrl??e.url,i=t.length>96?`${t.slice(0,92)}\u2026`:t;return` ${r.padStart(3)} ${o} ${s.padStart(7)} ${i} (${e.id})`}function N(e,r){let o=((e.t-r)/1e3).toFixed(2),s=e.t>=r?"-":"+",t=e.data,i="";if(t&&typeof t=="object"){let c=(t.message??"").toString().slice(0,120),d=(t.title??t.name??t.path??t.url??"").toString();i=[(t.phase??"").toString(),d,c].filter(Boolean).join(" \xB7 ")}return` -${o.padStart(5)}s [${e.kind}] ${i}`}function M(e,r,o){if(r.length===0)return`${o}(no rows)`;let s=e.map((i,c)=>Math.max(i.length,...r.map(d=>d[c]?.length??0))),t=i=>i.map((c,d)=>c.padEnd(s[d])).join(" ").trimEnd();return[t(e),t(e.map(i=>"-".repeat(i.length))),...r.map(t)].map(i=>`${o}${i}`).join(`
|
|
36
|
-
`)}async function J(e,r){if(e.includes("--help")||e.includes("-h"))return P(),0;let o=E(e,{port:r.port,stripBooleanFlags:["--json","--help","-h"],stripValueFlags:["--since","--include","--limit","--slow-threshold"]}),s=o.positional[0]??"recent";if(s!=="recent")return console.error(` unknown subcommand: ${s}`),console.error(" did you mean: rnx get diagnosis ?"),1;let t=A(k(e,"--since"),9e4),i=D(k(e,"--include")),c=R(e,"--limit",8),d=R(e,"--slow-threshold",1e3),p=e.includes("--json"),u=x(o);try{let l=[],m=[];(i.has("timeline")||i.has("screen")||i.has("alert"))&&(m.push("timeline"),l.push(O(u,t))),(i.has("network")||i.has("fetch"))&&(m.push("network"),l.push(L(u,t,d))),i.has("react")&&(m.push("react"),l.push(C(u,c))),i.has("console")&&(m.push("console"),l.push(_(u,t)));let $=await u.send({type:"evaluate",code:"globalThis.__sootsimEngineBuild ?? null"}).then(n=>typeof n=="string"?n:null).catch(()=>null),F=await Promise.all(l),w={};for(let n=0;n<m.length;n++)w[m[n]]=F[n];if(p)return console.log(JSON.stringify({generatedAt:Date.now(),engineBuild:$,sinceMs:t,include:Array.from(i),slices:w},null,2)),0;let S=Date.now();if(console.log(` diagnose recent (last ${(t/1e3).toFixed(0)}s, include: ${Array.from(i).sort().join(",")}):`),console.log(` engine build: ${$??"unknown (no build stamp \u2014 likely a stale or pre-F20-5 engine)"}`),w.timeline){let n=w.timeline;console.log(`
|
|
37
|
-
timeline \u2014 ${n.total} event(s) in window`);let f=Object.entries(n.byKind).sort((a,g)=>g[1]-a[1]).map(([a,g])=>`${g} ${a}`).join(" \xB7 ");if(f&&console.log(` summary: ${f}`),n.screens.length){let g=n.screens[n.screens.length-1].data,h=g?g.name??g.activeName??g.path??"?":"?";console.log(` last screen: ${String(h)}`)}if(n.alerts.length){console.log(` alerts (${n.alerts.length}):`);for(let a of n.alerts.slice(-5))console.log(N(a,S))}if(n.errors.length){console.log(` console errors/warns from timeline (${n.errors.length}):`);for(let a of n.errors.slice(-5))console.log(N(a,S))}}if(w.network){let n=w.network;if("error"in n)console.log(`
|
|
38
|
-
network \u2014 ${n.error}`);else{if(console.log(`
|
|
39
|
-
network \u2014 ${n.total} request(s), ${n.failed.length} failed, ${n.slow.length} slow (>${n.slowThresholdMs}ms), ${n.inFlight} in-flight`),n.failed.length){console.log(" failed:");for(let f of n.failed.slice(-8))console.log(T(f))}if(n.slow.length){console.log(" slowest:");for(let f of n.slow.slice(0,5))console.log(T(f))}}}if(w.react){let n=w.react;console.log(`
|
|
40
|
-
react \u2014 ${n.commits} commit(s)`),n.error&&console.log(` warning: ${n.error}`),n.durationWarning&&console.log(` warning: ${n.durationWarning}`),n.slow.length>0&&n.slow.every(a=>a.totalMs<=0&&a.slowestMs<=0)&&!n.durationWarning&&console.log(" warning: every commit reports actualDuration=0ms \u2014 bundle has React profiler timer disabled"),n.slow.length&&(console.log(" slowest:"),console.log(M(["component","total","commits","slowest"],n.slow.slice(0,c).map(a=>[a.displayName,`${a.totalMs.toFixed(2)}ms`,String(a.commitCount),`${a.slowestMs.toFixed(2)}ms`])," "))),n.rerenders.length&&(console.log(" most rerenders:"),console.log(M(["component","renders","top causes"],n.rerenders.slice(0,c).map(a=>{let g=Object.entries(a.causes??{}).filter(([,h])=>h>0).sort((h,y)=>y[1]-h[1]).slice(0,3).map(([h,y])=>`${h}:${y}`).join(", ");return[a.displayName,String(a.renders??a.count??0),g||"-"]})," ")))}if(w.console){let n=w.console;if("error"in n)console.log(`
|
|
41
|
-
console \u2014 ${n.error}`);else{console.log(`
|
|
42
|
-
console errors/warns \u2014 ${n.total} in window`);for(let f of n.entries.slice(-8)){let a=((j(f)-S)/1e3).toFixed(2),g=W(f).slice(0,160);console.log(` -${a.padStart(5)}s [${f.level}] ${g}`)}}}return v()&&console.log(`
|
|
43
|
-
next: rnx what-happened (cursor advances) \xB7 rnx network get <id> \xB7 rnx perf react why <fiber-id>`),0}catch(l){let m=l instanceof Error?l.message:String(l);return/no sim connected/i.test(m)?console.error(" no sim connected \u2014 open one first: rnx open <metroPort>"):console.error(` diagnose failed: ${m}`),1}finally{u.close()}}export{J as runDiagnose};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! rnx v0.1.376 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
-
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a,b,c,d,e,f}from"./chunk-MGALNF2F.js";import"./chunk-7R2TK2NY.js";import"./chunk-CE4JQJ6Y.js";import"./chunk-QRDF33WD.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.js";export{f as applyAutomaticSootsimCleanup,e as applySootsimCleanup,c as formatSootsimBytes,a as isAutomaticSootsimCleanupComplete,d as planSootsimCleanup,b as shouldSkipAutomaticSootsimCleanup};
|