sootsim 0.1.81 → 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.
- package/dist-cli/bin.js +3 -3
- package/dist-cli/chunks/{agent-UJBKYOCB.js → agent-MQ7GLVIB.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-PQAB6NSJ.js → agent-wrapper-7KAFDQCN.js} +2 -2
- package/dist-cli/chunks/{assert-KCFN2HRU.js → assert-TV46GUNU.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-FQS4ZD2K.js +2 -0
- package/dist-cli/chunks/beta-VG7CDY2U.js +2 -0
- package/dist-cli/chunks/{chunk-MMHH4PMP.js → chunk-277XAALA.js} +3 -3
- package/dist-cli/chunks/{chunk-XZCOVJSW.js → chunk-2AWQ7OB2.js} +1 -1
- package/dist-cli/chunks/chunk-2OIBDYHW.js +1 -0
- package/dist-cli/chunks/{chunk-G7OOSA3T.js → chunk-2PY3UZVO.js} +2 -2
- package/dist-cli/chunks/{chunk-EQXJOORV.js → chunk-4LS5MZAI.js} +3 -3
- package/dist-cli/chunks/{chunk-XCV5NWEP.js → chunk-572VSFNP.js} +1 -1
- package/dist-cli/chunks/{chunk-J4CA4F74.js → chunk-5DJXZIFZ.js} +1 -1
- package/dist-cli/chunks/chunk-6BNLVMXA.js +1 -0
- package/dist-cli/chunks/{chunk-M2T6GWZU.js → chunk-6NN2D4EJ.js} +2 -2
- package/dist-cli/chunks/{chunk-GFLMBF36.js → chunk-6TNANCQC.js} +2 -2
- package/dist-cli/chunks/chunk-6XD6CBJM.js +2 -0
- package/dist-cli/chunks/{chunk-3ITP5DCL.js → chunk-6XZOEBTZ.js} +2 -2
- package/dist-cli/chunks/chunk-CHQTO426.js +1 -0
- package/dist-cli/chunks/{chunk-VY2IT7TQ.js → chunk-CJY3AVI7.js} +1 -1
- package/dist-cli/chunks/{chunk-II5KVWDI.js → chunk-CYV6Y6YV.js} +53 -15
- package/dist-cli/chunks/{chunk-PC4TGQYJ.js → chunk-DM6WT7QM.js} +1 -1
- package/dist-cli/chunks/{chunk-25TQ7F5P.js → chunk-DP7O5MHK.js} +2 -2
- package/dist-cli/chunks/{chunk-P5KW7CBY.js → chunk-ECJBV65H.js} +2 -2
- package/dist-cli/chunks/{chunk-ZK7QY7ST.js → chunk-F3HP444U.js} +1 -1
- package/dist-cli/chunks/{chunk-Q6TWLIUU.js → chunk-FAPYGVIU.js} +2 -2
- package/dist-cli/chunks/{chunk-YBA4MUAF.js → chunk-FJYT7XL2.js} +2 -2
- package/dist-cli/chunks/{chunk-ZRGZM4C4.js → chunk-FRM355UL.js} +2 -2
- package/dist-cli/chunks/{chunk-Q6RYI3ND.js → chunk-HAWOAQAG.js} +3 -3
- package/dist-cli/chunks/{chunk-BOFDWCQB.js → chunk-HNWEELAE.js} +1 -1
- package/dist-cli/chunks/{chunk-ADIYZB6J.js → chunk-IBNRRAES.js} +2 -2
- package/dist-cli/chunks/{chunk-JPP34M72.js → chunk-IP3QJLRH.js} +1 -1
- package/dist-cli/chunks/{chunk-PB4HZQET.js → chunk-J2GYISVJ.js} +2 -2
- package/dist-cli/chunks/{chunk-YRSS436D.js → chunk-JHJNODXN.js} +2 -2
- package/dist-cli/chunks/{chunk-BAPYWOQJ.js → chunk-JQ7ZXOXJ.js} +2 -2
- package/dist-cli/chunks/{chunk-GJ645NI4.js → chunk-KASUZ5XV.js} +1 -1
- package/dist-cli/chunks/{chunk-T63O6JUH.js → chunk-NXATOWWF.js} +1 -1
- package/dist-cli/chunks/{chunk-WB5NVHYB.js → chunk-OYMFNU3M.js} +1 -1
- package/dist-cli/chunks/{chunk-M7T4E7GA.js → chunk-PEHFE3LG.js} +2 -2
- package/dist-cli/chunks/{chunk-2IPRONLT.js → chunk-PM5NVKLP.js} +2 -2
- package/dist-cli/chunks/{chunk-GQTUQIQ4.js → chunk-RH4F2TF7.js} +1 -1
- package/dist-cli/chunks/chunk-RXH2SLKF.js +2 -0
- package/dist-cli/chunks/chunk-UXQWC5ZR.js +79 -0
- package/dist-cli/chunks/{chunk-Q3IYWRN6.js → chunk-VMXWC2JO.js} +2 -2
- package/dist-cli/chunks/{chunk-Q3JHBOX2.js → chunk-WN7M3QON.js} +2 -2
- package/dist-cli/chunks/{chunk-IWIHTU2Q.js → chunk-WTKTOL3C.js} +2 -2
- package/dist-cli/chunks/chunk-XFQL74PF.js +5 -0
- package/dist-cli/chunks/chunk-Y2VJBRSP.js +119 -0
- package/dist-cli/chunks/{chunk-CIYIOZPN.js → chunk-Y4BUVURT.js} +2 -2
- package/dist-cli/chunks/{chunk-GLWFGEVP.js → chunk-YUELRHGB.js} +2 -2
- package/dist-cli/chunks/cli-version-PWF6I6LY.js +2 -0
- package/dist-cli/chunks/{compat-WAEGXXEW.js → compat-QLLWBTS3.js} +3 -3
- package/dist-cli/chunks/{config-3QXYGCBQ.js → config-2DSLDCXV.js} +2 -2
- package/dist-cli/chunks/{control-WZZJAPR3.js → control-UIOXGYXU.js} +2 -2
- package/dist-cli/chunks/{cpu-profile-KO62GNV5.js → cpu-profile-GEIKHCPC.js} +2 -2
- package/dist-cli/chunks/daemon-4EBUFN4D.js +66 -0
- package/dist-cli/chunks/{debug-FAOUHIAG.js → debug-WGD6XWOF.js} +3 -3
- package/dist-cli/chunks/demo-app-registry-G3BDOFWC.js +2 -0
- package/dist-cli/chunks/{detox-Q3W7JS3H.js → detox-LNKGRZU6.js} +2 -2
- package/dist-cli/chunks/{device-42VLA5W5.js → device-AYKXKVIQ.js} +2 -2
- package/dist-cli/chunks/{diagnose-ZNWJM4X6.js → diagnose-TMXSDOOC.js} +2 -2
- package/dist-cli/chunks/drivers-IDQF34HP.js +2 -0
- package/dist-cli/chunks/{electron-PLULBHHF.js → electron-QFPF7TBY.js} +3 -3
- package/dist-cli/chunks/flow-3JN3Y7RF.js +2 -0
- package/dist-cli/chunks/{hints-PP6G2PN7.js → hints-MXKRR4TG.js} +2 -2
- package/dist-cli/chunks/{home-paths-L5MBP4Z6.js → home-paths-REMWQDAO.js} +2 -2
- package/dist-cli/chunks/{inspect-NXJZOWDT.js → inspect-XGSQNFV7.js} +3 -3
- package/dist-cli/chunks/install-2N3YOOSN.js +2 -0
- package/dist-cli/chunks/install-desktop-NQG3RZSA.js +23 -0
- package/dist-cli/chunks/{keys-YPWK4LKD.js → keys-5QZWXL3F.js} +2 -2
- package/dist-cli/chunks/{launch-D3SSPM33.js → launch-SBXOZWKO.js} +3 -3
- package/dist-cli/chunks/login-EACQXE24.js +26 -0
- package/dist-cli/chunks/{logout-FZRRJKOJ.js → logout-IBQLMUML.js} +2 -2
- package/dist-cli/chunks/{maestro-DU2TXXRN.js → maestro-LFYXUX7O.js} +2 -2
- package/dist-cli/chunks/{preview-2UYWMTZ6.js → preview-U4SBOEGQ.js} +2 -2
- package/dist-cli/chunks/{profile-A566ICHG.js → profile-GWS5ECMY.js} +2 -2
- package/dist-cli/chunks/{react-2JDBFLZ6.js → react-QDHLMVYL.js} +2 -2
- package/dist-cli/chunks/record-BUEUWPDI.js +70 -0
- package/dist-cli/chunks/runtime-PVB4VGUH.js +2 -0
- package/dist-cli/chunks/{runtime-delivery-NCGNIHC3.js → runtime-delivery-G7L6RVZ7.js} +2 -2
- package/dist-cli/chunks/{screenshot-LTDSU7XO.js → screenshot-T2HBA3VI.js} +2 -2
- package/dist-cli/chunks/{screenshot-mode-QFNEHHTX.js → screenshot-mode-EG5HMIH3.js} +2 -2
- package/dist-cli/chunks/{screenshots-ODDRHWKW.js → screenshots-S52AFHTV.js} +2 -2
- package/dist-cli/chunks/{server-AB6B475P.js → server-MFFVYUGG.js} +2 -2
- package/dist-cli/chunks/setup-repo-YOF7NV5D.js +2 -0
- package/dist-cli/chunks/{skills-VT2LYFIC.js → skills-HQGWBS2O.js} +2 -2
- package/dist-cli/chunks/{start-TLBKZDB6.js → start-E3DRYY7W.js} +4 -4
- package/dist-cli/chunks/store-MAI6D3UO.js +2 -0
- package/dist-cli/chunks/telemetry-RCQKCJTH.js +2 -0
- package/dist-cli/chunks/{test-GKMCKD65.js → test-ZY3EF62K.js} +3 -3
- package/dist-cli/chunks/{three-mode-6KODH5Y6.js → three-mode-WSPKQCJ5.js} +2 -2
- package/dist-cli/chunks/{timeline-U3IY6NK5.js → timeline-3XAB5EWZ.js} +2 -2
- package/dist-cli/chunks/{upgrade-W24MFLUR.js → upgrade-WNENPFM5.js} +2 -2
- package/dist-cli/chunks/upload-YLJ4RA73.js +2 -0
- package/dist-cli/chunks/{web-VT7LAGMK.js → web-D2AOZY44.js} +2 -2
- package/dist-cli/chunks/{what-happened-4DHTJYYO.js → what-happened-F43KNSG6.js} +2 -2
- package/dist-cli/chunks/{whoami-CM775PTS.js → whoami-T22VBR7C.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +21 -21
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/vite-base.cjs +21 -21
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/auto-bootstrap-MAZA7QWP.js +0 -2
- package/dist-cli/chunks/beta-KO7G2QIW.js +0 -2
- package/dist-cli/chunks/chunk-2UBJ3CHB.js +0 -2
- package/dist-cli/chunks/chunk-APWBBUFX.js +0 -1
- package/dist-cli/chunks/chunk-BXC7K7RO.js +0 -1
- package/dist-cli/chunks/chunk-JPSDR2TX.js +0 -5
- package/dist-cli/chunks/chunk-N55OF7E4.js +0 -73
- package/dist-cli/chunks/chunk-ST2OBG6U.js +0 -1
- package/dist-cli/chunks/chunk-T4B5WH56.js +0 -119
- package/dist-cli/chunks/chunk-TRDL6X6C.js +0 -2
- package/dist-cli/chunks/cli-version-IHSZB57Q.js +0 -2
- package/dist-cli/chunks/daemon-ZYFVG5SF.js +0 -65
- package/dist-cli/chunks/demo-app-registry-2S3DCN2E.js +0 -2
- package/dist-cli/chunks/drivers-IESTOEEK.js +0 -2
- package/dist-cli/chunks/flow-OM3O5RPO.js +0 -2
- package/dist-cli/chunks/install-QFV6HS2J.js +0 -2
- package/dist-cli/chunks/install-desktop-44KTEOAW.js +0 -23
- package/dist-cli/chunks/login-3Q2JNIX7.js +0 -26
- package/dist-cli/chunks/record-4VJZKPDS.js +0 -70
- package/dist-cli/chunks/runtime-V7KTEZGZ.js +0 -2
- package/dist-cli/chunks/setup-repo-KKZWDQDU.js +0 -2
- package/dist-cli/chunks/store-J26S54GN.js +0 -2
- package/dist-cli/chunks/telemetry-KD6452TY.js +0 -2
- package/dist-cli/chunks/upload-3CEQY7UP.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{A as y,L as x,y as F,z as T}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{A as y,L as x,y as F,z as T}from"./chunk-RH4F2TF7.js";import{c as S,e as N}from"./chunk-YUELRHGB.js";import{b as k}from"./chunk-HNWEELAE.js";import"./chunk-6XD6CBJM.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.js";function _(n){let e=[];for(let t=0;t<n.length;t++)if(n[t]==="--since"&&t+1<n.length){e.push(t,t+1);let s=n[t+1].trim(),l=/^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(s);if(l){let a=Number(l[1]),m=l[2]??"ms",$=m==="s"?a*1e3:m==="m"?a*6e4:a;return{since:Date.now()-$,consumed:e}}let o=Number(s);if(Number.isFinite(o)&&o>1e12)return{since:o,consumed:e}}return{consumed:e}}function K(n){let e=[];for(let t=0;t<n.length;t++)if(n[t]==="--kinds"&&t+1<n.length)return e.push(t,t+1),{kinds:n[t+1].split(",").map(s=>s.trim()).filter(Boolean),consumed:e};return{consumed:e}}function O(n){let e=[];for(let t=0;t<n.length;t++)if(n[t]==="--limit"&&t+1<n.length){e.push(t,t+1);let s=Number(n[t+1]);if(Number.isFinite(s)&&s>0)return{limit:s,consumed:e}}return{consumed:e}}function j(n,e){if(e===null)return new Date(n).toLocaleTimeString();let t=(n-e)/1e3;return`${t>=0?"+":""}${t.toFixed(2)}s`}function B(n,e){switch(n){case"app-launch":return e.phase==="launch"?`launch ${e.appName??e.toAppId??""}`:`dismiss ${e.appName??e.fromAppId??""} \u2192 ${e.toAppId??""}`;case"toast":return`"${e.text??""}"${e.durationMs?` (${e.durationMs}ms)`:""}`;case"keyboard":return`${e.phase??"?"}${e.heightPx?` h=${e.heightPx}`:""}${e.mode?` ${e.mode}`:""}`;case"screen":return`${e.phase??"?"} ${e.name??e.activeName??""}`;case"route":return`${e.phase??"?"} ${e.path??e.pathname??""}`;case"alert":case"actionsheet":case"picker":return`${e.phase??"?"} ${e.title??e.message??""}`;case"notification":return`${e.title??""}${e.body?` \u2014 ${e.body}`:""}`;case"fetch":return`${e.method??"GET"} ${e.url??""}${e.status?` -> ${e.status}`:""}`;case"console":return`${e.level??"log"}: ${(e.message??"").toString().slice(0,120)}`;case"shell":return`${e.event??e.type??e.phase??""}`;case"scroll":return`${e.phase??"?"} ${e.target??""}`;case"gesture":return`${e.phase??"?"} ${e.type??""}`;case"text-input":return`${e.phase??"?"}${e.value!==void 0?` "${String(e.value).slice(0,40)}"`:""}`;case"layout":return`${e.kind??"?"} ${e.testID??e.type??""}${e.skipped?` skipped:${e.reason??"unknown"}`:""}`;case"react-commit":{let t=e.slowest;return`${e.fiberCount??"?"} fibers ${e.durationMs??"?"}ms${t?.displayName?` \xB7 ${t.displayName} ${t.durationMs??"?"}ms`:""}`}case"reanimated":case"animation":return`${e.kind??""} ${e.target??""}${e.durationMs?` ${e.durationMs}ms`:""}`}}function A(n,e){let t=j(n.t,e).padStart(8),s=n.context.padEnd(6),l=`[${n.kind}]`.padEnd(15),o="",a=n.data;return a&&typeof a=="object"&&(o=B(n.kind,a)),` ${t} ${s} ${l} ${o}`}function M(n){let e=[],t={label:"initial state",events:[],startedAt:n[0]?.t??null};e.push(t);for(let s of n)if(t.events.push(s),s.kind==="screen"||s.kind==="route"){let l=s.data,o=l?.phase;if(!o||o==="enter"||o==="appear"||o==="active"){let a=l?.name||l?.activeName||l?.path||l?.pathname||s.kind;e.length===1&&t.events.length===1?t.label=`${s.kind}: ${a}`:(t={label:`${s.kind}: ${a}`,events:[],startedAt:s.t},e.push(t))}}return e}async function J(n,e){let t=S(n,{port:e.port,stripBooleanFlags:["--summary","--all","--json","--no-advance","--help","-h","--flow","--noisy"],stripValueFlags:["--since","--kinds","--limit"]});(n.includes("--help")||n.includes("-h"))&&(console.log(`
|
|
3
3
|
sootsim what-happened \u2014 show recent events from the semantic timeline
|
|
4
4
|
|
|
5
5
|
usage:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
2
|
-
import{d as i}from"./chunk-
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
import{d as i}from"./chunk-DP7O5MHK.js";import{d as n}from"./chunk-2PY3UZVO.js";import"./chunk-2AWQ7OB2.js";import"./chunk-OYMFNU3M.js";async function u(){let o=i();if(o||(console.log(" not signed in"),console.log(" set SOOTSIM_API_KEY=sk_sootsim_\u2026 or run `sootsim login`"),process.exit(1)),o.kind==="api-key"){let r=`${o.secret.slice(0,14)}\u2026`,t=o.source==="env"?"SOOTSIM_API_KEY env var":"saved key (~/.config/sootsim/credentials.json)";console.log(` api key ${r}`),console.log(` source: ${t}`);return}if(o.kind==="github"){console.log(` github token (${o.source})`),console.log(` repo: ${o.repoId}`);return}let e=await n(),s=e?.user;console.log(` ${s?.email||s?.name||s?.id||"signed in"}`),console.log(` origin: ${e?.origin??o.origin}`),e?.updatedAt&&console.log(` updated: ${e.updatedAt}`)}export{u as runWhoami};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/config.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1079,10 +1079,9 @@ var knownOne = /* @__PURE__ */ new Set();
|
|
|
1079
1079
|
async function probePort(port, buildIconProxyUrl) {
|
|
1080
1080
|
if (!await tcpPing(port)) return null;
|
|
1081
1081
|
const onePath = `/node_modules/one/metro-entry.bundle?platform=ios&dev=true`;
|
|
1082
|
-
const [sootsimRes, statusRes,
|
|
1082
|
+
const [sootsimRes, statusRes, manifestRes, expoRes] = await Promise.all([
|
|
1083
1083
|
knownNonPatched.has(port) ? Promise.resolve(null) : httpGet(port, "/__soot/"),
|
|
1084
1084
|
httpGet(port, "/status"),
|
|
1085
|
-
httpGet(port, onePath, "HEAD"),
|
|
1086
1085
|
knownOne.has(port) ? Promise.resolve(null) : httpGet(port, "/", "GET", MANIFEST_TIMEOUT_MS, { "expo-platform": "ios" }),
|
|
1087
1086
|
knownNonExpo.has(port) ? Promise.resolve(null) : httpGet(port, "/_expo/status")
|
|
1088
1087
|
]);
|
|
@@ -1112,24 +1111,6 @@ async function probePort(port, buildIconProxyUrl) {
|
|
|
1112
1111
|
buildIconProxyUrl
|
|
1113
1112
|
);
|
|
1114
1113
|
}
|
|
1115
|
-
if (oneRes && oneRes.statusCode > 0 && oneRes.statusCode < 400 && /application\/javascript/i.test(oneRes.contentType || "")) {
|
|
1116
|
-
knownNonPatched.add(port);
|
|
1117
|
-
knownOne.add(port);
|
|
1118
|
-
return applyManifest(
|
|
1119
|
-
{
|
|
1120
|
-
port,
|
|
1121
|
-
framework: "one",
|
|
1122
|
-
bundleUrl: withRuntimeConfig(
|
|
1123
|
-
port,
|
|
1124
|
-
`http://localhost:${port}${onePath}&minify=false`
|
|
1125
|
-
),
|
|
1126
|
-
hmrUrl: `ws://localhost:${port}/hot`,
|
|
1127
|
-
lastSeen: Date.now()
|
|
1128
|
-
},
|
|
1129
|
-
manifestRes,
|
|
1130
|
-
buildIconProxyUrl
|
|
1131
|
-
);
|
|
1132
|
-
}
|
|
1133
1114
|
if (statusRes && statusRes.body.includes("packager-status:running")) {
|
|
1134
1115
|
knownNonPatched.add(port);
|
|
1135
1116
|
return applyManifest(
|
|
@@ -1153,6 +1134,25 @@ async function probePort(port, buildIconProxyUrl) {
|
|
|
1153
1134
|
buildIconProxyUrl
|
|
1154
1135
|
);
|
|
1155
1136
|
}
|
|
1137
|
+
const oneRes = await httpGet(port, onePath, "HEAD");
|
|
1138
|
+
if (oneRes && oneRes.statusCode > 0 && oneRes.statusCode < 400 && /application\/javascript/i.test(oneRes.contentType || "")) {
|
|
1139
|
+
knownNonPatched.add(port);
|
|
1140
|
+
knownOne.add(port);
|
|
1141
|
+
return applyManifest(
|
|
1142
|
+
{
|
|
1143
|
+
port,
|
|
1144
|
+
framework: "one",
|
|
1145
|
+
bundleUrl: withRuntimeConfig(
|
|
1146
|
+
port,
|
|
1147
|
+
`http://localhost:${port}${onePath}&minify=false`
|
|
1148
|
+
),
|
|
1149
|
+
hmrUrl: `ws://localhost:${port}/hot`,
|
|
1150
|
+
lastSeen: Date.now()
|
|
1151
|
+
},
|
|
1152
|
+
manifestRes,
|
|
1153
|
+
buildIconProxyUrl
|
|
1154
|
+
);
|
|
1155
|
+
}
|
|
1156
1156
|
knownNonPatched.add(port);
|
|
1157
1157
|
return null;
|
|
1158
1158
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/profiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/render-mode.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/vite-base.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1073,10 +1073,9 @@ function applyManifest(result, manifestRes, buildIconProxyUrl) {
|
|
|
1073
1073
|
async function probePort(port, buildIconProxyUrl) {
|
|
1074
1074
|
if (!await tcpPing(port)) return null;
|
|
1075
1075
|
const onePath = `/node_modules/one/metro-entry.bundle?platform=ios&dev=true`;
|
|
1076
|
-
const [sootsimRes, statusRes,
|
|
1076
|
+
const [sootsimRes, statusRes, manifestRes, expoRes] = await Promise.all([
|
|
1077
1077
|
knownNonPatched.has(port) ? Promise.resolve(null) : httpGet(port, "/__soot/"),
|
|
1078
1078
|
httpGet(port, "/status"),
|
|
1079
|
-
httpGet(port, onePath, "HEAD"),
|
|
1080
1079
|
knownOne.has(port) ? Promise.resolve(null) : httpGet(port, "/", "GET", MANIFEST_TIMEOUT_MS, { "expo-platform": "ios" }),
|
|
1081
1080
|
knownNonExpo.has(port) ? Promise.resolve(null) : httpGet(port, "/_expo/status")
|
|
1082
1081
|
]);
|
|
@@ -1106,24 +1105,6 @@ async function probePort(port, buildIconProxyUrl) {
|
|
|
1106
1105
|
buildIconProxyUrl
|
|
1107
1106
|
);
|
|
1108
1107
|
}
|
|
1109
|
-
if (oneRes && oneRes.statusCode > 0 && oneRes.statusCode < 400 && /application\/javascript/i.test(oneRes.contentType || "")) {
|
|
1110
|
-
knownNonPatched.add(port);
|
|
1111
|
-
knownOne.add(port);
|
|
1112
|
-
return applyManifest(
|
|
1113
|
-
{
|
|
1114
|
-
port,
|
|
1115
|
-
framework: "one",
|
|
1116
|
-
bundleUrl: withRuntimeConfig(
|
|
1117
|
-
port,
|
|
1118
|
-
`http://localhost:${port}${onePath}&minify=false`
|
|
1119
|
-
),
|
|
1120
|
-
hmrUrl: `ws://localhost:${port}/hot`,
|
|
1121
|
-
lastSeen: Date.now()
|
|
1122
|
-
},
|
|
1123
|
-
manifestRes,
|
|
1124
|
-
buildIconProxyUrl
|
|
1125
|
-
);
|
|
1126
|
-
}
|
|
1127
1108
|
if (statusRes && statusRes.body.includes("packager-status:running")) {
|
|
1128
1109
|
knownNonPatched.add(port);
|
|
1129
1110
|
return applyManifest(
|
|
@@ -1147,6 +1128,25 @@ async function probePort(port, buildIconProxyUrl) {
|
|
|
1147
1128
|
buildIconProxyUrl
|
|
1148
1129
|
);
|
|
1149
1130
|
}
|
|
1131
|
+
const oneRes = await httpGet(port, onePath, "HEAD");
|
|
1132
|
+
if (oneRes && oneRes.statusCode > 0 && oneRes.statusCode < 400 && /application\/javascript/i.test(oneRes.contentType || "")) {
|
|
1133
|
+
knownNonPatched.add(port);
|
|
1134
|
+
knownOne.add(port);
|
|
1135
|
+
return applyManifest(
|
|
1136
|
+
{
|
|
1137
|
+
port,
|
|
1138
|
+
framework: "one",
|
|
1139
|
+
bundleUrl: withRuntimeConfig(
|
|
1140
|
+
port,
|
|
1141
|
+
`http://localhost:${port}${onePath}&minify=false`
|
|
1142
|
+
),
|
|
1143
|
+
hmrUrl: `ws://localhost:${port}/hot`,
|
|
1144
|
+
lastSeen: Date.now()
|
|
1145
|
+
},
|
|
1146
|
+
manifestRes,
|
|
1147
|
+
buildIconProxyUrl
|
|
1148
|
+
);
|
|
1149
|
+
}
|
|
1150
1150
|
knownNonPatched.add(port);
|
|
1151
1151
|
return null;
|
|
1152
1152
|
}
|
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.83 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.81 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{a,b,c,d}from"./chunk-EQXJOORV.js";import"./chunk-GLWFGEVP.js";import"./chunk-BOFDWCQB.js";import"./chunk-TRDL6X6C.js";import"./chunk-XZCOVJSW.js";import"./chunk-WB5NVHYB.js";export{c as ensureDaemonRunning,a as ensureRuntimeInstalled,d as ensureSootsimReady,b as resolveBootstrapPort};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.81 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.81 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.81 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{a as R}from"./chunk-M7T4E7GA.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=u=>{s||(s=!0,o.destroy(),t(u))};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 u=A.request({hostname:"localhost",port:e,path:r,method:t,timeout:o,headers:s},n=>{let a="";n.on("data",l=>a+=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:a,contentType:c}))});u.on("error",()=>i(null)),u.setTimeout(o,()=>{u.destroy(),i(null)}),u.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
|
-
`)){let i=s.trim().split(/\s+/);if(i.length<9)continue;let u=Number(i[1]),a=i[8].match(/:(\d+)$/);if(!a)continue;let c=Number(a[1]);P(c,r)&&(o.has(c)||o.set(c,u))}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
|
-
`)){let i=s.match(/:(\d+)\s/),u=s.match(/pid=(\d+)/);if(!i)continue;let n=Number(i[1]),a=u?Number(u[1]):0;P(n,r)&&(o.has(n)||o.set(n,a))}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
|
-
`))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 u=s.iconUrl||s.ios?.iconUrl||s.icon||s.ios?.icon;if(u)if(e.iconPath=u,t)if(u.startsWith("http"))e.iconUrl=t(u);else{let n=u.replace(/^\.\//,"");e.iconUrl=t(`http://localhost:${e.port}/assets/${n}`)}else e.iconUrl=u.startsWith("http")?u:`http://localhost:${e.port}/assets/${u.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,u,n]=await Promise.all([d.has(e)?Promise.resolve(null):h(e,"/__soot/"),h(e,"/status"),h(e,t,"HEAD"),S.has(e)?Promise.resolve(null):h(e,"/","GET",O,{"expo-platform":"ios"}),f.has(e)?Promise.resolve(null):h(e,"/_expo/status")]);n&&n.statusCode===200?f.delete(e):f.has(e)||f.add(e);let a=u?z(u.body):null,c=typeof a?.launchAsset?.url=="string"?a.launchAsset.url:null,l=a?.extra?.expoClient||a?.extra||{};if(a&&(c||typeof l.name=="string")){d.add(e);let g=c||`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()},u,r)}return i&&i.statusCode>0&&i.statusCode<400&&/application\/javascript/i.test(i.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()},u,r)):s&&s.body.includes("packager-status:running")?(d.add(e),b(F(e,n&&n.statusCode===200?"expo":"metro"),u,r)):o&&o.statusCode===200&&o.body.includes("sootsim-patched")?(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},u,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:a}of r){let c=w.get(n);if(c&&X(c,a)){c.result&&o.push(c.result);continue}c&&c.pid!==a&&(d.delete(n),f.delete(n),S.delete(n)),s.push({port:n,pid:a})}s.length>0&&(await Promise.all(s.map(a=>J(a.port,e.buildIconProxyUrl)))).forEach((a,c)=>{let{port:l,pid:g}=s[c];g!==0&&w.set(l,{pid:g,result:a,cachedAt:Date.now()}),a&&o.push(a)});let i=new Map;for(let{port:n,pid:a}of r)a>0&&i.set(n,a);await Promise.all(o.map(async n=>{let a=i.get(n.port);if(!a)return;n.pid=a;let c=await W(a);c&&(n.cwd=c)}));let u=new Set(i.values());for(let n of[...y.keys()])u.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};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.81 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
-
import{d as re,e as se,f as oe}from"./chunk-25TQ7F5P.js";import{d as ee}from"./chunk-J4CA4F74.js";import{a as Z,b as w}from"./chunk-Q3IYWRN6.js";import{a as X}from"./chunk-G7OOSA3T.js";import{c as te,e as ne,g as v}from"./chunk-GLWFGEVP.js";import{createHash as Se}from"crypto";import{readFileSync as le}from"fs";import{gzipSync as ue}from"zlib";function ie(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 V(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 Ue(e){let t=V(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:t.signal})}finally{t.cancel()}if(!r.ok){let s=await r.text().catch(()=>"");throw new Error(`PUT ${r.status}: ${s.slice(0,200)}`)}}async function Pe(e,t=8,r){let s=0,o=0,a=e.length;await Promise.all(Array.from({length:Math.min(t,a)},async()=>{for(;s<a;){let u=e[s++];await Ue(u),o++,r?.(o,a)}}))}function Re(e,t,r,s){let o=[];o.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let a of e.files){let u=r.get(a.urlhash);u&&o.push({url:a.putUrl,contentType:a.contentType,bytes:u})}return e.events&&s?.eventsBytes&&o.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),e.flowVideo&&s?.videoBytes&&o.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:s.videoBytes}),e.storage&&s?.storageBytes&&o.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:s.storageBytes}),o}function xe(e){return e.replace(/\/+$/,"")}var z=class extends Error{constructor(r,s,o,a=""){super(r);this.status=s;this.phase=o;this.responseText=a;this.name="PresignedUploadError"}};async function ae(e){let t=xe(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=V(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 h=await o.text().catch(()=>"");throw new z(`init failed: ${o.status} ${h.slice(0,200)}`,o.status,"init",h)}let a=await o.json(),u=Re(a,e.bundleBytes,e.filesByHash,e.extras);await Pe(u,e.concurrency??8,e.onPutProgress);let T=V(3e4,"finalize"),p;try{p=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:a.token}),signal:T.signal})}finally{T.cancel()}if(!p.ok){let h=await p.text().catch(()=>"");throw new z(`finalize failed: ${p.status} ${h.slice(0,200)}`,p.status,"finalize",h)}let O=await p.json();return{init:a,finalize:O}}function Oe(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 ge=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://sootbean.com",fe=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",q="http://localhost:3000";async function _e(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let t=await fetch(`${q}/api/preview/upload/init`,{method:"OPTIONS"});if(t.ok||t.status===204||t.status===405)return q}catch{}return ge}function R(e){return e.replace(/\/$/,"")}function $e(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 ke(e){try{let t=new URL(e).hostname.toLowerCase();return t==="sootbean.com"||t.endsWith(".sootbean.com")}catch{return!1}}function Ee(e,t){return t?R(t):process.env.SOOTSIM_PREVIEW_ORIGIN?R(process.env.SOOTSIM_PREVIEW_ORIGIN):$e(e)?R(e):ke(e)?R(fe):R(e)}function ze(){console.log(`
|
|
3
|
-
sootsim upload \u2014 publish the current bundle as a /preview/<id> link
|
|
4
|
-
|
|
5
|
-
usage:
|
|
6
|
-
sootsim upload [--origin <url>] [--public-origin <url>] [--events <path>] [--sim <sim>] [--open] [--assets-only]
|
|
7
|
-
|
|
8
|
-
options:
|
|
9
|
-
--origin <url> upload target (default: auto)
|
|
10
|
-
prefers ${q} when available, otherwise
|
|
11
|
-
falls back to ${ge}
|
|
12
|
-
override with SOOTSIM_UPLOAD_ORIGIN env var
|
|
13
|
-
--public-origin <url>
|
|
14
|
-
public /preview link origin (default: ${fe}
|
|
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
|
-
--video <path> path to a webm/mp4/gif flow recording. embedded inline
|
|
19
|
-
in the pr sticky comment served at
|
|
20
|
-
/api/preview/flow-video?id=<share-id>
|
|
21
|
-
--video-duration-ms <ms>
|
|
22
|
-
duration hint for attached flow video
|
|
23
|
-
--sim <sim> target a specific sim (see: sootsim list)
|
|
24
|
-
--open open the resulting /preview/<id> url in the browser
|
|
25
|
-
--assets-only drop API/JSON/HTML records before upload; keep images,
|
|
26
|
-
fonts, css, js, and binary blobs. live-data demos hit
|
|
27
|
-
the real network at replay time instead of serving
|
|
28
|
-
recorded API snapshots
|
|
29
|
-
-h, --help
|
|
30
|
-
|
|
31
|
-
examples:
|
|
32
|
-
sootsim upload
|
|
33
|
-
sootsim upload --origin http://localhost:3000 --open
|
|
34
|
-
sootsim upload --events ./my-session.jsonl.gz
|
|
35
|
-
sootsim upload --video /tmp/soot-flow.webm
|
|
36
|
-
`)}function S(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 ce(e,t){let r=e.findIndex(s=>s===t);return r<0?!1:(e.splice(r,1),!0)}function de(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 pe(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 Ae(e){return/\.bundle($|\?)/.test(e)||/\.js($|\?)/.test(e)?"application/javascript":/\.zip($|\?)/.test(e)?"application/zip":"application/javascript"}function Le(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 He(e,t){let s=[];for(let o=0;o<t;o+=15e5){let a=Math.min(o+15e5,t),u=await v(e,`(window.__sootsimLastTransformedBundle?.text || "").slice(${o}, ${a})`);if(typeof u!="string")return null;s.push(u)}return s.join("")}function D(e){let t=new Map;for(let r of e)t.set(r.urlhash||r.url,r);return Array.from(t.values())}async function Qe(e,t){(e.includes("--help")||e.includes("-h"))&&(ze(),process.exit(0));let r=[...e],s=await _e(S(r,"--origin")),o=Ee(s,S(r,"--public-origin")),a=S(r,"--events"),u=S(r,"--video"),T=S(r,"--video-duration-ms"),p=ce(r,"--open"),O=ce(r,"--assets-only"),h=te(r,{stripBooleanFlags:[],stripValueFlags:[]}),y=ne(h),l,j=[],g=[],A=null;try{if(l=await v(y,'(typeof window.__sootsimCaptureBundle === "function") ? window.__sootsimCaptureBundle() : null'),l?.bundleUrl){let n=new URL(l.bundleUrl).origin,[i,C]=await Promise.all([v(y,`(window.__sootsimPreviewRecorder?.list?.(${JSON.stringify(n)}) || [])`),v(y,`(async () => {
|
|
37
|
-
const list = window.__sootsimListWorkerFetchRecorder
|
|
38
|
-
return typeof list === 'function'
|
|
39
|
-
? await list(${JSON.stringify(n)})
|
|
40
|
-
: []
|
|
41
|
-
})()`)]);j=D([...i,...C]).filter(c=>{try{return!new URL(c.url).pathname.startsWith("/api/")}catch{return!0}});let x=await v(y,`(async () => {
|
|
42
|
-
const rec = window.__sootsimPreviewRecorder
|
|
43
|
-
const workerList = window.__sootsimListWorkerFetchRecorder
|
|
44
|
-
return {
|
|
45
|
-
main: rec?.list ? rec.list() : [],
|
|
46
|
-
worker: typeof workerList === 'function' ? await workerList() : [],
|
|
47
|
-
}
|
|
48
|
-
})()`),U=(x?D([...x.main,...x.worker]):[]).filter(c=>{try{return new URL(c.url).origin!==n}catch{return!1}}),b=U.length>0?{count:U.length,totalBytes:U.reduce((c,P)=>c+(P.size||0),0)}:null;if(b&&b.count>0){console.log(` ${b.count} recorded cross-origin responses (${(b.totalBytes/1024).toFixed(1)} KiB)`);let c=await v(y,`(async () => {
|
|
49
|
-
const rec = window.__sootsimPreviewRecorder
|
|
50
|
-
const workerDump = window.__sootsimDumpWorkerFetchRecorder
|
|
51
|
-
const bundleUrl = ${JSON.stringify(l.bundleUrl)}
|
|
52
|
-
const keep = (r) => {
|
|
53
|
-
try {
|
|
54
|
-
const u = new URL(r.url)
|
|
55
|
-
if (u.origin !== ${JSON.stringify(n)}) return true
|
|
56
|
-
// bundle-origin api responses came from the rewritten
|
|
57
|
-
// /__app-api proxy at record time (re-keyed by the
|
|
58
|
-
// recorder's unwrap step). they need bodies attached the
|
|
59
|
-
// same way as cross-origin records \u2014 direct re-fetch from
|
|
60
|
-
// the dev server lacks the bundle's session cookies.
|
|
61
|
-
if (r.url !== bundleUrl && u.pathname.startsWith('/api/')) return true
|
|
62
|
-
return false
|
|
63
|
-
} catch { return false }
|
|
64
|
-
}
|
|
65
|
-
return {
|
|
66
|
-
main: rec?.dump ? rec.dump().filter(keep) : [],
|
|
67
|
-
worker: typeof workerDump === 'function'
|
|
68
|
-
? (await workerDump()).filter(keep)
|
|
69
|
-
: [],
|
|
70
|
-
}
|
|
71
|
-
})()`);if(g=D([...c.main,...c.worker]),O){let P=g.length;g=g.filter(W=>de(W.contentType));let N=b.totalBytes-g.reduce((W,Ie)=>W+(Ie.size||0),0);console.log(` --assets-only: kept ${g.length}/${P} records (dropped ${(N/1024).toFixed(1)} KiB of API responses)`)}}}l?.transformedBundle&&(A=await He(y,l.transformedBundle.byteLength))}finally{y.close()}l||(console.error(" could not read bundle snapshot \u2014 is sootsim running and is the bundle loaded?"),process.exit(2)),l.bundleUrl||(console.error(` no ?bundle= URL on the current sootsim tab.
|
|
72
|
-
open the app you want to share first (e.g. sootsim open 8082), then run upload.`),process.exit(2));let d,L=!1;if(A!==null)d=new TextEncoder().encode(A),L=!0,console.log(` using post-transform bundle: ${(d.byteLength/1024).toFixed(1)} KiB`);else{let n=Le(l.bundleUrl);n!==l.bundleUrl&&console.log(" forcing lazy=false for self-contained bundle"),console.log(` capturing: ${n}`),d=await pe(n),console.log(` main bundle: ${(d.byteLength/1024).toFixed(1)} KiB`)}let _=j.filter(n=>n.url!==l.bundleUrl);O&&(_=_.filter(n=>de(n.contentType))),console.log(` fetching ${_.length} extra files\u2026`);let $=(await Promise.all(_.map(async n=>{try{let i=await pe(n.url);return{...n,bytes:i}}catch(i){return console.error(` warning: failed to re-fetch ${n.url}: ${i instanceof Error?i.message:i}`),null}}))).filter(n=>!!n),he=$.reduce((n,i)=>n+i.bytes.byteLength,0);console.log(` ${$.length} extra files: ${(he/1024).toFixed(1)} KiB`);let m;a&&(m=le(a));let f,k,G;if(u){if(f=le(u),k=u.endsWith(".mp4")?"video/mp4":u.endsWith(".gif")?"image/gif":"video/webm",T){let n=Number(T);(!Number.isFinite(n)||n<=0)&&(console.error(` invalid --video-duration-ms: ${T}`),await w(),process.exit(1)),G=Math.round(n)}console.log(` attaching flow video: ${(f.byteLength/1024).toFixed(1)} KiB (${k})`)}let B=re(),I=oe(B),ye=X();Z({event:"preview_upload_started",identity:{userId:B?.kind==="session"?ye?.user?.id??null:null,repoId:I?.repoId??null,installationId:I?.installationId??null},properties:{origin:s,hasAuth:!!B,authMode:B?.kind??"none",bundleBytes:d.byteLength,isTransformed:L,extraFiles:$.length,recordedFetches:g.length,hasEvents:!!m,hasVideo:!!f}}),B||(console.error(" preview uploads need auth."),console.error(" set SOOTSIM_API_KEY=sk_sootsim_..., run `sootsim login`, or use the soot github runner."),await w(),process.exit(1));let me=se(B),be=(()=>{try{return new URL(l.bundleUrl).origin}catch{return null}})(),J=(n,i,C,x,Q,U,b,c)=>{let P=ie(U),N=P?ue(n):n;return{url:i,urlhash:C,method:x,bodyHash:Q,requestVaryHash:c,contentType:U,responseHeaders:b,bytes:N,encoding:P?"gzip":void 0}},H=[...$.map(n=>J(n.bytes,n.url,n.urlhash,"GET","-",n.contentType,n.responseHeaders,n.requestVaryHash)),...g.map(n=>J(Buffer.from(n.bodyBase64,"base64"),n.url,n.urlhash,n.method||"GET",n.bodyHash||"-",n.contentType,n.responseHeaders,n.requestVaryHash))],F=ue(d),we=Se("sha256").update(d).digest("hex");console.log(` bundle raw=${(d.byteLength/1024).toFixed(1)} KiB gz=${(F.byteLength/1024).toFixed(1)} KiB`);let ve={contentHash:we,bundleSizeBytes:d.byteLength,bundleContentType:Ae(l.bundleUrl),bundleEncoding:"gzip",bundleOrigin:be,entry:l.entry,isTransformed:L,deviceSpec:l.deviceSpec,installationId:I?.installationId??void 0,repoId:I?.repoId,owner:I?.owner,repo:I?.repo,files:H.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:m?{sizeBytes:m.byteLength}:void 0,flowVideo:f&&k?{sizeBytes:f.byteLength,contentType:k,durationMs:G}:void 0},K=new Map;for(let n of H)K.set(n.urlhash,n.bytes);let Te=Date.now(),E=F.byteLength;for(let n of H)E+=n.bytes.byteLength;m&&(E+=m.byteLength),f&&(E+=f.byteLength);let Be=`${R(s)}/api/preview/upload/init`;console.log(` init: ${Be}`);let M;try{let n=await ae({originBase:s,initBody:ve,bundleBytes:F,filesByHash:K,extras:{eventsBytes:m,videoBytes:f},authHeader:me,concurrency:16});M=n.finalize;let i=1+n.init.files.length+(n.init.events?1:0)+(n.init.flowVideo?1:0);console.log(` PUT ${i} objects in ${Date.now()-Te}ms (${(E/1024).toFixed(1)} KiB)`)}catch(n){let i=n;i.phase==="init"&&i.status===401&&(console.error(" preview upload requires a valid login."),console.error(" run `sootsim login` and retry."),await w(),process.exit(1)),i.status===402&&(console.error(` ${Oe(i.responseText)??"preview uploads require Personal, Team, or an active trial \u2014 upgrade from the billing dialog."}`),await w(),process.exit(1)),console.error(` ${i.message??`${i.phase??"upload"} failed: ${String(n)}`}`),await w(),process.exit(1)}let Y=`${o}${M.url}`;console.log(`
|
|
73
|
-
stored ${M.filesStored??0} extra files`),console.log(` preview: ${Y}`),p&&await ee(Y),await w()}export{_e as a,Ee as b,Qe as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! sootsim v0.1.81 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|