@stacksjs/stx 0.2.721 → 0.2.722
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/{chunk-h58h5z2g.js → chunk-04pzzhn7.js} +1 -1
- package/dist/{chunk-t3j3my0p.js → chunk-1z0zmgsj.js} +4 -4
- package/dist/{chunk-hrxt6mb1.js → chunk-2d31hmtc.js} +2 -2
- package/dist/{chunk-m96swv2f.js → chunk-2dm1kn1w.js} +4 -4
- package/dist/{chunk-dn2qgw58.js → chunk-3hsw0s60.js} +1 -1
- package/dist/chunk-3mqxasmr.js +2 -0
- package/dist/{chunk-v0vgfh63.js → chunk-48v2mdxa.js} +1 -1
- package/dist/{chunk-pqahncbx.js → chunk-4haedk3v.js} +1 -1
- package/dist/chunk-52ysrkex.js +2 -0
- package/dist/{chunk-2mspmqhf.js → chunk-6tf24hs3.js} +1 -1
- package/dist/{chunk-4yc4trws.js → chunk-6vd1tw4p.js} +1 -1
- package/dist/chunk-82hhwy20.js +2 -0
- package/dist/{chunk-1nfc0jpn.js → chunk-99ke9sz0.js} +3 -3
- package/dist/{chunk-dkr1mv9g.js → chunk-9gdz941b.js} +1 -1
- package/dist/chunk-a0ab1h7m.js +2 -0
- package/dist/{chunk-qxpd0n87.js → chunk-aj2mxp6q.js} +1 -1
- package/dist/{chunk-bex4ffwc.js → chunk-atz8z223.js} +1 -1
- package/dist/{chunk-2b10kvbk.js → chunk-b4xavv78.js} +1 -1
- package/dist/{chunk-mj236yzm.js → chunk-bdsp619m.js} +2 -2
- package/dist/{chunk-g03r429d.js → chunk-brwcbz1z.js} +5 -5
- package/dist/{chunk-t84nam1w.js → chunk-cr8kksjp.js} +1 -1
- package/dist/{chunk-fgymbm74.js → chunk-e8tyr2mk.js} +1 -1
- package/dist/{chunk-79ks83bq.js → chunk-eebn36ws.js} +1 -1
- package/dist/{chunk-n7j6atmv.js → chunk-ewen9p1d.js} +1 -1
- package/dist/{chunk-xx0kkk8r.js → chunk-f168pjxz.js} +1 -1
- package/dist/{chunk-pg4brvfc.js → chunk-fxtqbtey.js} +1 -1
- package/dist/{chunk-jzqy3crv.js → chunk-g6r1vft1.js} +1 -1
- package/dist/{chunk-3n66yz7y.js → chunk-ghf5pc18.js} +1 -1
- package/dist/{chunk-nwdyt27p.js → chunk-gq58xt9y.js} +1 -1
- package/dist/{chunk-0w8azt6t.js → chunk-gz5w84nz.js} +1 -1
- package/dist/{chunk-7n411x4f.js → chunk-h0mh5gec.js} +2 -2
- package/dist/{chunk-1hs03zas.js → chunk-hh3ss945.js} +1 -1
- package/dist/chunk-hrjzd135.js +2 -0
- package/dist/{chunk-tpwqcjte.js → chunk-kdp20nnt.js} +2 -2
- package/dist/{chunk-v1ps8ydq.js → chunk-ke2t93w6.js} +1 -1
- package/dist/{chunk-azbf5z87.js → chunk-m3qb17ad.js} +1 -1
- package/dist/{chunk-bkt3mtfc.js → chunk-madkha56.js} +1 -1
- package/dist/{chunk-4r2r33na.js → chunk-mj04jc44.js} +3 -3
- package/dist/{chunk-8bpj8v6c.js → chunk-ncq1bzwh.js} +1 -1
- package/dist/{chunk-r0znxg0q.js → chunk-p3n4z56e.js} +1 -1
- package/dist/{chunk-2qfks56q.js → chunk-p8z3fmz8.js} +1 -1
- package/dist/{chunk-4af3dzhn.js → chunk-pcpt0661.js} +2 -2
- package/dist/{chunk-kdxj7m84.js → chunk-pv9vw6y3.js} +101 -101
- package/dist/{chunk-g6trc7av.js → chunk-pxg67s3v.js} +1 -1
- package/dist/chunk-qbp5ne23.js +2 -0
- package/dist/{chunk-ga1w4cf0.js → chunk-r0cnxng9.js} +1 -1
- package/dist/{chunk-m2tsxk59.js → chunk-t06tskeq.js} +1 -1
- package/dist/{chunk-j6z9js8n.js → chunk-tef5t0b2.js} +1 -1
- package/dist/{chunk-sqzb3x5z.js → chunk-v7gqjf44.js} +50 -50
- package/dist/{chunk-aq251vv0.js → chunk-v7pzn7md.js} +1 -1
- package/dist/chunk-vejmjcmj.js +3 -0
- package/dist/{chunk-4ny1bdx8.js → chunk-vz9r5f1r.js} +1 -1
- package/dist/{chunk-2b6stk0d.js → chunk-wd71x3xf.js} +1 -1
- package/dist/{chunk-yaqb1eft.js → chunk-wf3sjfvb.js} +1 -1
- package/dist/chunk-x7yb70j1.js +2 -0
- package/dist/{chunk-jf8s7pwc.js → chunk-xb63rsr1.js} +1 -1
- package/dist/{chunk-wtdgt09t.js → chunk-xyy9shta.js} +1 -1
- package/dist/{chunk-nftg75ja.js → chunk-y43xak2g.js} +1 -1
- package/dist/chunk-y7hfh69h.js +2 -0
- package/dist/chunk-y9335aa8.js +2 -0
- package/dist/{chunk-xyndw2gv.js → chunk-ypvt1sy9.js} +1 -1
- package/dist/{chunk-5eggkcv7.js → chunk-yqrckcv0.js} +1 -1
- package/dist/chunk-zgkwpsyj.js +2 -0
- package/dist/cli.js +7 -7
- package/dist/component-library.js +12 -7
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/misc-directives.js +7 -3
- package/dist/pwa.js +1 -1
- package/dist/ssg.js +2 -2
- package/package.json +5 -5
- package/dist/chunk-3ps6h76g.js +0 -2
- package/dist/chunk-57t61q5j.js +0 -2
- package/dist/chunk-7cn6cr0n.js +0 -2
- package/dist/chunk-cdwbfbqn.js +0 -2
- package/dist/chunk-j4emk3cs.js +0 -2
- package/dist/chunk-kd85e532.js +0 -3
- package/dist/chunk-m436z7rz.js +0 -2
- package/dist/chunk-qftdkt5g.js +0 -2
- package/dist/chunk-rhxw3jff.js +0 -2
- package/dist/chunk-sbw7re1b.js +0 -2
- package/dist/chunk-vq4d9345.js +0 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{U}from"./chunk-
|
|
2
|
+
import{U}from"./chunk-v7gqjf44.js";import{Fe,O,Dt}from"./chunk-rbmt5w9v.js";import{dt,_e,M,Ce,Yi,no,Zi,Rn}from"./chunk-mj04jc44.js";import{wt,ue,Ze}from"./chunk-2mqzpzy7.js";import{bo}from"./chunk-madkha56.js";import{An}from"./chunk-dnqzrktd.js";import{ye}from"./chunk-1z0zmgsj.js";import Z from"fs";import T from"path";var{serve:ce}=globalThis.Bun;import H from"zlib";import{promisify as Q}from"util";var K=Q(H.brotliCompress),ee=Q(H.gzip),te=["text/","application/json","application/javascript","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml","application/manifest+json","image/svg+xml"],ne=["text/event-stream","multipart/x-mixed-replace"],re=1024;function se(t){if(!t)return!1;let e=t.toLowerCase();if(ne.some((o)=>e.startsWith(o)))return!1;return te.some((o)=>e.startsWith(o))}function oe(t){let e=new Map;for(let o of t.split(",")){let[r,...a]=o.trim().split(";"),f=r.trim().toLowerCase();if(!f)continue;let h=1;for(let g of a){let l=/^\s*q\s*=\s*([\d.]+)\s*$/i.exec(g);if(!l)continue;let m=Number.parseFloat(l[1]);if(Number.isFinite(m))h=m}e.set(f,h)}return e}function ae(t){if(!t)return null;let e=oe(t),o=e.get("*"),r=(a)=>e.get(a)??o??0;if(r("br")>0)return"br";if(r("gzip")>0)return"gzip";return null}var Y=33554432,V=new Map,z=0;function ie(t,e){if(e.length>Y/8)return;V.set(t,e),z+=e.length;for(let[o,r]of V){if(z<=Y)break;V.delete(o),z-=r.length}}async function Cn(t,e,o={}){if(e.headers.get("content-encoding"))return e;if(e.status===204||e.status===304||!e.body)return e;if(!se(e.headers.get("content-type")))return e;let r=ae(t.headers.get("accept-encoding"));if(!r)return e;let a;try{a=new Uint8Array(await e.arrayBuffer())}catch{return e}let f=()=>new Response(a,{status:e.status,statusText:e.statusText,headers:J(e.headers)});if(a.length<(o.threshold??re))return f();try{let h=o.quality??5,g=`${r}:${h}:${a.length}:${Bun.hash(a)}`,l=V.get(g);if(!l)l=r==="br"?await K(a,{params:{[H.constants.BROTLI_PARAM_QUALITY]:h,[H.constants.BROTLI_PARAM_SIZE_HINT]:a.length}}):await ee(a),ie(g,l);if(l.length>=a.length)return f();let m=J(e.headers);return m.set("Content-Encoding",r),m.set("Content-Length",String(l.length)),new Response(l,{status:e.status,statusText:e.statusText,headers:m})}catch{return f()}}function J(t){let e=new Headers(t),o=e.get("Vary");if(!o)return e.set("Vary","Accept-Encoding"),e;if(!o.split(",").some((a)=>a.trim().toLowerCase()==="accept-encoding"))e.set("Vary",`${o}, Accept-Encoding`);return e}class G{now;entries=new U(1000,{maxBytes:33554432,sizeOf:(t)=>t.body.byteLength+JSON.stringify(t.headers).length*2});pending=new Map;generation=0;constructor(t=Date.now){this.now=t}invalidate(t){this.generation++,this.pending.clear();for(let e of Array.from(this.entries.keys()))if(t===void 0||this.entries.get(e)?.path===t)this.entries.delete(e)}async respond(t,e,o){let r,a=async()=>{let s=r??await o();return s.headers.set("Cache-Control","private, no-store"),s.headers.set("Vary",M(s.headers.get("Vary")).Vary),s};if(!e||t.method!=="GET"||t.headers.has("Cookie")||t.headers.has("Authorization")||t.headers.has("Range"))return a();let f=new URL(t.url),h=`${f.origin}${f.pathname}${f.search}|${_e(t)?"fragment":"document"}`,g=this.entries.get(h),l=(s)=>{let b=new Headers(s.headers);return b.set("Cache-Control","private, no-store"),b.set("Age",String(Math.max(0,Math.floor((this.now()-s.created)/1000)))),new Response(s.body.slice(0),{headers:b})},m=g?(this.now()-g.created)/1000:1/0;if(g&&m<e.maxAge)return l(g);let v=this.generation,_=async()=>{let s=await o();r=s;let b=(s.headers.get("Vary")??"").toLowerCase().split(",").map((y)=>y.trim()).filter(Boolean);if(s.status!==200||s.headers.has("Set-Cookie")||/(?:private|no-store|no-cache)/i.test(s.headers.get("Cache-Control")??"")||b.some((y)=>y!=="x-stx-router"&&y!=="accept-encoding"))return null;let E=await s.clone().arrayBuffer();if(E.byteLength>1048576)return null;s.headers.set("Vary",M(s.headers.get("Vary")).Vary);let n={body:E,headers:Array.from(s.headers.entries()),created:this.now(),path:f.pathname};if(this.generation===v)this.entries.set(h,n);return n},x=this.pending.get(h);if(!x){if(this.pending.size>=1000)return a();x=_().finally(()=>{if(this.pending.get(h)===x)this.pending.delete(h)}),this.pending.set(h,x)}if(g&&m<e.maxAge+(e.swr??0))return x.catch(()=>{}),l(g);let A=await x;return A?l(A):a()}}var pe={".js":"application/javascript",".mjs":"application/javascript",".css":"text/css",".json":"application/json",".html":"text/html",".txt":"text/plain",".xml":"application/xml",".pdf":"application/pdf",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".mp4":"video/mp4",".webm":"video/webm",".ogg":"audio/ogg",".mp3":"audio/mpeg",".wav":"audio/wav",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"};async function xg(t={}){let e=T.resolve(t.outputDir||".output"),o=t.port??3000,r=Yi(e);if(!r)console.error("[stx] No build manifest found. Run `stx build` first."),process.exit(1);console.log(`[stx] Production server loading ${r.routes.length} routes...`);let a=An(r.routeRules),f=new G,h=bo(e,r.apiRoutes??[]),g=Bun.file(T.join(e,"server/runtime-config.json")),l=t.runtimeConfig??(await g.exists()?await g.json():void 0),m=l?O(l):void 0,v=new Map,_=new Map,x=new Map,A=new Map;for(let n of r.routes)try{let y=T.join(e,n.compiledPath),i=JSON.parse(await Bun.file(y).text());if(m)i.html=Dt(i.html,m);v.set(n.pattern,i),x.set(n.pattern,Ze(i.html)),A.set(n.pattern,ye(i.html));let j=T.join(e,n.fragmentPath);if(await Bun.file(j).exists()){let P=await Bun.file(j).text();_.set(n.pattern,m?Dt(P,m):P)}}catch(y){console.warn(`[stx] Failed to load route ${n.pattern}:`,y)}let s=new Map,b=[];for(let n of r.routes)if(n.hasParams){let{regex:y,params:i}=ue(n.pattern,{page:!0});b.push({regex:y,route:n,paramNames:i})}else s.set(n.pattern,n);let E=ce({port:o,async fetch(n){return Cn(n,await Fe(m??O(),async()=>{let i=new URL(n.url).pathname;if(t.onRequest){let p=await t.onRequest(n);if(p)return p}if(t.apiRouter){let p=await t.apiRouter.handleRequest(n);if(p.status!==404)return p}if(t.apiRoutes?.[i])return t.apiRoutes[i](n);let j=await h(n);if(j)return j;if((n.method==="GET"||n.method==="HEAD")&&i!=="/"){let p=T.resolve(e,"public"),d;try{d=decodeURIComponent(i)}catch{d=i}if(!d.includes("\x00")){let u=T.resolve(p,`.${d}`);if(u===p||u.startsWith(`${p}${T.sep}`))try{if(Z.existsSync(u)&&Z.statSync(u).isFile()){let R=T.extname(u).toLowerCase(),B=pe[R]||"application/octet-stream",X=i.startsWith("/__stx/")||/\.[0-9a-f]{8}\./.test(i);return new Response(Bun.file(u),{headers:{"Content-Type":B,"Cache-Control":X?"public, max-age=31536000, immutable":"public, max-age=3600"}})}}catch{}}}let P=_e(n),C=null,q={};if(C=s.get(i)||null,!C)for(let{regex:p,route:d,paramNames:u}of b){let c=i.match(p);if(c){C=d,u.forEach((R,B)=>{q[R]=c[B+1]});break}}if(!C){let p=wt(i)?null:s.get("/404")||null;if(p){let d=v.get(p.pattern);if(d)return new Response(d.html,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404,headers:{"Content-Type":"text/plain; charset=utf-8"}})}let N=a(i),W=Object.keys(N).length>0;return f.respond(n,N.cache,async()=>{let p=v.get(C.pattern);if(P&&n.method==="GET"&&p&&!p.hasServerScripts&&Object.keys(p.placeholders).length===0){let c=_.get(C.pattern);if(c){let R=x.get(C.pattern);return new Response(c,{status:p.status??200,headers:{"Content-Type":"text/html","X-STX-Fragment":"true",...A.has(C.pattern)?{"X-STX-Runtime":A.get(C.pattern)?"true":"false"}:{},...R?{"X-STX-Layout":R.layout,"X-STX-Layout-Group":R.group}:{},...M(),...N.cache?{}:{"Cache-Control":dt}}})}}let d=no(n.method),u=v.get(C.pattern);if(!u){let c=s.get("/500")||null;if(c){let R=v.get(c.pattern);if(R)return new Response(R.html,{status:500,headers:{"Content-Type":"text/html"}})}return new Response("Internal Server Error",{status:500})}if(C.prerendered&&d)return new Response("Prerendered pages do not accept actions",{status:405,headers:{Allow:"GET, HEAD"}});if(!d&&!u.hasServerScripts&&Object.keys(u.placeholders).length===0)return new Response(u.html,{status:u.status??200,headers:{"Content-Type":"text/html",...M(),"Cache-Control":"public, max-age=60"}});try{let{html:c,boundaries:R,redirect:B,cookies:X,status:F,headers:I}=await Rn(u,{params:q,request:n,method:n.method,__stx_strict_hydration:W,__stx_runtime_config:m});if(B)return Zi(B,X,I);if(R&&R.length>0){let{renderStreamingPage:S,streamToResponse:D}=await import("./chunk-9gdz941b.js"),L=new Headers({...M(),...I,"Cache-Control":"private, no-store"});for(let k of X??[])L.append("Set-Cookie",k);if(P&&!d){let k=Ze(c);L.set("X-STX-Fragment","true"),L.set("X-STX-Runtime",ye(c)?"true":"false"),L.set("X-STX-Layout",k.layout),L.set("X-STX-Layout-Group",k.group)}return D(S(P&&!d?Ce(c,r.routerContainer||"main",!0):c,R,{timeoutMs:30000}),{status:F??u.status??200,headers:L})}let w=new Headers({"Content-Type":"text/html",...M(),...N.cache?{}:{"Cache-Control":"private, no-store"}});for(let S of X??[])w.append("Set-Cookie",S);for(let[S,D]of Object.entries(I??{}))w.set(S,D);if(w.set("Vary",M(w.get("Vary")).Vary),P&&!d){let S=Ze(c);return w.set("X-STX-Fragment","true"),w.set("X-STX-Runtime",ye(c)?"true":"false"),w.set("X-STX-Layout",S.layout),w.set("X-STX-Layout-Group",S.group),new Response(Ce(c,r.routerContainer||"main",!0),{status:F??u.status??200,headers:w})}return new Response(c,{status:F??u.status??200,headers:w})}catch(c){if(console.error(`[stx] Hydration error for ${i}:`,c),W)return new Response("Internal Server Error",{status:500});return new Response(u.html,{headers:{"Content-Type":"text/html"}})}})}))}});return console.log(`[stx] Production server running at http://localhost:${E.port}`),console.log(`[stx] Serving ${r.routes.length} routes (${v.size} pre-loaded)`),{port:E.port,stop:()=>{f.invalidate(),E.stop()},invalidate:(n)=>f.invalidate(n)}}
|
|
3
3
|
export{Cn,xg};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{la,ua,da,pa,qm}from"./chunk-m3qb17ad.js";import"./chunk-x6hqe25e.js";import"./chunk-bdsp619m.js";import"./chunk-hez09ssh.js";import"./chunk-brwcbz1z.js";import"./chunk-2d31hmtc.js";import"./chunk-x9wwd2ee.js";import"./chunk-g6r1vft1.js";import"./chunk-2dm1kn1w.js";import"./chunk-v7pzn7md.js";import"./chunk-vejmjcmj.js";import"./chunk-r3j4m04w.js";import"./chunk-pcpt0661.js";import"./chunk-1z0zmgsj.js";import"./chunk-m5nzpjej.js";import"./chunk-p8z3fmz8.js";import"./chunk-kdp20nnt.js";import"./chunk-wd71x3xf.js";import"./chunk-4c86wr9a.js";import"./chunk-3fwdxxh1.js";import"./chunk-q7fh1xka.js";import"./chunk-2mqzpzy7.js";import"./chunk-v7gqjf44.js";import"./chunk-ypvt1sy9.js";import"./chunk-rbmt5w9v.js";import"./chunk-zkx2m308.js";import"./chunk-zn3c0ew5.js";import"./chunk-ez35607j.js";export{la as buildNative,qm as default,ua as findCraftBinary,pa as getAvailableFormats,da as getAvailableTargets};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{sh,yf,Ro,rs,rr,Ao,Po,ss,os,is,Io,qa,bf,yt}from"./chunk-
|
|
2
|
+
import{sh,yf,Ro,rs,rr,Ao,Po,ss,os,is,Io,qa,bf,yt}from"./chunk-pcpt0661.js";import"./chunk-1z0zmgsj.js";import"./chunk-m5nzpjej.js";import"./chunk-kdp20nnt.js";import"./chunk-wd71x3xf.js";import"./chunk-4c86wr9a.js";import"./chunk-3fwdxxh1.js";import"./chunk-q7fh1xka.js";import"./chunk-2mqzpzy7.js";import{z}from"./chunk-v7gqjf44.js";import"./chunk-ypvt1sy9.js";import"./chunk-rbmt5w9v.js";import"./chunk-zkx2m308.js";import"./chunk-zn3c0ew5.js";import"./chunk-ez35607j.js";export{sh as clearScriptScanCache,ss as convertServerLoopAttributesToDirectives,Ao as convertSignalDirectivesToAttributes,os as convertSignalLoopsToAttributes,rr as extractClientSignalNames,z as extractExports,qa as findMarkupIndexOutsideScripts,rs as hasSignalsSyntax,Ro as parseLoopExpression,Po as preEvalLiteralReactiveIfs,is as processScriptSetup,Io as processSignals,bf as rewriteStxImportSpecifiers,yf as scanScriptTags,yt as stripStxRuntimeImports};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{m,h,p}from"./chunk-
|
|
2
|
+
import{m,h,p}from"./chunk-v7gqjf44.js";import{j}from"./chunk-kdp20nnt.js";import{i}from"./chunk-brwcbz1z.js";import k from"path";var q={enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},T=/<!-- @section:([\w-]+) -->([\s\S]*?)<!-- @endsection:\1 -->/g;var M=/<!-- @suspense:([\w-]+) -->([\s\S]*?)<!-- @endsuspense:\1 -->/g;function H(e){let t=[],o=0,n;M.lastIndex=0;while((n=M.exec(e))!==null){if(n.index>o){let a=e.slice(o,n.index);if(a.trim())t.push({type:t.length===0?"shell":"content",content:a})}let s=n[1],r=n[2];t.push({type:"suspense",name:s,content:r}),o=n.index+n[0].length}if(o<e.length){let s=e.slice(o);if(s.trim())t.push({type:t.length===0?"shell":"content",content:s})}if(t.length===0)t.push({type:"shell",content:e});return t}async function Jg(e,t={},o={}){let n={...j,...o,streaming:{...q,...o.streaming}},s=n.streaming?.bufferSize||16384;return new ReadableStream({async start(r){try{let a=await Bun.file(e).text(),S=a.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),g=S?S[1]:"",c=a.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),y={...t,__filename:e,__dirname:k.dirname(e)};if(g.trim())await m(g,y,e);let E=H(c),l=new Set;if(!E.some((w)=>w.type==="suspense")){let w=n.streaming?.strategy||"auto",x=new RegExp(T.source,"g");if(!(w!=="manual"&&x.test(c))){let u=await i(c,y,e,n,l);for(let b=0;b<u.length;b+=s)r.enqueue(u.slice(b,b+s)),await new Promise((f)=>setTimeout(f,0))}else{let u=[],b=new RegExp(T.source,"g"),f;while((f=b.exec(c))!==null)u.push({name:f[1],content:f[2],start:f.index,end:f.index+f[0].length});let v=0;for(let _ of u){if(_.start>v){let I=c.slice(v,_.start);if(I.trim()){let O=await i(I,y,e,n,l);r.enqueue(O),await new Promise((D)=>setTimeout(D,0))}}let C=await i(_.content,y,e,n,l);r.enqueue(C),await new Promise((I)=>setTimeout(I,0)),v=_.end}if(v<c.length){let _=c.slice(v);if(_.trim()){let C=await i(_,y,e,n,l);r.enqueue(C)}}}}else{let w=new Map;for(let d of E)if(d.type==="shell"||d.type==="content"){let u=await i(d.content,y,e,n,l);r.enqueue(u)}else if(d.type==="suspense"&&d.name){let u=`stx-suspense-${d.name}`;r.enqueue(`<div id="${u}" data-suspense="${d.name}" style="display:contents;">
|
|
3
3
|
<template data-suspense-fallback>Loading...</template>
|
|
4
4
|
</div>`),w.set(d.name,i(d.content,y,e,n,l))}r.enqueue(`
|
|
5
5
|
<script>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{nn,ho,yo,bo,Xm,vo}from"./chunk-
|
|
2
|
+
import{nn,ho,yo,bo,Xm,vo}from"./chunk-madkha56.js";import"./chunk-3fwdxxh1.js";import"./chunk-2mqzpzy7.js";import"./chunk-rbmt5w9v.js";export{yo as buildServerApi,Xm as createServerApi,nn as discoverServerApi,ho as generateApiTypes,vo as isServerApiSource,bo as productionApiDispatcher};
|