rnxsim 0.1.313 → 0.1.314
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +11 -10
- package/README.md +5 -0
- package/cli/app-config.ts +65 -0
- package/cli/app-fonts.ts +408 -0
- package/cli/app-project.ts +231 -0
- package/cli/app-splash.ts +185 -0
- package/cli/app-state-reset.ts +24 -0
- package/cli/auth.ts +155 -0
- package/cli/bin.ts +594 -0
- package/cli/bridge-diagnostics.ts +226 -0
- package/cli/bridge-flow-runner.ts +2830 -0
- package/cli/browser-evals.ts +96 -0
- package/cli/commands/agent-wrapper.ts +986 -0
- package/cli/commands/agent.ts +423 -0
- package/cli/commands/app-fonts.ts +98 -0
- package/cli/commands/assert.ts +541 -0
- package/cli/commands/auth.ts +59 -0
- package/cli/commands/camera.ts +266 -0
- package/cli/commands/cleanup.ts +169 -0
- package/cli/commands/compat.ts +87 -0
- package/cli/commands/config.ts +32 -0
- package/cli/commands/control.ts +2142 -0
- package/cli/commands/cpu-profile.ts +269 -0
- package/cli/commands/daemon-mac-app.ts +169 -0
- package/cli/commands/daemon.ts +874 -0
- package/cli/commands/debug.ts +719 -0
- package/cli/commands/desktop.ts +39 -0
- package/cli/commands/detect.ts +197 -0
- package/cli/commands/detox.ts +385 -0
- package/cli/commands/device.ts +133 -0
- package/cli/commands/diagnose.ts +589 -0
- package/cli/commands/electron.ts +95 -0
- package/cli/commands/film.ts +379 -0
- package/cli/commands/flow.ts +1124 -0
- package/cli/commands/inspect/actions.ts +622 -0
- package/cli/commands/inspect/core.ts +2405 -0
- package/cli/commands/inspect/count.ts +17 -0
- package/cli/commands/inspect/describe.ts +192 -0
- package/cli/commands/inspect/env.ts +23 -0
- package/cli/commands/inspect/find.ts +171 -0
- package/cli/commands/inspect/get-layout.ts +39 -0
- package/cli/commands/inspect/keyboard.ts +52 -0
- package/cli/commands/inspect/list.ts +58 -0
- package/cli/commands/inspect/memory.ts +215 -0
- package/cli/commands/inspect/redaction.ts +39 -0
- package/cli/commands/inspect/resolve-target.ts +82 -0
- package/cli/commands/inspect/screens.ts +78 -0
- package/cli/commands/inspect/settle.ts +22 -0
- package/cli/commands/inspect/settling.ts +158 -0
- package/cli/commands/inspect/shared.ts +353 -0
- package/cli/commands/inspect/sleep.ts +14 -0
- package/cli/commands/inspect/tree.ts +32 -0
- package/cli/commands/inspect/url.ts +17 -0
- package/cli/commands/inspect/wait-event.ts +210 -0
- package/cli/commands/inspect/wait-idle.ts +24 -0
- package/cli/commands/inspect/wait-ready.ts +74 -0
- package/cli/commands/inspect/wait-selector.ts +54 -0
- package/cli/commands/inspect/wait.ts +31 -0
- package/cli/commands/inspect.ts +4519 -0
- package/cli/commands/install-desktop.ts +351 -0
- package/cli/commands/login.ts +331 -0
- package/cli/commands/logout.ts +31 -0
- package/cli/commands/maestro-generate.ts +361 -0
- package/cli/commands/maestro.ts +453 -0
- package/cli/commands/mode.ts +57 -0
- package/cli/commands/no-bridge-hint.ts +80 -0
- package/cli/commands/perf.ts +66 -0
- package/cli/commands/permissions.ts +203 -0
- package/cli/commands/profile.ts +108 -0
- package/cli/commands/react.ts +353 -0
- package/cli/commands/record.ts +1434 -0
- package/cli/commands/report-issue.ts +305 -0
- package/cli/commands/reset.ts +85 -0
- package/cli/commands/runtime.ts +351 -0
- package/cli/commands/screenshot-command.ts +106 -0
- package/cli/commands/screenshot-layers.ts +143 -0
- package/cli/commands/screenshot-mode.ts +37 -0
- package/cli/commands/screenshot.ts +488 -0
- package/cli/commands/screenshots-capture.ts +607 -0
- package/cli/commands/screenshots.ts +127 -0
- package/cli/commands/serve.ts +168 -0
- package/cli/commands/setup.ts +545 -0
- package/cli/commands/shell-boolean-mode.ts +81 -0
- package/cli/commands/skills.ts +467 -0
- package/cli/commands/slides.ts +361 -0
- package/cli/commands/state.ts +87 -0
- package/cli/commands/storage.ts +58 -0
- package/cli/commands/telemetry.ts +54 -0
- package/cli/commands/three-mode.ts +763 -0
- package/cli/commands/timeline.ts +122 -0
- package/cli/commands/upgrade.ts +208 -0
- package/cli/commands/upload.ts +1225 -0
- package/cli/commands/version.ts +54 -0
- package/cli/commands/what-happened.ts +327 -0
- package/cli/current-sim.ts +204 -0
- package/cli/desktop-companion.ts +300 -0
- package/cli/drivers/electron.ts +70 -0
- package/cli/drivers/index.ts +20 -0
- package/cli/drivers/playwright-provisioning.ts +180 -0
- package/cli/drivers/playwright.ts +698 -0
- package/cli/drivers/registry.ts +65 -0
- package/cli/drivers/types.ts +102 -0
- package/cli/flow-file.ts +142 -0
- package/cli/flow-live-status.ts +120 -0
- package/cli/flow-session.ts +187 -0
- package/cli/help.ts +80 -0
- package/cli/hidden-runtime-alias.ts +19 -0
- package/cli/hints.ts +216 -0
- package/cli/inspect-notice-state.ts +114 -0
- package/cli/maestro-js.ts +334 -0
- package/cli/open-url.ts +8 -0
- package/cli/parent-pid.ts +204 -0
- package/cli/parse-args.ts +211 -0
- package/cli/prompt.ts +51 -0
- package/cli/recording-access.ts +107 -0
- package/cli/registry.ts +1 -0
- package/cli/resolve-assets.ts +63 -0
- package/cli/run-registry.ts +226 -0
- package/cli/runtime-notes.ts +66 -0
- package/cli/runtime-summary.ts +25 -0
- package/cli/setup-repository.ts +187 -0
- package/cli/telemetry.ts +187 -0
- package/cli/ws-bridge.ts +798 -0
- package/dist-cli/bin.js +5 -5
- package/dist-cli/chunks/{agent-XZ2KTPCU.js → agent-7YBDCYMA.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-JJYYW2WH.js → agent-wrapper-2GHFBHCR.js} +2 -2
- package/dist-cli/chunks/{app-fonts-IXRNQG6B.js → app-fonts-RSNVPQSU.js} +2 -2
- package/dist-cli/chunks/{assert-54T5SK5F.js → assert-XCMX3XJX.js} +2 -2
- package/dist-cli/chunks/{auth-FI5UDI45.js → auth-B442HRAX.js} +2 -2
- package/dist-cli/chunks/{beta-JV6UKADW.js → beta-XJ55JK3M.js} +2 -2
- package/dist-cli/chunks/camera-UGYSSLIK.js +33 -0
- package/dist-cli/chunks/{chunk-3NV2NCNX.js → chunk-277AEQZX.js} +2 -2
- package/dist-cli/chunks/{chunk-2YR5BGA5.js → chunk-2JNSK774.js} +2 -2
- package/dist-cli/chunks/{chunk-RSZWCKNT.js → chunk-32WOTSTR.js} +3 -3
- package/dist-cli/chunks/{chunk-WEXDAC74.js → chunk-3S753SNQ.js} +2 -2
- package/dist-cli/chunks/{chunk-IJO63TDP.js → chunk-46ZOLOYA.js} +2 -2
- package/dist-cli/chunks/{chunk-WUSWBCWA.js → chunk-5L7ELDQL.js} +8 -9
- package/dist-cli/chunks/{chunk-WF3T4SVI.js → chunk-7OOPFSQS.js} +2 -2
- package/dist-cli/chunks/{chunk-TZFFR3SD.js → chunk-7SV3RPRW.js} +2 -2
- package/dist-cli/chunks/{chunk-WWZIXIRD.js → chunk-7ZC35MOU.js} +1 -1
- package/dist-cli/chunks/chunk-AMG5E6CC.js +9 -0
- package/dist-cli/chunks/{chunk-WINYQ44O.js → chunk-APWNH3A4.js} +1 -1
- package/dist-cli/chunks/chunk-B57XUKY3.js +4 -0
- package/dist-cli/chunks/{chunk-YDGQTMQL.js → chunk-C2NL26TD.js} +1 -1
- package/dist-cli/chunks/{chunk-NMF2ZMZQ.js → chunk-D2FNUWAB.js} +4 -4
- package/dist-cli/chunks/{chunk-YIFT42WN.js → chunk-E5T4XSJ3.js} +2 -2
- package/dist-cli/chunks/{chunk-46EUUFJ5.js → chunk-EAC34EQS.js} +1 -1
- package/dist-cli/chunks/{chunk-OVFJFXUD.js → chunk-EG32ML36.js} +2 -2
- package/dist-cli/chunks/{chunk-5YJCOWCH.js → chunk-FXUAC6D5.js} +1 -1
- package/dist-cli/chunks/chunk-GQSL4USA.js +6 -0
- package/dist-cli/chunks/{chunk-VFCMSYZK.js → chunk-HAXW27SS.js} +2 -2
- package/dist-cli/chunks/{chunk-2D2UPBBR.js → chunk-IZAHPAN6.js} +1 -1
- package/dist-cli/chunks/{chunk-7GN3LVWB.js → chunk-J62KM5TB.js} +2 -2
- package/dist-cli/chunks/{chunk-BTWORNNG.js → chunk-JEMCD5E4.js} +1 -1
- package/dist-cli/chunks/{chunk-DCEMHR2Y.js → chunk-JZS3Q37N.js} +2 -2
- package/dist-cli/chunks/{chunk-D4FFVGI5.js → chunk-KR4JON7D.js} +1 -1
- package/dist-cli/chunks/chunk-KWCYKQIQ.js +4 -0
- package/dist-cli/chunks/{chunk-VNQEB4L7.js → chunk-MCWPL644.js} +2 -2
- package/dist-cli/chunks/chunk-MJYK3N2I.js +4 -0
- package/dist-cli/chunks/{chunk-5TEF3ET3.js → chunk-O6TRIZNS.js} +2 -2
- package/dist-cli/chunks/{chunk-QKDWYITG.js → chunk-P7XL2E73.js} +3 -3
- package/dist-cli/chunks/{chunk-BBULZ7CG.js → chunk-PFQTUKQ4.js} +62 -87
- package/dist-cli/chunks/{chunk-GGRX24GF.js → chunk-PG5RZCTN.js} +2 -2
- package/dist-cli/chunks/{chunk-W6K4EFPH.js → chunk-QGRI2Z4M.js} +2 -2
- package/dist-cli/chunks/{chunk-ZMJD5GEC.js → chunk-QLXXE7GE.js} +1 -1
- package/dist-cli/chunks/{chunk-VZXWHRUZ.js → chunk-QOJJJWJE.js} +89 -133
- package/dist-cli/chunks/{chunk-OZSSI4WN.js → chunk-RWZY5427.js} +2 -2
- package/dist-cli/chunks/{chunk-UC6U3MML.js → chunk-RZKU2K3J.js} +2 -2
- package/dist-cli/chunks/{chunk-IJ5CAZZC.js → chunk-SBV4IK4H.js} +1 -1
- package/dist-cli/chunks/{chunk-DZS6WPUI.js → chunk-SGMVFFMK.js} +1 -1
- package/dist-cli/chunks/{chunk-OHAZNXLK.js → chunk-TAX4UT2N.js} +1 -1
- package/dist-cli/chunks/{chunk-5DHC6KHQ.js → chunk-TUOFAWXT.js} +1 -1
- package/dist-cli/chunks/{chunk-GASE6UBA.js → chunk-UHZLOHGP.js} +1 -1
- package/dist-cli/chunks/{chunk-F5ZRSS3C.js → chunk-VC7V76U3.js} +1 -1
- package/dist-cli/chunks/{chunk-RTN5C5RL.js → chunk-VQVMLW4U.js} +1 -1
- package/dist-cli/chunks/{chunk-WMIIKMGK.js → chunk-VUKKYPZN.js} +2 -2
- package/dist-cli/chunks/{chunk-5TPRP5QT.js → chunk-WGGRJDRE.js} +1 -1
- package/dist-cli/chunks/chunk-X6H76EKP.js +15 -0
- package/dist-cli/chunks/chunk-XLZ5FNRT.js +27 -0
- package/dist-cli/chunks/{chunk-HI5TFJWN.js → chunk-XULEACM4.js} +2 -2
- package/dist-cli/chunks/{chunk-MJRLLB4R.js → chunk-YFSDM7AX.js} +4 -4
- package/dist-cli/chunks/chunk-YWI3UEVX.js +5 -0
- package/dist-cli/chunks/{chunk-XEVZYVIW.js → chunk-ZBSJO4NB.js} +10 -9
- package/dist-cli/chunks/{cleanup-P27PA6JI.js → cleanup-EYLGCA6Z.js} +2 -2
- package/dist-cli/chunks/cli-version-LL2UGIHE.js +4 -0
- package/dist-cli/chunks/{compat-ZD65FED3.js → compat-TLJYHB4E.js} +2 -2
- package/dist-cli/chunks/{config-XMJRNM2A.js → config-4JWUOEXK.js} +2 -2
- package/dist-cli/chunks/{control-KMIQT3QP.js → control-HPAOYF4N.js} +2 -2
- package/dist-cli/chunks/daemon-OYLASXLE.js +4 -0
- package/dist-cli/chunks/{debug-PT4HOP7N.js → debug-4BKXF6KI.js} +5 -5
- package/dist-cli/chunks/{desktop-S3FG72AK.js → desktop-ZQ6ZD2S6.js} +3 -3
- package/dist-cli/chunks/{detox-B3D4IFCN.js → detox-WNPASSS3.js} +2 -2
- package/dist-cli/chunks/{device-XBNDSB2R.js → device-BXLXVG3V.js} +2 -2
- package/dist-cli/chunks/{diagnose-HMQXJE5N.js → diagnose-3QX7W5RW.js} +2 -2
- package/dist-cli/chunks/{disk-cleanup-BLCZ5BSZ.js → disk-cleanup-KSWKI7WB.js} +2 -2
- package/dist-cli/chunks/drivers-EPIEFF7P.js +4 -0
- package/dist-cli/chunks/{film-BJGTBYZB.js → film-GDMR33VO.js} +3 -3
- package/dist-cli/chunks/flow-NKMPBYCJ.js +4 -0
- package/dist-cli/chunks/help-OGCBHOKA.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-ANOYADHM.js → hidden-runtime-alias-S2GTDX3T.js} +2 -2
- package/dist-cli/chunks/home-paths-QRCDLTTV.js +4 -0
- package/dist-cli/chunks/inspect-FUYMOZPY.js +4 -0
- package/dist-cli/chunks/install-desktop-FR6YKW7Y.js +4 -0
- package/dist-cli/chunks/{login-FJ737MWG.js → login-IJAPUZHI.js} +4 -4
- package/dist-cli/chunks/{logout-ZCNMMHMY.js → logout-QMXDFU2X.js} +2 -2
- package/dist-cli/chunks/{maestro-SZTNKLDF.js → maestro-ZXU3YCVX.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-DCFAIZ4H.js → maestro-generate-PYB5QY7K.js} +3 -3
- package/dist-cli/chunks/{mode-GRMQCRXR.js → mode-WGUCL5FZ.js} +2 -2
- package/dist-cli/chunks/{optional-demo-registry-W36EWFFB.js → optional-demo-registry-WH2O6H36.js} +2 -2
- package/dist-cli/chunks/{perf-QYBAAUZG.js → perf-TOD3UFAH.js} +2 -2
- package/dist-cli/chunks/{permissions-3QCQ6VF4.js → permissions-I5BRJGTB.js} +2 -2
- package/dist-cli/chunks/{record-QPPC2S4E.js → record-ZYL2FYSK.js} +3 -3
- package/dist-cli/chunks/{report-issue-7NMFP4HK.js → report-issue-TAI6DYZO.js} +2 -2
- package/dist-cli/chunks/reset-7YGYKQPQ.js +4 -0
- package/dist-cli/chunks/runtime-B4JO6QRI.js +4 -0
- package/dist-cli/chunks/{screenshot-command-67AECJFB.js → screenshot-command-7ANLODZY.js} +7 -7
- package/dist-cli/chunks/{screenshot-layers-ASWBYPJL.js → screenshot-layers-A7FYXSVU.js} +3 -3
- package/dist-cli/chunks/{screenshots-capture-PXA3HFQK.js → screenshots-capture-WT2ZY6CB.js} +2 -2
- package/dist-cli/chunks/serve-TG5WKA4V.js +44 -0
- package/dist-cli/chunks/{setup-7DWPMRSB.js → setup-PCWLD22V.js} +2 -2
- package/dist-cli/chunks/{skills-S3Y22TUA.js → skills-27ZHWCQS.js} +2 -2
- package/dist-cli/chunks/state-ZQVY46ZO.js +14 -0
- package/dist-cli/chunks/{storage-XUIMJWAJ.js → storage-OYC57C4X.js} +6 -6
- package/dist-cli/chunks/store-32HSPZHI.js +4 -0
- package/dist-cli/chunks/telemetry-PBJR7XHR.js +4 -0
- package/dist-cli/chunks/{timeline-TMPLQPSP.js → timeline-RAJJFQT6.js} +2 -2
- package/dist-cli/chunks/{upgrade-7HDSIM7K.js → upgrade-OEFNZRIP.js} +2 -2
- package/dist-cli/chunks/upload-LQJITLKK.js +4 -0
- package/dist-cli/chunks/version-NIXTY6PL.js +6 -0
- package/dist-cli/chunks/{web-DG3WBYD3.js → web-XBUTBVGR.js} +2 -2
- package/dist-cli/chunks/{what-happened-XFVUTZR7.js → what-happened-YNHRFUDX.js} +3 -3
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- 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 +20 -0
- 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 +67 -28
- package/dist-lib/host/bridge-host.cjs +140 -12
- 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 +2815 -40
- 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.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +2549 -2061
- package/dist-lib/sdk.mjs +2543 -2061
- package/dist-lib/skills.cjs +480 -280
- package/dist-lib/vite.cjs +1 -1
- package/package.json +8 -2
- package/src/bridge-constants.ts +3 -4
- package/src/bridge-contract.ts +251 -0
- package/src/connect.ts +83 -0
- package/src/disk-cleanup.ts +30 -0
- package/src/home-paths.ts +81 -38
- package/src/host/bridge-host.ts +134 -6
- package/src/index.ts +27 -1
- package/src/sdk.ts +8 -0
- package/src/sim-client.ts +660 -0
- package/dist-cli/chunks/camera-VL73YIKP.js +0 -22
- package/dist-cli/chunks/chunk-4NPPOV2N.js +0 -5
- package/dist-cli/chunks/chunk-FSUYIVJ6.js +0 -9
- package/dist-cli/chunks/chunk-G2WW6L2C.js +0 -23
- package/dist-cli/chunks/chunk-KTHV3RUS.js +0 -26
- package/dist-cli/chunks/chunk-LF2ZVT7O.js +0 -6
- package/dist-cli/chunks/chunk-NFK7T35W.js +0 -4
- package/dist-cli/chunks/chunk-TIVZIMMW.js +0 -4
- package/dist-cli/chunks/cli-version-WWLPBDQ7.js +0 -4
- package/dist-cli/chunks/daemon-G2ME7NLB.js +0 -4
- package/dist-cli/chunks/drivers-LDECZGP2.js +0 -4
- package/dist-cli/chunks/flow-UEQNVTU7.js +0 -4
- package/dist-cli/chunks/help-T5FYSVGB.js +0 -4
- package/dist-cli/chunks/home-paths-GT3LFNOR.js +0 -4
- package/dist-cli/chunks/inspect-ZA6XF5LD.js +0 -4
- package/dist-cli/chunks/install-desktop-TIMUDHPL.js +0 -4
- package/dist-cli/chunks/runtime-XOAXMSTU.js +0 -4
- package/dist-cli/chunks/serve-BI2NBAXG.js +0 -44
- package/dist-cli/chunks/store-JTHEJLAZ.js +0 -4
- package/dist-cli/chunks/telemetry-ZYJGD2DB.js +0 -4
- package/dist-cli/chunks/upload-GMSZPWM6.js +0 -4
- package/dist-cli/chunks/version-HOCHZ37L.js +0 -6
package/dist-cli/bin.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/*! rnx v0.1.
|
|
2
|
+
/*! rnx v0.1.314 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
3
3
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
4
4
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
5
|
-
import{a as g,b as f}from"./chunks/chunk-
|
|
5
|
+
import{a as g,b as f}from"./chunks/chunk-KWCYKQIQ.js";import{a as m}from"./chunks/chunk-IZAHPAN6.js";import"./chunks/chunk-APWNH3A4.js";function A(a){let t=a instanceof Error?a.message:String(a);(/^command timed out after \d+s$/.test(t)||t.startsWith("sim disconnected:")||t.startsWith("bridge never reconnected")||t.startsWith("multiple sims are connected:")||t.startsWith("saved sim ")||t.startsWith("no sim connected with id ")||t.startsWith("could not connect to ws://")||t.startsWith("rnx bridge daemon is not running")||t.startsWith("rnx bridge lockfile is fresh")||t.startsWith("rnx bridge exited before becoming ready")||t.startsWith(`${m.commandName} open: requested bridge port`)||t.startsWith("background daemon setup is unavailable")||t.startsWith("rnx bridge did not start within"))&&!process.env.SOOTSIM_VERBOSE&&(process.stderr.write(` ${t}
|
|
6
6
|
`),process.exit(1)),a instanceof Error&&a.stack?process.stderr.write(`${a.stack}
|
|
7
7
|
`):process.stderr.write(`${t}
|
|
8
8
|
`),process.exit(1)}process.on("unhandledRejection",A);process.on("uncaughtException",A);var v=typeof __SOOTSIM_STANDALONE__<"u"&&__SOOTSIM_STANDALONE__,S=new Set(["desktop"]);function _(a){!v||!S.has(a)||(process.stderr.write(` ${m.commandName} ${a} isn't available in the standalone binary \u2014
|
|
9
9
|
it needs vite / electron / playwright from a project's node_modules.
|
|
10
10
|
run the npm package instead:
|
|
11
11
|
${m.commandName} ${a}
|
|
12
|
-
`),process.exit(1))}var e=f(process.argv);if(!e.command&&e.commandArgs.length>0){let{resolveHiddenRuntimeAlias:a}=await import("./chunks/hidden-runtime-alias-
|
|
13
|
-
`)}var h=!1;async function k(){if(!h&&(h=!0,!(e.command==="cleanup"||e.command==="serve"||e.command==="agent-wrapper"||e.command==="daemon"&&e.commandArgs[0]==="uninstall")))try{let{isAutomaticSootsimCleanupComplete:a}=await import("./chunks/disk-cleanup-
|
|
12
|
+
`),process.exit(1))}var e=f(process.argv);if(!e.command&&e.commandArgs.length>0){let{resolveHiddenRuntimeAlias:a}=await import("./chunks/hidden-runtime-alias-S2GTDX3T.js");e=a(e)}var C=e.command==="cleanup"&&e.commandArgs.length===1&&e.commandArgs[0]==="--automatic-worker";if(!C){let{trackCliEvent:a}=await import("./chunks/telemetry-PBJR7XHR.js");a({event:"cli_command_invoked",properties:{command:e.command||(e.version?"version":e.help?"help":"none"),arg_count:e.commandArgs.length,platform:process.platform,arch:process.arch,node_version:process.versions.node}})}if(e.command!=="serve"&&e.command!=="daemon"){let{consumeRuntimeUpgradeNotice:a}=await import("./chunks/home-paths-QRCDLTTV.js"),t=a();t&&process.stderr.write(` ${m.name} engine upgraded to v${t.to}`+(t.from?` (from v${t.from})`:"")+` \xB7 what's new: ${m.origin}/changelog
|
|
13
|
+
`)}var h=!1;async function k(){if(!h&&(h=!0,!(e.command==="cleanup"||e.command==="serve"||e.command==="agent-wrapper"||e.command==="daemon"&&e.commandArgs[0]==="uninstall")))try{let{isAutomaticSootsimCleanupComplete:a}=await import("./chunks/disk-cleanup-KSWKI7WB.js");if(a())return;let{spawn:t}=await import("node:child_process"),i=["cleanup","--automatic-worker"],d=process.argv[1],p=v?t(process.execPath,i,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):d?t(process.execPath,[d,...i],{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):t(m.commandName,i,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env});p.once("error",u=>{process.stderr.write(` ${m.name} automatic cleanup will retry on the next run: ${u.message}
|
|
14
14
|
`)}),p.unref()}catch(a){process.stderr.write(` ${m.name} automatic cleanup will retry on the next run: ${a instanceof Error?a.message:String(a)}
|
|
15
|
-
`)}}async function o(a){let{flushCliTelemetry:t}=await import("./chunks/telemetry-
|
|
15
|
+
`)}}async function o(a){let{flushCliTelemetry:t}=await import("./chunks/telemetry-PBJR7XHR.js");await t(),await k(),process.exit(a)}if(e.version){let{getCliVersion:a}=await import("./chunks/cli-version-LL2UGIHE.js"),{IS_BETA:t,BETA_LABEL:i}=await import("./chunks/beta-XJ55JK3M.js"),d=t?` \xB7 ${i}`:"";console.log(`rnxsim v${a()}${d}`);let{readActiveRuntime:p}=await import("./chunks/home-paths-QRCDLTTV.js"),u=p();console.log(u?`runtime v${u}`:"runtime not installed"),await o(0)}if(e.help&&!e.command){let{printHelp:a}=await import("./chunks/help-OGCBHOKA.js");a(),await o(0)}var n=e.globalFlags.port,c=e.verbose,w=e.globalFlags.device,l=e.globalFlags.theme,E=e.globalFlags.driver,N=e.globalFlags.headless===!0,b=e.globalFlags.sim??e.globalFlags.session??e.globalFlags.tab,r=b?["--sim",b,...e.commandArgs]:e.commandArgs;if(w||l){let{settingsStore:a}=await import("./chunks/store-32HSPZHI.js"),t={};w&&(t.deviceModel=w),l&&(t.colorScheme=l),a.apply(t)}if(!e.command&&e.commandArgs.length===0){let{runSetup:a,shouldRunSetupForBareCommand:t}=await import("./chunks/setup-PCWLD22V.js");t()&&(await a(["--from-welcome"]),await o(0));let{printHelp:i}=await import("./chunks/help-OGCBHOKA.js");i(),await o(0)}var s=e.command??"";if(!s){if(e.commandArgs.length>0){let t=e.commandArgs.find(i=>!i.startsWith("-"))??e.commandArgs[0];console.error(` unknown command: ${t}`),console.error(" run `rnxsim --help` to see the full surface."),await o(1)}let{printHelp:a}=await import("./chunks/help-OGCBHOKA.js");a(),await o(0)}if(e.help||e.commandArgs.includes("--help")||e.commandArgs.includes("-h")){if(s==="skill"){let{runSkill:i}=await import("./chunks/skills-27ZHWCQS.js");await i(e.commandArgs),await o(0)}if(s==="state"){let{runState:i}=await import("./chunks/state-ZQVY46ZO.js");await o(await i(r,{port:n}))}if(s==="reset"){let{runReset:i}=await import("./chunks/reset-7YGYKQPQ.js");await o(await i(r,{port:n}))}let a=s==="do"||s==="get"||s==="debug"||s==="shell"||s==="perf"||s==="wait",t=e.commandArgs.find(i=>!i.startsWith("-"));if(!(s==="shell"||s==="perf"))if(a&&!t){let{printGroupHelp:i}=await import("./chunks/help-OGCBHOKA.js");i(s)&&await o(0)}else{let{printCommandHelp:i}=await import("./chunks/help-OGCBHOKA.js");i(a&&t?t:s,{prefer:a&&t?"verb":"command",group:a&&t?s:void 0}),await o(0)}}_(s);if(g.has(s)){let{runInspect:a}=await import("./chunks/inspect-FUYMOZPY.js");await a([s,...r],{port:n,verbose:c})}else switch(s){case"assert":{let{runAssert:a}=await import("./chunks/assert-XCMX3XJX.js");await a(e.commandArgs);break}case"detox":{let{runDetox:a}=await import("./chunks/detox-WNPASSS3.js");await a(e.commandArgs,{port:n,verbose:c});break}case"maestro":{let{runMaestro:a}=await import("./chunks/maestro-ZXU3YCVX.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"record":{let{runRecord:a}=await import("./chunks/record-ZYL2FYSK.js");await a(r,{port:n,verbose:c});break}case"film":{let{runFilm:a}=await import("./chunks/film-GDMR33VO.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"storage":{let{runStorage:a}=await import("./chunks/storage-OYC57C4X.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"state":{let{runState:a}=await import("./chunks/state-ZQVY46ZO.js"),t=await a(r,{port:n});await o(t)}case"reset":{let{runReset:a}=await import("./chunks/reset-7YGYKQPQ.js"),t=await a(r,{port:n});await o(t)}case"perf":{let{runPerf:a}=await import("./chunks/perf-TOD3UFAH.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"screenshot":{let{runScreenshotCommand:a}=await import("./chunks/screenshot-command-7ANLODZY.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"camera":{let{runCamera:a}=await import("./chunks/camera-UGYSSLIK.js"),t=await a(r,{port:n});await o(typeof t=="number"?t:0)}case"mode":{let{runMode:a}=await import("./chunks/mode-WGUCL5FZ.js");await a(r,{port:n,verbose:c});break}case"permissions":{let{runPermissions:a}=await import("./chunks/permissions-I5BRJGTB.js"),t=await a(r,{port:n,verbose:c});await o(t)}case"inspect":{let{runInspect:a}=await import("./chunks/inspect-FUYMOZPY.js");await a(r,{port:n,verbose:c});break}case"debug":{let{runDebug:a}=await import("./chunks/debug-4BKXF6KI.js");await a(r,{port:n,verbose:c});break}case"timeline":{let{runTimeline:a}=await import("./chunks/timeline-RAJJFQT6.js");await a(r,{port:n,verbose:c});break}case"what-happened":{let{runWhatHappened:a}=await import("./chunks/what-happened-YNHRFUDX.js");await a(r,{port:n,verbose:c});break}case"open":{let{runOpenCommand:a}=await import("./chunks/control-HPAOYF4N.js");await a(r,{port:n});break}case"use":{let{runUseCommand:a}=await import("./chunks/control-HPAOYF4N.js");await a(r,{port:n});break}case"claim":{let{runClaimCommand:a}=await import("./chunks/control-HPAOYF4N.js");await a(r,{port:n});break}case"close":{let{runCloseCommand:a}=await import("./chunks/control-HPAOYF4N.js");await a(r,{port:n});break}case"device":{let{runDeviceCommand:a}=await import("./chunks/device-BXLXVG3V.js");await a(r,{port:n});break}case"compat":{let{runCompat:a}=await import("./chunks/compat-TLJYHB4E.js");await a(e.commandArgs);break}case"report-issue":{let{runReportIssue:a}=await import("./chunks/report-issue-TAI6DYZO.js"),t=await a(e.commandArgs);await o(t)}case"desktop":{let{runDesktop:a}=await import("./chunks/desktop-ZQ6ZD2S6.js");await a(e.commandArgs,{port:n,device:w});break}case"login":{let{runLogin:a}=await import("./chunks/login-IJAPUZHI.js");await a(e.commandArgs);break}case"logout":{let{runLogout:a}=await import("./chunks/logout-QMXDFU2X.js");await a();break}case"auth":{let{runAuth:a}=await import("./chunks/auth-B442HRAX.js");await a(e.commandArgs);break}case"setup":{let{runSetup:a}=await import("./chunks/setup-PCWLD22V.js");await a(e.commandArgs);break}case"serve":{let{runServe:a}=await import("./chunks/serve-TG5WKA4V.js");await a(e.commandArgs,{port:n});break}case"daemon":{let{runDaemon:a}=await import("./chunks/daemon-OYLASXLE.js");await a(e.commandArgs,{port:n});break}case"runtime":{let{runRuntime:a}=await import("./chunks/runtime-B4JO6QRI.js");await a(e.commandArgs);break}case"upgrade":case"update":{let{runUpgrade:a}=await import("./chunks/upgrade-OEFNZRIP.js");await a(e.commandArgs);break}case"version":{let{runVersion:a}=await import("./chunks/version-NIXTY6PL.js");await a(e.commandArgs);break}case"agent":{let{runAgentCommand:a}=await import("./chunks/agent-7YBDCYMA.js"),t=await a(e.commandArgs);await o(t)}case"agent-wrapper":{let{runAgentWrapper:a}=await import("./chunks/agent-wrapper-2GHFBHCR.js"),t=await a(e.commandArgs);await o(t)}case"skill":{let{runSkill:a}=await import("./chunks/skills-27ZHWCQS.js");await a(e.commandArgs);break}case"app-fonts":{let{runAppFonts:a}=await import("./chunks/app-fonts-RSNVPQSU.js");await a(e.commandArgs);break}case"config":{let{runConfig:a}=await import("./chunks/config-4JWUOEXK.js");await a(e.commandArgs);break}case"cleanup":{let{runCleanup:a}=await import("./chunks/cleanup-EYLGCA6Z.js"),t=await a(e.commandArgs);await o(t)}default:console.error(` unknown command: ${s}`),console.error(" run `rnxsim --help` to see the full surface."),await o(1)}await k();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.314 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a as b,b as E,c as A,d as l,e as S,g as x,h as j,j as T,n as I,o as k,p as D,q as g,r as O,s as C}from"./chunk-
|
|
4
|
+
import{a as b,b as E,c as A,d as l,e as S,g as x,h as j,j as T,n as I,o as k,p as D,q as g,r as O,s as C}from"./chunk-7SV3RPRW.js";import"./chunk-FXUAC6D5.js";import{c as $}from"./chunk-VUKKYPZN.js";import"./chunk-B57XUKY3.js";import"./chunk-MCWPL644.js";import"./chunk-RZKU2K3J.js";import"./chunk-2JNSK774.js";import"./chunk-XLZ5FNRT.js";import"./chunk-SBV4IK4H.js";import"./chunk-QLXXE7GE.js";import{j as y}from"./chunk-AMG5E6CC.js";import"./chunk-277AEQZX.js";import"./chunk-IZAHPAN6.js";import"./chunk-EAC34EQS.js";import"./chunk-APWNH3A4.js";import w from"node:fs";import d from"node:path";import{spawn as _}from"node:child_process";import F from"node:net";import{WebSocket as R}from"ws";var c=class extends Error{code;constructor(e,t){super(e),this.name="AgentDaemonError",this.code=t}},f=class{ws;port;commandTimeoutMs;ready;closed=!1;nextId=1;pending=new Map;eventListeners=new Set;statusListeners=new Set;disconnectListeners=new Set;constructor(e={}){this.port=e.port??7668,this.commandTimeoutMs=e.commandTimeoutMs??15e3,this.ws=new R(`ws://localhost:${this.port}`),this.ready=new Promise((t,r)=>{let s=()=>{this.ws.off("error",o),t()},o=i=>{this.ws.off("open",s),r(new c(`could not connect to rnx daemon on port ${this.port}: ${i.message}`,"NO_DAEMON"))};this.ws.once("open",s),this.ws.once("error",o)}),this.ws.on("message",t=>this.handleMessage(t)),this.ws.on("close",()=>this.handleClose()),this.ws.on("error",()=>{})}async waitReady(){return this.ready}async listProjects(){return this.send("agent:list-projects")}async upsertProject(e){return this.send("agent:upsert-project",{input:e})}async deleteProject(e){return this.send("agent:delete-project",{projectId:e})}async autoAttachForUrl(e){return this.send("agent:auto-attach-for-url",{input:e})}async listSessions(e){return this.send("agent:list-sessions",{projectId:e})}async startSession(e){return this.send("agent:start-session",{input:e})}async sendPrompt(e,t){return this.send("agent:send-prompt",{sessionId:e,prompt:t})}async sendClaimedPrompt(e,t){return this.send("agent:send-claimed-prompt",{simId:e,prompt:t})}async endSession(e){return this.send("agent:end-session",{sessionId:e})}async getTranscript(e){return this.send("agent:get-transcript",{sessionId:e})}async getPaths(){return this.send("agent:get-paths")}async subscribeEvents(e){return this.send("agent:subscribe-events",{sessionId:e})}async unsubscribeEvents(e){return this.send("agent:unsubscribe-events",{sessionId:e})}onAgentEvent(e){return this.eventListeners.add(e),()=>this.eventListeners.delete(e)}onSessionStatusChange(e){return this.statusListeners.add(e),()=>this.statusListeners.delete(e)}onDisconnect(e){return this.disconnectListeners.add(e),()=>this.disconnectListeners.delete(e)}close(){if(!this.closed){this.closed=!0;try{this.ws.close()}catch{}}}async send(e,t={}){if(await this.ready,this.closed||this.ws.readyState!==R.OPEN)throw new c("daemon connection is closed","NO_DAEMON");let r=this.nextId++;return new Promise((s,o)=>{let i=setTimeout(()=>{this.pending.delete(r),o(new c(`${e} timed out after ${Math.round(this.commandTimeoutMs/1e3)}s`,"TIMEOUT"))},this.commandTimeoutMs);this.pending.set(r,{resolve:s,reject:o,timer:i});try{this.ws.send(JSON.stringify({id:r,type:e,...t}))}catch(a){clearTimeout(i),this.pending.delete(r),o(a instanceof Error?a:new Error(String(a)))}})}handleMessage(e){let t;try{t=JSON.parse(String(e))}catch{return}if(!t||typeof t!="object")return;if(t.type==="agent:event"){for(let s of this.eventListeners)try{s({sessionId:t.sessionId,event:t.event})}catch{}return}if(t.type==="agent:session-status"){for(let s of this.statusListeners)try{s(t.session)}catch{}return}if(typeof t.id!="number")return;let r=this.pending.get(t.id);r&&(this.pending.delete(t.id),clearTimeout(r.timer),t.error?r.reject(new c(t.error,t.code)):r.resolve(t.result))}handleClose(){if(!this.closed){this.closed=!0;for(let[,e]of this.pending)clearTimeout(e.timer),e.reject(new c("daemon disconnected","DISCONNECT"));this.pending.clear();for(let e of this.disconnectListeners)try{e()}catch{}}}};function M(n=7668,e=400){return new Promise(t=>{let r=new F.Socket,s=!1,o=i=>{s||(s=!0,r.destroy(),t(i))};r.setTimeout(e),r.once("connect",()=>o(!0)),r.once("timeout",()=>o(!1)),r.once("error",()=>o(!1)),r.connect(n,"127.0.0.1")})}async function B(n={}){let e=n.port??7668;if(await M(e))return{alreadyRunning:!0};if(y())throw new c(`no rnx bridge on port ${e}. run \`rnxsim setup\` to install the background daemon, or \`rnxsim serve\` in another shell.`,"DEV_HOST_REFUSED");let{cmd:t,prefixArgs:r}=C(),s=[...r,"serve","--quiet"];e!==7668&&s.push("--port",String(e));let o=_(t,s,{detached:!0,stdio:"ignore",env:process.env,cwd:process.cwd()});o.unref();let i=Date.now()+(n.startupTimeoutMs??5e3);for(;Date.now()<i;){if(await M(e))return{alreadyRunning:!1,pid:o.pid};await new Promise(a=>setTimeout(a,100))}throw new c(`spawned rnx daemon on port ${e} but it did not come up in time. run \`rnxsim serve\` manually to diagnose.`,"SPAWN_TIMEOUT")}async function h(n={}){await B({port:n.port,startupTimeoutMs:n.startupTimeoutMs});let e=new f(n);try{await e.waitReady()}catch(t){throw e.close(),t}return e}async function ge(n){let[e,...t]=n;try{switch(e){case void 0:case"--help":case"-h":case"help":return L(),0;case"attach":return await W(t);case"projects":return await J();case"project":return await V(t);case"sessions":return await H(t);case"start":return await G(t);case"prompt":return await q(t);case"watch":return await K(t);case"transcript":return await z(t);case"end":return await Q(t);case"paths":return await Y();default:return process.stderr.write(`unknown agent subcommand: ${e}
|
|
5
5
|
`),L(),2}}catch(r){if(r instanceof c)return process.stderr.write(`${r.message}
|
|
6
6
|
`),1;throw r}}async function v(n){let e=await h({clientLabel:"sootsim-agent-cli"});try{return await n(e)}finally{e.close()}}function L(){$("agent")}function P(n,e){let t={},r=[];for(let s=0;s<n.length;s++){let o=n[s],i=e[o];i==="value"?(t[o]=n[s+1]??"",s++):i==="bool"?t[o]=!0:r.push(o)}return{flags:t,positional:r}}function U(n,e="codex"){return n==="codex"||n==="claude"?n:e}async function W(n){let{flags:e,positional:t}=P(n,{"--name":"value","--provider":"value"}),r=t[0];if(!r)return process.stderr.write(`usage: rnxsim agent attach <dir> [--name X] [--provider codex|claude]
|
|
7
7
|
`),2;let s=d.resolve(r);if(!w.existsSync(s))return process.stderr.write(`directory does not exist: ${s}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.314 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{b as M}from"./chunk-
|
|
4
|
+
import{b as M}from"./chunk-FXUAC6D5.js";import"./chunk-APWNH3A4.js";import{execFile as G,spawn as q}from"node:child_process";import{randomUUID as X}from"node:crypto";import{constants as R,createReadStream as Y,createWriteStream as j,existsSync as C,openSync as J}from"node:fs";import V from"node:fs/promises";import z from"node:path";import K from"node:readline";import{promisify as Q}from"node:util";import{spawn as H}from"node:child_process";import L from"node:readline";var b=class extends Error{code;data;constructor(t,r,m){super(t),this.name="CodexRpcError",this.code=r,this.data=m}};function W(d){let t=H(d.bin,["app-server"],{cwd:d.cwd,env:{...process.env,...d.env},stdio:["pipe","pipe","pipe"]}),r=new Map,m=new Map,u=1,f=!1,a=new Promise(s=>{t.on("exit",(o,e)=>{f=!0;let p=new Error(`codex app-server exited (code=${o}, signal=${e??""})`);for(let{reject:y}of r.values())y(p);r.clear(),s({code:o,signal:e})})});L.createInterface({input:t.stdout,crlfDelay:1/0}).on("line",s=>{let o=s.trim();if(!o)return;let e;try{e=JSON.parse(o)}catch{return}if(e.id!=null&&(e.result!==void 0||e.error!==void 0)){let p=typeof e.id=="string"?Number(e.id):e.id,y=p!=null?r.get(p):void 0;if(!y)return;r.delete(p),e.error?y.reject(new b(e.error.message,e.error.code,e.error.data)):y.resolve(e.result);return}if(e.method){let p=m.get(e.method);if(!p)return;for(let y of p)try{y(e.params)}catch(l){console.error(`[codex-client] handler for "${e.method}" threw:`,l instanceof Error?l.stack??l.message:l)}}}),t.stderr.setEncoding("utf8"),t.stderr.on("data",s=>{let o=m.get("__stderr__");if(o)for(let e of o)try{e({text:s})}catch{}});function n(s){if(!f)try{t.stdin.write(JSON.stringify(s)+`
|
|
5
5
|
`)}catch{}}return{exited:a,on(s,o){let e=m.get(s);return e||(e=new Set,m.set(s,e)),e.add(o),()=>{e?.delete(o)}},request(s,o){if(f)return Promise.reject(new Error(`codex app-server closed; cannot call ${s}`));let e=u++;return new Promise((p,y)=>{r.set(e,{resolve:l=>p(l),reject:y,method:s}),n({jsonrpc:"2.0",id:e,method:s,params:o})})},notify(s,o){n({jsonrpc:"2.0",method:s,params:o})},async shutdown(s=1500){if(f)return;try{t.stdin.end()}catch{}let o=setTimeout(()=>{if(!f)try{t.kill("SIGTERM")}catch{}},s);try{await a}finally{clearTimeout(o)}},kill(s="SIGTERM"){if(!f)try{t.kill(s)}catch{}}}}var O="never",F="danger-full-access",Z={type:"dangerFullAccess"},D="fast",ee="medium",te=Q(G);async function ne(d,t){let r=t||d;if(r.includes("/")||r.includes("\\"))return C(r)?{ok:!0,path:r}:{ok:!1,message:`agent binary not found at path: ${r}`};try{let{stdout:m}=await te("which",[r],{timeout:1500}),u=m.trim();return u?{ok:!0,path:u}:{ok:!1,message:`${r} not found on PATH`}}catch{return{ok:!1,message:`${r} not found on PATH. install the ${d} CLI and retry, or pass --${d}-bin /path/to/${d} to agent start.`}}}function re(d){let t={"--session-id":"sessionId","--project-id":"projectId","--provider":"provider","--cwd":"cwd","--prompt-in":"promptIn","--events-out":"eventsOut","--transcript":"transcript","--codex-bin":"codexBin","--claude-bin":"claudeBin","--claude-session-uuid":"claudeSessionUuid"},r={};for(let m=0;m<d.length;m++){let u=d[m];if(u==="--fresh-thread"){r.freshThread=!0;continue}let f=t[u];f&&(r[f]=d[m+1],m++)}return r}async function Ie(d){let t=re(d);if(!t.sessionId||!t.projectId||!t.provider||!t.cwd||!t.promptIn||!t.eventsOut)return process.stderr.write(`usage: rnxsim agent-wrapper --session-id <id> --project-id <id>
|
|
6
6
|
--provider codex|claude --cwd <path>
|
|
7
7
|
--prompt-in <fifo> --events-out <fifo>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.314 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{k as p}from"./chunk-
|
|
4
|
+
import{k as p}from"./chunk-7OOPFSQS.js";import"./chunk-C2NL26TD.js";import"./chunk-SGMVFFMK.js";import"./chunk-APWNH3A4.js";import{existsSync as h,mkdirSync as d,readFileSync as y,writeFileSync as g}from"node:fs";import{join as m}from"node:path";import{gzipSync as w}from"node:zlib";function f(t,e){let o=t.indexOf(`--${e}`);if(o!==-1&&o+1<t.length)return t[o+1];let i=t.find(r=>r.startsWith(`--${e}=`));return i?i.slice(e.length+3):void 0}async function x(t){let e=f(t,"wire")||"",o=f(t,"out-dir"),i=f(t,"manifest");if((!o||!i)&&(console.error(" usage: rnxsim app-fonts stage --wire <wire> --out-dir <dir> --manifest <path>"),process.exit(1)),!e.trim()){console.log("no app fonts declared \u2014 nothing to stage");return}d(o,{recursive:!0});let r=await p(e,{onStaged:({url:n,byteLength:s})=>console.log(` staged app font: ${n} (${(s/1024).toFixed(1)} KiB)`),onError:(n,s)=>console.error(` warning: failed to fetch app font ${n}: ${s instanceof Error?s.message:s}`)}),a=[];for(let n of r){let s=w(n.bytes);g(m(o,n.urlhash),s),a.push({url:n.url,urlhash:n.urlhash,contentType:n.contentType,encoding:"gzip",sizeBytes:s.length,rawBytes:n.bytes.byteLength})}let c=[];if(h(i))try{let n=JSON.parse(y(i,"utf8"));Array.isArray(n)&&(c=n)}catch{}let u=new Set(c.map(n=>n.urlhash)),l=[...c,...a.filter(n=>!u.has(n.urlhash))];g(i,JSON.stringify(l)),console.log(`staged ${a.length} app font(s); manifest now has ${l.length} file(s)`)}async function E(t){let e=t[0];if(e==="stage"){await x(t.slice(1));return}console.error(` unknown app-fonts subcommand: ${e??"(none)"}`),console.error(" available: stage"),process.exit(1)}export{E as runAppFonts};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.314 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import"./chunk-
|
|
4
|
+
import"./chunk-APWNH3A4.js";import{spawn as v}from"child_process";var w=new Set(["describe","find","list","network","logs","count","tree","url","a11y","node","layout","keyboard","errors","warnings","requests","animations","animation","state","sample-color"]),S=new Set(["--exists","--empty","--negate","--quiet","--allow-timeout","!"]),q=new Set(["--count","--count-at-least","--count-at-most","--contains","--not-contains","--matches","--not-matches","--equals","--jq","--has-path","--within"]),P=new Set(["--path-equals"]);function j(s){let r=[],u=[],n=0,e=!1,t=!1,i=!1;for(let o=0;o<s.length;o++){let a=s[o];if(a==="--within"){let c=Number(s[o+1]);if(!Number.isFinite(c)||c<0)return{error:`--within requires a non-negative number, got: ${s[o+1]}`};n=c,o++;continue}if(a==="--negate"||a==="!"){e=!0;continue}if(a==="--quiet"){t=!0;continue}if(a==="--allow-timeout"){i=!0;continue}if(S.has(a)){u.push({kind:a,args:[]});continue}if(q.has(a)){let c=s[o+1];if(c==null)return{error:`${a} requires a value`};u.push({kind:a,args:[c]}),o++;continue}if(P.has(a)){let c=s[o+1],f=s[o+2];if(c==null||f==null)return{error:`${a} requires <path> <value>`};u.push({kind:a,args:[c,f]}),o+=2;continue}r.push(a)}return r.length===0?{error:"assert requires a verb (e.g. find, describe, get errors)"}:{verbArgs:r,predicates:u,withinMs:n,negate:e,quiet:t,allowTimeout:i}}function N(s){return s[0]==="get"||s[0]==="debug"?w.has(s[1])?s[1]:null:s[0]==="do"||s[0]==="wait"?null:w.has(s[0])?s[0]:null}async function R(s){let u=[process.argv[1],...s,"--json"];return new Promise(n=>{let e=v(process.execPath,u,{stdio:["ignore","pipe","pipe"],env:process.env}),t="",i="";e.stdout.on("data",o=>t+=o.toString()),e.stderr.on("data",o=>i+=o.toString()),e.on("error",o=>{n({ok:!1,payload:null,reason:`spawn failed: ${o.message}`})}),e.on("close",o=>{if(o!==0){let a=i.trim().split(`
|
|
5
5
|
`).slice(-2).join(" | ").slice(0,200);n({ok:!1,payload:null,reason:`verb exited ${o}${a?`: ${a}`:""}`});return}if(!t.trim()){n({ok:!1,payload:null,reason:"verb produced no output"});return}try{let a=JSON.parse(t);n({ok:!0,payload:a})}catch{n({ok:!1,payload:null,reason:`verb output was not valid json: ${t.slice(0,120)}`})}})})}function y(s,r){let u=r.split(".").filter(e=>e.length>0),n=s;for(let e of u){if(n==null)return{found:!1};if(Array.isArray(n)){let t=Number(e);if(!Number.isInteger(t)||t<0||t>=n.length)return{found:!1};n=n[t];continue}if(typeof n=="object"){let t=n;if(!(e in t))return{found:!1};n=t[e];continue}return{found:!1}}return{found:!0,value:n}}function d(s){return Array.isArray(s)?s.length:s&&typeof s=="object"?Object.keys(s).length:null}async function A(s,r){let{kind:u,args:n}=s;switch(u){case"--exists":return r==null?{ok:!1,reason:"payload is null"}:d(r)===0?{ok:!1,reason:"payload is empty"}:{ok:!0,reason:"exists"};case"--empty":{if(r==null)return{ok:!0,reason:"payload is null"};let e=d(r);return e===0?{ok:!0,reason:"payload is empty"}:{ok:!1,reason:`payload has ${e} item(s)`}}case"--count":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:`payload not countable (${typeof r})`}:{ok:t===e,reason:`count=${t}, want=${e}`}}case"--count-at-least":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:"payload not countable"}:{ok:t>=e,reason:`count=${t}, want>=${e}`}}case"--count-at-most":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:"payload not countable"}:{ok:t<=e,reason:`count=${t}, want<=${e}`}}case"--contains":{let e=n[0],t=JSON.stringify(r);return{ok:t.includes(e),reason:t.includes(e)?`contains "${e}"`:`missing "${e}"`}}case"--not-contains":{let e=n[0],t=JSON.stringify(r);return{ok:!t.includes(e),reason:t.includes(e)?`unexpected "${e}"`:`not contains "${e}"`}}case"--matches":{let e=new RegExp(n[0]),t=JSON.stringify(r),i=e.test(t);return{ok:i,reason:i?`matches /${n[0]}/`:`no match for /${n[0]}/`}}case"--not-matches":{let e=new RegExp(n[0]),t=JSON.stringify(r),i=!e.test(t);return{ok:i,reason:i?`not matches /${n[0]}/`:`unexpected /${n[0]}/`}}case"--equals":{let e=n[0],t=typeof r=="string"?r:typeof r=="number"||typeof r=="boolean"?String(r):JSON.stringify(r);return{ok:t===e,reason:`got=${JSON.stringify(t)}, want=${JSON.stringify(e)}`}}case"--has-path":{let e=y(r,n[0]);return{ok:e.found,reason:e.found?`path ${n[0]} present`:`path ${n[0]} missing`}}case"--path-equals":{let[e,t]=n,i=y(r,e);if(!i.found)return{ok:!1,reason:`path ${e} missing`};let o=typeof i.value=="string"||typeof i.value=="number"||typeof i.value=="boolean"?String(i.value):JSON.stringify(i.value);return{ok:o===t,reason:`${e}=${o}, want=${t}`}}case"--jq":{let e=n[0];try{let i=(await O(e,r)).trim();return{ok:i.length>0&&i!=="null"&&i!=="false"&&i!=='""',reason:`jq: ${i.slice(0,120)}`}}catch(t){throw new Error(`jq evaluation failed: ${t.message}`)}}default:return{ok:!1,reason:`unknown predicate ${u}`}}}function O(s,r){return new Promise((u,n)=>{let e=v("jq",[s],{stdio:["pipe","pipe","pipe"]}),t="",i="";e.stdout.on("data",o=>t+=o.toString()),e.stderr.on("data",o=>i+=o.toString()),e.on("error",n),e.on("close",o=>{if(o!==0){n(new Error(i.trim()||`jq exited ${o}`));return}u(t)}),e.stdin.end(JSON.stringify(r))})}async function T(s){(s[0]==="--help"||s[0]==="-h"||s.length===0)&&(J(),process.exit(s.length===0?2:0));let r=j(s);"error"in r&&(process.stderr.write(` assert: ${r.error}
|
|
6
6
|
`),process.exit(2));let{verbArgs:u,predicates:n,withinMs:e,negate:t,quiet:i,allowTimeout:o}=r;N(u)||(process.stderr.write(` assert: unknown or non-read verb: ${u.join(" ")}
|
|
7
7
|
supported: ${Array.from(w).sort().join(", ")}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.314 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a as s}from"./chunk-
|
|
4
|
+
import{a as s}from"./chunk-3S753SNQ.js";import{d as i}from"./chunk-XULEACM4.js";import"./chunk-AMG5E6CC.js";import"./chunk-APWNH3A4.js";function t(){console.log(`
|
|
5
5
|
rnxsim auth \u2014 inspect CLI auth
|
|
6
6
|
|
|
7
7
|
usage:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.314 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a,b,c,d}from"./chunk-
|
|
4
|
+
import{a,b,c,d}from"./chunk-EAC34EQS.js";import"./chunk-APWNH3A4.js";export{d as BETA_ASK_HEADLINE,b as BETA_LABEL,c as BETA_TAGLINE,a as IS_BETA};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*! rnx v0.1.314 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{m as O}from"./chunk-YFSDM7AX.js";import"./chunk-ZBSJO4NB.js";import{q as E,s as F,u as N}from"./chunk-XLZ5FNRT.js";import"./chunk-SBV4IK4H.js";import{r as S}from"./chunk-AMG5E6CC.js";import"./chunk-APWNH3A4.js";import{createHash as I,randomUUID as q}from"node:crypto";import{createReadStream as D}from"node:fs";import l from"node:fs/promises";import f from"node:path";var T="/__camera-fixtures/",J=new Set([".m4v",".mov",".mp4",".webm"]);function _(){console.log(`
|
|
5
|
+
rnxsim camera \u2014 control the simulator camera source
|
|
6
|
+
|
|
7
|
+
usage:
|
|
8
|
+
rnxsim camera play <file> [--loop] [--rate <number>]
|
|
9
|
+
rnxsim camera stop
|
|
10
|
+
rnxsim camera status [--json]
|
|
11
|
+
rnxsim do scan <text> [--format <web-format>]
|
|
12
|
+
|
|
13
|
+
subcommands:
|
|
14
|
+
play <file> replace the active camera source with a local video fixture
|
|
15
|
+
stop clear fixture mode and restore the live camera source
|
|
16
|
+
status report live, fixture, or idle source state
|
|
17
|
+
scan <text> inject a synthetic barcode result into an active scan session
|
|
18
|
+
|
|
19
|
+
options:
|
|
20
|
+
--loop loop fixture playback
|
|
21
|
+
--rate <n> fixture playback rate (default: 1)
|
|
22
|
+
--format <f> synthetic BarcodeDetector format (default: qr_code)
|
|
23
|
+
--json print status/result as JSON
|
|
24
|
+
--sim <id> target a specific sim
|
|
25
|
+
--port <p> WS bridge port (default: 7668)
|
|
26
|
+
|
|
27
|
+
examples:
|
|
28
|
+
rnxsim camera play ./fixtures/qr.mp4 --loop
|
|
29
|
+
rnxsim camera play ./fixtures/document.webm --rate 2
|
|
30
|
+
rnxsim camera status
|
|
31
|
+
rnxsim camera stop
|
|
32
|
+
rnxsim do scan "https://example.com" --format qr_code
|
|
33
|
+
`)}function U(e){if(!e||typeof e!="object")return!1;let i=Reflect.get(e,"ok"),t=Reflect.get(e,"source");return typeof i=="boolean"&&(t==="live"||t==="fixture"||t==="idle")}async function b(e,i){let t=await e.send({type:"camera",camera:i});if(!U(t))throw new Error("camera bridge returned an invalid result");return t}function $(e,i){if(i){console.log(JSON.stringify(e));return}e.source==="fixture"?console.log(` camera source: fixture (${e.url??"unknown url"}, ${e.loop?"looping":"once"}, ${e.rate??1}x)`):e.source==="live"?console.log(" camera source: live"):e.url?console.log(` camera source: idle (fixture queued: ${e.url}, ${e.loop?"looping":"once"}, ${e.rate??1}x)`):console.log(" camera source: idle"),!e.ok&&e.error&&console.error(` camera failed: ${e.error}`)}async function M(e,i={}){let t=E(e,{port:i.port,stripBooleanFlags:["--help","-h","--json","--loop"],stripValueFlags:["--format","--rate"]}),p=t.positional,n=p[0];if(!n||n==="help"||e.includes("--help")||e.includes("-h"))return _(),n?0:1;let c=F(t),d=e.includes("--json");try{if(n==="scan"){let r=p[1];if(!r)return console.error(" usage: rnxsim do scan <text>"),1;let a=e.indexOf("--format"),s=a>=0?e[a+1]:"qr_code";return s?await N(c,`globalThis.__sootsimCameraInjectScan?.(${JSON.stringify(r)}, ${JSON.stringify(s)}) ?? false`)?(console.log(` injected ${s} scan: ${r}`),0):(console.error(" no active barcode scan session. open a scanning <CameraView> first"),1):(console.error(" --format requires a value"),1)}if(n==="status"){let r=await b(c,{action:"status"});return $(r,d),r.ok?0:1}if(n==="stop"){let r=await b(c,{action:"stop"});return $(r,d),r.ok?0:1}if(n==="play"){let r=p[1];if(!r)return console.error(" usage: rnxsim camera play <file> [--loop] [--rate <number>]"),1;let a=f.resolve(r),s=f.extname(a).toLowerCase();if(!J.has(s))return console.error(` unsupported camera fixture extension ${s||"(none)"}. use mp4, webm, mov, or m4v`),1;let u;try{u=await l.stat(a)}catch{return console.error(` camera fixture not found: ${a}`),1}if(!u.isFile()||u.size===0)return console.error(` camera fixture must be a non-empty file: ${a}`),1;let v=e.indexOf("--rate"),C=v>=0?e[v+1]:void 0,x=C===void 0?1:Number(C);if(!Number.isFinite(x)||x<=0)return console.error(" --rate must be a positive finite number"),1;let g=S();await l.mkdir(g,{recursive:!0});let j=I("sha256");await new Promise((o,m)=>{let h=D(a);h.on("data",P=>j.update(P)),h.once("error",m),h.once("end",o)});let w=`${j.digest("hex")}${s}`,y=f.join(g,w),k=!1;try{if(!(await l.lstat(y)).isFile())throw new Error(`camera fixture cache entry is not a file: ${y}`);k=!0}catch(o){if(!o||typeof o!="object"||Reflect.get(o,"code")!=="ENOENT")throw o}if(!k){let o=f.join(g,`.${w}.${process.pid}-${q()}.tmp`);await l.copyFile(a,o);try{await l.link(o,y)}catch(m){if(!m||typeof m!="object"||Reflect.get(m,"code")!=="EEXIST")throw m}finally{await l.unlink(o).catch(()=>{})}}let B=`http://127.0.0.1:${t.wsPort}${T}${w}`,R=await b(c,{action:"play",url:B,loop:e.includes("--loop"),rate:x});return $(R,d),R.ok?0:1}return console.error(` unknown camera subcommand: ${n}`),_(),1}catch(r){return console.error(` camera failed: ${r instanceof Error?r.message:r}`),await O(c),1}finally{c.close()}}export{M as runCamera};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.314 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a as t}from"./chunk-
|
|
4
|
+
import{a as t}from"./chunk-IZAHPAN6.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,5 +1,5 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.314 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
4
|
function i(t,o,a,c){return{width:3,ringToggle:{side:"left",top:t[0],height:t[1]},volumeUp:{side:"left",top:o[0],height:o[1]},volumeDown:{side:"left",top:a[0],height:a[1]},lock:{side:"right",top:c[0],height:c[1]}}}var E={width:2.5,lock:{side:"right",top:188.7,height:68.1},ringToggle:{side:"left",top:113.2,height:36},volumeUp:{side:"left",top:188.2,height:68.1},volumeDown:{side:"left",top:269,height:68.1}},y={width:3,lock:{side:"right",top:671/2.625,height:163/2.625},ringToggle:{side:"left",top:-1e3,height:0},volumeUp:{side:"right",top:971/2.625,height:165/2.625},volumeDown:{side:"right",top:1136/2.625,height:166/2.625}},A={width:3,lock:{side:"right",top:248,height:72},ringToggle:{side:"left",top:-1e3,height:0},volumeUp:{side:"right",top:144,height:62},volumeDown:{side:"right",top:216,height:62}},s=24,d="17",u=37,T=1080/2.625,O=2400/2.625,h=132/2.625;function r(t){return{top:t,right:t,bottom:t,left:t}}function N(t){let o=(t.frameInsets.top+t.frameInsets.right+t.frameInsets.bottom+t.frameInsets.left)/4,a=Math.max(Math.abs(t.frameInsets.top-o),Math.abs(t.frameInsets.right-o),Math.abs(t.frameInsets.bottom-o),Math.abs(t.frameInsets.left-o));return{frameRadius:t.cornerRadius+o,frameRadiusApproximationError:a,screenRadius:t.cornerRadius}}function _(t){return{...N(t),frameHeight:t.frameInsets.top+t.height+t.frameInsets.bottom,frameWidth:t.frameInsets.left+t.width+t.frameInsets.right,screenBottomInset:t.frameInsets.bottom,screenLeft:t.frameInsets.left,screenRightInset:t.frameInsets.right,screenTop:t.frameInsets.top}}function n(t){return{...t,platform:"ios",navigationBarHeight:0,navigationBarMode:t.homeIndicatorHeight>0?"gesture":"none",displayCutout:{top:t.dynamicIsland?t.statusBarHeight:0,bottom:0,left:0,right:0},cameraCutout:null,osVersion:t.iosVersion,androidApiLevel:null,systemName:"iOS",manufacturer:"Apple",brand:"Apple",modelName:t.name}}var C={"canvas-workspace":n({name:"Canvas Workspace",width:1440,height:900,scale:1,statusBarHeight:0,homeIndicatorHeight:0,cornerRadius:0,continuousCornerRadius:0,frameInsets:r(16),dynamicIsland:null,safeAreaInsets:{top:0,bottom:0,left:0,right:0},iosVersion:"26.4",physicalPPI:110,hardwareButtons:i([185.8,41.7],[258.2,67.6],[344,67.6],[281.5,106.9]),experimental:!0}),"iphone-se":n({name:"iPhone SE",width:375,height:667,scale:2,statusBarHeight:20,homeIndicatorHeight:0,cornerRadius:0,continuousCornerRadius:0,frameInsets:r(28.7),dynamicIsland:null,safeAreaInsets:{top:20,bottom:0,left:0,right:0},iosVersion:"15.8",physicalPPI:326,hardwareButtons:E}),"iphone-14":n({name:"iPhone 14",width:390,height:844,scale:3,statusBarHeight:47,homeIndicatorHeight:34,cornerRadius:46.2,continuousCornerRadius:67.462,frameInsets:r(19.5),dynamicIsland:null,safeAreaInsets:{top:47,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:i([141.7,29.7],[205.9,69.6],[289.5,69.6],[228.9,114.5])}),"iphone-15":n({name:"iPhone 15",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:73.402,frameInsets:r(18.2),dynamicIsland:{width:126,height:37.3,top:14.1},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:i([171.7,32],[235.8,65.3],[320.5,65.3],[280.6,105.2])}),"iphone-15-plus":n({name:"iPhone 15 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:74.654,frameInsets:r(17.3),dynamicIsland:{width:126,height:37.3,top:11.4},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:i([172.1,33],[236.1,66.6],[321.2,66.6],[281,106.8])}),"iphone-15-pro":n({name:"iPhone 15 Pro",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:73.402,frameInsets:r(15.3),dynamicIsland:{width:126,height:38,top:13.4},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:i([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-15-pro-max":n({name:"iPhone 15 Pro Max",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:74.654,frameInsets:r(15.3),dynamicIsland:{width:126,height:38,top:13.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:i([173.3,32.2],[253.4,61.7],[343.3,61.7],[268.5,98.5])}),"iphone-16":n({name:"iPhone 16",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:73.402,frameInsets:r(15.3),dynamicIsland:{width:126,height:37.3,top:11},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-16-plus":n({name:"iPhone 16 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:74.654,frameInsets:r(15.3),dynamicIsland:{width:126,height:37.3,top:11.4},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([173.3,32.2],[253.4,61.7],[343.3,61.7],[268.5,98.5])}),"iphone-16-pro":n({name:"iPhone 16 Pro",width:402,height:874,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:61,continuousCornerRadius:84.661,frameInsets:r(15.3),dynamicIsland:{width:126,height:38,top:13.5},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-16-pro-max":n({name:"iPhone 16 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:61.3,continuousCornerRadius:85.163,frameInsets:r(15.4),dynamicIsland:{width:126,height:38,top:14},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"iphone-17":n({name:"iPhone 17",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:61,continuousCornerRadius:84.661,frameInsets:r(15.3),dynamicIsland:{width:126,height:37.3,top:14},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-17-air":n({name:"iPhone Air",width:420,height:912,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:64.6,continuousCornerRadius:88.313,frameInsets:r(10.7),dynamicIsland:{width:126,height:38,top:20},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"iphone-17-pro":n({name:"iPhone 17 Pro",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:61,continuousCornerRadius:84.661,frameInsets:r(15.3),dynamicIsland:{width:126,height:38,top:14},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-17-pro-max":n({name:"iPhone 17 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:61.3,continuousCornerRadius:85.163,frameInsets:r(15.4),dynamicIsland:{width:126,height:38,top:14},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"pixel-8":{platform:"android",name:"Pixel 8",width:T,height:O,scale:2.625,statusBarHeight:h,homeIndicatorHeight:0,navigationBarHeight:s,navigationBarMode:"gesture",displayCutout:{top:h,bottom:0,left:0,right:0},cornerRadius:39,continuousCornerRadius:39,frameInsets:{top:55/2.625,right:50/2.625,bottom:58/2.625,left:49/2.625},dynamicIsland:null,cameraCutout:{diameter:72.5/2.625},safeAreaInsets:{top:h,bottom:s,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:y},"pixel-8-three-button":{platform:"android",name:"Pixel 8 (3-button)",width:T,height:O,scale:2.625,statusBarHeight:h,homeIndicatorHeight:0,navigationBarHeight:48,navigationBarMode:"three-button",displayCutout:{top:h,bottom:0,left:0,right:0},cornerRadius:39,continuousCornerRadius:39,frameInsets:{top:55/2.625,right:50/2.625,bottom:58/2.625,left:49/2.625},dynamicIsland:null,cameraCutout:{diameter:72.5/2.625},safeAreaInsets:{top:h,bottom:48,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:y},"pixel-9-pro-xl":{platform:"android",name:"Pixel 9 Pro XL",width:448,height:997,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:s,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:41,continuousCornerRadius:41,frameInsets:r(12),dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:s,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 9 Pro XL",physicalPPI:486,hardwareButtons:y},"pixel-10":{platform:"android",name:"Pixel 10",width:360,height:808,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:s,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:40,continuousCornerRadius:40,frameInsets:r(18),dynamicIsland:null,cameraCutout:{diameter:26},safeAreaInsets:{top:40,bottom:s,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 10",physicalPPI:422,hardwareButtons:y},"galaxy-s24":{platform:"android",name:"Galaxy S24",width:360,height:780,scale:3,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:s,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:36,continuousCornerRadius:36,frameInsets:r(8),dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:s,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S921B",physicalPPI:416,hardwareButtons:A},"galaxy-s24-ultra":{platform:"android",name:"Galaxy S24 Ultra",width:384,height:832,scale:3.75,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:s,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:24,continuousCornerRadius:24,frameInsets:r(9),dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:s,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S928B",physicalPPI:505,hardwareButtons:A}},R="iphone-17-pro";function G(t){return C[t]}function v(){return Object.keys(C)}function U(){return v().filter(t=>!C[t].experimental)}var H="rnx",W=Object.freeze({name:H,packageName:"rnxsim",commandName:"rnxsim",domain:"rnxsim.com",origin:"https://rnxsim.com"});var D=["off","soft","full"];function k(t){return t==="off"||t==="soft"||t==="full"}var S={"iphone-6-9":{name:"iphone-6-9",label:'iPhone 6.7"',width:1284,height:2778,store:"apple"},"iphone-6-1":{name:"iphone-6-1",label:'iPhone 6.5"',width:1242,height:2688,store:"apple"},"android-phone":{name:"android-phone",label:"Google Play phone",width:1080,height:1920,store:"google"},"android-tablet-7":{name:"android-tablet-7",label:'Google Play 7" tablet',width:1200,height:1920,store:"google"},"android-tablet-10":{name:"android-tablet-10",label:'Google Play 10" tablet',width:1600,height:2560,store:"google"}},w={dark:{type:"gradient",direction:180,glow:"#4caeff",stops:[{offset:0,color:"#111827"},{offset:40,color:"#101725"},{offset:100,color:"#06080d"}]},cyan:{type:"gradient",direction:180,glow:"#25c3ec",stops:[{offset:0,color:"#1b465c"},{offset:32,color:"#122336"},{offset:100,color:"#05070b"}]},gold:{type:"gradient",direction:180,glow:"#ffc25a",stops:[{offset:0,color:"#3b2f1a"},{offset:34,color:"#18140d"},{offset:100,color:"#050505"}]},red:{type:"gradient",direction:180,glow:"#ff6178",stops:[{offset:0,color:"#3e1018"},{offset:35,color:"#17080c"},{offset:100,color:"#050405"}]}},$={color:"#25c3ec",blur:120,spread:52,opacity:.34},X="iphone-17-pro";var L=[{name:"white",value:"#ffffff"},{name:"gray-light",value:"#d1d5db"},{name:"gray",value:"#6b7280"},{name:"gray-dark",value:"#3b4350"},{name:"slate",value:"#2a3644"},{name:"black",value:"#000000"},{name:"cyan",value:"#25c3ec"},{name:"blue",value:"#3f7cff"},{name:"teal",value:"#1fc7b4"},{name:"green",value:"#42c95d"},{name:"lime",value:"#92d21b"},{name:"gold",value:"#f5c518"},{name:"orange",value:"#ff912e"},{name:"coral",value:"#ff6f5b"},{name:"red",value:"#ff4f6f"},{name:"berry",value:"#d054ff"},{name:"magenta",value:"#ff4eb8"}],B=Object.fromEntries(L.map(t=>[t.name,t.value]));function q(t){return B[t]??B.gray}function Z(t){return Object.prototype.hasOwnProperty.call(S,t)?S[t]:null}function z(t){return{type:t.type,color:t.color,direction:t.direction,glow:t.glow,stops:t.stops?.map(o=>({...o}))}}function Q(t){return Object.prototype.hasOwnProperty.call(w,t)?z(w[t]):null}var F=[.823,.882,.941,1,1.118,1.235,1.353,1.786,2.143,2.643,3.143,3.571];function e(t,o){return Object.freeze({fontSize:t,lineHeight:o})}var ee=Object.freeze({xs:Object.freeze({largeTitle:e(31,44.408775),title1:e(25,37.128102),title2:e(19,27.816685),title3:e(17,23.807109),headline:e(14,20.161577),body:e(14,20.161577),callout:e(13,18.942243),subheadline:e(12,16.720313),footnote:e(12,16.986979),caption1:e(11,15.564453),caption2:e(11,16.126953)}),s:Object.freeze({largeTitle:e(32,45.797256),title1:e(26,38.556756),title2:e(20,29.22433),title3:e(18,25.160469),headline:e(15,21.536754),body:e(15,21.536754),callout:e(14,20.326079),subheadline:e(13,18.213672),footnote:e(12,16.986979),caption1:e(11,15.564453),caption2:e(11,16.126953)}),m:Object.freeze({largeTitle:e(33,47.185737),title1:e(27,39.985409),title2:e(21,30.631975),title3:e(19,26.513828),headline:e(16,22.911932),body:e(16,22.911932),callout:e(15,21.709914),subheadline:e(14,19.557031),footnote:e(12,16.986979),caption1:e(11,15.564453),caption2:e(11,16.126953)}),l:Object.freeze({largeTitle:e(34,48.574219),title1:e(28,41.414063),title2:e(22,32.253906),title3:e(20,27.867187),headline:e(17,24.287109),body:e(17,24.287109),callout:e(16,23.09375),subheadline:e(15,20.900391),footnote:e(13,18.513672),caption1:e(12,17.320313),caption2:e(11,16.126953)}),xl:Object.freeze({largeTitle:e(36,51.351181),title1:e(30,44.271369),title2:e(24,35.069196),title3:e(22,30.733906),headline:e(19,27.037464),body:e(19,27.037464),callout:e(18,25.861421),subheadline:e(17,23.587109),footnote:e(15,21.233724),caption1:e(14,20.269531),caption2:e(13,19.667518)}),xxl:Object.freeze({largeTitle:e(38,54.323266),title1:e(32,47.128676),title2:e(26,37.884487),title3:e(24,33.440625),headline:e(21,29.78782),body:e(21,29.78782),callout:e(20,28.629092),subheadline:e(19,26.273828),footnote:e(17,23.953776),caption1:e(16,23.03125),caption2:e(15,22.515775)}),xxxl:Object.freeze({largeTitle:e(40,57.100229),title1:e(34,50.221278),title2:e(28,40.699777),title3:e(26,36.147344),headline:e(23,32.719993),body:e(23,32.719993),callout:e(22,31.58724),subheadline:e(21,28.960547),footnote:e(19,26.673828),caption1:e(18,25.792969),caption2:e(17,25.364032)}),ax1:Object.freeze({largeTitle:e(44,62.654154),title1:e(38,56.171186),title2:e(34,49.359933),title3:e(31,43.074141),headline:e(28,39.595881),body:e(28,39.595881),callout:e(26,37.122582),subheadline:e(25,34.483984),footnote:e(23,32.280599),caption1:e(22,31.316406),caption2:e(20,29.636418)}),ax2:Object.freeze({largeTitle:e(48,68.403201),title1:e(43,63.314453),title2:e(39,56.612444),title3:e(37,51.194297),headline:e(33,46.653587),body:e(33,46.653587),callout:e(32,45.616071),subheadline:e(30,41.200781),footnote:e(27,37.720703),caption1:e(26,37.027344),caption2:e(24,35.332933)}),ax3:Object.freeze({largeTitle:e(52,73.957127),title1:e(48,70.693015),title2:e(44,63.65067),title3:e(43,59.474453),headline:e(40,56.461648),body:e(40,56.461648),callout:e(38,54.109561),subheadline:e(36,49.410937),footnote:e(33,46.047526),caption1:e(32,45.5),caption2:e(29,42.684345)}),ax4:Object.freeze({largeTitle:e(56,79.706174),title1:e(53,77.600988),title2:e(50,72.310826),title3:e(49,67.754609),headline:e(47,65.360618),body:e(47,66.269709),callout:e(44,62.412574),subheadline:e(42,57.621094),footnote:e(38,53.014323),caption1:e(37,52.404297),caption2:e(34,50.035757)}),ax5:Object.freeze({largeTitle:e(60,85.260099),title1:e(58,85.214844),title2:e(56,80.970982),title3:e(55,76.034766),headline:e(53,74.520774),body:e(53,74.520774),callout:e(51,72.2899),subheadline:e(49,67.174609),footnote:e(44,61.174479),caption1:e(43,60.876953),caption2:e(40,58.811298)})});function M(t){return F.some(o=>Object.is(o,t))}var ae=["colorScheme","reduceMotion","boldText","fontSize","largerAccessibilitySizes"],l={deviceModel:{type:"enum",default:R,description:"device model to simulate",cliFlag:"device",cliFlagShort:"d",options:v(),group:"device"},orientation:{type:"enum",default:"portrait",description:"screen orientation",cliFlag:"orientation",options:["portrait","landscape"],group:"device"},colorScheme:{type:"enum",default:"auto",description:"color scheme (auto follows system preference)",cliFlag:"theme",cliFlagShort:"t",options:["light","dark","auto"],group:"appearance"},reduceMotion:{type:"boolean",default:!1,description:"reduce motion",group:"appearance"},boldText:{type:"boolean",default:!1,description:"bold text",group:"appearance"},fontSize:{type:"number",default:1,description:"font size multiplier (1.0 = default)",group:"appearance",validate:t=>t>=.5&&t<=4},largerAccessibilitySizes:{type:"boolean",default:!1,description:"show accessibility categories in the dynamic type size picker",group:"appearance"},networkCondition:{type:"enum",default:"wifi",description:"simulated network condition",cliFlag:"network",options:["wifi","lte","fast-3g","slow-3g","offline"],group:"network"},language:{type:"string",default:"en",description:"language code (ISO 639-1)",cliFlag:"language",group:"locale"},region:{type:"string",default:"US",description:"region code (ISO 3166-1)",cliFlag:"region",group:"locale"},renderDensity:{type:"number",default:0,description:"render density override in device pixels per point for high-resolution capture (0 = device native)",group:"simulator",validate:t=>t===0||t>=1&&t<=9},showTouches:{type:"boolean",default:!1,description:"show touch indicators",group:"simulator"},showFrame:{type:"boolean",default:!0,description:"show device frame",cliFlag:"frame",group:"simulator"},showMenuBar:{type:"boolean",default:!0,description:"keep the menu bar visible instead of revealing it at the top edge",group:"simulator"},showRail:{type:"boolean",default:!0,description:"keep the rail visible instead of revealing it on hover",group:"simulator"},solidWindow:{type:"boolean",default:!1,description:"desktop app: always use the solid, freely-resizable window instead of the device-shaped transparent one (3d mode uses it regardless)",group:"simulator"},ambientGlow:{type:"enum",default:"off",description:"bleed the app's own edge colors outward behind the device, like bias lighting behind a TV (off, soft, full)",options:D,cliFlag:"ambient-glow",group:"simulator"},screenshotMode:{type:"boolean",default:!1,description:"show screenshot composition mode in the browser shell",group:"simulator"},screenshotCanvasEditing:{type:"boolean",default:!1,description:"experimental figma-style slide editing: draggable copy block, drop-in image layers (owner review pending)",group:"simulator"},threeMode:{type:"boolean",default:!1,description:"show the experimental 3d device stage in the browser shell",group:"simulator"},threeRecordingEditor:{type:"boolean",default:!1,description:"dock the 3d recording editor in the 3d stage (toggled from its rail)",group:"simulator"},screenshotCanvas:{type:"enum",default:"iphone-6-9",description:"target app-store canvas preset for screenshot mode",options:Object.keys(S),group:"simulator"},screenshotBackground:{type:"enum",default:"dark",description:"background preset rendered inside the screenshot canvas",options:Object.keys(w),group:"simulator"},screenshotText:{type:"enum",default:"bold-top",description:"text layout preset for the screenshot canvas",options:["bold-top","editorial-left","minimal-bottom","none"],group:"simulator"},screenshotPose:{type:"enum",default:"straight",description:"device pose preset inside the screenshot canvas",options:["straight","tilted-left","tilted-right","cut-bottom","cut-top"],group:"simulator"},screenshotDynamicSize:{type:"boolean",default:!1,description:"let the screenshot canvas rect fit available space (off = pin to exact preset pixels)",group:"simulator"},showStatusBar:{type:"boolean",default:!0,description:"show status bar",group:"simulator"},showHomeIndicator:{type:"boolean",default:!0,description:"show home indicator",group:"simulator"},alwaysShowLiveWebViews:{type:"boolean",default:!1,description:"always render WebViews as live browser views",group:"simulator"},a11yMode:{type:"enum",default:"delayed",description:"accessibility tree sync mode (off, delayed=100ms, active=30ms)",options:["off","delayed","active"],group:"simulator"},a11yDepth:{type:"enum",default:"deep",description:"accessibility tree structure depth (shallow or deep)",options:["shallow","deep"],group:"simulator"},inspectMode:{type:"boolean",default:!1,description:"inspect mode",group:"simulator"},productAnalytics:{type:"boolean",default:!0,description:"send bounded product usage analytics",group:"privacy"},crashReports:{type:"boolean",default:!0,description:"send anonymous crash reports",group:"privacy"},agentProvider:{type:"enum",default:"codex",description:"ai agent used by the sootsim agent prompt bar",options:["codex","claude"],group:"agent"}},se={colorScheme:l.colorScheme.default,reduceMotion:l.reduceMotion.default,boldText:l.boldText.default,fontSize:l.fontSize.default,largerAccessibilitySizes:l.largerAccessibilitySizes.default};function V(){if(typeof window>"u")return{};let t={};try{let o=new URLSearchParams(window.location.search),a=o.get("device");a&&l.deviceModel.options?.includes(a)&&(t.deviceModel=a),o.get("ssMode")==="1"&&(t.screenshotMode=!0),o.get("filmStage")==="1"&&(t.threeMode=!0,a||(t.deviceModel="iphone-17-air"));let c=Number(o.get("renderDensity"));Number.isFinite(c)&&c>=1&&c<=9&&(t.renderDensity=c),o.get("ssEdit")==="1"&&(t.screenshotCanvasEditing=!0);let I=o.get("colorScheme")??o.get("theme");I&&l.colorScheme.options?.includes(I)&&(t.colorScheme=I);let p=o.get("reduceMotion");p==="1"||p==="true"?t.reduceMotion=!0:(p==="0"||p==="false")&&(t.reduceMotion=!1);let m=o.get("boldText");m==="1"||m==="true"?t.boldText=!0:(m==="0"||m==="false")&&(t.boldText=!1);let x=Number(o.get("fontSize"));Number.isFinite(x)&&M(x)&&(t.fontSize=x);let g=o.get("largerAccessibilitySizes");g==="1"||g==="true"?t.largerAccessibilitySizes=!0:(g==="0"||g==="false")&&(t.largerAccessibilitySizes=!1);let f=o.get("alwaysShowLiveWebViews");f==="1"||f==="true"?t.alwaysShowLiveWebViews=!0:(f==="0"||f==="false")&&(t.alwaysShowLiveWebViews=!1);let b=o.get("showFrame");b==="1"||b==="true"?t.showFrame=!0:(b==="0"||b==="false")&&(t.showFrame=!1);let P=o.get("ambientGlow");k(P)&&(t.ambientGlow=P)}catch{}return t}function le(){let t={};for(let[o,a]of Object.entries(l))t[o]=a.default;return Object.assign(t,V()),t}export{_ as a,C as b,G as c,U as d,$ as e,X as f,q as g,Z as h,z as i,Q as j,ae as k,l,se as m,V as n,le as o};
|
|
5
|
-
/*! rnx v0.1.
|
|
5
|
+
/*! rnx v0.1.314 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.314 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{b as $}from"./chunk-
|
|
4
|
+
import{b as $}from"./chunk-MJYK3N2I.js";import{b as y,c as R,d as m,e as w,f as a}from"./chunk-HAXW27SS.js";import{n as x}from"./chunk-XLZ5FNRT.js";import{I as g,J as u,K as d,Q as h,l as p}from"./chunk-AMG5E6CC.js";import O from"fs";import{WebSocket as E}from"ws";function C(t){if(!t||typeof t!="object")return!1;let e=Reflect.get(t,"sections");return typeof Reflect.get(t,"title")=="string"&&Array.isArray(e)&&e.every(s=>s&&typeof s=="object"&&typeof Reflect.get(s,"title")=="string"&&Array.isArray(Reflect.get(s,"items"))&&Reflect.get(s,"items").every(n=>n&&typeof n=="object"&&typeof Reflect.get(n,"summary")=="string"&&typeof Reflect.get(n,"hash")=="string"))}async function b(t,e=fetch){try{let s=new URL(w);s.searchParams.set("version",t);let n=await e(s,{headers:{accept:"application/json"},signal:AbortSignal.timeout(5e3)});if(!n.ok)return null;let o=await n.json();if(!o||typeof o!="object")return null;let i=Reflect.get(o,"entries");return!Array.isArray(i)||!C(i[0])?null:i[0]}catch{return null}}function A(t,e){let s=[`what's new in rnx engine v${t}:`];if(!e||e.sections.length===0)s.push(" release notes are not available yet");else for(let n of e.sections){s.push(` ${n.title}:`);for(let o of n.items)s.push(` \u2022 ${o.summary}`)}return s.push(` full changelog: ${m}`),s.join(`
|
|
5
5
|
`)}async function Q(t,e={}){let[s,...n]=t;if(!s||s==="--help"||s==="-h"){S();return}switch(s){case"install":return L(n,e);case"list":case"ls":return j(n);case"use":return T(n);case"remove":case"rm":return D(n);case"which":case"active":return G();case"notes":case"changelog":return U(n);default:console.error(` unknown runtime subcommand: ${s}`),S(),process.exit(1)}}function S(){console.log(`
|
|
6
6
|
rnxsim runtime \u2014 manage engine runtimes under ~/.sootsim/runtimes/
|
|
7
7
|
|
|
@@ -27,4 +27,4 @@ examples:
|
|
|
27
27
|
rnxsim runtime install --channel beta
|
|
28
28
|
rnxsim runtime use 1.2.3
|
|
29
29
|
rnxsim runtime notes
|
|
30
|
-
`)}async function L(t,e){let{version:s,flags:n}=F(t),o=n.channel??e.channel??"stable",i=n.force===!0,l=n.setActive!==!1;g(),console.log("rnxsim runtime install"),console.log(` cdn: ${a.resolveCdnOrigin()}`);try{let r=await a.install({version:s,channel:o,force:i,setActive:l,protectVersions:h()});return console.log(` version: ${r.version} (channel: ${r.channel})`),r.installed?console.log(` installed ${r.version}`):console.log(` already installed at ${r.runtimeDir}`),l&&await k(r.version),r}catch(r){console.error(` ${I(r)}`),process.exit(1)}}async function k(t){d(t),console.log(` active: ${t}`),await _(t)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${t})`)}async function _(t){let{isDaemonLockfileFresh:e,readDaemonLockfile:s}=await import("./home-paths-
|
|
30
|
+
`)}async function L(t,e){let{version:s,flags:n}=F(t),o=n.channel??e.channel??"stable",i=n.force===!0,l=n.setActive!==!1;g(),console.log("rnxsim runtime install"),console.log(` cdn: ${a.resolveCdnOrigin()}`);try{let r=await a.install({version:s,channel:o,force:i,setActive:l,protectVersions:h()});return console.log(` version: ${r.version} (channel: ${r.channel})`),r.installed?console.log(` installed ${r.version}`):console.log(` already installed at ${r.runtimeDir}`),l&&await k(r.version),r}catch(r){console.error(` ${I(r)}`),process.exit(1)}}async function k(t){d(t),console.log(` active: ${t}`),await _(t)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${t})`)}async function _(t){let{isDaemonLockfileFresh:e,readDaemonLockfile:s}=await import("./home-paths-QRCDLTTV.js"),n=s();if(!e(n))return!1;let o=x();return new Promise(i=>{let l=!1,r=!1,f=N=>{l||(l=!0,i(N))},c=new E(`ws://127.0.0.1:${o}`,{handshakeTimeout:800}),v=setTimeout(()=>{try{c.close()}catch{}f(r)},1500);c.on("open",()=>{try{c.send(JSON.stringify({type:"runtime:use",version:t,id:0})),r=!0}catch{}setTimeout(()=>{try{c.close()}catch{}},100)}),c.on("close",()=>{clearTimeout(v),f(r)}),c.on("error",()=>{clearTimeout(v),f(!1)})})}async function j(t){g();let e=a.listInstalled(),s=u();if(console.log("installed:"),e.length===0)console.log(" (none)");else for(let n of e)console.log(` ${n===s?"*":" "} ${n}`);try{let n=await a.fetchManifest();console.log("available (latest per channel):");for(let[i,l]of Object.entries(n.channels))console.log(` ${i.padEnd(8)} ${l.latest}`);let o=Object.keys(n.versions).sort(y).reverse();if(o.length>1){console.log("hosted versions:");for(let i of o)console.log(` ${i}`)}}catch(n){console.log(`available: (could not fetch manifest: ${I(n)})`)}}async function T(t){let e=t[0];e||(console.error(" usage: rnxsim runtime use <version>"),process.exit(1));let s=a.listInstalled();s.includes(e)||(console.error(` version ${e} is not installed`),console.error(` installed: ${s.join(", ")||"(none)"}`),console.error(` run \`rnxsim runtime install ${e}\` first`),process.exit(1)),await k(e)}async function D(t){let e=t[0];e||(console.error(" usage: rnxsim runtime remove <version>"),process.exit(1)),u()===e&&(console.error(` cannot remove active runtime ${e}`),console.error(" switch with `rnxsim runtime use <other>` first, or install another version"),process.exit(1)),h().includes(e)&&(console.error(` cannot remove runtime ${e} while a project is using it`),process.exit(1));let n=p(e);if(!O.existsSync(n)){console.error(` ${e} is not installed`);return}O.rmSync(n,{recursive:!0,force:!0}),console.log(` removed ${e}`)}async function G(){let t=u();if(!t){console.log(" no active runtime");return}console.log(t)}async function U(t){t.length>0&&(console.error(" usage: rnxsim runtime notes"),process.exit(1));let{config:e}=await $(),s=e?.runtimeVersion??u();if(!s){console.log(" no active runtime"),console.log(` release notes: ${m}`);return}console.log(A(s,await b(s)))}function F(t){let e={},s=[];for(let n=0;n<t.length;n++){let o=t[n];if(o==="--channel"&&n+1<t.length){e.channel=t[n+1],n++;continue}if(o.startsWith("--channel=")){e.channel=o.slice(10);continue}if(o==="--force"){e.force=!0;continue}if(o==="--set-active=false"||o==="--no-set-active"){e.setActive=!1;continue}s.push(o)}return{version:s[0]??null,flags:e}}function I(t){return t instanceof Error?t.message:String(t)}export{b as a,A as b,Q as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.314 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a as i}from"./chunk-
|
|
4
|
+
import{a as i}from"./chunk-XULEACM4.js";var c=["ghs_","ghp_","gho_","ghu_","github_pat_"];function p(n){return!!(n&&n.length>=20&&c.some(e=>n.startsWith(e)))}function a(){let n=process.env.CONTRAST_INSTALLATION_TOKEN?.trim(),e=process.env.GITHUB_TOKEN?.trim(),t=n||e;if(!p(t))return null;let r=(process.env.CONTRAST_REPO||process.env.GITHUB_REPOSITORY||"").trim();if(!r)return null;let[o,s]=r.includes("/")?r.split("/",2):[null,null],u=(process.env.CONTRAST_REPO_ID||process.env.GITHUB_REPOSITORY_ID||"").trim(),l=(process.env.CONTRAST_INSTALLATION_ID||process.env.GITHUB_APP_INSTALLATION_ID||"").trim();return{kind:"github",token:t,repoId:r,repositoryId:u||null,owner:o||null,repo:s||null,installationId:l||null,source:n?"contrast-runner":"github-actions"}}function d(n){return n.startsWith("sk_rnx_")||n.startsWith("sk_sootsim_")}function I(){for(let n of["RNX_API_KEY","SOOTSIM_API_KEY"]){let e=process.env[n]?.trim();if(e&&d(e))return{secret:e,envName:n}}return null}function _(){let n=I();if(n)return{kind:"api-key",secret:n.secret,source:"env",envName:n.envName};let e=a();if(e)return e;let t=i();return t?.token?{kind:"session",token:t.token,origin:t.origin}:null}function A(n){return n.kind==="api-key"?`Bearer ${n.secret}`:`Bearer ${n.token}`}function h(n){return!n||n.kind!=="github"?null:{repoId:n.repoId,owner:n.owner??void 0,repo:n.repo??void 0,installationId:n.installationId}}export{_ as a,A as b,h as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.314 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a}from"./chunk-
|
|
4
|
+
import{a}from"./chunk-XULEACM4.js";import{C as l,E as u}from"./chunk-AMG5E6CC.js";var c=/^[A-Za-z0-9._:-]{1,160}$/;function T(e){if(!e?.startsWith("TM_SESSION:"))return null;let n=e.slice(11).trim();return c.test(n)?n:null}function p(e){return c.test(e)}function f(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!l().productAnalytics}function m(){if(f())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let n=process.env.CONTRAST_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:n.replace(/\/+$/,"")}}function d(){try{return u()}catch{return"anonymous-cli"}}function S(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:d():d()}function h(e){let n=e.identity??{},o=process.env.TM_SESSION,s=o&&p(o)?"team-machine":process.env.CI==="1"||process.env.CI==="true"||process.env.GITHUB_ACTIONS==="true"?"ci":null,t={$lib:"sootsim-cli",source:n.source??"cli",...e.properties,traffic_type:s?"automated":"human",is_automated:s!==null,...s?{automation_source:s}:{}};return n.userId&&(t.userId=n.userId),n.repoId&&(t.repoId=n.repoId),n.installationId!=null&&(t.installationId=String(n.installationId)),n.shareId&&(t.shareId=n.shareId),n.plan&&(t.plan=n.plan),{event:e.event,distinct_id:S(n),properties:t,timestamp:new Date().toISOString()}}var r=[],I=!1;async function i(){if(r.length===0)return;let e=m();if(!e){r.length=0;return}let n=r.splice(0,r.length).map(h);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:n}),signal:AbortSignal.timeout(2e3)})}catch{}}function g(){I||(I=!0,process.on("beforeExit",()=>void i()),process.on("exit",()=>void i()))}function C(e){if(f())return;g();let n=null;try{n=a()?.user?.id??null}catch{n=null}r.push({...e,identity:{source:"cli",userId:n,...e.identity}})}async function E(){await i()}export{T as a,p as b,C as c,E as d};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.314 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a as
|
|
5
|
-
`,"utf8"),v.renameSync(r,P()),t}function K(){return D(k()).profiles}function Y(e){let t=d(e);return K().find(r=>r.id===t)??null}function L(e=h){let t=d(e),r=Y(t);return r||V(t)}function V(e){let t=d(e),r=O(k());if(r.profiles.some(i=>i.id===t))throw new Error(`profile already exists: ${t}`);let o=new Date().toISOString(),n={id:t,createdAt:o,updatedAt:o};return D({version:u,profiles:[...r.profiles,n]}),n}function ve(e){let t=d(e);if(t===h)throw new Error("the default profile cannot be deleted; clear it instead");let r=O(k()),o=r.profiles.find(n=>n.id===t);if(!o)throw new Error(`profile not found: ${t}`);return D({version:u,profiles:r.profiles.filter(n=>n.id!==t)}),X(t),o}function X(e){let t=d(e);for(let r of[J(t),x(t)])try{v.rmSync(r,{recursive:!0,force:!0})}catch{}}function Z(){let e=y();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"rnxsim desktop app not installed (run `rnxsim desktop install`)"}}async function Q(e){let t=y();if(!t)return{launched:!1,message:"rnxsim desktop app not installed"};try{let r=await M(e.url,t,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile,ownerPid:e.ownerPid});return r.launched?{launched:!0,message:e.url?`electron launched via ${r.via} \u2192 ${e.url}`:`electron launched via ${r.via}`,target:r.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(r){return{launched:!1,message:`electron launch failed: ${r instanceof Error?r.message:String(r)}`}}}var W={id:"electron",name:"electron",description:"rnxsim desktop companion app (native window, menu bar)",kind:"native",availability:Z,launch:Q};import{spawn as ie}from"child_process";import{closeSync as se,mkdtempSync as ae,openSync as le,readFileSync as ce}from"fs";import{tmpdir as G}from"os";import{join as B}from"path";import{spawnSync as $}from"node:child_process";import{existsSync as F,readFileSync as ee}from"node:fs";import{createRequire as re}from"node:module";import{dirname as te,join as oe}from"node:path";var ne=`
|
|
4
|
+
import{a as f,b as S}from"./chunk-TUOFAWXT.js";import{a as y,c as P}from"./chunk-YWI3UEVX.js";import{a as v}from"./chunk-VQVMLW4U.js";import{b}from"./chunk-SBV4IK4H.js";function M(){let e=f();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"rnxsim desktop app not installed (run `rnxsim desktop install`)"}}async function A(e){let o=f();if(!o)return{launched:!1,message:"rnxsim desktop app not installed"};try{let r=await S(e.url,o,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile,ownerPid:e.ownerPid});return r.launched?{launched:!0,message:e.url?`electron launched via ${r.via} \u2192 ${e.url}`:`electron launched via ${r.via}`,target:r.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(r){return{launched:!1,message:`electron launch failed: ${r instanceof Error?r.message:String(r)}`}}}var k={id:"electron",name:"electron",description:"rnxsim desktop companion app (native window, menu bar)",kind:"native",availability:M,launch:A};import{spawn as B}from"child_process";import{closeSync as F,mkdtempSync as G,openSync as U,readFileSync as q}from"fs";import{tmpdir as T}from"os";import{join as I}from"path";import{spawnSync as O}from"node:child_process";import{existsSync as _,readFileSync as R}from"node:fs";import{createRequire as L}from"node:module";import{dirname as W,join as N}from"node:path";var $=`
|
|
6
5
|
const { existsSync } = require('node:fs');
|
|
7
6
|
const modulePath = process.env.SOOTSIM_PW_MODULE;
|
|
8
7
|
try {
|
|
@@ -17,8 +16,8 @@ try {
|
|
|
17
16
|
process.stderr.write(String((error && error.stack) || error));
|
|
18
17
|
process.exit(1);
|
|
19
18
|
}
|
|
20
|
-
`;function
|
|
21
|
-
${a}`:""}`}}let n=
|
|
19
|
+
`;function w(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function g(){let e=[`${process.cwd()}/`];process.argv[1]&&e.push(process.argv[1]);for(let o of e)try{let r=L(o);for(let t of["playwright","playwright-chromium","playwright-core"])try{let n=r.resolve(t),i=r.resolve(`${t}/package.json`),a=JSON.parse(R(i,"utf8"));if(!w(a)||typeof a.version!="string")continue;let l=a.bin,s=null;if(typeof l=="string")s=l;else if(w(l)){let d=l.playwright??l["playwright-core"],p=Object.values(l).find(c=>typeof c=="string");s=typeof d=="string"?d:typeof p=="string"?p:null}if(!s)continue;let u=N(W(i),s);if(!_(u))continue;return{spec:t,modulePath:n,cliPath:u,version:a.version}}catch{}}catch{}return null}function x(e,o){let r=O(process.execPath,["-e",$],{env:{...o,SOOTSIM_PW_MODULE:e.modulePath},encoding:"utf8",timeout:3e4});if(r.status!==0){let t=(r.stderr||r.error?.message||"browser probe failed").trim();return{ok:!1,message:`could not inspect ${e.spec}@${e.version} chromium: ${t}`}}try{let t=JSON.parse(r.stdout);if(!w(t)||typeof t.executablePath!="string"||typeof t.exists!="boolean")throw new Error("probe returned an invalid result");return{ok:!0,executablePath:t.executablePath,exists:t.exists&&_(t.executablePath)}}catch(t){return{ok:!1,message:`could not inspect ${e.spec}@${e.version} chromium: ${t instanceof Error?t.message:String(t)}`}}}function D(e,o=process.env){let r=x(e,o);if(!r.ok)return r;if(r.exists)return{ok:!0,executablePath:r.executablePath,installed:!1};let t=O(process.execPath,[e.cliPath,"install","chromium"],{env:o,encoding:"utf8",timeout:10*6e4});if(t.status!==0){let i=(t.stderr||t.stdout||t.error?.message||"browser install failed").trim(),a=i.length<=4e3?i:i.slice(-4e3);return{ok:!1,message:`${e.spec}@${e.version} requires chromium at ${r.executablePath}, but its browser install failed${a?`:
|
|
20
|
+
${a}`:""}`}}let n=x(e,o);return n.ok?n.exists?{ok:!0,executablePath:n.executablePath,installed:!0}:{ok:!1,message:`${e.spec}@${e.version} browser install completed, but its required chromium executable is still missing at ${n.executablePath}`}:n}var j=`
|
|
22
21
|
const modulePath = process.env.SOOTSIM_PW_MODULE;
|
|
23
22
|
const url = process.env.SOOTSIM_PW_URL;
|
|
24
23
|
// the WS bridge port the sim page must register with, injected below as
|
|
@@ -65,7 +64,7 @@ const viewport = viewportSpec
|
|
|
65
64
|
const deviceScaleFactor = Number(process.env.SOOTSIM_PW_DSF || 2);
|
|
66
65
|
const closeTimeoutMs = Number(process.env.SOOTSIM_PW_CLOSE_TIMEOUT_MS || 2500);
|
|
67
66
|
const connectAckFile = process.env.SOOTSIM_PW_CONNECTED_ACK_FILE || '';
|
|
68
|
-
const disposableBrowserCacheDirs = new Set(${JSON.stringify(
|
|
67
|
+
const disposableBrowserCacheDirs = new Set(${JSON.stringify(v)});
|
|
69
68
|
const { existsSync, mkdtempSync, readdirSync, rmSync, unlinkSync } = require('fs');
|
|
70
69
|
const { execSync } = require('child_process');
|
|
71
70
|
const { tmpdir } = require('os');
|
|
@@ -502,6 +501,6 @@ const cleanupProfile = () => {
|
|
|
502
501
|
process.stderr.write(String((err && err.stack) || err) + '\\n');
|
|
503
502
|
process.exit(1);
|
|
504
503
|
});
|
|
505
|
-
`;function
|
|
506
|
-
${c}`:""}${
|
|
507
|
-
${
|
|
504
|
+
`;function H(){let e=g();return e?{available:!0,reason:null,detail:`resolved via ${e.spec}@${e.version}`}:{available:!1,reason:"playwright not installed in the current workspace"}}function K(e,o){return process.platform!=="linux"||e.headless||process.env.DISPLAY||process.env.WAYLAND_DISPLAY||!/missing x server|cannot open display|x server|x11/i.test(o)?null:" hint: linux without DISPLAY/WAYLAND_DISPLAY \u2014 rerun without --headed (or add --headless) to run playwright headless."}function Y(e){return e.profileId?y(P(e.profileId).id):e.ephemeralProfile?G(I(T(),"sootsim-playwright-profile-")):""}async function J(e){let o=g();if(!o)return{launched:!1,message:"playwright not installed \u2014 run `bun add -D playwright` first"};if(!e.url)return{launched:!1,message:"playwright driver requires a target url"};let r=e.ownerPid;if(r===void 0||!Number.isInteger(r)||r<=1)return{launched:!1,message:"playwright driver requires a valid owning session process"};let t={...process.env},n=D(o,t);if(!n.ok)return{launched:!1,message:`playwright browser provisioning failed: ${n.message}`};let i=I(T(),`sootsim-playwright-host-${Date.now().toString(36)}-${process.pid}.log`),a=`${i}.connected`,l=U(i,"a");try{let s=B(process.execPath,["-e",j],{detached:!0,stdio:["ignore","ignore",l],env:{...t,SOOTSIM_PW_MODULE:o.modulePath,SOOTSIM_PW_URL:e.url,SOOTSIM_PW_BRIDGE_PORT:e.bridgePort?String(e.bridgePort):"",SOOTSIM_PW_HEADLESS:e.headless??!0?"1":"0",SOOTSIM_PW_USERDATADIR:Y(e),SOOTSIM_PW_CDP_PORT:e.cdpPort?String(e.cdpPort):"",...e.viewport?{SOOTSIM_PW_VIEWPORT:`${e.viewport.width}x${e.viewport.height}`}:{},SOOTSIM_PW_CONNECTED_ACK_FILE:a,SOOTSIM_PW_CONNECT_TIMEOUT_MS:String(e.connectTimeoutMs??12e4),SOOTSIM_PW_OWNER_PID:String(r)}});s.unref();let u=await new Promise(c=>{let m=setTimeout(()=>c(null),4e3);s.once("exit",C=>{clearTimeout(m),c(C??0)})});if(u!==null){let c=q(i,"utf8").trim(),m=K(e,c);return{launched:!1,message:`playwright host exited early (code ${u}) \u2014 host log ${i}${c?`:
|
|
505
|
+
${c}`:""}${m?`
|
|
506
|
+
${m}`:""}`}}let d=b(r),p=` \u2014 browser closes when pid ${r}${d?` (${d})`:""} exits`;return{launched:!0,message:`playwright chrome launched \u2192 ${e.url}${p}`,pid:s.pid,target:o.spec,attachUrl:e.url,connectAckFile:a,diagnosticLogPath:i}}catch(s){return{launched:!1,message:`playwright launch failed: ${s instanceof Error?s.message:String(s)}`}}finally{F(l)}}var E={id:"playwright",name:"playwright",description:"programmatic chromium via the playwright package \u2014 headless default",kind:"automation",availability:H,launch:J};var h=[k,E];function pe(){return h}function me(e){return h.find(o=>o.id===e)??null}function fe(e,o){if(e)return h.find(t=>t.id===e)??null;for(let r of o){let t=h.find(n=>n.id===r);if(t&&t.availability().available)return t}return null}function we(){return h.map(e=>{let o=e.availability();return{id:e.id,name:e.name,kind:e.kind,description:e.description,available:o.available,reason:o.reason,detail:o.detail??null}})}export{k as a,E as b,h as c,pe as d,me as e,fe as f,we as g};
|