@stacksjs/stx 0.2.760 → 0.2.762
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-00nz3pas.js +2 -0
- package/dist/{chunk-eazvp48w.js → chunk-02c46de1.js} +26 -9
- package/dist/chunk-05jdq9tw.js +177 -0
- package/dist/chunk-0cajfv7y.js +2 -0
- package/dist/{chunk-3nxe5xmy.js → chunk-0fs9kx0h.js} +3 -3
- package/dist/{chunk-42hcspws.js → chunk-0kq0k4pg.js} +2 -2
- package/dist/{chunk-y8srg0q3.js → chunk-0sd4td6z.js} +3 -3
- package/dist/{chunk-f4gqzg1y.js → chunk-0wj31pqy.js} +2 -2
- package/dist/chunk-13v3vgb6.js +2 -0
- package/dist/{chunk-v5afjcy3.js → chunk-18chz0q4.js} +1 -1
- package/dist/chunk-1p8t2ekg.js +2 -0
- package/dist/chunk-1rcntvgx.js +2 -0
- package/dist/chunk-1w5gtkd6.js +2 -0
- package/dist/chunk-28vtqwxh.js +2 -0
- package/dist/chunk-298gj90a.js +2 -0
- package/dist/{chunk-n8s5301s.js → chunk-2eamszdq.js} +2 -2
- package/dist/chunk-2gn6smrq.js +2 -0
- package/dist/{chunk-h692k9xn.js → chunk-2typf9dh.js} +4 -4
- package/dist/chunk-2wq0h5ye.js +2 -0
- package/dist/{chunk-prej5pk6.js → chunk-2zd51tj4.js} +2 -2
- package/dist/chunk-2zg3jmy7.js +2 -0
- package/dist/{chunk-ztdjdxjt.js → chunk-319aez2f.js} +3 -3
- package/dist/{chunk-7g9vd5fv.js → chunk-37y8sg48.js} +2 -2
- package/dist/{chunk-j2mpqa4p.js → chunk-3csfmhg0.js} +2 -2
- package/dist/{chunk-jb1dk0w7.js → chunk-3mz088mb.js} +2 -2
- package/dist/chunk-3wxb7mfb.js +2 -0
- package/dist/{chunk-cehjp06v.js → chunk-42zqmcnc.js} +3 -3
- package/dist/{chunk-89h4snzd.js → chunk-4833k99b.js} +2 -2
- package/dist/{chunk-jevd16gq.js → chunk-48g9wez2.js} +30 -30
- package/dist/chunk-4tgn1frg.js +3 -0
- package/dist/chunk-528cn6qm.js +2 -0
- package/dist/{chunk-afj19nsj.js → chunk-59k4xb92.js} +5 -5
- package/dist/chunk-5x0g7e9y.js +2 -0
- package/dist/{chunk-83ezv8yz.js → chunk-5yhv5eqq.js} +3 -3
- package/dist/chunk-633a53wg.js +2 -0
- package/dist/chunk-6b737vch.js +2 -0
- package/dist/chunk-72ns4q88.js +2 -0
- package/dist/chunk-736ex6r5.js +26 -0
- package/dist/chunk-86cg9qqm.js +2 -0
- package/dist/{chunk-gs6wc7sr.js → chunk-89801pjp.js} +5 -5
- package/dist/chunk-8czxtjwm.js +2 -0
- package/dist/chunk-8h5mqs28.js +2 -0
- package/dist/{chunk-yp6w740k.js → chunk-8rk79ha1.js} +2 -2
- package/dist/{chunk-kpr09x3g.js → chunk-8y54tpbr.js} +7 -7
- package/dist/{chunk-s4y26fk6.js → chunk-8yyq3nfg.js} +2 -2
- package/dist/{chunk-30j6mbrf.js → chunk-932zx5q4.js} +7 -7
- package/dist/chunk-940wny2b.js +2 -0
- package/dist/chunk-9fh4ah7t.js +2 -0
- package/dist/{chunk-sgm6tg8h.js → chunk-9k8ztdcc.js} +2 -2
- package/dist/{chunk-vvc39v6p.js → chunk-a222bwpc.js} +5 -5
- package/dist/chunk-a81rt2t4.js +3 -0
- package/dist/chunk-ad9dt9rk.js +2 -0
- package/dist/chunk-ak4w2emd.js +2 -0
- package/dist/{chunk-tb56j1zt.js → chunk-ak93e1zz.js} +5 -5
- package/dist/{chunk-jt28zh50.js → chunk-b0z2n941.js} +2 -2
- package/dist/{chunk-xgegyttg.js → chunk-b51p56k5.js} +2 -2
- package/dist/{chunk-r4sawwmp.js → chunk-b7x8b83z.js} +1 -1
- package/dist/chunk-b8dtz3v8.js +2 -0
- package/dist/{chunk-frk6rzrq.js → chunk-ben8bjnk.js} +4 -4
- package/dist/{chunk-w8p1y4c0.js → chunk-bvctccab.js} +4 -4
- package/dist/{chunk-hk98vptc.js → chunk-cdcrd33m.js} +2 -2
- package/dist/chunk-cenvzm5q.js +2 -0
- package/dist/chunk-d49pst1m.js +2 -0
- package/dist/{chunk-hfbzfrpv.js → chunk-d96xddt9.js} +14 -14
- package/dist/chunk-dj0qy19b.js +2 -0
- package/dist/{chunk-asp7ett1.js → chunk-dnsf934e.js} +9 -9
- package/dist/{chunk-7r7j7vwt.js → chunk-ds6mbfdq.js} +3 -3
- package/dist/{chunk-bsgg8zzk.js → chunk-dvpk4c1y.js} +2 -2
- package/dist/chunk-e2q79dfs.js +2 -0
- package/dist/{chunk-9s1qnf90.js → chunk-eb6p3p62.js} +2 -2
- package/dist/chunk-ebxncrd8.js +2 -0
- package/dist/{chunk-q49ykyq9.js → chunk-edhxg3rz.js} +14 -14
- package/dist/{chunk-rcfmwx8r.js → chunk-epa73jvs.js} +2 -2
- package/dist/{chunk-3cn9y08d.js → chunk-evxp3wmv.js} +7 -7
- package/dist/{chunk-z8k3fx4r.js → chunk-f8p8ggvw.js} +4 -4
- package/dist/{chunk-se28p2xy.js → chunk-fhpsf4z7.js} +6 -6
- package/dist/chunk-fht1zs1r.js +2 -0
- package/dist/chunk-fjfrgef4.js +2 -0
- package/dist/chunk-fmk9hjht.js +2 -0
- package/dist/{chunk-4s9kytdz.js → chunk-fxmc5006.js} +2 -2
- package/dist/chunk-fxnk5ee8.js +2 -0
- package/dist/{chunk-6ts3sthp.js → chunk-g4k0svq6.js} +2 -2
- package/dist/{chunk-2qz891k4.js → chunk-gwjh981q.js} +10 -10
- package/dist/chunk-hnen9b45.js +2 -0
- package/dist/{chunk-7v2srnpv.js → chunk-j1tsda22.js} +10 -10
- package/dist/chunk-j1z7tgdp.js +2 -0
- package/dist/{chunk-4zw118tn.js → chunk-jgk5j35w.js} +4 -4
- package/dist/chunk-jq1698j4.js +2 -0
- package/dist/{chunk-pwmkhs7z.js → chunk-jyp2mmts.js} +2 -2
- package/dist/chunk-k0jkpw0q.js +2 -0
- package/dist/{chunk-3kfbs0mw.js → chunk-k2ex94n8.js} +1 -1
- package/dist/chunk-k469ym7a.js +2 -0
- package/dist/{chunk-m00c7sh0.js → chunk-k9247v28.js} +1 -1
- package/dist/{chunk-rprewgyj.js → chunk-k9wr8xf5.js} +6 -6
- package/dist/chunk-m3z13f59.js +25 -0
- package/dist/chunk-m5740sd3.js +2 -0
- package/dist/{chunk-qw9kgzb3.js → chunk-m6rzsbas.js} +5 -5
- package/dist/{chunk-5vmbycy5.js → chunk-mbe4gqd3.js} +2 -2
- package/dist/{chunk-myynywry.js → chunk-mdvtermb.js} +2 -2
- package/dist/chunk-mdw96yhg.js +2 -0
- package/dist/chunk-mebf9vwb.js +2 -0
- package/dist/{chunk-ej1jkt9a.js → chunk-nm9tnxnw.js} +6 -6
- package/dist/chunk-p2se8s6r.js +2 -0
- package/dist/chunk-p7zrz0wb.js +2 -0
- package/dist/chunk-pdnyfk2v.js +2 -0
- package/dist/{chunk-fjxhga6w.js → chunk-pqbxa0r7.js} +2 -2
- package/dist/chunk-q245q8z1.js +2 -0
- package/dist/{chunk-5q9ss7ty.js → chunk-q3azy64b.js} +4 -4
- package/dist/chunk-qfhjtz2q.js +2 -0
- package/dist/chunk-qjbcp3tc.js +33 -0
- package/dist/{chunk-qwsgc5rc.js → chunk-qystt1qc.js} +1 -1
- package/dist/{chunk-dh9aagwm.js → chunk-r1tp2gnr.js} +1 -1
- package/dist/chunk-r5tsewzd.js +2 -0
- package/dist/{chunk-pes27snj.js → chunk-r8zhed35.js} +3 -3
- package/dist/{chunk-g4e6egrr.js → chunk-rd33qkfs.js} +8 -8
- package/dist/{chunk-hmydy949.js → chunk-rh2qth8r.js} +5 -5
- package/dist/chunk-rha8sv1h.js +3 -0
- package/dist/{chunk-n7s4n62j.js → chunk-rj3p5fdy.js} +3 -3
- package/dist/{chunk-94ymndc5.js → chunk-rmk8efc3.js} +43 -43
- package/dist/chunk-rnvrtcz6.js +2 -0
- package/dist/{chunk-xsf7ax50.js → chunk-rqd6b2nc.js} +3 -3
- package/dist/{chunk-vtv7165t.js → chunk-rxm1mjkb.js} +2 -2
- package/dist/chunk-s36cpnxa.js +2 -0
- package/dist/{chunk-0y2zzqsq.js → chunk-t1shvfhm.js} +76 -76
- package/dist/{chunk-vh1d5eqk.js → chunk-t2cq4bpe.js} +6 -6
- package/dist/chunk-tfy1m821.js +2 -0
- package/dist/{chunk-465resq9.js → chunk-tpfxvw4q.js} +17 -17
- package/dist/{chunk-t6qn1374.js → chunk-tshpcvcy.js} +2 -2
- package/dist/chunk-v1ff2dfp.js +7 -0
- package/dist/chunk-vc3ppphz.js +2 -0
- package/dist/chunk-vttx66q0.js +2 -0
- package/dist/chunk-vxs07119.js +2 -0
- package/dist/chunk-w2pch5xn.js +4 -0
- package/dist/{chunk-j4snweyz.js → chunk-wby7qzha.js} +3 -3
- package/dist/{chunk-19safa6y.js → chunk-wmnzapn8.js} +2 -2
- package/dist/chunk-wwnqbv9j.js +3 -0
- package/dist/chunk-x1x69g3s.js +2 -0
- package/dist/{chunk-gs373714.js → chunk-x5seqmrv.js} +2 -2
- package/dist/chunk-x8hz5gzb.js +2 -0
- package/dist/chunk-xfdtym3s.js +2 -0
- package/dist/{chunk-q9npggak.js → chunk-xgnmgjpv.js} +8 -8
- package/dist/{chunk-bsq9zg9j.js → chunk-xt034729.js} +6 -6
- package/dist/{chunk-m220n98m.js → chunk-xtwc2dbk.js} +2 -2
- package/dist/{chunk-0ggwm837.js → chunk-y4mp1rra.js} +101 -101
- package/dist/chunk-y6mqq78g.js +2 -0
- package/dist/chunk-y8pftjg8.js +12 -0
- package/dist/{chunk-wz5m7ybz.js → chunk-yb71b2d6.js} +2 -2
- package/dist/chunk-ycttwgpg.js +2 -0
- package/dist/chunk-yd6x9226.js +2 -0
- package/dist/{chunk-3m9vrhja.js → chunk-yk456jp4.js} +8 -8
- package/dist/chunk-yn3kff5k.js +2 -0
- package/dist/chunk-ynjm2tm0.js +2 -0
- package/dist/{chunk-j04v4rgf.js → chunk-zhrz4zvw.js} +5 -5
- package/dist/chunk-zpjdp0he.js +2 -0
- package/dist/cli.js +20 -20
- package/dist/client/signals-hydration-audit-runtime.js +2 -0
- package/dist/client/signals-process-element-runtime.js +17 -2
- package/dist/composable-loader.d.ts +1 -1
- package/dist/composable-loader.js +47 -10
- package/dist/composables/index.d.ts +3 -0
- package/dist/composables/index.js +1 -0
- package/dist/composables/use-completion.d.ts +29 -0
- package/dist/composables/use-completion.js +125 -0
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/message-catalogs.d.ts +39 -0
- package/dist/message-catalogs.js +128 -0
- package/dist/native/compiler/bundle.js +3 -33
- package/dist/process.d.ts +1 -1
- package/dist/process.js +87 -22
- package/dist/pwa.js +3 -3
- package/dist/ssg.js +14 -14
- package/dist/store-loader.d.ts +27 -3
- package/dist/store-loader.js +115 -10
- package/dist/types/config-types.d.ts +1 -0
- package/dist/unresolved-identifiers.js +1 -0
- package/package.json +5 -5
- package/dist/chunk-0b7f2mby.js +0 -2
- package/dist/chunk-0j7e56zm.js +0 -2
- package/dist/chunk-1khg5vjs.js +0 -2
- package/dist/chunk-3h2yz805.js +0 -2
- package/dist/chunk-3kmwgpm1.js +0 -2
- package/dist/chunk-3wfewscj.js +0 -2
- package/dist/chunk-4tz00fkp.js +0 -2
- package/dist/chunk-52q8184e.js +0 -2
- package/dist/chunk-59ytzyp1.js +0 -2
- package/dist/chunk-5e2ez5n0.js +0 -2
- package/dist/chunk-6ndeycxk.js +0 -2
- package/dist/chunk-75r09rqt.js +0 -2
- package/dist/chunk-76679dw7.js +0 -33
- package/dist/chunk-7h5d35bf.js +0 -2
- package/dist/chunk-7kac7hdw.js +0 -2
- package/dist/chunk-7nz28a6c.js +0 -16
- package/dist/chunk-82ybmdqk.js +0 -2
- package/dist/chunk-8av44gw2.js +0 -2
- package/dist/chunk-8frs2dtp.js +0 -2
- package/dist/chunk-8prq9t3b.js +0 -2
- package/dist/chunk-8sxngenk.js +0 -2
- package/dist/chunk-9epeb4sn.js +0 -2
- package/dist/chunk-9zmb7dcv.js +0 -2
- package/dist/chunk-abs1k04e.js +0 -2
- package/dist/chunk-akgt21vw.js +0 -2
- package/dist/chunk-b561wv5x.js +0 -2
- package/dist/chunk-bfdd0nmc.js +0 -2
- package/dist/chunk-c05r0rzw.js +0 -3
- package/dist/chunk-c7yjhjr2.js +0 -2
- package/dist/chunk-c9xq89nt.js +0 -2
- package/dist/chunk-cpep999n.js +0 -2
- package/dist/chunk-cr7mn65s.js +0 -2
- package/dist/chunk-dqs4bgec.js +0 -2
- package/dist/chunk-e30kgg28.js +0 -2
- package/dist/chunk-e3fkq9gb.js +0 -2
- package/dist/chunk-e9kajy9a.js +0 -2
- package/dist/chunk-eab8na0z.js +0 -2
- package/dist/chunk-ec5q50ve.js +0 -2
- package/dist/chunk-ec8gn2m0.js +0 -2
- package/dist/chunk-ex2397dc.js +0 -2
- package/dist/chunk-exg7ry7b.js +0 -2
- package/dist/chunk-f4j42tsg.js +0 -2
- package/dist/chunk-fj105fff.js +0 -2
- package/dist/chunk-gk775pcy.js +0 -177
- package/dist/chunk-ha6tr22a.js +0 -2
- package/dist/chunk-htc7pasb.js +0 -2
- package/dist/chunk-jfvr1135.js +0 -2
- package/dist/chunk-k3wnmpt3.js +0 -2
- package/dist/chunk-kb8654dp.js +0 -4
- package/dist/chunk-kfqdx75m.js +0 -2
- package/dist/chunk-mmdfjmgk.js +0 -25
- package/dist/chunk-mreh1t5x.js +0 -2
- package/dist/chunk-n839v6az.js +0 -2
- package/dist/chunk-ptzzpf97.js +0 -2
- package/dist/chunk-py7g5hxd.js +0 -2
- package/dist/chunk-qgsrxyh9.js +0 -2
- package/dist/chunk-qmxcs806.js +0 -2
- package/dist/chunk-qvcs4f4v.js +0 -2
- package/dist/chunk-qz9fzz5k.js +0 -2
- package/dist/chunk-rh90yh1c.js +0 -2
- package/dist/chunk-s0wst4wj.js +0 -2
- package/dist/chunk-sj5t0tnv.js +0 -2
- package/dist/chunk-stddpecv.js +0 -2
- package/dist/chunk-t4mpq6t0.js +0 -3
- package/dist/chunk-tb6jcr2v.js +0 -2
- package/dist/chunk-tdjw105v.js +0 -2
- package/dist/chunk-tn40nh9e.js +0 -3
- package/dist/chunk-tp2g09ca.js +0 -3
- package/dist/chunk-wpgq0tq4.js +0 -2
- package/dist/chunk-xabs41cv.js +0 -12
- package/dist/chunk-yme43vbp.js +0 -2
- package/dist/chunk-zg5xh20b.js +0 -2
package/dist/pwa.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
Icon generation requires the sharp package for image processing.`),e.success=!1,e}let g=await c.default(o).metadata();if(g.width&&g.width<512)e.warnings.push(`Source icon is ${g.width}x${g.height}. Recommend using at least 512x512 for best quality.`);for(let i of s){let d=u.join(a,`icon-${i}x${i}.png`);if(await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d),l){let x=u.join(a,`icon-${i}x${i}.webp`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).webp({quality:90}).toFile(x),e.generatedFiles.push(x)}}if(p){for(let d of S){let x=u.join(a,`apple-touch-icon-${d}x${d}.png`);await c.default(o).resize(d,d,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(x),e.generatedFiles.push(x)}let i=u.join(a,"apple-touch-icon.png");await c.default(o).resize(180,180,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(i),e.generatedFiles.push(i)}for(let i of P){let d=u.join(a,`favicon-${i}x${i}.png`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d)}let f=512,y=u.join(a,`icon-maskable-${f}x${f}.png`),m=Math.floor(f*0.1),k=f-m*2;await c.default(o).resize(k,k,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).extend({top:m,bottom:m,left:m,right:m,background:{r:255,g:255,b:255,alpha:1}}).png().toFile(y),e.generatedFiles.push(y)}catch(c){let h=c instanceof Error?c.message:String(c);e.errors.push(`Icon generation failed: ${h}`),e.success=!1}return e}function N(n){let t=n.sizes||v,e=n.outputDir?`/${n.outputDir}`:"/pwa-icons",r=n.generateWebP??!0,o=n.generateAppleIcons??!0,a=[];for(let s of t)if(a.push(`${e}/icon-${s}x${s}.png`),r)a.push(`${e}/icon-${s}x${s}.webp`);if(o){a.push(`${e}/apple-touch-icon.png`);for(let s of S)a.push(`${e}/apple-touch-icon-${s}x${s}.png`)}for(let s of P)a.push(`${e}/favicon-${s}x${s}.png`);return a.push(`${e}/icon-maskable-512x512.png`),a}async function I(){try{return await import("sharp"),!0}catch{return!1}}function A(n,t,e,r){let o=[],a=r.join(" ");for(let s of n)if(o.push({src:`${t}/icon-${s}x${s}.png`,sizes:`${s}x${s}`,type:"image/png",purpose:a}),e)o.push({src:`${t}/icon-${s}x${s}.webp`,sizes:`${s}x${s}`,type:"image/webp",purpose:a});return o}function C(n){return n.map((t)=>({name:t.name,short_name:t.shortName,description:t.description,url:t.url,icons:t.icons?.map((e)=>({src:e.src,sizes:e.sizes,type:e.type}))}))}function T(n){let t=n.pwa?.shareTarget;if(!t?.enabled)return;let e={action:t.action||"/share",method:t.method||"POST",enctype:t.enctype||"multipart/form-data",params:{title:t.params?.title||"title",text:t.params?.text||"text",url:t.params?.url||"url"}};if(t.acceptFiles&&t.acceptFiles.length>0)e.params.files=t.acceptFiles.map((r)=>({name:r.name,accept:r.accept}));return e}function H(n){let t=n.pwa?.fileHandlers;if(!t?.enabled||!t.accept)return;let e=[{action:t.action||"/",accept:t.accept,launch_type:t.launchType||"single-client"}];if(t.icons)e[0].icons=t.icons.map((r)=>({src:r.src,sizes:r.sizes,type:r.type}));return e}function W(n){let t=n.pwa?.protocolHandlers;if(!t||t.length===0)return;return t.map((e)=>({protocol:e.protocol,url:e.url}))}function j(n){let t=n.pwa;if(!t?.enabled||!t.manifest)return null;let{manifest:e,icons:r}=t,o=r?.sizes||[72,96,128,144,152,192,384,512],a=r?.outputDir?`/${r.outputDir}`:"/pwa-icons",s=r?.generateWebP??!0,l=r?.purpose||["any","maskable"],p={name:e.name,short_name:e.shortName||e.name,description:e.description,start_url:e.startUrl||"/",display:e.display||"standalone",display_override:e.displayOverride,orientation:e.orientation,theme_color:e.themeColor,background_color:e.backgroundColor,scope:e.scope||"/",lang:e.lang,dir:e.dir,id:e.id,categories:e.categories,icons:A(o,a,s,l)};if(e.shortcuts&&e.shortcuts.length>0)p.shortcuts=C(e.shortcuts);if(e.screenshots&&e.screenshots.length>0)p.screenshots=e.screenshots.map((f)=>({src:f.src,sizes:f.sizes,type:f.type,label:f.label,form_factor:f.platform}));let c=T(n);if(c)p.share_target=c;let h=H(n);if(h)p.file_handlers=h;let g=W(n);if(g)p.protocol_handlers=g;if(e.launchHandler)p.launch_handler={client_mode:e.launchHandler};if(e.handleLinks)p.handle_links=e.handleLinks;if(e.edgeSidePanel?.enabled)p.edge_side_panel={preferred_width:e.edgeSidePanel.preferredWidth};return p}function _(n){let t=j(n);if(!t)return"";let e=JSON.parse(JSON.stringify(t));return JSON.stringify(e,null,2)}function q(n,t){return{...t,...n,shortcuts:n.shortcuts||t.shortcuts,screenshots:n.screenshots||t.screenshots,categories:n.categories||t.categories}}function D(n){let t=[],e=n.pwa;if(!e?.enabled)return t;let r=e.manifest;if(!r)return t.push("PWA manifest configuration is missing"),t;if(!r.name)t.push("Manifest name is required");let o=["fullscreen","standalone","minimal-ui","browser"];if(r.display&&!o.includes(r.display))t.push(`Invalid display mode: ${r.display}. Must be one of: ${o.join(", ")}`);let a=["any","natural","landscape","landscape-primary","landscape-secondary","portrait","portrait-primary","portrait-secondary"];if(r.orientation&&!a.includes(r.orientation))t.push(`Invalid orientation: ${r.orientation}`);let s=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;if(r.themeColor&&!s.test(r.themeColor))t.push(`Invalid theme color: ${r.themeColor}. Must be a valid hex color.`);if(r.backgroundColor&&!s.test(r.backgroundColor))t.push(`Invalid background color: ${r.backgroundColor}. Must be a valid hex color.`);if(e.shareTarget?.enabled){if(!e.shareTarget.action)t.push("Share target action URL is required")}if(e.fileHandlers?.enabled){if(!e.fileHandlers.accept||Object.keys(e.fileHandlers.accept).length===0)t.push("File handlers must specify accepted MIME types")}if(e.protocolHandlers)for(let l of e.protocolHandlers){if(!l.protocol)t.push("Protocol handler missing protocol");if(!l.url||!l.url.includes("%s"))t.push(`Protocol handler URL must contain %s placeholder: ${l.protocol}`)}return t}import z from"path";async function F(n){let t=n.pwa?.offline;if(!t?.enabled)return"";if(t.page){let e=z.isAbsolute(t.page)?t.page:z.resolve(process.cwd(),t.page);if(await Bun.file(e).exists())try{let{processDirectives:r}=await import("./chunk-
|
|
2
|
+
import{Xs,zt,hl,bg}from"./chunk-jgk5j35w.js";import{Gs,Ti,mg,hg,yg}from"./chunk-8y54tpbr.js";import{fl,gl,ml,fg,gg}from"./chunk-eb6p3p62.js";import{Ue,En,$i}from"./chunk-5yhv5eqq.js";import{wg,vg,xg,Sg,Js,sy}from"./chunk-fxmc5006.js";import B from"fs";import w from"path";import O from"fs";import u from"path";var v=[72,96,128,144,152,192,384,512],S=[120,152,167,180],P=[16,32];async function M(n,t){let e={success:!0,generatedFiles:[],errors:[],warnings:[]},r=n.pwa?.icons;if(!r?.src)return e.errors.push("No source icon specified in pwa.icons.src"),e.success=!1,e;let o=u.isAbsolute(r.src)?r.src:u.resolve(process.cwd(),r.src);if(!await Bun.file(o).exists())return e.errors.push(`Source icon not found: ${o}`),e.success=!1,e;let a=u.resolve(t,r.outputDir||"pwa-icons");try{O.mkdirSync(a,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${a}`),e.success=!1,e}let s=r.sizes||v,l=r.generateWebP??!0,p=r.generateAppleIcons??!0;try{let c;try{c=await import("sharp")}catch{return e.errors.push(`sharp is not installed. Install it with: bun add sharp
|
|
3
|
+
Icon generation requires the sharp package for image processing.`),e.success=!1,e}let g=await c.default(o).metadata();if(g.width&&g.width<512)e.warnings.push(`Source icon is ${g.width}x${g.height}. Recommend using at least 512x512 for best quality.`);for(let i of s){let d=u.join(a,`icon-${i}x${i}.png`);if(await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d),l){let x=u.join(a,`icon-${i}x${i}.webp`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).webp({quality:90}).toFile(x),e.generatedFiles.push(x)}}if(p){for(let d of S){let x=u.join(a,`apple-touch-icon-${d}x${d}.png`);await c.default(o).resize(d,d,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(x),e.generatedFiles.push(x)}let i=u.join(a,"apple-touch-icon.png");await c.default(o).resize(180,180,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(i),e.generatedFiles.push(i)}for(let i of P){let d=u.join(a,`favicon-${i}x${i}.png`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d)}let f=512,y=u.join(a,`icon-maskable-${f}x${f}.png`),m=Math.floor(f*0.1),k=f-m*2;await c.default(o).resize(k,k,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).extend({top:m,bottom:m,left:m,right:m,background:{r:255,g:255,b:255,alpha:1}}).png().toFile(y),e.generatedFiles.push(y)}catch(c){let h=c instanceof Error?c.message:String(c);e.errors.push(`Icon generation failed: ${h}`),e.success=!1}return e}function N(n){let t=n.sizes||v,e=n.outputDir?`/${n.outputDir}`:"/pwa-icons",r=n.generateWebP??!0,o=n.generateAppleIcons??!0,a=[];for(let s of t)if(a.push(`${e}/icon-${s}x${s}.png`),r)a.push(`${e}/icon-${s}x${s}.webp`);if(o){a.push(`${e}/apple-touch-icon.png`);for(let s of S)a.push(`${e}/apple-touch-icon-${s}x${s}.png`)}for(let s of P)a.push(`${e}/favicon-${s}x${s}.png`);return a.push(`${e}/icon-maskable-512x512.png`),a}async function I(){try{return await import("sharp"),!0}catch{return!1}}function A(n,t,e,r){let o=[],a=r.join(" ");for(let s of n)if(o.push({src:`${t}/icon-${s}x${s}.png`,sizes:`${s}x${s}`,type:"image/png",purpose:a}),e)o.push({src:`${t}/icon-${s}x${s}.webp`,sizes:`${s}x${s}`,type:"image/webp",purpose:a});return o}function C(n){return n.map((t)=>({name:t.name,short_name:t.shortName,description:t.description,url:t.url,icons:t.icons?.map((e)=>({src:e.src,sizes:e.sizes,type:e.type}))}))}function T(n){let t=n.pwa?.shareTarget;if(!t?.enabled)return;let e={action:t.action||"/share",method:t.method||"POST",enctype:t.enctype||"multipart/form-data",params:{title:t.params?.title||"title",text:t.params?.text||"text",url:t.params?.url||"url"}};if(t.acceptFiles&&t.acceptFiles.length>0)e.params.files=t.acceptFiles.map((r)=>({name:r.name,accept:r.accept}));return e}function H(n){let t=n.pwa?.fileHandlers;if(!t?.enabled||!t.accept)return;let e=[{action:t.action||"/",accept:t.accept,launch_type:t.launchType||"single-client"}];if(t.icons)e[0].icons=t.icons.map((r)=>({src:r.src,sizes:r.sizes,type:r.type}));return e}function W(n){let t=n.pwa?.protocolHandlers;if(!t||t.length===0)return;return t.map((e)=>({protocol:e.protocol,url:e.url}))}function j(n){let t=n.pwa;if(!t?.enabled||!t.manifest)return null;let{manifest:e,icons:r}=t,o=r?.sizes||[72,96,128,144,152,192,384,512],a=r?.outputDir?`/${r.outputDir}`:"/pwa-icons",s=r?.generateWebP??!0,l=r?.purpose||["any","maskable"],p={name:e.name,short_name:e.shortName||e.name,description:e.description,start_url:e.startUrl||"/",display:e.display||"standalone",display_override:e.displayOverride,orientation:e.orientation,theme_color:e.themeColor,background_color:e.backgroundColor,scope:e.scope||"/",lang:e.lang,dir:e.dir,id:e.id,categories:e.categories,icons:A(o,a,s,l)};if(e.shortcuts&&e.shortcuts.length>0)p.shortcuts=C(e.shortcuts);if(e.screenshots&&e.screenshots.length>0)p.screenshots=e.screenshots.map((f)=>({src:f.src,sizes:f.sizes,type:f.type,label:f.label,form_factor:f.platform}));let c=T(n);if(c)p.share_target=c;let h=H(n);if(h)p.file_handlers=h;let g=W(n);if(g)p.protocol_handlers=g;if(e.launchHandler)p.launch_handler={client_mode:e.launchHandler};if(e.handleLinks)p.handle_links=e.handleLinks;if(e.edgeSidePanel?.enabled)p.edge_side_panel={preferred_width:e.edgeSidePanel.preferredWidth};return p}function _(n){let t=j(n);if(!t)return"";let e=JSON.parse(JSON.stringify(t));return JSON.stringify(e,null,2)}function q(n,t){return{...t,...n,shortcuts:n.shortcuts||t.shortcuts,screenshots:n.screenshots||t.screenshots,categories:n.categories||t.categories}}function D(n){let t=[],e=n.pwa;if(!e?.enabled)return t;let r=e.manifest;if(!r)return t.push("PWA manifest configuration is missing"),t;if(!r.name)t.push("Manifest name is required");let o=["fullscreen","standalone","minimal-ui","browser"];if(r.display&&!o.includes(r.display))t.push(`Invalid display mode: ${r.display}. Must be one of: ${o.join(", ")}`);let a=["any","natural","landscape","landscape-primary","landscape-secondary","portrait","portrait-primary","portrait-secondary"];if(r.orientation&&!a.includes(r.orientation))t.push(`Invalid orientation: ${r.orientation}`);let s=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;if(r.themeColor&&!s.test(r.themeColor))t.push(`Invalid theme color: ${r.themeColor}. Must be a valid hex color.`);if(r.backgroundColor&&!s.test(r.backgroundColor))t.push(`Invalid background color: ${r.backgroundColor}. Must be a valid hex color.`);if(e.shareTarget?.enabled){if(!e.shareTarget.action)t.push("Share target action URL is required")}if(e.fileHandlers?.enabled){if(!e.fileHandlers.accept||Object.keys(e.fileHandlers.accept).length===0)t.push("File handlers must specify accepted MIME types")}if(e.protocolHandlers)for(let l of e.protocolHandlers){if(!l.protocol)t.push("Protocol handler missing protocol");if(!l.url||!l.url.includes("%s"))t.push(`Protocol handler URL must contain %s placeholder: ${l.protocol}`)}return t}import z from"path";async function F(n){let t=n.pwa?.offline;if(!t?.enabled)return"";if(t.page){let e=z.isAbsolute(t.page)?t.page:z.resolve(process.cwd(),t.page);if(await Bun.file(e).exists())try{let{processDirectives:r}=await import("./chunk-pdnyfk2v.js"),o=await Bun.file(e).text();return await r(o,{},e,n,new Set)}catch(r){console.warn(`[PWA] Failed to process custom offline page: ${r}`)}else console.warn(`[PWA] Custom offline page not found: ${e}`)}return E(n)}function E(n){let t=n.pwa?.offline,e=n.pwa?.manifest,r=t?.fallbackTitle||"You are offline",o=t?.fallbackMessage||"Please check your internet connection and try again.",a=e?.themeColor||"#4f46e5",s=e?.shortName||e?.name||"App";return`<!DOCTYPE html>
|
|
4
4
|
<html lang="en">
|
|
5
5
|
<head>
|
|
6
6
|
<meta charset="UTF-8">
|
|
@@ -233,4 +233,4 @@ Icon generation requires the sharp package for image processing.`),e.success=!1,
|
|
|
233
233
|
}, 5000);
|
|
234
234
|
</script>
|
|
235
235
|
</body>
|
|
236
|
-
</html>`}function b(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}async function re(n,t){let e={success:!0,files:{icons:[]},errors:[],warnings:[]},r=n.pwa;if(!r?.enabled)return e;try{B.mkdirSync(t,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${t}`),e.success=!1,e}try{let a=_(n);if(a){let s=w.join(t,"manifest.json");await Bun.write(s,a),e.files.manifest=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate manifest.json: ${s}`),e.success=!1}if(r.icons?.src)if(await I()){let s=await M(n,t);if(e.files.icons=s.generatedFiles,e.warnings.push(...s.warnings),!s.success)e.errors.push(...s.errors),e.success=!1}else e.warnings.push("sharp is not installed. Skipping icon generation. Install with: bun add sharp");if(r.offline?.enabled)try{let a=await F(n);if(a){let s=w.join(t,"offline.html");await Bun.write(s,a),e.files.offlinePage=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate offline page: ${s}`),e.success=!1}let o;if(r.precache?.enabled){let a=
|
|
236
|
+
</html>`}function b(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}async function re(n,t){let e={success:!0,files:{icons:[]},errors:[],warnings:[]},r=n.pwa;if(!r?.enabled)return e;try{B.mkdirSync(t,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${t}`),e.success=!1,e}try{let a=_(n);if(a){let s=w.join(t,"manifest.json");await Bun.write(s,a),e.files.manifest=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate manifest.json: ${s}`),e.success=!1}if(r.icons?.src)if(await I()){let s=await M(n,t);if(e.files.icons=s.generatedFiles,e.warnings.push(...s.warnings),!s.success)e.errors.push(...s.errors),e.success=!1}else e.warnings.push("sharp is not installed. Skipping icon generation. Install with: bun add sharp");if(r.offline?.enabled)try{let a=await F(n);if(a){let s=w.join(t,"offline.html");await Bun.write(s,a),e.files.offlinePage=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate offline page: ${s}`),e.success=!1}let o;if(r.precache?.enabled){let a=Ue(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=Xs(n,t);if(a){let s=zt(n),l=w.join(t,s);await Bun.write(l,a),e.files.serviceWorker=l}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate service worker: ${s}`),e.success=!1}return e}function ae(n,t){return Ti(n,t)}function se(n){return n.pwa?.enabled===!0}export{S as APPLE_TOUCH_ICON_SIZES,v as DEFAULT_ICON_SIZES,P as FAVICON_SIZES,gl as auditBuildOutput,fl as auditConfig,re as buildPwaAssets,ml as calculateAuditResult,gg as formatAuditResult,$i as formatSize,j as generateManifest,_ as generateManifestJson,hg as generateManifestLink,F as generateOfflinePage,Ue as generatePrecacheManifest,En as generatePrecacheManifestJs,M as generatePwaIcons,Gs as generatePwaTags,Xs as generateServiceWorker,bg as generateServiceWorkerAuto,mg as generateSwRegistrationScript,yg as generateThemeColorMeta,N as getExpectedIconPaths,zt as getServiceWorkerFileName,Ti as injectPwaTags,se as isPwaEnabled,I as isSharpAvailable,hl as isWorkboxEnabled,q as mergeManifestConfig,ae as processPwaHtml,Js as pwaDirectives,wg as pwaInstallDirective,xg as pwaOfflineDirective,Sg as pwaPushDirective,vg as pwaUpdateDirective,sy as registerPwaDirectives,fg as runPwaAudit,D as validateManifest};
|
package/dist/ssg.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
3
|
-
`)}function J(t){return async()=>({paths:await t(),fallback:!1})}var Ot;function Lt(t){let r=s(t),{depths:n}=ge(r),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,c;while((c=o.exec(r))!==null){if(n[c.index]!==0)continue;let u=
|
|
2
|
+
import"./chunk-wmnzapn8.js";import{w,Yc}from"./chunk-tpfxvw4q.js";import"./chunk-b51p56k5.js";import"./chunk-4833k99b.js";import{$t,S}from"./chunk-y4mp1rra.js";import"./chunk-x5seqmrv.js";import"./chunk-dvpk4c1y.js";import"./chunk-8rk79ha1.js";import{St,kt,_t,Ct,Et,Tt}from"./chunk-f8p8ggvw.js";import{a}from"./chunk-edhxg3rz.js";import{xs}from"./chunk-evxp3wmv.js";import"./chunk-q3azy64b.js";import"./chunk-59k4xb92.js";import{he,Qt,en}from"./chunk-ben8bjnk.js";import"./chunk-yb71b2d6.js";import{y}from"./chunk-rd33qkfs.js";import{ht,i}from"./chunk-t1shvfhm.js";import"./chunk-xgnmgjpv.js";import"./chunk-gwjh981q.js";import{cs}from"./chunk-yk456jp4.js";import"./chunk-m3z13f59.js";import"./chunk-b0z2n941.js";import{qa,Ka,Ga}from"./chunk-0fs9kx0h.js";import{Yt,Jn,Yn}from"./chunk-wwnqbv9j.js";import{Zt}from"./chunk-rxm1mjkb.js";import"./chunk-a81rt2t4.js";import"./chunk-9k8ztdcc.js";import{G,we}from"./chunk-932zx5q4.js";import"./chunk-k2ex94n8.js";import"./chunk-rqd6b2nc.js";import{l}from"./chunk-4tgn1frg.js";import{s,ge}from"./chunk-42zqmcnc.js";import D from"fs";import f from"path";import{createHash as Pt}from"crypto";function Dt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var Rt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function It(t){return Bun.hash(t).toString(16)}function ot(t,r={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let n=new Map,o=t.replace(Rt,(e,u,g,v)=>{let x=v.trim();if(!x)return e;if(/\bdata-stx-src=/.test(g))return e;if(r.minify)x=Dt(x);let p=It(x);if(!n.has(p))n.set(p,x);let P=r.integrity?` data-stx-integrity="sha384-${Pt("sha384").update(x).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${u}" data-stx-src="/_stx/islands/${p}.js"${P}${g}></script>`}),c=Array.from(n,([e,u])=>({hash:e,code:u}));return{html:o,chunks:c}}var Bt=new Set(["visible","idle"]);function ct(t){if(!t.includes("data-stx-src="))return t;let r=new Map,n=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,o;while((o=n.exec(t))!==null)r.set(o[1],o[2]);let c=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,u;while((u=e.exec(t))!==null)if(Bt.has(r.get(u[1])||""))c.add(u[2]);let g=/<\/head\s*>/iy,v=S(t,(p,P)=>(g.lastIndex=P,g.exec(p)?g.lastIndex:-1))[0]?.start??-1;if(c.size===0||v===-1)return t;let x=Array.from(c).filter((p)=>!t.includes(`rel="prefetch" href="${p}"`)).map((p)=>`<link rel="prefetch" href="${p}" as="script">`).join("");if(!x)return t;return t.slice(0,v)+x+t.slice(v)}var jt=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function X(t){let r=t.trim();if(!r)return null;let n=/^https?:\/\//i.test(r)?r:`https://${r}`;try{return new URL(n).origin+new URL(n).pathname.replace(/\/$/,"")}catch{return null}}function Ft(t){for(let r of jt){let n=t[r];if(!n)continue;let o=X(n);if(o)return{url:o,source:"env",via:r}}return null}function lt(t){if(!t||typeof t!=="object")return null;let r=t,n=r.site?.url??r.url??r.app?.url;return typeof n==="string"?X(n):null}async function At(t){let{existsSync:r}=await import("fs"),n=await import("path");for(let o of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=n.resolve(t,o);if(!r(c))continue;try{let e=await import(c),u=lt(e.default??e);if(u)return u}catch{}}return null}async function ut(t={}){let r=t.cwd??process.cwd(),n=t.env??process.env;if(t.explicit){let u=X(t.explicit);if(u)return{url:u,source:"option"}}let o=lt(t.stxConfig);if(o)return{url:o,source:"stx.config",via:"site.url"};let c=await At(r);if(c)return{url:c,source:"site.config",via:"url"};let e=Ft(n);if(e)return e;return{url:"http://localhost",source:"fallback"}}function dt(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
|
|
3
|
+
`)}function J(t){return async()=>({paths:await t(),fallback:!1})}var Ot;function Lt(t){let r=s(t),{depths:n}=ge(r),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,c;while((c=o.exec(r))!==null){if(n[c.index]!==0)continue;let u=w(r,"(",")",o.lastIndex-1),g=r.indexOf("{",u+1),v=w(r,"{","}",g);if(u<0||g<0||v<0)break;return t.slice(c.index,v+1)}let e=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((c=e.exec(r))!==null){if(n[c.index]!==0)continue;let u=Yc(r,e.lastIndex).endPos;return t.slice(e.lastIndex,u).trim()}throw SyntaxError("Could not extract getStaticPaths; use a top-level function or const declaration")}async function gt(t){let r="read";try{let n=await Bun.file(t).text();r="parse";let o=Zt(n),c=[...o.server,...o.client,...o.signals].filter((e)=>/(?:^|\s)server(?:\s|=|$)/i.test(s(e.attrs))).sort((e,u)=>n.indexOf(e.fullTag)-n.indexOf(u.fullTag));for(let e of c){if(!/\bgetStaticPaths\b/.test(s(e.content)))continue;let u=(Ot??=new Bun.Transpiler({loader:"ts",target:"bun"})).transformSync(e.content);if(!/\bgetStaticPaths\b/.test(s(u)))continue;let g=Lt(u);if(/\bdefineStaticPaths\b/.test(s(g))&&$t(u,"defineStaticPaths"))throw SyntaxError("Cannot evaluate a module-local defineStaticPaths binding during isolated hook extraction");r="execute";let v=Function("defineStaticPaths",`return (${g})`)(J);if(typeof v!=="function")throw TypeError("getStaticPaths must be a function");let x=await v();r="result";let p=Array.isArray(x)?{paths:x}:x;if(!p||typeof p!=="object"||!("paths"in p)||!Array.isArray(p.paths))throw TypeError("getStaticPaths must return { paths: [...] } or an array of paths");for(let P of p.paths)if(!P||typeof P!=="object"||!P.params||typeof P.params!=="object"||Array.isArray(P.params))throw TypeError("Each getStaticPaths path must contain a params object");return{kind:"ok",value:p}}return{kind:"absent"}}catch(n){return{kind:"error",phase:r,error:n instanceof Error?n:Error(String(n))}}}class pt{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,r=""){this.cacheDir=t,this.salt=r}async load(){if(this.loaded)return;let t=f.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let r=JSON.parse(await Bun.file(t).text());for(let[n,o]of Object.entries(r))this.cache.set(n,o)}catch{}this.loaded=!0}async save(){await D.promises.mkdir(this.cacheDir,{recursive:!0});let t=f.join(this.cacheDir,"build-cache.json"),r={};for(let[n,o]of this.cache)r[n]=o;await Bun.write(t,JSON.stringify(r))}getHash(t,r){let n=D.statSync(t),o=`${this.salt}|${t}:${n.mtimeMs}`;for(let e of r)if(D.existsSync(e)){let u=D.statSync(e);o+=`:${e}:${u.mtimeMs}`}let c=0;for(let e=0;e<o.length;e++){let u=o.charCodeAt(e);c=(c<<5)-c+u,c=c&c}return Math.abs(c).toString(36)}get(t,r){let n=this.cache.get(t);if(!n)return null;let o=mt(r).some((u)=>D.existsSync(u)),c=[r,...n.dependencies??[]].some((u)=>u.endsWith(".stx")&&D.existsSync(u)&&cs(D.readFileSync(u,"utf8")).some((g)=>/\bserver\b/.test(g.attrs)));if(o||c)return this.cache.delete(t),null;let e=this.getHash(r,n.dependencies??[]);if(n.hash!==e)return this.cache.delete(t),null;return n.html}set(t,r,n,o){let c=this.getHash(r,n);this.cache.set(t,{hash:c,html:o,generatedAt:Date.now(),dependencies:n})}}class ft{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let r=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return f.join(this.cacheDir,"isr",r)}async get(t){let r=this.getFilePath(t);if(!await Bun.file(r).exists())return null;try{return JSON.parse(await Bun.file(r).text())}catch{return null}}async set(t,r){let n=this.getFilePath(t);await D.promises.mkdir(f.dirname(n),{recursive:!0}),await Bun.write(n,JSON.stringify(r))}async invalidate(t){let r=this.getFilePath(t);if(await Bun.file(r).exists())await D.promises.unlink(r)}async invalidatePattern(t){let r=f.join(this.cacheDir,"isr");if(!D.existsSync(r))return;let n=await D.promises.readdir(r);for(let o of n){let c=o.replace(/_/g,"/").replace(".json","");if(t.test(c))await D.promises.unlink(f.join(r,o))}}async needsRevalidation(t){let r=await this.get(t);if(!r)return!0;return Date.now()>r.revalidateAfter}}async function Ut(t){let r=[];if(!t.isDynamic)r.push({url:t.pattern,params:{}});else{let n=await gt(t.filePath);if(n.kind==="error")throw Error(`getStaticPaths ${n.phase} failed for ${t.pattern} (${t.filePath}): ${n.error.message}`,{cause:n.error});if(n.kind==="absent")return console.warn(`Warning: Dynamic route ${t.pattern} (${t.filePath}) has no getStaticPaths`),r;let o=n.value;if(o.paths.length===0)return console.info(`getStaticPaths returned no paths for dynamic route ${t.pattern} (${t.filePath})`),r;for(let c of o.paths){let e=t.pattern;for(let[u,g]of Object.entries(c.params))e=e.replace(`:${u}`,g).replace(`:${u}*`,g);r.push({url:e,params:c.params,props:c.props,revalidate:c.revalidate})}}return r}function mt(t){return[t.replace(/\.stx$/,".data.ts"),t.replace(/\.stx$/,".data.js"),t+".data.ts",t+".data.js"]}async function Mt(t){for(let r of mt(t))if(await Bun.file(r).exists())try{let n=await import(r);if(typeof n.default==="function")return await n.default();else if(typeof n.default==="object")return n.default;else if(typeof n.getData==="function")return await n.getData();else{let{default:o,...c}=n;return c}}catch(n){console.error(`Error loading data file ${r}:`,n)}return null}async function Gt(t,r,n){let o=t.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!o)return null;let c=o[1];if(!c.includes("getStaticProps"))return null;try{let e=c.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticProps\s*\([^)]*\)\s*\{([\s\S]*?)\n\}/);if(!e)return null;return await Function("params",`
|
|
4
4
|
return (async function getStaticProps() {
|
|
5
5
|
${e[1]}
|
|
6
6
|
})()
|
|
7
|
-
`)(r)}catch(e){return console.error(`Error executing getStaticProps in ${n}:`,e),null}}function Nt(t){return/(?:^|[^\w$.])(?:export\s+)?(?:async\s+)?function\s+action\s*\(/.test(t)||/(?:^|[^\w$.])(?:export\s+)?(?:const|let|var)\s+action\s*=/.test(t)}async function wt(t,r,n={},o,c){let e=await Bun.file(t.filePath).text(),u=await Mt(t.filePath),g=await Gt(e,r,t.filePath),v={...u||{},...g||{},...n,params:r,$route:{path:t.pattern,params:r}},
|
|
8
|
-
resolved against partialsDir: ${R.partialsDir}`)},onServerScriptError:(R)=>{P.push(`${f.relative(process.cwd(),R.sourcePath)} (${R.kind}): ${R.message}`)}};if(Nt(e))console.warn(`Warning: ${t.pattern} exports a page action, which cannot run in a static build. Its form will submit to a file. Serve this route with the production server, or point the form's action at a route handler.`);let
|
|
9
|
-
</head>`);else
|
|
10
|
-
${
|
|
7
|
+
`)(r)}catch(e){return console.error(`Error executing getStaticProps in ${n}:`,e),null}}function Nt(t){return/(?:^|[^\w$.])(?:export\s+)?(?:async\s+)?function\s+action\s*\(/.test(t)||/(?:^|[^\w$.])(?:export\s+)?(?:const|let|var)\s+action\s*=/.test(t)}async function wt(t,r,n={},o,c){let e=await Bun.file(t.filePath).text(),u=await Mt(t.filePath),g=await Gt(e,r,t.filePath),v={...u||{},...g||{},...n,params:r,$route:{path:t.pattern,params:r}},x=new Set,p=[],P=[],E={...c,minifyClient:!0,...o.partialsDir?{partialsDir:o.partialsDir}:{},...o.componentsDir?{componentsDir:o.componentsDir}:{},debug:!1,cache:!1,autoShell:!0,onIncludeError:(R)=>{p.push(`${f.relative(process.cwd(),R.templatePath)}: ${R.message}
|
|
8
|
+
resolved against partialsDir: ${R.partialsDir}`)},onServerScriptError:(R)=>{P.push(`${f.relative(process.cwd(),R.sourcePath)} (${R.kind}): ${R.message}`)}};if(Nt(e))console.warn(`Warning: ${t.pattern} exports a page action, which cannot run in a static build. Its form will submit to a file. Serve this route with the production server, or point the form's action at a route handler.`);let b=await i(e,v,t.filePath,E,x);for(let R of[t.filePath,...x])for(let T of he(R))x.add(T);if(Object.keys(r).length>0){let R=`<script>if(window.stx)window.stx._rp=${JSON.stringify(r)};else window.__stx_rp=${JSON.stringify(r)};</script>`;if(b.includes("</head>"))b=b.replace("</head>",`${R}
|
|
9
|
+
</head>`);else b=`${R}
|
|
10
|
+
${b}`}if(b=await we(b,{router:o.router}),b=await y(b),o.minify!==!1)return{html:Ht(b),dependencies:Array.from(x),includeFailures:p,serverScriptFailures:P};return{html:b,dependencies:Array.from(x),includeFailures:p,serverScriptFailures:P}}function Ht(t){let r=[],n=0,o=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,c;while((c=o.exec(t))!==null){let u=t.slice(n,c.index);r.push(u.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><"));let g=c[1],v=c[2],x=c[3];v=v.replace(/([^:"\\'`])\/\/(?!\/)(?![*!])([^\n]*)/g,"$1"),r.push(g+v+x),n=c.index+c[0].length}let e=t.slice(n);return r.push(e.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><")),r.join("").trim()}function zt(t){let r=0;for(let n=0;n<t.length;n++){let o=t.charCodeAt(n);r=(r<<5)-r+o,r=r&r}return`"${Math.abs(r).toString(36)}"`}function Wt(t,r,n,o){if(n?.sitemap===!1)return!0;if(/<meta[^>]+name=["']robots["'][^>]+content=["'][^"']*noindex/i.test(r))return!0;return o.some((c)=>{if(c instanceof RegExp)return c.test(t);return c.endsWith("/")?t===c.slice(0,-1)||t.startsWith(c):t===c})}function qt(t,r){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
11
11
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
12
12
|
${t.map((o)=>{let c=new URL(o.loc,r).href,e=` <url>
|
|
13
13
|
<loc>${F(c)}</loc>`;if(o.lastmod)e+=`
|
|
@@ -16,7 +16,7 @@ ${t.map((o)=>{let c=new URL(o.loc,r).href,e=` <url>
|
|
|
16
16
|
<priority>${o.priority}</priority>`;return e+=`
|
|
17
17
|
</url>`,e}).join(`
|
|
18
18
|
`)}
|
|
19
|
-
</urlset>`}function F(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function
|
|
19
|
+
</urlset>`}function F(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Jt(t,r){let n=r.map((o)=>{let c=" <item>";if(c+=`
|
|
20
20
|
<title>${F(o.title)}</title>`,c+=`
|
|
21
21
|
<link>${F(o.link)}</link>`,o.description)c+=`
|
|
22
22
|
<description>${F(o.description)}</description>`;if(o.pubDate)c+=`
|
|
@@ -37,16 +37,16 @@ ${t.map((o)=>{let c=new URL(o.loc,r).href,e=` <url>
|
|
|
37
37
|
${n.join(`
|
|
38
38
|
`)}
|
|
39
39
|
</channel>
|
|
40
|
-
</rss>`}async function
|
|
40
|
+
</rss>`}async function Vt(t={}){let r=Date.now();en();let n=await a(process.cwd()),o=n.build||{},c=await ut({explicit:t.domain||o.domain,stxConfig:n});if(c.source==="fallback"&&(t.sitemap??o.sitemap??!0))console.warn(dt());let e={router:t.router??n?.router??{},pagesDir:t.pagesDir||o.pagesDir||"pages",outputDir:t.outputDir||o.outputDir||"dist",baseUrl:t.baseUrl||o.baseUrl||"/",domain:c.url,revalidate:t.revalidate??o.revalidate??!1,sitemap:t.sitemap??o.sitemap??!0,sitemapExclude:t.sitemapExclude||o.sitemapExclude||[],robots:t.robots??o.robots??!0,rss:t.rss??o.rss??!1,concurrency:t.concurrency||o.concurrency||10,cache:t.cache??o.cache??!0,cacheDir:t.cacheDir||o.cacheDir||l(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??o.minify??!0,generate404:t.generate404??o.generate404??!0,publicDir:t.publicDir||o.publicDir||"public",trailingSlash:t.trailingSlash??o.trailingSlash??!1,cleanOutput:t.cleanOutput??o.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||n?.partialsDir||"",componentsDir:t.componentsDir||n?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,v=0,x={},p={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&D.existsSync(e.outputDir))await D.promises.rm(e.outputDir,{recursive:!0});await D.promises.mkdir(e.outputDir,{recursive:!0});let E=e.cacheSalt;if(!E){let{resolveUserCssConfig:d,fingerprintConfig:m}=await import("./chunk-p2se8s6r.js");try{E=m(await d(process.cwd()))}catch{}}let{prepareImageDelivery:b}=await import("./chunk-528cn6qm.js"),R=await b(e.publicDir,e.outputDir);if(R.count>0)console.log(`Optimized ${R.count} image(s) for responsive delivery`),E=[E,R.fingerprint].filter(Boolean).join(":");let T=new pt(e.cacheDir,E);if(e.cache)await T.load();try{let{generateCss:d}=await import("./chunk-p2se8s6r.js");await d('<div class="bg-black"></div>')}catch{}St();let yt=n?.routeMiddleware?.dir||"middleware";await _t(process.cwd(),yt);let V=kt();if(V.length>0)console.log(`Loaded ${V.length} middleware: ${V.join(", ")}`);let xt=n?.routeMiddleware?.global||[];Ga(n?.layoutsDir,l(process.cwd()));let Z=G(".",{pagesDir:e.pagesDir,pagesDirs:n?._layerPageDirs});console.log(`Found ${Z.length} routes`);let M=[];for(let d of Z)try{let m=await Ut(d);for(let k of m)M.push({route:d,url:k.url,params:k.params,props:k.props,revalidate:k.revalidate??e.revalidate})}catch(m){let k=m instanceof Error?m:Error(String(m));u.failedCount++,u.errors.push({route:d.pattern,error:k}),await e.hooks.onError?.(k,d.pattern),console.error(`Error discovering paths for ${d.pattern}:`,k)}u.totalPages=M.length+u.failedCount,console.log(`Generating ${M.length} pages...`);let _=[],Q=[];for(let d=0;d<M.length;d+=e.concurrency)Q.push(M.slice(d,d+e.concurrency));for(let d of Q)await Promise.all(d.map(async(m)=>{let{route:k,url:h,params:N,props:bt,revalidate:rt}=m;try{await e.hooks.onPageStart?.(h);let A=await Bun.file(k.filePath).text(),O=te(A),vt=O?.middleware?Array.isArray(O.middleware)?O.middleware:[O.middleware]:[],nt=[...xt,...vt];if(nt.length>0){let B=Ct(h,N,O||{}),L=Et(B,null,void 0,{isServer:!0}),j=await Tt(nt,L);if(j.redirect){let C=typeof j.redirect==="string"?j.redirect:j.redirect.path||j.redirect,z=ee(String(C),h),U=re(h,e);await D.promises.mkdir(f.dirname(U),{recursive:!0}),await Bun.write(U,z),u.successCount++,u.pages.push({route:h,outputPath:U,size:Buffer.byteLength(z),cached:!1}),_.push({loc:h,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${h} \u2192 redirect to ${C}`);return}if(j.abort){let C=typeof j.abort==="string"?j.abort:j.abort?.error?.message||"aborted";console.warn(` \u21B3 ${h} \u2014 middleware aborted: ${C}`);return}}let it=A.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(it)try{if(!await Function("route",`
|
|
41
41
|
const validate = ${it[1]};
|
|
42
42
|
return validate(route);
|
|
43
|
-
`)({params:N})){console.warn(`Validation failed for ${h}, skipping...`);return}}catch{}let I=null,st=!1;if(e.cache){if(I=T.get(h,k.filePath),I)st=!0,u.cachedCount++}if(!I){let B=await wt(k,N,
|
|
43
|
+
`)({params:N})){console.warn(`Validation failed for ${h}, skipping...`);return}}catch{}let I=null,st=!1;if(e.cache){if(I=T.get(h,k.filePath),I)st=!0,u.cachedCount++}if(!I){let B=await wt(k,N,bt,e,n);if(I=B.html,e.failOnIncludeError&&B.includeFailures.length>0)throw Error(`${B.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
|
|
44
44
|
${B.includeFailures.join(`
|
|
45
45
|
`)}
|
|
46
46
|
Set ssg.failOnIncludeError to false to build anyway.`);if(e.failOnServerScriptError&&B.serverScriptFailures.length>0)throw Error(`${B.serverScriptFailures.length} <script server> block(s) failed, so this page would have shipped with the content they produce missing:
|
|
47
47
|
${B.serverScriptFailures.join(`
|
|
48
48
|
`)}
|
|
49
|
-
Set ssg.failOnServerScriptError to false to build anyway.`);if(e.cache)T.set(h,k.filePath,B.dependencies,I)}let H;if(e.trailingSlash)H=f.join(e.outputDir,h,"index.html");else H=h==="/"?f.join(e.outputDir,"index.html"):f.join(e.outputDir,`${h}.html`);if(e.chunkIslands){let{html:B,chunks:L}=ot(I,{integrity:e.integrityIslands,minify:e.minify});if(L.length>0){let j=f.join(e.outputDir,"_stx","islands");await D.promises.mkdir(j,{recursive:!0});for(let C of L){let z=f.join(j,`${C.hash}.js`);if(!await Bun.file(z).exists())await Bun.write(z,C.code);if(!g.has(C.hash)){g.add(C.hash);let U=Buffer.byteLength(C.code,"utf8");v+=U,
|
|
49
|
+
Set ssg.failOnServerScriptError to false to build anyway.`);if(e.cache)T.set(h,k.filePath,B.dependencies,I)}let H;if(e.trailingSlash)H=f.join(e.outputDir,h,"index.html");else H=h==="/"?f.join(e.outputDir,"index.html"):f.join(e.outputDir,`${h}.html`);if(e.chunkIslands){let{html:B,chunks:L}=ot(I,{integrity:e.integrityIslands,minify:e.minify});if(L.length>0){let j=f.join(e.outputDir,"_stx","islands");await D.promises.mkdir(j,{recursive:!0});for(let C of L){let z=f.join(j,`${C.hash}.js`);if(!await Bun.file(z).exists())await Bun.write(z,C.code);if(!g.has(C.hash)){g.add(C.hash);let U=Buffer.byteLength(C.code,"utf8");v+=U,x[C.hash]={bytes:U,file:`/_stx/islands/${C.hash}.js`}}}if(p[h]=L.map((C)=>C.hash),I=B,e.prefetchIslands)I=ct(I)}}if(await D.promises.mkdir(f.dirname(H),{recursive:!0}),await Bun.write(H,I),!Wt(h,I,O,e.sitemapExclude))_.push({loc:h,lastmod:new Date().toISOString().split("T")[0],priority:h==="/"?1:0.8});let at={route:h,outputPath:H,size:Buffer.byteLength(I,"utf8"),cached:st};if(rt!==!1)at.revalidateAt=Date.now()+rt*1000;u.pages.push(at),u.successCount++,await e.hooks.onPageEnd?.(h,I)}catch(A){u.failedCount++,u.errors.push({route:h,error:A}),await e.hooks.onError?.(A,h),console.error(`Error generating ${h}:`,A)}}));let tt=Qt();if(tt.length>0){let d=tt.map((m)=>`${m.filePath}: ${m.message}`).join(`
|
|
50
50
|
`);throw Error(`Client script bundling failed:
|
|
51
51
|
${d}`)}if(e.cache)await T.save();if(e.generate404){let d=f.join(e.pagesDir,"404.stx");if(await Bun.file(d).exists()){let m=new Set,k={...n,minifyClient:!0,debug:!1,cache:!1},h=await i(await Bun.file(d).text(),{},d,k,m);await Bun.write(f.join(e.outputDir,"404.html"),h)}else await Bun.write(f.join(e.outputDir,"404.html"),`<!DOCTYPE html>
|
|
52
52
|
<html lang="en">
|
|
@@ -69,7 +69,7 @@ ${d}`)}if(e.cache)await T.save();if(e.generate404){let d=f.join(e.pagesDir,"404.
|
|
|
69
69
|
<a href="/">Go home</a>
|
|
70
70
|
</div>
|
|
71
71
|
</body>
|
|
72
|
-
</html>`)}for(let d of[500]){let m=f.join(e.pagesDir,`${d}.stx`);if(await Bun.file(m).exists()){let k=new Set,h={...n,minifyClient:!0,debug:!1,cache:!1},N=await i(await Bun.file(m).text(),{},m,h,k);await Bun.write(f.join(e.outputDir,`${d}.html`),N)}}let K=f.join(e.pagesDir,"error.stx");if(await Bun.file(K).exists()){let d=new Set,m={...n,minifyClient:!0,debug:!1,cache:!1},k=await i(await Bun.file(K).text(),{},K,m,d);await Bun.write(f.join(e.outputDir,"error.html"),k)}if(e.sitemap&&_.length>0){let d=qt(_,e.domain),m=f.join(e.outputDir,"sitemap.xml");await Bun.write(m,d),u.sitemapPath=m,console.log(`Generated sitemap.xml with ${_.length} URLs`)}if(e.robots!==!1){let d=typeof e.robots==="object"?e.robots:{},m=[...e.sitemapExclude.filter((h)=>typeof h==="string"),...d.disallow||[]],k=
|
|
72
|
+
</html>`)}for(let d of[500]){let m=f.join(e.pagesDir,`${d}.stx`);if(await Bun.file(m).exists()){let k=new Set,h={...n,minifyClient:!0,debug:!1,cache:!1},N=await i(await Bun.file(m).text(),{},m,h,k);await Bun.write(f.join(e.outputDir,`${d}.html`),N)}}let K=f.join(e.pagesDir,"error.stx");if(await Bun.file(K).exists()){let d=new Set,m={...n,minifyClient:!0,debug:!1,cache:!1},k=await i(await Bun.file(K).text(),{},K,m,d);await Bun.write(f.join(e.outputDir,"error.html"),k)}if(e.sitemap&&_.length>0){let d=qt(_,e.domain),m=f.join(e.outputDir,"sitemap.xml");await Bun.write(m,d),u.sitemapPath=m,console.log(`Generated sitemap.xml with ${_.length} URLs`)}if(e.robots!==!1){let d=typeof e.robots==="object"?e.robots:{},m=[...e.sitemapExclude.filter((h)=>typeof h==="string"),...d.disallow||[]],k=xs({rules:[{userAgent:d.userAgent||"*",allow:d.allow||["/"],...m.length>0?{disallow:m}:{}}],...d.sitemap!==!1&&u.sitemapPath?{sitemap:new URL("/sitemap.xml",e.domain).href}:{}});await Bun.write(f.join(e.outputDir,"robots.txt"),k),console.log("Generated robots.txt")}if(e.rss){let d=typeof e.rss==="object"?e.rss:{title:"Site Feed",description:"Latest updates",link:e.domain},m=[];if(d.getItems)m=await d.getItems();let k=Jt(d,m),h=f.join(e.outputDir,"rss.xml");await Bun.write(h,k),u.rssPath=h,console.log(`Generated rss.xml with ${m.length} items`)}let W=qa(e.outputDir);if(W.assets>0)console.log(`Externalized ${W.assets} asset(s) from ${W.pages} page(s) (${(W.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let q=Ka(e.outputDir);if(q.assets>0)console.log(`Externalized ${q.assets} repeated asset(s) from ${q.pages} page(s) (${(q.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(e.publicDir&&D.existsSync(e.publicDir))await Y(e.publicDir,e.outputDir),console.log(`Copied public assets from ${e.publicDir}`);let et=Yn();if(et)await Y(et,f.join(e.outputDir,Jn)),console.log(`Copied assets from ${Yt}`)}catch(E){throw await e.hooks.onError?.(E),E}if(u.buildTime=Date.now()-r,g.size>0){u.islandChunks={count:g.size,totalBytes:v};let E={generatedChunks:g.size,totalBytes:v,chunks:x,pages:p};await Bun.write(f.join(e.outputDir,"_stx","islands-manifest.json"),JSON.stringify(E,null,2))}await e.hooks.onBuildEnd?.(u);let P=u.islandChunks?`
|
|
73
73
|
Island chunks: ${u.islandChunks.count} (${(u.islandChunks.totalBytes/1024).toFixed(1)} KB lifted out of inline HTML)`:"";return console.log(`
|
|
74
74
|
Build complete!
|
|
75
75
|
Total: ${u.totalPages} pages
|
|
@@ -77,8 +77,8 @@ Build complete!
|
|
|
77
77
|
Cached: ${u.cachedCount}
|
|
78
78
|
Failed: ${u.failedCount}
|
|
79
79
|
Time: ${u.buildTime}ms${P}
|
|
80
|
-
`),u}async function Y(t,r){await D.promises.mkdir(r,{recursive:!0});let n=await D.promises.readdir(t,{withFileTypes:!0});for(let o of n){let c=f.join(t,o.name),e=f.join(r,o.name);if(o.isDirectory())await D.promises.mkdir(e,{recursive:!0}),await Y(c,e);else await D.promises.copyFile(c,e)}}function
|
|
81
|
-
`)){let P=p.indexOf(":");if(P>0){let E=p.slice(0,P).trim(),
|
|
80
|
+
`),u}async function Y(t,r){await D.promises.mkdir(r,{recursive:!0});let n=await D.promises.readdir(t,{withFileTypes:!0});for(let o of n){let c=f.join(t,o.name),e=f.join(r,o.name);if(o.isDirectory())await D.promises.mkdir(e,{recursive:!0}),await Y(c,e);else await D.promises.copyFile(c,e)}}function Kt(t={}){let r=t.cacheDir||l(process.cwd(),"ssg-cache"),n=new ft(r),o=t.revalidate||3600;return{async get(c){let e=await n.get(c);if(!e)return null;if(Date.now()>e.revalidateAfter)this.revalidate(c).catch(console.error);return{html:e.html,headers:{"Cache-Control":`public, max-age=${o}, stale-while-revalidate=${o*2}`,ETag:e.etag,"X-ISR-Generated":new Date(e.generatedAt).toISOString(),...e.headers}}},async revalidate(c){let u=G(".",{pagesDir:t.pagesDir||"pages"}).find((P)=>c.match(P.regex)!==null);if(!u){console.warn(`Route not found for revalidation: ${c}`);return}let g=c.match(u.regex),v={};if(g)u.params.forEach((P,E)=>{v[P]=g[E+1]});let x=await a(),{html:p}=await wt(u,v,{},t,x);await n.set(c,{html:p,generatedAt:Date.now(),revalidateAfter:Date.now()+o*1000,etag:zt(p)}),console.log(`Revalidated: ${c}`)},async invalidate(c){if(typeof c==="string")await n.invalidate(c);else await n.invalidatePattern(c)}}}function Xt(){return{name:"markdown",extensions:[".md",".mdx"],async load(t){let r=await Bun.file(t).text(),n=r.match(/^---\n([\s\S]*?)\n---/),o={},c=r;if(n){let x=n[1];c=r.slice(n[0].length).trim();for(let p of x.split(`
|
|
81
|
+
`)){let P=p.indexOf(":");if(P>0){let E=p.slice(0,P).trim(),b=p.slice(P+1).trim();if(b==="true")b=!0;else if(b==="false")b=!1;else if(/^\d+$/.test(b))b=parseInt(b,10);else if(/^\d+\.\d+$/.test(b))b=parseFloat(b);else if(b.startsWith("[")&&b.endsWith("]"))b=b.slice(1,-1).split(",").map((R)=>R.trim().replace(/^['"]|['"]$/g,""));o[E]=b}}}let e=c.replace(/^### (.*$)/gim,"<h3>$1</h3>").replace(/^## (.*$)/gim,"<h2>$1</h2>").replace(/^# (.*$)/gim,"<h1>$1</h1>").replace(/\*\*(.*)\*\*/gim,"<strong>$1</strong>").replace(/\*(.*)\*/gim,"<em>$1</em>").replace(/`([^`]+)`/gim,"<code>$1</code>").replace(/\[([^\]]+)\]\(([^)]+)\)/gim,'<a href="$2">$1</a>').replace(/\n/gim,"<br>"),u=[],g=/<h([1-6])>([^<]+)<\/h[1-6]>/gi,v;while((v=g.exec(e))!==null){let x=parseInt(v[1],10),p=v[2],P=p.toLowerCase().replace(/[^a-z0-9]+/g,"-");u.push({id:P,text:p,level:x})}return{content:e,data:o,toc:u}}}}function te(t){return ht(t)}function ee(t,r){return`<!DOCTYPE html>
|
|
82
82
|
<html>
|
|
83
83
|
<head>
|
|
84
84
|
<meta charset="utf-8">
|
|
@@ -90,4 +90,4 @@ Build complete!
|
|
|
90
90
|
<p>Redirecting to <a href="${t}">${t}</a>...</p>
|
|
91
91
|
<script>window.location.replace('${t}')</script>
|
|
92
92
|
</body>
|
|
93
|
-
</html>`}function
|
|
93
|
+
</html>`}function re(t,r){if(t==="/"||t==="")return f.join(r.outputDir,"index.html");let n=t.replace(/^\/|\/$/g,"");if(r.trailingSlash)return f.join(r.outputDir,n,"index.html");return f.join(r.outputDir,`${n}.html`)}var Ae={generateStaticSite:Vt,createISRHandler:Kt,defineStaticPaths:J,createMarkdownLoader:Xt};export{Kt as createISRHandler,Xt as createMarkdownLoader,Nt as declaresPageAction,Ae as default,J as defineStaticPaths,Vt as generateStaticSite,Wt as isExcludedFromSitemap};
|
package/dist/store-loader.d.ts
CHANGED
|
@@ -2,10 +2,26 @@ export declare function getStoreScript(storesDir?: string): Promise<string | nul
|
|
|
2
2
|
/**
|
|
3
3
|
* Every store a piece of code reads by name: `useStore("auth")`.
|
|
4
4
|
*
|
|
5
|
-
* `all` is set when it cannot tell: a call whose name is not a literal,
|
|
6
|
-
*
|
|
5
|
+
* `all` is set when it cannot tell: a call whose name is not a literal,
|
|
6
|
+
* `useStore` taken as a value (an alias the calls then go through), or a look
|
|
7
|
+
* into the registry itself. Such code may read any store.
|
|
7
8
|
*/
|
|
8
9
|
export declare function storesRead(...sources: Array<string | null | undefined>): { names: Set<string>, all: boolean };
|
|
10
|
+
/**
|
|
11
|
+
* The stores the files read (`storesRead`), each file read once per version.
|
|
12
|
+
* For the sources a page's bundles were built from: the built bundles may be
|
|
13
|
+
* minified, where `useStore` can be an alias the scan cannot follow, while
|
|
14
|
+
* the sources still say which stores they read. A file that cannot be read
|
|
15
|
+
* makes the answer `all`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function storesReadInFiles(files: Iterable<string>): { names: Set<string>, all: boolean };
|
|
18
|
+
/**
|
|
19
|
+
* Whether a page ships only the stores it reads (the default) or every store.
|
|
20
|
+
* `STX_PAGE_STORES=all` ships every store on every page, as stx did before
|
|
21
|
+
* 0.2.761: a store whose definition has an effect a page relies on without
|
|
22
|
+
* reading the store would otherwise not run on that page.
|
|
23
|
+
*/
|
|
24
|
+
export declare function pageStoresAll(env?: Record<string, string | undefined>): boolean;
|
|
9
25
|
/**
|
|
10
26
|
* The store script for code that reads only some of the stores: those it names
|
|
11
27
|
* with `useStore("…")`, and those the stores it names read in turn. A page
|
|
@@ -21,7 +37,15 @@ export declare function storesRead(...sources: Array<string | null | undefined>)
|
|
|
21
37
|
* (what production does) instead of inlined in each store. Defaults to
|
|
22
38
|
* production's.
|
|
23
39
|
*/
|
|
24
|
-
export declare function getStoreScriptFor(storesDir: string | undefined, usedBy: Array<string | null | undefined>, options?: {
|
|
40
|
+
export declare function getStoreScriptFor(storesDir: string | undefined, usedBy: Array<string | null | undefined>, options?: {
|
|
41
|
+
sharedModules?: boolean
|
|
42
|
+
|
|
43
|
+
reads?: { names: Iterable<string>, all: boolean }
|
|
44
|
+
|
|
45
|
+
runOnce?: boolean
|
|
46
|
+
|
|
47
|
+
all?: boolean
|
|
48
|
+
}): Promise<{ code: string, stores: string[], functions: string[] | null } | null>;
|
|
25
49
|
/**
|
|
26
50
|
* Clear the cached store script (for dev mode hot reload).
|
|
27
51
|
*/
|
package/dist/store-loader.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
1
2
|
import path from "node:path";
|
|
3
|
+
import process from "node:process";
|
|
4
|
+
import { unboundNames } from "./client-parameter-bindings.js";
|
|
2
5
|
import { bundleClientScript, clientBundleDependencies, hasUserImports, moduleSubstitutionKey } from "./client-script-bundler.js";
|
|
3
6
|
import { loadStxConfig } from "./config.js";
|
|
4
7
|
import { isProduction, minifyClassicScript } from "./env.js";
|
|
@@ -130,17 +133,26 @@ function topLevelNames(code) {
|
|
|
130
133
|
}
|
|
131
134
|
function storeFunctions(chunks) {
|
|
132
135
|
const bound = chunks.map((chunk) => topLevelNames(chunk.code));
|
|
133
|
-
for (const [index, chunk] of chunks.entries())
|
|
136
|
+
for (const [index, chunk] of chunks.entries()) {
|
|
137
|
+
const others = new Set;
|
|
134
138
|
for (const [other, names] of bound.entries()) {
|
|
135
139
|
if (other === index)
|
|
136
140
|
continue;
|
|
137
|
-
for (const name of names)
|
|
138
|
-
if (bound[index].has(name)
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
for (const name of names)
|
|
142
|
+
if (!bound[index].has(name) && !chunk.declared.has(name))
|
|
143
|
+
others.add(name);
|
|
144
|
+
}
|
|
145
|
+
if (others.size === 0)
|
|
146
|
+
continue;
|
|
147
|
+
let reads;
|
|
148
|
+
try {
|
|
149
|
+
reads = unboundNames(chunk.code, others);
|
|
150
|
+
} catch {
|
|
151
|
+
reads = new Set([...others].filter((name) => new RegExp(`(?<![\\w$.])${name.replace(/\$/g, "\\$")}(?![\\w$])`).test(chunk.code)));
|
|
143
152
|
}
|
|
153
|
+
if (reads.size > 0)
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
144
156
|
return chunks.map((chunk, index) => {
|
|
145
157
|
const own = new Set([...chunk.declared, ...bound[index]]);
|
|
146
158
|
return `function() {
|
|
@@ -163,6 +175,29 @@ export async function getStoreScript(storesDir) {
|
|
|
163
175
|
}
|
|
164
176
|
return code;
|
|
165
177
|
}
|
|
178
|
+
function takesUseStoreAsValue(source) {
|
|
179
|
+
if (!/\buseStore\b/.test(source))
|
|
180
|
+
return !1;
|
|
181
|
+
if (/\buseStore\s+as\s+[A-Za-z_$]/.test(source))
|
|
182
|
+
return !0;
|
|
183
|
+
if (/\{[^{}]*\buseStore\s*:\s*[A-Za-z_$[{][^{}]*\}\s*=(?!=)/.test(source))
|
|
184
|
+
return !0;
|
|
185
|
+
if (/\[\s*(['"`])useStore\1\s*\]/.test(source.replace(/\b(?:var|let|const)\s+useStore\s*=\s*[\w$.]*\[\s*(['"`])useStore\1\s*\]/g, " ")))
|
|
186
|
+
return !0;
|
|
187
|
+
const text = source.replace(/\/\*[\s\S]*?\*\//g, " ").replace(/(^|[^:\\'"`])\/\/[^\n]*/g, "$1 ").replace(/\b(?:var|let|const)\s+useStore\s*=\s*[\w$.]*\[\s*(['"`])useStore\1\s*\]/g, " ").replace(/\b(?:const|let|var)\s*\{[^{}]*\}\s*=/g, " ").replace(/\bimport\s*(?:type\s+)?\{[^{}]*\}\s*from\b/g, " ").replace(/\bexport\s*(?:type\s+)?\{[^{}]*\}/g, " ").replace(/\btypeof\s+useStore\b/g, " ").replace(/(['"`])useStore\1/g, " ");
|
|
188
|
+
for (const match of text.matchAll(/\buseStore\b/g)) {
|
|
189
|
+
const before = text.slice(Math.max(0, match.index - 9), match.index);
|
|
190
|
+
if (/\bfunction\s*$/.test(before))
|
|
191
|
+
continue;
|
|
192
|
+
const after = text.slice(match.index + 8).trimStart();
|
|
193
|
+
if (after.startsWith("(") || after.startsWith("<") || after.startsWith("?.("))
|
|
194
|
+
continue;
|
|
195
|
+
if (/^=(?![=>])/.test(after))
|
|
196
|
+
continue;
|
|
197
|
+
return !0;
|
|
198
|
+
}
|
|
199
|
+
return !1;
|
|
200
|
+
}
|
|
166
201
|
export function storesRead(...sources) {
|
|
167
202
|
const names = new Set;
|
|
168
203
|
let all = !1;
|
|
@@ -171,11 +206,13 @@ export function storesRead(...sources) {
|
|
|
171
206
|
continue;
|
|
172
207
|
if (/__STX_STORES__|\b_stores\b/.test(source))
|
|
173
208
|
all = !0;
|
|
174
|
-
|
|
209
|
+
if (takesUseStoreAsValue(source))
|
|
210
|
+
all = !0;
|
|
211
|
+
const calls = source.match(/\buseStore\s*(?:<[^>()]*>)?\s*(?:\?\.\s*)?\(/g)?.length ?? 0;
|
|
175
212
|
if (calls === 0)
|
|
176
213
|
continue;
|
|
177
214
|
let literal = 0;
|
|
178
|
-
for (const match of source.matchAll(/\buseStore\s*(?:<[^>()]*>)?\(\s*(['"`])([^'"`$\\]+)\1\s*[,)]/g)) {
|
|
215
|
+
for (const match of source.matchAll(/\buseStore\s*(?:<[^>()]*>)?\s*(?:\?\.\s*)?\(\s*(['"`])([^'"`$\\]+)\1\s*[,)]/g)) {
|
|
179
216
|
names.add(match[2]);
|
|
180
217
|
literal++;
|
|
181
218
|
}
|
|
@@ -184,13 +221,49 @@ export function storesRead(...sources) {
|
|
|
184
221
|
}
|
|
185
222
|
return { names, all };
|
|
186
223
|
}
|
|
224
|
+
const _storesReadByFile = new Map;
|
|
225
|
+
export function storesReadInFiles(files) {
|
|
226
|
+
const names = new Set;
|
|
227
|
+
let all = !1;
|
|
228
|
+
for (const file of files) {
|
|
229
|
+
if (/\.(?:css|json|svg|wasm|png|jpe?g|gif|webp|avif|woff2?|ttf|txt|md)$/i.test(file))
|
|
230
|
+
continue;
|
|
231
|
+
let read;
|
|
232
|
+
try {
|
|
233
|
+
const stat = fs.statSync(file), cached = _storesReadByFile.get(file);
|
|
234
|
+
if (cached && cached.mtimeMs === stat.mtimeMs && cached.size === stat.size)
|
|
235
|
+
read = cached.read;
|
|
236
|
+
else {
|
|
237
|
+
read = storesRead(fs.readFileSync(file, "utf8"));
|
|
238
|
+
_storesReadByFile.set(file, { mtimeMs: stat.mtimeMs, size: stat.size, read });
|
|
239
|
+
}
|
|
240
|
+
} catch {
|
|
241
|
+
read = { names: new Set, all: !0 };
|
|
242
|
+
}
|
|
243
|
+
if (read.all)
|
|
244
|
+
all = !0;
|
|
245
|
+
for (const name of read.names)
|
|
246
|
+
names.add(name);
|
|
247
|
+
}
|
|
248
|
+
return { names, all };
|
|
249
|
+
}
|
|
250
|
+
export function pageStoresAll(env = process.env) {
|
|
251
|
+
return env.STX_PAGE_STORES === "all";
|
|
252
|
+
}
|
|
187
253
|
export async function getStoreScriptFor(storesDir, usedBy, options = {}) {
|
|
188
254
|
const built = await loadStoreChunks(storesDir, options.sharedModules);
|
|
189
255
|
if (!built)
|
|
190
256
|
return null;
|
|
191
257
|
const { chunks } = built, wanted = storesRead(...usedBy);
|
|
258
|
+
if (options.reads) {
|
|
259
|
+
if (options.reads.all)
|
|
260
|
+
wanted.all = !0;
|
|
261
|
+
for (const name of options.reads.names)
|
|
262
|
+
wanted.names.add(name);
|
|
263
|
+
}
|
|
264
|
+
const apart = options.runOnce ? runOnceFunctions(built) : void 0;
|
|
192
265
|
let kept;
|
|
193
|
-
if (wanted.all || chunks.some((chunk) => chunk.ids.length === 0))
|
|
266
|
+
if (options.all || wanted.all || chunks.some((chunk) => chunk.ids.length === 0) || apart === null)
|
|
194
267
|
kept = chunks;
|
|
195
268
|
else {
|
|
196
269
|
const byId = new Map;
|
|
@@ -214,8 +287,40 @@ export async function getStoreScriptFor(storesDir, usedBy, options = {}) {
|
|
|
214
287
|
}
|
|
215
288
|
if (kept.length === 0)
|
|
216
289
|
return null;
|
|
290
|
+
if (apart) {
|
|
291
|
+
const functions = kept.map((chunk) => apart.get(chunk)), names = kept.map((chunk) => chunk.name);
|
|
292
|
+
let scripts = _runOnceScripts.get(built);
|
|
293
|
+
if (!scripts)
|
|
294
|
+
_runOnceScripts.set(built, scripts = new Map);
|
|
295
|
+
let code = scripts.get(names.join("\x00"));
|
|
296
|
+
if (code === void 0)
|
|
297
|
+
scripts.set(names.join("\x00"), code = runOnceStoreScript(names, functions));
|
|
298
|
+
return { code, stores: names, functions };
|
|
299
|
+
}
|
|
217
300
|
return { code: assembleStoreScript(kept), stores: kept.map((chunk) => chunk.name), functions: storeFunctions(kept) };
|
|
218
301
|
}
|
|
302
|
+
const _runOnceScripts = new WeakMap, _runOnceFunctions = new WeakMap;
|
|
303
|
+
function runOnceFunctions(built) {
|
|
304
|
+
if (_runOnceFunctions.has(built))
|
|
305
|
+
return _runOnceFunctions.get(built);
|
|
306
|
+
const functions = storeFunctions(built.chunks), byChunk = functions ? new Map(built.chunks.map((chunk, index) => [chunk, functions[index]])) : null;
|
|
307
|
+
_runOnceFunctions.set(built, byChunk);
|
|
308
|
+
return byChunk;
|
|
309
|
+
}
|
|
310
|
+
function runOnceStoreScript(names, functions) {
|
|
311
|
+
const assembled = `;(function(){
|
|
312
|
+
var ran = window.__stxStoreFiles || (window.__stxStoreFiles = {});
|
|
313
|
+
function run(name, define) {
|
|
314
|
+
if (ran[name]) return;
|
|
315
|
+
ran[name] = 1;
|
|
316
|
+
try { define(); }
|
|
317
|
+
catch (error) { console.error('[stx] store ' + name + ' failed to load:', error); }
|
|
318
|
+
}
|
|
319
|
+
${names.map((name, index) => `run(${JSON.stringify(name)}, ${functions[index]})`).join(`;
|
|
320
|
+
`)};
|
|
321
|
+
})();`;
|
|
322
|
+
return isProduction() ? minifyClassicScript(assembled) : assembled;
|
|
323
|
+
}
|
|
219
324
|
export function clearStoreCache() {
|
|
220
325
|
_cachedStoreChunks.clear();
|
|
221
326
|
clearSourceSignatures();
|
|
@@ -345,6 +345,7 @@ export declare interface StxConfig {
|
|
|
345
345
|
story?: Partial<import('../story/types').StoryConfig>
|
|
346
346
|
pwa?: Partial<PwaConfig>
|
|
347
347
|
offline?: import('../offline/app-service-worker').OfflineAppConfig
|
|
348
|
+
messages?: import('../message-catalogs').PageMessagesOptions
|
|
348
349
|
components?: Partial<ComponentConfig>
|
|
349
350
|
routeMiddleware?: Partial<RouteMiddlewareConfig>
|
|
350
351
|
heatmap?: Partial<HeatmapConfig>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/stx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.762",
|
|
5
5
|
"description": "A performant UI Framework. Powered by Bun.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -128,12 +128,12 @@
|
|
|
128
128
|
"dependencies": {
|
|
129
129
|
"@stacksjs/ts-css": "^0.3.11",
|
|
130
130
|
"@stacksjs/clapp": "^0.2.16",
|
|
131
|
-
"@stacksjs/desktop": "0.2.
|
|
132
|
-
"@stacksjs/sanitizer": "0.2.
|
|
131
|
+
"@stacksjs/desktop": "0.2.762",
|
|
132
|
+
"@stacksjs/sanitizer": "0.2.762",
|
|
133
133
|
"@stacksjs/ts-i18n": "^0.1.11",
|
|
134
|
-
"bun-plugin-stx": "0.2.
|
|
134
|
+
"bun-plugin-stx": "0.2.762",
|
|
135
135
|
"bunfig": "^0.15.21",
|
|
136
|
-
"stx-router": "0.2.
|
|
136
|
+
"stx-router": "0.2.762",
|
|
137
137
|
"ts-broadcasting": "^0.0.11",
|
|
138
138
|
"ts-images": "^0.2.22",
|
|
139
139
|
"ts-syntax-highlighter": "^0.2.1"
|
package/dist/chunk-0b7f2mby.js
DELETED
package/dist/chunk-0j7e56zm.js
DELETED
package/dist/chunk-1khg5vjs.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{lh,Za,uh,Qa,xf,Sf,on,nr,dh,kf,_f,ph,y}from"./chunk-g4e6egrr.js";import"./chunk-wz5m7ybz.js";import"./chunk-0ggwm837.js";import"./chunk-bsgg8zzk.js";import"./chunk-gs373714.js";import"./chunk-465resq9.js";import"./chunk-89h4snzd.js";import"./chunk-xgegyttg.js";export{on as buildCss,kf as extractClassNames,Sf as fingerprintConfig,_f as generateCss,dh as getCachedCSS,lh as getCssServeAsset,y as injectCss,Za as loadCssEngine,Qa as loadCssEngineConfig,nr as rebuildCss,uh as resetCssCache,xf as resolveUserCssConfig,ph as withLinkedModuleBundles};
|
package/dist/chunk-3h2yz805.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Vl,Ul,Wl,ql,Kl,Gl,Xl,Jl,Yl,Zl,sm}from"./chunk-bsq9zg9j.js";export{Vl as createIslandRegistry,sm as default,Zl as generateIslandManifest,Wl as generatePartialHydrationCSS,Gl as hydrateAll,Kl as hydrateByStrategy,ql as hydrateIsland,Xl as isHydrated,Jl as onHydrated,Ul as processPartialHydrationDirectives,Yl as processStaticDirectives};
|
package/dist/chunk-3kmwgpm1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{rn,ko,_o,Co,ch,Eo}from"./chunk-afj19nsj.js";import"./chunk-5q9ss7ty.js";import"./chunk-z8k3fx4r.js";import"./chunk-gs373714.js";export{_o as buildServerApi,ch as createServerApi,rn as discoverServerApi,ko as generateApiTypes,Eo as isServerApiSource,Co as productionApiDispatcher};
|
package/dist/chunk-3wfewscj.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{m,ai,Bc,Fc,Zf,Qf,eg,tg,ng,Ls,rg,Le,Y,je,sg,Sr,og,Vc,di,Be,r,yn,Uc,h,fe,Oh}from"./chunk-0ggwm837.js";import"./chunk-bsgg8zzk.js";import"./chunk-gs373714.js";import"./chunk-465resq9.js";import"./chunk-89h4snzd.js";import"./chunk-xgegyttg.js";export{fe as clearComponentCache,di as componentClientSignalNames,ai as convertToCommonJS,h as createDetailedErrorMessage,ng as extractDirectiveNames,Bc as extractScriptFromTemplate,m as extractVariables,r as fileExists,Oh as getComponentCacheStats,Qf as getPositionInfo,Y as getSharedTranspiler,Uc as getSourceLineInfo,tg as hasDirectives,Fc as hasVariables,og as isHydrateTrigger,rg as isJavaScriptScript,Be as renderComponentWithSlot,yn as resolveTemplatePath,sg as scopeOnRootElement,Ls as scopeSequenceKey,Le as shouldTranspileTypeScript,Vc as slotContentHasExpressions,je as transpileTypeScript,Sr as userComponentFileExists,eg as validateDirective,Zf as validateTemplate};
|
package/dist/chunk-4tz00fkp.js
DELETED
package/dist/chunk-52q8184e.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ro,Gi,Br,so,oo,Tn,Wt,Xi,Fr,zr,io,ao,Og,Ng,ut}from"./chunk-asp7ett1.js";export{ut as DeployError,Gi as calculateSha1,Br as collectDeployFiles,zr as createDefaultNetlifyConfig,so as createFileManifest,ro as createNetlifyClient,Og as deploy,Fr as detectProjectConfig,oo as filterRequiredFiles,Tn as formatSize,Xi as generateNetlifyToml,Wt as getTotalSize,ao as hasNetlifyConfig,Ng as initNetlify,io as writeNetlifyConfig};
|
package/dist/chunk-59ytzyp1.js
DELETED
package/dist/chunk-5e2ez5n0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{vl,wl}from"./chunk-94ymndc5.js";import"./chunk-y8srg0q3.js";import"./chunk-5vmbycy5.js";import"./chunk-asp7ett1.js";import"./chunk-j04v4rgf.js";import"./chunk-7v2srnpv.js";import"./chunk-s4y26fk6.js";import"./chunk-rcfmwx8r.js";import"./chunk-se28p2xy.js";import"./chunk-t6qn1374.js";import"./chunk-prej5pk6.js";import"./chunk-m220n98m.js";import"./chunk-r4sawwmp.js";import"./chunk-n8s5301s.js";import"./chunk-myynywry.js";import"./chunk-vh1d5eqk.js";import"./chunk-bsq9zg9j.js";import"./chunk-n7s4n62j.js";import"./chunk-hk98vptc.js";import"./chunk-rprewgyj.js";import"./chunk-7g9vd5fv.js";import"./chunk-7r7j7vwt.js";import"./chunk-hmydy949.js";import"./chunk-gs6wc7sr.js";import"./chunk-w8p1y4c0.js";import"./chunk-tb56j1zt.js";import"./chunk-7nz28a6c.js";import"./chunk-76679dw7.js";import"./chunk-eazvp48w.js";import"./chunk-qw9kgzb3.js";import"./chunk-pes27snj.js";import"./chunk-3nxe5xmy.js";import{Yt}from"./chunk-vtv7165t.js";import"./chunk-frk6rzrq.js";import"./chunk-afj19nsj.js";import"./chunk-19safa6y.js";import{Re,i}from"./chunk-0y2zzqsq.js";import"./chunk-g4e6egrr.js";import"./chunk-jt28zh50.js";import"./chunk-mmdfjmgk.js";import"./chunk-2qz891k4.js";import"./chunk-q9npggak.js";import"./chunk-tp2g09ca.js";import"./chunk-sgm6tg8h.js";import"./chunk-3m9vrhja.js";import{be}from"./chunk-30j6mbrf.js";import"./chunk-3kfbs0mw.js";import{ar,cr}from"./chunk-wz5m7ybz.js";import{ms,j,a}from"./chunk-q49ykyq9.js";import"./chunk-xsf7ax50.js";import"./chunk-yp6w740k.js";import"./chunk-5q9ss7ty.js";import"./chunk-3cn9y08d.js";import"./chunk-z8k3fx4r.js";import{m,Me}from"./chunk-0ggwm837.js";import"./chunk-bsgg8zzk.js";import"./chunk-gs373714.js";import"./chunk-465resq9.js";import"./chunk-89h4snzd.js";import"./chunk-xgegyttg.js";import"./chunk-dh9aagwm.js";import"./chunk-j4snweyz.js";export{ms as buildWebComponents,cr as cacheTemplate,ar as checkCache,Yt as classifyAllScripts,vl as createMiddleware,wl as createRoute,j as defaultConfig,m as extractVariables,be as injectRouterScript,a as loadStxConfig,Me as processClientScript,i as processDirectives,Re as readMarkdownFile};
|
package/dist/chunk-6ndeycxk.js
DELETED
package/dist/chunk-75r09rqt.js
DELETED