sliccy 3.34.0 → 3.35.1
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/node-server/chrome-launch.d.ts +16 -1
- package/dist/node-server/chrome-launch.js +54 -4
- package/dist/node-server/index.js +6 -3
- package/dist/ui/assets/{adobe-C_KbKd0n.js → adobe-aXLIvH9D.js} +2 -2
- package/dist/ui/assets/adobe-dF90Inf7.js +1 -0
- package/dist/ui/assets/{agent-bridge-FF6kv2fb.js → agent-bridge-HevsOQu4.js} +1 -1
- package/dist/ui/assets/{agent-message-to-chat-DkR9NV9t.js → agent-message-to-chat-LKi9XTTG.js} +1 -1
- package/dist/ui/assets/{anthropic-DfZXQaUp.js → anthropic-BPquRfES.js} +6 -6
- package/dist/ui/assets/anthropic-j72gYC37.js +39 -0
- package/dist/ui/assets/{apps-BxS_QnGn.js → apps-CUZ0j46Q.js} +2 -2
- package/dist/ui/assets/{azure-openai-Vm01DpT_.js → azure-openai-DL9rlaYT.js} +1 -1
- package/dist/ui/assets/azure-openai-NIHEjuZY.js +1 -0
- package/dist/ui/assets/azure-openai-responses-BjWD4_Qc.js +1 -0
- package/dist/ui/assets/azure-openai-responses-BkJiczft.js +1 -0
- package/dist/ui/assets/{biome_wasm-CvSAK_uf.js → biome_wasm-CTHS5Ntm.js} +1 -1
- package/dist/ui/assets/{bsh-watchdog-Du7KRjWw.js → bsh-watchdog-DAwJmFZl.js} +1 -1
- package/dist/ui/assets/{cdp-BMZH9kfw.js → cdp-CaT5TlrI.js} +3 -3
- package/dist/ui/assets/{cdp-ws-page-bridge-DYY56Jqj.js → cdp-ws-page-bridge-_x_UcZJn.js} +1 -1
- package/dist/ui/assets/{common-BG1B2pGi.js → common-DRAV2dJd.js} +1 -1
- package/dist/ui/assets/{connect-surface-0lxpf-5t.js → connect-surface-CCfSI5-c.js} +1 -1
- package/dist/ui/assets/cost-command-CW43ld_y.js +1 -0
- package/dist/ui/assets/{dist-BanEKbJr.js → dist-Bsh8aEYP.js} +4 -4
- package/dist/ui/assets/{dist-CfHbsibs.js → dist-BvP45YUI.js} +1 -1
- package/dist/ui/assets/{dist-Yxhff45Z.js → dist-D3vqQ2Yo.js} +1 -1
- package/dist/ui/assets/{dist-JjJ6duRw.js → dist-DVEQZAIT.js} +1 -1
- package/dist/ui/assets/{es-CMFNtJSL.js → es-CKSMqgEY.js} +4 -4
- package/dist/ui/assets/{follower-sprinkle-bridge-CszKWKEN.js → follower-sprinkle-bridge-s_KYng2H.js} +1 -1
- package/dist/ui/assets/{github-lQAdGX0Z.js → github-DlJxVVkf.js} +2 -2
- package/dist/ui/assets/{github-D5chbBco.js → github-YDAnlxEm.js} +1 -1
- package/dist/ui/assets/{github-copilot-Hxxj6MFv.js → github-copilot-B6MHst0D.js} +2 -2
- package/dist/ui/assets/github-copilot-DInoIk7O.js +1 -0
- package/dist/ui/assets/{google-6xMZvOez.js → google-BV3wSZBi.js} +1 -1
- package/dist/ui/assets/google-LnWE4Aht.js +1 -0
- package/dist/ui/assets/google-shared-BFb9WNQf.js +371 -0
- package/dist/ui/assets/google-shared-D3Z1fbp0.js +11 -0
- package/dist/ui/assets/{google-vertex-BHOYutHi.js → google-vertex-No9Wv9Rg.js} +1 -1
- package/dist/ui/assets/{google-vertex-Dpr6tNZD.js → google-vertex-iVFABtTb.js} +1 -1
- package/dist/ui/assets/{hosted-config-apply-LNWPnWio.js → hosted-config-apply-D5JlRSaz.js} +1 -1
- package/dist/ui/assets/{intercepted-oauth-D41iguEu.js → intercepted-oauth-Dn9rIi-C.js} +1 -1
- package/dist/ui/assets/{kernel-worker-ApBe2nsN.js → kernel-worker-D1ZZbDk7.js} +960 -960
- package/dist/ui/assets/lick-ws-bridge-FzW4E5Cd.js +1 -0
- package/dist/ui/assets/{local-llm-BUHqKQIs.js → local-llm-YQDW7uF7.js} +1 -1
- package/dist/ui/assets/{magick-wasm-WfPf-mzW.js → magick-wasm-BeuHUgL1.js} +1 -1
- package/dist/ui/assets/{main-CiPLuc4Y.js → main-CilZwNiT.js} +176 -176
- package/dist/ui/assets/{main-cherry-CvuKVZgJ.js → main-cherry-DnPYeUe8.js} +1 -1
- package/dist/ui/assets/{migration-run-CjK_K6H_.js → migration-run-p0lR8xxV.js} +1 -1
- package/dist/ui/assets/mistral-BkCTqf1V.js +46 -0
- package/dist/ui/assets/mistral-Dfoj9fXB.js +46 -0
- package/dist/ui/assets/{nodejs-BOWNwnaN.js → nodejs-CHtcrjWl.js} +1 -1
- package/dist/ui/assets/{nuke-command-D8Fh0gbL.js → nuke-command-DThbTH3f.js} +1 -1
- package/dist/ui/assets/{oauth-DLszIWW7.js → oauth-7_PcMC9m.js} +1 -1
- package/dist/ui/assets/{oauth-bootstrap-Bkf6-I68.js → oauth-bootstrap-sDEhfqCF.js} +2 -2
- package/dist/ui/assets/{oauth-service-IRbgSoZf.js → oauth-service-BbWxnAZu.js} +1 -1
- package/dist/ui/assets/{oauth-service-DclCNOyC.js → oauth-service-C_oui06z.js} +1 -1
- package/dist/ui/assets/{offscreen-client-WfjjyTww.js → offscreen-client-CPehYlEH.js} +1 -1
- package/dist/ui/assets/{onboarding-orchestrator-Cj4wwL1r.js → onboarding-orchestrator-Bhtg8moO.js} +1 -1
- package/dist/ui/assets/{openai-codex-o1t-m8rL.js → openai-codex-Cv3-dlgY.js} +1 -1
- package/dist/ui/assets/{openai-codex-DQpjVOFB.js → openai-codex-DYEVNxR_.js} +1 -1
- package/dist/ui/assets/openai-codex-responses-Dv-xW9xl.js +7 -0
- package/dist/ui/assets/openai-codex-responses-PCFMqZ2-.js +7 -0
- package/dist/ui/assets/openai-completions-Ct4ErjP6.js +5 -0
- package/dist/ui/assets/openai-prompt-cache-DXo9f3w5.js +1 -0
- package/dist/ui/assets/openai-responses-BXTgPJAX.js +1 -0
- package/dist/ui/assets/openai-responses-Bcj6Mw9f.js +1 -0
- package/dist/ui/assets/{openai-responses-shared-S3zguGjk.js → openai-responses-shared-BRpjzDt_.js} +1 -1
- package/dist/ui/assets/{openai-responses-shared-yJFA8VNU.js → openai-responses-shared-CZjoigsd.js} +3 -3
- package/dist/ui/assets/openrouter-DzmGsDzq.js +1 -0
- package/dist/ui/assets/openrouter-PAULL0z5.js +1 -0
- package/dist/ui/assets/{panel-rpc-handlers-CkCiX7Tp.js → panel-rpc-handlers-B4grCAzw.js} +1 -1
- package/dist/ui/assets/provider-DQmaFemI.js +1 -0
- package/dist/ui/assets/{provider-Cs2-iVKM.js → provider-SQ-dF0OV.js} +2 -2
- package/dist/ui/assets/provider-store-access-BijO1ndd.js +1 -0
- package/dist/ui/assets/provider-store-access-COEfTeXB.js +1 -0
- package/dist/ui/assets/{proxied-fetch-B31wB0pw.js → proxied-fetch-Bznr24aY.js} +1 -1
- package/dist/ui/assets/{pyodide-BXKIZesR.js → pyodide-B5LJuYH1.js} +2 -2
- package/dist/ui/assets/{remote-terminal-view-D8Lym4ke.js → remote-terminal-view-ZxR5LM7B.js} +1 -1
- package/dist/ui/assets/{remote-vfs-client-CX-U7Vpk.js → remote-vfs-client-BWeQEOy_.js} +1 -1
- package/dist/ui/assets/{secret-env-We7YhnkP.js → secret-env-udqdNnx_.js} +1 -1
- package/dist/ui/assets/{slicc-editor-D1shQp3f.js → slicc-editor-CQAmYyAf.js} +1 -1
- package/dist/ui/assets/{spawn-BROIpDuE.js → spawn-CvrZvu3h.js} +1 -1
- package/dist/ui/assets/{sql-wasm-BKOzFTaN.js → sql-wasm-sWUWlvZh.js} +2 -2
- package/dist/ui/assets/{src-LhD223BJ.js → src-BcMuhnBe.js} +2 -2
- package/dist/ui/assets/{store-DcwzvMDt.js → store-BOB-n5TL.js} +1 -1
- package/dist/ui/assets/{tray-leave-runtime-D0wlJrCA.js → tray-leave-runtime-DxkPV4F3.js} +1 -1
- package/dist/ui/assets/{typescript-BegR4udl.js → typescript-BREqP46V.js} +9 -9
- package/dist/ui/assets/upgrade-detection-DlwpHU2v.js +1 -0
- package/dist/ui/assets/{web-VQMyUYjU.js → web-BzK79jFy.js} +1 -1
- package/dist/ui/assets/{writable-vfs-client-C-OKNpFf.js → writable-vfs-client-COZzXV3K.js} +1 -1
- package/dist/ui/assets/{ws-subscribers-CWuwl3YA.js → ws-subscribers-C8__TxzG.js} +1 -1
- package/dist/ui/assets/{xai-grok-g5ns0DU5.js → xai-grok-DWmdgPYg.js} +1 -1
- package/dist/ui/assets/{xai-grok-DEMNJsqQ.js → xai-grok-woATmag9.js} +1 -1
- package/dist/ui/index.html +1 -1
- package/dist/ui/packages/webapp/index.html +1 -1
- package/package.json +8 -6
- package/dist/ui/assets/adobe-BkTvvNWq.js +0 -1
- package/dist/ui/assets/anthropic-HYC-Omg5.js +0 -39
- package/dist/ui/assets/azure-openai-CLWQP72f.js +0 -1
- package/dist/ui/assets/azure-openai-responses-33r3NvaZ.js +0 -1
- package/dist/ui/assets/azure-openai-responses-DUgZZ6eN.js +0 -1
- package/dist/ui/assets/cost-command-DNDC9f5s.js +0 -1
- package/dist/ui/assets/github-copilot-DB_-fjnz.js +0 -1
- package/dist/ui/assets/google-CbHlbByo.js +0 -1
- package/dist/ui/assets/google-shared-CR-aIyZa.js +0 -11
- package/dist/ui/assets/google-shared-DX0yj3UK.js +0 -364
- package/dist/ui/assets/lick-ws-bridge-DLkh-q6E.js +0 -1
- package/dist/ui/assets/mistral-3BOt-kpO.js +0 -46
- package/dist/ui/assets/mistral-7zIzaf30.js +0 -46
- package/dist/ui/assets/openai-codex-responses-DGMmjslY.js +0 -7
- package/dist/ui/assets/openai-codex-responses-DhoTOdH3.js +0 -7
- package/dist/ui/assets/openai-completions-CTH4LB2F.js +0 -5
- package/dist/ui/assets/openai-responses-D68JIQf1.js +0 -1
- package/dist/ui/assets/openai-responses-Hs-gRUiN.js +0 -1
- package/dist/ui/assets/openrouter-B2BsIHza.js +0 -1
- package/dist/ui/assets/openrouter-UArPIjqO.js +0 -1
- package/dist/ui/assets/provider-BYq4p5If.js +0 -1
- package/dist/ui/assets/provider-store-access-G9HYvkSk.js +0 -1
- package/dist/ui/assets/provider-store-access-Mcnc2eQL.js +0 -1
- package/dist/ui/assets/upgrade-detection-fcwNs12W.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as e}from"./main-
|
|
1
|
+
import{I as e}from"./main-CilZwNiT.js";import{BrowserAPI as t}from"./cdp-CaT5TlrI.js";var n=new Set([`handshake.hello`,`handshake.welcome`,`cdp.request`,`cdp.response`,`cdp.event`,`permission.request`,`permission.response`,`host.event`,`slicc.event`]);function r(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.cherry===1&&typeof t.channelId==`string`&&typeof t.kind==`string`&&n.has(t.kind)}function i(e,t){return!(!t.allowOrigins.includes(e.origin)||t.expectedSource!==null&&e.source!==t.expectedSource||!r(e.data)||t.channelId!==null&&e.data.channelId!==t.channelId)}var a=e(`cherry-transport`),o=`cherry-session`,s=`cherry-target`,c=`cherry-frame`,l=3e4,u=class{opts;channelId=null;nextId=1;_state=`disconnected`;pending=new Map;listeners=new Map;connectResolve=null;connectTimer=null;_joinUrl=null;boundHandler=e=>this.handleMessage(e);onHostEvent=null;constructor(e){this.opts=e}get state(){return this._state}get joinUrl(){return this._joinUrl}async connect(e){if(this._state!==`disconnected`)throw Error(`Cannot connect: state is ${this._state}`);this._state=`connecting`,this.channelId=`cherry-${crypto.randomUUID()}`,typeof window<`u`&&window.addEventListener(`message`,this.boundHandler);let t=e?.timeout??l;return new Promise((e,n)=>{this.connectResolve=e,this.connectTimer=setTimeout(()=>{this.connectTimer=null,typeof window<`u`&&window.removeEventListener(`message`,this.boundHandler),this._state=`disconnected`,this.channelId=null,this.connectResolve=null,n(Error(`Cherry handshake timed out after ${t}ms`))},t),this.post({cherry:1,channelId:this.channelId,kind:`handshake.hello`,capabilities:this.opts.capabilities??{navigate:!0,screenshot:!0,openUrl:!0}})})}disconnect(){this.connectTimer!==null&&(clearTimeout(this.connectTimer),this.connectTimer=null),typeof window<`u`&&window.removeEventListener(`message`,this.boundHandler);for(let[,e]of this.pending)e.reject(Error(`Cherry transport disconnected`));this.pending.clear(),this._state=`disconnected`,this.channelId=null}async send(e,t,n,r=3e4){if(this._state!==`connected`)throw Error(`Cherry transport is not connected`);let i=this.handleSynthetic(e,t);if(i)return i;let a=this.nextId++,o=await new Promise((n,i)=>{let o=setTimeout(()=>{this.pending.delete(a),i(Error(`Cherry CDP timed out after ${r}ms: ${e}`))},r);this.pending.set(a,{resolve:e=>{clearTimeout(o),n(e)},reject:e=>{clearTimeout(o),i(e)}}),this.post({cherry:1,channelId:this.channelId,kind:`cdp.request`,id:a,method:e,params:t})});return e===`Page.navigate`&&this.synthesizeNavigationLifecycle(o,t?.url),o}on(e,t){let n=this.listeners.get(e);n||(n=new Set,this.listeners.set(e,n)),n.add(t)}off(e,t){let n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}once(e,t=3e4){return new Promise((n,r)=>{let i=setTimeout(()=>{this.off(e,a),r(Error(`Timed out waiting for event: ${e}`))},t),a=t=>{clearTimeout(i),this.off(e,a),n(t)};this.on(e,a)})}__test_receive(e){this.handleMessage(e)}emitSliccEventToHost(e,t){if(!this.channelId){a.warn(`Dropping slicc.event before handshake (no channelId yet)`,{name:e});return}this.post({cherry:1,channelId:this.channelId,kind:`slicc.event`,name:e,detail:t})}post(e){this.opts.counterpart.postMessage(e,this.opts.targetOrigin)}emit(e,t){let n=this.listeners.get(e);if(n)for(let e of n)try{e(t)}catch{}}handleSynthetic(e,t){switch(e){case`Target.getTargets`:return Promise.resolve({targetInfos:[{targetId:s,type:`page`,title:`Cherry Host Page`,url:typeof location<`u`?location.href:`about:blank`,attached:!0}]});case`Target.attachToTarget`:return Promise.resolve({sessionId:o});case`Target.detachFromTarget`:case`Target.closeTarget`:return Promise.resolve({success:!0});case`Page.enable`:case`Runtime.enable`:case`DOM.enable`:case`Page.bringToFront`:return Promise.resolve({});case`Page.getFrameTree`:return Promise.resolve({frameTree:{frame:{id:c,loaderId:`cherry-loader`,url:typeof location<`u`?location.href:`about:blank`,securityOrigin:this.opts.targetOrigin,mimeType:`text/html`},childFrames:[]}});case`Runtime.createIsolatedWorld`:return Promise.resolve({executionContextId:1});default:return null}}synthesizeNavigationLifecycle(e,t){let n=e.frameId??c,r=t??(typeof location<`u`?location.href:`about:blank`);this.emit(`Page.frameNavigated`,{frame:{id:n,loaderId:`cherry-loader`,url:r,securityOrigin:this.opts.targetOrigin,mimeType:`text/html`},sessionId:o}),this.emit(`Page.loadEventFired`,{timestamp:Date.now()/1e3,sessionId:o})}handleMessage(e){if(!i(e,{allowOrigins:this.opts.allowOrigins,expectedSource:this.opts.counterpart,channelId:this.channelId})){r(e.data)&&a.warn(`Rejected a cherry envelope (origin/source/channel mismatch)`,{origin:e.origin,allowOrigins:this.opts.allowOrigins});return}let t=e.data;switch(t.kind){case`handshake.welcome`:this.connectTimer!==null&&(clearTimeout(this.connectTimer),this.connectTimer=null),this._state=`connected`,this._joinUrl=t.joinUrl??null,a.info(`Cherry handshake complete`,{channelId:this.channelId}),this.connectResolve?.(),this.connectResolve=null;return;case`cdp.response`:{let e=this.pending.get(t.id);if(!e)return;this.pending.delete(t.id),t.error?e.reject(Error(`Cherry CDP error: ${t.error.message} (${t.error.code})`)):e.resolve(t.result??{});return}case`cdp.event`:this.emit(t.method,{...t.params??{},sessionId:t.sessionId??o});return;case`host.event`:this.onHostEvent?.(t.name,t.detail);return;default:return}}},d=e(`cherry-boot`);async function f(){let e=[document.referrer?new URL(document.referrer).origin:location.origin],n=e[0],r=new u({counterpart:window.parent,allowOrigins:e,targetOrigin:n});await r.connect(),d.info(`Cherry transport connected`);let i=r.joinUrl;if(!i)throw Error(`cherry boot: no joinUrl from handshake`);return{transport:r,browser:new t(r),joinUrl:i}}export{f as setupCherryFollower};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ct as e,_t as t,h as n,m as r}from"./kernel-worker-D1ZZbDk7.js";const i=`/.slicc-migrated`;async function a(e){let{manifest:t,source:n,target:r,logger:i}=e,a={fileCount:t.fileCount,totalBytes:t.totalBytes},c=t.entries.filter(e=>e.type===`dir`).sort((e,t)=>o(e.path)-o(t.path)),l=t.entries.filter(e=>e.type===`file`),u=t.entries.filter(e=>e.type===`symlink`);for(let e of c)try{await r.mkdir(e.path)}catch(e){return i?.warn?.(`[migration] mkdir failed during C2 copy`,{copiedFiles:0,stage:`mkdir`,code:s(e)}),{kind:`copy-error`,expected:a,copiedFiles:0,stage:`mkdir`}}let d=0;try{e.onProgress?.({copied:0,total:a.fileCount})}catch{}for(let t of l){if(t.type!==`file`)continue;let o;try{o=await n.readFile(t.path)}catch(e){return i?.warn?.(`[migration] legacy read failed during C2 copy`,{copiedFiles:d,stage:`read`,code:s(e)}),{kind:`copy-error`,expected:a,copiedFiles:d,stage:`read`}}try{await r.writeFile(t.path,o)}catch(e){return i?.warn?.(`[migration] OPFS write failed during C2 copy`,{copiedFiles:d,stage:`writeFile`,code:s(e)}),{kind:`copy-error`,expected:a,copiedFiles:d,stage:`writeFile`}}d++;try{e.onProgress?.({copied:d,total:a.fileCount})}catch{}}let f=0;for(let e of u)if(e.type===`symlink`)try{await r.symlink(e.target,e.path)}catch(e){if(s(e)===`EEXIST`){f++;continue}return i?.warn?.(`[migration] symlink failed during C2 copy`,{copiedFiles:d,stage:`symlink`,code:s(e)}),{kind:`copy-error`,expected:a,copiedFiles:d,stage:`symlink`}}if(f>0&&i?.info?.(`[migration] tolerated pre-existing symlinks during C2 re-run`,{skipped:f,symlinks:t.symlinkCount}),e.flushBeforeSentinel)try{await e.flushBeforeSentinel()}catch(e){return i?.warn?.(`[migration] sidecar flush failed before parity`,{code:s(e)}),{kind:`copy-error`,expected:a,copiedFiles:d,stage:`writeFile`}}let p=await e.countOpfsFiles(),m=p.totalBytes-a.totalBytes;return p.fileCount===a.fileCount?(m!==0&&i?.info?.(`[migration] byte drift tolerated (count parity matched)`,{expectedBytes:a.totalBytes,actualBytes:p.totalBytes,byteDelta:m}),await e.writeSentinel(),i?.info?.(`[migration] C2 copy complete, sentinel written`,{files:p.fileCount,totalBytes:p.totalBytes,expectedBytes:a.totalBytes,byteDelta:m,symlinks:t.symlinkCount,dirs:t.dirCount}),{kind:`success`,fileCount:p.fileCount,totalBytes:p.totalBytes}):(i?.warn?.(`[migration] parity mismatch — sentinel NOT written`,{expectedFiles:a.fileCount,actualFiles:p.fileCount,expectedBytes:a.totalBytes,actualBytes:p.totalBytes,byteDelta:m}),{kind:`parity-mismatch`,expected:a,actual:p})}function o(e){if(e===`/`)return 0;let t=0;for(let n=0;n<e.length;n++)e.charCodeAt(n)===47&&t++;return t}function s(e){let t=e?.code;return typeof t==`string`?t:void 0}const c=t(`migration-guard`);function l(){let e=globalThis;return{hasExtensionRuntime:typeof e.chrome?.runtime?.id==`string`,hasDocument:e.document!==void 0,pathname:e.window?.location?.pathname??``}}function u(e){return!e.hasExtensionRuntime||!e.hasDocument?!1:!/offscreen\.html$/.test(e.pathname)}var d=class extends Error{constructor(e){super(`runLegacyMigrationFromVfs invoked from the chrome extension side panel (pathname='${e.pathname}'). Migration must run only in the offscreen document; the panel should wait on the kernel-ready RPC (OffscreenClient.onReady).`),this.name=`MigrationFromSidePanelError`}};function f(e=l()){if(u(e)){let t=new d(e);throw c.error(t.message),t}}async function p(e,t={}){f(t.callerEnv);let r=t.logger,o=await n({sentinelExists:async()=>{try{return await e.stat(i),!0}catch{return!1}},probeLegacyDbExists:t.probeLegacyDbExists??y,lfsFactory:t.legacyLfsFactory??v,logger:r});if(o.kind===`sentinel-present`)return{kind:`sentinel-present`};if(o.kind===`legacy-absent`)return{kind:`legacy-absent`};let s=await(t.legacyReaderFactory??_)(),c=m(e);return{kind:`copied`,result:await a({manifest:o.manifest,source:s,target:c,countOpfsFiles:()=>g(e,o.manifest),flushBeforeSentinel:()=>e.flush().catch(()=>{}),writeSentinel:async()=>{await e.writeFile(i,``),await e.flush().catch(()=>{})},onProgress:t.onProgress,logger:r})}}function m(e){return{mkdir:async t=>{await e.mkdir(t,{recursive:!0})},writeFile:async(t,n)=>{await e.writeFile(t,n)},symlink:async(t,n)=>{try{await e.symlink(t,n);return}catch(e){if(h(e)!==`EEXIST`)throw e}let r;try{r=await e.readlink(n)}catch{}r!==t&&(await e.rm(n,{recursive:!0}),await e.symlink(t,n))}}}function h(e){let t=e?.code;return typeof t==`string`?t:void 0}async function g(e,t){let n=0,r=0;for(let i of t.entries){if(i.type!==`file`)continue;let t;try{t=await e.lstat(i.path)}catch{continue}t.type===`file`&&(n++,r+=t.size??0)}return{fileCount:n,totalBytes:r}}async function _(){let t=(await import(`./src-BcMuhnBe.js`).then(t=>e(t.default,1))).default,n=new t(r).promises;return{readFile:async e=>{let t=await n.readFile(e);return t instanceof Uint8Array?t:new TextEncoder().encode(String(t))}}}async function v(){let t=(await import(`./src-BcMuhnBe.js`).then(t=>e(t.default,1))).default;return new t(r).promises}async function y(){try{let e=globalThis.indexedDB;if(!e)return!1;let t=e.databases;return typeof t==`function`?(await t.call(e)).some(e=>e.name===r):!0}catch{return!0}}export{p as runLegacyMigrationFromVfs};
|