rnxsim 0.1.335 → 0.1.336
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-PZLF36FY.js} +14 -14
- package/dist-cli/chunks/{agent-wrapper-NFLJ5K64.js → agent-wrapper-6TA43SJ2.js} +3 -3
- package/dist-cli/chunks/app-fonts-MTZTCJUY.js +4 -0
- package/dist-cli/chunks/{assert-ILAXIYB5.js → assert-2CVO2TYX.js} +12 -12
- package/dist-cli/chunks/auth-LKXFRFOT.js +12 -0
- package/dist-cli/chunks/{beta-TDR6UKJU.js → beta-OATC5IPA.js} +2 -2
- package/dist-cli/chunks/camera-VX65VO5N.js +33 -0
- package/dist-cli/chunks/{chunk-DCDKJ4NC.js → chunk-262YA5CJ.js} +2 -2
- package/dist-cli/chunks/{chunk-JWAY6DIH.js → chunk-2J4OBR7W.js} +18 -18
- package/dist-cli/chunks/{chunk-VV4MXLFR.js → chunk-2PFDFGOG.js} +1 -1
- package/dist-cli/chunks/{chunk-R3CMECGC.js → chunk-2Q6S7X5O.js} +4 -4
- package/dist-cli/chunks/{chunk-MGGRL2Z2.js → chunk-2VOFUIKQ.js} +9 -9
- package/dist-cli/chunks/chunk-3QCSDI3B.js +5 -0
- package/dist-cli/chunks/{chunk-R2UL5VFY.js → chunk-4532OPNZ.js} +3 -3
- package/dist-cli/chunks/{chunk-RTD3CPDQ.js → chunk-5YCVNKD7.js} +23 -23
- package/dist-cli/chunks/{chunk-RTEJXUXN.js → chunk-6ALTVOXE.js} +6 -6
- package/dist-cli/chunks/chunk-6TN3YWA6.js +124 -0
- package/dist-cli/chunks/{chunk-ZZWO6Y7X.js → chunk-7FHAHI5V.js} +2 -2
- package/dist-cli/chunks/{chunk-3ZDOPKHE.js → chunk-7PMNRG53.js} +4 -4
- package/dist-cli/chunks/{chunk-GVKISFQ3.js → chunk-ARFQOYRO.js} +1 -1
- package/dist-cli/chunks/chunk-BHXQ7MUW.js +5 -0
- package/dist-cli/chunks/{chunk-WKT7YM5Q.js → chunk-BIZE6NBI.js} +1 -1
- package/dist-cli/chunks/{chunk-POC3QTA6.js → chunk-BOZARB6P.js} +2 -2
- package/dist-cli/chunks/chunk-BVGUTE2T.js +74 -0
- package/dist-cli/chunks/{chunk-IV36DY6M.js → chunk-BYOFHYKS.js} +1 -1
- package/dist-cli/chunks/{chunk-35XNGT5C.js → chunk-DMD24WAG.js} +1 -1
- package/dist-cli/chunks/{chunk-IN2PZBQD.js → chunk-EAPHUH2R.js} +2 -2
- package/dist-cli/chunks/{chunk-3CS4EUMG.js → chunk-FMWEQNK2.js} +2 -2
- package/dist-cli/chunks/{chunk-TL4DNDDY.js → chunk-FWGDP2J4.js} +2 -2
- package/dist-cli/chunks/{chunk-ROPHZJ6P.js → chunk-G3FVXFPF.js} +2 -2
- package/dist-cli/chunks/{chunk-MTNIDSOA.js → chunk-GI3GZ54J.js} +1 -1
- package/dist-cli/chunks/{chunk-42ALI64M.js → chunk-HDHHEWEA.js} +2 -2
- package/dist-cli/chunks/{chunk-MTD6IAEA.js → chunk-JIWE66VU.js} +1 -1
- package/dist-cli/chunks/{chunk-M7CBQ5I4.js → chunk-KDRDDPNN.js} +1 -1
- package/dist-cli/chunks/{chunk-USGOQ3YJ.js → chunk-KPL344LX.js} +2 -2
- package/dist-cli/chunks/{chunk-F33DUJGG.js → chunk-M2OWBYUG.js} +1 -1
- package/dist-cli/chunks/{chunk-ZTM2MKNI.js → chunk-M2XGXP7G.js} +1 -1
- package/dist-cli/chunks/{chunk-6VN5ULGQ.js → chunk-MARPC3GM.js} +2 -2
- package/dist-cli/chunks/{chunk-RELRA5VW.js → chunk-MQES3MTN.js} +2 -2
- package/dist-cli/chunks/{chunk-6Y3PVPTF.js → chunk-NDLRQH7U.js} +5 -5
- package/dist-cli/chunks/{chunk-JWK5WD44.js → chunk-NJMBQLAU.js} +2 -2
- package/dist-cli/chunks/{chunk-RVUGKXJD.js → chunk-NL2HXO7U.js} +1 -1
- package/dist-cli/chunks/{chunk-ZYHCWCMM.js → chunk-NVPZLIMW.js} +1 -1
- package/dist-cli/chunks/{chunk-42KDXJUD.js → chunk-NWVH2X7F.js} +2 -2
- package/dist-cli/chunks/{chunk-FJSHIWAM.js → chunk-OUAYBJ4G.js} +2 -2
- package/dist-cli/chunks/{chunk-I2HQB5NN.js → chunk-OXRDTNVL.js} +2 -2
- package/dist-cli/chunks/{chunk-CL3PREIE.js → chunk-QIVOOERS.js} +2 -2
- package/dist-cli/chunks/{chunk-INBPUR4T.js → chunk-RZ2PXHA7.js} +11 -11
- package/dist-cli/chunks/{chunk-YSUIYK6B.js → chunk-S33NCWJV.js} +2 -2
- package/dist-cli/chunks/{chunk-J7XFINJG.js → chunk-STMCT3G3.js} +2 -2
- package/dist-cli/chunks/{chunk-FE6ZHPKD.js → chunk-SV6NVD7P.js} +1 -1
- package/dist-cli/chunks/{chunk-HNQLZZJA.js → chunk-TA4GBBGC.js} +2 -2
- package/dist-cli/chunks/{chunk-4KC35DMK.js → chunk-TV457FWW.js} +2 -2
- package/dist-cli/chunks/chunk-UB3JHBDW.js +4 -0
- package/dist-cli/chunks/{chunk-LCVUJCRJ.js → chunk-UU2KMAIA.js} +1 -1
- package/dist-cli/chunks/chunk-UZCNKUSS.js +15 -0
- package/dist-cli/chunks/{chunk-GP6QEBZA.js → chunk-V4OZDPTA.js} +1 -1
- package/dist-cli/chunks/{chunk-CGZWLSYD.js → chunk-WBTT5WIO.js} +1 -1
- package/dist-cli/chunks/chunk-YYBC6VB2.js +30 -0
- package/dist-cli/chunks/{chunk-PO3TOAED.js → chunk-ZI6YQKD6.js} +2 -2
- package/dist-cli/chunks/{cleanup-X6ZRPFDV.js → cleanup-ZC5OVBIM.js} +10 -10
- package/dist-cli/chunks/cli-version-NOYHDN6P.js +4 -0
- package/dist-cli/chunks/{compat-VRXJ5J56.js → compat-BS2E7XDD.js} +9 -9
- package/dist-cli/chunks/{config-LHPPE4EP.js → config-VDCDUYMZ.js} +5 -5
- package/dist-cli/chunks/{control-TVTNGSSF.js → control-IKS3CUP4.js} +2 -2
- package/dist-cli/chunks/daemon-MM3C4O2B.js +4 -0
- package/dist-cli/chunks/{debug-EUHBBPGM.js → debug-BKMZ5SRR.js} +17 -17
- package/dist-cli/chunks/desktop-FZQHSNF7.js +31 -0
- package/dist-cli/chunks/detox-52AM3DKY.js +52 -0
- package/dist-cli/chunks/{device-PONITUZJ.js → device-7FL5Y542.js} +11 -11
- package/dist-cli/chunks/{diagnose-2PN4K4L2.js → diagnose-YT4BKJ7I.js} +12 -12
- package/dist-cli/chunks/{disk-cleanup-U2PQLOEW.js → disk-cleanup-O6ICYLAC.js} +2 -2
- package/dist-cli/chunks/drivers-YY3YRD2L.js +4 -0
- package/dist-cli/chunks/{film-XGZCFTQL.js → film-7YBOFSOZ.js} +9 -9
- package/dist-cli/chunks/flow-I4PVS52A.js +4 -0
- package/dist-cli/chunks/help-35ESSWJH.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-I4MYF5CO.js → hidden-runtime-alias-M3UFKZB6.js} +2 -2
- package/dist-cli/chunks/{home-paths-YRAPZ5LE.js → home-paths-VW7G7LVZ.js} +2 -2
- package/dist-cli/chunks/inspect-PCJ6C2BN.js +4 -0
- package/dist-cli/chunks/install-desktop-NGQWMGQO.js +4 -0
- package/dist-cli/chunks/{login-ZMAIAQ6F.js → login-5VAHTGHC.js} +6 -6
- package/dist-cli/chunks/{logout-UQZ5JBJU.js → logout-CXZFNMYF.js} +2 -2
- package/dist-cli/chunks/{maestro-BQYKDUC4.js → maestro-THMBR6L3.js} +25 -25
- package/dist-cli/chunks/{maestro-generate-VQYMMQJ5.js → maestro-generate-R73J53KE.js} +3 -3
- package/dist-cli/chunks/mode-5RJYFW76.js +26 -0
- package/dist-cli/chunks/{optional-demo-registry-DUWHCLGD.js → optional-demo-registry-U7SCVX5U.js} +2 -2
- package/dist-cli/chunks/{perf-7RAU7WRZ.js → perf-AW6LG6FW.js} +28 -28
- package/dist-cli/chunks/permissions-6JWNMXYT.js +13 -0
- package/dist-cli/chunks/record-LLPM3BJT.js +72 -0
- package/dist-cli/chunks/{report-issue-P376KFFU.js → report-issue-YO2NAMJS.js} +4 -4
- package/dist-cli/chunks/reset-5LDPRL3W.js +4 -0
- package/dist-cli/chunks/runtime-IAICY2UL.js +4 -0
- package/dist-cli/chunks/{screenshot-command-NE7BKTQ2.js → screenshot-command-X7ECU2SK.js} +34 -34
- package/dist-cli/chunks/{screenshot-layers-UE4R64PZ.js → screenshot-layers-E7GLIOHG.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-ULXPLXMC.js → screenshots-capture-TKR2YV6U.js} +11 -11
- package/dist-cli/chunks/{serve-P7BT4XHR.js → serve-HFNYO3YS.js} +16 -16
- package/dist-cli/chunks/setup-2HQHROP3.js +32 -0
- package/dist-cli/chunks/{skills-NTRYKJSF.js → skills-PFCCKOPW.js} +16 -16
- package/dist-cli/chunks/{state-4D5YAM47.js → state-NOCC6IGB.js} +5 -5
- package/dist-cli/chunks/storage-4SYN4ZWP.js +37 -0
- package/dist-cli/chunks/store-7QDSVAZ4.js +4 -0
- package/dist-cli/chunks/telemetry-LGTXJEJC.js +4 -0
- package/dist-cli/chunks/{timeline-GZNFGD3Q.js → timeline-E2SFUV76.js} +6 -6
- package/dist-cli/chunks/{upgrade-A46D6PEY.js → upgrade-KD76JQCK.js} +2 -2
- package/dist-cli/chunks/upload-FI2TS5S7.js +4 -0
- package/dist-cli/chunks/version-B23A4BFH.js +6 -0
- package/dist-cli/chunks/{web-H2IXO5SC.js → web-6OAWYV5Z.js} +2 -2
- package/dist-cli/chunks/{what-happened-Z7UII5GH.js → what-happened-IYXUFM72.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/cli/commands/detox.ts
CHANGED
|
@@ -38,18 +38,18 @@ interface RunDetoxOpts {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
const HELP = `
|
|
41
|
-
|
|
41
|
+
rnx detox — run detox-style tests against an rnx shell
|
|
42
42
|
|
|
43
43
|
usage:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
rnx detox [testFiles...] run all tests under e2e/, test/e2e/, or detox/
|
|
45
|
+
rnx detox --config <path> use a specific jest config
|
|
46
|
+
rnx detox init scaffold sootsim-detox.config.cjs + sample test
|
|
47
|
+
rnx detox --watch jest watch mode
|
|
48
|
+
rnx detox --headed keep the rnx shell window visible
|
|
49
|
+
rnx detox -t <pattern> pass a jest --testNamePattern
|
|
50
|
+
rnx detox --no-launch skip auto-launching an rnx shell
|
|
51
|
+
|
|
52
|
+
rnx detox auto-launches an rnx shell if none is running on the
|
|
53
53
|
expected port. disable with --no-launch if you're managing the shell yourself.
|
|
54
54
|
`
|
|
55
55
|
|
|
@@ -122,7 +122,7 @@ export async function runDetox(args: string[], opts: RunDetoxOpts = {}): Promise
|
|
|
122
122
|
if (!testDir) {
|
|
123
123
|
console.error(
|
|
124
124
|
` error: no detox tests found. expected one of: ${detoxDirs.join(', ')}\n` +
|
|
125
|
-
` run '
|
|
125
|
+
` run 'rnx detox init' to scaffold a starter suite.`,
|
|
126
126
|
)
|
|
127
127
|
process.exit(1)
|
|
128
128
|
}
|
|
@@ -190,7 +190,7 @@ export async function runDetox(args: string[], opts: RunDetoxOpts = {}): Promise
|
|
|
190
190
|
// any positional test files get passed straight through
|
|
191
191
|
jestArgs.push(...positional)
|
|
192
192
|
|
|
193
|
-
console.log(`
|
|
193
|
+
console.log(` rnx detox`)
|
|
194
194
|
console.log(` test dir: ${testDir}`)
|
|
195
195
|
console.log(` port: ${port}${headed ? ' (headed)' : ''}`)
|
|
196
196
|
if (localConfig) console.log(` config: ${localConfig}`)
|
|
@@ -330,7 +330,7 @@ async function ensureShellRunning(port: number): Promise<void> {
|
|
|
330
330
|
if (shellUrl) return
|
|
331
331
|
|
|
332
332
|
console.warn(
|
|
333
|
-
` warn: no rnx shell reachable on :${port}. start your app, then run \`
|
|
333
|
+
` warn: no rnx shell reachable on :${port}. start your app, then run \`rnx open <app-port>\`\n` +
|
|
334
334
|
` or pass --no-launch if you're managing the shell yourself.`,
|
|
335
335
|
)
|
|
336
336
|
}
|
|
@@ -343,7 +343,7 @@ function initDetoxProject(): void {
|
|
|
343
343
|
} else {
|
|
344
344
|
writeFileSync(
|
|
345
345
|
configPath,
|
|
346
|
-
`//
|
|
346
|
+
`// rnx detox jest config.
|
|
347
347
|
// extends the sootsim preset, which rewrites \`import ... from 'detox'\`
|
|
348
348
|
// to the sootsim driver and keeps your jest transforms intact.
|
|
349
349
|
|
|
@@ -366,7 +366,7 @@ module.exports = {
|
|
|
366
366
|
mkdirSync(e2eDir, { recursive: true })
|
|
367
367
|
writeFileSync(
|
|
368
368
|
samplePath,
|
|
369
|
-
`// sample
|
|
369
|
+
`// sample rnx detox test. resolve \`detox\` via the jest preset in
|
|
370
370
|
// sootsim-detox.config.cjs — no extra imports required.
|
|
371
371
|
|
|
372
372
|
import { by, device, element, expect, waitFor } from 'detox'
|
|
@@ -391,7 +391,7 @@ describe('example', () => {
|
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
console.log(`\n next:`)
|
|
394
|
-
console.log(`
|
|
395
|
-
console.log(`
|
|
394
|
+
console.log(` rnx detox # run the sample`)
|
|
395
|
+
console.log(` rnx detox --watch`)
|
|
396
396
|
process.exit(0)
|
|
397
397
|
}
|
package/cli/commands/device.ts
CHANGED
|
@@ -25,18 +25,18 @@ type CurrentDeviceSnapshot = {
|
|
|
25
25
|
|
|
26
26
|
function usage() {
|
|
27
27
|
console.log(`
|
|
28
|
-
|
|
28
|
+
rnx device — inspect or change the live device preset for a sim
|
|
29
29
|
|
|
30
30
|
usage:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
rnx device
|
|
32
|
+
rnx device get
|
|
33
|
+
rnx device set <model> [--sim <id>]
|
|
34
|
+
rnx device list
|
|
35
35
|
|
|
36
36
|
examples:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
rnx device
|
|
38
|
+
rnx device set iphone-14
|
|
39
|
+
rnx device set iphone-16-pro-max --sim a7
|
|
40
40
|
`)
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -105,7 +105,7 @@ export async function runDeviceCommand(args: string[], opts: DeviceCommandOption
|
|
|
105
105
|
}
|
|
106
106
|
if (!(model in devices)) {
|
|
107
107
|
console.error(` error: unknown device "${model}"`)
|
|
108
|
-
console.error(' run `
|
|
108
|
+
console.error(' run `rnx device list` to see valid models')
|
|
109
109
|
process.exit(1)
|
|
110
110
|
}
|
|
111
111
|
const parsed = parseBridgeCliArgs(args, { port: opts.port })
|
package/cli/commands/diagnose.ts
CHANGED
|
@@ -101,10 +101,10 @@ const DEFAULT_INCLUDES = new Set(['timeline', 'network', 'react', 'console', 'sc
|
|
|
101
101
|
|
|
102
102
|
function printHelp(): void {
|
|
103
103
|
console.log(`
|
|
104
|
-
|
|
104
|
+
rnx get diagnosis — compact "what just went wrong?" report
|
|
105
105
|
|
|
106
106
|
usage:
|
|
107
|
-
|
|
107
|
+
rnx get diagnosis [--since <duration>] [--include <csv>] [--json]
|
|
108
108
|
|
|
109
109
|
options:
|
|
110
110
|
--since <d> absolute window for timeline + network (e.g. 90s, 2m, 500ms; default 90s)
|
|
@@ -115,14 +115,14 @@ options:
|
|
|
115
115
|
--json emit a single structured JSON document
|
|
116
116
|
|
|
117
117
|
the diagnose report runs every dimension in parallel against the same
|
|
118
|
-
sim and returns a grouped summary. use \`
|
|
119
|
-
for chronological events, \`
|
|
120
|
-
\`
|
|
118
|
+
sim and returns a grouped summary. use \`rnx what-happened\`
|
|
119
|
+
for chronological events, \`rnx network\` for full request inspection,
|
|
120
|
+
\`rnx perf react summary\` for the React tables on their own.
|
|
121
121
|
|
|
122
122
|
examples:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
rnx get diagnosis
|
|
124
|
+
rnx get diagnosis --since 30s --include network,react
|
|
125
|
+
rnx get diagnosis --json > /tmp/diagnosis.json
|
|
126
126
|
`)
|
|
127
127
|
}
|
|
128
128
|
|
|
@@ -371,7 +371,7 @@ export async function runDiagnose(
|
|
|
371
371
|
const sub = parsed.positional[0] ?? 'recent'
|
|
372
372
|
if (sub !== 'recent') {
|
|
373
373
|
console.error(` unknown subcommand: ${sub}`)
|
|
374
|
-
console.error(' did you mean:
|
|
374
|
+
console.error(' did you mean: rnx get diagnosis ?')
|
|
375
375
|
return 1
|
|
376
376
|
}
|
|
377
377
|
|
|
@@ -567,7 +567,7 @@ export async function runDiagnose(
|
|
|
567
567
|
const identityKey = getCliIdentityKey()
|
|
568
568
|
if (identityKey) {
|
|
569
569
|
console.log(
|
|
570
|
-
`\n next:
|
|
570
|
+
`\n next: rnx what-happened (cursor advances) · rnx network get <id> · rnx perf react why <fiber-id>`,
|
|
571
571
|
)
|
|
572
572
|
}
|
|
573
573
|
return 0
|
|
@@ -578,7 +578,7 @@ export async function runDiagnose(
|
|
|
578
578
|
// exit non-zero so `sootsim get diagnosis && …` chains behave.
|
|
579
579
|
const msg = err instanceof Error ? err.message : String(err)
|
|
580
580
|
if (/no sim connected/i.test(msg)) {
|
|
581
|
-
console.error(' no sim connected — open one first:
|
|
581
|
+
console.error(' no sim connected — open one first: rnx open <metroPort>')
|
|
582
582
|
} else {
|
|
583
583
|
console.error(` diagnose failed: ${msg}`)
|
|
584
584
|
}
|
package/cli/commands/electron.ts
CHANGED
|
@@ -38,10 +38,10 @@ export async function resolveElectronLaunchUrl(
|
|
|
38
38
|
export async function runElectron(args: string[], opts: ElectronOptions) {
|
|
39
39
|
if (args.includes('--help') || args.includes('-h')) {
|
|
40
40
|
console.log(`
|
|
41
|
-
|
|
41
|
+
rnx desktop — launch the desktop companion
|
|
42
42
|
|
|
43
43
|
usage:
|
|
44
|
-
|
|
44
|
+
rnx desktop [options]
|
|
45
45
|
|
|
46
46
|
options:
|
|
47
47
|
--port <number> connect to running dev server on this port
|
|
@@ -49,9 +49,9 @@ options:
|
|
|
49
49
|
--ephemeral launch with a temporary isolated storage profile
|
|
50
50
|
|
|
51
51
|
examples:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
rnx desktop
|
|
53
|
+
rnx desktop --port 5173
|
|
54
|
+
rnx desktop --profile qa
|
|
55
55
|
`)
|
|
56
56
|
process.exit(0)
|
|
57
57
|
}
|
|
@@ -59,7 +59,7 @@ examples:
|
|
|
59
59
|
const profileArg = args.find((_, i) => args[i - 1] === '--profile')
|
|
60
60
|
const ephemeralProfile = args.includes('--ephemeral')
|
|
61
61
|
if (profileArg && ephemeralProfile) {
|
|
62
|
-
console.error('
|
|
62
|
+
console.error(' rnx desktop: --profile cannot be combined with --ephemeral')
|
|
63
63
|
process.exit(1)
|
|
64
64
|
}
|
|
65
65
|
const profileId = profileArg ? ensureProfile(profileArg).id : undefined
|
|
@@ -70,7 +70,7 @@ examples:
|
|
|
70
70
|
process.stdin.isTTY &&
|
|
71
71
|
process.env.CI !== '1' &&
|
|
72
72
|
process.env.SOOTSIM_NO_PROMPT !== '1'
|
|
73
|
-
if (canPrompt && (await confirm('run
|
|
73
|
+
if (canPrompt && (await confirm('run rnx desktop install now?', true))) {
|
|
74
74
|
console.log()
|
|
75
75
|
const { runInstallDesktop } = await import('./install-desktop')
|
|
76
76
|
await runInstallDesktop(['--yes'])
|
package/cli/commands/film.ts
CHANGED
|
@@ -68,10 +68,10 @@ async function evalInPage<T>(bridge: WsBridge, code: string, timeoutMs = 30_000)
|
|
|
68
68
|
export async function runFilm(args: string[], opts: FilmOptions): Promise<number> {
|
|
69
69
|
if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
|
|
70
70
|
console.log(`
|
|
71
|
-
|
|
71
|
+
rnx film — record a flow flat, replay it on the 3d stage, save a clip
|
|
72
72
|
|
|
73
73
|
usage:
|
|
74
|
-
|
|
74
|
+
rnx film <flow.yaml> [options]
|
|
75
75
|
|
|
76
76
|
how it works:
|
|
77
77
|
1. the flow runs at full speed on the flat canvas while the engine
|
|
@@ -90,16 +90,16 @@ options:
|
|
|
90
90
|
--keep-three leave 3d mode + the recording editor on afterwards
|
|
91
91
|
--sim <id> target a specific connected sim
|
|
92
92
|
|
|
93
|
-
stage decor (same flags as \`
|
|
93
|
+
stage decor (same flags as \`rnx mode three configure\`):
|
|
94
94
|
--background <id> · --gradient <stops> · --gradient-angle <deg>
|
|
95
95
|
--colorway <id> · --room on|off · --focus on|off · --focus-amount <id>
|
|
96
96
|
--focus-range <id> · --environment on|off · --env-shape/spread/size/color
|
|
97
97
|
--env-glow on|off · --env-plastic on|off
|
|
98
98
|
|
|
99
99
|
examples:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
rnx film flows/feed-scroll.yaml
|
|
101
|
+
rnx film flows/swap.yaml --script hero-arc --background gradient-tide --out ~/Desktop/swap-3d.mp4
|
|
102
|
+
rnx film flows/login.yaml --colorway deep-blue --environment on --env-shape pane --room on
|
|
103
103
|
`)
|
|
104
104
|
return 0
|
|
105
105
|
}
|
|
@@ -1102,17 +1102,16 @@ export function scoreInteractive(n: InteractiveNode): number {
|
|
|
1102
1102
|
return score
|
|
1103
1103
|
}
|
|
1104
1104
|
|
|
1105
|
-
// the copy-paste `
|
|
1105
|
+
// the copy-paste `rnx do` tap command for an interactive node.
|
|
1106
1106
|
export function tapCommandForNode(n: InteractiveNode): string {
|
|
1107
|
-
if (n.testID) return `
|
|
1107
|
+
if (n.testID) return `rnx do tap-id ${shellEscape(n.testID)}`
|
|
1108
1108
|
const text = typeof n.text === 'string' ? n.text.trim() : ''
|
|
1109
|
-
if (text.length > 0 && text.length <= 80)
|
|
1110
|
-
return `rnxsim do tap-text ${shellEscape(text)}`
|
|
1109
|
+
if (text.length > 0 && text.length <= 80) return `rnx do tap-text ${shellEscape(text)}`
|
|
1111
1110
|
const x =
|
|
1112
1111
|
Math.round(((n.absolutePosition?.x ?? 0) + (n.layout?.width ?? 0) / 2) * 10) / 10
|
|
1113
1112
|
const y =
|
|
1114
1113
|
Math.round(((n.absolutePosition?.y ?? 0) + (n.layout?.height ?? 0) / 2) * 10) / 10
|
|
1115
|
-
return `
|
|
1114
|
+
return `rnx do tap ${x} ${y}`
|
|
1116
1115
|
}
|
|
1117
1116
|
|
|
1118
1117
|
function shellEscape(value: string): string {
|
|
@@ -1154,7 +1153,7 @@ export const WAIT_READY_PROBE = `(async () => {
|
|
|
1154
1153
|
const loadingSignal = (value) => {
|
|
1155
1154
|
const text = cleanText(value)
|
|
1156
1155
|
if (!text) return ''
|
|
1157
|
-
return /^(opening app\\b|looking for your app\\b|building bundle\\b|preparing
|
|
1156
|
+
return /^(opening app\\b|looking for your app\\b|building bundle\\b|preparing rnx runtime\\b|loading native bundle\\b|loading rnx stubs\\b|loading bundle loader\\b|loading native stubs\\b|loading compat bridge\\b|loading react-native shim\\b|loading react bridge\\b|loading reconciler\\b|loading replacement modules\\b|injecting rnx modules\\b|warming sqlite engine\\b|capturing root component\\b|reloading app\\b|loading(?:[.!…]*)?$|connecting(?:[.!…]*)?$)/i.test(text)
|
|
1158
1157
|
? text
|
|
1159
1158
|
: ''
|
|
1160
1159
|
}
|
|
@@ -1342,7 +1341,7 @@ export function waitReadyReason(
|
|
|
1342
1341
|
> & { bridgeError?: string },
|
|
1343
1342
|
): string {
|
|
1344
1343
|
if (status.bridgeError) {
|
|
1345
|
-
return `sim unreachable: ${status.bridgeError} — the target tab is closed or no sim is connected (check \`
|
|
1344
|
+
return `sim unreachable: ${status.bridgeError} — the target tab is closed or no sim is connected (check \`rnx list\`, reopen with \`rnx open\`)`
|
|
1346
1345
|
}
|
|
1347
1346
|
const base = status.externalError
|
|
1348
1347
|
? `guest app errored: ${status.externalError}`
|
|
@@ -31,7 +31,7 @@ export async function runFindSubcommand(opts: {
|
|
|
31
31
|
// ranked-tappable list — same data source as --pressable, but the
|
|
32
32
|
// output prioritises high-signal targets the agent likely wants to
|
|
33
33
|
// tap next (visible, has text or testID, has accessibilityLabel),
|
|
34
|
-
// and emits a copy-paste `
|
|
34
|
+
// and emits a copy-paste `rnx do` command per row so the agent
|
|
35
35
|
// doesn't have to re-form a tap from raw fields.
|
|
36
36
|
const interactive = hasFlag('--interactive-targets') || hasFlag('--actions')
|
|
37
37
|
const bareText =
|
|
@@ -69,7 +69,7 @@ export async function runFindSubcommand(opts: {
|
|
|
69
69
|
if (jsonOut) {
|
|
70
70
|
if (mode === 'interactive-targets' && Array.isArray(result)) {
|
|
71
71
|
// include the `tap` command per row when emitting JSON for agents
|
|
72
|
-
// — the human renderer does the same. tooling that drives
|
|
72
|
+
// — the human renderer does the same. tooling that drives rnx
|
|
73
73
|
// can pick the highest-scored entry and execute its `tap` field.
|
|
74
74
|
printJson(rankInteractive(result).map((n) => ({ ...n, tap: tapCommandForNode(n) })))
|
|
75
75
|
} else {
|
package/cli/commands/inspect.ts
CHANGED
|
@@ -151,8 +151,8 @@ function formatNetworkDuration(ms: number | null): string {
|
|
|
151
151
|
function printRecoverHint(): void {
|
|
152
152
|
process.stderr.write(
|
|
153
153
|
` the sim is not responding. recover it with:\n` +
|
|
154
|
-
`
|
|
155
|
-
`
|
|
154
|
+
` rnx close --sim <id> # force-close the wedged sim\n` +
|
|
155
|
+
` rnx list # confirm it's gone\n`,
|
|
156
156
|
)
|
|
157
157
|
}
|
|
158
158
|
|
|
@@ -831,7 +831,7 @@ async function requireVisualKeyboard(bridge: WsBridge, actionLabel: string) {
|
|
|
831
831
|
process.exit(1)
|
|
832
832
|
}
|
|
833
833
|
console.error(
|
|
834
|
-
` ${actionLabel} requires the iOS keyboard to be visible. focus an input first with
|
|
834
|
+
` ${actionLabel} requires the iOS keyboard to be visible. focus an input first with rnx do tap-id/tap-text or rnx do type-into.`,
|
|
835
835
|
)
|
|
836
836
|
process.exit(1)
|
|
837
837
|
}
|
|
@@ -903,9 +903,9 @@ function keyCodeToVisualKey(code: string) {
|
|
|
903
903
|
}
|
|
904
904
|
|
|
905
905
|
function getInspectCommandName(subcommand: string, directSubcommand: string | null) {
|
|
906
|
-
if (directSubcommand === subcommand) return `
|
|
906
|
+
if (directSubcommand === subcommand) return `rnx ${subcommand}`
|
|
907
907
|
const group = getCliInspectVerbMeta(subcommand)?.group
|
|
908
|
-
return group ? `
|
|
908
|
+
return group ? `rnx ${group} ${subcommand}` : `rnx ${subcommand}`
|
|
909
909
|
}
|
|
910
910
|
|
|
911
911
|
function getInspectUsage(
|
|
@@ -956,7 +956,7 @@ async function recordInspectAction(
|
|
|
956
956
|
'`maestro keep` commits one action at a time',
|
|
957
957
|
)
|
|
958
958
|
} else {
|
|
959
|
-
console.error(' draft: action pending — `
|
|
959
|
+
console.error(' draft: action pending — `rnx maestro keep` to commit')
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
962
|
|
|
@@ -1099,14 +1099,14 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
1099
1099
|
const topLevelCommand = isTopLevel ? effectiveArgs[0] : null
|
|
1100
1100
|
// a usage string has to name something the user can actually type. the
|
|
1101
1101
|
// registry knows which group each verb belongs to, so an unprefixed
|
|
1102
|
-
// invocation still renders `
|
|
1102
|
+
// invocation still renders `rnx get tree` rather than a bare verb.
|
|
1103
1103
|
const inspectCommand = (name: string) => {
|
|
1104
1104
|
if (opts.internalPerfCommand && name === 'perf') {
|
|
1105
|
-
return `
|
|
1105
|
+
return `rnx perf ${opts.internalPerfCommand}`
|
|
1106
1106
|
}
|
|
1107
|
-
if (isTopLevel && name === effectiveArgs[0]) return `
|
|
1107
|
+
if (isTopLevel && name === effectiveArgs[0]) return `rnx ${name}`
|
|
1108
1108
|
const group = invocationPrefix ?? getCliInspectVerbMeta(name)?.group
|
|
1109
|
-
return group ? `
|
|
1109
|
+
return group ? `rnx ${group} ${name}` : `rnx ${name}`
|
|
1110
1110
|
}
|
|
1111
1111
|
const inspectUsage = (name: string, tail: string) =>
|
|
1112
1112
|
` usage: ${inspectCommand(name)}${tail ? ` ${tail}` : ''}`
|
|
@@ -1289,7 +1289,7 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
1289
1289
|
})
|
|
1290
1290
|
if (!settled) {
|
|
1291
1291
|
process.stderr.write(
|
|
1292
|
-
` ⚠ auto-wait timed out after ${elapsed ?? budgetMs}ms — next command may see mid-animation state. use \`
|
|
1292
|
+
` ⚠ auto-wait timed out after ${elapsed ?? budgetMs}ms — next command may see mid-animation state. use \`rnx do settle\` for a longer wait.\n`,
|
|
1293
1293
|
)
|
|
1294
1294
|
}
|
|
1295
1295
|
} catch {
|
|
@@ -1304,7 +1304,7 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
1304
1304
|
` tap failed: ${label} resolved to (${Math.round(x)},${Math.round(y)}), outside the ${screen?.width}x${screen?.height} screen`,
|
|
1305
1305
|
)
|
|
1306
1306
|
console.error(
|
|
1307
|
-
' the node exists but is scrolled out of view — scroll it on-screen first (
|
|
1307
|
+
' the node exists but is scrolled out of view — scroll it on-screen first (rnx do scroll / swipe), then tap.',
|
|
1308
1308
|
)
|
|
1309
1309
|
return
|
|
1310
1310
|
}
|
|
@@ -1527,7 +1527,7 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
1527
1527
|
if (!seen.has(kind) && n) parts.push(`${n} ${kind}${n === 1 ? '' : 's'}`)
|
|
1528
1528
|
}
|
|
1529
1529
|
if (parts.length === 0) return
|
|
1530
|
-
console.error(`\n since last: ${parts.join(' · ')} —
|
|
1530
|
+
console.error(`\n since last: ${parts.join(' · ')} — rnx what-happened`)
|
|
1531
1531
|
// advance cursor so the next CLI call only sees *new* events.
|
|
1532
1532
|
if (payload.summary.lastAt) {
|
|
1533
1533
|
try {
|
|
@@ -1593,7 +1593,7 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
1593
1593
|
const verboseTransitions =
|
|
1594
1594
|
(args.includes('--verbose') || args.includes('-v')) && !args.includes('--json')
|
|
1595
1595
|
if (invocationPrefix === 'do' && subcommand === 'shell') {
|
|
1596
|
-
console.error(' `
|
|
1596
|
+
console.error(' `rnx do shell` was removed. use `rnx shell ...` instead.')
|
|
1597
1597
|
process.exit(1)
|
|
1598
1598
|
}
|
|
1599
1599
|
if (writeCommands.has(subcommand)) {
|
|
@@ -2150,7 +2150,7 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
2150
2150
|
const payload = outcome.payload
|
|
2151
2151
|
|
|
2152
2152
|
if (payload?.error === 'bridge-not-ready') {
|
|
2153
|
-
console.error('
|
|
2153
|
+
console.error(' rnx test bridge not ready')
|
|
2154
2154
|
process.exit(1)
|
|
2155
2155
|
}
|
|
2156
2156
|
|
|
@@ -2297,7 +2297,7 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
2297
2297
|
| null
|
|
2298
2298
|
if (!payload) {
|
|
2299
2299
|
console.error(
|
|
2300
|
-
` tap-best: no testID or visible text matched "${query}". try \`
|
|
2300
|
+
` tap-best: no testID or visible text matched "${query}". try \`rnx find --interactive-targets\` to list candidates.`,
|
|
2301
2301
|
)
|
|
2302
2302
|
process.exit(1)
|
|
2303
2303
|
}
|
|
@@ -2307,7 +2307,7 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
2307
2307
|
}
|
|
2308
2308
|
if (payload.strategy === 'none') {
|
|
2309
2309
|
console.error(
|
|
2310
|
-
` tap-best: no testID or visible text matched "${query}". try \`
|
|
2310
|
+
` tap-best: no testID or visible text matched "${query}". try \`rnx find --interactive-targets\` to list candidates.`,
|
|
2311
2311
|
)
|
|
2312
2312
|
process.exit(1)
|
|
2313
2313
|
}
|
|
@@ -3646,24 +3646,24 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
3646
3646
|
const lc = code.toLowerCase()
|
|
3647
3647
|
const suggestions: string[] = []
|
|
3648
3648
|
if (lc.includes('sootsim:gohome') || lc.includes('gohome'))
|
|
3649
|
-
suggestions.push('
|
|
3649
|
+
suggestions.push('rnx shell home')
|
|
3650
3650
|
if (lc.includes('sootsim:appswitcher') || lc.includes('appswitcher'))
|
|
3651
|
-
suggestions.push('
|
|
3651
|
+
suggestions.push('rnx shell switcher')
|
|
3652
3652
|
if (lc.includes('keyboard.isvisible') || lc.includes('keyboard.getmode'))
|
|
3653
|
-
suggestions.push('
|
|
3654
|
-
if (lc.includes('interact.tap')) suggestions.push('
|
|
3655
|
-
if (lc.includes('keyboard.type')) suggestions.push('
|
|
3653
|
+
suggestions.push('rnx debug state keyboard')
|
|
3654
|
+
if (lc.includes('interact.tap')) suggestions.push('rnx do tap <x> <y>')
|
|
3655
|
+
if (lc.includes('keyboard.type')) suggestions.push('rnx do type <text>')
|
|
3656
3656
|
if (lc.includes('keyboard.press') || lc.includes('keyboard.dispatchkey'))
|
|
3657
|
-
suggestions.push('
|
|
3658
|
-
if (lc.includes('keyboard.dismiss')) suggestions.push('
|
|
3659
|
-
if (lc.includes('dumptree')) suggestions.push('
|
|
3660
|
-
if (lc.includes('dumpaccessibilitytree')) suggestions.push('
|
|
3661
|
-
if (lc.includes('getnodecount')) suggestions.push('
|
|
3662
|
-
if (lc.includes('findbytext')) suggestions.push('
|
|
3657
|
+
suggestions.push('rnx do key <name>')
|
|
3658
|
+
if (lc.includes('keyboard.dismiss')) suggestions.push('rnx do dismiss')
|
|
3659
|
+
if (lc.includes('dumptree')) suggestions.push('rnx get tree')
|
|
3660
|
+
if (lc.includes('dumpaccessibilitytree')) suggestions.push('rnx get a11y')
|
|
3661
|
+
if (lc.includes('getnodecount')) suggestions.push('rnx get count')
|
|
3662
|
+
if (lc.includes('findbytext')) suggestions.push('rnx find <text>')
|
|
3663
3663
|
if (lc.includes('findbytestid') || lc.includes('findbyid'))
|
|
3664
|
-
suggestions.push('
|
|
3664
|
+
suggestions.push('rnx find --testid <id>')
|
|
3665
3665
|
if (lc.includes('document.hidden'))
|
|
3666
|
-
suggestions.push('
|
|
3666
|
+
suggestions.push('rnx debug state keyboard (includes tab health)')
|
|
3667
3667
|
if (suggestions.length > 0) {
|
|
3668
3668
|
maybeHint('prefer-cli-over-eval', suggestions)
|
|
3669
3669
|
}
|
|
@@ -3734,7 +3734,7 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
3734
3734
|
|
|
3735
3735
|
case 'perf': {
|
|
3736
3736
|
if (invocationPrefix === 'debug' && !opts.internalPerfCommand) {
|
|
3737
|
-
console.error(' `
|
|
3737
|
+
console.error(' `rnx debug perf` was removed. use `rnx perf shell ...`.')
|
|
3738
3738
|
process.exit(1)
|
|
3739
3739
|
}
|
|
3740
3740
|
const perfCmd = positional[1]
|
|
@@ -4221,7 +4221,7 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
4221
4221
|
if (sub === 'get') {
|
|
4222
4222
|
const id = positional[2]
|
|
4223
4223
|
if (!id) {
|
|
4224
|
-
console.error(' usage:
|
|
4224
|
+
console.error(' usage: rnx network get <id>')
|
|
4225
4225
|
process.exit(1)
|
|
4226
4226
|
}
|
|
4227
4227
|
const entry = (await bridge.send({
|
|
@@ -4524,7 +4524,7 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
4524
4524
|
}
|
|
4525
4525
|
} catch (err: any) {
|
|
4526
4526
|
const message = err instanceof Error ? err.message : String(err)
|
|
4527
|
-
console.error(` ${subcommand ?? '
|
|
4527
|
+
console.error(` ${subcommand ?? 'rnx'} failed: ${message}`)
|
|
4528
4528
|
const unknownSim = /^no sim connected with id ([^;]+)(?:; connected sims: .+)?$/.exec(
|
|
4529
4529
|
message,
|
|
4530
4530
|
)
|
|
@@ -4557,9 +4557,9 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
4557
4557
|
process.stderr.write(
|
|
4558
4558
|
` the sim is still responsive — '${cmd}' just exceeded the ${timedOut[1]}s command budget.\n` +
|
|
4559
4559
|
` the screen's node tree is large; narrow the query or raise the budget:\n` +
|
|
4560
|
-
`
|
|
4561
|
-
`
|
|
4562
|
-
`
|
|
4560
|
+
` rnx ${cmd} --testid <id> # scope to one subtree\n` +
|
|
4561
|
+
` rnx find --testid <id> # targeted single-node lookup\n` +
|
|
4562
|
+
` rnx ${cmd} --timeout 60000 # raise per-command budget (ms)\n`,
|
|
4563
4563
|
)
|
|
4564
4564
|
} else {
|
|
4565
4565
|
printRecoverHint()
|
|
@@ -223,22 +223,22 @@ async function installWindowsExe(exePath: string): Promise<string> {
|
|
|
223
223
|
export async function runInstallDesktop(args: string[]) {
|
|
224
224
|
if (args.includes('--help') || args.includes('-h')) {
|
|
225
225
|
console.log(`
|
|
226
|
-
|
|
226
|
+
rnx desktop install — download and install the optional desktop GUI
|
|
227
227
|
|
|
228
228
|
the CLI + daemon are the canonical rnx surface; the GUI is optional.
|
|
229
229
|
if you just want to drive a running metro/expo dev server from the
|
|
230
230
|
terminal, you don't need this.
|
|
231
231
|
|
|
232
232
|
usage:
|
|
233
|
-
|
|
233
|
+
rnx desktop install [options]
|
|
234
234
|
|
|
235
235
|
options:
|
|
236
236
|
-y, --yes skip confirmation and install immediately
|
|
237
237
|
--force reinstall even if the companion is already present
|
|
238
238
|
|
|
239
239
|
examples:
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
rnx desktop install
|
|
241
|
+
rnx desktop install --yes
|
|
242
242
|
`)
|
|
243
243
|
process.exit(0)
|
|
244
244
|
}
|
|
@@ -253,7 +253,7 @@ examples:
|
|
|
253
253
|
|
|
254
254
|
const existing = findDesktopCompanion()
|
|
255
255
|
if (existing && !force) {
|
|
256
|
-
console.log(`
|
|
256
|
+
console.log(` rnx desktop already installed at: ${existing.path}`)
|
|
257
257
|
console.log(' pass --force to reinstall.')
|
|
258
258
|
return
|
|
259
259
|
}
|
|
@@ -309,7 +309,7 @@ examples:
|
|
|
309
309
|
console.error(
|
|
310
310
|
' network blocked the request. check your connection and try again later;',
|
|
311
311
|
)
|
|
312
|
-
console.error(' the CLI + daemon work without the desktop app (run:
|
|
312
|
+
console.error(' the CLI + daemon work without the desktop app (run: rnx --help).')
|
|
313
313
|
process.exit(1)
|
|
314
314
|
}
|
|
315
315
|
|
|
@@ -346,6 +346,6 @@ examples:
|
|
|
346
346
|
|
|
347
347
|
console.log()
|
|
348
348
|
console.log(' next steps:')
|
|
349
|
-
console.log('
|
|
350
|
-
console.log('
|
|
349
|
+
console.log(' rnx desktop launch the desktop app')
|
|
350
|
+
console.log(' rnx open <target> open a demo or bundle in it')
|
|
351
351
|
}
|
package/cli/commands/login.ts
CHANGED
|
@@ -29,10 +29,10 @@ async function resolveDefaultAuthOrigin(explicitOrigin?: string) {
|
|
|
29
29
|
|
|
30
30
|
function printHelp() {
|
|
31
31
|
console.log(`
|
|
32
|
-
|
|
32
|
+
rnx login — sign in so uploads can attach to your account
|
|
33
33
|
|
|
34
34
|
usage:
|
|
35
|
-
|
|
35
|
+
rnx login [--origin <url>]
|
|
36
36
|
|
|
37
37
|
options:
|
|
38
38
|
--origin <url> auth host (default: auto)
|
|
@@ -246,7 +246,7 @@ export async function runLogin(args: string[]) {
|
|
|
246
246
|
|
|
247
247
|
if (!token) {
|
|
248
248
|
res.end(
|
|
249
|
-
renderCallbackPage('missing token. close this tab and retry `
|
|
249
|
+
renderCallbackPage('missing token. close this tab and retry `rnx login`.'),
|
|
250
250
|
)
|
|
251
251
|
finish({ ok: false, error: 'missing token' })
|
|
252
252
|
return
|
|
@@ -256,7 +256,7 @@ export async function runLogin(args: string[]) {
|
|
|
256
256
|
finish({ ok: true, token, email, userId })
|
|
257
257
|
} catch (err) {
|
|
258
258
|
res.statusCode = 500
|
|
259
|
-
res.end(renderCallbackPage('sign-in callback failed. retry `
|
|
259
|
+
res.end(renderCallbackPage('sign-in callback failed. retry `rnx login`.'))
|
|
260
260
|
finish({
|
|
261
261
|
ok: false,
|
|
262
262
|
error: err instanceof Error ? err.message : 'callback failed',
|
|
@@ -268,7 +268,7 @@ export async function runLogin(args: string[]) {
|
|
|
268
268
|
finish({
|
|
269
269
|
ok: false,
|
|
270
270
|
error:
|
|
271
|
-
'timed out waiting for the browser sign-in (5 minutes). rerun `
|
|
271
|
+
'timed out waiting for the browser sign-in (5 minutes). rerun `rnx login` and complete the github authorize screen if it appears.',
|
|
272
272
|
})
|
|
273
273
|
}, LOGIN_TIMEOUT_MS)
|
|
274
274
|
|
|
@@ -284,7 +284,7 @@ export async function runLogin(args: string[]) {
|
|
|
284
284
|
url.searchParams.set('port', String(address.port))
|
|
285
285
|
url.searchParams.set('contrast', origin)
|
|
286
286
|
|
|
287
|
-
console.log(' opening browser for
|
|
287
|
+
console.log(' opening browser for rnx login...')
|
|
288
288
|
console.log(
|
|
289
289
|
' first time here? github will show an authorize screen. approve it to continue.',
|
|
290
290
|
)
|
|
@@ -303,13 +303,13 @@ function buildFlowArgs(
|
|
|
303
303
|
export async function runMaestroGenerate(args: string[]): Promise<number> {
|
|
304
304
|
const promptArg = findPrompt(args)
|
|
305
305
|
if (!promptArg) {
|
|
306
|
-
console.error(' usage:
|
|
306
|
+
console.error(' usage: rnx maestro generate "test goal"')
|
|
307
307
|
return 1
|
|
308
308
|
}
|
|
309
309
|
const { prompt, index: promptIndex } = promptArg
|
|
310
310
|
const cliAuth = resolveCliAuth()
|
|
311
311
|
if (!cliAuth || cliAuth.kind === 'github') {
|
|
312
|
-
console.error('
|
|
312
|
+
console.error(' rnx maestro generate "<goal>" needs a login or RNX_API_KEY.')
|
|
313
313
|
console.error(' API keys must include preview_upload and llm scopes.')
|
|
314
314
|
return 1
|
|
315
315
|
}
|