sootsim 0.1.45 → 0.1.46
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/dist-cli/bin.js +3 -3
- package/dist-cli/chunks/{agent-NSVMKP3P.js → agent-4SFE3DNP.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-HREUS3JR.js → agent-wrapper-BCXD55HW.js} +2 -2
- package/dist-cli/chunks/{assert-N7KX2APG.js → assert-ILRVN6CB.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-A4ML6QTW.js +2 -0
- package/dist-cli/chunks/beta-34TOAZFI.js +2 -0
- package/dist-cli/chunks/{chunk-AFBOAQAV.js → chunk-4OPZYTVB.js} +1 -1
- package/dist-cli/chunks/{chunk-QJMUNN2V.js → chunk-7CZ5VL7E.js} +1 -1
- package/dist-cli/chunks/{chunk-EHJMKPJP.js → chunk-BVXZZOBA.js} +2 -2
- package/dist-cli/chunks/{chunk-N4KSVDAU.js → chunk-DGAHFMAU.js} +2 -2
- package/dist-cli/chunks/{chunk-HZ5W4PIP.js → chunk-FCFKR7EM.js} +4 -4
- package/dist-cli/chunks/{chunk-2V4ALWOZ.js → chunk-FLJAN5PS.js} +2 -2
- package/dist-cli/chunks/{chunk-2WW7WJHA.js → chunk-GWOV6KFE.js} +1 -1
- package/dist-cli/chunks/{chunk-PPY2OTIR.js → chunk-H46ZLTT5.js} +1 -1
- package/dist-cli/chunks/{chunk-FNXGAYHN.js → chunk-K3I6VLF3.js} +1 -1
- package/dist-cli/chunks/{chunk-CBMFBTB3.js → chunk-KETYRULQ.js} +2 -2
- package/dist-cli/chunks/chunk-KV7XS7WL.js +1 -0
- package/dist-cli/chunks/{chunk-PNEIZ2DY.js → chunk-M5HZVUQQ.js} +1 -1
- package/dist-cli/chunks/{chunk-WUZSBXWF.js → chunk-MDSET24U.js} +2 -2
- package/dist-cli/chunks/chunk-MGEB3WEI.js +117 -0
- package/dist-cli/chunks/{chunk-QAL3T64I.js → chunk-MJD6C3BG.js} +2 -2
- package/dist-cli/chunks/{chunk-HNOQEJK3.js → chunk-N7DDQ5ZB.js} +2 -2
- package/dist-cli/chunks/{chunk-4RG3RPXB.js → chunk-OHI4DJSD.js} +1 -1
- package/dist-cli/chunks/{chunk-CFY2ELQ4.js → chunk-OMPAUB4V.js} +3 -3
- package/dist-cli/chunks/{chunk-ECI22OZU.js → chunk-OZICEBUA.js} +2 -2
- package/dist-cli/chunks/{chunk-CPCM75G3.js → chunk-PAOOYAVI.js} +2 -2
- package/dist-cli/chunks/{chunk-CVMSXDFO.js → chunk-PEXPACO5.js} +1 -1
- package/dist-cli/chunks/{chunk-3K4GAAOE.js → chunk-PG6FUKZX.js} +2 -2
- package/dist-cli/chunks/{chunk-WI72PADL.js → chunk-PKVNCXQD.js} +2 -2
- package/dist-cli/chunks/{chunk-65Q34YMN.js → chunk-PRRVFNFG.js} +2 -2
- package/dist-cli/chunks/{chunk-JKG66FDZ.js → chunk-QXJR74QV.js} +1 -1
- package/dist-cli/chunks/chunk-RSMU24BE.js +1 -0
- package/dist-cli/chunks/{chunk-25K4SXL3.js → chunk-S4OSFQIC.js} +2 -2
- package/dist-cli/chunks/{chunk-FGLQTXGF.js → chunk-SG7ICXM2.js} +3 -3
- package/dist-cli/chunks/chunk-T4H37KU7.js +2 -0
- package/dist-cli/chunks/chunk-UH5PKJXT.js +1 -0
- package/dist-cli/chunks/chunk-VWJ4O366.js +1 -0
- package/dist-cli/chunks/{chunk-ZSDPMO6R.js → chunk-W52DGZNV.js} +1 -1
- package/dist-cli/chunks/{chunk-VLWCOUVW.js → chunk-WD36PEEJ.js} +2 -2
- package/dist-cli/chunks/{chunk-R2VBXQYS.js → chunk-WRNSX5RR.js} +2 -2
- package/dist-cli/chunks/{chunk-ZR2EL6AG.js → chunk-WWEMLI77.js} +1 -1
- package/dist-cli/chunks/{chunk-TIE6ENCX.js → chunk-X7P3CGPY.js} +3 -3
- package/dist-cli/chunks/{chunk-YU2F5Y7A.js → chunk-XKNZR4BB.js} +2 -2
- package/dist-cli/chunks/{chunk-OSFZQ7NV.js → chunk-XSJ4SU63.js} +31 -31
- package/dist-cli/chunks/{chunk-T3PYVAO7.js → chunk-XT36ZR2H.js} +1 -1
- package/dist-cli/chunks/{chunk-BARR77SV.js → chunk-XU27QCRX.js} +1 -1
- package/dist-cli/chunks/{chunk-KJLLZQJO.js → chunk-YZ7BSNJJ.js} +2 -2
- package/dist-cli/chunks/{chunk-BVLKRIBN.js → chunk-Z6BJVYOU.js} +1 -1
- package/dist-cli/chunks/{chunk-FBKOSZKD.js → chunk-Z7J6LG53.js} +2 -2
- package/dist-cli/chunks/chunk-ZM4JL3VP.js +11 -0
- package/dist-cli/chunks/{compat-WZHG6K4B.js → compat-IC7P6QWF.js} +3 -3
- package/dist-cli/chunks/{config-E4ENAYVL.js → config-WVL2Y7UU.js} +2 -2
- package/dist-cli/chunks/control-7VDRDQXQ.js +2 -0
- package/dist-cli/chunks/{cpu-profile-5VX6YXR5.js → cpu-profile-FJIMZKXF.js} +2 -2
- package/dist-cli/chunks/{daemon-L4IR5GKS.js → daemon-TH7B22C4.js} +2 -2
- package/dist-cli/chunks/{debug-RPLWF66R.js → debug-MN6RXRJO.js} +3 -3
- package/dist-cli/chunks/demo-app-registry-ISNBFJTI.js +2 -0
- package/dist-cli/chunks/{detox-F4I7XDUZ.js → detox-BUJ3IOIB.js} +2 -2
- package/dist-cli/chunks/{device-DAHI737I.js → device-MUCGW2TT.js} +2 -2
- package/dist-cli/chunks/{diagnose-YR7GNYPN.js → diagnose-5NADXMRL.js} +2 -2
- package/dist-cli/chunks/drivers-RXVSKXUD.js +2 -0
- package/dist-cli/chunks/{electron-GC7AQHGS.js → electron-ON6434HQ.js} +3 -3
- package/dist-cli/chunks/flow-WI5MN76X.js +2 -0
- package/dist-cli/chunks/{hints-FPPTZ5A4.js → hints-23C3BW62.js} +2 -2
- package/dist-cli/chunks/{home-paths-6KKZMFRE.js → home-paths-DAI3XZLG.js} +2 -2
- package/dist-cli/chunks/{inspect-RDGBV7FC.js → inspect-UVS4UIJF.js} +91 -91
- package/dist-cli/chunks/install-QKH2JQGE.js +2 -0
- package/dist-cli/chunks/{install-desktop-NVXLOF4C.js → install-desktop-6BT3VL2C.js} +3 -3
- package/dist-cli/chunks/{keys-WUPEDL27.js → keys-4OT37H4C.js} +2 -2
- package/dist-cli/chunks/{launch-KIVZVX45.js → launch-2C3YGABQ.js} +3 -3
- package/dist-cli/chunks/{login-6VWSRHCZ.js → login-NWY5ENAT.js} +4 -4
- package/dist-cli/chunks/{logout-JASQH22U.js → logout-6BHGSVMN.js} +2 -2
- package/dist-cli/chunks/{maestro-UINOO5ZB.js → maestro-V7WIYUNE.js} +2 -2
- package/dist-cli/chunks/{preview-7QA7XGF4.js → preview-H2ACZ26A.js} +2 -2
- package/dist-cli/chunks/{profile-L43GQNI7.js → profile-ZLDFCIZA.js} +2 -2
- package/dist-cli/chunks/{react-4WDCAK7S.js → react-PEM4I7YB.js} +2 -2
- package/dist-cli/chunks/{record-VJGGKQBY.js → record-KVBDN3GC.js} +8 -7
- package/dist-cli/chunks/runtime-LLWAHSVR.js +2 -0
- package/dist-cli/chunks/{runtime-delivery-XQBDABU4.js → runtime-delivery-ECDTRILR.js} +2 -2
- package/dist-cli/chunks/{screenshot-N67LQOUY.js → screenshot-PJEMMFQO.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-EWTPX4XH.js → screenshot-mode-DKPHJONC.js} +2 -2
- package/dist-cli/chunks/{screenshots-WY27EWBW.js → screenshots-5UQ36N7Q.js} +2 -2
- package/dist-cli/chunks/{server-57MUO65L.js → server-LADTO7OS.js} +2 -2
- package/dist-cli/chunks/setup-repo-TXI7Q6F6.js +2 -0
- package/dist-cli/chunks/{skills-TDFRPGQ2.js → skills-FUN6M66H.js} +2 -2
- package/dist-cli/chunks/{start-TNY3DBAJ.js → start-A6FDAXGU.js} +4 -4
- package/dist-cli/chunks/store-KTDAA7SP.js +2 -0
- package/dist-cli/chunks/telemetry-VPFS3BGR.js +2 -0
- package/dist-cli/chunks/{test-N4RCDGFL.js → test-HPXQTADO.js} +3 -3
- package/dist-cli/chunks/{three-mode-YWFPU7KR.js → three-mode-2APCW2N7.js} +2 -2
- package/dist-cli/chunks/{timeline-OAZXNDFK.js → timeline-6D6V6LRX.js} +2 -2
- package/dist-cli/chunks/{upgrade-QUS553XV.js → upgrade-KZIO3ZJH.js} +2 -2
- package/dist-cli/chunks/upload-LDL3FZKD.js +2 -0
- package/dist-cli/chunks/{web-UR3EWC7V.js → web-MR4EQWCC.js} +2 -2
- package/dist-cli/chunks/{what-happened-6UNRX4BP.js → what-happened-FHQD42JV.js} +2 -2
- package/dist-cli/chunks/{whoami-I5VW66LS.js → whoami-GHNFMMK4.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.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/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.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/index.cjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/vite-base.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/auto-bootstrap-YCOWYMVV.js +0 -2
- package/dist-cli/chunks/beta-UF2ITPYH.js +0 -2
- package/dist-cli/chunks/chunk-5IJS7CFG.js +0 -117
- package/dist-cli/chunks/chunk-72GGPCB2.js +0 -2
- package/dist-cli/chunks/chunk-7VSW2XVU.js +0 -1
- package/dist-cli/chunks/chunk-A5EZYWAO.js +0 -1
- package/dist-cli/chunks/chunk-LRE73CBG.js +0 -1
- package/dist-cli/chunks/chunk-MDT2KSFY.js +0 -11
- package/dist-cli/chunks/chunk-PLTKWJ7M.js +0 -1
- package/dist-cli/chunks/control-USODFZCF.js +0 -2
- package/dist-cli/chunks/demo-app-registry-3SDEOEC4.js +0 -2
- package/dist-cli/chunks/drivers-FYOQW4OZ.js +0 -2
- package/dist-cli/chunks/flow-65752NAO.js +0 -2
- package/dist-cli/chunks/install-PA5K5XJ6.js +0 -2
- package/dist-cli/chunks/runtime-JM4WL6FX.js +0 -2
- package/dist-cli/chunks/setup-repo-6PKR67R6.js +0 -2
- package/dist-cli/chunks/store-LMNSJWN7.js +0 -2
- package/dist-cli/chunks/telemetry-7TOFRDK5.js +0 -2
- package/dist-cli/chunks/upload-OT5RQ4QV.js +0 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as D,b as j,c as re}from"./chunk-OHI4DJSD.js";import{b as L}from"./chunk-PEXPACO5.js";import{g as ie}from"./chunk-FCFKR7EM.js";import{a as k,b as W}from"./chunk-XU27QCRX.js";import{c as se}from"./chunk-XKNZR4BB.js";import{d as oe}from"./chunk-4OPZYTVB.js";import{a as Z}from"./chunk-T4H37KU7.js";import{b as ne,c as x,d as y,e as P}from"./chunk-DGAHFMAU.js";import{c as I,d as g,e as E}from"./chunk-WWEMLI77.js";import{E as ee,F as te}from"./chunk-M5HZVUQQ.js";import xe from"node:fs";import Pe from"node:os";import Q from"node:path";function he(t){return t.replace(/^\[|\]$/g,"").toLowerCase()}function A(t){let o=he(t);return o==="localhost"||o.endsWith(".localhost")||o==="0.0.0.0"||o==="::1"||/^127(?:\.\d{1,3}){3}$/.test(o)}function ae(t){return new Error(`could not resolve a native bundle for ${t}. pass an explicit bundle URL or open Connect and choose the app there.`)}function we(t,o){return t?.includes("/one/metro-entry.bundle")?"one":typeof o=="string"&&o?"expo":"unknown"}function le(t,o,e){return`${t}//${o}:${e}`}function be(t){if(typeof window>"u")return!1;try{let o=new URL(t);return A(o.hostname)&&A(window.location.hostname)&&o.origin!==window.location.origin}catch{return!1}}async function ce(t,o){let e={...o,cache:o?.cache??"no-store"};return be(t)?fetch(`/__fetch-proxy?url=${encodeURIComponent(t)}`,e):fetch(t,e)}function ye(t){return t==="https:"?443:80}function Se(t){let o=t.pathname||"/";return(o==="/"||o==="")&&!t.search&&!t.hash}async function me(t,o){let e=t.replace(/\/+$/,"");try{let n=await ce(`${e}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),i=r?.extra?.expoClient||r?.extra||{},s=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(s||i.name)return{bundleUrl:re(s||`${e}${j}`),port:o,framework:we(s,i.sdkVersion),projectName:i.name}}}catch{}try{let n=await ce(`${e}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${e}${j}`,port:o,framework:"metro"}}catch{}return null}async function $e(t){return me(le("http:","localhost",t),t)}async function G(t){let o=t.trim();if(/^\d+$/.test(o)){let a=parseInt(o,10),l=await $e(a);if(l)return l;throw ae(`localhost:${a}`)}let e=o.startsWith("http")?o:`http://${o}`,n;try{n=new URL(e)}catch{throw new Error(`could not parse "${t}". pass a dev-server port, a dev-server base URL, or a full bundle URL.`)}let r=n.protocol||"http:",i=n.port?parseInt(n.port,10):ye(r),s=le(r,n.hostname,i);if(A(n.hostname)&&Se(n)){let a=await me(s,i);if(a)return a;throw ae(s)}return{bundleUrl:n.toString(),port:i,framework:"unknown"}}function We(){console.error(" no sootsim desktop companion found."),console.error(""),console.error(" install the desktop app:"),console.error(" sootsim install-desktop"),console.error(""),console.error(" or wire sootsim into your own project so your dev server hosts the bridge:"),console.error(" sootsim setup-repo"),console.error("")}function de(t){let o=k();if(console.log(` note: no sootsim bridge detected on port ${t}`),o){console.log(" launch the installed companion with:"),console.log(" sootsim electron");return}console.log(""),console.log(" to get a bridge running, either:"),console.log(" sootsim install-desktop # download the electron app"),console.log(" sootsim setup-repo # wire sootsim into your own project")}function ve(t){console.error(""),console.error(` no sim is connected to the sootsim bridge on port ${t}.`),console.error(""),console.error(" start your app dev server, then open it in sootsim:"),console.error(" npx expo start --localhost --port 8081"),console.error(" sootsim open 8081"),console.error(""),console.error(" then inspect the live app:"),console.error(" sootsim describe")}async function Ge(t,o,e){let n=[];try{n=await t.listSims()}catch{}if(console.error(""),n.length===0){ve(o);return}console.error(` no sim with id "${e}" is connected to the bridge on port ${o}.`),console.error(""),console.error(" connected sims:");for(let r of n){let i=[r.isPrimary?"primary":null,r.readyState].filter(Boolean).join(", ");console.error(` ${r.id} (${i})`)}console.error(""),console.error(" pass a valid --sim id, or run `sootsim list` to see all sessions.")}var Ce={rn:"/rn",connectrn:"/rn","connect-rn":"/rn",clock:"/app/clock","native-ui":"/app/native-ui",tamagui:"/app/tamagui",settings:"/app/settings",photos:"/app/photos",camera:"/app/camera"};function C(t){return new Promise(o=>setTimeout(o,t))}function K(t){return t.trim()}function J(t){try{let o=new URL(t),e=o.pathname.replace(/\/+$/,"")||"/";return o.searchParams.has("open")||o.searchParams.has("port")||o.searchParams.has("bundle")||o.searchParams.has("demo")||o.pathname.includes("/sootsim/index.html")||e==="/sootsim"||o.pathname==="/__soot"||o.pathname==="/__soot/"||e==="/rn"||/^\/rn\/[^/]+$/i.test(e)||/^\/app\/[^/]+$/i.test(e)||e==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(e)||/^\/__soot\/app\/[^/]+$/i.test(e)}catch{return!1}}async function lt(t){let o=K(t);return(await G(o)).bundleUrl}function V(t){let o=t.replace(/\/+$/,"")||"/";return o==="/__soot"||o.startsWith("/__soot/")?"/__soot":""}function Ie(t,o){let e=K(t),n=new URL(o),r=V(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),/^\d+$/.test(e)?n.pathname=`${r}/rn/${e}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",e)),n.toString()}function ke(t){let o=K(t);return/^\d+$/.test(o)||/^https?:\/\//i.test(o)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(o)}async function Te(t,o){let e=await G(t),n=new URL(o),r=V(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.set("bundle",e.bundleUrl),n.toString()}function Ue(t){return t.startsWith("~/")?Q.join(Pe.homedir(),t.slice(2)):Q.isAbsolute(t)?t:Q.resolve(process.cwd(),t)}function Me(t){let o={};for(let e=0;e<t.length;e++){if(t[e]!=="--replace")continue;let n=t[e+1];n||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let r=n.indexOf("=");(r<=0||r===n.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let i=n.slice(0,r).trim(),s=Ue(n.slice(r+1).trim());xe.existsSync(s)||(console.error(` sootsim open: replacement file not found: ${s}`),process.exit(1)),o[i]={file:s},e++}return Object.keys(o).length>0?{modules:o}:void 0}function pe(){let t=ee();return te(t)&&t.runtimePort>0?`http://localhost:${t.runtimePort}/`:Z}async function F(t,o=pe()){if(!t)return new URL(o).toString();if(J(t))return new URL(t).toString();let e=Ce[t.toLowerCase()];if(e){let n=new URL(o),r=V(n.pathname);return n.pathname=`${r}${e}`,n.toString()}return ke(t)?Te(t,o):Ie(t,o)}function ue(t,o){let e=t?.url||t?.origin||o;try{let n=new URL(e);return n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("inspectOpen"),n.toString()}catch{return o}}async function Be(t,o,e){let n=new URL(await F(t,o));return n.searchParams.set("inspectOpen",e),n.toString()}async function Oe(t,o,e,n={}){let r=n.attempts??30,i=n.intervalMs??500,s=n.minNodeCount??10;for(let a=0;a<r;a++){let l=y(t,{commandTimeoutMs:o,simId:e,simIdSource:"flag"});try{let c=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>s)return{bridge:l,count:c}}catch{}l.close(),await C(i)}return null}function _e(t){if(!t)return null;try{let o=new URL(t);if(o.searchParams.has("bundle")){let e=o.searchParams.get("bundle")||"";try{let n=new URL(e),r=n.pathname.length>36?`...${n.pathname.slice(-36)}`:n.pathname;return`bundle ${n.host}${r}`}catch{return"bundle"}}return o.searchParams.has("port")?`connect :${o.searchParams.get("port")||""}`:o.searchParams.has("open")?`connect ${o.searchParams.get("open")||""}`:o.searchParams.has("demo")?`demo ${o.searchParams.get("demo")||"default"}`:o.pathname.includes("/sootsim/index.html")||o.pathname==="/sootsim/"||o.pathname==="/sootsim"?"embedded sootsim":null}catch{return null}}function Re(t,o){if(t.length===0){console.log(" no sims connected");return}console.log(` connected sims (${t.length}):
|
|
3
|
+
`);for(let e of t){let n=e.lockedBy&&e.lockExpiresAt?`locked by ${e.lockedBy} (${Math.max(0,Math.round((e.lockExpiresAt-Date.now())/1e3))}s)`:"",r=[e.isPrimary?"primary":"",e.id===o?"selected":"",e.readyState,e.attachedCliCount&&e.attachedCliCount>0?"in use":"",e.userFocused?"focused":"",n].filter(Boolean);console.log(` ${e.id}${r.length?` [${r.join(", ")}]`:""}`);let i=_e(e.url);if(i&&console.log(` loaded: ${i}`),e.url?console.log(` url: ${e.url}`):e.origin&&console.log(` origin: ${e.origin}`),e.title&&console.log(` title: ${e.title}`),console.log(` connected: ${new Date(e.connectedAt).toISOString()}`),e.lastActiveAt&&e.lastActiveAt>0){let s=Math.round((Date.now()-e.lastActiveAt)/1e3),a=s<60?`${s}s ago`:s<3600?`${Math.round(s/60)}m ago`:`${Math.round(s/3600)}h ago`;console.log(` last active: ${a}`)}}}async function N(t,o,e,n={}){let r=n.attempts??30,i=n.intervalMs??500;for(let s=0;s<r;s++){let a=y(t,{commandTimeoutMs:o});try{let c=(await a.listSims()).find(e);if(c)return c}catch{}finally{a.close()}await C(i)}return null}async function Ee(t,o,e,n={}){let r=n.attempts??20,i=n.intervalMs??250;for(let s=0;s<r;s++){let a=y(t,{commandTimeoutMs:o});try{let c=(await a.listSims()).find(f=>f.id===e);if(!c||c.readyState!=="open")return!0}catch{return!0}finally{a.close()}await C(i)}return!1}function M(t,o){if(o){let r=o.trim(),i=t.find(s=>s.id===r);if(!i)throw new Error(`no sim connected with id ${r}`);return i}let e=t.find(r=>r.isPrimary&&r.readyState==="open");if(e)return e;let n=t.find(r=>r.readyState==="open");if(n)return n;throw new Error("no sim connected")}function T(t,o,e){console.log(` ${e==="current sim"?"loaded":"opened"}: ${t} [${e}]`),console.log(` current sim: ${o.id}`),console.log(JSON.stringify({simId:o.id,url:o.url},null,2))}async function U(t,o,e){if(e.includes("--no-describe"))return;let n=process.env.SOOTSIM_QUIET_TARGET_NOTICE;process.env.SOOTSIM_QUIET_TARGET_NOTICE="1";try{await Le(t,o,{stableMs:150,maxMs:400});let r=y(t,{commandTimeoutMs:3e3,simId:o,cliLabel:"open --describe",simIdSource:"flag"});try{let s=`(async () => {
|
|
4
|
+
const t = window.__sootsimTest
|
|
5
|
+
const ms = window.SootSim?.bridges?.mainShell
|
|
6
|
+
if (!t) return null
|
|
7
|
+
let shell = null
|
|
8
|
+
try { shell = ms?.getState ? await ms.getState() : null } catch {}
|
|
9
|
+
const tree = await t.dumpTree(12, ${JSON.stringify({describe:!0,verbose:!1,filter:""})})
|
|
10
|
+
return { tree, shell }
|
|
11
|
+
})()`,a=await r.send({type:"evaluate",code:s});if(!a?.tree)return;if(console.log(""),a.shell?.state){let l=[`state=${a.shell.state}`,a.shell.activeApp?`app=${a.shell.activeApp}`:null].filter(Boolean);console.log(` shell: ${l.join(" ")}`)}console.log(a.tree)}finally{r.close()}}catch{}finally{n===void 0?delete process.env.SOOTSIM_QUIET_TARGET_NOTICE:process.env.SOOTSIM_QUIET_TARGET_NOTICE=n}}async function Le(t,o,e){let n=Date.now()+e.maxMs,r="(async () => (await window.__sootsimTest?.getNodeCount?.()) || 0)()",i=y(t,{commandTimeoutMs:2e3,simId:o,simIdSource:"flag"});try{let s=-1,a=0;for(;Date.now()<n;){let l=-1;try{let c=await i.send({type:"evaluate",code:r});typeof c=="number"&&(l=c)}catch{}if(l>=0&&l===s){if(Date.now()-a>=e.stableMs)return}else s=l,a=Date.now();await C(50)}}finally{i.close()}}async function mt(t,o={}){let e=x(t,{port:o.port,commandTimeoutMs:o.timeoutMs}),n=P(e);try{let r=await n.listSims();Re(r,e.simId)}finally{n.close()}}async function dt(t,o={}){let e=x(t,{port:o.port,commandTimeoutMs:o.timeoutMs,stripBooleanFlags:["--new","--headless","--ephemeral"],stripValueFlags:["--base-url","--replace","--driver","--profile"]}),n=t.find((m,d)=>t[d-1]==="--profile"),r=t.includes("--ephemeral");n&&r&&(console.error(" sootsim open: --profile cannot be combined with --ephemeral"),process.exit(1));let i=n?se(n).id:void 0,s=!!i||r,a=t.includes("--new")||s,l=Me(t);a&&e.simIdSource==="flag"&&(console.error(" sootsim open: --new, --profile, and --ephemeral cannot be combined with --sim"),process.exit(1));let c=e.positional[0]||"",f=t.find((m,d)=>t[d-1]==="--driver")||"",h=t.includes("--headless"),S=t.find((m,d)=>t[d-1]==="--base-url")||pe(),B=t.includes("--base-url"),$=I();if(!a&&(e.simIdSource==="flag"||e.simIdSource==="saved"&&!!$)){let m=P(e),d=e.simId?` --sim ${e.simId}`:"",u=!1;try{let p=null;try{let b=await m.listSims();if(e.simIdSource==="saved"?(p=b.find(v=>v.id===$&&v.readyState==="open")??null,p||E()):p=M(b,e.simId),!p)if(e.simIdSource==="saved")u=!0;else throw new Error("no sim connected");if(!u&&p){let v=B||J(c)?S:ue(p,S),R=await F(c,D(v,l));m.send({type:"evaluate",simId:p.id,code:`window.location.href = ${JSON.stringify(R)}`}).catch(()=>{})}}catch(b){console.error(` open failed: ${b instanceof Error?b.message:String(b)}`),await L(m,{errorsCommand:`sootsim get errors 5${d}`,warningsCommand:`sootsim get warnings 5${d}`,requestsCommand:`sootsim get requests 5${d}`}),process.exit(1)}if(!u&&p){await C(1500);let b=await Oe(e.wsPort,e.commandTimeoutMs,p.id);b||(console.error(" timed out waiting for current sim to load target"),process.exit(1)),b.bridge.close(),g(p.id);let v=B||J(c)?S:ue(p,S),R=await F(c,D(v,l));T(R,{...p,url:R},"current sim"),await U(e.wsPort,p.id,t);return}}finally{m.close()}}let X=D(S,l),ge=await F(c,X),Y=`cli-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,w=await Be(c,X,Y),H={newWindow:!0},O=m=>m.url?.includes(`inspectOpen=${Y}`)??!1;if(f){let m=ie(f);m||(console.error(` unknown driver "${f}" \u2014 run \`sootsim list --drivers\``),process.exit(1));let d=await m.launch({url:w,headless:h,newWindow:H.newWindow,profileId:i,ephemeralProfile:r});d.launched||(console.error(` ${m.name} driver: ${d.message}`),process.exit(1));let u=await N(e.wsPort,e.commandTimeoutMs,O,{attempts:60,intervalMs:500});u||(console.error(" timed out waiting for opened sim to connect"),process.exit(1)),g(u.id),T(w,u,`${m.name} driver`),await U(e.wsPort,u.id,t);return}if(s){let m=k();m||(console.error(" profiles require electron or playwright; install the desktop companion or use `--driver playwright`"),process.exit(1));try{(await W(w,m,{profileId:i,ephemeralProfile:r})).launched||(console.error(" desktop companion failed to start"),process.exit(1))}catch(u){console.error(` desktop companion failed: ${u instanceof Error?u.message:String(u)}`),process.exit(1)}let d=await N(e.wsPort,e.commandTimeoutMs,O,{attempts:40,intervalMs:500});d||(console.error(" timed out waiting for profiled sim to connect"),process.exit(1)),g(d.id),T(w,d,"desktop companion"),await U(e.wsPort,d.id,t);return}let z=!1,q=!1;try{let m=y(e.wsPort,{commandTimeoutMs:2e3});try{await m.listSims(),z=!0}finally{m.close()}}catch{}if(z)try{let m=y(e.wsPort,{commandTimeoutMs:3e3});try{await m.openUrl(w,H),q=!0}finally{m.close()}}catch{}if(!q){let m=k();if(m)try{if((await W(w,m)).launched){let u=await N(e.wsPort,e.commandTimeoutMs,O,{attempts:20,intervalMs:500});if(u){g(u.id),T(w,u,"desktop companion"),await U(e.wsPort,u.id,t);return}}}catch{}if(await oe(w,H),!z){console.log(` opened: ${ge}`),de(e.wsPort);return}}let _=await N(e.wsPort,e.commandTimeoutMs,O,{attempts:30,intervalMs:500});_||(console.error(" timed out waiting for opened sim to connect"),process.exit(1)),g(_.id),T(w,_,q?"bridge":"direct shell open"),await U(e.wsPort,_.id,t)}async function fe(t,o={}){let e=x(t,{port:o.port,commandTimeoutMs:o.timeoutMs}),n=P(e),r=e.simId?` --sim ${e.simId}`:"";try{try{let i=await n.listSims(),s=M(i,e.positional[0]||e.simId);await n.focusSim(s.id),g(s.id),console.log(` using: ${s.id}`)}catch(i){console.error(` use failed: ${i instanceof Error?i.message:String(i)}`),await L(n,{errorsCommand:`sootsim get errors 5${r}`,warningsCommand:`sootsim get warnings 5${r}`,requestsCommand:`sootsim get requests 5${r}`}),process.exit(1)}}finally{n.close()}}async function ut(t,o={}){await fe(t,o)}async function pt(t,o={}){await fe(t,o)}async function ft(t,o={}){let e=x(t,{port:o.port,commandTimeoutMs:o.timeoutMs,stripBooleanFlags:["--force"]}),n=t.includes("--force"),r=P(e);try{try{let i=await r.listSims(),s=M(i,e.positional[0]||e.simId),a=n&&s.lockedBy&&s.lockedByKind!=="user-active"?s.lockedBy:null,l=await r.claim(s.id,{force:n});g(s.id);let c=Math.max(0,Math.round((l.lockExpiresAt-Date.now())/1e3)),f=l.bootedCount>0?` (booted ${l.bootedCount})`:"";console.log(` claimed: ${l.simId} [${c}s]${f}`),a&&console.log(` took over from: ${a}`)}catch(i){if(i instanceof ne){let s=Math.max(0,Math.round(i.lock.expiresInMs/1e3));console.error(` claim failed: locked by ${i.lock.by} for ${s}s more`),console.error(" use --force to take it, or `sootsim open --new` for a fresh sim"),process.exit(1)}console.error(` claim failed: ${i instanceof Error?i.message:String(i)}`),process.exit(1)}}finally{r.close()}}async function De(t,o,e,n){if(n.length===0)return{closed:[],remaining:[]};await Promise.all(n.map(i=>t.closeSim(i).catch(()=>{})));let r=new Set(n);for(let i=0;i<40;i++){let s=[];try{let a=y(o,{commandTimeoutMs:e});try{s=(await a.listSims()).filter(c=>r.has(c.id)&&c.readyState==="open").map(c=>c.id)}finally{a.close()}}catch{s=[]}if(s.length===0)return{closed:[...r],remaining:[]};if(i===39)return{closed:[...r].filter(a=>!s.includes(a)),remaining:s};await C(250)}return{closed:[...r],remaining:[]}}async function gt(t,o={}){let e=x(t,{port:o.port,commandTimeoutMs:o.timeoutMs,stripBooleanFlags:["--all","--others"]}),n=P(e),r=e.simId?` --sim ${e.simId}`:"",i=t.includes("--all"),s=t.includes("--others");if(i||s){try{let a=await n.listSims(),l=a.filter($=>$.readyState==="open"),c=null;if(s)try{c=M(a,e.positional[0]||e.simId||I()||void 0).id}catch{c=null}let f=l.map($=>$.id).filter($=>$!==c);if(f.length===0){console.log(c?` nothing to close \u2014 only the kept sim ${c} is connected`:" nothing to close \u2014 no sims connected");return}let h=await De(n,e.wsPort,e.commandTimeoutMs,f),S=I();S&&h.closed.includes(S)&&(c?g(c):E());let B=` closed ${h.closed.length} sim(s)${c?` (kept ${c})`:""}`;console.log(B),h.remaining.length>0&&console.log(` still connected: ${h.remaining.join(", ")}`)}catch(a){console.error(` close failed: ${a instanceof Error?a.message:String(a)}`),process.exit(1)}finally{n.close()}return}try{try{let a=await n.listSims(),l=M(a,e.positional[0]||e.simId),c=a.find(h=>h.id!==l.id&&h.readyState==="open");if(await n.closeSim(l.id),!await Ee(e.wsPort,e.commandTimeoutMs,l.id)){console.log(` close requested: ${l.id} (still connected)`);return}I()===l.id&&(c?g(c.id):E()),console.log(` closed: ${l.id}`)}catch(a){console.error(` close failed: ${a instanceof Error?a.message:String(a)}`),await L(n,{errorsCommand:`sootsim get errors 5${r}`,warningsCommand:`sootsim get warnings 5${r}`,requestsCommand:`sootsim get requests 5${r}`}),process.exit(1)}}finally{n.close()}}export{We as a,ve as b,Ge as c,lt as d,pe as e,F as f,Be as g,_e as h,Re as i,N as j,mt as k,dt as l,ut as m,pt as n,ft as o,gt as p};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-GWOV6KFE.js";import{existsSync as x,readFileSync as j}from"fs";import{resolve as g}from"path";async function P(s){(s.includes("--help")||s.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim compat \u2014 check package compatibility
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -20,7 +20,7 @@ examples:
|
|
|
20
20
|
sootsim compat react-native-reanimated
|
|
21
21
|
sootsim compat --json
|
|
22
22
|
sootsim compat --brief
|
|
23
|
-
`),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-
|
|
23
|
+
`),process.exit(0));let c=s.includes("--json"),e=s.includes("--brief"),l=s.indexOf("--app"),n=l!==-1&&s[l+1]?g(s[l+1]):process.cwd(),k=s.filter((o,a)=>!o.startsWith("-")&&(l===-1||a!==l+1))[0];if(c||e){let{scanDeps:o}=await import("./web-MR4EQWCC.js"),a=g(n,"package.json");x(a)||(console.error(" no package.json found in",n),process.exit(1));let u=JSON.parse(j(a,"utf8")),r=o(u);if(c){console.log(JSON.stringify(r,null,2));return}if(r.packages.length===0){console.log(" no RN ecosystem packages detected");return}let T=Math.round(r.overallScore*100),v=r.packages.filter(i=>i.status==="full").length,$=r.packages.filter(i=>i.status==="partial"||i.status==="auto-stub").length,w=r.packages.filter(i=>i.status==="unsupported").length,p=[];v&&p.push(`${v} fully supported`),$&&p.push(`${$} partial`),w&&p.push(`${w} unsupported`),console.log(` ${p.join(", ")} \u2014 ${T}% compatible`);return}let{POLYFILL_REGISTRY:d}=await import("./web-MR4EQWCC.js");if(k){W(k,d);return}let b=g(n,"package.json");x(b)||(console.error(" no package.json found in",n),process.exit(1));let m=JSON.parse(j(b,"utf8")),S={...m.dependencies,...m.devDependencies},t={full:[],partial:[],autoStub:[],unsupported:[],justWorks:[],unknown:[]};for(let o of Object.keys(S)){let a=d[o];if(a){let u=a.stubType==="native"?"full":a.stubType==="works"?"not-relevant":a.stubType;if(a.stubType!=="native"&&a.versions?.length){let r=Math.max(...a.versions.map(y=>y.coverage||0));u=r>=.8?"full":r>=.3?"partial":"auto-stub"}switch(u){case"full":t.full.push(o);break;case"partial":t.partial.push(o);break;case"auto-stub":t.autoStub.push(o);break;case"unsupported":t.unsupported.push(o);break;case"not-relevant":t.justWorks.push(o);break;default:f(o)&&t.unknown.push(o)}}else f(o)&&t.unknown.push(o)}console.log(`
|
|
24
24
|
sootsim compatibility report
|
|
25
25
|
\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
26
26
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-GWOV6KFE.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim config \u2014 manage sootsim configuration
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m}from"./chunk-ZM4JL3VP.js";import"./chunk-OHI4DJSD.js";import"./chunk-PEXPACO5.js";import"./chunk-FCFKR7EM.js";import"./chunk-XU27QCRX.js";import"./chunk-XKNZR4BB.js";import"./chunk-KV7XS7WL.js";import"./chunk-4OPZYTVB.js";import"./chunk-T4H37KU7.js";import"./chunk-DGAHFMAU.js";import"./chunk-WWEMLI77.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";export{d as buildOpenUrl,c as buildShellUrl,f as printConnectedSims,a as resolveBundleTarget,b as resolveDefaultShellBaseUrl,l as runClaimCommand,m as runCloseCommand,k as runFocusCommand,h as runListCommand,i as runOpenCommand,j as runUseCommand,e as summarizeSimUrl,g as waitForSimMatch};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as I,e as N,i as S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as I,e as N,i as S}from"./chunk-DGAHFMAU.js";import"./chunk-WWEMLI77.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";import{createWriteStream as k,mkdirSync as v,writeFileSync as C}from"fs";import{dirname as T,resolve as w}from"path";import{Readable as F}from"stream";import{pipeline as y}from"stream/promises";import{createGzip as x}from"zlib";async function U(o,m){let n=Number(b(o,"--duration")??"5");if(!Number.isFinite(n)||n<=0)return console.error(" --duration must be a positive number (seconds)"),1;let a=Number(b(o,"--sample-interval")??"10");if(!Number.isFinite(a)||a<=0)return console.error(" --sample-interval must be a positive number (milliseconds)"),1;let t=Number(b(o,"--max-buffer")??"100000");if(!Number.isFinite(t)||t<=0)return console.error(" --max-buffer must be a positive number"),1;let p=b(o,"--output")??b(o,"-o"),u=w(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=u.endsWith(".gz"),h=I(o,{port:m.port,stripValueFlags:["--duration","--output","-o","--sample-interval","--max-buffer"]}),c=N({...h,commandTimeoutMs:Math.max(3e4,(n+20)*1e3)});try{let l=await S(c,"SootSim.bridges.workerCpuProfileStart",{sampleInterval:a,maxBufferSize:t});if(!l?.started)return l?.error?.includes("cpu-profile-unsupported")?(console.error(" cpu-profile is currently unsupported."),console.error(" the JS Self-Profiler API cannot profile a dedicated worker, and"),console.error(" sootsim runs the guest app in the tenant worker. a CDP-based"),console.error(" profiler is required \u2014 tracked as the F28 follow-up.")):(console.error(" could not start tenant-worker profiler."),console.error(" is sootsim running? (try `bun sootsim list`)")),1;m.verbose&&console.error(` started: sampleInterval=${l.sampleInterval}ms buffer=${l.maxBufferSize}`),console.log(` recording for ${n}s\u2026`),await new Promise(r=>setTimeout(r,n*1e3));let s=await S(c,"SootSim.bridges.workerCpuProfileStop");if(!s||s.error||!s.trace)return console.error(` profile capture failed: ${s?.error??"no trace returned"}`),1;let P=B(s.trace),e=JSON.stringify(P);v(T(u),{recursive:!0}),g?await y(F.from([e]),x(),k(u)):C(u,e);let i=(Buffer.byteLength(e)/1024/1024).toFixed(2);return console.log(` samples: ${P.samples.length} (${i} MB uncompressed)`),console.log(` saved: ${u}`),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}catch(l){let s=l?.message??String(l);return console.error(` profile failed: ${s}`),/could not connect|ECONNREFUSED/i.test(s)&&console.error(" is sootsim running? (try `bun sootsim list`)"),1}finally{c.close()}}function B(o){let m=o.frames??[],n=o.resources??[],a=o.stacks??[],t=o.samples??[],p=1,u=[{id:p,callFrame:{functionName:"(root)",scriptId:"0",url:"",lineNumber:-1,columnNumber:-1},hitCount:0,children:[]}];for(let e=0;e<a.length;e++){let i=a[e],r=m[i.frameId]??{name:"(unknown)"},f=r.resource!==void 0?n[r.resource]??"":"";u.push({id:e+2,callFrame:{functionName:r.name||"(anonymous)",scriptId:r.resource!==void 0?String(r.resource):"0",url:f,lineNumber:typeof r.line=="number"?r.line-1:-1,columnNumber:typeof r.column=="number"?r.column-1:-1},hitCount:0,children:[]})}for(let e=0;e<a.length;e++){let i=a[e],r=e+2,f=i.parentId!==void 0?i.parentId+2:p,d=u[f-1];d&&!d.children.includes(r)&&d.children.push(r)}let g=[],h=[],c=t.length>0?t[0].timestamp:0,l=c;for(let e=0;e<t.length;e++){let i=t[e],r=i.stackId!==void 0?i.stackId+2:p;g.push(r);let f=u[r-1];f&&f.hitCount++;let d=e===0?0:i.timestamp-l;h.push(Math.max(0,Math.round(d*1e3))),l=i.timestamp}let s=Math.round(c*1e3),P=t.length>0?Math.round(t[t.length-1].timestamp*1e3):s;return{nodes:u,startTime:s,endTime:P,samples:g,timeDeltas:h}}function b(o,m){let n=o.indexOf(m);if(!(n<0||n===o.length-1))return o[n+1]}export{U as runCpuProfile};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as T,b as _}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as T,b as _}from"./chunk-PAOOYAVI.js";import"./chunk-WRNSX5RR.js";import"./chunk-VWJ4O366.js";import{g as I,o as C,p as w,q as B}from"./chunk-M5HZVUQQ.js";import{a as W}from"./chunk-GWOV6KFE.js";import{execFileSync as tt,spawnSync as n}from"child_process";import{existsSync as a,mkdirSync as v,readFileSync as et,rmSync as S,writeFileSync as R}from"fs";import{homedir as $}from"os";import{dirname as U,resolve as m}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as H,mkdirSync as D,rmSync as K,writeFileSync as L}from"fs";import{dirname as P}from"path";var X="dev.sootsim.daemon",N="SootSim Daemon",O="0.1.36";function F(t,e,r){let o=w(),s=B(),i=P(P(s)),f=P(s),u=`${i}/Resources`;K(o,{recursive:!0,force:!0}),D(C(),{recursive:!0}),D(f,{recursive:!0}),D(u,{recursive:!0}),L(`${i}/Info.plist`,Q()),L(`${i}/PkgInfo`,"APPL????"),L(s,z(t,e,r)),H(s,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(c){let g=c instanceof Error?c.message:String(c);console.warn(` warning: ad-hoc codesign of ${o} failed: ${g}
|
|
3
3
|
the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:o,launcherPath:s}}function Q(){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
4
4
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
5
5
|
<plist version="1.0">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as f}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as f}from"./chunk-PRRVFNFG.js";import{A as x,B as T,C as v,y as D,z as O}from"./chunk-K3I6VLF3.js";import{b as A}from"./chunk-PEXPACO5.js";import{c as S,e as $,g as N}from"./chunk-DGAHFMAU.js";import"./chunk-WWEMLI77.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";var H=["portals","sheets","layout","onlayout","animated","render","touch","yoga","all"],R="__sootsimShellAnimationTrace",q="__sootsimDebugAnimation";function L(){console.log(`
|
|
3
3
|
sootsim debug \u2014 drive __sootsimDebug from the terminal
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -167,7 +167,7 @@ examples:
|
|
|
167
167
|
} : null,
|
|
168
168
|
samples,
|
|
169
169
|
}
|
|
170
|
-
})()`}async function c(i,l){return N(i,l)}async function Y(i,l){let g=S(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-
|
|
170
|
+
})()`}async function c(i,l){return N(i,l)}async function Y(i,l){let g=S(i,{port:l.port,stripBooleanFlags:["--pretty","--json","--help","-h"]}),u=g.positional;(!u[0]||i.includes("--help")||i.includes("-h"))&&(L(),process.exit(0));let P=g.wsPort,_=g.simId,n=!i.includes("--json"),y=_?` --sim ${_}`:"",k=u[0],r=u.slice(1);if(new Set(["state","js","eval","perf","sample-color"]).has(k)){let{runInspect:e}=await import("./inspect-UVS4UIJF.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=$(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
|
|
171
171
|
known: ${H.join(", ")}`),process.exit(1));let o=await v(t,"enable",e);console.log(a({active:o},n));break}case"disable":{let e=B(r[0]),o=await v(t,"disable",e);console.log(a({active:o},n));break}case"toggle":{let e=r[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let o=await c(t,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(a({[e]:o},n));break}case"status":{let e=await D(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await O(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
|
|
172
172
|
const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
|
|
173
173
|
if (!d) return null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as S}from"./chunk-XSJ4SU63.js";import"./chunk-OZICEBUA.js";import"./chunk-FLJAN5PS.js";import"./chunk-RSMU24BE.js";import"./chunk-Z7J6LG53.js";import"./chunk-SG7ICXM2.js";import"./chunk-ZM4JL3VP.js";import"./chunk-OHI4DJSD.js";import"./chunk-PEXPACO5.js";import"./chunk-FCFKR7EM.js";import"./chunk-XU27QCRX.js";import"./chunk-XKNZR4BB.js";import"./chunk-PG6FUKZX.js";import"./chunk-PKVNCXQD.js";import"./chunk-KETYRULQ.js";import"./chunk-KV7XS7WL.js";import"./chunk-4OPZYTVB.js";import"./chunk-MJD6C3BG.js";import"./chunk-T4H37KU7.js";import"./chunk-MDSET24U.js";import"./chunk-QXJR74QV.js";import"./chunk-DGAHFMAU.js";import"./chunk-WWEMLI77.js";import"./chunk-PAOOYAVI.js";import"./chunk-WRNSX5RR.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";import{spawn as D}from"child_process";import{existsSync as u,mkdirSync as _,writeFileSync as f,unlinkSync as I}from"fs";import{tmpdir as P}from"os";import{dirname as $,resolve as n,join as M}from"path";function E(){try{let e=import.meta.resolve("sootsim/detox");return $(e.startsWith("file://")?e.slice(7):e)}catch{return n(import.meta.dirname,"..","..","detox")}}var F=`
|
|
3
3
|
sootsim detox \u2014 run detox-style tests against a sootsim shell
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-RSMU24BE.js";import"./chunk-MJD6C3BG.js";import"./chunk-MDSET24U.js";import{f as c,g as r,h as g}from"./chunk-QXJR74QV.js";import{c as d,e as l,h as a}from"./chunk-DGAHFMAU.js";import"./chunk-WWEMLI77.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";function h(){console.log(`
|
|
3
3
|
sootsim device \u2014 inspect or change the live device preset for a sim
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as v,e as E,h as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as v,e as E,h as b}from"./chunk-DGAHFMAU.js";import{b as $}from"./chunk-WWEMLI77.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";function j(e){return e.ts??e.t??0}function F(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(r=>typeof r=="string"?r:JSON.stringify(r)).join(" "):""}var W=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
|
|
3
3
|
sootsim diagnose \u2014 compact "what just went wrong?" report
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-UH5PKJXT.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-FCFKR7EM.js";import"./chunk-XU27QCRX.js";import"./chunk-XKNZR4BB.js";import"./chunk-KV7XS7WL.js";import"./chunk-4OPZYTVB.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";export{e as ALL_DRIVERS,i as buildDriverListRows,a as chromiumDriver,b as electronDriver,f as getAllDrivers,g as getDriver,c as playwrightDriver,h as resolveDriver,d as systemDriver};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as g}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as g}from"./chunk-H46ZLTT5.js";import"./chunk-UH5PKJXT.js";import{a as v,f as h}from"./chunk-ZM4JL3VP.js";import"./chunk-OHI4DJSD.js";import"./chunk-PEXPACO5.js";import{b as f,g as u}from"./chunk-FCFKR7EM.js";import{a as p}from"./chunk-XU27QCRX.js";import{c as m}from"./chunk-XKNZR4BB.js";import"./chunk-KV7XS7WL.js";import"./chunk-4OPZYTVB.js";import"./chunk-T4H37KU7.js";import"./chunk-DGAHFMAU.js";import"./chunk-WWEMLI77.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";function b(e){let r=e.indexOf("--port");if(r<0)return;let o=e[r+1],i=o?Number(o):Number.NaN;return(!Number.isInteger(i)||i<=0)&&(console.error(` invalid --port value: ${o||"(missing)"}`),process.exit(1)),i}async function O(e,r){let o=b(e)??r.port;return o?h(String(o)):void 0}async function $(e,r){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim electron \u2014 launch the desktop companion
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -15,4 +15,4 @@ examples:
|
|
|
15
15
|
sootsim electron
|
|
16
16
|
sootsim electron --port 5173
|
|
17
17
|
sootsim electron --profile qa
|
|
18
|
-
`),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-
|
|
18
|
+
`),process.exit(0));let o=e.indexOf("--driver"),i=o>=0?e[o+1]:void 0,t=e.find((n,a)=>e[a-1]==="--profile"),d=e.includes("--ephemeral");t&&d&&(console.error(" sootsim electron: --profile cannot be combined with --ephemeral"),process.exit(1));let x=t?m(t).id:void 0,s=i||r.driver,l=f;if(s){let n=u(s);n||(console.error(` unknown driver "${s}" \u2014 run \`sootsim list --drivers\``),process.exit(1)),l=n}if(l.id==="electron"){let n=p();if(!n){if(v(),process.stdin.isTTY&&process.env.CI!=="1"&&process.env.SOOTSIM_NO_PROMPT!=="1"&&await g("run sootsim install-desktop now?",!0)){console.log();let{runInstallDesktop:I}=await import("./install-desktop-6BT3VL2C.js");await I(["--yes"]),n=p()}n||process.exit(1)}console.log(` launching ${n.path}`)}let w=await O(e,r),c=await l.launch({url:w,device:r.device,profileId:x,ephemeralProfile:d});c.launched||(console.error(` ${c.message}`),process.exit(1)),console.log(` ${c.message}`)}export{O as resolveElectronLaunchUrl,$ as runElectron};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c,d}from"./chunk-XSJ4SU63.js";import"./chunk-OZICEBUA.js";import"./chunk-FLJAN5PS.js";import"./chunk-RSMU24BE.js";import"./chunk-Z7J6LG53.js";import"./chunk-SG7ICXM2.js";import"./chunk-ZM4JL3VP.js";import"./chunk-OHI4DJSD.js";import"./chunk-PEXPACO5.js";import"./chunk-FCFKR7EM.js";import"./chunk-XU27QCRX.js";import"./chunk-XKNZR4BB.js";import"./chunk-PG6FUKZX.js";import"./chunk-PKVNCXQD.js";import"./chunk-KETYRULQ.js";import"./chunk-KV7XS7WL.js";import"./chunk-4OPZYTVB.js";import"./chunk-MJD6C3BG.js";import"./chunk-T4H37KU7.js";import"./chunk-MDSET24U.js";import"./chunk-QXJR74QV.js";import"./chunk-DGAHFMAU.js";import"./chunk-WWEMLI77.js";import"./chunk-PAOOYAVI.js";import"./chunk-WRNSX5RR.js";import"./chunk-VWJ4O366.js";import"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";export{b as discoverSootsimUrl,a as parseFlowFile,d as runFlow,c as runFlowPlayback};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as n,c as r,d as l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as n,c as r,d as l}from"./chunk-BVXZZOBA.js";import"./chunk-WWEMLI77.js";import"./chunk-GWOV6KFE.js";function a(t){let s=t[0]??"list";if(s==="reset"){t[1]==="global"?(r(),console.log(" cleared global hint state")):(n(),console.log(" cleared hint state for this CLI identity"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{A,B,C,D,E,F,G,H,I,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.46 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A,B,C,D,E,F,G,H,I,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-M5HZVUQQ.js";import"./chunk-GWOV6KFE.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,D as activeRuntimeDir,j as activeRuntimeFile,r as cacheDir,H as claimDaemonLockfile,C as compareSemver,t as configFilePath,p as daemonAppBundlePath,o as daemonAppDir,q as daemonAppLauncherPath,s as daemonLockfilePath,k as electronDir,l as electronUserDataDir,m as electronVersionDir,y as ensureSootsimHome,F as isDaemonLockfileFresh,g as isSootsimDevCheckout,B as listInstalledRuntimes,n as profilesDir,z as readActiveRuntime,E as readDaemonLockfile,u as readSharedConfig,w as readTelemetryEnabled,I as removeDaemonLockfile,i as runtimeDir,h as runtimesDir,f as sootsimHomeDir,A as writeActiveRuntime,G as writeDaemonLockfile,v as writeSharedConfig,x as writeTelemetryEnabled};
|