sootsim 0.1.82 → 0.1.83

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.
Files changed (138) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-3C6Z6YXA.js → agent-MQ7GLVIB.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-7Z4UFACX.js → agent-wrapper-7KAFDQCN.js} +2 -2
  4. package/dist-cli/chunks/{assert-XYBIZRDK.js → assert-TV46GUNU.js} +2 -2
  5. package/dist-cli/chunks/auto-bootstrap-FQS4ZD2K.js +2 -0
  6. package/dist-cli/chunks/beta-VG7CDY2U.js +2 -0
  7. package/dist-cli/chunks/{chunk-BVXP2GDN.js → chunk-277XAALA.js} +3 -3
  8. package/dist-cli/chunks/{chunk-PYDAVGCZ.js → chunk-2AWQ7OB2.js} +1 -1
  9. package/dist-cli/chunks/chunk-2OIBDYHW.js +1 -0
  10. package/dist-cli/chunks/{chunk-2JQIKL3B.js → chunk-2PY3UZVO.js} +2 -2
  11. package/dist-cli/chunks/{chunk-EJGEDUOC.js → chunk-4LS5MZAI.js} +3 -3
  12. package/dist-cli/chunks/{chunk-GI5MF6LP.js → chunk-572VSFNP.js} +1 -1
  13. package/dist-cli/chunks/{chunk-QPDWMYCA.js → chunk-5DJXZIFZ.js} +1 -1
  14. package/dist-cli/chunks/chunk-6BNLVMXA.js +1 -0
  15. package/dist-cli/chunks/{chunk-EX6IOT23.js → chunk-6NN2D4EJ.js} +2 -2
  16. package/dist-cli/chunks/{chunk-C7JOLDDQ.js → chunk-6TNANCQC.js} +2 -2
  17. package/dist-cli/chunks/chunk-6XD6CBJM.js +2 -0
  18. package/dist-cli/chunks/{chunk-IZ2OO47Y.js → chunk-6XZOEBTZ.js} +2 -2
  19. package/dist-cli/chunks/chunk-CHQTO426.js +1 -0
  20. package/dist-cli/chunks/{chunk-JVNGH5S7.js → chunk-CJY3AVI7.js} +1 -1
  21. package/dist-cli/chunks/{chunk-MQXYJTXM.js → chunk-CYV6Y6YV.js} +2 -2
  22. package/dist-cli/chunks/{chunk-QTJJHBCI.js → chunk-DM6WT7QM.js} +1 -1
  23. package/dist-cli/chunks/{chunk-Z6G5SDG7.js → chunk-DP7O5MHK.js} +2 -2
  24. package/dist-cli/chunks/{chunk-PO64TMRT.js → chunk-ECJBV65H.js} +2 -2
  25. package/dist-cli/chunks/{chunk-H6NBDJIO.js → chunk-F3HP444U.js} +1 -1
  26. package/dist-cli/chunks/{chunk-27HBWBE6.js → chunk-FAPYGVIU.js} +2 -2
  27. package/dist-cli/chunks/{chunk-2EFQQWEC.js → chunk-FJYT7XL2.js} +2 -2
  28. package/dist-cli/chunks/{chunk-BISEHRNE.js → chunk-FRM355UL.js} +2 -2
  29. package/dist-cli/chunks/{chunk-U3XCDQRH.js → chunk-HAWOAQAG.js} +3 -3
  30. package/dist-cli/chunks/{chunk-UOWBKSSI.js → chunk-HNWEELAE.js} +1 -1
  31. package/dist-cli/chunks/{chunk-DSYW2NOW.js → chunk-IBNRRAES.js} +2 -2
  32. package/dist-cli/chunks/{chunk-JUDJXJSE.js → chunk-IP3QJLRH.js} +1 -1
  33. package/dist-cli/chunks/{chunk-4QUAOBUB.js → chunk-J2GYISVJ.js} +2 -2
  34. package/dist-cli/chunks/{chunk-ZN2C7V5R.js → chunk-JHJNODXN.js} +2 -2
  35. package/dist-cli/chunks/{chunk-JUCV3VHM.js → chunk-JQ7ZXOXJ.js} +2 -2
  36. package/dist-cli/chunks/{chunk-7SCQEPXK.js → chunk-KASUZ5XV.js} +1 -1
  37. package/dist-cli/chunks/{chunk-Q4JNA5VO.js → chunk-NXATOWWF.js} +1 -1
  38. package/dist-cli/chunks/{chunk-WZLKUS54.js → chunk-OYMFNU3M.js} +1 -1
  39. package/dist-cli/chunks/{chunk-2W5C5J4O.js → chunk-PEHFE3LG.js} +2 -2
  40. package/dist-cli/chunks/{chunk-DCFGNIJC.js → chunk-PM5NVKLP.js} +2 -2
  41. package/dist-cli/chunks/{chunk-TR7NIFSL.js → chunk-RH4F2TF7.js} +1 -1
  42. package/dist-cli/chunks/chunk-RXH2SLKF.js +2 -0
  43. package/dist-cli/chunks/chunk-UXQWC5ZR.js +79 -0
  44. package/dist-cli/chunks/{chunk-D3SM2JYB.js → chunk-VMXWC2JO.js} +2 -2
  45. package/dist-cli/chunks/{chunk-M3OULYY3.js → chunk-WN7M3QON.js} +2 -2
  46. package/dist-cli/chunks/{chunk-M4ERVRM4.js → chunk-WTKTOL3C.js} +2 -2
  47. package/dist-cli/chunks/{chunk-7YLCK5HG.js → chunk-XFQL74PF.js} +2 -2
  48. package/dist-cli/chunks/chunk-Y2VJBRSP.js +119 -0
  49. package/dist-cli/chunks/{chunk-2XULSYS6.js → chunk-Y4BUVURT.js} +2 -2
  50. package/dist-cli/chunks/{chunk-O3AOQP3V.js → chunk-YUELRHGB.js} +2 -2
  51. package/dist-cli/chunks/cli-version-PWF6I6LY.js +2 -0
  52. package/dist-cli/chunks/{compat-2DVSCCR7.js → compat-QLLWBTS3.js} +3 -3
  53. package/dist-cli/chunks/{config-YDX4Q4XM.js → config-2DSLDCXV.js} +2 -2
  54. package/dist-cli/chunks/{control-EAK2OPGB.js → control-UIOXGYXU.js} +2 -2
  55. package/dist-cli/chunks/{cpu-profile-GU62WVZZ.js → cpu-profile-GEIKHCPC.js} +2 -2
  56. package/dist-cli/chunks/{daemon-V5NLDTSB.js → daemon-4EBUFN4D.js} +2 -2
  57. package/dist-cli/chunks/{debug-HAOCONNB.js → debug-WGD6XWOF.js} +3 -3
  58. package/dist-cli/chunks/demo-app-registry-G3BDOFWC.js +2 -0
  59. package/dist-cli/chunks/{detox-YLC4DLXB.js → detox-LNKGRZU6.js} +2 -2
  60. package/dist-cli/chunks/{device-ZQ4DN4H6.js → device-AYKXKVIQ.js} +2 -2
  61. package/dist-cli/chunks/{diagnose-HNUO3Z5F.js → diagnose-TMXSDOOC.js} +2 -2
  62. package/dist-cli/chunks/drivers-IDQF34HP.js +2 -0
  63. package/dist-cli/chunks/{electron-ZAASAHSW.js → electron-QFPF7TBY.js} +3 -3
  64. package/dist-cli/chunks/flow-3JN3Y7RF.js +2 -0
  65. package/dist-cli/chunks/{hints-BA3GE5W5.js → hints-MXKRR4TG.js} +2 -2
  66. package/dist-cli/chunks/{home-paths-MQXRHBTW.js → home-paths-REMWQDAO.js} +2 -2
  67. package/dist-cli/chunks/{inspect-T4RMS5KX.js → inspect-XGSQNFV7.js} +3 -3
  68. package/dist-cli/chunks/install-2N3YOOSN.js +2 -0
  69. package/dist-cli/chunks/{install-desktop-MH26VONS.js → install-desktop-NQG3RZSA.js} +3 -3
  70. package/dist-cli/chunks/{keys-IELIDRGB.js → keys-5QZWXL3F.js} +2 -2
  71. package/dist-cli/chunks/{launch-VMT3OWOB.js → launch-SBXOZWKO.js} +3 -3
  72. package/dist-cli/chunks/{login-VZBANVLU.js → login-EACQXE24.js} +4 -4
  73. package/dist-cli/chunks/{logout-GWXBTQ4H.js → logout-IBQLMUML.js} +2 -2
  74. package/dist-cli/chunks/{maestro-JYHR4HFR.js → maestro-LFYXUX7O.js} +2 -2
  75. package/dist-cli/chunks/{preview-RPZ4UQ2B.js → preview-U4SBOEGQ.js} +2 -2
  76. package/dist-cli/chunks/{profile-7FLDF2AP.js → profile-GWS5ECMY.js} +2 -2
  77. package/dist-cli/chunks/{react-3RC4CNDZ.js → react-QDHLMVYL.js} +2 -2
  78. package/dist-cli/chunks/record-BUEUWPDI.js +70 -0
  79. package/dist-cli/chunks/runtime-PVB4VGUH.js +2 -0
  80. package/dist-cli/chunks/{runtime-delivery-Z7I2KIRB.js → runtime-delivery-G7L6RVZ7.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-GRCZ6AM4.js → screenshot-T2HBA3VI.js} +2 -2
  82. package/dist-cli/chunks/{screenshot-mode-E4YHXHH5.js → screenshot-mode-EG5HMIH3.js} +2 -2
  83. package/dist-cli/chunks/{screenshots-7SXMX2AY.js → screenshots-S52AFHTV.js} +2 -2
  84. package/dist-cli/chunks/{server-GDJ2TCRV.js → server-MFFVYUGG.js} +2 -2
  85. package/dist-cli/chunks/setup-repo-YOF7NV5D.js +2 -0
  86. package/dist-cli/chunks/{skills-62E7NDRC.js → skills-HQGWBS2O.js} +2 -2
  87. package/dist-cli/chunks/{start-Y7KR5ZQ3.js → start-E3DRYY7W.js} +4 -4
  88. package/dist-cli/chunks/store-MAI6D3UO.js +2 -0
  89. package/dist-cli/chunks/telemetry-RCQKCJTH.js +2 -0
  90. package/dist-cli/chunks/{test-IYMSUPVC.js → test-ZY3EF62K.js} +3 -3
  91. package/dist-cli/chunks/{three-mode-QKKXCCC2.js → three-mode-WSPKQCJ5.js} +2 -2
  92. package/dist-cli/chunks/{timeline-PF6NQ7RT.js → timeline-3XAB5EWZ.js} +2 -2
  93. package/dist-cli/chunks/{upgrade-CE2Y3TAN.js → upgrade-WNENPFM5.js} +2 -2
  94. package/dist-cli/chunks/upload-YLJ4RA73.js +2 -0
  95. package/dist-cli/chunks/{web-XEO3ZCPF.js → web-D2AOZY44.js} +2 -2
  96. package/dist-cli/chunks/{what-happened-372J7YF7.js → what-happened-F43KNSG6.js} +2 -2
  97. package/dist-cli/chunks/{whoami-B4E7KCT5.js → whoami-T22VBR7C.js} +2 -2
  98. package/dist-lib/agent-daemon-client.cjs +1 -1
  99. package/dist-lib/agent-events.cjs +1 -1
  100. package/dist-lib/agent-sessions.cjs +1 -1
  101. package/dist-lib/attached-projects.cjs +1 -1
  102. package/dist-lib/auth/shared-session.cjs +1 -1
  103. package/dist-lib/backend-origin.cjs +1 -1
  104. package/dist-lib/bridge-constants.cjs +1 -1
  105. package/dist-lib/cli-constants.cjs +1 -1
  106. package/dist-lib/config.cjs +1 -1
  107. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  108. package/dist-lib/home-paths.cjs +1 -1
  109. package/dist-lib/host/bridge-host.cjs +1 -1
  110. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  111. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  112. package/dist-lib/index.cjs +1 -1
  113. package/dist-lib/metro.cjs +1 -1
  114. package/dist-lib/profiles.cjs +1 -1
  115. package/dist-lib/render-mode.cjs +1 -1
  116. package/dist-lib/vite-base.cjs +1 -1
  117. package/dist-lib/vite.cjs +1 -1
  118. package/package.json +1 -1
  119. package/dist-cli/chunks/auto-bootstrap-D2EQVL7R.js +0 -2
  120. package/dist-cli/chunks/beta-VHPXECZY.js +0 -2
  121. package/dist-cli/chunks/chunk-3OH4VCJA.js +0 -1
  122. package/dist-cli/chunks/chunk-45HLFQRI.js +0 -2
  123. package/dist-cli/chunks/chunk-BRDUKIZI.js +0 -119
  124. package/dist-cli/chunks/chunk-GADW2Q5S.js +0 -1
  125. package/dist-cli/chunks/chunk-HST43CVE.js +0 -2
  126. package/dist-cli/chunks/chunk-QJBQOGTK.js +0 -73
  127. package/dist-cli/chunks/chunk-V26REV7G.js +0 -1
  128. package/dist-cli/chunks/cli-version-WF7T6IKI.js +0 -2
  129. package/dist-cli/chunks/demo-app-registry-52A2MI72.js +0 -2
  130. package/dist-cli/chunks/drivers-B4QPIZ4B.js +0 -2
  131. package/dist-cli/chunks/flow-PFLHFNVM.js +0 -2
  132. package/dist-cli/chunks/install-ZCPEMK6U.js +0 -2
  133. package/dist-cli/chunks/record-CZ33G5FT.js +0 -70
  134. package/dist-cli/chunks/runtime-AZKHZHJ4.js +0 -2
  135. package/dist-cli/chunks/setup-repo-3Y2QAZRK.js +0 -2
  136. package/dist-cli/chunks/store-TDTFZMGA.js +0 -2
  137. package/dist-cli/chunks/telemetry-G3NIU5NP.js +0 -2
  138. package/dist-cli/chunks/upload-CLWFS7IL.js +0 -2
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.82 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var c={"--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"}},g=new Set(["list","describe","find","get","do","wait","network","logs","shell"]),p=new Set(["do","get","wait","shell","debug"]),b={tap:"sootsim do tap","double-tap":"sootsim do double-tap","tap-text":"sootsim do tap-text","tap-id":"sootsim do tap-id",type:"sootsim do type","type-into":"sootsim do type-into",key:"sootsim do key",dispatch:"sootsim do dispatch",dismiss:"sootsim do dismiss",scroll:"sootsim do scroll",drag:"sootsim do drag",swipe:"sootsim do swipe",pinch:"sootsim do pinch",reload:"sootsim do reload",sleep:"sootsim do sleep",settle:"sootsim do settle",tree:"sootsim get tree",a11y:"sootsim get a11y",count:"sootsim get count",layout:"sootsim get layout",url:"sootsim get url",globals:"sootsim get globals",errors:"sootsim get errors",warnings:"sootsim get warnings",requests:"sootsim get requests",node:"sootsim get node",state:"sootsim debug state",js:"sootsim debug js",eval:"sootsim debug eval",perf:"sootsim debug perf","sample-color":"sootsim debug sample-color","find-id":"sootsim find --testid",query:"sootsim find --text|--role|--type|--pressable|--visible",capture:"sootsim screenshot"},u=new Set(["preview","test","detox","maestro","flow","record","profile","cpu-profile","react","screenshot","screenshots","screenshot-mode","three-mode","3d-mode","inspect","debug","timeline","what-happened","diagnose","shell","assert","device","open","list","use","focus","claim","close","config","compat","scan","electron","login","logout","whoami","install","setup-repo","install-desktop","server","daemon","runtime","upgrade","launch","start","skills","upload","keys","hints","agent-wrapper","agent",...g,...Object.keys(b)]);function h(m){let i=m.slice(2),e={command:null,commandArgs:[],globalFlags:{},help:!1,version:!1,verbose:!1},s=0;for(;s<i.length;){let o=i[s];if(o==="--"){e.commandArgs.push(...i.slice(s+1));break}let a=Object.entries(c).find(([n,t])=>n===o||t.short===o);if(a){let[n,t]=a,l=n.replace(/^--/,"");if(t.type==="boolean")e.globalFlags[l]=!0,s++;else{let r=i[s+1];if(r===void 0||r.startsWith("-")){console.error(` warning: ${o} requires a value`),s++;continue}if(t.type==="number"){let d=Number(r);if(Number.isNaN(d)){console.error(` warning: ${o} requires a number, got "${r}"`),s+=2;continue}e.globalFlags[l]=d}else e.globalFlags[l]=r;s+=2}continue}if(!e.command&&!o.startsWith("-")){let n=o.indexOf("-");if(n>0){let t=o.slice(0,n),l=o.slice(n+1);if(p.has(t)&&l.length>0){e.command=t;let r=i.slice(s+1);e.commandArgs=[l,...r[0]==="--"?r.slice(1):r];break}}if(u.has(o)){e.command=o;let t=i.slice(s+1);e.commandArgs=t[0]==="--"?t.slice(1):t;break}e.commandArgs=i.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{g as a,b,h as c};
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.82 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as P,b as v}from"./chunk-H6NBDJIO.js";import{d as j}from"./chunk-EJGEDUOC.js";import{a as b}from"./chunk-D3SM2JYB.js";import{execSync as A}from"child_process";import{existsSync as w,readFileSync as _,writeFileSync as x}from"fs";import{relative as B,resolve as d}from"path";import{existsSync as p,readFileSync as k,readdirSync as O,statSync as R}from"fs";import{basename as L,dirname as T,join as a}from"path";function D(e){let o=e;for(;;){if(p(a(o,"turbo.json"))||p(a(o,"nx.json"))||p(a(o,"lerna.json"))||p(a(o,"pnpm-workspace.yaml")))return o;let i=a(o,"package.json");if(p(i))try{if(JSON.parse(k(i,"utf8")).workspaces)return o}catch{}let r=T(o);if(r===o)break;o=r}return e}function W(e){return p(a(e,"bun.lock"))||p(a(e,"bun.lockb"))?"bun":p(a(e,"pnpm-lock.yaml"))?"pnpm":p(a(e,"yarn.lock"))?"yarn":"npm"}function J(e){if(p(a(e,"turbo.json")))return"turbo";if(p(a(e,"nx.json")))return"nx";if(p(a(e,"pnpm-workspace.yaml")))return"pnpm";let o=a(e,"package.json");if(p(o))try{if(JSON.parse(k(o,"utf8")).workspaces)return"npm-workspaces"}catch{}return"single"}function N(e){return e.one?"one":e.expo?"expo":e["react-native"]?"bare":"unknown"}function y(e){let o=a(e,"package.json");if(!p(o))return null;let i;try{i=JSON.parse(k(o,"utf8"))}catch{return null}let r={...i.dependencies,...i.devDependencies},s=N(r);return s==="unknown"?null:{dir:e,name:i.name||L(e),framework:s,hasViteConfig:p(a(e,"vite.config.ts"))||p(a(e,"vite.config.js")),hasMetroConfig:p(a(e,"metro.config.js"))||p(a(e,"metro.config.ts")),hasSootsimDependency:!!r.sootsim,devCommand:i.scripts?.dev||null}}function V(e){let o=[],i=a(e,"pnpm-workspace.yaml");if(p(i)){let t=k(i,"utf8").match(/packages:\s*\n((?:\s+-\s+.+\n?)+)/);if(t){let c=t[1].split(`
1
+ /*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as P,b as v}from"./chunk-F3HP444U.js";import{d as j}from"./chunk-4LS5MZAI.js";import{a as b}from"./chunk-VMXWC2JO.js";import{execSync as A}from"child_process";import{existsSync as w,readFileSync as _,writeFileSync as x}from"fs";import{relative as B,resolve as d}from"path";import{existsSync as p,readFileSync as k,readdirSync as O,statSync as R}from"fs";import{basename as L,dirname as T,join as a}from"path";function D(e){let o=e;for(;;){if(p(a(o,"turbo.json"))||p(a(o,"nx.json"))||p(a(o,"lerna.json"))||p(a(o,"pnpm-workspace.yaml")))return o;let i=a(o,"package.json");if(p(i))try{if(JSON.parse(k(i,"utf8")).workspaces)return o}catch{}let r=T(o);if(r===o)break;o=r}return e}function W(e){return p(a(e,"bun.lock"))||p(a(e,"bun.lockb"))?"bun":p(a(e,"pnpm-lock.yaml"))?"pnpm":p(a(e,"yarn.lock"))?"yarn":"npm"}function J(e){if(p(a(e,"turbo.json")))return"turbo";if(p(a(e,"nx.json")))return"nx";if(p(a(e,"pnpm-workspace.yaml")))return"pnpm";let o=a(e,"package.json");if(p(o))try{if(JSON.parse(k(o,"utf8")).workspaces)return"npm-workspaces"}catch{}return"single"}function N(e){return e.one?"one":e.expo?"expo":e["react-native"]?"bare":"unknown"}function y(e){let o=a(e,"package.json");if(!p(o))return null;let i;try{i=JSON.parse(k(o,"utf8"))}catch{return null}let r={...i.dependencies,...i.devDependencies},s=N(r);return s==="unknown"?null:{dir:e,name:i.name||L(e),framework:s,hasViteConfig:p(a(e,"vite.config.ts"))||p(a(e,"vite.config.js")),hasMetroConfig:p(a(e,"metro.config.js"))||p(a(e,"metro.config.ts")),hasSootsimDependency:!!r.sootsim,devCommand:i.scripts?.dev||null}}function V(e){let o=[],i=a(e,"pnpm-workspace.yaml");if(p(i)){let t=k(i,"utf8").match(/packages:\s*\n((?:\s+-\s+.+\n?)+)/);if(t){let c=t[1].split(`
3
3
  `).filter(Boolean);for(let n of c){let g=n.replace(/^\s*-\s*['"]?/,"").replace(/['"]?\s*$/,"");g&&o.push(...S(e,g))}}return o}let r=a(e,"package.json");if(p(r))try{let s=JSON.parse(k(r,"utf8")),t=Array.isArray(s.workspaces)?s.workspaces:s.workspaces?.packages||[];for(let c of t)o.push(...S(e,c))}catch{}return o}function S(e,o){let i=o.replace(/\/\*\*?$/,"").replace(/\*$/,""),r=a(e,i);if(!p(r))return[];try{return O(r).map(t=>a(r,t)).filter(t=>{try{return R(t).isDirectory()&&p(a(t,"package.json"))}catch{return!1}})}catch{return[]}}function M(e){let o=J(e),i=W(e);if(o==="single"){let c=y(e);return{root:e,type:o,packageManager:i,apps:c?[c]:[]}}let r=V(e),s=[],t=y(e);t&&s.push(t);for(let c of r){if(c===e)continue;let n=y(c);n&&s.push(n)}return{root:e,type:o,packageManager:i,apps:s}}function $(e){switch(e){case"bun":return"bun add -d sootsim";case"pnpm":return"pnpm add -D sootsim";case"yarn":return"yarn add -D sootsim";case"npm":return"npm install -D sootsim"}}async function ce(e){(e.includes("--help")||e.includes("-h"))&&(console.log(`
4
4
  sootsim setup-repo \u2014 set up sootsim in your project
5
5
 
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.82 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as _,b as z,c as le,d as ce}from"./chunk-7YLCK5HG.js";import{l as O}from"./chunk-DSYW2NOW.js";import{j as se,k as ie,m as ae}from"./chunk-TR7NIFSL.js";import{g as W}from"./chunk-MQXYJTXM.js";import{a as C,b as j}from"./chunk-EX6IOT23.js";import{c as de}from"./chunk-2EFQQWEC.js";import{d as ne}from"./chunk-QPDWMYCA.js";import{a as ee}from"./chunk-HST43CVE.js";import{b as re,c as I,d as S,e as x}from"./chunk-O3AOQP3V.js";import{c as k,d as w,e as P}from"./chunk-UOWBKSSI.js";import{E as te,F as oe}from"./chunk-PYDAVGCZ.js";import ve from"node:fs";import Re from"node:os";import G from"node:path";function Pe(t){return t.replace(/^\[|\]$/g,"").toLowerCase()}function q(t){let o=Pe(t);return o==="localhost"||o.endsWith(".localhost")||o==="0.0.0.0"||o==="::1"||/^127(?:\.\d{1,3}){3}$/.test(o)}function me(t){return new Error(`could not resolve a native bundle for ${t}. pass an explicit bundle URL or open Connect and choose the app there.`)}function Ce(t,o){return t?.includes("/one/metro-entry.bundle")?"one":typeof o=="string"&&o?"expo":"unknown"}function fe(t,o,e){return`${t}//${o}:${e}`}function Be(t){if(typeof window>"u")return!1;try{let o=new URL(t);return q(o.hostname)&&q(window.location.hostname)&&o.origin!==window.location.origin}catch{return!1}}async function ue(t,o){let e={...o,cache:o?.cache??"no-store"};return Be(t)?fetch(`/__fetch-proxy?url=${encodeURIComponent(t)}`,e):fetch(t,e)}function Te(t){return t==="https:"?443:80}function Me(t){let o=t.pathname||"/";return(o==="/"||o==="")&&!t.search&&!t.hash}async function ge(t,o){let e=t.replace(/\/+$/,"");try{let n=await ue(`${e}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),s=r?.extra?.expoClient||r?.extra||{},a=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(a||s.name)return{bundleUrl:le(a||`${e}${z}`),port:o,framework:Ce(a,s.sdkVersion),projectName:s.name}}}catch{}try{let n=await ue(`${e}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${e}${z}`,port:o,framework:"metro"}}catch{}return null}async function pe(t){return ge(fe("http:","localhost",t),t)}async function he(t){let o=t.trim();if(/^\d+$/.test(o)){let i=parseInt(o,10),l=await pe(i);if(l)return l;let c=3;for(let d=1;d<=c;d++){let m=await pe(i+d);if(m)return m}throw me(`localhost:${i} (also scanned +1..+${c})`)}let e=o.startsWith("http")?o:`http://${o}`,n;try{n=new URL(e)}catch{throw new Error(`could not parse "${t}". pass a dev-server port, a dev-server base URL, or a full bundle URL.`)}let r=n.protocol||"http:",s=n.port?parseInt(n.port,10):Te(r),a=fe(r,n.hostname,s);if(Me(n)){let i=await ge(a,s);if(i)return i;throw me(a)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function nt(){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 we(t){let o=C();if(console.log(` note: no sootsim bridge detected on port ${t}`),o){console.log(" launch the installed companion with:"),console.log(" sootsim electron");return}console.log(""),console.log(" to get a bridge running, either:"),console.log(" sootsim install-desktop # download the electron app"),console.log(" sootsim setup-repo # wire sootsim into your own project")}function Ue(t){console.error(""),console.error(` no sim is connected to the sootsim bridge on port ${t}.`),console.error(""),console.error(" start your app dev server, then open it in sootsim:"),console.error(" npx expo start --localhost --port 8081"),console.error(" sootsim open 8081"),console.error(""),console.error(" then inspect the live app:"),console.error(" sootsim describe")}async function rt(t,o,e){let n=[];try{n=await t.listSims()}catch{}if(console.error(""),n.length===0){Ue(o);return}console.error(` no sim with id "${e}" is connected to the bridge on port ${o}.`),console.error(""),console.error(" connected sims:");for(let r of n){let 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 Ee={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 v(t){return new Promise(o=>setTimeout(o,t))}function A(t){return t.trim()}function J(t){try{let o=new URL(t),e=o.pathname.replace(/\/+$/,"")||"/";return o.searchParams.has("open")||o.searchParams.has("port")||o.searchParams.has("bundle")||o.searchParams.has("demo")||o.pathname.includes("/sootsim/index.html")||e==="/sootsim"||o.pathname==="/__soot"||o.pathname==="/__soot/"||e==="/rn"||/^\/rn\/[^/]+$/i.test(e)||/^\/app\/[^/]+$/i.test(e)||e==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(e)||/^\/__soot\/app\/[^/]+$/i.test(e)}catch{return!1}}async function It(t){let o=A(t);return(await $e(o)).bundleUrl}function Oe(t){try{let o=new URL(t.startsWith("http")?t:`http://${t}`),e=o.pathname||"/";if(e!=="/"&&e!==""||o.search||o.hash||!/^(localhost|127\.0\.0\.1|\[::1\]|::1)$/i.test(o.hostname))return null;let n=o.port?Number(o.port):o.protocol==="https:"?443:80;return Number.isFinite(n)&&n>0?n:null}catch{return null}}async function $e(t){let o=A(t),e=/^\d+$/.test(o)?Number(o):Oe(o);if(e&&e>0){let n=await ce(e);if(n)return{bundleUrl:n.bundleUrl,port:n.port,framework:n.framework,projectName:n.projectName}}return he(o)}function Q(t){let o=t.replace(/\/+$/,"")||"/";return o==="/__soot"||o.startsWith("/__soot/")?"/__soot":""}function _e(t,o){let e=A(t),n=new URL(o),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(e)?n.pathname=`${r}/rn/${e}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",e)),n.toString()}function Le(t){let o=A(t);return/^\d+$/.test(o)||/^https?:\/\//i.test(o)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(o)}async function De(t,o){let e=await $e(t),n=new URL(o),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",e.bundleUrl),n.toString()}function Ae(t){return t.startsWith("~/")?G.join(Re.homedir(),t.slice(2)):G.isAbsolute(t)?t:G.resolve(process.cwd(),t)}function Ne(t){let o={};for(let e=0;e<t.length;e++){if(t[e]!=="--replace")continue;let n=t[e+1];n||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let r=n.indexOf("=");(r<=0||r===n.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let s=n.slice(0,r).trim(),a=Ae(n.slice(r+1).trim());ve.existsSync(a)||(console.error(` sootsim open: replacement file not found: ${a}`),process.exit(1)),o[s]={file:a},e++}return Object.keys(o).length>0?{modules:o}:void 0}function Ie(){let t=te();return oe(t)&&t.runtimePort>0?`http://localhost:${t.runtimePort}/`:ee}async function D(t,o=Ie()){if(!t)return new URL(o).toString();if(J(t))return new URL(t).toString();let e=Ee[t.toLowerCase()];if(e){let n=new URL(o),r=Q(n.pathname);return n.pathname=`${r}${e}`,n.toString()}return Le(t)?De(t,o):_e(t,o)}function be(t,o){let e=t?.url||t?.origin||o;try{let n=new URL(e);return n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("inspectOpen"),n.toString()}catch{return o}}async function Fe(t,o,e){let n=new URL(await D(t,o));return n.searchParams.set("inspectOpen",e),n.toString()}async function He(t,o,e,n={}){let r=n.attempts??30,s=n.intervalMs??500,a=n.minNodeCount??10;for(let i=0;i<r;i++){let l=S(t,{commandTimeoutMs:o,simId:e,simIdSource:"flag"});try{let c=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>a)return{bridge:l,count:c}}catch{}l.close(),await v(s)}return null}function Ke(t){if(!t)return null;try{let o=new URL(t);if(o.searchParams.has("bundle")){let e=o.searchParams.get("bundle")||"";try{let n=new URL(e),r=n.pathname.length>36?`...${n.pathname.slice(-36)}`:n.pathname;return`bundle ${n.host}${r}`}catch{return"bundle"}}return o.searchParams.has("port")?`connect :${o.searchParams.get("port")||""}`:o.searchParams.has("open")?`connect ${o.searchParams.get("open")||""}`:o.searchParams.has("demo")?`demo ${o.searchParams.get("demo")||"default"}`:o.pathname.includes("/sootsim/index.html")||o.pathname==="/sootsim/"||o.pathname==="/sootsim"?"embedded sootsim":null}catch{return null}}function ze(t,o){if(t.length===0){console.log(" no sims connected");return}console.log(` connected sims (${t.length}):
1
+ /*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as _,b as z,c as le,d as ce}from"./chunk-XFQL74PF.js";import{l as O}from"./chunk-IBNRRAES.js";import{j as se,k as ie,m as ae}from"./chunk-RH4F2TF7.js";import{g as W}from"./chunk-CYV6Y6YV.js";import{a as C,b as j}from"./chunk-6NN2D4EJ.js";import{c as de}from"./chunk-FJYT7XL2.js";import{d as ne}from"./chunk-5DJXZIFZ.js";import{a as ee}from"./chunk-RXH2SLKF.js";import{b as re,c as I,d as S,e as x}from"./chunk-YUELRHGB.js";import{c as k,d as w,e as P}from"./chunk-HNWEELAE.js";import{E as te,F as oe}from"./chunk-2AWQ7OB2.js";import ve from"node:fs";import Re from"node:os";import G from"node:path";function Pe(t){return t.replace(/^\[|\]$/g,"").toLowerCase()}function q(t){let o=Pe(t);return o==="localhost"||o.endsWith(".localhost")||o==="0.0.0.0"||o==="::1"||/^127(?:\.\d{1,3}){3}$/.test(o)}function me(t){return new Error(`could not resolve a native bundle for ${t}. pass an explicit bundle URL or open Connect and choose the app there.`)}function Ce(t,o){return t?.includes("/one/metro-entry.bundle")?"one":typeof o=="string"&&o?"expo":"unknown"}function fe(t,o,e){return`${t}//${o}:${e}`}function Be(t){if(typeof window>"u")return!1;try{let o=new URL(t);return q(o.hostname)&&q(window.location.hostname)&&o.origin!==window.location.origin}catch{return!1}}async function ue(t,o){let e={...o,cache:o?.cache??"no-store"};return Be(t)?fetch(`/__fetch-proxy?url=${encodeURIComponent(t)}`,e):fetch(t,e)}function Te(t){return t==="https:"?443:80}function Me(t){let o=t.pathname||"/";return(o==="/"||o==="")&&!t.search&&!t.hash}async function ge(t,o){let e=t.replace(/\/+$/,"");try{let n=await ue(`${e}/`,{headers:{"expo-platform":"ios"}});if(n.ok){let r=await n.json(),s=r?.extra?.expoClient||r?.extra||{},a=typeof r?.launchAsset?.url=="string"?r.launchAsset.url:void 0;if(a||s.name)return{bundleUrl:le(a||`${e}${z}`),port:o,framework:Ce(a,s.sdkVersion),projectName:s.name}}}catch{}try{let n=await ue(`${e}/status`);if(n.ok&&(await n.text()).includes("packager-status:running"))return{bundleUrl:`${e}${z}`,port:o,framework:"metro"}}catch{}return null}async function pe(t){return ge(fe("http:","localhost",t),t)}async function he(t){let o=t.trim();if(/^\d+$/.test(o)){let i=parseInt(o,10),l=await pe(i);if(l)return l;let c=3;for(let d=1;d<=c;d++){let m=await pe(i+d);if(m)return m}throw me(`localhost:${i} (also scanned +1..+${c})`)}let e=o.startsWith("http")?o:`http://${o}`,n;try{n=new URL(e)}catch{throw new Error(`could not parse "${t}". pass a dev-server port, a dev-server base URL, or a full bundle URL.`)}let r=n.protocol||"http:",s=n.port?parseInt(n.port,10):Te(r),a=fe(r,n.hostname,s);if(Me(n)){let i=await ge(a,s);if(i)return i;throw me(a)}return{bundleUrl:n.toString(),port:s,framework:"unknown"}}function nt(){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 we(t){let o=C();if(console.log(` note: no sootsim bridge detected on port ${t}`),o){console.log(" launch the installed companion with:"),console.log(" sootsim electron");return}console.log(""),console.log(" to get a bridge running, either:"),console.log(" sootsim install-desktop # download the electron app"),console.log(" sootsim setup-repo # wire sootsim into your own project")}function Ue(t){console.error(""),console.error(` no sim is connected to the sootsim bridge on port ${t}.`),console.error(""),console.error(" start your app dev server, then open it in sootsim:"),console.error(" npx expo start --localhost --port 8081"),console.error(" sootsim open 8081"),console.error(""),console.error(" then inspect the live app:"),console.error(" sootsim describe")}async function rt(t,o,e){let n=[];try{n=await t.listSims()}catch{}if(console.error(""),n.length===0){Ue(o);return}console.error(` no sim with id "${e}" is connected to the bridge on port ${o}.`),console.error(""),console.error(" connected sims:");for(let r of n){let 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 Ee={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 v(t){return new Promise(o=>setTimeout(o,t))}function A(t){return t.trim()}function J(t){try{let o=new URL(t),e=o.pathname.replace(/\/+$/,"")||"/";return o.searchParams.has("open")||o.searchParams.has("port")||o.searchParams.has("bundle")||o.searchParams.has("demo")||o.pathname.includes("/sootsim/index.html")||e==="/sootsim"||o.pathname==="/__soot"||o.pathname==="/__soot/"||e==="/rn"||/^\/rn\/[^/]+$/i.test(e)||/^\/app\/[^/]+$/i.test(e)||e==="/__soot/rn"||/^\/__soot\/rn\/[^/]+$/i.test(e)||/^\/__soot\/app\/[^/]+$/i.test(e)}catch{return!1}}async function It(t){let o=A(t);return(await $e(o)).bundleUrl}function Oe(t){try{let o=new URL(t.startsWith("http")?t:`http://${t}`),e=o.pathname||"/";if(e!=="/"&&e!==""||o.search||o.hash||!/^(localhost|127\.0\.0\.1|\[::1\]|::1)$/i.test(o.hostname))return null;let n=o.port?Number(o.port):o.protocol==="https:"?443:80;return Number.isFinite(n)&&n>0?n:null}catch{return null}}async function $e(t){let o=A(t),e=/^\d+$/.test(o)?Number(o):Oe(o);if(e&&e>0){let n=await ce(e);if(n)return{bundleUrl:n.bundleUrl,port:n.port,framework:n.framework,projectName:n.projectName}}return he(o)}function Q(t){let o=t.replace(/\/+$/,"")||"/";return o==="/__soot"||o.startsWith("/__soot/")?"/__soot":""}function _e(t,o){let e=A(t),n=new URL(o),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(e)?n.pathname=`${r}/rn/${e}`:(n.pathname=`${r}/rn`,n.searchParams.set("open",e)),n.toString()}function Le(t){let o=A(t);return/^\d+$/.test(o)||/^https?:\/\//i.test(o)?!0:/^(localhost|127\.0\.0\.1|\[::1\]|[^/]+\.localhost):\d+(?:\/.*)?$/i.test(o)}async function De(t,o){let e=await $e(t),n=new URL(o),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",e.bundleUrl),n.toString()}function Ae(t){return t.startsWith("~/")?G.join(Re.homedir(),t.slice(2)):G.isAbsolute(t)?t:G.resolve(process.cwd(),t)}function Ne(t){let o={};for(let e=0;e<t.length;e++){if(t[e]!=="--replace")continue;let n=t[e+1];n||(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let r=n.indexOf("=");(r<=0||r===n.length-1)&&(console.error(" sootsim open: --replace expects <module>=<file>"),process.exit(1));let s=n.slice(0,r).trim(),a=Ae(n.slice(r+1).trim());ve.existsSync(a)||(console.error(` sootsim open: replacement file not found: ${a}`),process.exit(1)),o[s]={file:a},e++}return Object.keys(o).length>0?{modules:o}:void 0}function Ie(){let t=te();return oe(t)&&t.runtimePort>0?`http://localhost:${t.runtimePort}/`:ee}async function D(t,o=Ie()){if(!t)return new URL(o).toString();if(J(t))return new URL(t).toString();let e=Ee[t.toLowerCase()];if(e){let n=new URL(o),r=Q(n.pathname);return n.pathname=`${r}${e}`,n.toString()}return Le(t)?De(t,o):_e(t,o)}function be(t,o){let e=t?.url||t?.origin||o;try{let n=new URL(e);return n.searchParams.delete("bundle"),n.searchParams.delete("demo"),n.searchParams.delete("app"),n.searchParams.delete("open"),n.searchParams.delete("port"),n.searchParams.delete("inspectOpen"),n.toString()}catch{return o}}async function Fe(t,o,e){let n=new URL(await D(t,o));return n.searchParams.set("inspectOpen",e),n.toString()}async function He(t,o,e,n={}){let r=n.attempts??30,s=n.intervalMs??500,a=n.minNodeCount??10;for(let i=0;i<r;i++){let l=S(t,{commandTimeoutMs:o,simId:e,simIdSource:"flag"});try{let c=await l.send({type:"evaluate",code:"(async () => (await window.__sootsimTest?.getNodeCount()) || 0)()"});if(typeof c=="number"&&c>a)return{bridge:l,count:c}}catch{}l.close(),await v(s)}return null}function Ke(t){if(!t)return null;try{let o=new URL(t);if(o.searchParams.has("bundle")){let e=o.searchParams.get("bundle")||"";try{let n=new URL(e),r=n.pathname.length>36?`...${n.pathname.slice(-36)}`:n.pathname;return`bundle ${n.host}${r}`}catch{return"bundle"}}return o.searchParams.has("port")?`connect :${o.searchParams.get("port")||""}`:o.searchParams.has("open")?`connect ${o.searchParams.get("open")||""}`:o.searchParams.has("demo")?`demo ${o.searchParams.get("demo")||"default"}`:o.pathname.includes("/sootsim/index.html")||o.pathname==="/sootsim/"||o.pathname==="/sootsim"?"embedded sootsim":null}catch{return null}}function ze(t,o){if(t.length===0){console.log(" no sims connected");return}console.log(` connected sims (${t.length}):
3
3
  `);for(let e of t){let n=e.lockedBy&&e.lockExpiresAt?`locked by ${e.lockedBy} (${Math.max(0,Math.round((e.lockExpiresAt-Date.now())/1e3))}s)`:"",r=[e.isPrimary?"primary":"",e.id===o?"selected":"",e.readyState,e.userVisible===!1?"hidden":e.userVisible===!0?"visible":"",e.attachedCliCount&&e.attachedCliCount>0?"in use":"",e.userFocused?"focused":"",n].filter(Boolean);console.log(` ${e.id}${r.length?` [${r.join(", ")}]`:""}`);let s=Ke(e.url);if(s)console.log(` loaded: ${s}`);else if(e.url){let a=e.url.length>96?`${e.url.slice(0,93)}\u2026`:e.url;console.log(` url: ${a}`)}else e.origin&&console.log(` origin: ${e.origin}`);e.title&&console.log(` title: ${e.title}`),e.visibilityState&&e.visibilityState!=="visible"&&console.log(` visibility: ${e.visibilityState}`),console.log(` connected: ${ye(Date.now()-e.connectedAt)}`),e.lastActiveAt&&e.lastActiveAt>0&&console.log(` last active: ${ye(Date.now()-e.lastActiveAt)}`)}}function ye(t){let o=Math.max(0,Math.round(t/1e3));return o<60?`${o}s ago`:o<3600?`${Math.round(o/60)}m ago`:o<86400?`${Math.round(o/3600)}h ago`:`${Math.round(o/86400)}d ago`}async function L(t,o,e,n={}){let r=n.attempts??30,s=n.intervalMs??500;for(let a=0;a<r;a++){let i=S(t,{commandTimeoutMs:o});try{let c=(await i.listSims()).find(e);if(c)return c}catch{}finally{i.close()}await v(s)}return null}async function je(t,o,e,n={}){let r=n.attempts??20,s=n.intervalMs??250;for(let a=0;a<r;a++){let i=S(t,{commandTimeoutMs:o});try{let c=(await i.listSims()).find(d=>d.id===e);if(!c||c.readyState!=="open")return!0}catch{return!0}finally{i.close()}await v(s)}return!1}function We(t){let o=t.meta;if(!o||o.sootsimHostDriver!=="playwright")return null;let e=Number(o.sootsimHostPid);return!Number.isInteger(e)||e<=1||e===process.pid?null:e}function qe(t){if(!t.connectAckFile)return!1;try{return ve.writeFileSync(t.connectAckFile,`${JSON.stringify({connectedAt:Date.now(),pid:t.pid??null})}
4
4
  `,{flag:"w"}),!0}catch{return!1}}function Se(t){try{return process.kill(t,0),!0}catch(o){return o?.code==="EPERM"}}async function Ge(t,o=2500){let e=Date.now()+o;for(;Date.now()<e;){if(!Se(t))return!0;await v(100)}return!Se(t)}async function V(t,o){let e=new Set(o),n=new Set;for(let r of t){if(!e.has(r.id))continue;let s=We(r);s&&n.add(s)}for(let r of n){try{process.kill(r,"SIGTERM")}catch{}if(await Ge(r)){console.log(` closed playwright host process ${r}`);continue}try{process.kill(r,"SIGKILL"),console.log(` force-closed playwright host process ${r}`)}catch{}}}function N(t,o){if(o){let r=o.trim(),s=t.find(a=>a.id===r);if(!s)throw new Error(`no sim connected with id ${r}`);return s}let e=t.find(r=>r.isPrimary&&r.readyState==="open");if(e)return e;let n=t.find(r=>r.readyState==="open");if(n)return n;throw new Error("no sim connected")}function B(t,o,e){console.log(` ${e==="current sim"?"loaded":"opened"}: ${t} [${e}]`),console.log(` current sim: ${o.id}`),console.log(JSON.stringify({simId:o.id,url:o.url},null,2))}async function T(t,o,e){if(e.includes("--no-describe"))return;let n=process.env.SOOTSIM_QUIET_TARGET_NOTICE;process.env.SOOTSIM_QUIET_TARGET_NOTICE="1";try{await Ve(t,o,{stableMs:150,maxMs:400});let r=S(t,{commandTimeoutMs:3e3,simId:o,cliLabel:"open --describe",simIdSource:"flag"});try{let s=null;try{s=await r.send({type:"evaluate",code:se})}catch{}if(s&&!(s.flag===!0&&!s.loadingText&&s.nodes>=ie&&ae(s))){let d=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: ${d} (nodes: ${s.nodes}, targets: ${s.targets})`),console.log(" before interacting, run: sootsim wait ready --max-ms 120000")}let i=`(async () => {
5
5
  const t = window.__sootsimTest
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.82 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as r}from"./chunk-PO64TMRT.js";import{a as s,b as i,c as l}from"./chunk-BRDUKIZI.js";import{a as t}from"./chunk-HST43CVE.js";import{a as u,d}from"./chunk-GI5MF6LP.js";import{a as p}from"./chunk-7SCQEPXK.js";import{z as a}from"./chunk-PYDAVGCZ.js";function m(){let o=a();return`sootsim CLI v${p()} \xB7 runtime ${o?`v${o}`:"not installed"}`}function I(){let o=i({bridgePort:7668,defaultShellUrl:t},r()),e=`
1
+ /*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as r}from"./chunk-ECJBV65H.js";import{a as s,b as i,c as l}from"./chunk-Y2VJBRSP.js";import{a as t}from"./chunk-RXH2SLKF.js";import{a as u,d}from"./chunk-572VSFNP.js";import{a as p}from"./chunk-KASUZ5XV.js";import{z as a}from"./chunk-2AWQ7OB2.js";function m(){let o=a();return`sootsim CLI v${p()} \xB7 runtime ${o?`v${o}`:"not installed"}`}function I(){let o=i({bridgePort:7668,defaultShellUrl:t},r()),e=`
3
3
  ${d}
4
4
  `;console.log(`${m()}
5
5
  ${e}${o}
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.82 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.83 | (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.82 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var o={width:3,lock:{top:253,height:103},ringToggle:{top:152,height:32},volumeUp:{top:214,height:61},volumeDown:{top:290,height:61}},m={width:2.5,lock:{top:130,height:78},ringToggle:{top:94,height:22},volumeUp:{top:126,height:48},volumeDown:{top:188,height:48}},c={width:3,lock:{top:238,height:78},ringToggle:{top:-1e3,height:0},volumeUp:{top:336,height:62},volumeDown:{top:408,height:62}},p={width:3,lock:{top:248,height:72},ringToggle:{top:-1e3,height:0},volumeUp:{top:144,height:62},volumeDown:{top:216,height:62}},r=48;function t(e){return{...e,platform:"ios",navigationBarHeight:0,navigationBarMode:e.homeIndicatorHeight>0?"gesture":"none",displayCutout:{top:e.dynamicIsland?e.statusBarHeight:0,bottom:0,left:0,right:0},cameraCutout:null,osVersion:e.iosVersion,androidApiLevel:null,systemName:"iOS",manufacturer:"Apple",brand:"Apple",modelName:e.name}}var h={"iphone-se":t({name:"iPhone SE",width:375,height:667,scale:2,statusBarHeight:20,homeIndicatorHeight:0,cornerRadius:0,dynamicIsland:null,safeAreaInsets:{top:20,bottom:0,left:0,right:0},iosVersion:"15.8",physicalPPI:326,hardwareButtons:m}),"iphone-14":t({name:"iPhone 14",width:390,height:844,scale:3,statusBarHeight:47,homeIndicatorHeight:34,cornerRadius:55,dynamicIsland:null,safeAreaInsets:{top:47,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15":t({name:"iPhone 15",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15-plus":t({name:"iPhone 15 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:o}),"iphone-15-pro":t({name:"iPhone 15 Pro",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o}),"iphone-15-pro-max":t({name:"iPhone 15 Pro Max",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:o}),"iphone-16":t({name:"iPhone 16",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-plus":t({name:"iPhone 16 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-pro":t({name:"iPhone 16 Pro",width:402,height:874,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-16-pro-max":t({name:"iPhone 16 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17":t({name:"iPhone 17",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:37.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-air":t({name:"iPhone 17 Air",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-pro":t({name:"iPhone 17 Pro",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"iphone-17-pro-max":t({name:"iPhone 17 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:58,dynamicIsland:{width:126,height:38},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:o}),"ipad-pro-13":t({name:'iPad Pro 13"',width:1032,height:1376,scale:2,statusBarHeight:24,homeIndicatorHeight:20,cornerRadius:18,dynamicIsland:null,safeAreaInsets:{top:24,bottom:20,left:0,right:0},iosVersion:"18.2",physicalPPI:264,hardwareButtons:o}),"pixel-8":{platform:"android",name:"Pixel 8",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:c},"pixel-8-three-button":{platform:"android",name:"Pixel 8 (3-button)",width:412,height:915,scale:2.625,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:48,navigationBarMode:"three-button",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:39,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:48,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:c},"pixel-9-pro-xl":{platform:"android",name:"Pixel 9 Pro XL",width:448,height:997,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:41,dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 9 Pro XL",physicalPPI:486,hardwareButtons:c},"galaxy-s24":{platform:"android",name:"Galaxy S24",width:360,height:780,scale:3,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:36,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S921B",physicalPPI:416,hardwareButtons:p},"galaxy-s24-ultra":{platform:"android",name:"Galaxy S24 Ultra",width:384,height:824,scale:3.75,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:r,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:24,dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:r,left:0,right:0},osVersion:"15",iosVersion:"",androidApiLevel:35,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S928B",physicalPPI:505,hardwareButtons:p}},u="iphone-17-pro";function S(e){return h[e]}function g(){return Object.keys(h)}var i={"iphone-6-9":{name:"iphone-6-9",label:'iPhone 6.7"',width:1284,height:2778,store:"apple"},"iphone-6-1":{name:"iphone-6-1",label:'iPhone 6.5"',width:1242,height:2688,store:"apple"},"ipad-13":{name:"ipad-13",label:'iPad 13"',width:2064,height:2752,store:"apple"},"android-phone":{name:"android-phone",label:"Google Play phone",width:1080,height:1920,store:"google"},"android-tablet-7":{name:"android-tablet-7",label:'Google Play 7" tablet',width:1200,height:1920,store:"google"},"android-tablet-10":{name:"android-tablet-10",label:'Google Play 10" tablet',width:1600,height:2560,store:"google"}},s={dark:{type:"gradient",direction:180,glow:"#4caeff",stops:[{offset:0,color:"#111827"},{offset:40,color:"#101725"},{offset:100,color:"#06080d"}]},cyan:{type:"gradient",direction:180,glow:"#25c3ec",stops:[{offset:0,color:"#1b465c"},{offset:32,color:"#122336"},{offset:100,color:"#05070b"}]},gold:{type:"gradient",direction:180,glow:"#ffc25a",stops:[{offset:0,color:"#3b2f1a"},{offset:34,color:"#18140d"},{offset:100,color:"#050505"}]},red:{type:"gradient",direction:180,glow:"#ff6178",stops:[{offset:0,color:"#3e1018"},{offset:35,color:"#17080c"},{offset:100,color:"#050405"}]}},P={color:"#25c3ec",blur:120,spread:52,opacity:.34},v="iphone-17-pro";var f=[{name:"white",value:"#ffffff"},{name:"gray-light",value:"#d1d5db"},{name:"gray",value:"#6b7280"},{name:"gray-dark",value:"#3b4350"},{name:"slate",value:"#2a3644"},{name:"black",value:"#000000"},{name:"cyan",value:"#25c3ec"},{name:"blue",value:"#3f7cff"},{name:"teal",value:"#1fc7b4"},{name:"green",value:"#42c95d"},{name:"lime",value:"#92d21b"},{name:"gold",value:"#f5c518"},{name:"orange",value:"#ff912e"},{name:"coral",value:"#ff6f5b"},{name:"red",value:"#ff4f6f"},{name:"berry",value:"#d054ff"},{name:"magenta",value:"#ff4eb8"}],x=Object.fromEntries(f.map(e=>[e.name,e.value]));function B(e){return Object.prototype.hasOwnProperty.call(i,e)?i[e]:null}function b(e){return{type:e.type,color:e.color,direction:e.direction,glow:e.glow,stops:e.stops?.map(n=>({...n}))}}function I(e){return Object.prototype.hasOwnProperty.call(s,e)?b(s[e]):null}var d={deviceModel:{type:"enum",default:u,description:"device model to simulate",cliFlag:"device",cliFlagShort:"d",options:g(),group:"device"},orientation:{type:"enum",default:"portrait",description:"screen orientation",cliFlag:"orientation",options:["portrait","landscape"],group:"device"},colorScheme:{type:"enum",default:"auto",description:"color scheme (auto follows system preference)",cliFlag:"theme",cliFlagShort:"t",options:["light","dark","auto"],group:"appearance"},reduceMotion:{type:"boolean",default:!1,description:"reduce motion",group:"appearance"},boldText:{type:"boolean",default:!1,description:"bold text",group:"appearance"},fontSize:{type:"number",default:1,description:"font size multiplier (1.0 = default)",group:"appearance",validate:e=>e>=.5&&e<=2},networkCondition:{type:"enum",default:"wifi",description:"simulated network condition",cliFlag:"network",options:["wifi","lte","fast-3g","slow-3g","offline"],group:"network"},language:{type:"string",default:"en",description:"language code (ISO 639-1)",cliFlag:"language",group:"locale"},region:{type:"string",default:"US",description:"region code (ISO 3166-1)",cliFlag:"region",group:"locale"},showTouches:{type:"boolean",default:!1,description:"show touch indicators",group:"simulator"},showFrame:{type:"boolean",default:!0,description:"show device frame",cliFlag:"frame",group:"simulator"},showTopBar:{type:"boolean",default:!0,description:"show simulator top bar",group:"simulator"},screenshotMode:{type:"boolean",default:!1,description:"show screenshot composition mode in the browser shell",group:"simulator"},threeMode:{type:"boolean",default:!1,description:"show the experimental 3d device stage in the browser shell",group:"simulator"},threeRecordingEditor:{type:"boolean",default:!1,description:"dock the 3d recording editor in the 3d stage (toggled from its rail)",group:"simulator"},screenshotCanvas:{type:"enum",default:"iphone-6-9",description:"target app-store canvas preset for screenshot mode",options:Object.keys(i),group:"simulator"},screenshotBackground:{type:"enum",default:"dark",description:"background preset rendered inside the screenshot canvas",options:Object.keys(s),group:"simulator"},screenshotText:{type:"enum",default:"bold-top",description:"text layout preset for the screenshot canvas",options:["bold-top","editorial-left","minimal-bottom","none"],group:"simulator"},screenshotPose:{type:"enum",default:"straight",description:"device pose preset inside the screenshot canvas",options:["straight","tilted-left","tilted-right","cut-bottom","cut-top"],group:"simulator"},screenshotDynamicSize:{type:"boolean",default:!1,description:"let the screenshot canvas rect fit available space (off = pin to exact preset pixels)",group:"simulator"},showStatusBar:{type:"boolean",default:!0,description:"show status bar",group:"simulator"},showHomeIndicator:{type:"boolean",default:!0,description:"show home indicator",group:"simulator"},a11yMode:{type:"enum",default:"delayed",description:"accessibility tree sync mode (off, delayed=100ms, active=30ms)",options:["off","delayed","active"],group:"simulator"},a11yDepth:{type:"enum",default:"deep",description:"accessibility tree structure depth (shallow or deep)",options:["shallow","deep"],group:"simulator"},inspectMode:{type:"boolean",default:!1,description:"inspect mode",group:"simulator"},errorReporting:{type:"boolean",default:!1,description:"send anonymous crash reports",group:"privacy"},agentProvider:{type:"enum",default:"codex",description:"ai agent used by the sootsim agent prompt bar",options:["codex","claude"],group:"agent"},onboardingComplete:{type:"boolean",default:!1,description:"first-run onboarding completed",group:"beta"},betaConsentVersion:{type:"number",default:0,description:"last accepted beta telemetry policy version",group:"beta"},detailedTelemetry:{type:"boolean",default:!0,description:"send detailed usage telemetry (sessions, perf samples)",group:"beta"}};function y(){if(typeof window>"u")return{};let e={};try{let n=new URLSearchParams(window.location.search),a=n.get("device");a&&d.deviceModel.options?.includes(a)&&(e.deviceModel=a);let l=n.get("colorScheme")??n.get("theme");l&&d.colorScheme.options?.includes(l)&&(e.colorScheme=l)}catch{}return e}function R(){let e={};for(let[n,a]of Object.entries(d))e[n]=a.default;return Object.assign(e,y()),e}export{P as a,v as b,B as c,b as d,I as e,h as f,S as g,g as h,d as i,y as j,R as k};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.82 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.83 | (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.82 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as v}from"./chunk-WZLKUS54.js";import{existsSync as o,readFileSync as p,writeFileSync as d}from"node:fs";import{homedir as j}from"node:os";import{dirname as $,join as s,resolve as P}from"node:path";var _=j();function Q(e){let t=e;for(;;){if(o(s(t,"pnpm-workspace.yaml"))||o(s(t,"turbo.json"))||o(s(t,"nx.json"))||o(s(t,"lerna.json")))return t;let r=s(t,"package.json");if(o(r))try{if(JSON.parse(p(r,"utf8")).workspaces)return t}catch{}let n=$(t);if(n===t)return null;t=n}}function A(e,t){let r=Q(process.cwd()),n=[r?P(r,e):null,P(process.cwd(),e),P(process.cwd(),t)].filter(a=>!!a);for(let a of n)if(o(a))return a;return n[0]??P(process.cwd(),e)}var X=()=>A("packages/sootsim-engine/scripts/expensify-web-proxy.ts","scripts/expensify-web-proxy.ts"),z=()=>A("packages/sootsim-engine/scripts/rainbow-metadata-proxy.ts","scripts/rainbow-metadata-proxy.ts"),Z=()=>A("packages/compat/src/stubs/mattermost-rnutils-native.ts","../compat/src/stubs/mattermost-rnutils-native.ts"),ee=()=>A("packages/compat/src/stubs/native-seams/react-native-keychain-manager.ts","../compat/src/stubs/native-seams/react-native-keychain-manager.ts"),L=()=>A("packages/compat/src/stubs/mattermost-network-client-native.ts","../compat/src/stubs/mattermost-network-client-native.ts"),te=()=>A("packages/sootsim-engine/scripts/mattermost-preview-server.ts","scripts/mattermost-preview-server.ts"),y={USE_NGROK:"true",NGROK_URL:"http://localhost:9000/",SECURE_NGROK_URL:"http://localhost:9000/"},ne=s(_,"github/mattermost-mobile"),I=s(_,"github/uniswap-interface"),re=s(I,"apps/mobile"),T=s(I,".env.defaults.local"),se="stored-in-.env.local",W="# sootsim demo env overrides",oe=s(I,"packages/uniswap/src/features/forceUpgrade/hooks/useForceUpgradeStatus.ts"),ae=s(I,"apps/mobile/src/notification-service/data-sources/createForceUpgradeNotificationDataSource.ts"),M="SOOTSIM_DEMO_DISABLE_FORCE_UPGRADE";function B(e){if(!o(e))return{};let t={},r=p(e,"utf8");for(let n of r.split(/\r?\n/)){let a=n.trim();if(!a||a.startsWith("#"))continue;let u=a.match(/^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);if(!u)continue;let i=u[2].trim();(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1)),t[u[1]]=i}return t}function w(e){if(!e)return!1;let t=e.trim();return!(!t||t.includes(se)||t==="TRADING_API_KEY"||t==="UNISWAP_API_KEY")}function Y(e,t){for(let r of e)for(let n of t){let a=r[n];if(w(a))return a.trim()}}function J(){let e=B(T),t=B(s(I,"apps/web/.env")),r=[process.env,e,t],n={},a=[["AMPLITUDE_PROXY_URL_OVERRIDE",["REACT_APP_AMPLITUDE_PROXY_URL"]],["QUICKNODE_ENDPOINT_NAME",["REACT_APP_QUICKNODE_ENDPOINT_NAME"]],["QUICKNODE_ENDPOINT_TOKEN",["REACT_APP_QUICKNODE_ENDPOINT_TOKEN"]],["INFURA_KEY",["REACT_APP_INFURA_KEY"]],["STATSIG_API_KEY",["REACT_APP_STATSIG_API_KEY"]],["STATSIG_PROXY_URL_OVERRIDE",["REACT_APP_STATSIG_PROXY_URL"]],["WALLETCONNECT_PROJECT_ID",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_BETA",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_DEV",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["TRADING_API_KEY",["REACT_APP_TRADING_API_KEY"]],["UNISWAP_API_KEY",[]]];for(let[i,l]of a){let R=Y(r,[i,...l]);if(R){n[i]=R;for(let f of l)n[f]=R}}if(!(w(n.TRADING_API_KEY)&&w(n.UNISWAP_API_KEY))){let i=Y(r,["GRAPHQL_URL_OVERRIDE","REACT_APP_AWS_API_ENDPOINT"])||"https://interface.gateway.uniswap.org/v1/graphql";n.API_BASE_URL_OVERRIDE="https://interface.gateway.uniswap.org",n.API_BASE_URL_V2_OVERRIDE="https://interface.gateway.uniswap.org/v2",n.GRAPHQL_URL_OVERRIDE=i,n.TRADING_API_URL_OVERRIDE="https://trading-api-labs.interface.gateway.uniswap.org",n.FOR_API_URL_OVERRIDE="https://for.interface.gateway.uniswap.org/v2/FOR.v1.FORService"}return n}function ie(){let e=o(T)?p(T,"utf8"):"";if(e&&!e.includes(W))return;let t=J(),r=[W];for(let[n,a]of Object.entries(t).sort(([u],[i])=>u.localeCompare(i)))r.push(`${n}=${JSON.stringify(a)}`);r.push(""),d(T,`${r.join(`
1
+ /*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as v}from"./chunk-OYMFNU3M.js";import{existsSync as o,readFileSync as p,writeFileSync as d}from"node:fs";import{homedir as j}from"node:os";import{dirname as $,join as s,resolve as P}from"node:path";var _=j();function Q(e){let t=e;for(;;){if(o(s(t,"pnpm-workspace.yaml"))||o(s(t,"turbo.json"))||o(s(t,"nx.json"))||o(s(t,"lerna.json")))return t;let r=s(t,"package.json");if(o(r))try{if(JSON.parse(p(r,"utf8")).workspaces)return t}catch{}let n=$(t);if(n===t)return null;t=n}}function A(e,t){let r=Q(process.cwd()),n=[r?P(r,e):null,P(process.cwd(),e),P(process.cwd(),t)].filter(a=>!!a);for(let a of n)if(o(a))return a;return n[0]??P(process.cwd(),e)}var X=()=>A("packages/sootsim-engine/scripts/expensify-web-proxy.ts","scripts/expensify-web-proxy.ts"),z=()=>A("packages/sootsim-engine/scripts/rainbow-metadata-proxy.ts","scripts/rainbow-metadata-proxy.ts"),Z=()=>A("packages/compat/src/stubs/mattermost-rnutils-native.ts","../compat/src/stubs/mattermost-rnutils-native.ts"),ee=()=>A("packages/compat/src/stubs/native-seams/react-native-keychain-manager.ts","../compat/src/stubs/native-seams/react-native-keychain-manager.ts"),L=()=>A("packages/compat/src/stubs/mattermost-network-client-native.ts","../compat/src/stubs/mattermost-network-client-native.ts"),te=()=>A("packages/sootsim-engine/scripts/mattermost-preview-server.ts","scripts/mattermost-preview-server.ts"),y={USE_NGROK:"true",NGROK_URL:"http://localhost:9000/",SECURE_NGROK_URL:"http://localhost:9000/"},ne=s(_,"github/mattermost-mobile"),I=s(_,"github/uniswap-interface"),re=s(I,"apps/mobile"),T=s(I,".env.defaults.local"),se="stored-in-.env.local",W="# sootsim demo env overrides",oe=s(I,"packages/uniswap/src/features/forceUpgrade/hooks/useForceUpgradeStatus.ts"),ae=s(I,"apps/mobile/src/notification-service/data-sources/createForceUpgradeNotificationDataSource.ts"),M="SOOTSIM_DEMO_DISABLE_FORCE_UPGRADE";function B(e){if(!o(e))return{};let t={},r=p(e,"utf8");for(let n of r.split(/\r?\n/)){let a=n.trim();if(!a||a.startsWith("#"))continue;let u=a.match(/^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);if(!u)continue;let i=u[2].trim();(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1)),t[u[1]]=i}return t}function w(e){if(!e)return!1;let t=e.trim();return!(!t||t.includes(se)||t==="TRADING_API_KEY"||t==="UNISWAP_API_KEY")}function Y(e,t){for(let r of e)for(let n of t){let a=r[n];if(w(a))return a.trim()}}function J(){let e=B(T),t=B(s(I,"apps/web/.env")),r=[process.env,e,t],n={},a=[["AMPLITUDE_PROXY_URL_OVERRIDE",["REACT_APP_AMPLITUDE_PROXY_URL"]],["QUICKNODE_ENDPOINT_NAME",["REACT_APP_QUICKNODE_ENDPOINT_NAME"]],["QUICKNODE_ENDPOINT_TOKEN",["REACT_APP_QUICKNODE_ENDPOINT_TOKEN"]],["INFURA_KEY",["REACT_APP_INFURA_KEY"]],["STATSIG_API_KEY",["REACT_APP_STATSIG_API_KEY"]],["STATSIG_PROXY_URL_OVERRIDE",["REACT_APP_STATSIG_PROXY_URL"]],["WALLETCONNECT_PROJECT_ID",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_BETA",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["WALLETCONNECT_PROJECT_ID_DEV",["REACT_APP_WALLET_CONNECT_PROJECT_ID"]],["TRADING_API_KEY",["REACT_APP_TRADING_API_KEY"]],["UNISWAP_API_KEY",[]]];for(let[i,l]of a){let R=Y(r,[i,...l]);if(R){n[i]=R;for(let f of l)n[f]=R}}if(!(w(n.TRADING_API_KEY)&&w(n.UNISWAP_API_KEY))){let i=Y(r,["GRAPHQL_URL_OVERRIDE","REACT_APP_AWS_API_ENDPOINT"])||"https://interface.gateway.uniswap.org/v1/graphql";n.API_BASE_URL_OVERRIDE="https://interface.gateway.uniswap.org",n.API_BASE_URL_V2_OVERRIDE="https://interface.gateway.uniswap.org/v2",n.GRAPHQL_URL_OVERRIDE=i,n.TRADING_API_URL_OVERRIDE="https://trading-api-labs.interface.gateway.uniswap.org",n.FOR_API_URL_OVERRIDE="https://for.interface.gateway.uniswap.org/v2/FOR.v1.FORService"}return n}function ie(){let e=o(T)?p(T,"utf8"):"";if(e&&!e.includes(W))return;let t=J(),r=[W];for(let[n,a]of Object.entries(t).sort(([u],[i])=>u.localeCompare(i)))r.push(`${n}=${JSON.stringify(a)}`);r.push(""),d(T,`${r.join(`
3
3
  `)}
4
4
  `)}function ce(){let e=`export function useForceUpgradeStatus(): ForceUpgradeStatus {
5
5
  `,t=` // sootsim demo: bypass the force-upgrade gate during local engine demos.
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.82 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{c as i,e as d,h as c}from"./chunk-O3AOQP3V.js";function g(r){let e=r[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function u(r,e,t){let l=i(r,{port:e.port}),s=g(l.positional),a=d({...l,commandTimeoutMs:5e3});try{let n=!!(await c(a,"SootSim.bridges.settings.get"))?.[t.modeKey],o=s==="on"?!0:s==="off"?!1:!n;if(n===o)return console.log(` ${t.displayName}: already ${o?"on":"off"}`),{current:n,target:o,changed:!1};if(!await a.send({type:"evaluate",acquireLock:!0,code:`(async () => {
1
+ /*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{c as i,e as d,h as c}from"./chunk-YUELRHGB.js";function g(r){let e=r[0]?.toLowerCase()??"toggle";return e!=="on"&&e!=="off"&&e!=="toggle"&&(console.error(` unknown argument: "${e}" (expected on | off | toggle)`),process.exit(1)),e}async function u(r,e,t){let l=i(r,{port:e.port}),s=g(l.positional),a=d({...l,commandTimeoutMs:5e3});try{let n=!!(await c(a,"SootSim.bridges.settings.get"))?.[t.modeKey],o=s==="on"?!0:s==="off"?!1:!n;if(n===o)return console.log(` ${t.displayName}: already ${o?"on":"off"}`),{current:n,target:o,changed:!1};if(!await a.send({type:"evaluate",acquireLock:!0,code:`(async () => {
3
3
  const modeKey = ${JSON.stringify(t.modeKey)}
4
4
  const target = ${JSON.stringify(o)}
5
5
  window.dispatchEvent(new CustomEvent('sootsim:shell-command', {
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.82 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  function k(e,t){let n=["--max-ms","--maxMs","--maxms","--max_ms"];for(let r of n){let s=e.indexOf(r);if(s>=0&&e[s+1]){let a=Number(e[s+1]);if(Number.isFinite(a))return Math.max(100,a)}}return t}async function E(e){let t=await e.send({type:"evaluate",code:"(async () => await window.__sootsimTest.getNodeCount())()"});return{nodes:typeof t=="number"?t:0}}async function P(e,t=5){let n=await e.send({type:"evaluate",code:`(async () => await window.__sootsimTest.dumpTree(${t}))()`});return{depth:t,tree:n}}async function A(e){let t=await e.send({type:"evaluate",code:"window.location.href"});return{url:typeof t=="string"?t:""}}async function L(e,t){let n=`(async () => {
3
3
  const t = window.__sootsimTest
4
4
  const mainShell = window.SootSim?.bridges?.mainShell
@@ -0,0 +1,2 @@
1
+ /*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ var t="http://localhost:5173/";export{t as a};
@@ -0,0 +1,79 @@
1
+ /*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{d as ae,e as le,f as ue}from"./chunk-DP7O5MHK.js";import{d as se}from"./chunk-5DJXZIFZ.js";import{a as re,b as T}from"./chunk-VMXWC2JO.js";import{a as ne}from"./chunk-2PY3UZVO.js";import{c as oe,e as ie,g as I}from"./chunk-YUELRHGB.js";import{createHash as ze}from"crypto";import{readFileSync as D}from"fs";import{gzipSync as pe}from"zlib";function ce(e){let t=(e||"").toLowerCase().split(";")[0].trim();return t?!(t.startsWith("image/")||t.startsWith("video/")||t.startsWith("audio/")||t==="font/woff2"||t==="application/font-woff2"||t==="application/zip"||t==="application/gzip"):!0}function q(e,t){let r=new AbortController,s=setTimeout(()=>r.abort(new Error(`${t} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(s)}}async function Oe(e){let t=q(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:t.signal})}finally{t.cancel()}if(!r.ok){let s=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${s.slice(0,200)}`)}}async function _e(e,t=8,r){let s=0,o=0,i=e.length;await Promise.all(Array.from({length:Math.min(t,i)},async()=>{for(;s<i;){let l=e[s++];await Oe(l),o++,r?.(o,i)}}))}function $e(e,t,r,s){let o=[];o.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let i of e.files){let l=r.get(i.urlhash);l&&o.push({url:i.putUrl,contentType:i.contentType,bytes:l})}e.events&&s?.eventsBytes&&o.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),e.flowVideo&&s?.videoBytes&&o.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:s.videoBytes}),e.storage&&s?.storageBytes&&o.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:s.storageBytes});for(let i of e.snapshots??[]){let l=s?.snapshotBytes?.get(i.id);l&&o.push({url:i.putUrl,contentType:i.contentType,bytes:l})}return o}function ke(e){return e.replace(/\/+$/,"")}var A=class extends Error{constructor(r,s,o,i=""){super(r);this.status=s;this.phase=o;this.responseText=i;this.name="PresignedUploadError"}};async function de(e){let t=ke(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-soot-admin-upload-bypass"]=e.adminBypassToken);let s=q(3e4,"init"),o;try{o=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:s.signal})}finally{s.cancel()}if(!o.ok){let p=await o.text().catch(()=>"");throw new A(`init failed: ${o.status} ${p.slice(0,200)}`,o.status,"init",p)}let i=await o.json(),l=$e(i,e.bundleBytes,e.filesByHash,e.extras);await _e(l,e.concurrency??8,e.onPutProgress);let f=q(3e4,"finalize"),c;try{c=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:i.token}),signal:f.signal})}finally{f.cancel()}if(!c.ok){let p=await c.text().catch(()=>"");throw new A(`finalize failed: ${c.status} ${p.slice(0,200)}`,c.status,"finalize",p)}let O=await c.json();return{init:i,finalize:O}}function Ee(e){if(!e)return null;try{let t=JSON.parse(e);return typeof t.message=="string"&&t.message?t.message:null}catch{return null}}var ye=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://sootbean.com",me=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",K="http://localhost:3000";async function Ae(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let t=await fetch(`${K}/api/preview/upload/init`,{method:"OPTIONS"});if(t.ok||t.status===204||t.status===405)return K}catch{}return ye}function R(e){return e.replace(/\/$/,"")}function Le(e){try{let r=new URL(e).hostname.replace(/^\[|\]$/g,"").toLowerCase();return r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r)}catch{return!1}}function He(e){try{let t=new URL(e).hostname.toLowerCase();return t==="sootbean.com"||t.endsWith(".sootbean.com")}catch{return!1}}function Fe(e,t){return t?R(t):process.env.SOOTSIM_PREVIEW_ORIGIN?R(process.env.SOOTSIM_PREVIEW_ORIGIN):Le(e)?R(e):He(e)?R(me):R(e)}function Me(){console.log(`
3
+ sootsim upload \u2014 publish the current recorded bundle as a /preview/<id> link
4
+
5
+ usage:
6
+ sootsim upload [--origin <url>] [--public-origin <url>] (--events <path> | --video <path>) [--screenshot <path>] [--owner <org> --repo <repo>] [--sim <sim>] [--open] [--assets-only]
7
+
8
+ options:
9
+ --origin <url> upload target (default: auto)
10
+ prefers ${K} when available, otherwise
11
+ falls back to ${ye}
12
+ override with SOOTSIM_UPLOAD_ORIGIN env var
13
+ --public-origin <url>
14
+ public /preview link origin (default: ${me}
15
+ for prod uploads, upload origin for localhost/custom origins).
16
+ override with SOOTSIM_PREVIEW_ORIGIN env var
17
+ --events <path> path to a gzipped events .jsonl.gz file to attach
18
+ required unless --video is present; previews must
19
+ have replay or recording playback data
20
+ --screenshot <path>
21
+ path to a PNG thumbnail to attach to the share
22
+ --video <path> path to a webm/mp4/gif flow recording. embedded inline
23
+ in the pr sticky comment served at
24
+ /api/preview/flow-video?id=<share-id>
25
+ --video-duration-ms <ms>
26
+ duration hint for attached flow video
27
+ --owner <org> associate a session upload with a linked org repo
28
+ --repo <repo> repo name for --owner; the signed-in user must belong
29
+ to the local/org team that owns the link
30
+ --sim <sim> target a specific sim (see: sootsim list)
31
+ --open open the resulting /preview/<id> url in the browser
32
+ --assets-only drop API/JSON/HTML records before upload; keep images,
33
+ fonts, css, js, and binary blobs. live-data demos hit
34
+ the real network at replay time instead of serving
35
+ recorded API snapshots
36
+ -h, --help
37
+
38
+ examples:
39
+ sootsim upload --events ./my-session.jsonl.gz
40
+ sootsim upload --origin http://localhost:3000 --events ./my-session.jsonl.gz --open
41
+ sootsim upload --video /tmp/soot-flow.webm --video-duration-ms 12000
42
+ `)}function b(e,t){let r=e.findIndex(o=>o===t);if(r<0)return;let s=e[r+1];return e.splice(r,2),s}function ge(e,t){let r=e.findIndex(s=>s===t);return r<0?!1:(e.splice(r,1),!0)}function he(e){let t=(e||"").toLowerCase().split(";")[0].trim();return t?!!(t.startsWith("image/")||t.startsWith("font/")||t.startsWith("video/")||t.startsWith("audio/")||t.startsWith("model/")||t==="text/css"||t==="application/javascript"||t==="text/javascript"||t==="application/wasm"||t==="application/font-woff"||t==="application/font-woff2"||t==="application/octet-stream"):!1}async function fe(e){let t=await fetch(e);if(!t.ok)throw new Error(`fetch ${e} -> ${t.status} ${t.statusText}`);return new Uint8Array(await t.arrayBuffer())}function Ce(e){return/\.bundle($|\?)/.test(e)||/\.js($|\?)/.test(e)?"application/javascript":/\.zip($|\?)/.test(e)?"application/zip":"application/javascript"}function Ne(e){try{let t=new URL(e);return t.searchParams.get("lazy")==="true"?(t.searchParams.set("lazy","false"),t.toString()):e}catch{return e}}async function We(e,t){let s=[];for(let o=0;o<t;o+=15e5){let i=Math.min(o+15e5,t),l=await I(e,`(window.__sootsimLastTransformedBundle?.text || "").slice(${o}, ${i})`);if(typeof l!="string")return null;s.push(l)}return s.join("")}function G(e){let t=new Map;for(let r of e)t.set(r.urlhash||r.url,r);return Array.from(t.values())}async function nt(e,t){(e.includes("--help")||e.includes("-h"))&&(Me(),process.exit(0));let r=[...e],s=await Ae(b(r,"--origin")),o=Fe(s,b(r,"--public-origin")),i=b(r,"--events"),l=b(r,"--screenshot"),f=b(r,"--video"),c=b(r,"--video-duration-ms"),O=b(r,"--owner"),p=b(r,"--repo"),be=ge(r,"--open");(O&&!p||!O&&p)&&(console.error(" --owner and --repo must be provided together"),process.exit(1)),!i&&!f&&(console.error(" preview uploads require playback data: pass --events or --video.\n for a normal local preview, use `sootsim record --mode combined --open`\n or `sootsim flow --preview` instead of uploading a bundle-only snapshot."),process.exit(1));let j=ge(r,"--assets-only"),we=oe(r,{stripBooleanFlags:[],stripValueFlags:[]}),w=ie(we),u,J=[],y=[],L=null;try{if(u=await I(w,'(typeof window.__sootsimCaptureBundle === "function") ? window.__sootsimCaptureBundle() : null'),u?.bundleUrl){let n=new URL(u.bundleUrl).origin,[a,N]=await Promise.all([I(w,`(window.__sootsimPreviewRecorder?.list?.(${JSON.stringify(n)}) || [])`),I(w,`(async () => {
43
+ const list = window.__sootsimListWorkerFetchRecorder
44
+ return typeof list === 'function'
45
+ ? await list(${JSON.stringify(n)})
46
+ : []
47
+ })()`)]);J=G([...a,...N]).filter(d=>{try{return!new URL(d.url).pathname.startsWith("/api/")}catch{return!0}});let $=await I(w,`(async () => {
48
+ const rec = window.__sootsimPreviewRecorder
49
+ const workerList = window.__sootsimListWorkerFetchRecorder
50
+ return {
51
+ main: rec?.list ? rec.list() : [],
52
+ worker: typeof workerList === 'function' ? await workerList() : [],
53
+ }
54
+ })()`),P=($?G([...$.main,...$.worker]):[]).filter(d=>{try{return new URL(d.url).origin!==n}catch{return!1}}),B=P.length>0?{count:P.length,totalBytes:P.reduce((d,S)=>d+(S.size||0),0)}:null;if(B&&B.count>0){console.log(` ${B.count} recorded cross-origin responses (${(B.totalBytes/1024).toFixed(1)} KiB)`);let d=await I(w,`(async () => {
55
+ const rec = window.__sootsimPreviewRecorder
56
+ const workerDump = window.__sootsimDumpWorkerFetchRecorder
57
+ const bundleUrl = ${JSON.stringify(u.bundleUrl)}
58
+ const keep = (r) => {
59
+ try {
60
+ const u = new URL(r.url)
61
+ if (u.origin !== ${JSON.stringify(n)}) return true
62
+ // bundle-origin api responses came from the rewritten
63
+ // /__app-api proxy at record time (re-keyed by the
64
+ // recorder's unwrap step). they need bodies attached the
65
+ // same way as cross-origin records \u2014 direct re-fetch from
66
+ // the dev server lacks the bundle's session cookies.
67
+ if (r.url !== bundleUrl && u.pathname.startsWith('/api/')) return true
68
+ return false
69
+ } catch { return false }
70
+ }
71
+ return {
72
+ main: rec?.dump ? rec.dump().filter(keep) : [],
73
+ worker: typeof workerDump === 'function'
74
+ ? (await workerDump()).filter(keep)
75
+ : [],
76
+ }
77
+ })()`);if(y=G([...d.main,...d.worker]),j){let S=y.length;y=y.filter(V=>he(V.contentType));let W=B.totalBytes-y.reduce((V,Re)=>V+(Re.size||0),0);console.log(` --assets-only: kept ${y.length}/${S} records (dropped ${(W/1024).toFixed(1)} KiB of API responses)`)}}}u?.transformedBundle&&(L=await We(w,u.transformedBundle.byteLength))}finally{w.close()}u||(console.error(" could not read bundle snapshot \u2014 is sootsim running and is the bundle loaded?"),process.exit(2)),u.bundleUrl||(console.error(` no ?bundle= URL on the current sootsim tab.
78
+ open the app you want to share first (e.g. sootsim open 8082), then run upload.`),process.exit(2));let g,H=!1;if(L!==null)g=new TextEncoder().encode(L),H=!0,console.log(` using post-transform bundle: ${(g.byteLength/1024).toFixed(1)} KiB`);else{let n=Ne(u.bundleUrl);n!==u.bundleUrl&&console.log(" forcing lazy=false for self-contained bundle"),console.log(` capturing: ${n}`),g=await fe(n),console.log(` main bundle: ${(g.byteLength/1024).toFixed(1)} KiB`)}let k=J.filter(n=>n.url!==u.bundleUrl);j&&(k=k.filter(n=>he(n.contentType))),console.log(` fetching ${k.length} extra files\u2026`);let z=(await Promise.all(k.map(async n=>{try{let a=await fe(n.url);return{...n,bytes:a}}catch(a){return console.error(` warning: failed to re-fetch ${n.url}: ${a instanceof Error?a.message:a}`),null}}))).filter(n=>!!n),ve=z.reduce((n,a)=>n+a.bytes.byteLength,0);console.log(` ${z.length} extra files: ${(ve/1024).toFixed(1)} KiB`);let v;i&&(v=D(i));let h;l&&(h=D(l),console.log(` attaching screenshot: ${(h.byteLength/1024).toFixed(1)} KiB`));let m,E,Y;if(f){if(m=D(f),E=f.endsWith(".mp4")?"video/mp4":f.endsWith(".gif")?"image/gif":"video/webm",c){let n=Number(c);(!Number.isFinite(n)||n<=0)&&(console.error(` invalid --video-duration-ms: ${c}`),await T(),process.exit(1)),Y=Math.round(n)}console.log(` attaching flow video: ${(m.byteLength/1024).toFixed(1)} KiB (${E})`)}let U=ae(),x=ue(U),Be=ne();re({event:"preview_upload_started",identity:{userId:U?.kind==="session"?Be?.user?.id??null:null,repoId:x?.repoId??null,installationId:x?.installationId??null},properties:{origin:s,hasAuth:!!U,authMode:U?.kind??"none",bundleBytes:g.byteLength,isTransformed:H,extraFiles:z.length,recordedFetches:y.length,hasEvents:!!v,hasScreenshot:!!h,hasVideo:!!m}}),U||(console.error(" preview uploads need auth."),console.error(" set SOOTSIM_API_KEY=sk_sootsim_..., run `sootsim login`, or use the soot github runner."),await T(),process.exit(1));let Te=le(U),Ie=(()=>{try{return new URL(u.bundleUrl).origin}catch{return null}})(),Q=(n,a,N,$,te,P,B,d)=>{let S=ce(P),W=S?pe(n):n;return{url:a,urlhash:N,method:$,bodyHash:te,requestVaryHash:d,contentType:P,responseHeaders:B,bytes:W,encoding:S?"gzip":void 0}},F=[...z.map(n=>Q(n.bytes,n.url,n.urlhash,"GET","-",n.contentType,n.responseHeaders,n.requestVaryHash)),...y.map(n=>Q(Buffer.from(n.bodyBase64,"base64"),n.url,n.urlhash,n.method||"GET",n.bodyHash||"-",n.contentType,n.responseHeaders,n.requestVaryHash))],M=pe(g),Ue=ze("sha256").update(g).digest("hex");console.log(` bundle raw=${(g.byteLength/1024).toFixed(1)} KiB gz=${(M.byteLength/1024).toFixed(1)} KiB`);let xe={contentHash:Ue,bundleSizeBytes:g.byteLength,bundleContentType:Ce(u.bundleUrl),bundleEncoding:"gzip",bundleOrigin:Ie,entry:u.entry,isTransformed:H,deviceSpec:u.deviceSpec,installationId:x?.installationId??void 0,repoId:x?.repoId,owner:O??x?.owner,repo:p??x?.repo,files:F.map(n=>({url:n.url,urlhash:n.urlhash,method:n.method,bodyHash:n.bodyHash,contentType:n.contentType,responseHeaders:n.responseHeaders,requestVaryHash:n.requestVaryHash,encoding:n.encoding,sizeBytes:n.bytes.byteLength})),events:v?{sizeBytes:v.byteLength}:void 0,snapshots:h?[{id:"landing",label:"Landing",kind:"landing",t:0,contentType:"image/png",sizeBytes:h.byteLength}]:void 0,flowVideo:m&&E?{sizeBytes:m.byteLength,contentType:E,durationMs:Y}:void 0},X=new Map;for(let n of F)X.set(n.urlhash,n.bytes);let Z=new Map;h&&Z.set("landing",h);let Pe=Date.now(),_=M.byteLength;for(let n of F)_+=n.bytes.byteLength;v&&(_+=v.byteLength),h&&(_+=h.byteLength),m&&(_+=m.byteLength);let Se=`${R(s)}/api/preview/upload/init`;console.log(` init: ${Se}`);let C;try{let n=await de({originBase:s,initBody:xe,bundleBytes:M,filesByHash:X,extras:{eventsBytes:v,videoBytes:m,snapshotBytes:Z},authHeader:Te,concurrency:16});C=n.finalize;let a=1+n.init.files.length+(n.init.events?1:0)+n.init.snapshots.length+(n.init.flowVideo?1:0);console.log(` PUT ${a} objects in ${Date.now()-Pe}ms (${(_/1024).toFixed(1)} KiB)`)}catch(n){let a=n;a.phase==="init"&&a.status===401&&(console.error(" preview upload requires a valid login."),console.error(" run `sootsim login` and retry."),await T(),process.exit(1)),a.status===402&&(console.error(` ${Ee(a.responseText)??"preview uploads require Personal, Team, or an active trial \u2014 upgrade from the billing dialog."}`),await T(),process.exit(1)),console.error(` ${a.message??`${a.phase??"upload"} failed: ${String(n)}`}`),await T(),process.exit(1)}let ee=`${o}${C.url}`;console.log(`
79
+ stored ${C.filesStored??0} extra files`),console.log(` preview: ${ee}`),be&&await se(ee),await T()}export{Ae as a,Fe as b,nt as c};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.82 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as s}from"./chunk-2JQIKL3B.js";import{w as o}from"./chunk-PYDAVGCZ.js";function u(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!o()}function a(){if(u())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let t=process.env.SOOT_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:t.replace(/\/+$/,"")}}function c(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:"anonymous-cli":"anonymous-cli"}function p(e){let t=e.identity??{},n={$lib:"soot-cli",source:t.source??"cli",...e.properties};return t.userId&&(n.userId=t.userId),t.repoId&&(n.repoId=t.repoId),t.installationId!=null&&(n.installationId=String(t.installationId)),t.shareId&&(n.shareId=t.shareId),t.plan&&(n.plan=t.plan),{event:e.event,distinct_id:c(t),properties:n,timestamp:new Date().toISOString()}}var r=[],l=!1;async function i(){if(r.length===0)return;let e=a();if(!e){r.length=0;return}let t=r.splice(0,r.length).map(p);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:t}),signal:AbortSignal.timeout(2e3)})}catch{}}function d(){l||(l=!0,process.on("beforeExit",()=>{i()}),process.on("exit",()=>{i()}))}function h(e){if(u())return;d();let t=null;try{t=s()?.user?.id??null}catch{t=null}r.push({...e,identity:{source:"cli",userId:t,...e.identity}})}async function g(){await i()}export{h as a,g as b};
1
+ /*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as s}from"./chunk-2PY3UZVO.js";import{w as o}from"./chunk-2AWQ7OB2.js";function u(){let e=process.env.DO_NOT_TRACK;return e==="1"||e==="true"||!o()}function a(){if(u())return null;let e=process.env.VITE_POSTHOG_API_KEY||"";if(!e)return null;let t=process.env.SOOT_POSTHOG_HOST||process.env.VITE_POSTHOG_HOST||"https://us.i.posthog.com";return{apiKey:e,host:t.replace(/\/+$/,"")}}function c(e){return e?e.userId?e.userId:e.installationId!=null?`install:${e.installationId}`:e.repoId?`repo:${e.repoId}`:e.shareId?`share:${e.shareId}`:"anonymous-cli":"anonymous-cli"}function p(e){let t=e.identity??{},n={$lib:"soot-cli",source:t.source??"cli",...e.properties};return t.userId&&(n.userId=t.userId),t.repoId&&(n.repoId=t.repoId),t.installationId!=null&&(n.installationId=String(t.installationId)),t.shareId&&(n.shareId=t.shareId),t.plan&&(n.plan=t.plan),{event:e.event,distinct_id:c(t),properties:n,timestamp:new Date().toISOString()}}var r=[],l=!1;async function i(){if(r.length===0)return;let e=a();if(!e){r.length=0;return}let t=r.splice(0,r.length).map(p);try{await fetch(`${e.host}/batch/`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({api_key:e.apiKey,batch:t}),signal:AbortSignal.timeout(2e3)})}catch{}}function d(){l||(l=!0,process.on("beforeExit",()=>{i()}),process.on("exit",()=>{i()}))}function h(e){if(u())return;d();let t=null;try{t=s()?.user?.id??null}catch{t=null}r.push({...e,identity:{source:"cli",userId:t,...e.identity}})}async function g(){await i()}export{h as a,g as b};
@@ -1,2 +1,2 @@
1
- /*! sootsim v0.1.82 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{g as w,i as u,j as m,k as l}from"./chunk-Q4JNA5VO.js";var p="sootsim:settings",v=["errorReporting","colorScheme","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","agentProvider","onboardingComplete","betaConsentVersion","detailedTelemetry"];function S(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function g(e){let t={};for(let n of v){if(!(n in e))continue;let r=e[n],o=u[n];o.validate&&!o.validate(r)||o.options&&!o.options.includes(r)||(t[n]=r)}return t}function h(e){let t={};for(let n of v)t[n]=e[n];return t}function _(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(p);return e?g(JSON.parse(e)):{}}catch{return{}}}function V(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(p,JSON.stringify(h(e)))}catch{}}function E(){let t=S()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:g(t)}function K(e){let t=S();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:h(e)})}catch{}}function k(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=k()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!k())return;let t={settings:h(e)};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function b(){let e=_(),t=j(),n=E();return{...e,...t,...n}}function R(e){V(e),K(e),D(e)}function C(e){if(typeof window>"u")return()=>{};let t=i=>{if(!(i.key!==p||i.newValue==null))try{e(g(JSON.parse(i.newValue)))}catch{}};window.addEventListener("storage",t);let n=S(),r;n?.onSharedConfigChanged&&(r=n.onSharedConfigChanged(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))}));let c=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))});return()=>{window.removeEventListener("storage",t),r?.(),c?.()}}var M=l(),P=b();for(let e of Object.keys(m()))delete P[e];var s={...M,...P},f=[],a=null;function y(){for(let e of f)e();R(s)}C(e=>{let t={...s},n=!1;for(let[r,o]of Object.entries(e)){let c=r;t[c]!==o&&(t[c]=o,n=!0)}if(n){s=t,a=null;for(let r of f)r()}});var L={get(e){return s[e]},set(e,t){let n=u[e];n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]!==t&&(s={...s,[e]:t},e==="deviceModel"&&(a=null),y())},getAll(){return s},apply(e){let t=!1,n={...s};for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let c=r,i=u[c];i&&(i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||n[c]!==o&&(n[c]=o,t=!0))}t&&(s=n,a=null,y())},reset(){s=l(),a=null,y()},subscribe(e){return f.push(e),()=>{f=f.filter(t=>t!==e)}},getDeviceSpec(){return a||(a=w(s.deviceModel)),a},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{L as a};
1
+ /*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{g as w,i as u,j as m,k as l}from"./chunk-NXATOWWF.js";var p="sootsim:settings",v=["errorReporting","colorScheme","a11yMode","a11yDepth","screenshotCanvas","screenshotBackground","screenshotText","screenshotPose","screenshotDynamicSize","agentProvider","onboardingComplete","betaConsentVersion","detailedTelemetry"];function S(){if(typeof window>"u")return null;let e=window.sootsimElectron;return e&&typeof e=="object"?e:null}function g(e){let t={};for(let n of v){if(!(n in e))continue;let r=e[n],o=u[n];o.validate&&!o.validate(r)||o.options&&!o.options.includes(r)||(t[n]=r)}return t}function h(e){let t={};for(let n of v)t[n]=e[n];return t}function _(){if(typeof localStorage>"u")return{};try{let e=localStorage.getItem(p);return e?g(JSON.parse(e)):{}}catch{return{}}}function V(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(p,JSON.stringify(h(e)))}catch{}}function E(){let t=S()?.sharedConfig?.settings;return!t||typeof t!="object"?{}:g(t)}function K(e){let t=S();if(t?.writeSharedConfig)try{t.writeSharedConfig({settings:h(e)})}catch{}}function k(){if(typeof window>"u")return null;let e=window.__sootsimSharedConfig;return e&&typeof e=="object"?e:null}function j(){let e=k()?.settings;return!e||typeof e!="object"?{}:g(e)}function D(e){if(!k())return;let t={settings:h(e)};try{if(globalThis.__sootsimBridgeRequest?.writeSharedConfig?.(t))return}catch{}if(!(typeof fetch>"u"))try{fetch("/__sootsim/shared-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0}).catch(()=>{})}catch{}}function b(){let e=_(),t=j(),n=E();return{...e,...t,...n}}function R(e){V(e),K(e),D(e)}function C(e){if(typeof window>"u")return()=>{};let t=i=>{if(!(i.key!==p||i.newValue==null))try{e(g(JSON.parse(i.newValue)))}catch{}};window.addEventListener("storage",t);let n=S(),r;n?.onSharedConfigChanged&&(r=n.onSharedConfigChanged(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))}));let c=globalThis.__sootsimBridgeRequest?.subscribeSharedConfig?.(i=>{let d=i?.settings;!d||typeof d!="object"||e(g(d))});return()=>{window.removeEventListener("storage",t),r?.(),c?.()}}var M=l(),P=b();for(let e of Object.keys(m()))delete P[e];var s={...M,...P},f=[],a=null;function y(){for(let e of f)e();R(s)}C(e=>{let t={...s},n=!1;for(let[r,o]of Object.entries(e)){let c=r;t[c]!==o&&(t[c]=o,n=!0)}if(n){s=t,a=null;for(let r of f)r()}});var L={get(e){return s[e]},set(e,t){let n=u[e];n.validate&&!n.validate(t)||n.options&&!n.options.includes(t)||s[e]!==t&&(s={...s,[e]:t},e==="deviceModel"&&(a=null),y())},getAll(){return s},apply(e){let t=!1,n={...s};for(let[r,o]of Object.entries(e)){if(o===void 0)continue;let c=r,i=u[c];i&&(i.validate&&!i.validate(o)||i.options&&!i.options.includes(o)||n[c]!==o&&(n[c]=o,t=!0))}t&&(s=n,a=null,y())},reset(){s=l(),a=null,y()},subscribe(e){return f.push(e),()=>{f=f.filter(t=>t!==e)}},getDeviceSpec(){return a||(a=w(s.deviceModel)),a},getA11yMode(){return s.a11yMode},setA11yMode(e){this.set("a11yMode",e)},getInspectMode(){return s.inspectMode},setInspectMode(e){this.set("inspectMode",e)}};export{L as a};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.82 | (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-PYDAVGCZ.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
1
+ /*! sootsim v0.1.83 | (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-2AWQ7OB2.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,5 +1,5 @@
1
- /*! sootsim v0.1.82 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as R}from"./chunk-2W5C5J4O.js";var C="sootsimConfig";function m(e){return!!e&&Object.keys(e).length>0}function U(e){return e?m(e.modules)||m(e.turboModules)||m(e.nativeModules)||m(e.env)||m(e.settings)||m(e.initialState):!1}function x(e,r){let t=new URL(e);return U(r)?t.searchParams.set(C,JSON.stringify(r)):t.searchParams.delete(C),t.toString()}import{exec as E}from"child_process";import A from"http";import N from"net";import{promisify as L}from"util";var ee="/index.bundle?platform=ios&dev=true&hot=true&minify=false";function _(e){return/^https?:\/\//i.test(e)}function D(e){return e.endsWith(".bundle")}function T(e){process.env.SOOTSIM_PREVIEW_PROD_BUNDLE&&(e.searchParams.set("dev","false"),e.searchParams.set("minify","true"),e.searchParams.has("hot")&&e.searchParams.set("hot","false"))}function k(e){try{let r=_(e),t=new URL(e,"http://soot.local");return t.pathname=t.pathname.replace(/\.\.bundle$/,".bundle"),D(t.pathname)?(t.searchParams.delete("transform.bytecode"),T(t),r?t.toString():`${t.pathname}${t.search}${t.hash}`):e}catch{return e}}var v=L(E),$=250,O=1500,I=120;function B(e,r=I){return new Promise(t=>{let o=new N.Socket,s=!1,i=a=>{s||(s=!0,o.destroy(),t(a))};o.setTimeout(r),o.once("connect",()=>i(!0)),o.once("timeout",()=>i(!1)),o.once("error",()=>i(!1)),o.connect(e,"localhost")})}function h(e,r,t="GET",o=$,s={}){return new Promise(i=>{let a=A.request({hostname:"localhost",port:e,path:r,method:t,timeout:o,headers:s},n=>{let u="";n.on("data",l=>u+=l.toString());let c=(()=>{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:u,contentType:c}))});a.on("error",()=>i(null)),a.setTimeout(o,()=>{a.destroy(),i(null)}),a.end()})}var H=[8081,8082,8083,8084,8085,8086,3e3,3001,19e3].map(e=>({port:e,pid:0}));function P(e,r){return!(e<=0||e>=2e4||r.has(e)||e>=5170&&e<=5200)}async function j(e=[]){let r=new Set(e);try{let{stdout:t}=await v("lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | grep -E '^(node|bun)'",{encoding:"utf8",timeout:2e3});if(t.trim()){let o=new Map;for(let s of t.trim().split(`
1
+ /*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ import{a as R}from"./chunk-PEHFE3LG.js";var C="sootsimConfig";function m(e){return!!e&&Object.keys(e).length>0}function U(e){return e?m(e.modules)||m(e.turboModules)||m(e.nativeModules)||m(e.env)||m(e.settings)||m(e.initialState):!1}function x(e,r){let t=new URL(e);return U(r)?t.searchParams.set(C,JSON.stringify(r)):t.searchParams.delete(C),t.toString()}import{exec as E}from"child_process";import A from"http";import N from"net";import{promisify as L}from"util";var ee="/index.bundle?platform=ios&dev=true&hot=true&minify=false";function _(e){return/^https?:\/\//i.test(e)}function D(e){return e.endsWith(".bundle")}function T(e){process.env.SOOTSIM_PREVIEW_PROD_BUNDLE&&(e.searchParams.set("dev","false"),e.searchParams.set("minify","true"),e.searchParams.has("hot")&&e.searchParams.set("hot","false"))}function k(e){try{let r=_(e),t=new URL(e,"http://soot.local");return t.pathname=t.pathname.replace(/\.\.bundle$/,".bundle"),D(t.pathname)?(t.searchParams.delete("transform.bytecode"),T(t),r?t.toString():`${t.pathname}${t.search}${t.hash}`):e}catch{return e}}var v=L(E),$=250,O=1500,I=120;function B(e,r=I){return new Promise(t=>{let o=new N.Socket,s=!1,i=a=>{s||(s=!0,o.destroy(),t(a))};o.setTimeout(r),o.once("connect",()=>i(!0)),o.once("timeout",()=>i(!1)),o.once("error",()=>i(!1)),o.connect(e,"localhost")})}function h(e,r,t="GET",o=$,s={}){return new Promise(i=>{let a=A.request({hostname:"localhost",port:e,path:r,method:t,timeout:o,headers:s},n=>{let u="";n.on("data",l=>u+=l.toString());let c=(()=>{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:u,contentType:c}))});a.on("error",()=>i(null)),a.setTimeout(o,()=>{a.destroy(),i(null)}),a.end()})}var H=[8081,8082,8083,8084,8085,8086,3e3,3001,19e3].map(e=>({port:e,pid:0}));function P(e,r){return!(e<=0||e>=2e4||r.has(e)||e>=5170&&e<=5200)}async function j(e=[]){let r=new Set(e);try{let{stdout:t}=await v("lsof -iTCP -sTCP:LISTEN -P -n 2>/dev/null | grep -E '^(node|bun)'",{encoding:"utf8",timeout:2e3});if(t.trim()){let o=new Map;for(let s of t.trim().split(`
3
3
  `)){let i=s.trim().split(/\s+/);if(i.length<9)continue;let a=Number(i[1]),u=i[8].match(/:(\d+)$/);if(!u)continue;let c=Number(u[1]);P(c,r)&&(o.has(c)||o.set(c,a))}if(o.size>0)return[...o.entries()].map(([s,i])=>({port:s,pid:i}))}}catch{}try{let{stdout:t}=await v(`ss -tlnp 2>/dev/null | grep -E '"(node|bun)"'`,{encoding:"utf8",timeout:2e3});if(t.trim()){let o=new Map;for(let s of t.trim().split(`
4
4
  `)){let i=s.match(/:(\d+)\s/),a=s.match(/pid=(\d+)/);if(!i)continue;let n=Number(i[1]),u=a?Number(a[1]):0;P(n,r)&&(o.has(n)||o.set(n,u))}if(o.size>0)return[...o.entries()].map(([s,i])=>({port:s,pid:i}))}}catch{}return H.filter(t=>P(t.port,r))}var y=new Map;async function W(e){if(e<=0)return null;let r=y.get(e);if(r)return r;try{let{stdout:t}=await v(`lsof -p ${e} -a -d cwd -Fn 2>/dev/null`,{encoding:"utf8",timeout:1500});for(let o of t.split(`
5
5
  `))if(o.startsWith("n")&&o.length>1){let s=o.slice(1).trim();if(s)return y.set(e,s),s}}catch{}return null}function F(e,r){return{port:e,framework:r,bundleUrl:p(e,`http://localhost:${e}/index.bundle?platform=ios&dev=true&hot=true&minify=false`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()}}function p(e,r){let t=R.find(s=>s.preferredPort===e),o=t?.runtimeConfig?x(r,t.runtimeConfig):r;return k(o)}function G(e){return e.includes("/node_modules/one/metro-entry.bundle")}function z(e){try{let r=JSON.parse(e);return r&&typeof r=="object"?r:null}catch{return null}}function b(e,r,t){if(!r)return e;try{let o=JSON.parse(r.body),s=o?.extra?.expoClient||o?.extra||{};s.name&&(e.projectName=s.name),s.ios?.bundleIdentifier&&(e.bundleId=s.ios.bundleIdentifier),e.framework==="metro"&&s.sdkVersion&&(e.framework="expo");let i=o?.launchAsset?.url;i&&!e.patched&&!G(e.bundleUrl)&&(e.bundleUrl=p(e.port,i));let a=s.iconUrl||s.ios?.iconUrl||s.icon||s.ios?.icon;if(a)if(e.iconPath=a,t)if(a.startsWith("http"))e.iconUrl=t(a);else{let n=a.replace(/^\.\//,"");e.iconUrl=t(`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,S=new Set;async function J(e,r){if(!await B(e))return null;let t="/node_modules/one/metro-entry.bundle?platform=ios&dev=true",[o,s,i,a]=await Promise.all([d.has(e)?Promise.resolve(null):h(e,"/__soot/"),h(e,"/status"),S.has(e)?Promise.resolve(null):h(e,"/","GET",O,{"expo-platform":"ios"}),f.has(e)?Promise.resolve(null):h(e,"/_expo/status")]);a&&a.statusCode===200?f.delete(e):f.has(e)||f.add(e);let n=i?z(i.body):null,u=typeof n?.launchAsset?.url=="string"?n.launchAsset.url:null,c=n?.extra?.expoClient||n?.extra||{};if(n&&(u||typeof c.name=="string")){d.add(e);let g=u||`http://localhost:${e}/index.bundle?platform=ios&dev=true&hot=true&minify=false`,M=g.includes("/one/metro-entry.bundle")?"one":"expo";return b({port:e,framework:M,bundleUrl:p(e,g),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()},i,r)}if(s&&s.body.includes("packager-status:running"))return d.add(e),b(F(e,a&&a.statusCode===200?"expo":"metro"),i,r);if(o&&o.statusCode===200&&o.body.includes("sootsim-patched"))return d.delete(e),b({port:e,framework:"one",bundleUrl:p(e,`http://localhost:${e}/__soot/bundle.js`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now(),patched:!0},i,r);let l=await h(e,t,"HEAD");return l&&l.statusCode>0&&l.statusCode<400&&/application\/javascript/i.test(l.contentType||"")?(d.add(e),S.add(e),b({port:e,framework:"one",bundleUrl:p(e,`http://localhost:${e}${t}&minify=false`),hmrUrl:`ws://localhost:${e}/hot`,lastSeen:Date.now()},i,r)):(d.add(e),null)}function K(e){let r=e.projectName?.trim().toLowerCase();return!!(r==="soot"||r==="sootsim"||e.bundleId?.trim().toLowerCase()?.startsWith("dev.soot"))}var w=new Map,V=3e4,q=1500;function Q(e){return!e||e.framework==="metro"||e.framework==="unknown"}function Y(e){return e?p(e.port,e.bundleUrl)===e.bundleUrl:!0}function X(e,r,t=Date.now()){if(r===0||e.pid!==r||!Y(e.result))return!1;let o=t-e.cachedAt;return!(e.result===null&&o>=V||Q(e.result)&&o>=q)}async function ce(e={}){let r=await j(e.excludePorts),t=new Set(r.map(n=>n.port));for(let n of[...w.keys()])t.has(n)||w.delete(n);for(let n of[...d])t.has(n)||d.delete(n);for(let n of[...f])t.has(n)||f.delete(n);for(let n of[...S])t.has(n)||S.delete(n);let o=[],s=[];for(let{port:n,pid:u}of r){let c=w.get(n);if(c&&X(c,u)){c.result&&o.push(c.result);continue}c&&c.pid!==u&&(d.delete(n),f.delete(n),S.delete(n)),s.push({port:n,pid:u})}s.length>0&&(await Promise.all(s.map(u=>J(u.port,e.buildIconProxyUrl)))).forEach((u,c)=>{let{port:l,pid:g}=s[c];g!==0&&w.set(l,{pid:g,result:u,cachedAt:Date.now()}),u&&o.push(u)});let i=new Map;for(let{port:n,pid:u}of r)u>0&&i.set(n,u);await Promise.all(o.map(async n=>{let u=i.get(n.port);if(!u)return;n.pid=u;let c=await W(u);c&&(n.cwd=c)}));let a=new Set(i.values());for(let n of[...y.keys()])a.has(n)||y.delete(n);return o.filter(n=>!K(n))}export{x as a,ee as b,k as c,J as d,ce as e};