@dtsx/dtsx 0.11.43 → 0.11.44

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 (187) hide show
  1. package/README.md +6 -0
  2. package/dist/bin/cli.js +9 -9
  3. package/dist/{chunk-zgj8xq4x.js → chunk-0cynxv6w.js} +2 -2
  4. package/dist/{chunk-aqcjv2v5.js → chunk-1hz6j7bq.js} +21 -21
  5. package/dist/{chunk-b2j236p3.js → chunk-2d3nbfth.js} +2 -2
  6. package/dist/{chunk-9fz5erbq.js → chunk-2y5b6hdw.js} +6 -6
  7. package/dist/{chunk-vsa6gbmz.js → chunk-3eb0gc0y.js} +1 -1
  8. package/dist/{chunk-vae5wxar.js → chunk-3rwbf45t.js} +2 -2
  9. package/dist/{chunk-9c0k2b8n.js → chunk-3shq1bjr.js} +2 -2
  10. package/dist/{chunk-pebt9j6c.js → chunk-3v0yh5dk.js} +2 -2
  11. package/dist/{chunk-ksc4xgdz.js → chunk-4ece5g8t.js} +2 -2
  12. package/dist/{chunk-a3px4jga.js → chunk-4hkf7dda.js} +4 -4
  13. package/dist/chunk-59jw51gg.js +8 -0
  14. package/dist/{chunk-ygpyce6w.js → chunk-5aqwt0a0.js} +4 -4
  15. package/dist/{chunk-cd26g482.js → chunk-65d3dga1.js} +3 -3
  16. package/dist/{chunk-znd7w376.js → chunk-6mryvpxj.js} +5 -5
  17. package/dist/{chunk-3r9dptyy.js → chunk-6pr23q72.js} +2 -2
  18. package/dist/{chunk-2p8za6vr.js → chunk-7ez7gynw.js} +2 -2
  19. package/dist/{chunk-9mtn8sk3.js → chunk-7krb9b1s.js} +2 -2
  20. package/dist/{chunk-9vj0g89m.js → chunk-7x9tawkf.js} +2 -2
  21. package/dist/{chunk-ettcbmzw.js → chunk-86xvq8km.js} +3 -3
  22. package/dist/{chunk-xgj6rxmd.js → chunk-8v43ne8p.js} +3 -3
  23. package/dist/chunk-90f37xen.js +3 -0
  24. package/dist/{chunk-qqjbaqm6.js → chunk-932kxt70.js} +4 -4
  25. package/dist/{chunk-rwwrrxtc.js → chunk-976r899s.js} +4 -4
  26. package/dist/{chunk-06jp6gah.js → chunk-9etacmfx.js} +3 -3
  27. package/dist/{chunk-btc6zbyj.js → chunk-9hjd6p38.js} +2 -2
  28. package/dist/{chunk-51cdjc3e.js → chunk-9qv34ymq.js} +2 -2
  29. package/dist/{chunk-fhbwwm79.js → chunk-an5ra7tr.js} +4 -4
  30. package/dist/{chunk-1903h3dm.js → chunk-anvhqbw8.js} +2 -2
  31. package/dist/{chunk-pekphr39.js → chunk-btmc3e8d.js} +2 -2
  32. package/dist/{chunk-44zq3xnw.js → chunk-c8s4d7qk.js} +6 -6
  33. package/dist/{chunk-7fytm1ya.js → chunk-cgaw8fsn.js} +3 -3
  34. package/dist/{chunk-b79vtkkt.js → chunk-cjhmmqxd.js} +2 -2
  35. package/dist/{chunk-w4fj9m56.js → chunk-cynfv4dt.js} +3 -3
  36. package/dist/{chunk-n1p62kwx.js → chunk-d0aqaj02.js} +2 -2
  37. package/dist/{chunk-36xenw6z.js → chunk-d68r83t9.js} +2 -2
  38. package/dist/{chunk-b0cdncp3.js → chunk-der2ssgq.js} +2 -2
  39. package/dist/{chunk-1hhk0zm6.js → chunk-dzdwc2fh.js} +2 -2
  40. package/dist/{chunk-w3zqfm8a.js → chunk-ehgnwdn9.js} +2 -2
  41. package/dist/{chunk-0xam980d.js → chunk-eptz3q7r.js} +4 -4
  42. package/dist/{chunk-km03xc8j.js → chunk-erymqkk3.js} +6 -6
  43. package/dist/{chunk-j3egtn0s.js → chunk-g19c3m7s.js} +2 -2
  44. package/dist/{chunk-4n2mpvmb.js → chunk-g4rmn34j.js} +2 -2
  45. package/dist/{chunk-xzw0p4nq.js → chunk-gma09qy6.js} +2 -2
  46. package/dist/{chunk-y78fsxjf.js → chunk-h1xwd278.js} +2 -2
  47. package/dist/{chunk-ah3pwsh5.js → chunk-hnckev96.js} +4 -4
  48. package/dist/{chunk-5v7drjwg.js → chunk-hwgxwgsh.js} +2 -2
  49. package/dist/chunk-hyszyzq2.js +3 -0
  50. package/dist/{chunk-9dkjzqm0.js → chunk-jbxb317g.js} +6 -6
  51. package/dist/{chunk-3s37g6bh.js → chunk-ka22zwye.js} +8 -8
  52. package/dist/chunk-m2kzh519.js +3 -0
  53. package/dist/{chunk-7k0e2h9b.js → chunk-m3y5knzq.js} +5 -5
  54. package/dist/{chunk-0h9dz87w.js → chunk-madfh88z.js} +2 -2
  55. package/dist/{chunk-tvhg9v4f.js → chunk-mfp35a3b.js} +9 -9
  56. package/dist/{chunk-01zsk2q8.js → chunk-mhyqvwcg.js} +3 -3
  57. package/dist/{chunk-m9x72e5j.js → chunk-mhz6xe61.js} +4 -4
  58. package/dist/{chunk-xst4jpr9.js → chunk-mjzee617.js} +11 -11
  59. package/dist/{chunk-e37cbaq7.js → chunk-nek63555.js} +2 -2
  60. package/dist/{chunk-eyc0tk75.js → chunk-njqzhkzy.js} +10 -10
  61. package/dist/{chunk-p3n0wx32.js → chunk-ns44qxdd.js} +4 -4
  62. package/dist/chunk-nxk4h5hy.js +3 -0
  63. package/dist/{chunk-xewmepxp.js → chunk-ptbd3dac.js} +2 -2
  64. package/dist/{chunk-23w57jk5.js → chunk-q45jkpya.js} +2 -2
  65. package/dist/{chunk-bhqpdftq.js → chunk-q4ebd4qe.js} +2 -2
  66. package/dist/{chunk-vv5jdqfj.js → chunk-qevb6d6j.js} +2 -2
  67. package/dist/{chunk-fka5apgq.js → chunk-rka9z03a.js} +4 -4
  68. package/dist/{chunk-ep3575a9.js → chunk-s7k223zx.js} +2 -2
  69. package/dist/{chunk-0zj4xkky.js → chunk-sqnhxtbk.js} +3 -3
  70. package/dist/{chunk-a3apthex.js → chunk-th9tcxga.js} +2 -2
  71. package/dist/{chunk-rz5jszhe.js → chunk-v3n9zzhm.js} +2 -2
  72. package/dist/{chunk-n4hj7rs6.js → chunk-vgyjw95e.js} +4 -4
  73. package/dist/{chunk-m3ysqm3b.js → chunk-vv8e8pa3.js} +2 -2
  74. package/dist/{chunk-jvqczw2k.js → chunk-vxghzchm.js} +3 -3
  75. package/dist/{chunk-pfvjr5bg.js → chunk-vz4fc70e.js} +3 -3
  76. package/dist/{chunk-60wrxcjt.js → chunk-waan03ga.js} +3 -3
  77. package/dist/{chunk-mp86smwc.js → chunk-x1j88x37.js} +20 -20
  78. package/dist/{chunk-1721pyws.js → chunk-xa9vcbjj.js} +2 -2
  79. package/dist/chunk-xb2nr89a.js +3 -0
  80. package/dist/{chunk-bkbsg2bv.js → chunk-xgf6djk3.js} +2 -2
  81. package/dist/chunk-ykrdzatr.js +31 -0
  82. package/dist/{chunk-rmg7jdhj.js → chunk-yqvn592m.js} +2 -2
  83. package/dist/{chunk-62bqxy6j.js → chunk-zp93zcn5.js} +2 -2
  84. package/dist/src/augmentation-graph.js +1 -1
  85. package/dist/src/binding-patterns.js +1 -1
  86. package/dist/src/branded-types.js +1 -1
  87. package/dist/src/bundle-linker.js +1 -1
  88. package/dist/src/bundler.js +1 -1
  89. package/dist/src/cache.js +1 -1
  90. package/dist/src/call-signatures.js +1 -1
  91. package/dist/src/circular.js +1 -1
  92. package/dist/src/compat.js +1 -1
  93. package/dist/src/computed-keys.js +1 -1
  94. package/dist/src/config.js +1 -1
  95. package/dist/src/dangling-refs.js +1 -1
  96. package/dist/src/declaration-project.js +1 -1
  97. package/dist/src/declaration-publication.js +1 -1
  98. package/dist/src/declaration-references.js +1 -1
  99. package/dist/src/diff.js +1 -1
  100. package/dist/src/docs.js +1 -1
  101. package/dist/src/enum-declarations.js +1 -1
  102. package/dist/src/errors.js +1 -1
  103. package/dist/src/extractor/directives.js +1 -1
  104. package/dist/src/extractor/extract.js +1 -1
  105. package/dist/src/extractor/scanner.js +1 -1
  106. package/dist/src/extractor.js +1 -1
  107. package/dist/src/formats.js +1 -1
  108. package/dist/src/formatter.js +1 -1
  109. package/dist/src/function-properties.js +1 -1
  110. package/dist/src/generator.js +1 -1
  111. package/dist/src/global-types.js +1 -1
  112. package/dist/src/import-sorter.js +1 -1
  113. package/dist/src/incremental.js +1 -1
  114. package/dist/src/index.d.ts +2 -1
  115. package/dist/src/index.js +1 -1
  116. package/dist/src/inferred-imports.js +1 -1
  117. package/dist/src/json-config.js +1 -1
  118. package/dist/src/lexical.js +1 -1
  119. package/dist/src/logger.js +1 -1
  120. package/dist/src/lsp.js +1 -1
  121. package/dist/src/memory.js +1 -1
  122. package/dist/src/merger.js +1 -1
  123. package/dist/src/module-graph.js +1 -1
  124. package/dist/src/module-references.js +1 -1
  125. package/dist/src/native-checker.js +1 -1
  126. package/dist/src/native-engine.d.ts +24 -2
  127. package/dist/src/native-engine.js +1 -1
  128. package/dist/src/native-extractor.js +1 -1
  129. package/dist/src/native-generation.js +1 -1
  130. package/dist/src/native-project.js +1 -1
  131. package/dist/src/optimizer.js +1 -1
  132. package/dist/src/output-normalizer.js +1 -1
  133. package/dist/src/parallel-processor.js +1 -1
  134. package/dist/src/parameters.js +1 -1
  135. package/dist/src/parser.js +1 -1
  136. package/dist/src/plugins/bun.js +1 -1
  137. package/dist/src/plugins/esbuild.js +1 -1
  138. package/dist/src/plugins/index.js +1 -1
  139. package/dist/src/plugins/tsdown.js +1 -1
  140. package/dist/src/plugins/tsup.js +1 -1
  141. package/dist/src/plugins/vite.js +1 -1
  142. package/dist/src/plugins/webpack.js +1 -1
  143. package/dist/src/plugins.js +1 -1
  144. package/dist/src/process-source.d.ts +4 -3
  145. package/dist/src/process-source.js +1 -1
  146. package/dist/src/processor/cache.js +1 -1
  147. package/dist/src/processor/comments.js +1 -1
  148. package/dist/src/processor/declarations.js +1 -1
  149. package/dist/src/processor/import-usage.js +1 -1
  150. package/dist/src/processor/imports.js +1 -1
  151. package/dist/src/processor/index.js +1 -1
  152. package/dist/src/processor/type-inference.js +1 -1
  153. package/dist/src/processor.js +1 -1
  154. package/dist/src/profiling.js +1 -1
  155. package/dist/src/return-type-scope.js +1 -1
  156. package/dist/src/security.js +1 -1
  157. package/dist/src/source-cache.js +1 -1
  158. package/dist/src/sourcemap.js +1 -1
  159. package/dist/src/stx.js +1 -1
  160. package/dist/src/syntax-validator.js +1 -1
  161. package/dist/src/tracking.js +1 -1
  162. package/dist/src/transformers.js +1 -1
  163. package/dist/src/tree-shaker.js +1 -1
  164. package/dist/src/tsconfig.js +1 -1
  165. package/dist/src/type-mappings.js +1 -1
  166. package/dist/src/types.d.ts +1 -0
  167. package/dist/src/utils.js +1 -1
  168. package/dist/src/value-inference.js +1 -1
  169. package/dist/src/vue.js +1 -1
  170. package/dist/src/watcher.js +1 -1
  171. package/dist/src/worker-thread.js +1 -1
  172. package/dist/src/worker.js +1 -1
  173. package/dist/src/workspace.js +1 -1
  174. package/native/darwin-arm64/libzig-dtsx.dylib +0 -0
  175. package/native/darwin-x64/libzig-dtsx.dylib +0 -0
  176. package/native/freebsd-x64/libzig-dtsx.so +0 -0
  177. package/native/linux-arm64/libzig-dtsx.so +0 -0
  178. package/native/linux-x64/libzig-dtsx.so +0 -0
  179. package/native/windows-x64/zig-dtsx.dll +0 -0
  180. package/package.json +1 -1
  181. package/dist/chunk-1dqa0tex.js +0 -8
  182. package/dist/chunk-3pcxxgwq.js +0 -3
  183. package/dist/chunk-4q78f5pg.js +0 -3
  184. package/dist/chunk-8pfyd95y.js +0 -3
  185. package/dist/chunk-a2666k9r.js +0 -3
  186. package/dist/chunk-pwdmw567.js +0 -3
  187. package/dist/chunk-y83jhbpr.js +0 -31
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{je,jt,ir,Ta}from"../../chunk-vv5jdqfj.js";import"../../chunk-y83jhbpr.js";import"../../chunk-3r9dptyy.js";import"../../chunk-eyc0tk75.js";import"../../chunk-a2666k9r.js";import"../../chunk-rwwrrxtc.js";import"../../chunk-9c0k2b8n.js";import"../../chunk-9fz5erbq.js";import"../../chunk-y78fsxjf.js";import"../../chunk-pekphr39.js";import"../../chunk-4q78f5pg.js";import"../../chunk-km03xc8j.js";import"../../chunk-vae5wxar.js";import"../../chunk-tvhg9v4f.js";import"../../chunk-4n2mpvmb.js";import"../../chunk-0zj4xkky.js";import"../../chunk-xewmepxp.js";import"../../chunk-36xenw6z.js";import"../../chunk-01zsk2q8.js";import"../../chunk-1dqa0tex.js";import"../../chunk-e37cbaq7.js";import"../../chunk-5v7drjwg.js";import"../../chunk-60wrxcjt.js";import"../../chunk-pwdmw567.js";import"../../chunk-w3zqfm8a.js";import"../../chunk-bkbsg2bv.js";import"../../chunk-m3ysqm3b.js";import"../../chunk-btc6zbyj.js";import"../../chunk-3pcxxgwq.js";import"../../chunk-8pfyd95y.js";import"../../chunk-7k0e2h9b.js";import"../../chunk-xst4jpr9.js";import"../../chunk-62bqxy6j.js";import"../../chunk-k5wz43yh.js";import"../../chunk-v6fwy63g.js";import"../../chunk-aqcjv2v5.js";import"../../chunk-bhqpdftq.js";import"../../chunk-ksc4xgdz.js";import"../../chunk-9dkjzqm0.js";import"../../chunk-pebt9j6c.js";import"../../chunk-1721pyws.js";import"../../chunk-j3egtn0s.js";import"../../chunk-23w57jk5.js";import"../../chunk-mp86smwc.js";import"../../chunk-a3apthex.js";import"../../chunk-n1p62kwx.js";import"../../chunk-ep3575a9.js";import"../../chunk-1hhk0zm6.js";import"../../chunk-b2j236p3.js";import"../../chunk-m9x72e5j.js";import"../../chunk-rz5jszhe.js";export{je as DtsxWebpackPlugin,Ta as default,ir as dts,jt as dtsxWebpack};
2
+ import{Ve,Vt,or,Pa}from"../../chunk-qevb6d6j.js";import"../../chunk-ykrdzatr.js";import"../../chunk-6pr23q72.js";import"../../chunk-njqzhkzy.js";import"../../chunk-xb2nr89a.js";import"../../chunk-976r899s.js";import"../../chunk-3shq1bjr.js";import"../../chunk-2y5b6hdw.js";import"../../chunk-h1xwd278.js";import"../../chunk-btmc3e8d.js";import"../../chunk-hyszyzq2.js";import"../../chunk-erymqkk3.js";import"../../chunk-3rwbf45t.js";import"../../chunk-mfp35a3b.js";import"../../chunk-g4rmn34j.js";import"../../chunk-sqnhxtbk.js";import"../../chunk-ptbd3dac.js";import"../../chunk-d68r83t9.js";import"../../chunk-mhyqvwcg.js";import"../../chunk-59jw51gg.js";import"../../chunk-nek63555.js";import"../../chunk-hwgxwgsh.js";import"../../chunk-waan03ga.js";import"../../chunk-m2kzh519.js";import"../../chunk-ehgnwdn9.js";import"../../chunk-xgf6djk3.js";import"../../chunk-vv8e8pa3.js";import"../../chunk-9hjd6p38.js";import"../../chunk-90f37xen.js";import"../../chunk-nxk4h5hy.js";import"../../chunk-m3y5knzq.js";import"../../chunk-mjzee617.js";import"../../chunk-zp93zcn5.js";import"../../chunk-k5wz43yh.js";import"../../chunk-v6fwy63g.js";import"../../chunk-1hz6j7bq.js";import"../../chunk-q4ebd4qe.js";import"../../chunk-4ece5g8t.js";import"../../chunk-jbxb317g.js";import"../../chunk-3v0yh5dk.js";import"../../chunk-xa9vcbjj.js";import"../../chunk-g19c3m7s.js";import"../../chunk-q45jkpya.js";import"../../chunk-x1j88x37.js";import"../../chunk-th9tcxga.js";import"../../chunk-d0aqaj02.js";import"../../chunk-s7k223zx.js";import"../../chunk-dzdwc2fh.js";import"../../chunk-2d3nbfth.js";import"../../chunk-mhz6xe61.js";import"../../chunk-v3n9zzhm.js";export{Ve as DtsxWebpackPlugin,Pa as default,or as dts,Vt as dtsxWebpack};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{we,Ho,X,Ko,qo,Jo}from"../chunk-01zsk2q8.js";export{we as PluginManager,qo as createBannerPlugin,Jo as createFilterPlugin,X as definePlugin,Ho as pluginManager,Ko as stripInternalPlugin};
2
+ import{ve,Jo,Q,Yo,Xo,Zo}from"../chunk-mhyqvwcg.js";export{ve as PluginManager,Xo as createBannerPlugin,Zo as createFilterPlugin,Q as definePlugin,Jo as pluginManager,Yo as stripInternalPlugin};
@@ -1,16 +1,17 @@
1
+ import type { DeclarationEngine } from './native-engine.js';
1
2
  /**
2
3
  * Emit through the native engine when it can produce this output: the engine
3
4
  * is loaded and the import order is the default one it implements. Returns
4
5
  * null otherwise, or when the native emitter rejects the input, and the
5
6
  * TypeScript engine runs instead.
6
7
  */
7
- export declare function emitNatively(sourceCode: string, filename: string, keepComments: boolean, importOrder: readonly string[], isolatedDeclarations: boolean): string | null;
8
+ export declare function emitNatively(sourceCode: string, filename: string, keepComments: boolean, importOrder: readonly string[], isolatedDeclarations: boolean, engine?: DeclarationEngine): string | null;
8
9
  /**
9
10
  * Process TypeScript source code from a string (for stdin support)
10
11
  * This is a lightweight module that avoids pulling in heavy dependencies
11
12
  * like bun Glob, fs/promises, bundler, cache, config, etc.
12
13
  */
13
- export declare function processSource(sourceCode: string, filename?: string, keepComments?: boolean, importOrder?: string[], isolatedDeclarations?: boolean): string;
14
+ export declare function processSource(sourceCode: string, filename?: string, keepComments?: boolean, importOrder?: string[], isolatedDeclarations?: boolean, engine?: DeclarationEngine): string;
14
15
  /** Generate declarations through the annotation-first isolated fast path. */
15
16
  export declare function processSourceIsolated(sourceCode: string, filename?: string, keepComments?: boolean, importOrder?: string[]): string;
16
17
  /** Generate declarations through the value-aware semantic inference path. */
@@ -20,7 +21,7 @@ export declare function clearResultCache(): void;
20
21
  * Fast path for project mode — skips cache lookup/store.
21
22
  * Use when processing many files once (no cache benefit).
22
23
  */
23
- export declare function processSourceDirect(sourceCode: string, filename?: string, keepComments?: boolean, importOrder?: string[], isolatedDeclarations?: boolean): string;
24
+ export declare function processSourceDirect(sourceCode: string, filename?: string, keepComments?: boolean, importOrder?: string[], isolatedDeclarations?: boolean, engine?: DeclarationEngine): string;
24
25
  /**
25
26
  * Emit through the TypeScript engine only, without the native engine or the
26
27
  * result cache: the reference the native engine is held to.
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ze,bt,ei,ti,ni,Da,bn}from"../chunk-a2666k9r.js";import"../chunk-rwwrrxtc.js";import"../chunk-9c0k2b8n.js";import"../chunk-4q78f5pg.js";import"../chunk-5v7drjwg.js";import"../chunk-8pfyd95y.js";import"../chunk-7k0e2h9b.js";import"../chunk-xst4jpr9.js";import"../chunk-v6fwy63g.js";import"../chunk-aqcjv2v5.js";import"../chunk-bhqpdftq.js";import"../chunk-ksc4xgdz.js";import"../chunk-9dkjzqm0.js";import"../chunk-pebt9j6c.js";import"../chunk-1721pyws.js";import"../chunk-j3egtn0s.js";import"../chunk-23w57jk5.js";import"../chunk-mp86smwc.js";import"../chunk-a3apthex.js";import"../chunk-n1p62kwx.js";import"../chunk-ep3575a9.js";import"../chunk-1hhk0zm6.js";import"../chunk-b2j236p3.js";import"../chunk-m9x72e5j.js";import"../chunk-rz5jszhe.js";export{ni as clearResultCache,ze as emitNatively,bt as processSource,Da as processSourceDirect,ei as processSourceIsolated,ti as processSourceSemantic,bn as processSourceWithTypeScriptEngine};
2
+ import{Ke,wt,ni,ri,ii,Oa,wn}from"../chunk-xb2nr89a.js";import"../chunk-976r899s.js";import"../chunk-3shq1bjr.js";import"../chunk-hyszyzq2.js";import"../chunk-hwgxwgsh.js";import"../chunk-nxk4h5hy.js";import"../chunk-m3y5knzq.js";import"../chunk-mjzee617.js";import"../chunk-v6fwy63g.js";import"../chunk-1hz6j7bq.js";import"../chunk-q4ebd4qe.js";import"../chunk-4ece5g8t.js";import"../chunk-jbxb317g.js";import"../chunk-3v0yh5dk.js";import"../chunk-xa9vcbjj.js";import"../chunk-g19c3m7s.js";import"../chunk-q45jkpya.js";import"../chunk-x1j88x37.js";import"../chunk-th9tcxga.js";import"../chunk-d0aqaj02.js";import"../chunk-s7k223zx.js";import"../chunk-dzdwc2fh.js";import"../chunk-2d3nbfth.js";import"../chunk-mhz6xe61.js";import"../chunk-v3n9zzhm.js";export{ii as clearResultCache,Ke as emitNatively,wt as processSource,Oa as processSourceDirect,ni as processSourceIsolated,ri as processSourceSemantic,wn as processSourceWithTypeScriptEngine};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{La,Un,zn,Hn}from"../../chunk-j3egtn0s.js";export{Hn as clearProcessorCaches,La as getCachedRegex,Un as getImportItemsFromCache,zn as setImportItemsCache};
2
+ import{Ba,Hn,Kn,qn}from"../../chunk-g19c3m7s.js";export{qn as clearProcessorCaches,Ba as getCachedRegex,Hn as getImportItemsFromCache,Kn as setImportItemsCache};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{f,ue}from"../../chunk-a3apthex.js";export{ue as escapeJsdocContent,f as formatComments};
2
+ import{f,de}from"../../chunk-th9tcxga.js";export{de as escapeJsdocContent,f as formatComments};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{re,h,ie,se,oe,ae,_n,jn,ce}from"../../chunk-9dkjzqm0.js";import"../../chunk-mp86smwc.js";import"../../chunk-a3apthex.js";import"../../chunk-n1p62kwx.js";import"../../chunk-ep3575a9.js";import"../../chunk-1hhk0zm6.js";import"../../chunk-m9x72e5j.js";import"../../chunk-rz5jszhe.js";export{oe as processClassDeclaration,ae as processEnumDeclaration,jn as processExportDeclaration,re as processFunctionDeclaration,_n as processImportDeclaration,ie as processInterfaceDeclaration,ce as processModuleDeclaration,se as processTypeDeclaration,h as processVariableDeclaration};
2
+ import{se,h,oe,ae,ce,le,Gn,Vn,ue}from"../../chunk-jbxb317g.js";import"../../chunk-x1j88x37.js";import"../../chunk-th9tcxga.js";import"../../chunk-d0aqaj02.js";import"../../chunk-s7k223zx.js";import"../../chunk-dzdwc2fh.js";import"../../chunk-mhz6xe61.js";import"../../chunk-v3n9zzhm.js";export{ce as processClassDeclaration,le as processEnumDeclaration,Vn as processExportDeclaration,se as processFunctionDeclaration,Gn as processImportDeclaration,oe as processInterfaceDeclaration,ue as processModuleDeclaration,ae as processTypeDeclaration,h as processVariableDeclaration};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$e}from"../../chunk-5v7drjwg.js";import"../../chunk-9dkjzqm0.js";import"../../chunk-1721pyws.js";import"../../chunk-j3egtn0s.js";import"../../chunk-mp86smwc.js";import"../../chunk-a3apthex.js";import"../../chunk-n1p62kwx.js";import"../../chunk-ep3575a9.js";import"../../chunk-1hhk0zm6.js";import"../../chunk-m9x72e5j.js";import"../../chunk-rz5jszhe.js";export{$e as analyzeDeclarationImportUsage};
2
+ import{ke}from"../../chunk-hwgxwgsh.js";import"../../chunk-jbxb317g.js";import"../../chunk-xa9vcbjj.js";import"../../chunk-g19c3m7s.js";import"../../chunk-x1j88x37.js";import"../../chunk-th9tcxga.js";import"../../chunk-d0aqaj02.js";import"../../chunk-s7k223zx.js";import"../../chunk-dzdwc2fh.js";import"../../chunk-mhz6xe61.js";import"../../chunk-v3n9zzhm.js";export{ke as analyzeDeclarationImportUsage};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Pe,Vn,y,b,Ma,ki,Oa,Ia}from"../../chunk-1721pyws.js";import"../../chunk-j3egtn0s.js";import"../../chunk-m9x72e5j.js";import"../../chunk-rz5jszhe.js";export{Oa as convertToTypeOnlyImport,y as extractAllImportedItems,Pe as getImportSourceLiteral,ki as isTypeOnlyImportItem,Ia as mergeImports,Ma as parseExportDetailed,b as parseImportDetailed,Vn as parseImportStatement};
2
+ import{Re,zn,y,b,La,Di,Fa,Na}from"../../chunk-xa9vcbjj.js";import"../../chunk-g19c3m7s.js";import"../../chunk-mhz6xe61.js";import"../../chunk-v3n9zzhm.js";export{Fa as convertToTypeOnlyImport,y as extractAllImportedItems,Re as getImportSourceLiteral,Di as isTypeOnlyImportItem,Na as mergeImports,La as parseExportDetailed,b as parseImportDetailed,zn as parseImportStatement};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{l}from"../../chunk-rwwrrxtc.js";import"../../chunk-9c0k2b8n.js";import"../../chunk-5v7drjwg.js";import{re,h,ie,se,oe,ae,_n,jn,ce}from"../../chunk-9dkjzqm0.js";import{Vn,y}from"../../chunk-1721pyws.js";import{Hn}from"../../chunk-j3egtn0s.js";import"../../chunk-23w57jk5.js";import{n,Wt,De,H,ot,o,at,Me,j}from"../../chunk-mp86smwc.js";import{f}from"../../chunk-a3apthex.js";import"../../chunk-n1p62kwx.js";import"../../chunk-ep3575a9.js";import"../../chunk-1hhk0zm6.js";import"../../chunk-m9x72e5j.js";import"../../chunk-rz5jszhe.js";export{Hn as clearProcessorCaches,y as extractAllImportedItems,j as extractSatisfiesType,o as findMatchingBracket,f as formatComments,De as inferArrayType,at as inferFunctionType,n as inferNarrowType,Wt as inferNarrowTypeInUnion,ot as inferObjectType,Me as isGenericType,H as parseArrayElements,Vn as parseImportStatement,oe as processClassDeclaration,l as processDeclarations,ae as processEnumDeclaration,jn as processExportDeclaration,re as processFunctionDeclaration,_n as processImportDeclaration,ie as processInterfaceDeclaration,ce as processModuleDeclaration,se as processTypeDeclaration,h as processVariableDeclaration};
2
+ import{l}from"../../chunk-976r899s.js";import"../../chunk-3shq1bjr.js";import"../../chunk-hwgxwgsh.js";import{se,h,oe,ae,ce,le,Gn,Vn,ue}from"../../chunk-jbxb317g.js";import{zn,y}from"../../chunk-xa9vcbjj.js";import{qn}from"../../chunk-g19c3m7s.js";import"../../chunk-q45jkpya.js";import{n,jt,Me,q,ct,o,lt,Ie,j}from"../../chunk-x1j88x37.js";import{f}from"../../chunk-th9tcxga.js";import"../../chunk-d0aqaj02.js";import"../../chunk-s7k223zx.js";import"../../chunk-dzdwc2fh.js";import"../../chunk-mhz6xe61.js";import"../../chunk-v3n9zzhm.js";export{qn as clearProcessorCaches,y as extractAllImportedItems,j as extractSatisfiesType,o as findMatchingBracket,f as formatComments,Me as inferArrayType,lt as inferFunctionType,n as inferNarrowType,jt as inferNarrowTypeInUnion,ct as inferObjectType,Ie as isGenericType,q as parseArrayElements,zn as parseImportStatement,ce as processClassDeclaration,l as processDeclarations,le as processEnumDeclaration,Vn as processExportDeclaration,se as processFunctionDeclaration,Gn as processImportDeclaration,oe as processInterfaceDeclaration,ue as processModuleDeclaration,ae as processTypeDeclaration,h as processVariableDeclaration};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Nt,Bt,z,ga,st,n,Wt,I,ha,L,De,H,Yn,_t,ot,Re,le,o,at,Me,j,Fa,Na,Ba,Wa,_a,ja,Ga,ya,Va,Ua,za}from"../../chunk-mp86smwc.js";import"../../chunk-a3apthex.js";import"../../chunk-n1p62kwx.js";import"../../chunk-ep3575a9.js";import"../../chunk-1hhk0zm6.js";import"../../chunk-m9x72e5j.js";import"../../chunk-rz5jszhe.js";export{_t as classFieldDefaultDoc,le as cleanParameterDefaults,Bt as consumeCleanDefault,Nt as enableCleanDefaultCollection,Wa as extractInferTypes,j as extractSatisfiesType,o as findMatchingBracket,L as indentNestedType,De as inferArrayType,Re as inferCallType,Na as inferConditionalType,I as inferFunctionBodyReturnType,at as inferFunctionType,Va as inferKeyofType,Fa as inferMappedType,n as inferNarrowType,Wt as inferNarrowTypeInUnion,ot as inferObjectType,Ba as inferTemplateLiteralTypeAdvanced,Ua as inferTypeofType,ga as isBigIntLiteral,_a as isComplexType,Me as isGenericType,za as isIndexedAccessType,z as isNumericLiteral,Yn as leadingSourceComments,st as numericLiteralType,H as parseArrayElements,ya as parseTypeParameters,Ga as parseUtilityType,ha as primitiveMethodReturnType,ja as simplifyComplexType};
2
+ import{Wt,_t,K,ba,at,n,jt,I,xa,L,Me,q,Zn,Gt,ct,Oe,fe,o,lt,Ie,j,Wa,_a,ja,Ga,Va,Ua,za,wa,Ha,Ka,qa}from"../../chunk-x1j88x37.js";import"../../chunk-th9tcxga.js";import"../../chunk-d0aqaj02.js";import"../../chunk-s7k223zx.js";import"../../chunk-dzdwc2fh.js";import"../../chunk-mhz6xe61.js";import"../../chunk-v3n9zzhm.js";export{Gt as classFieldDefaultDoc,fe as cleanParameterDefaults,_t as consumeCleanDefault,Wt as enableCleanDefaultCollection,Ga as extractInferTypes,j as extractSatisfiesType,o as findMatchingBracket,L as indentNestedType,Me as inferArrayType,Oe as inferCallType,_a as inferConditionalType,I as inferFunctionBodyReturnType,lt as inferFunctionType,Ha as inferKeyofType,Wa as inferMappedType,n as inferNarrowType,jt as inferNarrowTypeInUnion,ct as inferObjectType,ja as inferTemplateLiteralTypeAdvanced,Ka as inferTypeofType,ba as isBigIntLiteral,Va as isComplexType,Ie as isGenericType,qa as isIndexedAccessType,K as isNumericLiteral,Zn as leadingSourceComments,at as numericLiteralType,q as parseArrayElements,wa as parseTypeParameters,za as parseUtilityType,xa as primitiveMethodReturnType,Ua as simplifyComplexType};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"../chunk-rz5jszhe.js";import"../chunk-m9x72e5j.js";import"../chunk-1hhk0zm6.js";import"../chunk-23w57jk5.js";import"../chunk-9c0k2b8n.js";import{f}from"../chunk-a3apthex.js";import"../chunk-n1p62kwx.js";import"../chunk-ep3575a9.js";import{n,Wt,De,H,ot,o,at,Me,j}from"../chunk-mp86smwc.js";import{re,h,ie,se,oe,ae,_n,jn,ce}from"../chunk-9dkjzqm0.js";import{Hn}from"../chunk-j3egtn0s.js";import{Vn,y}from"../chunk-1721pyws.js";import"../chunk-5v7drjwg.js";import{l}from"../chunk-rwwrrxtc.js";export{Hn as clearProcessorCaches,y as extractAllImportedItems,j as extractSatisfiesType,o as findMatchingBracket,f as formatComments,De as inferArrayType,at as inferFunctionType,n as inferNarrowType,Wt as inferNarrowTypeInUnion,ot as inferObjectType,Me as isGenericType,H as parseArrayElements,Vn as parseImportStatement,oe as processClassDeclaration,l as processDeclarations,ae as processEnumDeclaration,jn as processExportDeclaration,re as processFunctionDeclaration,_n as processImportDeclaration,ie as processInterfaceDeclaration,ce as processModuleDeclaration,se as processTypeDeclaration,h as processVariableDeclaration};
2
+ import"../chunk-v3n9zzhm.js";import"../chunk-mhz6xe61.js";import"../chunk-dzdwc2fh.js";import"../chunk-q45jkpya.js";import"../chunk-3shq1bjr.js";import{f}from"../chunk-th9tcxga.js";import"../chunk-d0aqaj02.js";import"../chunk-s7k223zx.js";import{n,jt,Me,q,ct,o,lt,Ie,j}from"../chunk-x1j88x37.js";import{se,h,oe,ae,ce,le,Gn,Vn,ue}from"../chunk-jbxb317g.js";import{qn}from"../chunk-g19c3m7s.js";import{zn,y}from"../chunk-xa9vcbjj.js";import"../chunk-hwgxwgsh.js";import{l}from"../chunk-976r899s.js";export{qn as clearProcessorCaches,y as extractAllImportedItems,j as extractSatisfiesType,o as findMatchingBracket,f as formatComments,Me as inferArrayType,lt as inferFunctionType,n as inferNarrowType,jt as inferNarrowTypeInUnion,ct as inferObjectType,Ie as isGenericType,q as parseArrayElements,zn as parseImportStatement,ce as processClassDeclaration,l as processDeclarations,le as processEnumDeclaration,Vn as processExportDeclaration,se as processFunctionDeclaration,Gn as processImportDeclaration,oe as processInterfaceDeclaration,ue as processModuleDeclaration,ae as processTypeDeclaration,h as processVariableDeclaration};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Gt,gr,Zi,Qi,Vt,es}from"../chunk-pfvjr5bg.js";export{Gt as Profiler,Vt as Timer,Qi as createProfiledIo,gr as createProfiler,es as createTimer,Zi as profileExecution};
2
+ import{Ut,yr,ts,ns,zt,rs}from"../chunk-vz4fc70e.js";export{Ut as Profiler,zt as Timer,ns as createProfiledIo,yr as createProfiler,rs as createTimer,ts as profileExecution};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ei}from"../chunk-aqcjv2v5.js";import"../chunk-bhqpdftq.js";import"../chunk-ksc4xgdz.js";import"../chunk-9dkjzqm0.js";import"../chunk-pebt9j6c.js";import"../chunk-1721pyws.js";import"../chunk-j3egtn0s.js";import"../chunk-23w57jk5.js";import"../chunk-mp86smwc.js";import"../chunk-a3apthex.js";import"../chunk-n1p62kwx.js";import"../chunk-ep3575a9.js";import"../chunk-1hhk0zm6.js";import"../chunk-b2j236p3.js";import"../chunk-m9x72e5j.js";import"../chunk-rz5jszhe.js";export{Ei as createReturnTypeScope};
2
+ import{Ai}from"../chunk-1hz6j7bq.js";import"../chunk-q4ebd4qe.js";import"../chunk-4ece5g8t.js";import"../chunk-jbxb317g.js";import"../chunk-3v0yh5dk.js";import"../chunk-xa9vcbjj.js";import"../chunk-g19c3m7s.js";import"../chunk-q45jkpya.js";import"../chunk-x1j88x37.js";import"../chunk-th9tcxga.js";import"../chunk-d0aqaj02.js";import"../chunk-s7k223zx.js";import"../chunk-dzdwc2fh.js";import"../chunk-2d3nbfth.js";import"../chunk-mhz6xe61.js";import"../chunk-v3n9zzhm.js";export{Ai as createReturnTypeScope};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{N,C,Ve,Gr,cn,Vr,Ur,zr,ht,ln,yt,Hr,Xs,Zs,Qs,eo}from"../chunk-1903h3dm.js";export{N as DEFAULT_SECURITY_CONFIG,C as SecurityError,Xs as createSecureBatchProcessor,Hr as createSecureProcessor,eo as createSecurityMiddleware,cn as isBlockedPath,Qs as isSafePath,Ur as isSymlink,Zs as sanitizeFilename,ln as validateFileBatch,ht as validateFilePath,Vr as validateFileSize,Ve as validatePath,Gr as validatePaths,zr as validateSymlink,yt as withTimeout};
2
+ import{N,C,ze,Ur,un,zr,Hr,Kr,bt,fn,xt,qr,eo,to,no,ro}from"../chunk-anvhqbw8.js";export{N as DEFAULT_SECURITY_CONFIG,C as SecurityError,eo as createSecureBatchProcessor,qr as createSecureProcessor,ro as createSecurityMiddleware,un as isBlockedPath,no as isSafePath,Hr as isSymlink,to as sanitizeFilename,fn as validateFileBatch,bt as validateFilePath,zr as validateFileSize,ze as validatePath,Ur as validatePaths,Kr as validateSymlink,xt as withTimeout};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{It,ne,On,In,Ln,Fn,Nn}from"../chunk-62bqxy6j.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";export{On as batchParseSourceFiles,In as clearSourceFileCache,Fn as getPendingParseCount,It as getSourceFile,ne as getSourceFileAsync,Ln as getSourceFileCacheSize,Nn as shouldUseAsyncParsing};
2
+ import{Ft,ie,Ln,Fn,Nn,Bn,Wn}from"../chunk-zp93zcn5.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";export{Ln as batchParseSourceFiles,Fn as clearSourceFileCache,Bn as getPendingParseCount,Ft as getSourceFile,ie as getSourceFileAsync,Nn as getSourceFileCacheSize,Wn as shouldUseAsyncParsing};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{sn,gt,Ns,Bs,Ws,_s,jr,js,Gs}from"../chunk-p3n0wx32.js";export{gt as SourceMapConsumer,sn as SourceMapGenerator,Ws as appendInlineSourceMap,Bs as appendSourceMapComment,Gs as buildDeclarationMappings,Ns as createSourceMap,js as extractSourceMap,jr as readSourceMap,_s as writeSourceMap};
2
+ import{an,yt,_s,js,Gs,Vs,Vr,Us,zs}from"../chunk-ns44qxdd.js";export{yt as SourceMapConsumer,an as SourceMapGenerator,Gs as appendInlineSourceMap,js as appendSourceMapComment,zs as buildDeclarationMappings,_s as createSourceMap,Us as extractSourceMap,Vr as readSourceMap,Vs as writeSourceMap};
package/dist/src/stx.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{P,da,D}from"../chunk-7k0e2h9b.js";import"../chunk-xst4jpr9.js";export{P as isStxFile,da as parseStxScripts,D as transformStxToTs};
2
+ import{D,ga,P}from"../chunk-m3y5knzq.js";import"../chunk-mjzee617.js";export{D as isStxFile,ga as parseStxScripts,P as transformStxToTs};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{be}from"../chunk-vae5wxar.js";export{be as validateTypeScriptSyntax};
2
+ import{we}from"../chunk-3rwbf45t.js";export{we as validateTypeScriptSyntax};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{zt,Ht,Kt,as,cs}from"../chunk-w4fj9m56.js";export{zt as Tracker,as as analyzeImports,cs as analyzeTypes,Ht as createTracker,Kt as trackDeclarations};
2
+ import{Kt,qt,Jt,us,fs}from"../chunk-cynfv4dt.js";export{Kt as Tracker,us as analyzeImports,fs as analyzeTypes,qt as createTracker,Jt as trackDeclarations};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{gi,hi,An,Po,yi,Do,xe,Ro,Xe,Mo,bi,Oo,xi,Io,Lo,Fo,No,wi,Ci,Bo,Wo,_o,jo,Go,Vo,Uo,zo}from"../chunk-ettcbmzw.js";import"../chunk-01zsk2q8.js";export{hi as cloneDeclaration,Do as composeTransformers,gi as createDeclaration,Io as createJSDocTransformer,wi as createModifierTransformer,zo as createNamespacePrefixPlugin,No as createParameterTransformer,bi as createPrefixTransformer,xi as createRemoveTransformer,Mo as createRenameTransformer,Fo as createReturnTypeTransformer,_o as createStripTagsTransformer,Oo as createSuffixTransformer,Xe as createTransformerPlugin,Lo as createTypeTransformer,jo as createWrapTypeTransformer,Uo as declarePlugin,xe as filterByKind,Ro as filterByPredicate,Po as findDeclarations,yi as mapDeclarations,Wo as optionalTransformer,Go as readonlyPlugin,Ci as readonlyTransformer,Bo as requiredTransformer,Vo as stripPrivatePlugin,An as walkDeclarations};
2
+ import{bi,xi,Pn,Mo,wi,Oo,Ce,Io,Qe,Lo,Ci,Fo,vi,No,Bo,Wo,_o,Si,$i,jo,Go,Vo,Uo,zo,Ho,Ko,qo}from"../chunk-86xvq8km.js";import"../chunk-mhyqvwcg.js";export{xi as cloneDeclaration,Oo as composeTransformers,bi as createDeclaration,No as createJSDocTransformer,Si as createModifierTransformer,qo as createNamespacePrefixPlugin,_o as createParameterTransformer,Ci as createPrefixTransformer,vi as createRemoveTransformer,Lo as createRenameTransformer,Wo as createReturnTypeTransformer,Vo as createStripTagsTransformer,Fo as createSuffixTransformer,Qe as createTransformerPlugin,Bo as createTypeTransformer,Uo as createWrapTypeTransformer,Ko as declarePlugin,Ce as filterByKind,Io as filterByPredicate,Mo as findDeclarations,wi as mapDeclarations,Go as optionalTransformer,zo as readonlyPlugin,$i as readonlyTransformer,jo as requiredTransformer,Ho as stripPrivatePlugin,Pn as walkDeclarations};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{lt,ut,ft,cr,lr,ur,Ki}from"../chunk-n4hj7rs6.js";export{ur as analyzeDependencies,ut as buildDeclarationDependencyGraph,Ki as createTreeShaker,ft as extractTypeReferences,lr as findUnusedDeclarations,lt as treeShake,cr as treeShakeContent};
2
+ import{ft,dt,pt,ur,fr,dr,Yi}from"../chunk-vgyjw95e.js";export{dr as analyzeDependencies,dt as buildDeclarationDependencyGraph,Yi as createTreeShaker,pt as extractTypeReferences,fr as findUnusedDeclarations,ft as treeShake,ur as treeShakeContent};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ee}from"../chunk-w3zqfm8a.js";import"../chunk-bkbsg2bv.js";export{ee as readEffectiveTsconfig};
2
+ import{ne}from"../chunk-ehgnwdn9.js";import"../chunk-xgf6djk3.js";export{ne as readEffectiveTsconfig};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ui,fi,di,pi,mi,$n,Y,ko,To,Et,Ao}from"../chunk-4n2mpvmb.js";export{$n as TypeMapper,Ao as TypeTransformers,Et as applyTypeMappings,Y as createTypeMapper,ko as defaultTypeMapper,ui as defaultTypeMappings,mi as getPresetMappings,di as readonlyTypeMappings,pi as simplifiedTypeMappings,To as strictTypeMapper,fi as strictTypeMappings};
2
+ import{pi,mi,gi,hi,yi,kn,Z,Do,Po,Tt,Ro}from"../chunk-g4rmn34j.js";export{kn as TypeMapper,Ro as TypeTransformers,Tt as applyTypeMappings,Z as createTypeMapper,Do as defaultTypeMapper,pi as defaultTypeMappings,yi as getPresetMappings,gi as readonlyTypeMappings,hi as simplifiedTypeMappings,Po as strictTypeMapper,mi as strictTypeMappings};
@@ -41,6 +41,7 @@ export declare interface DtsGenerationConfig {
41
41
  prettier?: boolean
42
42
  include?: string[]
43
43
  isolatedDeclarations?: boolean
44
+ engine?: 'native' | 'typescript'
44
45
  typeMappings?: import('./type-mappings.js').TypeMappingConfig
45
46
  lineEnding?: 'lf' | 'crlf' | 'auto'
46
47
  normalizeOutput?: boolean
package/dist/src/utils.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{qe,$o,G,li,J,Ct,vt,St,$t}from"../chunk-km03xc8j.js";import"../chunk-vae5wxar.js";import"../chunk-0zj4xkky.js";import"../chunk-xewmepxp.js";import"../chunk-60wrxcjt.js";import"../chunk-w3zqfm8a.js";import"../chunk-bkbsg2bv.js";import"../chunk-m3ysqm3b.js";import"../chunk-btc6zbyj.js";export{$t as addSourceMapComment,$o as assertNever,J as checkIsolatedDeclarationsConfig,vt as createDiff,St as generateDeclarationMap,li as getAllTypeScriptFiles,qe as sourceMapCommentPrefix,Ct as validateDtsContent,G as writeToFile};
2
+ import{Ye,To,U,di,X,St,$t,Et,kt}from"../chunk-erymqkk3.js";import"../chunk-3rwbf45t.js";import"../chunk-sqnhxtbk.js";import"../chunk-ptbd3dac.js";import"../chunk-waan03ga.js";import"../chunk-ehgnwdn9.js";import"../chunk-xgf6djk3.js";import"../chunk-vv8e8pa3.js";import"../chunk-9hjd6p38.js";export{kt as addSourceMapComment,To as assertNever,X as checkIsolatedDeclarationsConfig,$t as createDiff,Et as generateDeclarationMap,di as getAllTypeScriptFiles,Ye as sourceMapCommentPrefix,St as validateDtsContent,U as writeToFile};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Gn}from"../chunk-pebt9j6c.js";import"../chunk-1721pyws.js";import"../chunk-j3egtn0s.js";import"../chunk-23w57jk5.js";import"../chunk-mp86smwc.js";import"../chunk-a3apthex.js";import"../chunk-n1p62kwx.js";import"../chunk-ep3575a9.js";import"../chunk-1hhk0zm6.js";import"../chunk-m9x72e5j.js";import"../chunk-rz5jszhe.js";export{Gn as inferDeclarationValueAliases};
2
+ import{Un}from"../chunk-3v0yh5dk.js";import"../chunk-xa9vcbjj.js";import"../chunk-g19c3m7s.js";import"../chunk-q45jkpya.js";import"../chunk-x1j88x37.js";import"../chunk-th9tcxga.js";import"../chunk-d0aqaj02.js";import"../chunk-s7k223zx.js";import"../chunk-dzdwc2fh.js";import"../chunk-mhz6xe61.js";import"../chunk-v3n9zzhm.js";export{Un as inferDeclarationValueAliases};
package/dist/src/vue.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{R,pa,Tt,At,a,Ae,Qe,Pt,Dt,et,tt,nt,Rt,rt,Mt,Ot,M}from"../chunk-xst4jpr9.js";export{Rt as collapseTypeText,Dt as extractDefaultExportOptions,tt as filterLocalValueStatements,Ae as findMacroCall,a as findMatching,et as getOptionValue,R as isVueFile,Qe as mapRuntimeProps,At as maskNonCode,pa as parseVueSfc,nt as removeInlinedDeclaration,Mt as resolveEmitsType,Ot as resolveExposedType,rt as resolvePropsType,Tt as skipNonCode,Pt as stripMacroStatements,M as transformVueSfcToTs};
2
+ import{R,ha,Dt,Pt,a,Pe,tt,Rt,Mt,nt,rt,it,Ot,st,It,Lt,M}from"../chunk-mjzee617.js";export{Ot as collapseTypeText,Mt as extractDefaultExportOptions,rt as filterLocalValueStatements,Pe as findMacroCall,a as findMatching,nt as getOptionValue,R as isVueFile,tt as mapRuntimeProps,Pt as maskNonCode,ha as parseVueSfc,it as removeInlinedDeclaration,It as resolveEmitsType,Lt as resolveExposedType,st as resolvePropsType,Dt as skipNonCode,Rt as stripMacroStatements,M as transformVueSfcToTs};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ti,ba,Ai,xa}from"../chunk-qqjbaqm6.js";export{xa as createWatchLogger,Ti as createWatcher,Ai as formatWatchResult,ba as watchAndGenerate};
2
+ import{Pi,Ca,Ri,va}from"../chunk-932kxt70.js";export{va as createWatchLogger,Pi as createWatcher,Ri as formatWatchResult,Ca as watchAndGenerate};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"../chunk-k5wz43yh.js";import"../chunk-xst4jpr9.js";import"../chunk-7k0e2h9b.js";import"../chunk-rz5jszhe.js";import"../chunk-m9x72e5j.js";import"../chunk-v6fwy63g.js";import"../chunk-b2j236p3.js";import"../chunk-1hhk0zm6.js";import"../chunk-n1p62kwx.js";import"../chunk-23w57jk5.js";import"../chunk-ksc4xgdz.js";import"../chunk-ep3575a9.js";import"../chunk-a3apthex.js";import"../chunk-mp86smwc.js";import"../chunk-bhqpdftq.js";import"../chunk-9dkjzqm0.js";import"../chunk-aqcjv2v5.js";import"../chunk-j3egtn0s.js";import"../chunk-1721pyws.js";import"../chunk-pebt9j6c.js";import"../chunk-8pfyd95y.js";import"../chunk-62bqxy6j.js";import{r}from"../chunk-3pcxxgwq.js";import"../chunk-9c0k2b8n.js";import"../chunk-5v7drjwg.js";import{l}from"../chunk-rwwrrxtc.js";import"../chunk-4q78f5pg.js";import{ze}from"../chunk-a2666k9r.js";import*as E from"fs";import{parentPort as M}from"worker_threads";var P=typeof Bun<"u"?Bun:null,S=P?null:E,R=Promise.resolve({extractDeclarations:r,processDeclarations:l});async function T(e){let u=Date.now();try{let{extractDeclarations:m,processDeclarations:A}=await R,f=e.config?.keepComments,C=e.config?.isolatedDeclarations,v=e.config?.importOrder;if(e.type==="process-batch"){let{filePaths:o,outPaths:D}=e,p=o?null:e.files||[],d=o?o.length:p.length,w=e.writeOutput===!0,y=w?null:Array(d),c=null,b=e.sources;if(!b&&d>0){let t=Array(d);for(let s=0;s<d;s++){let i=p?p[s]:null,h=i?i.sourceCode:void 0,n=o?o[s]:i.filePath;if(h!=null)t[s]=Promise.resolve(h);else if(P)t[s]=P.file(n).text();else t[s]=Promise.resolve(S.readFileSync(n,"utf-8"))}b=await Promise.all(t)}let x={filePath:"",sourceCode:"",declarations:[]},O=w&&P?Array(d):null,F=!0;for(let t=0;t<d;t++){let s=p?p[t]:null,i=o?o[t]:s.filePath,h=D?D[t]:s?s.outPath:void 0;try{let n=b?b[t]:s?.sourceCode||"",a=null,g=ze(n,i,f??!0,v??["bun"],C??!1);if(g===null)a=m(n,i,f,C),x.filePath=i,x.sourceCode=n,x.declarations=a,g=A(a,x,f??!0,v);if(w){if(!h)throw Error(`Missing outPath for ${i}`);if(P)O[t]=P.write(h,g);else S.writeFileSync(h,g)}else if(y)y[t]={filePath:i,success:!0,content:g,declarations:a}}catch(n){let a=n&&n.message?n.message:String(n);if(w){if(!c)c=[];c.push({filePath:i,success:!1,error:a})}else if(y)y[t]={filePath:i,success:!1,error:a};F=!1}}if(O)await Promise.all(O);let B=c?.length?`${c[0].filePath}: ${c[0].error||"Worker batch failed"}`:void 0;return{id:e.id,success:F,filePath:e.filePath,batchResults:w?c||void 0:y,error:B,duration:Date.now()-u}}if(e.type==="extract"){let o=m(e.sourceCode,e.filePath,f,C);return{id:e.id,success:!0,filePath:e.filePath,declarations:o,duration:Date.now()-u}}if(e.type==="process"){let o=m(e.sourceCode,e.filePath,f,C),D=A(o,{filePath:e.filePath,sourceCode:e.sourceCode,declarations:o},f??!0,v);return{id:e.id,success:!0,filePath:e.filePath,content:D,declarations:o,duration:Date.now()-u}}throw Error(`Unknown task type: ${e.type}`)}catch(m){return{id:e.id,success:!1,filePath:e.filePath,error:m.message,duration:Date.now()-u}}}M?.on("message",async(e)=>{let u=await T(e);M.postMessage(u)});
2
+ import"../chunk-k5wz43yh.js";import"../chunk-mjzee617.js";import"../chunk-m3y5knzq.js";import"../chunk-v3n9zzhm.js";import"../chunk-mhz6xe61.js";import"../chunk-v6fwy63g.js";import"../chunk-2d3nbfth.js";import"../chunk-dzdwc2fh.js";import"../chunk-d0aqaj02.js";import"../chunk-q45jkpya.js";import"../chunk-4ece5g8t.js";import"../chunk-s7k223zx.js";import"../chunk-th9tcxga.js";import"../chunk-x1j88x37.js";import"../chunk-q4ebd4qe.js";import"../chunk-jbxb317g.js";import"../chunk-1hz6j7bq.js";import"../chunk-g19c3m7s.js";import"../chunk-xa9vcbjj.js";import"../chunk-3v0yh5dk.js";import"../chunk-nxk4h5hy.js";import"../chunk-zp93zcn5.js";import{r}from"../chunk-90f37xen.js";import"../chunk-3shq1bjr.js";import"../chunk-hwgxwgsh.js";import{l}from"../chunk-976r899s.js";import"../chunk-hyszyzq2.js";import{Ke}from"../chunk-xb2nr89a.js";import*as R from"fs";import{parentPort as M}from"worker_threads";var P=typeof Bun<"u"?Bun:null,S=P?null:R,T=Promise.resolve({extractDeclarations:r,processDeclarations:l});async function N(e){let u=Date.now();try{let{extractDeclarations:m,processDeclarations:A}=await T,f=e.config?.keepComments,C=e.config?.isolatedDeclarations,v=e.config?.importOrder,B=e.config?.engine;if(e.type==="process-batch"){let{filePaths:o,outPaths:D}=e,p=o?null:e.files||[],d=o?o.length:p.length,w=e.writeOutput===!0,g=w?null:Array(d),c=null,b=e.sources;if(!b&&d>0){let t=Array(d);for(let s=0;s<d;s++){let n=p?p[s]:null,h=n?n.sourceCode:void 0,i=o?o[s]:n.filePath;if(h!=null)t[s]=Promise.resolve(h);else if(P)t[s]=P.file(i).text();else t[s]=Promise.resolve(S.readFileSync(i,"utf-8"))}b=await Promise.all(t)}let x={filePath:"",sourceCode:"",declarations:[]},O=w&&P?Array(d):null,F=!0;for(let t=0;t<d;t++){let s=p?p[t]:null,n=o?o[t]:s.filePath,h=D?D[t]:s?s.outPath:void 0;try{let i=b?b[t]:s?.sourceCode||"",a=null,y=Ke(i,n,f??!0,v??["bun"],C??!1,B);if(y===null)a=m(i,n,f,C),x.filePath=n,x.sourceCode=i,x.declarations=a,y=A(a,x,f??!0,v);if(w){if(!h)throw Error(`Missing outPath for ${n}`);if(P)O[t]=P.write(h,y);else S.writeFileSync(h,y)}else if(g)g[t]={filePath:n,success:!0,content:y,declarations:a}}catch(i){let a=i&&i.message?i.message:String(i);if(w){if(!c)c=[];c.push({filePath:n,success:!1,error:a})}else if(g)g[t]={filePath:n,success:!1,error:a};F=!1}}if(O)await Promise.all(O);let E=c?.length?`${c[0].filePath}: ${c[0].error||"Worker batch failed"}`:void 0;return{id:e.id,success:F,filePath:e.filePath,batchResults:w?c||void 0:g,error:E,duration:Date.now()-u}}if(e.type==="extract"){let o=m(e.sourceCode,e.filePath,f,C);return{id:e.id,success:!0,filePath:e.filePath,declarations:o,duration:Date.now()-u}}if(e.type==="process"){let o=m(e.sourceCode,e.filePath,f,C),D=A(o,{filePath:e.filePath,sourceCode:e.sourceCode,declarations:o},f??!0,v);return{id:e.id,success:!0,filePath:e.filePath,content:D,declarations:o,duration:Date.now()-u}}throw Error(`Unknown task type: ${e.type}`)}catch(m){return{id:e.id,success:!1,filePath:e.filePath,error:m.message,duration:Date.now()-u}}}M?.on("message",async(e)=>{let u=await N(e);M.postMessage(u)});
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ut,hr,ts,ns,rs}from"../chunk-cd26g482.js";import"../chunk-btc6zbyj.js";export{Ut as WorkerPool,ns as batchFiles,rs as calculateOptimalBatchSize,hr as createWorkerPool,ts as parallelProcess};
2
+ import{Ht,br,is,ss,os}from"../chunk-65d3dga1.js";import"../chunk-9hjd6p38.js";export{Ht as WorkerPool,ss as batchFiles,os as calculateOptimalBatchSize,br as createWorkerPool,is as parallelProcess};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Kr,qr,un,to,Jr,Yr,no}from"../chunk-xgj6rxmd.js";import"../chunk-y83jhbpr.js";import"../chunk-3r9dptyy.js";import"../chunk-eyc0tk75.js";import"../chunk-a2666k9r.js";import"../chunk-rwwrrxtc.js";import"../chunk-9c0k2b8n.js";import"../chunk-9fz5erbq.js";import"../chunk-y78fsxjf.js";import"../chunk-pekphr39.js";import"../chunk-4q78f5pg.js";import"../chunk-km03xc8j.js";import"../chunk-vae5wxar.js";import"../chunk-tvhg9v4f.js";import"../chunk-4n2mpvmb.js";import"../chunk-0zj4xkky.js";import"../chunk-xewmepxp.js";import"../chunk-36xenw6z.js";import"../chunk-01zsk2q8.js";import"../chunk-1dqa0tex.js";import"../chunk-e37cbaq7.js";import"../chunk-5v7drjwg.js";import"../chunk-60wrxcjt.js";import"../chunk-pwdmw567.js";import"../chunk-w3zqfm8a.js";import"../chunk-bkbsg2bv.js";import"../chunk-m3ysqm3b.js";import"../chunk-btc6zbyj.js";import"../chunk-3pcxxgwq.js";import"../chunk-8pfyd95y.js";import"../chunk-7k0e2h9b.js";import"../chunk-xst4jpr9.js";import"../chunk-62bqxy6j.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";import"../chunk-aqcjv2v5.js";import"../chunk-bhqpdftq.js";import"../chunk-ksc4xgdz.js";import"../chunk-9dkjzqm0.js";import"../chunk-pebt9j6c.js";import"../chunk-1721pyws.js";import"../chunk-j3egtn0s.js";import"../chunk-23w57jk5.js";import"../chunk-mp86smwc.js";import"../chunk-a3apthex.js";import"../chunk-n1p62kwx.js";import"../chunk-ep3575a9.js";import"../chunk-1hhk0zm6.js";import"../chunk-b2j236p3.js";import"../chunk-m9x72e5j.js";import"../chunk-rz5jszhe.js";export{Jr as discoverWorkspaceFromPackageJson,Kr as discoverWorkspaceProjects,no as generateFromPackageWorkspaces,to as generateMonorepo,un as generateWorkspace,Yr as resolveWorkspacePatterns,qr as sortProjectsByDependencies};
2
+ import{Jr,Yr,dn,io,Xr,Zr,so}from"../chunk-8v43ne8p.js";import"../chunk-ykrdzatr.js";import"../chunk-6pr23q72.js";import"../chunk-njqzhkzy.js";import"../chunk-xb2nr89a.js";import"../chunk-976r899s.js";import"../chunk-3shq1bjr.js";import"../chunk-2y5b6hdw.js";import"../chunk-h1xwd278.js";import"../chunk-btmc3e8d.js";import"../chunk-hyszyzq2.js";import"../chunk-erymqkk3.js";import"../chunk-3rwbf45t.js";import"../chunk-mfp35a3b.js";import"../chunk-g4rmn34j.js";import"../chunk-sqnhxtbk.js";import"../chunk-ptbd3dac.js";import"../chunk-d68r83t9.js";import"../chunk-mhyqvwcg.js";import"../chunk-59jw51gg.js";import"../chunk-nek63555.js";import"../chunk-hwgxwgsh.js";import"../chunk-waan03ga.js";import"../chunk-m2kzh519.js";import"../chunk-ehgnwdn9.js";import"../chunk-xgf6djk3.js";import"../chunk-vv8e8pa3.js";import"../chunk-9hjd6p38.js";import"../chunk-90f37xen.js";import"../chunk-nxk4h5hy.js";import"../chunk-m3y5knzq.js";import"../chunk-mjzee617.js";import"../chunk-zp93zcn5.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";import"../chunk-1hz6j7bq.js";import"../chunk-q4ebd4qe.js";import"../chunk-4ece5g8t.js";import"../chunk-jbxb317g.js";import"../chunk-3v0yh5dk.js";import"../chunk-xa9vcbjj.js";import"../chunk-g19c3m7s.js";import"../chunk-q45jkpya.js";import"../chunk-x1j88x37.js";import"../chunk-th9tcxga.js";import"../chunk-d0aqaj02.js";import"../chunk-s7k223zx.js";import"../chunk-dzdwc2fh.js";import"../chunk-2d3nbfth.js";import"../chunk-mhz6xe61.js";import"../chunk-v3n9zzhm.js";export{Xr as discoverWorkspaceFromPackageJson,Jr as discoverWorkspaceProjects,so as generateFromPackageWorkspaces,io as generateMonorepo,dn as generateWorkspace,Zr as resolveWorkspacePatterns,Yr as sortProjectsByDependencies};
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@dtsx/dtsx",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.11.43",
5
+ "version": "0.11.44",
6
6
  "description": "A modern, fast .d.ts generation tool, powered by Bun.",
7
7
  "author": "Chris Breuer <chris@stacksjs.org>",
8
8
  "license": "MIT",
@@ -1,8 +0,0 @@
1
- // @bun
2
- import{Se}from"./chunk-e37cbaq7.js";import{e}from"./chunk-btc6zbyj.js";import{Ee,U}from"./chunk-pwdmw567.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(Z(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 Z(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
- entrypoints: ${r.entrypoints.map((t)=>JSON.stringify(t)).join(", ")||"(none)"}
4
- `+(r.exclude?.length?` exclude: ${r.exclude.map((t)=>JSON.stringify(t)).join(", ")}
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(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(!Z(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(!Z(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)&&Z(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,Z,S,V,Yo,ve};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{W}from"./chunk-k5wz43yh.js";import{Te,Mn}from"./chunk-8pfyd95y.js";import{ne,In}from"./chunk-62bqxy6j.js";function Si(){In(),Mn()}function r(e,t,c=!0,n=!1,o){return Te(e,t,c,n,o)}async function Rn(e,t,c=!0,n={}){return await ne(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 Rn(a.sourceCode,a.filePath,a.keepComments,t)})));for(let a of i)n.set(a.path,a.declarations)}return n}
3
- export{Si,r,Rn,$i};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{existsSync as L}from"fs";import{arch as N,platform as w}from"os";import{fileURLToPath as I}from"url";var b;function _(){return`${w()==="win32"?"windows":w()}-${N()}`}function z(r){let t=[],e=process.env.DTSX_NATIVE_LIBRARY;if(e)t.push(e);for(let n of[`../native/${_()}/${r}`,`../../native/${_()}/${r}`,`../../zig-dtsx/zig-out/lib/${r}`,`../../zig-dtsx/zig-out/bin/${r}`])try{t.push(I(new URL(n,import.meta.url)))}catch{}return t}function E(){if(process.env.DTSX_ENGINE==="typescript"||typeof globalThis.Bun>"u")return null;let r;try{r=import.meta.require("bun:ffi")}catch{return null}let{dlopen:t,FFIType:e,ptr:n,suffix:u,toArrayBuffer:s}=r,d=u==="dll"?`zig-dtsx.${u}`:`libzig-dtsx.${u}`;for(let c of z(d)){if(!L(c))continue;try{let f=t(c,{process_source_checked_v1:{args:[e.ptr,e.u64,e.bool,e.bool,e.ptr,e.ptr],returns:e.ptr},process_source_with_context_v1:{args:[e.ptr,e.u64,e.bool,e.bool,e.ptr,e.u64,e.ptr,e.ptr],returns:e.ptr},free_result:{args:[e.ptr,e.u64],returns:e.void}}),{symbols:l}=f,g=new TextDecoder;return{checked:(o,i,p,m,y,h)=>l.process_source_checked_v1(n(o),i,p,m,n(y),n(h)),contextual:(o,i,p,m,y,h,S,U)=>l.process_source_with_context_v1(n(o),i,p,m,n(y),h,n(S),n(U)),read:(o,i)=>{if(!o)return"";let p=i?g.decode(s(o,0,i)):"";return l.free_result(o,i),p}}}catch{continue}}return null}function k(){if(b===void 0)b=E();return b}function ci(){return k()!==null}var A=new TextEncoder,a=new Uint8Array(65536),x=new BigUint64Array(1),v=new Uint32Array(1);function ye(r,t){let e=k();if(!e)return null;if(r.length*3>a.length)a=new Uint8Array(r.length*3);let{written:n}=A.encodeInto(r,a),u=(t.inferenceSources?.size??0)>0||(t.augmentationImports?.size??0)>0,s;if(u){let c=t.sourceFile??"source.ts",f=A.encode(JSON.stringify({version:1,moduleSpecifierMode:"preserve",sourceFile:c,outputFile:c.replace(/\.[cm]?tsx?$/,".d.ts"),sourceHash:new Bun.CryptoHasher("sha256").update(a.subarray(0,n)).digest("hex"),rewrites:[],augmentationImports:[...t.augmentationImports??[]],inferenceSources:[...t.inferenceSources??[]].map(([l,g])=>({specifier:l,source:g}))}));s=e.contextual(a,n,t.keepComments,t.isolatedDeclarations,f,f.length,x,v)}else s=e.checked(a,n,t.keepComments,t.isolatedDeclarations,x,v);let d=Number(x[0]);if(v[0]!==0)return e.read(s,d),null;return e.read(s,d)}
3
- export{ci,ye};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{R,M}from"./chunk-xst4jpr9.js";import{P,D}from"./chunk-7k0e2h9b.js";import{nr}from"./chunk-m9x72e5j.js";import{p}from"./chunk-v6fwy63g.js";import{T,O}from"./chunk-aqcjv2v5.js";var y=100,h=0,s=new Map;function Te(n,a,c=!0,i=!1,l){if(R(a))n=M(n);else if(P(a))n=D(n);let f=p(n),m=`${a}:${c?1:0}:${i?1:0}:${JSON.stringify([...l??[]].sort())}`,r=s.get(m);if(r&&r.contentHash===f)return r.lastAccess=++h,r.declarations;let g=i?T(n,a,c):O(n,a,c,l);if(s.set(m,{declarations:g,contentHash:f,lastAccess:++h}),s.size>y){let S=Math.max(1,Math.ceil(s.size*0.1)),e=[];for(let[t,o]of s)e.push([t,o.lastAccess]);e.sort((t,o)=>t[1]-o[1]);for(let t=0;t<S&&t<e.length;t++)s.delete(e[t][0])}return g}function Mn(){s.clear(),nr()}
3
- export{Te,Mn};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{R,M}from"./chunk-xst4jpr9.js";import{P,D}from"./chunk-7k0e2h9b.js";import{p}from"./chunk-v6fwy63g.js";import{T,O}from"./chunk-aqcjv2v5.js";import{Te}from"./chunk-8pfyd95y.js";import{l}from"./chunk-rwwrrxtc.js";import{ye}from"./chunk-4q78f5pg.js";function ze(t,n,s,r,i){if(r.length!==1||r[0]!=="bun")return null;let o=R(n)?M(t):P(n)?D(t):t;return ye(o,{keepComments:s,isolatedDeclarations:i})}var S=100,h=0,c=new Map;function bt(t,n="stdin.ts",s=!0,r=["bun"],i=!1){let o=p(t),a=JSON.stringify([n,s,i,r]),g=c.get(a);if(g&&g.contentHash===o)return g.lastAccess=++h,g.result;let b=ze(t,n,s,r,i)??y(t,n,s,r,i);if(c.set(a,{result:b,contentHash:o,lastAccess:++h}),c.size>S){let x=Math.max(1,Math.ceil(c.size*0.1)),u=[];for(let[e,f]of c)u.push([e,f.lastAccess]);u.sort((e,f)=>e[1]-f[1]);for(let e=0;e<x&&e<u.length;e++)c.delete(u[e][0])}return b}function ei(t,n="stdin.ts",s=!0,r=["bun"]){return bt(t,n,s,r,!0)}function ti(t,n="stdin.ts",s=!0,r=["bun"]){return bt(t,n,s,r,!1)}function y(t,n,s,r,i){let o=Te(t,n,s,i);return l(o,{filePath:n,sourceCode:t,declarations:o},s,r)}function ni(){c.clear()}function Da(t,n="stdin.ts",s=!0,r=["bun"],i=!1){return ze(t,n,s,r,i)??bn(t,n,s,r,i)}function bn(t,n="stdin.ts",s=!0,r=["bun"],i=!1){if(R(n))t=M(t);else if(P(n))t=D(t);let o=i?T(t,n,s):O(t,n,s);return l(o,{filePath:n,sourceCode:t,declarations:o},s,r)}
3
- export{ze,bt,ei,ti,ni,Da,bn};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{u}from"./chunk-m3ysqm3b.js";import{e}from"./chunk-btc6zbyj.js";import{w,m}from"./chunk-m9x72e5j.js";import{ee}from"./chunk-w3zqfm8a.js";import{existsSync as T,readFileSync as N,realpathSync as E,statSync as X}from"fs";import{builtinModules as F}from"module";import{dirname as I,extname as V,isAbsolute as A,join as J,relative as C,resolve as S}from"path";var B=[".ts",".tsx",".mts",".cts",".vue",".stx",".js",".jsx",".mjs",".cjs",".d.ts",".d.mts",".d.cts"],z={".js":[".ts",".tsx",".d.ts"],".jsx":[".tsx",".ts",".d.ts"],".mjs":[".mts",".d.mts"],".cjs":[".cts",".d.cts"]};function j(t){try{return X(t).isFile()}catch{return!1}}function Q(t,i){let s=t.replace(/[?#].*$/,"");if(!(s.startsWith("./")||s.startsWith("../")||s==="."||s==="..")&&!A(s))return{resolved:null,isRelative:!1};let a=I(i),c=S(a,s);if(j(c))return{resolved:c,isRelative:!0};let p=V(c),d=z[p];if(d){let f=c.slice(0,-p.length);for(let r of d){let o=f+r;if(j(o))return{resolved:o,isRelative:!0}}}for(let f of B){let r=c+f;if(j(r))return{resolved:r,isRelative:!0}}if(T(c))for(let f of B){let r=J(c,`index${f}`);if(j(r))return{resolved:r,isRelative:!0}}return{resolved:null,isRelative:!0}}function K(t,i){let s=t.indexOf("*");return s===-1?i===t:i.startsWith(t.slice(0,s))&&i.endsWith(t.slice(s+1))&&i.length>=t.length-1}function L(t,i){if(Object.hasOwn(t,i))return t[i]!==null;let s=Object.keys(t).filter((l)=>l.includes("*")&&K(l,i)).sort((l,a)=>a.indexOf("*")-l.indexOf("*")||a.length-l.length)[0];return s!==void 0&&t[s]!==null}function D(t,i){if(!t.name||i!==t.name&&!i.startsWith(`${t.name}/`))return!1;if(t.exports===void 0)return!0;let s=i===t.name?".":`.${i.slice(t.name.length)}`;if(typeof t.exports==="string"||Array.isArray(t.exports))return s===".";if(!t.exports||typeof t.exports!=="object")return!1;let l=t.exports;if(!Object.keys(l).some((c)=>c.startsWith(".")))return s===".";return L(l,s)}function W(t,i){let s=C(t,i);return s!==".."&&!s.startsWith(`..${process.platform==="win32"?"\\":"/"}`)&&!A(s)}async function Ee(t){let i=await ee(S(t.cwd,t.tsconfigPath||"tsconfig.json")),s=Object.entries(i?.paths??{});if(s.length===0){let r=(o,n)=>Q(o,n);return r.cacheKey=(o)=>JSON.stringify(o.map((n)=>({file:n,references:k(N(n,"utf8"),{includeImports:!0}).map((g)=>({specifier:g.specifier,resolution:r(g.specifier,n)}))}))),r}let l=i?.baseUrl??i?.pathsBasePath??t.cwd,a=S(t.cwd,t.root),c=new Map,p=new Set([...F,"bun"]),d=(r)=>{let o=I(r),n=[];while(!0){if(c.has(o)){let R=c.get(o);for(let y of n)c.set(y,R);return R}n.push(o);let g=J(o,"package.json");if(T(g)){let y={...JSON.parse(N(g,"utf8")),directory:E(o)};for(let O of n)c.set(O,y);return y}let v=I(o);if(v===o)return;o=v}},f=(r,o)=>{if(r.startsWith(".")||A(r))return Q(r,o);if(r.startsWith("node:")||r.startsWith("bun:")||p.has(r))return{resolved:null,isRelative:!1};let n=d(o),g=r.startsWith("@")?/^@[^/]+\/[^/]+/.exec(r)?.[0]:r.split("/")[0];if(n&&(D(n,r)||L(n.imports??{},r)||g&&[n.dependencies,n.devDependencies,n.peerDependencies,n.optionalDependencies].some((h)=>Object.hasOwn(h??{},g))))return{resolved:null,isRelative:!1};let v=s.filter(([h])=>K(h,r)).sort(([h],[b])=>{if(!h.includes("*"))return-1;if(!b.includes("*"))return 1;return b.indexOf("*")-h.indexOf("*")})[0];if(!v)return{resolved:null,isRelative:!1};let[R,y]=v,O=R.indexOf("*"),_=O===-1?"":r.slice(O,r.length-(R.length-O-1));for(let h of y){let b=S(l,h.replace("*",_)),M=d(b);if(M&&D(M,r)&&!M.private&&M.directory!==n?.directory)return{resolved:null,isRelative:!1};let P=Q(b,o);if(!P.resolved)continue;let x=E(P.resolved),q=t.outputStructure==="flat"||T(a)&&W(E(a),x);if(!n||!W(n.directory,x)||!q||d(x)?.directory!==n.directory||/\.d\.(?:ts|mts|cts)$/.test(x))throw Error(`Local alias ${JSON.stringify(r)} from ${o} resolves outside its emitted package source: ${x}`);return e.debug(`Resolved local declaration alias ${r} from ${o} to ${x}`),{resolved:t.outputStructure==="flat"?P.resolved:S(a,C(E(a),x)),isRelative:!0,isAlias:!0,suffix:b.match(/[?#].*$/)?.[0]??""}}throw Error(`Cannot resolve local alias ${JSON.stringify(r)} from ${o} using ${t.tsconfigPath||"tsconfig.json"} (${JSON.stringify(R)})`)};return f.isPackageLocal=(r,o)=>{let n=d(r);return!!n&&d(o)?.directory===n.directory&&W(n.directory,E(o))},f.cacheKey=(r)=>{let o=r.map((g)=>({file:g,references:k(N(g,"utf8"),{includeImports:!0}).map((v)=>({specifier:v.specifier,resolution:f(v.specifier,g)}))})),n=[...new Set(c.values())].filter((g)=>g!==void 0).sort((g,v)=>g.directory.localeCompare(v.directory));return JSON.stringify({root:a,compilerOptions:i,packages:n,edges:o})},f}function k(t,i={}){let s=m(t);return(i.includeImports?["export","static-import","import-type","augmentation"]:["export"]).flatMap((a)=>s.filter((c)=>c.category===a).map(({specifier:c,kind:p,isTypeOnly:d})=>({specifier:c,kind:p,isTypeOnly:d})))}function Dn(t,i){let s=[];for(let a of m(t)){let c=i(a.specifier);if(c!==a.specifier)s.push({start:a.start,end:a.end,value:w(c,t[a.start])})}let l=t;for(let a of s.reverse())l=l.slice(0,a.start)+a.value+l.slice(a.end);return l}async function U(t,i={}){let s=new Set,l=new Map,a=[],c=new Map,p=[];for(let d of t){let f=S(d);if(!s.has(f))s.add(f),p.push(f)}while(p.length>0){let d=p.shift(),f;try{f=await u(d)}catch{continue}c.set(d,f);let r=k(f,i);l.set(d,r);for(let o of r){let n=(i.resolveSpecifier??Q)(o.specifier,d);if(!n.isRelative)continue;if(n.resolved){if(!s.has(n.resolved))s.add(n.resolved),p.push(n.resolved)}else a.push({from:d,specifier:o.specifier,isTypeOnly:o.isTypeOnly})}}return{reachable:s,reExports:l,unresolved:a,sources:c}}
3
- export{Q,Ee,k,Dn,U};
@@ -1,31 +0,0 @@
1
- // @bun
2
- import{g,te,kt,u}from"./chunk-m3ysqm3b.js";import{W}from"./chunk-k5wz43yh.js";import{R,M}from"./chunk-xst4jpr9.js";import{P,D}from"./chunk-7k0e2h9b.js";import{r}from"./chunk-3pcxxgwq.js";import{Se}from"./chunk-e37cbaq7.js";import{e,A}from"./chunk-btc6zbyj.js";import{Ee,k,Dn,U}from"./chunk-pwdmw567.js";import{Sn}from"./chunk-tvhg9v4f.js";import{Ke,wt}from"./chunk-y78fsxjf.js";import{E}from"./chunk-60wrxcjt.js";import{Ce,Z,V,ve}from"./chunk-1dqa0tex.js";import{qe,G,J,Ct,vt,St,$t}from"./chunk-km03xc8j.js";import{q,he}from"./chunk-pekphr39.js";import{He,xt}from"./chunk-9fz5erbq.js";import{K}from"./chunk-3r9dptyy.js";import{Tn,Ye}from"./chunk-36xenw6z.js";import{ye}from"./chunk-4q78f5pg.js";import{Ue}from"./chunk-eyc0tk75.js";import{we}from"./chunk-01zsk2q8.js";import{l}from"./chunk-rwwrrxtc.js";import{Y,Et}from"./chunk-4n2mpvmb.js";import{mkdir as xe}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`,Q=t.lastIndexOf(`
3
- ${qe()}`),p=Q===-1?t:t.slice(0,Q),y=St(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 we;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 q(t),t.isolatedDeclarations===void 0)t.isolatedDeclarations=await J(t);let w=t.typeMappings?Y(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)),Q=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,Ye(T));for(let ee of k(T,{includeImports:!0})){let O=y(ee.specifier,S).resolved;if(O&&!O.split(/[/\\]/).includes("node_modules")&&!i.has(O))i.add(O),m.set(O,Ye(await u(O)))}}let c=[...m].sort(([S],[T])=>S.localeCompare(T));n=JSON.stringify([n,c])}if(h=new Ke(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 j=await u(c),_=vt(j,F,B(t.cwd,c));if(_)e.info(`
4
- ${_}`);else e.debug(`[no changes] ${c}`)}catch{e.info(`[new file] ${B(t.cwd,c)}`)}},T=(F)=>{if(!t.validate)return 0;let j=Ct(F,c);if(j.isValid)return e.debug(`[validation] ${c} - OK`),0;e.warn(`[validation] ${B(t.cwd,c)} has ${j.errors.length} error(s):`);for(let _ of j.errors){let ae=` Line ${_.line}:${_.column}`;if(_.code)ae+=` [${_.code}]`;if(ae+=` - ${_.message}`,e.warn(ae),_.suggestion)e.warn(` Suggestion: ${_.suggestion}`)}return j.errors.length},ee=(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 j=T(F);if(t.dryRun)ee(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:j}}}m=i??await u(n);let{content:O,declarationCount:ge,importCount:be,exportCount:$e}=await me(n,m,t,f,w,I.augmentationImports.get(n));if(t.bundle)L.set(n,O);let H=O;if(t.prettier||t.indentStyle||t.indentSize){let F=await K(H,{usePrettier:t.prettier,builtIn:{indentSize:t.indentSize||2,useTabs:t.indentStyle==="tabs",normalizeWhitespace:!0,sortImports:!0,trailingNewline:!0}},c);H=F.content;for(let j of F.warnings??[])e.warn(`[format] ${j}`)}if(t.declarationMap){let F=`${ue(c)||"output.d.ts"}.map`;H=$t(H,F)}await S(H);let De=T(H);if(t.dryRun)ee(H);else{if(t.declarationMap&&m)await le(c,n,H,m,t.cwd,v);if(await v(c,H,t.lineEnding),h&&m)h.update(n,m,H,t.cwd);e.debug(`Generated: ${c}`)}return{success:!0,file:n,declarationCount:ge,importCount:be,exportCount:$e,validationErrorCount:De}}catch(c){let S=He(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,X=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=xt(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+=X){let i=p.slice(n,n+X),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)&&Q.length>0)try{e.debug("Bundling declarations...");let n=Q.length===1&&!!t.bundleOutput;for(let i of Q){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=Sn(i,S,L,{cwd:t.cwd,keepComments:t.keepComments});for(let O of new Set(T.warnings))e.warn(`[bundle] ${O}`);let ee=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,ee)}`);else await v(ee,T.content,t.lineEnding),e.debug(`Prepared ${T.files.length} bundled files for: ${B(t.cwd,ee)}`);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 Dn(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?Y(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 Q=C.size?Tn(o,C):void 0,p=r(o,d,t.keepComments,t.isolatedDeclarations??!1,Q);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=Et(C,h,{filePath:a});if(f.normalizeOutput===!0||f.declarationOrder)C=Ue(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 X=a.exclude||[];if(Z(z,X,t)){e.debug(` Skipping excluded file: ${x}`);continue}if(!await te(z).exists()){e.debug(` Skipping deleted file: ${x}`);continue}let re=V(z,a),{content:n}=await pe(z,a);await xe(fe(re),{recursive:!0}),await G(re,n,a.lineEnding),e.info(` \u2713 ${B(a.cwd,re)}`),N++}catch(X){v++,o.errorCount++,o.lastErrorTime=Date.now();let ne=He(X,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=kt([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 X=z.slice(8);I(X)}}}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};