@dtsx/dtsx 0.11.38 → 0.11.39

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 (191) hide show
  1. package/README.md +18 -12
  2. package/dist/bin/cli.js +1 -1
  3. package/dist/{chunk-xfjfhe9d.js → chunk-0c03j9eq.js} +2 -2
  4. package/dist/{chunk-32qexm3w.js → chunk-0m1wt3db.js} +2 -2
  5. package/dist/{chunk-g2120ysy.js → chunk-2dstvjpv.js} +2 -2
  6. package/dist/{chunk-sd8bywh9.js → chunk-2ngfncfx.js} +11 -11
  7. package/dist/{chunk-88gwzbew.js → chunk-31kbs9mj.js} +3 -3
  8. package/dist/{chunk-d0bazr3p.js → chunk-3dweac93.js} +2 -2
  9. package/dist/{chunk-7tremqhs.js → chunk-3jjrn16z.js} +6 -6
  10. package/dist/chunk-3mcz22q8.js +37 -0
  11. package/dist/{chunk-gspsxc9d.js → chunk-3s37g6bh.js} +8 -8
  12. package/dist/{chunk-y5k0szq6.js → chunk-45fpbdw3.js} +2 -2
  13. package/dist/{chunk-mkakbjvs.js → chunk-4q78f5pg.js} +2 -2
  14. package/dist/{chunk-0k0fhq13.js → chunk-550teag8.js} +10 -10
  15. package/dist/{chunk-ebjafajx.js → chunk-60wrxcjt.js} +7 -7
  16. package/dist/{chunk-bnry23ve.js → chunk-6epjc5rj.js} +3 -3
  17. package/dist/{chunk-p023fhce.js → chunk-7bt7x8sy.js} +3 -3
  18. package/dist/{chunk-ag1b6d30.js → chunk-7j4cgkb4.js} +2 -2
  19. package/dist/{chunk-xa6rsd4b.js → chunk-7ynrmx5b.js} +6 -6
  20. package/dist/{chunk-p9vfxn8g.js → chunk-7z8pykqp.js} +2 -2
  21. package/dist/{chunk-rbx6q1r0.js → chunk-8dvxjzhy.js} +2 -2
  22. package/dist/{chunk-50h54rax.js → chunk-8fg11pr7.js} +3 -3
  23. package/dist/{chunk-zq93f8ca.js → chunk-8kj9pkw5.js} +2 -2
  24. package/dist/chunk-8zvjkzsv.js +3 -0
  25. package/dist/{chunk-ft2zk7jx.js → chunk-996gqrz6.js} +2 -2
  26. package/dist/{chunk-6yvk3q1e.js → chunk-9gp0e3kn.js} +2 -2
  27. package/dist/{chunk-cv29b4zb.js → chunk-a3apthex.js} +2 -2
  28. package/dist/{chunk-xwpn40p0.js → chunk-a3vfqhnp.js} +3 -3
  29. package/dist/{chunk-kfk554fj.js → chunk-aak9xzy7.js} +2 -2
  30. package/dist/{chunk-eba562w8.js → chunk-aq7y0s2v.js} +4 -4
  31. package/dist/{chunk-ja7bp731.js → chunk-axj2w6hp.js} +2 -2
  32. package/dist/chunk-ayyb1jpe.js +3 -0
  33. package/dist/{chunk-8tzd98q8.js → chunk-bc7ahgxz.js} +4 -4
  34. package/dist/{chunk-cpmqa8kd.js → chunk-bkbsg2bv.js} +2 -2
  35. package/dist/{chunk-yay68832.js → chunk-btc6zbyj.js} +2 -2
  36. package/dist/{chunk-1j6092xz.js → chunk-c7a07a26.js} +4 -4
  37. package/dist/{chunk-htgy94y3.js → chunk-cyw59tgm.js} +1 -1
  38. package/dist/{chunk-hnqm1zb3.js → chunk-dh3y4pf7.js} +4 -4
  39. package/dist/{chunk-yrv6z221.js → chunk-dpcvehxp.js} +2 -2
  40. package/dist/{chunk-hv8bx8xx.js → chunk-ee109s3r.js} +6 -6
  41. package/dist/{chunk-1qtghb2x.js → chunk-ex03kbwr.js} +2 -2
  42. package/dist/{chunk-2436cnmb.js → chunk-fay5vymp.js} +2 -2
  43. package/dist/{chunk-mwyjxjqa.js → chunk-g3zt5h6d.js} +2 -2
  44. package/dist/{chunk-rz060wxt.js → chunk-hgscwj1y.js} +4 -4
  45. package/dist/{chunk-83qnrx0m.js → chunk-hqph3vnd.js} +5 -5
  46. package/dist/chunk-hvy1zvk6.js +3 -0
  47. package/dist/{chunk-vf3ybe5r.js → chunk-jfygtm4r.js} +2 -2
  48. package/dist/{chunk-cyr45de1.js → chunk-jhpfmjnx.js} +2 -2
  49. package/dist/chunk-js4m0y2m.js +3 -0
  50. package/dist/{chunk-bxc2herz.js → chunk-jswvvjkr.js} +3 -3
  51. package/dist/{chunk-kkshxyex.js → chunk-jvqczw2k.js} +3 -3
  52. package/dist/{chunk-v93389xm.js → chunk-jyq39qjt.js} +2 -2
  53. package/dist/{chunk-pga5m4wm.js → chunk-k5wz43yh.js} +2 -2
  54. package/dist/{chunk-tka2m4af.js → chunk-ka8mbyjb.js} +2 -2
  55. package/dist/{chunk-42j9cfte.js → chunk-kccc6p2t.js} +2 -2
  56. package/dist/{chunk-2qd3axyx.js → chunk-khyg6w62.js} +4 -4
  57. package/dist/{chunk-9menejdz.js → chunk-kv0bpgyw.js} +2 -2
  58. package/dist/{chunk-3t57mzvf.js → chunk-kv3x5jrs.js} +2 -2
  59. package/dist/{chunk-zgcdx773.js → chunk-m0tacjrk.js} +3 -3
  60. package/dist/{chunk-kpbz61yy.js → chunk-nd0sbh5r.js} +3 -3
  61. package/dist/{chunk-rkstz4w1.js → chunk-nqgfrehj.js} +4 -4
  62. package/dist/{chunk-vkahj2ab.js → chunk-p4hf9bwj.js} +6 -6
  63. package/dist/{chunk-e29rp5xj.js → chunk-phwfth21.js} +5 -5
  64. package/dist/chunk-qq5x44y9.js +38 -0
  65. package/dist/{chunk-pjqzkgzk.js → chunk-qrwst9bb.js} +4 -4
  66. package/dist/{chunk-0yg5mcrf.js → chunk-sgcne5bb.js} +2 -2
  67. package/dist/{chunk-sv8h007a.js → chunk-t6ds7drh.js} +2 -2
  68. package/dist/{chunk-082w7zvy.js → chunk-tm2j0feh.js} +3 -3
  69. package/dist/{chunk-danfamyx.js → chunk-vae5wxar.js} +2 -2
  70. package/dist/{chunk-189nn4fc.js → chunk-vbzchjvq.js} +2 -2
  71. package/dist/{chunk-zk3w5sqv.js → chunk-veh8ks5v.js} +2 -2
  72. package/dist/{chunk-qzjzw9p2.js → chunk-vf8jmdsp.js} +2 -2
  73. package/dist/{chunk-wnqg6hem.js → chunk-vgmnxnjf.js} +14 -14
  74. package/dist/{chunk-a7nvyxpg.js → chunk-w26wgqh8.js} +4 -4
  75. package/dist/{chunk-h3n6256r.js → chunk-x3arymvk.js} +2 -2
  76. package/dist/{chunk-96atbsd3.js → chunk-y3x7p6jf.js} +2 -2
  77. package/dist/{chunk-davy89dj.js → chunk-y4wykrya.js} +4 -4
  78. package/dist/{chunk-9gts9ymh.js → chunk-ybzz1jg7.js} +2 -2
  79. package/dist/chunk-yde8rmfm.js +31 -0
  80. package/dist/{chunk-y1g6v96c.js → chunk-yzdh207n.js} +4 -4
  81. package/dist/chunk-z6mpxpxt.js +3 -0
  82. package/dist/{chunk-ghfd34r7.js → chunk-zbe06f63.js} +2 -2
  83. package/dist/{chunk-4fygcxtb.js → chunk-zk55g2cb.js} +2 -2
  84. package/dist/{chunk-t4va49p3.js → chunk-zn2gvwve.js} +4 -4
  85. package/dist/src/augmentation-graph.js +1 -1
  86. package/dist/src/binding-patterns.js +1 -1
  87. package/dist/src/branded-types.d.ts +0 -11
  88. package/dist/src/branded-types.js +1 -1
  89. package/dist/src/bundle-linker.js +1 -1
  90. package/dist/src/bundler.js +1 -1
  91. package/dist/src/cache.js +1 -1
  92. package/dist/src/call-signatures.js +1 -1
  93. package/dist/src/circular.js +1 -1
  94. package/dist/src/compat.js +1 -1
  95. package/dist/src/computed-keys.js +1 -1
  96. package/dist/src/concurrency.js +1 -1
  97. package/dist/src/config.js +1 -1
  98. package/dist/src/dangling-refs.js +1 -1
  99. package/dist/src/declaration-project.js +1 -1
  100. package/dist/src/declaration-publication.js +1 -1
  101. package/dist/src/declaration-references.js +1 -1
  102. package/dist/src/diff.js +1 -1
  103. package/dist/src/docs.js +1 -1
  104. package/dist/src/enum-declarations.js +1 -1
  105. package/dist/src/errors.js +1 -1
  106. package/dist/src/extractor/directives.js +1 -1
  107. package/dist/src/extractor/extract.js +1 -1
  108. package/dist/src/extractor/scanner.js +1 -1
  109. package/dist/src/extractor.js +1 -1
  110. package/dist/src/formats.js +1 -1
  111. package/dist/src/formatter.js +1 -1
  112. package/dist/src/function-properties.js +1 -1
  113. package/dist/src/generator.js +1 -1
  114. package/dist/src/global-types.js +1 -1
  115. package/dist/src/import-sorter.js +1 -1
  116. package/dist/src/incremental.d.ts +4 -4
  117. package/dist/src/incremental.js +1 -1
  118. package/dist/src/index.js +1 -1
  119. package/dist/src/inferred-imports.js +1 -1
  120. package/dist/src/json-config.js +1 -1
  121. package/dist/src/lexical.js +1 -1
  122. package/dist/src/logger.js +1 -1
  123. package/dist/src/lsp.js +1 -1
  124. package/dist/src/memory.js +1 -1
  125. package/dist/src/merger.js +1 -1
  126. package/dist/src/module-graph.js +1 -1
  127. package/dist/src/module-references.js +1 -1
  128. package/dist/src/native-checker.js +1 -1
  129. package/dist/src/native-engine.js +1 -1
  130. package/dist/src/native-extractor.js +1 -1
  131. package/dist/src/native-generation.js +1 -1
  132. package/dist/src/native-project.js +1 -1
  133. package/dist/src/optimizer.js +1 -1
  134. package/dist/src/output-normalizer.js +1 -1
  135. package/dist/src/parallel-processor.js +1 -1
  136. package/dist/src/parameters.d.ts +18 -0
  137. package/dist/src/parameters.js +1 -1
  138. package/dist/src/parser.js +1 -1
  139. package/dist/src/plugins/bun.js +1 -1
  140. package/dist/src/plugins/esbuild.js +1 -1
  141. package/dist/src/plugins/index.js +1 -1
  142. package/dist/src/plugins/tsdown.js +1 -1
  143. package/dist/src/plugins/tsup.js +1 -1
  144. package/dist/src/plugins/vite.js +1 -1
  145. package/dist/src/plugins/webpack.js +1 -1
  146. package/dist/src/plugins.js +1 -1
  147. package/dist/src/process-source.js +1 -1
  148. package/dist/src/processor/cache.js +1 -1
  149. package/dist/src/processor/comments.js +1 -1
  150. package/dist/src/processor/declarations.js +1 -1
  151. package/dist/src/processor/import-usage.js +1 -1
  152. package/dist/src/processor/imports.js +1 -1
  153. package/dist/src/processor/index.js +1 -1
  154. package/dist/src/processor/type-inference.d.ts +29 -0
  155. package/dist/src/processor/type-inference.js +1 -1
  156. package/dist/src/processor.js +1 -1
  157. package/dist/src/profiling.js +1 -1
  158. package/dist/src/return-type-scope.js +1 -1
  159. package/dist/src/security.js +1 -1
  160. package/dist/src/source-cache.js +1 -1
  161. package/dist/src/sourcemap.js +1 -1
  162. package/dist/src/stx.js +1 -1
  163. package/dist/src/syntax-validator.js +1 -1
  164. package/dist/src/tracking.js +1 -1
  165. package/dist/src/transformers.js +1 -1
  166. package/dist/src/tree-shaker.js +1 -1
  167. package/dist/src/tsconfig.js +1 -1
  168. package/dist/src/type-mappings.d.ts +0 -13
  169. package/dist/src/type-mappings.js +1 -1
  170. package/dist/src/utils.js +1 -1
  171. package/dist/src/value-inference.js +1 -1
  172. package/dist/src/vue.js +1 -1
  173. package/dist/src/watcher.js +1 -1
  174. package/dist/src/worker-thread.js +1 -1
  175. package/dist/src/worker.js +1 -1
  176. package/dist/src/workspace.js +1 -1
  177. package/native/darwin-arm64/libzig-dtsx.dylib +0 -0
  178. package/native/darwin-x64/libzig-dtsx.dylib +0 -0
  179. package/native/freebsd-x64/libzig-dtsx.so +0 -0
  180. package/native/linux-arm64/libzig-dtsx.so +0 -0
  181. package/native/linux-x64/libzig-dtsx.so +0 -0
  182. package/native/windows-x64/zig-dtsx.dll +0 -0
  183. package/package.json +1 -1
  184. package/dist/chunk-0rmbc5zp.js +0 -3
  185. package/dist/chunk-0zfzhn19.js +0 -31
  186. package/dist/chunk-3fbt79hx.js +0 -3
  187. package/dist/chunk-73dzve1s.js +0 -3
  188. package/dist/chunk-8d3sdkv4.js +0 -24
  189. package/dist/chunk-hzn9kmq7.js +0 -3
  190. package/dist/chunk-jcckwgb9.js +0 -3
  191. package/dist/chunk-yx1jy7fx.js +0 -37
@@ -1,27 +1,27 @@
1
1
  // @bun
2
- import{t,d}from"./chunk-1j6092xz.js";import{W}from"./chunk-ag1b6d30.js";import{Pt}from"./chunk-yx1jy7fx.js";import{b}from"./chunk-vf3ybe5r.js";import{Y}from"./chunk-p9vfxn8g.js";import{relative as O}from"path";function J(n){let y=t(n),c=(l)=>y[l]?n.slice(y[l].start,y[l].end):"",i=c(0)==="export"?1:0;if(c(i++)!=="declare")return;let f;if(c(i)==="module"&&y[i+1]?.kind==="quoted"){if(f=d(c(i+1)),f===void 0)return;i+=2}else if(c(i++)!=="global")return;if(c(i)!=="{")return;let h=y[i].end,S=1;for(i++;i<y.length;i++)if(c(i)==="{")S++;else if(c(i)==="}"&&--S===0)return{specifier:f,body:n.slice(h,y[i].start),start:h,end:y[i].start};return}var ne=/^[A-Z_$][\w$]*$/i;function bo(n){let y=[],c=[],i=0,f=0,h=[],S=!1,l=0,E=n.length,R=(a)=>{let w=n.slice(i,a).trim();if(i=a,!w)return;if(se(w)){c.push(w);return}y.push({text:w,comments:c}),c=[]};while(l<E){let a=n[l];if(S){if(a==="\\"){l+=2;continue}if(a==="`"){S=!1,l++;continue}if(a==="$"&&n[l+1]==="{"){h.push(f),f++,S=!1,l+=2;continue}l++;continue}if(a==="/"&&n[l+1]==="*"){let w=n.indexOf("*/",l+2);l=w===-1?E:w+2;continue}if(a==="/"&&n[l+1]==="/"){let w=n.indexOf(`
2
+ import{t,d}from"./chunk-c7a07a26.js";import{j}from"./chunk-7j4cgkb4.js";import{It}from"./chunk-3mcz22q8.js";import{b}from"./chunk-jfygtm4r.js";import{Z}from"./chunk-7z8pykqp.js";import{relative as W}from"path";function Q(n){let y=t(n),c=(l)=>y[l]?n.slice(y[l].start,y[l].end):"",i=c(0)==="export"?1:0;if(c(i++)!=="declare")return;let f;if(c(i)==="module"&&y[i+1]?.kind==="quoted"){if(f=d(c(i+1)),f===void 0)return;i+=2}else if(c(i++)!=="global")return;if(c(i)!=="{")return;let h=y[i].end,S=1;for(i++;i<y.length;i++)if(c(i)==="{")S++;else if(c(i)==="}"&&--S===0)return{specifier:f,body:n.slice(h,y[i].start),start:h,end:y[i].start};return}var ne=/^[A-Z_$][\w$]*$/i;function Eo(n){let y=[],c=[],i=0,f=0,h=[],S=!1,l=0,E=n.length,R=(a)=>{let w=n.slice(i,a).trim();if(i=a,!w)return;if(se(w)){c.push(w);return}y.push({text:w,comments:c}),c=[]};while(l<E){let a=n[l];if(S){if(a==="\\"){l+=2;continue}if(a==="`"){S=!1,l++;continue}if(a==="$"&&n[l+1]==="{"){h.push(f),f++,S=!1,l+=2;continue}l++;continue}if(a==="/"&&n[l+1]==="*"){let w=n.indexOf("*/",l+2);l=w===-1?E:w+2;continue}if(a==="/"&&n[l+1]==="/"){let w=n.indexOf(`
3
3
  `,l);l=w===-1?E:w;continue}if(a==="'"||a==='"'){l++;while(l<E&&n[l]!==a&&n[l]!==`
4
4
  `){if(n[l]==="\\")l++;l++}l++;continue}if(a==="`"){S=!0,l++;continue}if(a==="("||a==="["||a==="{"){f++,l++;continue}if(a===")"||a==="]"||a==="}"){if(f--,h.length>0&&a==="}"&&f===h[h.length-1])h.pop(),S=!0;l++;continue}if(f===0&&a===";"){R(l+1),l++;continue}if(f===0&&a===`
5
5
  `){let w=n[l+1];if(w!==void 0&&/[\w$@/]/.test(w))R(l+1);l++;continue}l++}return R(E),y}function se(n){let y=0;while(y<n.length){while(y<n.length&&/\s/.test(n[y]))y++;if(y>=n.length)return!0;if(n.startsWith("//",y)){let c=n.indexOf(`
6
- `,y);y=c===-1?n.length:c;continue}if(n.startsWith("/*",y)){let c=n.indexOf("*/",y+2);if(c===-1)return!0;y=c+2;continue}return!1}return!0}function X(n){let y=[];for(let c of n.split(",")){let i=c.replace(/\/\*[\s\S]*?\*\//g,"").trim().replace(/^type\s+/,"");if(!i)continue;let f=i.match(/^([\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!f)continue;y.push({local:f[1],exported:f[2]??f[1]})}return y}var ie=/^(?:export\s+)?(default\s+)?(?:declare\s+)?(abstract\s+)?(class|interface|type|function\s*\*?|enum|const\s+enum|namespace|module|const|let|var|async\s+function)\b\s*([\w$]+)?/;function oe(n,y){let c=n.replace(/^export\s+/,""),i=/^default\s+/.test(c);if(c=c.replace(/^default\s+/,""),i)c=c.replace(/^((?:declare\s+)?(?:abstract\s+)?(?:class|function\s*\*?|async\s+function\s*\*?))\s*(?=[(<{])/,(f,h)=>`${h.trimEnd()} ${y}`);if(/^(?:interface|type)\b/.test(c)||/^declare\b/.test(c))return c;return`declare ${c}`}function F(n,y,c=!1){let i={file:n,declarations:[],declared:new Set,imports:new Map,localExports:new Map,namedReExports:[],starReExports:[],namespaceReExports:[],verbatim:[],augmentations:[],directives:[]},f=c?Pt(y,n).map((h)=>({text:h.text,comments:[...h.leadingComments??[]]})):bo(y);for(let h of f){h.comments=h.comments.filter((w)=>{if(/^\/\/\/\s*</.test(w))return i.directives.push(...w.split(`
7
- `).map((v)=>v.trim()).filter((v)=>v.startsWith("///"))),!1;return!0});let S=h.text.replace(/;\s*$/,"").trim(),l=S.startsWith("import")?b(S):null;if(l&&!l.isImportEquals){let w=l.source;if(l.defaultName)i.imports.set(l.defaultName,{specifier:w,imported:"default"});if(l.namespaceName)i.imports.set(l.namespaceName,{specifier:w,imported:"*"});for(let v of l.namedItems)i.imports.set(v.name,{specifier:w,imported:/^['"]/.test(v.originalName)?d(v.originalName):v.originalName});continue}if(/^import\s+['"]/.test(S)){i.verbatim.push(h);continue}let E=S.match(/^export\s+(?:type\s+)?\*\s+as\s+([\w$]+)\s+from\s+(['"])([^'"]+)\2/);if(E){i.namespaceReExports.push({specifier:E[3],exported:E[1]});continue}if(E=S.match(/^export\s+(?:type\s+)?\*\s+from\s+(['"])([^'"]+)\1/),E){i.starReExports.push(E[2]);continue}if(E=S.match(/^export\s+(?:type\s+)?\{([\s\S]*)\}\s+from\s+(['"])([^'"]+)\2/),E){for(let w of X(E[1]))i.namedReExports.push({specifier:E[3],imported:w.local,exported:w.exported});continue}if(E=S.match(/^export\s+(?:type\s+)?\{([\s\S]*)\}$/),E){for(let w of X(E[1]))i.localExports.set(w.exported,w.local);continue}if(E=S.match(/^export\s+default\s+([\w$]+)$/),E&&ne.test(E[1])){i.localExports.set("default",E[1]);continue}let R=J(S);if(R?.specifier!==void 0&&W(y)){i.augmentations.push({statement:h,specifier:R.specifier,body:R.body});continue}if(/^export\s+as\s+namespace\b/.test(S)||R){i.verbatim.push(h);continue}let a=S.match(ie);if(a){let w=!!a[1],v=a[4]??(w?"_default":null);if(v){if(i.declared.add(v),/^export\s/.test(S))i.localExports.set(w?"default":v,v);i.declarations.push({statement:h,name:v,emit:oe(h.text,v)});continue}}i.declarations.push({statement:h,name:null,emit:h.text})}return i}function Ue(n,y){if(y.size===0)return n;let c=t(n),i=new Map(c.filter((m)=>m.kind==="literal").map((m)=>[m.start,m.end])),f=(m)=>c[m]?n.slice(c[m].start,c[m].end):"",h=new Map,S=[];for(let m=0;m<c.length;m++){let x=f(m);if(["(","[","{","<"].includes(x))S.push(m);else if([")","]","}",">"].includes(x)&&!(x===">"&&f(m-1)==="=")){let k=S.at(-1);if(k!==void 0&&["()","[]","{}","<>"].includes(f(k)+x))S.pop(),h.set(k,m)}}let l=(m)=>{for(let x=m;x<c.length;x++){if([";",",",")","]","}"].includes(f(x))||f(x)===">"&&f(x-1)!=="=")return x;let k=h.get(x);if(k!==void 0)x=k}return c.length},E=new Set;for(let m=0;m<c.length;m++){let x=h.get(m);if(f(m)!=="<"||x===void 0)continue;let k=["class","interface","type"].includes(f(m-2));if(!k&&f(x+1)!=="(")continue;let N=new Set;for(let u=m+1;u<x;u++){if(u===m+1||f(u-1)===","){while(["const","in","out"].includes(f(u)))u++;if(c[u]?.kind==="word")N.add(f(u))}let D=h.get(u);if(D!==void 0)u=D}let I=l(x+1);if(k&&f(m-2)!=="type")for(let u=x+1;u<c.length;u++){if(f(u)==="{"){I=h.get(u)??I;break}let D=h.get(u);if(D!==void 0)u=D}for(let u=m+1;u<I;u++){let D=f(m-2)==="class"&&u>x&&f(u-1)==="extends";if(N.has(f(u))&&f(u-1)!=="typeof"&&!D)E.add(c[u].start)}}for(let m=0;m<c.length;m++){if(!["namespace","module"].includes(f(m))||c[m+1]?.kind!=="word"||f(m+2)!=="{")continue;let x=h.get(m+2);if(x===void 0)continue;let k=Pt(n.slice(c[m+2].end,c[x].start),"bundle-namespace.ts"),N=new Set(k.filter((u)=>["class","interface","type","enum","module","namespace"].includes(u.kind)).map((u)=>u.name)),I=new Set(k.filter((u)=>["class","variable","function","enum","module","namespace"].includes(u.kind)).map((u)=>u.name));for(let u=m+3;u<x;u++)if((f(u-1)==="typeof"?I:N).has(f(u)))E.add(c[u].start)}let R="",a=0,w=n.length,v=`
6
+ `,y);y=c===-1?n.length:c;continue}if(n.startsWith("/*",y)){let c=n.indexOf("*/",y+2);if(c===-1)return!0;y=c+2;continue}return!1}return!0}function Y(n){let y=[];for(let c of n.split(",")){let i=c.replace(/\/\*[\s\S]*?\*\//g,"").trim().replace(/^type\s+/,"");if(!i)continue;let f=i.match(/^([\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!f)continue;y.push({local:f[1],exported:f[2]??f[1]})}return y}var ie=/^(?:export\s+)?(default\s+)?(?:declare\s+)?(abstract\s+)?(class|interface|type|function\s*\*?|enum|const\s+enum|namespace|module|const|let|var|async\s+function)\b\s*([\w$]+)?/;function oe(n,y){let c=n.replace(/^export\s+/,""),i=/^default\s+/.test(c);if(c=c.replace(/^default\s+/,""),i)c=c.replace(/^((?:declare\s+)?(?:abstract\s+)?(?:class|function\s*\*?|async\s+function\s*\*?))\s*(?=[(<{])/,(f,h)=>`${h.trimEnd()} ${y}`);if(/^(?:interface|type)\b/.test(c)||/^declare\b/.test(c))return c;return`declare ${c}`}function F(n,y,c=!1){let i={file:n,declarations:[],declared:new Set,imports:new Map,localExports:new Map,namedReExports:[],starReExports:[],namespaceReExports:[],verbatim:[],augmentations:[],directives:[]},f=c?It(y,n).map((h)=>({text:h.text,comments:[...h.leadingComments??[]]})):Eo(y);for(let h of f){h.comments=h.comments.filter((w)=>{if(/^\/\/\/\s*</.test(w))return i.directives.push(...w.split(`
7
+ `).map((v)=>v.trim()).filter((v)=>v.startsWith("///"))),!1;return!0});let S=h.text.replace(/;\s*$/,"").trim(),l=S.startsWith("import")?b(S):null;if(l&&!l.isImportEquals){let w=l.source;if(l.defaultName)i.imports.set(l.defaultName,{specifier:w,imported:"default"});if(l.namespaceName)i.imports.set(l.namespaceName,{specifier:w,imported:"*"});for(let v of l.namedItems)i.imports.set(v.name,{specifier:w,imported:/^['"]/.test(v.originalName)?d(v.originalName):v.originalName});continue}if(/^import\s+['"]/.test(S)){i.verbatim.push(h);continue}let E=S.match(/^export\s+(?:type\s+)?\*\s+as\s+([\w$]+)\s+from\s+(['"])([^'"]+)\2/);if(E){i.namespaceReExports.push({specifier:E[3],exported:E[1]});continue}if(E=S.match(/^export\s+(?:type\s+)?\*\s+from\s+(['"])([^'"]+)\1/),E){i.starReExports.push(E[2]);continue}if(E=S.match(/^export\s+(?:type\s+)?\{([\s\S]*)\}\s+from\s+(['"])([^'"]+)\2/),E){for(let w of Y(E[1]))i.namedReExports.push({specifier:E[3],imported:w.local,exported:w.exported});continue}if(E=S.match(/^export\s+(?:type\s+)?\{([\s\S]*)\}$/),E){for(let w of Y(E[1]))i.localExports.set(w.exported,w.local);continue}if(E=S.match(/^export\s+default\s+([\w$]+)$/),E&&ne.test(E[1])){i.localExports.set("default",E[1]);continue}let R=Q(S);if(R?.specifier!==void 0&&j(y)){i.augmentations.push({statement:h,specifier:R.specifier,body:R.body});continue}if(/^export\s+as\s+namespace\b/.test(S)||R){i.verbatim.push(h);continue}let a=S.match(ie);if(a){let w=!!a[1],v=a[4]??(w?"_default":null);if(v){if(i.declared.add(v),/^export\s/.test(S))i.localExports.set(w?"default":v,v);i.declarations.push({statement:h,name:v,emit:oe(h.text,v)});continue}}i.declarations.push({statement:h,name:null,emit:h.text})}return i}function qe(n,y){if(y.size===0)return n;let c=t(n),i=new Map(c.filter((m)=>m.kind==="literal").map((m)=>[m.start,m.end])),f=(m)=>c[m]?n.slice(c[m].start,c[m].end):"",h=new Map,S=[];for(let m=0;m<c.length;m++){let x=f(m);if(["(","[","{","<"].includes(x))S.push(m);else if([")","]","}",">"].includes(x)&&!(x===">"&&f(m-1)==="=")){let k=S.at(-1);if(k!==void 0&&["()","[]","{}","<>"].includes(f(k)+x))S.pop(),h.set(k,m)}}let l=(m)=>{for(let x=m;x<c.length;x++){if([";",",",")","]","}"].includes(f(x))||f(x)===">"&&f(x-1)!=="=")return x;let k=h.get(x);if(k!==void 0)x=k}return c.length},E=new Set;for(let m=0;m<c.length;m++){let x=h.get(m);if(f(m)!=="<"||x===void 0)continue;let k=["class","interface","type"].includes(f(m-2));if(!k&&f(x+1)!=="(")continue;let N=new Set;for(let u=m+1;u<x;u++){if(u===m+1||f(u-1)===","){while(["const","in","out"].includes(f(u)))u++;if(c[u]?.kind==="word")N.add(f(u))}let D=h.get(u);if(D!==void 0)u=D}let I=l(x+1);if(k&&f(m-2)!=="type")for(let u=x+1;u<c.length;u++){if(f(u)==="{"){I=h.get(u)??I;break}let D=h.get(u);if(D!==void 0)u=D}for(let u=m+1;u<I;u++){let D=f(m-2)==="class"&&u>x&&f(u-1)==="extends";if(N.has(f(u))&&f(u-1)!=="typeof"&&!D)E.add(c[u].start)}}for(let m=0;m<c.length;m++){if(!["namespace","module"].includes(f(m))||c[m+1]?.kind!=="word"||f(m+2)!=="{")continue;let x=h.get(m+2);if(x===void 0)continue;let k=It(n.slice(c[m+2].end,c[x].start),"bundle-namespace.ts"),N=new Set(k.filter((u)=>["class","interface","type","enum","module","namespace"].includes(u.kind)).map((u)=>u.name)),I=new Set(k.filter((u)=>["class","variable","function","enum","module","namespace"].includes(u.kind)).map((u)=>u.name));for(let u=m+3;u<x;u++)if((f(u-1)==="typeof"?I:N).has(f(u)))E.add(c[u].start)}let R="",a=0,w=n.length,v=`
8
8
  `;while(a<w){let m=i.get(a);if(m!==void 0){R+=n.slice(a,m),a=m,v="`";continue}let x=n[a];if(x==="/"&&n[a+1]==="*"){let k=n.indexOf("*/",a+2),N=k===-1?w:k+2;R+=n.slice(a,N),a=N;continue}if(x==="/"&&n[a+1]==="/"){let k=n.indexOf(`
9
9
  `,a),N=k===-1?w:k;R+=n.slice(a,N),a=N;continue}if(x==="'"||x==='"'){let k=a+1;while(k<w&&n[k]!==x&&n[k]!==`
10
10
  `){if(n[k]==="\\")k++;k++}R+=n.slice(a,k+1),a=k+1,v=x;continue}if(/[A-Z_$]/i.test(x)){let k=a+1;while(k<w&&/[\w$]/.test(n[k]))k++;let N=n.slice(a,k),I=y.get(N);if(I!==void 0&&v!=="."&&!E.has(a)){let u=k;while(u<w&&(n[u]===" "||n[u]==="\t"))u++;let D=(n[u]===":"||n[u]==="?"&&n[u+1]===":")&&/[{;,(\n]/.test(v);R+=D?N:I}else R+=N;v="a",a=k;continue}if(R+=x,x===`
11
- `||!/\s/.test(x))v=x;a++}return R}function hn(n,y,c,i){let f=[],h=new Map,S=[n,...y.filter((e)=>e!==n)];for(let e of S){let s=c.get(e);if(s===void 0){f.push(`No declarations were generated for ${O(i.cwd,e)}; it is left out of the bundle`);continue}h.set(e,F(e,s))}let l=(e,s)=>{if(!e.startsWith(".")&&!e.startsWith("/"))return null;let o=Y(e,s).resolved;return o&&h.has(o)?o:null},E=(e)=>e.startsWith(".")||e.startsWith("/"),R=new Set,a=(e)=>{let s=e;for(let o=1;R.has(s);o++)s=`${e}_${o}`;return R.add(s),s},w=new Map;for(let[e,s]of h){let o=new Map;for(let g of s.declared)o.set(g,a(g));w.set(e,o)}let v=new Map,m=(e,s,o)=>{let g=`${e}\x00${s}`,r=v.get(g);if(!r)r=a(o),v.set(g,r);return r},x=new Map,k=new Map,N=new Set,I=new Map,u=!0,D=(e,s,o)=>{let g=l(s,e.file);if(g){if(o==="*")return{kind:"namespace",file:g};let r=L(g).get(o);if(!r&&!u)f.push(`${O(i.cwd,e.file)}: '${o}' is not exported by '${s}'`);return r??null}if(E(s))return f.push(`${O(i.cwd,e.file)}: '${s}' is not part of the bundle`),null;return o==="*"?{kind:"external-namespace",source:s}:{kind:"external",source:s,imported:o}},ee=(e,s)=>{if(e.declared.has(s))return{kind:"local",name:w.get(e.file).get(s)};let o=e.imports.get(s);if(o)return D(e,o.specifier,o.imported);return f.push(`${O(i.cwd,e.file)}: cannot resolve exported name '${s}'`),null};function L(e){let s=x.get(e);if(s)return s;let o=new Map,g=h.get(e);if(!g||N.has(e))return o;N.add(e);let r=new Set;for(let[p,M]of g.localExports){let B=ee(g,M);if(B)o.set(p,B)}for(let p of g.namedReExports){let M=D(g,p.specifier,p.imported);if(M)o.set(p.exported,M)}for(let p of g.namespaceReExports){let M=D(g,p.specifier,"*");if(M)o.set(p.exported,M)}for(let p of g.starReExports){let M=l(p,e);if(M){for(let[B,C]of L(M))if(B!=="default"&&!o.has(B))o.set(B,C);for(let B of k.get(M)??[])r.add(B)}else if(E(p))f.push(`${O(i.cwd,e)}: '${p}' is not part of the bundle`);else r.add(p)}for(let[p,M]of I.get(e)??[])o.set(p,M);return N.delete(e),x.set(e,o),k.set(e,r),o}for(let[e,s]of h)for(let o of s.augmentations){let g=l(o.specifier,e);if(!g)continue;for(let r of F(e,o.body,!0).declared){if(L(g).has(r))continue;let p=I.get(g);if(!p)p=new Map,I.set(g,p);p.set(r,{kind:"local",name:a(r)}),x.clear()}}u=!1,x.clear(),k.clear();let Q=new Map,H=[],T=(e,s)=>{switch(e.kind){case"local":return e.name;case"external":return m(e.source,e.imported,e.imported==="default"?s:e.imported);case"external-namespace":return m(e.source,"*",s);case"namespace":return te(e.file,s)}};function te(e,s){let o=Q.get(e);if(o)return o;let g=a(s);Q.set(e,g);let r=[];for(let[p,M]of L(e)){if(p==="default")continue;let B=T(M,p);r.push(B===p?p:`${B} as ${p}`)}if(k.get(e)?.size)f.push(`${O(i.cwd,e)}: 'export * from' an external module cannot be expressed inside namespace '${g}'`);return H.push(`declare namespace ${g} {
11
+ `||!/\s/.test(x))v=x;a++}return R}function vn(n,y,c,i){let f=[],h=new Map,S=[n,...y.filter((e)=>e!==n)];for(let e of S){let s=c.get(e);if(s===void 0){f.push(`No declarations were generated for ${W(i.cwd,e)}; it is left out of the bundle`);continue}h.set(e,F(e,s))}let l=(e,s)=>{if(!e.startsWith(".")&&!e.startsWith("/"))return null;let o=Z(e,s).resolved;return o&&h.has(o)?o:null},E=(e)=>e.startsWith(".")||e.startsWith("/"),R=new Set,a=(e)=>{let s=e;for(let o=1;R.has(s);o++)s=`${e}_${o}`;return R.add(s),s},w=new Map;for(let[e,s]of h){let o=new Map;for(let g of s.declared)o.set(g,a(g));w.set(e,o)}let v=new Map,m=(e,s,o)=>{let g=`${e}\x00${s}`,r=v.get(g);if(!r)r=a(o),v.set(g,r);return r},x=new Map,k=new Map,N=new Set,I=new Map,u=!0,D=(e,s,o)=>{let g=l(s,e.file);if(g){if(o==="*")return{kind:"namespace",file:g};let r=A(g).get(o);if(!r&&!u)f.push(`${W(i.cwd,e.file)}: '${o}' is not exported by '${s}'`);return r??null}if(E(s))return f.push(`${W(i.cwd,e.file)}: '${s}' is not part of the bundle`),null;return o==="*"?{kind:"external-namespace",source:s}:{kind:"external",source:s,imported:o}},ee=(e,s)=>{if(e.declared.has(s))return{kind:"local",name:w.get(e.file).get(s)};let o=e.imports.get(s);if(o)return D(e,o.specifier,o.imported);return f.push(`${W(i.cwd,e.file)}: cannot resolve exported name '${s}'`),null};function A(e){let s=x.get(e);if(s)return s;let o=new Map,g=h.get(e);if(!g||N.has(e))return o;N.add(e);let r=new Set;for(let[p,M]of g.localExports){let B=ee(g,M);if(B)o.set(p,B)}for(let p of g.namedReExports){let M=D(g,p.specifier,p.imported);if(M)o.set(p.exported,M)}for(let p of g.namespaceReExports){let M=D(g,p.specifier,"*");if(M)o.set(p.exported,M)}for(let p of g.starReExports){let M=l(p,e);if(M){for(let[B,C]of A(M))if(B!=="default"&&!o.has(B))o.set(B,C);for(let B of k.get(M)??[])r.add(B)}else if(E(p))f.push(`${W(i.cwd,e)}: '${p}' is not part of the bundle`);else r.add(p)}for(let[p,M]of I.get(e)??[])o.set(p,M);return N.delete(e),x.set(e,o),k.set(e,r),o}for(let[e,s]of h)for(let o of s.augmentations){let g=l(o.specifier,e);if(!g)continue;for(let r of F(e,o.body,!0).declared){if(A(g).has(r))continue;let p=I.get(g);if(!p)p=new Map,I.set(g,p);p.set(r,{kind:"local",name:a(r)}),x.clear()}}u=!1,x.clear(),k.clear();let U=new Map,H=[],T=(e,s)=>{switch(e.kind){case"local":return e.name;case"external":return m(e.source,e.imported,e.imported==="default"?s:e.imported);case"external-namespace":return m(e.source,"*",s);case"namespace":return te(e.file,s)}};function te(e,s){let o=U.get(e);if(o)return o;let g=a(s);U.set(e,g);let r=[];for(let[p,M]of A(e)){if(p==="default")continue;let B=T(M,p);r.push(B===p?p:`${B} as ${p}`)}if(k.get(e)?.size)f.push(`${W(i.cwd,e)}: 'export * from' an external module cannot be expressed inside namespace '${g}'`);return H.push(`declare namespace ${g} {
12
12
  export { ${r.join(", ")} };
13
- }`),g}let U=[],A=[],Z=new Set;for(let[e,s]of h){for(let r of s.directives)Z.add(r);let o=new Map;for(let[r,p]of w.get(e))if(r!==p)o.set(r,p);for(let[r,p]of s.imports){if(s.declared.has(r))continue;let M=D(s,p.specifier,p.imported);if(!M)continue;let B=T(M,r);if(B!==r)o.set(r,B)}let g=[];for(let r of s.declarations){if(i.keepComments)g.push(...r.statement.comments);let p=Ue(r.emit,o);if(!/[;}]$/.test(p))p+=";";g.push(p)}for(let r of s.verbatim){if(i.keepComments)A.push(...r.comments);let p=J(r.text);if(p){let M=new Map(o);for(let B of F(e,p.body,!0).declared)M.delete(B);A.push(r.text.slice(0,p.start)+Ue(p.body,M)+r.text.slice(p.end))}else{let M=t(r.text),B=M[1]?.kind==="quoted"?d(r.text.slice(M[1].start,M[1].end)):void 0;if(B===void 0||!l(B,e))A.push(Ue(r.text,o))}}for(let r of s.augmentations){let p=l(r.specifier,e),M=F(e,r.body,!0),B=new Map(o);if(!p){for(let P of M.declared)B.delete(P);let C=J(r.statement.text);if(i.keepComments)A.push(...r.statement.comments);A.push(r.statement.text.slice(0,C.start)+Ue(C.body,B)+r.statement.text.slice(C.end));continue}for(let[C,P]of L(p))B.set(C,T(P,C));if(i.keepComments)g.push(...r.statement.comments);for(let C of M.declarations){if(!C.name||!L(p).has(C.name))throw Error(`Cannot link augmentation '${r.specifier}' member '${C.name??C.emit}'`);if(i.keepComments)g.push(...C.statement.comments);g.push(Ue(C.emit,B))}}if(g.length>0)U.push(`// From: ${O(i.cwd,e)}
13
+ }`),g}let V=[],O=[],G=new Set;for(let[e,s]of h){for(let r of s.directives)G.add(r);let o=new Map;for(let[r,p]of w.get(e))if(r!==p)o.set(r,p);for(let[r,p]of s.imports){if(s.declared.has(r))continue;let M=D(s,p.specifier,p.imported);if(!M)continue;let B=T(M,r);if(B!==r)o.set(r,B)}let g=[];for(let r of s.declarations){if(i.keepComments)g.push(...r.statement.comments);let p=qe(r.emit,o);if(!/[;}]$/.test(p))p+=";";g.push(p)}for(let r of s.verbatim){if(i.keepComments)O.push(...r.comments);let p=Q(r.text);if(p){let M=new Map(o);for(let B of F(e,p.body,!0).declared)M.delete(B);O.push(r.text.slice(0,p.start)+qe(p.body,M)+r.text.slice(p.end))}else{let M=t(r.text),B=M[1]?.kind==="quoted"?d(r.text.slice(M[1].start,M[1].end)):void 0;if(B===void 0||!l(B,e))O.push(qe(r.text,o))}}for(let r of s.augmentations){let p=l(r.specifier,e),M=F(e,r.body,!0),B=new Map(o);if(!p){for(let J of M.declared)B.delete(J);let C=Q(r.statement.text);if(i.keepComments)O.push(...r.statement.comments);O.push(r.statement.text.slice(0,C.start)+qe(C.body,B)+r.statement.text.slice(C.end));continue}for(let[C,J]of A(p))B.set(C,T(J,C));if(i.keepComments)g.push(...r.statement.comments);for(let C of M.declarations){if(!C.name||!A(p).has(C.name))throw Error(`Cannot link augmentation '${r.specifier}' member '${C.name??C.emit}'`);if(i.keepComments)g.push(...C.statement.comments);g.push(qe(C.emit,B))}}if(g.length>0)V.push(`// From: ${W(i.cwd,e)}
14
14
  ${g.join(`
15
- `)}`)}let V=L(n),G=[],q=[];for(let[e,s]of V){if(s.kind==="external"){q.push(`export { ${s.imported===e?e:`${s.imported} as ${e}`} } from '${s.source}';`);continue}if(s.kind==="external-namespace"){q.push(`export * as ${e} from '${s.source}';`);continue}let o=T(s,e==="default"?"_default":e);G.push(o===e?e:`${o} as ${e}`)}for(let e of k.get(n)??[])q.push(`export * from '${e}';`);let K=new Map;for(let[e,s]of v){let[o,g]=e.split("\x00"),r=K.get(o)??{named:[],defaults:[],namespaces:[]};if(K.set(o,r),g==="*")r.namespaces.push(s);else if(g==="default")r.defaults.push(s);else r.named.push(g===s?s:`${g} as ${s}`)}let _=[];for(let[e,s]of[...K].sort(([o],[g])=>o.localeCompare(g))){for(let o of s.defaults)_.push(`import ${o} from '${e}';`);for(let o of s.namespaces)_.push(`import * as ${o} from '${e}';`);if(s.named.length>0)_.push(`import { ${s.named.join(", ")} } from '${e}';`)}let j=[];if(Z.size>0)j.push([...Z].join(`
16
- `));if(j.push(`/**
15
+ `)}`)}let X=A(n),K=[],q=[];for(let[e,s]of X){if(s.kind==="external"){q.push(`export { ${s.imported===e?e:`${s.imported} as ${e}`} } from '${s.source}';`);continue}if(s.kind==="external-namespace"){q.push(`export * as ${e} from '${s.source}';`);continue}let o=T(s,e==="default"?"_default":e);K.push(o===e?e:`${o} as ${e}`)}for(let e of k.get(n)??[])q.push(`export * from '${e}';`);let P=new Map;for(let[e,s]of v){let[o,g]=e.split("\x00"),r=P.get(o)??{named:[],defaults:[],namespaces:[]};if(P.set(o,r),g==="*")r.namespaces.push(s);else if(g==="default")r.defaults.push(s);else r.named.push(g===s?s:`${g} as ${s}`)}let _=[];for(let[e,s]of[...P].sort(([o],[g])=>o.localeCompare(g))){for(let o of s.defaults)_.push(`import ${o} from '${e}';`);for(let o of s.namespaces)_.push(`import * as ${o} from '${e}';`);if(s.named.length>0)_.push(`import { ${s.named.join(", ")} } from '${e}';`)}let L=[];if(G.size>0)L.push([...G].join(`
16
+ `));if(L.push(`/**
17
17
  * Bundled TypeScript declarations
18
18
  * Generated from ${h.size} source files
19
- */`),_.length>0)j.push(_.join(`
20
- `));if(j.push(...U),H.length>0)j.push(H.join(`
21
- `));if(A.length>0)j.push(A.join(`
22
- `));let z=[];if(G.length>0)z.push(`export { ${G.join(", ")} };`);if(z.push(...q),z.length===0)z.push("export {};");return j.push(z.join(`
23
- `)),{content:`${j.join(`
19
+ */`),_.length>0)L.push(_.join(`
20
+ `));if(L.push(...V),H.length>0)L.push(H.join(`
21
+ `));if(O.length>0)L.push(O.join(`
22
+ `));let z=[];if(K.length>0)z.push(`export { ${K.join(", ")} };`);if(z.push(...q),z.length===0)z.push("export {};");return L.push(z.join(`
23
+ `)),{content:`${L.join(`
24
24
 
25
25
  `)}
26
- `,files:[...h.keys()],exportCount:V.size,warnings:f}}
27
- export{bo,Ue,hn};
26
+ `,files:[...h.keys()],exportCount:X.size,warnings:f}}
27
+ export{Eo,qe,vn};
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{r}from"./chunk-jcckwgb9.js";import{me}from"./chunk-danfamyx.js";import{readFileSync as u}from"fs";import{readFile as p}from"fs/promises";import{resolve as g}from"path";function m(t){return t.replace(/\/\*[\s\S]*?\*\//g,"").replace(/^\s*\/\/.*$/gm,"").replace(/,\s*([}\]])/g,"$1")}function hs(t,e){try{return{...JSON.parse(m(u(t,"utf8"))).compilerOptions,...e}}catch(s){throw Error(`Error reading tsconfig.json: ${s instanceof Error?s.message:String(s)}`)}}function f(t,e){let s=e.declarationsOnly?t.filter((o)=>o.endsWith(".d.ts")):t;if(e.include?.length){let o=e.include.map((n)=>new RegExp(n.replace(/\*/g,".*")));s=s.filter((n)=>o.some((i)=>i.test(n)))}if(e.exclude?.length){let o=e.exclude.map((n)=>new RegExp(n.replace(/\*/g,".*")));s=s.filter((n)=>!o.some((i)=>i.test(n)))}return s}async function at(t,e={}){let s=performance.now(),o=f(t,e),n=[];for(let a of o)try{let c=await p(a,"utf8");for(let l of me(c))n.push({file:a,line:l.line,column:l.column,message:l.message,code:Number(l.code.slice(4)),severity:"error",category:"Error"})}catch(c){n.push({file:a,line:0,column:0,message:c instanceof Error?c.message:String(c),code:1000,severity:"error",category:"Error"})}let i=e.maxErrors?n.slice(0,e.maxErrors):n;return{success:i.length===0,diagnostics:i,errorCount:i.length,warningCount:0,infoCount:0,filesChecked:o,durationMs:performance.now()-s}}function xr(t,e={}){return at(t,{...e,declarationsOnly:!0})}async function ys(t){let e=new Map;for(let s of t){let o=await p(s,"utf8").catch(()=>""),n=[];for(let i of r(o,s,!1,!0))if(i.isExported&&i.kind==="function"&&!i.returnType)n.push({line:1,column:1,message:"Exported function requires an explicit return type",declarationName:i.name,missingAnnotation:"return"});e.set(s,{compatible:n.length===0,issues:n})}return e}function d(t,e,s){let o=t.split(`
3
- `);if(e<1||e>o.length||s<1||s>o[e-1].length+1)return null;let n=s-1;for(let i=0;i<e-1;i++)n+=o[i].length+1;return n}function Cr(t,e,s){try{let o=u(t,"utf8"),n=d(o,e,s);if(n===null)return null;let i=r(o,t,!1).find((a)=>n>=(a.start??0)&&n<=(a.end??o.length));return i?.typeAnnotation??i?.returnType??i?.text??null}catch{return null}}function bs(t,e,s){let o=Cr(t,e,s);return o?{type:o}:null}function ws(t){if(t.success)return`\u2713 Type check passed (${t.filesChecked.length} files checked in ${t.durationMs}ms)`;return["\u2717 Type check failed",` ${t.errorCount} error(s), ${t.warningCount} warning(s)`,...t.diagnostics.map((e)=>`\u2717 ${e.file}:${e.line}:${e.column}
2
+ import{r}from"./chunk-z6mpxpxt.js";import{be}from"./chunk-vae5wxar.js";import{readFileSync as u}from"fs";import{readFile as p}from"fs/promises";import{resolve as g}from"path";function m(t){return t.replace(/\/\*[\s\S]*?\*\//g,"").replace(/^\s*\/\/.*$/gm,"").replace(/,\s*([}\]])/g,"$1")}function Ss(t,e){try{return{...JSON.parse(m(u(t,"utf8"))).compilerOptions,...e}}catch(s){throw Error(`Error reading tsconfig.json: ${s instanceof Error?s.message:String(s)}`)}}function f(t,e){let s=e.declarationsOnly?t.filter((o)=>o.endsWith(".d.ts")):t;if(e.include?.length){let o=e.include.map((n)=>new RegExp(n.replace(/\*/g,".*")));s=s.filter((n)=>o.some((i)=>i.test(n)))}if(e.exclude?.length){let o=e.exclude.map((n)=>new RegExp(n.replace(/\*/g,".*")));s=s.filter((n)=>!o.some((i)=>i.test(n)))}return s}async function dt(t,e={}){let s=performance.now(),o=f(t,e),n=[];for(let a of o)try{let c=await p(a,"utf8");for(let l of be(c))n.push({file:a,line:l.line,column:l.column,message:l.message,code:Number(l.code.slice(4)),severity:"error",category:"Error"})}catch(c){n.push({file:a,line:0,column:0,message:c instanceof Error?c.message:String(c),code:1000,severity:"error",category:"Error"})}let i=e.maxErrors?n.slice(0,e.maxErrors):n;return{success:i.length===0,diagnostics:i,errorCount:i.length,warningCount:0,infoCount:0,filesChecked:o,durationMs:performance.now()-s}}function Tr(t,e={}){return dt(t,{...e,declarationsOnly:!0})}async function $s(t){let e=new Map;for(let s of t){let o=await p(s,"utf8").catch(()=>""),n=[];for(let i of r(o,s,!1,!0))if(i.isExported&&i.kind==="function"&&!i.returnType)n.push({line:1,column:1,message:"Exported function requires an explicit return type",declarationName:i.name,missingAnnotation:"return"});e.set(s,{compatible:n.length===0,issues:n})}return e}function d(t,e,s){let o=t.split(`
3
+ `);if(e<1||e>o.length||s<1||s>o[e-1].length+1)return null;let n=s-1;for(let i=0;i<e-1;i++)n+=o[i].length+1;return n}function Ar(t,e,s){try{let o=u(t,"utf8"),n=d(o,e,s);if(n===null)return null;let i=r(o,t,!1).find((a)=>n>=(a.start??0)&&n<=(a.end??o.length));return i?.typeAnnotation??i?.returnType??i?.text??null}catch{return null}}function Es(t,e,s){let o=Ar(t,e,s);return o?{type:o}:null}function ks(t){if(t.success)return`\u2713 Type check passed (${t.filesChecked.length} files checked in ${t.durationMs}ms)`;return["\u2717 Type check failed",` ${t.errorCount} error(s), ${t.warningCount} warning(s)`,...t.diagnostics.map((e)=>`\u2717 ${e.file}:${e.line}:${e.column}
4
4
  ${e.message}`)].join(`
5
- `)}function xs(t){return at(t.entrypoints.map((e)=>g(t.cwd,e)),{tsconfigPath:t.tsconfigPath,rootDir:t.root})}async function Cs(t,e){let o=(await Promise.all([at(t),xr(e)])).flatMap((n)=>n.diagnostics).map((n)=>({sourceName:n.file,sourceType:n.message,dtsType:"<invalid>"}));return{valid:o.length===0,mismatches:o}}
6
- export{hs,at,xr,ys,Cr,bs,ws,xs,Cs};
5
+ `)}function Ts(t){return dt(t.entrypoints.map((e)=>g(t.cwd,e)),{tsconfigPath:t.tsconfigPath,rootDir:t.root})}async function As(t,e){let o=(await Promise.all([dt(t),Tr(e)])).flatMap((n)=>n.diagnostics).map((n)=>({sourceName:n.file,sourceType:n.message,dtsType:"<invalid>"}));return{valid:o.length===0,mismatches:o}}
6
+ export{Ss,dt,Tr,$s,Ar,Es,ks,Ts,As};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{lstat as d,realpath as f,stat as T}from"fs/promises";import{isAbsolute as l,normalize as g,relative as p,resolve as u}from"path";var L={rootDir:process.cwd(),maxFileSize:10485760,maxTotalSize:104857600,timeout:30000,followSymlinks:!1,maxFiles:1e4,blockedPatterns:["**/.git/**","**/node_modules/**","**/.env*","**/secrets/**","**/*.key","**/*.pem"]};class C extends Error{code;path;constructor(t,r,e){super(t);this.code=r;this.path=e;this.name="SecurityError"}}function Be(t,r={}){let{rootDir:e=process.cwd()}=r,i=g(t),n=l(i)?i:u(e,i),o=u(n),s=p(e,o);if(s.startsWith("..")||l(s))throw new C(`Path traversal detected: "${t}" resolves outside root directory`,"PATH_TRAVERSAL",t);return o}function Fr(t,r={}){return t.map((e)=>Be(e,r))}function en(t,r={}){let e=r.blockedPatterns||L.blockedPatterns;for(let i of e)if(h(t,i))return!0;return!1}var m=new Map;function P(t){let r=m.get(t);if(r)return r;let e=t.replace(/\*\*/g,"<<GLOBSTAR>>").replace(/\*/g,"<<STAR>>").replace(/\?/g,"<<QUESTION>>");e=e.replace(/[.+^${}()|[\]\\]/g,"\\$&"),e=e.replace(/^<<GLOBSTAR>>\//,"(.*\\/)?"),e=e.replace(/\/<<GLOBSTAR>>$/,"(\\/.*)?"),e=e.replace(/\/<<GLOBSTAR>>\//g,"(\\/.*)?\\/"),e=e.replace(/<<GLOBSTAR>>/g,".*"),e=e.replace(/<<STAR>>/g,"[^/]*"),e=e.replace(/<<QUESTION>>/g,"[^/]");let i=new RegExp(`^${e}$`);return m.set(t,i),i}function h(t,r){let e=t.indexOf("\\")===-1?t:t.replace(/\\/g,"/");return P(r).test(e)}async function Lr(t,r={}){let e=r.maxFileSize??L.maxFileSize;try{let i=await T(t);if(i.size>e)throw new C(`File too large: "${t}" is ${a(i.size)}, max is ${a(e)}`,"FILE_TOO_LARGE",t);return i.size}catch(i){if(i instanceof C)throw i;throw new C(`Failed to check file size: ${t}`,"INVALID_PATH",t)}}async function Nr(t){try{return(await d(t)).isSymbolicLink()}catch{return!1}}async function Br(t,r={}){let e=r.followSymlinks??L.followSymlinks;if(await Nr(t)){if(!e)throw new C(`Symbolic links not allowed: "${t}"`,"SYMLINK_NOT_ALLOWED",t);let i=await f(t);return Be(i,r)}return t}async function ut(t,r={}){let e=Be(t,r);if(en(e,r))throw new C(`Path matches blocked pattern: "${t}"`,"BLOCKED_PATTERN",t);let i=await Br(e,r),n=await Lr(i,r);return{path:i,size:n}}async function tn(t,r={}){let e=r.maxFiles??L.maxFiles,i=r.maxTotalSize??L.maxTotalSize;if(t.length>e)throw new C(`Too many files: ${t.length} exceeds maximum of ${e}`,"MAX_FILES_EXCEEDED");let n=[],o=0;for(let s of t){let c=await ut(s,r);if(n.push(c.path),o+=c.size,o>i)throw new C(`Total size exceeded: ${a(o)} exceeds maximum of ${a(i)}`,"TOTAL_SIZE_EXCEEDED")}return{paths:n,totalSize:o}}function ft(t,r,e="Operation"){return new Promise((i,n)=>{let o=setTimeout(()=>{n(new C(`${e} timed out after ${r}ms`,"TIMEOUT"))},r);t.then((s)=>{clearTimeout(o),i(s)}).catch((s)=>{clearTimeout(o),n(s)})})}function Wr(t,r={}){let e=r.timeout??L.timeout;return async(i)=>{let{path:n}=await ut(i,r);return ft(t(n),e,`Processing ${i}`)}}function Us(t,r={}){let e=r.timeout??L.timeout;return async(i)=>{let{paths:n}=await tn(i,r);return ft(t(n),e,`Processing ${i.length} files`)}}function zs(t){let r=t.replace(/\\/g,"/").replace(/\0/g,"").replace(/^\/+/,"").replace(/^[A-Z]:/i,""),e="";while(e!==r)e=r,r=r.replace(/\.\.\/|\.\.$/g,"").replace(/\/+/g,"/");return r.replace(/^\/+|\/+$/g,"")}function Hs(t){if(t.includes("\x00"))return!1;if(g(t).includes(".."))return!1;if(l(t)&&!t.startsWith(process.cwd()))return!1;return!0}function a(t){if(t===0)return"0 B";let r=["B","KB","MB","GB"],e=1024,i=Math.floor(Math.log(t)/Math.log(e));return`${Number.parseFloat((t/e**i).toFixed(2))} ${r[i]}`}function Ks(t={}){let r={...L,...t};return{validatePath:(e)=>Be(e,r),validatePaths:(e)=>Fr(e,r),validateFile:(e)=>ut(e,r),validateBatch:(e)=>tn(e,r),withTimeout:(e,i)=>ft(e,r.timeout,i),secureProcessor:(e)=>Wr(e,r),isBlocked:(e)=>en(e,r),getConfig:()=>r}}
3
- export{L,C,Be,Fr,en,Lr,Nr,Br,ut,tn,ft,Wr,Us,zs,Hs,Ks};
2
+ import{lstat as d,realpath as f,stat as T}from"fs/promises";import{isAbsolute as l,normalize as g,relative as p,resolve as u}from"path";var N={rootDir:process.cwd(),maxFileSize:10485760,maxTotalSize:104857600,timeout:30000,followSymlinks:!1,maxFiles:1e4,blockedPatterns:["**/.git/**","**/node_modules/**","**/.env*","**/secrets/**","**/*.key","**/*.pem"]};class C extends Error{code;path;constructor(t,r,e){super(t);this.code=r;this.path=e;this.name="SecurityError"}}function Ge(t,r={}){let{rootDir:e=process.cwd()}=r,i=g(t),n=l(i)?i:u(e,i),o=u(n),s=p(e,o);if(s.startsWith("..")||l(s))throw new C(`Path traversal detected: "${t}" resolves outside root directory`,"PATH_TRAVERSAL",t);return o}function Gr(t,r={}){return t.map((e)=>Ge(e,r))}function an(t,r={}){let e=r.blockedPatterns||N.blockedPatterns;for(let i of e)if(h(t,i))return!0;return!1}var m=new Map;function P(t){let r=m.get(t);if(r)return r;let e=t.replace(/\*\*/g,"<<GLOBSTAR>>").replace(/\*/g,"<<STAR>>").replace(/\?/g,"<<QUESTION>>");e=e.replace(/[.+^${}()|[\]\\]/g,"\\$&"),e=e.replace(/^<<GLOBSTAR>>\//,"(.*\\/)?"),e=e.replace(/\/<<GLOBSTAR>>$/,"(\\/.*)?"),e=e.replace(/\/<<GLOBSTAR>>\//g,"(\\/.*)?\\/"),e=e.replace(/<<GLOBSTAR>>/g,".*"),e=e.replace(/<<STAR>>/g,"[^/]*"),e=e.replace(/<<QUESTION>>/g,"[^/]");let i=new RegExp(`^${e}$`);return m.set(t,i),i}function h(t,r){let e=t.indexOf("\\")===-1?t:t.replace(/\\/g,"/");return P(r).test(e)}async function Vr(t,r={}){let e=r.maxFileSize??N.maxFileSize;try{let i=await T(t);if(i.size>e)throw new C(`File too large: "${t}" is ${a(i.size)}, max is ${a(e)}`,"FILE_TOO_LARGE",t);return i.size}catch(i){if(i instanceof C)throw i;throw new C(`Failed to check file size: ${t}`,"INVALID_PATH",t)}}async function Ur(t){try{return(await d(t)).isSymbolicLink()}catch{return!1}}async function zr(t,r={}){let e=r.followSymlinks??N.followSymlinks;if(await Ur(t)){if(!e)throw new C(`Symbolic links not allowed: "${t}"`,"SYMLINK_NOT_ALLOWED",t);let i=await f(t);return Ge(i,r)}return t}async function gt(t,r={}){let e=Ge(t,r);if(an(e,r))throw new C(`Path matches blocked pattern: "${t}"`,"BLOCKED_PATTERN",t);let i=await zr(e,r),n=await Vr(i,r);return{path:i,size:n}}async function cn(t,r={}){let e=r.maxFiles??N.maxFiles,i=r.maxTotalSize??N.maxTotalSize;if(t.length>e)throw new C(`Too many files: ${t.length} exceeds maximum of ${e}`,"MAX_FILES_EXCEEDED");let n=[],o=0;for(let s of t){let c=await gt(s,r);if(n.push(c.path),o+=c.size,o>i)throw new C(`Total size exceeded: ${a(o)} exceeds maximum of ${a(i)}`,"TOTAL_SIZE_EXCEEDED")}return{paths:n,totalSize:o}}function ht(t,r,e="Operation"){return new Promise((i,n)=>{let o=setTimeout(()=>{n(new C(`${e} timed out after ${r}ms`,"TIMEOUT"))},r);t.then((s)=>{clearTimeout(o),i(s)}).catch((s)=>{clearTimeout(o),n(s)})})}function Hr(t,r={}){let e=r.timeout??N.timeout;return async(i)=>{let{path:n}=await gt(i,r);return ht(t(n),e,`Processing ${i}`)}}function Xs(t,r={}){let e=r.timeout??N.timeout;return async(i)=>{let{paths:n}=await cn(i,r);return ht(t(n),e,`Processing ${i.length} files`)}}function Zs(t){let r=t.replace(/\\/g,"/").replace(/\0/g,"").replace(/^\/+/,"").replace(/^[A-Z]:/i,""),e="";while(e!==r)e=r,r=r.replace(/\.\.\/|\.\.$/g,"").replace(/\/+/g,"/");return r.replace(/^\/+|\/+$/g,"")}function Qs(t){if(t.includes("\x00"))return!1;if(g(t).includes(".."))return!1;if(l(t)&&!t.startsWith(process.cwd()))return!1;return!0}function a(t){if(t===0)return"0 B";let r=["B","KB","MB","GB"],e=1024,i=Math.floor(Math.log(t)/Math.log(e));return`${Number.parseFloat((t/e**i).toFixed(2))} ${r[i]}`}function eo(t={}){let r={...N,...t};return{validatePath:(e)=>Ge(e,r),validatePaths:(e)=>Gr(e,r),validateFile:(e)=>gt(e,r),validateBatch:(e)=>cn(e,r),withTimeout:(e,i)=>ht(e,r.timeout,i),secureProcessor:(e)=>Hr(e,r),isBlocked:(e)=>an(e,r),getConfig:()=>r}}
3
+ export{N,C,Ge,Gr,an,Vr,Ur,zr,gt,cn,ht,Hr,Xs,Zs,Qs,eo};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{N}from"./chunk-ebjafajx.js";import{k}from"./chunk-p9vfxn8g.js";import{ye,be}from"./chunk-davy89dj.js";import{createHash as x}from"crypto";import{readFile as d}from"fs/promises";import{resolve as m}from"path";async function vn(g){let e={...N,...g},n=e.moduleSpecifierMode??"preserve";if(n!=="node"&&n!=="preserve")throw Error("moduleSpecifierMode must be preserve or node");if(e.plugins?.length)throw Error("Native project planning does not support generation plugins");let o=await ye(e),l=[];for(let r of o.files){let s=await d(r),a=s.toString("utf8");if(!Buffer.from(a,"utf8").equals(s))throw Error(`Native declaration source must be valid UTF-8: ${r}`);let u=o.outputBySource.get(r),v=be(r,e,o.resolver),i=[],S=new Set(k(a,{includeImports:!0}).map((t)=>t.specifier));for(let t of S){let p=v(t);if(p.kind!=="local")continue;let{resolvedSource:h,declarationOutput:w,emittedSpecifier:y}=p;i.push({specifier:t,resolvedSource:h,declarationOutput:w,emittedSpecifier:y})}let c={version:1,moduleSpecifierMode:n,sourceFile:r,outputFile:u,sourceHash:x("sha256").update(s).digest("hex"),rewrites:i};if(!e.isolatedDeclarations&&i.length)c.inferenceSources=await Promise.all(i.map(async(t)=>({specifier:t.specifier,source:await d(t.resolvedSource,"utf8")})));let f=o.augmentationImports.get(r);if(f?.size)c.augmentationImports=[...f];l.push(Object.freeze({sourceFile:r,outputFile:u,source:a,context:c}))}return Object.freeze({version:1,rootPath:m(e.cwd,e.root),outdirPath:m(e.cwd,e.outdir),files:Object.freeze(l)})}
3
- export{vn};
2
+ import{B}from"./chunk-60wrxcjt.js";import{k}from"./chunk-7z8pykqp.js";import{Ce,ve}from"./chunk-y4wykrya.js";import{createHash as x}from"crypto";import{readFile as d}from"fs/promises";import{resolve as m}from"path";async function An(g){let e={...B,...g},n=e.moduleSpecifierMode??"preserve";if(n!=="node"&&n!=="preserve")throw Error("moduleSpecifierMode must be preserve or node");if(e.plugins?.length)throw Error("Native project planning does not support generation plugins");let o=await Ce(e),l=[];for(let r of o.files){let s=await d(r),a=s.toString("utf8");if(!Buffer.from(a,"utf8").equals(s))throw Error(`Native declaration source must be valid UTF-8: ${r}`);let u=o.outputBySource.get(r),v=ve(r,e,o.resolver),i=[],S=new Set(k(a,{includeImports:!0}).map((t)=>t.specifier));for(let t of S){let p=v(t);if(p.kind!=="local")continue;let{resolvedSource:h,declarationOutput:w,emittedSpecifier:y}=p;i.push({specifier:t,resolvedSource:h,declarationOutput:w,emittedSpecifier:y})}let c={version:1,moduleSpecifierMode:n,sourceFile:r,outputFile:u,sourceHash:x("sha256").update(s).digest("hex"),rewrites:i};if(!e.isolatedDeclarations&&i.length)c.inferenceSources=await Promise.all(i.map(async(t)=>({specifier:t.specifier,source:await d(t.resolvedSource,"utf8")})));let f=o.augmentationImports.get(r);if(f?.size)c.augmentationImports=[...f];l.push(Object.freeze({sourceFile:r,outputFile:u,source:a,context:c}))}return Object.freeze({version:1,rootPath:m(e.cwd,e.root),outdirPath:m(e.cwd,e.outdir),files:Object.freeze(l)})}
3
+ export{An};
@@ -1,8 +1,8 @@
1
1
  // @bun
2
- import{we}from"./chunk-g2120ysy.js";import{e}from"./chunk-yay68832.js";import{Ce,V}from"./chunk-p9vfxn8g.js";import{existsSync as x}from"fs";import{basename as D,dirname as M,extname as R,isAbsolute as v,relative as p,resolve as m}from"path";var{Glob:j}=globalThis.Bun;async function ye(r,o){let s=await N(r);F(r,s);let n=s.slice(),a=await(o?o():Ce(r)),t=null;if(r.autoIncludeReExports!==!1&&n.length>0){t=await V(n,{includeImports:!0,resolveSpecifier:a});let l=m(r.cwd,r.root),u=r.exclude||[],f=[];for(let c of t.reachable){if(n.includes(c))continue;if(!b(c))continue;if(c.endsWith(".d.ts"))continue;if(c.includes("node_modules"))continue;let E=r.outputStructure==="flat"&&s.some((O)=>a.isPackageLocal?.(O,c));if(!S(c,l)&&!E){e.warn(`Skipping auto-included source outside root: ${p(r.cwd,c)}`);continue}if(J(c,u,l))continue;f.push(c)}if(f.length>0)n=[...n,...f],e.debug(`Auto-included ${f.length} file(s) reached via relative re-exports`)}let i=A(n,r),d=t??await V(n,{includeImports:!0,resolveSpecifier:a}),g=await we([...d.sources.keys()],a,r.isolatedDeclarations??!1,d.sources),h=new Set(n);for(let[l,u]of g){if(!h.has(l))continue;for(let f of u){let c=a(f,l).resolved;if(c&&!h.has(c))throw Error(`Module augmentation import ${JSON.stringify(f)} from ${l} requires a source not emitted by this package build: ${c}`)}}let y=[...g].map(([l,u])=>[l,[...u].sort()]).sort(([l],[u])=>l.localeCompare(u));return Object.freeze({entryFiles:Object.freeze(s),files:Object.freeze(n),outputBySource:i,resolver:a,reachability:t,augmentationImports:g,getResolutionFingerprint:()=>JSON.stringify({resolution:a.cacheKey?.(n),augmentations:y})})}var P=50,w=new Map;function k(r){let o=w.get(r);if(!o){if(o=new j(r),w.set(r,o),w.size>P){let s=w.keys().next().value;if(s!==void 0)w.delete(s)}}return o}function J(r,o,s){if(!o||o.length===0)return!1;let n=p(s,r);for(let a of o){let t=k(a);if(t.match(n)||t.match(r))return!0}return!1}var C=/[*?[\]{}!]/;function F(r,o){let s=m(r.cwd,r.root),n=` root: ${s}
2
+ import{Se}from"./chunk-2dstvjpv.js";import{e}from"./chunk-btc6zbyj.js";import{Ee,U}from"./chunk-7z8pykqp.js";import{existsSync as x}from"fs";import{basename as D,dirname as M,extname as R,isAbsolute as v,relative as p,resolve as m}from"path";var{Glob:j}=globalThis.Bun;async function Ce(r,o){let s=await F(r);C(r,s);let n=s.slice(),a=await(o?o():Ee(r)),t=null;if(r.autoIncludeReExports!==!1&&n.length>0){t=await U(n,{includeImports:!0,resolveSpecifier:a});let l=m(r.cwd,r.root),u=r.exclude||[],f=[];for(let c of t.reachable){if(n.includes(c))continue;if(!b(c))continue;if(c.endsWith(".d.ts"))continue;if(c.includes("node_modules"))continue;let E=r.outputStructure==="flat"&&s.some((O)=>a.isPackageLocal?.(O,c));if(!S(c,l)&&!E){e.warn(`Skipping auto-included source outside root: ${p(r.cwd,c)}`);continue}if(X(c,u,l))continue;f.push(c)}if(f.length>0)n=[...n,...f],e.debug(`Auto-included ${f.length} file(s) reached via relative re-exports`)}let i=N(n,r),d=t??await U(n,{includeImports:!0,resolveSpecifier:a}),g=await Se([...d.sources.keys()],a,r.isolatedDeclarations??!1,d.sources),h=new Set(n);for(let[l,u]of g){if(!h.has(l))continue;for(let f of u){let c=a(f,l).resolved;if(c&&!h.has(c))throw Error(`Module augmentation import ${JSON.stringify(f)} from ${l} requires a source not emitted by this package build: ${c}`)}}let y=[...g].map(([l,u])=>[l,[...u].sort()]).sort(([l],[u])=>l.localeCompare(u));return Object.freeze({entryFiles:Object.freeze(s),files:Object.freeze(n),outputBySource:i,resolver:a,reachability:t,augmentationImports:g,getResolutionFingerprint:()=>JSON.stringify({resolution:a.cacheKey?.(n),augmentations:y})})}var P=50,w=new Map;function k(r){let o=w.get(r);if(!o){if(o=new j(r),w.set(r,o),w.size>P){let s=w.keys().next().value;if(s!==void 0)w.delete(s)}}return o}function X(r,o,s){if(!o||o.length===0)return!1;let n=p(s,r);for(let a of o){let t=k(a);if(t.match(n)||t.match(r))return!0}return!1}var G=/[*?[\]{}!]/;function C(r,o){let s=m(r.cwd,r.root),n=` root: ${s}
3
3
  entrypoints: ${r.entrypoints.map((t)=>JSON.stringify(t)).join(", ")||"(none)"}
4
4
  `+(r.exclude?.length?` exclude: ${r.exclude.map((t)=>JSON.stringify(t)).join(", ")}
5
5
  `:"")+"Entrypoints are resolved relative to --root. Pass several by repeating --entrypoints or separating them with commas.";if(o.length===0){if(r.entrypoints.filter((i)=>v(i)&&x(i)&&!S(i,s)).length===r.entrypoints.length)return;throw Error(`No source files matched. Nothing was generated.
6
- ${n}`)}let a=r.entrypoints.filter((t)=>{if(C.test(t))return!1;return!x(v(t)?t:m(s,t))});if(a.length>0)throw Error(`Entrypoint${a.length>1?"s":""} not found: ${a.map((t)=>JSON.stringify(t)).join(", ")}
7
- ${n}`)}async function N(r){let o=[],s=m(r.cwd,r.root),n=r.exclude||[],a=[...r.entrypoints,...r.include??[]];for(let t of a)if(v(t)&&b(t)){if(!t.includes("node_modules")){if(!S(t,s)&&r.outputStructure!=="flat")e.warn(`Skipping entrypoint outside root: ${p(r.cwd,t)}`);else if(!J(t,n,s))o.push(t)}}else{let i=new j(t);for await(let d of i.scan({cwd:s,absolute:!0,onlyFiles:!0}))if(b(d)&&!d.includes("node_modules")){if(!J(d,n,s))o.push(d)}}return[...new Set(o.map((t)=>m(t)))].sort()}function S(r,o){let s=p(o,r);return s!==".."&&!s.startsWith(`..${process.platform==="win32"?"\\":"/"}`)&&!v(s)}function A(r,o){let s=new Map,n=new Map;for(let a of r){let t=G(a,o),i=s.get(t);if(i&&i!==a)throw Error(`Output path collision: ${p(o.cwd,i)} and ${p(o.cwd,a)} both emit ${p(o.cwd,t)}`);s.set(t,a),n.set(a,t)}return n}function b(r){return/\.(m?tsx?|cts|jsx?|mjs|cjs|vue|stx)$/.test(r)&&!/\.d\.(?:ts|mts|cts)$/.test(r)}function G(r,o){let s=m(o.cwd,o.root),n=p(s,r),a=/\.d\.(?:ts|mts|cts)$/.test(n)?n:n.replace(/\.(m?tsx?|cts|jsx?|mjs|cjs|vue|stx)$/,(t)=>{if(t===".mts"||t===".mjs")return".d.mts";if(t===".cts"||t===".cjs")return".d.cts";return".d.ts"});if(o.outputStructure==="mirror")return m(o.cwd,o.outdir,a);else{let t=D(a);return m(o.cwd,o.outdir,t)}}function Vo(r,o,s=""){let n=p(M(r),o).replace(/\\/g,"/");if(n=n.replace(/\.d\.mts$/,"").replace(/\.d\.cts$/,"").replace(/\.d\.ts$/,""),s)n+=s;if(!n.startsWith("."))n=`./${n}`;return n}function be(r,o,s,n){let a=G(r,o);return(t)=>{let i=s(t,r);if(!i.isRelative||!i.resolved)return{kind:"unchanged",reason:i.isRelative?"unresolved":"external",specifier:t,emittedSpecifier:t};if(/\.d\.(?:ts|mts|cts)$/.test(i.resolved)){if(o.moduleSpecifierMode!=="node")return{kind:"unchanged",reason:"preserved-declaration",specifier:t,emittedSpecifier:t};if(n&&!n.has(i.resolved))throw Error(`Local declaration ${JSON.stringify(t)} from ${r} targets an authored declaration not emitted by this package build: ${i.resolved}. Declaration-only dependencies must be delivered with the package before this importer can be emitted.`)}if(i.isAlias&&n&&!n.has(i.resolved))throw Error(`Local alias ${JSON.stringify(t)} from ${r} targets a declaration excluded from this package build: ${i.resolved}`);if(n&&!n.has(i.resolved)&&J(i.resolved,o.exclude??[],m(o.cwd,o.root)))throw Error(`Local reference ${JSON.stringify(t)} from ${r} targets a source excluded from this package build: ${i.resolved}`);let d=i.isAlias?i.suffix??"":t.match(/[?#].*$/)?.[0]??"",g=d?t.slice(0,-d.length):t,h=R(g),y=/^(?:\.js|\.jsx|\.mjs|\.cjs)$/.test(h)?h:"";if(!y&&o.moduleSpecifierMode==="node"){let u=R(i.resolved);y=u===".mts"||u===".mjs"?".mjs":u===".cts"||u===".cjs"?".cjs":".js"}let l=G(i.resolved,o);return{kind:"local",specifier:t,resolvedSource:i.resolved,declarationOutput:l,emittedSpecifier:Vo(a,l,y)+d}}}
8
- export{ye,J,S,G,Vo,be};
6
+ ${n}`)}let a=r.entrypoints.filter((t)=>{if(G.test(t))return!1;return!x(v(t)?t:m(s,t))});if(a.length>0)throw Error(`Entrypoint${a.length>1?"s":""} not found: ${a.map((t)=>JSON.stringify(t)).join(", ")}
7
+ ${n}`)}async function F(r){let o=[],s=m(r.cwd,r.root),n=r.exclude||[],a=[...r.entrypoints,...r.include??[]];for(let t of a)if(v(t)&&b(t)){if(!t.includes("node_modules")){if(!S(t,s)&&r.outputStructure!=="flat")e.warn(`Skipping entrypoint outside root: ${p(r.cwd,t)}`);else if(!X(t,n,s))o.push(t)}}else{let i=new j(t);for await(let d of i.scan({cwd:s,absolute:!0,onlyFiles:!0}))if(b(d)&&!d.includes("node_modules")){if(!X(d,n,s))o.push(d)}}return[...new Set(o.map((t)=>m(t)))].sort()}function S(r,o){let s=p(o,r);return s!==".."&&!s.startsWith(`..${process.platform==="win32"?"\\":"/"}`)&&!v(s)}function N(r,o){let s=new Map,n=new Map;for(let a of r){let t=V(a,o),i=s.get(t);if(i&&i!==a)throw Error(`Output path collision: ${p(o.cwd,i)} and ${p(o.cwd,a)} both emit ${p(o.cwd,t)}`);s.set(t,a),n.set(a,t)}return n}function b(r){return/\.(m?tsx?|cts|jsx?|mjs|cjs|vue|stx)$/.test(r)&&!/\.d\.(?:ts|mts|cts)$/.test(r)}function V(r,o){let s=m(o.cwd,o.root),n=p(s,r),a=/\.d\.(?:ts|mts|cts)$/.test(n)?n:n.replace(/\.(m?tsx?|cts|jsx?|mjs|cjs|vue|stx)$/,(t)=>{if(t===".mts"||t===".mjs")return".d.mts";if(t===".cts"||t===".cjs")return".d.cts";return".d.ts"});if(o.outputStructure==="mirror")return m(o.cwd,o.outdir,a);else{let t=D(a);return m(o.cwd,o.outdir,t)}}function Yo(r,o,s=""){let n=p(M(r),o).replace(/\\/g,"/");if(n=n.replace(/\.d\.mts$/,"").replace(/\.d\.cts$/,"").replace(/\.d\.ts$/,""),s)n+=s;if(!n.startsWith("."))n=`./${n}`;return n}function ve(r,o,s,n){let a=V(r,o);return(t)=>{let i=s(t,r);if(!i.isRelative||!i.resolved)return{kind:"unchanged",reason:i.isRelative?"unresolved":"external",specifier:t,emittedSpecifier:t};if(/\.d\.(?:ts|mts|cts)$/.test(i.resolved)){if(o.moduleSpecifierMode!=="node")return{kind:"unchanged",reason:"preserved-declaration",specifier:t,emittedSpecifier:t};if(n&&!n.has(i.resolved))throw Error(`Local declaration ${JSON.stringify(t)} from ${r} targets an authored declaration not emitted by this package build: ${i.resolved}. Declaration-only dependencies must be delivered with the package before this importer can be emitted.`)}if(i.isAlias&&n&&!n.has(i.resolved))throw Error(`Local alias ${JSON.stringify(t)} from ${r} targets a declaration excluded from this package build: ${i.resolved}`);if(n&&!n.has(i.resolved)&&X(i.resolved,o.exclude??[],m(o.cwd,o.root)))throw Error(`Local reference ${JSON.stringify(t)} from ${r} targets a source excluded from this package build: ${i.resolved}`);let d=i.isAlias?i.suffix??"":t.match(/[?#].*$/)?.[0]??"",g=d?t.slice(0,-d.length):t,h=R(g),y=/^(?:\.js|\.jsx|\.mjs|\.cjs)$/.test(h)?h:"";if(!y&&o.moduleSpecifierMode==="node"){let u=R(i.resolved);y=u===".mts"||u===".mjs"?".mjs":u===".cts"||u===".cjs"?".cjs":".js"}let l=V(i.resolved,o);return{kind:"local",specifier:t,resolvedSource:i.resolved,declarationOutput:l,emittedSpecifier:Yo(a,l,y)+d}}}
8
+ export{Ce,X,S,V,Yo,ve};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{basename as e,dirname as n,isAbsolute as i,join as o,relative as a,resolve as s}from"path";function $i(t){if(!t||typeof t!=="string")throw Error("Invalid file path: must be a non-empty string");return t}function Ei(t){if(!t||typeof t!=="string")throw Error("Invalid directory path: must be a non-empty string");return t}function ki(t){if(!t||typeof t!=="string")throw Error("Invalid glob pattern: must be a non-empty string");return t}function Ti(t){if(typeof t!=="string")throw TypeError("Invalid source code: must be a string");return t}function Ai(t){if(typeof t!=="string")throw TypeError("Invalid DTS content: must be a string");return t}function Pi(t){if(!t||typeof t!=="string")throw Error("Invalid module specifier: must be a non-empty string");return t}function Di(t){if(!t||typeof t!=="string")throw Error("Invalid type name: must be a non-empty string");if(!["string","number","boolean","symbol","bigint","undefined","null","void","never","any","unknown","object"].includes(t)&&!/^[A-Z_$]/.test(t));return t}function Ri(t){if(!t||typeof t!=="string")throw Error("Invalid declaration name: must be a non-empty string");return t}function Mi(t){if(!t||typeof t!=="string")throw Error("Invalid absolute path: must be a non-empty string");if(!t.startsWith("/")&&!/^[A-Z]:/i.test(t))throw Error("Invalid absolute path: must start with / or drive letter");return t}function Oi(t){if(!t||typeof t!=="string")throw Error("Invalid relative path: must be a non-empty string");if(t.startsWith("/")||/^[A-Z]:/i.test(t))throw Error("Invalid relative path: must not be absolute");return t}function Ii(t){if(typeof t!=="string")throw TypeError("Invalid JSON string: must be a string");try{JSON.parse(t)}catch{throw Error("Invalid JSON string: must be valid JSON")}return t}function Fi(t,r){return typeof t==="string"||typeof t==="number"}function Li(t){return t}var Ni={join(t,...r){return o(t,...r)},dirname(t){return n(t)},basename(t){return e(t)},resolve(...t){return s(...t)},isAbsolute(t){return i(t)},relative(t,r){return a(t,r)}};
3
- export{$i,Ei,ki,Ti,Ai,Pi,Di,Ri,Mi,Oi,Ii,Fi,Li,Ni};
2
+ import{basename as e,dirname as n,isAbsolute as i,join as o,relative as a,resolve as s}from"path";function Ri(t){if(!t||typeof t!=="string")throw Error("Invalid file path: must be a non-empty string");return t}function Mi(t){if(!t||typeof t!=="string")throw Error("Invalid directory path: must be a non-empty string");return t}function Oi(t){if(!t||typeof t!=="string")throw Error("Invalid glob pattern: must be a non-empty string");return t}function Ii(t){if(typeof t!=="string")throw TypeError("Invalid source code: must be a string");return t}function Li(t){if(typeof t!=="string")throw TypeError("Invalid DTS content: must be a string");return t}function Fi(t){if(!t||typeof t!=="string")throw Error("Invalid module specifier: must be a non-empty string");return t}function Ni(t){if(!t||typeof t!=="string")throw Error("Invalid type name: must be a non-empty string");if(!["string","number","boolean","symbol","bigint","undefined","null","void","never","any","unknown","object"].includes(t)&&!/^[A-Z_$]/.test(t));return t}function Bi(t){if(!t||typeof t!=="string")throw Error("Invalid declaration name: must be a non-empty string");return t}function Wi(t){if(!t||typeof t!=="string")throw Error("Invalid absolute path: must be a non-empty string");if(!t.startsWith("/")&&!/^[A-Z]:/i.test(t))throw Error("Invalid absolute path: must start with / or drive letter");return t}function ji(t){if(!t||typeof t!=="string")throw Error("Invalid relative path: must be a non-empty string");if(t.startsWith("/")||/^[A-Z]:/i.test(t))throw Error("Invalid relative path: must not be absolute");return t}function _i(t){if(typeof t!=="string")throw TypeError("Invalid JSON string: must be a string");try{JSON.parse(t)}catch{throw Error("Invalid JSON string: must be valid JSON")}return t}function Gi(t,r){return typeof t==="string"||typeof t==="number"}function Vi(t){return t}var Ui={join(t,...r){return o(t,...r)},dirname(t){return n(t)},basename(t){return e(t)},resolve(...t){return s(...t)},isAbsolute(t){return i(t)},relative(t,r){return a(t,r)}};
3
+ export{Ri,Mi,Oi,Ii,Li,Fi,Ni,Bi,Wi,ji,_i,Gi,Vi,Ui};
@@ -0,0 +1,31 @@
1
+ // @bun
2
+ import{g,ee,Et,u}from"./chunk-ayyb1jpe.js";import{W}from"./chunk-k5wz43yh.js";import{R,M}from"./chunk-2ngfncfx.js";import{P,D}from"./chunk-hqph3vnd.js";import{r}from"./chunk-z6mpxpxt.js";import{Se}from"./chunk-2dstvjpv.js";import{e,A}from"./chunk-btc6zbyj.js";import{Ee,k,Pn,U}from"./chunk-7z8pykqp.js";import{vn}from"./chunk-vgmnxnjf.js";import{He,wt}from"./chunk-ka8mbyjb.js";import{E}from"./chunk-60wrxcjt.js";import{Ce,X,V,ve}from"./chunk-y4wykrya.js";import{Ke,G,q,xt,Ct,vt,St}from"./chunk-3jjrn16z.js";import{K,he}from"./chunk-aak9xzy7.js";import{ze,bt}from"./chunk-p4hf9bwj.js";import{H}from"./chunk-8dvxjzhy.js";import{kn,Je}from"./chunk-zbe06f63.js";import{ye}from"./chunk-4q78f5pg.js";import{Ve}from"./chunk-550teag8.js";import{xe}from"./chunk-jswvvjkr.js";import{l}from"./chunk-yzdh207n.js";import{J,$t}from"./chunk-sgcne5bb.js";import{mkdir as De}from"fs/promises";import{availableParallelism as Pe}from"os";import{basename as ue,dirname as fe,relative as B,resolve as ie}from"path";var oe=new WeakMap,ce=new WeakMap;function se(d){let a=oe.get(d);if(!a)a=Ee(d),oe.set(d,a),a.catch(()=>oe.delete(d));return a}async function le(d,a,t,f,w,h=G){let o=ue(d)||"output.d.ts",C=B(fe(d),a),I=`${o}.map`,Y=t.lastIndexOf(`
3
+ ${Ke()}`),p=Y===-1?t:t.slice(0,Y),y=vt(p,o,C,f),b=`${d}.map`;return await h(b,JSON.stringify(y)),e.debug(` Generated source map: ${B(w,b)}`),I}async function s(d){let a=Date.now(),t={...E,...d};if(t.logLevel)A(t.logLevel);else if(t.verbose)A("debug");let f=new xe;if(t.plugins&&t.plugins.length>0){for(let n of t.plugins)f.register(n),e.debug(`Registered plugin: ${n.name}`);t=await f.runOnStart(t)}if(t.moduleSpecifierMode!==void 0&&t.moduleSpecifierMode!=="preserve"&&t.moduleSpecifierMode!=="node")throw Error("moduleSpecifierMode must be preserve or node");if(await K(t),t.isolatedDeclarations===void 0)t.isolatedDeclarations=await q(t);let w=t.typeMappings?J(t.typeMappings):void 0,h=null,o={generationMode:t.isolatedDeclarations?"isolated":"semantic",filesProcessed:0,filesGenerated:0,filesFailed:0,filesValidated:0,validationErrors:0,declarationsFound:0,importsProcessed:0,exportsProcessed:0,durationMs:0,errors:[]},C=0;e.debug("Starting DTS generation..."),e.debug(`Using ${o.generationMode} declaration generation path`),e.debug("Config:",t);let I=await Ce(t,()=>se(t)),Y=I.entryFiles,p=[...I.files],{resolver:y,reachability:b}=I;if(ce.set(t,new Set(p)),t.incremental){let n=I.getResolutionFingerprint();if(!t.isolatedDeclarations){let i=new Set(p),m=new Map;for(let S of p){let T=await u(S);m.set(S,Je(T));for(let te of k(T,{includeImports:!0})){let O=y(te.specifier,S).resolved;if(O&&!O.split(/[/\\]/).includes("node_modules")&&!i.has(O))i.add(O),m.set(O,Je(await u(O)))}}let c=[...m].sort(([S],[T])=>S.localeCompare(T));n=JSON.stringify([n,c])}if(h=new He(t,n),t.clearCache){if(e.debug("Clearing build cache..."),!t.dryRun)h.clear()}else if(h.load()){let m=h.getStats();e.debug(`Loaded build cache with ${m.entries} entries`)}else e.debug("No existing build cache found, starting fresh");if(!t.dryRun)wt(t.cwd)}if(h&&!t.dryRun){let n=h.prune(new Set(p),t.cwd);if(n>0)e.debug(`Pruned ${n} deleted files from cache`)}if(e.debug(`Found ${p.length} TypeScript files`),t.progress&&p.length>0){let n=t.parallel?"parallel":"sequential";e.info(`Processing ${p.length} files (${n})...`)}let L=new Map,N=new Map,v=async(n,i,m="lf")=>{N.set(n,{content:i,lineEnding:m})},x=async(n,i)=>{let m;try{let c=V(n,t),S=async(F)=>{if(!t.diff)return;try{let _=await u(c),Q=Ct(_,F,B(t.cwd,c));if(Q)e.info(`
4
+ ${Q}`);else e.debug(`[no changes] ${c}`)}catch{e.info(`[new file] ${B(t.cwd,c)}`)}},T=(F)=>{if(!t.validate)return 0;let _=xt(F,c);if(_.isValid)return e.debug(`[validation] ${c} - OK`),0;e.warn(`[validation] ${B(t.cwd,c)} has ${_.errors.length} error(s):`);for(let Q of _.errors){let ae=` Line ${Q.line}:${Q.column}`;if(Q.code)ae+=` [${Q.code}]`;if(ae+=` - ${Q.message}`,e.warn(ae),Q.suggestion)e.warn(` Suggestion: ${Q.suggestion}`)}return _.errors.length},te=(F)=>{e.info(`[dry-run] Would generate: ${c}`),e.debug("--- Content preview ---"),e.debug(F.slice(0,500)+(F.length>500?`
5
+ ...`:"")),e.debug("--- End preview ---")};if(h){let F=h.getCachedIfValid(n,t.cwd);if(F){if(t.bundle)L.set(n,F);await S(F);let _=T(F);if(t.dryRun)te(F);else{if(t.declarationMap)m=i??await u(n),await le(c,n,F,m,t.cwd,v);await v(c,F,t.lineEnding)}return e.debug(`[cached] ${B(t.cwd,c)}`),{success:!0,file:n,declarationCount:0,importCount:0,exportCount:0,cached:!0,validationErrorCount:_}}}m=i??await u(n);let{content:O,declarationCount:ge,importCount:we,exportCount:be}=await me(n,m,t,f,w,I.augmentationImports.get(n));if(t.bundle)L.set(n,O);let j=O;if(t.prettier||t.indentStyle||t.indentSize){let F=await H(j,{usePrettier:t.prettier,builtIn:{indentSize:t.indentSize||2,useTabs:t.indentStyle==="tabs",normalizeWhitespace:!0,sortImports:!0,trailingNewline:!0}},c);j=F.content;for(let _ of F.warnings??[])e.warn(`[format] ${_}`)}if(t.declarationMap){let F=`${ue(c)||"output.d.ts"}.map`;j=St(j,F)}await S(j);let $e=T(j);if(t.dryRun)te(j);else{if(t.declarationMap&&m)await le(c,n,j,m,t.cwd,v);if(await v(c,j,t.lineEnding),h&&m)h.update(n,m,j,t.cwd);e.debug(`Generated: ${c}`)}return{success:!0,file:n,declarationCount:ge,importCount:we,exportCount:be,validationErrorCount:$e}}catch(c){let S=ze(c,n,m);if(t.plugins&&t.plugins.length>0)await f.runOnError(c instanceof Error?c:Error(String(c)),n,m||"");return{success:!1,file:n,declarationCount:0,importCount:0,exportCount:0,dtsError:S,validationErrorCount:0}}},z=t.parallel||t.parallel!==!1&&p.length>=10,Z=W(t.concurrency,Pe?.()??8),ne=new Map;if(z&&p.length>1){let n=p.map(async(i)=>{try{let m=await u(i);return{file:i,source:m}}catch{return{file:i,source:null}}});for(let i of await Promise.all(n))if(i.source!==null)ne.set(i.file,i.source)}let re=(n)=>{if(o.filesProcessed++,n.success){if(n.cached)C++;else o.filesGenerated++,o.declarationsFound+=n.declarationCount,o.importsProcessed+=n.importCount,o.exportsProcessed+=n.exportCount;if(t.validate){if(o.filesValidated++,n.validationErrorCount)o.validationErrors+=n.validationErrorCount}}else if(o.filesFailed++,n.dtsError){o.errors.push(n.dtsError);let i=bt(n.dtsError);if(t.continueOnError)e.warn(i);else throw e.error(i),Error(n.dtsError.message)}};if(z)for(let n=0;n<p.length;n+=Z){let i=p.slice(n,n+Z),m=await Promise.all(i.map((c)=>x(c,ne.get(c))));for(let c of m)re(c);if(t.progress){let c=Math.round(o.filesProcessed/p.length*100);e.info(`[${o.filesProcessed}/${p.length}] ${c}%`)}}else for(let n of p){let i=await x(n);if(re(i),t.progress){let m=Math.round(o.filesProcessed/p.length*100),c=i.cached?"[cached]":"";e.info(`[${o.filesProcessed}/${p.length}] ${m}% - ${B(t.cwd,n)} ${c}`)}}if(!t.bundle){let n=[];if(b)for(let i of b.unresolved)n.push({from:i.from,specifier:i.specifier,reason:"missing"});if(t.autoIncludeReExports===!1&&p.length>0){let i=new Set(p);for(let m of p){let c;try{c=await u(m)}catch{continue}for(let S of k(c)){let T=y(S.specifier,m);if(!T.isRelative)continue;if(!T.resolved)n.push({from:m,specifier:S.specifier,reason:"missing"});else if(!/\.d\.(?:ts|mts|cts)$/.test(T.resolved)&&!i.has(T.resolved))n.push({from:m,specifier:S.specifier,reason:"not-emitted"})}}}if(n.length>0){let i=[];i.push(`Found ${n.length} re-export(s) pointing at siblings that won't be in the output:`);for(let c of n){let S=B(t.cwd,c.from);if(c.reason==="missing")i.push(` ${S} \u2192 '${c.specifier}' (path not found on disk)`);else i.push(` ${S} \u2192 '${c.specifier}' (resolved but not in entrypoints; set autoIncludeReExports: true or add to entrypoints)`)}let m=i.join(`
6
+ `);if(t.failOnUnresolvedReExport)throw Error(m);e.warn(m),e.warn('Generated .d.ts files reference modules that were not emitted \u2014 consumers will see "has no exported member" errors.')}}if(t.bundle&&(o.filesGenerated>0||C>0)&&Y.length>0)try{e.debug("Bundling declarations...");let n=Y.length===1&&!!t.bundleOutput;for(let i of Y){let m=await U([i],{includeImports:!0,resolveSpecifier:y}),c=new Set;for(let O of m.reachable){if(O.endsWith(".d.ts"))continue;if(O.includes("node_modules"))continue;c.add(O)}let S=p.filter((O)=>c.has(O));if(!S.includes(i))S.push(i);let T=vn(i,S,L,{cwd:t.cwd,keepComments:t.keepComments});for(let O of new Set(T.warnings))e.warn(`[bundle] ${O}`);let te=n?ie(t.cwd,t.outdir,t.bundleOutput):V(i,t);if(t.dryRun)e.info(`[dry-run] Would bundle ${T.files.length} files to: ${B(t.cwd,te)}`);else await v(te,T.content,t.lineEnding),e.debug(`Prepared ${T.files.length} bundled files for: ${B(t.cwd,te)}`);if(n)break}}catch(n){let i=n instanceof Error?n.message:String(n);throw e.error(`Bundle failed: ${i}`),n}if(!t.dryRun)await he(t,N);if(h&&!t.dryRun)h.save(),e.debug("Saved build cache");if(o.durationMs=Date.now()-a,t.stats)if(t.outputFormat==="json")console.log(JSON.stringify(o,null,2));else{if(e.info(`
7
+ --- Generation Statistics ---`),e.info(`Files processed: ${o.filesProcessed}`),e.info(`Files generated: ${o.filesGenerated}`),C>0)e.info(`Files cached: ${C}`);if(o.filesFailed>0)e.info(`Files failed: ${o.filesFailed}`);if(e.info(`Declarations found: ${o.declarationsFound}`),e.info(`Imports processed: ${o.importsProcessed}`),e.info(`Exports processed: ${o.exportsProcessed}`),o.filesValidated>0){if(e.info(`Files validated: ${o.filesValidated}`),o.validationErrors>0)e.info(`Validation errors: ${o.validationErrors}`)}if(e.info(`Duration: ${o.durationMs}ms`),o.errors.length>0){e.info(`
8
+ Errors:`);for(let n of o.errors){let i=` - ${n.file}`;if(n.location)i+=`:${n.location.line}:${n.location.column}`;if(n.code)i+=` [${n.code}]`;if(i+=`: ${n.message}`,e.info(i),n.suggestion)e.info(` Suggestion: ${n.suggestion}`)}}e.info(`-----------------------------
9
+ `)}if(t.plugins&&t.plugins.length>0)await f.runOnEnd(o);return e.debug("DTS generation complete!"),o}async function Me(d,a,t){let f=await se(t),w=ve(a,t,f,ce.get(t));return Pn(d,(h)=>w(h).emittedSpecifier)}async function ro(d,a){oe.delete(a),ce.delete(a);let t=await se(a),f=await U([d],{includeImports:!0,resolveSpecifier:t}),w=await Se([...f.sources.keys()],t,a.isolatedDeclarations??!1,f.sources);return(await pe(d,a,void 0,w.get(ie(d)))).content}async function pe(d,a,t,f){let w=await u(d),h=a.typeMappings?J(a.typeMappings):void 0;return me(d,w,a,t,h,f)}async function me(d,a,t,f,w,h){let o=a;if(f)o=await f.runOnBeforeFile(d,a);let C=new Map;if(!t.isolatedDeclarations){let v=await se(t);for(let x of k(o,{includeImports:!0})){let z=v(x.specifier,d).resolved;if(z&&!z.split(/[/\\]/).includes("node_modules"))C.set(x.specifier,await u(z))}}let I=f?.hasDeclarationHooks()?null:Re(o,d,t,C,h);if(I!==null)return de(I,d,o,t,f,w,Fe(I));let Y=C.size?kn(o,C):void 0,p=r(o,d,t.keepComments,t.isolatedDeclarations??!1,Y);if(f)p=await f.runOnDeclarations(d,o,p);let y=0,b=0;for(let v=0;v<p.length;v++){let x=p[v];if(x.kind==="import")y++;if(x.kind==="export"||x.isExported)b++}let N=l(p,{filePath:d,sourceCode:o,declarations:p,augmentationImports:h},t.keepComments,t.importOrder);return de(N,d,o,t,f,w,{declarationCount:p.length,importCount:y,exportCount:b})}function Fe(d){let a=0,t=0,f=0;for(let w of d.split(`
10
+ `)){if(!w||w.startsWith(" ")||w.startsWith("\t")||w.startsWith("}")||w.startsWith("*")||w.startsWith("/"))continue;if(a++,w.startsWith("import "))t++;else if(w.startsWith("export "))f++}return{declarationCount:a,importCount:t,exportCount:f}}function Re(d,a,t,f,w){let h=t.importOrder??["bun"];if(h.length!==1||h[0]!=="bun")return null;let o=R(a)?M(d):P(a)?D(d):d;return ye(o,{keepComments:t.keepComments??!0,isolatedDeclarations:t.isolatedDeclarations??!1,sourceFile:a,inferenceSources:f,augmentationImports:w})}async function de(d,a,t,f,w,h,o){let C=await Me(d,a,f);if(h)C=$t(C,h,{filePath:a});if(f.normalizeOutput===!0||f.declarationOrder)C=Ve(C,{lineEnding:"lf",declarationOrder:f.declarationOrder,indent:{style:f.indentStyle??"spaces",size:f.indentSize??2}});if(w)C=await w.runOnAfterFile(a,t,C);return{content:C,...o}}async function io(d){let a={...E,...d};if(a.logLevel)A(a.logLevel);let t=ie(a.cwd,a.root),f=150,w=5,h=1e4,o={pendingChanges:new Set,debounceTimer:null,isProcessing:!1,errorCount:0,lastErrorTime:0};e.info(`Watching for changes in ${t}...`),e.info(`Press Ctrl+C to stop
11
+ `);try{await s(a),e.info(`[watch] Initial generation complete
12
+ `)}catch(y){let b=y instanceof Error?y.message:String(y);e.error(`[watch] Initial generation failed: ${b}`),e.info(`[watch] Continuing to watch for changes...
13
+ `)}async function C(){if(o.isProcessing||o.pendingChanges.size===0)return;let y=Date.now();if(o.errorCount>=w){if(y-o.lastErrorTime<h){e.warn(`[watch] Too many errors, pausing for ${Math.ceil((h-(y-o.lastErrorTime))/1000)}s...`);return}o.errorCount=0}o.isProcessing=!0;let b=Array.from(o.pendingChanges);o.pendingChanges.clear();let L=new Date().toLocaleTimeString();if(b.length===1)e.info(`
14
+ [${L}] File changed: ${b[0]}`);else e.info(`
15
+ [${L}] ${b.length} files changed`);let N=0,v=0;for(let x of b){let z=ie(t,x);try{let Z=a.exclude||[];if(X(z,Z,t)){e.debug(` Skipping excluded file: ${x}`);continue}if(!await ee(z).exists()){e.debug(` Skipping deleted file: ${x}`);continue}let re=V(z,a),{content:n}=await pe(z,a);await De(fe(re),{recursive:!0}),await G(re,n,a.lineEnding),e.info(` \u2713 ${B(a.cwd,re)}`),N++}catch(Z){v++,o.errorCount++,o.lastErrorTime=Date.now();let ne=ze(Z,z);if(e.error(` \u2717 ${x}: ${ne.message}`),ne.suggestion)e.error(` Suggestion: ${ne.suggestion}`)}}if(b.length>1)e.info(` Done: ${N} generated, ${v} failed`);if(v===0)o.errorCount=0;if(o.isProcessing=!1,o.pendingChanges.size>0)o.debounceTimer=setTimeout(C,f)}function I(y){if(o.pendingChanges.add(y),o.debounceTimer)clearTimeout(o.debounceTimer);o.debounceTimer=setTimeout(C,f)}let p=Et([g?"bun":"node","-e",`
16
+ const fs = require('fs');
17
+
18
+ const rootPath = '${t}';
19
+
20
+ fs.watch(rootPath, { recursive: true }, (eventType, filename) => {
21
+ if (filename && /.(?:[cm]?[jt]sx?|vue|stx)$/.test(filename) && !/.d.(?:ts|mts|cts)$/.test(filename)) {
22
+ console.log(\`CHANGED:\${filename}\`);
23
+ }
24
+ });
25
+
26
+ // Keep process alive
27
+ setInterval(() => {}, 1000);
28
+ `],{stdout:"pipe",stderr:"inherit"});if(g){let y=p.stdout.getReader(),b=new TextDecoder,L="";while(!0){let{done:N,value:v}=await y.read();if(N)break;L+=b.decode(v,{stream:!0});let x=L.split(`
29
+ `);L=x.pop()||"";for(let z of x)if(z.startsWith("CHANGED:")){let Z=z.slice(8);I(Z)}}}else{let y=p.stdout,b="";y.on("data",(L)=>{b+=L.toString();let N=b.split(`
30
+ `);b=N.pop()||"";for(let v of N)if(v.startsWith("CHANGED:")){let x=v.slice(8);I(x)}}),await p.exited}}
31
+ export{s,ro,io};
@@ -1,10 +1,10 @@
1
1
  // @bun
2
- import{W,jn,_n}from"./chunk-ag1b6d30.js";import{dn}from"./chunk-zk3w5sqv.js";import{f}from"./chunk-cv29b4zb.js";import{ee,h,te,ne,re,ie,se}from"./chunk-xa6rsd4b.js";import{Ee,b}from"./chunk-vf3ybe5r.js";import{xe}from"./chunk-4fygcxtb.js";function V(k,x){throw Error(x||`Unexpected value: ${k}`)}var j=null,q=[],z=[];function l(k,x,d=!0,y=["bun"]){let o="",m=x.sourceCode;if(m){let e=0;while(e<m.length&&(m.charCodeAt(e)===32||m.charCodeAt(e)===9||m.charCodeAt(e)===10||m.charCodeAt(e)===13))e++;if(e<m.length-2&&m.charCodeAt(e)===47&&m.charCodeAt(e+1)===47&&m.charCodeAt(e+2)===47){let i=dn(m);if(i.length>0)for(let r=0;r<i.length;r++){if(o)o+=`
3
- `;o+=i[r]}}}let w=[],N=[],M=[],P=[],U=[],_=[],F=[],C=[],T=[];for(let e of k){let i=e.kind;switch(i){case"import":w.push(e);break;case"function":N.push(e);break;case"variable":M.push(e);break;case"interface":P.push(e);break;case"type":U.push(e);break;case"class":_.push(e);break;case"enum":F.push(e);break;case"module":C.push(e);break;case"export":T.push(e);break;case"namespace":C.push(e);break;case"unknown":break;default:V(i,`Unhandled declaration kind: ${i}`)}}let S=[],v=[],A=[],K=new Set;for(let e of T){let i=f(e.leadingComments,d);if(e.text.startsWith("export default")){let r=e.text.endsWith(";")?e.text:`${e.text};`;A.push(i+r)}else{let r=e.text.trim();if(!r.endsWith(";"))r+=";";let a=i+r;if(!K.has(a))if(K.add(a),a.includes("export type"))S.push(a);else v.push(a)}}let u=[];if(w.length>0){let{usedItems:e}=xe(k);for(let r of w){if(r.isSideEffect){let t=r.text.trim(),p=t.endsWith(";")?t:`${t};`;u.push(p);continue}let a=b(r.text);if(!a)continue;let{defaultName:s,namedItems:n,isTypeOnly:g,namespaceName:c}=a,D=s?e.has(s):!1,L=c?e.has(c):!1;if(a.isImportEquals){if(D){let t=r.text.trim();u.push(t.endsWith(";")?t:`${t};`)}else if(x.augmentationImports?.has(a.source)){let t=Ee(r.text);if(!t)throw Error("Cannot locate an augmentation import module literal");u.push(`import ${t};`)}continue}let I="",E=0;for(let t=0;t<n.length;t++){let p=n[t];if(e.has(p.name)){if(E>0)I+=", ";if(!g&&p.isTypeOnly)I+="type ";I+=p.originalName===p.name?p.name:`${p.originalName} as ${p.name}`,E++}}if(D||L||E>0){let t=g?"import type ":"import ";if(L&&c){if(D&&s)t+=`${s}, `;t+=`* as ${c}`}else if(D&&s)t+=E>0?`${s}, { ${I} }`:s;else if(E>0)t+=`{ ${I} }`;let p=Ee(r.text);if(!p)throw Error("Cannot locate a grammatical module literal in the import declaration");t+=` from ${p};`,u.push(t)}else if(x.augmentationImports?.has(a.source)){let t=Ee(r.text);if(!t)throw Error("Cannot locate an augmentation import module literal");u.push(`import ${t};`)}}let i=y.length;if(u.length>1){if(j!==y)j=y,q=y.map((n)=>`from '${n}`),z=y.map((n)=>`from "${n}`);let r=q,a=z,s=new Map;for(let n of u){let g=i;for(let c=0;c<y.length;c++)if(n.includes(r[c])||n.includes(a[c])){g=c;break}s.set(n,g)}u.sort((n,g)=>{let c=s.get(n),D=s.get(g);return c!==D?c-D:n.localeCompare(g)})}}for(let e=0;e<u.length;e++){if(o)o+=`
2
+ import{j,Hn,Kn}from"./chunk-7j4cgkb4.js";import{bn}from"./chunk-veh8ks5v.js";import{f}from"./chunk-a3apthex.js";import{ne,h,re,ie,se,oe,ae}from"./chunk-7ynrmx5b.js";import{Pe,b}from"./chunk-jfygtm4r.js";import{$e}from"./chunk-zk55g2cb.js";function L(k,x){throw Error(x||`Unexpected value: ${k}`)}var V=null,q=[],z=[];function l(k,x,d=!0,y=["bun"]){let o="",m=x.sourceCode;if(m){let e=0;while(e<m.length&&(m.charCodeAt(e)===32||m.charCodeAt(e)===9||m.charCodeAt(e)===10||m.charCodeAt(e)===13))e++;if(e<m.length-2&&m.charCodeAt(e)===47&&m.charCodeAt(e+1)===47&&m.charCodeAt(e+2)===47){let i=bn(m);if(i.length>0)for(let r=0;r<i.length;r++){if(o)o+=`
3
+ `;o+=i[r]}}}let w=[],N=[],M=[],P=[],U=[],W=[],_=[],C=[],T=[];for(let e of k){let i=e.kind;switch(i){case"import":w.push(e);break;case"function":N.push(e);break;case"variable":M.push(e);break;case"interface":P.push(e);break;case"type":U.push(e);break;case"class":W.push(e);break;case"enum":_.push(e);break;case"module":C.push(e);break;case"export":T.push(e);break;case"namespace":C.push(e);break;case"unknown":break;default:L(i,`Unhandled declaration kind: ${i}`)}}let S=[],v=[],A=[],F=new Set;for(let e of T){let i=f(e.leadingComments,d);if(e.text.startsWith("export default")){let r=e.text.endsWith(";")?e.text:`${e.text};`;A.push(i+r)}else{let r=e.text.trim();if(!r.endsWith(";"))r+=";";let a=i+r;if(!F.has(a))if(F.add(a),a.includes("export type"))S.push(a);else v.push(a)}}let u=[];if(w.length>0){let{usedItems:e}=$e(k);for(let r of w){if(r.isSideEffect){let t=r.text.trim(),p=t.endsWith(";")?t:`${t};`;u.push(p);continue}let a=b(r.text);if(!a)continue;let{defaultName:s,namedItems:n,isTypeOnly:g,namespaceName:c}=a,D=s?e.has(s):!1,G=c?e.has(c):!1;if(a.isImportEquals){if(D){let t=r.text.trim();u.push(t.endsWith(";")?t:`${t};`)}else if(x.augmentationImports?.has(a.source)){let t=Pe(r.text);if(!t)throw Error("Cannot locate an augmentation import module literal");u.push(`import ${t};`)}continue}let I="",E=0;for(let t=0;t<n.length;t++){let p=n[t];if(e.has(p.name)){if(E>0)I+=", ";if(!g&&p.isTypeOnly)I+="type ";I+=p.originalName===p.name?p.name:`${p.originalName} as ${p.name}`,E++}}if(D||G||E>0){let t=g?"import type ":"import ";if(G&&c){if(D&&s)t+=`${s}, `;t+=`* as ${c}`}else if(D&&s)t+=E>0?`${s}, { ${I} }`:s;else if(E>0)t+=`{ ${I} }`;let p=Pe(r.text);if(!p)throw Error("Cannot locate a grammatical module literal in the import declaration");t+=` from ${p};`,u.push(t)}else if(x.augmentationImports?.has(a.source)){let t=Pe(r.text);if(!t)throw Error("Cannot locate an augmentation import module literal");u.push(`import ${t};`)}}let i=y.length;if(u.length>1){if(V!==y)V=y,q=y.map((n)=>`from '${n}`),z=y.map((n)=>`from "${n}`);let r=q,a=z,s=new Map;for(let n of u){let g=i;for(let c=0;c<y.length;c++)if(n.includes(r[c])||n.includes(a[c])){g=c;break}s.set(n,g)}u.sort((n,g)=>{let c=s.get(n),D=s.get(g);return c!==D?c-D:n.localeCompare(g)})}}for(let e=0;e<u.length;e++){if(o)o+=`
4
4
  `;o+=u[e]}for(let e=0;e<S.length;e++){if(o)o+=`
5
- `;o+=S[e]}let G=[N,M,P,U,_,F,C];for(let e=0;e<G.length;e++){let i=G[e];for(let r=0;r<i.length;r++){let a=i[r],s="",n=a.kind;switch(n){case"function":s=ee(a,d);break;case"variable":s=h(a,d);break;case"interface":s=te(a,d);break;case"type":s=ne(a,d);break;case"class":s=re(a,d);break;case"enum":s=ie(a,d);break;case"module":case"namespace":s=se(a,d);break;case"import":case"export":case"unknown":break;default:V(n,`Unhandled declaration kind in processor: ${n}`)}if(s){if(o)o+=`
5
+ `;o+=S[e]}let K=[N,M,P,U,W,_,C];for(let e=0;e<K.length;e++){let i=K[e];for(let r=0;r<i.length;r++){let a=i[r],s="",n=a.kind;switch(n){case"function":s=ne(a,d);break;case"variable":s=h(a,d);break;case"interface":s=re(a,d);break;case"type":s=ie(a,d);break;case"class":s=se(a,d);break;case"enum":s=oe(a,d);break;case"module":case"namespace":s=ae(a,d);break;case"import":case"export":case"unknown":break;default:L(n,`Unhandled declaration kind in processor: ${n}`)}if(s){if(o)o+=`
6
6
  `;o+=s}}}for(let e=0;e<v.length;e++){if(o)o+=`
7
7
  `;o+=v[e]}for(let e=0;e<A.length;e++){if(o)o+=`
8
- `;o+=A[e]}if(T.length===0&&W(x.sourceCode)&&(k.some(_n)||!jn(o)))o+=`${o?`
8
+ `;o+=A[e]}if(T.length===0&&j(x.sourceCode)&&(k.some(Kn)||!Hn(o)))o+=`${o?`
9
9
  `:""}export {};`;return o}
10
10
  export{l};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{W}from"./chunk-k5wz43yh.js";import{Te,Rn}from"./chunk-vbzchjvq.js";import{te,On}from"./chunk-8zvjkzsv.js";function Si(){On(),Rn()}function r(e,t,c=!0,n=!1,o){return Te(e,t,c,n,o)}async function Dn(e,t,c=!0,n={}){return await te(t,e,n),r(e,t,c)}async function $i(e,t={}){let c=W(t.concurrency,4),n=new Map;for(let o=0;o<e.length;o+=c){let s=e.slice(o,o+c),i=await Promise.all(s.map(async(a)=>({path:a.filePath,declarations:await Dn(a.sourceCode,a.filePath,a.keepComments,t)})));for(let a of i)n.set(a.path,a.declarations)}return n}
3
+ export{Si,r,Dn,$i};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Re}from"./chunk-1qtghb2x.js";import{T}from"./chunk-yx1jy7fx.js";import{b}from"./chunk-vf3ybe5r.js";function xn(i,r){let n=new Set;for(let e of T(i,"imports.ts",!1)){if(e.kind!=="import")continue;let t=b(e.text),a=t&&r.get(t.source);if(!t||t.isTypeOnly||!a)continue;let s=ze(a);for(let o of t.namedItems)if(!o.isTypeOnly&&s.some((m)=>m.name===o.originalName))n.add(o.name);if(t.defaultName&&s.some((o)=>o.isDefault))n.add(t.defaultName)}return n}function ze(i){let r=T(i,"dependency.ts",!1).filter((n)=>n.kind==="function");return r.filter((n)=>n.isExported&&!n.generics&&r.filter((e)=>e.name===n.name).length===1&&Re(i,n.name)===1).map((n)=>({name:n.name,isDefault:Boolean(n.isDefault)})).sort((n,e)=>n.name.localeCompare(e.name))}
3
- export{xn,ze};
2
+ import{Le}from"./chunk-ex03kbwr.js";import{T}from"./chunk-3mcz22q8.js";import{b}from"./chunk-jfygtm4r.js";function kn(i,r){let n=new Set;for(let e of T(i,"imports.ts",!1)){if(e.kind!=="import")continue;let t=b(e.text),a=t&&r.get(t.source);if(!t||t.isTypeOnly||!a)continue;let s=Je(a);for(let o of t.namedItems)if(!o.isTypeOnly&&s.some((m)=>m.name===o.originalName))n.add(o.name);if(t.defaultName&&s.some((o)=>o.isDefault))n.add(t.defaultName)}return n}function Je(i){let r=T(i,"dependency.ts",!1).filter((n)=>n.kind==="function");return r.filter((n)=>n.isExported&&!n.generics&&r.filter((e)=>e.name===n.name).length===1&&Le(i,n.name)===1).map((n)=>({name:n.name,isDefault:Boolean(n.isDefault)})).sort((n,e)=>n.name.localeCompare(e.name))}
3
+ export{kn,Je};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{c,i}from"./chunk-zq93f8ca.js";import{h}from"./chunk-xa6rsd4b.js";import{y}from"./chunk-vf3ybe5r.js";function xe(f){let r=new Set,n=[];for(let t of f)if(t.kind==="import")for(let o of y(t.text))r.add(o);else if(t.kind!=="unknown"){if(n.push(t.text),t.kind==="variable"){if(t.typeAnnotation)n.push(t.typeAnnotation);else if(t.value)n.push(h(t,!1))}}let e=n.join(`
2
+ import{c,i}from"./chunk-8kj9pkw5.js";import{h}from"./chunk-7ynrmx5b.js";import{y}from"./chunk-jfygtm4r.js";function $e(f){let r=new Set,n=[];for(let t of f)if(t.kind==="import")for(let o of y(t.text))r.add(o);else if(t.kind!=="unknown"){if(n.push(t.text),t.kind==="variable"){if(t.typeAnnotation)n.push(t.typeAnnotation);else if(t.value)n.push(h(t,!1))}}let e=n.join(`
3
3
  `),s=new Set;for(let t=0;t<e.length;){if(!c(e.charCodeAt(t))){t++;continue}let o=t++;while(t<e.length&&i(e.charCodeAt(t)))t++;let a=e.slice(o,t);if(r.has(a))s.add(a)}return{usedItems:s,referenceText:e}}
4
- export{xe};
4
+ export{$e};
@@ -1,10 +1,10 @@
1
1
  // @bun
2
- import{r}from"./chunk-jcckwgb9.js";import{existsSync as j,mkdirSync as N,readFileSync as z,writeFileSync as G}from"fs";import{dirname as K,relative as L,resolve as _}from"path";async function ns(t,e,n){let u=new Map,f=[],x=new Set,D=0,w=0,S=0,C=[];for(let i of t){let o=e.get(i);if(!o)continue;C.push({file:i,decls:r(o,i,n.keepComments)})}for(let{file:i,decls:o}of C){D+=o.length;for(let s of o)if(s.kind==="import"){w++;let c=s.source||"";if(c.startsWith("."))continue;if(!u.has(c))u.set(c,{source:c,specifiers:new Map,isTypeOnly:s.isTypeOnly||!1,isSideEffect:s.isSideEffect||!1});let l=u.get(c);if(s.specifiers)for(let h of s.specifiers){let W=h.alias||h.name;if(!l.specifiers.has(W))l.specifiers.set(W,{name:h.name,alias:h.alias,isType:h.isType||!1})}if(!s.isTypeOnly)l.isTypeOnly=!1}else if(s.isExported||s.kind==="export"){if(S++,s.kind==="export"&&s.source&&(s.source.startsWith(".")||s.source.startsWith("/")))continue;if(s.name&&x.has(s.name))continue;if(s.name)x.add(s.name);f.push({declaration:s,file:i})}}let a=[];a.push("/**"),a.push(" * Bundled TypeScript declarations"),a.push(` * Generated from ${t.length} source files`),a.push(" */"),a.push("");let T=n.importOrder||["bun"],y=Array.from(u.values()),p=Array(y.length);for(let i=0;i<y.length;i++){let o=y[i].source,s=T.length;for(let c=0;c<T.length;c++)if(o.startsWith(T[c])){s=c;break}p[i]=s}let g=y.map((i,o)=>o);g.sort((i,o)=>{let s=p[i],c=p[o];if(s!==c)return s-c;return y[i].source.localeCompare(y[o].source)});let b=g.map((i)=>y[i]);for(let i of b)if(i.isSideEffect)a.push(`import '${i.source}';`);else if(i.specifiers.size>0){let s=Array.from(i.specifiers.values()).map((l)=>{let h=l.isType?"type ":"";return l.alias?`${h}${l.name} as ${l.alias}`:`${h}${l.name}`}),c=i.isTypeOnly?"type ":"";a.push(`import ${c}{ ${s.join(", ")} } from '${i.source}';`)}if(b.length>0)a.push("");let m=new Map;for(let{declaration:i,file:o}of f){if(!m.has(o))m.set(o,[]);m.get(o).push(i)}for(let[i,o]of m){let s=L(n.cwd,i);a.push(`// From: ${s}`);for(let c of o){if(n.keepComments&&c.leadingComments)for(let l of c.leadingComments)a.push(l);a.push(F(c))}a.push("")}let d=a.join(`
2
+ import{r}from"./chunk-z6mpxpxt.js";import{existsSync as j,mkdirSync as N,readFileSync as z,writeFileSync as G}from"fs";import{dirname as K,relative as L,resolve as _}from"path";async function ls(t,e,n){let u=new Map,f=[],x=new Set,D=0,w=0,S=0,C=[];for(let i of t){let o=e.get(i);if(!o)continue;C.push({file:i,decls:r(o,i,n.keepComments)})}for(let{file:i,decls:o}of C){D+=o.length;for(let s of o)if(s.kind==="import"){w++;let c=s.source||"";if(c.startsWith("."))continue;if(!u.has(c))u.set(c,{source:c,specifiers:new Map,isTypeOnly:s.isTypeOnly||!1,isSideEffect:s.isSideEffect||!1});let l=u.get(c);if(s.specifiers)for(let h of s.specifiers){let W=h.alias||h.name;if(!l.specifiers.has(W))l.specifiers.set(W,{name:h.name,alias:h.alias,isType:h.isType||!1})}if(!s.isTypeOnly)l.isTypeOnly=!1}else if(s.isExported||s.kind==="export"){if(S++,s.kind==="export"&&s.source&&(s.source.startsWith(".")||s.source.startsWith("/")))continue;if(s.name&&x.has(s.name))continue;if(s.name)x.add(s.name);f.push({declaration:s,file:i})}}let a=[];a.push("/**"),a.push(" * Bundled TypeScript declarations"),a.push(` * Generated from ${t.length} source files`),a.push(" */"),a.push("");let T=n.importOrder||["bun"],y=Array.from(u.values()),p=Array(y.length);for(let i=0;i<y.length;i++){let o=y[i].source,s=T.length;for(let c=0;c<T.length;c++)if(o.startsWith(T[c])){s=c;break}p[i]=s}let g=y.map((i,o)=>o);g.sort((i,o)=>{let s=p[i],c=p[o];if(s!==c)return s-c;return y[i].source.localeCompare(y[o].source)});let b=g.map((i)=>y[i]);for(let i of b)if(i.isSideEffect)a.push(`import '${i.source}';`);else if(i.specifiers.size>0){let s=Array.from(i.specifiers.values()).map((l)=>{let h=l.isType?"type ":"";return l.alias?`${h}${l.name} as ${l.alias}`:`${h}${l.name}`}),c=i.isTypeOnly?"type ":"";a.push(`import ${c}{ ${s.join(", ")} } from '${i.source}';`)}if(b.length>0)a.push("");let m=new Map;for(let{declaration:i,file:o}of f){if(!m.has(o))m.set(o,[]);m.get(o).push(i)}for(let[i,o]of m){let s=L(n.cwd,i);a.push(`// From: ${s}`);for(let c of o){if(n.keepComments&&c.leadingComments)for(let l of c.leadingComments)a.push(l);a.push(F(c))}a.push("")}let d=a.join(`
3
3
  `);return{content:d,files:t,declarationCount:D,importCount:w,exportCount:S,size:Buffer.byteLength(d,"utf8"),warnings:[]}}function F(t){if(t.text){let n=t.text.trim();if(t.isExported&&!n.startsWith("export"))n=`export ${n}`;if(!n.endsWith(";")&&!n.endsWith("}"))n+=";";return n}let e=[];if(t.isExported)e.push("export");if(t.isDefault)e.push("default");switch(t.kind){case"function":if(e.push("declare function"),e.push(t.name),t.generics)e.push(t.generics);if(e.push(`(${V(t.parameters)})`),t.returnType)e.push(`: ${t.returnType}`);break;case"variable":if(e.push("declare const"),e.push(t.name),t.typeAnnotation)e.push(`: ${t.typeAnnotation}`);break;case"interface":if(e.push("interface"),e.push(t.name),t.generics)e.push(t.generics);if(t.extends)e.push(`extends ${t.extends}`);if(e.push("{"),t.members)for(let n of t.members)e.push(` ${n.name}${n.typeAnnotation?`: ${n.typeAnnotation}`:""};`);e.push("}");break;case"type":if(e.push("type"),e.push(t.name),t.generics)e.push(t.generics);e.push("="),e.push(t.typeAnnotation||"unknown");break;case"class":if(e.push("declare class"),e.push(t.name),t.generics)e.push(t.generics);if(t.extends)e.push(`extends ${t.extends}`);if(t.implements&&t.implements.length>0)e.push(`implements ${t.implements.join(", ")}`);if(e.push("{"),t.members)for(let n of t.members)e.push(` ${F(n)}`);e.push("}");break;case"enum":if(e.push("declare enum"),e.push(t.name),e.push("{"),t.members){let n=t.members.map((u)=>u.value!==void 0?`${u.name} = ${u.value}`:u.name);e.push(` ${n.join(`,
4
- `)}`)}e.push("}");break;default:return t.text||""}return e.join(" ")}function V(t){if(!t||t.length===0)return"";return t.map((e)=>{let n="";if(e.rest)n+="...";if(n+=e.name,e.optional)n+="?";if(e.type)n+=`: ${e.type}`;if(e.defaultValue)n+=` = ${e.defaultValue}`;return n}).join(", ")}async function _t(t,e={}){let n=[],u=new Map,f=[],x=[],D=new Set,w=0,S=0,C=0;for(let p of t){if(!j(p)){n.push(`File not found: ${p}`);continue}let g=z(p,"utf-8");x.push(p);let b=g.split(`
4
+ `)}`)}e.push("}");break;default:return t.text||""}return e.join(" ")}function V(t){if(!t||t.length===0)return"";return t.map((e)=>{let n="";if(e.rest)n+="...";if(n+=e.name,e.optional)n+="?";if(e.type)n+=`: ${e.type}`;if(e.defaultValue)n+=` = ${e.defaultValue}`;return n}).join(", ")}async function Kt(t,e={}){let n=[],u=new Map,f=[],x=[],D=new Set,w=0,S=0,C=0;for(let p of t){if(!j(p)){n.push(`File not found: ${p}`);continue}let g=z(p,"utf-8");x.push(p);let b=g.split(`
5
5
  `),m=[],d=0,i=!1;for(let o of b){let s=o.trim();if(!s&&!i)continue;if(s.startsWith("import ")){S++;let l=s.match(/import\s+(type\s+)?(?:\{([^}]+)\}|(\w+)|\*\s+as\s+(\w+))\s+from\s+['"]([^'"]+)['"]/);if(l){let[,h,W,q,H,A]=l;if(e.externals?.some((P)=>A.startsWith(P))){f.push(s);continue}if(A.startsWith("."))continue;if(!u.has(A))u.set(A,{source:A,specifiers:new Map,isTypeOnly:!!h,isSideEffect:!1});let E=u.get(A);if(W){let P=W.split(",").map((k)=>k.trim());for(let k of P){let[I,v]=k.split(/\s+as\s+/).map((M)=>M.trim()),R=I.startsWith("type "),O=R?I.replace("type ",""):I;E.specifiers.set(v||O,{name:O,alias:v!==O?v:void 0,isType:R})}}if(!h)E.isTypeOnly=!1}continue}if(/^(export\s+)?(declare\s+)?(interface|type|class|function|const|let|var|enum|namespace|module)\s/.test(s)){if(i=!0,m=[o],d=(o.match(/\{/g)||[]).length-(o.match(/\}/g)||[]).length,d===0&&(s.endsWith(";")||!s.includes("{"))){let l=B(s);if(!D.has(l)||!e.mergeDuplicates){if(D.add(l),f.push(o),w++,s.startsWith("export"))C++}i=!1,m=[]}}else if(i){if(m.push(o),d+=(o.match(/\{/g)||[]).length-(o.match(/\}/g)||[]).length,d<=0){let l=m.join(`
6
6
  `),h=B(m[0]);if(!D.has(h)||!e.mergeDuplicates){if(D.add(h),f.push(l),w++,m[0].trim().startsWith("export"))C++}i=!1,m=[]}}else if(s.startsWith("export ")&&!s.includes("declare"))f.push(o),C++}}let a=[];if(e.banner)a.push(e.banner),a.push("");if(e.includeReferences&&e.references){for(let p of e.references)a.push(`/// <reference types="${p}" />`);a.push("")}let T=Array.from(u.values()).sort((p,g)=>p.source.localeCompare(g.source));for(let p of T)if(p.specifiers.size>0){let b=Array.from(p.specifiers.values()).map((d)=>{let i=d.isType?"type ":"";return d.alias?`${i}${d.name} as ${d.alias}`:`${i}${d.name}`}),m=p.isTypeOnly?"type ":"";a.push(`import ${m}{ ${b.join(", ")} } from '${p.source}';`)}if(T.length>0)a.push("");if(e.ambient&&e.moduleName){a.push(`declare module '${e.moduleName}' {`);for(let p of f){let g=p.split(`
7
7
  `).map((b)=>` ${b.replace(/^(\s*)(export\s+)?declare\s+/,"$1$2")}`).join(`
8
8
  `);a.push(g)}a.push("}")}else{if(e.sortDeclarations)f.sort((p,g)=>{let b=B(p),m=B(g);return b.localeCompare(m)});for(let p of f)a.push(p)}if(e.footer)a.push(""),a.push(e.footer);let y=a.join(`
9
- `);return{content:y,files:x,declarationCount:w,importCount:S,exportCount:C,size:Buffer.byteLength(y,"utf-8"),warnings:n}}function B(t){let e=t.match(/(interface|type|class|function|const|let|var|enum|namespace|module)\s+(\w+)/);return e?`${e[1]}:${e[2]}`:t.trim()}async function pr(t,e,n={}){let u=await _t(t,n),f=K(e);if(!j(f))N(f,{recursive:!0});return G(e,u.content),u}function rs(t={}){return{bundle:(e)=>_t(e,t),bundleAndWrite:(e,n)=>pr(e,n,{...t,output:n})}}async function is(t,e=process.cwd()){let n=Array.isArray(t)?t:[t],u=[];for(let f of n){if(f.includes("*"))continue;let x=_(e,f);if(j(x))u.push(x)}return u}
10
- export{ns,_t,pr,rs,is};
9
+ `);return{content:y,files:x,declarationCount:w,importCount:S,exportCount:C,size:Buffer.byteLength(y,"utf-8"),warnings:n}}function B(t){let e=t.match(/(interface|type|class|function|const|let|var|enum|namespace|module)\s+(\w+)/);return e?`${e[1]}:${e[2]}`:t.trim()}async function xr(t,e,n={}){let u=await Kt(t,n),f=K(e);if(!j(f))N(f,{recursive:!0});return G(e,u.content),u}function us(t={}){return{bundle:(e)=>Kt(e,t),bundleAndWrite:(e,n)=>xr(e,n,{...t,output:n})}}async function fs(t,e=process.cwd()){let n=Array.isArray(t)?t:[t],u=[];for(let f of n){if(f.includes("*"))continue;let x=_(e,f);if(j(x))u.push(x)}return u}
10
+ export{ls,Kt,xr,us,fs};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Uo,we}from"../chunk-g2120ysy.js";import"../chunk-4fygcxtb.js";import"../chunk-73dzve1s.js";import"../chunk-jcckwgb9.js";import"../chunk-189nn4fc.js";import"../chunk-83qnrx0m.js";import"../chunk-sd8bywh9.js";import"../chunk-3fbt79hx.js";import"../chunk-pga5m4wm.js";import"../chunk-v6fwy63g.js";import"../chunk-yx1jy7fx.js";import"../chunk-cyr45de1.js";import"../chunk-xfjfhe9d.js";import"../chunk-xa6rsd4b.js";import"../chunk-ft2zk7jx.js";import"../chunk-vf3ybe5r.js";import"../chunk-3t57mzvf.js";import"../chunk-ag1b6d30.js";import"../chunk-8d3sdkv4.js";import"../chunk-cv29b4zb.js";import"../chunk-32qexm3w.js";import"../chunk-0rmbc5zp.js";import"../chunk-42j9cfte.js";import"../chunk-1qtghb2x.js";import"../chunk-1j6092xz.js";import"../chunk-zq93f8ca.js";export{we as planAugmentationImports,Uo as scanModuleAugmentations};
2
+ import{Xo,Se}from"../chunk-2dstvjpv.js";import"../chunk-zk55g2cb.js";import"../chunk-ayyb1jpe.js";import"../chunk-z6mpxpxt.js";import"../chunk-vbzchjvq.js";import"../chunk-hqph3vnd.js";import"../chunk-2ngfncfx.js";import"../chunk-8zvjkzsv.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";import"../chunk-3mcz22q8.js";import"../chunk-jhpfmjnx.js";import"../chunk-0c03j9eq.js";import"../chunk-7ynrmx5b.js";import"../chunk-996gqrz6.js";import"../chunk-jfygtm4r.js";import"../chunk-kv3x5jrs.js";import"../chunk-7j4cgkb4.js";import"../chunk-qq5x44y9.js";import"../chunk-a3apthex.js";import"../chunk-0m1wt3db.js";import"../chunk-hvy1zvk6.js";import"../chunk-kccc6p2t.js";import"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{Se as planAugmentationImports,Xo as scanModuleAugmentations};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Kn,qn}from"../chunk-42j9cfte.js";import"../chunk-1j6092xz.js";import"../chunk-zq93f8ca.js";export{Kn as bindingPatternNames,qn as projectBindingPattern};
2
+ import{er,tr}from"../chunk-kccc6p2t.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{er as bindingPatternNames,tr as projectBindingPattern};
@@ -61,17 +61,6 @@ declare const __brand: unique symbol;
61
61
  * Uses ESM imports hoisted to module scope so each call avoids the per-call
62
62
  * `require('node:path')` overhead that the previous CommonJS-style implementation
63
63
  * incurred.
64
- * @defaultValue
65
- * ```ts
66
- * {
67
- * join: (base: DirectoryPath, ...segments: string[]) => FilePath,
68
- * dirname: (path: FilePath) => DirectoryPath,
69
- * basename: (path: FilePath) => string,
70
- * resolve: (...segments: string[]) => AbsolutePath,
71
- * isAbsolute: (path: string) => path is AbsolutePath,
72
- * relative: (from: DirectoryPath, to: FilePath) => RelativePath
73
- * }
74
- * ```
75
64
  */
76
65
  export declare const BrandedPath: {
77
66
  /**
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$i,Ei,ki,Ti,Ai,Pi,Di,Ri,Mi,Oi,Ii,Fi,Li,Ni}from"../chunk-9gts9ymh.js";export{Ni as BrandedPath,Mi as asAbsolutePath,Ri as asDeclarationName,Ei as asDirectoryPath,Ai as asDtsContent,$i as asFilePath,ki as asGlobPattern,Ii as asJsonString,Pi as asModuleSpecifier,Oi as asRelativePath,Ti as asSourceCode,Di as asTypeName,Fi as isBranded,Li as unwrap};
2
+ import{Ri,Mi,Oi,Ii,Li,Fi,Ni,Bi,Wi,ji,_i,Gi,Vi,Ui}from"../chunk-ybzz1jg7.js";export{Ui as BrandedPath,Wi as asAbsolutePath,Bi as asDeclarationName,Mi as asDirectoryPath,Li as asDtsContent,Ri as asFilePath,Oi as asGlobPattern,_i as asJsonString,Fi as asModuleSpecifier,ji as asRelativePath,Ii as asSourceCode,Ni as asTypeName,Gi as isBranded,Vi as unwrap};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{bo,Ue,hn}from"../chunk-wnqg6hem.js";import"../chunk-p9vfxn8g.js";import"../chunk-qzjzw9p2.js";import"../chunk-cpmqa8kd.js";import"../chunk-73dzve1s.js";import"../chunk-yay68832.js";import"../chunk-yx1jy7fx.js";import"../chunk-cyr45de1.js";import"../chunk-xfjfhe9d.js";import"../chunk-xa6rsd4b.js";import"../chunk-ft2zk7jx.js";import"../chunk-vf3ybe5r.js";import"../chunk-3t57mzvf.js";import"../chunk-ag1b6d30.js";import"../chunk-8d3sdkv4.js";import"../chunk-cv29b4zb.js";import"../chunk-32qexm3w.js";import"../chunk-0rmbc5zp.js";import"../chunk-42j9cfte.js";import"../chunk-1qtghb2x.js";import"../chunk-1j6092xz.js";import"../chunk-zq93f8ca.js";export{hn as linkBundle,Ue as renameIdentifiers,bo as splitTopLevelStatements};
2
+ import{Eo,qe,vn}from"../chunk-vgmnxnjf.js";import"../chunk-7z8pykqp.js";import"../chunk-vf8jmdsp.js";import"../chunk-bkbsg2bv.js";import"../chunk-ayyb1jpe.js";import"../chunk-btc6zbyj.js";import"../chunk-3mcz22q8.js";import"../chunk-jhpfmjnx.js";import"../chunk-0c03j9eq.js";import"../chunk-7ynrmx5b.js";import"../chunk-996gqrz6.js";import"../chunk-jfygtm4r.js";import"../chunk-kv3x5jrs.js";import"../chunk-7j4cgkb4.js";import"../chunk-qq5x44y9.js";import"../chunk-a3apthex.js";import"../chunk-0m1wt3db.js";import"../chunk-hvy1zvk6.js";import"../chunk-kccc6p2t.js";import"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{vn as linkBundle,qe as renameIdentifiers,Eo as splitTopLevelStatements};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ns,_t,pr,rs,is}from"../chunk-t4va49p3.js";import"../chunk-jcckwgb9.js";import"../chunk-189nn4fc.js";import"../chunk-83qnrx0m.js";import"../chunk-sd8bywh9.js";import"../chunk-3fbt79hx.js";import"../chunk-pga5m4wm.js";import"../chunk-v6fwy63g.js";import"../chunk-yx1jy7fx.js";import"../chunk-cyr45de1.js";import"../chunk-xfjfhe9d.js";import"../chunk-xa6rsd4b.js";import"../chunk-ft2zk7jx.js";import"../chunk-vf3ybe5r.js";import"../chunk-3t57mzvf.js";import"../chunk-ag1b6d30.js";import"../chunk-8d3sdkv4.js";import"../chunk-cv29b4zb.js";import"../chunk-32qexm3w.js";import"../chunk-0rmbc5zp.js";import"../chunk-42j9cfte.js";import"../chunk-1qtghb2x.js";import"../chunk-1j6092xz.js";import"../chunk-zq93f8ca.js";export{pr as bundleAndWrite,ns as bundleDeclarations,_t as bundleDtsFiles,rs as createBundler,is as resolveEntryFiles};
2
+ import{ls,Kt,xr,us,fs}from"../chunk-zn2gvwve.js";import"../chunk-z6mpxpxt.js";import"../chunk-vbzchjvq.js";import"../chunk-hqph3vnd.js";import"../chunk-2ngfncfx.js";import"../chunk-8zvjkzsv.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";import"../chunk-3mcz22q8.js";import"../chunk-jhpfmjnx.js";import"../chunk-0c03j9eq.js";import"../chunk-7ynrmx5b.js";import"../chunk-996gqrz6.js";import"../chunk-jfygtm4r.js";import"../chunk-kv3x5jrs.js";import"../chunk-7j4cgkb4.js";import"../chunk-qq5x44y9.js";import"../chunk-a3apthex.js";import"../chunk-0m1wt3db.js";import"../chunk-hvy1zvk6.js";import"../chunk-kccc6p2t.js";import"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{xr as bundleAndWrite,ls as bundleDeclarations,Kt as bundleDtsFiles,us as createBundler,fs as resolveEntryFiles};
package/dist/src/cache.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Qr,Ge,mt}from"../chunk-tka2m4af.js";import"../chunk-v6fwy63g.js";export{Ge as BuildCache,Qr as clearBuildCache,mt as ensureGitignore};
2
+ import{oi,He,wt}from"../chunk-ka8mbyjb.js";import"../chunk-v6fwy63g.js";export{He as BuildCache,oi as clearBuildCache,wt as ensureGitignore};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Re}from"../chunk-1qtghb2x.js";import"../chunk-1j6092xz.js";import"../chunk-zq93f8ca.js";export{Re as functionCount};
2
+ import{Le}from"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{Le as functionCount};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{mr,gr,ss,os,as,cs,ls,us,fs}from"../chunk-rkstz4w1.js";import"../chunk-jcckwgb9.js";import"../chunk-189nn4fc.js";import"../chunk-83qnrx0m.js";import"../chunk-sd8bywh9.js";import"../chunk-3fbt79hx.js";import"../chunk-pga5m4wm.js";import"../chunk-v6fwy63g.js";import"../chunk-yx1jy7fx.js";import"../chunk-cyr45de1.js";import"../chunk-xfjfhe9d.js";import"../chunk-xa6rsd4b.js";import"../chunk-ft2zk7jx.js";import"../chunk-vf3ybe5r.js";import"../chunk-3t57mzvf.js";import"../chunk-ag1b6d30.js";import"../chunk-8d3sdkv4.js";import"../chunk-cv29b4zb.js";import"../chunk-32qexm3w.js";import"../chunk-0rmbc5zp.js";import"../chunk-42j9cfte.js";import"../chunk-1qtghb2x.js";import"../chunk-1j6092xz.js";import"../chunk-zq93f8ca.js";export{ss as analyzeCircularDependencies,mr as buildDependencyGraph,gr as detectCircularDependencies,us as exportGraphAsDot,fs as exportGraphAsJson,ls as findAllDependencies,cs as findAllDependents,os as formatCircularAnalysis,as as getGraphSummary};
2
+ import{Cr,vr,ds,ps,ms,gs,hs,ys,bs}from"../chunk-nqgfrehj.js";import"../chunk-z6mpxpxt.js";import"../chunk-vbzchjvq.js";import"../chunk-hqph3vnd.js";import"../chunk-2ngfncfx.js";import"../chunk-8zvjkzsv.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";import"../chunk-3mcz22q8.js";import"../chunk-jhpfmjnx.js";import"../chunk-0c03j9eq.js";import"../chunk-7ynrmx5b.js";import"../chunk-996gqrz6.js";import"../chunk-jfygtm4r.js";import"../chunk-kv3x5jrs.js";import"../chunk-7j4cgkb4.js";import"../chunk-qq5x44y9.js";import"../chunk-a3apthex.js";import"../chunk-0m1wt3db.js";import"../chunk-hvy1zvk6.js";import"../chunk-kccc6p2t.js";import"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{ds as analyzeCircularDependencies,Cr as buildDependencyGraph,vr as detectCircularDependencies,ys as exportGraphAsDot,bs as exportGraphAsJson,hs as findAllDependencies,gs as findAllDependents,ps as formatCircularAnalysis,ms as getGraphSummary};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{g,Jo,Yo,Z,Ke,xt,u,Xo,Zo,Qo}from"../chunk-73dzve1s.js";export{Z as file,Xo as fileExists,Qo as getRuntimeInfo,g as isBun,Jo as isNode,u as readTextFile,Yo as runtime,xt as spawnProcess,Ke as write,Zo as writeTextFile};
2
+ import{g,na,ra,ee,Xe,Et,u,ia,sa,oa}from"../chunk-ayyb1jpe.js";export{ee as file,ia as fileExists,oa as getRuntimeInfo,g as isBun,na as isNode,u as readTextFile,ra as runtime,Et as spawnProcess,Xe as write,sa as writeTextFile};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{w,Vn,Un,zn,Hn}from"../chunk-32qexm3w.js";import"../chunk-1j6092xz.js";import"../chunk-zq93f8ca.js";export{Vn as attachComputedKeyConstants,w as evaluateKeyConstant,Hn as hasTemplateSubstitution,zn as isSymbolKey,Un as resolveTemplateKey};
2
+ import{w,Yn,Xn,Zn,Qn}from"../chunk-0m1wt3db.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{Yn as attachComputedKeyConstants,w as evaluateKeyConstant,Qn as hasTemplateSubstitution,Zn as isSymbolKey,Xn as resolveTemplateKey};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{B}from"../chunk-pga5m4wm.js";export{B as normalizeConcurrency};
2
+ import{W}from"../chunk-k5wz43yh.js";export{W as normalizeConcurrency};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{N,zo,Ho,Ko,qo,E}from"../chunk-ebjafajx.js";import"../chunk-yay68832.js";export{E as config,N as defaultConfig,Ko as defineConfig,qo as defineConfigAsync,zo as getConfig,Ho as resetConfig};
2
+ import{B,Zo,Qo,ea,ta,E}from"../chunk-60wrxcjt.js";import"../chunk-btc6zbyj.js";export{E as config,B as defaultConfig,ea as defineConfig,ta as defineConfigAsync,Zo as getConfig,Qo as resetConfig};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{bn}from"../chunk-p023fhce.js";import"../chunk-6yvk3q1e.js";export{bn as findDanglingTypeReferences};
2
+ import{$n}from"../chunk-7bt7x8sy.js";import"../chunk-9gp0e3kn.js";export{$n as findDanglingTypeReferences};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ye,J,S,G,Vo,be}from"../chunk-davy89dj.js";import"../chunk-g2120ysy.js";import"../chunk-4fygcxtb.js";import"../chunk-p9vfxn8g.js";import"../chunk-qzjzw9p2.js";import"../chunk-cpmqa8kd.js";import"../chunk-73dzve1s.js";import"../chunk-yay68832.js";import"../chunk-jcckwgb9.js";import"../chunk-189nn4fc.js";import"../chunk-83qnrx0m.js";import"../chunk-sd8bywh9.js";import"../chunk-3fbt79hx.js";import"../chunk-pga5m4wm.js";import"../chunk-v6fwy63g.js";import"../chunk-yx1jy7fx.js";import"../chunk-cyr45de1.js";import"../chunk-xfjfhe9d.js";import"../chunk-xa6rsd4b.js";import"../chunk-ft2zk7jx.js";import"../chunk-vf3ybe5r.js";import"../chunk-3t57mzvf.js";import"../chunk-ag1b6d30.js";import"../chunk-8d3sdkv4.js";import"../chunk-cv29b4zb.js";import"../chunk-32qexm3w.js";import"../chunk-0rmbc5zp.js";import"../chunk-42j9cfte.js";import"../chunk-1qtghb2x.js";import"../chunk-1j6092xz.js";import"../chunk-zq93f8ca.js";export{be as createDeclarationReferenceResolver,G as getDeclarationOutputPath,Vo as getDeclarationSpecifier,J as isExcluded,S as isWithinRoot,ye as planDeclarationProject};
2
+ import{Ce,X,S,V,Yo,ve}from"../chunk-y4wykrya.js";import"../chunk-2dstvjpv.js";import"../chunk-zk55g2cb.js";import"../chunk-7z8pykqp.js";import"../chunk-vf8jmdsp.js";import"../chunk-bkbsg2bv.js";import"../chunk-ayyb1jpe.js";import"../chunk-btc6zbyj.js";import"../chunk-z6mpxpxt.js";import"../chunk-vbzchjvq.js";import"../chunk-hqph3vnd.js";import"../chunk-2ngfncfx.js";import"../chunk-8zvjkzsv.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";import"../chunk-3mcz22q8.js";import"../chunk-jhpfmjnx.js";import"../chunk-0c03j9eq.js";import"../chunk-7ynrmx5b.js";import"../chunk-996gqrz6.js";import"../chunk-jfygtm4r.js";import"../chunk-kv3x5jrs.js";import"../chunk-7j4cgkb4.js";import"../chunk-qq5x44y9.js";import"../chunk-a3apthex.js";import"../chunk-0m1wt3db.js";import"../chunk-hvy1zvk6.js";import"../chunk-kccc6p2t.js";import"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{ve as createDeclarationReferenceResolver,V as getDeclarationOutputPath,Yo as getDeclarationSpecifier,X as isExcluded,S as isWithinRoot,Ce as planDeclarationProject};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{z,de}from"../chunk-kfk554fj.js";import"../chunk-7tremqhs.js";import"../chunk-danfamyx.js";import"../chunk-p023fhce.js";import"../chunk-6yvk3q1e.js";import"../chunk-davy89dj.js";import"../chunk-g2120ysy.js";import"../chunk-4fygcxtb.js";import"../chunk-ebjafajx.js";import"../chunk-p9vfxn8g.js";import"../chunk-qzjzw9p2.js";import"../chunk-cpmqa8kd.js";import"../chunk-73dzve1s.js";import"../chunk-yay68832.js";import"../chunk-jcckwgb9.js";import"../chunk-189nn4fc.js";import"../chunk-83qnrx0m.js";import"../chunk-sd8bywh9.js";import"../chunk-3fbt79hx.js";import"../chunk-pga5m4wm.js";import"../chunk-v6fwy63g.js";import"../chunk-yx1jy7fx.js";import"../chunk-cyr45de1.js";import"../chunk-xfjfhe9d.js";import"../chunk-xa6rsd4b.js";import"../chunk-ft2zk7jx.js";import"../chunk-vf3ybe5r.js";import"../chunk-3t57mzvf.js";import"../chunk-ag1b6d30.js";import"../chunk-8d3sdkv4.js";import"../chunk-cv29b4zb.js";import"../chunk-32qexm3w.js";import"../chunk-0rmbc5zp.js";import"../chunk-42j9cfte.js";import"../chunk-1qtghb2x.js";import"../chunk-1j6092xz.js";import"../chunk-zq93f8ca.js";export{z as assertSafeOutputConfiguration,de as publishDeclarationOutputs};
2
+ import{K,he}from"../chunk-aak9xzy7.js";import"../chunk-3jjrn16z.js";import"../chunk-vae5wxar.js";import"../chunk-7bt7x8sy.js";import"../chunk-9gp0e3kn.js";import"../chunk-y4wykrya.js";import"../chunk-2dstvjpv.js";import"../chunk-zk55g2cb.js";import"../chunk-60wrxcjt.js";import"../chunk-7z8pykqp.js";import"../chunk-vf8jmdsp.js";import"../chunk-bkbsg2bv.js";import"../chunk-ayyb1jpe.js";import"../chunk-btc6zbyj.js";import"../chunk-z6mpxpxt.js";import"../chunk-vbzchjvq.js";import"../chunk-hqph3vnd.js";import"../chunk-2ngfncfx.js";import"../chunk-8zvjkzsv.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";import"../chunk-3mcz22q8.js";import"../chunk-jhpfmjnx.js";import"../chunk-0c03j9eq.js";import"../chunk-7ynrmx5b.js";import"../chunk-996gqrz6.js";import"../chunk-jfygtm4r.js";import"../chunk-kv3x5jrs.js";import"../chunk-7j4cgkb4.js";import"../chunk-qq5x44y9.js";import"../chunk-a3apthex.js";import"../chunk-0m1wt3db.js";import"../chunk-hvy1zvk6.js";import"../chunk-kccc6p2t.js";import"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{K as assertSafeOutputConfiguration,he as publishDeclarationOutputs};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Qe,Dt,W,jn,_n,Gn}from"../chunk-ag1b6d30.js";import"../chunk-42j9cfte.js";import"../chunk-1j6092xz.js";import"../chunk-zq93f8ca.js";export{Gn as collectDeclarationValueReferences,Qe as directConstValueAlias,W as isExternalModuleSource,jn as isExternalModuleText,_n as isPrivateImportableDeclaration,Dt as returnTypeExpectsObject};
2
+ import{rt,Lt,j,Hn,Kn,qn}from"../chunk-7j4cgkb4.js";import"../chunk-kccc6p2t.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{qn as collectDeclarationValueReferences,rt as directConstValueAlias,j as isExternalModuleSource,Hn as isExternalModuleText,Kn as isPrivateImportableDeclaration,Lt as returnTypeExpectsObject};
package/dist/src/diff.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ot,_i,ir,Gi,sr,Vi,or,ar,Ui}from"../chunk-e29rp5xj.js";import"../chunk-73dzve1s.js";export{ot as computeDiff,sr as diffFile,Vi as diffFiles,ir as formatColoredDiff,Gi as formatDiffSummary,_i as formatUnifiedDiff,ar as printDiff,Ui as printDiffs,or as summarizeDiffs};
2
+ import{ft,qi,fr,Ji,dr,Yi,pr,mr,Xi}from"../chunk-phwfth21.js";import"../chunk-ayyb1jpe.js";export{ft as computeDiff,dr as diffFile,Yi as diffFiles,fr as formatColoredDiff,Ji as formatDiffSummary,qi as formatUnifiedDiff,mr as printDiff,Xi as printDiffs,pr as summarizeDiffs};
package/dist/src/docs.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ht,Kt,Ne,qt,Jt,Sr,$s,Es}from"../chunk-hv8bx8xx.js";import"../chunk-yay68832.js";import"../chunk-jcckwgb9.js";import"../chunk-189nn4fc.js";import"../chunk-83qnrx0m.js";import"../chunk-sd8bywh9.js";import"../chunk-3fbt79hx.js";import"../chunk-pga5m4wm.js";import"../chunk-v6fwy63g.js";import"../chunk-yx1jy7fx.js";import"../chunk-cyr45de1.js";import"../chunk-xfjfhe9d.js";import"../chunk-xa6rsd4b.js";import"../chunk-ft2zk7jx.js";import"../chunk-vf3ybe5r.js";import"../chunk-3t57mzvf.js";import"../chunk-ag1b6d30.js";import"../chunk-8d3sdkv4.js";import"../chunk-cv29b4zb.js";import"../chunk-32qexm3w.js";import"../chunk-0rmbc5zp.js";import"../chunk-42j9cfte.js";import"../chunk-1qtghb2x.js";import"../chunk-1j6092xz.js";import"../chunk-zq93f8ca.js";export{Es as createDocsGenerator,Kt as extractDocumentation,$s as generateDocs,qt as generateHTML,Jt as generateJSON,Ne as generateMarkdown,Sr as generateTypeDocJSON,Ht as parseJSDoc};
2
+ import{Zt,Qt,_e,en,tn,Dr,Rs,Ms}from"../chunk-ee109s3r.js";import"../chunk-btc6zbyj.js";import"../chunk-z6mpxpxt.js";import"../chunk-vbzchjvq.js";import"../chunk-hqph3vnd.js";import"../chunk-2ngfncfx.js";import"../chunk-8zvjkzsv.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";import"../chunk-3mcz22q8.js";import"../chunk-jhpfmjnx.js";import"../chunk-0c03j9eq.js";import"../chunk-7ynrmx5b.js";import"../chunk-996gqrz6.js";import"../chunk-jfygtm4r.js";import"../chunk-kv3x5jrs.js";import"../chunk-7j4cgkb4.js";import"../chunk-qq5x44y9.js";import"../chunk-a3apthex.js";import"../chunk-0m1wt3db.js";import"../chunk-hvy1zvk6.js";import"../chunk-kccc6p2t.js";import"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{Ms as createDocsGenerator,Qt as extractDocumentation,Rs as generateDocs,en as generateHTML,tn as generateJSON,_e as generateMarkdown,Dr as generateTypeDocJSON,Zt as parseJSDoc};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{aa,Mn}from"../chunk-xfjfhe9d.js";import"../chunk-32qexm3w.js";import"../chunk-1j6092xz.js";import"../chunk-zq93f8ca.js";export{Mn as attachEnumBodies,aa as lowerEnumBody};
2
+ import{ma,Bn}from"../chunk-0c03j9eq.js";import"../chunk-0m1wt3db.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{Bn as attachEnumBodies,ma as lowerEnumBody};