sootsim 0.1.41 → 0.1.43
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-7BJ2ZP22.js → agent-SNOLNP4V.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-OXBYRJVT.js → agent-wrapper-TY6IPXYH.js} +2 -2
- package/dist-cli/chunks/{assert-NZTYFTTT.js → assert-QISZB6TE.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-QHKU7RLG.js +2 -0
- package/dist-cli/chunks/beta-WKOGR7HH.js +2 -0
- package/dist-cli/chunks/{chunk-N7DDNZTO.js → chunk-26LJCQNQ.js} +1 -1
- package/dist-cli/chunks/{chunk-G2QUPNHI.js → chunk-3VULRGJO.js} +2 -2
- package/dist-cli/chunks/{chunk-AOYBIMKL.js → chunk-4D2BRAPP.js} +1 -1
- package/dist-cli/chunks/{chunk-ANDSHXLU.js → chunk-4NPUTEDF.js} +2 -2
- package/dist-cli/chunks/{chunk-HAVQS3PI.js → chunk-4YM33L7G.js} +1 -1
- package/dist-cli/chunks/{chunk-WZDE344I.js → chunk-5A4JEYK2.js} +3 -3
- package/dist-cli/chunks/chunk-6GYM3Z7K.js +117 -0
- package/dist-cli/chunks/{chunk-LMNB7NYI.js → chunk-7OKSILLD.js} +2 -2
- package/dist-cli/chunks/{chunk-SWHWVYZS.js → chunk-A2NHH4S4.js} +1 -1
- package/dist-cli/chunks/{chunk-FZB4W23Y.js → chunk-BAHIX7JY.js} +2 -2
- package/dist-cli/chunks/{chunk-ECIRRKKE.js → chunk-CHAVUZ6X.js} +2 -2
- package/dist-cli/chunks/{chunk-I5Y4IECP.js → chunk-CPYDJJTX.js} +3 -3
- package/dist-cli/chunks/{chunk-GOFKXREQ.js → chunk-EW7G6TZV.js} +2 -2
- package/dist-cli/chunks/{chunk-IF33CQL4.js → chunk-FQHGM7T3.js} +2 -2
- package/dist-cli/chunks/{chunk-2T6UOHPO.js → chunk-GYQ75E5Z.js} +1 -1
- package/dist-cli/chunks/{chunk-NZ5O2OEL.js → chunk-HFRDF5SI.js} +4 -4
- package/dist-cli/chunks/chunk-HKZEU76U.js +1 -0
- package/dist-cli/chunks/{chunk-OPDPXAYA.js → chunk-IBKI7UPZ.js} +2 -2
- package/dist-cli/chunks/{chunk-IP2MARRU.js → chunk-IFJMJS4Y.js} +2 -2
- package/dist-cli/chunks/{chunk-7YZJHZ7X.js → chunk-JA2UNVA3.js} +1 -1
- package/dist-cli/chunks/{chunk-Y2YNXUBT.js → chunk-JJGG2ICF.js} +2 -2
- package/dist-cli/chunks/chunk-KFTTDAPI.js +2 -0
- package/dist-cli/chunks/chunk-L6EBBORR.js +1 -0
- package/dist-cli/chunks/{chunk-MBGNDWGV.js → chunk-LR5DET6G.js} +2 -2
- package/dist-cli/chunks/{chunk-C4AMFYK3.js → chunk-LTUGPDW5.js} +1 -1
- package/dist-cli/chunks/chunk-MFLW2R4J.js +17 -0
- package/dist-cli/chunks/{chunk-UNJTJDZZ.js → chunk-MHETWJAQ.js} +2 -2
- package/dist-cli/chunks/{chunk-TBIGAH3T.js → chunk-MK6M3NP4.js} +1 -1
- package/dist-cli/chunks/{chunk-GB3G5LVB.js → chunk-NTZRFKEN.js} +1 -1
- package/dist-cli/chunks/{chunk-33R6QMNO.js → chunk-OK3YCEYK.js} +1 -1
- package/dist-cli/chunks/{chunk-Q6DGMQ2V.js → chunk-OTTV2PFN.js} +2 -2
- package/dist-cli/chunks/{chunk-J3JJRXIP.js → chunk-PXUQ5FQN.js} +1 -1
- package/dist-cli/chunks/{chunk-GI7FXE7J.js → chunk-QD23HPD4.js} +2 -2
- package/dist-cli/chunks/{chunk-S3SQITOO.js → chunk-QOOTU75R.js} +2 -2
- package/dist-cli/chunks/{chunk-5JOYGXCS.js → chunk-RHH6P5Z7.js} +2 -2
- package/dist-cli/chunks/chunk-SIH4PE3C.js +1 -0
- package/dist-cli/chunks/{chunk-HZVPHAJX.js → chunk-UBJJEZO4.js} +9 -9
- package/dist-cli/chunks/{chunk-OXTFYLZJ.js → chunk-V527VARZ.js} +2 -2
- package/dist-cli/chunks/{chunk-4UA6P3T2.js → chunk-W7N6B2MX.js} +1 -1
- package/dist-cli/chunks/chunk-WWTI3E3U.js +1 -0
- package/dist-cli/chunks/{chunk-SHHUVGL2.js → chunk-X3ZHRSH4.js} +1 -1
- package/dist-cli/chunks/{chunk-BR6QRN7U.js → chunk-XWVTLGO2.js} +2 -2
- package/dist-cli/chunks/{chunk-OJFHAMXD.js → chunk-XXJAHIR4.js} +2 -2
- package/dist-cli/chunks/{chunk-LX6KS6TL.js → chunk-YSSNIJC6.js} +1 -1
- package/dist-cli/chunks/{compat-BA6HDW3Q.js → compat-3XWL4ATU.js} +3 -3
- package/dist-cli/chunks/{config-QQ63IS5P.js → config-HMLAEAGT.js} +2 -2
- package/dist-cli/chunks/control-G35A52LM.js +2 -0
- package/dist-cli/chunks/{cpu-profile-3DDV2SYN.js → cpu-profile-OORGMNDG.js} +2 -2
- package/dist-cli/chunks/{daemon-RYSVONEV.js → daemon-QYMI2BWG.js} +2 -2
- package/dist-cli/chunks/{debug-YXE4XZLP.js → debug-TOBBTGKD.js} +3 -3
- package/dist-cli/chunks/demo-app-registry-COFN4PSB.js +2 -0
- package/dist-cli/chunks/{detox-2UI3EAXA.js → detox-GSTT2HKN.js} +2 -2
- package/dist-cli/chunks/{device-UGDJBZKD.js → device-MZZLHS7H.js} +2 -2
- package/dist-cli/chunks/{diagnose-IRDRYKYZ.js → diagnose-TWYOGKQL.js} +2 -2
- package/dist-cli/chunks/drivers-HPWMBGHU.js +2 -0
- package/dist-cli/chunks/{electron-ZCYWIZAE.js → electron-JFXGQSEJ.js} +3 -3
- package/dist-cli/chunks/flow-TZQRP7FD.js +2 -0
- package/dist-cli/chunks/{hints-OWOBCWJH.js → hints-AUB2PZR7.js} +2 -2
- package/dist-cli/chunks/{home-paths-5QMCFTBP.js → home-paths-H7UWBZTI.js} +2 -2
- package/dist-cli/chunks/{inspect-K4VXPM5J.js → inspect-CRW5T6XB.js} +3 -3
- package/dist-cli/chunks/install-MFIJGPJ6.js +2 -0
- package/dist-cli/chunks/{install-desktop-U3723T63.js → install-desktop-ZMNP3JUU.js} +3 -3
- package/dist-cli/chunks/{keys-IFVXJ7C2.js → keys-EXQ4HPRI.js} +2 -2
- package/dist-cli/chunks/{launch-NDGFTRZ5.js → launch-BJCVATQA.js} +3 -3
- package/dist-cli/chunks/{login-KEU6RAV3.js → login-DCGHEA5P.js} +4 -4
- package/dist-cli/chunks/{logout-KNFLP5OQ.js → logout-OXKHJTNH.js} +2 -2
- package/dist-cli/chunks/{maestro-GBUBLS6L.js → maestro-7AWJXCCS.js} +2 -2
- package/dist-cli/chunks/{preview-7OKMPPMN.js → preview-RSYAEZKJ.js} +2 -2
- package/dist-cli/chunks/{profile-CHKDPGJF.js → profile-Z4KSPIT2.js} +2 -2
- package/dist-cli/chunks/{react-GYI5VITJ.js → react-ED3FJ4IM.js} +2 -2
- package/dist-cli/chunks/record-UDDH36YF.js +15 -0
- package/dist-cli/chunks/runtime-EIEXL23W.js +2 -0
- package/dist-cli/chunks/{runtime-delivery-JCAY2QVQ.js → runtime-delivery-YWGRJ62P.js} +2 -2
- package/dist-cli/chunks/{screenshot-3T6MNPH7.js → screenshot-LJ3IRZSJ.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-BUGXY7SQ.js → screenshot-mode-BIMMQHLF.js} +2 -2
- package/dist-cli/chunks/{screenshots-EMTXGI2Q.js → screenshots-ABB7QEYX.js} +2 -2
- package/dist-cli/chunks/{server-46H2M4TF.js → server-FCZUE6AB.js} +2 -2
- package/dist-cli/chunks/setup-repo-6CIEQXRN.js +2 -0
- package/dist-cli/chunks/{skills-2RP2CFPD.js → skills-NU3ZVGQW.js} +2 -2
- package/dist-cli/chunks/{start-QFREXALP.js → start-FUBNFTAN.js} +4 -4
- package/dist-cli/chunks/store-VHZ4TFK4.js +2 -0
- package/dist-cli/chunks/telemetry-6ZYCDCLG.js +2 -0
- package/dist-cli/chunks/{test-LI4PGGTE.js → test-NHEBEWQA.js} +3 -3
- package/dist-cli/chunks/{three-mode-PKINB46T.js → three-mode-PWUWCXOA.js} +2 -2
- package/dist-cli/chunks/{timeline-5AREJDL5.js → timeline-OODTUKKH.js} +2 -2
- package/dist-cli/chunks/{upgrade-W2AGIOSC.js → upgrade-2GN4KRQ6.js} +2 -2
- package/dist-cli/chunks/upload-AIOY3AZW.js +2 -0
- package/dist-cli/chunks/{web-JM6WDSZQ.js → web-DPMKOIAX.js} +2 -2
- package/dist-cli/chunks/{what-happened-SVCASJKT.js → what-happened-6UXAA7YR.js} +2 -2
- package/dist-cli/chunks/{whoami-5NJ6IPLT.js → whoami-2IEZXYNZ.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/vite-base.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/auto-bootstrap-4KQT4TCR.js +0 -2
- package/dist-cli/chunks/beta-3S56PNSS.js +0 -2
- package/dist-cli/chunks/chunk-334L67M2.js +0 -2
- package/dist-cli/chunks/chunk-6PLNIOJP.js +0 -17
- package/dist-cli/chunks/chunk-ASSV2FFC.js +0 -1
- package/dist-cli/chunks/chunk-WN6YFWS5.js +0 -117
- package/dist-cli/chunks/chunk-YFX2XIR4.js +0 -1
- package/dist-cli/chunks/chunk-YKFRPIVC.js +0 -1
- package/dist-cli/chunks/chunk-ZPURE62G.js +0 -1
- package/dist-cli/chunks/control-GNJNC524.js +0 -2
- package/dist-cli/chunks/demo-app-registry-3VFEW4NV.js +0 -2
- package/dist-cli/chunks/drivers-EAONIWG3.js +0 -2
- package/dist-cli/chunks/flow-ECSMFTKS.js +0 -2
- package/dist-cli/chunks/install-YFE7C2NU.js +0 -2
- package/dist-cli/chunks/record-DQR2TEIF.js +0 -45
- package/dist-cli/chunks/runtime-XXNKSGFE.js +0 -2
- package/dist-cli/chunks/setup-repo-P4LCPAF6.js +0 -2
- package/dist-cli/chunks/store-GH77HGEB.js +0 -2
- package/dist-cli/chunks/telemetry-WC5J4TE5.js +0 -2
- package/dist-cli/chunks/upload-RLS6KTG6.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as ye}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as ye}from"./chunk-XXJAHIR4.js";import{a as be}from"./chunk-EW7G6TZV.js";import{a as Se}from"./chunk-IFJMJS4Y.js";import{a as V,b as M,c as me,d as Y,f as pe,g as fe}from"./chunk-QD23HPD4.js";import{f as he,l as ge}from"./chunk-XWVTLGO2.js";import{b as ue}from"./chunk-X3ZHRSH4.js";import{a as we}from"./chunk-JA2UNVA3.js";import{a as ve}from"./chunk-JJGG2ICF.js";import{f as ne}from"./chunk-OK3YCEYK.js";import{c as q,d as ce,e as de}from"./chunk-MFLW2R4J.js";import{c as le}from"./chunk-A2NHH4S4.js";import{a as ae,b as z}from"./chunk-IBKI7UPZ.js";import*as $ from"fs";import{tmpdir as $e}from"os";import*as g from"path";import*as w from"fs";import*as f from"path";var U=1e4,B=393,C=852,xe="__sootsimCliPerf",Ne="maestroCopiedText",X=new Map;function m(o){return new Promise(e=>setTimeout(e,o))}function De(o){return o?f.basename(o)===".maestro"?f.dirname(o):o:process.cwd()}function Re(o,e,t){let r=e.endsWith(".png")?e:`${e}.png`;if(f.isAbsolute(r))return r;if(t.mode==="flow"&&/[\\/]/.test(r)){let i=r.startsWith("./")||r.startsWith("../")?t.flowDir??process.cwd():De(t.flowDir);return f.resolve(i,r)}return f.join(o,r)}function Ve(o){if(typeof o=="string")return{path:o,withFrame:!1};let e=o.path?.trim()||o.name?.trim();if(!e)throw new Error("takeScreenshot object form requires path or name");return{path:e,withFrame:o.withFrame===!0}}function G(o){let[e,t]=o.split(",").map(i=>i.trim()),r=(i,n)=>i.endsWith("%")?Number.parseFloat(i)/100*n:Number.parseFloat(i);return{x:r(e,B),y:r(t,C)}}function Z(o){return typeof o=="string"?o.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g,(e,t)=>{if(X.has(t))return X.get(t);let r=process.env[t];if(r===void 0)throw new Error(`missing environment variable for flow placeholder: ${t}`);return r}):Array.isArray(o)?o.map(e=>Z(e)):o&&typeof o=="object"?Object.fromEntries(Object.entries(o).map(([e,t])=>[e,Z(t)])):o}function Ue(o){let e=o.split(/^---$/m),t=e.length>1?e[e.length-1]:o,r=Z(M.parse(t));return Array.isArray(r)?r:[]}var W=class{constructor(e,t){this.bridge=e;this.opts=t}stepDelay=0;firstLaunchDone=!1;profilingEnabled=!1;recordingEnabled=!1;recordingAccessChecked=!1;recordingStartedAtMs=null;lastRecordingDurationMs=null;simRouteHint=null;lastFailedStep=null;get simId(){return this.opts.simId}setSimRouteHint(e){this.simRouteHint=this.normalizeSimRoute(e)}normalizeSimRoute(e){if(!e)return null;try{let t=new URL(e);t.searchParams.delete("inspectOpen");let r=t.searchParams.toString();return`${t.origin}${t.pathname}${r?`?${r}`:""}`}catch{return e}}async refreshSimId(){if(this.opts.simId)try{let e=await this.bridge.listSims(),t=e.find(a=>a.id===this.opts.simId);if(t&&(this.simRouteHint=this.normalizeSimRoute(t.url||t.origin)),e.find(a=>a.id===this.opts.simId&&a.readyState==="open")||!this.simRouteHint)return;let i=this.simRouteHint&&e.find(a=>a.readyState==="open"&&this.normalizeSimRoute(a.url||a.origin)===this.simRouteHint);if(!i)return;let n=e.find(a=>a.isPrimary&&a.readyState==="open"),s=e.find(a=>a.readyState==="open"),l=i??n??s;l&&(this.opts.simId=l.id,console.log(` [flow] sim rotated to ${l.id}`))}catch{}}async evaluate(e){return this.bridge.send({type:"evaluate",simId:this.opts.simId,code:e})}async callTest(e,...t){return this.bridge.send({type:"call",simId:this.opts.simId,path:`__sootsimTest.${e}`,args:t})}async waitForTree(e=U){let t=Date.now()+e,r=null;for(;Date.now()<t;){try{let i=await this.evaluate(`(async () => {
|
|
3
3
|
const test = window.__sootsimTest
|
|
4
4
|
if (!test) return { count: 0, loading: true }
|
|
5
5
|
const count = (await test.getNodeCount?.()) || 0
|
|
@@ -324,23 +324,23 @@ flow extension:
|
|
|
324
324
|
takeScreenshot:
|
|
325
325
|
path: marketing/hero
|
|
326
326
|
withFrame: true
|
|
327
|
-
`),process.exit(0));let e=o[0];$.existsSync(e)||(console.error(` error: ${e} not found`),process.exit(1));let t=d=>o.find((c,v)=>o[v-1]===d),r=o.includes("--profile"),i=o.includes("--new"),n=t("--out")||"/tmp/sootsim-recordings",s=t("--screenshots")||"/tmp/sootsim-flow",l=t("--screenshot-paths")==="flow"?"flow":"dir",a=t("--device")?.trim()||"",p=o.includes("--slow")?+(t("--slow")||"500"):0,h=o.includes("--electron"),y=o.includes("--preview"),j=await ve(t("--preview-origin")),Q=t("--preview-public-origin"),Me=o.includes("--preview-open"),Ee=o.flatMap((d,c)=>o[c-1]==="--replace"?["--replace",d]:[]),
|
|
327
|
+
`),process.exit(0));let e=o[0];$.existsSync(e)||(console.error(` error: ${e} not found`),process.exit(1));let t=d=>o.find((c,v)=>o[v-1]===d),r=o.includes("--profile"),i=o.includes("--new"),n=t("--out")||"/tmp/sootsim-recordings",s=t("--screenshots")||"/tmp/sootsim-flow",l=t("--screenshot-paths")==="flow"?"flow":"dir",a=t("--device")?.trim()||"",p=o.includes("--slow")?+(t("--slow")||"500"):0,h=o.includes("--electron"),y=o.includes("--preview"),j=await ve(t("--preview-origin")),Q=t("--preview-public-origin"),Me=o.includes("--preview-open"),Ee=o.flatMap((d,c)=>o[c-1]==="--replace"?["--replace",d]:[]),S=o.includes("--record")||y,ee=o.includes("--tail-wait")?Math.max(0,+(t("--tail-wait")||"2000")):S?2e3:0,Pe=$.readFileSync(e,"utf8"),{frontmatter:k,steps:E}=ke(Pe);E.length===0&&(console.error(" error: flow file must contain a YAML array of steps"),process.exit(1));let I=a||k.device||"",O=h||k.electron===!0,L=k.app===void 0||k.app===null?"":typeof k.app=="number"?String(k.app):k.app,te={stripBooleanFlags:["--record","--profile","--electron","--new","--preview","--preview-open","--headless"],stripValueFlags:["--out","--device","--slow","--tail-wait","--url","--replace","--screenshots","--screenshot-paths","--preview-origin","--preview-public-origin","--driver"]},x=q(o,te),Ie=t("--url")||"";O&&!we()&&(console.error(" error: desktop companion not found. install or build it first with `bun run build:electron`"),process.exit(1));let re=O?"desktop companion":"bridge",_e=L?` | target: ${L}`:"";console.log(`
|
|
328
328
|
sootsim flow \u2014 ${g.basename(e)}
|
|
329
|
-
${E.length} steps | ${re}${_e}${
|
|
330
|
-
`),y&&ae({event:"preview_flow_started",properties:{flowName:g.basename(e),stepCount:E.length,mode:re,electron:O,record:
|
|
329
|
+
${E.length} steps | ${re}${_e}${S?" | recording":""}${r?" | profiling":""}${p?` | ${p}ms delay`:""}
|
|
330
|
+
`),y&&ae({event:"preview_flow_started",properties:{flowName:g.basename(e),stepCount:E.length,mode:re,electron:O,record:S,profile:r,previewOrigin:j}});let F=Ie||L||"",K=i||O&&x.simIdSource!=="flag",ie=!1;if(!F&&!K&&x.simIdSource==="none"){let d=de(x);try{let c=await d.listSims(),v=c.find(R=>R.isPrimary&&R.readyState==="open"),D=c.find(R=>R.readyState==="open"),se=v??D;se&&(ie=!0,console.log(` reusing active sim: ${se.id}`))}catch{}finally{d.close()}}if(!F&&!ie&&(K||x.simIdSource==="none")){let d=await Be();d||(console.error(" error: no current sim and no sootsim target found"),await z(),process.exit(1)),F=d}if(F&&I){let d=new URL(await he(F));d.searchParams.set("device",I),F=d.toString()}if(F){let d=[F];d.push(...Ee),K&&d.push("--new"),x.simIdSource==="flag"&&x.simId&&d.push("--sim",x.simId);let c=t("--driver");c&&d.push("--driver",c),o.includes("--headless")&&d.push("--headless"),await ge(d,{port:x.wsPort,timeoutMs:x.commandTimeoutMs})}let P=q(o,te),J=P.simIdSource==="flag"?P.simId:le()||P.simId,Ce=P.simIdSource==="flag"?"flag":J?"saved":"none",T=ce(P.wsPort,{commandTimeoutMs:P.commandTimeoutMs,simId:J,simIdSource:Ce,fallbackOnMissingSimId:!1}),u,oe=async()=>{if(!I)return!1;let d=await T.send({type:"evaluate",simId:u.simId,code:"window.location.href"});if(typeof d=="string"&&d.length>0){let c=new URL(d);c.searchParams.set("device",I),u.setSimRouteHint(c.toString())}return!!await T.send({type:"call",simId:u.simId,path:"SootSim.bridges.settings.set",args:["deviceModel",I]})};u=new W(T,{screenshotDir:s,flowDir:g.dirname(g.resolve(e)),screenshotPathMode:l,simId:J,recordingOutputDir:S?n:void 0,billingOriginOverride:y?j:void 0,allowGitHubRecording:S,onAfterLaunch:async()=>{await oe()&&await u.waitForTree(12e4),y&&await T.send({type:"evaluate",simId:u.simId,code:`(() => {
|
|
331
331
|
const r = window.SootSim?.bridges?.eventRecorder ?? window.__sootsimEventRecorder
|
|
332
332
|
return r?.start?.() ?? false
|
|
333
|
-
})()`})}}),p&&(u.stepDelay=p);let A=null,b=null,_=null,H=null,N=0,Oe=!!E[0]?.launchApp;try{await u.waitForTree(12e4),await oe()&&await u.waitForTree(12e4),
|
|
333
|
+
})()`})}}),p&&(u.stepDelay=p);let A=null,b=null,_=null,H=null,N=0,Oe=!!E[0]?.launchApp;try{await u.waitForTree(12e4),await oe()&&await u.waitForTree(12e4),S&&(Oe?u.prepareRecording():await u.startRecording()),r&&await u.startProfile(),y&&(await T.send({type:"evaluate",simId:u.simId,code:`(() => {
|
|
334
334
|
const r = window.SootSim?.bridges?.eventRecorder ?? window.__sootsimEventRecorder
|
|
335
335
|
return r?.start?.() ?? false
|
|
336
|
-
})()`})||console.warn(" warn: eventRecorder.start() returned false \u2014 preview will upload bundle without replay events")),await u.runFlow(E),r&&(A=await u.stopProfile()),
|
|
336
|
+
})()`})||console.warn(" warn: eventRecorder.start() returned false \u2014 preview will upload bundle without replay events")),await u.runFlow(E),r&&(A=await u.stopProfile()),S&&ee>0&&await new Promise(c=>setTimeout(c,ee)),S&&(b=await u.stopRecording(),_=u.getLastRecordingDurationMs()),y&&(H=await T.send({type:"evaluate",simId:u.simId,code:`(() => {
|
|
337
337
|
const r = window.SootSim?.bridges?.eventRecorder ?? window.__sootsimEventRecorder
|
|
338
338
|
return r?.stop?.() ?? []
|
|
339
339
|
})()`}),console.log(` captured ${H.length} replay events`)),console.log(`
|
|
340
|
-
+ completed (${E.length} steps)`),A&&Te(A),b&&console.log(` video: ${b}`),console.log()}catch(d){if(r&&!A)try{A=await u.stopProfile()}catch{}if(
|
|
340
|
+
+ completed (${E.length} steps)`),A&&Te(A),b&&console.log(` video: ${b}`),console.log()}catch(d){if(r&&!A)try{A=await u.stopProfile()}catch{}if(S&&!b)try{b=await u.stopRecording(),_=u.getLastRecordingDurationMs()}catch(c){console.warn(` recording stop failed: ${c?.message||String(c)}`)}console.error(`
|
|
341
341
|
x failed: ${d.message}
|
|
342
342
|
`),A&&(console.log(" partial profile:"),Te(A)),b&&console.log(` partial video: ${b}`);try{let c=u.lastFailedStep,v=c?`step-${String(c.index+1).padStart(2,"0")}-${c.kind}`:"unstaged",D=g.join(s,v);await u.captureFailureBundle(D,{error:d,stepIndex:c?.index,stepKind:c?.kind,stepTarget:c?.target}),console.log(` failure bundle: ${D}`),console.log(" (contents: screenshot.png, describe.json, a11y.txt, tree.txt, console.json, error.json)")}catch(c){try{let v=g.join(s,"error.png");await u.captureFailureScreenshot(v),console.log(` error screenshot: ${v}`)}catch{}console.log(` (failure bundle capture failed: ${c instanceof Error?c.message:String(c)})`)}await ue(T,{errorsCommand:`sootsim get errors 5${u.simId?` --sim ${u.simId}`:""}`,warningsCommand:`sootsim get warnings 5${u.simId?` --sim ${u.simId}`:""}`,requestsCommand:`sootsim get requests 5${u.simId?` --sim ${u.simId}`:""}`}),N=1}finally{T.close()}if(N===0&&y)try{let d=await We(H??[]),c=["--origin",j,"--events",d];Q&&c.push("--public-origin",Q),b&&c.push("--video",b),b&&_&&Number.isFinite(_)&&c.push("--video-duration-ms",String(Math.round(_))),u.simId&&c.push("--sim",u.simId),Me&&c.push("--open"),console.log(`
|
|
343
|
-
preparing preview upload\u2026`);let{runUpload:v}=await import("./upload-
|
|
343
|
+
preparing preview upload\u2026`);let{runUpload:v}=await import("./upload-AIOY3AZW.js");await v(c,{})}catch(d){console.error(` preview upload failed: ${d?.message||d}`),N=1}return await z(),N}async function We(o){let{gzipSync:e}=await import("zlib"),t=o.map(n=>JSON.stringify(n)).join(`
|
|
344
344
|
`)+(o.length?`
|
|
345
345
|
`:""),r=e(Buffer.from(t,"utf8")),i=g.join($e(),`sootsim-events-${Date.now()}.jsonl.gz`);return $.writeFileSync(i,r),console.log(` events: ${o.length} written to ${i} (${r.length} bytes gz)`),i}async function je(o){let e=o[0],t=r=>o.find((i,n)=>o[n-1]===r);switch(e){case"start":{let{path:r,state:i}=me();console.log(" flow draft started"),console.log(` session: ${r}`),console.log(` steps: ${i.steps.length}`);return}case"keep":case"good":{let r=pe();if(r.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),!r.kept){console.log(" no pending action to keep");return}console.log(` kept: ${r.candidate.summary}`),console.log(` steps: ${r.stepCount}`);return}case"end":{let r=t("--output")||(o[1]&&!o[1].startsWith("-")?o[1]:void 0),i=o.includes("--validate")||o.includes("--video"),n=o.includes("--video"),s=fe(r||(i?Ke():void 0));if(s.active||(console.error(" no active flow draft \u2014 run `sootsim flow start` first"),process.exit(1)),i){let l=Je(o,s.outputPath),a=await Ae(l);if(a!==0){console.error(`
|
|
346
346
|
validation failed \u2014 draft preserved so you can keep iterating`),process.exitCode=a;return}Y(),console.log(` flow draft validated (${s.stepCount} step${s.stepCount===1?"":"s"})`),s.outputPath&&console.log(` saved: ${s.outputPath}`),n&&console.log(" video: recorded during validation run");return}if(Y(),console.log(` flow draft ended (${s.stepCount} step${s.stepCount===1?"":"s"})`),s.outputPath){console.log(` saved: ${s.outputPath}`),console.log(` next: sootsim flow ${s.outputPath} --record`);return}console.log(""),process.stdout.write(s.yaml);return}case"validate":{let r=o[1];(!r||r.startsWith("-"))&&(console.error(" usage: sootsim flow validate <path>"),process.exit(1));let i=Le(r);if(i.length>0){console.error(` x ${r} failed validation:`);for(let n of i)console.error(` - ${n}`);process.exit(1)}console.log(` + ${r} looks valid`);return}}}var Fe=new Set(["tapOn","inputText","pressKey","dispatchKey","hideKeyboard","swipe","pinch","scroll","scrollUntilVisible"]);function Le(o){let e=[];if(!$.existsSync(o))return[`file not found: ${o}`];let t;try{t=$.readFileSync(o,"utf8")}catch(n){return[`cannot read file: ${n.message}`]}if(t.trim().length===0)return["file is empty"];let r;try{r=ke(t)}catch(n){return[`yaml parse error: ${n.message}`]}if(!Array.isArray(r.steps)||r.steps.length===0)return e.push("flow body must be a non-empty YAML array of steps"),e;let i=0;for(let n=0;n<r.steps.length;n++){let s=r.steps[n];s&&typeof s=="object"?Object.keys(s).some(a=>Fe.has(a))&&(i+=1):typeof s=="string"&&Fe.has(s)&&(i+=1)}return i===0&&e.push("no interaction steps found (expected at least one tapOn / inputText / pressKey / swipe / scroll)"),e}async function dt(o){let e=o[0];if(e==="start"||e==="keep"||e==="good"||e==="end"||e==="validate")return await je(o),0;let t=await Ae(o);return t!==0&&(process.exitCode=t),t}function Te(o){let e=o.avgMs>0?(1e3/o.avgMs).toFixed(1):"?",t=o.sampleCount>0?(o.jankFrames/o.sampleCount*100).toFixed(1):"0";console.log(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{A as R,C as w,i as p,r as S,t as O,y as v,z as f}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A as R,C as w,i as p,r as S,t as O,y as v,z as f}from"./chunk-PXUQ5FQN.js";import{spawn as I}from"child_process";import C from"crypto";import s from"fs";import l from"path";import{Readable as k}from"stream";import{pipeline as M}from"stream/promises";var N="https://sootbean.com",D="SOOTSIM_CDN_ORIGIN",E="SOOTSIM_RUNTIME_CHANNEL";function $(){try{let e=JSON.parse(s.readFileSync(O(),"utf8"));return e&&typeof e=="object"?e:{}}catch{return{}}}function d(e){let t=$();return(e||process.env[D]||t.cdnOrigin||N).replace(/\/+$/,"")}function x(e){let t=$();return e||process.env[E]||t.runtimeChannel||"stable"}function T(e){let t=new URL(`${d(e)}/runtimes/manifest.json`);return t.searchParams.set("t",String(Date.now())),t.toString()}function P(e,t){return`${d(t)}/runtimes/sootsim-runtime-${e}.tar.gz`}async function y(e){let t=T(e),r=await fetch(t,{headers:{Accept:"application/json"}});if(!r.ok)throw new Error(`manifest fetch failed: ${r.status} ${r.statusText} (${t})`);return await r.json()}function U(e,t={}){let r=x(t.channel),n=t.version||e.channels[r]?.latest;if(!n)throw new Error(`no version specified and channel '${r}' has no latest entry in the manifest`);let i=e.versions[n];if(!i)throw new Error(`version ${n} not found in manifest; available: ${Object.keys(e.versions).slice(-10).join(", ")||"(none)"}`);return{version:n,channel:r,entry:i}}async function V(e={}){v();let t=d(e.cdnOrigin),r=await y(t),{version:n,channel:i,entry:o}=U(r,e),a=p(n),c=e.setActive!==!1;if(!e.force&&s.existsSync(l.join(a,"index.html")))return c&&R(n),{version:n,channel:i,cdnOrigin:t,runtimeDir:a,installed:!1,activated:c,manifest:r};let g=o.tarball||P(n,t),m=l.join(S(),`sootsim-runtime-${n}.tar.gz`);process.stderr.write(`sootsim: downloading runtime ${n}\u2026
|
|
3
3
|
`),await _(g,m),process.stderr.write(`sootsim: extracting runtime ${n}\u2026
|
|
4
4
|
`);let h=await j(m);if(h!==o.sha256)throw s.rmSync(m,{force:!0}),new Error(`sha256 mismatch for runtime ${n}: expected ${o.sha256}, actual ${h}`);let u=l.join(l.dirname(a),`.installing-${n}-${process.pid}`);s.rmSync(u,{recursive:!0,force:!0}),s.mkdirSync(u,{recursive:!0});try{if(await A(m,u),!s.existsSync(l.join(u,"index.html")))throw new Error(`extracted tarball for runtime ${n} is missing index.html`);s.rmSync(a,{recursive:!0,force:!0}),s.renameSync(u,a)}catch(b){throw s.rmSync(u,{recursive:!0,force:!0}),b}return c&&R(n),{version:n,channel:i,cdnOrigin:t,runtimeDir:a,installed:!0,activated:c,manifest:r}}async function q(e={}){v();let t=d(e.cdnOrigin),r=x(e.channel),n=await y(t),i=n.channels[r]?.latest;if(!i)return{checked:!0,updated:!1,reason:`channel '${r}' has no latest runtime`,activeVersion:f()};if(!n.versions[i])return{checked:!0,updated:!1,reason:`manifest is missing version ${i}`,activeVersion:f(),latestVersion:i};let a=f(),c=a?p(a):null,g=c?s.existsSync(l.join(c,"index.html")):!1;if(!(!a||!g||w(i,a)>0))return{checked:!0,updated:!1,reason:"active runtime is current",activeVersion:a,latestVersion:i};let h=await V({version:i,channel:r,cdnOrigin:t,setActive:!1});return{checked:!0,updated:!0,activeVersion:i,latestVersion:i,install:h}}async function B(e={}){let t=f();try{let r=await y(d(e.cdnOrigin)),n=x(e.channel),i=r.channels[n]?.latest??null,o=!!(i&&(!t||w(i,t)>0));return{active:t,latest:i,outdated:o}}catch{return{active:t,latest:null,outdated:!1}}}async function _(e,t){let r=await fetch(e);if(!r.ok||!r.body)throw new Error(`download failed: ${r.status} ${r.statusText} (${e})`);s.mkdirSync(l.dirname(t),{recursive:!0});let n=`${t}.partial`;try{await M(k.fromWeb(r.body),s.createWriteStream(n)),s.renameSync(n,t)}catch(i){try{s.unlinkSync(n)}catch{}throw i}}function j(e){return new Promise((t,r)=>{let n=C.createHash("sha256"),i=s.createReadStream(e);i.on("data",o=>n.update(o)),i.on("error",r),i.on("end",()=>t(n.digest("hex")))})}function A(e,t){return new Promise((r,n)=>{let i=I("tar",["-xzf",e,"-C",t],{stdio:["ignore","inherit","inherit"]});i.on("error",n),i.on("exit",o=>{o===0?r():n(new Error(`tar exited with code ${o}`))})})}export{N as a,D as b,E as c,d,x as e,T as f,P as g,y as h,U as i,V as j,q as k,B as l};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
function t(_){return`(async () => {
|
|
3
3
|
const __t = window.__sootsimTest
|
|
4
4
|
if (!__t) throw new Error('__sootsimTest not available')
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
function d(t){let e=t.displayUrl||t.url;return t.status!=null?`${t.method} ${e} -> ${t.status}${t.statusText?` ${t.statusText}`:""}`:t.error?`${t.method} ${e} -> ${t.error}`:`${t.method} ${e}`}async function u(t,e,...o){return t.send({type:"call",path:`__sootsimTest.${e}`,args:o})}async function g(t,e={}){let o=await t.send({type:"evaluate",code:"window.__sootsimConsole?.count?.() || { errors: 0, warnings: 0, total: 0 }"});if(!o||typeof o!="object")return;let n=Math.max(0,Number(o.errors)||0),s=Math.max(0,Number(o.warnings)||0);if(n===0&&s===0)return;let r=[];if(n>0&&r.push(`${n} console error${n===1?"":"s"}`),s>0&&r.push(`${s} console warning${s===1?"":"s"}`),console.log(`
|
|
3
3
|
console: ${r.join(", ")}`),e.errorsCommand&&console.log(` inspect: ${e.errorsCommand}`),s>0&&e.warningsCommand&&console.log(` inspect: ${e.warningsCommand}`),!e.includeTail||n===0)return;let i=await t.send({type:"evaluate",code:"window.__sootsimConsole?.getErrors?.(5) || []"});if(!(!Array.isArray(i)||i.length===0)){console.log(`
|
|
4
4
|
recent console errors:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as B,b as H,c as ne}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as B,b as H,c as ne}from"./chunk-YSSNIJC6.js";import{b as T}from"./chunk-X3ZHRSH4.js";import{g as se}from"./chunk-HFRDF5SI.js";import{a as x,b as z}from"./chunk-JA2UNVA3.js";import{c as re}from"./chunk-OTTV2PFN.js";import{d as oe}from"./chunk-LTUGPDW5.js";import{a as Y}from"./chunk-KFTTDAPI.js";import{b as te,c as S,d as w,e as $}from"./chunk-MFLW2R4J.js";import{c as N,d as g,e as F}from"./chunk-A2NHH4S4.js";import{E as Z,F as ee}from"./chunk-PXUQ5FQN.js";import xe from"node:fs";import Ce from"node:os";import j from"node:path";function ge(e){return e.replace(/^\[|\]$/g,"").toLowerCase()}function _(e){let t=ge(e);return t==="localhost"||t.endsWith(".localhost")||t==="0.0.0.0"||t==="::1"||/^127(?:\.\d{1,3}){3}$/.test(t)}function ie(e){return new Error(`could not resolve a native bundle for ${e}. pass an explicit bundle URL or open Connect and choose the app there.`)}function we(e,t){return e?.includes("/one/metro-entry.bundle")?"one":typeof t=="string"&&t?"expo":"unknown"}function ce(e,t,o){return`${e}//${t}:${o}`}function be(e){if(typeof window>"u")return!1;try{let t=new URL(e);return _(t.hostname)&&_(window.location.hostname)&&t.origin!==window.location.origin}catch{return!1}}async function ae(e,t){let o={...t,cache:t?.cache??"no-store"};return be(e)?fetch(`/__fetch-proxy?url=${encodeURIComponent(e)}`,o):fetch(e,o)}function ye(e){return e==="https:"?443:80}function Se(e){let t=e.pathname||"/";return(t==="/"||t==="")&&!e.search&&!e.hash}async function le(e,t){let o=e.replace(/\/+$/,"");try{let n=await ae(`${o}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),s=r?.extra?.expoClient||r?.extra||{},i=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(i||s.name)return{bundleUrl:ne(i||`${o}${H}`),port:t,framework:we(i,s.sdkVersion),projectName:s.name}}}catch{}try{let n=await ae(`${o}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${o}${H}`,port:t,framework:"metro"}}catch{}return null}async function $e(e){return le(ce("http:","localhost",e),e)}async function q(e){let t=e.trim();if(/^\d+$/.test(t)){let a=parseInt(t,10),l=await $e(a);if(l)return l;throw ie(`localhost:${a}`)}let o=t.startsWith("http")?t:`http://${t}`,n;try{n=new URL(o)}catch{throw new Error(`could not parse "${e}". pass a dev-server port, a dev-server base URL, or a full bundle URL.`)}let r=n.protocol||"http:",s=n.port?parseInt(n.port,10):ye(r),i=ce(r,n.hostname,s);if(_(n.hostname)&&Se(n)){let a=await le(i,s);if(a)return a;throw ie(i)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function je(){console.error(" no sootsim desktop companion found."),console.error(""),console.error(" install the desktop app:"),console.error(" sootsim install-desktop"),console.error(""),console.error(" or wire sootsim into your own project so your dev server hosts the bridge:"),console.error(" sootsim setup-repo"),console.error("")}function me(e){let t=x();if(console.log(` note: no sootsim bridge detected on port ${e}`),t){console.log(" launch the installed companion with:"),console.log(" sootsim electron");return}console.log(""),console.log(" to get a bridge running, either:"),console.log(" sootsim install-desktop # download the electron app"),console.log(" sootsim setup-repo # wire sootsim into your own project")}function ve(e){console.error(""),console.error(` no sim is connected to the sootsim bridge on port ${e}.`),console.error(""),console.error(" start your app dev server, then open it in sootsim:"),console.error(" npx expo start --localhost --port 8081"),console.error(" sootsim open 8081"),console.error(""),console.error(" then inspect the live app:"),console.error(" sootsim describe")}async function We(e,t,o){let n=[];try{n=await e.listSims()}catch{}if(console.error(""),n.length===0){ve(t);return}console.error(` no sim with id "${o}" is connected to the bridge on port ${t}.`),console.error(""),console.error(" connected sims:");for(let r of n){let s=[r.isPrimary?"primary":null,r.readyState].filter(Boolean).join(", ");console.error(` ${r.id} (${s})`)}console.error(""),console.error(" pass a valid --sim id, or run `sootsim list` to see all sessions.")}var Pe={rn:"/rn",connectrn:"/rn","connect-rn":"/rn",clock:"/app/clock","native-ui":"/app/native-ui",tamagui:"/app/tamagui",settings:"/app/settings",photos:"/app/photos",camera:"/app/camera"};function I(e){return new Promise(t=>setTimeout(t,e))}function G(e){return e.trim()}function W(e){try{let t=new URL(e),o=t.pathname.replace(/\/+$/,"")||"/";return t.searchParams.has("open")||t.searchParams.has("port")||t.searchParams.has("bundle")||t.searchParams.has("demo")||t.pathname.includes("/sootsim/index.html")||o==="/sootsim"||t.pathname==="/__soot"||t.pathname==="/__soot/"||o==="/rn"||/^\/rn\/[^/]+$/i.test(o)||/^\/app\/[^/]+$/i.test(o)||o==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(o)||/^\/__soot\/app\/[^/]+$/i.test(o)}catch{return!1}}async function co(e){let t=G(e);return(await q(t)).bundleUrl}function Q(e){let t=e.replace(/\/+$/,"")||"/";return t==="/__soot"||t.startsWith("/__soot/")?"/__soot":""}function Ie(e,t){let o=G(e),n=new URL(t),r=Q(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),/^\d+$/.test(o)?n.pathname=`${r}/rn/${o}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",o)),n.toString()}function Ue(e){let t=G(e);return/^\d+$/.test(t)||/^https?:\/\//i.test(t)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(t)}async function ke(e,t){let o=await q(e),n=new URL(t),r=Q(n.pathname);return n.pathname=`${r}/rn`,n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.set("bundle",o.bundleUrl),n.toString()}function Me(e){return e.startsWith("~/")?j.join(Ce.homedir(),e.slice(2)):j.isAbsolute(e)?e:j.resolve(process.cwd(),e)}function Te(e){let t={};for(let o=0;o<e.length;o++){if(e[o]!=="--replace")continue;let n=e[o+1];n||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let r=n.indexOf("=");(r<=0||r===n.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let s=n.slice(0,r).trim(),i=Me(n.slice(r+1).trim());xe.existsSync(i)||(console.error(` sootsim open: replacement file not found: ${i}`),process.exit(1)),t[s]={file:i},o++}return Object.keys(t).length>0?{modules:t}:void 0}function ue(){let e=Z();return ee(e)&&e.runtimePort>0?`http://localhost:${e.runtimePort}/`:Y}async function R(e,t=ue()){if(!e)return new URL(t).toString();if(W(e))return new URL(e).toString();let o=Pe[e.toLowerCase()];if(o){let n=new URL(t),r=Q(n.pathname);return n.pathname=`${r}${o}`,n.toString()}return Ue(e)?ke(e,t):Ie(e,t)}function de(e,t){let o=e?.url||e?.origin||t;try{let n=new URL(o);return n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("inspectOpen"),n.toString()}catch{return t}}async function Be(e,t,o){let n=new URL(await R(e,t));return n.searchParams.set("inspectOpen",o),n.toString()}async function _e(e,t,o,n={}){let r=n.attempts??30,s=n.intervalMs??500,i=n.minNodeCount??10;for(let a=0;a<r;a++){let l=w(e,{commandTimeoutMs:t,simId:o,simIdSource:"flag"});try{let m=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof m=="number"&&m>i)return{bridge:l,count:m}}catch{}l.close(),await I(s)}return null}function Oe(e){if(!e)return null;try{let t=new URL(e);if(t.searchParams.has("bundle")){let o=t.searchParams.get("bundle")||"";try{let n=new URL(o),r=n.pathname.length>36?`...${n.pathname.slice(-36)}`:n.pathname;return`bundle ${n.host}${r}`}catch{return"bundle"}}return t.searchParams.has("port")?`connect :${t.searchParams.get("port")||""}`:t.searchParams.has("open")?`connect ${t.searchParams.get("open")||""}`:t.searchParams.has("demo")?`demo ${t.searchParams.get("demo")||"default"}`:t.pathname.includes("/sootsim/index.html")||t.pathname==="/sootsim/"||t.pathname==="/sootsim"?"embedded sootsim":null}catch{return null}}function Re(e,t){if(e.length===0){console.log(" no sims connected");return}console.log(` connected sims (${e.length}):
|
|
3
3
|
`);for(let o of e){let n=o.lockedBy&&o.lockExpiresAt?`locked by ${o.lockedBy} (${Math.max(0,Math.round((o.lockExpiresAt-Date.now())/1e3))}s)`:"",r=[o.isPrimary?"primary":"",o.id===t?"selected":"",o.readyState,o.attachedCliCount&&o.attachedCliCount>0?"in use":"",o.userFocused?"focused":"",n].filter(Boolean);console.log(` ${o.id}${r.length?` [${r.join(", ")}]`:""}`);let s=Oe(o.url);if(s&&console.log(` loaded: ${s}`),o.url?console.log(` url: ${o.url}`):o.origin&&console.log(` origin: ${o.origin}`),o.title&&console.log(` title: ${o.title}`),console.log(` connected: ${new Date(o.connectedAt).toISOString()}`),o.lastActiveAt&&o.lastActiveAt>0){let i=Math.round((Date.now()-o.lastActiveAt)/1e3),a=i<60?`${i}s ago`:i<3600?`${Math.round(i/60)}m ago`:`${Math.round(i/3600)}h ago`;console.log(` last active: ${a}`)}}}async function O(e,t,o,n={}){let r=n.attempts??30,s=n.intervalMs??500;for(let i=0;i<r;i++){let a=w(e,{commandTimeoutMs:t});try{let m=(await a.listSims()).find(o);if(m)return m}catch{}finally{a.close()}await I(s)}return null}async function Le(e,t,o,n={}){let r=n.attempts??20,s=n.intervalMs??250;for(let i=0;i<r;i++){let a=w(e,{commandTimeoutMs:t});try{let m=(await a.listSims()).find(b=>b.id===o);if(!m||m.readyState!=="open")return!0}catch{return!0}finally{a.close()}await I(s)}return!1}function L(e,t){if(t){let r=t.trim(),s=e.find(i=>i.id===r);if(!s)throw new Error(`no sim connected with id ${r}`);return s}let o=e.find(r=>r.isPrimary&&r.readyState==="open");if(o)return o;let n=e.find(r=>r.readyState==="open");if(n)return n;throw new Error("no sim connected")}function C(e,t,o){console.log(` ${o==="current sim"?"loaded":"opened"}: ${e} [${o}]`),console.log(` current sim: ${t.id}`),console.log(JSON.stringify({simId:t.id,url:t.url},null,2))}async function P(e,t,o){if(o.includes("--no-describe"))return;let n=process.env.SOOTSIM_QUIET_TARGET_NOTICE;process.env.SOOTSIM_QUIET_TARGET_NOTICE="1";try{await Ee(e,t,{stableMs:150,maxMs:400});let r=w(e,{commandTimeoutMs:3e3,simId:t,cliLabel:"open --describe",simIdSource:"flag"});try{let i=`(async () => {
|
|
4
4
|
const t = window.__sootsimTest
|
|
5
5
|
const ms = window.SootSim?.bridges?.mainShell
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as y,c as C}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as y,c as C}from"./chunk-YSSNIJC6.js";import{a as x}from"./chunk-BAHIX7JY.js";import{exec as U}from"child_process";import _ from"http";import D from"net";import{promisify as T}from"util";var P=T(U),E=250,A=1500,M=120;function R(e,r=M){return new Promise(s=>{let t=new D.Socket,o=!1,i=a=>{o||(o=!0,t.destroy(),s(a))};t.setTimeout(r),t.once("connect",()=>i(!0)),t.once("timeout",()=>i(!1)),t.once("error",()=>i(!1)),t.connect(e,"localhost")})}function h(e,r,s="GET",t=E,o={}){return new Promise(i=>{let a=_.request({hostname:"localhost",port:e,path:r,method:s,timeout:t,headers:o},n=>{let c="";n.on("data",l=>c+=l.toString());let u=(()=>{let l=n.headers["content-type"];if(typeof l=="string")return l;if(Array.isArray(l))return l[0]})();n.on("end",()=>i({statusCode:n.statusCode||0,body:c,contentType:u}))});a.on("error",()=>i(null)),a.setTimeout(t,()=>{a.destroy(),i(null)}),a.end()})}var N=[8081,8082,8083,8084,8085,8086,3e3,3001,19e3].map(e=>({port:e,pid:0}));function v(e,r){return!(e<=0||e>=2e4||r.has(e)||e>=5170&&e<=5200)}async function L(e=[]){let r=new Set(e);try{let{stdout:s}=await P("lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | grep -E '^(node|bun)'",{encoding:"utf8",timeout:2e3});if(s.trim()){let t=new Map;for(let o of s.trim().split(`
|
|
3
3
|
`)){let i=o.trim().split(/\s+/);if(i.length<9)continue;let a=Number(i[1]),c=i[8].match(/:(\d+)$/);if(!c)continue;let u=Number(c[1]);v(u,r)&&(t.has(u)||t.set(u,a))}if(t.size>0)return[...t.entries()].map(([o,i])=>({port:o,pid:i}))}}catch{}try{let{stdout:s}=await P(`ss -tlnp 2>/dev/null | grep -E '"(node|bun)"'`,{encoding:"utf8",timeout:2e3});if(s.trim()){let t=new Map;for(let o of s.trim().split(`
|
|
4
4
|
`)){let i=o.match(/:(\d+)\s/),a=o.match(/pid=(\d+)/);if(!i)continue;let n=Number(i[1]),c=a?Number(a[1]):0;v(n,r)&&(t.has(n)||t.set(n,c))}if(t.size>0)return[...t.entries()].map(([o,i])=>({port:o,pid:i}))}}catch{}return N.filter(s=>v(s.port,r))}var S=new Map;async function $(e){if(e<=0)return null;let r=S.get(e);if(r)return r;try{let{stdout:s}=await P(`lsof -p ${e} -a -d cwd -Fn 2>/dev/null`,{encoding:"utf8",timeout:1500});for(let t of s.split(`
|
|
5
5
|
`))if(t.startsWith("n")&&t.length>1){let o=t.slice(1).trim();if(o)return S.set(e,o),o}}catch{}return null}function I(e,r){return{port:e,framework:r,bundleUrl:m(e,`http://localhost:${e}/index.bundle?platform=ios&dev=true&hot=true&minify=false`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()}}function m(e,r){let s=x.find(o=>o.preferredPort===e),t=s?.runtimeConfig?y(r,s.runtimeConfig):r;return C(t)}function O(e){return e.includes("/node_modules/one/metro-entry.bundle")}function j(e){try{let r=JSON.parse(e);return r&&typeof r=="object"?r:null}catch{return null}}function w(e,r,s){if(!r)return e;try{let t=JSON.parse(r.body),o=t?.extra?.expoClient||t?.extra||{};o.name&&(e.projectName=o.name),o.ios?.bundleIdentifier&&(e.bundleId=o.ios.bundleIdentifier),e.framework==="metro"&&o.sdkVersion&&(e.framework="expo");let i=t?.launchAsset?.url;i&&!e.patched&&!O(e.bundleUrl)&&(e.bundleUrl=m(e.port,i));let a=o.iconUrl||o.ios?.iconUrl||o.icon||o.ios?.icon;if(a)if(e.iconPath=a,s)if(a.startsWith("http"))e.iconUrl=s(a);else{let n=a.replace(/^\.\//,"");e.iconUrl=s(`http://localhost:${e.port}/assets/${n}`)}else e.iconUrl=a.startsWith("http")?a:`http://localhost:${e.port}/assets/${a.replace(/^\.\//,"")}`}catch{}return e}var d=new Set,f=new Set,b=new Set;async function H(e,r){if(!await R(e))return null;let s="/node_modules/one/metro-entry.bundle?platform=ios&dev=true",[t,o,i,a,n]=await Promise.all([d.has(e)?Promise.resolve(null):h(e,"/__soot/"),h(e,"/status"),h(e,s,"HEAD"),b.has(e)?Promise.resolve(null):h(e,"/","GET",A,{"expo-platform":"ios"}),f.has(e)?Promise.resolve(null):h(e,"/_expo/status")]);n&&n.statusCode===200?f.delete(e):f.has(e)||f.add(e);let c=a?j(a.body):null,u=typeof c?.launchAsset?.url=="string"?c.launchAsset.url:null,l=c?.extra?.expoClient||c?.extra||{};if(c&&(u||typeof l.name=="string")){d.add(e);let p=u||`http://localhost:${e}/index.bundle?platform=ios&dev=true&hot=true&minify=false`,k=p.includes("/one/metro-entry.bundle")?"one":"expo";return w({port:e,framework:k,bundleUrl:m(e,p),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()},a,r)}return i&&i.statusCode>0&&i.statusCode<400&&/application\/javascript/i.test(i.contentType||"")?(d.add(e),b.add(e),w({port:e,framework:"one",bundleUrl:m(e,`http://localhost:${e}${s}&minify=false`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()},a,r)):o&&o.body.includes("packager-status:running")?(d.add(e),w(I(e,n&&n.statusCode===200?"expo":"metro"),a,r)):t&&t.statusCode===200&&t.body.includes("sootsim-patched")?(d.delete(e),w({port:e,framework:"one",bundleUrl:m(e,`http://localhost:${e}/__soot/bundle.js`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now(),patched:!0},a,r)):(d.add(e),null)}function B(e){let r=e.projectName?.trim().toLowerCase();return!!(r==="soot"||r==="sootsim"||e.bundleId?.trim().toLowerCase()?.startsWith("dev.soot"))}var g=new Map,G=3e4,W=1500;function F(e){return!e||e.framework==="metro"||e.framework==="unknown"}function z(e){return e?m(e.port,e.bundleUrl)===e.bundleUrl:!0}function q(e,r,s=Date.now()){if(r===0||e.pid!==r||!z(e.result))return!1;let t=s-e.cachedAt;return!(e.result===null&&t>=G||F(e.result)&&t>=W)}async function ee(e={}){let r=await L(e.excludePorts),s=new Set(r.map(n=>n.port));for(let n of[...g.keys()])s.has(n)||g.delete(n);for(let n of[...d])s.has(n)||d.delete(n);for(let n of[...f])s.has(n)||f.delete(n);for(let n of[...b])s.has(n)||b.delete(n);let t=[],o=[];for(let{port:n,pid:c}of r){let u=g.get(n);if(u&&q(u,c)){u.result&&t.push(u.result);continue}u&&u.pid!==c&&(d.delete(n),f.delete(n),b.delete(n)),o.push({port:n,pid:c})}o.length>0&&(await Promise.all(o.map(c=>H(c.port,e.buildIconProxyUrl)))).forEach((c,u)=>{let{port:l,pid:p}=o[u];p!==0&&g.set(l,{pid:p,result:c,cachedAt:Date.now()}),c&&t.push(c)});let i=new Map;for(let{port:n,pid:c}of r)c>0&&i.set(n,c);await Promise.all(t.map(async n=>{let c=i.get(n.port);if(!c)return;n.pid=c;let u=await $(c);u&&(n.cwd=u)}));let a=new Set(i.values());for(let n of[...S.keys()])a.has(n)||S.delete(n);return t.filter(n=>!B(n))}export{ee as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var i="sootsimConfig";function e(n){return!!n&&Object.keys(n).length>0}function s(n){return n?e(n.modules)||e(n.turboModules)||e(n.nativeModules)||e(n.env)||e(n.settings)||e(n.initialState):!1}function u(n,o){let t=new URL(n);return s(o)?t.searchParams.set(i,JSON.stringify(o)):t.searchParams.delete(i),t.toString()}var g="/index.bundle?platform=ios&dev=true&hot=true&minify=false";function r(n){return/^https?:\/\//i.test(n)}function a(n){return n.endsWith(".bundle")}function l(n){try{let o=r(n),t=new URL(n,"http://soot.local");return t.pathname=t.pathname.replace(/\.\.bundle$/,".bundle"),a(t.pathname)?(t.searchParams.delete("transform.bytecode"),o?t.toString():`${t.pathname}${t.search}${t.hash}`):n}catch{return n}}export{u as a,g as b,l as c};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-26LJCQNQ.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-DPMKOIAX.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-DPMKOIAX.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.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-26LJCQNQ.js";import{existsSync as i,writeFileSync as n,readFileSync as c}from"fs";import{resolve as t}from"path";async function a(s){let e=s[0];switch((!e||s.includes("--help")||s.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim config \u2014 manage sootsim configuration
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m}from"./chunk-XWVTLGO2.js";import"./chunk-YSSNIJC6.js";import"./chunk-X3ZHRSH4.js";import"./chunk-HFRDF5SI.js";import"./chunk-JA2UNVA3.js";import"./chunk-OTTV2PFN.js";import"./chunk-WWTI3E3U.js";import"./chunk-LTUGPDW5.js";import"./chunk-KFTTDAPI.js";import"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";export{d as buildOpenUrl,c as buildShellUrl,f as printConnectedSims,a as resolveBundleTarget,b as resolveDefaultShellBaseUrl,l as runClaimCommand,m as runCloseCommand,k as runFocusCommand,h as runListCommand,i as runOpenCommand,j as runUseCommand,e as summarizeSimUrl,g as waitForSimMatch};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as I,e as N,i as S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as I,e as N,i as S}from"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";import{createWriteStream as k,mkdirSync as v,writeFileSync as C}from"fs";import{dirname as T,resolve as w}from"path";import{Readable as F}from"stream";import{pipeline as y}from"stream/promises";import{createGzip as x}from"zlib";async function U(o,m){let t=Number(b(o,"--duration")??"5");if(!Number.isFinite(t)||t<=0)return console.error(" --duration must be a positive number (seconds)"),1;let a=Number(b(o,"--sample-interval")??"10");if(!Number.isFinite(a)||a<=0)return console.error(" --sample-interval must be a positive number (milliseconds)"),1;let s=Number(b(o,"--max-buffer")??"100000");if(!Number.isFinite(s)||s<=0)return console.error(" --max-buffer must be a positive number"),1;let p=b(o,"--output")??b(o,"-o"),u=w(process.cwd(),p??"/tmp/sootsim.cpuprofile"),g=u.endsWith(".gz"),h=I(o,{port:m.port,stripValueFlags:["--duration","--output","-o","--sample-interval","--max-buffer"]}),c=N({...h,commandTimeoutMs:Math.max(3e4,(t+20)*1e3)});try{let l=await S(c,"SootSim.bridges.workerCpuProfileStart",{sampleInterval:a,maxBufferSize:s});if(!l?.started)return console.error(" could not start tenant-worker profiler."),console.error(" is sootsim running? (try `bun sootsim list`)"),1;m.verbose&&console.error(` started: sampleInterval=${l.sampleInterval}ms buffer=${l.maxBufferSize}`),console.log(` recording for ${t}s\u2026`),await new Promise(r=>setTimeout(r,t*1e3));let n=await S(c,"SootSim.bridges.workerCpuProfileStop");if(!n||n.error||!n.trace)return n?.error?.includes("cpu-profile-unsupported")?(console.error(" cpu-profile is currently unsupported."),console.error(" the JS Self-Profiler API cannot profile a dedicated worker, and"),console.error(" sootsim runs the guest app in the tenant worker. a CDP-based"),console.error(" profiler is required \u2014 tracked as the F28 follow-up.")):console.error(` profile capture failed: ${n?.error??"no trace returned"}`),1;let P=B(n.trace),e=JSON.stringify(P);v(T(u),{recursive:!0}),g?await y(F.from([e]),x(),k(u)):C(u,e);let i=(Buffer.byteLength(e)/1024/1024).toFixed(2);return console.log(` samples: ${P.samples.length} (${i} MB uncompressed)`),console.log(` saved: ${u}`),console.log(" open in chrome devtools \u2192 Performance \u2192 Load profile to inspect."),0}catch(l){let n=l?.message??String(l);return console.error(` profile failed: ${n}`),/could not connect|ECONNREFUSED/i.test(n)&&console.error(" is sootsim running? (try `bun sootsim list`)"),1}finally{c.close()}}function B(o){let m=o.frames??[],t=o.resources??[],a=o.stacks??[],s=o.samples??[],p=1,u=[{id:p,callFrame:{functionName:"(root)",scriptId:"0",url:"",lineNumber:-1,columnNumber:-1},hitCount:0,children:[]}];for(let e=0;e<a.length;e++){let i=a[e],r=m[i.frameId]??{name:"(unknown)"},f=r.resource!==void 0?t[r.resource]??"":"";u.push({id:e+2,callFrame:{functionName:r.name||"(anonymous)",scriptId:r.resource!==void 0?String(r.resource):"0",url:f,lineNumber:typeof r.line=="number"?r.line-1:-1,columnNumber:typeof r.column=="number"?r.column-1:-1},hitCount:0,children:[]})}for(let e=0;e<a.length;e++){let i=a[e],r=e+2,f=i.parentId!==void 0?i.parentId+2:p,d=u[f-1];d&&!d.children.includes(r)&&d.children.push(r)}let g=[],h=[],c=s.length>0?s[0].timestamp:0,l=c;for(let e=0;e<s.length;e++){let i=s[e],r=i.stackId!==void 0?i.stackId+2:p;g.push(r);let f=u[r-1];f&&f.hitCount++;let d=e===0?0:i.timestamp-l;h.push(Math.max(0,Math.round(d*1e3))),l=i.timestamp}let n=Math.round(c*1e3),P=s.length>0?Math.round(s[s.length-1].timestamp*1e3):n;return{nodes:u,startTime:n,endTime:P,samples:g,timeDeltas:h}}function b(o,m){let t=o.indexOf(m);if(!(t<0||t===o.length-1))return o[t+1]}export{U as runCpuProfile};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as T,b as _}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as T,b as _}from"./chunk-IBKI7UPZ.js";import"./chunk-QOOTU75R.js";import"./chunk-L6EBBORR.js";import{g as I,o as C,p as w,q as B}from"./chunk-PXUQ5FQN.js";import{a as W}from"./chunk-26LJCQNQ.js";import{execFileSync as tt,spawnSync as n}from"child_process";import{existsSync as a,mkdirSync as v,readFileSync as et,rmSync as S,writeFileSync as R}from"fs";import{homedir as $}from"os";import{dirname as U,resolve as m}from"path";import{execFileSync as Y}from"child_process";import{chmodSync as H,mkdirSync as D,rmSync as K,writeFileSync as L}from"fs";import{dirname as P}from"path";var X="dev.sootsim.daemon",N="SootSim Daemon",O="0.1.36";function F(t,e,r){let o=w(),s=B(),i=P(P(s)),f=P(s),u=`${i}/Resources`;K(o,{recursive:!0,force:!0}),D(C(),{recursive:!0}),D(f,{recursive:!0}),D(u,{recursive:!0}),L(`${i}/Info.plist`,Q()),L(`${i}/PkgInfo`,"APPL????"),L(s,z(t,e,r)),H(s,493);try{Y("codesign",["--force","--sign","-","--deep",o],{stdio:"pipe"})}catch(c){let g=c instanceof Error?c.message:String(c);console.warn(` warning: ad-hoc codesign of ${o} failed: ${g}
|
|
3
3
|
the daemon will still run, but Login Items may show a generic name.`)}return{bundlePath:o,launcherPath:s}}function Q(){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
4
4
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
5
5
|
<plist version="1.0">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as f}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as f}from"./chunk-LR5DET6G.js";import{A as x,B as T,C as v,y as D,z as O}from"./chunk-NTZRFKEN.js";import{b as A}from"./chunk-X3ZHRSH4.js";import{c as S,e as $,g as N}from"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.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-CRW5T6XB.js");await e(["debug",...i],{port:l.port,verbose:l.verbose});return}let t=$(g);try{switch(k){case"enable":{let e=B(r[0]);e.length===0&&(console.error(` usage: sootsim debug enable <channel[,channel,...]>
|
|
171
171
|
known: ${H.join(", ")}`),process.exit(1));let o=await v(t,"enable",e);console.log(a({active:o},n));break}case"disable":{let e=B(r[0]),o=await v(t,"disable",e);console.log(a({active:o},n));break}case"toggle":{let e=r[0];e||(console.error(" usage: sootsim debug toggle <channel>"),process.exit(1));let o=await c(t,`window.__sootsimDebug.toggle(${JSON.stringify(e)})`);console.log(a({[e]:o},n));break}case"status":{let e=await D(t);console.log(a(e,n));break}case"channels":{let e=await c(t,"window.__sootsimDebug.channels()");console.log(a(e,n));break}case"flags":{let e=await O(t);console.log(a(e,n));break}case"snapshot":{let e=r[0],o=e?`window.__sootsimDebug.snapshot(${JSON.stringify(e)})`:"window.__sootsimDebug.snapshot()",s=await c(t,`(() => { const s = ${o}; if (!s) return null; return { label: s.label, at: s.at, size: s.nodes.size }; })()`);console.log(a(s,n));break}case"snapshots":{let e=await c(t,"window.__sootsimDebug.snapshots()");console.log(a(e,n));break}case"diff":{let e=r[0],o=r[1];(!e||!o)&&(console.error(" usage: sootsim debug diff <labelA> <labelB>"),process.exit(1));let s=`(() => {
|
|
172
172
|
const d = window.__sootsimDebug.diff(${JSON.stringify(e)}, ${JSON.stringify(o)});
|
|
173
173
|
if (!d) return null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as S}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as S}from"./chunk-UBJJEZO4.js";import"./chunk-XXJAHIR4.js";import"./chunk-EW7G6TZV.js";import"./chunk-SIH4PE3C.js";import"./chunk-IFJMJS4Y.js";import"./chunk-QD23HPD4.js";import"./chunk-XWVTLGO2.js";import"./chunk-YSSNIJC6.js";import"./chunk-X3ZHRSH4.js";import"./chunk-HFRDF5SI.js";import"./chunk-JA2UNVA3.js";import"./chunk-OTTV2PFN.js";import"./chunk-BAHIX7JY.js";import"./chunk-JJGG2ICF.js";import"./chunk-4NPUTEDF.js";import"./chunk-WWTI3E3U.js";import"./chunk-LTUGPDW5.js";import"./chunk-RHH6P5Z7.js";import"./chunk-KFTTDAPI.js";import"./chunk-3VULRGJO.js";import"./chunk-OK3YCEYK.js";import"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-IBKI7UPZ.js";import"./chunk-QOOTU75R.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.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.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-SIH4PE3C.js";import"./chunk-RHH6P5Z7.js";import"./chunk-3VULRGJO.js";import{f as c,g as r,h as g}from"./chunk-OK3YCEYK.js";import{c as d,e as l,h as a}from"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";function h(){console.log(`
|
|
3
3
|
sootsim device \u2014 inspect or change the live device preset for a sim
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{c as v,e as E,h as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{c as v,e as E,h as b}from"./chunk-MFLW2R4J.js";import{b as $}from"./chunk-A2NHH4S4.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";function j(e){return e.ts??e.t??0}function F(e){return typeof e.message=="string"&&e.message.length>0?e.message:Array.isArray(e.args)?e.args.map(r=>typeof r=="string"?r:JSON.stringify(r)).join(" "):""}var W=new Set(["timeline","network","react","console","screen"]);function P(){console.log(`
|
|
3
3
|
sootsim diagnose \u2014 compact "what just went wrong?" report
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-HKZEU76U.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-HFRDF5SI.js";import"./chunk-JA2UNVA3.js";import"./chunk-OTTV2PFN.js";import"./chunk-WWTI3E3U.js";import"./chunk-LTUGPDW5.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.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.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as g}from"./chunk-4D2BRAPP.js";import"./chunk-HKZEU76U.js";import{a as v,f as h}from"./chunk-XWVTLGO2.js";import"./chunk-YSSNIJC6.js";import"./chunk-X3ZHRSH4.js";import{b as f,g as u}from"./chunk-HFRDF5SI.js";import{a as p}from"./chunk-JA2UNVA3.js";import{c as m}from"./chunk-OTTV2PFN.js";import"./chunk-WWTI3E3U.js";import"./chunk-LTUGPDW5.js";import"./chunk-KFTTDAPI.js";import"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.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-ZMNP3JUU.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.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a,b,c,d}from"./chunk-UBJJEZO4.js";import"./chunk-XXJAHIR4.js";import"./chunk-EW7G6TZV.js";import"./chunk-SIH4PE3C.js";import"./chunk-IFJMJS4Y.js";import"./chunk-QD23HPD4.js";import"./chunk-XWVTLGO2.js";import"./chunk-YSSNIJC6.js";import"./chunk-X3ZHRSH4.js";import"./chunk-HFRDF5SI.js";import"./chunk-JA2UNVA3.js";import"./chunk-OTTV2PFN.js";import"./chunk-BAHIX7JY.js";import"./chunk-JJGG2ICF.js";import"./chunk-4NPUTEDF.js";import"./chunk-WWTI3E3U.js";import"./chunk-LTUGPDW5.js";import"./chunk-RHH6P5Z7.js";import"./chunk-KFTTDAPI.js";import"./chunk-3VULRGJO.js";import"./chunk-OK3YCEYK.js";import"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-IBKI7UPZ.js";import"./chunk-QOOTU75R.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";export{b as discoverSootsimUrl,a as parseFlowFile,d as runFlow,c as runFlowPlayback};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{b as n,c as r,d as l}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{b as n,c as r,d as l}from"./chunk-FQHGM7T3.js";import"./chunk-A2NHH4S4.js";import"./chunk-26LJCQNQ.js";function a(t){let s=t[0]??"list";if(s==="reset"){t[1]==="global"?(r(),console.log(" cleared global hint state")):(n(),console.log(" cleared hint state for this CLI identity"));return}if(s==="list"){let e=l();if(!e.length){console.log(" no hints registered");return}let i=Math.max(...e.map(o=>o.id.length));console.log(" registered hints:");for(let o of e){let c=typeof o.frequency=="string"?o.frequency:`cooldown ${o.frequency.cooldownMs}ms`;console.log(` ${o.id.padEnd(i)} ${c}`)}console.log(""),console.log(" env overrides:"),console.log(" SOOTSIM_HINTS=off suppress all hints"),console.log(" SOOTSIM_HINTS=always show every hint every time");return}console.error(` unknown subcommand: ${s}`),console.error(" usage:"),console.error(" sootsim hints list show registered hints"),console.error(" sootsim hints reset [global] clear shown-state"),process.exit(1)}export{a as runHints};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{A,B,C,D,E,F,G,H,I,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A,B,C,D,E,F,G,H,I,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";export{b as ACTIVE_RUNTIME_FILE,d as CONFIG_FILE,e as DAEMON_HEARTBEAT_STALE_MS,c as DAEMON_LOCKFILE,a as SOOTSIM_HOME_ENV,D as activeRuntimeDir,j as activeRuntimeFile,r as cacheDir,H as claimDaemonLockfile,C as compareSemver,t as configFilePath,p as daemonAppBundlePath,o as daemonAppDir,q as daemonAppLauncherPath,s as daemonLockfilePath,k as electronDir,l as electronUserDataDir,m as electronVersionDir,y as ensureSootsimHome,F as isDaemonLockfileFresh,g as isSootsimDevCheckout,B as listInstalledRuntimes,n as profilesDir,z as readActiveRuntime,E as readDaemonLockfile,u as readSharedConfig,w as readTelemetryEnabled,I as removeDaemonLockfile,i as runtimeDir,h as runtimesDir,f as sootsimHomeDir,A as writeActiveRuntime,G as writeDaemonLockfile,v as writeSharedConfig,x as writeTelemetryEnabled};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as G}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as G}from"./chunk-FQHGM7T3.js";import{a as Ce,b as De}from"./chunk-W7N6B2MX.js";import{a as X,b as C,c as D,d as z,e as ce,f as ne,g as ot,h as st,i as xe}from"./chunk-LR5DET6G.js";import{D as tt,a as Be,b as je,c as Le,d as Je,e as qe,f as be,g as we,h as We,i as He,j as Ke,k as Ue,l as ze,m as Ye,n as Ge,o as Xe,p as Ve,q as Qe,u as Ze,w as se,x as et}from"./chunk-NTZRFKEN.js";import{a as Re,e as le}from"./chunk-QD23HPD4.js";import{b as nt,c as rt,i as it}from"./chunk-XWVTLGO2.js";import"./chunk-YSSNIJC6.js";import{a as Ee}from"./chunk-X3ZHRSH4.js";import"./chunk-HFRDF5SI.js";import"./chunk-JA2UNVA3.js";import"./chunk-OTTV2PFN.js";import"./chunk-WWTI3E3U.js";import"./chunk-LTUGPDW5.js";import{a as ge,c as ye,d as Ie}from"./chunk-6GYM3Z7K.js";import{a as Ne}from"./chunk-KFTTDAPI.js";import{c as Fe,e as Ae,f as Pe,g as Oe,h as he}from"./chunk-MFLW2R4J.js";import{b as _e}from"./chunk-A2NHH4S4.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";import{existsSync as Lt,mkdirSync as Jt,readFileSync as qt,rmSync as at,writeFileSync as Wt}from"fs";import{tmpdir as Ht}from"os";import{dirname as Kt,join as Ut,resolve as zt}from"path";var re=1,Yt="SOOTSIM_INSPECT_NOTICE_PATH",Gt=300*1e3,Xt=15e3;function lt(){return zt(process.env[Yt]||Ut(Ht(),"sootsim-inspect-notice-state.json"))}function Vt(s,d){return Object.fromEntries(Object.entries(s).filter(([,a])=>typeof a?.signature=="string"&&Number.isFinite(a?.updatedAt)&&d-a.updatedAt<=Gt))}function Qt(s){let d=lt();if(!Lt(d))return{version:re,entries:{}};try{let a=JSON.parse(qt(d,"utf8"));return a.version!==re||!a.entries||typeof a.entries!="object"?(at(d,{force:!0}),{version:re,entries:{}}):{version:re,entries:Vt(a.entries,s)}}catch{return at(d,{force:!0}),{version:re,entries:{}}}}function Zt(s){let d=lt();Jt(Kt(d),{recursive:!0}),Wt(d,JSON.stringify(s,null,2)+`
|
|
3
3
|
`)}function eo(s,d){let a=d.trim()||"default";return`${s}:${a}`}function $e(s,d,a,l={}){let f=l.nowMs??Date.now(),i=l.cooldownMs??Xt,h=Qt(f),S=eo(s,d),I=h.entries[S];return I&&I.signature===a&&f-I.updatedAt<i?!1:(h.entries[S]={signature:a,updatedAt:f},Zt(h),!0)}async function ct(s,d={args:[]}){let a=await Be(s);if(C(d.args)){D(a);return}console.log(` nodes: ${a.nodes}`)}function Se(s,d){let a=s.indexOf(d);return a>=0&&a+1<s.length?s[a+1]:null}async function dt(s){let{bridge:d,args:a,positional:l}=s,f=a.includes("--verbose")||a.includes("-v"),i=C(a),h=f&&!i,S=a.includes("--watch")||a.includes("-w"),I=1e3,T=a.includes("--compact"),w=a.includes("--no-xy"),v=Se(a,"--testid-like"),_=Se(a,"--only"),M=Se(a,"--subtree"),R=l[1],c=R?/[*?]/.test(R):!1,J=!c&&!_?R:void 0,U=_??(c?R:void 0),E=async()=>{await ce(d,{verbose:h});let Y=await Je(d,{describe:!0,verbose:f,filter:J||"",testIdLike:v||void 0,onlyGlob:U||void 0,subtreeRoot:M||void 0,compact:T,hideXy:w}),W=Y?.tree,x=Y?.shell,N=Y?.keyboard;if(i){D({shell:x,tree:W??"",keyboard:N});return}if(x&&typeof x=="object"){let F=[x.state?`state=${x.state}`:null,x.activeApp?`app=${x.activeApp}`:null,x.showSwitcher?"switcher":null,x.switcherPhase&&x.switcherPhase!=="idle"?`phase=${x.switcherPhase}`:null].filter(Boolean);F.length>0&&console.log(` shell: ${F.join(" ")}`)}if(typeof W=="string"&&W.startsWith("__SUBTREE_NOT_FOUND__:")){let F=W.slice(22);console.log(` subtree root not found: ${F}`),G("subtree-root-not-found",F);return}if(!W){let F=Y?.nodeCount??0;console.log(" no matching nodes found"),!(J||v||U||M)&&F<10&&G("app-still-loading",F);return}if(console.log(W),!(J||v||U||M)&&!S&&W.split(`
|
|
4
4
|
`).length>=80&&G("describe-use-filters"),N&&N.visible){let F=N.spec,V=[F?.keyboardType?`type=${F.keyboardType}`:null,F?.returnKeyType&&F.returnKeyType!=="default"?`return=${F.returnKeyType}`:null,N.mode!=="letters"?`mode=${N.mode}`:null,N.shifted?"shift":null,N.capsLock?"caps":null,F?.autoCapitalize&&F.autoCapitalize!=="sentences"?`autoCap=${F.autoCapitalize}`:null,N.accessoryBarId?`accessory=${N.accessoryBarId}`:null].filter(Boolean);console.log(`
|
|
5
5
|
keyboard: ${V.join(" ")||"visible"}`)}};if(S)for(console.log(` watching... (Ctrl+C to stop)
|
|
@@ -135,7 +135,7 @@ import{a as G}from"./chunk-IF33CQL4.js";import{a as Ce,b as De}from"./chunk-4UA6
|
|
|
135
135
|
`);console.log(`${t??""}
|
|
136
136
|
|
|
137
137
|
${o}
|
|
138
|
-
`),process.exit(0)}let _=f.wsPort,M=f.simId,R=f.commandTimeoutMs;if(h==="list"&&l.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-
|
|
138
|
+
`),process.exit(0)}let _=f.wsPort,M=f.simId,R=f.commandTimeoutMs;if(h==="list"&&l.some(e=>e==="--drivers"||e==="-D")){let{buildDriverListRows:e}=await import("./drivers-HPWMBGHU.js"),t=e();console.log(` available drivers (${t.length}):
|
|
139
139
|
`);let o=Math.max(...t.map(n=>n.id.length),6),r=Math.max(...t.map(n=>n.kind.length),4);for(let n of t){let u=n.available?"\u2713":"\u2717",m=n.id.padEnd(o),y=n.kind.padEnd(r);console.log(` ${u} ${m} ${y} ${n.description}`),n.available&&n.detail?console.log(` ${n.detail}`):!n.available&&n.reason&&console.log(` unavailable: ${n.reason}`)}return}let c=Ae(f),J=M||"default",U=new Set(["errors","warnings","requests","js","eval","reload","globals","perf","list","wait","sleep"]);function E(e){let t=e.displayUrl||e.url;return e.status!=null?`${e.method} ${t} -> ${e.status}${e.statusText?` ${e.statusText}`:""}`:e.error?`${e.method} ${t} -> ${e.error}`:`${e.method} ${t}`}async function L(e){let t=ut()?1200:350;try{let{settled:o,elapsed:r}=await oe({bridge:e,maxMs:t,pollMs:32,stablePolls:2});o||process.stderr.write(` \u26A0 auto-wait timed out after ${r??t}ms \u2014 next command may see mid-animation state. use \`sootsim do settle\` for a longer wait.
|
|
140
140
|
`)}catch{}}async function Y(){try{return await c.send({type:"evaluate",code:`(() => ({
|
|
141
141
|
console: window.__sootsimConsole?.count?.() || null,
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as o}from"./chunk-MHETWJAQ.js";import"./chunk-4D2BRAPP.js";import"./chunk-5A4JEYK2.js";import"./chunk-MFLW2R4J.js";import"./chunk-A2NHH4S4.js";import"./chunk-IBKI7UPZ.js";import"./chunk-QOOTU75R.js";import"./chunk-L6EBBORR.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";async function t(n){console.error(" note: `sootsim install` is now `sootsim setup-repo`. forwarding\u2026\n"),await o(n)}export{t as runInstall};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as b}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{a as b}from"./chunk-4D2BRAPP.js";import{a as x}from"./chunk-JA2UNVA3.js";import"./chunk-26LJCQNQ.js";import{spawn as k,spawnSync as u}from"child_process";import{chmodSync as S,createWriteStream as E,existsSync as w,mkdirSync as y,renameSync as T,rmSync as g,statSync as P}from"fs";import{tmpdir as D}from"os";import{dirname as M,join as f,resolve as v}from"path";var h="https://sootbean.com/api/electron-release";function A(){let r=process.arch;if(process.platform==="darwin"){let o=r==="arm64"?"mac-arm64":"mac-x64",n=`sootsim-latest-${o}.dmg`;return{platform:o,filename:n,url:`${h}/${n}`,install:_}}if(process.platform==="linux"){let o="sootsim-latest-linux-x64.AppImage";return{platform:"linux-x64",filename:o,url:`${h}/${o}`,install:L}}if(process.platform==="win32"){let o="sootsim-latest-win-x64.exe";return{platform:"win-x64",filename:o,url:`${h}/${o}`,install:C}}return null}async function O({url:r,dest:o,onProgress:n}){let s=await fetch(r,{redirect:"follow"});if(!s.ok)throw new Error(`download failed: ${s.status} ${s.statusText} (${r})`);let t=s.headers.get("content-length"),a=t?Number(t):null;if(!s.body)throw new Error("download failed: empty response body");y(M(o),{recursive:!0});let i=E(o),d=s.body.getReader(),c=0;try{for(;;){let{done:l,value:p}=await d.read();if(l)break;i.write(Buffer.from(p)),c+=p.byteLength,n?.(c,a)}}finally{await new Promise((l,p)=>{i.end(e=>e?p(e):l())})}}function I(r,o){let n=(r/1048576).toFixed(1);if(!o)return` ${n} MB`;let s=Math.min(100,Math.round(r/o*100)),t=(o/(1024*1024)).toFixed(1),a=24,i=Math.round(s/100*a);return` ${"\u2588".repeat(i)+"\u2591".repeat(a-i)} ${s}% ${n} / ${t} MB`}async function _(r){let o=u("hdiutil",["attach","-nobrowse","-readonly",r],{encoding:"utf8"});if(o.status!==0)throw new Error(`hdiutil attach failed: ${o.stderr||o.stdout}`.trim());let n=o.stdout.trim().split(`
|
|
3
3
|
`),t=n[n.length-1].split(" ").pop()?.trim();if(!t||!w(t))throw new Error(`could not determine dmg mount point (output: ${o.stdout})`);let a=f(t,"sootsim.app");if(!w(a))throw u("hdiutil",["detach","-force",t]),new Error(`sootsim.app not found inside ${t}`);let i="/Applications",d=v(process.env.HOME||"","Applications"),c=i;try{let m=f(i,`.sootsim-write-probe-${process.pid}`);u("touch",[m]),w(m)?g(m,{force:!0}):c=d}catch{c=d}c===d&&y(c,{recursive:!0});let l=f(c,"sootsim.app");w(l)&&g(l,{recursive:!0,force:!0});let p=u("cp",["-R",a,l]),e=u("hdiutil",["detach","-force",t]);if(p.status!==0)throw new Error(`copy to ${l} failed: ${p.stderr?.toString()||""}`.trim());return e.status!==0&&console.warn(` warning: failed to unmount ${t} (${e.stderr?.toString().trim()||"unknown error"})`),u("xattr",["-dr","com.apple.quarantine",l]),l}async function L(r){let o=v(process.env.HOME||"","Applications");y(o,{recursive:!0});let n=f(o,"sootsim.AppImage");return w(n)&&g(n,{force:!0}),T(r,n),S(n,493),n}async function C(r){return await new Promise((o,n)=>{let s=k("cmd",["/c","start",'""',"/wait",r],{stdio:"inherit"});s.once("error",n),s.once("exit",t=>{t===0?o():n(new Error(`installer exited with code ${t}`))})}),r}async function Y(r){(r.includes("--help")||r.includes("-h"))&&(console.log(`
|
|
4
4
|
sootsim install-desktop \u2014 download and install the optional desktop GUI
|
|
5
5
|
|
|
@@ -20,4 +20,4 @@ examples:
|
|
|
20
20
|
`),process.exit(0));let o=r.includes("--yes")||r.includes("-y")||process.env.SOOTSIM_NO_PROMPT==="1"||process.env.CI==="1"||!process.stdin.isTTY,n=r.includes("--force"),s=x();if(s&&!n){console.log(` sootsim desktop already installed at: ${s.path}`),console.log(" pass --force to reinstall.");return}let t=A();if(t||(console.error(` no desktop build available for ${process.platform}/${process.arch}.`),console.error(" supported: darwin-arm64, darwin-x64, linux-x64, win32-x64"),process.exit(1)),console.log(` platform: ${t.platform}`),console.log(` download: ${t.url}`),console.log(),!o){if(!await b("download and install now?",!0)){console.log(" cancelled.");return}console.log()}let a=f(D(),`sootsim-install-${Date.now()}`),i=f(a,t.filename),d=0;process.stdout.write(` downloading ${t.filename}...
|
|
21
21
|
`);try{await O({url:t.url,dest:i,onProgress:(e,m)=>{let $=Date.now();$-d<100&&e<(m??1/0)||(d=$,process.stdout.isTTY&&process.stdout.write(`\r\x1B[2K${I(e,m)}`))}})}catch(e){g(a,{recursive:!0,force:!0}),console.error(`
|
|
22
22
|
download failed: ${e instanceof Error?e.message:String(e)}`),process.exit(1)}process.stdout.isTTY&&process.stdout.write(`
|
|
23
|
-
`);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-
|
|
23
|
+
`);let c=P(i).size;console.log(` downloaded ${(c/(1024*1024)).toFixed(1)} MB`),console.log(),console.log(" installing...");let{trackCliEvent:l,flushCliTelemetry:p}=await import("./telemetry-6ZYCDCLG.js");try{let e=await t.install(i);l({event:"cli_install_desktop_succeeded",properties:{platform:t.platform,size_bytes:c}}),console.log(` installed: ${e}`)}catch(e){l({event:"cli_install_desktop_failed",properties:{platform:t.platform,error:e instanceof Error?e.message:String(e)}}),await p(),console.error(` install failed: ${e instanceof Error?e.message:String(e)}`),console.error(` keeping download at ${i} for manual install.`),process.exit(1)}finally{g(a,{recursive:!0,force:!0})}console.log(),console.log(" next steps:"),console.log(" sootsim electron launch the desktop app"),console.log(" sootsim open <target> open a demo or bundle in it")}export{Y as runInstallDesktop};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{a as l,b as d,c as k,d as y,e as g}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.43 | (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-4NPUTEDF.js";import{d as c}from"./chunk-QOOTU75R.js";import"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";async function a(){let s=await c();return s?.token||(process.stderr.write(" sootsim keys ... needs you to be signed in.\n run `sootsim login` first.\n"),process.exit(1)),{origin:s.origin,token:s.token}}function f(s){if(!s)return"never";try{return new Date(s).toLocaleString()}catch{return s}}async function h(s){let i=s[0];if(!i||i==="--help"||i==="-h"){u();return}if(i==="list"){let{origin:o,token:e}=await a(),n=await fetch(`${o.replace(/\/$/,"")}/api/sootsim/billing/keys`,{headers:{authorization:`Bearer ${e}`}});n.ok||(console.error(` keys list failed (${n.status})`),process.exit(1));let{keys:r}=await n.json();if(r.length===0){console.log(" no keys. create one with `sootsim keys create <label>`.");return}for(let t of r)console.log(` ${t.keyPrefix}\u2026 ${t.label.padEnd(24)} scopes=${t.scopes.join(",")} last=${f(t.lastUsedAt)} id=${t.id}`);return}if(i==="create"){let o=s[1]?.trim();o||(console.error(" usage: sootsim keys create <label>"),process.exit(1));let{origin:e,token:n}=await a(),r=await fetch(`${e.replace(/\/$/,"")}/api/sootsim/billing/keys`,{method:"POST",headers:{authorization:`Bearer ${n}`,"content-type":"application/json"},body:JSON.stringify({label:o})});r.ok||(console.error(` keys create failed (${r.status}): ${await r.text()}`),process.exit(1));let t=await r.json();console.log(`
|
|
3
3
|
created: ${t.record.label} (${t.record.keyPrefix}\u2026)`),console.log(` scopes: ${t.record.scopes.join(",")}`),console.log(`
|
|
4
4
|
secret: ${t.secret}
|
|
5
5
|
`),console.log(` copy this now \u2014 we can't show it again.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
/*! sootsim v0.1.43 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import"./chunk-HKZEU76U.js";import{b as m}from"./chunk-HFRDF5SI.js";import{a as u}from"./chunk-JA2UNVA3.js";import"./chunk-OTTV2PFN.js";import"./chunk-WWTI3E3U.js";import"./chunk-LTUGPDW5.js";import{D as c,E as r,F as l,y as s,z as a}from"./chunk-PXUQ5FQN.js";import"./chunk-26LJCQNQ.js";import{spawn as p}from"child_process";import{existsSync as h}from"fs";async function I(n){if(n.includes("--help")||n.includes("-h")){console.log(`
|
|
3
3
|
sootsim launch \u2014 one-shot: install runtime if needed, start daemon, open app
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -13,4 +13,4 @@ options:
|
|
|
13
13
|
examples:
|
|
14
14
|
sootsim launch
|
|
15
15
|
sootsim launch --version 1.2.3
|
|
16
|
-
`);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-
|
|
16
|
+
`);return}let e=n.includes("--no-runtime-install"),i=n.indexOf("--channel"),t=i>=0&&n[i+1]?n[i+1]:"stable",o=n.indexOf("--version"),f=o>=0&&n[o+1]?n[o+1]:void 0;s(),await v({skipAutoInstall:e,channel:t,explicitVersion:f}),await d(),await x()}async function v(n){let e=a(),i=c();if(e&&i)return;n.skipAutoInstall&&(console.error(" no sootsim runtime installed. run `sootsim runtime install` first, or drop --no-runtime-install."),process.exit(1)),console.log("sootsim: first run \u2014 installing runtime");let{runRuntime:t}=await import("./runtime-EIEXL23W.js"),o=[];n.explicitVersion&&o.push(n.explicitVersion),n.channel!=="stable"&&o.push("--channel",n.channel),await t(["install",...o],{channel:n.channel})}async function d(){let n=r();if(l(n))return;console.log("sootsim: starting daemon");let e=w();p(e,["server","--quiet"],{detached:!0,stdio:"ignore",env:process.env}).unref();let t=Date.now()+8e3;for(;Date.now()<t;){let o=r();if(l(o))return;await g(150)}console.error(" daemon didn't become ready within 8s \u2014 check ~/.sootsim/ or run `sootsim server` in a terminal to see errors"),process.exit(1)}async function x(){u()||(console.error(" no sootsim desktop companion installed. run `sootsim install-desktop` to download electron + the shell."),process.exit(1));let e=await m.launch({});e.launched||(console.error(` ${e.message}`),process.exit(1)),console.log(` ${e.message}`)}function w(){let n=process.argv[1];return n&&h(n)?n:"sootsim"}function g(n){return new Promise(e=>setTimeout(e,n))}async function R(){s(),await d()}export{R as ensureDaemonRunning,I as runLaunch};
|