rnxsim 0.1.352 → 0.1.353
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -16
- package/cli/bin.ts +5 -4
- package/cli/commands/control.ts +20 -5
- package/cli/commands/daemon-mac-app.ts +1 -1
- package/cli/commands/daemon.ts +6 -8
- package/cli/commands/install-desktop.ts +42 -32
- package/cli/commands/no-bridge-hint.ts +3 -3
- package/cli/commands/serve.ts +1 -1
- package/cli/commands/setup.ts +215 -176
- package/cli/commands/welcome.ts +9 -58
- package/cli/desktop-companion.ts +31 -16
- package/cli/prompt.ts +12 -7
- package/cli/setup-repository.ts +6 -2
- package/cli/ui.ts +68 -0
- package/dist-cli/bin.js +5 -5
- package/dist-cli/chunks/{agent-27WDUXK5.js → agent-YTAX6OQQ.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-XAUWPZ6O.js → agent-wrapper-2QSUXMNK.js} +2 -2
- package/dist-cli/chunks/{app-fonts-COAZFLDG.js → app-fonts-4EVHPXVG.js} +2 -2
- package/dist-cli/chunks/{assert-ZR2UE3EH.js → assert-IXMSQLVY.js} +2 -2
- package/dist-cli/chunks/{auth-LISHWKCC.js → auth-6QFWU2T5.js} +2 -2
- package/dist-cli/chunks/{beta-AQQUYVA5.js → beta-27I5WWRE.js} +2 -2
- package/dist-cli/chunks/{camera-KE44ZN3U.js → camera-4HFUBXPM.js} +2 -2
- package/dist-cli/chunks/{chunk-DJAYEBF3.js → chunk-37J74ASV.js} +1 -1
- package/dist-cli/chunks/{chunk-XI4W6LRQ.js → chunk-3IWR7KHR.js} +2 -2
- package/dist-cli/chunks/{chunk-CY6HBAOB.js → chunk-3UXMNDMH.js} +2 -2
- package/dist-cli/chunks/{chunk-R2BFC3AC.js → chunk-3XDGLCNP.js} +2 -2
- package/dist-cli/chunks/{chunk-6NSUY346.js → chunk-4IXIONDR.js} +2 -2
- package/dist-cli/chunks/{chunk-YAMKV3UB.js → chunk-4NPZ5FO2.js} +2 -2
- package/dist-cli/chunks/{chunk-QJTW4QQW.js → chunk-4PV6QASJ.js} +1 -1
- package/dist-cli/chunks/{chunk-PEBQKBEP.js → chunk-57YZEJ6J.js} +1 -1
- package/dist-cli/chunks/{chunk-4AOAJXE2.js → chunk-5DLBRZAG.js} +2 -2
- package/dist-cli/chunks/{chunk-7T7DR34H.js → chunk-6JBOKETZ.js} +2 -2
- package/dist-cli/chunks/{chunk-AR3CPCW3.js → chunk-6NE5Z6KG.js} +1 -1
- package/dist-cli/chunks/{chunk-RASWCAJJ.js → chunk-7FUSVOMH.js} +2 -2
- package/dist-cli/chunks/{chunk-5JE5PNIV.js → chunk-7SKQRS74.js} +1 -1
- package/dist-cli/chunks/chunk-7V5O6I4Q.js +9 -0
- package/dist-cli/chunks/{chunk-3Y7NWE22.js → chunk-BK5TJXUU.js} +2 -2
- package/dist-cli/chunks/{chunk-H4IF54WS.js → chunk-CMQIFA4L.js} +1 -1
- package/dist-cli/chunks/{chunk-3ZV4WSCR.js → chunk-CYS3D7RG.js} +2 -2
- package/dist-cli/chunks/{chunk-LRKODRWI.js → chunk-DSBUGNC5.js} +2 -2
- package/dist-cli/chunks/{chunk-EGKGCDG5.js → chunk-ECIDT6F5.js} +1 -1
- package/dist-cli/chunks/{chunk-EHQHK7KN.js → chunk-ELBDKQK2.js} +2 -2
- package/dist-cli/chunks/{chunk-ELNSQ352.js → chunk-GAYCF2O5.js} +1 -1
- package/dist-cli/chunks/{chunk-ESVF72YH.js → chunk-HVLZYUGF.js} +2 -2
- package/dist-cli/chunks/{chunk-5JINX2IB.js → chunk-HWMBTYJX.js} +2 -2
- package/dist-cli/chunks/{chunk-MJB6N7WS.js → chunk-HZTWQZUD.js} +2 -2
- package/dist-cli/chunks/{chunk-M6DC6JZL.js → chunk-IX7W5BXL.js} +2 -2
- package/dist-cli/chunks/{chunk-BZ32JGFC.js → chunk-JVVO63QH.js} +1 -1
- package/dist-cli/chunks/{chunk-JEPQ5YX3.js → chunk-KIQVNLVD.js} +2 -2
- package/dist-cli/chunks/chunk-KZLGVYCX.js +7 -0
- package/dist-cli/chunks/{chunk-QP7KGSU4.js → chunk-LAFKQUT7.js} +3 -3
- package/dist-cli/chunks/{chunk-E42ZJLPN.js → chunk-LMFAIAA5.js} +1 -1
- package/dist-cli/chunks/chunk-MA5E6HJR.js +15 -0
- package/dist-cli/chunks/chunk-OEU2MEZQ.js +124 -0
- package/dist-cli/chunks/{chunk-BQE4E24T.js → chunk-PBTG4UCS.js} +1 -1
- package/dist-cli/chunks/{chunk-XHZEKHB2.js → chunk-PNQ33FJB.js} +6 -6
- package/dist-cli/chunks/{chunk-MJJP2BEI.js → chunk-R4KBCGXX.js} +3 -3
- package/dist-cli/chunks/chunk-RMOSWLWG.js +32 -0
- package/dist-cli/chunks/{chunk-WNJDE2JT.js → chunk-RRX5RZI2.js} +1 -1
- package/dist-cli/chunks/{chunk-R4P7WO4L.js → chunk-T2ZZSSCP.js} +2 -2
- package/dist-cli/chunks/{chunk-DSF4WC4X.js → chunk-TX2T5KPQ.js} +2 -2
- package/dist-cli/chunks/{chunk-2OME2KGY.js → chunk-UEILOAPW.js} +1 -1
- package/dist-cli/chunks/{chunk-TF6VBUZ7.js → chunk-UNBVUOIC.js} +2 -2
- package/dist-cli/chunks/chunk-UQBXA3AK.js +24 -0
- package/dist-cli/chunks/{chunk-H6MTPXZS.js → chunk-V7X543SB.js} +1 -1
- package/dist-cli/chunks/{chunk-45D2GGIA.js → chunk-VLI54BKH.js} +2 -2
- package/dist-cli/chunks/{chunk-RH6FJI5O.js → chunk-VZDW2U64.js} +2 -2
- package/dist-cli/chunks/chunk-WKQ6W74M.js +11 -0
- package/dist-cli/chunks/{chunk-S2PJOB2C.js → chunk-WTGQUQ32.js} +2 -2
- package/dist-cli/chunks/{chunk-P5YC5VGA.js → chunk-WU25RTIX.js} +2 -2
- package/dist-cli/chunks/chunk-WV3TKN7D.js +4 -0
- package/dist-cli/chunks/{chunk-Q4ROOH3W.js → chunk-XVLYLZOM.js} +2 -2
- package/dist-cli/chunks/{chunk-VQDY7NEJ.js → chunk-YQJOM55S.js} +1 -1
- package/dist-cli/chunks/{chunk-AIGZ3TSW.js → chunk-YYYWU6LL.js} +3 -3
- package/dist-cli/chunks/{chunk-NQMZOJPX.js → chunk-ZF53H457.js} +2 -2
- package/dist-cli/chunks/{chunk-24CIPQT5.js → chunk-ZJ4O636U.js} +1 -1
- package/dist-cli/chunks/{chunk-ZK5HYQ4I.js → chunk-ZXHAAVTH.js} +2 -2
- package/dist-cli/chunks/{chunk-FHLEA4S5.js → chunk-ZYGWIVW4.js} +2 -2
- package/dist-cli/chunks/{cleanup-JUY2WU24.js → cleanup-ULH3BHAE.js} +2 -2
- package/dist-cli/chunks/cli-version-I2E56I4W.js +4 -0
- package/dist-cli/chunks/{compat-S2TBISY3.js → compat-ONN5DOHB.js} +2 -2
- package/dist-cli/chunks/{config-3PHD4J5N.js → config-OPZU73MX.js} +2 -2
- package/dist-cli/chunks/control-WNYEAI4K.js +4 -0
- package/dist-cli/chunks/daemon-5J6V2GLG.js +4 -0
- package/dist-cli/chunks/{debug-PFAJONVV.js → debug-GNI3HDAK.js} +3 -3
- package/dist-cli/chunks/{desktop-Z7EOBMNV.js → desktop-DF65PDJG.js} +4 -4
- package/dist-cli/chunks/{detox-KRSP5SLY.js → detox-N267KW2Y.js} +2 -2
- package/dist-cli/chunks/{device-ZXJ7GRBO.js → device-RFU44PE3.js} +2 -2
- package/dist-cli/chunks/{diagnose-JIMLEOEJ.js → diagnose-XR2JIGDE.js} +2 -2
- package/dist-cli/chunks/{disk-cleanup-YY7FFGVA.js → disk-cleanup-DPY6TYXA.js} +2 -2
- package/dist-cli/chunks/drivers-OIZC544W.js +4 -0
- package/dist-cli/chunks/{film-LKSJPU2A.js → film-NQQZPZ2W.js} +3 -3
- package/dist-cli/chunks/flow-3NHEHRF4.js +4 -0
- package/dist-cli/chunks/help-VACWNWEH.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-ZN3WZ3ND.js → hidden-runtime-alias-APCBIXJ6.js} +2 -2
- package/dist-cli/chunks/home-paths-27GY5EPD.js +4 -0
- package/dist-cli/chunks/inspect-2JELKZ5A.js +4 -0
- package/dist-cli/chunks/install-desktop-4R7UTGQU.js +4 -0
- package/dist-cli/chunks/{login-XKLIFTAU.js → login-6KIO5FR4.js} +2 -2
- package/dist-cli/chunks/{logout-DR22RB5H.js → logout-WMCYGTYA.js} +2 -2
- package/dist-cli/chunks/{maestro-SLCX6HBV.js → maestro-7QLOUZIE.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-GBFZ5INV.js → maestro-generate-QIGCQANR.js} +3 -3
- package/dist-cli/chunks/{mode-F4R2KNXX.js → mode-3H662MUJ.js} +2 -2
- package/dist-cli/chunks/{optional-demo-registry-HM55KXGB.js → optional-demo-registry-FQV54ASP.js} +2 -2
- package/dist-cli/chunks/{perf-VBS5GEPG.js → perf-KC6LOGFD.js} +2 -2
- package/dist-cli/chunks/{permissions-F46PQIUE.js → permissions-UGVHA3L6.js} +2 -2
- package/dist-cli/chunks/privacy-E6KH2DRJ.js +4 -0
- package/dist-cli/chunks/{record-NLZ6DFAA.js → record-V72Q363I.js} +3 -3
- package/dist-cli/chunks/{report-issue-XIE5BVR4.js → report-issue-MILOOCMG.js} +2 -2
- package/dist-cli/chunks/reset-LEL5ZGFN.js +4 -0
- package/dist-cli/chunks/runtime-RT2OTIQC.js +4 -0
- package/dist-cli/chunks/{screenshot-command-SD4JPNKW.js → screenshot-command-FYMZF5AF.js} +3 -3
- package/dist-cli/chunks/{screenshot-layers-X65RC3GT.js → screenshot-layers-OXLW6GEJ.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-BBXN7FEZ.js → screenshots-capture-N3LKTUKB.js} +2 -2
- package/dist-cli/chunks/{serve-M6ZKMSAG.js → serve-USDREK3N.js} +2 -2
- package/dist-cli/chunks/setup-QC7W7NCL.js +4 -0
- package/dist-cli/chunks/{skills-KDWGQBOP.js → skills-3MIZF3DS.js} +2 -2
- package/dist-cli/chunks/{state-NWABXG2P.js → state-MCFLWQHV.js} +2 -2
- package/dist-cli/chunks/{storage-QQE3G65Q.js → storage-KXNS5WEC.js} +2 -2
- package/dist-cli/chunks/store-GL6DFPJL.js +4 -0
- package/dist-cli/chunks/telemetry-OOW5FMZQ.js +4 -0
- package/dist-cli/chunks/{timeline-2VZ45MMB.js → timeline-QJ3USMSX.js} +2 -2
- package/dist-cli/chunks/{upgrade-T7PDR6T5.js → upgrade-LXFD4DFX.js} +2 -2
- package/dist-cli/chunks/upload-EUEO4D5N.js +4 -0
- package/dist-cli/chunks/{version-BX6QX5XA.js → version-D5DLNPHP.js} +2 -2
- package/dist-cli/chunks/{web-4J6JRZN2.js → web-FRFNTTZ4.js} +2 -2
- package/dist-cli/chunks/welcome-YYYGS5WD.js +5 -0
- package/dist-cli/chunks/{what-happened-CHQKFNCM.js → what-happened-FJ6GRQAS.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +2 -2
- 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 +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +21 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +2 -2
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +2 -2
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +87 -22
- package/dist-lib/vite.cjs +2 -2
- package/package.json +1 -1
- package/skills/contrast/SKILL.md +3 -3
- package/skills/rnx-setup/SKILL.md +17 -5
- package/src/agent-daemon-client.ts +1 -1
- package/src/home-paths.ts +22 -0
- package/src/metro-plugin.ts +1 -1
- package/src/runtime-assets.ts +1 -1
- package/dist-cli/chunks/chunk-2JZXOHH6.js +0 -4
- package/dist-cli/chunks/chunk-2WJABJ6C.js +0 -15
- package/dist-cli/chunks/chunk-5OVXQKUP.js +0 -25
- package/dist-cli/chunks/chunk-DFTG53TX.js +0 -11
- package/dist-cli/chunks/chunk-HF2FZ2WN.js +0 -7
- package/dist-cli/chunks/chunk-S63ENXGH.js +0 -6
- package/dist-cli/chunks/chunk-UHP33XGC.js +0 -124
- package/dist-cli/chunks/cli-version-6SQSIFNQ.js +0 -4
- package/dist-cli/chunks/control-GLBCTKAA.js +0 -4
- package/dist-cli/chunks/daemon-H4OVIEMH.js +0 -4
- package/dist-cli/chunks/drivers-63LY2NCK.js +0 -4
- package/dist-cli/chunks/flow-JHKPF7BN.js +0 -4
- package/dist-cli/chunks/help-Q6OY6VVA.js +0 -4
- package/dist-cli/chunks/home-paths-UOATIRKF.js +0 -4
- package/dist-cli/chunks/inspect-DW3V2FD4.js +0 -4
- package/dist-cli/chunks/install-desktop-GWY5H22W.js +0 -4
- package/dist-cli/chunks/privacy-34FNXPJP.js +0 -4
- package/dist-cli/chunks/reset-BAGCFYTS.js +0 -4
- package/dist-cli/chunks/runtime-JTYB4CM7.js +0 -4
- package/dist-cli/chunks/setup-KTWKZOJB.js +0 -30
- package/dist-cli/chunks/store-6XW4YZM6.js +0 -4
- package/dist-cli/chunks/telemetry-MVSV7JHI.js +0 -4
- package/dist-cli/chunks/upload-RF2MNO2X.js +0 -4
- package/dist-cli/chunks/welcome-3MJHGERV.js +0 -5
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*! rnx v0.1.353 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{r as W}from"./chunk-MA5E6HJR.js";import{b as Y,c as b}from"./chunk-PNQ33FJB.js";import{a as _}from"./chunk-UQBXA3AK.js";import{a as G}from"./chunk-KZLGVYCX.js";import{f as l}from"./chunk-IX7W5BXL.js";import{c as J}from"./chunk-ZYGWIVW4.js";import{a as C}from"./chunk-6NE5Z6KG.js";import{a as g,b as B,c as v,d as R,f as q,g as d,h as S,i as h,j as V}from"./chunk-7V5O6I4Q.js";import{D as A,E,F as T,G as I,M,l as N}from"./chunk-WKQ6W74M.js";import{a as F}from"./chunk-WTGQUQ32.js";import{a}from"./chunk-PBTG4UCS.js";import Z from"node:os";import X from"node:path";import{spawn as oe}from"node:child_process";import p from"node:fs";import s from"node:path";function z(e){let n=s.resolve(e),r=null;for(;;){if(!r&&p.existsSync(s.join(n,"package.json"))&&(r=n),p.existsSync(s.join(n,".git")))return r;let o=s.dirname(n);if(o===n)return null;n=o}}function ie(e){let n=s.resolve(e);for(;;){if(p.existsSync(s.join(n,"bun.lock"))||p.existsSync(s.join(n,"bun.lockb")))return"bun";if(p.existsSync(s.join(n,"pnpm-lock.yaml")))return"pnpm";if(p.existsSync(s.join(n,"package-lock.json")))return"npm";let r=s.dirname(n);if(r===n)return"npm";n=r}}function H(e){let n=s.resolve(e.appDir),r=se(s.join(n,"package.json")),o=`${a.commandName} open`,t=r.scripts?.[a.commandName];if(t&&t!==o)throw new Error(`package.json already defines scripts.${a.commandName} as ${JSON.stringify(t)}; resolve that conflict before setup`);let i=ie(n),c=[];return r.devDependencies?.[a.packageName]!==e.cliVersion&&c.push(ae(i,e.cliVersion)),t!==o&&c.push(ue(i)),{appDir:n,packageManager:i,operations:c}}async function K(e,n){for(let r of e.operations)n.dryRun||await pe(r,e.appDir,n.json)}function k(e){return e.operations.map(n=>`${n.command} ${n.args.map(ce).join(" ")}`)}function se(e){let n;try{n=JSON.parse(p.readFileSync(e,"utf8"))}catch(t){let i=t instanceof Error?t.message:String(t);throw new Error(`could not read ${e}: ${i}`)}if(!n||typeof n!="object"||Array.isArray(n))throw new Error(`${e} must contain a JSON object`);let r=L(Reflect.get(n,"scripts")),o=L(Reflect.get(n,"devDependencies"));return{...r?{scripts:r}:{},...o?{devDependencies:o}:{}}}function L(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let n=Object.entries(e).filter(r=>typeof r[1]=="string");return Object.fromEntries(n)}function ae(e,n){let r=`${a.packageName}@${n}`;switch(e){case"bun":return{command:"bun",args:["add","--dev","--exact",r],description:`install ${r} as an exact dev dependency`};case"pnpm":return{command:"pnpm",args:["add","--save-dev","--save-exact",r],description:`install ${r} as an exact dev dependency`};case"npm":return{command:"npm",args:["install","--save-dev","--save-exact",r],description:`install ${r} as an exact dev dependency`}}}function ce(e){return/^[a-zA-Z0-9_./@=-]+$/.test(e)?e:JSON.stringify(e)}function pe(e,n,r){return new Promise((o,t)=>{let i=oe(e.command,e.args,{cwd:n,stdio:r?["ignore",2,"inherit"]:"inherit"});i.once("error",t),i.once("exit",c=>{c===0?o():t(new Error(`${e.command} exited with code ${c??"unknown"}`))})})}function ue(e){return{command:e,args:e==="bun"?["pm","pkg","set",`scripts.${a.commandName}=${a.commandName} open`]:["pkg","set",`scripts.${a.commandName}=${a.commandName} open`],description:`add the \`${a.commandName}\` package script`}}async function Ge(e,n={}){if(e.includes("--help")||e.includes("-h")){Re();return}let r=de(e),o=n.launchConnectRN??(!r.ci&&!r.yes&&!r.json&&!r.dryRun&&process.stdin.isTTY);try{ve(r);let t=z(r.appDir),i=Y(),c=T(),x=await me(r,i);!x&&!i.installed&&!r.json&&console.log(` ${v("Enable it later with")} ${g("rnx daemon install")}`);let f=await ye(r),ne=r.json?await l.fetchManifest():await S("Checking the rnx runtime",()=>l.fetchManifest()),m=l.resolveVersion(ne,{channel:"stable"}).version,D=F();if(D==="0.0.0")throw new Error("could not resolve the installed rnx CLI version");let P=!1;if(!r.dryRun){let y=M(),j=()=>l.install({version:m,channel:"stable",setActive:!0,protectVersions:y?[y]:[]});P=(r.json?await j():await S(`Preparing runtime ${m}`,j)).installed}let O=i.installed;x&&!i.installed&&!r.dryRun&&(r.json?await b({port:7668,force:!1}):(console.log(`
|
|
5
|
+
${g("\u25C6")} ${B("Enabling the background service")}`),await b({port:7668,force:!1})),O=!0),f==="electron"&&!r.dryRun&&!G()&&await _(["--yes"]),o&&(console.log(`
|
|
6
|
+
${g("\u25C6")} Opening ConnectRN`),await W(["ConnectRN","--driver",f,"--no-describe","--quiet"]));let re=await ge(r,c),te=!1,u=t?H({appDir:t,cliVersion:D}):null,w=await he(r,u);if(w&&u){if(!r.json)for(let y of k(u))console.log(` ${v(r.dryRun?"Would run":"Running")} ${y}`);await K(u,{dryRun:r.dryRun,json:r.json})}r.dryRun||(I({productAnalytics:re,crashReports:te}),E(f));let $={runtimeVersion:m,serviceInstalled:O,repositoryPrepared:w,simulatorDriver:f};return r.json?console.log(JSON.stringify({...$,runtimeInstalled:P,dryRun:r.dryRun,cache:we(m),repositoryOperations:w&&u?k(u):[]},null,2)):console.log(`
|
|
7
|
+
${R("\u2713")} ${o?"ConnectRN is open. ":""}rnx is ready.`),$}catch(t){throw J(t),t}}function de(e){let n=e.indexOf("--app"),r=n>=0?e[n+1]:void 0;if(n>=0&&(!r||r.startsWith("-")))throw new Error("--app requires a directory");return{appDir:X.resolve(r??process.cwd()),ci:e.includes("--ci")||C(),dryRun:e.includes("--dry-run"),json:e.includes("--json"),yes:e.includes("--yes")||e.includes("-y"),service:Q(e,"--service","--no-service"),repository:Q(e,"--repo","--no-repo"),productAnalytics:fe(e,"--analytics"),simulatorDriver:le(e)}}function le(e){let n=e.includes("--desktop"),r=e.includes("--browser");if(n&&r)throw new Error("--desktop and --browser cannot be used together");if(n)return"electron";if(r)return"playwright"}function Q(e,n,r){if(e.includes(n)&&e.includes(r))throw new Error(`${n} and ${r} cannot be used together`);if(e.includes(n))return!0;if(e.includes(r))return!1}function fe(e,n){let r=e.find(i=>i.startsWith(`${n}=`)),o=e.indexOf(n),t=r?.slice(n.length+1)??(o>=0?e[o+1]:void 0);if(t!==void 0){if(t==="on"||t==="yes"||t==="true")return!0;if(t==="off"||t==="no"||t==="false")return!1;throw new Error(`${n} must be on or off`)}}async function me(e,n){if(e.ci){if(e.service===!0)throw new Error("--ci cannot install a machine service");return!1}return n.supported?n.installed&&e.service===void 0?(e.json||console.log(` ${R("\u2713")} Background service is ready`),!0):e.service!==void 0?e.service:e.yes?!0:(ee(e,"--service or --no-service"),d("Background service",["Keeps the local bridge and runtime ready between commands.","Agent inspection, interaction, and test commands start much faster."]),h("Enable the background service?",!0)):(e.json||d("Background service",["The persistent service is currently available on macOS and Linux.","rnx will start the bridge when needed on this platform."]),!1)}async function ye(e){if(e.simulatorDriver)return e.simulatorDriver;let n=A();if(n)return n;if(e.ci||e.yes)return"playwright";ee(e,"--desktop or --browser");let r=process.platform==="darwin"?"Desktop downloads a DMG and installs rnx.app.":process.platform==="win32"?"Desktop downloads and runs the rnx installer.":"Desktop downloads the matching rnx AppImage.",o=process.platform==="darwin"?"Desktop app Installs rnx.app from a DMG":process.platform==="win32"?"Desktop app Runs the rnx installer":"Desktop app Installs the matching AppImage";return d("Simulator window",["Browser opens immediately in an isolated Chrome window.",r,"The Desktop app opens in a dedicated native window."]),await V("Where should rnx open?",["Browser (recommended) No additional download",o])===0?"playwright":"electron"}async function ge(e,n){return e.productAnalytics!==void 0?e.productAnalytics:n.configured?n.productAnalytics:e.yes||e.ci||!process.stdin.isTTY?!1:(d("Private by default",["Diagnostics stay off unless you opt in.","Reports can contain package compatibility or an error class.","They never contain your code or app data."]),h("Share bounded diagnostics to improve rnx?",!1))}async function he(e,n){if(!n){if(e.repository===!0)throw new Error("--repo requires a package.json inside a Git repository");return!1}return n.operations.length===0?!0:e.repository!==void 0?e.repository:e.yes||e.ci||!process.stdin.isTTY?!1:(d("Share rnx with your team",["rnx already works here with no project setup.","This only adds an exact rnxsim dev dependency and an rnx script for teammates."]),h(`Add rnx to ${X.basename(n.appDir)}?`,!1))}function ee(e,n){if(!(process.stdin.isTTY&&!e.ci))throw new Error(`non-interactive setup requires ${n}, or --yes to accept defaults`)}function we(e){let n=Z.platform(),r=Z.arch();return{path:N(e),key:`sootsim-runtime-${n}-${r}-${e}`,inputs:{platform:n,arch:r,runtimeVersion:e}}}function ve(e){e.json||q("Run any React Native app in a local simulator. No project setup required.")}function Re(){console.log(`
|
|
8
|
+
rnx setup - configure optional local conveniences
|
|
9
|
+
|
|
10
|
+
rnx works without project setup. This command can enable the faster background
|
|
11
|
+
service, choose Browser or Desktop, configure private diagnostics, and optionally
|
|
12
|
+
add an exact rnxsim dependency plus an rnx script for teammates.
|
|
13
|
+
|
|
14
|
+
usage:
|
|
15
|
+
rnx setup
|
|
16
|
+
rnx setup --yes
|
|
17
|
+
rnx setup --ci --yes --json
|
|
18
|
+
rnx setup --dry-run --yes
|
|
19
|
+
|
|
20
|
+
choices:
|
|
21
|
+
--service | --no-service
|
|
22
|
+
--desktop | --browser
|
|
23
|
+
--analytics on|off
|
|
24
|
+
--repo | --no-repo
|
|
25
|
+
|
|
26
|
+
automation:
|
|
27
|
+
--yes accept recommended machine defaults; diagnostics and repo changes stay off
|
|
28
|
+
--ci never prompt or install a background service
|
|
29
|
+
--json emit runtime and cache metadata as JSON
|
|
30
|
+
--dry-run show choices and repository operations without changing anything
|
|
31
|
+
--app DIR inspect DIR for an optional repository installation
|
|
32
|
+
`)}export{Ge as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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
|
var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),o=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},l=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=h(b,d))||f.enumerable});return a};var p=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c,p as d};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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{o as d}from"./chunk-
|
|
4
|
+
import{o as d}from"./chunk-WKQ6W74M.js";import{chmodSync as S,existsSync as f,mkdirSync as A,readFileSync as k,rmSync as o,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://contrast.dev";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,isAdmin:e.isAdmin===!0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",i=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:i,validatedAt:h}}function b(){let t=a();if(!f(t))return null;try{let e=JSON.parse(k(t,"utf8")),r=v(e);return r||(o(t,{force:!0}),null)}catch{return o(t,{force:!0}),null}}function O(t){let e=a();A(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
|
|
5
5
|
`);try{S(e,384)}catch{}return r}function l(){o(a(),{force:!0})}async function E(t){let e=b();if(!e?.token)return null;let r=t||e.origin||u;try{let n=await fetch(`${r.replace(/\/$/,"")}/api/auth/me`,{headers:{authorization:`Bearer ${e.token}`}});if(n.status===401)return l(),null;if(!n.ok)return e;let i=await n.json();return i.user?.id?O({token:e.token,user:i.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(l(),null)}catch{return e}}export{b as a,O as b,l as c,E as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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 k}from"./chunk-
|
|
4
|
+
import{a as k}from"./chunk-GAYCF2O5.js";import{createHash as L}from"node:crypto";import{createRequire as j}from"node:module";var P=/(^|\/)expo-splash-screen$/,w=/(^|\/)react-native-bootsplash$/;function A(n,e){let r=e.replace(/\/+$/,""),t=n.replace(/^\.\//,"").replace(/^\/+/,"");if(t)return`${r}/assets/${t}`}function d(n,e,r){return r?r(n):A(n,e)}function y(n){if(n==="cover")return"cover";if(n==="contain"||n==="native")return"contain"}function c(n){return typeof n=="string"&&n.length>0?n:void 0}function S(n){return typeof n=="number"&&Number.isFinite(n)?n:void 0}function R(n,e,r){if(!n||typeof n!="object")return null;let t=n,o={source:"expo-splash-screen",backgroundColor:c(t.backgroundColor)??"#ffffff"},i=c(t.image);i&&(o.imageUrl=d(i,e,r));let s=S(t.imageWidth);s!=null&&(o.imageWidthPx=s);let l=y(t.resizeMode);l&&(o.resizeMode=l);let p=t.dark;if(p&&typeof p=="object"){let u=p,g=c(u.backgroundColor),f=c(u.image);(g||f)&&(o.dark={},g&&(o.dark.backgroundColor=g),f&&(o.dark.imageUrl=d(f,e,r)))}return o}function O(n,e,r,t){let a=n[e],o=a&&typeof a=="object"?a.splash:void 0,i=n.splash,s=o&&typeof o=="object"?o:i;if(!s||typeof s!="object")return null;let p={source:"expo-legacy",backgroundColor:c(s.backgroundColor)??"#ffffff",imageWidthPx:S(s.imageWidth)??200,resizeMode:y(s.resizeMode)??"contain"},u=c(s.image);u&&(p.imageUrl=d(u,r,t));let g=s.dark;if(g&&typeof g=="object"){let f=g,m=c(f.backgroundColor),h=c(f.image);(m||h)&&(p.dark={},m&&(p.dark.backgroundColor=m),h&&(p.dark.imageUrl=d(h,r,t)))}return p}function v(n,e,r){if(!n||typeof n!="object")return null;let t=n,a=c(t.logo);if(!a)return null;let o={source:"react-native-bootsplash",backgroundColor:c(t.background)??"#fff",imageUrl:d(a,e,r),imageWidthPx:S(t.logoWidth)??100,resizeMode:"contain"},i=c(t.darkBackground),s=c(t.darkLogo);return(i||s)&&(o.dark={},i&&(o.dark.backgroundColor=i),s&&(o.dark.imageUrl=d(s,e,r))),o}function C(n,e,r,t={}){if(!n||typeof n!="object")return null;let a=n,o=a.plugins,i=null,s=null;if(Array.isArray(o))for(let l of o){let p=Array.isArray(l)?l[0]:l;if(typeof p!="string")continue;let u=Array.isArray(l)?l[1]??{}:{};!i&&P.test(p)?i=R(u,r,t.resolveAssetUrl):!s&&w.test(p)&&(s=v(u,r,t.resolveAssetUrl))}return s||i||O(a,e,r,t.resolveAssetUrl)}var b=j(import.meta.url);function E(n){try{let e=new URL(n),r=e.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r))return e.origin}catch{}return null}function G(n){let e=E(n.bundleUrl);if(!e)return null;let t=k(n.projectDir)?.appDir??null;if(!t)return null;let a=(n.platform||process.env.CONTRAST_PLATFORM||"ios").toLowerCase(),o=null;try{let s=b.resolve("@expo/config",{paths:[t]}),l=b(s);typeof l.getConfig=="function"&&(o=l.getConfig)}catch{}if(!o)return null;let i;try{let s=o(t,{skipSDKVersionRequirement:!0});s?.exp&&typeof s.exp=="object"&&(i=s.exp)}catch{}return!i||typeof i!="object"?null:C(i,a==="android"?"android":"ios",e)}function q(n){return encodeURIComponent(JSON.stringify(n))}function z(n){if(!n)return null;try{let e=JSON.parse(decodeURIComponent(n));if(!e||typeof e!="object")return null;let r=e;return r.source!=="expo-splash-screen"&&r.source!=="expo-legacy"&&r.source!=="react-native-bootsplash"||typeof r.backgroundColor!="string"?null:e}catch{return null}}function I(n){let e=new Set;return n.imageUrl&&e.add(n.imageUrl),n.dark?.imageUrl&&e.add(n.dark.imageUrl),[...e]}function M(n){let e=(n.split("?")[0].split(".").pop()||"").toLowerCase();return e==="png"?"image/png":e==="jpg"||e==="jpeg"?"image/jpeg":e==="webp"?"image/webp":e==="gif"?"image/gif":e==="svg"?"image/svg+xml":"application/octet-stream"}async function H(n,e){let r=z(n);if(!r)return[];let t=[],a=new Set;for(let o of I(r)){let i=L("sha256").update(o).digest("hex");if(!a.has(i)){a.add(i);try{let s=await fetch(o);if(!s.ok){e?.onError?.(o,new Error(`${s.status} ${s.statusText}`));continue}let l=new Uint8Array(await s.arrayBuffer());t.push({url:o,urlhash:i,contentType:M(o),bytes:l}),e?.onStaged?.({url:o,byteLength:l.byteLength})}catch(s){e?.onError?.(o,s)}}}return t}import{spawn as D}from"child_process";function U(n,e={}){if(!n)throw new Error("openUrl requires a url");let r=e.platform??process.platform;return r==="darwin"?{command:"open",args:e.background===!1?[n]:["-g",n],via:"system"}:r==="win32"?{command:"cmd",args:["/c","start","",n],via:"system"}:{command:"xdg-open",args:[n],via:"system"}}async function W(n,e,r){return new Promise((t,a)=>{let o=D(n,e,{detached:r,stdio:"ignore"});o.once("error",a),o.once("spawn",()=>{r&&o.unref(),t(o.pid)})})}async function x(n,e={}){let r=U(n,e),t=await W(r.command,r.args,e.detached??!0);return{...r,pid:t,attachUrl:n}}async function F(n,e={}){await x(n,e)}export{G as a,q as b,H as c,F as d};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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{I,m as E,n as P,p as y,u as F,w as N}from"./chunk-
|
|
4
|
+
import{I,m as E,n as P,p as y,u as F,w as N}from"./chunk-CMQIFA4L.js";import{r as h,v as B,w as A}from"./chunk-ELBDKQK2.js";var k={timeoutMs:1800,settleMs:48,startWindowMs:64};function w(e){return new Promise(t=>setTimeout(t,e))}function z(e){return e.includes("--json")}function K(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
|
|
5
5
|
`)}function Q(e){process.stderr.write(`${e}
|
|
6
6
|
`)}function b(e,t=Date.now()){let r=new Date(e),n=`${S(r.getHours())}:${S(r.getMinutes())}:${S(r.getSeconds())}`,s=t-e;if(s<0)return n;let o=Math.round(s/1e3);return o<60?`${n} +${o}s`:o<3600?`${n} +${Math.round(o/60)}m`:o<86400?`${n} +${Math.round(o/3600)}h`:`${n} +${Math.round(o/86400)}d`}function S(e){return e<10?`0${e}`:String(e)}async function O(e,t,...r){return B(e,`__sootsimTest.${t}`,...r)}async function j(e,t,...r){return A(e,`SootSim.bridges.mainShell.${t}`,...r)}async function X(e,t={}){try{let r=await O(e,"waitForScreenTransitions",k);if(!t.verbose||!r?.started)return;if(r.timedOut){console.log(` screen transition still active after ${r.waitedMs}ms; continuing`);return}r.waitedMs>0&&console.log(` waited ${r.waitedMs}ms for screen transition settle`)}catch{}}async function Z(e,t,r,...n){let s=Date.now()+Math.max(0,r);for(;;)try{return await j(e,t,...n)}catch(o){if(!I(o)||Date.now()>=s)throw o;await w(50)}}async function ee(e,t,r,n={}){let s=n.attempts??30,o=n.intervalMs??500,l=n.minNodeCount??10;for(let i=0;i<s;i++){let u=h(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{let c=await u.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>l)return{bridge:u,count:c}}catch{}u.close(),await w(o)}return null}async function te(e,t,r,n={}){let s=n.timeoutMs??8e3,o=n.intervalMs??250,l=Date.now()+s;for(;Date.now()<l;){let i=h(e,{commandTimeoutMs:t,simId:r,simIdSource:n.simIdSource});try{return await i.send({type:"evaluate",code:"1"}),i}catch{i.close()}await w(o)}return null}async function ne(e,t={}){let r=t.timeoutMs??1e4,n=t.errorGraceMs??3e3,s=t.pollIntervalMs??200,o=Date.now(),l=o+r,i=-1,u=o,c=null,d=!1,m={ready:!1,source:"timeout",elapsedMs:0,nodes:0,targets:0,liveFrameActive:!1,liveFrameChannels:0,liveFramePublishes:0,flag:void 0,loadingText:"",externalReady:null,externalStatus:"",externalError:"",errors:0};for(;Date.now()<l;){try{let a=await e.send({type:"evaluate",code:E}),g=Date.now()-o,f=Number(a?.nodes)||0,$=Number(a?.targets)||0,C=a?.liveFrameActive===!0,W=Number(a?.liveFrameChannels)||0,q=Number(a?.liveFramePublishes)||0,x=Number(a?.errors)||0,T=a?.flag===!0,p=a?.externalReady,M=typeof a?.loadingText=="string"?a.loadingText.trim():"",D=typeof a?.externalStatus=="string"?a.externalStatus.trim():"",R=typeof a?.externalError=="string"?a.externalError.trim():"",v=typeof a?.externalError=="string"&&R.length>0;if(c=p,d=v,f!==i&&(i=f,u=g),m={ready:!1,source:"timeout",elapsedMs:g,nodes:f,targets:$,liveFrameActive:C,liveFrameChannels:W,liveFramePublishes:q,flag:a?.flag,loadingText:M,externalReady:typeof p=="boolean"?p:null,externalStatus:D,externalError:R,errors:x},T&&p!==!1&&!v&&!M&&y({liveFrameActive:C,nodes:f,targets:$})&&g-u>=P)return{...m,ready:!0,source:"flag"};if(g>=n&&x>0&&!T)return{...m,ready:!1,source:"error-bail"}}catch{}await w(s)}return c!==!1&&!d&&!m.loadingText&&y(m)?{...m,ready:!0,source:"nodes-fallback"}:{...m,ready:!1,source:"timeout",elapsedMs:Date.now()-o}}function H(e){let t=e.displayUrl||e.url;return e.status!=null?`${e.method} ${t} -> ${e.status}${e.statusText?` ${e.statusText}`:""}`:e.error?`${e.method} ${t} -> ${e.error}`:`${e.method} ${t}`}async function _(e,t,...r){return e.send({type:"call",path:`__sootsimTest.${t}`,args:r})}async function L(e,t={}){let r=await e.send({type:"evaluate",code:N});if(!r||typeof r!="object")return;let n=Math.max(0,Number(r.errors)||0),s=Math.max(0,Number(r.warnings)||0);if(n===0&&s===0)return;let o=[];if(n>0&&o.push(`${n} console error${n===1?"":"s"}`),s>0&&o.push(`${s} console warning${s===1?"":"s"}`),console.log(`
|
|
7
7
|
console: ${o.join(", ")}`),t.errorsCommand&&console.log(` inspect: ${t.errorsCommand}`),s>0&&t.warningsCommand&&console.log(` inspect: ${t.warningsCommand}`),!t.includeTail||n===0)return;let l=await F(e,5);if(!(!Array.isArray(l)||l.length===0)){console.log(`
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*! rnx v0.1.353 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{a as k}from"./chunk-KZLGVYCX.js";import{a as v,b as $,c as g,d as y,e as h,h as S,i as T}from"./chunk-7V5O6I4Q.js";import{spawn as E,spawnSync as u}from"child_process";import{chmodSync as M,copyFileSync as O,createWriteStream as A,existsSync as f,mkdirSync as D,rmSync as w,statSync as I,unlinkSync as L}from"fs";import{tmpdir as C}from"os";import{dirname as R,join as m,resolve as P}from"path";var b="https://contrast.dev/api/electron-release";function B(){let r=process.arch;if(process.platform==="darwin"){let t=r==="arm64"?"mac-arm64":"mac-x64",n=`sootsim-latest-${t}.dmg`;return{platform:t,filename:n,url:`${b}/${n}`,install:W}}if(process.platform==="linux"){let t=r==="arm64"?"linux-arm64":"linux-x64",n=`sootsim-latest-${t}.AppImage`;return{platform:t,filename:n,url:`${b}/${n}`,install:Y}}if(process.platform==="win32"){let t="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:t,url:`${b}/${t}`,install:_}}return null}async function F({url:r,dest:t,onProgress:n}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`${s.status} ${s.statusText} (${r})`);let o=s.headers.get("content-length"),i=o?Number(o):null;if(!s.body)throw new Error(`empty response body (${r})`);D(R(t),{recursive:!0});let a=A(t),p=s.body.getReader(),c=0;try{for(;;){let{done:e,value:l}=await p.read();if(e)break;a.write(Buffer.from(l)),c+=l.byteLength,n?.(c,i)}}finally{await new Promise((e,l)=>{a.end(d=>d?l(d):e())})}}function N(r,t){let n=(r/1048576).toFixed(1);if(!t)return` ${n} MB`;let s=Math.min(100,Math.round(r/t*100)),o=(t/(1024*1024)).toFixed(1),i=24,a=Math.round(s/100*i);return` ${v("\u2588".repeat(a))+g("\u2591".repeat(i-a))} ${s}% ${n} / ${o} MB`}async function W(r){let t=u("hdiutil",["attach","-nobrowse","-readonly",r],{encoding:"utf8"});if(t.status!==0)throw new Error(`hdiutil attach failed: ${t.stderr||t.stdout}`.trim());let n=t.stdout.trim().split(`
|
|
5
|
+
`),o=n[n.length-1].split(" ").pop()?.trim();if(!o||!f(o))throw new Error(`could not determine dmg mount point (output: ${t.stdout})`);let i=m(o,"rnx.app");if(!f(i))throw u("hdiutil",["detach","-force",o]),new Error(`rnx.app not found inside ${o}`);let a="/Applications",p=P(process.env.HOME||"","Applications"),c=a;try{let x=m(a,`.sootsim-write-probe-${process.pid}`);u("touch",[x]),f(x)?w(x,{force:!0}):c=p}catch{c=p}c===p&&D(c,{recursive:!0});let e=m(c,"rnx.app");f(e)&&w(e,{recursive:!0,force:!0});let l=u("cp",["-R",i,e]),d=u("hdiutil",["detach","-force",o]);if(l.status!==0)throw new Error(`copy to ${e} failed: ${l.stderr?.toString()||""}`.trim());return d.status!==0&&console.warn(` warning: failed to unmount ${o} (${d.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",e]),e}async function Y(r){let t=P(process.env.HOME||"","Applications");D(t,{recursive:!0});let n=m(t,"rnx.AppImage");return f(n)&&w(n,{force:!0}),O(r,n),L(r),M(n,493),n}async function _(r){await new Promise((n,s)=>{let o=E("cmd",["/c","start",'""',"/wait",r],{stdio:"inherit"});o.once("error",s),o.once("exit",i=>{i===0?n():s(new Error(`installer exited with code ${i}`))})});let t=k();if(!t)throw new Error("the installer finished but the rnx application was not registered");return t.path}async function Q(r){(r.includes("--help")||r.includes("-h"))&&(console.log(`
|
|
6
|
+
rnx desktop install
|
|
7
|
+
|
|
8
|
+
Download and install the optional rnx Desktop app.
|
|
9
|
+
The CLI works without it. Choose Desktop when you want a dedicated native window.
|
|
10
|
+
|
|
11
|
+
usage:
|
|
12
|
+
rnx desktop install [options]
|
|
13
|
+
|
|
14
|
+
options:
|
|
15
|
+
-y, --yes skip confirmation and install immediately
|
|
16
|
+
--force reinstall even if the companion is already present
|
|
17
|
+
|
|
18
|
+
examples:
|
|
19
|
+
rnx desktop install
|
|
20
|
+
rnx desktop install --yes
|
|
21
|
+
`),process.exit(0));let t=r.includes("--yes")||r.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,n=r.includes("--force"),s=k();if(s&&!n){console.log(` ${y("\u2713")} Desktop app is already installed at ${s.path}`),console.log(` ${g("Pass --force to reinstall.")}`);return}let o=B();if(o||(console.error(` ${h("\xD7")} No desktop build is available for ${process.platform}/${process.arch}.`),console.error(" Supported: darwin-arm64, darwin-x64, linux-x64, linux-arm64, win32-x64"),process.exit(1)),console.log(` ${$("Desktop app")}`),console.log(` Platform ${o.platform}`),console.log(` Download ${o.url}`),console.log(),!t){if(!await T("Download and install now?",!0)){console.log(` ${g("Cancelled.")}`);return}console.log()}let i=m(C(),`sootsim-install-${Date.now()}`),a=m(i,o.filename),p=0;process.stdout.write(` Downloading ${o.filename}...
|
|
22
|
+
`);try{await F({url:o.url,dest:a,onProgress:(e,l)=>{let d=Date.now();d-p<100&&e<(l??1/0)||(p=d,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${N(e,l)}`))}})}catch(e){w(i,{recursive:!0,force:!0});let l=e instanceof Error?e.message:String(e);console.error(`
|
|
23
|
+
${h("\xD7")} Download failed: ${l}`),console.error(` The ${o.platform} desktop build may not be published yet, or your`),console.error(" network blocked the request. Check your connection and try again later."),console.error(" The CLI and daemon work without the desktop app. Run `rnx --help`."),process.exit(1)}process.stdout.isTTY&&process.stdout.write(`
|
|
24
|
+
`);let c=I(a).size;console.log(` ${y("\u2713")} Downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log();try{let e=await S("Installing the desktop app",()=>o.install(a));console.log(` Installed at ${e}`)}catch(e){console.error(` ${h("\xD7")} Install failed: ${e instanceof Error?e.message:String(e)}`),console.error(` Keeping the download at ${a} for manual installation.`),process.exit(1)}finally{w(i,{recursive:!0,force:!0})}console.log(),console.log(` ${$("Ready")}`),console.log(" rnx desktop Launch the desktop app"),console.log(" rnx open <target> Open a demo or bundle in it")}export{Q as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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
|
var a=["Cache","Code Cache","DawnCache","DawnGraphiteCache","DawnWebGPUCache","GPUCache","GrShaderCache","ShaderCache"],r=new Set(a);function s(e){return r.has(e)}export{a,s as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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{e as f}from"./chunk-
|
|
4
|
+
import{e as f}from"./chunk-ELBDKQK2.js";import{existsSync as m,mkdirSync as g,readFileSync as h,writeFileSync as S,rmSync as F}from"fs";import{tmpdir as y}from"os";import{dirname as b,join as p}from"path";var w=new Map;function o(e,n){w.set(e,n)}var s=1;function a(){return p(y(),`sootsim-cli-hints-${f()}.json`)}function d(){return p(y(),"sootsim-cli-hints-global.json")}function u(e){if(!m(e))return{version:s,shown:{}};try{let n=JSON.parse(h(e,"utf8"));return n?.version!==s||!n?.shown?{version:s,shown:{}}:n}catch{return{version:s,shown:{}}}}function l(e,n){try{g(b(e),{recursive:!0}),S(e,JSON.stringify(n)+`
|
|
5
5
|
`)}catch{}}function v(){let e=(process.env.SOOTSIM_HINTS||"").toLowerCase();return e==="off"||e==="0"||e==="false"?"off":e==="always"||e==="verbose"?"always":"normal"}function x(e,n){let i=v();if(i==="off")return!1;if(i==="always"||n==="always")return!0;let t=Date.now();if(n==="once-per-identity"){let r=u(a());return r.shown[e]?!1:(r.shown[e]=t,l(a(),r),!0)}if(n==="once-ever"){let r=u(d());return r.shown[e]?!1:(r.shown[e]=t,l(d(),r),!0)}if(typeof n=="object"&&"cooldownMs"in n){let r=u(a()),c=r.shown[e]??0;return t-c<n.cooldownMs?!1:(r.shown[e]=t,l(a(),r),!0)}return!0}function A(e,...n){let i=w.get(e);if(!i)return process.env.SOOTSIM_HINTS_DEBUG&&console.error(` [hints] no hint registered for id "${e}"`),!1;if(!x(e,i.frequency))return!1;let t=i.render(...n);if(t==null)return!1;let r=Array.isArray(t)?t:[t];for(let c of r)console.error(` hint: ${c}`);return!0}o("app-still-loading",{frequency:{cooldownMs:6e4},render:e=>`app may still be loading (${e} nodes). run \`rnx wait ready\` first.`});o("wait-selector-for-missing-testid",{frequency:"once-per-identity",render:e=>`rnx wait selector ${e}`});o("prefer-cli-over-eval",{frequency:"once-per-identity",render:e=>e.length?["try the CLI shortcut instead:",...e.map(n=>` ${n}`)]:null});o("describe-use-filters",{frequency:"once-per-identity",render:()=>["describe output is long. narrow it with:"," rnx describe --only '*Bottom Sheet*'"," rnx describe --testid-like 'swap-*'"," rnx describe --subtree <testID>"]});o("describe-filter-context",{frequency:"once-per-identity",render:()=>["filtered describe is search output, not current-route proof.","run `rnx describe` without filters after navigation; clipped nodes are marked `(clipped:...)`."]});o("subtree-root-not-found",{frequency:"always",render:e=>`no node with testID/id "${e}" \u2014 try \`rnx find --testid ${e}\` to discover available ids.`});o("clean-uninstall",{frequency:"once-ever",render:()=>["to remove the background daemon and all ~/.sootsim data, run `rnx daemon uninstall`.","the optional desktop app and its macOS preference plist are separate from the daemon."]});export{A as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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:"rnx",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 = destination display capped at 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:!1,description:"send bounded product usage analytics",group:"privacy"},crashReports:{type:"boolean",default:!1,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.353 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*! rnx v0.1.353 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{randomUUID as x}from"node:crypto";import n from"node:fs";import{homedir as I}from"node:os";import i from"node:path";var $="SOOTSIM_HOME",B="active",M="daemon.json",T="dev-bridges",J="config.json",L=3e4;function s(){let e=process.env[$];return e&&e.length>0?i.resolve(e):i.join(I(),".sootsim")}function U(){if(process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1")return!1;let e=process.env.SOOTSIM_DEV;if(e==="1"||e==="true")return!0;if(e==="0"||e==="false")return!1;let t=process.argv[1];if(!t)return!1;try{return n.realpathSync(t).includes(`${i.sep}packages${i.sep}sootsim${i.sep}`)}catch{return!1}}function V(){return process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1"?!1:process.env.IS_TAMAGUI_DEV==="1"}function ce(){return U()||V()}function v(){return i.join(s(),"runtimes")}function H(e){return i.join(v(),e)}function w(){return i.join(v(),B)}function A(){return i.join(s(),"electron")}function se(){return i.join(A(),"userData")}function ae(e){return i.join(A(),e)}function G(){return i.join(s(),"profiles")}function ue(){return i.join(s(),"camera-fixtures")}function K(){return i.join(s(),"daemon-app")}function X(){return i.join(K(),"SootSim Daemon.app")}function fe(){return i.join(X(),"Contents","MacOS","sootsim-daemon")}function q(){return i.join(s(),"cache")}function m(){return i.join(s(),M)}function y(){return i.join(s(),T)}function O(e){if(!Number.isInteger(e)||e<=0)throw new Error(`invalid development bridge port: ${e}`);return i.join(y(),`${e}.json`)}function b(){return i.join(s(),J)}function p(){try{let e=n.readFileSync(b(),"utf8"),t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function P(e){h();let t=p(),r={...t,...e};e.settings&&typeof e.settings=="object"&&(r.settings={...t.settings&&typeof t.settings=="object"?t.settings:{},...e.settings});let c=`${b()}.tmp`;return n.writeFileSync(c,`${JSON.stringify(r,null,2)}
|
|
5
|
+
`,"utf8"),n.renameSync(c,b()),r}var E=1;function le(){return p().onboardingVersion===E}function de(){let e=p().simulatorDriver;return e==="electron"||e==="playwright"?e:null}function me(e){P({onboardingVersion:E,simulatorDriver:e})}function pe(){let e=p().settings,t=e?.productAnalytics,r=e?.crashReports;return{productAnalytics:typeof t=="boolean"?t:!1,crashReports:typeof r=="boolean"?r:!1,configured:typeof t=="boolean"&&typeof r=="boolean"}}function ye(e){P({settings:{productAnalytics:e.productAnalytics,crashReports:e.crashReports}})}function ge(){let e=p().anonymousId;if(typeof e=="string"&&e.trim())return e;let t=`anon-cli-${x()}`;return P({anonymousId:t}),t}function g(){return i.join(s(),"runtime-upgraded.json")}function Se(e){h();let t=`${g()}.tmp`;n.writeFileSync(t,`${JSON.stringify(e)}
|
|
6
|
+
`,"utf8"),n.renameSync(t,g())}function ve(){try{let e=n.readFileSync(g(),"utf8");n.unlinkSync(g());let t=JSON.parse(e);return typeof t?.to!="string"||!t.to?null:{from:typeof t.from=="string"?t.from:null,to:t.to,at:typeof t.at=="number"?t.at:0}}catch{return null}}function h(){n.mkdirSync(s(),{recursive:!0}),n.mkdirSync(v(),{recursive:!0}),n.mkdirSync(A(),{recursive:!0}),n.mkdirSync(G(),{recursive:!0}),n.mkdirSync(q(),{recursive:!0})}function z(){try{let e=n.readFileSync(w(),"utf8").trim();return e.length>0?e:null}catch{return null}}function he(e){n.mkdirSync(v(),{recursive:!0}),n.writeFileSync(w(),`${e}
|
|
7
|
+
`,"utf8")}function De(){let e=z();if(!e)return null;let t=H(e);try{if(n.statSync(t).isDirectory())return t}catch{}return null}var S=16*1024,W=3e4;function d(){try{let e=n.openSync(m(),"r");try{let t=Buffer.alloc(S),r=n.readSync(e,t,0,S,0),c=t.subarray(0,r).toString("utf8"),o=JSON.parse(c);return o&&o.schema===1&&typeof o.pid=="number"&&typeof o.bridgePort=="number"&&typeof o.runtimePort=="number"&&typeof o.startedAt=="number"&&typeof o.heartbeatAt=="number"&&(o.servedRuntimes===void 0||Array.isArray(o.servedRuntimes)&&o.servedRuntimes.every(a=>typeof a=="string"))?o:null}finally{n.closeSync(e)}}catch{return null}}function N(e){try{let t=JSON.parse(e);return t&&t.schema===1&&t.source==="vite-dev"&&typeof t.pid=="number"&&typeof t.bridgePort=="number"&&typeof t.runtimePort=="number"&&typeof t.cwd=="string"&&typeof t.startedAt=="number"&&typeof t.heartbeatAt=="number"&&(t.shellPort===void 0||typeof t.shellPort=="number")&&(t.servedRuntimes===void 0||Array.isArray(t.servedRuntimes)&&t.servedRuntimes.every(r=>typeof r=="string"))?t:null}catch{return null}}function Y(){let e;try{e=n.readdirSync(y(),{withFileTypes:!0})}catch{return[]}let t=[];for(let r of e)if(!(!r.isFile()||!/^\d+\.json$/.test(r.name)))try{let c=i.join(y(),r.name),o=n.openSync(c,"r");try{let a=Buffer.alloc(S),u=n.readSync(o,a,0,S,0),D=N(a.subarray(0,u).toString("utf8"));D&&r.name===`${D.bridgePort}.json`&&t.push(D)}finally{n.closeSync(o)}}catch{}return t.sort((r,c)=>r.bridgePort-c.bridgePort)}function k(e,t=Date.now()){if(!e||t-e.heartbeatAt>L)return!1;try{return process.kill(e.pid,0),!0}catch{return!1}}function Q(e,t=Date.now()){if(!e||t-e.heartbeatAt>L)return!1;try{return process.kill(e.pid,0),!0}catch{return!1}}function be(){let e=new Set,t=d();if(k(t)){t.activeRuntime&&e.add(t.activeRuntime);for(let r of t.servedRuntimes??[])e.add(r)}for(let r of Y())if(Q(r))for(let c of r.servedRuntimes??[])e.add(c);return[...e].sort()}function Z(e){h();let t=m(),r=d();if(!r){if(_(e))return;throw new Error("another rnx daemon claimed the lockfile before this write")}if(!f(r,e))throw new Error("refusing to overwrite another rnx daemon lockfile");let c=`${t}.${e.pid}.${x()}.tmp`;n.writeFileSync(c,`${JSON.stringify(e,null,2)}
|
|
8
|
+
`,"utf8");try{let o=d();if(!o||!f(o,e))throw new Error("rnx daemon lock ownership changed during heartbeat");n.renameSync(c,t)}finally{try{n.unlinkSync(c)}catch{}}}function ke(e){n.mkdirSync(y(),{recursive:!0});let t=O(e.bridgePort),r=`${t}.${e.pid}.tmp`;n.writeFileSync(r,`${JSON.stringify(e,null,2)}
|
|
9
|
+
`,"utf8"),n.renameSync(r,t)}function f(e,t){return e.pid===t.pid&&e.startedAt===t.startedAt}function C(e){return e instanceof Error&&"code"in e&&Reflect.get(e,"code")==="EEXIST"}function _(e){let t=m(),r=`${t}.${e.pid}.${x()}.claim`;n.writeFileSync(r,`${JSON.stringify(e,null,2)}
|
|
10
|
+
`,"utf8");try{return n.linkSync(r,t),!0}catch(c){if(C(c))return!1;throw c}finally{try{n.unlinkSync(r)}catch{}}}function l(){return`${m()}.claim`}function j(e){try{let t=JSON.parse(e);if(t!==null&&typeof t=="object"&&typeof Reflect.get(t,"pid")=="number"&&typeof Reflect.get(t,"startedAt")=="number"&&typeof Reflect.get(t,"createdAt")=="number")return{pid:Reflect.get(t,"pid"),startedAt:Reflect.get(t,"startedAt"),createdAt:Reflect.get(t,"createdAt")}}catch{}return null}function F(){try{return j(n.readFileSync(l(),"utf8"))}catch{return null}}function R(e,t=Date.now()){if(t-e.createdAt>W)return!1;try{return process.kill(e.pid,0),!0}catch{return!1}}function ee(e){let t={pid:e.pid,startedAt:e.startedAt,createdAt:Date.now()},r=`${JSON.stringify(t)}
|
|
11
|
+
`;for(let c=0;c<8;c++){try{return n.writeFileSync(l(),r,{encoding:"utf8",flag:"wx"}),!0}catch(u){if(!C(u))throw u}let o=F();if(o&&f(o,t))return!0;if(o&&R(o))return!1;let a;try{a=n.readFileSync(l(),"utf8");let u=j(a);if(u&&R(u))return!1;if(n.readFileSync(l(),"utf8")!==a)continue;n.unlinkSync(l())}catch{}}return!1}function te(e){try{let t=F();if(!t||!f(t,e))return;n.unlinkSync(l())}catch{}}function xe(e){if(h(),!ee(e))return!1;try{let t=d();if(t&&f(t,e))return Z(e),!0;if(t&&k(t))return!1;if(t){let r=d();if(!r||!f(r,t)||k(r))return!1;try{n.unlinkSync(m())}catch{return!1}}return _(e)}finally{te(e)}}function Ae(e){try{let t=d();if(!t||!f(t,e))return;n.unlinkSync(m())}catch{}}function Pe(e){try{let t=O(e.bridgePort),r=N(n.readFileSync(t,"utf8"));if(r?.pid!==e.pid||r.startedAt!==e.startedAt)return;n.unlinkSync(t)}catch{}}export{$ as a,B as b,M as c,T as d,J as e,L as f,s as g,U as h,V as i,ce as j,v as k,H as l,w as m,A as n,se as o,ae as p,G as q,ue as r,K as s,X as t,fe as u,q as v,m as w,y as x,O as y,b as z,p as A,P as B,le as C,de as D,me as E,pe as F,ye as G,ge as H,g as I,Se as J,ve as K,h as L,z as M,he as N,De as O,d as P,Y as Q,k as R,Q as S,be as T,Z as U,ke as V,xe as W,Ae as X,Pe as Y};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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-PBTG4UCS.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,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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 d}from"./chunk-
|
|
4
|
+
import{a as d}from"./chunk-KIQVNLVD.js";import{a as s}from"./chunk-VLI54BKH.js";import{a as e}from"./chunk-HWMBTYJX.js";import{a as n}from"./chunk-ELBDKQK2.js";import{d as m,e as p,f as u}from"./chunk-OEU2MEZQ.js";import{a}from"./chunk-WTGQUQ32.js";import{a as i}from"./chunk-PBTG4UCS.js";import{a as f,c}from"./chunk-JVVO63QH.js";function g(){return`${i.commandName} CLI v${a()} \xB7 ${d().primary}`}function E(){let r=p({bridgePort:7668,defaultShellUrl:n},e()),o=`
|
|
5
5
|
${c}
|
|
6
6
|
`;console.log(`${g()}
|
|
7
7
|
${o}${r}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! rnx v0.1.353 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
function a(){console.error(" no rnx desktop companion found."),console.error(""),console.error(" install the desktop app:"),console.error(" rnx desktop install"),console.error(""),console.error(" or install the recommended background service:"),console.error(" rnx daemon install"),console.error("")}function t(r){console.error(""),console.error(` no sim is connected to the rnx bridge on port ${r}.`),console.error(""),console.error(" start your app dev server, then open it in rnx:"),console.error(" npx expo start --localhost --port 8081"),console.error(" rnx open 8081"),console.error(""),console.error(" then inspect the live app:"),console.error(" rnx describe")}async function d(r,n,s){let e=[];try{e=await r.listSims()}catch{}if(console.error(""),e.length===0){t(n);return}console.error(` no sim with id "${s}" is connected to the bridge on port ${n}.`),console.error(""),console.error(" connected sims:");for(let o of e){let i=[o.isPrimary?"primary":null,o.readyState,o.userVisible===!1?"hidden":o.userVisible===!0?"visible":null,o.userFocused?"focused":null].filter(Boolean).join(", ");console.error(` ${o.id} (${i})`)}console.error(""),console.error(" pass a valid --sim id, or run `rnx list` to see all sessions.")}export{a,t as b,d as c};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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 N}from"./chunk-24CIPQT5.js";import{o as R}from"./chunk-DFTG53TX.js";import{a as I}from"./chunk-BQE4E24T.js";import{a as T}from"./chunk-WNJDE2JT.js";function G(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.type=="string"&&typeof t.ts=="number"}function O(e){let t=e.trim();if(!t)return null;try{let r=JSON.parse(t);return G(r)?r:null}catch{return null}}import{randomBytes as q,createHash as X}from"node:crypto";import f from"node:fs";import h from"node:path";var $=null;function B(){if($)return $;let e=process.env.SOOTSIM_USER_DATA_DIR;return e||R()}function y(){return B()}function U(){return h.join(B(),"attached-projects.json")}function _(){return{version:1,attachedProjects:[],previewAttachments:[],agentSessions:[]}}function S(){let e=U(),t;try{t=f.readFileSync(e,"utf8")}catch(r){if(r.code==="ENOENT")return _();throw r}try{let r=JSON.parse(t);if(!r||typeof r!="object")throw new Error("not an object");return{version:1,attachedProjects:Array.isArray(r.attachedProjects)?r.attachedProjects:[],previewAttachments:Array.isArray(r.previewAttachments)?r.previewAttachments:[],agentSessions:Array.isArray(r.agentSessions)?r.agentSessions:[]}}catch(r){let n=`${e}.corrupt-${Date.now()}`;try{f.renameSync(e,n),console.warn(`[sootsim] attached-projects.json was unparseable; quarantined to ${n}. original error: ${r.message}`)}catch{}return _()}}function K(e){let t=U();f.mkdirSync(h.dirname(t),{recursive:!0});let r=`${t}.tmp-${process.pid}-${Date.now()}`,n=f.openSync(r,"w",384);try{f.writeFileSync(n,JSON.stringify(e,null,2)),f.fsyncSync(n)}finally{f.closeSync(n)}f.renameSync(r,t)}function w(e){let t=S();return e(t),K(t),t}function F(e){return X("sha256").update(h.resolve(e)).digest("hex").slice(0,16)}function Q(){return`s_${q(10).toString("hex")}`}function Se(e){let t=h.resolve(e.cwd),r=F(t),n;return w(o=>{let s=o.attachedProjects.find(a=>a.id===r);if(s){let a={...s,...e,id:r,cwd:t,sourceRoots:e.sourceRoots??s.sourceRoots,knownBundleUrls:e.knownBundleUrls??s.knownBundleUrls,pinnedSourceResolutions:e.pinnedSourceResolutions??s.pinnedSourceResolutions,telemetry:e.telemetry??s.telemetry,updatedAt:Date.now(),createdAt:s.createdAt},g=o.attachedProjects.indexOf(s);o.attachedProjects[g]=a,n=a;return}let c=Date.now(),d={id:r,name:e.name??h.basename(t),cwd:t,repoRoot:e.repoRoot,sourceRoots:e.sourceRoots??[t],framework:e.framework??"unknown",bundleId:e.bundleId,knownBundleUrls:e.knownBundleUrls??[],preferredProvider:e.preferredProvider??"codex",preferredTransport:e.preferredTransport??"tmux",editorOpenCommand:e.editorOpenCommand,moshiWebhookToken:e.moshiWebhookToken,pinnedSourceResolutions:e.pinnedSourceResolutions??{},isolateDiscovery:e.isolateDiscovery,git:e.git,telemetry:e.telemetry??{lastOpened:0,runsCompleted:0},createdAt:c,updatedAt:c};o.attachedProjects.push(d),n=d}),n}function M(e){return S().attachedProjects.find(t=>t.id===e)??null}function we(){return S().attachedProjects}var V=336*60*60*1e3;function ve(e,t={}){w(r=>{let n=r.attachedProjects.find(s=>s.id===e);if(!n)return;let o=t.ts??Date.now();if(n.telemetry.runsCompleted=(n.telemetry.runsCompleted??0)+1,typeof t.usd=="number"&&Number.isFinite(t.usd)&&t.usd>=0){let s=n.telemetry.costHistory??[],c=o-V,d=s.filter(a=>a.ts>=c);d.push({ts:o,usd:t.usd}),n.telemetry.costHistory=d}n.updatedAt=o})}function Ae(e,t=Date.now()){let r=t-6048e5,n=e.telemetry.costHistory??[],o=0;for(let s of n)s.ts>=r&&(o+=s.usd);return o}function xe(e){w(t=>{t.attachedProjects=t.attachedProjects.filter(r=>r.id!==e),t.agentSessions=t.agentSessions.filter(r=>r.projectId!==e),t.previewAttachments=t.previewAttachments.filter(r=>r.projectId!==e)})}function C(e){let t;return w(r=>{if(e.id){let c=r.agentSessions.find(d=>d.id===e.id);if(c){let d={...c,...e,lastSeenAt:Date.now()},a=r.agentSessions.indexOf(c);r.agentSessions[a]=d,t=d;return}}let n=r.attachedProjects.find(c=>c.id===e.projectId);if(!n)throw new Error(`upsertSession: no AttachedProject with id=${e.projectId}`);let o=Date.now(),s={id:e.id??Q(),projectId:e.projectId,provider:e.provider,transport:e.transport??n.preferredTransport,cwd:e.cwd??n.cwd,claudeSessionUuid:e.claudeSessionUuid,tmuxSessionName:e.tmuxSessionName,wrapperPid:e.wrapperPid,status:e.status??"idle",needsAttention:e.needsAttention??!1,lastPrompt:e.lastPrompt,lastSummary:e.lastSummary,lastTurnFiles:e.lastTurnFiles,currentlyEditing:e.currentlyEditing,lastSeenAt:o,createdAt:o};r.agentSessions.push(s),t=s}),t}function k(e){return S().agentSessions.find(t=>t.id===e)??null}function L(e){let t=S().agentSessions;return e?t.filter(r=>r.projectId===e):t}function z(e,t,r=Date.now()){return{...e,...t,id:e.id,projectId:e.projectId,createdAt:e.createdAt,lastSeenAt:r}}function Z(e){e.length!==0&&w(t=>{let r=Date.now(),n=new Map(t.agentSessions.map((o,s)=>[o.id,s]));for(let{id:o,patch:s}of e){let c=n.get(o);c!==void 0&&(t.agentSessions[c]=z(t.agentSessions[c],s,r))}})}function v(e,t){Z([{id:e,patch:t}])}async function Pe(){if(S().attachedProjects.length>0)return;let{loadOptionalDemoApps:t}=await import("./optional-demo-registry-HM55KXGB.js"),r=await t();r.length!==0&&w(n=>{for(let o of r){if(!f.existsSync(o.dir))continue;let s=h.resolve(o.dir),c=F(s);if(n.attachedProjects.some(a=>a.id===c))continue;let d=Date.now();n.attachedProjects.push({id:c,name:o.label,cwd:s,sourceRoots:[s],framework:o.framework,knownBundleUrls:[`http://localhost:${o.preferredPort}/index.bundle`],preferredProvider:"codex",preferredTransport:"tmux",pinnedSourceResolutions:{},telemetry:{lastOpened:0,runsCompleted:0},createdAt:d,updatedAt:d})}})}import{spawn as ee,spawnSync as te}from"node:child_process";import{randomUUID as re}from"node:crypto";import i,{constants as m}from"node:fs";import u from"node:path";import ne from"node:readline";function b(e){return u.join(y(),"sessions",e)}function J(e){return u.join(b(e),"prompt.in")}function H(e){return u.join(b(e),"events.out")}function se(e){return u.join(y(),"transcripts",`${e}.log`)}function E(e,t){if(!e)return!1;try{process.kill(e,0)}catch{return!1}return!(t&&!i.existsSync(b(t)))}function oe(){if(process.env.SOOTSIM_BIN)return{cmd:process.env.SOOTSIM_BIN,prefixArgs:[]};if(process.versions.electron){let n=process.resourcesPath;if(n){let o=[u.join(n,"bin","sootsim"),u.join(n,"bin",`sootsim-${process.platform}-${process.arch}`)];for(let s of o)if(i.existsSync(s))return{cmd:s,prefixArgs:[]}}}let e=ie();if(e)return e;let t=process.argv[0],r=process.argv[1];if(r&&/\.(ts|tsx|mjs|cjs|js)$/.test(r))return{cmd:t,prefixArgs:[r]};if(!r||r.includes("/.bin/"))throw new Error("rnx CLI not found. set SOOTSIM_BIN to the path of the rnx binary, or build the workspace CLI via `bun run --cwd packages/sootsim build:cli`.");return{cmd:t,prefixArgs:[]}}function ie(){try{let e=ce();if(!e)return null;let t=`sootsim-${process.platform}-${process.arch}`,r=u.join(e,"dist-bin",t);if(i.existsSync(r))return{cmd:r,prefixArgs:[]};let n=u.join(e,"dist-cli","bin.js");if(i.existsSync(n)){try{let o=u.join(e,"cli","commands","agent-wrapper.ts");if(i.existsSync(o)){let s=i.statSync(o).mtimeMs;i.statSync(n).mtimeMs<s&&console.warn("[rnx] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with `bun run --cwd packages/sootsim build:cli`.")}}catch{}return{cmd:process.execPath,prefixArgs:[n]}}return null}catch{return null}}function ce(){try{let r=T.resolve(`${I.packageName}/package.json`);return u.dirname(r)}catch{}let e=ae();if(!e)return null;let t=u.dirname(e);for(let r=0;r<8;r++){let n=u.join(t,"package.json");try{if(i.existsSync(n)&&JSON.parse(i.readFileSync(n,"utf8")).name===I.packageName)return t}catch{}let o=u.dirname(t);if(o===t)break;t=o}return null}function ae(){try{let e=import.meta.url;return!e||!e.startsWith("file://")?null:decodeURIComponent(e.slice(7))}catch{return null}}async function de(e,t,r){let n=u.join(y(),"locks");i.mkdirSync(n,{recursive:!0});try{i.chmodSync(n,448)}catch{}let o=u.join(n,`start-${e}-${t}.lock`),s=Date.now()+4e3,c=null;for(;c===null;)try{c=i.openSync(o,m.O_WRONLY|m.O_CREAT|m.O_EXCL,384)}catch(d){if(d.code!=="EEXIST")throw d;try{let a=Number(i.readFileSync(o,"utf8").trim());if(a&&!ue(a)){i.unlinkSync(o);continue}}catch{}if(Date.now()>s)throw new Error(`another start is in progress for project=${e} provider=${t} (lock: ${o})`);await new Promise(a=>setTimeout(a,50))}try{return i.writeFileSync(c,String(process.pid)),await r()}finally{try{i.closeSync(c)}catch{}try{i.unlinkSync(o)}catch{}}}function ue(e){try{return process.kill(e,0),!0}catch{return!1}}function W(e){let t=u.dirname(e);i.mkdirSync(t,{recursive:!0});try{i.chmodSync(t,448)}catch{}if(i.existsSync(e))try{if(i.statSync(e).isFIFO()){try{i.chmodSync(e,384)}catch{}return}i.unlinkSync(e)}catch{i.unlinkSync(e)}let r=te("mkfifo",["-m","600",e]);if(r.status!==0)throw new Error(`mkfifo(${e}) failed: ${r.stderr?.toString().trim()||"unknown error"}`)}var l=class extends Error{code;constructor(t,r){super(r),this.code=t}};async function $e(e){let t=M(e.projectId);if(!t)throw new l("NO_PROJECT",`no project with id=${e.projectId}`);let r=e.provider||t.preferredProvider||"codex";return de(t.id,r,async()=>{let n=L(t.id).find(p=>p.provider===r&&p.status!=="ended"&&E(p.wrapperPid,p.id));if(n)throw new l("ALREADY_RUNNING",`session already running for project=${t.id} provider=${r} (session ${n.id}, pid ${n.wrapperPid}). end it first with \`rnx agent end <sessionId>\`.`);let o=r==="claude"?re():void 0,s=C({projectId:t.id,provider:r,transport:"pty",cwd:t.cwd,status:"idle",claudeSessionUuid:o}),c=J(s.id),d=H(s.id),a=se(s.id);W(c),W(d);let g=u.dirname(a);i.mkdirSync(g,{recursive:!0});try{i.chmodSync(g,448)}catch{}let{cmd:A,prefixArgs:Y}=oe(),x=[...Y,"agent-wrapper","--session-id",s.id,"--project-id",t.id,"--provider",r,"--cwd",t.cwd,"--prompt-in",c,"--events-out",d,"--transcript",a];e.codexBin&&x.push("--codex-bin",e.codexBin),e.claudeBin&&x.push("--claude-bin",e.claudeBin),e.freshThread&&x.push("--fresh-thread"),o&&x.push("--claude-session-uuid",o);let P=ee(A,x,{detached:!0,stdio:"ignore",env:{...process.env,SOOTSIM_USER_DATA_DIR:y()}});P.unref();let D=e.readyTimeoutMs??6e3,j=await le(d,p=>p.type==="ready"||p.type==="error",D);if(!j||j.type==="error"){if(P.pid)try{process.kill(P.pid,"SIGTERM")}catch{}try{i.rmSync(b(s.id),{recursive:!0,force:!0})}catch{}v(s.id,{status:"ended"});let p=j&&j.type==="error"?j.message:`no ready event within ${D}ms`;throw new l("WRAPPER_FAILED",p)}return v(s.id,{wrapperPid:P.pid,status:"idle"}),{session:k(s.id),wrapperPid:P.pid}})}async function _e(e,t){let r=k(e);if(!r)throw new l("NO_SESSION",`no session with id=${e}`);if(!E(r.wrapperPid,e))throw v(e,{status:"ended"}),new l("NOT_ALIVE",`session wrapper is not alive (pid=${r.wrapperPid}). start a new session.`);let n=J(e);if(!i.existsSync(n))throw new l("NO_FIFO",`prompt FIFO missing: ${n}`);let o=i.openSync(n,m.O_WRONLY);try{let s=N(t);if(!s)throw new l("EMPTY_PROMPT","prompt text is empty");i.writeSync(o,s+`
|
|
4
|
+
import{a as N}from"./chunk-ZJ4O636U.js";import{o as R}from"./chunk-WKQ6W74M.js";import{a as I}from"./chunk-PBTG4UCS.js";import{a as T}from"./chunk-RRX5RZI2.js";function G(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.type=="string"&&typeof t.ts=="number"}function O(e){let t=e.trim();if(!t)return null;try{let r=JSON.parse(t);return G(r)?r:null}catch{return null}}import{randomBytes as q,createHash as X}from"node:crypto";import f from"node:fs";import h from"node:path";var $=null;function B(){if($)return $;let e=process.env.SOOTSIM_USER_DATA_DIR;return e||R()}function y(){return B()}function U(){return h.join(B(),"attached-projects.json")}function _(){return{version:1,attachedProjects:[],previewAttachments:[],agentSessions:[]}}function S(){let e=U(),t;try{t=f.readFileSync(e,"utf8")}catch(r){if(r.code==="ENOENT")return _();throw r}try{let r=JSON.parse(t);if(!r||typeof r!="object")throw new Error("not an object");return{version:1,attachedProjects:Array.isArray(r.attachedProjects)?r.attachedProjects:[],previewAttachments:Array.isArray(r.previewAttachments)?r.previewAttachments:[],agentSessions:Array.isArray(r.agentSessions)?r.agentSessions:[]}}catch(r){let n=`${e}.corrupt-${Date.now()}`;try{f.renameSync(e,n),console.warn(`[sootsim] attached-projects.json was unparseable; quarantined to ${n}. original error: ${r.message}`)}catch{}return _()}}function K(e){let t=U();f.mkdirSync(h.dirname(t),{recursive:!0});let r=`${t}.tmp-${process.pid}-${Date.now()}`,n=f.openSync(r,"w",384);try{f.writeFileSync(n,JSON.stringify(e,null,2)),f.fsyncSync(n)}finally{f.closeSync(n)}f.renameSync(r,t)}function w(e){let t=S();return e(t),K(t),t}function F(e){return X("sha256").update(h.resolve(e)).digest("hex").slice(0,16)}function Q(){return`s_${q(10).toString("hex")}`}function Se(e){let t=h.resolve(e.cwd),r=F(t),n;return w(o=>{let s=o.attachedProjects.find(a=>a.id===r);if(s){let a={...s,...e,id:r,cwd:t,sourceRoots:e.sourceRoots??s.sourceRoots,knownBundleUrls:e.knownBundleUrls??s.knownBundleUrls,pinnedSourceResolutions:e.pinnedSourceResolutions??s.pinnedSourceResolutions,telemetry:e.telemetry??s.telemetry,updatedAt:Date.now(),createdAt:s.createdAt},g=o.attachedProjects.indexOf(s);o.attachedProjects[g]=a,n=a;return}let c=Date.now(),d={id:r,name:e.name??h.basename(t),cwd:t,repoRoot:e.repoRoot,sourceRoots:e.sourceRoots??[t],framework:e.framework??"unknown",bundleId:e.bundleId,knownBundleUrls:e.knownBundleUrls??[],preferredProvider:e.preferredProvider??"codex",preferredTransport:e.preferredTransport??"tmux",editorOpenCommand:e.editorOpenCommand,moshiWebhookToken:e.moshiWebhookToken,pinnedSourceResolutions:e.pinnedSourceResolutions??{},isolateDiscovery:e.isolateDiscovery,git:e.git,telemetry:e.telemetry??{lastOpened:0,runsCompleted:0},createdAt:c,updatedAt:c};o.attachedProjects.push(d),n=d}),n}function M(e){return S().attachedProjects.find(t=>t.id===e)??null}function we(){return S().attachedProjects}var V=336*60*60*1e3;function ve(e,t={}){w(r=>{let n=r.attachedProjects.find(s=>s.id===e);if(!n)return;let o=t.ts??Date.now();if(n.telemetry.runsCompleted=(n.telemetry.runsCompleted??0)+1,typeof t.usd=="number"&&Number.isFinite(t.usd)&&t.usd>=0){let s=n.telemetry.costHistory??[],c=o-V,d=s.filter(a=>a.ts>=c);d.push({ts:o,usd:t.usd}),n.telemetry.costHistory=d}n.updatedAt=o})}function Ae(e,t=Date.now()){let r=t-6048e5,n=e.telemetry.costHistory??[],o=0;for(let s of n)s.ts>=r&&(o+=s.usd);return o}function xe(e){w(t=>{t.attachedProjects=t.attachedProjects.filter(r=>r.id!==e),t.agentSessions=t.agentSessions.filter(r=>r.projectId!==e),t.previewAttachments=t.previewAttachments.filter(r=>r.projectId!==e)})}function C(e){let t;return w(r=>{if(e.id){let c=r.agentSessions.find(d=>d.id===e.id);if(c){let d={...c,...e,lastSeenAt:Date.now()},a=r.agentSessions.indexOf(c);r.agentSessions[a]=d,t=d;return}}let n=r.attachedProjects.find(c=>c.id===e.projectId);if(!n)throw new Error(`upsertSession: no AttachedProject with id=${e.projectId}`);let o=Date.now(),s={id:e.id??Q(),projectId:e.projectId,provider:e.provider,transport:e.transport??n.preferredTransport,cwd:e.cwd??n.cwd,claudeSessionUuid:e.claudeSessionUuid,tmuxSessionName:e.tmuxSessionName,wrapperPid:e.wrapperPid,status:e.status??"idle",needsAttention:e.needsAttention??!1,lastPrompt:e.lastPrompt,lastSummary:e.lastSummary,lastTurnFiles:e.lastTurnFiles,currentlyEditing:e.currentlyEditing,lastSeenAt:o,createdAt:o};r.agentSessions.push(s),t=s}),t}function k(e){return S().agentSessions.find(t=>t.id===e)??null}function L(e){let t=S().agentSessions;return e?t.filter(r=>r.projectId===e):t}function z(e,t,r=Date.now()){return{...e,...t,id:e.id,projectId:e.projectId,createdAt:e.createdAt,lastSeenAt:r}}function Z(e){e.length!==0&&w(t=>{let r=Date.now(),n=new Map(t.agentSessions.map((o,s)=>[o.id,s]));for(let{id:o,patch:s}of e){let c=n.get(o);c!==void 0&&(t.agentSessions[c]=z(t.agentSessions[c],s,r))}})}function v(e,t){Z([{id:e,patch:t}])}async function Pe(){if(S().attachedProjects.length>0)return;let{loadOptionalDemoApps:t}=await import("./optional-demo-registry-FQV54ASP.js"),r=await t();r.length!==0&&w(n=>{for(let o of r){if(!f.existsSync(o.dir))continue;let s=h.resolve(o.dir),c=F(s);if(n.attachedProjects.some(a=>a.id===c))continue;let d=Date.now();n.attachedProjects.push({id:c,name:o.label,cwd:s,sourceRoots:[s],framework:o.framework,knownBundleUrls:[`http://localhost:${o.preferredPort}/index.bundle`],preferredProvider:"codex",preferredTransport:"tmux",pinnedSourceResolutions:{},telemetry:{lastOpened:0,runsCompleted:0},createdAt:d,updatedAt:d})}})}import{spawn as ee,spawnSync as te}from"node:child_process";import{randomUUID as re}from"node:crypto";import i,{constants as m}from"node:fs";import u from"node:path";import ne from"node:readline";function b(e){return u.join(y(),"sessions",e)}function J(e){return u.join(b(e),"prompt.in")}function H(e){return u.join(b(e),"events.out")}function se(e){return u.join(y(),"transcripts",`${e}.log`)}function E(e,t){if(!e)return!1;try{process.kill(e,0)}catch{return!1}return!(t&&!i.existsSync(b(t)))}function oe(){if(process.env.SOOTSIM_BIN)return{cmd:process.env.SOOTSIM_BIN,prefixArgs:[]};if(process.versions.electron){let n=process.resourcesPath;if(n){let o=[u.join(n,"bin","sootsim"),u.join(n,"bin",`sootsim-${process.platform}-${process.arch}`)];for(let s of o)if(i.existsSync(s))return{cmd:s,prefixArgs:[]}}}let e=ie();if(e)return e;let t=process.argv[0],r=process.argv[1];if(r&&/\.(ts|tsx|mjs|cjs|js)$/.test(r))return{cmd:t,prefixArgs:[r]};if(!r||r.includes("/.bin/"))throw new Error("rnx CLI not found. set SOOTSIM_BIN to the path of the rnx binary, or build the workspace CLI via `bun run --cwd packages/sootsim build:cli`.");return{cmd:t,prefixArgs:[]}}function ie(){try{let e=ce();if(!e)return null;let t=`sootsim-${process.platform}-${process.arch}`,r=u.join(e,"dist-bin",t);if(i.existsSync(r))return{cmd:r,prefixArgs:[]};let n=u.join(e,"dist-cli","bin.js");if(i.existsSync(n)){try{let o=u.join(e,"cli","commands","agent-wrapper.ts");if(i.existsSync(o)){let s=i.statSync(o).mtimeMs;i.statSync(n).mtimeMs<s&&console.warn("[rnx] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with `bun run --cwd packages/sootsim build:cli`.")}}catch{}return{cmd:process.execPath,prefixArgs:[n]}}return null}catch{return null}}function ce(){try{let r=T.resolve(`${I.packageName}/package.json`);return u.dirname(r)}catch{}let e=ae();if(!e)return null;let t=u.dirname(e);for(let r=0;r<8;r++){let n=u.join(t,"package.json");try{if(i.existsSync(n)&&JSON.parse(i.readFileSync(n,"utf8")).name===I.packageName)return t}catch{}let o=u.dirname(t);if(o===t)break;t=o}return null}function ae(){try{let e=import.meta.url;return!e||!e.startsWith("file://")?null:decodeURIComponent(e.slice(7))}catch{return null}}async function de(e,t,r){let n=u.join(y(),"locks");i.mkdirSync(n,{recursive:!0});try{i.chmodSync(n,448)}catch{}let o=u.join(n,`start-${e}-${t}.lock`),s=Date.now()+4e3,c=null;for(;c===null;)try{c=i.openSync(o,m.O_WRONLY|m.O_CREAT|m.O_EXCL,384)}catch(d){if(d.code!=="EEXIST")throw d;try{let a=Number(i.readFileSync(o,"utf8").trim());if(a&&!ue(a)){i.unlinkSync(o);continue}}catch{}if(Date.now()>s)throw new Error(`another start is in progress for project=${e} provider=${t} (lock: ${o})`);await new Promise(a=>setTimeout(a,50))}try{return i.writeFileSync(c,String(process.pid)),await r()}finally{try{i.closeSync(c)}catch{}try{i.unlinkSync(o)}catch{}}}function ue(e){try{return process.kill(e,0),!0}catch{return!1}}function W(e){let t=u.dirname(e);i.mkdirSync(t,{recursive:!0});try{i.chmodSync(t,448)}catch{}if(i.existsSync(e))try{if(i.statSync(e).isFIFO()){try{i.chmodSync(e,384)}catch{}return}i.unlinkSync(e)}catch{i.unlinkSync(e)}let r=te("mkfifo",["-m","600",e]);if(r.status!==0)throw new Error(`mkfifo(${e}) failed: ${r.stderr?.toString().trim()||"unknown error"}`)}var l=class extends Error{code;constructor(t,r){super(r),this.code=t}};async function $e(e){let t=M(e.projectId);if(!t)throw new l("NO_PROJECT",`no project with id=${e.projectId}`);let r=e.provider||t.preferredProvider||"codex";return de(t.id,r,async()=>{let n=L(t.id).find(p=>p.provider===r&&p.status!=="ended"&&E(p.wrapperPid,p.id));if(n)throw new l("ALREADY_RUNNING",`session already running for project=${t.id} provider=${r} (session ${n.id}, pid ${n.wrapperPid}). end it first with \`rnx agent end <sessionId>\`.`);let o=r==="claude"?re():void 0,s=C({projectId:t.id,provider:r,transport:"pty",cwd:t.cwd,status:"idle",claudeSessionUuid:o}),c=J(s.id),d=H(s.id),a=se(s.id);W(c),W(d);let g=u.dirname(a);i.mkdirSync(g,{recursive:!0});try{i.chmodSync(g,448)}catch{}let{cmd:A,prefixArgs:Y}=oe(),x=[...Y,"agent-wrapper","--session-id",s.id,"--project-id",t.id,"--provider",r,"--cwd",t.cwd,"--prompt-in",c,"--events-out",d,"--transcript",a];e.codexBin&&x.push("--codex-bin",e.codexBin),e.claudeBin&&x.push("--claude-bin",e.claudeBin),e.freshThread&&x.push("--fresh-thread"),o&&x.push("--claude-session-uuid",o);let P=ee(A,x,{detached:!0,stdio:"ignore",env:{...process.env,SOOTSIM_USER_DATA_DIR:y()}});P.unref();let D=e.readyTimeoutMs??6e3,j=await le(d,p=>p.type==="ready"||p.type==="error",D);if(!j||j.type==="error"){if(P.pid)try{process.kill(P.pid,"SIGTERM")}catch{}try{i.rmSync(b(s.id),{recursive:!0,force:!0})}catch{}v(s.id,{status:"ended"});let p=j&&j.type==="error"?j.message:`no ready event within ${D}ms`;throw new l("WRAPPER_FAILED",p)}return v(s.id,{wrapperPid:P.pid,status:"idle"}),{session:k(s.id),wrapperPid:P.pid}})}async function _e(e,t){let r=k(e);if(!r)throw new l("NO_SESSION",`no session with id=${e}`);if(!E(r.wrapperPid,e))throw v(e,{status:"ended"}),new l("NOT_ALIVE",`session wrapper is not alive (pid=${r.wrapperPid}). start a new session.`);let n=J(e);if(!i.existsSync(n))throw new l("NO_FIFO",`prompt FIFO missing: ${n}`);let o=i.openSync(n,m.O_WRONLY);try{let s=N(t);if(!s)throw new l("EMPTY_PROMPT","prompt text is empty");i.writeSync(o,s+`
|
|
5
5
|
`)}finally{i.closeSync(o)}v(e,{lastPrompt:t.displayText??t.text,status:"working"})}async function Be(e){let t=k(e);if(!t)throw new l("NO_SESSION",`no session with id=${e}`);if(E(t.wrapperPid,e))try{process.kill(t.wrapperPid,"SIGTERM")}catch{}let r=b(e),n=y();if(r.startsWith(n))try{i.rmSync(r,{recursive:!0,force:!0})}catch{}v(e,{status:"ended",wrapperPid:void 0})}function Ue(e,t){let r=H(e);if(!i.existsSync(r))throw new l("NO_FIFO",`events FIFO missing: ${r}`);let n=i.openSync(r,m.O_RDWR),o=i.createReadStream("",{fd:n,autoClose:!0}),s=ne.createInterface({input:o,crlfDelay:1/0});s.on("line",d=>{let a=O(d);a&&t(a)});let c=!1;return()=>{if(!c){c=!0;try{i.writeSync(n,`
|
|
6
6
|
`)}catch{}try{s.close()}catch{}try{o.destroy()}catch{}}}}async function le(e,t,r){let n=i.openSync(e,m.O_RDWR|m.O_NONBLOCK),o=Buffer.alloc(8192),s="",c=Date.now()+r;try{for(;Date.now()<c;){let d=0;try{d=i.readSync(n,o,0,o.length,null)}catch(a){if(a.code!=="EAGAIN")throw a;d=0}if(d>0){s+=o.subarray(0,d).toString("utf8");let a;for(;(a=s.indexOf(`
|
|
7
7
|
`))>=0;){let g=s.slice(0,a);s=s.slice(a+1);let A=O(g);if(A&&t(A))return A}}else await new Promise(a=>setTimeout(a,30))}return null}finally{i.closeSync(n)}}export{O as a,y as b,Se as c,M as d,we as e,ve as f,Ae as g,xe as h,k as i,L as j,z as k,Z as l,Pe as m,b as n,J as o,H as p,se as q,E as r,oe as s,l as t,$e as u,_e as v,Be as w,Ue as x};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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
|
import{execFileSync as S,execSync as x}from"node:child_process";var g=new WeakMap,l=new Set,b=!1;function f(){return{platform:process.platform,env:process.env}}function A(e){return S("/bin/ps",["-p",String(e),"-o","command="],{encoding:"utf8"}).trim()}function w(e=f()){return e.platform==="linux"&&e.env.GITHUB_ACTIONS==="true"&&e.env.RUNNER_OS==="Linux"}function L(e){let r=String(e);return/^--disable-gpu(?:=.*)?$/i.test(r)||/^--enable-unsafe-swiftshader(?:=.*)?$/i.test(r)||/^--use-angle=(?:swiftshader|swiftshader-webgl)$/i.test(r)||/^--use-gl=swiftshader$/i.test(r)}function I(e){return e.match(/(?:^|\s)(--disable-gpu(?:=[^\s]+)?|--enable-unsafe-swiftshader(?:=[^\s]+)?|--use-angle=(?:swiftshader|swiftshader-webgl)|--use-gl=swiftshader)(?=\s|$)/i)?.[1]??null}function k(e){return e==="darwin"?"metal":e==="linux"?"vulkan":"default"}function y(e,r=f()){if(w(r))return;let n=I(e);if(n)throw new Error(`[reap-browser] refused software-rendering Chrome process argument ${n}`);let o=k(r.platform),t=e.split(/\s+/);if(!t.includes(`--use-angle=${o}`)||!t.includes("--enable-gpu"))throw new Error(`[reap-browser] Chrome process did not retain the required ${o} GPU arguments`);if(r.platform==="darwin"&&e.includes("/Applications/Google Chrome.app/"))throw new Error("[reap-browser] refused the user's installed Google Chrome; use Playwright channel chromium")}function E(e){if(!e||typeof e!="object")return[];let n=e.gpu;if(!n||typeof n!="object")return[];let o=n,t=[],a=o.auxAttributes;if(a&&typeof a=="object")for(let s of Object.values(a))typeof s=="string"&&t.push(s);let i=o.devices;if(Array.isArray(i)){for(let s of i)if(!(!s||typeof s!="object"))for(let u of Object.values(s))typeof u=="string"&&t.push(u)}return t}function B(e){if(!e||typeof e!="object")return null;let r=e;if(!Array.isArray(r.processInfo))return null;for(let n of r.processInfo){if(!n||typeof n!="object")continue;let o=n;if(o.type==="browser"&&typeof o.id=="number"&&Number.isInteger(o.id)&&o.id>0)return o.id}return null}function G(e,r=f()){if(w(r))return;let o=E(e).join(" | ");if(!o||/swiftshader|llvmpipe|software rasterizer/i.test(o))throw new Error(`[reap-browser] Chrome reported a software renderer${o?`: ${o}`:""}`);if(r.platform==="darwin"&&!/metal/i.test(o))throw new Error(`[reap-browser] Chrome did not report an ANGLE Metal renderer: ${o}`)}function p(e){if(e&&typeof e=="object"){let n=g.get(e);if(n!==void 0)return n}let r=e;if(r&&typeof r.process=="function")try{let n=r.process();if(n&&typeof n.pid=="number"&&n.pid>0)return n.pid}catch{}if(r&&typeof r.browser=="function")try{let n=r.browser();if(n)return p(n)}catch{}return null}function h(e){let r=[];try{r=x(`pgrep -P ${e} || true`).toString().split(`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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 jt,c as qt}from"./chunk-
|
|
4
|
+
import{b as jt,c as qt}from"./chunk-WV3TKN7D.js";import{a as Bt,b as Ct}from"./chunk-4PV6QASJ.js";import{a as de}from"./chunk-HZTWQZUD.js";import{k as Dt}from"./chunk-MA5E6HJR.js";import{a as oe,b as C,c as B,d as Me,e as ae,f as X,g as me,h as ye,i as At,j as Et,k as Ne,l as _t}from"./chunk-UNBVUOIC.js";import{A as Mt,B as Nt,C as Ft,F as Pt,H as Ot,J as pe,K as Rt,Q as We,a as Ie,b as mt,c as ft,d as gt,e as yt,f as ht,g as bt,h as wt,i as xt,j as $t,k as Ce,l as je,r as qe,s as St,t as vt,u as ge,v as kt,w as Te,x as Le,y as It,z as Tt}from"./chunk-CMQIFA4L.js";import{a as Q}from"./chunk-VLI54BKH.js";import{e as it,j as at,o as lt,q as ct,s as dt,t as ut,u as pt,v as ce}from"./chunk-ELBDKQK2.js";import{a as st}from"./chunk-LMFAIAA5.js";import{c as nt,d as Be,f as rt}from"./chunk-OEU2MEZQ.js";import{a as ue}from"./chunk-6NE5Z6KG.js";function Je(e){return`(async () => {
|
|
5
5
|
const bridge = globalThis.SootSim && globalThis.SootSim.bridges && globalThis.SootSim.bridges.hotRemount
|
|
6
6
|
if (!bridge || typeof bridge.reloadExternalApp !== 'function') return false
|
|
7
7
|
await bridge.reloadExternalApp({ resetStorage: ${e?"true":"false"} })
|
|
@@ -552,7 +552,7 @@ import{b as jt,c as qt}from"./chunk-2JZXOHH6.js";import{a as de}from"./chunk-MJB
|
|
|
552
552
|
`),process.exit(0))}let o=["do","get","debug","wait"].map(n=>Be(n,S)).filter(n=>n!=null).join(`
|
|
553
553
|
|
|
554
554
|
`);console.log(`${o}
|
|
555
|
-
`),process.exit(0)}let M=d.wsPort,x=d.simId,_=d.simIdSource,P=d.commandTimeoutMs;if(b==="get"&&p==="diagnosis"){let S=i.indexOf("diagnosis"),o=S>=0?[...i.slice(0,S),...i.slice(S+1)]:i,{runDiagnose:n}=await import("./diagnose-
|
|
555
|
+
`),process.exit(0)}let M=d.wsPort,x=d.simId,_=d.simIdSource,P=d.commandTimeoutMs;if(b==="get"&&p==="diagnosis"){let S=i.indexOf("diagnosis"),o=S>=0?[...i.slice(0,S),...i.slice(S+1)]:i,{runDiagnose:n}=await import("./diagnose-XR2JIGDE.js"),a=await n(["recent",...o],t);process.exitCode=a;return}if(b==="do"&&p==="scan"){let{runCamera:S}=await import("./camera-4HFUBXPM.js");process.exitCode=await S(i,{port:t.port});return}if(p==="list"&&i.some(S=>S==="--drivers"||S==="-D")){let{buildDriverListRows:S}=await import("./drivers-OIZC544W.js"),o=S();console.log(` available drivers (${o.length}):
|
|
556
556
|
`);let n=Math.max(...o.map(l=>l.id.length),6),a=Math.max(...o.map(l=>l.kind.length),4);for(let l of o){let u=l.available?"\u2713":"\u2717",m=l.id.padEnd(n),f=l.kind.padEnd(a);console.log(` ${u} ${m} ${f} ${l.description}`),l.available&&l.detail?console.log(` ${l.detail}`):!l.available&&l.reason&&console.log(` unavailable: ${l.reason}`)}return}let c=dt(d),D=x||"default",R=new Set(["errors","warnings","requests","js","reload","globals","perf","storage-clear","list","wait","sleep"]),E=200;function J(S){let o=S.replace(/\s+/g," ").trim();if(!o)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(o)){let a=/<title[^>]*>([^<]+)<\/title>/i.exec(S)?.[1]?.trim(),l=/<body[^>]*>([\s\S]*?)<\//i.exec(S)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),u=a||l||"html error page";return`<html ${S.length}B> "${u}" (body elided \u2014 add --json for the full payload)`}return o.length<=E?o:`${o.slice(0,E)}\u2026 (+${o.length-E} more bytes)`}function U(S){let o=S.displayUrl||S.url;return S.status!=null?`${S.method} ${o} -> ${S.status}${S.statusText?` ${S.statusText}`:""}`:S.error?`${S.method} ${o} -> ${S.error}`:`${S.method} ${o}`}async function T(S){let o=ue()?400:200;try{let{settled:n,elapsed:a}=await se({bridge:S,maxMs:o,pollMs:32,stablePolls:2});n||process.stderr.write(` \u26A0 auto-wait timed out after ${a??o}ms \u2014 next command may see mid-animation state. use \`rnx do settle\` for a longer wait.
|
|
557
557
|
`)}catch{}}function O(S,o){if(o.result?.reason==="offscreen"){let{x:n,y:a,screen:l}=o.result;console.error(` tap failed: ${S} resolved to (${Math.round(n)},${Math.round(a)}), outside the ${l?.width}x${l?.height} screen`),console.error(" the node exists but is scrolled out of view \u2014 scroll it on-screen first (rnx do scroll / swipe), then tap.");return}console.error(` tap failed: ${S} stayed visible but did not receive a hittable press after ${o.attempts} attempt${o.attempts===1?"":"s"}`),o.result&&console.error(` last result: ${JSON.stringify(o.result)}`)}async function H(){try{return await c.send({type:"evaluate",code:`(() => ({
|
|
558
558
|
console: ${Te},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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{m as a}from"./chunk-
|
|
4
|
+
import{m as a}from"./chunk-UNBVUOIC.js";import{q as l,s as i}from"./chunk-ELBDKQK2.js";function c(r){if(!r||typeof r!="object")return!1;let t=Reflect.get(r,"strategy");return typeof Reflect.get(r,"ok")=="boolean"&&(t==="data"||t==="full")&&Array.isArray(Reflect.get(r,"cleared"))&&typeof Reflect.get(r,"relaunched")=="boolean"}function d(){console.log(`
|
|
5
5
|
rnx reset - clear the current guest app and relaunch it
|
|
6
6
|
|
|
7
7
|
usage:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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
|
var c="sootsim-agent-prompt-v1";function r(n){return typeof n=="string"?n.trim():""}function m(n){let e=r(n.text);if(!e)return"";let t=r(n.displayText),s=r(n.inspectSummary),o=r(n.inspectTrace);return!!s||!!o||/[\r\n]/.test(e)||!!t&&t!==e?JSON.stringify({__sootsimAgentPrompt:c,text:e,displayText:t,inspectSummary:s,inspectTrace:o}):e}function u(n){let e=r(n);if(!e)return null;try{let t=JSON.parse(e);if(t.__sootsimAgentPrompt!==c)return{text:e};let s=r(typeof t.text=="string"?t.text:void 0);if(!s)return null;let o=r(typeof t.displayText=="string"?t.displayText:void 0),i=r(typeof t.inspectSummary=="string"?t.inspectSummary:void 0),p=r(typeof t.inspectTrace=="string"?t.inspectTrace:void 0);return{text:s,...o?{displayText:o}:{},...i?{inspectSummary:i}:{},...p?{inspectTrace:p}:{}}}catch{return{text:e}}}export{m as a,u as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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 r}from"./chunk-
|
|
4
|
+
import{a as r}from"./chunk-OEU2MEZQ.js";var i=[{title:"Overview",route:"/docs/rnx/cli"},...r.slice().sort((o,t)=>o.order-t.order).map(o=>({title:o.navTitle,route:`/docs/rnx/cli/${o.slug}`}))];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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 r}from"./chunk-
|
|
4
|
+
import{b as r}from"./chunk-4NPZ5FO2.js";function o(){if(!r())return null;let t=process.env.VITE_POSTHOG_API_KEY||"";if(!t)return null;let e=process.env.CONTRAST_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:t,host:e.replace(/\/+$/,"")}}function i(t,e){return t.trim().slice(0,e)}function s(t){let e=t.kind==="package_incompatibility"?{package_name:i(t.packageName,160),package_version:i(t.packageVersion,80),...t.unsupportedApi?{unsupported_api:i(t.unsupportedApi,160)}:{}}:{error_class:i(t.errorClass,160)};return{event:t.kind,distinct_id:"rnx-cli-diagnostic",properties:e}}var n=[];function a(t){r()&&n.push(t)}function c(t){let e=t instanceof Error?t.constructor.name:typeof t;a({kind:"error_shape",errorClass:e})}async function l(){if(n.length===0)return;let t=o();if(!t){n.length=0;return}let e=n.splice(0,n.length).map(s);try{await fetch(`${t.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:t.apiKey,batch:e}),signal:AbortSignal.timeout(2e3)})}catch{}}export{s as a,a as b,c,l as d};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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 r,c as g,d as f,e as v}from"./chunk-
|
|
4
|
+
import{b as r,c as g,d as f,e as v}from"./chunk-CYS3D7RG.js";import"./chunk-V7X543SB.js";import"./chunk-IX7W5BXL.js";import"./chunk-WKQ6W74M.js";import"./chunk-PBTG4UCS.js";import"./chunk-RRX5RZI2.js";var $={"browser-cache":"browser caches","camera-fixture":"staged camera fixture videos",recording:"recordings and captured frames","runtime-archive":"downloaded runtime archives","runtime-version":"inactive runtime versions"};function y(s){let i=new Map;for(let o of s){let n=i.get(o.kind)??{bytes:0,count:0};n.bytes+=o.bytes,n.count++,i.set(o.kind,n)}return[...i].sort((o,n)=>n[1].bytes-o[1].bytes).map(([o,n])=>` ${$[o]}: ${r(n.bytes)} (${n.count} ${n.count===1?"item":"items"})`)}function h(){console.log(`
|
|
5
5
|
rnx cleanup \u2014 inspect and reclaim local rnx disk usage
|
|
6
6
|
|
|
7
7
|
usage:
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! rnx v0.1.353 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{a}from"./chunk-WTGQUQ32.js";import"./chunk-PBTG4UCS.js";import"./chunk-RRX5RZI2.js";export{a as getCliVersion};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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{d as a,g as i,i as d,j as r}from"./chunk-
|
|
4
|
+
import{d as a,g as i,i as d,j as r}from"./chunk-37J74ASV.js";import"./chunk-RRX5RZI2.js";import{existsSync as m,readFileSync as k}from"node:fs";import{resolve as f}from"node:path";async function P(e){if(e.includes("--help")||e.includes("-h")){console.log(`
|
|
5
5
|
rnx compat \u2014 check package compatibility
|
|
6
6
|
|
|
7
7
|
usage:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.353 | (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{
|
|
4
|
+
import{F as t,G as r,z as s}from"./chunk-WKQ6W74M.js";import"./chunk-RRX5RZI2.js";function l(){let e=t(),n=e.configured&&e.productAnalytics;console.log(` bounded diagnostics are ${n?"ON":"OFF"}`),console.log(" permitted fields: package name/version/unsupported API or error class"),console.log(` config: ${s()}`);let o=process.env.DO_NOT_TRACK;(o==="1"||o==="true")&&console.log(` note: DO_NOT_TRACK=${o} is set \u2014 telemetry is off for this run`)}async function i(e){let n=e.find(o=>!o.startsWith("-"))?.toLowerCase();switch(n){case void 0:case"status":l();return;case"on":r({productAnalytics:!0,crashReports:!1}),console.log(" bounded diagnostics ON"),console.log(` config: ${s()}`);return;case"off":r({productAnalytics:!1,crashReports:!1}),console.log(" bounded diagnostics OFF"),console.log(` config: ${s()}`);return;default:console.error(` unknown telemetry action: ${n}`),console.error(" usage: rnx config telemetry [on|off|status]"),process.exit(1)}}function c(){console.log(`
|
|
5
5
|
rnx config \u2014 manage local CLI preferences
|
|
6
6
|
|
|
7
7
|
usage:
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! rnx v0.1.353 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x}from"./chunk-MA5E6HJR.js";import"./chunk-4IXIONDR.js";import"./chunk-7SKQRS74.js";import"./chunk-TX2T5KPQ.js";import"./chunk-5DLBRZAG.js";import"./chunk-UNBVUOIC.js";import"./chunk-CMQIFA4L.js";import"./chunk-HVLZYUGF.js";import"./chunk-BK5TJXUU.js";import"./chunk-DSBUGNC5.js";import"./chunk-57YZEJ6J.js";import"./chunk-7FUSVOMH.js";import"./chunk-GAYCF2O5.js";import"./chunk-HWMBTYJX.js";import"./chunk-VZDW2U64.js";import"./chunk-ELBDKQK2.js";import"./chunk-ECIDT6F5.js";import"./chunk-KZLGVYCX.js";import"./chunk-V7X543SB.js";import"./chunk-IX7W5BXL.js";import"./chunk-6NE5Z6KG.js";import"./chunk-WKQ6W74M.js";import"./chunk-PBTG4UCS.js";import"./chunk-RRX5RZI2.js";export{e as applyRuntimeGenerationOrigin,i as buildOpenUrl,h as buildShellUrl,v as closeSimsBulk,c as ensureBridgeForOpen,b as normalizeDeepLinkTarget,w as planBulkCloseTargets,n as playwrightHostPidForSim,k as printConnectedSims,d as resolveBundleTarget,f as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,g as resolveShellBaseUrlForBridgePort,u as runClaimCommand,x as runCloseCommand,t as runFocusCommand,q as runLinkCommand,r as runOpenCommand,s as runUseCommand,o as signalDriverLaunchConnected,j as summarizeSimUrl,p as terminatePlaywrightHostsForSims,l as waitForSimMatch,m as waitForSimMatchOrHostExit};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! rnx v0.1.353 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
|
+
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
+
import{a,b,c,d,e,f}from"./chunk-PNQ33FJB.js";import"./chunk-WU25RTIX.js";import"./chunk-KIQVNLVD.js";import"./chunk-VLI54BKH.js";import"./chunk-HWMBTYJX.js";import"./chunk-VZDW2U64.js";import"./chunk-ELBDKQK2.js";import"./chunk-ECIDT6F5.js";import"./chunk-OEU2MEZQ.js";import"./chunk-WKQ6W74M.js";import"./chunk-WTGQUQ32.js";import"./chunk-PBTG4UCS.js";import"./chunk-JVVO63QH.js";import"./chunk-RRX5RZI2.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,e as teardownDaemonService,d as teardownLegacyMacDaemonArtifacts,f as teardownSootsimHome};
|