sootsim 0.1.42 → 0.1.44
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-4BBZUWD2.js → agent-NVU7E7EV.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-TA5GG3MV.js → agent-wrapper-CLEYNPJK.js} +2 -2
- package/dist-cli/chunks/{assert-7GHUOGLI.js → assert-F7B6TVEQ.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-BIH3TKGB.js +2 -0
- package/dist-cli/chunks/beta-DD7XOVXJ.js +2 -0
- package/dist-cli/chunks/{chunk-6R3CVNXC.js → chunk-2Q5YKX76.js} +1 -1
- package/dist-cli/chunks/chunk-2TU7QJGH.js +1 -0
- package/dist-cli/chunks/{chunk-UY6HKNEV.js → chunk-4ZA3J2BV.js} +1 -1
- package/dist-cli/chunks/{chunk-DXQKMDX2.js → chunk-54V7OVL6.js} +2 -2
- package/dist-cli/chunks/chunk-5A7UO4OE.js +1 -0
- package/dist-cli/chunks/{chunk-Y4ENWAOJ.js → chunk-6QY5P2H6.js} +2 -2
- package/dist-cli/chunks/{chunk-WW4G4D4A.js → chunk-6TO2XBUK.js} +2 -2
- package/dist-cli/chunks/{chunk-6MYXKMLG.js → chunk-7PUVSCSF.js} +1 -1
- package/dist-cli/chunks/{chunk-DNSKIJSB.js → chunk-B4B6RECG.js} +2 -2
- package/dist-cli/chunks/{chunk-SGBD3EAX.js → chunk-BU7OXA7Y.js} +3 -3
- package/dist-cli/chunks/{chunk-EDXBJUHH.js → chunk-E3DHOL7O.js} +3 -3
- package/dist-cli/chunks/{chunk-WSISSPE3.js → chunk-EAMMI2FH.js} +2 -2
- package/dist-cli/chunks/{chunk-DUVJOJTP.js → chunk-ECIHLBNE.js} +1 -1
- package/dist-cli/chunks/{chunk-BVCZIJ2X.js → chunk-F76MMAMV.js} +2 -2
- package/dist-cli/chunks/{chunk-QWGMNIWG.js → chunk-FBCGPPDA.js} +2 -2
- package/dist-cli/chunks/{chunk-5PZPKGUJ.js → chunk-GLLMLIXC.js} +2 -2
- package/dist-cli/chunks/{chunk-76WF7UIG.js → chunk-HIQJTM66.js} +2 -2
- package/dist-cli/chunks/{chunk-2GKZS2ZZ.js → chunk-IIFZNK4R.js} +2 -2
- package/dist-cli/chunks/{chunk-Q26NNL4G.js → chunk-IMTTDIJJ.js} +1 -1
- package/dist-cli/chunks/{chunk-5EBERDK7.js → chunk-JK3BWGI5.js} +1 -1
- package/dist-cli/chunks/{chunk-I4LBW6ED.js → chunk-K4BRBIGO.js} +2 -2
- package/dist-cli/chunks/chunk-KVJEI5YO.js +1 -0
- package/dist-cli/chunks/{chunk-BZFKV7CT.js → chunk-KWU3WMFD.js} +4 -4
- package/dist-cli/chunks/{chunk-3PN6HIAM.js → chunk-L7V75VQK.js} +1 -1
- package/dist-cli/chunks/{chunk-543BSGQG.js → chunk-LCDWXJ6X.js} +1 -1
- package/dist-cli/chunks/{chunk-ITQGNQE3.js → chunk-LCUVF6MI.js} +2 -2
- package/dist-cli/chunks/{chunk-MQOJIYEY.js → chunk-MS5QBIOB.js} +3 -3
- package/dist-cli/chunks/{chunk-KQN7OUQ6.js → chunk-NMFN4EIE.js} +2 -2
- package/dist-cli/chunks/{chunk-D5TKAFJ3.js → chunk-OBIALIWI.js} +1 -1
- package/dist-cli/chunks/chunk-POPZHYTD.js +117 -0
- package/dist-cli/chunks/{chunk-LXZK2TIS.js → chunk-QB4INK6X.js} +2 -2
- package/dist-cli/chunks/{chunk-L53QRCQZ.js → chunk-RN5LEOFJ.js} +1 -1
- package/dist-cli/chunks/{chunk-CZZDYQBA.js → chunk-T5UKNA5K.js} +1 -1
- package/dist-cli/chunks/{chunk-QLGR4M5H.js → chunk-TXCWW2IX.js} +2 -2
- package/dist-cli/chunks/{chunk-J6HT2ZJW.js → chunk-VFUO52ZQ.js} +1 -1
- package/dist-cli/chunks/{chunk-BBRAYGDX.js → chunk-VP52RZT7.js} +2 -2
- package/dist-cli/chunks/{chunk-FDB3P2GV.js → chunk-VQKQSSUD.js} +1 -1
- package/dist-cli/chunks/{chunk-LAOTVMTO.js → chunk-WLH4MLBC.js} +2 -2
- package/dist-cli/chunks/{chunk-A2R42ONP.js → chunk-YROS5I43.js} +2 -2
- package/dist-cli/chunks/{chunk-NLYIKZIF.js → chunk-YWBUHBLD.js} +2 -2
- package/dist-cli/chunks/chunk-ZLOUP7JS.js +1 -0
- package/dist-cli/chunks/{chunk-5TRJK5SO.js → chunk-ZNMOLPG5.js} +1 -1
- package/dist-cli/chunks/chunk-ZP4PF72U.js +2 -0
- package/dist-cli/chunks/{chunk-4574AJAK.js → chunk-ZZOYYBLO.js} +2 -2
- package/dist-cli/chunks/{compat-GWIATWPP.js → compat-5XJPHPPL.js} +3 -3
- package/dist-cli/chunks/{config-OXHJXY6N.js → config-SHZ662ER.js} +2 -2
- package/dist-cli/chunks/control-ONCNZDD5.js +2 -0
- package/dist-cli/chunks/{cpu-profile-MBYPGUJH.js → cpu-profile-KFM3R5MY.js} +2 -2
- package/dist-cli/chunks/{daemon-3N3QWMFU.js → daemon-QRHS6CAR.js} +2 -2
- package/dist-cli/chunks/{debug-POCRM56I.js → debug-CRQNVODN.js} +3 -3
- package/dist-cli/chunks/demo-app-registry-GCDJ3DX7.js +2 -0
- package/dist-cli/chunks/{detox-4NXKQ2CS.js → detox-PEPICVRX.js} +2 -2
- package/dist-cli/chunks/{device-DURJHKK5.js → device-4GRKBTIY.js} +2 -2
- package/dist-cli/chunks/{diagnose-IMXDGRVA.js → diagnose-FRGJNGVH.js} +2 -2
- package/dist-cli/chunks/drivers-LRMIFMFF.js +2 -0
- package/dist-cli/chunks/{electron-NGWA52N6.js → electron-KAAQYVLY.js} +3 -3
- package/dist-cli/chunks/flow-P6N565XT.js +2 -0
- package/dist-cli/chunks/{hints-5UNZ7BR2.js → hints-JDTUIEQI.js} +2 -2
- package/dist-cli/chunks/{home-paths-TENEFM4L.js → home-paths-MCK43U6W.js} +2 -2
- package/dist-cli/chunks/{inspect-IWMH6MUT.js → inspect-2ORQQN7T.js} +3 -3
- package/dist-cli/chunks/install-KVZFRP22.js +2 -0
- package/dist-cli/chunks/{install-desktop-ABAWCLFJ.js → install-desktop-YEGVQFNS.js} +3 -3
- package/dist-cli/chunks/{keys-NET26VLH.js → keys-2QRSFPVS.js} +2 -2
- package/dist-cli/chunks/{launch-TKIA4RC4.js → launch-L25GI237.js} +3 -3
- package/dist-cli/chunks/{login-AWT3GU5M.js → login-FHC2PLFD.js} +4 -4
- package/dist-cli/chunks/{logout-R2RUNXHO.js → logout-FJQU7HI2.js} +2 -2
- package/dist-cli/chunks/{maestro-552237HC.js → maestro-Z6YMB7VM.js} +2 -2
- package/dist-cli/chunks/{preview-GKIGPZUO.js → preview-7ZCBU2IE.js} +2 -2
- package/dist-cli/chunks/{profile-U64JPCPD.js → profile-JTJF6PY6.js} +2 -2
- package/dist-cli/chunks/{react-FWSV5JH2.js → react-XP2AJQ4T.js} +2 -2
- package/dist-cli/chunks/record-56JAGJUN.js +17 -0
- package/dist-cli/chunks/runtime-T2X2XY72.js +2 -0
- package/dist-cli/chunks/{runtime-delivery-22PV7UED.js → runtime-delivery-O655KIUB.js} +2 -2
- package/dist-cli/chunks/{screenshot-4P3TL7CN.js → screenshot-CPCNSTFP.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-GX3Q3IZ6.js → screenshot-mode-MGWQGOM7.js} +2 -2
- package/dist-cli/chunks/{screenshots-5HSLPDWZ.js → screenshots-ZD7HJ4GA.js} +2 -2
- package/dist-cli/chunks/{server-Q3ZD4BEF.js → server-V55GYTFF.js} +2 -2
- package/dist-cli/chunks/setup-repo-SGAHUDYC.js +2 -0
- package/dist-cli/chunks/{skills-M2CWX5ZC.js → skills-PGTMJCNI.js} +2 -2
- package/dist-cli/chunks/{start-24EAF2KS.js → start-OB5MRSE4.js} +4 -4
- package/dist-cli/chunks/store-SUEZBGQY.js +2 -0
- package/dist-cli/chunks/telemetry-COZXGX5D.js +2 -0
- package/dist-cli/chunks/{test-AJBULIVR.js → test-OXVUTEEX.js} +3 -3
- package/dist-cli/chunks/{three-mode-JBZSQQIQ.js → three-mode-P6JQUJEA.js} +2 -2
- package/dist-cli/chunks/{timeline-VVGWQSVU.js → timeline-TVXCZIHI.js} +2 -2
- package/dist-cli/chunks/{upgrade-IOGHQT7J.js → upgrade-PDM3N57Q.js} +2 -2
- package/dist-cli/chunks/upload-U55QDSSX.js +2 -0
- package/dist-cli/chunks/{web-XIMVN6KZ.js → web-F5K7GAGR.js} +2 -2
- package/dist-cli/chunks/{what-happened-STVD3KZ2.js → what-happened-QE3IR6K4.js} +2 -2
- package/dist-cli/chunks/{whoami-L62IGS4U.js → whoami-NPO62CNB.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-7BJDOYUU.js +0 -2
- package/dist-cli/chunks/beta-2LIEPFEJ.js +0 -2
- package/dist-cli/chunks/chunk-2XCCV7J3.js +0 -2
- package/dist-cli/chunks/chunk-64AKKWVB.js +0 -1
- package/dist-cli/chunks/chunk-EZGUKWD5.js +0 -1
- package/dist-cli/chunks/chunk-IFY75LQ3.js +0 -1
- package/dist-cli/chunks/chunk-LJLRHMLK.js +0 -1
- package/dist-cli/chunks/chunk-R3KU3IBN.js +0 -117
- package/dist-cli/chunks/control-HJ2RPHYO.js +0 -2
- package/dist-cli/chunks/demo-app-registry-XABEINTD.js +0 -2
- package/dist-cli/chunks/drivers-VXSNI7K2.js +0 -2
- package/dist-cli/chunks/flow-TCG5XPDK.js +0 -2
- package/dist-cli/chunks/install-IKBAY4PQ.js +0 -2
- package/dist-cli/chunks/record-FLWDPJIP.js +0 -7
- package/dist-cli/chunks/runtime-AGNC2TK6.js +0 -2
- package/dist-cli/chunks/setup-repo-NQVN5PK7.js +0 -2
- package/dist-cli/chunks/store-GI3SJOKH.js +0 -2
- package/dist-cli/chunks/telemetry-73Z4FAUH.js +0 -2
- package/dist-cli/chunks/upload-Z4PPGOX6.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as B,b as H,c as ne}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as B,b as H,c as ne}from"./chunk-L7V75VQK.js";import{b as T}from"./chunk-ZNMOLPG5.js";import{g as se}from"./chunk-KWU3WMFD.js";import{a as x,b as z}from"./chunk-2Q5YKX76.js";import{c as re}from"./chunk-NMFN4EIE.js";import{d as oe}from"./chunk-ECIHLBNE.js";import{a as Y}from"./chunk-ZP4PF72U.js";import{b as te,c as S,d as w,e as $}from"./chunk-HIQJTM66.js";import{c as N,d as g,e as F}from"./chunk-OBIALIWI.js";import{E as Z,F as ee}from"./chunk-7PUVSCSF.js";import xe from"node:fs";import Ce from"node:os";import j from"node:path";function ge(e){return e.replace(/^\[|\]$/g,"").toLowerCase()}function _(e){let t=ge(e);return t==="localhost"||t.endsWith(".localhost")||t==="0.0.0.0"||t==="::1"||/^127(?:\.\d{1,3}){3}$/.test(t)}function ie(e){return new Error(`could not resolve a native bundle for ${e}. pass an explicit bundle URL or open Connect and choose the app there.`)}function we(e,t){return e?.includes("/one/metro-entry.bundle")?"one":typeof t=="string"&&t?"expo":"unknown"}function ce(e,t,o){return`${e}//${t}:${o}`}function be(e){if(typeof window>"u")return!1;try{let t=new URL(e);return _(t.hostname)&&_(window.location.hostname)&&t.origin!==window.location.origin}catch{return!1}}async function ae(e,t){let o={...t,cache:t?.cache??"no-store"};return be(e)?fetch(`/__fetch-proxy?url=${encodeURIComponent(e)}`,o):fetch(e,o)}function ye(e){return e==="https:"?443:80}function Se(e){let t=e.pathname||"/";return(t==="/"||t==="")&&!e.search&&!e.hash}async function le(e,t){let o=e.replace(/\/+$/,"");try{let n=await ae(`${o}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),s=r?.extra?.expoClient||r?.extra||{},i=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(i||s.name)return{bundleUrl:ne(i||`${o}${H}`),port:t,framework:we(i,s.sdkVersion),projectName:s.name}}}catch{}try{let n=await ae(`${o}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${o}${H}`,port:t,framework:"metro"}}catch{}return null}async function $e(e){return le(ce("http:","localhost",e),e)}async function q(e){let t=e.trim();if(/^\d+$/.test(t)){let a=parseInt(t,10),l=await $e(a);if(l)return l;throw ie(`localhost:${a}`)}let o=t.startsWith("http")?t:`http://${t}`,n;try{n=new URL(o)}catch{throw new Error(`could not parse "${e}". pass a dev-server port, a dev-server base URL, or a full bundle URL.`)}let r=n.protocol||"http:",s=n.port?parseInt(n.port,10):ye(r),i=ce(r,n.hostname,s);if(_(n.hostname)&&Se(n)){let a=await le(i,s);if(a)return a;throw ie(i)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function je(){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 me(e){let t=x();if(console.log(` note: no sootsim bridge detected on port ${e}`),t){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(e){console.error(""),console.error(` no sim is connected to the sootsim bridge on port ${e}.`),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 We(e,t,o){let n=[];try{n=await e.listSims()}catch{}if(console.error(""),n.length===0){ve(t);return}console.error(` no sim with id "${o}" is connected to the bridge on port ${t}.`),console.error(""),console.error(" connected sims:");for(let r of n){let s=[r.isPrimary?"primary":null,r.readyState].filter(Boolean).join(", ");console.error(` ${r.id} (${s})`)}console.error(""),console.error(" pass a valid --sim id, or run `sootsim list` to see all sessions.")}var Pe={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 I(e){return new Promise(t=>setTimeout(t,e))}function G(e){return e.trim()}function W(e){try{let t=new URL(e),o=t.pathname.replace(/\/+$/,"")||"/";return t.searchParams.has("open")||t.searchParams.has("port")||t.searchParams.has("bundle")||t.searchParams.has("demo")||t.pathname.includes("/sootsim/index.html")||o==="/sootsim"||t.pathname==="/__soot"||t.pathname==="/__soot/"||o==="/rn"||/^\/rn\/[^/]+$/i.test(o)||/^\/app\/[^/]+$/i.test(o)||o==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(o)||/^\/__soot\/app\/[^/]+$/i.test(o)}catch{return!1}}async function co(e){let t=G(e);return(await q(t)).bundleUrl}function Q(e){let t=e.replace(/\/+$/,"")||"/";return t==="/__soot"||t.startsWith("/__soot/")?"/__soot":""}function Ie(e,t){let o=G(e),n=new URL(t),r=Q(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(o)?n.pathname=`${r}/rn/${o}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",o)),n.toString()}function Ue(e){let t=G(e);return/^\d+$/.test(t)||/^https?:\/\//i.test(t)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(t)}async function ke(e,t){let o=await q(e),n=new URL(t),r=Q(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",o.bundleUrl),n.toString()}function Me(e){return e.startsWith("~/")?j.join(Ce.homedir(),e.slice(2)):j.isAbsolute(e)?e:j.resolve(process.cwd(),e)}function Te(e){let t={};for(let o=0;o<e.length;o++){if(e[o]!=="--replace")continue;let n=e[o+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 s=n.slice(0,r).trim(),i=Me(n.slice(r+1).trim());xe.existsSync(i)||(console.error(` sootsim open: replacement file not found: ${i}`),process.exit(1)),t[s]={file:i},o++}return Object.keys(t).length>0?{modules:t}:void 0}function ue(){let e=Z();return ee(e)&&e.runtimePort>0?`http://localhost:${e.runtimePort}/`:Y}async function R(e,t=ue()){if(!e)return new URL(t).toString();if(W(e))return new URL(e).toString();let o=Pe[e.toLowerCase()];if(o){let n=new URL(t),r=Q(n.pathname);return n.pathname=`${r}${o}`,n.toString()}return Ue(e)?ke(e,t):Ie(e,t)}function de(e,t){let o=e?.url||e?.origin||t;try{let n=new URL(o);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 t}}async function Be(e,t,o){let n=new URL(await R(e,t));return n.searchParams.set("inspectOpen",o),n.toString()}async function _e(e,t,o,n={}){let r=n.attempts??30,s=n.intervalMs??500,i=n.minNodeCount??10;for(let a=0;a<r;a++){let l=w(e,{commandTimeoutMs:t,simId:o,simIdSource:"flag"});try{let m=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof m=="number"&&m>i)return{bridge:l,count:m}}catch{}l.close(),await I(s)}return null}function Oe(e){if(!e)return null;try{let t=new URL(e);if(t.searchParams.has("bundle")){let o=t.searchParams.get("bundle")||"";try{let n=new URL(o),r=n.pathname.length>36?`...${n.pathname.slice(-36)}`:n.pathname;return`bundle ${n.host}${r}`}catch{return"bundle"}}return t.searchParams.has("port")?`connect :${t.searchParams.get("port")||""}`:t.searchParams.has("open")?`connect ${t.searchParams.get("open")||""}`:t.searchParams.has("demo")?`demo ${t.searchParams.get("demo")||"default"}`:t.pathname.includes("/sootsim/index.html")||t.pathname==="/sootsim/"||t.pathname==="/sootsim"?"embedded sootsim":null}catch{return null}}function Re(e,t){if(e.length===0){console.log(" no sims connected");return}console.log(` connected sims (${e.length}):
|
|
3
3
|
`);for(let o of e){let n=o.lockedBy&&o.lockExpiresAt?`locked by ${o.lockedBy} (${Math.max(0,Math.round((o.lockExpiresAt-Date.now())/1e3))}s)`:"",r=[o.isPrimary?"primary":"",o.id===t?"selected":"",o.readyState,o.attachedCliCount&&o.attachedCliCount>0?"in use":"",o.userFocused?"focused":"",n].filter(Boolean);console.log(` ${o.id}${r.length?` [${r.join(", ")}]`:""}`);let s=Oe(o.url);if(s&&console.log(` loaded: ${s}`),o.url?console.log(` url: ${o.url}`):o.origin&&console.log(` origin: ${o.origin}`),o.title&&console.log(` title: ${o.title}`),console.log(` connected: ${new Date(o.connectedAt).toISOString()}`),o.lastActiveAt&&o.lastActiveAt>0){let i=Math.round((Date.now()-o.lastActiveAt)/1e3),a=i<60?`${i}s ago`:i<3600?`${Math.round(i/60)}m ago`:`${Math.round(i/3600)}h ago`;console.log(` last active: ${a}`)}}}async function O(e,t,o,n={}){let r=n.attempts??30,s=n.intervalMs??500;for(let i=0;i<r;i++){let a=w(e,{commandTimeoutMs:t});try{let m=(await a.listSims()).find(o);if(m)return m}catch{}finally{a.close()}await I(s)}return null}async function Le(e,t,o,n={}){let r=n.attempts??20,s=n.intervalMs??250;for(let i=0;i<r;i++){let a=w(e,{commandTimeoutMs:t});try{let m=(await a.listSims()).find(b=>b.id===o);if(!m||m.readyState!=="open")return!0}catch{return!0}finally{a.close()}await I(s)}return!1}function L(e,t){if(t){let r=t.trim(),s=e.find(i=>i.id===r);if(!s)throw new Error(`no sim connected with id ${r}`);return s}let o=e.find(r=>r.isPrimary&&r.readyState==="open");if(o)return o;let n=e.find(r=>r.readyState==="open");if(n)return n;throw new Error("no sim connected")}function C(e,t,o){console.log(` ${o==="current sim"?"loaded":"opened"}: ${e} [${o}]`),console.log(` current sim: ${t.id}`),console.log(JSON.stringify({simId:t.id,url:t.url},null,2))}async function P(e,t,o){if(o.includes("--no-describe"))return;let n=process.env.SOOTSIM_QUIET_TARGET_NOTICE;process.env.SOOTSIM_QUIET_TARGET_NOTICE="1";try{await Ee(e,t,{stableMs:150,maxMs:400});let r=w(e,{commandTimeoutMs:3e3,simId:t,cliLabel:"open --describe",simIdSource:"flag"});try{let i=`(async () => {
|
|
4
4
|
const t = window.__sootsimTest
|
|
5
5
|
const ms = window.SootSim?.bridges?.mainShell
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var t=!0,e="1.0.0",o="public beta",n=`${o} \xB7 free until ${e}`,r="free for everyone until 1.0 \u2014 we send anonymous error and dependency data while you use it";export{t as a,e as b,o as c,n as d,r as e};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as Q,e as X}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as Q,e as X}from"./chunk-IIFZNK4R.js";import{d as J}from"./chunk-ECIHLBNE.js";import{c as q,e as Y,g as w}from"./chunk-HIQJTM66.js";import{a as D,b}from"./chunk-ZZOYYBLO.js";import{a as K}from"./chunk-LCUVF6MI.js";import{createHash as Te}from"crypto";import{readFileSync as te}from"fs";import{gzipSync as ne}from"zlib";function Z(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}function H(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 be(e){let t=H(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 ${r.status}: ${s.slice(0,200)}`)}}async function we(e,t=8,r){let s=0,o=0,a=e.length;await Promise.all(Array.from({length:Math.min(t,a)},async()=>{for(;s<a;){let u=e[s++];await be(u),o++,r?.(o,a)}}))}function ve(e,t,r,s){let o=[];o.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let a of e.files){let u=r.get(a.urlhash);u&&o.push({url:a.putUrl,contentType:a.contentType,bytes:u})}return e.events&&s?.eventsBytes&&o.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),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}),o}function Be(e){return e.replace(/\/+$/,"")}var _=class extends Error{constructor(r,s,o){super(r);this.status=s;this.phase=o;this.name="PresignedUploadError"}};async function ee(e){let t=Be(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-soot-admin-upload-bypass"]=e.adminBypassToken);let s=H(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 B=await o.text().catch(()=>"");throw new _(`init failed: ${o.status} ${B.slice(0,200)}`,o.status,"init")}let a=await o.json(),u=ve(a,e.bundleBytes,e.filesByHash,e.extras);await we(u,e.concurrency??8,e.onPutProgress);let y=H(3e4,"finalize"),p;try{p=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:a.token}),signal:y.signal})}finally{y.cancel()}if(!p.ok){let B=await p.text().catch(()=>"");throw new _(`finalize failed: ${p.status} ${B.slice(0,200)}`,p.status,"finalize")}let P=await p.json();return{init:a,finalize:P}}var ie=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://sootbean.com",ae=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",M="http://localhost:3000";async function Ie(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let t=await fetch(`${M}/api/preview/upload/init`,{method:"OPTIONS"});if(t.ok||t.status===204||t.status===405)return M}catch{}return ie}function v(e){return e.replace(/\/$/,"")}function Ue(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 Pe(e){try{let t=new URL(e).hostname.toLowerCase();return t==="sootbean.com"||t.endsWith(".sootbean.com")}catch{return!1}}function Se(e,t){return t?v(t):process.env.SOOTSIM_PREVIEW_ORIGIN?v(process.env.SOOTSIM_PREVIEW_ORIGIN):Ue(e)?v(e):Pe(e)?v(ae):v(e)}function xe(){console.log(`
|
|
3
3
|
sootsim upload \u2014 publish the current bundle as a /preview/<id> link
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
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,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{v as p}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{v as p}from"./chunk-JK3BWGI5.js";import{d as u,h as m,i as w}from"./chunk-HIQJTM66.js";var y={timeoutMs:1800,settleMs:48,startWindowMs:64};function c(e){return new Promise(t=>setTimeout(t,e))}function h(e){return e.includes("--json")}function S(e){process.stdout.write(`${JSON.stringify(e??null,null,2)}
|
|
3
3
|
`)}async function g(e,t,...r){return m(e,`__sootsimTest.${t}`,...r)}async function f(e,t,...r){return w(e,`SootSim.bridges.mainShell.${t}`,...r)}async function T(e,t={}){try{let r=await g(e,"waitForScreenTransitions",y);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 v(e,t,r,...n){let o=Date.now()+Math.max(0,r);for(;;)try{return await f(e,t,...n)}catch(s){if(!p(s)||Date.now()>=o)throw s;await c(50)}}async function x(e,t,r,n={}){let o=n.attempts??30,s=n.intervalMs??500,i=n.minNodeCount??10;for(let a=0;a<o;a++){let l=u(e,{commandTimeoutMs:t,simId:r});try{let d=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof d=="number"&&d>i)return{bridge:l,count:d}}catch{}l.close(),await c(s)}return null}async function _(e,t,r,n={}){let o=n.timeoutMs??8e3,s=n.intervalMs??250,i=Date.now()+o;for(;Date.now()<i;){let a=u(e,{commandTimeoutMs:t,simId:r});try{return await a.send({type:"evaluate",code:"1"}),a}catch{a.close()}await c(s)}return null}async function W(e,t={}){let r=t.timeoutMs??1e4,n=t.errorGraceMs??3e3,o=t.pollIntervalMs??200;return await e.send({type:"evaluate",code:`(async () => {
|
|
4
4
|
const start = Date.now()
|
|
5
5
|
const deadline = start + ${r}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as p}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as p}from"./chunk-VP52RZT7.js";import{d as c,e as l}from"./chunk-IIFZNK4R.js";import{a}from"./chunk-LCUVF6MI.js";async function g(e,t){if(t)return t.replace(/\/$/,"");if(e.kind==="session"&&e.origin)return e.origin.replace(/\/$/,"");let i=a();return i?.origin?i.origin.replace(/\/$/,""):(await p()).replace(/\/$/,"")}async function m(e,t={}){let i=c();if(i||(process.stderr.write(`
|
|
3
3
|
sootsim ${e} needs auth before it can check recording access.
|
|
4
4
|
|
|
5
5
|
pick one:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as P,b as v}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as P,b as v}from"./chunk-LCDWXJ6X.js";import{d as j}from"./chunk-E3DHOL7O.js";import{a as b}from"./chunk-ZZOYYBLO.js";import{execSync as A}from"child_process";import{existsSync as w,readFileSync as _,writeFileSync as x}from"fs";import{relative as B,resolve as d}from"path";import{existsSync as p,readFileSync as k,readdirSync as O,statSync as R}from"fs";import{basename as L,dirname as T,join as a}from"path";function D(e){let o=e;for(;;){if(p(a(o,"turbo.json"))||p(a(o,"nx.json"))||p(a(o,"lerna.json"))||p(a(o,"pnpm-workspace.yaml")))return o;let i=a(o,"package.json");if(p(i))try{if(JSON.parse(k(i,"utf8")).workspaces)return o}catch{}let r=T(o);if(r===o)break;o=r}return e}function W(e){return p(a(e,"bun.lock"))||p(a(e,"bun.lockb"))?"bun":p(a(e,"pnpm-lock.yaml"))?"pnpm":p(a(e,"yarn.lock"))?"yarn":"npm"}function J(e){if(p(a(e,"turbo.json")))return"turbo";if(p(a(e,"nx.json")))return"nx";if(p(a(e,"pnpm-workspace.yaml")))return"pnpm";let o=a(e,"package.json");if(p(o))try{if(JSON.parse(k(o,"utf8")).workspaces)return"npm-workspaces"}catch{}return"single"}function N(e){return e.one?"one":e.expo?"expo":e["react-native"]?"bare":"unknown"}function y(e){let o=a(e,"package.json");if(!p(o))return null;let i;try{i=JSON.parse(k(o,"utf8"))}catch{return null}let r={...i.dependencies,...i.devDependencies},s=N(r);return s==="unknown"?null:{dir:e,name:i.name||L(e),framework:s,hasViteConfig:p(a(e,"vite.config.ts"))||p(a(e,"vite.config.js")),hasMetroConfig:p(a(e,"metro.config.js"))||p(a(e,"metro.config.ts")),hasSootsimDependency:!!r.sootsim,devCommand:i.scripts?.dev||null}}function V(e){let o=[],i=a(e,"pnpm-workspace.yaml");if(p(i)){let t=k(i,"utf8").match(/packages:\s*\n((?:\s+-\s+.+\n?)+)/);if(t){let c=t[1].split(`
|
|
3
3
|
`).filter(Boolean);for(let n of c){let g=n.replace(/^\s*-\s*['"]?/,"").replace(/['"]?\s*$/,"");g&&o.push(...S(e,g))}}return o}let r=a(e,"package.json");if(p(r))try{let s=JSON.parse(k(r,"utf8")),t=Array.isArray(s.workspaces)?s.workspaces:s.workspaces?.packages||[];for(let c of t)o.push(...S(e,c))}catch{}return o}function S(e,o){let i=o.replace(/\/\*\*?$/,"").replace(/\*$/,""),r=a(e,i);if(!p(r))return[];try{return O(r).map(t=>a(r,t)).filter(t=>{try{return R(t).isDirectory()&&p(a(t,"package.json"))}catch{return!1}})}catch{return[]}}function M(e){let o=J(e),i=W(e);if(o==="single"){let c=y(e);return{root:e,type:o,packageManager:i,apps:c?[c]:[]}}let r=V(e),s=[],t=y(e);t&&s.push(t);for(let c of r){if(c===e)continue;let n=y(c);n&&s.push(n)}return{root:e,type:o,packageManager:i,apps:s}}function $(e){switch(e){case"bun":return"bun add -d sootsim";case"pnpm":return"pnpm add -D sootsim";case"yarn":return"yarn add -D sootsim";case"npm":return"npm install -D sootsim"}}async function ce(e){(e.includes("--help")||e.includes("-h"))&&(console.log(`
|
|
4
4
|
sootsim setup-repo \u2014 set up sootsim in your project
|
|
5
5
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
function d(t){let e=t.displayUrl||t.url;return t.status!=null?`${t.method} ${e} -> ${t.status}${t.statusText?` ${t.statusText}`:""}`:t.error?`${t.method} ${e} -> ${t.error}`:`${t.method} ${e}`}async function u(t,e,...o){return t.send({type:"call",path:`__sootsimTest.${e}`,args:o})}async function g(t,e={}){let o=await t.send({type:"evaluate",code:"window.__sootsimConsole?.count?.() || { errors: 0, warnings: 0, total: 0 }"});if(!o||typeof o!="object")return;let n=Math.max(0,Number(o.errors)||0),s=Math.max(0,Number(o.warnings)||0);if(n===0&&s===0)return;let r=[];if(n>0&&r.push(`${n} console error${n===1?"":"s"}`),s>0&&r.push(`${s} console warning${s===1?"":"s"}`),console.log(`
|
|
3
3
|
console: ${r.join(", ")}`),e.errorsCommand&&console.log(` inspect: ${e.errorsCommand}`),s>0&&e.warningsCommand&&console.log(` inspect: ${e.warningsCommand}`),!e.includeTail||n===0)return;let i=await t.send({type:"evaluate",code:"window.__sootsimConsole?.getErrors?.(5) || []"});if(!(!Array.isArray(i)||i.length===0)){console.log(`
|
|
4
4
|
recent console errors:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as s}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as s}from"./chunk-LCUVF6MI.js";import{w as o}from"./chunk-7PUVSCSF.js";function u(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!o()}function a(){if(u())return null;let e=process.env.SOOT_POSTHOG_API_KEY||process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let t=process.env.SOOT_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:t.replace(/\/+$/,"")}}function c(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:"anonymous-cli":"anonymous-cli"}function p(e){let t=e.identity??{},n={$lib:"soot-cli",source:t.source??"cli",...e.properties};return t.userId&&(n.userId=t.userId),t.repoId&&(n.repoId=t.repoId),t.installationId!=null&&(n.installationId=String(t.installationId)),t.shareId&&(n.shareId=t.shareId),t.plan&&(n.plan=t.plan),{event:e.event,distinct_id:c(t),properties:n,timestamp:new Date().toISOString()}}var r=[],l=!1;async function i(){if(r.length===0)return;let e=a();if(!e){r.length=0;return}let t=r.splice(0,r.length).map(p);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:t}),signal:AbortSignal.timeout(2e3)})}catch{}}function d(){l||(l=!0,process.on("beforeExit",()=>{i()}),process.on("exit",()=>{i()}))}function h(e){if(u())return;d();let t=null;try{t=s()?.user?.id??null}catch{t=null}r.push({...e,identity:{source:"cli",userId:t,...e.identity}})}async function g(){await i()}export{h as a,g as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-4ZA3J2BV.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-F5K7GAGR.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-F5K7GAGR.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-4ZA3J2BV.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.44 | (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-TXCWW2IX.js";import"./chunk-L7V75VQK.js";import"./chunk-ZNMOLPG5.js";import"./chunk-KWU3WMFD.js";import"./chunk-2Q5YKX76.js";import"./chunk-NMFN4EIE.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import"./chunk-ZP4PF72U.js";import"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as I,e as N,i as S}from"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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 t=Number(b(o,"--duration")??"5");if(!Number.isFinite(t)||t<=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 s=Number(b(o,"--max-buffer")??"100000");if(!Number.isFinite(s)||s<=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,(t+20)*1e3)});try{let l=await S(c,"SootSim.bridges.workerCpuProfileStart",{sampleInterval:a,maxBufferSize:s});if(!l?.started)return 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 ${t}s\u2026`),await new Promise(r=>setTimeout(r,t*1e3));let n=await S(c,"SootSim.bridges.workerCpuProfileStop");if(!n||n.error||!n.trace)return n?.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(` profile capture failed: ${n?.error??"no trace returned"}`),1;let P=B(n.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 n=l?.message??String(l);return console.error(` profile failed: ${n}`),/could not connect|ECONNREFUSED/i.test(n)&&console.error(" is sootsim running? (try `bun sootsim list`)"),1}finally{c.close()}}function B(o){let m=o.frames??[],t=o.resources??[],a=o.stacks??[],s=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?t[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=s.length>0?s[0].timestamp:0,l=c;for(let e=0;e<s.length;e++){let i=s[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 n=Math.round(c*1e3),P=s.length>0?Math.round(s[s.length-1].timestamp*1e3):n;return{nodes:u,startTime:n,endTime:P,samples:g,timeDeltas:h}}function b(o,m){let t=o.indexOf(m);if(!(t<0||t===o.length-1))return o[t+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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as T,b as _}from"./chunk-ZZOYYBLO.js";import"./chunk-LCUVF6MI.js";import"./chunk-5A7UO4OE.js";import{g as I,o as C,p as w,q as B}from"./chunk-7PUVSCSF.js";import{a as W}from"./chunk-4ZA3J2BV.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as f}from"./chunk-WLH4MLBC.js";import{A as x,B as T,C as v,y as D,z as O}from"./chunk-JK3BWGI5.js";import{b as A}from"./chunk-ZNMOLPG5.js";import{c as S,e as $,g as N}from"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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-2ORQQN7T.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as S}from"./chunk-MS5QBIOB.js";import"./chunk-EAMMI2FH.js";import"./chunk-54V7OVL6.js";import"./chunk-KVJEI5YO.js";import"./chunk-YROS5I43.js";import"./chunk-GLLMLIXC.js";import"./chunk-TXCWW2IX.js";import"./chunk-L7V75VQK.js";import"./chunk-ZNMOLPG5.js";import"./chunk-KWU3WMFD.js";import"./chunk-2Q5YKX76.js";import"./chunk-NMFN4EIE.js";import"./chunk-K4BRBIGO.js";import"./chunk-VP52RZT7.js";import"./chunk-IIFZNK4R.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import"./chunk-QB4INK6X.js";import"./chunk-ZP4PF72U.js";import"./chunk-6TO2XBUK.js";import"./chunk-RN5LEOFJ.js";import"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-ZZOYYBLO.js";import"./chunk-LCUVF6MI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-KVJEI5YO.js";import"./chunk-QB4INK6X.js";import"./chunk-6TO2XBUK.js";import{f as c,g as r,h as g}from"./chunk-RN5LEOFJ.js";import{c as d,e as l,h as a}from"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as v,e as E,h as b}from"./chunk-HIQJTM66.js";import{b as $}from"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-ZLOUP7JS.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-KWU3WMFD.js";import"./chunk-2Q5YKX76.js";import"./chunk-NMFN4EIE.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as g}from"./chunk-LCDWXJ6X.js";import"./chunk-ZLOUP7JS.js";import{a as v,f as h}from"./chunk-TXCWW2IX.js";import"./chunk-L7V75VQK.js";import"./chunk-ZNMOLPG5.js";import{b as f,g as u}from"./chunk-KWU3WMFD.js";import{a as p}from"./chunk-2Q5YKX76.js";import{c as m}from"./chunk-NMFN4EIE.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import"./chunk-ZP4PF72U.js";import"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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-YEGVQFNS.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c,d}from"./chunk-MS5QBIOB.js";import"./chunk-EAMMI2FH.js";import"./chunk-54V7OVL6.js";import"./chunk-KVJEI5YO.js";import"./chunk-YROS5I43.js";import"./chunk-GLLMLIXC.js";import"./chunk-TXCWW2IX.js";import"./chunk-L7V75VQK.js";import"./chunk-ZNMOLPG5.js";import"./chunk-KWU3WMFD.js";import"./chunk-2Q5YKX76.js";import"./chunk-NMFN4EIE.js";import"./chunk-K4BRBIGO.js";import"./chunk-VP52RZT7.js";import"./chunk-IIFZNK4R.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import"./chunk-QB4INK6X.js";import"./chunk-ZP4PF72U.js";import"./chunk-6TO2XBUK.js";import"./chunk-RN5LEOFJ.js";import"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-ZZOYYBLO.js";import"./chunk-LCUVF6MI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as n,c as r,d as l}from"./chunk-F76MMAMV.js";import"./chunk-OBIALIWI.js";import"./chunk-4ZA3J2BV.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.44 | (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-7PUVSCSF.js";import"./chunk-4ZA3J2BV.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};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as G}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as G}from"./chunk-F76MMAMV.js";import{a as Ce,b as De}from"./chunk-IMTTDIJJ.js";import{a as X,b as C,c as D,d as z,e as ce,f as ne,g as ot,h as st,i as xe}from"./chunk-WLH4MLBC.js";import{D as tt,a as Be,b as je,c as Le,d as Je,e as qe,f as be,g as we,h as We,i as He,j as Ke,k as Ue,l as ze,m as Ye,n as Ge,o as Xe,p as Ve,q as Qe,u as Ze,w as se,x as et}from"./chunk-JK3BWGI5.js";import{a as Re,e as le}from"./chunk-GLLMLIXC.js";import{b as nt,c as rt,i as it}from"./chunk-TXCWW2IX.js";import"./chunk-L7V75VQK.js";import{a as Ee}from"./chunk-ZNMOLPG5.js";import"./chunk-KWU3WMFD.js";import"./chunk-2Q5YKX76.js";import"./chunk-NMFN4EIE.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import{a as ge,c as ye,d as Ie}from"./chunk-POPZHYTD.js";import{a as Ne}from"./chunk-ZP4PF72U.js";import{c as Fe,e as Ae,f as Pe,g as Oe,h as he}from"./chunk-HIQJTM66.js";import{b as _e}from"./chunk-OBIALIWI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";import{existsSync as Lt,mkdirSync as Jt,readFileSync as qt,rmSync as at,writeFileSync as Wt}from"fs";import{tmpdir as Ht}from"os";import{dirname as Kt,join as Ut,resolve as zt}from"path";var re=1,Yt="SOOTSIM_INSPECT_NOTICE_PATH",Gt=300*1e3,Xt=15e3;function lt(){return zt(process.env[Yt]||Ut(Ht(),"sootsim-inspect-notice-state.json"))}function Vt(s,d){return Object.fromEntries(Object.entries(s).filter(([,a])=>typeof a?.signature=="string"&&Number.isFinite(a?.updatedAt)&&d-a.updatedAt<=Gt))}function Qt(s){let d=lt();if(!Lt(d))return{version:re,entries:{}};try{let a=JSON.parse(qt(d,"utf8"));return a.version!==re||!a.entries||typeof a.entries!="object"?(at(d,{force:!0}),{version:re,entries:{}}):{version:re,entries:Vt(a.entries,s)}}catch{return at(d,{force:!0}),{version:re,entries:{}}}}function Zt(s){let d=lt();Jt(Kt(d),{recursive:!0}),Wt(d,JSON.stringify(s,null,2)+`
|
|
3
3
|
`)}function eo(s,d){let a=d.trim()||"default";return`${s}:${a}`}function $e(s,d,a,l={}){let f=l.nowMs??Date.now(),i=l.cooldownMs??Xt,h=Qt(f),S=eo(s,d),I=h.entries[S];return I&&I.signature===a&&f-I.updatedAt<i?!1:(h.entries[S]={signature:a,updatedAt:f},Zt(h),!0)}async function ct(s,d={args:[]}){let a=await Be(s);if(C(d.args)){D(a);return}console.log(` nodes: ${a.nodes}`)}function Se(s,d){let a=s.indexOf(d);return a>=0&&a+1<s.length?s[a+1]:null}async function dt(s){let{bridge:d,args:a,positional:l}=s,f=a.includes("--verbose")||a.includes("-v"),i=C(a),h=f&&!i,S=a.includes("--watch")||a.includes("-w"),I=1e3,T=a.includes("--compact"),w=a.includes("--no-xy"),v=Se(a,"--testid-like"),_=Se(a,"--only"),M=Se(a,"--subtree"),R=l[1],c=R?/[*?]/.test(R):!1,J=!c&&!_?R:void 0,U=_??(c?R:void 0),E=async()=>{await ce(d,{verbose:h});let Y=await Je(d,{describe:!0,verbose:f,filter:J||"",testIdLike:v||void 0,onlyGlob:U||void 0,subtreeRoot:M||void 0,compact:T,hideXy:w}),W=Y?.tree,x=Y?.shell,N=Y?.keyboard;if(i){D({shell:x,tree:W??"",keyboard:N});return}if(x&&typeof x=="object"){let F=[x.state?`state=${x.state}`:null,x.activeApp?`app=${x.activeApp}`:null,x.showSwitcher?"switcher":null,x.switcherPhase&&x.switcherPhase!=="idle"?`phase=${x.switcherPhase}`:null].filter(Boolean);F.length>0&&console.log(` shell: ${F.join(" ")}`)}if(typeof W=="string"&&W.startsWith("__SUBTREE_NOT_FOUND__:")){let F=W.slice(22);console.log(` subtree root not found: ${F}`),G("subtree-root-not-found",F);return}if(!W){let F=Y?.nodeCount??0;console.log(" no matching nodes found"),!(J||v||U||M)&&F<10&&G("app-still-loading",F);return}if(console.log(W),!(J||v||U||M)&&!S&&W.split(`
|
|
4
4
|
`).length>=80&&G("describe-use-filters"),N&&N.visible){let F=N.spec,V=[F?.keyboardType?`type=${F.keyboardType}`:null,F?.returnKeyType&&F.returnKeyType!=="default"?`return=${F.returnKeyType}`:null,N.mode!=="letters"?`mode=${N.mode}`:null,N.shifted?"shift":null,N.capsLock?"caps":null,F?.autoCapitalize&&F.autoCapitalize!=="sentences"?`autoCap=${F.autoCapitalize}`:null,N.accessoryBarId?`accessory=${N.accessoryBarId}`:null].filter(Boolean);console.log(`
|
|
5
5
|
keyboard: ${V.join(" ")||"visible"}`)}};if(S)for(console.log(` watching... (Ctrl+C to stop)
|
|
@@ -135,7 +135,7 @@ import{a as G}from"./chunk-BVCZIJ2X.js";import{a as Ce,b as De}from"./chunk-Q26N
|
|
|
135
135
|
`);console.log(`${t??""}
|
|
136
136
|
|
|
137
137
|
${o}
|
|
138
|
-
`),process.exit(0)}let _=f.wsPort,M=f.simId,R=f.commandTimeoutMs;if(h==="list"&&l.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-
|
|
138
|
+
`),process.exit(0)}let _=f.wsPort,M=f.simId,R=f.commandTimeoutMs;if(h==="list"&&l.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-LRMIFMFF.js"),t=e();console.log(` available drivers (${t.length}):
|
|
139
139
|
`);let o=Math.max(...t.map(n=>n.id.length),6),r=Math.max(...t.map(n=>n.kind.length),4);for(let n of t){let u=n.available?"\u2713":"\u2717",m=n.id.padEnd(o),y=n.kind.padEnd(r);console.log(` ${u} ${m} ${y} ${n.description}`),n.available&&n.detail?console.log(` ${n.detail}`):!n.available&&n.reason&&console.log(` unavailable: ${n.reason}`)}return}let c=Ae(f),J=M||"default",U=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","list","wait","sleep"]);function E(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 L(e){let t=ut()?1200:350;try{let{settled:o,elapsed:r}=await oe({bridge:e,maxMs:t,pollMs:32,stablePolls:2});o||process.stderr.write(` \u26A0 auto-wait timed out after ${r??t}ms \u2014 next command may see mid-animation state. use \`sootsim do settle\` for a longer wait.
|
|
140
140
|
`)}catch{}}async function Y(){try{return await c.send({type:"evaluate",code:`(() => ({
|
|
141
141
|
console: window.__sootsimConsole?.count?.() || null,
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as o}from"./chunk-YWBUHBLD.js";import"./chunk-LCDWXJ6X.js";import"./chunk-E3DHOL7O.js";import"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-ZZOYYBLO.js";import"./chunk-LCUVF6MI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";async function t(n){console.error(" note: `sootsim install` is now `sootsim setup-repo`. forwarding\u2026\n"),await o(n)}export{t as runInstall};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as b}from"./chunk-LCDWXJ6X.js";import{a as x}from"./chunk-2Q5YKX76.js";import"./chunk-4ZA3J2BV.js";import{spawn as k,spawnSync as u}from"child_process";import{chmodSync as S,createWriteStream as E,existsSync as w,mkdirSync as y,renameSync as T,rmSync as g,statSync as P}from"fs";import{tmpdir as D}from"os";import{dirname as M,join as f,resolve as v}from"path";var h="https://sootbean.com/api/electron-release";function A(){let r=process.arch;if(process.platform==="darwin"){let o=r==="arm64"?"mac-arm64":"mac-x64",n=`sootsim-latest-${o}.dmg`;return{platform:o,filename:n,url:`${h}/${n}`,install:_}}if(process.platform==="linux"){let o="sootsim-latest-linux-x64.AppImage";return{platform:"linux-x64",filename:o,url:`${h}/${o}`,install:L}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:C}}return null}async function O({url:r,dest:o,onProgress:n}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${r})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");y(M(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,n?.(c,a)}}finally{await new Promise((l,p)=>{i.end(e=>e?p(e):l())})}}function I(r,o){let n=(r/1048576).toFixed(1);if(!o)return` ${n} MB`;let s=Math.min(100,Math.round(r/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${n} / ${t} MB`}async function _(r){let o=u("hdiutil",["attach","-nobrowse","-readonly",r],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let n=o.stdout.trim().split(`
|
|
3
3
|
`),t=n[n.length-1].split(" ").pop()?.trim();if(!t||!w(t))throw new Error(`could not determine dmg mount point (output: ${o.stdout})`);let a=f(t,"sootsim.app");if(!w(a))throw u("hdiutil",["detach","-force",t]),new Error(`sootsim.app not found inside ${t}`);let i="/Applications",d=v(process.env.HOME||"","Applications"),c=i;try{let m=f(i,`.sootsim-write-probe-${process.pid}`);u("touch",[m]),w(m)?g(m,{force:!0}):c=d}catch{c=d}c===d&&y(c,{recursive:!0});let l=f(c,"sootsim.app");w(l)&&g(l,{recursive:!0,force:!0});let p=u("cp",["-R",a,l]),e=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return e.status!==0&&console.warn(` warning: failed to unmount ${t} (${e.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function L(r){let o=v(process.env.HOME||"","Applications");y(o,{recursive:!0});let n=f(o,"sootsim.AppImage");return w(n)&&g(n,{force:!0}),T(r,n),S(n,493),n}async function C(r){return await new Promise((o,n)=>{let s=k("cmd",["/c","start",'""',"/wait",r],{stdio:"inherit"});s.once("error",n),s.once("exit",t=>{t===0?o():n(new Error(`installer exited with code ${t}`))})}),r}async function Y(r){(r.includes("--help")||r.includes("-h"))&&(console.log(`
|
|
4
4
|
sootsim install-desktop \u2014 download and install the optional desktop GUI
|
|
5
5
|
|
|
@@ -20,4 +20,4 @@ examples:
|
|
|
20
20
|
`),process.exit(0));let o=r.includes("--yes")||r.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,n=r.includes("--force"),s=x();if(s&&!n){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=A();if(t||(console.error(` no desktop build available for ${process.platform}/${process.arch}.`),console.error(" supported: darwin-arm64, darwin-x64, linux-x64, win32-x64"),process.exit(1)),console.log(` platform: ${t.platform}`),console.log(` download: ${t.url}`),console.log(),!o){if(!await b("download and install now?",!0)){console.log(" cancelled.");return}console.log()}let a=f(D(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
|
|
21
21
|
`);try{await O({url:t.url,dest:i,onProgress:(e,m)=>{let $=Date.now();$-d<100&&e<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${I(e,m)}`))}})}catch(e){g(a,{recursive:!0,force:!0}),console.error(`
|
|
22
22
|
download failed: ${e instanceof Error?e.message:String(e)}`),process.exit(1)}process.stdout.isTTY&&process.stdout.write(`
|
|
23
|
-
`);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-
|
|
23
|
+
`);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-COZXGX5D.js");try{let e=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${e}`)}catch(e){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:e instanceof Error?e.message:String(e)}}),await p(),console.error(` install failed: ${e instanceof Error?e.message:String(e)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{Y as runInstallDesktop};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as l,b as d,c as k,d as y,e as g}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as l,b as d,c as k,d as y,e as g}from"./chunk-IIFZNK4R.js";import{d as c}from"./chunk-LCUVF6MI.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";async function a(){let s=await c();return s?.token||(process.stderr.write(" sootsim keys ... needs you to be signed in.\n run `sootsim login` first.\n"),process.exit(1)),{origin:s.origin,token:s.token}}function f(s){if(!s)return"never";try{return new Date(s).toLocaleString()}catch{return s}}async function h(s){let i=s[0];if(!i||i==="--help"||i==="-h"){u();return}if(i==="list"){let{origin:o,token:e}=await a(),n=await fetch(`${o.replace(/\/$/,"")}/api/sootsim/billing/keys`,{headers:{authorization:`Bearer ${e}`}});n.ok||(console.error(` keys list failed (${n.status})`),process.exit(1));let{keys:r}=await n.json();if(r.length===0){console.log(" no keys. create one with `sootsim keys create <label>`.");return}for(let t of r)console.log(` ${t.keyPrefix}\u2026 ${t.label.padEnd(24)} scopes=${t.scopes.join(",")} last=${f(t.lastUsedAt)} id=${t.id}`);return}if(i==="create"){let o=s[1]?.trim();o||(console.error(" usage: sootsim keys create <label>"),process.exit(1));let{origin:e,token:n}=await a(),r=await fetch(`${e.replace(/\/$/,"")}/api/sootsim/billing/keys`,{method:"POST",headers:{authorization:`Bearer ${n}`,"content-type":"application/json"},body:JSON.stringify({label:o})});r.ok||(console.error(` keys create failed (${r.status}): ${await r.text()}`),process.exit(1));let t=await r.json();console.log(`
|
|
3
3
|
created: ${t.record.label} (${t.record.keyPrefix}\u2026)`),console.log(` scopes: ${t.record.scopes.join(",")}`),console.log(`
|
|
4
4
|
secret: ${t.secret}
|
|
5
5
|
`),console.log(` copy this now \u2014 we can't show it again.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-ZLOUP7JS.js";import{b as m}from"./chunk-KWU3WMFD.js";import{a as u}from"./chunk-2Q5YKX76.js";import"./chunk-NMFN4EIE.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import{D as c,E as r,F as l,y as s,z as a}from"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";import{spawn as p}from"child_process";import{existsSync as h}from"fs";async function I(n){if(n.includes("--help")||n.includes("-h")){console.log(`
|
|
3
3
|
sootsim launch \u2014 one-shot: install runtime if needed, start daemon, open app
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -13,4 +13,4 @@ options:
|
|
|
13
13
|
examples:
|
|
14
14
|
sootsim launch
|
|
15
15
|
sootsim launch --version 1.2.3
|
|
16
|
-
`);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-
|
|
16
|
+
`);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-T2X2XY72.js"),o=[];n.explicitVersion&&o.push(n.explicitVersion),n.channel!=="stable"&&o.push("--channel",n.channel),await t(["install",...o],{channel:n.channel})}async function d(){let n=r();if(l(n))return;console.log("sootsim: starting daemon");let e=w();p(e,["server","--quiet"],{detached:!0,stdio:"ignore",env:process.env}).unref();let t=Date.now()+8e3;for(;Date.now()<t;){let o=r();if(l(o))return;await g(150)}console.error(" daemon didn't become ready within 8s \u2014 check ~/.sootsim/ or run `sootsim server` in a terminal to see errors"),process.exit(1)}async function x(){u()||(console.error(" no sootsim desktop companion installed. run `sootsim install-desktop` to download electron + the shell."),process.exit(1));let e=await m.launch({});e.launched||(console.error(` ${e.message}`),process.exit(1)),console.log(` ${e.message}`)}function w(){let n=process.argv[1];return n&&h(n)?n:"sootsim"}function g(n){return new Promise(e=>setTimeout(e,n))}async function R(){s(),await d()}export{R as ensureDaemonRunning,I as runLaunch};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as f,d as m}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as f,d as m}from"./chunk-LCUVF6MI.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";import{exec as S}from"node:child_process";import{randomBytes as $}from"node:crypto";import _ from"node:http";var I=process.env.SOOTSIM_AUTH_ORIGIN||"https://sootbean.com",h="http://localhost:3000";async function x(t){if(t)return t;if(process.env.SOOTSIM_AUTH_ORIGIN)return process.env.SOOTSIM_AUTH_ORIGIN;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{if((await fetch(`${h}/api/auth/me`)).ok)return h}catch{}return I}function R(){console.log(`
|
|
3
3
|
sootsim login \u2014 sign in so desktop uploads can attach to your account
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -21,6 +21,6 @@ options:
|
|
|
21
21
|
<p style="color:#ccc">${t}</p>
|
|
22
22
|
</div>
|
|
23
23
|
</body>
|
|
24
|
-
</html>`}async function P(t){try{let o=await fetch(`${t.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(o.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!o.ok){let c=await o.text().catch(()=>"");return{ok:!1,error:`dev-login ${o.status}: ${c}`}}let e=await o.json();return e.token?{ok:!0,token:e.token,userId:e.user?.id,email:e.email}:{ok:!1,error:"dev-login response missing token"}}catch(o){return{ok:!1,error:o instanceof Error?o.message:"dev-login fetch failed"}}}function A(t){try{let o=new URL(t).hostname;return o==="localhost"||o==="127.0.0.1"||o.endsWith(".local")}catch{return!1}}async function G(t){(t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let o=[...t],e=await x(T(o,"--origin"));if(A(e)){console.log(` detected local origin (${e}) \u2014 signing in as dev user`);let r=await P(e);if(r.ok){f({token:r.token,user:r.userId?{id:r.userId,email:r.email}:null,origin:e,source:"cli"});let s=await m(e),l=s?.user?.email||r.email||s?.user?.id||r.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-
|
|
24
|
+
</html>`}async function P(t){try{let o=await fetch(`${t.replace(/\/$/,"")}/api/dev-login`,{method:"POST"});if(o.status===403)return{ok:!1,error:"dev-login disabled (not in dev mode)"};if(!o.ok){let c=await o.text().catch(()=>"");return{ok:!1,error:`dev-login ${o.status}: ${c}`}}let e=await o.json();return e.token?{ok:!0,token:e.token,userId:e.user?.id,email:e.email}:{ok:!1,error:"dev-login response missing token"}}catch(o){return{ok:!1,error:o instanceof Error?o.message:"dev-login fetch failed"}}}function A(t){try{let o=new URL(t).hostname;return o==="localhost"||o==="127.0.0.1"||o.endsWith(".local")}catch{return!1}}async function G(t){(t.includes("--help")||t.includes("-h"))&&(R(),process.exit(0));let o=[...t],e=await x(T(o,"--origin"));if(A(e)){console.log(` detected local origin (${e}) \u2014 signing in as dev user`);let r=await P(e);if(r.ok){f({token:r.token,user:r.userId?{id:r.userId,email:r.email}:null,origin:e,source:"cli"});let s=await m(e),l=s?.user?.email||r.email||s?.user?.id||r.userId,{trackCliEvent:n,flushCliTelemetry:a}=await import("./telemetry-COZXGX5D.js");n({event:"cli_login_succeeded",identity:{userId:r.userId??s?.user?.id??null},properties:{origin:e,mode:"dev"}}),await a(),console.log(` signed in${l?` as ${l}`:""} (dev)`);return}console.log(` dev-login not available (${r.error}); falling back to browser`)}let c=$(16).toString("hex"),i=await new Promise(r=>{let s=_.createServer((l,n)=>{try{let a=new URL(l.url||"/","http://127.0.0.1"),w=a.searchParams.get("state"),k=a.searchParams.get("token"),b=a.searchParams.get("email")||void 0,O=a.searchParams.get("userId")||void 0,g=a.searchParams.get("error");if(n.setHeader("content-type","text/html; charset=utf-8"),g){n.end(u(`sign-in failed: ${g}`)),r({ok:!1,error:g}),s.close();return}if(w!==c){n.end(u("state mismatch. close this tab and retry `sootsim login`.")),r({ok:!1,error:"state mismatch"}),s.close();return}if(!k){n.end(u("missing token. close this tab and retry `sootsim login`.")),r({ok:!1,error:"missing token"}),s.close();return}n.end(u("sign-in complete. you can return to the terminal.")),r({ok:!0,token:k,email:b,userId:O}),s.close()}catch(a){n.statusCode=500,n.end(u("sign-in callback failed. retry `sootsim login`.")),r({ok:!1,error:a instanceof Error?a.message:"callback failed"}),s.close()}});s.listen(0,"127.0.0.1",()=>{let l=s.address();if(!l||typeof l=="string"){r({ok:!1,error:"failed to bind callback server"}),s.close();return}let n=new URL(`${e.replace(/\/$/,"")}/auth/sootsim-cli`);n.searchParams.set("state",c),n.searchParams.set("port",String(l.port)),n.searchParams.set("sootbean",e),console.log(" opening browser for sootsim login..."),console.log(` waiting for callback on 127.0.0.1:${l.port}`),console.log(` if nothing opens, visit:
|
|
25
25
|
${n.toString()}
|
|
26
|
-
`),L(n.toString())})});if(!i.ok){let{trackCliEvent:r,flushCliTelemetry:s}=await import("./telemetry-
|
|
26
|
+
`),L(n.toString())})});if(!i.ok){let{trackCliEvent:r,flushCliTelemetry:s}=await import("./telemetry-COZXGX5D.js");r({event:"cli_login_failed",properties:{origin:e,error:i.error}}),await s(),console.error(` login failed: ${i.error}`),process.exit(1)}f({token:i.token,user:i.userId?{id:i.userId,email:i.email}:null,origin:e,source:"cli"});let d=await m(e),p=d?.user?.email||i.email||d?.user?.id||i.userId,{trackCliEvent:y,flushCliTelemetry:v}=await import("./telemetry-COZXGX5D.js");y({event:"cli_login_succeeded",identity:{userId:i.userId??d?.user?.id??null},properties:{origin:e}}),await v(),console.log(` signed in${p?` as ${p}`:""}`)}export{G as runLogin};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as r,b as i}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as r,b as i}from"./chunk-ZZOYYBLO.js";import{a as t,c as o}from"./chunk-LCUVF6MI.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";async function s(){let e=t();if(!e?.token){console.log(" not signed in");return}try{await fetch(`${e.origin.replace(/\/$/,"")}/api/auth/sign-out`,{method:"POST",headers:{authorization:`Bearer ${e.token}`}})}catch{}o(),r({event:"cli_logout",identity:{userId:e.user?.id??null},properties:{origin:e.origin}}),await i(),console.log(" signed out")}export{s as runLogout};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as h}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.44 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as h}from"./chunk-MS5QBIOB.js";import"./chunk-EAMMI2FH.js";import"./chunk-54V7OVL6.js";import"./chunk-KVJEI5YO.js";import"./chunk-YROS5I43.js";import"./chunk-GLLMLIXC.js";import"./chunk-TXCWW2IX.js";import"./chunk-L7V75VQK.js";import"./chunk-ZNMOLPG5.js";import"./chunk-KWU3WMFD.js";import"./chunk-2Q5YKX76.js";import"./chunk-NMFN4EIE.js";import"./chunk-K4BRBIGO.js";import"./chunk-VP52RZT7.js";import"./chunk-IIFZNK4R.js";import"./chunk-2TU7QJGH.js";import"./chunk-ECIHLBNE.js";import"./chunk-QB4INK6X.js";import"./chunk-ZP4PF72U.js";import"./chunk-6TO2XBUK.js";import"./chunk-RN5LEOFJ.js";import"./chunk-HIQJTM66.js";import"./chunk-OBIALIWI.js";import"./chunk-ZZOYYBLO.js";import"./chunk-LCUVF6MI.js";import"./chunk-5A7UO4OE.js";import"./chunk-7PUVSCSF.js";import"./chunk-4ZA3J2BV.js";import*as i from"fs";import*as l from"path";var y=[".maestro","maestro"];function b(){console.log(`
|
|
3
3
|
sootsim maestro \u2014 run maestro YAML flows against sootsim (drop-in)
|
|
4
4
|
|
|
5
5
|
usage:
|