sootsim 0.1.234 → 0.1.235
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 +4 -4
- package/dist-cli/chunks/{agent-RKA6QTYE.js → agent-VY6XJQDL.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-OB6OUCSF.js → agent-wrapper-NSBHSS3Y.js} +2 -2
- package/dist-cli/chunks/{app-fonts-6PFARL6B.js → app-fonts-BRTQV44M.js} +2 -2
- package/dist-cli/chunks/{assert-Q6BV2NEM.js → assert-WOOZQZ67.js} +2 -2
- package/dist-cli/chunks/{auth-HJ3NXFJP.js → auth-7J7WDEFG.js} +2 -2
- package/dist-cli/chunks/beta-E3A3FN5N.js +2 -0
- package/dist-cli/chunks/{camera-LWGYRGBB.js → camera-KWI4FUYT.js} +2 -2
- package/dist-cli/chunks/{chunk-DVPVSP7S.js → chunk-2NTPCZNI.js} +2 -2
- package/dist-cli/chunks/{chunk-B77AQNOH.js → chunk-4IGHCZBZ.js} +1 -1
- package/dist-cli/chunks/{chunk-37CANPD2.js → chunk-4WKY22WY.js} +3 -3
- package/dist-cli/chunks/{chunk-2YOWFGX3.js → chunk-6EZX7YXZ.js} +1 -1
- package/dist-cli/chunks/{chunk-FSSTNYFL.js → chunk-6XLP5EB5.js} +2 -2
- package/dist-cli/chunks/{chunk-UQEDU53Q.js → chunk-7DV3AEBI.js} +2 -2
- package/dist-cli/chunks/chunk-ANOU6P4R.js +1 -0
- package/dist-cli/chunks/{chunk-DAWIWEWR.js → chunk-APBFMXMM.js} +1 -1
- package/dist-cli/chunks/{chunk-HTTSF6YF.js → chunk-AQ6HSRGZ.js} +2 -2
- package/dist-cli/chunks/{chunk-AASXS3LK.js → chunk-BZPJSFSP.js} +2 -2
- package/dist-cli/chunks/{chunk-5JX4BCGL.js → chunk-CFIAG2RO.js} +1 -1
- package/dist-cli/chunks/{chunk-IHRBDBGS.js → chunk-EB52ZQ3B.js} +2 -2
- package/dist-cli/chunks/{chunk-LW25UTSS.js → chunk-EOUBCSIZ.js} +2 -2
- package/dist-cli/chunks/{chunk-6KZBSG52.js → chunk-G4VPOKCZ.js} +2 -2
- package/dist-cli/chunks/{chunk-IB6NUH34.js → chunk-GD6LJ2CR.js} +2 -2
- package/dist-cli/chunks/{chunk-KIYCMEMO.js → chunk-HVKLAOZM.js} +3 -3
- package/dist-cli/chunks/{chunk-KIALD4JX.js → chunk-ITU3SFQX.js} +2 -2
- package/dist-cli/chunks/{chunk-7G4VSJQ4.js → chunk-IZGWQAPR.js} +1 -1
- package/dist-cli/chunks/{chunk-TGPXK5U2.js → chunk-JPXFE6M4.js} +2 -2
- package/dist-cli/chunks/{chunk-2QOLVYFF.js → chunk-K3Q4FEMG.js} +1 -1
- package/dist-cli/chunks/{chunk-57FLKZOS.js → chunk-KEZZHUOP.js} +3 -3
- package/dist-cli/chunks/{chunk-4NTBHQZU.js → chunk-MSXVV6JQ.js} +3 -3
- package/dist-cli/chunks/{chunk-LJLYNHJF.js → chunk-OUZCXC3F.js} +1 -1
- package/dist-cli/chunks/{chunk-KQCFBS3K.js → chunk-P3IXWUXV.js} +2 -2
- package/dist-cli/chunks/{chunk-A3R3A55R.js → chunk-PULCBYY6.js} +2 -2
- package/dist-cli/chunks/chunk-R7RUIOMK.js +2 -0
- package/dist-cli/chunks/{chunk-5AVOWKYR.js → chunk-RJ5ZTFTF.js} +1 -1
- package/dist-cli/chunks/{chunk-TD3PSMQU.js → chunk-TA6OIGXV.js} +1 -1
- package/dist-cli/chunks/{chunk-DFAMEHIJ.js → chunk-TEEK6DLL.js} +2 -2
- package/dist-cli/chunks/{chunk-WPS3EFNK.js → chunk-TR25YKVI.js} +1 -1
- package/dist-cli/chunks/{chunk-KIYNMK6P.js → chunk-TZJ6V6E3.js} +2 -2
- package/dist-cli/chunks/{chunk-VWAOND2T.js → chunk-UMRMWSAM.js} +1 -1
- package/dist-cli/chunks/{chunk-36HLSYS2.js → chunk-VZQLOXV4.js} +2 -2
- package/dist-cli/chunks/{chunk-YV35LVCO.js → chunk-WQ5DQ5X7.js} +2 -2
- package/dist-cli/chunks/{chunk-JXPGKN3F.js → chunk-XUJDCVTH.js} +6 -6
- package/dist-cli/chunks/{chunk-6NUCPZGB.js → chunk-XWRHHNOK.js} +1 -1
- package/dist-cli/chunks/{chunk-4YPQAOC6.js → chunk-YAX25DGN.js} +1 -1
- package/dist-cli/chunks/{chunk-54U7A36G.js → chunk-YLSEQMQK.js} +1 -1
- package/dist-cli/chunks/{chunk-VVVCJPSQ.js → chunk-YQDB5ODC.js} +1 -1
- package/dist-cli/chunks/{chunk-XK5YL6SF.js → chunk-YXP22OFA.js} +2 -2
- package/dist-cli/chunks/{chunk-PSDDQWFO.js → chunk-YYW4JGGL.js} +1 -1
- package/dist-cli/chunks/chunk-Z3BORSD4.js +1 -0
- package/dist-cli/chunks/{chunk-MS33P5CV.js → chunk-Z7TEEXRM.js} +1 -1
- package/dist-cli/chunks/{chunk-5FDIH76R.js → chunk-ZVVEXBEJ.js} +2 -2
- package/dist-cli/chunks/cli-version-YYFAD5AQ.js +2 -0
- package/dist-cli/chunks/{compat-NN643MYB.js → compat-7NLJUPG6.js} +3 -3
- package/dist-cli/chunks/{config-GVVXK4LX.js → config-LODVAH4H.js} +2 -2
- package/dist-cli/chunks/{control-TL666XUK.js → control-H4RVHEDW.js} +2 -2
- package/dist-cli/chunks/daemon-NQ5RDWC4.js +2 -0
- package/dist-cli/chunks/{debug-4D7UPKL6.js → debug-PM3WQ2Z5.js} +3 -3
- package/dist-cli/chunks/{desktop-UK3TXNWM.js → desktop-MF4ZQA2W.js} +3 -3
- package/dist-cli/chunks/{detox-GGCJIYAO.js → detox-IFKFVHIT.js} +2 -2
- package/dist-cli/chunks/{device-27GVWZRM.js → device-6EQ2R5CO.js} +2 -2
- package/dist-cli/chunks/{diagnose-MRGZ2QTM.js → diagnose-AKWL66RQ.js} +2 -2
- package/dist-cli/chunks/drivers-5NKXLGOH.js +2 -0
- package/dist-cli/chunks/{film-SFZGOMH5.js → film-NIR3F3EQ.js} +3 -3
- package/dist-cli/chunks/flow-DYOXMN3T.js +2 -0
- package/dist-cli/chunks/help-ZEEVDVCV.js +2 -0
- package/dist-cli/chunks/{hidden-runtime-alias-EJ5NRH2V.js → hidden-runtime-alias-QT52GUMS.js} +2 -2
- package/dist-cli/chunks/{home-paths-ICQCVYFE.js → home-paths-TZFWKT7O.js} +2 -2
- package/dist-cli/chunks/inspect-KSPWBUAB.js +2 -0
- package/dist-cli/chunks/install-desktop-4GT67C5I.js +2 -0
- package/dist-cli/chunks/{login-YJFCUM4C.js → login-553MMERY.js} +4 -4
- package/dist-cli/chunks/{logout-T4MKUGMT.js → logout-UX4PNMDO.js} +2 -2
- package/dist-cli/chunks/{maestro-MJH5BSJG.js → maestro-XVWZ37YC.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-5ORUBHVA.js → maestro-generate-O3J2XRQD.js} +3 -3
- package/dist-cli/chunks/{mode-D7MC6TTG.js → mode-S7PO7F4H.js} +2 -2
- package/dist-cli/chunks/optional-demo-registry-BVQUDY4V.js +2 -0
- package/dist-cli/chunks/{perf-IRUFRNO5.js → perf-SQD72526.js} +2 -2
- package/dist-cli/chunks/{record-GTZOEPUV.js → record-TFIQZHAO.js} +3 -3
- package/dist-cli/chunks/runtime-XCEDZMMB.js +2 -0
- package/dist-cli/chunks/{screenshot-command-72DH5GXF.js → screenshot-command-TCUSGETC.js} +3 -3
- package/dist-cli/chunks/{screenshots-capture-6QQ4NPZ6.js → screenshots-capture-TUGNPCWG.js} +2 -2
- package/dist-cli/chunks/{serve-C2GAQBTN.js → serve-JAKYFLDC.js} +6 -6
- package/dist-cli/chunks/{setup-TOAATCCA.js → setup-WBQ5PYMM.js} +3 -3
- package/dist-cli/chunks/{skills-PPGCRJYB.js → skills-U5NQ6Y2O.js} +2 -2
- package/dist-cli/chunks/{storage-LI55AAJB.js → storage-X6CEYBPL.js} +2 -2
- package/dist-cli/chunks/store-Z2X4OFEM.js +2 -0
- package/dist-cli/chunks/telemetry-NWD6GLRC.js +2 -0
- package/dist-cli/chunks/{timeline-VTU7U2F7.js → timeline-RUVDOAYG.js} +2 -2
- package/dist-cli/chunks/{upgrade-VQSDSFTG.js → upgrade-X52FGN22.js} +2 -2
- package/dist-cli/chunks/upload-ZUHYO36E.js +2 -0
- package/dist-cli/chunks/{version-V37CLU3B.js → version-SMQW5VNI.js} +2 -2
- package/dist-cli/chunks/{web-PPVH2K63.js → web-2NTSSKPW.js} +2 -2
- package/dist-cli/chunks/{what-happened-3ZN3FV34.js → what-happened-3AXYUGTU.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +15 -3
- 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 +12 -5
- 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 +12 -5
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +30 -10
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/bridge-constants.ts +14 -0
- package/src/host/websocket-proxy.ts +11 -2
- package/dist-cli/chunks/beta-7LVCC4DC.js +0 -2
- package/dist-cli/chunks/chunk-2RP6TUZ3.js +0 -1
- package/dist-cli/chunks/chunk-7ST3HVVO.js +0 -2
- package/dist-cli/chunks/chunk-TAPKEEG2.js +0 -1
- package/dist-cli/chunks/cli-version-7DTLL57G.js +0 -2
- package/dist-cli/chunks/daemon-MTBKLQAM.js +0 -2
- package/dist-cli/chunks/drivers-BHAS62HS.js +0 -2
- package/dist-cli/chunks/flow-X3NSSQNP.js +0 -2
- package/dist-cli/chunks/help-7WJO45XU.js +0 -2
- package/dist-cli/chunks/inspect-FRSSCWP2.js +0 -2
- package/dist-cli/chunks/install-desktop-67O3RXXA.js +0 -2
- package/dist-cli/chunks/optional-demo-registry-KV3FG6HR.js +0 -2
- package/dist-cli/chunks/runtime-RXHJI4Y4.js +0 -2
- package/dist-cli/chunks/store-L4ASCJJM.js +0 -2
- package/dist-cli/chunks/telemetry-BVONU4AY.js +0 -2
- package/dist-cli/chunks/upload-REVW5JI2.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as j,b as ne,c as re,d as xe,e as ke,g as Pe}from"./chunk-AASXS3LK.js";import{b as Ie,l as ce}from"./chunk-6KZBSG52.js";import{a as U,b as ae}from"./chunk-MS33P5CV.js";import{a as Te,b as _e}from"./chunk-4YPQAOC6.js";import{a as Ce,b as se,c as Ee}from"./chunk-VVVCJPSQ.js";import{d as le}from"./chunk-WPS3EFNK.js";import{m as R}from"./chunk-YV35LVCO.js";import{m as Me,o as Re}from"./chunk-6NUCPZGB.js";import{a as Ue,b as Oe,c as ie,e as Be,f as De,g as C,h as v,i as E}from"./chunk-JXPGKN3F.js";import{e as _,f as b,g as M}from"./chunk-54U7A36G.js";import{H as Se,M as te,O as W,l as ve}from"./chunk-5JX4BCGL.js";import{g as oe,i as $e}from"./chunk-DAWIWEWR.js";import{spawn as je,spawnSync as Ke}from"node:child_process";import D from"node:fs";import pt from"node:os";import T from"node:path";import{WebSocket as ft}from"ws";function st(e){return e.replace(/^\[|\]$/g,"").toLowerCase()}function K(e){let t=st(e);return t==="localhost"||t.endsWith(".localhost")||t==="0.0.0.0"||t==="::1"||/^127(?:\.\d{1,3}){3}$/.test(t)}function Le(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 it(e,t){return e?.includes("/one/metro-entry.bundle")?"one":typeof t=="string"&&t?"expo":"unknown"}function Ne(e,t,o){return`${e}//${t}:${o}`}function at(e){if(typeof window>"u")return!1;try{let t=new URL(e);return K(t.hostname)&&K(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 at(e)?fetch(`/__fetch-proxy?url=${encodeURIComponent(e)}`,o):fetch(e,o)}function lt(e){return e==="https:"?443:80}function ct(e){let t=e.pathname||"/";return(t==="/"||t==="")&&!e.search&&!e.hash}async function dt(e){try{let t=await fetch("/__server-scan",{cache:"no-store"});if(!t.ok||!(t.headers.get("content-type")||"").toLowerCase().includes("json"))return null;let o=await t.json();if(!Array.isArray(o))return null;let n=o.find(r=>!!r&&typeof r=="object"&&r.port===e&&typeof r.bundleUrl=="string");return n?{bundleUrl:re(n.bundleUrl),port:e,framework:typeof n.framework=="string"?n.framework:"unknown",projectName:typeof n.projectName=="string"?n.projectName:void 0}:null}catch{return null}}async function Fe(e,t){let o=e.replace(/\/+$/,"");try{if(K(new URL(o).hostname)){let n=await dt(t);if(n)return n}}catch{}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:re(i||`${o}${ne}`),port:t,framework:it(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}${ne}`,port:t,framework:"metro"}}catch{}return null}async function mt(e){return Fe(Ne("http:","localhost",e),e)}async function He(e){let t=e.trim();if(/^\d+$/.test(t)){let a=parseInt(t,10),l=await mt(a);if(l)return l;throw Le(`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):lt(r),i=Ne(r,n.hostname,s);if(ct(n)){let a=await Fe(i,s);if(a)return a;throw Le(i)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function lo(){console.error(" no sootsim desktop companion found."),console.error(""),console.error(" install the desktop app:"),console.error(" sootsim desktop install"),console.error(""),console.error(" or run setup to install the background daemon:"),console.error(" sootsim setup"),console.error("")}function We(e){let t=U();if(console.log(` note: no sootsim bridge detected on port ${e}`),t){console.log(" launch the installed companion with:"),console.log(" sootsim desktop");return}console.log(""),console.log(" run `sootsim setup` to install the background daemon,"),console.log(" or run `sootsim serve` in another shell for a foreground bridge.")}function ut(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 co(e,t,o){let n=[];try{n=await e.listSims()}catch{}if(console.error(""),n.length===0){ut(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,r.userVisible===!1?"hidden":r.userVisible===!0?"visible":null,r.userFocused?"focused":null].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 ht=12e4,ze=100,gt=5e3,qe=1e4,wt={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 $(e){return new Promise(t=>setTimeout(t,e))}function Ge(e){let t=process.env[e]?.trim();if(!t)return null;let o=Number(t);return Number.isInteger(o)&&o>0?o:null}function bt(){let e=Ge("SOOTSIM_DRIVER_CONNECT_TIMEOUT_MS")??Ge("SOOTSIM_PW_CONNECT_TIMEOUT_MS")??ht;return{timeoutMs:e,hostTimeoutMs:e+gt,intervalMs:ze,attempts:Math.max(1,Math.ceil(e/ze))}}function yt(e){return e==="chromium"||e==="electron"||e==="playwright"||e==="system"}function vt(e,t){return e.includes("--headless")?!0:e.includes("--headed")?!1:t==="playwright"&&process.platform==="linux"&&!process.env.DISPLAY&&!process.env.WAYLAND_DISPLAY?(console.error(" no display detected \u2192 running playwright headless (override with --headed)"),!0):!1}function G(e){return e.trim()}var Ye=/^[A-Za-z][A-Za-z0-9+.-]*:/;function St(e){let t=e.trim();if(!t)throw new Error("expected <url-or-route>");return Ye.test(t)||t.startsWith("/")?t:`/${t}`}function $t(e){return e!==null&&typeof e=="object"}function xt(e){let t=e.trim();return t?t.startsWith("/")?!0:Ye.test(t)?!/^https?:\/\//i.test(t):!1:!1}async function kt(e){if(await z(e,250))return e;let t=te();if(t&&W(t)&&await z(t.bridgePort,500))return t.bridgePort;if(t&&W(t))throw new Error(`sootsim bridge lockfile is fresh (port ${t.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`);await It();let o=Pt(["serve","--quiet","--port",String(e)]),n=null;o.once("exit",(s,i)=>{n=String(s??i??"unknown")}),o.unref();let r=Date.now()+qe;for(;Date.now()<r;){let s=te();if(s&&W(s)&&await z(s.bridgePort,250))return console.error(` started local bridge on port ${s.bridgePort}; run \`sootsim setup\` to install the background daemon`),s.bridgePort;if(await z(e,250))return console.error(` started local bridge on port ${e}; run \`sootsim setup\` to install the background daemon`),e;if(n)throw new Error(`sootsim bridge exited before becoming ready (exit ${n})`);await $(150)}throw new Error(`sootsim bridge did not start within ${Math.round(qe/1e3)}s`)}async function It(){let e=Se();if(e&&D.existsSync(ve(e)))return;console.error(" installing sootsim engine runtime...");let{runRuntime:t}=await import("./runtime-RXHJI4Y4.js");await t(["install"],{})}function Pt(e){let t=process.argv[1];return t&&D.existsSync(t)?je(process.execPath,[t,...e],{detached:!0,stdio:"ignore",env:process.env}):je("sootsim",e,{detached:!0,stdio:"ignore",env:process.env})}function z(e,t){return new Promise(o=>{let n=new ft(`ws://127.0.0.1:${e}`,{handshakeTimeout:t}),r=!1,s=i=>{if(!r){r=!0;try{n.close()}catch{}o(i)}};n.once("open",()=>s(!0)),n.once("error",()=>s(!1)),setTimeout(()=>s(!1),t)})}function ue(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}}function Ct(e){try{let t=new URL(e,"http://sootsim.local");if(t.origin!=="http://sootsim.local")return!1;let o=t.pathname.replace(/\/+$/,"")||"/";return 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}}function Et(e,t){let o=new URL(e,"http://sootsim.local"),n=new URL(t),r=V(n.pathname),s=o.pathname.startsWith("/__soot/")?o.pathname.slice(7):o.pathname;return n.pathname=`${r}${s}`,n.search=o.search,n.hash=o.hash,n.toString()}function Tt(e){try{let t=new URL(e).pathname.replace(/\/+$/,"")||"/";return/^\/preview\/[^/]+$/.test(t)||/^\/build\/.+/.test(t)}catch{return!1}}async function Bo(e){let t=G(e);return(await Ze(t)).bundleUrl}function _t(e){try{let t=new URL(e.startsWith("http")?e:`http://${e}`),o=t.pathname||"/";if(o!=="/"&&o!==""||t.search||t.hash||!/^(localhost|127\.0\.0\.1|\[::1\]|::1)$/i.test(t.hostname))return null;let n=t.port?Number(t.port):t.protocol==="https:"?443:80;return Number.isFinite(n)&&n>0?n:null}catch{return null}}async function Ze(e){let t=G(e),o=/^\d+$/.test(t)?Number(t):_t(t);if(o&&o>0){let n=await ke(o);if(n)return{bundleUrl:n.bundleUrl,port:n.port,framework:n.framework,projectName:n.projectName}}return He(t)}function V(e){let t=e.replace(/\/+$/,"")||"/";return t==="/__soot"||t.startsWith("/__soot/")?"/__soot":""}function Mt(e,t){let o=G(e),n=new URL(t),r=V(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),/^\d+$/.test(o)?n.pathname=`${r}/rn/${o}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",o)),n.toString()}function Rt(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 Ut(e,t,o={}){let n=await Ze(e),r=new URL(t),s=V(r.pathname);r.pathname=`${s}/rn`,r.searchParams.delete("open"),r.searchParams.delete("port"),r.searchParams.delete("demo"),r.searchParams.delete("app");let i=o.hot===void 0?n.bundleUrl:xe(n.bundleUrl,o.hot);return r.searchParams.set("bundle",i),r.toString()}function Ot(e){return e.startsWith("~/")?T.join(pt.homedir(),e.slice(2)):T.isAbsolute(e)?e:T.resolve(process.cwd(),e)}function Bt(e){let t={},o={};for(let r=0;r<e.length;r++){if(e[r]==="--replace"){let s=e[r+1];s||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let i=s.indexOf("=");(i<=0||i===s.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let a=s.slice(0,i).trim(),l=Ot(s.slice(i+1).trim());D.existsSync(l)||(console.error(` sootsim open: replacement file not found: ${l}`),process.exit(1)),t[a]={file:l},r++;continue}if(e[r]==="--remap"){let s=e[r+1],i=s?s.indexOf("="):-1;(!s||i<=0||i===s.length-1)&&(console.error(" sootsim open: --remap expects <host:port>=<host:port>"),process.exit(1)),o[s.slice(0,i).trim()]=s.slice(i+1).trim(),r++;continue}}let n={};return Object.keys(t).length>0&&(n.modules=t),Object.keys(o).length>0&&(n.network={remap:o}),n.modules||n.network?n:void 0}function Xe(){return Ue().shellBaseUrl}async function Dt(e){try{let t=new URL(e),o=t.searchParams.get("bundle")||"";if(!o)return e;let n=process.env.CONTRAST_REPO_DIR||await se(o)||void 0,r=Ce({bundleUrl:o,repoDir:n});if(r.length===0)return e;let s=await Lt(r);return s.length===0?e:(t.searchParams.set("appFonts",Ee(s)),t.toString())}catch{return e}}async function Lt(e){let t=await Promise.all(e.map(async n=>{let r=new AbortController,s=setTimeout(()=>r.abort(),1500);try{let i=await fetch(n.url,{method:"HEAD",signal:r.signal});return i.status>=200&&i.status<400?n:null}catch{return null}finally{clearTimeout(s)}})),o=[];for(let n of t)n!==null&&o.push(n);return o}async function At(e,t,o={}){if(!e)return new URL(t).toString();if(ue(e))return new URL(e).toString();if(Ct(e))return Et(e,t);let n=wt[e.toLowerCase()];if(n){let r=new URL(t),s=V(r.pathname);return r.pathname=`${s}${n}`,r.toString()}return Rt(e)?Ut(e,t,o):Mt(e,t)}async function Nt(e){try{let t=new URL(e),o=t.searchParams.get("bundle")||"";if(!o)return e;let n=process.env.CONTRAST_REPO_DIR||await se(o)||void 0,r=Te({bundleUrl:o,repoDir:n});return!r||r.imageUrl&&!await Ft(r.imageUrl)?e:(t.searchParams.set("appSplash",_e(r)),t.toString())}catch{return e}}async function Ft(e){let t=new AbortController,o=setTimeout(()=>t.abort(),1500);try{let n=await fetch(e,{method:"HEAD",signal:t.signal});return n.status>=200&&n.status<400}catch{return!1}finally{clearTimeout(o)}}async function q(e,t=Xe(),o={}){let n=await At(e,t,o),r=await Nt(await Dt(n));if(!o.device)return r;let s=new URL(r);return s.searchParams.set("device",o.device),s.toString()}function Ve(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.searchParams.delete("appFonts"),n.searchParams.delete("appSplash"),n.toString()}catch{return t}}async function Ht(e,t,o,n={}){let r=new URL(await q(e,t,n));return r.searchParams.set("inspectOpen",o),r.toString()}async function Wt(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=v(e,{commandTimeoutMs:t,simId:o,simIdSource:"flag"});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 $(s)}return null}function jt(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 Kt(e){let t=e.indexOf(":");if(t<=0)return e.length>24?`${e.slice(0,21)}\u2026`:e;let o=e.slice(0,t),n=e.slice(t+1),r=n.length>12?`${n.slice(0,8)}\u2026`:n;return o==="AGENTBUS_SESSION"||o==="CLAUDE_CODE_SESSION_ID"||o==="CODEX_THREAD_ID"?`agent ${r}`:`${o} ${r}`}function Do(e,t){if(e.length===0){console.log(" no sims connected");return}console.log(` connected sims (${e.length}):
|
|
1
|
+
/*! sootsim v0.1.235 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as j,b as ne,c as re,d as xe,e as ke,g as Pe}from"./chunk-BZPJSFSP.js";import{b as Ie,l as ce}from"./chunk-G4VPOKCZ.js";import{a as U,b as ae}from"./chunk-Z7TEEXRM.js";import{a as Te,b as _e}from"./chunk-YAX25DGN.js";import{a as Ce,b as se,c as Ee}from"./chunk-YQDB5ODC.js";import{d as le}from"./chunk-TR25YKVI.js";import{m as R}from"./chunk-WQ5DQ5X7.js";import{m as Me,o as Re}from"./chunk-XWRHHNOK.js";import{a as Ue,b as Oe,c as ie,e as Be,f as De,g as C,h as v,i as E}from"./chunk-XUJDCVTH.js";import{e as _,f as b,g as M}from"./chunk-YLSEQMQK.js";import{H as Se,M as te,O as W,l as ve}from"./chunk-CFIAG2RO.js";import{g as oe,i as $e}from"./chunk-APBFMXMM.js";import{spawn as je,spawnSync as Ke}from"node:child_process";import D from"node:fs";import pt from"node:os";import T from"node:path";import{WebSocket as ft}from"ws";function st(e){return e.replace(/^\[|\]$/g,"").toLowerCase()}function K(e){let t=st(e);return t==="localhost"||t.endsWith(".localhost")||t==="0.0.0.0"||t==="::1"||/^127(?:\.\d{1,3}){3}$/.test(t)}function Le(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 it(e,t){return e?.includes("/one/metro-entry.bundle")?"one":typeof t=="string"&&t?"expo":"unknown"}function Ne(e,t,o){return`${e}//${t}:${o}`}function at(e){if(typeof window>"u")return!1;try{let t=new URL(e);return K(t.hostname)&&K(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 at(e)?fetch(`/__fetch-proxy?url=${encodeURIComponent(e)}`,o):fetch(e,o)}function lt(e){return e==="https:"?443:80}function ct(e){let t=e.pathname||"/";return(t==="/"||t==="")&&!e.search&&!e.hash}async function dt(e){try{let t=await fetch("/__server-scan",{cache:"no-store"});if(!t.ok||!(t.headers.get("content-type")||"").toLowerCase().includes("json"))return null;let o=await t.json();if(!Array.isArray(o))return null;let n=o.find(r=>!!r&&typeof r=="object"&&r.port===e&&typeof r.bundleUrl=="string");return n?{bundleUrl:re(n.bundleUrl),port:e,framework:typeof n.framework=="string"?n.framework:"unknown",projectName:typeof n.projectName=="string"?n.projectName:void 0}:null}catch{return null}}async function Fe(e,t){let o=e.replace(/\/+$/,"");try{if(K(new URL(o).hostname)){let n=await dt(t);if(n)return n}}catch{}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:re(i||`${o}${ne}`),port:t,framework:it(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}${ne}`,port:t,framework:"metro"}}catch{}return null}async function mt(e){return Fe(Ne("http:","localhost",e),e)}async function He(e){let t=e.trim();if(/^\d+$/.test(t)){let a=parseInt(t,10),l=await mt(a);if(l)return l;throw Le(`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):lt(r),i=Ne(r,n.hostname,s);if(ct(n)){let a=await Fe(i,s);if(a)return a;throw Le(i)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function lo(){console.error(" no sootsim desktop companion found."),console.error(""),console.error(" install the desktop app:"),console.error(" sootsim desktop install"),console.error(""),console.error(" or run setup to install the background daemon:"),console.error(" sootsim setup"),console.error("")}function We(e){let t=U();if(console.log(` note: no sootsim bridge detected on port ${e}`),t){console.log(" launch the installed companion with:"),console.log(" sootsim desktop");return}console.log(""),console.log(" run `sootsim setup` to install the background daemon,"),console.log(" or run `sootsim serve` in another shell for a foreground bridge.")}function ut(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 co(e,t,o){let n=[];try{n=await e.listSims()}catch{}if(console.error(""),n.length===0){ut(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,r.userVisible===!1?"hidden":r.userVisible===!0?"visible":null,r.userFocused?"focused":null].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 ht=12e4,ze=100,gt=5e3,qe=1e4,wt={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 $(e){return new Promise(t=>setTimeout(t,e))}function Ge(e){let t=process.env[e]?.trim();if(!t)return null;let o=Number(t);return Number.isInteger(o)&&o>0?o:null}function bt(){let e=Ge("SOOTSIM_DRIVER_CONNECT_TIMEOUT_MS")??Ge("SOOTSIM_PW_CONNECT_TIMEOUT_MS")??ht;return{timeoutMs:e,hostTimeoutMs:e+gt,intervalMs:ze,attempts:Math.max(1,Math.ceil(e/ze))}}function yt(e){return e==="chromium"||e==="electron"||e==="playwright"||e==="system"}function vt(e,t){return e.includes("--headless")?!0:e.includes("--headed")?!1:t==="playwright"&&process.platform==="linux"&&!process.env.DISPLAY&&!process.env.WAYLAND_DISPLAY?(console.error(" no display detected \u2192 running playwright headless (override with --headed)"),!0):!1}function G(e){return e.trim()}var Ye=/^[A-Za-z][A-Za-z0-9+.-]*:/;function St(e){let t=e.trim();if(!t)throw new Error("expected <url-or-route>");return Ye.test(t)||t.startsWith("/")?t:`/${t}`}function $t(e){return e!==null&&typeof e=="object"}function xt(e){let t=e.trim();return t?t.startsWith("/")?!0:Ye.test(t)?!/^https?:\/\//i.test(t):!1:!1}async function kt(e){if(await z(e,250))return e;let t=te();if(t&&W(t)&&await z(t.bridgePort,500))return t.bridgePort;if(t&&W(t))throw new Error(`sootsim bridge lockfile is fresh (port ${t.bridgePort}) but the bridge is not reachable. run \`sootsim daemon restart\` or \`sootsim daemon uninstall\`.`);await It();let o=Pt(["serve","--quiet","--port",String(e)]),n=null;o.once("exit",(s,i)=>{n=String(s??i??"unknown")}),o.unref();let r=Date.now()+qe;for(;Date.now()<r;){let s=te();if(s&&W(s)&&await z(s.bridgePort,250))return console.error(` started local bridge on port ${s.bridgePort}; run \`sootsim setup\` to install the background daemon`),s.bridgePort;if(await z(e,250))return console.error(` started local bridge on port ${e}; run \`sootsim setup\` to install the background daemon`),e;if(n)throw new Error(`sootsim bridge exited before becoming ready (exit ${n})`);await $(150)}throw new Error(`sootsim bridge did not start within ${Math.round(qe/1e3)}s`)}async function It(){let e=Se();if(e&&D.existsSync(ve(e)))return;console.error(" installing sootsim engine runtime...");let{runRuntime:t}=await import("./runtime-XCEDZMMB.js");await t(["install"],{})}function Pt(e){let t=process.argv[1];return t&&D.existsSync(t)?je(process.execPath,[t,...e],{detached:!0,stdio:"ignore",env:process.env}):je("sootsim",e,{detached:!0,stdio:"ignore",env:process.env})}function z(e,t){return new Promise(o=>{let n=new ft(`ws://127.0.0.1:${e}`,{handshakeTimeout:t}),r=!1,s=i=>{if(!r){r=!0;try{n.close()}catch{}o(i)}};n.once("open",()=>s(!0)),n.once("error",()=>s(!1)),setTimeout(()=>s(!1),t)})}function ue(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}}function Ct(e){try{let t=new URL(e,"http://sootsim.local");if(t.origin!=="http://sootsim.local")return!1;let o=t.pathname.replace(/\/+$/,"")||"/";return 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}}function Et(e,t){let o=new URL(e,"http://sootsim.local"),n=new URL(t),r=V(n.pathname),s=o.pathname.startsWith("/__soot/")?o.pathname.slice(7):o.pathname;return n.pathname=`${r}${s}`,n.search=o.search,n.hash=o.hash,n.toString()}function Tt(e){try{let t=new URL(e).pathname.replace(/\/+$/,"")||"/";return/^\/preview\/[^/]+$/.test(t)||/^\/build\/.+/.test(t)}catch{return!1}}async function Bo(e){let t=G(e);return(await Ze(t)).bundleUrl}function _t(e){try{let t=new URL(e.startsWith("http")?e:`http://${e}`),o=t.pathname||"/";if(o!=="/"&&o!==""||t.search||t.hash||!/^(localhost|127\.0\.0\.1|\[::1\]|::1)$/i.test(t.hostname))return null;let n=t.port?Number(t.port):t.protocol==="https:"?443:80;return Number.isFinite(n)&&n>0?n:null}catch{return null}}async function Ze(e){let t=G(e),o=/^\d+$/.test(t)?Number(t):_t(t);if(o&&o>0){let n=await ke(o);if(n)return{bundleUrl:n.bundleUrl,port:n.port,framework:n.framework,projectName:n.projectName}}return He(t)}function V(e){let t=e.replace(/\/+$/,"")||"/";return t==="/__soot"||t.startsWith("/__soot/")?"/__soot":""}function Mt(e,t){let o=G(e),n=new URL(t),r=V(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),/^\d+$/.test(o)?n.pathname=`${r}/rn/${o}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",o)),n.toString()}function Rt(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 Ut(e,t,o={}){let n=await Ze(e),r=new URL(t),s=V(r.pathname);r.pathname=`${s}/rn`,r.searchParams.delete("open"),r.searchParams.delete("port"),r.searchParams.delete("demo"),r.searchParams.delete("app");let i=o.hot===void 0?n.bundleUrl:xe(n.bundleUrl,o.hot);return r.searchParams.set("bundle",i),r.toString()}function Ot(e){return e.startsWith("~/")?T.join(pt.homedir(),e.slice(2)):T.isAbsolute(e)?e:T.resolve(process.cwd(),e)}function Bt(e){let t={},o={};for(let r=0;r<e.length;r++){if(e[r]==="--replace"){let s=e[r+1];s||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let i=s.indexOf("=");(i<=0||i===s.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let a=s.slice(0,i).trim(),l=Ot(s.slice(i+1).trim());D.existsSync(l)||(console.error(` sootsim open: replacement file not found: ${l}`),process.exit(1)),t[a]={file:l},r++;continue}if(e[r]==="--remap"){let s=e[r+1],i=s?s.indexOf("="):-1;(!s||i<=0||i===s.length-1)&&(console.error(" sootsim open: --remap expects <host:port>=<host:port>"),process.exit(1)),o[s.slice(0,i).trim()]=s.slice(i+1).trim(),r++;continue}}let n={};return Object.keys(t).length>0&&(n.modules=t),Object.keys(o).length>0&&(n.network={remap:o}),n.modules||n.network?n:void 0}function Xe(){return Ue().shellBaseUrl}async function Dt(e){try{let t=new URL(e),o=t.searchParams.get("bundle")||"";if(!o)return e;let n=process.env.CONTRAST_REPO_DIR||await se(o)||void 0,r=Ce({bundleUrl:o,repoDir:n});if(r.length===0)return e;let s=await Lt(r);return s.length===0?e:(t.searchParams.set("appFonts",Ee(s)),t.toString())}catch{return e}}async function Lt(e){let t=await Promise.all(e.map(async n=>{let r=new AbortController,s=setTimeout(()=>r.abort(),1500);try{let i=await fetch(n.url,{method:"HEAD",signal:r.signal});return i.status>=200&&i.status<400?n:null}catch{return null}finally{clearTimeout(s)}})),o=[];for(let n of t)n!==null&&o.push(n);return o}async function At(e,t,o={}){if(!e)return new URL(t).toString();if(ue(e))return new URL(e).toString();if(Ct(e))return Et(e,t);let n=wt[e.toLowerCase()];if(n){let r=new URL(t),s=V(r.pathname);return r.pathname=`${s}${n}`,r.toString()}return Rt(e)?Ut(e,t,o):Mt(e,t)}async function Nt(e){try{let t=new URL(e),o=t.searchParams.get("bundle")||"";if(!o)return e;let n=process.env.CONTRAST_REPO_DIR||await se(o)||void 0,r=Te({bundleUrl:o,repoDir:n});return!r||r.imageUrl&&!await Ft(r.imageUrl)?e:(t.searchParams.set("appSplash",_e(r)),t.toString())}catch{return e}}async function Ft(e){let t=new AbortController,o=setTimeout(()=>t.abort(),1500);try{let n=await fetch(e,{method:"HEAD",signal:t.signal});return n.status>=200&&n.status<400}catch{return!1}finally{clearTimeout(o)}}async function q(e,t=Xe(),o={}){let n=await At(e,t,o),r=await Nt(await Dt(n));if(!o.device)return r;let s=new URL(r);return s.searchParams.set("device",o.device),s.toString()}function Ve(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.searchParams.delete("appFonts"),n.searchParams.delete("appSplash"),n.toString()}catch{return t}}async function Ht(e,t,o,n={}){let r=new URL(await q(e,t,n));return r.searchParams.set("inspectOpen",o),r.toString()}async function Wt(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=v(e,{commandTimeoutMs:t,simId:o,simIdSource:"flag"});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 $(s)}return null}function jt(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 Kt(e){let t=e.indexOf(":");if(t<=0)return e.length>24?`${e.slice(0,21)}\u2026`:e;let o=e.slice(0,t),n=e.slice(t+1),r=n.length>12?`${n.slice(0,8)}\u2026`:n;return o==="AGENTBUS_SESSION"||o==="CLAUDE_CODE_SESSION_ID"||o==="CODEX_THREAD_ID"?`agent ${r}`:`${o} ${r}`}function Do(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 ${Kt(o.lockedBy)} (${Math.max(0,Math.round((o.lockExpiresAt-Date.now())/1e3))}s)`:"",r=[o.isPrimary?"primary":"",o.id===t?"selected":"",o.readyState,o.userVisible===!1?"hidden":o.userVisible===!0?"visible":"",o.attachedCliCount&&o.attachedCliCount>0?"in use":"",o.userFocused?"focused":"",n].filter(Boolean);console.log(` ${o.id}${r.length?` [${r.join(", ")}]`:""}`);let s=jt(o.url);if(s)console.log(` loaded: ${s}`);else if(o.url){let a=o.url.length>96?`${o.url.slice(0,93)}\u2026`:o.url;console.log(` url: ${a}`)}else o.origin&&console.log(` origin: ${o.origin}`);let i=zt(o);i&&console.log(` engine: ${i}`),o.title&&console.log(` title: ${o.title}`),o.visibilityState&&o.visibilityState!=="visible"&&console.log(` visibility: ${o.visibilityState}`),console.log(` connected: ${Je(Date.now()-o.connectedAt)}`),o.lastActiveAt&&o.lastActiveAt>0&&console.log(` last active: ${Je(Date.now()-o.lastActiveAt)}`)}}function zt(e){let t=e.url||e.origin||"";if(!t)return null;try{let o=new URL(t).port;return o==="5173"?"dev \u2014 local source (:5173)":o==="3000"?"Contrast app embedded (:3000)":Pe()?`dev \u2014 local build (:${o||"?"})`:`runtime \u2014 published engine (:${o||"?"})`}catch{return null}}function Je(e){let t=Math.max(0,Math.round(e/1e3));return t<60?`${t}s ago`:t<3600?`${Math.round(t/60)}m ago`:t<86400?`${Math.round(t/3600)}h ago`:`${Math.round(t/86400)}d ago`}async function de(e,t,o,n={}){let r=n.attempts??30,s=n.intervalMs??500;for(let i=0;i<r;i++){let a=v(e,{commandTimeoutMs:t});try{let d=(await a.listSims()).find(o);if(d)return d}catch{}finally{a.close()}await $(s)}return null}async function qt(e,t,o,n,r={}){let s=r.attempts??30,i=r.intervalMs??500,a=!!n&&Number.isInteger(n)&&n>1,l=()=>a&&n!==void 0&&!pe(n);for(let d=0;d<s;d++){if(l())return{kind:"host-exit"};let m=v(e,{commandTimeoutMs:t});try{let g=(await m.listSims()).find(o);if(g)return l()?{kind:"host-exit"}:{kind:"match",sim:g}}catch{}finally{m.close()}if(l())return{kind:"host-exit"};await $(i)}return{kind:"timeout"}}async function Gt(e,t,o,n={}){let r=n.attempts??20,s=n.intervalMs??250;for(let i=0;i<r;i++){let a=v(e,{commandTimeoutMs:t});try{let d=(await a.listSims()).find(m=>m.id===o);if(!d||d.readyState!=="open")return!0}catch{return!0}finally{a.close()}await $(s)}return!1}function Vt(e){let t=e.meta;if(!t||t.sootsimHostDriver!=="playwright")return null;let o=Number(t.sootsimHostPid);return!Number.isInteger(o)||o<=1||o===process.pid?null:o}function Jt(e){if(!e.connectAckFile)return!1;try{return D.writeFileSync(e.connectAckFile,`${JSON.stringify({connectedAt:Date.now(),pid:e.pid??null})}
|
|
4
4
|
`,{flag:"w"}),!0}catch{return!1}}function Qe(e){if(e.diagnosticLogPath)try{let t=D.readFileSync(e.diagnosticLogPath,"utf8").trim();if(!t){console.error(` ${T.basename(e.diagnosticLogPath)} was empty`);return}let o=t.length>4e3?`\u2026
|
|
5
5
|
${t.slice(-4e3)}`:t;console.error(` ${T.basename(e.diagnosticLogPath)}:`),console.error(o)}catch(t){let o=t instanceof Error?t.message:String(t);console.error(` failed to read ${T.basename(e.diagnosticLogPath)}: ${o}`)}}function pe(e){try{return process.kill(e,0),!0}catch(t){return t?.code==="EPERM"}}async function Qt(e,t=2500){let o=Date.now()+t;for(;Date.now()<o;){if(!pe(e))return!0;await $(100)}return!pe(e)}function Yt(e){let t=Ke("ps",["-o","command=","-p",String(e)],{encoding:"utf8",stdio:["ignore","pipe","pipe"]}),o=Ke("ps",["eww","-o","command=","-p",String(e)],{encoding:"utf8",stdio:["ignore","pipe","pipe"]});if(t.status!==0||o.status!==0)return!1;let n=(t.stdout||"").trimEnd(),r=(o.stdout||"").trimEnd();return(r.startsWith(n)?r.slice(n.length):r).includes("SOOTSIM_PW_URL=")}async function me(e,t){let o=new Set(t),n=new Set;for(let r of e){if(!o.has(r.id))continue;let s=Vt(r);s&&n.add(s)}for(let r of n){if(!Yt(r)){console.log(` skipped pid ${r}: not a sootsim playwright host (stale sim record)`);continue}try{process.kill(r,"SIGTERM")}catch{}if(await Qt(r)){console.log(` closed playwright host process ${r}`);continue}try{process.kill(r,"SIGKILL"),console.log(` force-closed playwright host process ${r}`)}catch{}}}function J(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 O(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 B(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 Zt(e,t,{stableMs:150,maxMs:400});let r=v(e,{commandTimeoutMs:3e3,simId:t,cliLabel:"open --describe",simIdSource:"flag"});try{let s=null;try{s=await r.send({type:"evaluate",code:Me})}catch{}if(s&&!(s.flag===!0&&!s.loadingText&&Re(s))){let m=s.loadingText?`still showing "${s.loadingText}"`:s.flag!==!0?"guest ready event has not fired":s.targets<=0?"no visible app content is inspectable yet":"app tree is still stabilizing";console.log(` app still loading: ${m} (nodes: ${s.nodes}, targets: ${s.targets})`),console.log(" before interacting, run: sootsim wait ready --max-ms 120000")}let a=`(async () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as ot}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.235 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as ot}from"./chunk-6XLP5EB5.js";import{a as nt}from"./chunk-YYW4JGGL.js";import{a as ge,c as we,d as be,e as et,f as ye,g as Se,h as tt,i as ve,j as it}from"./chunk-KEZZHUOP.js";import{a as Qe}from"./chunk-TEEK6DLL.js";import{e as rt}from"./chunk-2NTPCZNI.js";import{h as qe,p as Ye,r as Ze,v as Xe}from"./chunk-GD6LJ2CR.js";import{f as We}from"./chunk-BZPJSFSP.js";import{a as Ke}from"./chunk-Z7TEEXRM.js";import{a as He}from"./chunk-UMRMWSAM.js";import{h as me,m as ze}from"./chunk-WQ5DQ5X7.js";import{I as J,m as Ue,n as je,o as Ve,p as Je}from"./chunk-XWRHHNOK.js";import{g as he,h as fe,i as Ge}from"./chunk-XUJDCVTH.js";import{a as Be,b as ue}from"./chunk-TZJ6V6E3.js";import{e as pe,f as Ne}from"./chunk-YLSEQMQK.js";import{g as Le,h as Ce}from"./chunk-APBFMXMM.js";import*as $ from"fs";import{createHash as Gt,randomUUID as zt}from"node:crypto";import{tmpdir as q}from"os";import*as w from"path";import*as v from"fs";import*as S from"path";var $t="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",at=1;function Pt(r){let e=Ce(r),t=e.scale,i=e.statusBarHeight>0&&!e.dynamicIsland&&e.homeIndicatorHeight===0&&e.cornerRadius===0,n=e.width,o=e.height,a=i?e.width+58:e.width+e.bezelWidth*2,s=i?e.height+111+111:e.height+e.bezelWidth*2,l=9.5,p=at,u=a+l*2,m=s+at*2,b=l+(i?29:e.bezelWidth),g=i?111:e.bezelWidth,P=i?52:e.cornerRadius+e.bezelWidth,k=[{side:"right",top:e.hardwareButtons.lock.top,height:e.hardwareButtons.lock.height,width:e.hardwareButtons.width},{side:"left",top:e.hardwareButtons.ringToggle.top,height:e.hardwareButtons.ringToggle.height,width:e.hardwareButtons.width},{side:"left",top:e.hardwareButtons.volumeUp.top,height:e.hardwareButtons.volumeUp.height,width:e.hardwareButtons.width},{side:"left",top:e.hardwareButtons.volumeDown.top,height:e.hardwareButtons.volumeDown.height,width:e.hardwareButtons.width}];return{model:r,renderScale:t,outerWidth:Math.round(u*t),outerHeight:Math.round(m*t),logicalOuterWidth:u,logicalOuterHeight:m,logicalFrameWidth:a,logicalFrameHeight:s,logicalFrameLeft:l,logicalFrameTop:p,logicalScreenWidth:n,logicalScreenHeight:o,logicalScreenLeft:b,logicalScreenTop:g,logicalScreenRadius:i?0:e.cornerRadius,logicalFrameRadius:P,frameBackground:i?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:i?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:i?null:$t,buttons:k,legacyHomeButton:i?{top:111+e.height+47/2,left:e.width/2-64/2+29,size:64,ring:1.5}:null,showHomeIndicator:e.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:e.homeIndicatorHeight}}function kt(r){let e=r.side==="right",t=e?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
|
|
3
3
|
<div
|
|
4
4
|
aria-hidden="true"
|
|
5
5
|
style="
|
|
@@ -559,7 +559,7 @@ flow extension:
|
|
|
559
559
|
})()`}),console.log(` captured ${_.length} partial replay events`)}catch(c){console.warn(` event recorder stop failed: ${c?.message||String(c)}`)}console.error(`
|
|
560
560
|
x failed: ${h.message}
|
|
561
561
|
`),O&&(console.log(" partial profile:"),pt(O)),I&&console.log(` partial video: ${I}`);try{let c=d.lastFailedStep,y=c?`step-${String(c.index+1).padStart(2,"0")}-${c.kind}`:"unstaged",F=w.join(s,y);await d.captureFailureBundle(F,{error:h,stepIndex:c?.index,stepKind:c?.kind,stepTarget:c?.target}),de=F,console.log(` failure bundle: ${F}`),console.log(" (contents: screenshot.png, describe.json, a11y.txt, tree.txt, console.json, error.json)")}catch(c){try{let y=w.join(s,"error.png");await d.captureScreenshot(y),console.log(` error screenshot: ${y}`)}catch{}console.log(` (failure bundle capture failed: ${c instanceof Error?c.message:String(c)})`)}await ze(E,{errorsCommand:`sootsim get errors 5${d.simId?` --sim ${d.simId}`:""}`,warningsCommand:`sootsim get warnings 5${d.simId?` --sim ${d.simId}`:""}`,requestsCommand:`sootsim get requests 5${d.simId?` --sim ${d.simId}`:""}`}),j=1}if(await d.liveStatus?.end(j===0?"passed":"failed"),g&&(j===0||I||_))try{let h=await Zt(_??[]),c=["--origin",P,"--events",h];k&&c.push("--public-origin",k),I&&c.push("--video",I),U&&c.push("--screenshot",U),I&&L&&Number.isFinite(L)&&(c.push("--video-duration-ms",String(Math.round(L))),c.push("--recorded-duration-ms",String(Math.round(L))));let y=d.getLastRecordingStartedAtMs();y&&Number.isFinite(y)&&c.push("--recording-started-at-ms",String(Math.round(y))),x.wsPort&&c.push("--port",String(x.wsPort)),d.simId&&c.push("--sim",d.simId),oe&&c.push("--open"),Pe&&c.push("--owner",Pe),ke&&c.push("--repo",ke),c.push("--run-scope",ft),H&&c.push("--billing-kind",H),console.log(`
|
|
562
|
-
preparing preview upload\u2026`);let F=d.getFlowTraceSteps();F.length>0&&c.push("--timeline-events",await Xt(F));let V=await Qt(F,y);V&&c.push("--snapshot-manifest",V),de&&c.push("--failure-bundle",de);let D=d.getLastRecordingFrameStats();D&&c.push("--trace-frame-stats",await ei(D));let{runUpload:Tt}=await import("./upload-
|
|
562
|
+
preparing preview upload\u2026`);let F=d.getFlowTraceSteps();F.length>0&&c.push("--timeline-events",await Xt(F));let V=await Qt(F,y);V&&c.push("--snapshot-manifest",V),de&&c.push("--failure-bundle",de);let D=d.getLastRecordingFrameStats();D&&c.push("--trace-frame-stats",await ei(D));let{runUpload:Tt}=await import("./upload-ZUHYO36E.js");Fe=await Tt(c,{})}catch(h){console.error(` preview upload failed: ${h?.message||h}`),j=1}return $e=d.getFlowTraceSteps(),E.close(),le?(d.simId&&ce.add(d.simId),await Yt(x.wsPort,x.commandTimeoutMs,[...ce])):d.simId&&d.simId!==Z&&Ne(d.simId),await ue(),j}async function Yt(r,e,t){let i=[...new Set(t.filter(Boolean))];if(i.length===0)return;let n=fe(r,{commandTimeoutMs:e});try{let o=await n.listSims(),a=i.filter(l=>o.some(p=>p.id===l&&p.readyState==="open"));if(a.length===0)return;let s=await Xe(n,r,e,a);await Ye(o,a),s.closed.length>0&&console.log(` closed flow sim(s): ${s.closed.join(", ")}`),s.remaining.length>0&&console.warn(` warn: flow sim(s) still connected after close: ${s.remaining.join(", ")}`)}catch(o){console.warn(` warn: failed to close flow sim(s): ${o instanceof Error?o.message:String(o)}`)}finally{n.close()}}async function Zt(r){let{gzipSync:e}=await import("zlib"),t=r.map(o=>JSON.stringify(o)).join(`
|
|
563
563
|
`)+(r.length?`
|
|
564
564
|
`:""),i=e(Buffer.from(t,"utf8")),n=w.join(q(),`sootsim-events-${Date.now()}.jsonl.gz`);return $.writeFileSync(n,i),console.log(` events: ${r.length} written to ${n} (${i.length} bytes gz)`),n}async function Xt(r){let{gzipSync:e}=await import("zlib"),t=r.map((a,s)=>({schemaVersion:1,t:a.endedAtMs,seq:1e6+s,context:"host",kind:"flow-step",id:`flow-step-${a.stepIndex}`,data:{stepIndex:a.stepIndex,stepNumber:a.stepIndex+1,stepName:a.stepName,...a.targetLabel?{targetLabel:a.targetLabel}:{},status:a.status,durationMs:a.durationMs,startedAtMs:a.startedAtMs,endedAtMs:a.endedAtMs,...a.error?{error:a.error}:{}}})),i=t.map(a=>JSON.stringify(a)).join(`
|
|
565
565
|
`)+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{G as R,H as d,I as x,K as w,l as g,u as $,x as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.235 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{G as R,H as d,I as x,K as w,l as g,u as $,x as b}from"./chunk-CFIAG2RO.js";import{spawn as E}from"child_process";import k from"crypto";import o from"fs";import u from"path";import{Readable as C}from"stream";import{pipeline as T}from"stream/promises";var _="https://contrast.dev",U="SOOTSIM_CDN_ORIGIN",D="SOOTSIM_RUNTIME_CHANNEL",P="SOOTSIM_RUNTIME_VERSION",X="https://sootsim.com/changelog";function y(){try{let t=JSON.parse(o.readFileSync(b(),"utf8"));return t&&typeof t=="object"?t:{}}catch{return{}}}function f(t){let n=y();return(t||process.env[U]||n.cdnOrigin||_).replace(/\/+$/,"")}function S(t){let n=y();return t||process.env[D]||n.runtimeChannel||"stable"}function O(){let t=process.env[P];if(t&&t.trim())return t.trim();let n=y();return typeof n.runtimeVersion=="string"&&n.runtimeVersion.trim()?n.runtimeVersion.trim():null}function A(t){let n=new URL(`${f(t)}/runtimes/manifest.json`);return n.searchParams.set("t",String(Date.now())),n.toString()}function j(t,n){return`${f(n)}/runtimes/sootsim-runtime-${t}.tar.gz`}async function I(t){let n=A(t),r=await fetch(n,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${n})`);return await r.json()}function L(t,n={}){let r=S(n.channel),e=n.version||O()||t.channels[r]?.latest;if(!e)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);let s=t.versions[e];if(!s)throw new Error(`version ${e} not found in manifest; available: ${Object.keys(t.versions).slice(-10).join(", ")||"(none)"}`);return{version:e,channel:r,entry:s}}async function N(t={}){R();let n=f(t.cdnOrigin),r=await I(n),{version:e,channel:s,entry:i}=L(r,t),c=g(e),a=t.setActive!==!1;if(!t.force&&o.existsSync(u.join(c,"index.html")))return a&&x(e),{version:e,channel:s,cdnOrigin:n,runtimeDir:c,installed:!1,activated:a,manifest:r};let h=i.tarball||j(e,n),m=u.join($(),`sootsim-runtime-${e}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${e}\u2026
|
|
3
3
|
`),await F(h,m),process.stderr.write(`sootsim: extracting runtime ${e}\u2026
|
|
4
4
|
`);let v=await G(m);if(v!==i.sha256)throw o.rmSync(m,{force:!0}),new Error(`sha256 mismatch for runtime ${e}: expected ${i.sha256}, actual ${v}`);let l=u.join(u.dirname(c),`.installing-${e}-${process.pid}`);o.rmSync(l,{recursive:!0,force:!0}),o.mkdirSync(l,{recursive:!0});try{if(await H(m,l),!o.existsSync(u.join(l,"index.html")))throw new Error(`extracted tarball for runtime ${e} is missing index.html`);o.rmSync(c,{recursive:!0,force:!0}),o.renameSync(l,c)}catch(p){throw o.rmSync(l,{recursive:!0,force:!0}),p}return a&&x(e),{version:e,channel:s,cdnOrigin:n,runtimeDir:c,installed:!0,activated:a,manifest:r}}async function Y(t={}){R();let n=f(t.cdnOrigin),r=S(t.channel),e=O();if(e){let p=d(),V=o.existsSync(u.join(g(e),"index.html"));if(p===e&&V)return{checked:!0,updated:!1,reason:`runtime is pinned to ${e}`,activeVersion:p,latestVersion:e};let M=await N({version:e,channel:r,cdnOrigin:n,setActive:!1});return{checked:!0,updated:!0,reason:`runtime is pinned to ${e}`,activeVersion:e,latestVersion:e,install:M}}let s=await I(n),i=s.channels[r]?.latest;if(!i)return{checked:!0,updated:!1,reason:`channel '${r}' has no latest runtime`,activeVersion:d()};if(!s.versions[i])return{checked:!0,updated:!1,reason:`manifest is missing version ${i}`,activeVersion:d(),latestVersion:i};let a=d(),h=a?g(a):null,m=h?o.existsSync(u.join(h,"index.html")):!1;if(!(!a||!m||w(i,a)>0))return{checked:!0,updated:!1,reason:"active runtime is current",activeVersion:a,latestVersion:i};let l=await N({version:i,channel:r,cdnOrigin:n,setActive:!1});return{checked:!0,updated:!0,activeVersion:i,latestVersion:i,install:l}}async function Z(t={}){let n=d(),r=O();if(r)return{active:n,latest:r,pinned:r,outdated:n!==r};try{let e=await I(f(t.cdnOrigin)),s=S(t.channel),i=e.channels[s]?.latest??null,c=!!(i&&(!n||w(i,n)>0));return{active:n,latest:i,pinned:null,outdated:c}}catch{return{active:n,latest:null,pinned:null,outdated:!1}}}async function F(t,n){let r=await fetch(t);if(!r.ok||!r.body)throw new Error(`download failed: ${r.status} ${r.statusText} (${t})`);o.mkdirSync(u.dirname(n),{recursive:!0});let e=`${n}.partial`;try{await T(C.fromWeb(r.body),o.createWriteStream(e)),o.renameSync(e,n)}catch(s){try{o.unlinkSync(e)}catch{}throw s}}function G(t){return new Promise((n,r)=>{let e=k.createHash("sha256"),s=o.createReadStream(t);s.on("data",i=>e.update(i)),s.on("error",r),s.on("end",()=>n(e.digest("hex")))})}function H(t,n){return new Promise((r,e)=>{let s=E("tar",["-xzf",t,"-C",n],{stdio:["ignore","inherit","inherit"]});s.on("error",e),s.on("exit",i=>{i===0?r():e(new Error(`tar exited with code ${i}`))})})}export{_ as a,X as b,f as c,S as d,O as e,I as f,N as g,Y as h,Z as i};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.235 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import{readFileSync as i}from"node:fs";import{fileURLToPath as e}from"node:url";var r=null;function l(){if(r!=null)return r;let o=[()=>e(import.meta.resolve("sootsim/package.json")),()=>e(new URL("../package.json",import.meta.url))];for(let n of o)try{let t=JSON.parse(i(n(),"utf8")).version;if(typeof t=="string"&&t)return r=t,r}catch{}return r="0.0.0",r}export{l as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{h as w,j as u,k as m,l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.235 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{h as w,j as u,k as m,l}from"./chunk-APBFMXMM.js";var p="sootsim:settings",v=["errorReporting","colorScheme","reduceMotion","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","alwaysShowLiveWebViews","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 b(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=b()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!b())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 k(){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=k();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.
|
|
1
|
+
/*! sootsim v0.1.235 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var d=Object.defineProperty;var e=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var f=(a,b)=>{for(var c in b)d(a,c,{get:b[c],enumerable:!0})};export{e as a,f as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as ce}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.235 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as ce}from"./chunk-TEEK6DLL.js";import{b as Et,c as Rt,k as Pt}from"./chunk-GD6LJ2CR.js";import{a as oe,b as A,c as D,d as Ie,e as ie,f as V,g as de,h as ge,i as Mt,j as Ft,k as Te,l as Ot}from"./chunk-WQ5DQ5X7.js";import{A as wt,B as xt,E as $t,G as St,I as ue,J as vt,P as We,a as ve,b as nt,c as rt,d as it,e as at,f as lt,g as ct,h as ut,i as dt,j as pt,k as Be,l as Ce,q as je,r as mt,s as ft,t as fe,u as gt,v as ke,w as Le,x as yt,y as ht,z as bt}from"./chunk-XWRHHNOK.js";import{e as kt,g as _t,i as It,j as Tt,k as Nt,l as _e}from"./chunk-XUJDCVTH.js";import{a as tt}from"./chunk-OUZCXC3F.js";import{a as Q}from"./chunk-EOUBCSIZ.js";import{c as ot}from"./chunk-R7RUIOMK.js";import{c as st}from"./chunk-YLSEQMQK.js";import{c as Ae,e as De}from"./chunk-TA6OIGXV.js";function qe(e){return`(async () => {
|
|
3
3
|
const bridge = globalThis.SootSim && globalThis.SootSim.bridges && globalThis.SootSim.bridges.hotRemount
|
|
4
4
|
if (!bridge || typeof bridge.reloadExternalApp !== 'function') return false
|
|
5
5
|
await bridge.reloadExternalApp({ resetStorage: ${e?"true":"false"} })
|
|
@@ -547,7 +547,7 @@ import{a as ce}from"./chunk-DFAMEHIJ.js";import{b as Et,c as Rt,k as Pt}from"./c
|
|
|
547
547
|
`);console.log(`${t??""}
|
|
548
548
|
|
|
549
549
|
${n}
|
|
550
|
-
`),process.exit(0)}let M=c.wsPort,N=c.simId,j=c.simIdSource,O=c.commandTimeoutMs;if(y==="get"&&p==="diagnosis"){let x=a.indexOf("diagnosis"),t=x>=0?[...a.slice(0,x),...a.slice(x+1)]:a,{runDiagnose:n}=await import("./diagnose-
|
|
550
|
+
`),process.exit(0)}let M=c.wsPort,N=c.simId,j=c.simIdSource,O=c.commandTimeoutMs;if(y==="get"&&p==="diagnosis"){let x=a.indexOf("diagnosis"),t=x>=0?[...a.slice(0,x),...a.slice(x+1)]:a,{runDiagnose:n}=await import("./diagnose-AKWL66RQ.js"),r=await n(["recent",...t],o);process.exitCode=r;return}if(y==="do"&&p==="scan"){let{runCamera:x}=await import("./camera-KWI4FUYT.js");await x(a,{port:o.port});return}if(p==="list"&&a.some(x=>x==="--drivers"||x==="-D")){let{buildDriverListRows:x}=await import("./drivers-5NKXLGOH.js"),t=x();console.log(` available drivers (${t.length}):
|
|
551
551
|
`);let n=Math.max(...t.map(i=>i.id.length),6),r=Math.max(...t.map(i=>i.kind.length),4);for(let i of t){let d=i.available?"\u2713":"\u2717",m=i.id.padEnd(n),f=i.kind.padEnd(r);console.log(` ${d} ${m} ${f} ${i.description}`),i.available&&i.detail?console.log(` ${i.detail}`):!i.available&&i.reason&&console.log(` unavailable: ${i.reason}`)}return}let u=It(c),L=N||"default",P=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","storage-clear","list","wait","sleep"]),R=200;function K(x){let t=x.replace(/\s+/g," ").trim();if(!t)return"";if(/^<(!doctype html|html|\?xml)|<body[\s>]/i.test(t)){let r=/<title[^>]*>([^<]+)<\/title>/i.exec(x)?.[1]?.trim(),i=/<body[^>]*>([\s\S]*?)<\//i.exec(x)?.[1]?.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,80),d=r||i||"html error page";return`<html ${x.length}B> "${d}" (body elided \u2014 add --json for the full payload)`}return t.length<=R?t:`${t.slice(0,R)}\u2026 (+${t.length-R} more bytes)`}function U(x){let t=x.displayUrl||x.url;return x.status!=null?`${x.method} ${t} -> ${x.status}${x.statusText?` ${x.statusText}`:""}`:x.error?`${x.method} ${t} -> ${x.error}`:`${x.method} ${t}`}async function v(x){let t=me()?400:200;try{let{settled:n,elapsed:r}=await se({bridge:x,maxMs:t,pollMs:32,stablePolls:2});n||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.
|
|
552
552
|
`)}catch{}}function F(x,t){if(t.result?.reason==="offscreen"){let{x:n,y:r,screen:i}=t.result;console.error(` tap failed: ${x} resolved to (${Math.round(n)},${Math.round(r)}), outside the ${i?.width}x${i?.height} screen`),console.error(" the node exists but is scrolled out of view \u2014 scroll it on-screen first (sootsim do scroll / swipe), then tap.");return}console.error(` tap failed: ${x} 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 u.send({type:"evaluate",code:`(() => ({
|
|
553
553
|
console: ${ke},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as k}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.235 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as k}from"./chunk-Z7TEEXRM.js";import{a as x}from"./chunk-6EZX7YXZ.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://contrast.dev/api/electron-release";function O(){let r=process.arch;if(process.platform==="darwin"){let o=r==="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=r==="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:r,dest:o,onProgress:e}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`${s.status} ${s.statusText} (${r})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error(`empty response body (${r})`);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(n=>n?p(n):l())})}}function _(r,o){let e=(r/1048576).toFixed(1);if(!o)return` ${e} 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}% ${e} / ${t} MB`}async function L(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 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]),n=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return n.status!==0&&console.warn(` warning: failed to unmount ${t} (${n.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function C(r){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(r,e),D(r),S(e,493),e}async function B(r){return await new Promise((o,e)=>{let s=v("cmd",["/c","start",'""',"/wait",r],{stdio:"inherit"});s.once("error",e),s.once("exit",t=>{t===0?o():e(new Error(`installer exited with code ${t}`))})}),r}async function q(r){(r.includes("--help")||r.includes("-h"))&&(console.log(`
|
|
4
4
|
sootsim desktop install \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,e=r.includes("--force"),s=k();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, linux-arm64, win32-x64"),process.exit(1)),console.log(` platform: ${t.platform}`),console.log(` download: ${t.url}`),console.log(),!o){if(!await x("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:(n,m)=>{let $=Date.now();$-d<100&&n<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${_(n,m)}`))}})}catch(n){g(a,{recursive:!0,force:!0});let m=n instanceof Error?n.message:String(n);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-NWD6GLRC.js");try{let n=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${n}`)}catch(n){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:n instanceof Error?n.message:String(n)}}),await p(),console.error(` install failed: ${n instanceof Error?n.message:String(n)}`),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 desktop launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{q as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.235 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var m={"--help":{type:"boolean",short:"-h"},"--version":{type:"boolean",short:"-V"},"--verbose":{type:"boolean",short:"-v"},"--port":{type:"number",short:"-p"},"--device":{type:"string",short:"-d"},"--theme":{type:"string",short:"-t"},"--headless":{type:"boolean"},"--driver":{type:"string"},"--sim":{type:"string"},"--session":{type:"string"},"--tab":{type:"string"}},p=new Set(["list","describe","find","get","do","wait","network","logs","shell"]),b=new Set(["do","get","wait","shell","debug"]),d=new Set(["detox","maestro","record","film","storage","perf","screenshot","mode","inspect","debug","timeline","what-happened","shell","assert","device","open","list","use","claim","close","compat","desktop","login","logout","auth","setup","serve","daemon","runtime","upgrade","version","skill","config","app-fonts","agent-wrapper","agent",...p]);function h(c){let r=c.slice(2),e={command:null,commandArgs:[],globalFlags:{},help:!1,version:!1,verbose:!1},s=0;for(;s<r.length;){let o=r[s];if(o==="--"){e.commandArgs.push(...r.slice(s+1));break}let i=Object.entries(m).find(([l,t])=>l===o||t.short===o);if(i){let[l,t]=i,a=l.replace(/^--/,"");if(t.type==="boolean")e.globalFlags[a]=!0,s++;else{let n=r[s+1];if(n===void 0||n.startsWith("-")){console.error(` warning: ${o} requires a value`),s++;continue}if(t.type==="number"){let g=Number(n);if(Number.isNaN(g)){console.error(` warning: ${o} requires a number, got "${n}"`),s+=2;continue}e.globalFlags[a]=g}else e.globalFlags[a]=n;s+=2}continue}if(!e.command&&!o.startsWith("-")){let l=o.indexOf("-");if(l>0){let t=o.slice(0,l),a=o.slice(l+1);if(b.has(t)&&a.length>0){e.command=t;let n=r.slice(s+1);e.commandArgs=[a,...n[0]==="--"?n.slice(1):n];break}}if(d.has(o)){e.command=o;let t=r.slice(s+1);e.commandArgs=t[0]==="--"?t.slice(1):t;break}e.commandArgs=r.slice(s);break}e.commandArgs.push(o),s++}return e.help=!!e.globalFlags.help,e.version=!!e.globalFlags.version,e.verbose=!!e.globalFlags.verbose,e}export{p as a,h as b};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{o as d}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.235 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{o as d}from"./chunk-CFIAG2RO.js";import{chmodSync as S,existsSync as f,mkdirSync as k,readFileSync as A,rmSync as i,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://contrast.dev";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",o=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:o,validatedAt:h}}function O(){let t=a();if(!f(t))return null;try{let e=JSON.parse(A(t,"utf8")),r=v(e);return r||(i(t,{force:!0}),null)}catch{return i(t,{force:!0}),null}}function b(t){let e=a();k(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
|
|
3
3
|
`);try{S(e,384)}catch{}return r}function l(){i(a(),{force:!0})}async function E(t){let e=O();if(!e?.token)return null;let r=t||e.origin||u;try{let n=await fetch(`${r.replace(/\/$/,"")}/api/auth/me`,{headers:{authorization:`Bearer ${e.token}`}});if(n.status===401)return l(),null;if(!n.ok)return e;let o=await n.json();return o.user?.id?b({token:e.token,user:o.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(l(),null)}catch{return e}}export{O as a,b,l as c,E as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{H as t,N as n,P as l,j as r}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.235 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{H as t,N as n,P as l,j as r}from"./chunk-CFIAG2RO.js";function m(){let e=t(),i=r()?n():null;return i&&l(i)?{primary:`engine dev source (:${i.bridgePort})`,installedRuntime:e?`installed runtime v${e}`:null,isDevBridge:!0}:{primary:e?`runtime v${e}`:"runtime not installed",installedRuntime:null,isDevBridge:!1}}export{m as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.235 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var o=!0,e="public beta",t=e,n="we send anonymous error and dependency data while you use it";export{o as a,e as b,t as c,n as d};
|