eser 4.1.33 → 4.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/chunks/{build-6DCIDFY7.js → build-EJLFNB4I.js} +2 -2
  2. package/chunks/{changelog-gen-7V37P7PE.js → changelog-gen-MX6L2Z24.js} +1 -1
  3. package/chunks/{chunk-NTHP6SND.js → chunk-2HBVIH7V.js} +1 -1
  4. package/chunks/{chunk-CEYKWASA.js → chunk-4MVO4LD5.js} +1 -1
  5. package/chunks/{chunk-COKZ6MLN.js → chunk-B6EATLKL.js} +3 -3
  6. package/chunks/{chunk-4SYC4WJV.js → chunk-DYRTLYTU.js} +2 -2
  7. package/chunks/chunk-E5QQGGNF.js +2 -0
  8. package/chunks/{chunk-JLY6XWDP.js → chunk-FKITIXO2.js} +1 -1
  9. package/chunks/{chunk-VC6ERZSI.js → chunk-GJ4LCA6D.js} +1 -1
  10. package/chunks/{chunk-CLL3YG4W.js → chunk-IIIMOOFE.js} +1 -1
  11. package/chunks/{chunk-5PNGVDLV.js → chunk-IZONBJSX.js} +1 -1
  12. package/chunks/{chunk-AGRTWPDI.js → chunk-KBFKBL6A.js} +1 -1
  13. package/chunks/{chunk-KKBIUT5L.js → chunk-KVTG56GS.js} +1 -1
  14. package/chunks/{chunk-7LRPRBT6.js → chunk-LOLA6ZSE.js} +1 -1
  15. package/chunks/{chunk-SQINSLNL.js → chunk-PZNCE6QK.js} +19 -19
  16. package/chunks/{chunk-3KCPUYLZ.js → chunk-QZ44TAIY.js} +1 -1
  17. package/chunks/{chunk-K7MYEXOS.js → chunk-T2DRBZ4X.js} +1 -1
  18. package/chunks/chunk-UJPVEQX7.js +5 -0
  19. package/chunks/chunk-VAIRJES2.js +2 -0
  20. package/chunks/{commitmsg-UK2ABB7D.js → commitmsg-7XZGGERO.js} +1 -1
  21. package/chunks/{dev-XBH6C6DH.js → dev-PTMXZEVC.js} +2 -2
  22. package/chunks/{gh-RKKHKA3B.js → gh-L25JQWOY.js} +2 -2
  23. package/chunks/{gh-contributors-X7BW57DD.js → gh-contributors-E7IZ2LFS.js} +1 -1
  24. package/chunks/init-2FLT3GXG.js +2 -0
  25. package/chunks/{init-32DVDSNZ.js → init-J4IHOVZL.js} +2 -2
  26. package/chunks/{install-LM44N3DB.js → install-KNZDCGIB.js} +1 -1
  27. package/chunks/{invoke-hook-7RPFDMV3.js → invoke-hook-PADL4W3J.js} +1 -1
  28. package/chunks/{main-JTYNMHNL.js → main-HJQEBLLN.js} +1 -1
  29. package/chunks/{mod-SA3J2VR5.js → mod-OS3BCM2G.js} +1 -1
  30. package/chunks/{mod-5WXRQGLS.js → mod-PFWQZF3T.js} +5 -5
  31. package/chunks/{mod-MACR3KPO.js → mod-SDQ3QKKS.js} +1 -1
  32. package/chunks/{mod-Y4UHOKMZ.js → mod-W3DBWTCY.js} +1 -1
  33. package/chunks/{next-VUWK6CDH.js → next-ARUY5FHZ.js} +1 -1
  34. package/chunks/{release-WKMSWXDS.js → release-J3PVDROM.js} +2 -2
  35. package/chunks/{release-notes-GOUHBQ2F.js → release-notes-AARDYXYA.js} +1 -1
  36. package/chunks/{release-tag-5WNEA4HM.js → release-tag-H2YWUXRU.js} +1 -1
  37. package/chunks/{run-NZPCSAOA.js → run-TL4KPOGO.js} +1 -1
  38. package/chunks/{serve-DEYVWV2K.js → serve-XVAIQ37L.js} +2 -2
  39. package/chunks/{system-QCLDIN7D.js → system-5HS7XXTF.js} +1 -1
  40. package/chunks/{system-BJCQKFCP.js → system-WTPEDJU6.js} +1 -1
  41. package/chunks/{validate-bom-KEC4IOKO.js → validate-bom-QVE5HNBO.js} +1 -1
  42. package/chunks/{validate-case-conflict-ZZKZQQX4.js → validate-case-conflict-XFS3URQN.js} +1 -1
  43. package/chunks/{validate-circular-deps-QCJYK5K5.js → validate-circular-deps-BMPAT3PF.js} +1 -1
  44. package/chunks/{validate-commit-msg-PZZ4T4QF.js → validate-commit-msg-BPESCI7P.js} +1 -1
  45. package/chunks/{validate-docs-M55HAXPX.js → validate-docs-ITL4L6KY.js} +1 -1
  46. package/chunks/{validate-eof-MX52AUUT.js → validate-eof-DTFV74VL.js} +1 -1
  47. package/chunks/{validate-export-names-UFXPIDFW.js → validate-export-names-HLOH7D73.js} +1 -1
  48. package/chunks/{validate-filenames-LXIMPWRW.js → validate-filenames-J4RTDEBD.js} +1 -1
  49. package/chunks/{validate-json-TABLVKEH.js → validate-json-KMODGNSU.js} +1 -1
  50. package/chunks/{validate-large-files-CMCMEGYA.js → validate-large-files-X5YF7D7T.js} +1 -1
  51. package/chunks/{validate-licenses-MDGIDYNC.js → validate-licenses-OZ7DXQTY.js} +1 -1
  52. package/chunks/{validate-line-endings-K36HS73S.js → validate-line-endings-PFF6QJ3W.js} +1 -1
  53. package/chunks/{validate-merge-conflict-PMGZYM3B.js → validate-merge-conflict-KB2X6QLW.js} +1 -1
  54. package/chunks/{validate-mod-exports-M3UYNBK7.js → validate-mod-exports-VHK2NVKI.js} +1 -1
  55. package/chunks/{validate-package-configs-V5LR7K5C.js → validate-package-configs-ZNCAIYRO.js} +1 -1
  56. package/chunks/{validate-secrets-IAMY5DB5.js → validate-secrets-RM6DMZVG.js} +1 -1
  57. package/chunks/{validate-shebangs-GUBDNU2N.js → validate-shebangs-WC66D7RK.js} +1 -1
  58. package/chunks/{validate-submodules-ZA2FAF3W.js → validate-submodules-SPAXASAG.js} +1 -1
  59. package/chunks/{validate-symlinks-LSEEVFTR.js → validate-symlinks-4LOWK2MQ.js} +1 -1
  60. package/chunks/{validate-toml-JLQ3BY73.js → validate-toml-SG4IITMN.js} +1 -1
  61. package/chunks/{validate-trailing-whitespace-3UUUKE22.js → validate-trailing-whitespace-GRE2PJ6T.js} +1 -1
  62. package/chunks/{validate-yaml-2BG7G35N.js → validate-yaml-RA22QNW6.js} +1 -1
  63. package/chunks/{versions-IVXYMSAZ.js → versions-ODYWYT7U.js} +1 -1
  64. package/eser.js +1 -1
  65. package/package.json +1 -1
  66. package/chunks/chunk-VG72SSDI.js +0 -5
  67. package/chunks/chunk-YEOC73LX.js +0 -2
  68. package/chunks/chunk-YTF3BAQS.js +0 -2
  69. package/chunks/init-XV5ILPUE.js +0 -2
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{f as d,h as g,k as m}from"./chunk-GBM3TZFD.js";import{b as c,d as L,h as C,k as u}from"./chunk-3SXTMY75.js";import"./chunk-PWLF3WXM.js";import{a as v}from"./chunk-SQINSLNL.js";import"./chunk-MG65QJY6.js";import{a as y}from"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var V=["trace","debug","info","warn","error","fatal"],N=async x=>{let{flags:o}=v(x??[],[{name:"out-dir",type:"string",default:"dist",description:"Output directory"},{name:"clean",type:"boolean",description:"Clean output first"},{name:"no-minify",type:"boolean",description:"Disable minification"},{name:"analyze",type:"boolean",description:"Analyze bundle size"},{name:"log-level",type:"string",default:"info",description:"Log level"}]),t=d({renderer:m.ansi(),sink:g.stdout()});t.writeln(u(`
2
+ import{f as d,h as g,k as m}from"./chunk-GBM3TZFD.js";import{b as c,d as L,h as C,k as u}from"./chunk-3SXTMY75.js";import"./chunk-PWLF3WXM.js";import{a as v}from"./chunk-PZNCE6QK.js";import"./chunk-MG65QJY6.js";import{a as y}from"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var V=["trace","debug","info","warn","error","fatal"],N=async x=>{let{flags:o}=v(x??[],[{name:"out-dir",type:"string",default:"dist",description:"Output directory"},{name:"clean",type:"boolean",description:"Clean output first"},{name:"no-minify",type:"boolean",description:"Disable minification"},{name:"analyze",type:"boolean",description:"Analyze bundle size"},{name:"log-level",type:"string",default:"info",description:"Log level"}]),t=d({renderer:m.ansi(),sink:g.stdout()});t.writeln(u(`
3
3
  \u{1F4E6} Building for production...
4
- `));let e=await import("./mod-4ILLF5PK.js"),{runtime:n}=await import("./mod-MLRQFSBE.js"),i=n.process.cwd(),p=o["out-dir"],S=!o["no-minify"],h=o.clean,k=o.analyze,f=o["log-level"]??"info",b=V.includes(f.toLowerCase())?f.toLowerCase():"info",z={trace:e.Severities.Trace,debug:e.Severities.Debug,info:e.Severities.Info,warn:e.Severities.Warning,error:e.Severities.Error,fatal:e.Severities.Critical},D=d({renderer:m.ansi(),sink:g.stdout()});await e.config.configure({sinks:{console:e.sinks.getOutputSink(D)},loggers:[{category:["laroux-bundler"],lowestLevel:z[b],sinks:["console"]}]});let[{build:A,createBuildContext:E},{loadConfig:O},{reactPlugin:B},{createTailwindPlugin:P}]=await Promise.all([import("./system-BJCQKFCP.js"),import("./load-config-FTQMJVEW.js"),import("./mod-SA3J2VR5.js"),import("./mod-JZNE2HH6.js")]),T=e.logger.getLogger(["laroux-bundler","cli"]),s=await O(i),r={projectRoot:i,srcDir:n.path.resolve(i,s.srcDir),distDir:n.path.resolve(i,p),logLevel:b,fonts:s.fonts,images:s.images,cssModuleTypes:s.cssModuleTypes,noCssModuleAutoReference:s.noCssModuleAutoReference,browserShims:s.browserShims,serverExternals:s.build.serverExternals,build:{...s.build,minify:S}};if(h)try{await n.fs.remove(r.distDir,{recursive:!0}),T.debug(`Cleaned ${r.distDir}`)}catch{}let R=P({globalCssPath:n.path.resolve(i,"src/app/styles/global.css")}),j=E(r,{framework:B,css:R,bundlerBackend:"rolldown"});if(await A(j),await e.config.reset(),k){t.writeln(u(`
4
+ `));let e=await import("./mod-4ILLF5PK.js"),{runtime:n}=await import("./mod-MLRQFSBE.js"),i=n.process.cwd(),p=o["out-dir"],S=!o["no-minify"],h=o.clean,k=o.analyze,f=o["log-level"]??"info",b=V.includes(f.toLowerCase())?f.toLowerCase():"info",z={trace:e.Severities.Trace,debug:e.Severities.Debug,info:e.Severities.Info,warn:e.Severities.Warning,error:e.Severities.Error,fatal:e.Severities.Critical},D=d({renderer:m.ansi(),sink:g.stdout()});await e.config.configure({sinks:{console:e.sinks.getOutputSink(D)},loggers:[{category:["laroux-bundler"],lowestLevel:z[b],sinks:["console"]}]});let[{build:A,createBuildContext:E},{loadConfig:O},{reactPlugin:B},{createTailwindPlugin:P}]=await Promise.all([import("./system-WTPEDJU6.js"),import("./load-config-FTQMJVEW.js"),import("./mod-OS3BCM2G.js"),import("./mod-JZNE2HH6.js")]),T=e.logger.getLogger(["laroux-bundler","cli"]),s=await O(i),r={projectRoot:i,srcDir:n.path.resolve(i,s.srcDir),distDir:n.path.resolve(i,p),logLevel:b,fonts:s.fonts,images:s.images,cssModuleTypes:s.cssModuleTypes,noCssModuleAutoReference:s.noCssModuleAutoReference,browserShims:s.browserShims,serverExternals:s.build.serverExternals,build:{...s.build,minify:S}};if(h)try{await n.fs.remove(r.distDir,{recursive:!0}),T.debug(`Cleaned ${r.distDir}`)}catch{}let R=P({globalCssPath:n.path.resolve(i,"src/app/styles/global.css")}),j=E(r,{framework:B,css:R,bundlerBackend:"rolldown"});if(await A(j),await e.config.reset(),k){t.writeln(u(`
5
5
  \u{1F4CA} Bundle Analysis:
6
6
  `));try{let M=`${p}/client/manifest.json`,$=await n.fs.readTextFile(M),w=JSON.parse($);t.writeln(c("Chunks:"));for(let[a,l]of Object.entries(w.files)){let I=(l.size/1024).toFixed(2);t.writeln(c(` ${a.padEnd(30)} ${I.padStart(8)} KB`))}let F=Object.values(w.files).reduce((a,l)=>a+l.size,0);t.writeln(L(`
7
7
  Total: ${(F/1024).toFixed(2)} KB`))}catch{t.writeln(C("Could not analyze build (manifest.json not found)"))}}return await t.close(),y(void 0)};export{N as main};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as $,b as S}from"./chunk-BP3IFAPO.js";import{a as O}from"./chunk-NTHP6SND.js";import"./chunk-4SYC4WJV.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-JYNHFD6B.js";import{a as E}from"./chunk-2VEVVX6U.js";import{a as w,b as A}from"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-YTF3BAQS.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import{f as R}from"./chunk-3BEX5FYF.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import{b as u,f as h,g as y,h as v,i as x}from"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import{a as C}from"./chunk-MG65QJY6.js";import{g as p}from"./chunk-A6RDYP6R.js";import"./chunk-2BOCLC67.js";import"./chunk-N7DXBY3O.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import{v as m}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var f=w(),G={feat:"Added",fix:"Fixed",refactor:"Changed",perf:"Changed",docs:"Changed",revert:"Removed"},T=new Set(["chore","ci","test"]),N=/^(\w+)(?:\(([^)]+)\))?!?:\s{1,5}(.+)$/,I=/\s{0,100}\(take\s{1,100}[IVXLCDM\d]+\)\s{0,100}\.?$/i,P=(n,t)=>{let o=n.match(N);if(o!==null)return{type:o[1].toLowerCase(),scope:o[2],message:o[3].trim(),hash:t}},b=n=>n.replace(I,"").trim(),M=n=>{let t=[];for(let o of n){let e=P(o.subject,o.hash);e!==void 0&&t.push(e)}return t},k=n=>{let t=new Set,o=[];for(let e of n){let s=b(e.message),a=s.replace(/[.\s]{1,20}$/,"").toLowerCase(),l=`${e.type}:${a}`;t.has(l)||(t.add(l),o.push({...e,message:s}))}return o},L=n=>{let t=new Map;for(let o of n){if(T.has(o.type))continue;let e=G[o.type];if(e===void 0)continue;let s=t.get(e);s!==void 0?s.push(o):t.set(e,[o])}return t},F=n=>n.scope!==void 0?`- **${n.scope}:** ${n.message}`:`- ${n.message}`,H=(n,t)=>{let o=L(t);if(o.size===0){let l=new Date().toISOString().split("T")[0];return`## ${n} - ${l}
2
+ import{a as $,b as S}from"./chunk-BP3IFAPO.js";import{a as O}from"./chunk-2HBVIH7V.js";import"./chunk-DYRTLYTU.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-JYNHFD6B.js";import{a as E}from"./chunk-2VEVVX6U.js";import{a as w,b as A}from"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import{f as R}from"./chunk-3BEX5FYF.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import{b as u,f as h,g as y,h as v,i as x}from"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import{a as C}from"./chunk-MG65QJY6.js";import{g as p}from"./chunk-A6RDYP6R.js";import"./chunk-2BOCLC67.js";import"./chunk-N7DXBY3O.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import{v as m}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var f=w(),G={feat:"Added",fix:"Fixed",refactor:"Changed",perf:"Changed",docs:"Changed",revert:"Removed"},T=new Set(["chore","ci","test"]),N=/^(\w+)(?:\(([^)]+)\))?!?:\s{1,5}(.+)$/,I=/\s{0,100}\(take\s{1,100}[IVXLCDM\d]+\)\s{0,100}\.?$/i,P=(n,t)=>{let o=n.match(N);if(o!==null)return{type:o[1].toLowerCase(),scope:o[2],message:o[3].trim(),hash:t}},b=n=>n.replace(I,"").trim(),M=n=>{let t=[];for(let o of n){let e=P(o.subject,o.hash);e!==void 0&&t.push(e)}return t},k=n=>{let t=new Set,o=[];for(let e of n){let s=b(e.message),a=s.replace(/[.\s]{1,20}$/,"").toLowerCase(),l=`${e.type}:${a}`;t.has(l)||(t.add(l),o.push({...e,message:s}))}return o},L=n=>{let t=new Map;for(let o of n){if(T.has(o.type))continue;let e=G[o.type];if(e===void 0)continue;let s=t.get(e);s!==void 0?s.push(o):t.set(e,[o])}return t},F=n=>n.scope!==void 0?`- **${n.scope}:** ${n.message}`:`- ${n.message}`,H=(n,t)=>{let o=L(t);if(o.size===0){let l=new Date().toISOString().split("T")[0];return`## ${n} - ${l}
3
3
 
4
4
  _Maintenance release._`}let e=new Date().toISOString().split("T")[0],s=[`## ${n} - ${e}`],a=["Added","Changed","Fixed","Removed"];for(let l of a){let r=o.get(l);if(!(r===void 0||r.length===0)){s.push("",`### ${l}`,"");for(let g of r)s.push(F(g))}}return s.join(`
5
5
  `)},j=(n,t,o)=>{let e=n.split(`
@@ -1,3 +1,3 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{e as w,f as C}from"./chunk-4SYC4WJV.js";import{a as A}from"./chunk-2VEVVX6U.js";import{a as O,b as U}from"./chunk-4DOMGQOO.js";import{a as b,b as x,c as F,d as m}from"./chunk-J2Z7NG2X.js";import{f as v}from"./chunk-3BEX5FYF.js";import{b as i,g as P,i as l}from"./chunk-3SXTMY75.js";import{a as S}from"./chunk-MG65QJY6.js";import{g as a}from"./chunk-A6RDYP6R.js";import{j as h}from"./chunk-7ATUODBM.js";import{v as V}from"./chunk-MRCBHVSB.js";var d=O(),M=async(n={})=>{let{root:e="."}=n,s=h(e,"VERSION");try{return(await V.runtime.fs.readTextFile(s)).trim()}catch{return}},T=async(n,e)=>{let s=h(n,"VERSION");await V.runtime.fs.writeTextFile(s,e+`
2
+ import{e as w,f as C}from"./chunk-DYRTLYTU.js";import{a as A}from"./chunk-2VEVVX6U.js";import{a as O,b as U}from"./chunk-4DOMGQOO.js";import{a as b,b as x,c as F,d as m}from"./chunk-J2Z7NG2X.js";import{f as v}from"./chunk-3BEX5FYF.js";import{b as i,g as P,i as l}from"./chunk-3SXTMY75.js";import{a as S}from"./chunk-MG65QJY6.js";import{g as a}from"./chunk-A6RDYP6R.js";import{j as h}from"./chunk-7ATUODBM.js";import{v as V}from"./chunk-MRCBHVSB.js";var d=O(),M=async(n={})=>{let{root:e="."}=n,s=h(e,"VERSION");try{return(await V.runtime.fs.readTextFile(s)).trim()}catch{return}},T=async(n,e)=>{let s=h(n,"VERSION");await V.runtime.fs.writeTextFile(s,e+`
3
3
  `)},j=n=>{let e=m("0.0.0");for(let s of n){let r=m(s);b(r,e)>0&&(e=r)}return x(e)},H=async(n={})=>{let{root:e="."}=n,[s,r]=await C(e),p=s.version?.value??"0.0.0";return{packages:[{name:s.name?.value??"(root)",version:p},...r.map(u=>({name:u.name,version:u.version}))]}},D=async(n,e={})=>{let{root:s=".",dryRun:r=!1,updateVersionFile:p=!0}=e,[c,y]=await C(s),u=c.version?.value??"0.0.0",E=c.name?.value??"(root)",$=[u,...y.map(o=>o.version)],R=j($),t;if(n==="explicit"){if(e.explicitVersion===void 0)throw new Error('explicitVersion is required when command is "explicit".');m(e.explicitVersion),t=e.explicitVersion}else n==="sync"?t=R:t=x(F(m(R),n));let g=[],I=u!==t;r||await w(c,t),g.push({name:E,from:u,to:t,changed:I});for(let o of y){let f=o.version!==t;r||await w(o.config,t),g.push({name:o.name,from:o.version,to:t,changed:f})}let k=[];if(p){let o=await M({root:s}),f=o!==t;!r&&f&&await T(s,t),k.push({path:"VERSION",from:o??"",to:t,changed:f})}let N=g.filter(o=>o.changed).length;return{command:n,targetVersion:t,updates:g,fileUpdates:k,changedCount:N,dryRun:r}},W=n=>n.mode==="show"?v.fromPromise(async()=>({mode:"show",result:await H()})):v.fromPromise(async()=>({mode:"update",result:await D(n.command,n.options)})),q=n=>{let e=n.args[0];if(e===void 0)return a.ok({mode:"show"});let s=["sync","patch","minor","major"],r,p;s.includes(e)?r=e:(r="explicit",p=e);let c=n.flags["dry-run"]===!0;return a.ok({mode:"update",command:r,options:{dryRun:c,explicitVersion:p}})},B=n=>{if(a.isFail(n))return a.fail({exitCode:1,message:String(n.error)});let e=n.value;if(e.mode==="show")return console.table(e.result.packages),a.ok(void 0);let{result:s}=e;s.command==="sync"?d.writeln(l("\u2139"),i(" Syncing all versions...")):s.command==="explicit"?d.writeln(l("\u2139"),i(` Setting all versions to ${s.targetVersion}...`)):d.writeln(l("\u2139"),i(` Bumping all versions (${s.command})...`)),d.writeln(l("\u2139"),i(` Target version: ${s.targetVersion}`)),console.table(s.updates);for(let r of s.fileUpdates)r.changed&&d.writeln(l("\u2139"),i(` ${r.path} (${r.from} \u2192 ${r.to})`));return s.dryRun?d.writeln(l("\u2139"),i(` Dry run - ${s.changedCount} packages would be modified.`)):d.writeln(P("\u2713"),i(` Done. Updated ${s.changedCount} packages.`)),a.ok(void 0)},z=A.createTrigger({handler:W,adaptInput:q,adaptOutput:B}),se=async n=>{let e=S(n??[],{boolean:["dry-run"]}),s=U("versions",e);return await z(s)};export{M as a,H as b,D as c,W as d,z as e,se as f};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as e}from"./chunk-KKBIUT5L.js";var i=new e({description:"AI provider interface \u2014 ask questions, generate content",modules:{ask:{description:"Send a prompt to an AI provider",load:()=>import("./ask-L3N6REQI.js")},list:{description:"List available AI providers",load:()=>import("./list-5TGTYMAU.js")}}});export{i as a};
2
+ import{a as e}from"./chunk-KVTG56GS.js";var i=new e({description:"AI provider interface \u2014 ask questions, generate content",modules:{ask:{description:"Send a prompt to an AI provider",load:()=>import("./ask-L3N6REQI.js")},list:{description:"List available AI providers",load:()=>import("./list-5TGTYMAU.js")}}});export{i as a};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as ge,b as me,d as X,e as Ye,f as et,g as tt,h as U}from"./chunk-VG72SSDI.js";import{n as $e}from"./chunk-KPWEJXPI.js";import{a as nt}from"./chunk-CUIMSX4V.js";import{c as fe}from"./chunk-4SYC4WJV.js";import{a as pe,b as re,c as z,d as Be}from"./chunk-NBA6EFWU.js";import{e as S}from"./chunk-LCG4SK6K.js";import{c as Qe,t as o}from"./chunk-MRCBHVSB.js";import{a as H}from"./chunk-STI6DX7K.js";var I=S.getLogger(["laroux-bundler","server-action-transform"]);function mn(e,t){return`${e.replace(/\.[cm]?[jt]sx?$/,"")}#${t}`}function hn(e,t){let n=mn(e,t);return`Object.defineProperties(${t}, {
2
+ import{a as ge,b as me,d as X,e as Ye,f as et,g as tt,h as U}from"./chunk-UJPVEQX7.js";import{n as $e}from"./chunk-KPWEJXPI.js";import{a as nt}from"./chunk-CUIMSX4V.js";import{c as fe}from"./chunk-DYRTLYTU.js";import{a as pe,b as re,c as z,d as Be}from"./chunk-NBA6EFWU.js";import{e as S}from"./chunk-LCG4SK6K.js";import{c as Qe,t as o}from"./chunk-MRCBHVSB.js";import{a as H}from"./chunk-STI6DX7K.js";var I=S.getLogger(["laroux-bundler","server-action-transform"]);function mn(e,t){return`${e.replace(/\.[cm]?[jt]sx?$/,"")}#${t}`}function hn(e,t){let n=mn(e,t);return`Object.defineProperties(${t}, {
3
3
  $$typeof: { value: Symbol.for("react.server.reference"), enumerable: false },
4
4
  $$id: { value: "${n}", enumerable: false },
5
5
  $$bound: { value: null, enumerable: false, writable: true }
@@ -77,8 +77,8 @@ ${s.join(`,
77
77
  `)},
78
78
  ];
79
79
  `;await o.fs.writeTextFile(t,i),_.debug(`Generated ${r.length} proxy definition(s)`)}async function Rt(e){try{let t=await o.fs.readTextFile(e),n=[],r=t.matchAll(/export\s+(?:async\s+)?function\s+(\w+)/g);for(let i of r)i[1]!==void 0&&n.push(i[1]);let s=t.matchAll(/export\s+const\s+(\w+)\s*=/g);for(let i of s)i[1]!==void 0&&n.push(i[1]);return t.match(/export\s+default\s+/)&&n.push("default"),[...new Set(n)]}catch{return[]}}async function Wn(e,t){let n=await Rt(e);if(n.length===0)return t;let r=n.find(i=>i!=="default"&&i.endsWith("Page"));if(r)return r;let s=n.find(i=>i!=="default");return s||t}async function Un(e,t){let n=await Rt(e);if(n.length===0)return t;let r=n.find(i=>i!=="default"&&i.endsWith("Layout"));if(r)return r;let s=n.find(i=>i!=="default");return s||t}function _n(e){let t=o.path.basename(o.path.dirname(e));return`${kt(Pt(t))}Page`}function Jn(e){let t=o.path.basename(o.path.dirname(e));return`${kt(Pt(t))}Layout`}function Pt(e){return e.startsWith("[...")?e.slice(4,-1):e.startsWith("[")&&e.endsWith("]")?e.slice(1,-1):e}function kt(e){return e.split(/[-_\s]+/).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join("")}function Mt(e,t){let n=H(o.path.relative(e,t));return n.startsWith(".")?n:`./${n}`}function Gn(e,t,n){let r=[`path: "${e.routePath}"`,`component: ${t}`];return n&&r.push(`layout: ${n}`),`{ ${r.join(", ")} }`}var Hn=/(?:node_modules|\/\.|^\.|\\\.)/,W=S.getLogger(["laroux-bundler","virtual-source"]),we="_bundle_src";function Vn(e,t){return o.path.relative(t,e)}async function Ft(e){let{projectRoot:t,distDir:n,srcDir:r,changedFiles:s}=e,i=Vn(r,t),a=o.path.resolve(n,we),c=o.path.resolve(a,i);W.debug(`Creating virtual source: ${a}`),W.debug(` Virtual src subdir: ${c}`);let u=await o.fs.exists(c);if(s&&s.size>0&&u)W.debug(`Incremental update: ${s.size} file(s) changed`),await Kn(s,r,c),W.debug(`Virtual source updated incrementally: ${s.size} file(s)`);else{try{await Ye(a)}catch{}await qn(r,c,t),W.debug(`Virtual source created: ${a}`)}return{virtualSrcDir:a,cleanup:async()=>{W.debug(`Cleaning up virtual source: ${a}`);try{await o.fs.remove(a,{recursive:!0}),W.debug("Virtual source cleaned up")}catch(l){W.warn("Failed to clean up virtual source:",{error:l})}}}}async function Kn(e,t,n){let r=[...re,"json","css"],s=0,i=0;for(let a of e){if(!a.startsWith(t)||!Be(a,r))continue;let c=o.path.relative(t,a),u=o.path.resolve(n,c);try{await o.fs.stat(a),await et(o.path.dirname(u)),await U(a,u,{overwrite:!0}),s++}catch{try{await o.fs.remove(u),i++}catch{}}}(s>0||i>0)&&W.debug(`Incremental update: ${s} copied, ${i} deleted`)}async function qn(e,t,n){let r=0,s=[...re,"json","css"];for await(let i of tt(e,{includeDirs:!1})){if(!Be(i.path,s))continue;let a=o.path.relative(e,i.path);if(Hn.test(a))continue;let c=o.path.resolve(t,a);await o.fs.ensureDir(o.path.dirname(c)),await U(i.path,c),r++}W.debug(`Copied ${r} source file(s) to virtual source`)}function le(e,t,n,r){let s=o.path.relative(t,e),i=r??o.path.basename(t);return o.path.resolve(n,i,s)}function Bt(e,t,n){return e.map(r=>{let s=le(r.filePath,t,n),i=`${we}/${r.relativePath}`;return{...r,filePath:s,relativePath:i}})}var J=S.getLogger(["laroux-bundler","build-cache"]),Ae=class{clientComponentCache=new Map;cssModuleCache=new Map;routeCache=null;getClientComponent(t,n){let r=this.clientComponentCache.get(t);return r&&r.mtime>=n?(J.debug(`Cache hit: client component ${t}`),r):null}setClientComponent(t,n,r,s){this.clientComponentCache.set(t,{isClient:n,exportNames:r,mtime:s})}getCssModuleResult(t,n){let r=this.cssModuleCache.get(t);return r&&r.mtime>=n?(J.debug(`Cache hit: CSS module ${t}`),r):null}setCssModuleResult(t,n,r,s){this.cssModuleCache.set(t,{code:n,exports:r,mtime:s})}getRouteCache(t){return this.routeCache&&this.routeCache.mtime>=t?(J.debug("Cache hit: route scan"),this.routeCache):null}setRouteCache(t,n,r,s){this.routeCache={routes:t,apiRoutes:n,proxies:r,mtime:s}}invalidateFile(t){this.clientComponentCache.has(t)&&(this.clientComponentCache.delete(t),J.debug(`Invalidated: client component ${t}`)),this.cssModuleCache.has(t)&&(this.cssModuleCache.delete(t),J.debug(`Invalidated: CSS module ${t}`)),(t.includes("/routes/")||t.includes("\\routes\\"))&&(this.routeCache=null,wt(),J.debug("Invalidated: route cache"))}invalidateFiles(t){for(let n of t)this.invalidateFile(n)}clear(){this.clientComponentCache.clear(),this.cssModuleCache.clear(),this.routeCache=null,J.debug("All caches cleared")}getStats(){return{clientComponents:this.clientComponentCache.size,cssModules:this.cssModuleCache.size,hasRoutes:this.routeCache!==null}}},Ie=null;function $t(){return Ie||(Ie=new Ae,J.debug("Created global build cache")),Ie}var Xn=new TextEncoder().encode("0123456789abcdef"),Et=new Uint8Array(128).fill(16);Xn.forEach((e,t)=>Et[e]=t);new TextEncoder().encode("ABCDEF").forEach((e,t)=>Et[e]=t+10);function Ot(e){return e*2}function Dt(e,t,n,r){for(;t<e.length;++t){let s=e[t];e[n++]=r[s>>4],e[n++]=r[s&15]}return n}function Tt(e,t){let n=e.length;if(e.byteOffset){let r=new Uint8Array(e.buffer);r.set(e),e=r.subarray(0,n)}return e=new Uint8Array(e.buffer.transfer(t)),e.set(e.subarray(0,n),t-n),[e,t-n]}var jt=new TextEncoder().encode("0123456789abcdef"),Nt=new Uint8Array(128).fill(16);jt.forEach((e,t)=>Nt[e]=t);new TextEncoder().encode("ABCDEF").forEach((e,t)=>Nt[e]=t+10);function be(e){typeof e=="string"?e=new TextEncoder().encode(e):e instanceof ArrayBuffer?e=new Uint8Array(e).slice():e=e.slice();let[t,n]=Tt(e,Ot(e.length));return Dt(t,n,0,jt),new TextDecoder().decode(t)}var Ce=(e,t)=>({success:!0,outputs:e,metafile:t?.metafile,entrypointManifest:t?.entrypointManifest,entrypoint:t?.entrypoint,totalSize:t?.totalSize}),Q=e=>({success:!1,outputs:new Map,errors:e});var ve=S.getLogger(["bundler","deno-bundler"]),Se=class{name="deno-bundler";options;constructor(t={}){this.options=t}async bundle(t){let n=await o.fs.makeTempDir({prefix:"deno-bundle-"});try{let r=Object.values(t.entrypoints),s=Object.keys(t.entrypoints),i=[...r];if(this.options.buildId!==void 0){let p=o.path.join(n,"_build-id-entry.ts");await o.fs.writeTextFile(p,`export const BUILD_ID = "${this.options.buildId}";
80
- `),i.unshift(p)}let a=t.platform==="browser"?"browser":"deno",c=t.sourcemap===!0?"external":t.sourcemap===!1?void 0:t.sourcemap,u={entrypoints:i,outputDir:n,format:"esm",codeSplitting:t.codeSplitting,minify:t.minify,platform:a,sourcemap:c};t.external!==void 0&&(u.external=t.external),ve.debug("Calling Deno.bundle",{entrypoints:i.slice(0,3),outputDir:n,external:u.external,platform:u.platform});let l=await Deno.bundle(u);if(ve.debug("Deno.bundle result",{success:l.success,errors:l.errors?.length??0}),!l.success){let f=(l.errors??[]).map(d=>({message:d.text??this.extractErrorMessage(d),severity:"error"}));return Q(f)}return await this.processOutput(n,t,s,r)}catch(r){return Q([{message:r instanceof Error?r.message:String(r),severity:"fatal"}])}finally{try{await o.fs.remove(n,{recursive:!0})}catch{}}}watch(t,n){let r=!0,s=Object.values(t.entrypoints).map(u=>o.path.dirname(u)),i=[...new Set(s)],a=Deno.watchFs(i,{recursive:!0});return(async()=>{for await(let u of a){if(!r)break;let l=await this.bundle(t);n(l)}})().catch(u=>{console.error("Watch loop error:",u)}),Promise.resolve({stop:()=>(r=!1,a.close(),Promise.resolve())})}extractErrorMessage(t){return t==null?"Unknown error":typeof t=="object"&&"message"in t?String(t.message):String(t)}async processOutput(t,n,r,s){let i=this.options.entryName??"main",a=new Map,c={},u={},l=null,p=0,f=new Map,d=new Map;for(let b=0;b<s.length;b++){let w=s[b],x=r[b];if(w!==void 0&&x!==void 0){let P=o.path.basename(w).replace(/\.[^.]+$/,"");f.set(P,x),d.set(z(w,".js"),x)}}let m=o.path.join(t,"dist"),h=t;try{(await o.fs.stat(m)).isDirectory&&(h=m)}catch{}let y=[];ve.debug(`Scanning output dir: ${h}`);let C=async(b,w="")=>{for await(let x of o.fs.readDir(b)){let P=o.path.join(b,x.name),F=w?`${w}/${x.name}`:x.name;x.isDirectory?await C(P,F):x.isFile&&(x.name.endsWith(".js")||x.name.endsWith(".map"))&&y.push({name:F,path:P})}};if(await C(h),h!==t){for await(let b of o.fs.readDir(t))if(b.isFile&&(b.name.endsWith(".js")||b.name.endsWith(".map"))&&(b.name.startsWith("chunk-")||b.name.endsWith(".map"))){let w=o.path.join(t,b.name);y.some(x=>x.path===w)||y.push({name:b.name,path:w})}}ve.debug(`Found ${y.length} output files`,y.map(b=>b.name));let R=new Map;for(let b of y)if(b.name.endsWith(".map")){let w=await o.fs.readFile(b.path),x=b.name;b.name.startsWith("_client-entry")?x=`${i}.js.map`:b.name.startsWith("_build-id-entry")&&(x="build-id.js.map"),R.set(x,w)}for(let b of y){if(b.name.endsWith(".map"))continue;let w=await o.fs.readTextFile(b.path);n.basePath!==void 0&&(w=w.replace(/\/_lime\/alive/g,`${n.basePath}/_lime/alive`)),n.define!==void 0&&(w=Zn(w,n.define)),w=w.replace(/from\s*["']\.\.\/chunk-/g,'from"./chunk-'),w=w.replace(/from\s*["']\.\.chunk-/g,'from"./chunk-'),w=w.replace(/import\s*\(["']\.\.\/chunk-/g,'import("./chunk-'),w=w.replace(/import\s*\(["']\.\.chunk-/g,'import("./chunk-');let x=b.name,P=x.startsWith("_client-entry");if(P)x=`${i}.js`,l=`${i}.js`;else if(x.startsWith("_build-id-entry"))x="build-id.js";else if(!x.startsWith("chunk-")){let j;for(let[ee,Fe]of d)if(ee.endsWith(x)){j=Fe;break}if(j===void 0){let ee=o.path.basename(x).replace(/\.js$/,"");j=f.get(ee)}j!==void 0&&(x=`${j}.js`)}P&&R.has(`${i}.js.map`)&&(w=w.replace(/\/\/# sourceMappingURL=.*$/m,`//# sourceMappingURL=${i}.js.map`),w.includes("//# sourceMappingURL=")||(w+=`
81
- //# sourceMappingURL=${i}.js.map`));let F=new TextEncoder().encode(w),de=await this.computeHash(F),D=this.parseImports(w),Me=`${x}.map`,Y=R.get(Me);a.set(x,{path:x,code:F,map:Y,size:F.length,hash:de,isEntry:!x.startsWith("chunk-")}),p+=F.length,c[x]={bytes:F.length,inputs:{},imports:D.map(j=>({path:j,kind:"import-statement"}))}}for(let[b,w]of R)if(!a.has(b)){let x=await this.computeHash(w);a.set(b,{path:b,code:w,size:w.length,hash:x,isEntry:!1}),p+=w.length}if(n.outputDir!==void 0){await o.fs.mkdir(n.outputDir,{recursive:!0});for(let[b,w]of a){let x=o.path.join(n.outputDir,b),P=o.path.dirname(x);P!==n.outputDir&&await o.fs.mkdir(P,{recursive:!0}),await o.fs.writeFile(x,w.code)}}for(let[b,w]of Object.entries(n.entrypoints)){if(b==="client"||b==="main")continue;let x=await this.findEntrypointChunks(b,h,t,a);x.length>0&&(u[w]=x)}return Ce(a,{metafile:{inputs:{},outputs:c},entrypointManifest:u,entrypoint:l??"main.js",totalSize:p})}async findEntrypointChunks(t,n,r,s){let i=z(t,".js"),a=o.path.join(n,i),c=null;try{c=await o.fs.readTextFile(a)}catch{try{let u=o.path.join(r,"dist",i);c=await o.fs.readTextFile(u)}catch{}}return c!==null?this.extractChunksFromProxyFile(c,s):this.findChunksForComponentName(t,s)}findChunksForComponentName(t,n){let r=[],s=o.path.basename(t).replace(/\.[^.]+$/,""),i=s.charAt(0).toUpperCase()+s.slice(1).replace(/-([a-z])/g,(a,c)=>c.toUpperCase());for(let[a,c]of n){if(!a.startsWith("chunk-")||!a.endsWith(".js"))continue;let u=new TextDecoder().decode(c.code);if([new RegExp(`export\\s*\\{[^}]*\\b${i}\\b[^}]*\\}`),new RegExp(`export\\s+(?:function|const|let|var|class)\\s+${i}\\b`),new RegExp(`\\b\\w+\\s+as\\s+${i}\\b`)].some(f=>f.test(u))){r.unshift(a);let f=/from\s*["']\.?\/?([^"']*chunk-[A-Z0-9]+\.js)["']/gi,d;for(;(d=f.exec(u))!==null;){let m=o.path.basename(d[1]??"");m&&!r.includes(m)&&r.push(m)}break}}return r}extractChunksFromProxyFile(t,n){let r=[],s=/import(?:\{[\w\s,]{0,500}\})?\s{0,100}from\s{0,100}["']([\w./-]*chunk-[A-Z0-9]+\.js)["']/gi,i=/import\s{0,100}["']([\w./-]*chunk-[A-Z0-9]+\.js)["']/gi,a;for(;(a=s.exec(t))!==null;){let u=a[1];if(u!==void 0){let l=o.path.basename(u);r.includes(l)||r.push(l)}}for(;(a=i.exec(t))!==null;){let u=a[1];if(u!==void 0){let l=o.path.basename(u);r.includes(l)||r.push(l)}}let c=t.match(/export\s*\{([\w\s,]+)\}/);if(c!==null){let p=c[1]?.match(/(\w+)(?:\s+as\s+\w+)?/)?.[1]??null;if(p!==null){let f=null;for(let[d,m]of n){if(!d.startsWith("chunk-")||!d.endsWith(".js"))continue;let h=new TextDecoder().decode(m.code);if([new RegExp(`export\\s*\\{[^}]*\\b${p}\\b[^}]*\\}`),new RegExp(`export\\s+(?:function|const|let|var|class)\\s+${p}\\b`),new RegExp(`\\b\\w+\\s+as\\s+${p}\\b`)].some(R=>R.test(h))){f=d;break}}if(f!==null){let d=r.indexOf(f);d>0?(r.splice(d,1),r.unshift(f)):d===-1&&r.unshift(f)}}}return r}async computeHash(t){let n=await crypto.subtle.digest("SHA-256",t);return be(new Uint8Array(n)).slice(0,16)}parseImports(t){let n=[],r=/import\s{1,100}[^\n"']{1,500}\s{1,100}from\s{0,100}["']([\w./@-]+)["']/g,s;for(;(s=r.exec(t))!==null;){let a=s[1];if(a!==void 0&&(a.startsWith("./")||a.startsWith("../")||a.startsWith("/"))){let c=a.startsWith("./")?a.slice(2):a.startsWith("../")?a:a.slice(1);n.push(c)}}let i=/import\s*\(\s*["']([^"']+)["']\s*\)/g;for(;(s=i.exec(t))!==null;){let a=s[1];if(a!==void 0&&(a.startsWith("./")||a.startsWith("../")||a.startsWith("/"))){let c=a.startsWith("./")?a.slice(2):a.startsWith("../")?a:a.slice(1);n.push(c)}}return[...new Set(n)]}};function Zn(e,t){let n=Object.keys(t);if(n.length===0)return e;n.sort((a,c)=>c.length-a.length);let r=!1;for(let a of n)if(e.includes(a)){r=!0;break}if(!r)return e;let s=n.map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),i=new RegExp(`\\b(${s.join("|")})\\b`,"g");return e.replace(i,a=>t[a]??a)}var ze=(e={})=>new Se(e);function Qn(e){let t=Object.keys(e).sort((s,i)=>i.length-s.length);if(t.length===0)return{name:"define"};let n=t.map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),r=new RegExp(`\\b(${n.join("|")})\\b`,"g");return{name:"define",transform(s,i){if(i.includes("node_modules"))return null;let a=!1;for(let u of t)if(s.includes(u)){a=!0;break}if(!a)return null;let c=s.replace(r,u=>e[u]??u);return c===s?null:{code:c}}}}var Re=class{name="rolldown";options;rolldownModule=null;constructor(t={}){this.options=t}async bundle(t){try{let n=await this.loadRolldown(),r=this.adaptPlugins(t.plugins);t.define!==void 0&&Object.keys(t.define).length>0&&r.push(Qn(t.define));let s=t.projectRoot!==void 0?[`${t.projectRoot}/node_modules`,"node_modules"]:["node_modules"],i=await n.rolldown({input:t.entrypoints,external:t.external,plugins:r,resolve:{modules:s}}),a=t.sourcemap===!0?!0:t.sourcemap==="inline"?"inline":t.sourcemap==="external"?!0:void 0,c={dir:t.outputDir,format:t.format,entryFileNames:"[name].js",chunkFileNames:"chunk-[hash].js",sourcemap:a,minify:t.minify,...this.options.advancedChunks!==void 0?{advancedChunks:{minSize:this.options.advancedChunks.minSize??2e4,groups:this.options.advancedChunks.groups?.map(l=>({name:l.name,test:l.test,priority:l.priority??0}))}}:{}},u=await i.write(c);return await i.close(),await this.processRolldownOutput(u,t)}catch(n){return Q([{message:n instanceof Error?n.message:String(n),severity:"fatal"}])}}async watch(t,n){let s=await(await this.loadRolldown()).watch({input:t.entrypoints,external:t.external,plugins:this.adaptPlugins(t.plugins),output:{dir:t.outputDir,format:t.format,entryFileNames:"[name].js",chunkFileNames:"chunk-[hash].js",sourcemap:t.sourcemap===!0||t.sourcemap==="external",minify:t.minify}});return s.on("event",async i=>{if(i.code==="BUNDLE_END"){let a=await this.bundle(t);n(a)}else i.code==="ERROR"&&n(Q([{message:i.error?.message??"Watch error",severity:"error"}]))}),{stop:async()=>{await s.close()}}}async loadRolldown(){if(this.rolldownModule!==null)return this.rolldownModule;try{let t=await import("npm:rolldown@latest"),n={rolldown:r=>t.rolldown(r),watch:r=>{let s=t.watch(r);return Promise.resolve(s)}};return this.rolldownModule=n,n}catch(t){throw new Error(`Failed to load Rolldown. Make sure it's installed: ${t instanceof Error?t.message:String(t)}`)}}adaptPlugins(t){return t===void 0||t.length===0?[]:t.map(n=>{let r={name:n.name},s={resolvers:[],loaders:[],transformers:[]},i=n.setup({onResolve:(a,c)=>{s.resolvers.push({options:a,callback:c})},onLoad:(a,c)=>{s.loaders.push({options:a,callback:c})},onTransform:(a,c)=>{s.transformers.push({options:a,callback:c})}});return i instanceof Promise&&(r.buildStart=async function(){await i}),r.resolveId=async(a,c)=>{for(let u of s.resolvers)if(u.options.filter.test(a)){let l=await u.callback({path:a,importer:c??"",namespace:u.options.namespace??"file",kind:"import-statement"});if(l?.path!==void 0||l?.external===!0)return{id:l.path??a,external:l.external}}return null},r.load=async a=>{for(let c of s.loaders)if(c.options.filter.test(a)){let u=await c.callback({path:a,namespace:c.options.namespace??"file"});if(u?.contents!==void 0)return{code:typeof u.contents=="string"?u.contents:new TextDecoder().decode(u.contents)}}return null},r.transform=async(a,c)=>{let u=a;for(let l of s.transformers)if(l.options.filter.test(c)){let p=await l.callback({path:c,code:u});p?.code!==void 0&&(u=p.code)}return u!==a?{code:u}:null},r})}async processRolldownOutput(t,n){let s=`${this.options.entryName??"main"}.js`,i=new Map,a={},c={},u=null,l=0;for(let d of t.output)if(d.type==="chunk"){let m=d.code;n.basePath!==void 0&&(m=m.replace(/\/_lime\/alive/g,`${n.basePath}/_lime/alive`));let h=new TextEncoder().encode(m),y=await this.computeHash(h),C={path:d.fileName,code:h,size:h.length,hash:y,isEntry:d.isEntry,...d.map!==void 0?{map:new TextEncoder().encode(JSON.stringify(d.map))}:{}};if(i.set(d.fileName,C),l+=h.length,d.isEntry&&(d.fileName===s||u===null)&&(u=d.fileName),d.isEntry&&d.facadeModuleId!==void 0){let R=[d.fileName];if(d.imports!==void 0)for(let E of d.imports)R.includes(E)||R.push(E);c[d.facadeModuleId]=R}a[d.fileName]={bytes:h.length,inputs:{},imports:(d.imports??[]).map(R=>({path:R,kind:"import-statement"})),...d.isEntry&&d.facadeModuleId!==void 0?{entryPoint:d.facadeModuleId}:{}}}else if(d.type==="asset"){let m=typeof d.source=="string"?new TextEncoder().encode(d.source):d.source,h=await this.computeHash(m);i.set(d.fileName,{path:d.fileName,code:m,size:m.length,hash:h}),l+=m.length}return Ce(i,{metafile:{inputs:{},outputs:a},entrypointManifest:c,entrypoint:u??s,totalSize:l})}async computeHash(t){let n=await crypto.subtle.digest("SHA-256",t);return be(new Uint8Array(n)).slice(0,16)}},Le=(e={})=>new Re(e);function Pe(e,t){if(typeof e=="object"&&e!==null&&"backend"in e){let r=e;return Pe(r.backend,r.options)}let n=e??"rolldown";switch(n){case"rolldown":return Le(t);case"deno-bundler":return ze(t);default:throw new Error(`Unknown bundler backend: ${n}`)}}var O=S.getLogger(["laroux-bundler","bundler"]);function Yn(e,t){let n={},r=0;for(let[s,i]of e.outputs)n[s]={fileName:s,size:i.size},r+=i.size;return{entrypoint:e.entrypoint??"client.js",outputs:n,manifest:t,totalSize:e.totalSize??r}}function er(e){let t=Object.values(e.outputs);if(t.length===0)return{chunkCount:0,largestChunk:{name:"",size:0},smallestChunk:{name:"",size:0},averageChunkSize:0};let n=t.sort((i,a)=>a.size-i.size),r=n[0],s=n[n.length-1];return{chunkCount:t.length,largestChunk:r?{name:r.fileName,size:r.size}:{name:"",size:0},smallestChunk:s?{name:s.fileName,size:s.size}:{name:"",size:0},averageChunkSize:t.length>0?e.totalSize/t.length:0}}function At(e){let t=er(e);O.debug("\u{1F4CA} Bundle Statistics:",{totalSizeKB:(e.totalSize/1024).toFixed(2),chunkCount:t.chunkCount,largestChunk:{name:t.largestChunk.name,sizeKB:(t.largestChunk.size/1024).toFixed(2)},smallestChunk:{name:t.smallestChunk.name,sizeKB:(t.smallestChunk.size/1024).toFixed(2)},averageChunkSizeKB:(t.averageChunkSize/1024).toFixed(2)})}async function zt(e,t,n){O.info(`\u{1F4E6} Using bundler backend: ${n}`),O.debug(`Bundling with @eser/bundler (${n})...`),O.debug(` Entrypoints: ${e.entrypoints.length}`),O.debug(` Output: ${e.outputDir}`),O.debug(`Creating bundler: ${n}`);let r=Pe(n,{entryName:"client"}),s={};for(let l=0;l<e.entrypoints.length;l++){let p=e.entrypoints[l];if(p!==void 0)if(l===0)s.client=p;else{let f=t.find(d=>d.filePath===p);f!==void 0?s[f.relativePath]=p:s[`entry-${l}`]=p}}let i=e.sourcemap===!0||e.sourcemap==="external"||e.sourcemap==="inline",a={entrypoints:s,outputDir:e.outputDir,projectRoot:e.projectRoot,format:"esm",platform:e.platform==="deno"?"node":"browser",codeSplitting:e.splitting!==!1,minify:e.minify??!1,sourcemap:i,plugins:e.plugins,define:e.define},c=await r.bundle(a);if(!c.success){let l=c.errors?.map(p=>p.message).join(`
80
+ `),i.unshift(p)}let a=t.platform==="browser"?"browser":"deno",c=t.sourcemap===!0?"external":t.sourcemap===!1?void 0:t.sourcemap,u={entrypoints:i,outputDir:n,format:"esm",codeSplitting:t.codeSplitting,minify:t.minify,platform:a,sourcemap:c};t.external!==void 0&&(u.external=t.external),ve.debug("Calling Deno.bundle",{entrypoints:i.slice(0,3),outputDir:n,external:u.external,platform:u.platform});let l=await Deno.bundle(u);if(ve.debug("Deno.bundle result",{success:l.success,errors:l.errors?.length??0}),!l.success){let f=(l.errors??[]).map(d=>({message:d.text??this.extractErrorMessage(d),severity:"error"}));return Q(f)}return await this.processOutput(n,t,s,r)}catch(r){return Q([{message:r instanceof Error?r.message:String(r),severity:"fatal"}])}finally{try{await o.fs.remove(n,{recursive:!0})}catch{}}}watch(t,n){let r=!0,s=Object.values(t.entrypoints).map(u=>o.path.dirname(u)),i=[...new Set(s)],a=Deno.watchFs(i,{recursive:!0});return(async()=>{for await(let u of a){if(!r)break;let l=await this.bundle(t);n(l)}})().catch(u=>{console.error("Watch loop error:",u)}),Promise.resolve({stop:()=>(r=!1,a.close(),Promise.resolve())})}extractErrorMessage(t){return t==null?"Unknown error":typeof t=="object"&&"message"in t?String(t.message):String(t)}async processOutput(t,n,r,s){let i=this.options.entryName??"main",a=new Map,c={},u={},l=null,p=0,f=new Map,d=new Map;for(let b=0;b<s.length;b++){let w=s[b],x=r[b];if(w!==void 0&&x!==void 0){let P=o.path.basename(w).replace(/\.[^.]+$/,"");f.set(P,x),d.set(z(w,".js"),x)}}let m=o.path.join(t,"dist"),h=t;try{(await o.fs.stat(m)).isDirectory&&(h=m)}catch{}let y=[];ve.debug(`Scanning output dir: ${h}`);let C=async(b,w="")=>{for await(let x of o.fs.readDir(b)){let P=o.path.join(b,x.name),F=w?`${w}/${x.name}`:x.name;x.isDirectory?await C(P,F):x.isFile&&(x.name.endsWith(".js")||x.name.endsWith(".map"))&&y.push({name:F,path:P})}};if(await C(h),h!==t){for await(let b of o.fs.readDir(t))if(b.isFile&&(b.name.endsWith(".js")||b.name.endsWith(".map"))&&(b.name.startsWith("chunk-")||b.name.endsWith(".map"))){let w=o.path.join(t,b.name);y.some(x=>x.path===w)||y.push({name:b.name,path:w})}}ve.debug(`Found ${y.length} output files`,y.map(b=>b.name));let R=new Map;for(let b of y)if(b.name.endsWith(".map")){let w=await o.fs.readFile(b.path),x=b.name;b.name.startsWith("_client-entry")?x=`${i}.js.map`:b.name.startsWith("_build-id-entry")&&(x="build-id.js.map"),R.set(x,w)}for(let b of y){if(b.name.endsWith(".map"))continue;let w=await o.fs.readTextFile(b.path);n.basePath!==void 0&&(w=w.replace(/\/_lime\/alive/g,`${n.basePath}/_lime/alive`)),n.define!==void 0&&(w=Zn(w,n.define)),w=w.replace(/from\s{0,5}["']\.\.\/chunk-/g,'from"./chunk-'),w=w.replace(/from\s{0,5}["']\.\.chunk-/g,'from"./chunk-'),w=w.replace(/import\s{0,5}\(["']\.\.\/chunk-/g,'import("./chunk-'),w=w.replace(/import\s{0,5}\(["']\.\.chunk-/g,'import("./chunk-');let x=b.name,P=x.startsWith("_client-entry");if(P)x=`${i}.js`,l=`${i}.js`;else if(x.startsWith("_build-id-entry"))x="build-id.js";else if(!x.startsWith("chunk-")){let j;for(let[ee,Fe]of d)if(ee.endsWith(x)){j=Fe;break}if(j===void 0){let ee=o.path.basename(x).replace(/\.js$/,"");j=f.get(ee)}j!==void 0&&(x=`${j}.js`)}P&&R.has(`${i}.js.map`)&&(w=w.replace(/\/\/# sourceMappingURL=.*$/m,`//# sourceMappingURL=${i}.js.map`),w.includes("//# sourceMappingURL=")||(w+=`
81
+ //# sourceMappingURL=${i}.js.map`));let F=new TextEncoder().encode(w),de=await this.computeHash(F),D=this.parseImports(w),Me=`${x}.map`,Y=R.get(Me);a.set(x,{path:x,code:F,map:Y,size:F.length,hash:de,isEntry:!x.startsWith("chunk-")}),p+=F.length,c[x]={bytes:F.length,inputs:{},imports:D.map(j=>({path:j,kind:"import-statement"}))}}for(let[b,w]of R)if(!a.has(b)){let x=await this.computeHash(w);a.set(b,{path:b,code:w,size:w.length,hash:x,isEntry:!1}),p+=w.length}if(n.outputDir!==void 0){await o.fs.mkdir(n.outputDir,{recursive:!0});for(let[b,w]of a){let x=o.path.join(n.outputDir,b),P=o.path.dirname(x);P!==n.outputDir&&await o.fs.mkdir(P,{recursive:!0}),await o.fs.writeFile(x,w.code)}}for(let[b,w]of Object.entries(n.entrypoints)){if(b==="client"||b==="main")continue;let x=await this.findEntrypointChunks(b,h,t,a);x.length>0&&(u[w]=x)}return Ce(a,{metafile:{inputs:{},outputs:c},entrypointManifest:u,entrypoint:l??"main.js",totalSize:p})}async findEntrypointChunks(t,n,r,s){let i=z(t,".js"),a=o.path.join(n,i),c=null;try{c=await o.fs.readTextFile(a)}catch{try{let u=o.path.join(r,"dist",i);c=await o.fs.readTextFile(u)}catch{}}return c!==null?this.extractChunksFromProxyFile(c,s):this.findChunksForComponentName(t,s)}findChunksForComponentName(t,n){let r=[],s=o.path.basename(t).replace(/\.[^.]+$/,""),i=s.charAt(0).toUpperCase()+s.slice(1).replace(/-([a-z])/g,(a,c)=>c.toUpperCase());for(let[a,c]of n){if(!a.startsWith("chunk-")||!a.endsWith(".js"))continue;let u=new TextDecoder().decode(c.code);if([new RegExp(`export\\s{0,5}\\{[^}]*\\b${i}\\b[^}]*\\}`),new RegExp(`export\\s+(?:function|const|let|var|class)\\s+${i}\\b`),new RegExp(`\\b\\w+\\s+as\\s+${i}\\b`)].some(f=>f.test(u))){r.unshift(a);let f=/from\s{0,5}["']\.?\/?([^"']*chunk-[A-Z0-9]+\.js)["']/gi,d;for(;(d=f.exec(u))!==null;){let m=o.path.basename(d[1]??"");m&&!r.includes(m)&&r.push(m)}break}}return r}extractChunksFromProxyFile(t,n){let r=[],s=/import(?:\{[\w\s,]{0,500}\})?\s{0,100}from\s{0,100}["']([\w./-]*chunk-[A-Z0-9]+\.js)["']/gi,i=/import\s{0,100}["']([\w./-]*chunk-[A-Z0-9]+\.js)["']/gi,a;for(;(a=s.exec(t))!==null;){let u=a[1];if(u!==void 0){let l=o.path.basename(u);r.includes(l)||r.push(l)}}for(;(a=i.exec(t))!==null;){let u=a[1];if(u!==void 0){let l=o.path.basename(u);r.includes(l)||r.push(l)}}let c=t.match(/export\s{0,5}\{([\w\s,]+)\}/);if(c!==null){let p=c[1]?.match(/(\w+)(?:\s+as\s+\w+)?/)?.[1]??null;if(p!==null){let f=null;for(let[d,m]of n){if(!d.startsWith("chunk-")||!d.endsWith(".js"))continue;let h=new TextDecoder().decode(m.code);if([new RegExp(`export\\s{0,5}\\{[^}]*\\b${p}\\b[^}]*\\}`),new RegExp(`export\\s+(?:function|const|let|var|class)\\s+${p}\\b`),new RegExp(`\\b\\w+\\s+as\\s+${p}\\b`)].some(R=>R.test(h))){f=d;break}}if(f!==null){let d=r.indexOf(f);d>0?(r.splice(d,1),r.unshift(f)):d===-1&&r.unshift(f)}}}return r}async computeHash(t){let n=await crypto.subtle.digest("SHA-256",t);return be(new Uint8Array(n)).slice(0,16)}parseImports(t){let n=[],r=/import\s{1,100}[^\n"']{1,500}\s{1,100}from\s{0,100}["']([\w./@-]+)["']/g,s;for(;(s=r.exec(t))!==null;){let a=s[1];if(a!==void 0&&(a.startsWith("./")||a.startsWith("../")||a.startsWith("/"))){let c=a.startsWith("./")?a.slice(2):a.startsWith("../")?a:a.slice(1);n.push(c)}}let i=/import\s{0,5}\(\s{0,5}["']([^"']+)["']\s{0,5}\)/g;for(;(s=i.exec(t))!==null;){let a=s[1];if(a!==void 0&&(a.startsWith("./")||a.startsWith("../")||a.startsWith("/"))){let c=a.startsWith("./")?a.slice(2):a.startsWith("../")?a:a.slice(1);n.push(c)}}return[...new Set(n)]}};function Zn(e,t){let n=Object.keys(t);if(n.length===0)return e;n.sort((a,c)=>c.length-a.length);let r=!1;for(let a of n)if(e.includes(a)){r=!0;break}if(!r)return e;let s=n.map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),i=new RegExp(`\\b(${s.join("|")})\\b`,"g");return e.replace(i,a=>t[a]??a)}var ze=(e={})=>new Se(e);function Qn(e){let t=Object.keys(e).sort((s,i)=>i.length-s.length);if(t.length===0)return{name:"define"};let n=t.map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),r=new RegExp(`\\b(${n.join("|")})\\b`,"g");return{name:"define",transform(s,i){if(i.includes("node_modules"))return null;let a=!1;for(let u of t)if(s.includes(u)){a=!0;break}if(!a)return null;let c=s.replace(r,u=>e[u]??u);return c===s?null:{code:c}}}}var Re=class{name="rolldown";options;rolldownModule=null;constructor(t={}){this.options=t}async bundle(t){try{let n=await this.loadRolldown(),r=this.adaptPlugins(t.plugins);t.define!==void 0&&Object.keys(t.define).length>0&&r.push(Qn(t.define));let s=t.projectRoot!==void 0?[`${t.projectRoot}/node_modules`,"node_modules"]:["node_modules"],i=await n.rolldown({input:t.entrypoints,external:t.external,plugins:r,resolve:{modules:s}}),a=t.sourcemap===!0?!0:t.sourcemap==="inline"?"inline":t.sourcemap==="external"?!0:void 0,c={dir:t.outputDir,format:t.format,entryFileNames:"[name].js",chunkFileNames:"chunk-[hash].js",sourcemap:a,minify:t.minify,...this.options.advancedChunks!==void 0?{advancedChunks:{minSize:this.options.advancedChunks.minSize??2e4,groups:this.options.advancedChunks.groups?.map(l=>({name:l.name,test:l.test,priority:l.priority??0}))}}:{}},u=await i.write(c);return await i.close(),await this.processRolldownOutput(u,t)}catch(n){return Q([{message:n instanceof Error?n.message:String(n),severity:"fatal"}])}}async watch(t,n){let s=await(await this.loadRolldown()).watch({input:t.entrypoints,external:t.external,plugins:this.adaptPlugins(t.plugins),output:{dir:t.outputDir,format:t.format,entryFileNames:"[name].js",chunkFileNames:"chunk-[hash].js",sourcemap:t.sourcemap===!0||t.sourcemap==="external",minify:t.minify}});return s.on("event",async i=>{if(i.code==="BUNDLE_END"){let a=await this.bundle(t);n(a)}else i.code==="ERROR"&&n(Q([{message:i.error?.message??"Watch error",severity:"error"}]))}),{stop:async()=>{await s.close()}}}async loadRolldown(){if(this.rolldownModule!==null)return this.rolldownModule;try{let t=await import("npm:rolldown@latest"),n={rolldown:r=>t.rolldown(r),watch:r=>{let s=t.watch(r);return Promise.resolve(s)}};return this.rolldownModule=n,n}catch(t){throw new Error(`Failed to load Rolldown. Make sure it's installed: ${t instanceof Error?t.message:String(t)}`)}}adaptPlugins(t){return t===void 0||t.length===0?[]:t.map(n=>{let r={name:n.name},s={resolvers:[],loaders:[],transformers:[]},i=n.setup({onResolve:(a,c)=>{s.resolvers.push({options:a,callback:c})},onLoad:(a,c)=>{s.loaders.push({options:a,callback:c})},onTransform:(a,c)=>{s.transformers.push({options:a,callback:c})}});return i instanceof Promise&&(r.buildStart=async function(){await i}),r.resolveId=async(a,c)=>{for(let u of s.resolvers)if(u.options.filter.test(a)){let l=await u.callback({path:a,importer:c??"",namespace:u.options.namespace??"file",kind:"import-statement"});if(l?.path!==void 0||l?.external===!0)return{id:l.path??a,external:l.external}}return null},r.load=async a=>{for(let c of s.loaders)if(c.options.filter.test(a)){let u=await c.callback({path:a,namespace:c.options.namespace??"file"});if(u?.contents!==void 0)return{code:typeof u.contents=="string"?u.contents:new TextDecoder().decode(u.contents)}}return null},r.transform=async(a,c)=>{let u=a;for(let l of s.transformers)if(l.options.filter.test(c)){let p=await l.callback({path:c,code:u});p?.code!==void 0&&(u=p.code)}return u!==a?{code:u}:null},r})}async processRolldownOutput(t,n){let s=`${this.options.entryName??"main"}.js`,i=new Map,a={},c={},u=null,l=0;for(let d of t.output)if(d.type==="chunk"){let m=d.code;n.basePath!==void 0&&(m=m.replace(/\/_lime\/alive/g,`${n.basePath}/_lime/alive`));let h=new TextEncoder().encode(m),y=await this.computeHash(h),C={path:d.fileName,code:h,size:h.length,hash:y,isEntry:d.isEntry,...d.map!==void 0?{map:new TextEncoder().encode(JSON.stringify(d.map))}:{}};if(i.set(d.fileName,C),l+=h.length,d.isEntry&&(d.fileName===s||u===null)&&(u=d.fileName),d.isEntry&&d.facadeModuleId!==void 0){let R=[d.fileName];if(d.imports!==void 0)for(let E of d.imports)R.includes(E)||R.push(E);c[d.facadeModuleId]=R}a[d.fileName]={bytes:h.length,inputs:{},imports:(d.imports??[]).map(R=>({path:R,kind:"import-statement"})),...d.isEntry&&d.facadeModuleId!==void 0?{entryPoint:d.facadeModuleId}:{}}}else if(d.type==="asset"){let m=typeof d.source=="string"?new TextEncoder().encode(d.source):d.source,h=await this.computeHash(m);i.set(d.fileName,{path:d.fileName,code:m,size:m.length,hash:h}),l+=m.length}return Ce(i,{metafile:{inputs:{},outputs:a},entrypointManifest:c,entrypoint:u??s,totalSize:l})}async computeHash(t){let n=await crypto.subtle.digest("SHA-256",t);return be(new Uint8Array(n)).slice(0,16)}},Le=(e={})=>new Re(e);function Pe(e,t){if(typeof e=="object"&&e!==null&&"backend"in e){let r=e;return Pe(r.backend,r.options)}let n=e??"rolldown";switch(n){case"rolldown":return Le(t);case"deno-bundler":return ze(t);default:throw new Error(`Unknown bundler backend: ${n}`)}}var O=S.getLogger(["laroux-bundler","bundler"]);function Yn(e,t){let n={},r=0;for(let[s,i]of e.outputs)n[s]={fileName:s,size:i.size},r+=i.size;return{entrypoint:e.entrypoint??"client.js",outputs:n,manifest:t,totalSize:e.totalSize??r}}function er(e){let t=Object.values(e.outputs);if(t.length===0)return{chunkCount:0,largestChunk:{name:"",size:0},smallestChunk:{name:"",size:0},averageChunkSize:0};let n=t.sort((i,a)=>a.size-i.size),r=n[0],s=n[n.length-1];return{chunkCount:t.length,largestChunk:r?{name:r.fileName,size:r.size}:{name:"",size:0},smallestChunk:s?{name:s.fileName,size:s.size}:{name:"",size:0},averageChunkSize:t.length>0?e.totalSize/t.length:0}}function At(e){let t=er(e);O.debug("\u{1F4CA} Bundle Statistics:",{totalSizeKB:(e.totalSize/1024).toFixed(2),chunkCount:t.chunkCount,largestChunk:{name:t.largestChunk.name,sizeKB:(t.largestChunk.size/1024).toFixed(2)},smallestChunk:{name:t.smallestChunk.name,sizeKB:(t.smallestChunk.size/1024).toFixed(2)},averageChunkSizeKB:(t.averageChunkSize/1024).toFixed(2)})}async function zt(e,t,n){O.info(`\u{1F4E6} Using bundler backend: ${n}`),O.debug(`Bundling with @eser/bundler (${n})...`),O.debug(` Entrypoints: ${e.entrypoints.length}`),O.debug(` Output: ${e.outputDir}`),O.debug(`Creating bundler: ${n}`);let r=Pe(n,{entryName:"client"}),s={};for(let l=0;l<e.entrypoints.length;l++){let p=e.entrypoints[l];if(p!==void 0)if(l===0)s.client=p;else{let f=t.find(d=>d.filePath===p);f!==void 0?s[f.relativePath]=p:s[`entry-${l}`]=p}}let i=e.sourcemap===!0||e.sourcemap==="external"||e.sourcemap==="inline",a={entrypoints:s,outputDir:e.outputDir,projectRoot:e.projectRoot,format:"esm",platform:e.platform==="deno"?"node":"browser",codeSplitting:e.splitting!==!1,minify:e.minify??!1,sourcemap:i,plugins:e.plugins,define:e.define},c=await r.bundle(a);if(!c.success){let l=c.errors?.map(p=>p.message).join(`
82
82
  `)??"Unknown error";throw new Error(`Bundle failed: ${l}`)}let u={};for(let l of t){let p=c.entrypointManifest?.[l.filePath]??[];p.length>0&&(u[l.filePath]=[...p])}return O.debug(` Outputs: ${c.outputs.size} files`),O.debug(` Total size: ${((c.totalSize??0)/1024).toFixed(2)} KB`),Yn(c,u)}async function Lt(e,t){O.info(`\u{1F4E6} Bundling server components with ${t}`),O.debug(` Entrypoints: ${e.entrypoints.length}`),O.debug(` Output: ${e.outputDir}`),O.debug(` Externals: ${e.externals?.length??0}`);let n=Pe(t,{entryName:"server"}),r={};for(let c of e.entrypoints){let u=c.replace(e.projectRoot,"").replace(/^\//,"");u=z(u,""),r[u]=c}let s={entrypoints:r,outputDir:e.outputDir,format:"esm",platform:"node",codeSplitting:!1,minify:e.minify??!1,sourcemap:e.sourcemap??!1,external:e.externals,plugins:e.plugins},i=await n.bundle(s);if(!i.success){let c=i.errors?.map(u=>u.message).join(`
83
83
  `)??"Unknown error";throw new Error(`Server bundle failed: ${c}`)}let a=new Map;for(let[c,u]of i.outputs)if(u.isEntry&&i.entrypointManifest!==void 0){for(let[l,p]of Object.entries(i.entrypointManifest))if(p.includes(c)){a.set(l,c);break}}return O.debug(` Outputs: ${i.outputs.size} files`),O.debug(` Total size: ${((i.totalSize??0)/1024).toFixed(2)} KB`),{outputMap:a,totalSize:i.totalSize??0,fileCount:i.outputs.size}}var $=S.getLogger(["laroux-bundler","chunk-manifest"]),tr="1.0";function Ut(e,t,n,r,s="info",i=!1){$.debug("\u{1F4CB} Generating chunk manifest...");let a={version:tr,buildId:e,timestamp:t,entrypoint:n.entrypoint,logLevel:s,hmrEnabled:i,chunks:{},files:{}};for(let[u,l]of Object.entries(n.outputs))a.files[l.fileName]={name:l.fileName,size:l.size,hash:sr(l.fileName)??void 0};let c=[];for(let u of r){let l=nr(u,n),[p,...f]=l;if(!p){$.warn(`No chunks found for ${u.relativePath}`);continue}let d=[p,...f];for(let y of d)a.files[y]||c.push(`${u.relativePath} references ${y}, but it's not in bundle outputs`);let m=or(u.relativePath);a.chunks[m]={main:Wt(p),deps:f.map(Wt),size:rr(l,a.files)};let h=u.exportNames[0]??"default";h!=="default"&&(a.chunks[m].exportName=h),$.debug(` ${m} \u2192 main: ${p}, deps: [${f.join(", ")}]`)}if(c.length>0){$.error("\u274C Chunk manifest validation failed!"),$.error(" Missing chunks:");for(let u of c)$.error(` - ${u}`);throw $.error(` Available files: ${Object.keys(a.files).join(", ")}`),new Error(`Chunk manifest validation failed: ${c.length} chunk(s) referenced but not found in bundle outputs`)}return $.debug("\u2705 Manifest generated"),$.debug(` Components: ${Object.keys(a.chunks).length}`),$.debug(` Chunks: ${Object.keys(a.files).length}`),$.debug(" Validation: All referenced chunks exist"),a}function nr(e,t){let n=t.manifest[e.filePath];if(!n||n.length===0)throw $.error(`\u274C No chunk mapping found for component: ${e.filePath}`),$.error(` Available mappings: ${Object.keys(t.manifest).join(", ")}`),new Error(`Chunk manifest incomplete: No chunks found for ${e.relativePath}. This indicates the bundler failed to analyze the component's dependencies.`);return n}function rr(e,t){return e.reduce((n,r)=>{let s=t[r];return n+(s?.size??0)},0)}function sr(e){return e.match(/-([a-f0-9]+)\./i)?.[1]??null}function Wt(e){return e.replace(/^chunk-/,"").replace(/\.js$/,"")}function or(e){let t=`${we}/`;return e.startsWith(t)?e.slice(t.length):e}async function _t(e,t){await o.fs.writeTextFile(t,JSON.stringify(e,null,2)),$.debug(`\u{1F4DD} Chunk manifest saved: ${t}`)}function Jt(e){$.debug("\u{1F4E6} Chunk Manifest:",{entrypoint:e.entrypoint,components:Object.keys(e.chunks).length,files:Object.keys(e.files).length,chunks:Object.fromEntries(Object.entries(e.chunks).map(([t,n])=>[t,{main:n.main,deps:n.deps,exportName:n.exportName,sizeKB:(n.size/1024).toFixed(2)}]))})}var ue={minify:!0,sourceMaps:!1,codeSplitting:!0,define:{"process.env.NODE_ENV":'"production"',"process.env.DEBUG":'"false"'}},_s={minify:!1,sourceMaps:!0,codeSplitting:!1,define:{"process.env.NODE_ENV":'"development"',"process.env.DEBUG":'"false"'}};import{transform as ar}from"lightningcss";import{Buffer as Gt}from"node:buffer";function lr(e){if(e===void 0)return{chrome:90<<16,firefox:88<<16,safari:917504};let t={};return e.chrome!==void 0&&(t.chrome=e.chrome),e.firefox!==void 0&&(t.firefox=e.firefox),e.safari!==void 0&&(t.safari=e.safari),e.edge!==void 0&&(t.edge=e.edge),t}function Ht(e){if(e==null)throw new TypeError(`Expected Uint8Array from Lightning CSS, got ${e===null?"null":"undefined"}`);if(Qe("node")&&typeof Gt<"u"&&Gt.isBuffer(e))return e.toString("utf-8");if(e instanceof Uint8Array)return new TextDecoder().decode(e);if(typeof e=="string")return e;throw new TypeError(`Expected Uint8Array from Lightning CSS, got ${typeof e}`)}function Vt(e,t={}){let{filename:n="styles.css",minify:r=!1,targets:s,cssModules:i=!1,unusedSymbols:a=[]}=t,c={filename:n,code:new TextEncoder().encode(e),minify:r,targets:lr(s),cssModules:i,unusedSymbols:[...a]},u=ar(c),l;if(u.exports!==null&&u.exports!==void 0){l={};for(let[p,f]of Object.entries(u.exports))l[p]={name:f.name,composes:f.composes?.map(d=>({name:d.name,from:d.from!==void 0?String(d.from):void 0}))}}return{code:Ht(u.code),map:u.map!=null?Ht(u.map):void 0,exports:l}}function We(e,t,n={}){return Vt(e,{...n,filename:t,cssModules:!0})}async function Ue(e,t={}){let{generateDts:n=!1,minify:r=!0,targets:s,tailwind:i}=t,a=await o.fs.readTextFile(e);if(i!==void 0){let f=await i.compile(a,e);f!==null&&(a=f.code)}let c=o.path.basename(e),u=We(a,c,{minify:r,targets:s,nesting:!0}),l={};if(u.exports!==void 0)for(let[f,d]of Object.entries(u.exports))l[f]=d.name;let p=n?_e(l):void 0;return{code:u.code,exports:l,dts:p}}function _e(e){return`// This file is auto-generated by CSS modules processor
84
84
  declare const styles: {
@@ -1,3 +1,3 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as D}from"./chunk-GTHXGAMQ.js";import{a as j}from"./chunk-3XJLLDR5.js";import{a as O}from"./chunk-P7WCO724.js";import{a as N}from"./chunk-JYNHFD6B.js";import{t as l}from"./chunk-MRCBHVSB.js";import{e as _}from"./chunk-G6NAG2EK.js";var y={DenoJson:"deno.json",DenoJsonc:"deno.jsonc",JsrJson:"jsr.json",JsrJsonc:"jsr.jsonc",PackageJson:"package.json"},k=[y.DenoJson,y.DenoJsonc,y.JsrJson,y.JsrJsonc,y.PackageJson],T=Symbol.for("baseDir"),F={name:{"deno.json":"name","deno.jsonc":"name","jsr.json":"name","jsr.jsonc":"name","package.json":"name"},version:{"deno.json":"version","deno.jsonc":"version","jsr.json":"version","jsr.jsonc":"version","package.json":"version"},description:{"package.json":"description"},license:{"deno.json":"license","deno.jsonc":"license","package.json":"license"},private:{"package.json":"private"},exports:{"deno.json":"exports","deno.jsonc":"exports","jsr.json":"exports","jsr.jsonc":"exports","package.json":"exports"},workspaces:{"deno.json":"workspace","deno.jsonc":"workspace","package.json":"workspaces"},imports:{"deno.json":"imports","deno.jsonc":"imports"},dependencies:{"package.json":"dependencies"},devDependencies:{"package.json":"devDependencies"}};var M=_(N(),1);var d={Unknown:0,EnvironmentFile:1,Json:2,JsonWithComments:3,Toml:4,Yaml:5};var S={[d.Unknown]:"unknown",[d.EnvironmentFile]:"environment",[d.Json]:"JSON",[d.JsonWithComments]:"JSONC",[d.Toml]:"TOML",[d.Yaml]:"YAML"},h=class extends Error{filepath;format;constructor(n,t,r){super(`Failed to parse ${S[t]??"unknown"} file "${n}": ${r.message}`,{cause:r}),this.name="ConfigParseError",this.filepath=n,this.format=t}};var A=e=>{let n=l.path.extname(e);return n===".json"?d.Json:n===".jsonc"?d.JsonWithComments:n===".yaml"||n===".yml"?d.Yaml:n===".toml"?d.Toml:n===".env"?d.EnvironmentFile:d.Unknown},x=async(e,n)=>{let t=n??A(e),r=await l.fs.readTextFile(e);try{return t===d.Json?{content:JSON.parse(r),filepath:e,format:t}:t===d.JsonWithComments?{content:j(r),filepath:e,format:t}:t===d.Yaml?{content:M.parse(r),filepath:e,format:t}:t===d.Toml?{content:O(r),filepath:e,format:t}:{content:void 0,filepath:e,format:d.Unknown}}catch(i){throw i instanceof Error?new h(e,t,i):new h(e,t,new Error(String(i)))}};var L=(e,n,t)=>{if(e==null)return t;let r=n.length;if(r===0)return e;let i=e;for(let o=0;o<r;o++){if(i==null)return t;let a=n[o];i=i[a]}return i===void 0?t:i};var m=class extends Error{filepath;constructor(n,t,r){super(n,{cause:r}),this.name="PackageLoadError",this.filepath=t}},$=async(e,n)=>{if(await l.fs.exists(e)===!1||(await l.fs.stat(e)).isFile===!1)return;let i=await l.fs.readTextFile(e),a=(await x(e)).content;if(a!==void 0)return{filepath:e,fileType:n,content:a,rawText:i}},Y=async(e,n)=>{let t=[];for(let r of n){let i=l.path.join(e,r),o=await $(i,r);o&&t.push(o)}return t},B=(e,n)=>L(e,n.split(".")),u=(e,n,t)=>{let r,i,o=[];for(let a of n){let p=t[e]?.[a.fileType];if(p===void 0)continue;let s=B(a.content,p);if(s===void 0)continue;let c={filepath:a.filepath,fileType:a.fileType,propertyPath:p};r===void 0?(r=s,i=c):o.push(c)}if(!(r===void 0||i===void 0))return{value:r,origin:i,alternateOrigins:o}},G=e=>e===void 0?F:D(F,e),K=e=>[...e].sort((n,t)=>k.indexOf(n)-k.indexOf(t)),P=async(e={})=>{let{baseDir:n=".",includeFiles:t=k,fieldMappings:r,searchParents:i=!1}=e,o=G(r),a=K(t),p=l.path.resolve(n),s=[];for(;s=await Y(p,a),!(s.length>0||!i);){let g=l.path.dirname(p);if(g===p)break;p=g}if(s.length===0)throw new m(`No config files found in ${n}. Looked for: ${a.join(", ")}`);return{name:u("name",s,o),version:u("version",s,o),description:u("description",s,o),license:u("license",s,o),private:u("private",s,o),exports:u("exports",s,o),workspaces:u("workspaces",s,o),imports:u("imports",s,o),dependencies:u("dependencies",s,o),devDependencies:u("devDependencies",s,o),[T]:p,_loadedFiles:s}},v=async(e={})=>{try{return await P(e)}catch(n){if(n instanceof m)return;throw n}},R=(e,n)=>{let t=e[n];if(!t)return[];let r=new Set([t.origin.filepath,...t.alternateOrigins.map(i=>i.filepath)]);return e._loadedFiles.filter(i=>r.has(i.filepath))},E=e=>e[T];var V=(e,n)=>{let t=n.split("."),r=e;for(let i of t){if(r==null||typeof r!="object")return;r=r[i]}return r},J=e=>e!=="__proto__"&&e!=="constructor"&&e!=="prototype",q=(e,n,t)=>{let r=n.split("."),i=e;for(let a=0;a<r.length-1;a++){let p=r[a];p===void 0||!J(p)||((!(p in i)||typeof i[p]!="object"||i[p]===null)&&(i[p]={}),i=i[p])}let o=r[r.length-1];o!==void 0&&J(o)&&(i[o]=t)},H=e=>`${JSON.stringify(e,null,2)}
3
- `,z=async(e,n)=>{let t=JSON.parse(JSON.stringify(e.content));for(let[i,o]of Object.entries(n))q(t,i,o);let r=H(t);await l.fs.writeTextFile(e.filepath,r),e.content=t,e.rawText=r},Q=(e,n,t)=>{let{targetFiles:r="all",createIfMissing:i=!1}=t,o=e[n];if(r==="origin"){if(o===void 0){let s=e._loadedFiles[0];return i&&s!==void 0?[s]:[]}let p=e._loadedFiles.find(s=>s.filepath===o.origin.filepath);return p?[p]:[]}if(r==="all")return!o&&!i?[]:!o&&i?[...e._loadedFiles]:R(e,n);let a=new Set(r);return e._loadedFiles.filter(p=>a.has(p.fileType))},b=async(e,n,t,r={})=>{let i=[],o=[],a=[],p=Q(e,n,r);if(p.length===0)return{updated:i,failed:o,skipped:a};for(let s of p){let c=F[n]?.[s.fileType];if(!c){a.push(s.filepath);continue}if(V(s.content,c)===t){a.push(s.filepath);continue}try{await z(s,{[c]:t}),i.push(s.filepath)}catch(f){o.push({filepath:s.filepath,reason:f instanceof Error?f.message:String(f)})}}if(i.length>0){let s=e[n];if(s)s.value=t;else{let c=e._loadedFiles.find(g=>i.includes(g.filepath));if(c){let g=F[n]?.[c.fileType];g&&(e[n]={value:t,origin:{filepath:c.filepath,fileType:c.fileType,propertyPath:g},alternateOrigins:[]})}}}return{updated:i,failed:o,skipped:a}};var X=async(e,n,t)=>await b(e,"version",n,{...t,targetFiles:"all"});var w=class extends Error{constructor(n){super(n),this.name="WorkspaceError"}},U=async e=>{try{return await P({baseDir:e})}catch(n){throw n instanceof m?new w(`No package config file found in ${l.path.resolve(e)}`):n}},Z=async(e,n)=>{let t=[];for(let r of n)if(r.endsWith("/*")){let i=l.path.join(e,r.slice(0,-2));try{for await(let o of l.fs.readDir(i))o.isDirectory&&t.push(l.path.join(i,o.name))}catch{}}else if(r.includes("*")||r.includes("?")){let i=r.split("/"),o=[],a=0;for(let f=0;f<i.length;f++){if(i[f].includes("*")||i[f].includes("?")){a=f;break}o.push(i[f])}let p=l.path.join(e,...o),c=i.slice(a).join("/").replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,".*").replace(/\*/g,"[^/]*").replace(/\?/g,"[^/]"),g=new RegExp(`^${c}$`);try{for await(let f of l.fs.walk(p,{includeDirs:!0,includeFiles:!1})){let C=l.path.relative(p,f.path);C!==""&&g.test(C)&&t.push(f.path)}}catch{}}else t.push(l.path.join(e,r));return t},ee=async e=>{let n=await U(e),t=n.workspaces?.value;if(!Array.isArray(t))throw new w("Package config doesn't have workspace field.");for(let o of t)if(typeof o!="string")throw new w("Package config workspace field should be an array of strings.");let r=await Z(e,t),i=[];for(let o of r){let a=await v({baseDir:o});if(a===void 0)continue;let p=a.name?.value,s=a.version?.value,c=a.private?.value;p!==void 0&&c!==!0&&i.push({name:p,version:s??"0.0.0",config:a})}return[n,i]};export{y as a,P as b,v as c,E as d,X as e,ee as f};
2
+ import{a as D}from"./chunk-GTHXGAMQ.js";import{a as j}from"./chunk-3XJLLDR5.js";import{a as O}from"./chunk-P7WCO724.js";import{a as N}from"./chunk-JYNHFD6B.js";import{t as p}from"./chunk-MRCBHVSB.js";import{e as _}from"./chunk-G6NAG2EK.js";var y={DenoJson:"deno.json",DenoJsonc:"deno.jsonc",JsrJson:"jsr.json",JsrJsonc:"jsr.jsonc",PackageJson:"package.json"},k=[y.DenoJson,y.DenoJsonc,y.JsrJson,y.JsrJsonc,y.PackageJson],T=Symbol.for("baseDir"),F={name:{"deno.json":"name","deno.jsonc":"name","jsr.json":"name","jsr.jsonc":"name","package.json":"name"},version:{"deno.json":"version","deno.jsonc":"version","jsr.json":"version","jsr.jsonc":"version","package.json":"version"},description:{"package.json":"description"},license:{"deno.json":"license","deno.jsonc":"license","package.json":"license"},private:{"package.json":"private"},exports:{"deno.json":"exports","deno.jsonc":"exports","jsr.json":"exports","jsr.jsonc":"exports","package.json":"exports"},workspaces:{"deno.json":"workspace","deno.jsonc":"workspace","package.json":"workspaces"},imports:{"deno.json":"imports","deno.jsonc":"imports"},dependencies:{"package.json":"dependencies"},devDependencies:{"package.json":"devDependencies"}};var M=_(N(),1);var d={Unknown:0,EnvironmentFile:1,Json:2,JsonWithComments:3,Toml:4,Yaml:5};var S={[d.Unknown]:"unknown",[d.EnvironmentFile]:"environment",[d.Json]:"JSON",[d.JsonWithComments]:"JSONC",[d.Toml]:"TOML",[d.Yaml]:"YAML"},h=class extends Error{filepath;format;constructor(n,t,r){super(`Failed to parse ${S[t]??"unknown"} file "${n}": ${r.message}`,{cause:r}),this.name="ConfigParseError",this.filepath=n,this.format=t}};var A=e=>{let n=p.path.extname(e);return n===".json"?d.Json:n===".jsonc"?d.JsonWithComments:n===".yaml"||n===".yml"?d.Yaml:n===".toml"?d.Toml:n===".env"?d.EnvironmentFile:d.Unknown},x=async(e,n)=>{let t=n??A(e),r=await p.fs.readTextFile(e);try{return t===d.Json?{content:JSON.parse(r),filepath:e,format:t}:t===d.JsonWithComments?{content:j(r),filepath:e,format:t}:t===d.Yaml?{content:M.parse(r),filepath:e,format:t}:t===d.Toml?{content:O(r),filepath:e,format:t}:{content:void 0,filepath:e,format:d.Unknown}}catch(i){throw i instanceof Error?new h(e,t,i):new h(e,t,new Error(String(i)))}};var E=(e,n,t)=>{if(e==null)return t;let r=n.length;if(r===0)return e;let i=e;for(let o=0;o<r;o++){if(i==null)return t;let a=n[o];i=i[a]}return i===void 0?t:i};var m=class extends Error{filepath;constructor(n,t,r){super(n,{cause:r}),this.name="PackageLoadError",this.filepath=t}},$=async(e,n)=>{if(await p.fs.exists(e)===!1||(await p.fs.stat(e)).isFile===!1)return;let i=await p.fs.readTextFile(e),a=(await x(e)).content;if(a!==void 0)return{filepath:e,fileType:n,content:a,rawText:i}},Y=async(e,n)=>{let t=[];for(let r of n){let i=p.path.join(e,r),o=await $(i,r);o&&t.push(o)}return t},B=(e,n)=>E(e,n.split(".")),u=(e,n,t)=>{let r,i,o=[];for(let a of n){let l=t[e]?.[a.fileType];if(l===void 0)continue;let s=B(a.content,l);if(s===void 0)continue;let c={filepath:a.filepath,fileType:a.fileType,propertyPath:l};r===void 0?(r=s,i=c):o.push(c)}if(!(r===void 0||i===void 0))return{value:r,origin:i,alternateOrigins:o}},G=e=>e===void 0?F:D(F,e),K=e=>[...e].sort((n,t)=>k.indexOf(n)-k.indexOf(t)),P=async(e={})=>{let{baseDir:n=".",includeFiles:t=k,fieldMappings:r,searchParents:i=!1}=e,o=G(r),a=K(t),l=p.path.resolve(n),s=[];for(;s=await Y(l,a),!(s.length>0||!i);){let g=p.path.dirname(l);if(g===l)break;l=g}if(s.length===0)throw new m(`No config files found in ${n}. Looked for: ${a.join(", ")}`);return{name:u("name",s,o),version:u("version",s,o),description:u("description",s,o),license:u("license",s,o),private:u("private",s,o),exports:u("exports",s,o),workspaces:u("workspaces",s,o),imports:u("imports",s,o),dependencies:u("dependencies",s,o),devDependencies:u("devDependencies",s,o),[T]:l,_loadedFiles:s}},v=async(e={})=>{try{return await P(e)}catch(n){if(n instanceof m)return;throw n}},R=(e,n)=>{let t=e[n];if(!t)return[];let r=new Set([t.origin.filepath,...t.alternateOrigins.map(i=>i.filepath)]);return e._loadedFiles.filter(i=>r.has(i.filepath))},L=e=>e[T];var V=(e,n)=>{let t=n.split("."),r=e;for(let i of t){if(r==null||typeof r!="object")return;r=r[i]}return r},b=new Set(["__proto__","constructor","prototype"]),q=(e,n,t)=>{let r=n.split("."),i=e;for(let a=0;a<r.length-1;a++){let l=r[a];if(l===void 0||b.has(l))return;if(!Object.hasOwn(i,l)||typeof i[l]!="object"||i[l]===null){let s=Object.create(null);i[l]=s}i=i[l]}let o=r[r.length-1];o!==void 0&&!b.has(o)&&(i[o]=t)},H=e=>`${JSON.stringify(e,null,2)}
3
+ `,z=async(e,n)=>{let t=JSON.parse(JSON.stringify(e.content));for(let[i,o]of Object.entries(n))q(t,i,o);let r=H(t);await p.fs.writeTextFile(e.filepath,r),e.content=t,e.rawText=r},Q=(e,n,t)=>{let{targetFiles:r="all",createIfMissing:i=!1}=t,o=e[n];if(r==="origin"){if(o===void 0){let s=e._loadedFiles[0];return i&&s!==void 0?[s]:[]}let l=e._loadedFiles.find(s=>s.filepath===o.origin.filepath);return l?[l]:[]}if(r==="all")return!o&&!i?[]:!o&&i?[...e._loadedFiles]:R(e,n);let a=new Set(r);return e._loadedFiles.filter(l=>a.has(l.fileType))},J=async(e,n,t,r={})=>{let i=[],o=[],a=[],l=Q(e,n,r);if(l.length===0)return{updated:i,failed:o,skipped:a};for(let s of l){let c=F[n]?.[s.fileType];if(!c){a.push(s.filepath);continue}if(V(s.content,c)===t){a.push(s.filepath);continue}try{await z(s,{[c]:t}),i.push(s.filepath)}catch(f){o.push({filepath:s.filepath,reason:f instanceof Error?f.message:String(f)})}}if(i.length>0){let s=e[n];if(s)s.value=t;else{let c=e._loadedFiles.find(g=>i.includes(g.filepath));if(c){let g=F[n]?.[c.fileType];g&&(e[n]={value:t,origin:{filepath:c.filepath,fileType:c.fileType,propertyPath:g},alternateOrigins:[]})}}}return{updated:i,failed:o,skipped:a}};var X=async(e,n,t)=>await J(e,"version",n,{...t,targetFiles:"all"});var w=class extends Error{constructor(n){super(n),this.name="WorkspaceError"}},U=async e=>{try{return await P({baseDir:e})}catch(n){throw n instanceof m?new w(`No package config file found in ${p.path.resolve(e)}`):n}},Z=async(e,n)=>{let t=[];for(let r of n)if(r.endsWith("/*")){let i=p.path.join(e,r.slice(0,-2));try{for await(let o of p.fs.readDir(i))o.isDirectory&&t.push(p.path.join(i,o.name))}catch{}}else if(r.includes("*")||r.includes("?")){let i=r.split("/"),o=[],a=0;for(let f=0;f<i.length;f++){if(i[f].includes("*")||i[f].includes("?")){a=f;break}o.push(i[f])}let l=p.path.join(e,...o),c=i.slice(a).join("/").replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,".*").replace(/\*/g,"[^/]*").replace(/\?/g,"[^/]"),g=new RegExp(`^${c}$`);try{for await(let f of p.fs.walk(l,{includeDirs:!0,includeFiles:!1})){let C=p.path.relative(l,f.path);C!==""&&g.test(C)&&t.push(f.path)}}catch{}}else t.push(p.path.join(e,r));return t},ee=async e=>{let n=await U(e),t=n.workspaces?.value;if(!Array.isArray(t))throw new w("Package config doesn't have workspace field.");for(let o of t)if(typeof o!="string")throw new w("Package config workspace field should be an array of strings.");let r=await Z(e,t),i=[];for(let o of r){let a=await v({baseDir:o});if(a===void 0)continue;let l=a.name?.value,s=a.version?.value,c=a.private?.value;l!==void 0&&c!==!0&&i.push({name:l,version:s??"0.0.0",config:a})}return[n,i]};export{y as a,P as b,v as c,L as d,X as e,ee as f};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{b as P,d as S}from"./chunk-4GQY3STW.js";import{c as k,d as C}from"./chunk-N4HITOTN.js";import{a as O}from"./chunk-LNNNLUZT.js";var I=null,n=e=>O(e,I),T="NEVER run git write commands (commit, add, push, checkout, stash, reset, merge, rebase, cherry-pick). Git is read-only for agents. The user controls git. You may read: git log, git diff, git status, git show, git blame.",$=(e,o,r,i)=>{let l=e.execution.iteration>=o,s=r?[]:[T],u=i?.outOfScope??[];switch(e.phase){case"IDLE":return{rules:[...s,"Present options to the user using your native interactive question tool (AskUserQuestionTool or equivalent). Do NOT list them as a text table or numbered list.","If no interactive question tool is available, fall back to a concise numbered list.","Do not take action without the user choosing an option first."],tone:"Welcoming. Present choices, then wait."};case"DISCOVERY":return{rules:[...s,"Ask the question exactly as written. Do not rephrase or add your own questions.","Relay the user's answer back verbatim. Do not interpret or summarize.","Do not start coding or exploring the codebase. Discovery is conversation only."],tone:"Conversational. You are a messenger between noskills and the user."};case"SPEC_DRAFT":return{rules:[...s,"Present the spec to the user for review. Do not modify it.","If the user requests changes, relay them \u2014 do not implement them.","Do not start coding. The spec must be approved first."],tone:"Brief. The user is reviewing, not discussing."};case"SPEC_APPROVED":return{rules:[...s,"The spec is approved but execution has not started.","Do not start coding until the user triggers execution.","If the user wants changes, they must reset and re-spec."],tone:"Patient. Wait for the go signal."};case"EXECUTING":{let a=[...s,"Do not explore the codebase beyond what the current task requires.","Do not refactor, improve, or modify code outside this task's scope.","Do not add features, tests, or documentation not specified in the spec.","If you need to read files to understand context, timebox it \u2014 then write code.","The deliverable is working code, not a plan or analysis.","Complete the task, then report progress. The user handles git.",`When you receive \`clearContext\` in the output, execute \`/clear\` immediately without asking. After clearing, read \`CLAUDE.md\` and run \`${n("next")}\`.`,`When you discover a pattern, receive a correction, or identify a recurring preference from the user, ask: 'Should this be a permanent rule for this project, or just for this task?' If permanent, run: \`${n('rule add "<description>"')}\`. If just this task, note it and move on. Never write to \`.eser/rules/\` directly.`];e.execution.lastVerification?.passed===!1&&a.push("Tests are failing. Fix ONLY the failing tests. Do not refactor passing code.");let t={rules:a,tone:"Direct. No preamble. Start coding immediately.",outOfScope:u.length>0?u:void 0};return l?{...t,urgency:`You have been in this session for ${e.execution.iteration}+ iterations. Your context is degrading. Finish the current task and recommend the user start a fresh session. Do not start new tasks.`}:t}case"BLOCKED":return{rules:[...s,"Present the decision to the user exactly as described.","Do not suggest a preferred option unless the user asks for your opinion.","After the user decides, relay the answer immediately. Do not elaborate."],tone:"Brief. The user is making a decision, not having a discussion."};case"DONE":return{rules:[...s,"Report the completion summary. Do not start new work.","If the user wants to continue, they start a new spec."],tone:"Concise. Celebrate briefly, then stop."};default:return{rules:[...s,`Run \`${n("next")}\` to get your instructions.`,"Do not take action without noskills guidance."],tone:"Neutral. Waiting for direction."}}},N=5*60*1e3,B=(e,o)=>{let r;switch(e.phase){case"IDLE":r=`No active spec. Start one with: \`${n("spec new")}\``;break;case"DISCOVERY":r=`Discovery in progress for "${e.spec}". ${e.discovery.answers.length} questions answered so far.`;break;case"SPEC_DRAFT":r=`Spec draft ready for review at ${e.specState.path}. Waiting for approval.`;break;case"SPEC_APPROVED":r=`Spec "${e.spec}" is approved. Waiting to start execution.`;break;case"EXECUTING":r=e.execution.lastProgress!==null?`Executing "${e.spec}", iteration ${e.execution.iteration}. Last progress: ${e.execution.lastProgress}. Continue with the current task.`:`Executing "${e.spec}", iteration ${e.execution.iteration}. Start the first task.`;break;case"BLOCKED":r=`Execution blocked: ${e.execution.lastProgress}. Ask the user to resolve.`;break;case"DONE":r=`Spec "${e.spec}" completed in ${e.execution.iteration} iterations.`;break;default:r=`Run \`${n("next")}\` to get started.`}return{protocol:`Run \`${n('next --answer="..."')}\` to submit results and advance`,spec:e.spec,branch:e.branch,iteration:e.execution.iteration,lastProgress:e.execution.lastProgress,activeConcerns:o.map(i=>i.id),resumeHint:r}},F=e=>{if(e.lastCalledAt===null)return{what:"noskills orchestrates your work: IDLE \u2192 DISCOVERY \u2192 SPEC_DRAFT \u2192 SPEC_APPROVED \u2192 EXECUTING \u2192 DONE",how:`Run \`${n("next")}\` for instructions. Submit results with \`${n('next --answer="..."')}\`. Never make architectural decisions without asking.`,currentPhase:e.phase};let o=new Date(e.lastCalledAt).getTime();if(Date.now()-o>N)return{what:"noskills orchestrates your work: IDLE \u2192 DISCOVERY \u2192 SPEC_DRAFT \u2192 SPEC_APPROVED \u2192 EXECUTING \u2192 DONE",how:`Run \`${n("next")}\` for instructions. Submit results with \`${n('next --answer="..."')}\`. Never make architectural decisions without asking.`,currentPhase:e.phase}},Q=(e,o,r,i,l,s)=>{I=i??null;let u=B(e,o),a=i?.maxIterationsBeforeRestart??15,t=i?.allowGit??!1,h=$(e,a,t,l),f=F(e),d;switch(e.phase){case"IDLE":d=R(o);break;case"DISCOVERY":d=q(e,o,r);break;case"SPEC_DRAFT":d=L(e);break;case"SPEC_APPROVED":d=_(e);break;case"EXECUTING":d=G(e,o,r,a,l,s);break;case"BLOCKED":d=Y(e);break;case"DONE":d=j(e);break;default:d=R(o)}let m={...d,meta:u,behavioral:h};return f!==void 0&&(m={...m,protocolGuide:f}),e.pendingClear&&(m={...m,clearContext:{action:"clear_context",reason:`Task complete. Run \`/clear\` now. After clearing, read \`CLAUDE.md\` and run \`${n("next")}\` to continue.`},instruction:`Task accepted. Run \`/clear\` immediately to start fresh for the next task. After clearing, run \`${n("next")}\`.`}),m},R=e=>({phase:"IDLE",instruction:"Present the following options to the user using your interactive question tool. Do NOT list them as a text table.",interactiveOptions:[{label:"Start a new feature spec",command:n('spec new "description"')},{label:"Add project concerns",command:n("concern add <id>")},{label:"Add a coding convention",command:n('rule add "rule"')},{label:"Check project status",command:n("status")}],hint:e.length===0?"No concerns active. Consider adding concerns first \u2014 they shape discovery questions and specs.":void 0}),q=(e,o,r)=>{let i=P(o),l=e.discovery.answers.length;if(S(e.discovery.answers))return{phase:"DISCOVERY",instruction:`All discovery questions answered. Run: \`${n("approve")}\``,questions:[],answeredCount:l,context:{rules:r,concernReminders:[]},transition:{onComplete:n("approve")}};let u=new Set(e.discovery.answers.map(t=>t.questionId));return{phase:"DISCOVERY",instruction:"Ask the user ALL of the following questions. Collect answers for each, then submit them all at once as a JSON object.",questions:i.filter(t=>!u.has(t.id)).map(t=>({id:t.id,text:t.text,concerns:[...t.concerns],extras:t.extras.map(h=>h.text)})),answeredCount:l,context:{rules:r,concernReminders:k(o)},transition:{onComplete:`${n(`next --answer='{"status_quo":"...","ambition":"...",...}'`)}`}}},L=e=>e.classification===null?{phase:"SPEC_DRAFT",instruction:"Before generating the spec, classify what this spec involves. Ask the user to select all that apply.",specPath:e.specState.path??"",transition:{onApprove:`${n(`next --answer='{"involvesUI":false,"involvesPublicAPI":false,"involvesMigration":false,"involvesDataHandling":false}'`)}`},classificationRequired:!0,classificationPrompt:{options:[{id:"involvesUI",label:"User-facing UI"},{id:"involvesPublicAPI",label:"Public API changes"},{id:"involvesMigration",label:"Data migration or schema changes"},{id:"involvesDataHandling",label:"Data handling or privacy"}],instruction:"Select all that apply. Submit as JSON: `"+n(`next --answer='{"involvesUI":true,"involvesPublicAPI":false,...}'`)+"`"}}:{phase:"SPEC_DRAFT",instruction:"Spec draft is ready for review. Ask the user to review and approve.",specPath:e.specState.path??"",transition:{onApprove:n("approve")}},_=e=>({phase:"SPEC_APPROVED",instruction:"Spec is approved and ready. When the user is ready to start, begin execution.",specPath:e.specState.path??"",transition:{onStart:`${n('next --answer="start"')}`}}),U=(e,o)=>{if(o===null)return!1;switch(e){case"beautiful-product":return o.involvesUI;case"open-source":return o.involvesPublicAPI;case"long-lived":return o.involvesMigration;case"compliance":return o.involvesDataHandling;default:return!0}},V=(e,o,r,i,l,s,u)=>{let a=[];if(i!==null)for(let t of i.items)a.push(`[DEBT from iteration ${i.fromIteration}] ${t}`);if(o&&a.push(`[FAILED] Tests \u2014 fix this first: ${r.slice(0,200)}`),s!=null)for(let t of s.verification)a.push(t);for(let t of e)if(U(t.id,l)&&t.acceptanceCriteria!==void 0&&t.acceptanceCriteria.length>0)for(let h of t.acceptanceCriteria)a.push(`(${t.id}) ${h}`);if(u!==void 0)for(let t of u)a.push(`(folder: ${t.folder}) ${t.rule}`);return a},G=(e,o,r,i,l,s)=>{let u=C(o),a=e.execution.iteration>=i,t=e.execution.lastVerification?.passed===!1,h=e.execution.lastVerification?.output??"",f=l?.tasks??[],d=e.execution.completedTasks??[],m=new Set(d),D=f.find(p=>!m.has(p.id))??null,y=D!==null?{id:D.id,title:D.title,totalTasks:f.length,completedTasks:d.length}:void 0;if(e.execution.awaitingStatusReport){let p=V(o,t,h,e.execution.debt,e.classification,l,s),b={phase:"EXECUTING",instruction:"Before this task is accepted, report your completion status against these acceptance criteria.",context:{rules:r,concernReminders:k(o)},transition:{onComplete:`${n(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`)}`,onBlocked:`${n('block "reason"')}`,iteration:e.execution.iteration},statusReportRequired:!0,statusReport:{criteria:p,reportFormat:{completed:"list items you finished with evidence (file exists, test passes)",remaining:"list items not yet done",blocked:"list items that need a decision from the user"}}};return t&&(b={...b,verificationFailed:!0,verificationOutput:h.slice(0,2e3)}),b}let w=(e.execution.lastProgress??"").includes("Task not accepted"),x=e.execution.debt?.items??[],E=e.execution.debt?.unaddressedIterations??0,A=y!==void 0?`Execute task ${y.id}: ${y.title} (${y.completedTasks}/${y.totalTasks} completed)`:"All tasks completed. Run `"+n("done")+"` to finish.",v;if(t)v="Verification FAILED. Fix the failing tests before continuing.";else if(w&&x.length>0){let p=E>=3?` These items have been outstanding for ${E} iterations.`:"";v=`Task not accepted \u2014 ${x.length} remaining item(s) must be addressed before this task can be completed.${p} Address them, then submit a new status report.`}else v=A;let c={phase:"EXECUTING",instruction:v,task:y,context:{rules:r,concernReminders:k(o)},transition:{onComplete:`${n('next --answer="..."')}`,onBlocked:`${n('block "reason"')}`,iteration:e.execution.iteration}};if(w&&x.length>0&&(c={...c,taskRejected:!0,rejectionReason:`${x.length} remaining item(s) must be addressed.`,rejectionRemaining:x}),e.execution.debt!==null&&e.execution.debt.items.length>0){let p=e.execution.debt.unaddressedIterations??0,b=p>=3?`URGENT: These items have been unaddressed for ${p} iterations. Address them IMMEDIATELY before any new work.`:"These were not completed in a previous iteration. Address them BEFORE starting new work.";c={...c,previousIterationDebt:{fromIteration:e.execution.debt.fromIteration,items:e.execution.debt.items,note:b}}}if(t){let p=h.slice(0,2e3);c={...c,verificationFailed:!0,verificationOutput:p}}u.length>0&&(c={...c,concernTensions:u}),a&&(c={...c,restartRecommended:!0,restartInstruction:`Context may be getting large after ${e.execution.iteration} iterations. Consider starting a new conversation and running \`${n("next")}\` to resume - your progress is saved.`});let g=[...e.decisions].reverse().find(p=>!p.promoted);return g!==void 0&&e.execution.lastProgress?.startsWith("Resolved:")&&(c={...c,promotePrompt:{decisionId:g.id,question:g.question,choice:g.choice,prompt:`You just resolved a decision: "${g.choice}". Ask the user: "Should this be a permanent rule for future specs too?" If yes, run: \`${n(`rule add "${g.choice}"`)}\``}}),c},Y=e=>({phase:"BLOCKED",instruction:"A decision is needed. Ask the user.",reason:e.execution.lastProgress??"Unknown",transition:{onResolved:`${n('next --answer="..."')}`}}),j=e=>({phase:"DONE",summary:{spec:e.spec,iterations:e.execution.iteration,decisionsCount:e.decisions.length}});export{Q as a};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- var r={name:"@eser/cli",version:"4.1.33",type:"module",exports:"./main.ts",bin:{eser:"./bin.ts"},dependencies:{"@eser/ai":"workspace:*","@eser/codebase":"workspace:*","@eser/kit":"workspace:*","@eser/noskills":"workspace:*","@eser/laroux-server":"workspace:*","@eser/workflows":"workspace:*","@eser/functions":"workspace:*","@eser/logging":"workspace:*","@eser/shell":"workspace:*","@eser/standards":"workspace:*","@std/cli":"npm:@jsr/std__cli@^1.0.25","@std/fmt":"npm:@jsr/std__fmt@^1.0.8"},devDependencies:{"@std/assert":"npm:@jsr/std__assert@^1.0.16",esbuild:"^0.27.3"}};export{r as a};
2
+ var r={name:"@eser/cli",version:"4.1.35",type:"module",exports:"./main.ts",bin:{eser:"./bin.ts"},dependencies:{"@eser/ai":"workspace:*","@eser/codebase":"workspace:*","@eser/kit":"workspace:*","@eser/noskills":"workspace:*","@eser/laroux-server":"workspace:*","@eser/workflows":"workspace:*","@eser/functions":"workspace:*","@eser/logging":"workspace:*","@eser/shell":"workspace:*","@eser/standards":"workspace:*","@std/cli":"npm:@jsr/std__cli@^1.0.25","@std/fmt":"npm:@jsr/std__fmt@^1.0.8"},devDependencies:{"@std/assert":"npm:@jsr/std__assert@^1.0.16",esbuild:"^0.27.3"}};export{r as a};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as b,b as w,d as F,f as D}from"./chunk-4SYC4WJV.js";import{a as C}from"./chunk-2VEVVX6U.js";import{a as h}from"./chunk-4DOMGQOO.js";import{f as R}from"./chunk-3BEX5FYF.js";import{b as l,f as m,g as k,h as A,i as g}from"./chunk-3SXTMY75.js";import{g as d}from"./chunk-A6RDYP6R.js";var x=(e,r)=>{let o={},t=e.length;for(let s=0;s<t;s++){let n=e[s],a=r(n);o[a]===void 0?o[a]=[n]:o[a].push(n)}return o};var u=h(),P=(e,r)=>e===r?!0:typeof e!=typeof r||typeof e!="object"||e===null||r===null?!1:JSON.stringify(e)===JSON.stringify(r),O=(e,r)=>e[r],j=e=>e.startsWith("npm:@jsr/"),B=e=>{let r=e.slice(9),o=r.indexOf("__");if(o===-1)throw new Error(`Invalid npm JSR format: ${e}`);let t=r.slice(0,o),s=r.slice(o+2),n=s.indexOf("@"),a,p;return n===-1?(a=s,p=""):(a=s.slice(0,n),p=s.slice(n)),`jsr:@${t}/${a}${p}`},_=(e,r)=>j(r)?B(r):r.startsWith("npm:")?r:`npm:${e}@${r}`,S=e=>e==="workspace:*"||e.startsWith("workspace:"),M=(e,r,o)=>{let t=[],s=r.dependencies??{},n=r.devDependencies??{},a={...s,...n},p=o.imports??{};for(let[y,c]of Object.entries(a)){if(S(c))continue;let f=_(y,c),i=p[y];i===void 0?t.push({packageName:e,dependencyName:y,issue:"missing_in_deno",expected:f}):i!==f&&t.push({packageName:e,dependencyName:y,issue:"version_mismatch",expected:f,actual:i})}for(let[y,c]of Object.entries(p))a[y]===void 0&&t.push({packageName:e,dependencyName:y,issue:"missing_in_package",actual:p[y]});return t},G=async(e,r)=>{let o=[],t=[],s=await w({baseDir:e,includeFiles:[b.DenoJson,b.PackageJson]}),n=s._loadedFiles.find(c=>c.fileType===b.DenoJson),a=s._loadedFiles.find(c=>c.fileType===b.PackageJson);if(n===void 0||a===void 0)return{inconsistencies:[],dependencyInconsistencies:[]};let p=["name","version","exports"];for(let c of p){let f=O(n.content,c),i=O(a.content,c);f===void 0||i===void 0||P(f,i)||o.push({packageName:r,field:c,denoValue:f,packageValue:i})}let y=M(r,a.content,n.content);return t.push(...y),{inconsistencies:o,dependencyInconsistencies:t}},K=async(e={})=>{let{root:r=".",failFast:o=!1}=e,[t,s]=await D(r),n=[],a=[],p=0;for(let c of s){let f=F(c.config);try{let i=await G(f,c.name);if(p++,i.inconsistencies.length>0&&n.push(...i.inconsistencies),i.dependencyInconsistencies.length>0&&a.push(...i.dependencyInconsistencies),o&&(i.inconsistencies.length>0||i.dependencyInconsistencies.length>0))return{isConsistent:!1,inconsistencies:n,dependencyInconsistencies:a,packagesChecked:p}}catch{continue}}return{isConsistent:!(n.length>0||a.length>0),inconsistencies:n,dependencyInconsistencies:a,packagesChecked:p}},v=e=>typeof e=="string"?`"${e}"`:JSON.stringify(e,null,2),H=e=>{switch(e.issue){case"missing_in_deno":return`Missing in deno.json imports. Expected: ${e.expected}`;case"missing_in_package":return`Extra in deno.json imports (not in package.json): ${e.actual}`;case"version_mismatch":return`Version mismatch. Expected: ${e.expected}, Actual: ${e.actual}`}},L=e=>R.fromPromise(()=>K(e)),$=e=>d.ok({root:"."}),N=e=>{if(d.isFail(e))return u.writeln(m("\u2717"),l(" "+String(e.error))),d.fail({exitCode:1});let{value:r}=e;if(u.writeln(g("\u2139"),l(` Checked ${r.packagesChecked} packages.`)),!r.isConsistent){if(r.inconsistencies.length>0){u.writeln(m("\u2717"),l(` Found ${r.inconsistencies.length} field inconsistencies:`));let o=x(r.inconsistencies,t=>t.packageName);for(let[t,s]of Object.entries(o)){u.writeln(A("\u26A0"),l(" "+t));for(let n of s)u.writeln(m("\u2717"),l(` ${n.field} mismatch:`)),u.writeln(g("\u2139"),l(` deno.json: ${v(n.denoValue)}`)),u.writeln(g("\u2139"),l(` package.json: ${v(n.packageValue)}`))}}if(r.dependencyInconsistencies.length>0){u.writeln(m("\u2717"),l(` Found ${r.dependencyInconsistencies.length} dependency inconsistencies:`));let o=x(r.dependencyInconsistencies,t=>t.packageName);for(let[t,s]of Object.entries(o)){u.writeln(A("\u26A0"),l(" "+t));for(let n of s)u.writeln(m("\u2717"),l(` ${n.dependencyName}:`)),u.writeln(g("\u2139"),l(` ${H(n)}`))}}return d.fail({exitCode:1})}return u.writeln(k("\u2713"),l(" All package configs are consistent.")),d.ok(void 0)},J=C.createTrigger({handler:L,adaptInput:$,adaptOutput:N}),qn=async e=>await J({command:"validate-package-configs",args:[],flags:{}});export{K as a,L as b,J as c,qn as d};
2
+ import{a as b,b as w,d as F,f as D}from"./chunk-DYRTLYTU.js";import{a as C}from"./chunk-2VEVVX6U.js";import{a as h}from"./chunk-4DOMGQOO.js";import{f as R}from"./chunk-3BEX5FYF.js";import{b as l,f as m,g as k,h as A,i as g}from"./chunk-3SXTMY75.js";import{g as d}from"./chunk-A6RDYP6R.js";var x=(e,r)=>{let o={},t=e.length;for(let s=0;s<t;s++){let n=e[s],a=r(n);o[a]===void 0?o[a]=[n]:o[a].push(n)}return o};var u=h(),P=(e,r)=>e===r?!0:typeof e!=typeof r||typeof e!="object"||e===null||r===null?!1:JSON.stringify(e)===JSON.stringify(r),O=(e,r)=>e[r],j=e=>e.startsWith("npm:@jsr/"),B=e=>{let r=e.slice(9),o=r.indexOf("__");if(o===-1)throw new Error(`Invalid npm JSR format: ${e}`);let t=r.slice(0,o),s=r.slice(o+2),n=s.indexOf("@"),a,p;return n===-1?(a=s,p=""):(a=s.slice(0,n),p=s.slice(n)),`jsr:@${t}/${a}${p}`},_=(e,r)=>j(r)?B(r):r.startsWith("npm:")?r:`npm:${e}@${r}`,S=e=>e==="workspace:*"||e.startsWith("workspace:"),M=(e,r,o)=>{let t=[],s=r.dependencies??{},n=r.devDependencies??{},a={...s,...n},p=o.imports??{};for(let[y,c]of Object.entries(a)){if(S(c))continue;let f=_(y,c),i=p[y];i===void 0?t.push({packageName:e,dependencyName:y,issue:"missing_in_deno",expected:f}):i!==f&&t.push({packageName:e,dependencyName:y,issue:"version_mismatch",expected:f,actual:i})}for(let[y,c]of Object.entries(p))a[y]===void 0&&t.push({packageName:e,dependencyName:y,issue:"missing_in_package",actual:p[y]});return t},G=async(e,r)=>{let o=[],t=[],s=await w({baseDir:e,includeFiles:[b.DenoJson,b.PackageJson]}),n=s._loadedFiles.find(c=>c.fileType===b.DenoJson),a=s._loadedFiles.find(c=>c.fileType===b.PackageJson);if(n===void 0||a===void 0)return{inconsistencies:[],dependencyInconsistencies:[]};let p=["name","version","exports"];for(let c of p){let f=O(n.content,c),i=O(a.content,c);f===void 0||i===void 0||P(f,i)||o.push({packageName:r,field:c,denoValue:f,packageValue:i})}let y=M(r,a.content,n.content);return t.push(...y),{inconsistencies:o,dependencyInconsistencies:t}},K=async(e={})=>{let{root:r=".",failFast:o=!1}=e,[t,s]=await D(r),n=[],a=[],p=0;for(let c of s){let f=F(c.config);try{let i=await G(f,c.name);if(p++,i.inconsistencies.length>0&&n.push(...i.inconsistencies),i.dependencyInconsistencies.length>0&&a.push(...i.dependencyInconsistencies),o&&(i.inconsistencies.length>0||i.dependencyInconsistencies.length>0))return{isConsistent:!1,inconsistencies:n,dependencyInconsistencies:a,packagesChecked:p}}catch{continue}}return{isConsistent:!(n.length>0||a.length>0),inconsistencies:n,dependencyInconsistencies:a,packagesChecked:p}},v=e=>typeof e=="string"?`"${e}"`:JSON.stringify(e,null,2),H=e=>{switch(e.issue){case"missing_in_deno":return`Missing in deno.json imports. Expected: ${e.expected}`;case"missing_in_package":return`Extra in deno.json imports (not in package.json): ${e.actual}`;case"version_mismatch":return`Version mismatch. Expected: ${e.expected}, Actual: ${e.actual}`}},L=e=>R.fromPromise(()=>K(e)),$=e=>d.ok({root:"."}),N=e=>{if(d.isFail(e))return u.writeln(m("\u2717"),l(" "+String(e.error))),d.fail({exitCode:1});let{value:r}=e;if(u.writeln(g("\u2139"),l(` Checked ${r.packagesChecked} packages.`)),!r.isConsistent){if(r.inconsistencies.length>0){u.writeln(m("\u2717"),l(` Found ${r.inconsistencies.length} field inconsistencies:`));let o=x(r.inconsistencies,t=>t.packageName);for(let[t,s]of Object.entries(o)){u.writeln(A("\u26A0"),l(" "+t));for(let n of s)u.writeln(m("\u2717"),l(` ${n.field} mismatch:`)),u.writeln(g("\u2139"),l(` deno.json: ${v(n.denoValue)}`)),u.writeln(g("\u2139"),l(` package.json: ${v(n.packageValue)}`))}}if(r.dependencyInconsistencies.length>0){u.writeln(m("\u2717"),l(` Found ${r.dependencyInconsistencies.length} dependency inconsistencies:`));let o=x(r.dependencyInconsistencies,t=>t.packageName);for(let[t,s]of Object.entries(o)){u.writeln(A("\u26A0"),l(" "+t));for(let n of s)u.writeln(m("\u2717"),l(` ${n.dependencyName}:`)),u.writeln(g("\u2139"),l(` ${H(n)}`))}}return d.fail({exitCode:1})}return u.writeln(k("\u2713"),l(" All package configs are consistent.")),d.ok(void 0)},J=C.createTrigger({handler:L,adaptInput:$,adaptOutput:N}),qn=async e=>await J({command:"validate-package-configs",args:[],flags:{}});export{K as a,L as b,J as c,qn as d};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as E}from"./chunk-AGRTWPDI.js";import{a as y}from"./chunk-2VEVVX6U.js";import{a as C}from"./chunk-4DOMGQOO.js";import{f as v}from"./chunk-3BEX5FYF.js";import{b as i,f as m,g as x,h as k,i as g}from"./chunk-3SXTMY75.js";import{g as p}from"./chunk-A6RDYP6R.js";import{v as h}from"./chunk-MRCBHVSB.js";var l=C(),d=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase(),f=(e,o=[])=>{let s=e.split("/").filter(r=>r.length>0);for(let r of s){let t=r.startsWith(".")?r.slice(1):r;if(t.length===0)continue;let a=h.runtime.path.extname(t);if(a.length>0&&(t=t.slice(0,-a.length)),t.length!==0&&!o.includes(t)&&!/^[a-z0-9]+(-[a-z0-9]+)*$/.test(t))return!1}return!0},N=async(e={})=>{let{root:o=".",ignoreWords:s=[]}=e,r=await E(o),t=[];for(let a of r){let n=a.config.exports?.value;if(n!=null){if(typeof n=="string"){f(n,s)||t.push({packageName:a.name,exportPath:n,suggestion:d(n)});continue}if(n!==null&&typeof n=="object")for(let[u,c]of Object.entries(n))f(u,s)||t.push({packageName:a.name,exportPath:u,suggestion:d(u)}),typeof c=="string"&&!f(c,s)&&t.push({packageName:a.name,exportPath:c,suggestion:d(c)})}}return{isValid:t.length===0,violations:t,packagesChecked:r.length}},w=e=>v.fromPromise(()=>N(e)),b=e=>p.ok({root:"."}),A=e=>{if(p.isFail(e))return l.writeln(m("\u2717"),i(" "+String(e.error))),p.fail({exitCode:1});let{value:o}=e;if(l.writeln(g("\u2139"),i(` Checked ${o.packagesChecked} packages.`)),!o.isValid){l.writeln(m("\u2717"),i(` Found ${o.violations.length} naming violations:`));for(let s of o.violations)l.writeln(k("\u26A0"),i(" "+s.packageName)),l.writeln(g("\u2139"),i(` Export: ${s.exportPath}`)),l.writeln(g("\u2139"),i(` Suggestion: ${s.suggestion}`));return p.fail({exitCode:1})}return l.writeln(x("\u2713"),i(" All export names follow conventions.")),p.ok(void 0)},P=y.createTrigger({handler:w,adaptInput:b,adaptOutput:A}),W=async e=>await P({command:"validate-export-names",args:[],flags:{}});export{N as a,w as b,P as c,W as d};
2
+ import{a as E}from"./chunk-KBFKBL6A.js";import{a as y}from"./chunk-2VEVVX6U.js";import{a as C}from"./chunk-4DOMGQOO.js";import{f as v}from"./chunk-3BEX5FYF.js";import{b as i,f as m,g as x,h as k,i as g}from"./chunk-3SXTMY75.js";import{g as p}from"./chunk-A6RDYP6R.js";import{v as h}from"./chunk-MRCBHVSB.js";var l=C(),d=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase(),f=(e,o=[])=>{let s=e.split("/").filter(r=>r.length>0);for(let r of s){let t=r.startsWith(".")?r.slice(1):r;if(t.length===0)continue;let a=h.runtime.path.extname(t);if(a.length>0&&(t=t.slice(0,-a.length)),t.length!==0&&!o.includes(t)&&!/^[a-z0-9]+(-[a-z0-9]+)*$/.test(t))return!1}return!0},N=async(e={})=>{let{root:o=".",ignoreWords:s=[]}=e,r=await E(o),t=[];for(let a of r){let n=a.config.exports?.value;if(n!=null){if(typeof n=="string"){f(n,s)||t.push({packageName:a.name,exportPath:n,suggestion:d(n)});continue}if(n!==null&&typeof n=="object")for(let[u,c]of Object.entries(n))f(u,s)||t.push({packageName:a.name,exportPath:u,suggestion:d(u)}),typeof c=="string"&&!f(c,s)&&t.push({packageName:a.name,exportPath:c,suggestion:d(c)})}}return{isValid:t.length===0,violations:t,packagesChecked:r.length}},w=e=>v.fromPromise(()=>N(e)),b=e=>p.ok({root:"."}),A=e=>{if(p.isFail(e))return l.writeln(m("\u2717"),i(" "+String(e.error))),p.fail({exitCode:1});let{value:o}=e;if(l.writeln(g("\u2139"),i(` Checked ${o.packagesChecked} packages.`)),!o.isValid){l.writeln(m("\u2717"),i(` Found ${o.violations.length} naming violations:`));for(let s of o.violations)l.writeln(k("\u26A0"),i(" "+s.packageName)),l.writeln(g("\u2139"),i(` Export: ${s.exportPath}`)),l.writeln(g("\u2139"),i(` Suggestion: ${s.suggestion}`));return p.fail({exitCode:1})}return l.writeln(x("\u2713"),i(" All export names follow conventions.")),p.ok(void 0)},P=y.createTrigger({handler:w,adaptInput:b,adaptOutput:A}),W=async e=>await P({command:"validate-export-names",args:[],flags:{}});export{N as a,w as b,P as c,W as d};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as w}from"./chunk-AGRTWPDI.js";import{a as v}from"./chunk-2VEVVX6U.js";import{a as y}from"./chunk-4DOMGQOO.js";import{f as k}from"./chunk-3BEX5FYF.js";import{b as l,f,g as h,h as C,i as m}from"./chunk-3SXTMY75.js";import{g as a}from"./chunk-A6RDYP6R.js";var p=y(),D=e=>{let s=new Map,r=new Set(e.map(i=>i.name));for(let i of e){let n=[];for(let d of i.config._loadedFiles){let t=d.content,u=t.dependencies;if(u!==void 0)for(let c of Object.keys(u))r.has(c)&&n.push(c);let o=t.imports;if(o!==void 0)for(let c of Object.values(o))r.has(c)&&n.push(c)}s.set(i.name,[...new Set(n)])}return s},x=e=>{let s=[],r=new Set,i=new Set,n=[],d=t=>{r.add(t),i.add(t),n.push(t);let u=e.get(t)??[];for(let o of u)if(!r.has(o))d(o);else if(i.has(o)){let c=n.indexOf(o),g=n.slice(c);g.push(o),s.push(g)}n.pop(),i.delete(t)};for(let t of e.keys())r.has(t)||d(t);return s},R=async(e={})=>{let{root:s="."}=e,r=await w(s),i=D(r),n=x(i);return{hasCycles:n.length>0,cycles:n,packagesChecked:r.length}},O=e=>k.fromPromise(()=>R(e)),b=e=>a.ok({root:"."}),A=e=>{if(a.isFail(e))return p.writeln(f("\u2717"),l(" "+(e.error instanceof Error?e.error.message:String(e.error)))),a.fail({exitCode:1});let{value:s}=e;if(p.writeln(m("\u2139"),l(` Checked ${s.packagesChecked} packages.`)),s.hasCycles){p.writeln(f("\u2717"),l(` Found ${s.cycles.length} circular dependencies:`));for(let r of s.cycles)p.writeln(C("\u26A0"),l(` ${r.join(" \u2192 ")}`));return a.fail({exitCode:1})}return p.writeln(h("\u2713"),l(" No circular dependencies found.")),a.ok(void 0)},M=v.createTrigger({handler:O,adaptInput:b,adaptOutput:A}),_=async e=>await M({command:"validate-circular-deps",args:[],flags:{}});export{R as a,O as b,M as c,_ as d};
2
+ import{a as w}from"./chunk-KBFKBL6A.js";import{a as v}from"./chunk-2VEVVX6U.js";import{a as y}from"./chunk-4DOMGQOO.js";import{f as k}from"./chunk-3BEX5FYF.js";import{b as l,f,g as h,h as C,i as m}from"./chunk-3SXTMY75.js";import{g as a}from"./chunk-A6RDYP6R.js";var p=y(),D=e=>{let s=new Map,r=new Set(e.map(i=>i.name));for(let i of e){let n=[];for(let d of i.config._loadedFiles){let t=d.content,u=t.dependencies;if(u!==void 0)for(let c of Object.keys(u))r.has(c)&&n.push(c);let o=t.imports;if(o!==void 0)for(let c of Object.values(o))r.has(c)&&n.push(c)}s.set(i.name,[...new Set(n)])}return s},x=e=>{let s=[],r=new Set,i=new Set,n=[],d=t=>{r.add(t),i.add(t),n.push(t);let u=e.get(t)??[];for(let o of u)if(!r.has(o))d(o);else if(i.has(o)){let c=n.indexOf(o),g=n.slice(c);g.push(o),s.push(g)}n.pop(),i.delete(t)};for(let t of e.keys())r.has(t)||d(t);return s},R=async(e={})=>{let{root:s="."}=e,r=await w(s),i=D(r),n=x(i);return{hasCycles:n.length>0,cycles:n,packagesChecked:r.length}},O=e=>k.fromPromise(()=>R(e)),b=e=>a.ok({root:"."}),A=e=>{if(a.isFail(e))return p.writeln(f("\u2717"),l(" "+(e.error instanceof Error?e.error.message:String(e.error)))),a.fail({exitCode:1});let{value:s}=e;if(p.writeln(m("\u2139"),l(` Checked ${s.packagesChecked} packages.`)),s.hasCycles){p.writeln(f("\u2717"),l(` Found ${s.cycles.length} circular dependencies:`));for(let r of s.cycles)p.writeln(C("\u26A0"),l(` ${r.join(" \u2192 ")}`));return a.fail({exitCode:1})}return p.writeln(h("\u2713"),l(" No circular dependencies found.")),a.ok(void 0)},M=v.createTrigger({handler:O,adaptInput:b,adaptOutput:A}),_=async e=>await M({command:"validate-circular-deps",args:[],flags:{}});export{R as a,O as b,M as c,_ as d};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{d as a,f as g}from"./chunk-4SYC4WJV.js";import{b as i}from"./chunk-NBA6EFWU.js";import{t as s}from"./chunk-MRCBHVSB.js";var u=async(n=".")=>{let[t,r]=await g(n);return r.map(e=>({name:e.name,version:e.version,path:a(e.config),config:e.config,entrypoints:c(e.config)}))},c=n=>{let t=n.exports?.value;if(t==null)return[];if(typeof t=="string")return[t];if(t!==null&&typeof t=="object"){let r=[];for(let e of Object.values(t))typeof e=="string"&&r.push(e);return r}return[]},d=(n,t)=>s.path.isAbsolute(n)?n:s.path.resolve(t,n),k=async n=>{let t=[];for await(let r of s.fs.walk(n,{exts:i,includeDirs:!1,skip:[/node_modules/,/\.git/]})){let e=s.path.relative(n,r.path),o=s.path.basename(e);o.endsWith("_test.ts")||o.endsWith("_bench.ts")||o.startsWith("_")||e.includes("testdata/")||t.push(`./${e}`)}return t.sort()};export{u as a,d as b,k as c};
2
+ import{d as a,f as g}from"./chunk-DYRTLYTU.js";import{b as i}from"./chunk-NBA6EFWU.js";import{t as s}from"./chunk-MRCBHVSB.js";var u=async(n=".")=>{let[t,r]=await g(n);return r.map(e=>({name:e.name,version:e.version,path:a(e.config),config:e.config,entrypoints:c(e.config)}))},c=n=>{let t=n.exports?.value;if(t==null)return[];if(typeof t=="string")return[t];if(t!==null&&typeof t=="object"){let r=[];for(let e of Object.values(t))typeof e=="string"&&r.push(e);return r}return[]},d=(n,t)=>s.path.isAbsolute(n)?n:s.path.resolve(t,n),k=async n=>{let t=[];for await(let r of s.fs.walk(n,{exts:i,includeDirs:!1,skip:[/node_modules/,/\.git/]})){let e=s.path.relative(n,r.path),o=s.path.basename(e);o.endsWith("_test.ts")||o.endsWith("_bench.ts")||o.startsWith("_")||e.includes("testdata/")||t.push(`./${e}`)}return t.sort()};export{u as a,d as b,k as c};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{b as r}from"./chunk-SQINSLNL.js";var n=class{description;#o;#s;#e=[];constructor(o){this.description=o.description,this.#o=o.modules??{},this.#s=o.aliases??{}}addSubmodule(o,e){return this.#e.push({registration:o,module:e}),this}async addSubmoduleAsync(o,e){let s=await e;return this.#e.push({registration:o,module:s}),this}toGroupOptions(){return{description:this.description,modules:this.#o,aliases:Object.keys(this.#s).length>0?this.#s:void 0}}toCommand(o,e){let s=new r(o).description(this.description);e!==void 0&&s.version(e),Object.keys(this.#o).length>0&&s.modules(this.toGroupOptions());for(let{registration:t,module:d}of this.#e){let i=d.toGroupOptions();if(s.group(t.name,i),t.aliases!==void 0)for(let a of t.aliases)s.groupAlias(a,t.name,i)}return s}};export{n as a};
2
+ import{b as r}from"./chunk-PZNCE6QK.js";var n=class{description;#o;#s;#e=[];constructor(o){this.description=o.description,this.#o=o.modules??{},this.#s=o.aliases??{}}addSubmodule(o,e){return this.#e.push({registration:o,module:e}),this}async addSubmoduleAsync(o,e){let s=await e;return this.#e.push({registration:o,module:s}),this}toGroupOptions(){return{description:this.description,modules:this.#o,aliases:Object.keys(this.#s).length>0?this.#s:void 0}}toCommand(o,e){let s=new r(o).description(this.description);e!==void 0&&s.version(e),Object.keys(this.#o).length>0&&s.modules(this.toGroupOptions());for(let{registration:t,module:d}of this.#e){let i=d.toGroupOptions();if(s.group(t.name,i),t.aliases!==void 0)for(let a of t.aliases)s.groupAlias(a,t.name,i)}return s}};export{n as a};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as _,b as H,c as P}from"./chunk-5GGGQJ4P.js";import{e as Q}from"./chunk-J2Z7NG2X.js";import{f as p,h as u,k as c}from"./chunk-GBM3TZFD.js";import{b as r,d as l,f as m,g,h as Y,k as o}from"./chunk-3SXTMY75.js";import{d as x}from"./chunk-PVPMHMKP.js";import{a as v}from"./chunk-JLY6XWDP.js";import{a as h,b as w}from"./chunk-A6RDYP6R.js";import{a as re,g as W,h as K,i as B,r as I,t as d}from"./chunk-MRCBHVSB.js";var oe="# eser CLI completions",D="eser",X=async e=>{try{return await d.fs.readTextFile(e)}catch{return""}},ie=async e=>{try{return await d.fs.stat(e),!0}catch{return!1}},Z=async e=>{let t=P(e,D);if(t.completionType==="file")return await ie(t.completionsFile);let s=await X(t.rcFile),n=H(e,D);return s.includes(n)},ee=async e=>{let t=P(e,D),s=p({renderer:c.ansi(),sink:u.stdout()});try{if(t.completionType==="file"){let n=t.completionsFile,a=d.path.dirname(n);try{await d.fs.mkdir(a,{recursive:!0})}catch{}await d.fs.writeTextFile(n,`# eser CLI completions
2
+ import{a as _,b as H,c as P}from"./chunk-5GGGQJ4P.js";import{e as Q}from"./chunk-J2Z7NG2X.js";import{f as p,h as u,k as c}from"./chunk-GBM3TZFD.js";import{b as r,d as l,f as m,g,h as Y,k as o}from"./chunk-3SXTMY75.js";import{d as x}from"./chunk-PVPMHMKP.js";import{a as v}from"./chunk-FKITIXO2.js";import{a as h,b as w}from"./chunk-A6RDYP6R.js";import{a as re,g as W,h as K,i as B,r as I,t as d}from"./chunk-MRCBHVSB.js";var oe="# eser CLI completions",D="eser",X=async e=>{try{return await d.fs.readTextFile(e)}catch{return""}},ie=async e=>{try{return await d.fs.stat(e),!0}catch{return!1}},Z=async e=>{let t=P(e,D);if(t.completionType==="file")return await ie(t.completionsFile);let s=await X(t.rcFile),n=H(e,D);return s.includes(n)},ee=async e=>{let t=P(e,D),s=p({renderer:c.ansi(),sink:u.stdout()});try{if(t.completionType==="file"){let n=t.completionsFile,a=d.path.dirname(n);try{await d.fs.mkdir(a,{recursive:!0})}catch{}await d.fs.writeTextFile(n,`# eser CLI completions
3
3
  # This file is auto-generated. Run 'eser system completions --shell fish' to regenerate.
4
4
  complete -c eser -f
5
5
  complete -c eser -n "__fish_use_subcommand" -a "codebase" -d "Codebase management tools"
@@ -1,10 +1,10 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as u}from"./chunk-MG65QJY6.js";import{a as p,b as f}from"./chunk-A6RDYP6R.js";import{t as x}from"./chunk-MRCBHVSB.js";var h=t=>{let e=[],n=[],r={},s={};for(let i of t)i.type==="boolean"?e.push(i.name):n.push(i.name),i.short!==void 0&&(r[i.short]=i.name),i.default!==void 0&&(s[i.name]=i.default);return{boolean:e,string:n,alias:r,default:s}},T=t=>t!=null&&t.constructor===String,V={boolean:t=>!!t,number:t=>T(t)?Number(t):t,string:t=>String(t),"string[]":t=>Array.isArray(t)?t.map(String):[String(t)]},v=(t,e)=>{if(t!==void 0)return V[e]?.(t)??t},$=(t,e)=>{let n={};for(let r of e){let s=t[r.name];n[r.name]=v(s,r.type)}return n},re=(t,e)=>{let n=h(e),r=u(t,n);return{positional:r._,flags:$(r,e)}},_=(t,e)=>{let n=[];for(let r of e)if(r.required===!0){let s=t[r.name];(s===void 0||s===""||s===!1)&&n.push(`Required flag --${r.name} is missing`)}return n};var O=(t,e)=>t+" ".repeat(Math.max(0,e-t.length)),U=t=>{let e=t.short!==void 0?`-${t.short}, `:"",n=t.type!=="boolean"?` <${t.type}>`:"";return`${e}--${t.name}${n}`},q=(t,e)=>[t.description!==void 0?`${e} - ${t.description}`:e,""],B=(t,e)=>{if(t.usage!==void 0)return["Usage:",` ${t.usage}`,""];let n=t.children.length>0?" <command>":"",r=t.flags.length>0?" [options]":"";return["Usage:",` ${e}${n}${r}`,""]},I=t=>{if(t.length===0)return[];let e=s=>s.aliases!==void 0&&s.aliases.length>0?`${s.name}, ${s.aliases.join(", ")}`:s.name,n=Math.max(...t.map(s=>e(s).length));return["Commands:",...t.map(s=>` ${O(e(s),n+2)}${s.description??""}`),""]},Y=t=>{if(t.length===0)return[];let e=t.map(s=>({flag:U(s),desc:s.description})),n=Math.max(...e.map(s=>s.flag.length));return["Options:",...e.map(({flag:s,desc:i})=>` ${O(s,n+2)}${i}`),""]},Z=t=>t?.length?["Examples:",...t.map(e=>` ${e}`),""]:[],M=(t,e)=>{let n=e.join(" "),r=[...q(t,n),...B(t,n),...I(t.children),...Y(t.flags),...Z(t.examples)];return t.children.length>0&&r.push(`Run '${n} <command> --help' for more information on a command.`),r.join(`
3
- `)};var w=t=>{let e=[];for(let n of t)e.push(`--${n.name}`),n.short!==void 0&&e.push(`-${n.short}`);return e.join(" ")},k=(t,e)=>{if(t.children===void 0||t.children.length===0)return"";let n=t.children.map(o=>o.name).join(" "),r=t.flags!==void 0?w(t.flags):"",s=[n,r].filter(o=>o.length>0).join(" "),i=` ${e})
4
- `;i+=` COMPREPLY=( $(compgen -W "${s}" -- "\${cur}") )
5
- `,i+=` return 0
6
- `,i+=` ;;
7
- `;for(let o of t.children)o.children!==void 0&&o.children.length>0&&(i+=k(o,`${e} ${o.name}`));return i},D=(t,e)=>{let n=e.children?.map(o=>o.name).join(" ")??"",r=e.flags!==void 0?w(e.flags):"",s=[n,r].filter(o=>o.length>0).join(" "),i="";if(e.children!==void 0)for(let o of e.children)i+=k(o,o.name);return`# ${t} bash completion
2
+ import{a as u}from"./chunk-MG65QJY6.js";import{a as p,b as f}from"./chunk-A6RDYP6R.js";import{t as x}from"./chunk-MRCBHVSB.js";var h=t=>{let e=[],n=[],i={},s={};for(let r of t)r.type==="boolean"?e.push(r.name):n.push(r.name),r.short!==void 0&&(i[r.short]=r.name),r.default!==void 0&&(s[r.name]=r.default);return{boolean:e,string:n,alias:i,default:s}},T=t=>t!=null&&t.constructor===String,V={boolean:t=>!!t,number:t=>T(t)?Number(t):t,string:t=>String(t),"string[]":t=>Array.isArray(t)?t.map(String):[String(t)]},v=(t,e)=>{if(t!==void 0)return V[e]?.(t)??t},$=(t,e)=>{let n={};for(let i of e){let s=t[i.name];n[i.name]=v(s,i.type)}return n},ie=(t,e)=>{let n=h(e),i=u(t,n);return{positional:i._,flags:$(i,e)}},_=(t,e)=>{let n=[];for(let i of e)if(i.required===!0){let s=t[i.name];(s===void 0||s===""||s===!1)&&n.push(`Required flag --${i.name} is missing`)}return n};var O=(t,e)=>t+" ".repeat(Math.max(0,e-t.length)),U=t=>{let e=t.short!==void 0?`-${t.short}, `:"",n=t.type!=="boolean"?` <${t.type}>`:"";return`${e}--${t.name}${n}`},q=(t,e)=>[t.description!==void 0?`${e} - ${t.description}`:e,""],B=(t,e)=>{if(t.usage!==void 0)return["Usage:",` ${t.usage}`,""];let n=t.children.length>0?" <command>":"",i=t.flags.length>0?" [options]":"";return["Usage:",` ${e}${n}${i}`,""]},I=t=>{if(t.length===0)return[];let e=s=>s.aliases!==void 0&&s.aliases.length>0?`${s.name}, ${s.aliases.join(", ")}`:s.name,n=Math.max(...t.map(s=>e(s).length));return["Commands:",...t.map(s=>` ${O(e(s),n+2)}${s.description??""}`),""]},Y=t=>{if(t.length===0)return[];let e=t.map(s=>({flag:U(s),desc:s.description})),n=Math.max(...e.map(s=>s.flag.length));return["Options:",...e.map(({flag:s,desc:r})=>` ${O(s,n+2)}${r}`),""]},Z=t=>t?.length?["Examples:",...t.map(e=>` ${e}`),""]:[],M=(t,e)=>{let n=e.join(" "),i=[...q(t,n),...B(t,n),...I(t.children),...Y(t.flags),...Z(t.examples)];return t.children.length>0&&i.push(`Run '${n} <command> --help' for more information on a command.`),i.join(`
3
+ `)};var w=t=>{let e=[];for(let n of t)e.push(`--${n.name}`),n.short!==void 0&&e.push(`-${n.short}`);return e.join(" ")},k=(t,e)=>{if(t.children===void 0||t.children.length===0)return"";let n=t.children.map(o=>o.name).join(" "),i=t.flags!==void 0?w(t.flags):"",s=[n,i].filter(o=>o.length>0).join(" "),r=` ${e})
4
+ `;r+=` COMPREPLY=( $(compgen -W "${s}" -- "\${cur}") )
5
+ `,r+=` return 0
6
+ `,r+=` ;;
7
+ `;for(let o of t.children)o.children!==void 0&&o.children.length>0&&(r+=k(o,`${e} ${o.name}`));return r},D=(t,e)=>{let n=e.children?.map(o=>o.name).join(" ")??"",i=e.flags!==void 0?w(e.flags):"",s=[n,i].filter(o=>o.length>0).join(" "),r="";if(e.children!==void 0)for(let o of e.children)r+=k(o,o.name);return`# ${t} bash completion
8
8
  # Generated by @eser/shell/completions
9
9
 
10
10
  _${t}_completions() {
@@ -34,7 +34,7 @@ _${t}_completions() {
34
34
  done
35
35
 
36
36
  case "$cmd_path" in
37
- ${i} "")
37
+ ${r} "")
38
38
  COMPREPLY=( $(compgen -W "${s}" -- "\${cur}") )
39
39
  return 0
40
40
  ;;
@@ -42,13 +42,13 @@ ${i} "")
42
42
  }
43
43
 
44
44
  complete -F _${t}_completions ${t}
45
- `};var R=t=>t.replace(/'/g,"'\\''"),K=t=>{let e=[];for(let n of t){let r=R(n.description??`${n.name} flag`);n.takesValue===!0?(e.push(`'--${n.name}=[${r}]'`),n.short!==void 0&&e.push(`'-${n.short}=[${r}]'`)):(e.push(`'--${n.name}[${r}]'`),n.short!==void 0&&e.push(`'-${n.short}[${r}]'`))}return e},Q=t=>t.map(n=>{let r=R(n.description??n.name);return`'${n.name}:${r}'`}).join(`
45
+ `};var R=t=>t.replace(/'/g,"'\\''"),K=t=>{let e=[];for(let n of t){let i=R(n.description??`${n.name} flag`);n.takesValue===!0?(e.push(`'--${n.name}=[${i}]'`),n.short!==void 0&&e.push(`'-${n.short}=[${i}]'`)):(e.push(`'--${n.name}[${i}]'`),n.short!==void 0&&e.push(`'-${n.short}[${i}]'`))}return e},Q=t=>t.map(n=>{let i=R(n.description??n.name);return`'${n.name}:${i}'`}).join(`
46
46
  `),P=(t,e,n)=>{let s=`${n.length===0?`_${t}`:`_${t}_${n.join("_")}`}() {
47
47
  `;if(s+=` local -a commands
48
48
  `,s+=` local -a flags
49
49
 
50
- `,e.flags!==void 0&&e.flags.length>0){let i=K(e.flags);s+=` flags=(
51
- ${i.join(`
50
+ `,e.flags!==void 0&&e.flags.length>0){let r=K(e.flags);s+=` flags=(
51
+ ${r.join(`
52
52
  `)}
53
53
  )
54
54
 
@@ -65,7 +65,7 @@ complete -F _${t}_completions ${t}
65
65
  `,s+=` _describe -t commands 'command' commands
66
66
  `,s+=` ;;
67
67
  `,s+=` args)
68
- `,s+=' case "${words[1]}" in\n';for(let i of e.children){let o=[...n,i.name],a=`_${t}_${o.join("_")}`;s+=` ${i.name})
68
+ `,s+=' case "${words[1]}" in\n';for(let r of e.children){let o=[...n,r.name],a=`_${t}_${o.join("_")}`;s+=` ${r.name})
69
69
  `,s+=` ${a}
70
70
  `,s+=` ;;
71
71
  `}s+=` esac
@@ -73,20 +73,20 @@ complete -F _${t}_completions ${t}
73
73
  `,s+=` esac
74
74
  `}else e.flags!==void 0&&e.flags.length>0&&(s+=' _arguments "${flags[@]}"\n');if(s+=`}
75
75
 
76
- `,e.children!==void 0)for(let i of e.children)s+=P(t,i,[...n,i.name]);return s},H=(t,e)=>{let n=`#compdef ${t}
76
+ `,e.children!==void 0)for(let r of e.children)s+=P(t,r,[...n,r.name]);return s},H=(t,e)=>{let n=`#compdef ${t}
77
77
  `;return n+=`# ${t} zsh completion
78
78
  `,n+=`# Generated by @eser/shell/completions
79
79
 
80
- `,n+=P(t,e,[]),n};var S=t=>t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\$/g,"\\$").replace(/`/g,"\\`").replace(/\(/g,"\\(").replace(/\)/g,"\\)"),ee=(t,e,n)=>{let r="";for(let s of e){let i=S(s.description??`${s.name} flag`),o=`complete -c ${t} ${n}`;o+=` -l ${s.name}`,s.short!==void 0&&(o+=` -s ${s.short}`),s.takesValue===!0&&(o+=" -r"),o+=` -d '${i}'`,r+=o+`
81
- `}return r},A=(t,e,n)=>{let r="",s;if(n.length===0?s="-n __fish_use_subcommand":s=`-n "${n.map(o=>`__fish_seen_subcommand_from ${o}`).join("; and ")}"`,e.children!==void 0&&e.children.length>0){for(let i of e.children){let o=S(i.description??i.name);if(n.length===0)r+=`complete -c ${t} -f ${s} `,r+=`-a "${i.name}" -d '${o}'
82
- `;else{let a=`-n "__fish_seen_subcommand_from ${n[n.length-1]}"`;r+=`complete -c ${t} -f ${a} `,r+=`-a "${i.name}" -d '${o}'
83
- `}}for(let i of e.children)r+=A(t,i,[...n,i.name])}return e.flags!==void 0&&e.flags.length>0&&(r+=ee(t,e.flags,s)),r},j=(t,e)=>{let n=`# ${t} fish completion
80
+ `,n+=P(t,e,[]),n};var S=t=>t.replace(/[\\'\$`()]/g,"\\$&"),ee=(t,e,n)=>{let i="";for(let s of e){let r=S(s.description??`${s.name} flag`),o=`complete -c ${t} ${n}`;o+=` -l ${s.name}`,s.short!==void 0&&(o+=` -s ${s.short}`),s.takesValue===!0&&(o+=" -r"),o+=` -d '${r}'`,i+=o+`
81
+ `}return i},A=(t,e,n)=>{let i="",s;if(n.length===0?s="-n __fish_use_subcommand":s=`-n "${n.map(o=>`__fish_seen_subcommand_from ${o}`).join("; and ")}"`,e.children!==void 0&&e.children.length>0){for(let r of e.children){let o=S(r.description??r.name);if(n.length===0)i+=`complete -c ${t} -f ${s} `,i+=`-a "${r.name}" -d '${o}'
82
+ `;else{let a=`-n "__fish_seen_subcommand_from ${n[n.length-1]}"`;i+=`complete -c ${t} -f ${a} `,i+=`-a "${r.name}" -d '${o}'
83
+ `}}for(let r of e.children)i+=A(t,r,[...n,r.name])}return e.flags!==void 0&&e.flags.length>0&&(i+=ee(t,e.flags,s)),i},j=(t,e)=>{let n=`# ${t} fish completion
84
84
  `;return n+=`# Generated by @eser/shell/completions
85
85
 
86
86
  `,n+=`complete -c ${t} -f
87
87
 
88
- `,n+=A(t,e,[]),n};var E=(t,e,n)=>{switch(t){case"bash":return D(e,n);case"zsh":return H(e,n);case"fish":return j(e,n)}};var N=class t{#e;#a;#c;#g=[];#l=[];#$=[];#m=[];#o=[];#s=new Map;#r=new Map;#p=new Map;#n;#f;#u;#i={validation:"none"};#h;#t;constructor(e){this.#e=e}get name(){return this.#e}description(e){return this.#a=e,this}usage(e){return this.#c=e,this}example(e){return this.#g.push(e),this}aliases(...e){return this.#l=e,this}version(e){return this.#h=e,this}flag(e){return this.#$.push(e),this}persistentFlag(e){return this.#m.push({...e,persistent:!0}),this}args(e,n){return e==="exact"&&typeof n=="number"?this.#i={validation:e,count:n}:e==="min"&&typeof n=="number"?this.#i={validation:e,min:n}:e==="max"&&typeof n=="number"?this.#i={validation:e,max:n}:e==="range"&&Array.isArray(n)?this.#i={validation:e,min:n[0],max:n[1]}:this.#i={validation:e},this}command(e){return e.#t=this,this.#o.push(e),this}commands(...e){for(let n of e)this.command(n);return this}run(e){return this.#u=e,this}lazyCommand(e,n){return this.#s.set(e,n),this}group(e,n){return this.#r.set(e,n),this}groupAlias(e,n,r){return this.#r.set(e,r),this.#p.set(e,n),this}modules(e){return this.#n=e,this}fallback(e){return this.#f=e,this}static#x=[{name:"help",short:"h",type:"boolean",description:"Show help for this command"}];#d(){let e=[],n=this.#t;for(;n!==void 0;)e.push(...n.#m),n=n.#t;return[...t.#x,...e,...this.#m,...this.#$]}#C(){return this.#t===void 0?this:this.#t.#C()}#y(){return this.#t===void 0?[this.#e]:[...this.#t.#y(),this.#e]}#_(e){return this.#o.find(n=>n.#e===e||n.#l.includes(e))}#O(e){let{validation:n,count:r,min:s,max:i}=this.#i,o=e.length;switch(n){case"no-args":if(o>0)return"This command takes no arguments";break;case"exact":if(o!==r)return`Expected exactly ${r} argument(s), got ${o}`;break;case"min":if(o<(s??0))return`Expected at least ${s} argument(s), got ${o}`;break;case"max":if(o>(i??1/0))return`Expected at most ${i} argument(s), got ${o}`;break;case"range":if(o<(s??0)||o>(i??1/0))return`Expected ${s}-${i} arguments, got ${o}`;break}}async parse(e){let n=e??x.process.args;return await this.#F(n,[])}async#F(e,n){let r=this.#d(),s=h(r),i=this.#o.length>0||this.#s.size>0||this.#r.size>0||this.#n!==void 0,o=u(e,{...s,stopEarly:i}),a=$(o,r),d=o._;if(this.#h!==void 0&&a.version===!0)return console.log(`${this.#e} ${this.#h}`),p(void 0);if(a.help===!0)return console.log(this.help()),p(void 0);let c=d[0];if(c!==void 0&&i){let F=this.#_(c);if(F!==void 0)return await F.#F(d.slice(1),[...n,this.#e]);if(this.#s.has(c)){let l=await this.#s.get(c).load();return l instanceof t?(l.#t=this,await l.parse(d.slice(1))):"parse"in l&&typeof l.parse=="function"?await l.parse(d.slice(1)):(console.log(l.help()),p(void 0))}if(this.#n!==void 0){let g=this.#n.aliases?.[c]??c,l=this.#n.modules[g];if(l!==void 0)return await(await l.load()).main(d.slice(1))}for(let[g,l]of this.#r)if(c===g){let m=d[1];if(m===void 0||m==="--help"||m==="-h")return this.#b(g,l),p(void 0);let G=l.aliases?.[m]??m,b=l.modules[G];return b===void 0?(console.error(`Unknown module: ${g} ${m}
89
- `),this.#b(g,l),f({exitCode:1})):await(await b.load()).main(d.slice(2))}if(this.#f!==void 0)return await this.#f(c,d.slice(1))}if(this.#u===void 0)return console.log(this.help()),p(void 0);let C=_(a,r);if(C.length>0)return f({message:C.join(`
88
+ `,n+=A(t,e,[]),n};var E=(t,e,n)=>{switch(t){case"bash":return D(e,n);case"zsh":return H(e,n);case"fish":return j(e,n)}};var N=class t{#e;#a;#c;#g=[];#l=[];#$=[];#m=[];#o=[];#s=new Map;#i=new Map;#p=new Map;#n;#f;#u;#r={validation:"none"};#h;#t;constructor(e){this.#e=e}get name(){return this.#e}description(e){return this.#a=e,this}usage(e){return this.#c=e,this}example(e){return this.#g.push(e),this}aliases(...e){return this.#l=e,this}version(e){return this.#h=e,this}flag(e){return this.#$.push(e),this}persistentFlag(e){return this.#m.push({...e,persistent:!0}),this}args(e,n){return e==="exact"&&typeof n=="number"?this.#r={validation:e,count:n}:e==="min"&&typeof n=="number"?this.#r={validation:e,min:n}:e==="max"&&typeof n=="number"?this.#r={validation:e,max:n}:e==="range"&&Array.isArray(n)?this.#r={validation:e,min:n[0],max:n[1]}:this.#r={validation:e},this}command(e){return e.#t=this,this.#o.push(e),this}commands(...e){for(let n of e)this.command(n);return this}run(e){return this.#u=e,this}lazyCommand(e,n){return this.#s.set(e,n),this}group(e,n){return this.#i.set(e,n),this}groupAlias(e,n,i){return this.#i.set(e,i),this.#p.set(e,n),this}modules(e){return this.#n=e,this}fallback(e){return this.#f=e,this}static#x=[{name:"help",short:"h",type:"boolean",description:"Show help for this command"}];#d(){let e=[],n=this.#t;for(;n!==void 0;)e.push(...n.#m),n=n.#t;return[...t.#x,...e,...this.#m,...this.#$]}#C(){return this.#t===void 0?this:this.#t.#C()}#y(){return this.#t===void 0?[this.#e]:[...this.#t.#y(),this.#e]}#_(e){return this.#o.find(n=>n.#e===e||n.#l.includes(e))}#O(e){let{validation:n,count:i,min:s,max:r}=this.#r,o=e.length;switch(n){case"no-args":if(o>0)return"This command takes no arguments";break;case"exact":if(o!==i)return`Expected exactly ${i} argument(s), got ${o}`;break;case"min":if(o<(s??0))return`Expected at least ${s} argument(s), got ${o}`;break;case"max":if(o>(r??1/0))return`Expected at most ${r} argument(s), got ${o}`;break;case"range":if(o<(s??0)||o>(r??1/0))return`Expected ${s}-${r} arguments, got ${o}`;break}}async parse(e){let n=e??x.process.args;return await this.#F(n,[])}async#F(e,n){let i=this.#d(),s=h(i),r=this.#o.length>0||this.#s.size>0||this.#i.size>0||this.#n!==void 0,o=u(e,{...s,stopEarly:r}),a=$(o,i),d=o._;if(this.#h!==void 0&&a.version===!0)return console.log(`${this.#e} ${this.#h}`),p(void 0);if(a.help===!0)return console.log(this.help()),p(void 0);let c=d[0];if(c!==void 0&&r){let F=this.#_(c);if(F!==void 0)return await F.#F(d.slice(1),[...n,this.#e]);if(this.#s.has(c)){let l=await this.#s.get(c).load();return l instanceof t?(l.#t=this,await l.parse(d.slice(1))):"parse"in l&&typeof l.parse=="function"?await l.parse(d.slice(1)):(console.log(l.help()),p(void 0))}if(this.#n!==void 0){let g=this.#n.aliases?.[c]??c,l=this.#n.modules[g];if(l!==void 0)return await(await l.load()).main(d.slice(1))}for(let[g,l]of this.#i)if(c===g){let m=d[1];if(m===void 0||m==="--help"||m==="-h")return this.#b(g,l),p(void 0);let G=l.aliases?.[m]??m,b=l.modules[G];return b===void 0?(console.error(`Unknown module: ${g} ${m}
89
+ `),this.#b(g,l),f({exitCode:1})):await(await b.load()).main(d.slice(2))}if(this.#f!==void 0)return await this.#f(c,d.slice(1))}if(this.#u===void 0)return console.log(this.help()),p(void 0);let C=_(a,i);if(C.length>0)return f({message:C.join(`
90
90
  `),exitCode:1});let y=this.#O(d);if(y!==void 0)return f({message:y,exitCode:1});let L=[...n,this.#e],z={args:d,flags:a,root:this.#C(),commandPath:L};return await this.#u(z)}#b(e,n){console.log(`${this.#e} ${e} - ${n.description}
91
91
  `),console.log(`Usage: ${this.#e} ${e} <module> [options]
92
- `);let r=new Map;for(let[s,i]of Object.entries(n.modules)){let o=i.category??"Modules",a=r.get(o)??[];a.push([s,i]),r.set(o,a)}for(let[s,i]of r){console.log(`${s}:`);for(let[o,a]of i)console.log(` ${o.padEnd(24)} ${a.description}`);console.log()}if(n.aliases!==void 0&&Object.keys(n.aliases).length>0){console.log("Aliases:");for(let[s,i]of Object.entries(n.aliases))console.log(` ${s.padEnd(24)} \u2192 ${i}`)}}help(){let e=[...this.#o.map(r=>({name:r.#e,aliases:r.#l.length>0?r.#l:void 0,description:r.#a,usage:r.#c,examples:r.#g,flags:r.#d(),children:[]})),...[...this.#s.entries()].map(([r,s])=>({name:r,description:s.description,flags:[],children:[]})),...this.#n!==void 0?Object.entries(this.#n.modules).map(([r,s])=>({name:r,description:s.description,flags:s.flags??[],children:[]})):[],...[...this.#r.entries()].filter(([r])=>!this.#p.has(r)).map(([r,s])=>{let i=[...this.#p.entries()].filter(([o,a])=>a===r).map(([o])=>o);return{name:r,aliases:i.length>0?i:void 0,description:s.description,flags:[],children:[]}})],n={name:this.#e,description:this.#a,usage:this.#c,examples:this.#g,flags:this.#d(),children:e};return M(n,this.#y())}#M(){let e=r=>r.map(s=>({name:s.name,short:s.short,description:s.description,takesValue:s.type!=="boolean"})),n=r=>{let s=r.#o.map(n);for(let[i,o]of r.#s)s.push({name:i,description:o.description,children:[],flags:[]});if(r.#n!==void 0)for(let[i,o]of Object.entries(r.#n.modules))s.push({name:i,description:o.description,children:[],flags:o.flags!==void 0?e(o.flags):[]});for(let[i,o]of r.#r){let a=Object.entries(o.modules).map(([d,c])=>({name:d,description:c.description,children:[],flags:c.flags!==void 0?e(c.flags):[]}));s.push({name:i,description:o.description,children:a,flags:[]})}return{name:r.#e,description:r.#a,children:s,flags:e(r.#d())}};return n(this)}completions(e){let n=this.#M();return E(e,this.#e,n)}};export{re as a,N as b};
92
+ `);let i=new Map;for(let[s,r]of Object.entries(n.modules)){let o=r.category??"Modules",a=i.get(o)??[];a.push([s,r]),i.set(o,a)}for(let[s,r]of i){console.log(`${s}:`);for(let[o,a]of r)console.log(` ${o.padEnd(24)} ${a.description}`);console.log()}if(n.aliases!==void 0&&Object.keys(n.aliases).length>0){console.log("Aliases:");for(let[s,r]of Object.entries(n.aliases))console.log(` ${s.padEnd(24)} \u2192 ${r}`)}}help(){let e=[...this.#o.map(i=>({name:i.#e,aliases:i.#l.length>0?i.#l:void 0,description:i.#a,usage:i.#c,examples:i.#g,flags:i.#d(),children:[]})),...[...this.#s.entries()].map(([i,s])=>({name:i,description:s.description,flags:[],children:[]})),...this.#n!==void 0?Object.entries(this.#n.modules).map(([i,s])=>({name:i,description:s.description,flags:s.flags??[],children:[]})):[],...[...this.#i.entries()].filter(([i])=>!this.#p.has(i)).map(([i,s])=>{let r=[...this.#p.entries()].filter(([o,a])=>a===i).map(([o])=>o);return{name:i,aliases:r.length>0?r:void 0,description:s.description,flags:[],children:[]}})],n={name:this.#e,description:this.#a,usage:this.#c,examples:this.#g,flags:this.#d(),children:e};return M(n,this.#y())}#M(){let e=i=>i.map(s=>({name:s.name,short:s.short,description:s.description,takesValue:s.type!=="boolean"})),n=i=>{let s=i.#o.map(n);for(let[r,o]of i.#s)s.push({name:r,description:o.description,children:[],flags:[]});if(i.#n!==void 0)for(let[r,o]of Object.entries(i.#n.modules))s.push({name:r,description:o.description,children:[],flags:o.flags!==void 0?e(o.flags):[]});for(let[r,o]of i.#i){let a=Object.entries(o.modules).map(([d,c])=>({name:d,description:c.description,children:[],flags:c.flags!==void 0?e(c.flags):[]}));s.push({name:r,description:o.description,children:a,flags:[]})}return{name:i.#e,description:i.#a,children:s,flags:e(i.#d())}};return n(this)}completions(e){let n=this.#M();return E(e,this.#e,n)}};export{ie as a,N as b};
@@ -1,4 +1,4 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as E,b as A,c as I}from"./chunk-AGRTWPDI.js";import{a as w}from"./chunk-2VEVVX6U.js";import{a as v}from"./chunk-4DOMGQOO.js";import{f as D}from"./chunk-3BEX5FYF.js";import{b as l,f as g,g as k,h as C,i as h}from"./chunk-3SXTMY75.js";import{g as a}from"./chunk-A6RDYP6R.js";import{v as b}from"./chunk-MRCBHVSB.js";var u=v(),O=/\/\*\*\s*([\s\S]*?)\s*\*\//g,R=/export\s+(const|function|class|type|interface)\s+(\w+)/g,$=/@example/,S=s=>{let n=[],i;for(R.lastIndex=0;(i=R.exec(s))!==null;){let e=i.index,t=i[2];if(t===void 0)continue;let c=s.substring(0,e).split(`
2
+ import{a as E,b as A,c as I}from"./chunk-KBFKBL6A.js";import{a as w}from"./chunk-2VEVVX6U.js";import{a as v}from"./chunk-4DOMGQOO.js";import{f as D}from"./chunk-3BEX5FYF.js";import{b as l,f as g,g as k,h as C,i as h}from"./chunk-3SXTMY75.js";import{g as a}from"./chunk-A6RDYP6R.js";import{v as b}from"./chunk-MRCBHVSB.js";var u=v(),O=/\/\*\*\s*([\s\S]*?)\s*\*\//g,R=/export\s+(const|function|class|type|interface)\s+(\w+)/g,$=/@example/,S=s=>{let n=[],i;for(R.lastIndex=0;(i=R.exec(s))!==null;){let e=i.index,t=i[2];if(t===void 0)continue;let c=s.substring(0,e).split(`
3
3
  `).length,p=null,m=[...s.substring(0,e).matchAll(O)];if(m.length>0){let r=m[m.length-1];if(r!==void 0){let d=(r.index??0)+r[0].length,f=s.substring(d,e);/^\s*$/.test(f)&&(p=r[1]??null)}}n.push({jsdoc:p,symbolName:t,line:c})}return n},_=(s,n,i)=>{let e=[];if(s===null)return e.push("missing-description"),e;let t=s.split(`
4
4
  `)[0]?.trim();return(!t||t.startsWith("@"))&&e.push("empty-description"),i&&!$.test(s)&&e.push("missing-example"),e},F=async(s={})=>{let{root:n=".",requireExamples:i=!1}=s,e=await E(n),t=[],o=0,c=0;for(let p of e){let y=await I(p.path);for(let m of y){let r=A(m,p.path),d;try{d=await b.runtime.fs.readTextFile(r)}catch{continue}o++;let f=S(d);for(let{jsdoc:T,symbolName:x,line:P}of f){c++;let M=_(T,x,i);for(let N of M)t.push({file:r,symbol:x,issue:N,line:P})}}}return{isValid:t.length===0,issues:t,filesChecked:o,symbolsChecked:c}},J=s=>{switch(s){case"missing-description":return"Missing JSDoc documentation";case"missing-param":return"Missing @param documentation";case"missing-returns":return"Missing @returns documentation";case"missing-example":return"Missing @example";case"empty-description":return"Empty description"}},j=s=>D.fromPromise(()=>F(s)),V=s=>a.ok({root:"."}),q=s=>{if(a.isFail(s))return u.writeln(g("\u2717"),l(" "+String(s.error))),a.fail({exitCode:1});let{value:n}=s;if(u.writeln(h("\u2139"),l(` Checked ${n.filesChecked} files, ${n.symbolsChecked} symbols.`)),!n.isValid){u.writeln(g("\u2717"),l(` Found ${n.issues.length} documentation issues:`));let i=new Map;for(let e of n.issues){let t=i.get(e.file)??[];t.push(e),i.set(e.file,t)}for(let[e,t]of i){u.writeln(C("\u26A0"),l(" "+e));for(let o of t){let c=o.line!==void 0?`:${o.line}`:"";u.writeln(h("\u2139"),l(` ${o.symbol}${c}: ${J(o.issue)}`))}}return a.fail({exitCode:1})}return u.writeln(k("\u2713"),l(" All documentation is valid.")),a.ok(void 0)},B=w.createTrigger({handler:j,adaptInput:V,adaptOutput:q}),Q=async s=>await B({command:"validate-docs",args:[],flags:{}});export{F as a,j as b,B as c,Q as d};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{a as C,c as E}from"./chunk-AGRTWPDI.js";import{a as k}from"./chunk-2VEVVX6U.js";import{a as x}from"./chunk-4DOMGQOO.js";import{f as h}from"./chunk-3BEX5FYF.js";import{b as i,f as d,g as f,h as u,i as g}from"./chunk-3SXTMY75.js";import{g as n}from"./chunk-A6RDYP6R.js";import{v as c}from"./chunk-MRCBHVSB.js";var l=x(),b=t=>{let e=new Set,r=/export\s+\*\s+from\s+["']([^"']+)["']/g,a=/export\s+\{[^}]*\}\s+from\s+["']([^"']+)["']/g,o=/export\s+type\s+\{[^}]*\}\s+from\s+["']([^"']+)["']/g;for(let s of t.matchAll(r))s[1]!==void 0&&e.add(s[1]);for(let s of t.matchAll(a))s[1]!==void 0&&e.add(s[1]);for(let s of t.matchAll(o))s[1]!==void 0&&e.add(s[1]);return e},y=t=>{let e=t.startsWith("./")?t.slice(2):t;return e.endsWith(".ts")&&(e=e.slice(0,-3)),e},O=t=>!(t==="mod.ts"||t.endsWith("_test.ts")||t.endsWith("_bench.ts")||t.startsWith("_")||t.includes("/")),P=async(t={})=>{let{root:e=".",failFast:r=!1}=t,a=await C(e),o=[];for(let s of a){let v=c.runtime.path.join(s.path,"mod.ts"),m;try{m=await c.runtime.fs.readTextFile(v)}catch{continue}let M=b(m),w=new Set([...M].map(p=>y(p))),A=await E(s.path);for(let p of A){let R=c.runtime.path.basename(p);if(!O(R))continue;let F=y(p);if(!w.has(F)&&(o.push({packageName:s.name,file:p}),r))return{isComplete:!1,missingExports:o,packagesChecked:a.length}}}return{isComplete:o.length===0,missingExports:o,packagesChecked:a.length}},W=t=>h.fromPromise(()=>P(t)),_=t=>n.ok({root:"."}),z=t=>{if(n.isFail(t))return l.writeln(d("\u2717"),i(" "+String(t.error))),n.fail({exitCode:1});let{value:e}=t;if(l.writeln(g("\u2139"),i(` Checked ${e.packagesChecked} packages.`)),!e.isComplete){l.writeln(d("\u2717"),i(` Found ${e.missingExports.length} missing exports:`));for(let r of e.missingExports)l.writeln(u("\u26A0"),i(` ${r.packageName}: ${r.file}`));return n.fail({exitCode:1})}return l.writeln(f("\u2713"),i(" All mod.ts exports are complete.")),n.ok(void 0)},S=k.createTrigger({handler:W,adaptInput:_,adaptOutput:z}),N=async t=>await S({command:"validate-mod-exports",args:[],flags:{}});export{P as a,W as b,S as c,N as d};
2
+ import{a as C,c as E}from"./chunk-KBFKBL6A.js";import{a as k}from"./chunk-2VEVVX6U.js";import{a as x}from"./chunk-4DOMGQOO.js";import{f as h}from"./chunk-3BEX5FYF.js";import{b as i,f as d,g as f,h as u,i as g}from"./chunk-3SXTMY75.js";import{g as n}from"./chunk-A6RDYP6R.js";import{v as c}from"./chunk-MRCBHVSB.js";var l=x(),b=t=>{let e=new Set,r=/export\s+\*\s+from\s+["']([^"']+)["']/g,a=/export\s+\{[^}]*\}\s+from\s+["']([^"']+)["']/g,o=/export\s+type\s+\{[^}]*\}\s+from\s+["']([^"']+)["']/g;for(let s of t.matchAll(r))s[1]!==void 0&&e.add(s[1]);for(let s of t.matchAll(a))s[1]!==void 0&&e.add(s[1]);for(let s of t.matchAll(o))s[1]!==void 0&&e.add(s[1]);return e},y=t=>{let e=t.startsWith("./")?t.slice(2):t;return e.endsWith(".ts")&&(e=e.slice(0,-3)),e},O=t=>!(t==="mod.ts"||t.endsWith("_test.ts")||t.endsWith("_bench.ts")||t.startsWith("_")||t.includes("/")),P=async(t={})=>{let{root:e=".",failFast:r=!1}=t,a=await C(e),o=[];for(let s of a){let v=c.runtime.path.join(s.path,"mod.ts"),m;try{m=await c.runtime.fs.readTextFile(v)}catch{continue}let M=b(m),w=new Set([...M].map(p=>y(p))),A=await E(s.path);for(let p of A){let R=c.runtime.path.basename(p);if(!O(R))continue;let F=y(p);if(!w.has(F)&&(o.push({packageName:s.name,file:p}),r))return{isComplete:!1,missingExports:o,packagesChecked:a.length}}}return{isComplete:o.length===0,missingExports:o,packagesChecked:a.length}},W=t=>h.fromPromise(()=>P(t)),_=t=>n.ok({root:"."}),z=t=>{if(n.isFail(t))return l.writeln(d("\u2717"),i(" "+String(t.error))),n.fail({exitCode:1});let{value:e}=t;if(l.writeln(g("\u2139"),i(` Checked ${e.packagesChecked} packages.`)),!e.isComplete){l.writeln(d("\u2717"),i(` Found ${e.missingExports.length} missing exports:`));for(let r of e.missingExports)l.writeln(u("\u26A0"),i(` ${r.packageName}: ${r.file}`));return n.fail({exitCode:1})}return l.writeln(f("\u2713"),i(" All mod.ts exports are complete.")),n.ok(void 0)},S=k.createTrigger({handler:W,adaptInput:_,adaptOutput:z}),N=async t=>await S({command:"validate-mod-exports",args:[],flags:{}});export{P as a,W as b,S as c,N as d};
@@ -0,0 +1,5 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ import{b as k}from"./chunk-NBA6EFWU.js";import{d as F,f as T,h as C,j as d,k as L,n as u}from"./chunk-7ATUODBM.js";import{a as g}from"./chunk-AP72BKVG.js";import{t as D}from"./chunk-MRCBHVSB.js";var R={USE_CLIENT:"use client",USE_SERVER:"use server",USE_STRICT:"use strict"},M=[/node_modules/,/\.test\./,/\.spec\./],G=(t,e)=>{let r=t.split(`
3
+ `),i=e.toLowerCase(),o=!1;for(let s=0;s<Math.min(50,r.length);s++){let n=r[s]?.trim()??"";if(o){n.includes("*/")&&(o=!1);continue}if(n===""||n.startsWith("//"))continue;if(n.startsWith("/*")){n.includes("*/")||(o=!0);continue}let f=`"${i}";`,a=`'${i}';`,l=n.toLowerCase();if(l===f||l===a)return!0;if(n.startsWith("import")||n.startsWith("export")||n.startsWith("const")||n.startsWith("let")||n.startsWith("var")||n.startsWith("function")||n.startsWith("class"))break}return!1},W=t=>{let e=new Set,r=t.matchAll(/export\s+(?:async\s+)?function\s+(\w+)/g);for(let n of r)n[1]!==void 0&&e.add(n[1]);let i=t.matchAll(/export\s+(?:const|let)\s+(\w+)\s*=/g);for(let n of i)n[1]!==void 0&&e.add(n[1]);let o=t.matchAll(/export\s+class\s+(\w+)/g);for(let n of o)n[1]!==void 0&&e.add(n[1]);/export\s+default\s+/.test(t)&&e.add("default");let s=t.matchAll(/export\s*\{([\w\s,]+)\}/g);for(let n of s)if(n[1]!==void 0){let f=n[1].split(",").map(a=>{let l=a.trim().split(/ {1,10}as {1,10}/);return(l[1]??l[0])?.trim()});for(let a of f)a!==void 0&&a!==""&&e.add(a)}return[...e]},O=async t=>{try{return await D.fs.readTextFile(t)}catch{return null}},Q=async(t,e,r={})=>{let i=r.extensions??k,o=r.skip??M,s=r.projectRoot??t,n=[];for await(let f of D.fs.walk(t,{exts:[...i],skip:[...o]})){if(!f.isFile)continue;let a=await O(f.path);if(a!==null&&G(a,e)){let l=D.path.relative(s,f.path),m=W(a);n.push({filePath:f.path,relativePath:l,directive:e,exports:m})}}return n},Y=(t,e={})=>Q(t,R.USE_CLIENT,e),X=(t,e)=>{let r=`"${e}"`,i=`'${e}'`;return t.includes(r)||t.includes(i)},Z=async(t,e={})=>{let r=e.extensions??k,i=e.skip??M,o=e.projectRoot??t,s=[];for await(let n of D.fs.walk(t,{exts:[...r],skip:[...i]})){if(!n.isFile)continue;let f=await O(n.path);if(f!==null&&X(f,R.USE_SERVER)){let a=D.path.relative(o,n.path),l=W(f);s.push({filePath:n.path,relativePath:a,directive:R.USE_SERVER,exports:l})}}return s};function w(t){return t.isFile?"file":t.isDirectory?"dir":t.isSymlink?"symlink":void 0}async function x(t){try{let e=await Deno.stat(t);_(e);return}catch(e){if(!(e instanceof Deno.errors.NotFound))throw e}try{await Deno.mkdir(t,{recursive:!0})}catch(e){if(!(e instanceof Deno.errors.AlreadyExists))throw e;let r=await Deno.stat(t);_(r)}}function _(t){if(!t.isDirectory)throw new Error(`Failed to ensure directory exists: expected 'dir', got '${w(t)}'`)}function c(t){return t instanceof URL?C(t):t}function P(t,e,r=T){if(t=c(t),e=c(e),u(t)===u(e))return!1;let i=t.split(r),o=e.split(r);return i.every((s,n)=>o[n]===s)}function S(t,e){if(t===null)throw new Error(`${e} is unavailable`)}async function I(t,e,r){let i;try{i=await Deno.lstat(e)}catch(o){if(o instanceof Deno.errors.NotFound)return;throw o}if(r.isFolder&&!i.isDirectory)throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'`);if(!r.overwrite)throw new Deno.errors.AlreadyExists(`'${e}' already exists.`);return i}async function N(t,e,r){if(await I(t,e,r),await Deno.copyFile(t,e),r.preserveTimestamps){let i=await Deno.stat(t);S(i.atime,"statInfo.atime"),S(i.mtime,"statInfo.mtime"),await Deno.utime(e,i.atime,i.mtime)}}async function U(t,e,r){await I(t,e,r);let i=await Deno.readLink(t),o=w(await Deno.lstat(t));if(g?await Deno.symlink(i,e,{type:o==="dir"?"dir":"file"}):await Deno.symlink(i,e),r.preserveTimestamps){let s=await Deno.lstat(t);S(s.atime,"statInfo.atime"),S(s.mtime,"statInfo.mtime"),await Deno.utime(e,s.atime,s.mtime)}}async function j(t,e,r){if(await I(t,e,{...r,isFolder:!0})||await x(e),r.preserveTimestamps){let s=await Deno.stat(t);S(s.atime,"statInfo.atime"),S(s.mtime,"statInfo.mtime"),await Deno.utime(e,s.atime,s.mtime)}t=c(t),e=c(e);let o=[];for await(let s of Deno.readDir(t)){let n=d(t,s.name),f=d(e,F(n));s.isSymlink?o.push(U(n,f,r)):s.isDirectory?o.push(j(n,f,r)):s.isFile&&o.push(N(n,f,r))}await Promise.all(o)}async function wt(t,e,r={}){if(t=u(c(t)),e=u(c(e)),t===e)throw new Error("Source and destination cannot be the same");let i=await Deno.lstat(t);if(i.isDirectory&&P(t,e))throw new Error(`Cannot copy '${t}' to a subdirectory of itself: '${e}'`);i.isSymlink?await U(t,e,r):i.isDirectory?await j(t,e,r):i.isFile&&await N(t,e,r)}async function Ft(t){try{let e=await Array.fromAsync(Deno.readDir(t));await Promise.all(e.map(r=>{if(r&&r.name){let i=d(c(t),r.name);return Deno.remove(i,{recursive:!0})}}))}catch(e){if(!(e instanceof Deno.errors.NotFound))throw e;await Deno.mkdir(t,{recursive:!0})}}async function A(t){t=c(t),t=L(t);let e=F(t),r=await Deno.stat(t);return{path:t,name:e,isFile:r.isFile,isDirectory:r.isDirectory,isSymlink:r.isSymlink}}function E(t,e,r,i){return!(e&&!e.some(o=>t.endsWith(o))||r&&!r.some(o=>!!t.match(o))||i&&i.some(o=>!!t.match(o)))}async function*V(t,e){let{maxDepth:r=1/0,includeFiles:i=!0,includeDirs:o=!0,includeSymlinks:s=!0,followSymlinks:n=!1,canonicalize:f=!0,exts:a=void 0,match:l=void 0,skip:m=void 0}=e??{};if(!(r<0)&&(t=c(t),a&&(a=a.map(y=>y.startsWith(".")?y:`.${y}`)),o&&E(t,a,l,m)&&(yield await A(t)),!(r<1||!E(t,void 0,void 0,m))))for await(let y of Deno.readDir(t)){let p=d(t,y.name),{isSymlink:v,isDirectory:$}=y;if(v){if(!n){s&&E(p,a,l,m)&&(yield{path:p,...y});continue}let h=await Deno.realPath(p);f&&(p=h),{isSymlink:v,isDirectory:$}=await Deno.lstat(h)}if(v||$){let h={maxDepth:r-1,includeFiles:i,includeDirs:o,includeSymlinks:s,followSymlinks:n};a!==void 0&&(h.exts=a),l!==void 0&&(h.match=l),m!==void 0&&(h.skip=m),yield*V(p,h)}else i&&E(p,a,l,m)&&(yield{path:p,...y})}}var ue=globalThis.Deno?.build.os==="windows"?"`":"\\";var B=`
4
+ `,J=`\r
5
+ `,xe=globalThis.Deno?.build.os==="windows"?J:B;export{G as a,W as b,Y as c,Z as d,Ft as e,x as f,V as g,wt as h};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
+ var l=a=>a.replace(/[.*+?^${}()|[\]\\-]/g,"\\$&"),c=a=>{let n=[],i=new Set,r="",e=a,o=/\[(\.\.\.)?(\w+)\]/;for(;e.length>0;){let t=o.exec(e);if(t===null){r+=l(e);break}t.index>0&&(r+=l(e.slice(0,t.index)));let m=t[1]==="...",s=t[2];s!==void 0&&(n.push(s),m?(i.add(s),r+="(.*)"):r+="([^/]+)"),e=e.slice(t.index+t[0].length)}return{regex:new RegExp(`^${r}$`),paramNames:n,catchAllParams:i}},u=(a,n)=>{let i=a.match(n.regex);if(i===null)return null;let r={};for(let e=0;e<n.paramNames.length;e++){let o=n.paramNames[e],t=i[e+1];o!==void 0&&(n.catchAllParams.has(o)?r[o]=t!==void 0&&t!==""?t.split("/").filter(Boolean):[]:r[o]=t??"")}return r},g=(a,n)=>{let i=c(n);return u(a,i)};export{g as a};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import"./chunk-7ZYDAZBD.js";import"./chunk-46ZWBKIW.js";import{a as w,b as x}from"./chunk-GE3LJ6QM.js";import{a as h}from"./chunk-BNQAZLIQ.js";import{f,h as g,k as p}from"./chunk-GBM3TZFD.js";import{c as n,d,f as u}from"./chunk-3SXTMY75.js";import"./chunk-J7YTWK67.js";import{d as o}from"./chunk-PVPMHMKP.js";import"./chunk-CEYKWASA.js";import"./chunk-KKBIUT5L.js";import"./chunk-SQINSLNL.js";import"./chunk-MG65QJY6.js";import{a as l,b as m}from"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var b=`Output ONLY a conventional commit message. No explanation, no markdown, no code blocks, no bullet points.
2
+ import"./chunk-7ZYDAZBD.js";import"./chunk-46ZWBKIW.js";import{a as w,b as x}from"./chunk-GE3LJ6QM.js";import{a as h}from"./chunk-BNQAZLIQ.js";import{f,h as g,k as p}from"./chunk-GBM3TZFD.js";import{c as n,d,f as u}from"./chunk-3SXTMY75.js";import"./chunk-J7YTWK67.js";import{d as o}from"./chunk-PVPMHMKP.js";import"./chunk-4MVO4LD5.js";import"./chunk-KVTG56GS.js";import"./chunk-PZNCE6QK.js";import"./chunk-MG65QJY6.js";import{a as l,b as m}from"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var b=`Output ONLY a conventional commit message. No explanation, no markdown, no code blocks, no bullet points.
3
3
 
4
4
  Format: type(scope): description
5
5
  Types: feat, fix, chore, docs, refactor, test, style, perf, ci, build
@@ -1,4 +1,4 @@
1
1
  import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
2
- import{f as a,h as l,k as i}from"./chunk-GBM3TZFD.js";import{k as n}from"./chunk-3SXTMY75.js";import"./chunk-PWLF3WXM.js";import{a as t}from"./chunk-SQINSLNL.js";import"./chunk-MG65QJY6.js";import{a as o}from"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var h=["trace","debug","info","warn","error","fatal"],k=async m=>{let{flags:e}=t(m??[],[{name:"port",short:"p",type:"number",default:8e3,description:"Server port"},{name:"no-hmr",type:"boolean",description:"Disable HMR"},{name:"log-level",type:"string",default:"info",description:"Log level"},{name:"open",short:"o",type:"boolean",description:"Open browser"}]),r=a({renderer:i.ansi(),sink:l.stdout()});r.writeln(n(`
2
+ import{f as a,h as l,k as i}from"./chunk-GBM3TZFD.js";import{k as n}from"./chunk-3SXTMY75.js";import"./chunk-PWLF3WXM.js";import{a as t}from"./chunk-PZNCE6QK.js";import"./chunk-MG65QJY6.js";import{a as o}from"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var h=["trace","debug","info","warn","error","fatal"],k=async m=>{let{flags:e}=t(m??[],[{name:"port",short:"p",type:"number",default:8e3,description:"Server port"},{name:"no-hmr",type:"boolean",description:"Disable HMR"},{name:"log-level",type:"string",default:"info",description:"Log level"},{name:"open",short:"o",type:"boolean",description:"Open browser"}]),r=a({renderer:i.ansi(),sink:l.stdout()});r.writeln(n(`
3
3
  \u26A1 Starting development server...
4
- `));let p=e.port,s=e["log-level"]??"info",c=!e["no-hmr"],g=e.open??!1,d=h.includes(s.toLowerCase())?s.toLowerCase():"info",[{startServer:u},{reactRenderer:L,reactHtmlShellBuilder:f},{reactPlugin:v},{createTailwindPlugin:b}]=await Promise.all([import("./main-JTYNMHNL.js"),import("./mod-NCF6OSXO.js"),import("./mod-SA3J2VR5.js"),import("./mod-JZNE2HH6.js")]);return await r.close(),await u({mode:"dev",port:p,logLevel:d,hmr:c,open:g,renderer:L,htmlShell:f,frameworkPlugin:v,cssPlugin:b({globalCssPath:"src/app/styles/global.css"})}),o(void 0)};export{k as main};
4
+ `));let p=e.port,s=e["log-level"]??"info",c=!e["no-hmr"],g=e.open??!1,d=h.includes(s.toLowerCase())?s.toLowerCase():"info",[{startServer:u},{reactRenderer:L,reactHtmlShellBuilder:f},{reactPlugin:v},{createTailwindPlugin:b}]=await Promise.all([import("./main-HJQEBLLN.js"),import("./mod-NCF6OSXO.js"),import("./mod-OS3BCM2G.js"),import("./mod-JZNE2HH6.js")]);return await r.close(),await u({mode:"dev",port:p,logLevel:d,hmr:c,open:g,renderer:L,htmlShell:f,frameworkPlugin:v,cssPlugin:b({globalCssPath:"src/app/styles/global.css"})}),o(void 0)};export{k as main};