sootsim 0.1.142 → 0.1.144
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-NAAIMWH7.js → agent-2OYPRNUE.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-XTURYUNI.js → agent-wrapper-LPKFMZBN.js} +2 -2
- package/dist-cli/chunks/{app-fonts-RSEABY54.js → app-fonts-3F2X43ER.js} +2 -2
- package/dist-cli/chunks/{assert-FLKFAP5S.js → assert-MUUX2DJC.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-EYENX7BT.js +2 -0
- package/dist-cli/chunks/beta-2JIATCYM.js +2 -0
- package/dist-cli/chunks/{camera-YW7TIZMC.js → camera-TBW2MKRE.js} +2 -2
- package/dist-cli/chunks/{chunk-GCCVK7DE.js → chunk-2OWIXUFA.js} +2 -2
- package/dist-cli/chunks/{chunk-C3GZZTY2.js → chunk-2WPNYDSO.js} +1 -1
- package/dist-cli/chunks/chunk-3FFDAVGT.js +119 -0
- package/dist-cli/chunks/chunk-3LW4V4ZM.js +2 -0
- package/dist-cli/chunks/chunk-3ZNPJADG.js +1 -0
- package/dist-cli/chunks/{chunk-OI5YSYX2.js → chunk-4CPUNUJC.js} +1 -1
- package/dist-cli/chunks/{chunk-6J5EKBUF.js → chunk-6KI36NXX.js} +2 -2
- package/dist-cli/chunks/{chunk-PQFNHOPP.js → chunk-73DPWPZU.js} +1 -1
- package/dist-cli/chunks/{chunk-XNHS44BQ.js → chunk-7R3BK6IY.js} +1 -1
- package/dist-cli/chunks/{chunk-WHTKAFVO.js → chunk-A3E5QVUN.js} +1 -1
- package/dist-cli/chunks/{chunk-UUKLS7ZA.js → chunk-A72YS45Y.js} +1 -1
- package/dist-cli/chunks/chunk-AJKVXCHV.js +5 -0
- package/dist-cli/chunks/{chunk-3EETVUZK.js → chunk-AKHWKREF.js} +1 -1
- package/dist-cli/chunks/{chunk-ZWIFZAXU.js → chunk-AV2DSEYZ.js} +2 -2
- package/dist-cli/chunks/{chunk-BZO4BFHL.js → chunk-BBPSMK2D.js} +2 -2
- package/dist-cli/chunks/{chunk-D6V27NP5.js → chunk-BCIZZLCX.js} +1 -1
- package/dist-cli/chunks/{chunk-UCPLYSBA.js → chunk-FQBF5HG6.js} +1 -1
- package/dist-cli/chunks/{chunk-FSKCHXES.js → chunk-FZXVYC4D.js} +2 -2
- package/dist-cli/chunks/chunk-GJR32NCU.js +1 -0
- package/dist-cli/chunks/{chunk-3OPQ44BF.js → chunk-HC43FXK7.js} +2 -2
- package/dist-cli/chunks/{chunk-LTYJMDYI.js → chunk-HVB4FNBH.js} +2 -2
- package/dist-cli/chunks/{chunk-MO6Q4PLZ.js → chunk-IAWQFSZ2.js} +2 -2
- package/dist-cli/chunks/chunk-KABTL7PQ.js +406 -0
- package/dist-cli/chunks/{chunk-KOZ5XDC7.js → chunk-KF7TXHAG.js} +3 -3
- package/dist-cli/chunks/{chunk-P7FJ6IE4.js → chunk-LEWUJGFD.js} +1 -1
- package/dist-cli/chunks/{chunk-R42X5C7W.js → chunk-MX66P64S.js} +1 -1
- package/dist-cli/chunks/{chunk-JVDKRU4Y.js → chunk-PN4QXNKU.js} +2 -2
- package/dist-cli/chunks/{chunk-YG4V3MOQ.js → chunk-QHCI5TZ6.js} +1 -1
- package/dist-cli/chunks/{chunk-3ITFZJ7S.js → chunk-QMTPTQHG.js} +2 -2
- package/dist-cli/chunks/{chunk-QJ2H2D5V.js → chunk-S6OUYII6.js} +2 -2
- package/dist-cli/chunks/{chunk-RQPGGNZW.js → chunk-T5SF5UGY.js} +1 -1
- package/dist-cli/chunks/{chunk-TKNYTKLF.js → chunk-TE2SHQPT.js} +1 -1
- package/dist-cli/chunks/{chunk-W5FZTYVP.js → chunk-TJXJCYCS.js} +1 -1
- package/dist-cli/chunks/{chunk-AIS5XNOM.js → chunk-TKMTONCA.js} +3 -3
- package/dist-cli/chunks/{chunk-RNNX77AX.js → chunk-TONLJPNX.js} +1 -1
- package/dist-cli/chunks/chunk-TVLQMXWV.js +1 -0
- package/dist-cli/chunks/{chunk-CHTLYKGS.js → chunk-UGRHYJUA.js} +2 -2
- package/dist-cli/chunks/{chunk-WEDVFO7O.js → chunk-UZO6PMW3.js} +2 -2
- package/dist-cli/chunks/{chunk-VGCBZCSG.js → chunk-VFXS73Q6.js} +2 -2
- package/dist-cli/chunks/{chunk-2SUXNIRB.js → chunk-W4KCLE5O.js} +2 -2
- package/dist-cli/chunks/{chunk-HAUBNMGA.js → chunk-XJVBNNIB.js} +2 -2
- package/dist-cli/chunks/{chunk-HL3XSORU.js → chunk-YV6RWCPO.js} +2 -2
- package/dist-cli/chunks/{chunk-O4YHBU62.js → chunk-Z52XC4UA.js} +2 -2
- package/dist-cli/chunks/{chunk-YIWBIAVG.js → chunk-ZODKBHVK.js} +2 -2
- package/dist-cli/chunks/{chunk-HJ6M2MSA.js → chunk-ZRVCZZCT.js} +2 -2
- package/dist-cli/chunks/cli-version-YEX2XZ7G.js +2 -0
- package/dist-cli/chunks/{compat-HLFCOAFE.js → compat-P64DATYR.js} +3 -3
- package/dist-cli/chunks/{config-YFXVAWO3.js → config-TDDQXUS5.js} +2 -2
- package/dist-cli/chunks/{control-I4OAASMO.js → control-SNZMPDL7.js} +2 -2
- package/dist-cli/chunks/{cpu-profile-OKH4Y467.js → cpu-profile-FR47V42J.js} +2 -2
- package/dist-cli/chunks/daemon-LHJUCC7B.js +67 -0
- package/dist-cli/chunks/{debug-AEHF4WWI.js → debug-26NR6JCY.js} +3 -3
- package/dist-cli/chunks/{detox-HLZCQK7Z.js → detox-F2KTINZX.js} +2 -2
- package/dist-cli/chunks/{device-WDLN7VOT.js → device-O5COOPDN.js} +2 -2
- package/dist-cli/chunks/{diagnose-3KKIW2KV.js → diagnose-PQMLUCBO.js} +2 -2
- package/dist-cli/chunks/drivers-W4SBNM4V.js +2 -0
- package/dist-cli/chunks/{electron-XRQZK2WQ.js → electron-ZBL3TH2F.js} +3 -3
- package/dist-cli/chunks/flow-QREXGRFN.js +2 -0
- package/dist-cli/chunks/help-RE6HG3KD.js +2 -0
- package/dist-cli/chunks/{hints-B63I5SSR.js → hints-DWE4FKYR.js} +2 -2
- package/dist-cli/chunks/{home-paths-BDQIBV2V.js → home-paths-N2S32DRH.js} +2 -2
- package/dist-cli/chunks/{inspect-7XVNDGN4.js → inspect-J3BLUHGJ.js} +3 -3
- package/dist-cli/chunks/install-NLKZNPCO.js +2 -0
- package/dist-cli/chunks/{install-desktop-JBQQTH3I.js → install-desktop-73H4DAAH.js} +3 -3
- package/dist-cli/chunks/{keys-IMBTM4HL.js → keys-R42T6X3W.js} +2 -2
- package/dist-cli/chunks/{launch-XU64UAEQ.js → launch-QGDSUNDW.js} +3 -3
- package/dist-cli/chunks/{login-63BFWUJD.js → login-BYCX25K6.js} +5 -5
- package/dist-cli/chunks/{logout-RHE2W3WL.js → logout-TZJXACIH.js} +2 -2
- package/dist-cli/chunks/{maestro-4CAIVMXK.js → maestro-VPK6R5NN.js} +2 -2
- package/dist-cli/chunks/optional-demo-registry-UH3YM447.js +2 -0
- package/dist-cli/chunks/{preview-XZYX3SSZ.js → preview-GJ7MVSHM.js} +2 -2
- package/dist-cli/chunks/{profile-NNNFLZ6K.js → profile-2RAV3UZS.js} +2 -2
- package/dist-cli/chunks/{react-45J3NYF6.js → react-QE7UHEFS.js} +2 -2
- package/dist-cli/chunks/{record-QEON42UG.js → record-YYL4A7DO.js} +2 -2
- package/dist-cli/chunks/runtime-C4CLOL7U.js +2 -0
- package/dist-cli/chunks/{runtime-delivery-LGV6QPZS.js → runtime-delivery-2G4PGXGK.js} +2 -2
- package/dist-cli/chunks/{screenshot-SW2ZM723.js → screenshot-BIVF76SC.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-DSEJREME.js → screenshot-mode-OKAH3ZLK.js} +2 -2
- package/dist-cli/chunks/{screenshots-QWUZGYAS.js → screenshots-AVJANXAQ.js} +2 -2
- package/dist-cli/chunks/{server-6PTAPUIC.js → server-6SFAUUGK.js} +3 -3
- package/dist-cli/chunks/setup-repo-CRCQPW3Y.js +2 -0
- package/dist-cli/chunks/{skills-OAKG5VHJ.js → skills-7APKWTBO.js} +2 -2
- package/dist-cli/chunks/{start-3QVTLFG7.js → start-2GETTWND.js} +4 -4
- package/dist-cli/chunks/store-YFAIUHAS.js +2 -0
- package/dist-cli/chunks/telemetry-LUP4L5RW.js +2 -0
- package/dist-cli/chunks/{test-PYY6TAZF.js → test-V5HHXSKL.js} +3 -3
- package/dist-cli/chunks/{three-mode-4CJYCCE6.js → three-mode-UVIEP3CE.js} +2 -2
- package/dist-cli/chunks/{timeline-C4WE3FQZ.js → timeline-HVEKSWHF.js} +2 -2
- package/dist-cli/chunks/{upgrade-PY3F4JQ6.js → upgrade-FRHXNAYO.js} +2 -2
- package/dist-cli/chunks/upload-NWHZULFU.js +2 -0
- package/dist-cli/chunks/{version-CVDLRIWC.js → version-CBDBUHCC.js} +2 -2
- package/dist-cli/chunks/{web-DWUYDFQ3.js → web-DMUBG5QR.js} +2 -2
- package/dist-cli/chunks/{what-happened-6NQLDVJC.js → what-happened-3J4DEIRJ.js} +2 -2
- package/dist-cli/chunks/{whoami-WK3UUIOA.js → whoami-BSPU6JP4.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/beta.cjs +1 -1
- package/dist-lib/beta.mjs +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/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +5 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +5 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +85 -20
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/scripts/dev-server-scanner.ts +23 -0
- package/dist-cli/chunks/auto-bootstrap-UTDQXKT2.js +0 -2
- package/dist-cli/chunks/beta-WOG3OLTT.js +0 -2
- package/dist-cli/chunks/chunk-5PZ7JGND.js +0 -2
- package/dist-cli/chunks/chunk-BGIDIZGS.js +0 -1
- package/dist-cli/chunks/chunk-ITJU4NUU.js +0 -1
- package/dist-cli/chunks/chunk-QJKMMHUB.js +0 -406
- package/dist-cli/chunks/chunk-SM3OY52S.js +0 -119
- package/dist-cli/chunks/chunk-SN3MJYP7.js +0 -1
- package/dist-cli/chunks/chunk-XZHTKBH7.js +0 -5
- package/dist-cli/chunks/cli-version-IRAJSCVW.js +0 -2
- package/dist-cli/chunks/daemon-SI2HN567.js +0 -66
- package/dist-cli/chunks/drivers-G6Y3D5KN.js +0 -2
- package/dist-cli/chunks/flow-U2Y6PHQY.js +0 -2
- package/dist-cli/chunks/help-7TWUPXUX.js +0 -2
- package/dist-cli/chunks/install-UJ4KBTQ4.js +0 -2
- package/dist-cli/chunks/optional-demo-registry-BTUMTEBH.js +0 -2
- package/dist-cli/chunks/runtime-2LEYVXKV.js +0 -2
- package/dist-cli/chunks/setup-repo-3EBO7HQE.js +0 -2
- package/dist-cli/chunks/store-HKA3ET4T.js +0 -2
- package/dist-cli/chunks/telemetry-6ORWTXX5.js +0 -2
- package/dist-cli/chunks/upload-NFFWJLCQ.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as u}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as u}from"./chunk-2OWIXUFA.js";import{B as g,G as l,H as m,h as p,i as h,k as w}from"./chunk-MX66P64S.js";import{closeSync as k,existsSync as f,openSync as P,readSync as S,statSync as b}from"fs";import{homedir as T}from"os";import{resolve as D}from"path";import{WebSocket as $}from"ws";var L=6e4;async function E(){let e=g();if(e&&f(w(e)))return;console.log(" first run \u2014 installing sootsim engine runtime (~6 MB)...");let{runRuntime:t}=await import("./runtime-C4CLOL7U.js");await t(["install"],{})}function W(e,t){return B(e)??t??u()}async function x(e=u(),t=L){if(await c(e,250)||await c(e,1500))return;let n=l();if(n&&m(n)){if(n.bootstrapping===!0&&(await v(t),await c(n.bridgePort,500)))return;throw new Error(`sootsim daemon lockfile is fresh (port ${n.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`)}if(h()){let r=p()?"dev workstations":"dev checkouts";throw new Error(`sootsim bridge daemon is not running on port ${e}.
|
|
3
3
|
${r} don't run a standalone daemon \u2014 the live \`bun dev\` stack hosts the
|
|
4
4
|
bridge in-process on :${e}. start the dev stack (\`bun dev\`) so the CLI can
|
|
5
5
|
reach it, or set SOOTSIM_FORCE_DAEMON_INSTALL=1 to run \`bun sootsim server\`
|
|
6
|
-
standalone here on purpose.`)}console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-
|
|
6
|
+
standalone here on purpose.`)}console.log(" registering sootsim bridge daemon...");let{daemonInstall:o}=await import("./daemon-LHJUCC7B.js");try{await o({port:e,force:!0})}catch(r){let s=r instanceof Error?r.message:String(r);throw new Error(`${s}
|
|
7
7
|
if this keeps failing, run \`sootsim daemon uninstall\` and retry, or run \`sootsim server\` in a persistent shell as a workaround.`)}console.log(" waiting for runtime to come online...");let i=process.platform==="darwin"?O():null;try{await v(t);let r=Date.now()+5e3;for(;Date.now()<r;){if(await c(e,500))return;await new Promise(s=>setTimeout(s,200))}throw new Error(`daemon registered but the bridge never bound on port ${e} \u2014 see ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}finally{i?.stop()}}async function C(e=u()){await E(),await x(e)}function B(e){for(let t=0;t<e.length;t++){let n=e[t];if((n==="--port"||n==="-p")&&e[t+1]){let o=Number(e[t+1]);return Number.isFinite(o)?o:void 0}if(n.startsWith("--port=")){let o=Number(n.slice(7));return Number.isFinite(o)?o:void 0}}}function c(e,t){return new Promise(n=>{let o=new $(`ws://127.0.0.1:${e}`,{handshakeTimeout:t}),i=!1,r=s=>{if(!i){i=!0;try{o.close()}catch{}n(s)}};o.once("open",()=>r(!0)),o.once("error",()=>r(!1)),setTimeout(()=>r(!1),t)})}async function v(e){let t=Date.now()+e,n;for(;Date.now()<t;){let o=l();if(o&&m(o)){if(o.bootstrapping!==!0)return;o.bootstrapping!==n&&(n=o.bootstrapping)}await new Promise(i=>setTimeout(i,250))}throw new Error(`daemon did not finish bootstrapping within ${Math.round(e/1e3)}s \u2014 check ${d()} (mac) or \`journalctl --user -u sootsim-server\` (linux).`)}function d(){return D(T(),"Library/Logs/sootsim/server.err.log")}function O(){let e=d(),t=0;try{f(e)&&(t=b(e).size)}catch{}let n=!1,o=()=>{if(!n){try{if(f(e)){let i=b(e).size;if(i>t){let r=Buffer.alloc(i-t),s=P(e,"r");try{S(s,r,0,r.length,t)}finally{k(s)}t=i;for(let y of r.toString("utf8").split(/\r?\n/)){let a=y.trim();a&&(a.startsWith("sootsim:")||a.startsWith("sootsim "))&&console.log(` ${a}`)}}else i<t&&(t=i)}}catch{}setTimeout(o,250)}};return o(),{stop:()=>{n=!0}}}export{E as a,W as b,x as c,C as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{createHash as b}from"node:crypto";import g from"node:fs";import{createRequire as S}from"node:module";import u from"node:path";var y=/\.(ttf|otf|woff|woff2)$/i;function P(t,n,r){if(!t||typeof t!="object")return;let o=t.fonts;if(Array.isArray(o))for(let i of o)typeof i=="string"&&r.push(i);let e=t[n];if(!e||typeof e!="object")return;let s=e.fonts;if(Array.isArray(s))for(let i of s){if(typeof i=="string"){r.push(i);continue}if(!i||typeof i!="object")continue;let c=i.fontDefinitions;if(Array.isArray(c))for(let a of c){if(!a||typeof a!="object")continue;let p=a.path;typeof p=="string"&&r.push(p)}}}function m(t,n){if(!Array.isArray(t))return[];let r=[];for(let o of t){let e=Array.isArray(o)?o[0]:o;if(typeof e!="string"||!/(^|\/)expo-font$/.test(e))continue;let s=Array.isArray(o)?o[1]??{}:{};P(s,n,r)}return r}function C(t){return t.slice(t.lastIndexOf("/")+1).replace(y,"")}function h(t,n){let r=n.replace(/\/+$/,""),o=new Set,e=[];for(let s of t){let i=s.replace(/^\.\//,"").replace(/^\/+/,"");!i||o.has(i)||(o.add(i),y.test(i)&&e.push({family:C(i),url:`${r}/assets/${i}`}))}return e}var d=S(import.meta.url);function x(t){try{let n=new URL(t),r=n.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r))return n.origin}catch{}return null}var R=["app.config.js","app.config.ts","app.config.cjs","app.config.mjs","app.json"];function w(t){for(let n of R)try{if(g.statSync(u.join(t,n)).isFile())return!0}catch{}return!1}var j=new Set(["node_modules","artifacts","dist","build","out","coverage","tmp","public","ios","android","macos","windows","__fixtures__","__tests__","examples","example"]);function F(t,n){w(t)&&n.push(t);let r;try{r=g.readdirSync(t,{withFileTypes:!0})}catch{return}for(let o of r)o.isDirectory()&&(o.name.startsWith(".")||j.has(o.name)||F(u.join(t,o.name),n))}function _(t){try{return g.statSync(u.join(t,"package.json")).isFile()}catch{return!1}}function I(t){let n=x(t.bundleUrl);if(!n)return[];let r=t.repoDir||process.env.SOOT_REPO_DIR,o=r?u.resolve(r):process.cwd();if(!r&&!_(o))return[];let e=[];if(r)F(o,e),e.includes(o)||e.push(o);else{if(!w(o))return[];e.push(o)}if(e.length===0)return[];let s=(t.platform||process.env.SOOT_PLATFORM||"ios").toLowerCase(),i=null;try{let l=d.resolve("@expo/config",{paths:[...e,o]}),f=d(l);typeof f.getConfig=="function"&&(i=f.getConfig)}catch{}if(!i)return[];let c;for(let l of e)try{let f=i(l,{skipSDKVersionRequirement:!0});if(f?.exp&&typeof f.exp=="object"){let A=f.exp.plugins;if(Array.isArray(A)){c=f.exp;break}}}catch{}if(!c||typeof c!="object")return[];let a=c.plugins;if(!Array.isArray(a))return[];let p=m(a,s==="android"?"android":"ios");return h(p,n)}async function L(t,n){let r=x(t);if(!r)return null;let o=new AbortController,e=setTimeout(()=>o.abort(),n?.timeoutMs??1500);try{let s=await fetch(`${r}/`,{headers:{"expo-platform":"ios",Accept:"application/json"},signal:o.signal});if(!s.ok)return null;let c=(await s.json())?.extra?.expoClient?._internal?.projectRoot;return typeof c=="string"&&c.length>0?c:null}catch{return null}finally{clearTimeout(e)}}function M(t){return t.map(n=>`${encodeURIComponent(n.url)}::${encodeURIComponent(n.family)}`).join(",")}function k(t){let n=[];for(let r of t.split(",")){let o=r.trim();if(!o)continue;let e=o.indexOf("::"),s=e===-1?o:o.slice(0,e);try{n.push(decodeURIComponent(s))}catch{n.push(s)}}return n.filter(Boolean)}function D(t){let n=(t.split("?")[0].split(".").pop()||"").toLowerCase();return n==="ttf"?"font/ttf":n==="otf"?"font/otf":n==="woff"?"font/woff":n==="woff2"?"font/woff2":"application/octet-stream"}async function G(t,n){let r=[],o=new Set;for(let e of k(t)){let s=b("sha256").update(e).digest("hex");if(!o.has(s)){o.add(s);try{let i=await fetch(e);if(!i.ok){n?.onError?.(e,new Error(`${i.status} ${i.statusText}`));continue}let c=new Uint8Array(await i.arrayBuffer());r.push({url:e,urlhash:s,contentType:D(e),bytes:c}),n?.onStaged?.({url:e,byteLength:c.byteLength})}catch(i){n?.onError?.(e,i)}}}return r}export{I as a,L as b,M as c,G as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as t}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as t}from"./chunk-XJVBNNIB.js";import{a as p,b as m,c as a}from"./chunk-3FFDAVGT.js";import{a as r}from"./chunk-3LW4V4ZM.js";import{a as l}from"./chunk-73DPWPZU.js";import{a as u,d}from"./chunk-FQBF5HG6.js";import{B as i}from"./chunk-MX66P64S.js";function c(){let o=i();return`sootsim CLI v${l()} \xB7 runtime ${o?`v${o}`:"not installed"}`}function S(){let o=m({bridgePort:7668,defaultShellUrl:r},t()),e=`
|
|
3
3
|
${d}
|
|
4
4
|
`;console.log(`${c()}
|
|
5
5
|
${e}${o}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as P,b as S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as P,b as S}from"./chunk-AKHWKREF.js";import{d as v}from"./chunk-TKMTONCA.js";import{a as j}from"./chunk-ZODKBHVK.js";import{execSync as A}from"child_process";import{existsSync as k,readFileSync as E,writeFileSync as b}from"fs";import{relative as B,resolve as g}from"path";import{existsSync as p,readFileSync as h,readdirSync as O,statSync as L}from"fs";import{basename as R,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(h(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(h(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 x(e){let o=a(e,"package.json");if(!p(o))return null;let i;try{i=JSON.parse(h(o,"utf8"))}catch{return null}let r={...i.dependencies,...i.devDependencies},s=N(r);return s==="unknown"?null:{dir:e,name:i.name||R(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=h(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 m=n.replace(/^\s*-\s*['"]?/,"").replace(/['"]?\s*$/,"");m&&o.push(...$(e,m))}}return o}let r=a(e,"package.json");if(p(r))try{let s=JSON.parse(h(r,"utf8")),t=Array.isArray(s.workspaces)?s.workspaces:s.workspaces?.packages||[];for(let c of t)o.push(...$(e,c))}catch{}return o}function $(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 L(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=x(e);return{root:e,type:o,packageManager:i,apps:c?[c]:[]}}let r=V(e),s=[],t=x(e);t&&s.push(t);for(let c of r){if(c===e)continue;let n=x(c);n&&s.push(n)}return{root:e,type:o,packageManager:i,apps:s}}function C(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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as Ns}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as Ns}from"./chunk-TE2SHQPT.js";var hi=`(async () => {
|
|
3
3
|
try { localStorage.clear() } catch {}
|
|
4
4
|
try { sessionStorage.clear() } catch {}
|
|
5
5
|
try {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as s}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as s}from"./chunk-6KI36NXX.js";import{n as o}from"./chunk-MX66P64S.js";import{chmodSync as p,existsSync as d,mkdirSync as g,readFileSync as I,rmSync as f,writeFileSync as _}from"node:fs";import{dirname as y,join as h,resolve as k}from"node:path";function i(){return h(o(),"credentials.json")}function S(){let n=i();if(!d(n))return null;try{let t=JSON.parse(I(n,"utf8"));return t.version!==1||typeof t.apiKey!="string"||!t.apiKey.startsWith("sk_sootsim_")?null:t.apiKey}catch{return null}}function w(n){if(!n.startsWith("sk_sootsim_"))throw new Error("api key must start with sk_sootsim_");let t=i();g(y(k(t)),{recursive:!0}),_(t,JSON.stringify({version:1,apiKey:n,savedAt:new Date().toISOString()},null,2)+`
|
|
3
3
|
`);try{p(t,384)}catch{}}function E(){f(i(),{force:!0})}var m=["ghs_","ghp_","gho_","ghu_","github_pat_"];function O(n){return!!(n&&n.length>=20&&m.some(t=>n.startsWith(t)))}function A(){let n=process.env.SOOT_INSTALLATION_TOKEN?.trim(),t=process.env.GITHUB_TOKEN?.trim(),r=n||t;if(!O(r))return null;let e=(process.env.SOOT_REPO||process.env.GITHUB_REPOSITORY||"").trim();if(!e)return null;let[l,u]=e.includes("/")?e.split("/",2):[null,null],c=(process.env.SOOT_REPO_ID||process.env.GITHUB_REPOSITORY_ID||"").trim(),a=(process.env.SOOT_INSTALLATION_ID||process.env.GITHUB_APP_INSTALLATION_ID||"").trim();return{kind:"github",token:r,repoId:e,repositoryId:c||null,owner:l||null,repo:u||null,installationId:a||null,source:n?"soot-runner":"github-actions"}}function x(){let n=process.env.SOOTSIM_API_KEY?.trim();if(n&&n.startsWith("sk_sootsim_"))return{kind:"api-key",secret:n,source:"env"};let t=A();if(t)return t;let r=S();if(r)return{kind:"api-key",secret:r,source:"file"};let e=s();return e?.token?{kind:"session",token:e.token,origin:e.origin}:null}function H(n){return n.kind==="api-key"?`Bearer ${n.secret}`:`Bearer ${n.token}`}function N(n){return!n||n.kind!=="github"?null:{repoId:n.repoId,owner:n.owner??void 0,repo:n.repo??void 0,installationId:n.installationId}}export{S as a,w as b,E as c,x as d,H as e,N as f};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{i as n}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{i as n}from"./chunk-A72YS45Y.js";var i=[];for(let[t,e]of Object.entries(n))e.cliFlag&&i.push({name:`--${e.cliFlag}`,short:e.cliFlagShort?`-${e.cliFlagShort}`:void 0,key:t,type:e.type==="enum"?"string":e.type,description:e.description,options:e.options,default:e.default});var a=i;function g(){let t=[];for(let e of a){let s=e.short?`${e.short}, ${e.name}`:` ${e.name}`,o=e.options?` [${e.options.join("|")}]`:"",r=e.default!==void 0?` (default: ${e.default})`:"";t.push(` ${s.padEnd(24)}${e.description}${o}${r}`)}return t.join(`
|
|
3
3
|
`)}export{g as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as y}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as y}from"./chunk-4CPUNUJC.js";import{existsSync as S,mkdirSync as h,readFileSync as b,writeFileSync as H,rmSync as p}from"fs";import{tmpdir as m}from"os";import{dirname as v,join as w}from"path";var d=new Map;function s(e,r){d.set(e,r)}var c=1;function i(){return w(m(),`sootsim-cli-hints-${y()}.json`)}function l(){return w(m(),"sootsim-cli-hints-global.json")}function u(e){if(!S(e))return{version:c,shown:{}};try{let r=JSON.parse(b(e,"utf8"));return r?.version!==c||!r?.shown?{version:c,shown:{}}:r}catch{return{version:c,shown:{}}}}function f(e,r){try{h(v(e),{recursive:!0}),H(e,JSON.stringify(r)+`
|
|
3
3
|
`)}catch{}}function F(){let e=(process.env.SOOTSIM_HINTS||"").toLowerCase();return e==="off"||e==="0"||e==="false"?"off":e==="always"||e==="verbose"?"always":"normal"}function x(e,r){let o=F();if(o==="off")return!1;if(o==="always"||r==="always")return!0;let n=Date.now();if(r==="once-per-identity"){let t=u(i());return t.shown[e]?!1:(t.shown[e]=n,f(i(),t),!0)}if(r==="once-ever"){let t=u(l());return t.shown[e]?!1:(t.shown[e]=n,f(l(),t),!0)}if(typeof r=="object"&&"cooldownMs"in r){let t=u(i()),a=t.shown[e]??0;return n-a<r.cooldownMs?!1:(t.shown[e]=n,f(i(),t),!0)}return!0}function k(e,...r){let o=d.get(e);if(!o)return process.env.SOOTSIM_HINTS_DEBUG&&console.error(` [hints] no hint registered for id "${e}"`),!1;if(!x(e,o.frequency))return!1;let n=o.render(...r);if(n==null)return!1;let t=Array.isArray(n)?n:[n],a=o.stream==="error"?console.error:console.log;for(let g of t)a(` hint: ${g}`);return!0}function M(){p(i(),{force:!0})}function O(){p(l(),{force:!0})}function T(){return Array.from(d.entries()).map(([e,r])=>({id:e,frequency:r.frequency}))}s("app-still-loading",{frequency:{cooldownMs:6e4},render:e=>`app may still be loading (${e} nodes). run \`sootsim wait ready\` first.`});s("wait-selector-for-missing-testid",{frequency:"once-per-identity",render:e=>`sootsim wait selector ${e}`,stream:"error"});s("prefer-cli-over-eval",{frequency:"once-per-identity",render:e=>e.length?["try the CLI shortcut instead:",...e.map(r=>` ${r}`)]:null,stream:"error"});s("describe-use-filters",{frequency:"once-per-identity",render:()=>["describe output is long. narrow it with:"," sootsim describe --only '*Bottom Sheet*'"," sootsim describe --testid-like 'swap-*'"," sootsim describe --subtree <testID>"]});s("describe-filter-context",{frequency:"once-per-identity",render:()=>["filtered describe is search output, not current-route proof.","run `sootsim describe` without filters after navigation; clipped nodes are marked `(clipped:...)`."]});s("subtree-root-not-found",{frequency:"always",render:e=>`no node with testID/id "${e}" \u2014 try \`sootsim find --testid ${e}\` to discover available ids.`,stream:"error"});export{k as a,M as b,O as c,T as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{g as w,i as u,j as m,k as l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{g as w,i as u,j as m,k as l}from"./chunk-A72YS45Y.js";var p="sootsim:settings",v=["errorReporting","colorScheme","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","agentProvider","onboardingComplete","betaConsentVersion","detailedTelemetry"];function S(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function g(e){let t={};for(let n of v){if(!(n in e))continue;let r=e[n],o=u[n];o.validate&&!o.validate(r)||o.options&&!o.options.includes(r)||(t[n]=r)}return t}function h(e){let t={};for(let n of v)t[n]=e[n];return t}function _(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(p);return e?g(JSON.parse(e)):{}}catch{return{}}}function V(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(p,JSON.stringify(h(e)))}catch{}}function E(){let t=S()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:g(t)}function K(e){let t=S();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:h(e)})}catch{}}function k(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=k()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!k())return;let t={settings:h(e)};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function b(){let e=_(),t=j(),n=E();return{...e,...t,...n}}function R(e){V(e),K(e),D(e)}function C(e){if(typeof window>"u")return()=>{};let t=i=>{if(!(i.key!==p||i.newValue==null))try{e(g(JSON.parse(i.newValue)))}catch{}};window.addEventListener("storage",t);let n=S(),r;n?.onSharedConfigChanged&&(r=n.onSharedConfigChanged(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))}));let c=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))});return()=>{window.removeEventListener("storage",t),r?.(),c?.()}}var M=l(),P=b();for(let e of Object.keys(m()))delete P[e];var s={...M,...P},f=[],a=null;function y(){for(let e of f)e();R(s)}C(e=>{let t={...s},n=!1;for(let[r,o]of Object.entries(e)){let c=r;t[c]!==o&&(t[c]=o,n=!0)}if(n){s=t,a=null;for(let r of f)r()}});var L={get(e){return s[e]},set(e,t){let n=u[e];n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]!==t&&(s={...s,[e]:t},e==="deviceModel"&&(a=null),y())},getAll(){return s},apply(e){let t=!1,n={...s};for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let c=r,i=u[c];i&&(i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||n[c]!==o&&(n[c]=o,t=!0))}t&&(s=n,a=null,y())},reset(){s=l(),a=null,y()},subscribe(e){return f.push(e),()=>{f=f.filter(t=>t!==e)}},getDeviceSpec(){return a||(a=w(s.deviceModel)),a},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{L as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as s}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as s}from"./chunk-6KI36NXX.js";import{y as o}from"./chunk-MX66P64S.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.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",()=>void i()),process.on("exit",()=>void 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{g as u}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{g as u}from"./chunk-A72YS45Y.js";var S=52,l=18,h=42,x=96,g=54,E=1.5,$="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",w=1;function y(e){let t=u(e),r=t.scale,o=!t.dynamicIsland&&t.homeIndicatorHeight===0&&t.cornerRadius===0,n=t.width,i=t.height,a=o?t.width+l*2:t.width+28,d=o?t.height+h+x:t.height+28,c=9.5,b=w,p=a+c*2,m=d+w*2,f=c+(o?l:14),B=o?h:14,H=o?S:t.cornerRadius+14,v=[{side:"right",top:t.hardwareButtons.lock.top,height:t.hardwareButtons.lock.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.ringToggle.top,height:t.hardwareButtons.ringToggle.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeUp.top,height:t.hardwareButtons.volumeUp.height,width:t.hardwareButtons.width},{side:"left",top:t.hardwareButtons.volumeDown.top,height:t.hardwareButtons.volumeDown.height,width:t.hardwareButtons.width}];return{model:e,renderScale:r,outerWidth:Math.round(p*r),outerHeight:Math.round(m*r),logicalOuterWidth:p,logicalOuterHeight:m,logicalFrameWidth:a,logicalFrameHeight:d,logicalFrameLeft:c,logicalFrameTop:b,logicalScreenWidth:n,logicalScreenHeight:i,logicalScreenLeft:f,logicalScreenTop:B,logicalScreenRadius:o?0:t.cornerRadius,logicalFrameRadius:H,frameBackground:o?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:o?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:o?null:$,buttons:v,legacyHomeButton:o?{top:h+t.height+(x-g)/2,left:t.width/2-g/2+l,size:g,ring:E}:null,showHomeIndicator:t.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:t.homeIndicatorHeight}}function L(e){let t=e.side==="right",r=t?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
|
|
3
3
|
<div
|
|
4
4
|
aria-hidden="true"
|
|
5
5
|
style="
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-TE2SHQPT.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-DMUBG5QR.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-DMUBG5QR.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.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-TE2SHQPT.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:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
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,q as n,r as o,s as p,t as q,u as r,v as s}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (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,q as n,r as o,s as p,t as q,u as r,v as s}from"./chunk-FZXVYC4D.js";import"./chunk-AJKVXCHV.js";import"./chunk-QMTPTQHG.js";import"./chunk-QHCI5TZ6.js";import"./chunk-TONLJPNX.js";import"./chunk-2OWIXUFA.js";import"./chunk-TJXJCYCS.js";import"./chunk-S6OUYII6.js";import"./chunk-T5SF5UGY.js";import"./chunk-HC43FXK7.js";import"./chunk-3ZNPJADG.js";import"./chunk-A3E5QVUN.js";import"./chunk-4CPUNUJC.js";import"./chunk-3LW4V4ZM.js";import"./chunk-LEWUJGFD.js";import"./chunk-MX66P64S.js";import"./chunk-TE2SHQPT.js";export{e as buildOpenUrl,d as buildShellUrl,q as closeSimsBulk,r as planBulkCloseTargets,i as playwrightHostPidForSim,g as printConnectedSims,b as resolveBundleTarget,c as resolveDefaultShellBaseUrl,a as resolveDriverConnectWaitOptions,p as runClaimCommand,s as runCloseCommand,o as runFocusCommand,l as runListCommand,m as runOpenCommand,n as runUseCommand,j as signalDriverLaunchConnected,f as summarizeSimUrl,k as terminatePlaywrightHostsForSims,h as waitForSimMatch};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-TE2SHQPT.js";import{mkdirSync as $,writeFileSync as P}from"fs";import{dirname as S,resolve as O}from"path";import{WebSocket as C}from"ws";var v=e=>new Promise(i=>setTimeout(i,e)),w=class{ws;nextId=1;pending=new Map;listeners=new Set;ready;constructor(i){this.ws=new C(i,{maxPayload:1<<28}),this.ready=new Promise((t,r)=>{this.ws.once("open",()=>t()),this.ws.once("error",r)}),this.ws.on("message",t=>{let r=JSON.parse(t.toString());if(r.id&&this.pending.has(r.id)){let{res:o,rej:s}=this.pending.get(r.id);this.pending.delete(r.id),r.error?s(new Error(JSON.stringify(r.error))):o(r.result)}else if(r.method)for(let o of this.listeners)o(r.method,r.params)})}waitOpen(){return this.ready}on(i){this.listeners.add(i)}send(i,t={},r){let o=this.nextId++;return new Promise((s,p)=>{this.pending.set(o,{res:s,rej:p}),this.ws.send(JSON.stringify({id:o,method:i,params:t,...r?{sessionId:r}:{}}))})}close(){try{this.ws.close()}catch{}}};async function D(e,i){let t=Number(d(e,"--duration")??"5");if(!Number.isFinite(t)||t<=0)return console.error(" --duration must be a positive number (seconds)"),1;let r=Number(d(e,"--sample-interval")??"0.1"),o=Number(d(e,"--cdp-port")??process.env.SOOTSIM_CDP_PORT??"9222"),s=d(e,"--match")??"/rn/",p=d(e,"--output")??d(e,"-o"),u=O(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=[];try{g=await(await fetch(`http://localhost:${o}/json/list`)).json()}catch{return T(o),1}let y=g.find(a=>a.type==="page"&&a.url.includes(s));if(!y)return console.error(` no page target matching "${s}" on CDP :${o}`),console.error(` open targets: ${g.map(a=>a.url).join(", ")||"(none)"}`),1;let c=new w(y.webSocketDebuggerUrl);await c.waitOpen();try{let a=new Map;if(c.on((n,l)=>{n==="Target.attachedToTarget"&&l.targetInfo?.type==="worker"&&a.set(l.sessionId,l.targetInfo.url),n==="Target.detachedFromTarget"&&a.delete(l.sessionId)}),await c.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),await v(500),a.size===0)return console.error(" no worker targets attached \u2014 is the app loaded in this tab?"),1;for(let n of a.keys())await c.send("Profiler.enable",{},n),await c.send("Profiler.setSamplingInterval",{interval:r*1e3},n),await c.send("Profiler.start",{},n);console.log(` recording ${t}s across ${a.size} worker(s) \u2014 interact now\u2026`),await v(t*1e3);let m=[];for(let[n,l]of a){let{profile:f}=await c.send("Profiler.stop",{},n);m.push({url:l,profile:f})}return m.sort((n,l)=>l.profile.samples.length-n.profile.samples.length),$(S(u),{recursive:!0}),m.forEach((n,l)=>{let f=l===0?u:u.replace(/(\.[^.]+)?$/,`.worker${l}$1`);if(P(f,JSON.stringify(n.profile)),console.log(` ${b(n.url)}: ${n.profile.samples.length} samples \u2192 ${f}`),i.verbose&&n.profile.samples.length>0)for(let h of k(n.profile,12))console.log(` ${h.pct.toFixed(1).padStart(5)}% ${h.name} ${h.url}`)}),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}finally{c.close()}}function T(e){console.error(` cpu-profile needs a CDP-enabled browser on :${e}.`),console.error(" the tenant worker can't be profiled via the JS Self-Profiler API (F28),"),console.error(" so the sim must expose Chrome remote debugging. easiest path \u2014"),console.error(" open the sim with a CDP port (it stays driveable over the bridge,"),console.error(" so you can scroll/navigate while profiling):"),console.error(""),console.error(` sootsim open <metro-port> --new --driver playwright --cdp-port ${e}`),console.error(` sootsim cpu-profile --cdp-port ${e} --match <metro-port>`),console.error(""),console.error(" or launch a standalone CDP Chrome (not bridge-driveable):"),console.error(""),console.error(' "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\'),console.error(` --remote-debugging-port=${e} --user-data-dir=/tmp/sootsim-cdp \\`),console.error(" --no-sandbox --disable-gpu-sandbox --in-process-gpu \\"),console.error(" --use-gl=angle --use-angle=swiftshader --enable-unsafe-swiftshader \\"),console.error(' "http://localhost:5173/rn/<metro-port>" &'),console.error(""),console.error(" override the port with --cdp-port or $SOOTSIM_CDP_PORT.")}function b(e){return e?e.replace(/^https?:\/\/[^/]+/,"").replace(/\?.*$/,"").slice(-50):"(native)"}function k(e,i){let t=e.samples.length||1,r=new Map;for(let o of e.nodes){let s=o.callFrame,p=`${s.functionName||"(anonymous)"}@${b(s.url)}:${s.lineNumber}`,u=r.get(p)??{self:0,name:s.functionName||"(anonymous)",url:`${b(s.url)}:${s.lineNumber}`};u.self+=o.hitCount??0,r.set(p,u)}return[...r.values()].map(o=>({...o,pct:o.self/t*100})).sort((o,s)=>s.self-o.self).slice(0,i)}function d(e,i){let t=e.indexOf(i);if(!(t<0||t===e.length-1))return e[t+1]}export{D as runCpuProfile};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as N,b as B}from"./chunk-ZODKBHVK.js";import"./chunk-6KI36NXX.js";import{c as O}from"./chunk-UGRHYJUA.js";import"./chunk-XJVBNNIB.js";import"./chunk-3FFDAVGT.js";import"./chunk-3LW4V4ZM.js";import"./chunk-LEWUJGFD.js";import"./chunk-73DPWPZU.js";import"./chunk-FQBF5HG6.js";import"./chunk-A72YS45Y.js";import{h as I,i as _,q as T,r as k,s as C}from"./chunk-MX66P64S.js";import{a as H}from"./chunk-TE2SHQPT.js";import{execFileSync as rt,spawnSync as s}from"child_process";import{existsSync as d,mkdirSync as v,readFileSync as ot,rmSync as S,writeFileSync as M}from"fs";import{homedir as $}from"os";import{dirname as j,resolve as m}from"path";import{execFileSync as K}from"child_process";import{chmodSync as X,mkdirSync as E,rmSync as Q,writeFileSync as D}from"fs";import{dirname as L}from"path";var z="dev.sootsim.daemon",R="SootSim Daemon",U="0.1.36";function F(t,o,r){let e=k(),n=C(),a=L(L(n)),c=L(n),l=`${a}/Resources`;Q(e,{recursive:!0,force:!0}),E(T(),{recursive:!0}),E(c,{recursive:!0}),E(l,{recursive:!0}),D(`${a}/Info.plist`,J()),D(`${a}/PkgInfo`,"APPL????"),D(n,Z(t,o,r)),X(n,493);try{K("codesign",["--force","--sign","-","--deep",e],{stdio:"pipe"})}catch(i){let u=i instanceof Error?i.message:String(i);console.warn(` warning: ad-hoc codesign of ${e} failed: ${u}
|
|
3
|
+
the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:e,launcherPath:n}}function J(){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
4
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
5
|
+
<plist version="1.0">
|
|
6
|
+
<dict>
|
|
7
|
+
<key>CFBundleDevelopmentRegion</key><string>en</string>
|
|
8
|
+
<key>CFBundleDisplayName</key><string>${R}</string>
|
|
9
|
+
<key>CFBundleExecutable</key><string>sootsim-daemon</string>
|
|
10
|
+
<key>CFBundleIdentifier</key><string>${z}</string>
|
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key><string>6.0</string>
|
|
12
|
+
<key>CFBundleName</key><string>${R}</string>
|
|
13
|
+
<key>CFBundlePackageType</key><string>APPL</string>
|
|
14
|
+
<key>CFBundleShortVersionString</key><string>${U}</string>
|
|
15
|
+
<key>CFBundleSignature</key><string>????</string>
|
|
16
|
+
<key>CFBundleVersion</key><string>${U}</string>
|
|
17
|
+
<key>LSBackgroundOnly</key><true/>
|
|
18
|
+
<key>LSUIElement</key><true/>
|
|
19
|
+
<key>LSMinimumSystemVersion</key><string>13.0</string>
|
|
20
|
+
<key>NSHumanReadableCopyright</key><string>Tamagui LLC</string>
|
|
21
|
+
</dict>
|
|
22
|
+
</plist>
|
|
23
|
+
`}function Z(t,o,r){let n=[t.executable,...t.prefixArgs,"server","--quiet","--port",String(o)].map(tt).join(" ");return`#!/bin/sh
|
|
24
|
+
# SootSim Daemon launcher \u2014 auto-generated by 'sootsim daemon install'.
|
|
25
|
+
# launchd spawns this; we exec the real sootsim invocation in place so
|
|
26
|
+
# launchd tracks the daemon process, not the shell wrapper.
|
|
27
|
+
#
|
|
28
|
+
# stdout: ${r.stdout}
|
|
29
|
+
# stderr: ${r.stderr}
|
|
30
|
+
exec ${n}
|
|
31
|
+
`}function tt(t){return`'${t.replace(/'/g,"'\\''")}'`}var Y=60,y="dev.sootsim.daemon",A="dev.sootsim.server",g="sootsim-server",f=m($(),"Library/Logs/sootsim"),nt=m($(),".local/state/sootsim");async function Ct(t,o={}){let[r,...e]=t,n=o.port??7668;if(!r||r==="--help"||r==="-h"){V();return}new Set(["install","uninstall","restart","start","stop","logs"]).has(r)&&N({event:`daemon_${r}`,properties:{platform:process.platform,subsource:"daemon"}});try{switch(r){case"install":return await dt({port:n,force:e.includes("--force")});case"uninstall":return await pt();case"status":return await mt();case"restart":return await gt();case"start":return await ft();case"stop":return await yt();case"logs":return await ht(e);default:console.error(` unknown daemon subcommand: ${r}`),V(),process.exit(1)}}finally{await B()}}function V(){O("daemon")}function st(){let t=it();return{executable:process.execPath,prefixArgs:[t]}}function it(){try{let o=rt("which",["sootsim"],{encoding:"utf8"}).trim();if(o&&d(o))return G(o)}catch{}let t=process.argv[1];if(t&&d(t))return G(t);throw new Error("could not locate the sootsim binary")}function G(t){try{return H("fs").realpathSync(t)}catch{return t}}function at(t,o){v(f,{recursive:!0});let r=m(f,"server.out.log"),e=m(f,"server.err.log"),{launcherPath:n}=F(t,o,{stdout:r,stderr:e}),a=` <string>${lt(n)}</string>`;return`<?xml version="1.0" encoding="UTF-8"?>
|
|
32
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
33
|
+
<plist version="1.0">
|
|
34
|
+
<dict>
|
|
35
|
+
<key>Label</key><string>${y}</string>
|
|
36
|
+
<key>ProgramArguments</key>
|
|
37
|
+
<array>
|
|
38
|
+
${a}
|
|
39
|
+
</array>
|
|
40
|
+
<key>RunAtLoad</key><true/>
|
|
41
|
+
<key>KeepAlive</key><true/>
|
|
42
|
+
<key>ThrottleInterval</key><integer>${Y}</integer>
|
|
43
|
+
<key>ProcessType</key><string>Background</string>
|
|
44
|
+
<key>StandardOutPath</key><string>${r}</string>
|
|
45
|
+
<key>StandardErrorPath</key><string>${e}</string>
|
|
46
|
+
</dict>
|
|
47
|
+
</plist>
|
|
48
|
+
`}function ct(t,o){return v(nt,{recursive:!0}),`[Unit]
|
|
49
|
+
Description=sootsim bridge daemon
|
|
50
|
+
After=default.target
|
|
51
|
+
|
|
52
|
+
[Service]
|
|
53
|
+
Type=simple
|
|
54
|
+
ExecStart=${[t.executable,...t.prefixArgs].map(ut).join(" ")} server --quiet --port ${o}
|
|
55
|
+
Restart=always
|
|
56
|
+
RestartSec=${Y}
|
|
57
|
+
|
|
58
|
+
[Install]
|
|
59
|
+
WantedBy=default.target
|
|
60
|
+
`}function lt(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ut(t){return/[^\w@%+=:,./-]/.test(t)?`'${t.replace(/'/g,"'\\''")}'`:t}function b(){return m($(),"Library/LaunchAgents",`${y}.plist`)}function q(){return m($(),"Library/LaunchAgents",`${A}.plist`)}function x(){return m($(),".config/systemd/user",`${g}.service`)}function W(){let t=q();return d(t)?(s("launchctl",["bootout",`gui/${process.getuid()}/${A}`],{stdio:"ignore"}),S(t,{force:!0}),!0):!1}async function dt({port:t,force:o}){if(_()){let e=I()?"this is a dev workstation (IS_TAMAGUI_DEV=1)":"this is a dev checkout";throw new Error(`refusing to install the persistent sootsim daemon agent \u2014 ${e}.
|
|
61
|
+
the launchd / systemd agent would point at workspace artifacts / dev env that
|
|
62
|
+
change between sessions, and would serve stale prod-built engine assets instead
|
|
63
|
+
of the live \`bun dev:sootsim\` output. start the daemon manually in another
|
|
64
|
+
shell with: sootsim server
|
|
65
|
+
(set SOOTSIM_FORCE_DAEMON_INSTALL=1 to override.)`)}let r=st();if(console.log(` binary: ${[r.executable,...r.prefixArgs].join(" ")}`),console.log(` port: ${t}`),process.platform==="darwin"){W()&&console.log(` migrated away from legacy ${A} plist`);let e=b();if(d(e)&&!o){console.log(` already installed at ${e}`),console.log(" pass --force to overwrite, or use 'sootsim daemon restart' to reload");return}v(j(e),{recursive:!0}),M(e,at(r,t)),console.log(` wrote ${e}`);let n=`gui/${process.getuid()}`,a=`${n}/${y}`,c=()=>{let p=s("launchctl",["bootstrap",n,e],{stdio:"pipe",encoding:"utf8"}),w=(p.stderr||p.stdout||"").trim();if(p.status!==0)return{ok:!1,reason:`bootstrap exit ${p.status}${w?`: ${w}`:""}`};let P=s("launchctl",["print",a],{encoding:"utf8"});return P.status!==0?{ok:!1,reason:`bootstrap returned 0 but service not registered (print exit ${P.status})`}:{ok:!0}},l=c();if(!l.ok){let p=l.reason;if(s("launchctl",["bootout",a],{stdio:"ignore"}),l=c(),!l.ok)throw new Error(`launchctl bootstrap failed: ${l.reason}`+(p!==l.reason?` (initial: ${p})`:"")+" \u2014 try `sootsim daemon uninstall` then retry, or reboot if launchd state is stuck.")}let i=Date.now()+4e3,u,h;for(;Date.now()<i;){let p=s("launchctl",["print",a],{encoding:"utf8"});if(p.status===0&&(u=p.stdout?.match(/state\s*=\s*(\w+)/)?.[1],h=p.stdout?.match(/pid\s*=\s*(\d+)/)?.[1],u==="running"||h))break;await new Promise(w=>setTimeout(w,150))}if(u!=="running"&&!h)throw new Error(`daemon registered but did not reach running state within 4s (last state: ${u||"unknown"}). check ${m(f,"server.err.log")} \u2014 typically a stale runtime or a port already bound by another process.`);console.log(` registered (state: ${u||"unknown"}${h?`, pid ${h}`:""}, log: ${m(f,"server.err.log")})`);return}if(process.platform==="linux"){let e=x();if(d(e)&&!o){console.log(` already installed at ${e}`),console.log(" pass --force to overwrite, or use 'sootsim daemon restart' to reload");return}v(j(e),{recursive:!0}),M(e,ct(r,t)),console.log(` wrote ${e}`);let n=s("systemctl",["--user","daemon-reload"],{stdio:"pipe",encoding:"utf8"});if(n.status!==0){let i=(n.stderr||n.stdout||"").trim();throw new Error(`systemctl daemon-reload failed${i?`: ${i}`:""}`)}let a=s("systemctl",["--user","enable","--now",g],{stdio:"pipe",encoding:"utf8"});if(a.status!==0){let i=(a.stderr||a.stdout||"").trim();throw new Error(`systemctl enable --now failed${i?`: ${i}`:""} \u2014 try \`sootsim daemon uninstall\` then retry.`)}let l=(s("systemctl",["--user","is-active",g],{encoding:"utf8"}).stdout||"").trim()||"unknown";console.log(` registered (state: ${l}, journalctl --user -u ${g} to tail logs)`);try{let i=process.env.USER||process.env.LOGNAME||"";if(i){let u=s("loginctl",["show-user",i,"--property=Linger","--value"],{encoding:"utf8"});!((u.stdout||"").trim().toLowerCase()==="yes")&&u.status===0&&console.log(` note: linger is not enabled for "${i}". the daemon will exit at logout.
|
|
66
|
+
enable persistence with: sudo loginctl enable-linger ${i}`)}}catch{}return}console.error(` sootsim daemon install is not supported on ${process.platform}`),console.error(" run 'sootsim server' in a persistent shell instead"),process.exit(1)}async function pt(){if(process.platform==="darwin"){let t=b(),o=W();o&&console.log(` removed legacy ${q()}`);let r=d(t);r&&(s("launchctl",["bootout",`gui/${process.getuid()}/${y}`],{stdio:"ignore"}),S(t,{force:!0}),console.log(` removed ${t}`));let e=k();d(e)&&(S(e,{recursive:!0,force:!0}),console.log(` removed ${e}`)),!r&&!o&&console.log(" not installed");return}if(process.platform==="linux"){let t=x();if(!d(t)){console.log(" not installed");return}s("systemctl",["--user","disable","--now",g],{stdio:"ignore"}),S(t,{force:!0}),s("systemctl",["--user","daemon-reload"],{stdio:"ignore"}),console.log(` removed ${t}`);return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function mt(){if(process.platform==="darwin"){let t=b();if(!d(t)){console.log(" installed: no");return}console.log(` installed: yes (${t})`);let o=$t(t);o&&console.log(` binary: ${o}`);let r=s("launchctl",["print",`gui/${process.getuid()}/${y}`],{encoding:"utf8"});if(r.status===0){let e=r.stdout.match(/state\s*=\s*(\w+)/)?.[1],n=r.stdout.match(/pid\s*=\s*(\d+)/)?.[1];console.log(` state: ${e||"unknown"}${n?` (pid ${n})`:""}`)}else console.log(" state: not running");return}if(process.platform==="linux"){let t=x();if(!d(t)){console.log(" installed: no");return}console.log(` installed: yes (${t})`);let o=s("systemctl",["--user","is-active",g],{encoding:"utf8"});console.log(` state: ${o.stdout.trim()||"unknown"}`);return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function gt(){if(process.platform==="darwin"){let t=b();d(t)||(console.error(" daemon not registered \u2014 run any sootsim command to bootstrap it"),process.exit(1));let o=s("launchctl",["kickstart","-k",`gui/${process.getuid()}/${y}`],{stdio:"pipe",encoding:"utf8"});o.status!==0&&(console.error(` kickstart failed: ${o.stderr?.trim()}`),process.exit(1)),console.log(" restarted");return}if(process.platform==="linux"){let t=x();d(t)||(console.error(" daemon not registered \u2014 run any sootsim command to bootstrap it"),process.exit(1));let o=s("systemctl",["--user","restart",g],{stdio:"pipe",encoding:"utf8"});o.status!==0&&(console.error(` restart failed: ${o.stderr?.trim()}`),process.exit(1)),console.log(" restarted");return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function ft(){if(process.platform==="darwin"){s("launchctl",["kickstart",`gui/${process.getuid()}/${y}`],{stdio:"inherit"});return}if(process.platform==="linux"){s("systemctl",["--user","start",g],{stdio:"inherit"});return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function yt(){if(process.platform==="darwin"){s("launchctl",["bootout",`gui/${process.getuid()}/${y}`],{stdio:"inherit"});return}if(process.platform==="linux"){s("systemctl",["--user","stop",g],{stdio:"inherit"});return}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}async function ht(t){let o=t.find(n=>/^-n\d+$|^--lines=\d+$|^\d+$/.test(n)),r=o?Number(o.replace(/\D/g,"")):200,e=t.includes("-f")||t.includes("--follow");if(process.platform==="darwin"){let n=m(f,"server.out.log"),a=m(f,"server.err.log"),c=[n,a].filter(i=>d(i));c.length===0&&(console.error(` no daemon logs yet at ${f} \u2014 run any sootsim command to start the daemon`),process.exit(1));let l=e?["-n",String(r),"-F",...c]:["-n",String(r),...c];s("tail",l,{stdio:"inherit"});return}if(process.platform==="linux"){let n=`${g}.service`,a=["--user","-u",n,"-n",String(r),"--no-pager"],c=s("journalctl",e?[...a,"-f"]:a,{encoding:"utf8",stdio:e?"inherit":"pipe"});if(e)return;let l=`${c.stdout||""}${c.stderr||""}`,i=/insufficient permissions|No journal files were opened/i.test(l);if(c.status===0&&!i){process.stdout.write(c.stdout||"");return}let u=s("journalctl",[`_SYSTEMD_USER_UNIT=${n}`,"-n",String(r),"--no-pager"],{encoding:"utf8"});if(u.status===0&&(u.stdout||"").trim()){process.stdout.write(u.stdout);return}console.error(` could not read --user journal for ${n} (this user isn't in the systemd-journal group yet).
|
|
67
|
+
run: sudo journalctl _SYSTEMD_USER_UNIT=${n} -n ${r} --no-pager`),process.exit(1)}console.error(` unsupported platform: ${process.platform}`),process.exit(1)}function $t(t){try{return ot(t,"utf8").match(/<array>\s*<string>([^<]+)<\/string>/)?.[1]||null}catch{return null}}export{dt as daemonInstall,Ct as runDaemon};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{f,m as T}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{f,m as T}from"./chunk-QMTPTQHG.js";import{I as A,J as D,K as O,L as x,M as v}from"./chunk-QHCI5TZ6.js";import{c as S,e as $,g as N}from"./chunk-2OWIXUFA.js";import"./chunk-4CPUNUJC.js";import"./chunk-LEWUJGFD.js";import"./chunk-MX66P64S.js";import"./chunk-TE2SHQPT.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-J3BLUHGJ.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 A(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 D(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{a as S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as S}from"./chunk-KABTL7PQ.js";import"./chunk-ZRVCZZCT.js";import"./chunk-GJR32NCU.js";import"./chunk-PN4QXNKU.js";import"./chunk-AV2DSEYZ.js";import"./chunk-W4KCLE5O.js";import"./chunk-VFXS73Q6.js";import"./chunk-FZXVYC4D.js";import"./chunk-AJKVXCHV.js";import"./chunk-QMTPTQHG.js";import"./chunk-QHCI5TZ6.js";import"./chunk-TONLJPNX.js";import"./chunk-2OWIXUFA.js";import"./chunk-TJXJCYCS.js";import"./chunk-S6OUYII6.js";import"./chunk-T5SF5UGY.js";import"./chunk-HC43FXK7.js";import"./chunk-3ZNPJADG.js";import"./chunk-A3E5QVUN.js";import"./chunk-4CPUNUJC.js";import"./chunk-ZODKBHVK.js";import"./chunk-6KI36NXX.js";import"./chunk-XJVBNNIB.js";import"./chunk-3LW4V4ZM.js";import"./chunk-LEWUJGFD.js";import"./chunk-Z52XC4UA.js";import"./chunk-A72YS45Y.js";import"./chunk-MX66P64S.js";import"./chunk-TE2SHQPT.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.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-GJR32NCU.js";import{c as d,e as l,h as a}from"./chunk-2OWIXUFA.js";import"./chunk-4CPUNUJC.js";import"./chunk-XJVBNNIB.js";import"./chunk-LEWUJGFD.js";import"./chunk-Z52XC4UA.js";import{f as c,g as r,h as g}from"./chunk-A72YS45Y.js";import"./chunk-MX66P64S.js";import"./chunk-TE2SHQPT.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 E,e as R,h as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as E,e as R,h as b}from"./chunk-2OWIXUFA.js";import{b as v}from"./chunk-4CPUNUJC.js";import"./chunk-LEWUJGFD.js";import"./chunk-MX66P64S.js";import"./chunk-TE2SHQPT.js";function F(e){return e.ts??e.t??0}function W(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(s=>typeof s=="string"?s:JSON.stringify(s)).join(" "):""}var B=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.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-TVLQMXWV.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-S6OUYII6.js";import"./chunk-T5SF5UGY.js";import"./chunk-HC43FXK7.js";import"./chunk-3ZNPJADG.js";import"./chunk-A3E5QVUN.js";import"./chunk-4CPUNUJC.js";import"./chunk-MX66P64S.js";import"./chunk-TE2SHQPT.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.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as g}from"./chunk-AKHWKREF.js";import"./chunk-TVLQMXWV.js";import{a as v,g as h}from"./chunk-FZXVYC4D.js";import"./chunk-AJKVXCHV.js";import"./chunk-QMTPTQHG.js";import"./chunk-QHCI5TZ6.js";import"./chunk-TONLJPNX.js";import"./chunk-2OWIXUFA.js";import"./chunk-TJXJCYCS.js";import{b as f,g as u}from"./chunk-S6OUYII6.js";import{a as p}from"./chunk-T5SF5UGY.js";import{c as m}from"./chunk-HC43FXK7.js";import"./chunk-3ZNPJADG.js";import"./chunk-A3E5QVUN.js";import"./chunk-4CPUNUJC.js";import"./chunk-3LW4V4ZM.js";import"./chunk-LEWUJGFD.js";import"./chunk-MX66P64S.js";import"./chunk-TE2SHQPT.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-73H4DAAH.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.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as c,b as d,c as e,d as f}from"./chunk-KABTL7PQ.js";import"./chunk-ZRVCZZCT.js";import"./chunk-GJR32NCU.js";import"./chunk-PN4QXNKU.js";import"./chunk-AV2DSEYZ.js";import"./chunk-W4KCLE5O.js";import{c as a,d as b}from"./chunk-VFXS73Q6.js";import"./chunk-FZXVYC4D.js";import"./chunk-AJKVXCHV.js";import"./chunk-QMTPTQHG.js";import"./chunk-QHCI5TZ6.js";import"./chunk-TONLJPNX.js";import"./chunk-2OWIXUFA.js";import"./chunk-TJXJCYCS.js";import"./chunk-S6OUYII6.js";import"./chunk-T5SF5UGY.js";import"./chunk-HC43FXK7.js";import"./chunk-3ZNPJADG.js";import"./chunk-A3E5QVUN.js";import"./chunk-4CPUNUJC.js";import"./chunk-ZODKBHVK.js";import"./chunk-6KI36NXX.js";import"./chunk-XJVBNNIB.js";import"./chunk-3LW4V4ZM.js";import"./chunk-LEWUJGFD.js";import"./chunk-Z52XC4UA.js";import"./chunk-A72YS45Y.js";import"./chunk-MX66P64S.js";import"./chunk-TE2SHQPT.js";export{c as discoverSootsimUrl,e as hoistLeadingSimFlag,a as parseFlowFile,f as runFlow,d as runFlowPlayback,b as validateFlowFile};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c}from"./chunk-UGRHYJUA.js";import"./chunk-XJVBNNIB.js";import"./chunk-3FFDAVGT.js";import"./chunk-3LW4V4ZM.js";import"./chunk-LEWUJGFD.js";import"./chunk-73DPWPZU.js";import"./chunk-FQBF5HG6.js";import"./chunk-A72YS45Y.js";import"./chunk-MX66P64S.js";import"./chunk-TE2SHQPT.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
|
|
@@ -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.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as n,c as r,d as l}from"./chunk-YV6RWCPO.js";import"./chunk-4CPUNUJC.js";import"./chunk-TE2SHQPT.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,J,K,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.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A,B,C,D,E,F,G,H,I,J,K,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-MX66P64S.js";import"./chunk-TE2SHQPT.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,F as activeRuntimeDir,l as activeRuntimeFile,t as cacheDir,J as claimDaemonLockfile,E as compareSemver,v as configFilePath,r as daemonAppBundlePath,q as daemonAppDir,s as daemonAppLauncherPath,u as daemonLockfilePath,m as electronDir,n as electronUserDataDir,o as electronVersionDir,A as ensureSootsimHome,H as isDaemonLockfileFresh,h as isDevWorkstation,g as isSootsimDevCheckout,D as listInstalledRuntimes,p as profilesDir,B as readActiveRuntime,G as readDaemonLockfile,w as readSharedConfig,y as readTelemetryEnabled,K as removeDaemonLockfile,k as runtimeDir,j as runtimesDir,i as shouldSkipPersistentDaemon,f as sootsimHomeDir,C as writeActiveRuntime,I as writeDaemonLockfile,x as writeSharedConfig,z as writeTelemetryEnabled};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as G}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as G}from"./chunk-YV6RWCPO.js";import{a as wt,b as xt}from"./chunk-BCIZZLCX.js";import{a as Ye,g as $e,j as ee}from"./chunk-VFXS73Q6.js";import{b as $t,c as St,j as vt}from"./chunk-FZXVYC4D.js";import"./chunk-AJKVXCHV.js";import{a as Z,b as A,c as P,d as Pe,e as re,f as Y,g as ce,h as pe,i as yt,j as ht,k as Re,l as bt}from"./chunk-QMTPTQHG.js";import{A as mt,E as pt,G as le,H as ft,N as gt,a as be,b as Ge,c as Xe,d as Ve,e as Qe,f as Ze,g as et,h as tt,i as ot,j as st,k as _e,l as Oe,p as Ae,q as nt,r as rt,s as we,t as it,u as xe,v as at,w as lt,x as ct,y as dt,z as ut}from"./chunk-QHCI5TZ6.js";import"./chunk-TONLJPNX.js";import{c as He,e as Ue,f as Ke,g as ze,h as Fe}from"./chunk-2OWIXUFA.js";import"./chunk-TJXJCYCS.js";import"./chunk-S6OUYII6.js";import"./chunk-T5SF5UGY.js";import"./chunk-HC43FXK7.js";import"./chunk-3ZNPJADG.js";import"./chunk-A3E5QVUN.js";import{b as qe}from"./chunk-4CPUNUJC.js";import{a as Je}from"./chunk-2WPNYDSO.js";import{a as Ie,c as Ne}from"./chunk-3FFDAVGT.js";import{a as We}from"./chunk-3LW4V4ZM.js";import"./chunk-LEWUJGFD.js";import"./chunk-MX66P64S.js";import"./chunk-TE2SHQPT.js";import{existsSync as co,mkdirSync as uo,readFileSync as mo,rmSync as kt,writeFileSync as po}from"fs";import{tmpdir as fo}from"os";import{dirname as go,join as yo,resolve as ho}from"path";var fe=1,bo="SOOTSIM_INSPECT_NOTICE_PATH",wo=300*1e3,xo=15e3;function Tt(){return ho(process.env[bo]||yo(fo(),"sootsim-inspect-notice-state.json"))}function $o(e,c){return Object.fromEntries(Object.entries(e).filter(([,n])=>typeof n?.signature=="string"&&Number.isFinite(n?.updatedAt)&&c-n.updatedAt<=wo))}function So(e){let c=Tt();if(!co(c))return{version:fe,entries:{}};try{let n=JSON.parse(mo(c,"utf8"));return n.version!==fe||!n.entries||typeof n.entries!="object"?(kt(c,{force:!0}),{version:fe,entries:{}}):{version:fe,entries:$o(n.entries,e)}}catch{return kt(c,{force:!0}),{version:fe,entries:{}}}}function vo(e){let c=Tt();uo(go(c),{recursive:!0}),po(c,JSON.stringify(e,null,2)+`
|
|
3
3
|
`)}function ko(e,c){let n=c.trim()||"default";return`${e}:${n}`}function Ee(e,c,n,l={}){let m=l.nowMs??Date.now(),r=l.cooldownMs??xo,g=So(m),y=ko(e,c),T=g.entries[y];return T&&T.signature===n&&m-T.updatedAt<r?!1:(g.entries[y]={signature:n,updatedAt:m},vo(g),!0)}var To={initialWaitMs:3e3,deadlineMs:5e3,retryWaitMs:700},Mo={initialWaitMs:1200,deadlineMs:2500,retryWaitMs:700};function Io(e,c={}){return{...e?To:Mo,...c}}function de(e){return!(!e||e.hit===!1||e.ok===!1||e.pointerTapHandled===!1&&!e.keyboardOpened&&!e.isTextInput)}function No(e,c){return{id:e.target?.id??e.match?.id??e.node?.id??null,testID:e.target?.testID??e.match?.testID??e.node?.testID??null,text:e.target?.text??e.target?.accessibilityLabel??e.match?.text??e.match?.accessibilityLabel??e.node?.text??c??null,type:e.target?.type??e.match?.type??e.node?.type??null}}async function ge(e,c){let n=Io(!!c.agent,c.timing),l=0,m=null,r=null;try{await ee({bridge:e,maxMs:n.initialWaitMs,pollMs:32,stablePolls:2})}catch{}let g=Date.now()+n.deadlineMs;for(;Date.now()<=g||l===0;){l++;let y=await c.resolve();if(m=y,y?.error==="bridge-not-ready"||y?.ambiguous||y?.nthOutOfRange)return{payload:y,result:null,attempts:l,failure:"special"};if(y&&typeof y.cx=="number"&&typeof y.cy=="number"){let M=await e.send({type:"tap",x:y.cx,y:y.cy,target:No(y,c.textFallback)});if(r=M,de(M))return{payload:y,result:M,attempts:l}}let T=g-Date.now();if(T<=0)break;try{await ee({bridge:e,maxMs:Math.min(T,n.retryWaitMs),pollMs:32,stablePolls:2})}catch{await new Promise(M=>setTimeout(M,Math.min(120,T)))}}return{payload:m,result:r,attempts:l,failure:m&&typeof m.cx=="number"?"missed":"not-found"}}async function Mt(e,c,n,l){return e.send({type:"tap",x:c,y:n,...l?{target:l}:{}})}async function It(e,c,n={}){let l=JSON.stringify(c);return ge(e,{agent:n.agent,timing:n.timing,resolve:()=>e.send({type:"evaluate",code:`(async () => {
|
|
4
4
|
const t = window.__sootsimTest
|
|
5
5
|
if (!t) return null
|
|
@@ -315,7 +315,7 @@ import{a as G}from"./chunk-HL3XSORU.js";import{a as wt,b as xt}from"./chunk-D6V2
|
|
|
315
315
|
`);console.log(`${t??""}
|
|
316
316
|
|
|
317
317
|
${s}
|
|
318
|
-
`),process.exit(0)}let _=m.wsPort,I=m.simId,R=m.simIdSource,j=m.commandTimeoutMs;if(g==="list"&&l.some(o=>o==="--drivers"||o==="-D")){let{buildDriverListRows:o}=await import("./drivers-
|
|
318
|
+
`),process.exit(0)}let _=m.wsPort,I=m.simId,R=m.simIdSource,j=m.commandTimeoutMs;if(g==="list"&&l.some(o=>o==="--drivers"||o==="-D")){let{buildDriverListRows:o}=await import("./drivers-W4SBNM4V.js"),t=o();console.log(` available drivers (${t.length}):
|
|
319
319
|
`);let s=Math.max(...t.map(a=>a.id.length),6),i=Math.max(...t.map(a=>a.kind.length),4);for(let a of t){let u=a.available?"\u2713":"\u2717",p=a.id.padEnd(s),b=a.kind.padEnd(i);console.log(` ${u} ${p} ${b} ${a.description}`),a.available&&a.detail?console.log(` ${a.detail}`):!a.available&&a.reason&&console.log(` unavailable: ${a.reason}`)}return}let d=Ue(m),z=I||"default",B=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","list","wait","sleep"]),D=200;function V(o){let t=o.replace(/\s+/g," ").trim();if(!t)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(t)){let i=/<title[^>]*>([^<]+)<\/title>/i.exec(o)?.[1]?.trim(),a=/<body[^>]*>([\s\S]*?)<\//i.exec(o)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),u=i||a||"html error page";return`<html ${o.length}B> "${u}" (body elided \u2014 add --json for the full payload)`}return t.length<=D?t:`${t.slice(0,D)}\u2026 (+${t.length-D} more bytes)`}function te(o){let t=o.displayUrl||o.url;return o.status!=null?`${o.method} ${t} -> ${o.status}${o.statusText?` ${o.statusText}`:""}`:o.error?`${o.method} ${t} -> ${o.error}`:`${o.method} ${t}`}async function S(o){let t=ue()?5e3:1500;try{let{settled:s,elapsed:i}=await ee({bridge:o,maxMs:t,pollMs:32,stablePolls:2});s||process.stderr.write(` \u26A0 auto-wait timed out after ${i??t}ms \u2014 next command may see mid-animation state. use \`sootsim do settle\` for a longer wait.
|
|
320
320
|
`)}catch{}}function N(o,t){console.error(` tap failed: ${o} stayed visible but did not receive a hittable press after ${t.attempts} attempt${t.attempts===1?"":"s"}`),t.result&&console.error(` last result: ${JSON.stringify(t.result)}`)}async function J(){try{return await d.send({type:"evaluate",code:`(() => ({
|
|
321
321
|
console: ${xe},
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as o}from"./chunk-UZO6PMW3.js";import"./chunk-AKHWKREF.js";import"./chunk-TKMTONCA.js";import"./chunk-2OWIXUFA.js";import"./chunk-4CPUNUJC.js";import"./chunk-ZODKBHVK.js";import"./chunk-6KI36NXX.js";import"./chunk-LEWUJGFD.js";import"./chunk-MX66P64S.js";import"./chunk-TE2SHQPT.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 k}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.144 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as k}from"./chunk-AKHWKREF.js";import{a as x}from"./chunk-T5SF5UGY.js";import"./chunk-TE2SHQPT.js";import{spawn as v,spawnSync as u}from"child_process";import{chmodSync as S,copyFileSync as T,createWriteStream as E,existsSync as w,mkdirSync as y,rmSync as g,statSync as P,unlinkSync as D}from"fs";import{tmpdir as M}from"os";import{dirname as A,join as f,resolve as b}from"path";var h="https://sootbean.com/api/electron-release";function O(){let n=process.arch;if(process.platform==="darwin"){let o=n==="arm64"?"mac-arm64":"mac-x64",e=`sootsim-latest-${o}.dmg`;return{platform:o,filename:e,url:`${h}/${e}`,install:L}}if(process.platform==="linux"){let o=n==="arm64"?"linux-arm64":"linux-x64",e=`sootsim-latest-${o}.AppImage`;return{platform:o,filename:e,url:`${h}/${e}`,install:C}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:B}}return null}async function I({url:n,dest:o,onProgress:e}){let s=await fetch(n,{redirect:"follow"});if(!s.ok)throw new Error(`${s.status} ${s.statusText} (${n})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error(`empty response body (${n})`);y(A(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,e?.(c,a)}}finally{await new Promise((l,p)=>{i.end(r=>r?p(r):l())})}}function _(n,o){let e=(n/1048576).toFixed(1);if(!o)return` ${e} MB`;let s=Math.min(100,Math.round(n/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}% ${e} / ${t} MB`}async function L(n){let o=u("hdiutil",["attach","-nobrowse","-readonly",n],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let e=o.stdout.trim().split(`
|
|
3
3
|
`),t=e[e.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=b(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]),r=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return r.status!==0&&console.warn(` warning: failed to unmount ${t} (${r.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function C(n){let o=b(process.env.HOME||"","Applications");y(o,{recursive:!0});let e=f(o,"sootsim.AppImage");return w(e)&&g(e,{force:!0}),T(n,e),D(n),S(e,493),e}async function B(n){return await new Promise((o,e)=>{let s=v("cmd",["/c","start",'""',"/wait",n],{stdio:"inherit"});s.once("error",e),s.once("exit",t=>{t===0?o():e(new Error(`installer exited with code ${t}`))})}),n}async function q(n){(n.includes("--help")||n.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=n.includes("--yes")||n.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,e=n.includes("--force"),s=x();if(s&&!e){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=O();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 k("download and install now?",!0)){console.log(" cancelled.");return}console.log()}let a=f(M(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
|
|
21
21
|
`);try{await I({url:t.url,dest:i,onProgress:(r,m)=>{let $=Date.now();$-d<100&&r<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${_(r,m)}`))}})}catch(r){g(a,{recursive:!0,force:!0});let m=r instanceof Error?r.message:String(r);console.error(`
|
|
22
22
|
download failed: ${m}`),console.error(` the ${t.platform} desktop build may not be published yet, or your`),console.error(" network blocked the request. check your connection and try again later;"),console.error(" the CLI + daemon work without the desktop app (run: sootsim --help)."),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-LUP4L5RW.js");try{let r=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${r}`)}catch(r){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:r instanceof Error?r.message:String(r)}}),await p(),console.error(` install failed: ${r instanceof Error?r.message:String(r)}`),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{q 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.144 | (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-W4KCLE5O.js";import{d as c}from"./chunk-6KI36NXX.js";import"./chunk-MX66P64S.js";import"./chunk-TE2SHQPT.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.
|