rnxsim 0.1.315 → 0.1.317
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/cli/commands/control.ts +20 -3
- package/cli/commands/flow.ts +23 -11
- package/cli/commands/inspect.ts +51 -3
- package/dist-cli/bin.js +5 -5
- package/dist-cli/chunks/{agent-CBU2WDKV.js → agent-EKGLRJEN.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-UNB4R27L.js → agent-wrapper-FONNWB7J.js} +2 -2
- package/dist-cli/chunks/{app-fonts-YMLRF3JD.js → app-fonts-XPM54HRY.js} +2 -2
- package/dist-cli/chunks/{assert-5N6HUCL5.js → assert-PILHTZRZ.js} +2 -2
- package/dist-cli/chunks/{auth-BHDR3A6G.js → auth-Q2VUD5NQ.js} +2 -2
- package/dist-cli/chunks/{beta-LWUVCPYK.js → beta-P4XLZ3KL.js} +2 -2
- package/dist-cli/chunks/{camera-CNO6B2JZ.js → camera-O4PEVPI4.js} +2 -2
- package/dist-cli/chunks/{chunk-MSSY4EEZ.js → chunk-2SAOKV6V.js} +1 -1
- package/dist-cli/chunks/{chunk-ZWX6DDIS.js → chunk-3G7I72XV.js} +2 -2
- package/dist-cli/chunks/{chunk-26WMWUH4.js → chunk-5BYFLVSZ.js} +1 -1
- package/dist-cli/chunks/{chunk-Y2MWQKOS.js → chunk-5XVHBFAT.js} +3 -3
- package/dist-cli/chunks/{chunk-RVM4EZ4E.js → chunk-67OCUGZD.js} +2 -2
- package/dist-cli/chunks/{chunk-C5O5CTXJ.js → chunk-67ZR7PU7.js} +1 -1
- package/dist-cli/chunks/{chunk-AOGGOC4V.js → chunk-6WG4RQKM.js} +2 -2
- package/dist-cli/chunks/{chunk-PVL7XSPN.js → chunk-744422UA.js} +1 -1
- package/dist-cli/chunks/{chunk-XSSHENNY.js → chunk-7Q7IQ2SS.js} +2 -2
- package/dist-cli/chunks/{chunk-UROXJVY3.js → chunk-A3GVXVSG.js} +2 -2
- package/dist-cli/chunks/{chunk-MCKQH4AM.js → chunk-ADAIY3DX.js} +2 -2
- package/dist-cli/chunks/{chunk-OF2HTH25.js → chunk-ARICQ4CG.js} +2 -2
- package/dist-cli/chunks/{chunk-XOXGC3EH.js → chunk-ATOUAYJP.js} +1 -1
- package/dist-cli/chunks/{chunk-JZ6VTZ5B.js → chunk-BJ5CYKA7.js} +3 -3
- package/dist-cli/chunks/{chunk-WMZ7NJAO.js → chunk-CHKTOWRH.js} +131 -131
- package/dist-cli/chunks/{chunk-SZKSFMWS.js → chunk-CUILVYWI.js} +1 -1
- package/dist-cli/chunks/{chunk-XZ6O67AR.js → chunk-EL23MRFL.js} +1 -1
- package/dist-cli/chunks/{chunk-YY24QI25.js → chunk-FIPCJ5OS.js} +1 -1
- package/dist-cli/chunks/{chunk-6ZMRJPKI.js → chunk-GMWPCQ63.js} +1 -1
- package/dist-cli/chunks/{chunk-QR7MWAWE.js → chunk-GQ3D2D4O.js} +1 -1
- package/dist-cli/chunks/{chunk-KQSJVNFE.js → chunk-HF4NZ5SD.js} +2 -2
- package/dist-cli/chunks/{chunk-54MIRTFE.js → chunk-HJKQ6NEU.js} +5 -5
- package/dist-cli/chunks/{chunk-D3M36D7O.js → chunk-J4MCKLWE.js} +23 -23
- package/dist-cli/chunks/{chunk-PVPAP3TV.js → chunk-JQ4Y2XVT.js} +1 -1
- package/dist-cli/chunks/{chunk-TEL7G234.js → chunk-JZXCQEKO.js} +2 -2
- package/dist-cli/chunks/{chunk-4LTBK3ZN.js → chunk-KO7UG262.js} +2 -2
- package/dist-cli/chunks/{chunk-WUXCH6WN.js → chunk-KZS5VM6Y.js} +1 -1
- package/dist-cli/chunks/{chunk-DNCNFZ7V.js → chunk-LSC2HFAB.js} +1 -1
- package/dist-cli/chunks/{chunk-PXNAZYGV.js → chunk-NA4AMR2E.js} +1 -1
- package/dist-cli/chunks/{chunk-QR3HTFRB.js → chunk-NF63TOPI.js} +2 -2
- package/dist-cli/chunks/{chunk-N5ZCYP5F.js → chunk-NUSBQSRQ.js} +2 -2
- package/dist-cli/chunks/{chunk-RJIEZ2NY.js → chunk-O6OIXJ54.js} +1 -1
- package/dist-cli/chunks/{chunk-BPCDO7ST.js → chunk-ODHQKXLB.js} +2 -2
- package/dist-cli/chunks/{chunk-2JZ53D4A.js → chunk-OO5D7IJE.js} +1 -1
- package/dist-cli/chunks/{chunk-56H6EVO4.js → chunk-OWADERTW.js} +2 -2
- package/dist-cli/chunks/{chunk-NCKAD3V7.js → chunk-OXSCF4UD.js} +2 -2
- package/dist-cli/chunks/{chunk-L4JZKVCC.js → chunk-QCQQ2VDW.js} +2 -2
- package/dist-cli/chunks/{chunk-FNTTIR2P.js → chunk-QGPNBTHT.js} +2 -2
- package/dist-cli/chunks/{chunk-OXS2IWO2.js → chunk-R6DDJVBB.js} +2 -2
- package/dist-cli/chunks/{chunk-LT6UC7I3.js → chunk-R6MEMDNB.js} +2 -2
- package/dist-cli/chunks/{chunk-CMM64PPR.js → chunk-RCPPPW7B.js} +1 -1
- package/dist-cli/chunks/{chunk-MF7WUHQ3.js → chunk-RG3CME4Y.js} +2 -2
- package/dist-cli/chunks/{chunk-H362IX2I.js → chunk-S23KHLTR.js} +2 -2
- package/dist-cli/chunks/{chunk-J6HMTUZH.js → chunk-SZIPYT3D.js} +2 -2
- package/dist-cli/chunks/{chunk-U2HNIHBY.js → chunk-T6W3B2KA.js} +1 -1
- package/dist-cli/chunks/{chunk-O2KRHVTU.js → chunk-TUFL7CQK.js} +2 -2
- package/dist-cli/chunks/{chunk-LP2BTEJ6.js → chunk-VB2ZZ4JI.js} +2 -2
- package/dist-cli/chunks/{chunk-25VCR44B.js → chunk-VUKB6JW3.js} +1 -1
- package/dist-cli/chunks/{chunk-WM32MGTJ.js → chunk-W4YHMJOO.js} +2 -2
- package/dist-cli/chunks/{chunk-657SQG4D.js → chunk-WJVNVBAI.js} +1 -1
- package/dist-cli/chunks/{chunk-26CSIR76.js → chunk-WWW5DC3G.js} +2 -2
- package/dist-cli/chunks/{chunk-2POODCTW.js → chunk-YRVJHPCU.js} +2 -2
- package/dist-cli/chunks/{cleanup-F3NUJ3SL.js → cleanup-O6IWLGDY.js} +2 -2
- package/dist-cli/chunks/cli-version-F2R7SUY7.js +4 -0
- package/dist-cli/chunks/{compat-AX2SEPTH.js → compat-562BT6JM.js} +2 -2
- package/dist-cli/chunks/{config-4QQO5JVU.js → config-7RO6O45J.js} +2 -2
- package/dist-cli/chunks/{control-OCKKSOWA.js → control-XYKZG442.js} +2 -2
- package/dist-cli/chunks/daemon-WE37QLQC.js +4 -0
- package/dist-cli/chunks/{debug-T6MWVEVX.js → debug-3VCEOVRM.js} +3 -3
- package/dist-cli/chunks/{desktop-NCW7R7CB.js → desktop-K3PPS6VL.js} +3 -3
- package/dist-cli/chunks/{detox-G6GITO2X.js → detox-6ODNKASO.js} +2 -2
- package/dist-cli/chunks/{device-7BTEJCTH.js → device-NZCR7JIN.js} +2 -2
- package/dist-cli/chunks/{diagnose-SC5LACE3.js → diagnose-VVJY6RF2.js} +2 -2
- package/dist-cli/chunks/{disk-cleanup-KK56QQZA.js → disk-cleanup-2VJMHUIY.js} +2 -2
- package/dist-cli/chunks/drivers-44ZJZ37B.js +4 -0
- package/dist-cli/chunks/{film-WGYEHGIA.js → film-CEMBA2DA.js} +3 -3
- package/dist-cli/chunks/flow-ORGIXYVS.js +4 -0
- package/dist-cli/chunks/help-UW52M7FZ.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-CWTZWH3L.js → hidden-runtime-alias-R2QQLZZA.js} +2 -2
- package/dist-cli/chunks/{home-paths-EBT4XHAS.js → home-paths-TKPTU62O.js} +2 -2
- package/dist-cli/chunks/inspect-TNFI6C6G.js +4 -0
- package/dist-cli/chunks/install-desktop-NEJEPL4L.js +4 -0
- package/dist-cli/chunks/{login-GSYOTGVQ.js → login-CIQT627K.js} +4 -4
- package/dist-cli/chunks/{logout-JPRIR7YK.js → logout-V2DJVY3U.js} +2 -2
- package/dist-cli/chunks/{maestro-LXKDNO5M.js → maestro-YSZ6ZC5C.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-5ZIKOU53.js → maestro-generate-6JUELIXK.js} +3 -3
- package/dist-cli/chunks/{mode-N3QHXCES.js → mode-D4HQ6YN3.js} +2 -2
- package/dist-cli/chunks/{optional-demo-registry-XDH6X24N.js → optional-demo-registry-AC6YJKT4.js} +2 -2
- package/dist-cli/chunks/{perf-VOPL26FM.js → perf-5GRZ4G5X.js} +2 -2
- package/dist-cli/chunks/{permissions-CZFKM4UD.js → permissions-4V6UVWGK.js} +2 -2
- package/dist-cli/chunks/{record-FODSOGMA.js → record-IDNLOQLR.js} +3 -3
- package/dist-cli/chunks/{report-issue-FBPCZKOV.js → report-issue-TF6R77TT.js} +2 -2
- package/dist-cli/chunks/reset-D7WAFOZO.js +4 -0
- package/dist-cli/chunks/runtime-O5TNQBYH.js +4 -0
- package/dist-cli/chunks/{screenshot-command-7S3FYVO7.js → screenshot-command-CHJN7WUT.js} +3 -3
- package/dist-cli/chunks/{screenshot-layers-CDYHPNC3.js → screenshot-layers-MSDCGYNE.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-EBIIY2YU.js → screenshots-capture-OGP3OQYR.js} +2 -2
- package/dist-cli/chunks/{serve-NELNSCZP.js → serve-GPBLCMXX.js} +2 -2
- package/dist-cli/chunks/{setup-DF5ZDDIV.js → setup-S2KYWZZO.js} +2 -2
- package/dist-cli/chunks/{skills-E2QZF6WZ.js → skills-AUS5DTUE.js} +2 -2
- package/dist-cli/chunks/{state-MBZDKZ7U.js → state-QLYTMIKF.js} +2 -2
- package/dist-cli/chunks/{storage-J5BMNVXM.js → storage-2MNS4TYO.js} +2 -2
- package/dist-cli/chunks/store-UT52X7AA.js +4 -0
- package/dist-cli/chunks/telemetry-CAQVTTHY.js +4 -0
- package/dist-cli/chunks/{timeline-MC6N5BHY.js → timeline-EUHPXPFP.js} +2 -2
- package/dist-cli/chunks/{upgrade-7UTU53DH.js → upgrade-JMMBM3ZN.js} +2 -2
- package/dist-cli/chunks/upload-CEX4UBJL.js +4 -0
- package/dist-cli/chunks/{version-VNACNYQK.js → version-QCF7RCA2.js} +2 -2
- package/dist-cli/chunks/{web-MGJ2TUKR.js → web-WPYHMOVH.js} +2 -2
- package/dist-cli/chunks/{what-happened-7DLKH3OD.js → what-happened-3RNZP4MB.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +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/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +21 -4
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/cli-version-XIW6O3FG.js +0 -4
- package/dist-cli/chunks/daemon-N5VLMYKQ.js +0 -4
- package/dist-cli/chunks/drivers-NPGVBWMG.js +0 -4
- package/dist-cli/chunks/flow-KQBIBM3N.js +0 -4
- package/dist-cli/chunks/help-G7CAKI65.js +0 -4
- package/dist-cli/chunks/inspect-CCPZXVDU.js +0 -4
- package/dist-cli/chunks/install-desktop-NZ3VGTQZ.js +0 -4
- package/dist-cli/chunks/reset-3H35GFO3.js +0 -4
- package/dist-cli/chunks/runtime-4OVFRXV5.js +0 -4
- package/dist-cli/chunks/store-U3DXC7HH.js +0 -4
- package/dist-cli/chunks/telemetry-XIPJVT5E.js +0 -4
- package/dist-cli/chunks/upload-2M2KOTYI.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.317 | (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 c}from"./chunk-
|
|
4
|
+
import{a as c}from"./chunk-FIPCJ5OS.js";import{a as i}from"./chunk-VB2ZZ4JI.js";import{a as n}from"./chunk-CUILVYWI.js";import{createRequire as f}from"node:module";import{createJiti as s}from"jiti";var m=f(import.meta.url);function t(e){return e===void 0||e!==null&&typeof e=="object"&&!Array.isArray(e)}function p(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let o=Reflect.get(e,"runtimeVersion"),r=Reflect.get(e,"network");return(o===void 0||typeof o=="string"&&o===o.trim()&&i(o))&&t(Reflect.get(e,"modules"))&&t(Reflect.get(e,"turboModules"))&&t(Reflect.get(e,"nativeModules"))&&t(Reflect.get(e,"env"))&&t(r)&&t(Reflect.get(e,"settings"))&&t(Reflect.get(e,"initialState"))}async function a(e){if(e?.configPath)try{let r=await s(import.meta.url,{interopDefault:!0,alias:{[`${n.packageName}/config`]:m.resolve(`${n.packageName}/config`)}}).import(e.configPath,{default:!0});if(!p(r))throw new Error("the default export must be an rnx config object");return r}catch(o){let r=o instanceof Error?o.message:String(o);throw new Error(`could not load ${e.configPath}: ${r}`)}}async function R(e=process.cwd()){let o=c(e);return{project:o,config:await a(o)}}export{a,R as b};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.317 | (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 O,b as B}from"./chunk-
|
|
4
|
+
import{a as O,b as B}from"./chunk-GMWPCQ63.js";import{M as T,N,O as _,P as W,g as F}from"./chunk-ATOUAYJP.js";var Ie="http://localhost:7668/";function H(e){if(typeof e=="number")return Number.isInteger(e)&&e>0?e:null;if(typeof e!="string")return null;let t=e.trim();if(!t)return null;let r=Number(t);return Number.isInteger(r)&&r>0?r:null}function X(e){let t=H(e);return t===null?0:t}function V(e={}){let t=H(e.explicitPort);return t!==null?t:7668+X(e.portOffset)}var z=5173;var Q=2e3;function Pe(e){let t=e-7668;return t<0||t>Q?null:`http://localhost:${z+t}/`}var ye=4001,Te="sootsim close";import{existsSync as Z,mkdirSync as ee,readFileSync as te,rmSync as E,writeFileSync as re}from"fs";import{tmpdir as ne}from"os";import{dirname as ie,join as oe,resolve as se}from"path";var v=1,G="SOOTSIM_CLI_CURRENT_SIM_PATH",le=["SOOTSIM_CLI_IDENTITY","TM_SESSION","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","TERM_SESSION_ID","ITERM_SESSION_ID","TMUX_PANE","STY","KITTY_WINDOW_ID","WEZTERM_PANE","ALACRITTY_WINDOW_ID","WINDOWID","VSCODE_INJECTION"],j=/^(?:tmux|screen)|^tm$/i;function q(e,t=20){let r=e,n=O(e);if(!n||n<=1){let o=B(e);return e>1&&o&&!j.test(o)?e:null}for(let o=0;o<t;o++){let s=B(n);if(s&&j.test(s))return r;let u=O(n);if(!u||u<=1)return s?n:r;r=n,n=u}return n}function x(){for(let t of le){let r=process.env[t];if(r&&r.trim())return{key:`${t}:${r.trim()}`,source:t,stable:!0}}let e=q(process.ppid);return e&&e>1?{key:`gppid-${e}`,source:"grand-ppid",stable:!0}:{key:`pid-${process.ppid}`,source:"ppid",stable:!1}}function ce(){return x().key}function ve(){return q(process.ppid)}function k(){if(process.env[G])return se(process.env[G]);let e=ce();return oe(ne(),`sootsim-current-sim-${e}.json`)}function de(){let e=k();if(!Z(e))return null;try{let t=JSON.parse(te(e,"utf8"));return t.version!==v||typeof t.simId!="string"||!t.simId.trim()||typeof t.updatedAt!="string"?(E(e,{force:!0}),null):{version:v,simId:t.simId.trim(),updatedAt:t.updatedAt}}catch{return E(e,{force:!0}),null}}function R(){return de()?.simId||null}function xe(e){let t=e.trim();if(!t)return;let r=k();ee(ie(r),{recursive:!0}),re(r,JSON.stringify({version:v,simId:t,updatedAt:new Date().toISOString()},null,2)+`
|
|
5
5
|
`)}function J(){E(k(),{force:!0})}var h="http://localhost:5173/";import ue from"node:fs";import S from"node:path";import{WebSocket as D}from"ws";var C=null;function M(){return N().filter(e=>W(e))}function Y(e){let t=S.resolve(e);for(;;){if(ue.existsSync(S.join(t,".git")))return t;let r=S.dirname(t);if(r===t)return null;t=r}}function K(e,t){let r=S.relative(e,t);return r===""||r!==".."&&!r.startsWith(`..${S.sep}`)&&!S.isAbsolute(r)}function ae(){let e=M();if(e.length===0)return null;if(process.env.SOOTSIM_BRIDGE_PORT!==void 0||process.env.PORT_OFFSET!==void 0){let r=V({explicitPort:process.env.SOOTSIM_BRIDGE_PORT,portOffset:process.env.PORT_OFFSET}),n=e.find(o=>o.bridgePort===r);if(n)return n}let t=null;try{t=process.cwd()}catch{}if(t){let r=Y(t),n=e.filter(o=>{let s=Y(o.cwd);return r&&s?r===s:K(t,o.cwd)||K(o.cwd,t)});if(n.length>0)return n.find(o=>o.bridgePort===7668)??n[0]}return e.find(r=>r.bridgePort===7668)??e[0]}function me(){let e=F();if(C?.homeDir===e)return C.world;let t=fe();return C={homeDir:e,world:t},t}function fe(){let e=ae();if(e)return{source:"dev-bridge",bridgePort:e.bridgePort,shellBaseUrl:e.shellPort?`http://localhost:${e.shellPort}/`:h};let t=T();return t&&_(t)?{source:"daemon",bridgePort:t.bridgePort,shellBaseUrl:t.runtimePort>0?`http://localhost:${t.runtimePort}/`:h}:{source:"default",bridgePort:7668,shellBaseUrl:h}}function ge(e){let t=M().find(n=>n.bridgePort===e);if(t)return{source:"dev-bridge",shellBaseUrl:t.shellPort?`http://localhost:${t.shellPort}/`:h};let r=T();return r&&_(r)&&r.bridgePort===e?{source:"daemon",shellBaseUrl:r.runtimePort>0?`http://localhost:${r.runtimePort}/`:h}:null}function Fe(e){let t;try{let o=new URL(e);t=o.port?Number(o.port):o.protocol==="https:"?443:80}catch{return null}if(!Number.isFinite(t)||t<=0)return null;let r=M().find(o=>o.shellPort===t||o.runtimePort===t||o.bridgePort===t);if(r)return r.bridgePort;let n=T();return n&&_(n)&&(n.runtimePort===t||n.bridgePort===t)?n.bridgePort:null}function pe(){return me().bridgePort}function Ne(e,t){let r=ge(e),n=r?.source==="dev-bridge"?"dev bridge":r?.source==="daemon"?"daemon bridge":"bridge",o=r?.source==="dev-bridge"?`dev-bridges/${e}.json`:r?.source==="daemon"?"daemon.json":"no lockfile",s=t??r?.shellBaseUrl;process.stderr.write(` \u2192 ${n} :${e} (${s?`shell ${s}, `:""}${o})
|
|
6
6
|
`)}var A=class extends Error{lock;constructor(t,r){super(t),this.name="BridgeSimLockedError",this.lock=r}};function he(e){return e==="flag"?"via --sim":e==="saved"?"saved via `rnxsim use`":"primary fallback \u2014 no sim pinned"}function We(e,t={}){let r=new Set,n=t.port??pe(),o=t.port!==void 0,s=t.commandTimeoutMs??15e3,u,a="none",I=new Set(t.stripBooleanFlags??[]),P=new Set(t.stripValueFlags??[]);for(let l=0;l<e.length;l++){let i=e[l];if(i==="--port"||i==="-p"){r.add(l),o=!0,l+1<e.length&&(r.add(l+1),n=Number(e[l+1])),l++;continue}if(i.startsWith("--port=")){r.add(l),o=!0,n=Number(i.slice(7));continue}if(i==="--timeout"){r.add(l),l+1<e.length&&(r.add(l+1),s=Number(e[l+1])),l++;continue}if(i==="--sim"||i==="--session"||i==="--tab"){r.add(l),l+1<e.length&&(r.add(l+1),u=e[l+1]?.trim()||void 0,a="flag"),l++;continue}let c=i.startsWith("--sim=")?i.slice(6):i.startsWith("--session=")?i.slice(10):i.startsWith("--tab=")?i.slice(6):void 0;if(c!==void 0){r.add(l),u=c.trim()||void 0,a="flag";continue}if(I.has(i)){r.add(l);continue}P.has(i)&&(r.add(l),l+1<e.length&&r.add(l+1),l++)}if(!u){let l=R();l&&(u=l.trim()||void 0,a="saved")}return{positional:e.filter((l,i)=>!r.has(i)),wsPort:n,explicitPort:o,simId:u,simIdSource:a,commandTimeoutMs:s}}function Se(e,t={}){let r=1,n=t.commandTimeoutMs??15e3,o=new Map,s=new D(`ws://localhost:${e}`),u=x(),a=new Promise((i,c)=>{s.on("open",()=>{try{s.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:u.key,cliIdentitySource:u.source,cliLabel:t.cliLabel}))}catch{}i()}),s.on("error",d=>{let m=d.message?`: ${d.message}`:"";c(new Error(`could not connect to ws://localhost:${e}${m}`))})});a.catch(()=>{});let I=!1,P=!1;function l(i,c){if(P||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||i.startsWith("bridge:")||i==="focus"||i==="close")return;P=!0;let d=c??"primary",m=he(c?t.simIdSource:"none");process.stderr.write(` \u2192 ${d} (${m})
|
|
7
7
|
`)}return s.on("message",i=>{let c;try{c=JSON.parse(i.toString())}catch{return}if(c.id===0)return;let d=o.get(c.id);d&&(o.delete(c.id),c._otherCliCount>0&&!I&&(I=!0,process.stderr.write(`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.317 | (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,b as V,c as Le}from"./chunk-
|
|
4
|
+
import{a as K,b as V,c as Le}from"./chunk-OWADERTW.js";import{c as Ne,d as Ce}from"./chunk-YRVJHPCU.js";import{k as Fe}from"./chunk-3G7I72XV.js";import{c as _e,d as E}from"./chunk-SZIPYT3D.js";import{a as Ue}from"./chunk-W4YHMJOO.js";import{q as Pe,s as $e,u as B}from"./chunk-A3GVXVSG.js";import{a as Ae}from"./chunk-CUILVYWI.js";import{createHash as vt}from"crypto";import{readFileSync as M}from"fs";import qe from"path";import{gzipSync as ge,gunzipSync as xt}from"zlib";function Oe(e){let t=(e||"").toLowerCase().split(";")[0].trim();return t?!(t.startsWith("image/")||t.startsWith("video/")||t.startsWith("audio/")||t==="font/woff2"||t==="application/font-woff2"||t==="application/zip"||t==="application/gzip"):!0}import{brotliCompressSync as ct,constants as dt}from"node:zlib";var pt=9;function ze(e){return ct(e,{params:{[dt.BROTLI_PARAM_QUALITY]:pt}})}function ce(e,t){let r=new AbortController,s=setTimeout(()=>r.abort(new Error(`${t} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(s)}}async function ft(e){let t=ce(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:t.signal})}finally{t.cancel()}if(!r.ok){let s=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${s.slice(0,200)}`)}}async function mt(e,t=8,r){let s=0,o=0,i=e.length;await Promise.all(Array.from({length:Math.min(t,i)},async()=>{for(;s<i;){let l=e[s++];await ft(l),o++,r?.(o,i)}}))}function gt(e,t,r,s){let o=[];o.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let i of e.files){let l=r.get(i.urlhash);l&&o.push({url:i.putUrl,contentType:i.contentType,bytes:l})}e.events&&s?.eventsBytes&&o.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),e.timeline&&s?.timelineBytes&&o.push({url:e.timeline.putUrl,contentType:e.timeline.contentType,bytes:s.timelineBytes}),e.flowVideo&&s?.videoBytes&&o.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:s.videoBytes}),e.storage&&s?.storageBytes&&o.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:s.storageBytes}),e.failureBundle&&s?.failureBundleBytes&&o.push({url:e.failureBundle.putUrl,contentType:e.failureBundle.contentType,bytes:s.failureBundleBytes});for(let i of e.snapshots??[]){let l=s?.snapshotBytes?.get(i.id);l&&o.push({url:i.putUrl,contentType:i.contentType,bytes:l})}return o}function ht(e){return e.replace(/\/+$/,"")}var W=class extends Error{constructor(r,s,o,i=""){super(r);this.status=s;this.phase=o;this.responseText=i;this.name="PresignedUploadError"}};async function De(e){let t=ht(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-contrast-admin-upload-bypass"]=e.adminBypassToken);let s=ce(3e4,"init"),o;try{o=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:s.signal})}finally{s.cancel()}if(!o.ok){let T=await o.text().catch(()=>"");throw new W(`init failed: ${o.status} ${T.slice(0,200)}`,o.status,"init",T)}let i=await o.json(),l=gt(i,e.bundleBytes,e.filesByHash,e.extras);await mt(l,e.concurrency??8,e.onPutProgress);let f=ce(3e4,"finalize"),c;try{c=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:i.token}),signal:f.signal})}finally{f.cancel()}if(!c.ok){let T=await c.text().catch(()=>"");throw new W(`finalize failed: ${c.status} ${T.slice(0,200)}`,c.status,"finalize",T)}let h=await c.json();return{init:i,finalize:h}}function yt(e){return e!==null&&typeof e=="object"?e:null}function He(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function de(e){let t=yt(e);return t?t.schemaVersion===1&&He(t.t)!==void 0&&He(t.seq)!==void 0&&typeof t.context=="string"&&typeof t.kind=="string"&&"data"in t:!1}function bt(e,t){let r=[];for(let s of e.split(`
|
|
5
5
|
`)){let o=s.trim();if(o)try{let i=JSON.parse(o);t(i)&&r.push(i)}catch{}}return r}function je(e){return bt(e,de)}import{execSync as wt}from"child_process";function fe(e){try{return wt(e,{stdio:["ignore","pipe","ignore"],timeout:3e3,encoding:"utf8"}).trim()||null}catch{return null}}function pe(e){let t=e?.trim();return!t||!/^\d+$/.test(t)?null:Number(t)}function Mt(){let e=fe("git remote get-url origin");if(!e)return null;let t=e.match(/github\.com[/:]([^/\s]+)\/([^/\s]+?)(?:\.git)?\/?$/i);return t?{owner:t[1],repo:t[2]}:null}function me(){let e=process.env.GITHUB_ACTIONS==="true",t=process.env.CONTRAST_BRANCH?.trim()||null,r=process.env.CONTRAST_SHA?.trim()||null,s=process.env.CONTRAST_PR_TITLE?.trim()||null,o=(process.env.CONTRAST_REPO||process.env.GITHUB_REPOSITORY||"").trim(),[i,l]=o.includes("/")?o.split("/",2):[null,null];if(e){let h=process.env.GITHUB_REF?.match(/^refs\/pull\/(\d+)\//)?.[1];return{owner:i,repo:l,branch:t||process.env.GITHUB_HEAD_REF?.trim()||process.env.GITHUB_REF_NAME?.trim()||null,commitSha:r||process.env.GITHUB_SHA?.trim()||null,githubUsername:process.env.GITHUB_ACTOR?.trim()||null,pullRequestNumber:pe(process.env.CONTRAST_PR_NUMBER)??pe(h),pullRequestTitle:s,githubRunId:process.env.GITHUB_RUN_ID?.trim()||null,source:"ci"}}let f=t??fe("git rev-parse --abbrev-ref HEAD"),c=i?null:Mt();return{owner:i??c?.owner??null,repo:l??c?.repo??null,branch:f==="HEAD"?null:f,commitSha:r??fe("git rev-parse HEAD"),githubUsername:null,pullRequestNumber:pe(process.env.CONTRAST_PR_NUMBER),pullRequestTitle:s,githubRunId:null,source:"cli"}}function Qt(e){if(e.length===0)return{stepCount:null,failedStepIndex:null};let t=e.find(r=>r.status==="failure");return{stepCount:e.length,failedStepIndex:t?t.stepIndex:null}}function Xt(e){return e.auth?e.uploadedShare?!0:e.auth.kind==="github"||process.env.GITHUB_ACTIONS==="true":!1}async function Zt(e){let t=e.auth??K();if(!t)return null;let r=me(),s=e.owner??(t.kind==="github"?t.owner:null)??r.owner,o=e.repo??(t.kind==="github"?t.repo:null)??r.repo;try{let i=await fetch(`${e.origin.replace(/\/$/,"")}/api/sootsim/test-runs`,{method:"POST",headers:{"content-type":"application/json",authorization:V(t)},body:JSON.stringify({kind:e.kind,source:r.source,name:e.name??void 0,prompt:e.prompt??void 0,summary:e.summary??void 0,status:e.status,failureMessage:e.failureMessage??void 0,previewShareId:e.previewShareId??void 0,owner:s??void 0,repo:o??void 0,branch:r.branch??void 0,commitSha:r.commitSha??void 0,githubUsername:r.githubUsername??void 0,pullRequestNumber:r.pullRequestNumber??void 0,githubRunId:r.githubRunId??void 0,stepCount:e.stepCount??void 0,failedStepIndex:e.failedStepIndex??void 0,durationMs:e.durationMs??void 0,flowYamlSizeBytes:e.flowYamlSizeBytes??void 0})});if(!i.ok){let f=await i.text().catch(()=>"");return console.warn(` warn: run registration failed: /api/sootsim/test-runs ${i.status}${f?`: ${f.slice(0,200)}`:""}`),null}let l=await i.json();return l.run?.id?{id:l.run.id,previewUrl:l.run.previewUrl??null,traceUrl:l.run.traceUrl??null}:(console.warn(" warn: run registration returned no id"),null)}catch(i){return console.warn(` warn: run registration failed: ${i instanceof Error?i.message:String(i)}`),null}}function Rt(e){if(!e)return null;try{let t=JSON.parse(e);return typeof t.message=="string"&&t.message?t.message:null}catch{return null}}function kt(e){let t=JSON.parse(M(e,"utf8"));if(!Array.isArray(t))throw new Error("snapshot manifest must be an array");let r=new Set;return t.map((s,o)=>{if(s===null||typeof s!="object")throw new Error(`snapshot manifest entry ${o} must be an object`);let i=Reflect.get(s,"id"),l=Reflect.get(s,"label"),f=Reflect.get(s,"path"),c=Reflect.get(s,"t");if(typeof i!="string"||!i||r.has(i))throw new Error(`snapshot manifest entry ${o} has an invalid or duplicate id`);if(typeof f!="string"||!f)throw new Error(`snapshot manifest entry ${o} has no PNG path`);if(typeof c!="number"||!Number.isFinite(c)||c<0)throw new Error(`snapshot manifest entry ${o} has an invalid capture time`);r.add(i);let h=M(f);return{meta:{id:i,label:typeof l=="string"&&l?l:i,kind:"interaction",t:Math.round(c),contentType:"image/png",sizeBytes:h.byteLength},bytes:h}})}var We=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://contrast.dev",Ye=process.env.SOOTSIM_PREVIEW_ORIGIN||Ae.origin,ye="https://contrast.localhost:3000",Et=2e3;async function Bt(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let t=await fetch(`${ye}/api/preview/upload/init`,{method:"OPTIONS",signal:AbortSignal.timeout(Et)});if(t.ok||t.status===204||t.status===405)return ye}catch{}return We}function C(e){return e.replace(/\/$/,"")}function It(e){try{let r=new URL(e).hostname.replace(/^\[|\]$/g,"").toLowerCase();return r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r)}catch{return!1}}function At(e){try{let t=new URL(e).hostname.toLowerCase();return t==="contrast.dev"||t.endsWith(".contrast.dev")}catch{return!1}}function Ut(e,t){return t?C(t):process.env.SOOTSIM_PREVIEW_ORIGIN?C(process.env.SOOTSIM_PREVIEW_ORIGIN):It(e)?C(e):At(e)?C(Ye):C(e)}function _t(){console.log(`
|
|
6
6
|
rnxsim record upload \u2014 publish the current recorded bundle as a /preview/<id> link
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.317 | (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 p}from"./chunk-
|
|
4
|
+
import{e as p}from"./chunk-ADAIY3DX.js";import{a as c,b as l}from"./chunk-OWADERTW.js";import{a}from"./chunk-W4YHMJOO.js";async function g(e,i){if(i)return i.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let r=a();return r?.origin?r.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function x(e,i={}){let r=c();if(r||(process.stderr.write(`
|
|
5
5
|
rnx ${e} needs auth before it can check recording access.
|
|
6
6
|
|
|
7
7
|
pick one:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.317 | (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{randomUUID as R}from"node:crypto";import r from"node:fs";import{homedir as O}from"node:os";import o from"node:path";var j="SOOTSIM_HOME",N="active",E="daemon.json",_="dev-bridges",w="config.json",b=3e4;function s(){let e=process.env[j];return e&&e.length>0?o.resolve(e):o.join(O(),".sootsim")}function F(){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 r.realpathSync(t).includes(`${o.sep}packages${o.sep}sootsim${o.sep}`)}catch{return!1}}function I(){return process.env.SOOTSIM_FORCE_DAEMON_INSTALL==="1"?!1:process.env.IS_TAMAGUI_DEV==="1"}function Y(){return F()||I()}function d(){return o.join(s(),"runtimes")}function B(e){return o.join(d(),e)}function h(){return o.join(d(),N)}function v(){return o.join(s(),"electron")}function q(){return o.join(v(),"userData")}function z(e){return o.join(v(),e)}function $(){return o.join(s(),"profiles")}function Q(){return o.join(s(),"camera-fixtures")}function C(){return o.join(s(),"daemon-app")}function M(){return o.join(C(),"SootSim Daemon.app")}function Z(){return o.join(M(),"Contents","MacOS","sootsim-daemon")}function T(){return o.join(s(),"cache")}function a(){return o.join(s(),E)}function f(){return o.join(s(),_)}function D(e){if(!Number.isInteger(e)||e<=0)throw new Error(`invalid development bridge port: ${e}`);return o.join(f(),`${e}.json`)}function y(){return o.join(s(),w)}function S(){try{let e=r.readFileSync(y(),"utf8"),t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function x(e){m();let t=S(),n={...t,...e};e.settings&&typeof e.settings=="object"&&(n.settings={...t.settings&&typeof t.settings=="object"?t.settings:{},...e.settings});let c=`${y()}.tmp`;return r.writeFileSync(c,`${JSON.stringify(n,null,2)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.317 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{b as $}from"./chunk-
|
|
4
|
+
import{b as $}from"./chunk-7Q7IQ2SS.js";import{b as y,c as R,d as m,e as w,f as a}from"./chunk-VB2ZZ4JI.js";import{n as x}from"./chunk-A3GVXVSG.js";import{I as g,J as u,K as d,Q as h,l as p}from"./chunk-ATOUAYJP.js";import O from"fs";import{WebSocket as E}from"ws";function C(t){if(!t||typeof t!="object")return!1;let e=Reflect.get(t,"sections");return typeof Reflect.get(t,"title")=="string"&&Array.isArray(e)&&e.every(s=>s&&typeof s=="object"&&typeof Reflect.get(s,"title")=="string"&&Array.isArray(Reflect.get(s,"items"))&&Reflect.get(s,"items").every(n=>n&&typeof n=="object"&&typeof Reflect.get(n,"summary")=="string"&&typeof Reflect.get(n,"hash")=="string"))}async function b(t,e=fetch){try{let s=new URL(w);s.searchParams.set("version",t);let n=await e(s,{headers:{accept:"application/json"},signal:AbortSignal.timeout(5e3)});if(!n.ok)return null;let o=await n.json();if(!o||typeof o!="object")return null;let i=Reflect.get(o,"entries");return!Array.isArray(i)||!C(i[0])?null:i[0]}catch{return null}}function A(t,e){let s=[`what's new in rnx engine v${t}:`];if(!e||e.sections.length===0)s.push(" release notes are not available yet");else for(let n of e.sections){s.push(` ${n.title}:`);for(let o of n.items)s.push(` \u2022 ${o.summary}`)}return s.push(` full changelog: ${m}`),s.join(`
|
|
5
5
|
`)}async function Q(t,e={}){let[s,...n]=t;if(!s||s==="--help"||s==="-h"){S();return}switch(s){case"install":return L(n,e);case"list":case"ls":return j(n);case"use":return T(n);case"remove":case"rm":return D(n);case"which":case"active":return G();case"notes":case"changelog":return U(n);default:console.error(` unknown runtime subcommand: ${s}`),S(),process.exit(1)}}function S(){console.log(`
|
|
6
6
|
rnxsim runtime \u2014 manage engine runtimes under ~/.sootsim/runtimes/
|
|
7
7
|
|
|
@@ -27,4 +27,4 @@ examples:
|
|
|
27
27
|
rnxsim runtime install --channel beta
|
|
28
28
|
rnxsim runtime use 1.2.3
|
|
29
29
|
rnxsim runtime notes
|
|
30
|
-
`)}async function L(t,e){let{version:s,flags:n}=F(t),o=n.channel??e.channel??"stable",i=n.force===!0,l=n.setActive!==!1;g(),console.log("rnxsim runtime install"),console.log(` cdn: ${a.resolveCdnOrigin()}`);try{let r=await a.install({version:s,channel:o,force:i,setActive:l,protectVersions:h()});return console.log(` version: ${r.version} (channel: ${r.channel})`),r.installed?console.log(` installed ${r.version}`):console.log(` already installed at ${r.runtimeDir}`),l&&await k(r.version),r}catch(r){console.error(` ${I(r)}`),process.exit(1)}}async function k(t){d(t),console.log(` active: ${t}`),await _(t)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${t})`)}async function _(t){let{isDaemonLockfileFresh:e,readDaemonLockfile:s}=await import("./home-paths-
|
|
30
|
+
`)}async function L(t,e){let{version:s,flags:n}=F(t),o=n.channel??e.channel??"stable",i=n.force===!0,l=n.setActive!==!1;g(),console.log("rnxsim runtime install"),console.log(` cdn: ${a.resolveCdnOrigin()}`);try{let r=await a.install({version:s,channel:o,force:i,setActive:l,protectVersions:h()});return console.log(` version: ${r.version} (channel: ${r.channel})`),r.installed?console.log(` installed ${r.version}`):console.log(` already installed at ${r.runtimeDir}`),l&&await k(r.version),r}catch(r){console.error(` ${I(r)}`),process.exit(1)}}async function k(t){d(t),console.log(` active: ${t}`),await _(t)||console.log(` (no daemon running \u2014 next sootsim/electron launch will pick up ${t})`)}async function _(t){let{isDaemonLockfileFresh:e,readDaemonLockfile:s}=await import("./home-paths-TKPTU62O.js"),n=s();if(!e(n))return!1;let o=x();return new Promise(i=>{let l=!1,r=!1,f=N=>{l||(l=!0,i(N))},c=new E(`ws://127.0.0.1:${o}`,{handshakeTimeout:800}),v=setTimeout(()=>{try{c.close()}catch{}f(r)},1500);c.on("open",()=>{try{c.send(JSON.stringify({type:"runtime:use",version:t,id:0})),r=!0}catch{}setTimeout(()=>{try{c.close()}catch{}},100)}),c.on("close",()=>{clearTimeout(v),f(r)}),c.on("error",()=>{clearTimeout(v),f(!1)})})}async function j(t){g();let e=a.listInstalled(),s=u();if(console.log("installed:"),e.length===0)console.log(" (none)");else for(let n of e)console.log(` ${n===s?"*":" "} ${n}`);try{let n=await a.fetchManifest();console.log("available (latest per channel):");for(let[i,l]of Object.entries(n.channels))console.log(` ${i.padEnd(8)} ${l.latest}`);let o=Object.keys(n.versions).sort(y).reverse();if(o.length>1){console.log("hosted versions:");for(let i of o)console.log(` ${i}`)}}catch(n){console.log(`available: (could not fetch manifest: ${I(n)})`)}}async function T(t){let e=t[0];e||(console.error(" usage: rnxsim runtime use <version>"),process.exit(1));let s=a.listInstalled();s.includes(e)||(console.error(` version ${e} is not installed`),console.error(` installed: ${s.join(", ")||"(none)"}`),console.error(` run \`rnxsim runtime install ${e}\` first`),process.exit(1)),await k(e)}async function D(t){let e=t[0];e||(console.error(" usage: rnxsim runtime remove <version>"),process.exit(1)),u()===e&&(console.error(` cannot remove active runtime ${e}`),console.error(" switch with `rnxsim runtime use <other>` first, or install another version"),process.exit(1)),h().includes(e)&&(console.error(` cannot remove runtime ${e} while a project is using it`),process.exit(1));let n=p(e);if(!O.existsSync(n)){console.error(` ${e} is not installed`);return}O.rmSync(n,{recursive:!0,force:!0}),console.log(` removed ${e}`)}async function G(){let t=u();if(!t){console.log(" no active runtime");return}console.log(t)}async function U(t){t.length>0&&(console.error(" usage: rnxsim runtime notes"),process.exit(1));let{config:e}=await $(),s=e?.runtimeVersion??u();if(!s){console.log(" no active runtime"),console.log(` release notes: ${m}`);return}console.log(A(s,await b(s)))}function F(t){let e={},s=[];for(let n=0;n<t.length;n++){let o=t[n];if(o==="--channel"&&n+1<t.length){e.channel=t[n+1],n++;continue}if(o.startsWith("--channel=")){e.channel=o.slice(10);continue}if(o==="--force"){e.force=!0;continue}if(o==="--set-active=false"||o==="--no-set-active"){e.setActive=!1;continue}s.push(o)}return{version:s[0]??null,flags:e}}function I(t){return t instanceof Error?t.message:String(t)}export{b as a,A as b,Q as c};
|