rnxsim 0.1.335 → 0.1.337
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +104 -76
- package/cli/auth.ts +2 -2
- package/cli/bin.ts +7 -3
- package/cli/bridge-flow-runner.ts +2 -2
- package/cli/commands/agent-wrapper.ts +1 -1
- package/cli/commands/agent.ts +12 -12
- package/cli/commands/app-fonts.ts +1 -1
- package/cli/commands/assert.ts +7 -7
- package/cli/commands/auth.ts +4 -4
- package/cli/commands/camera.ts +13 -13
- package/cli/commands/cleanup.ts +6 -6
- package/cli/commands/compat.ts +4 -4
- package/cli/commands/config.ts +2 -2
- package/cli/commands/control.ts +37 -43
- package/cli/commands/cpu-profile.ts +2 -2
- package/cli/commands/daemon-mac-app.ts +2 -2
- package/cli/commands/daemon.ts +12 -12
- package/cli/commands/debug.ts +22 -22
- package/cli/commands/desktop.ts +3 -3
- package/cli/commands/detox.ts +17 -17
- package/cli/commands/device.ts +9 -9
- package/cli/commands/diagnose.ts +11 -11
- package/cli/commands/electron.ts +7 -7
- package/cli/commands/film.ts +6 -6
- package/cli/commands/inspect/core.ts +6 -7
- package/cli/commands/inspect/find.ts +2 -2
- package/cli/commands/inspect.ts +36 -36
- package/cli/commands/install-desktop.ts +8 -8
- package/cli/commands/login.ts +6 -6
- package/cli/commands/maestro-generate.ts +2 -2
- package/cli/commands/maestro.ts +23 -23
- package/cli/commands/mode.ts +4 -4
- package/cli/commands/no-bridge-hint.ts +9 -9
- package/cli/commands/perf.ts +11 -11
- package/cli/commands/permissions.ts +5 -5
- package/cli/commands/profile.ts +11 -11
- package/cli/commands/react.ts +15 -15
- package/cli/commands/record.ts +15 -15
- package/cli/commands/report-issue.ts +2 -2
- package/cli/commands/reset.ts +2 -2
- package/cli/commands/runtime.ts +18 -18
- package/cli/commands/screenshot-mode.ts +5 -5
- package/cli/commands/screenshot.ts +12 -12
- package/cli/commands/screenshots-capture.ts +7 -7
- package/cli/commands/screenshots.ts +6 -6
- package/cli/commands/serve.ts +6 -6
- package/cli/commands/setup.ts +13 -15
- package/cli/commands/skills.ts +14 -14
- package/cli/commands/slides.ts +19 -23
- package/cli/commands/state.ts +2 -2
- package/cli/commands/storage.ts +3 -3
- package/cli/commands/telemetry.ts +1 -1
- package/cli/commands/three-mode.ts +16 -16
- package/cli/commands/timeline.ts +4 -4
- package/cli/commands/upgrade.ts +1 -1
- package/cli/commands/upload.ts +11 -11
- package/cli/commands/version.ts +3 -5
- package/cli/commands/what-happened.ts +11 -11
- package/cli/drivers/electron.ts +3 -3
- package/cli/hints.ts +8 -8
- package/cli/recording-access.ts +1 -1
- package/cli/ws-bridge.ts +5 -5
- package/dist-cli/bin.js +5 -5
- package/dist-cli/chunks/{agent-XSJMAFVA.js → agent-QQ3RJNRY.js} +14 -14
- package/dist-cli/chunks/{agent-wrapper-NFLJ5K64.js → agent-wrapper-M6SQSMRY.js} +3 -3
- package/dist-cli/chunks/app-fonts-F6NDV3XC.js +4 -0
- package/dist-cli/chunks/{assert-ILAXIYB5.js → assert-5VB3KQNK.js} +12 -12
- package/dist-cli/chunks/auth-PFXODKFN.js +12 -0
- package/dist-cli/chunks/{beta-TDR6UKJU.js → beta-WUWYHT4F.js} +2 -2
- package/dist-cli/chunks/camera-V3MMTKP7.js +33 -0
- package/dist-cli/chunks/{chunk-INBPUR4T.js → chunk-2ANFH72P.js} +11 -11
- package/dist-cli/chunks/chunk-2GIA5T6B.js +74 -0
- package/dist-cli/chunks/{chunk-GP6QEBZA.js → chunk-4FRSEZ7Z.js} +1 -1
- package/dist-cli/chunks/{chunk-USGOQ3YJ.js → chunk-4GXBZHNA.js} +2 -2
- package/dist-cli/chunks/{chunk-R3CMECGC.js → chunk-4HESY5E7.js} +4 -4
- package/dist-cli/chunks/{chunk-WKT7YM5Q.js → chunk-4VJEXQGD.js} +1 -1
- package/dist-cli/chunks/{chunk-FE6ZHPKD.js → chunk-5LJNNHZH.js} +1 -1
- package/dist-cli/chunks/{chunk-I2HQB5NN.js → chunk-5QXGSTYI.js} +2 -2
- package/dist-cli/chunks/{chunk-FJSHIWAM.js → chunk-5SHAOQHJ.js} +2 -2
- package/dist-cli/chunks/{chunk-CGZWLSYD.js → chunk-5UPRBMIG.js} +1 -1
- package/dist-cli/chunks/{chunk-ZTM2MKNI.js → chunk-5ZEFRPCC.js} +1 -1
- package/dist-cli/chunks/{chunk-RTD3CPDQ.js → chunk-6ART4XVJ.js} +23 -23
- package/dist-cli/chunks/{chunk-MTD6IAEA.js → chunk-6CAUT2LH.js} +1 -1
- package/dist-cli/chunks/{chunk-ZYHCWCMM.js → chunk-7ATIH7OU.js} +1 -1
- package/dist-cli/chunks/{chunk-RVUGKXJD.js → chunk-7Q4QKHMA.js} +1 -1
- package/dist-cli/chunks/{chunk-MTNIDSOA.js → chunk-ABK2V2PR.js} +1 -1
- package/dist-cli/chunks/{chunk-TL4DNDDY.js → chunk-B53ILAHI.js} +2 -2
- package/dist-cli/chunks/{chunk-POC3QTA6.js → chunk-BSSVLFZR.js} +2 -2
- package/dist-cli/chunks/chunk-BVOBXTPN.js +30 -0
- package/dist-cli/chunks/{chunk-4KC35DMK.js → chunk-CPDEUWL5.js} +2 -2
- package/dist-cli/chunks/{chunk-HNQLZZJA.js → chunk-DINU267S.js} +2 -2
- package/dist-cli/chunks/{chunk-DCDKJ4NC.js → chunk-DQQ4CZVC.js} +2 -2
- package/dist-cli/chunks/{chunk-JWAY6DIH.js → chunk-EDWN2HOO.js} +18 -18
- package/dist-cli/chunks/{chunk-3CS4EUMG.js → chunk-EWVG4A3B.js} +2 -2
- package/dist-cli/chunks/{chunk-RTEJXUXN.js → chunk-F3NKCQHM.js} +6 -6
- package/dist-cli/chunks/{chunk-M7CBQ5I4.js → chunk-GEAGFYKP.js} +1 -1
- package/dist-cli/chunks/chunk-GGNH44PZ.js +5 -0
- package/dist-cli/chunks/{chunk-YSUIYK6B.js → chunk-HAHJJJUC.js} +2 -2
- package/dist-cli/chunks/chunk-HPJ5EKIZ.js +4 -0
- package/dist-cli/chunks/{chunk-IN2PZBQD.js → chunk-IBTHGFKE.js} +2 -2
- package/dist-cli/chunks/{chunk-ZZWO6Y7X.js → chunk-J6BYRRZQ.js} +2 -2
- package/dist-cli/chunks/{chunk-6Y3PVPTF.js → chunk-JK4OZ2TQ.js} +5 -5
- package/dist-cli/chunks/{chunk-PO3TOAED.js → chunk-KGQAO25M.js} +2 -2
- package/dist-cli/chunks/{chunk-J7XFINJG.js → chunk-L6UUIQE7.js} +2 -2
- package/dist-cli/chunks/{chunk-35XNGT5C.js → chunk-LXYLCETR.js} +1 -1
- package/dist-cli/chunks/{chunk-JWK5WD44.js → chunk-LZAL3DMP.js} +2 -2
- package/dist-cli/chunks/{chunk-3ZDOPKHE.js → chunk-M43UU7UG.js} +4 -4
- package/dist-cli/chunks/{chunk-ROPHZJ6P.js → chunk-M4LGUVBM.js} +2 -2
- package/dist-cli/chunks/{chunk-RELRA5VW.js → chunk-NCG6C5AH.js} +2 -2
- package/dist-cli/chunks/{chunk-42KDXJUD.js → chunk-NR5TSR2Y.js} +2 -2
- package/dist-cli/chunks/{chunk-R2UL5VFY.js → chunk-OCPWXT73.js} +3 -3
- package/dist-cli/chunks/{chunk-VV4MXLFR.js → chunk-ODKS6JUJ.js} +1 -1
- package/dist-cli/chunks/{chunk-F33DUJGG.js → chunk-R2WBREGQ.js} +1 -1
- package/dist-cli/chunks/chunk-RKY3ZNTA.js +5 -0
- package/dist-cli/chunks/{chunk-MGGRL2Z2.js → chunk-SW7BHOMO.js} +9 -9
- package/dist-cli/chunks/{chunk-GVKISFQ3.js → chunk-TJTLXG3R.js} +1 -1
- package/dist-cli/chunks/chunk-TNI4PW75.js +124 -0
- package/dist-cli/chunks/{chunk-CL3PREIE.js → chunk-UWEDNDND.js} +2 -2
- package/dist-cli/chunks/{chunk-IV36DY6M.js → chunk-WRID5SBV.js} +1 -1
- package/dist-cli/chunks/{chunk-42ALI64M.js → chunk-WUYI3XJ5.js} +2 -2
- package/dist-cli/chunks/{chunk-6VN5ULGQ.js → chunk-X7MHCEGG.js} +2 -2
- package/dist-cli/chunks/chunk-XIQFYLWD.js +15 -0
- package/dist-cli/chunks/{chunk-LCVUJCRJ.js → chunk-ZUK5ZQU7.js} +1 -1
- package/dist-cli/chunks/{cleanup-X6ZRPFDV.js → cleanup-6WBS3MUO.js} +10 -10
- package/dist-cli/chunks/cli-version-HUQCDGMA.js +4 -0
- package/dist-cli/chunks/{compat-VRXJ5J56.js → compat-2WOPKJYK.js} +9 -9
- package/dist-cli/chunks/{config-LHPPE4EP.js → config-FPD7WUYB.js} +5 -5
- package/dist-cli/chunks/{control-TVTNGSSF.js → control-B3XNER7I.js} +2 -2
- package/dist-cli/chunks/daemon-T4D4X2P5.js +4 -0
- package/dist-cli/chunks/{debug-EUHBBPGM.js → debug-LKV5CEAV.js} +17 -17
- package/dist-cli/chunks/desktop-EMDPOYQT.js +31 -0
- package/dist-cli/chunks/detox-4J4UTZE7.js +52 -0
- package/dist-cli/chunks/{device-PONITUZJ.js → device-PMZ7RPXQ.js} +11 -11
- package/dist-cli/chunks/{diagnose-2PN4K4L2.js → diagnose-MLEP727D.js} +12 -12
- package/dist-cli/chunks/{disk-cleanup-U2PQLOEW.js → disk-cleanup-CVEDIPEE.js} +2 -2
- package/dist-cli/chunks/drivers-NTUKJEL6.js +4 -0
- package/dist-cli/chunks/{film-XGZCFTQL.js → film-4RNECABF.js} +9 -9
- package/dist-cli/chunks/flow-5IOCAHVO.js +4 -0
- package/dist-cli/chunks/help-NUJUYEWP.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-I4MYF5CO.js → hidden-runtime-alias-YIF25W4F.js} +2 -2
- package/dist-cli/chunks/{home-paths-YRAPZ5LE.js → home-paths-WNJCCCCZ.js} +2 -2
- package/dist-cli/chunks/inspect-MFEIYUCN.js +4 -0
- package/dist-cli/chunks/install-desktop-NB65KI4D.js +4 -0
- package/dist-cli/chunks/{login-ZMAIAQ6F.js → login-VEHHGN42.js} +6 -6
- package/dist-cli/chunks/{logout-UQZ5JBJU.js → logout-VE7PNXL2.js} +2 -2
- package/dist-cli/chunks/{maestro-BQYKDUC4.js → maestro-ZXHTDEOI.js} +25 -25
- package/dist-cli/chunks/{maestro-generate-VQYMMQJ5.js → maestro-generate-TK33E2Z6.js} +3 -3
- package/dist-cli/chunks/mode-ZDKJ56NT.js +26 -0
- package/dist-cli/chunks/{optional-demo-registry-DUWHCLGD.js → optional-demo-registry-GBZ3WVDW.js} +2 -2
- package/dist-cli/chunks/{perf-7RAU7WRZ.js → perf-JXNZOUKW.js} +28 -28
- package/dist-cli/chunks/permissions-WQ62PW7Y.js +13 -0
- package/dist-cli/chunks/record-4S3ZMDIO.js +72 -0
- package/dist-cli/chunks/{report-issue-P376KFFU.js → report-issue-KKBADTWO.js} +4 -4
- package/dist-cli/chunks/reset-H5XIISJE.js +4 -0
- package/dist-cli/chunks/runtime-FK7EEMWA.js +4 -0
- package/dist-cli/chunks/{screenshot-command-NE7BKTQ2.js → screenshot-command-42U5MVQL.js} +34 -34
- package/dist-cli/chunks/{screenshot-layers-UE4R64PZ.js → screenshot-layers-4G42AHOX.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-ULXPLXMC.js → screenshots-capture-HMQ2OO3I.js} +11 -11
- package/dist-cli/chunks/{serve-P7BT4XHR.js → serve-S4V5EDW2.js} +16 -16
- package/dist-cli/chunks/setup-T43V7GA6.js +32 -0
- package/dist-cli/chunks/{skills-NTRYKJSF.js → skills-O426K26J.js} +16 -16
- package/dist-cli/chunks/{state-4D5YAM47.js → state-ZEEPDKJG.js} +5 -5
- package/dist-cli/chunks/storage-4GQLOFGG.js +37 -0
- package/dist-cli/chunks/store-RFMSNWLJ.js +4 -0
- package/dist-cli/chunks/telemetry-NFAAPSMN.js +4 -0
- package/dist-cli/chunks/{timeline-GZNFGD3Q.js → timeline-ONCYX7KW.js} +6 -6
- package/dist-cli/chunks/{upgrade-A46D6PEY.js → upgrade-A36T52AM.js} +2 -2
- package/dist-cli/chunks/upload-36O32DII.js +4 -0
- package/dist-cli/chunks/version-67HA253N.js +6 -0
- package/dist-cli/chunks/{web-H2IXO5SC.js → web-PWXQHQIE.js} +2 -2
- package/dist-cli/chunks/{what-happened-Z7UII5GH.js → what-happened-WNXE622R.js} +16 -16
- package/dist-lib/agent-daemon-client.cjs +5 -5
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +4 -4
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +7 -7
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +248 -98
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +2 -2
- package/dist-lib/menu.mjs +2 -2
- package/dist-lib/metro-host-modules/react-dom.js +6 -0
- package/dist-lib/metro-host-modules/react-native-web.js +6 -0
- package/dist-lib/metro-host-modules/react-native.js +6 -0
- package/dist-lib/metro-host-modules/react.js +6 -0
- package/dist-lib/metro-host-modules/react__jsx-dev-runtime.js +6 -0
- package/dist-lib/metro-host-modules/react__jsx-runtime.js +6 -0
- package/dist-lib/metro-production-bundle.cjs +72 -0
- package/dist-lib/metro-production-bundle.mjs +44 -0
- package/dist-lib/metro.cjs +152 -8
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +2 -2
- package/dist-lib/react-native-host-modules.cjs +50 -0
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +6 -7
- package/dist-lib/sdk.mjs +6 -7
- package/dist-lib/skills.cjs +71 -77
- package/dist-lib/vite.cjs +104 -85
- package/package.json +15 -2
- package/scripts/preuninstall.cjs +1 -1
- package/skills/contrast/SKILL.md +67 -75
- package/skills/rnx-debug/SKILL.md +84 -84
- package/skills/rnx-perf/SKILL.md +8 -8
- package/skills/rnx-setup/SKILL.md +54 -54
- package/skills/rnx-test/SKILL.md +35 -35
- package/skills/rnx-visual/SKILL.md +18 -18
- package/src/agent-daemon-client.ts +2 -2
- package/src/agent-sessions.ts +2 -2
- package/src/connect.ts +6 -6
- package/src/disk-cleanup.ts +1 -1
- package/src/home-paths.ts +1 -1
- package/src/host/bridge-host.ts +6 -6
- package/src/index.ts +1 -1
- package/src/metro-host-modules/react-dom.js +6 -0
- package/src/metro-host-modules/react-native-web.js +6 -0
- package/src/metro-host-modules/react-native.js +6 -0
- package/src/metro-host-modules/react.js +6 -0
- package/src/metro-host-modules/react__jsx-dev-runtime.js +6 -0
- package/src/metro-host-modules/react__jsx-runtime.js +6 -0
- package/src/metro-plugin.ts +249 -10
- package/src/metro-production-bundle.ts +51 -0
- package/src/public-brand.ts +1 -1
- package/src/react-native-host-modules.ts +25 -0
- package/src/runtime-assets.ts +1 -1
- package/src/sim-client.ts +1 -1
- package/src/vite-plugin-one.ts +171 -145
- package/dist-cli/chunks/app-fonts-L3UXFYVE.js +0 -4
- package/dist-cli/chunks/auth-ISX2EUQL.js +0 -12
- package/dist-cli/chunks/camera-4SWTNJUA.js +0 -33
- package/dist-cli/chunks/chunk-BRHZEZKN.js +0 -124
- package/dist-cli/chunks/chunk-EJPYPJWP.js +0 -5
- package/dist-cli/chunks/chunk-KWCD5MOK.js +0 -15
- package/dist-cli/chunks/chunk-MJ7QGY7Z.js +0 -4
- package/dist-cli/chunks/chunk-RSA4XWHN.js +0 -5
- package/dist-cli/chunks/chunk-S3EIOAWZ.js +0 -74
- package/dist-cli/chunks/chunk-TYANJQLO.js +0 -30
- package/dist-cli/chunks/cli-version-NZUSWKZR.js +0 -4
- package/dist-cli/chunks/daemon-XUEC47EC.js +0 -4
- package/dist-cli/chunks/desktop-LLHMP4A3.js +0 -31
- package/dist-cli/chunks/detox-QLNWLXA4.js +0 -52
- package/dist-cli/chunks/drivers-7IU37M2E.js +0 -4
- package/dist-cli/chunks/flow-NZZLR4BN.js +0 -4
- package/dist-cli/chunks/help-D7URIJRD.js +0 -4
- package/dist-cli/chunks/inspect-TJYWKY56.js +0 -4
- package/dist-cli/chunks/install-desktop-LD3W5RS7.js +0 -4
- package/dist-cli/chunks/mode-ZQ6H7KWM.js +0 -26
- package/dist-cli/chunks/permissions-DRZ3HCFL.js +0 -13
- package/dist-cli/chunks/record-J5JAYW4Y.js +0 -72
- package/dist-cli/chunks/reset-KXYRDEFU.js +0 -4
- package/dist-cli/chunks/runtime-66CEPOG6.js +0 -4
- package/dist-cli/chunks/setup-QO5KZAX3.js +0 -32
- package/dist-cli/chunks/storage-X2K2MDPX.js +0 -37
- package/dist-cli/chunks/store-TUJPIRTT.js +0 -4
- package/dist-cli/chunks/telemetry-CF5DVEKI.js +0 -4
- package/dist-cli/chunks/upload-UIQJIBEZ.js +0 -4
- package/dist-cli/chunks/version-CMBB3FXL.js +0 -6
package/cli/commands/camera.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// rnx camera drives the host-owned camera source. fixture video uses the
|
|
2
2
|
// same hidden video, canvas frame pump, ImageBitmap transfer, and
|
|
3
3
|
// BarcodeDetector loop as a real device camera. `do scan` remains the narrow
|
|
4
4
|
// synthetic special case for callers that have a payload string but no media.
|
|
@@ -22,13 +22,13 @@ const VIDEO_EXTENSIONS = new Set(['.m4v', '.mov', '.mp4', '.webm'])
|
|
|
22
22
|
|
|
23
23
|
function printHelp() {
|
|
24
24
|
console.log(`
|
|
25
|
-
|
|
25
|
+
rnx camera — control the simulator camera source
|
|
26
26
|
|
|
27
27
|
usage:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
rnx camera play <file> [--loop] [--rate <number>]
|
|
29
|
+
rnx camera stop
|
|
30
|
+
rnx camera status [--json]
|
|
31
|
+
rnx do scan <text> [--format <web-format>]
|
|
32
32
|
|
|
33
33
|
subcommands:
|
|
34
34
|
play <file> replace the active camera source with a local video fixture
|
|
@@ -45,11 +45,11 @@ options:
|
|
|
45
45
|
--port <p> WS bridge port (default: 7668)
|
|
46
46
|
|
|
47
47
|
examples:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
rnx camera play ./fixtures/qr.mp4 --loop
|
|
49
|
+
rnx camera play ./fixtures/document.webm --rate 2
|
|
50
|
+
rnx camera status
|
|
51
|
+
rnx camera stop
|
|
52
|
+
rnx do scan "https://example.com" --format qr_code
|
|
53
53
|
`)
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -126,7 +126,7 @@ export async function runCamera(
|
|
|
126
126
|
if (subcommand === 'scan') {
|
|
127
127
|
const text = positional[1]
|
|
128
128
|
if (!text) {
|
|
129
|
-
console.error(' usage:
|
|
129
|
+
console.error(' usage: rnx do scan <text>')
|
|
130
130
|
return 1
|
|
131
131
|
}
|
|
132
132
|
const formatFlag = args.indexOf('--format')
|
|
@@ -164,7 +164,7 @@ export async function runCamera(
|
|
|
164
164
|
if (subcommand === 'play') {
|
|
165
165
|
const input = positional[1]
|
|
166
166
|
if (!input) {
|
|
167
|
-
console.error(' usage:
|
|
167
|
+
console.error(' usage: rnx camera play <file> [--loop] [--rate <number>]')
|
|
168
168
|
return 1
|
|
169
169
|
}
|
|
170
170
|
const sourcePath = path.resolve(input)
|
package/cli/commands/cleanup.ts
CHANGED
|
@@ -35,13 +35,13 @@ function summarize(entries: SootsimCleanupEntry[]): string[] {
|
|
|
35
35
|
|
|
36
36
|
function printHelp(): void {
|
|
37
37
|
console.log(`
|
|
38
|
-
|
|
38
|
+
rnx cleanup — inspect and reclaim local rnx disk usage
|
|
39
39
|
|
|
40
40
|
usage:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
rnx cleanup
|
|
42
|
+
rnx cleanup --apply
|
|
43
|
+
rnx cleanup --aggressive
|
|
44
|
+
rnx cleanup --apply --aggressive
|
|
45
45
|
|
|
46
46
|
The default is a read-only preview. --apply removes downloaded runtime archives,
|
|
47
47
|
old runtimes outside a two-version rollback window, and disposable browser
|
|
@@ -151,7 +151,7 @@ export async function runCleanup(args: string[]): Promise<number> {
|
|
|
151
151
|
console.log(` reclaimable now: ${formatSootsimBytes(plan.reclaimableBytes)}`)
|
|
152
152
|
if (!apply) {
|
|
153
153
|
console.log(
|
|
154
|
-
` preview only — run \`
|
|
154
|
+
` preview only — run \`rnx cleanup --apply${
|
|
155
155
|
aggressive ? ' --aggressive' : ''
|
|
156
156
|
}\` to remove these items`,
|
|
157
157
|
)
|
package/cli/commands/compat.ts
CHANGED
|
@@ -19,12 +19,12 @@ interface PackageManifest {
|
|
|
19
19
|
export async function runCompat(args: string[]): Promise<void> {
|
|
20
20
|
if (args.includes('--help') || args.includes('-h')) {
|
|
21
21
|
console.log(`
|
|
22
|
-
|
|
22
|
+
rnx compat — check package compatibility
|
|
23
23
|
|
|
24
24
|
usage:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
rnx compat [package-name]
|
|
26
|
+
rnx compat --json
|
|
27
|
+
rnx compat --brief
|
|
28
28
|
|
|
29
29
|
flags:
|
|
30
30
|
--json machine-readable output
|
package/cli/commands/config.ts
CHANGED
|
@@ -2,10 +2,10 @@ import { runTelemetry } from './telemetry'
|
|
|
2
2
|
|
|
3
3
|
function printHelp(): void {
|
|
4
4
|
console.log(`
|
|
5
|
-
|
|
5
|
+
rnx config — manage local CLI preferences
|
|
6
6
|
|
|
7
7
|
usage:
|
|
8
|
-
|
|
8
|
+
rnx config telemetry [on|off|status]
|
|
9
9
|
|
|
10
10
|
environment:
|
|
11
11
|
SOOTSIM_HINTS=off suppress CLI hints
|
package/cli/commands/control.ts
CHANGED
|
@@ -201,7 +201,7 @@ export async function ensureBridgeForOpen(
|
|
|
201
201
|
}
|
|
202
202
|
if (lock && isDaemonLockfileFresh(lock)) {
|
|
203
203
|
throw new Error(
|
|
204
|
-
`rnx bridge lockfile is fresh (port ${lock.bridgePort}) but the bridge is not reachable. run \`
|
|
204
|
+
`rnx bridge lockfile is fresh (port ${lock.bridgePort}) but the bridge is not reachable. run \`rnx daemon restart\` or \`rnx daemon uninstall\`.`,
|
|
205
205
|
)
|
|
206
206
|
}
|
|
207
207
|
|
|
@@ -499,18 +499,18 @@ function parseOpenRuntimeConfig(args: string[]): SootSimConfig | undefined {
|
|
|
499
499
|
if (args[i] === '--replace') {
|
|
500
500
|
const raw = args[i + 1]
|
|
501
501
|
if (!raw) {
|
|
502
|
-
console.error('
|
|
502
|
+
console.error(' rnx open: --replace expects <module>=<file>')
|
|
503
503
|
process.exit(1)
|
|
504
504
|
}
|
|
505
505
|
const eqIndex = raw.indexOf('=')
|
|
506
506
|
if (eqIndex <= 0 || eqIndex === raw.length - 1) {
|
|
507
|
-
console.error('
|
|
507
|
+
console.error(' rnx open: --replace expects <module>=<file>')
|
|
508
508
|
process.exit(1)
|
|
509
509
|
}
|
|
510
510
|
const moduleName = raw.slice(0, eqIndex).trim()
|
|
511
511
|
const filePath = normalizeReplacementPath(raw.slice(eqIndex + 1).trim())
|
|
512
512
|
if (!fs.existsSync(filePath)) {
|
|
513
|
-
console.error(`
|
|
513
|
+
console.error(` rnx open: replacement file not found: ${filePath}`)
|
|
514
514
|
process.exit(1)
|
|
515
515
|
}
|
|
516
516
|
modules[moduleName] = { file: filePath }
|
|
@@ -524,7 +524,7 @@ function parseOpenRuntimeConfig(args: string[]): SootSimConfig | undefined {
|
|
|
524
524
|
const raw = args[i + 1]
|
|
525
525
|
const eqIndex = raw ? raw.indexOf('=') : -1
|
|
526
526
|
if (!raw || eqIndex <= 0 || eqIndex === raw.length - 1) {
|
|
527
|
-
console.error('
|
|
527
|
+
console.error(' rnx open: --remap expects <host:port>=<host:port>')
|
|
528
528
|
process.exit(1)
|
|
529
529
|
}
|
|
530
530
|
remap[raw.slice(0, eqIndex).trim()] = raw.slice(eqIndex + 1).trim()
|
|
@@ -1302,7 +1302,7 @@ async function maybeDescribeAfterOpen(wsPort: number, simId: string, args: strin
|
|
|
1302
1302
|
console.log(
|
|
1303
1303
|
` app still loading: ${reason} (nodes: ${readyProbe.nodes}, targets: ${readyProbe.targets})`,
|
|
1304
1304
|
)
|
|
1305
|
-
console.log(' before interacting, run:
|
|
1305
|
+
console.log(' before interacting, run: rnx wait ready --max-ms 120000')
|
|
1306
1306
|
}
|
|
1307
1307
|
}
|
|
1308
1308
|
const dumpOpts = { describe: true, verbose: false, filter: '' }
|
|
@@ -1387,8 +1387,8 @@ export async function runLinkCommand(args: string[], opts: ControlCommandOptions
|
|
|
1387
1387
|
commandTimeoutMs: opts.timeoutMs,
|
|
1388
1388
|
})
|
|
1389
1389
|
if (parsed.positional.length !== 1) {
|
|
1390
|
-
console.error('
|
|
1391
|
-
console.error(' examples:
|
|
1390
|
+
console.error(' rnx open: expected exactly one <url-or-route>')
|
|
1391
|
+
console.error(' examples: rnx open /settings | rnx open myapp://settings')
|
|
1392
1392
|
process.exit(1)
|
|
1393
1393
|
}
|
|
1394
1394
|
|
|
@@ -1396,7 +1396,7 @@ export async function runLinkCommand(args: string[], opts: ControlCommandOptions
|
|
|
1396
1396
|
try {
|
|
1397
1397
|
target = normalizeDeepLinkTarget(parsed.positional[0] ?? '')
|
|
1398
1398
|
} catch (err) {
|
|
1399
|
-
console.error(`
|
|
1399
|
+
console.error(` rnx open: ${err instanceof Error ? err.message : String(err)}`)
|
|
1400
1400
|
process.exit(1)
|
|
1401
1401
|
}
|
|
1402
1402
|
|
|
@@ -1417,9 +1417,9 @@ export async function runLinkCommand(args: string[], opts: ControlCommandOptions
|
|
|
1417
1417
|
} catch (err) {
|
|
1418
1418
|
console.error(` link failed: ${err instanceof Error ? err.message : String(err)}`)
|
|
1419
1419
|
await printBridgeFailureDiagnostics(bridge, {
|
|
1420
|
-
errorsCommand: `
|
|
1421
|
-
warningsCommand: `
|
|
1422
|
-
requestsCommand: `
|
|
1420
|
+
errorsCommand: `rnx get errors 5${simHint}`,
|
|
1421
|
+
warningsCommand: `rnx get warnings 5${simHint}`,
|
|
1422
|
+
requestsCommand: `rnx get requests 5${simHint}`,
|
|
1423
1423
|
})
|
|
1424
1424
|
process.exit(1)
|
|
1425
1425
|
} finally {
|
|
@@ -1458,12 +1458,12 @@ export async function runOpenCommand(args: string[], opts: ControlCommandOptions
|
|
|
1458
1458
|
const cdpPort = cdpPortArg ? Number(cdpPortArg) : undefined
|
|
1459
1459
|
if (cdpPortArg && (!Number.isFinite(cdpPort) || cdpPort! <= 0)) {
|
|
1460
1460
|
console.error(
|
|
1461
|
-
`
|
|
1461
|
+
` rnx open: --cdp-port must be a positive port number, got "${cdpPortArg}"`,
|
|
1462
1462
|
)
|
|
1463
1463
|
process.exit(1)
|
|
1464
1464
|
}
|
|
1465
1465
|
if (requestedProfileId && ephemeralProfile) {
|
|
1466
|
-
console.error('
|
|
1466
|
+
console.error(' rnx open: --profile cannot be combined with --ephemeral')
|
|
1467
1467
|
process.exit(1)
|
|
1468
1468
|
}
|
|
1469
1469
|
const profileId = requestedProfileId ? ensureProfile(requestedProfileId).id : undefined
|
|
@@ -1471,7 +1471,7 @@ export async function runOpenCommand(args: string[], opts: ControlCommandOptions
|
|
|
1471
1471
|
const commandConfig = parseOpenRuntimeConfig(args)
|
|
1472
1472
|
if (openInNewSim && parsed.simIdSource === 'flag') {
|
|
1473
1473
|
console.error(
|
|
1474
|
-
'
|
|
1474
|
+
' rnx open: --new, --profile, and --ephemeral cannot be combined with --sim',
|
|
1475
1475
|
)
|
|
1476
1476
|
process.exit(1)
|
|
1477
1477
|
}
|
|
@@ -1480,7 +1480,7 @@ export async function runOpenCommand(args: string[], opts: ControlCommandOptions
|
|
|
1480
1480
|
if (shouldOpenAsDeepLink(target)) {
|
|
1481
1481
|
if (openInNewSim) {
|
|
1482
1482
|
console.error(
|
|
1483
|
-
'
|
|
1483
|
+
' rnx open: deep links target the current app; remove --new, --profile, or --ephemeral',
|
|
1484
1484
|
)
|
|
1485
1485
|
process.exit(1)
|
|
1486
1486
|
}
|
|
@@ -1500,7 +1500,7 @@ export async function runOpenCommand(args: string[], opts: ControlCommandOptions
|
|
|
1500
1500
|
}
|
|
1501
1501
|
})()
|
|
1502
1502
|
console.log(
|
|
1503
|
-
' that’s an
|
|
1503
|
+
' that’s an rnx preview/build link — a full player page, not a driveable sim.',
|
|
1504
1504
|
)
|
|
1505
1505
|
console.log(' opening it in your browser for viewing…')
|
|
1506
1506
|
try {
|
|
@@ -1514,8 +1514,8 @@ export async function runOpenCommand(args: string[], opts: ControlCommandOptions
|
|
|
1514
1514
|
}
|
|
1515
1515
|
console.log(
|
|
1516
1516
|
isLocal
|
|
1517
|
-
? ' to drive it under the CLI, point `
|
|
1518
|
-
: ' the CLI can’t drive a remote preview (the engine only attaches to the local bridge from localhost). to drive the app, run it locally and `
|
|
1517
|
+
? ' to drive it under the CLI, point `rnx open` at the app’s dev port instead (e.g. `rnx open 8081`).'
|
|
1518
|
+
: ' the CLI can’t drive a remote preview (the engine only attaches to the local bridge from localhost). to drive the app, run it locally and `rnx open <port>`.',
|
|
1519
1519
|
)
|
|
1520
1520
|
return
|
|
1521
1521
|
}
|
|
@@ -1554,9 +1554,7 @@ export async function runOpenCommand(args: string[], opts: ControlCommandOptions
|
|
|
1554
1554
|
// native desktop surface. neither path opens the user's browser profile.
|
|
1555
1555
|
const requestedDriverId = args.find((_, i) => args[i - 1] === '--driver') || ''
|
|
1556
1556
|
if (requestedDriverId && !isDriverId(requestedDriverId)) {
|
|
1557
|
-
console.error(
|
|
1558
|
-
` unknown driver "${requestedDriverId}" — run \`rnxsim list --drivers\``,
|
|
1559
|
-
)
|
|
1557
|
+
console.error(` unknown driver "${requestedDriverId}" — run \`rnx list --drivers\``)
|
|
1560
1558
|
process.exit(1)
|
|
1561
1559
|
}
|
|
1562
1560
|
const driverId: DriverId = isDriverId(requestedDriverId)
|
|
@@ -1564,7 +1562,7 @@ export async function runOpenCommand(args: string[], opts: ControlCommandOptions
|
|
|
1564
1562
|
: 'playwright'
|
|
1565
1563
|
const driverHeadless = resolveDriverHeadless(args, driverId)
|
|
1566
1564
|
if (cdpPort && driverId !== 'playwright') {
|
|
1567
|
-
console.error('
|
|
1565
|
+
console.error(' rnx open: --cdp-port is only honored by the playwright driver')
|
|
1568
1566
|
process.exit(1)
|
|
1569
1567
|
}
|
|
1570
1568
|
|
|
@@ -1578,7 +1576,7 @@ export async function runOpenCommand(args: string[], opts: ControlCommandOptions
|
|
|
1578
1576
|
const hotFlag = args.includes('--hot')
|
|
1579
1577
|
const noHmrFlag = args.includes('--no-hmr')
|
|
1580
1578
|
if (hotFlag && noHmrFlag) {
|
|
1581
|
-
console.error('
|
|
1579
|
+
console.error(' rnx open: --hot and --no-hmr cannot be combined')
|
|
1582
1580
|
process.exit(1)
|
|
1583
1581
|
}
|
|
1584
1582
|
const hotMode = hotFlag ? true : noHmrFlag ? false : requestedDriverId !== 'playwright'
|
|
@@ -1589,7 +1587,7 @@ export async function runOpenCommand(args: string[], opts: ControlCommandOptions
|
|
|
1589
1587
|
// shell last persisted, which silently skews browser comparisons.
|
|
1590
1588
|
const deviceArg = args.find((_, i) => args[i - 1] === '--device')
|
|
1591
1589
|
if (deviceArg && !(deviceArg in devices)) {
|
|
1592
|
-
console.error(`
|
|
1590
|
+
console.error(` rnx open: unknown device "${deviceArg}"`)
|
|
1593
1591
|
console.error(` known devices: ${listSelectableDeviceModels().join(', ')}`)
|
|
1594
1592
|
process.exit(1)
|
|
1595
1593
|
}
|
|
@@ -1602,9 +1600,7 @@ export async function runOpenCommand(args: string[], opts: ControlCommandOptions
|
|
|
1602
1600
|
const viewportArg = args.find((_, i) => args[i - 1] === '--viewport')
|
|
1603
1601
|
const viewportMatch = viewportArg ? /^(\d+)x(\d+)$/.exec(viewportArg) : null
|
|
1604
1602
|
if (viewportArg && !viewportMatch) {
|
|
1605
|
-
console.error(
|
|
1606
|
-
` rnxsim open: --viewport must be <width>x<height>, got "${viewportArg}"`,
|
|
1607
|
-
)
|
|
1603
|
+
console.error(` rnx open: --viewport must be <width>x<height>, got "${viewportArg}"`)
|
|
1608
1604
|
process.exit(1)
|
|
1609
1605
|
}
|
|
1610
1606
|
const explicitViewport = viewportMatch
|
|
@@ -1719,9 +1715,9 @@ export async function runOpenCommand(args: string[], opts: ControlCommandOptions
|
|
|
1719
1715
|
` open failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
1720
1716
|
)
|
|
1721
1717
|
await printBridgeFailureDiagnostics(bridge, {
|
|
1722
|
-
errorsCommand: `
|
|
1723
|
-
warningsCommand: `
|
|
1724
|
-
requestsCommand: `
|
|
1718
|
+
errorsCommand: `rnx get errors 5${simHint}`,
|
|
1719
|
+
warningsCommand: `rnx get warnings 5${simHint}`,
|
|
1720
|
+
requestsCommand: `rnx get requests 5${simHint}`,
|
|
1725
1721
|
})
|
|
1726
1722
|
process.exit(1)
|
|
1727
1723
|
}
|
|
@@ -1774,7 +1770,7 @@ export async function runOpenCommand(args: string[], opts: ControlCommandOptions
|
|
|
1774
1770
|
|
|
1775
1771
|
const driver = getDriver(driverId)
|
|
1776
1772
|
if (!driver) {
|
|
1777
|
-
console.error(` unknown driver "${driverId}" — run \`
|
|
1773
|
+
console.error(` unknown driver "${driverId}" — run \`rnx list --drivers\``)
|
|
1778
1774
|
process.exit(1)
|
|
1779
1775
|
}
|
|
1780
1776
|
const connectWait = resolveDriverConnectWaitOptions()
|
|
@@ -1860,7 +1856,7 @@ async function runUseLikeCommand(args: string[], opts: ControlCommandOptions = {
|
|
|
1860
1856
|
console.error(
|
|
1861
1857
|
` refused: ${target.id} is locked by the active user (${secs}s) — that's a live human tab`,
|
|
1862
1858
|
)
|
|
1863
|
-
console.error(` run \`
|
|
1859
|
+
console.error(` run \`rnx open --new\` for a fresh investigation sim`)
|
|
1864
1860
|
process.exit(1)
|
|
1865
1861
|
}
|
|
1866
1862
|
if (!force) {
|
|
@@ -1871,7 +1867,7 @@ async function runUseLikeCommand(args: string[], opts: ControlCommandOptions = {
|
|
|
1871
1867
|
` refused: ${target.id} is leased by ${target.lockedBy} (${secs}s)`,
|
|
1872
1868
|
)
|
|
1873
1869
|
console.error(
|
|
1874
|
-
` \`sootsim use ${target.id} --force\` to take it, or \`
|
|
1870
|
+
` \`sootsim use ${target.id} --force\` to take it, or \`rnx open --new\` for a fresh sim`,
|
|
1875
1871
|
)
|
|
1876
1872
|
process.exit(1)
|
|
1877
1873
|
}
|
|
@@ -1882,9 +1878,9 @@ async function runUseLikeCommand(args: string[], opts: ControlCommandOptions = {
|
|
|
1882
1878
|
} catch (err) {
|
|
1883
1879
|
console.error(` use failed: ${err instanceof Error ? err.message : String(err)}`)
|
|
1884
1880
|
await printBridgeFailureDiagnostics(bridge, {
|
|
1885
|
-
errorsCommand: `
|
|
1886
|
-
warningsCommand: `
|
|
1887
|
-
requestsCommand: `
|
|
1881
|
+
errorsCommand: `rnx get errors 5${simHint}`,
|
|
1882
|
+
warningsCommand: `rnx get warnings 5${simHint}`,
|
|
1883
|
+
requestsCommand: `rnx get requests 5${simHint}`,
|
|
1888
1884
|
})
|
|
1889
1885
|
process.exit(1)
|
|
1890
1886
|
}
|
|
@@ -1930,9 +1926,7 @@ export async function runClaimCommand(args: string[], opts: ControlCommandOption
|
|
|
1930
1926
|
if (err instanceof BridgeSimLockedError) {
|
|
1931
1927
|
const secs = Math.max(0, Math.round(err.lock.expiresInMs / 1000))
|
|
1932
1928
|
console.error(` claim failed: locked by ${err.lock.by} for ${secs}s more`)
|
|
1933
|
-
console.error(
|
|
1934
|
-
` use --force to take it, or \`rnxsim open --new\` for a fresh sim`,
|
|
1935
|
-
)
|
|
1929
|
+
console.error(` use --force to take it, or \`rnx open --new\` for a fresh sim`)
|
|
1936
1930
|
process.exit(1)
|
|
1937
1931
|
}
|
|
1938
1932
|
console.error(` claim failed: ${err instanceof Error ? err.message : String(err)}`)
|
|
@@ -2147,9 +2141,9 @@ export async function runCloseCommand(args: string[], opts: ControlCommandOption
|
|
|
2147
2141
|
} catch (err) {
|
|
2148
2142
|
console.error(` close failed: ${err instanceof Error ? err.message : String(err)}`)
|
|
2149
2143
|
await printBridgeFailureDiagnostics(bridge, {
|
|
2150
|
-
errorsCommand: `
|
|
2151
|
-
warningsCommand: `
|
|
2152
|
-
requestsCommand: `
|
|
2144
|
+
errorsCommand: `rnx get errors 5${simHint}`,
|
|
2145
|
+
warningsCommand: `rnx get warnings 5${simHint}`,
|
|
2146
|
+
requestsCommand: `rnx get requests 5${simHint}`,
|
|
2153
2147
|
})
|
|
2154
2148
|
process.exit(1)
|
|
2155
2149
|
}
|
|
@@ -214,9 +214,9 @@ function printNoCdp(cdpPort: number) {
|
|
|
214
214
|
console.error(' so you can scroll/navigate while profiling):')
|
|
215
215
|
console.error('')
|
|
216
216
|
console.error(
|
|
217
|
-
`
|
|
217
|
+
` rnx open <metro-port> --new --driver playwright --cdp-port ${cdpPort}`,
|
|
218
218
|
)
|
|
219
|
-
console.error(`
|
|
219
|
+
console.error(` rnx perf cpu --cdp-port ${cdpPort} --match <metro-port>`)
|
|
220
220
|
console.error('')
|
|
221
221
|
console.error(' or launch a standalone CDP Chrome (not bridge-driveable):')
|
|
222
222
|
console.error('')
|
|
@@ -142,8 +142,8 @@ function renderLauncherScript(
|
|
|
142
142
|
const stdout = shellSingleQuote(logDir.stdout)
|
|
143
143
|
const stderr = shellSingleQuote(logDir.stderr)
|
|
144
144
|
return `#!/bin/sh
|
|
145
|
-
# SootSim Daemon launcher — auto-generated by '
|
|
146
|
-
# launchd spawns this; we exec the real
|
|
145
|
+
# SootSim Daemon launcher — auto-generated by 'rnx setup'.
|
|
146
|
+
# launchd spawns this; we exec the real rnx invocation in place so
|
|
147
147
|
# launchd tracks the daemon process, not the shell wrapper.
|
|
148
148
|
#
|
|
149
149
|
# stdout: ${logDir.stdout}
|
package/cli/commands/daemon.ts
CHANGED
|
@@ -329,7 +329,7 @@ export async function daemonInstall({ port, force }: { port: number; force: bool
|
|
|
329
329
|
const path = macPlistPath()
|
|
330
330
|
if (existsSync(path) && !force) {
|
|
331
331
|
console.log(` already installed at ${path}`)
|
|
332
|
-
console.log(` pass --force to overwrite, or use '
|
|
332
|
+
console.log(` pass --force to overwrite, or use 'rnx daemon restart' to reload`)
|
|
333
333
|
return
|
|
334
334
|
}
|
|
335
335
|
mkdirSync(dirname(path), { recursive: true })
|
|
@@ -379,7 +379,7 @@ export async function daemonInstall({ port, force }: { port: number; force: bool
|
|
|
379
379
|
throw new Error(
|
|
380
380
|
`launchctl bootstrap failed: ${attempt.reason}` +
|
|
381
381
|
(first !== attempt.reason ? ` (initial: ${first})` : '') +
|
|
382
|
-
` — try \`
|
|
382
|
+
` — try \`rnx daemon uninstall\` then retry, or reboot if launchd state is stuck.`,
|
|
383
383
|
)
|
|
384
384
|
}
|
|
385
385
|
}
|
|
@@ -420,7 +420,7 @@ export async function daemonInstall({ port, force }: { port: number; force: bool
|
|
|
420
420
|
const path = linuxUnitPath()
|
|
421
421
|
if (existsSync(path) && !force) {
|
|
422
422
|
console.log(` already installed at ${path}`)
|
|
423
|
-
console.log(` pass --force to overwrite, or use '
|
|
423
|
+
console.log(` pass --force to overwrite, or use 'rnx daemon restart' to reload`)
|
|
424
424
|
return
|
|
425
425
|
}
|
|
426
426
|
mkdirSync(dirname(path), { recursive: true })
|
|
@@ -444,7 +444,7 @@ export async function daemonInstall({ port, force }: { port: number; force: bool
|
|
|
444
444
|
const msg = (enable.stderr || enable.stdout || '').trim()
|
|
445
445
|
throw new Error(
|
|
446
446
|
`systemctl enable --now failed${msg ? `: ${msg}` : ''}` +
|
|
447
|
-
` — try \`
|
|
447
|
+
` — try \`rnx daemon uninstall\` then retry.`,
|
|
448
448
|
)
|
|
449
449
|
}
|
|
450
450
|
const isActive = spawnSync('systemctl', ['--user', 'is-active', SERVICE_NAME_LINUX], {
|
|
@@ -492,7 +492,7 @@ export async function daemonInstall({ port, force }: { port: number; force: bool
|
|
|
492
492
|
}
|
|
493
493
|
|
|
494
494
|
console.error(` background daemon is not supported on ${process.platform}`)
|
|
495
|
-
console.error(` run '
|
|
495
|
+
console.error(` run 'rnx serve' in a persistent shell instead`)
|
|
496
496
|
process.exit(1)
|
|
497
497
|
}
|
|
498
498
|
|
|
@@ -629,8 +629,8 @@ function printBridgeLiveness() {
|
|
|
629
629
|
}
|
|
630
630
|
console.log(
|
|
631
631
|
lock
|
|
632
|
-
? ' bridge: NOT responding — stale lockfile; check `
|
|
633
|
-
: ' bridge: NOT responding — no lockfile; check `
|
|
632
|
+
? ' bridge: NOT responding — stale lockfile; check `rnx daemon logs`'
|
|
633
|
+
: ' bridge: NOT responding — no lockfile; check `rnx daemon logs`',
|
|
634
634
|
)
|
|
635
635
|
}
|
|
636
636
|
|
|
@@ -681,7 +681,7 @@ async function daemonRestart() {
|
|
|
681
681
|
if (process.platform === 'darwin') {
|
|
682
682
|
const path = macPlistPath()
|
|
683
683
|
if (!existsSync(path)) {
|
|
684
|
-
console.error(' daemon not registered — run `
|
|
684
|
+
console.error(' daemon not registered — run `rnx setup`')
|
|
685
685
|
process.exit(1)
|
|
686
686
|
}
|
|
687
687
|
const res = spawnSync(
|
|
@@ -699,7 +699,7 @@ async function daemonRestart() {
|
|
|
699
699
|
if (process.platform === 'linux') {
|
|
700
700
|
const path = linuxUnitPath()
|
|
701
701
|
if (!existsSync(path)) {
|
|
702
|
-
console.error(' daemon not registered — run `
|
|
702
|
+
console.error(' daemon not registered — run `rnx setup`')
|
|
703
703
|
process.exit(1)
|
|
704
704
|
}
|
|
705
705
|
const res = spawnSync('systemctl', ['--user', 'restart', SERVICE_NAME_LINUX], {
|
|
@@ -721,7 +721,7 @@ async function daemonStart() {
|
|
|
721
721
|
if (process.platform === 'darwin') {
|
|
722
722
|
const path = macPlistPath()
|
|
723
723
|
if (!existsSync(path)) {
|
|
724
|
-
console.error(' daemon not registered — run `
|
|
724
|
+
console.error(' daemon not registered — run `rnx setup`')
|
|
725
725
|
process.exit(1)
|
|
726
726
|
}
|
|
727
727
|
const res = spawnSync(
|
|
@@ -739,7 +739,7 @@ async function daemonStart() {
|
|
|
739
739
|
if (process.platform === 'linux') {
|
|
740
740
|
const path = linuxUnitPath()
|
|
741
741
|
if (!existsSync(path)) {
|
|
742
|
-
console.error(' daemon not registered — run `
|
|
742
|
+
console.error(' daemon not registered — run `rnx setup`')
|
|
743
743
|
process.exit(1)
|
|
744
744
|
}
|
|
745
745
|
const res = spawnSync('systemctl', ['--user', 'start', SERVICE_NAME_LINUX], {
|
|
@@ -814,7 +814,7 @@ async function daemonLogs(rest: string[]) {
|
|
|
814
814
|
const present = [out, err].filter((p) => existsSync(p))
|
|
815
815
|
if (present.length === 0) {
|
|
816
816
|
console.error(
|
|
817
|
-
` no daemon logs yet at ${LOG_DIR} — run \`
|
|
817
|
+
` no daemon logs yet at ${LOG_DIR} — run \`rnx setup\` to install the daemon`,
|
|
818
818
|
)
|
|
819
819
|
process.exit(1)
|
|
820
820
|
}
|
package/cli/commands/debug.ts
CHANGED
|
@@ -57,10 +57,10 @@ const SHELL_TRACE_HOOK_GLOBAL = '__sootsimDebugAnimation'
|
|
|
57
57
|
|
|
58
58
|
function printHelp() {
|
|
59
59
|
console.log(`
|
|
60
|
-
|
|
60
|
+
rnx debug — drive __sootsimDebug from the terminal
|
|
61
61
|
|
|
62
62
|
usage:
|
|
63
|
-
|
|
63
|
+
rnx debug <subcommand> [args]
|
|
64
64
|
|
|
65
65
|
subcommands:
|
|
66
66
|
enable <channels> turn on one or more debug channels
|
|
@@ -122,16 +122,16 @@ options:
|
|
|
122
122
|
--json compact JSON output for pipelines
|
|
123
123
|
|
|
124
124
|
examples:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
125
|
+
rnx debug enable sheets,portals
|
|
126
|
+
rnx debug snapshot before
|
|
127
|
+
rnx debug snapshot after
|
|
128
|
+
rnx debug diff before after
|
|
129
|
+
rnx debug image-audit per-image source pixels per device pixel
|
|
130
|
+
rnx debug find sheets | jq '.[] | select(.translateY != null)'
|
|
131
|
+
rnx debug trace shell on 240
|
|
132
|
+
rnx debug trace shell 120
|
|
133
|
+
rnx debug trace anim on 3 240
|
|
134
|
+
rnx debug trace anim 3 60
|
|
135
135
|
`)
|
|
136
136
|
}
|
|
137
137
|
|
|
@@ -436,7 +436,7 @@ export async function runDebug(args: string[], opts: DebugOptions) {
|
|
|
436
436
|
const channels = parseChannelList(rest[0])
|
|
437
437
|
if (channels.length === 0) {
|
|
438
438
|
console.error(
|
|
439
|
-
` usage:
|
|
439
|
+
` usage: rnx debug enable <channel[,channel,...]>\n known: ${KNOWN_CHANNELS.join(', ')}`,
|
|
440
440
|
)
|
|
441
441
|
process.exit(1)
|
|
442
442
|
}
|
|
@@ -455,7 +455,7 @@ export async function runDebug(args: string[], opts: DebugOptions) {
|
|
|
455
455
|
case 'toggle': {
|
|
456
456
|
const channel = rest[0]
|
|
457
457
|
if (!channel) {
|
|
458
|
-
console.error(' usage:
|
|
458
|
+
console.error(' usage: rnx debug toggle <channel>')
|
|
459
459
|
process.exit(1)
|
|
460
460
|
}
|
|
461
461
|
const result = await call(
|
|
@@ -515,7 +515,7 @@ export async function runDebug(args: string[], opts: DebugOptions) {
|
|
|
515
515
|
const a = rest[0]
|
|
516
516
|
const b = rest[1]
|
|
517
517
|
if (!a || !b) {
|
|
518
|
-
console.error(' usage:
|
|
518
|
+
console.error(' usage: rnx debug diff <labelA> <labelB>')
|
|
519
519
|
process.exit(1)
|
|
520
520
|
}
|
|
521
521
|
// Maps don't serialize — project added/removed/changed arrays only
|
|
@@ -577,7 +577,7 @@ export async function runDebug(args: string[], opts: DebugOptions) {
|
|
|
577
577
|
const result = await inspectDebugFind(bridge, target)
|
|
578
578
|
console.log(fmt(result, pretty))
|
|
579
579
|
} else {
|
|
580
|
-
console.error(' usage:
|
|
580
|
+
console.error(' usage: rnx debug find <sheets|portals|boundaries>')
|
|
581
581
|
process.exit(1)
|
|
582
582
|
}
|
|
583
583
|
break
|
|
@@ -594,7 +594,7 @@ export async function runDebug(args: string[], opts: DebugOptions) {
|
|
|
594
594
|
const sub = rest[1]
|
|
595
595
|
if (!sub || sub === '--help' || sub === '-h') {
|
|
596
596
|
console.error(
|
|
597
|
-
' usage:
|
|
597
|
+
' usage: rnx debug trace anim <on|off|status|clear|<id>> [id|limit]',
|
|
598
598
|
)
|
|
599
599
|
process.exit(1)
|
|
600
600
|
}
|
|
@@ -641,7 +641,7 @@ export async function runDebug(args: string[], opts: DebugOptions) {
|
|
|
641
641
|
break
|
|
642
642
|
}
|
|
643
643
|
if (traceTarget !== 'shell') {
|
|
644
|
-
console.error(' usage:
|
|
644
|
+
console.error(' usage: rnx debug trace <shell|anim> [args]')
|
|
645
645
|
process.exit(1)
|
|
646
646
|
}
|
|
647
647
|
if (!traceCommand || /^[0-9]+$/.test(traceCommand)) {
|
|
@@ -672,7 +672,7 @@ export async function runDebug(args: string[], opts: DebugOptions) {
|
|
|
672
672
|
break
|
|
673
673
|
}
|
|
674
674
|
console.error(
|
|
675
|
-
' usage:
|
|
675
|
+
' usage: rnx debug trace shell [on [limit]|off|status|clear|recentLimit]',
|
|
676
676
|
)
|
|
677
677
|
process.exit(1)
|
|
678
678
|
}
|
|
@@ -707,9 +707,9 @@ export async function runDebug(args: string[], opts: DebugOptions) {
|
|
|
707
707
|
} catch (err: any) {
|
|
708
708
|
console.error(` debug failed: ${err.message}`)
|
|
709
709
|
await printBridgeFailureDiagnostics(bridge, {
|
|
710
|
-
errorsCommand: `
|
|
711
|
-
warningsCommand: `
|
|
712
|
-
requestsCommand: `
|
|
710
|
+
errorsCommand: `rnx get errors 5${simHint}`,
|
|
711
|
+
warningsCommand: `rnx get warnings 5${simHint}`,
|
|
712
|
+
requestsCommand: `rnx get requests 5${simHint}`,
|
|
713
713
|
})
|
|
714
714
|
process.exit(1)
|
|
715
715
|
} finally {
|
package/cli/commands/desktop.ts
CHANGED
|
@@ -8,11 +8,11 @@ interface DesktopOptions {
|
|
|
8
8
|
|
|
9
9
|
function printHelp(): void {
|
|
10
10
|
console.log(`
|
|
11
|
-
|
|
11
|
+
rnx desktop — launch or install the desktop companion
|
|
12
12
|
|
|
13
13
|
usage:
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
rnx desktop [options]
|
|
15
|
+
rnx desktop install [options]
|
|
16
16
|
|
|
17
17
|
options:
|
|
18
18
|
--port <number> connect to a running dev server on this port
|