@dtsx/dtsx 0.0.0-stage → 0.11.38

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 (276) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +442 -2
  3. package/dist/bin/cli.d.ts +1 -0
  4. package/dist/bin/cli.js +12 -0
  5. package/dist/chunk-082w7zvy.js +4 -0
  6. package/dist/chunk-0k0fhq13.js +19 -0
  7. package/dist/chunk-0rmbc5zp.js +3 -0
  8. package/dist/chunk-0yg5mcrf.js +3 -0
  9. package/dist/chunk-0zfzhn19.js +31 -0
  10. package/dist/chunk-189nn4fc.js +3 -0
  11. package/dist/chunk-1j6092xz.js +7 -0
  12. package/dist/chunk-1qtghb2x.js +3 -0
  13. package/dist/chunk-2436cnmb.js +3 -0
  14. package/dist/chunk-2qd3axyx.js +5 -0
  15. package/dist/chunk-32qexm3w.js +3 -0
  16. package/dist/chunk-3fbt79hx.js +3 -0
  17. package/dist/chunk-3t57mzvf.js +3 -0
  18. package/dist/chunk-42j9cfte.js +3 -0
  19. package/dist/chunk-4fygcxtb.js +4 -0
  20. package/dist/chunk-50h54rax.js +177 -0
  21. package/dist/chunk-5hyv43ps.js +12 -0
  22. package/dist/chunk-6yvk3q1e.js +3 -0
  23. package/dist/chunk-73dzve1s.js +3 -0
  24. package/dist/chunk-7tremqhs.js +14 -0
  25. package/dist/chunk-83qnrx0m.js +7 -0
  26. package/dist/chunk-88gwzbew.js +4 -0
  27. package/dist/chunk-8d3sdkv4.js +24 -0
  28. package/dist/chunk-8tzd98q8.js +22 -0
  29. package/dist/chunk-96atbsd3.js +3 -0
  30. package/dist/chunk-9gts9ymh.js +3 -0
  31. package/dist/chunk-9menejdz.js +3 -0
  32. package/dist/chunk-a7nvyxpg.js +6 -0
  33. package/dist/chunk-ag1b6d30.js +3 -0
  34. package/dist/chunk-asws39qs.js +31 -0
  35. package/dist/chunk-bnry23ve.js +4 -0
  36. package/dist/chunk-bxc2herz.js +9 -0
  37. package/dist/chunk-cpmqa8kd.js +4 -0
  38. package/dist/chunk-cv29b4zb.js +7 -0
  39. package/dist/chunk-cyr45de1.js +8 -0
  40. package/dist/chunk-d0bazr3p.js +3 -0
  41. package/dist/chunk-danfamyx.js +3 -0
  42. package/dist/chunk-davy89dj.js +8 -0
  43. package/dist/chunk-e29rp5xj.js +7 -0
  44. package/dist/chunk-eba562w8.js +9 -0
  45. package/dist/chunk-ebjafajx.js +62 -0
  46. package/dist/chunk-ft2zk7jx.js +3 -0
  47. package/dist/chunk-g2120ysy.js +3 -0
  48. package/dist/chunk-ghfd34r7.js +3 -0
  49. package/dist/chunk-gspsxc9d.js +34 -0
  50. package/dist/chunk-h3n6256r.js +3 -0
  51. package/dist/chunk-hnqm1zb3.js +5 -0
  52. package/dist/chunk-htgy94y3.js +2 -0
  53. package/dist/chunk-hv8bx8xx.js +102 -0
  54. package/dist/chunk-hzn9kmq7.js +3 -0
  55. package/dist/chunk-ja7bp731.js +3 -0
  56. package/dist/chunk-jcckwgb9.js +3 -0
  57. package/dist/chunk-kfk554fj.js +3 -0
  58. package/dist/chunk-kkshxyex.js +18 -0
  59. package/dist/chunk-kpbz61yy.js +4 -0
  60. package/dist/chunk-mkakbjvs.js +3 -0
  61. package/dist/chunk-mwyjxjqa.js +3 -0
  62. package/dist/chunk-p023fhce.js +8 -0
  63. package/dist/chunk-p9vfxn8g.js +3 -0
  64. package/dist/chunk-pga5m4wm.js +3 -0
  65. package/dist/chunk-pjqzkgzk.js +6 -0
  66. package/dist/chunk-qzjzw9p2.js +3 -0
  67. package/dist/chunk-rbx6q1r0.js +18 -0
  68. package/dist/chunk-rkstz4w1.js +6 -0
  69. package/dist/chunk-rz060wxt.js +6 -0
  70. package/dist/chunk-sd8bywh9.js +21 -0
  71. package/dist/chunk-sv8h007a.js +3 -0
  72. package/dist/chunk-t4va49p3.js +10 -0
  73. package/dist/chunk-tka2m4af.js +7 -0
  74. package/dist/chunk-v6fwy63g.js +3 -0
  75. package/dist/chunk-v93389xm.js +3 -0
  76. package/dist/chunk-vf3ybe5r.js +3 -0
  77. package/dist/chunk-vkahj2ab.js +10 -0
  78. package/dist/chunk-wnqg6hem.js +27 -0
  79. package/dist/chunk-xa6rsd4b.js +29 -0
  80. package/dist/chunk-xfjfhe9d.js +3 -0
  81. package/dist/chunk-xwpn40p0.js +6 -0
  82. package/dist/chunk-y1g6v96c.js +10 -0
  83. package/dist/chunk-y5k0szq6.js +3 -0
  84. package/dist/chunk-yay68832.js +3 -0
  85. package/dist/chunk-yrv6z221.js +3 -0
  86. package/dist/chunk-yx1jy7fx.js +37 -0
  87. package/dist/chunk-zgcdx773.js +4 -0
  88. package/dist/chunk-zk3w5sqv.js +4 -0
  89. package/dist/chunk-zq93f8ca.js +5 -0
  90. package/dist/src/augmentation-graph.d.ts +11 -0
  91. package/dist/src/augmentation-graph.js +2 -0
  92. package/dist/src/binding-patterns.d.ts +18 -0
  93. package/dist/src/binding-patterns.js +2 -0
  94. package/dist/src/branded-types.d.ts +159 -0
  95. package/dist/src/branded-types.js +2 -0
  96. package/dist/src/bundle-linker.d.ts +38 -0
  97. package/dist/src/bundle-linker.js +2 -0
  98. package/dist/src/bundler.d.ts +55 -0
  99. package/dist/src/bundler.js +2 -0
  100. package/dist/src/cache.d.ts +53 -0
  101. package/dist/src/cache.js +2 -0
  102. package/dist/src/call-signatures.d.ts +1 -0
  103. package/dist/src/call-signatures.js +2 -0
  104. package/dist/src/checker.d.ts +107 -0
  105. package/dist/src/circular.d.ts +82 -0
  106. package/dist/src/circular.js +2 -0
  107. package/dist/src/compat.d.ts +114 -0
  108. package/dist/src/compat.js +2 -0
  109. package/dist/src/computed-keys.d.ts +12 -0
  110. package/dist/src/computed-keys.js +2 -0
  111. package/dist/src/concurrency.d.ts +4 -0
  112. package/dist/src/concurrency.js +2 -0
  113. package/dist/src/config.d.ts +35 -0
  114. package/dist/src/config.js +2 -0
  115. package/dist/src/dangling-refs.d.ts +11 -0
  116. package/dist/src/dangling-refs.js +2 -0
  117. package/dist/src/declaration-project.d.ts +33 -0
  118. package/dist/src/declaration-project.js +2 -0
  119. package/dist/src/declaration-publication.d.ts +15 -0
  120. package/dist/src/declaration-publication.js +2 -0
  121. package/dist/src/declaration-references.d.ts +19 -0
  122. package/dist/src/declaration-references.js +2 -0
  123. package/dist/src/diff.d.ts +82 -0
  124. package/dist/src/diff.js +2 -0
  125. package/dist/src/docs.d.ts +97 -0
  126. package/dist/src/docs.js +2 -0
  127. package/dist/src/enum-declarations.d.ts +6 -0
  128. package/dist/src/enum-declarations.js +2 -0
  129. package/dist/src/errors.d.ts +113 -0
  130. package/dist/src/errors.js +2 -0
  131. package/dist/src/extractor/directives.d.ts +5 -0
  132. package/dist/src/extractor/directives.js +2 -0
  133. package/dist/src/extractor/extract.d.ts +10 -0
  134. package/dist/src/extractor/extract.js +2 -0
  135. package/dist/src/extractor/hash.d.ts +1 -0
  136. package/dist/src/extractor/hash.js +2 -0
  137. package/dist/src/extractor/scanner.d.ts +32 -0
  138. package/dist/src/extractor/scanner.js +2 -0
  139. package/dist/src/extractor.d.ts +5 -0
  140. package/dist/src/extractor.js +2 -0
  141. package/dist/src/formats.d.ts +50 -0
  142. package/dist/src/formats.js +2 -0
  143. package/dist/src/formatter.d.ts +61 -0
  144. package/dist/src/formatter.js +2 -0
  145. package/dist/src/function-properties.d.ts +3 -0
  146. package/dist/src/function-properties.js +2 -0
  147. package/dist/src/generator.d.ts +18 -0
  148. package/dist/src/generator.js +2 -0
  149. package/dist/src/global-types.d.ts +17 -0
  150. package/dist/src/global-types.js +2 -0
  151. package/dist/src/import-sorter.d.ts +99 -0
  152. package/dist/src/import-sorter.js +2 -0
  153. package/dist/src/incremental.d.ts +103 -0
  154. package/dist/src/incremental.js +2 -0
  155. package/dist/src/index.d.ts +62 -0
  156. package/dist/src/index.js +2 -0
  157. package/dist/src/inferred-imports.d.ts +4 -0
  158. package/dist/src/inferred-imports.js +2 -0
  159. package/dist/src/json-config.d.ts +2 -0
  160. package/dist/src/json-config.js +2 -0
  161. package/dist/src/lexical.d.ts +6 -0
  162. package/dist/src/lexical.js +2 -0
  163. package/dist/src/logger.d.ts +57 -0
  164. package/dist/src/logger.js +2 -0
  165. package/dist/src/lsp.d.ts +333 -0
  166. package/dist/src/lsp.js +2 -0
  167. package/dist/src/memory.d.ts +127 -0
  168. package/dist/src/memory.js +2 -0
  169. package/dist/src/merger.d.ts +38 -0
  170. package/dist/src/merger.js +2 -0
  171. package/dist/src/module-graph.d.ts +70 -0
  172. package/dist/src/module-graph.js +2 -0
  173. package/dist/src/module-references.d.ts +30 -0
  174. package/dist/src/module-references.js +2 -0
  175. package/dist/src/native-checker.d.ts +55 -0
  176. package/dist/src/native-checker.js +2 -0
  177. package/dist/src/native-engine.d.ts +16 -0
  178. package/dist/src/native-engine.js +2 -0
  179. package/dist/src/native-extractor.d.ts +9 -0
  180. package/dist/src/native-extractor.js +2 -0
  181. package/dist/src/native-generation.d.ts +20 -0
  182. package/dist/src/native-generation.js +2 -0
  183. package/dist/src/native-project.d.ts +35 -0
  184. package/dist/src/native-project.js +2 -0
  185. package/dist/src/optimizer.d.ts +56 -0
  186. package/dist/src/optimizer.js +2 -0
  187. package/dist/src/output-normalizer.d.ts +123 -0
  188. package/dist/src/output-normalizer.js +2 -0
  189. package/dist/src/parallel-processor.d.ts +63 -0
  190. package/dist/src/parallel-processor.js +2 -0
  191. package/dist/src/parameters.d.ts +5 -0
  192. package/dist/src/parameters.js +2 -0
  193. package/dist/src/parser.d.ts +68 -0
  194. package/dist/src/parser.js +2 -0
  195. package/dist/src/plugins/bun.d.ts +58 -0
  196. package/dist/src/plugins/bun.js +2 -0
  197. package/dist/src/plugins/esbuild.d.ts +63 -0
  198. package/dist/src/plugins/esbuild.js +2 -0
  199. package/dist/src/plugins/index.d.ts +16 -0
  200. package/dist/src/plugins/index.js +2 -0
  201. package/dist/src/plugins/tsdown.d.ts +30 -0
  202. package/dist/src/plugins/tsdown.js +2 -0
  203. package/dist/src/plugins/tsup.d.ts +53 -0
  204. package/dist/src/plugins/tsup.js +2 -0
  205. package/dist/src/plugins/vite.d.ts +49 -0
  206. package/dist/src/plugins/vite.js +2 -0
  207. package/dist/src/plugins/webpack.d.ts +69 -0
  208. package/dist/src/plugins/webpack.js +2 -0
  209. package/dist/src/plugins.d.ts +88 -0
  210. package/dist/src/plugins.js +2 -0
  211. package/dist/src/process-source.d.ts +28 -0
  212. package/dist/src/process-source.js +2 -0
  213. package/dist/src/processor/cache.d.ts +18 -0
  214. package/dist/src/processor/cache.js +2 -0
  215. package/dist/src/processor/comments.d.ts +9 -0
  216. package/dist/src/processor/comments.js +2 -0
  217. package/dist/src/processor/declarations.d.ts +37 -0
  218. package/dist/src/processor/declarations.js +2 -0
  219. package/dist/src/processor/import-usage.d.ts +6 -0
  220. package/dist/src/processor/import-usage.js +2 -0
  221. package/dist/src/processor/imports.d.ts +68 -0
  222. package/dist/src/processor/imports.js +2 -0
  223. package/dist/src/processor/index.d.ts +33 -0
  224. package/dist/src/processor/index.js +2 -0
  225. package/dist/src/processor/type-inference.d.ts +116 -0
  226. package/dist/src/processor/type-inference.js +2 -0
  227. package/dist/src/processor.d.ts +5 -0
  228. package/dist/src/processor.js +2 -0
  229. package/dist/src/profiling.d.ts +114 -0
  230. package/dist/src/profiling.js +2 -0
  231. package/dist/src/return-type-scope.d.ts +3 -0
  232. package/dist/src/return-type-scope.js +2 -0
  233. package/dist/src/security.d.ts +100 -0
  234. package/dist/src/security.js +2 -0
  235. package/dist/src/source-cache.d.ts +16 -0
  236. package/dist/src/source-cache.js +2 -0
  237. package/dist/src/sourcemap.d.ts +137 -0
  238. package/dist/src/sourcemap.js +2 -0
  239. package/dist/src/stx.d.ts +20 -0
  240. package/dist/src/stx.js +2 -0
  241. package/dist/src/syntax-validator.d.ts +7 -0
  242. package/dist/src/syntax-validator.js +2 -0
  243. package/dist/src/tracking.d.ts +95 -0
  244. package/dist/src/tracking.js +2 -0
  245. package/dist/src/transformers.d.ts +188 -0
  246. package/dist/src/transformers.js +2 -0
  247. package/dist/src/tree-shaker.d.ts +69 -0
  248. package/dist/src/tree-shaker.js +2 -0
  249. package/dist/src/tsconfig.d.ts +8 -0
  250. package/dist/src/tsconfig.js +2 -0
  251. package/dist/src/type-mappings.d.ts +145 -0
  252. package/dist/src/type-mappings.js +2 -0
  253. package/dist/src/types.d.ts +230 -0
  254. package/dist/src/types.js +1 -0
  255. package/dist/src/utils.d.ts +63 -0
  256. package/dist/src/utils.js +2 -0
  257. package/dist/src/value-inference.d.ts +6 -0
  258. package/dist/src/value-inference.js +2 -0
  259. package/dist/src/vue.d.ts +108 -0
  260. package/dist/src/vue.js +2 -0
  261. package/dist/src/watcher.d.ts +64 -0
  262. package/dist/src/watcher.js +2 -0
  263. package/dist/src/worker-thread.d.ts +1 -0
  264. package/dist/src/worker-thread.js +2 -0
  265. package/dist/src/worker.d.ts +98 -0
  266. package/dist/src/worker.js +2 -0
  267. package/dist/src/workspace.d.ts +62 -0
  268. package/dist/src/workspace.js +2 -0
  269. package/native/README.md +6 -0
  270. package/native/darwin-arm64/libzig-dtsx.dylib +0 -0
  271. package/native/darwin-x64/libzig-dtsx.dylib +0 -0
  272. package/native/freebsd-x64/libzig-dtsx.so +0 -0
  273. package/native/linux-arm64/libzig-dtsx.so +0 -0
  274. package/native/linux-x64/libzig-dtsx.so +0 -0
  275. package/native/windows-x64/zig-dtsx.dll +0 -0
  276. package/package.json +120 -4
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ti,pe}from"../chunk-mkakbjvs.js";export{pe as emitWithNativeEngine,ti as nativeEngineAvailable};
@@ -0,0 +1,9 @@
1
+ import { batchParseSourceFiles, getPendingParseCount, getSourceFile, getSourceFileAsync, getSourceFileCacheSize, shouldUseAsyncParsing } from './source-cache.js';
2
+ import type { AsyncParseConfig, CachedSourceFile } from './source-cache.js';
3
+ import type { Declaration } from './types.js';
4
+ export type { AsyncParseConfig, CachedSourceFile };
5
+ export declare function clearSourceFileCache(): void;
6
+ export declare function extractDeclarations(sourceCode: string, filePath: string, keepComments?: boolean, isolatedDeclarations?: boolean, importedFunctions?: ReadonlySet<string>): Declaration[];
7
+ export declare function extractDeclarationsAsync(sourceCode: string, filePath: string, keepComments?: boolean, config?: AsyncParseConfig): Promise<Declaration[]>;
8
+ export declare function batchExtractDeclarations(files: Array<{ filePath: string, sourceCode: string, keepComments?: boolean }>, config?: AsyncParseConfig & { concurrency?: number }): Promise<Map<string, Declaration[]>>;
9
+ export { batchParseSourceFiles, getPendingParseCount, getSourceFile, getSourceFileAsync, getSourceFileCacheSize, shouldUseAsyncParsing };
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{hi,r,$n,yi}from"../chunk-jcckwgb9.js";import"../chunk-189nn4fc.js";import"../chunk-83qnrx0m.js";import"../chunk-sd8bywh9.js";import{At,Q,kn,An,Pn,Dn}from"../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{yi as batchExtractDeclarations,kn as batchParseSourceFiles,hi as clearSourceFileCache,r as extractDeclarations,$n as extractDeclarationsAsync,Pn as getPendingParseCount,At as getSourceFile,Q as getSourceFileAsync,An as getSourceFileCacheSize,Dn as shouldUseAsyncParsing};
@@ -0,0 +1,20 @@
1
+ import type { DtsGenerationConfig } from './types.js';
2
+ /**
3
+ * Plan actual source snapshots, emit one checked native batch, then publish its
4
+ * declarations through the shared transaction owner. The caller selects an
5
+ * actual zig-dtsx executable. There is no JS-emitter or legacy-binary fallback.
6
+ */
7
+ export declare function generateNativeDeclarationProject(executable: string, options?: NativeProjectOptions, execution?: NativeProjectExecution): Promise<NativeGenerationResult>;
8
+ export declare interface NativeProjectExecution {
9
+ timeoutMs?: number
10
+ signal?: AbortSignal
11
+ }
12
+ export declare interface NativeGenerationResult {
13
+ readonly filesGenerated: number
14
+ readonly outputFiles: readonly string[]
15
+ }
16
+ export type NativeProjectOptions = Partial<Pick<DtsGenerationConfig,
17
+ | 'cwd' | 'root' | 'outdir' | 'entrypoints' | 'include' | 'exclude'
18
+ | 'autoIncludeReExports' | 'outputStructure' | 'tsconfigPath'
19
+ | 'moduleSpecifierMode' | 'keepComments' | 'isolatedDeclarations' | 'clean' | 'lineEnding'
20
+ >>;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Si}from"../chunk-y5k0szq6.js";import"../chunk-kfk554fj.js";import"../chunk-7tremqhs.js";import"../chunk-danfamyx.js";import"../chunk-p023fhce.js";import"../chunk-6yvk3q1e.js";import"../chunk-96atbsd3.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{Si as generateNativeDeclarationProject};
@@ -0,0 +1,35 @@
1
+ import type { DtsGenerationConfig } from './types.js';
2
+ /**
3
+ * Snapshot actual sources and resolved references for native emission. This
4
+ * plans intended outputs only; it neither emits nor proves package delivery.
5
+ * No TypeScript declaration emitter or native binding runs during planning.
6
+ */
7
+ export declare function planNativeDeclarationProject(options?: Partial<DtsGenerationConfig>): Promise<NativeDeclarationProject>;
8
+ /** Versioned data consumed by the native emitter, without a binding dependency. */
9
+ export declare interface NativeSourceEmissionContext {
10
+ version: 1
11
+ moduleSpecifierMode: 'preserve' | 'node'
12
+ sourceFile: string
13
+ outputFile: string
14
+ sourceHash: string
15
+ inferenceSources?: Array<{ specifier: string, source: string }>
16
+ augmentationImports?: string[]
17
+ rewrites: Array<{
18
+ specifier: string
19
+ resolvedSource: string
20
+ declarationOutput: string
21
+ emittedSpecifier: string
22
+ }>
23
+ }
24
+ export declare interface NativeDeclarationFile {
25
+ readonly sourceFile: string
26
+ readonly outputFile: string
27
+ readonly source: string
28
+ readonly context: NativeSourceEmissionContext
29
+ }
30
+ export declare interface NativeDeclarationProject {
31
+ readonly version: 1
32
+ readonly rootPath: string
33
+ readonly outdirPath: string
34
+ readonly files: readonly NativeDeclarationFile[]
35
+ }
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{vn}from"../chunk-96atbsd3.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{vn as planNativeDeclarationProject};
@@ -0,0 +1,56 @@
1
+ import type { Declaration } from './types.js';
2
+ /**
3
+ * Optimize declarations
4
+ */
5
+ export declare function optimizeDeclarations(declarations: Declaration[], config?: OptimizerConfig): { declarations: Declaration[], result: OptimizationResult };
6
+ /**
7
+ * Optimize a .d.ts file
8
+ */
9
+ export declare function optimizeFile(filePath: string, config?: OptimizerConfig): Promise<OptimizationResult>;
10
+ /**
11
+ * Minify .d.ts content
12
+ */
13
+ export declare function minifyDts(content: string): string;
14
+ /**
15
+ * Optimizer configuration
16
+ */
17
+ export declare interface OptimizerConfig {
18
+ removeUnusedImports?: boolean
19
+ deduplicateDeclarations?: boolean
20
+ inlineSimpleTypes?: boolean
21
+ removeEmptyInterfaces?: boolean
22
+ mergeInterfaces?: boolean
23
+ sortDeclarations?: boolean
24
+ sortImports?: boolean
25
+ removeComments?: boolean
26
+ minify?: boolean
27
+ treeShake?: boolean
28
+ entryPoints?: string[]
29
+ }
30
+ /**
31
+ * Optimization result
32
+ */
33
+ export declare interface OptimizationResult {
34
+ originalSize: number
35
+ optimizedSize: number
36
+ savings: number
37
+ savingsPercent: number
38
+ removedImports: number
39
+ removedDeclarations: number
40
+ mergedInterfaces: number
41
+ inlinedTypes: number
42
+ }
43
+ /**
44
+ * Type usage tracker for tree shaking
45
+ */
46
+ declare class _TypeUsageTracker {
47
+ private usedTypes;
48
+ private declaredTypes;
49
+ private typeReferences;
50
+ addDeclaration(decl: Declaration): void;
51
+ addUsage(typeName: string): void;
52
+ addReference(fromType: string, toType: string): void;
53
+ getReachableTypes(): Set<string>;
54
+ isUsed(typeName: string): boolean;
55
+ }
56
+ export {};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Qn,vi,er}from"../chunk-bnry23ve.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{er as minifyDts,Qn as optimizeDeclarations,vi as optimizeFile};
@@ -0,0 +1,123 @@
1
+ import type { DeclarationKind } from './types.js';
2
+ /**
3
+ * Normalize output content
4
+ */
5
+ export declare function normalizeOutput(content: string, config?: OutputNormalizerConfig): string;
6
+ /**
7
+ * Normalize line endings
8
+ */
9
+ export declare function normalizeLineEndings(content: string, style: LineEnding): string;
10
+ /**
11
+ * Detect current line ending style
12
+ */
13
+ export declare function detectLineEnding(content: string): LineEnding;
14
+ /**
15
+ * Remove trailing whitespace from all lines
16
+ */
17
+ export declare function removeTrailingWhitespace(content: string): string;
18
+ /**
19
+ * Normalize blank lines (limit consecutive blank lines)
20
+ */
21
+ export declare function normalizeBlankLines(content: string, max: number): string;
22
+ /**
23
+ * Ensure content ends with exactly one newline
24
+ */
25
+ export declare function ensureTrailingNewline(content: string): string;
26
+ /**
27
+ * Normalize indentation
28
+ */
29
+ export declare function normalizeIndent(content: string, config: { style?: 'spaces' | 'tabs', size?: number }): string;
30
+ /**
31
+ * Process and organize imports
32
+ */
33
+ export declare function processImports(content: string, config: ImportGrouping): string;
34
+ /**
35
+ * Order declarations by kind
36
+ */
37
+ export declare function orderDeclarations(content: string, config: DeclarationOrder): string;
38
+ /**
39
+ * Preserve and format comments
40
+ */
41
+ export declare function preserveCommentFormatting(content: string): string;
42
+ /**
43
+ * Create a configured normalizer
44
+ */
45
+ export declare function createOutputNormalizer(config?: OutputNormalizerConfig): {
46
+ normalize: (content: string) => string
47
+ normalizeLineEndings: (content: string) => string
48
+ removeTrailingWhitespace: typeof removeTrailingWhitespace
49
+ normalizeBlankLines: (content: string) => string
50
+ ensureTrailingNewline: typeof ensureTrailingNewline
51
+ processImports: (content: string) => string
52
+ orderDeclarations: (content: string) => string
53
+ };
54
+ /**
55
+ * Default declaration order
56
+ */
57
+ export declare const DEFAULT_DECLARATION_ORDER: DeclarationKind[];
58
+ /**
59
+ * Default import group order
60
+ */
61
+ export declare const DEFAULT_IMPORT_GROUP_ORDER: ImportGroupType[];
62
+ /**
63
+ * Preset configurations
64
+ */
65
+ export declare const normalizerPresets: {
66
+ /** Default preset - LF, trailing newline, basic cleanup */
67
+ default: unknown;
68
+ /** Minimal preset - just line endings and trailing newline */
69
+ minimal: unknown;
70
+ /** Strict preset - all normalization enabled */
71
+ strict: unknown;
72
+ /** Windows preset - CRLF line endings */
73
+ windows: unknown;
74
+ /** Tabs preset - use tabs for indentation */
75
+ tabs: unknown
76
+ };
77
+ /**
78
+ * Declaration ordering configuration
79
+ */
80
+ export declare interface DeclarationOrder {
81
+ kinds?: DeclarationKind[]
82
+ alphabetize?: boolean
83
+ groupExports?: boolean
84
+ }
85
+ /**
86
+ * Import grouping configuration
87
+ */
88
+ export declare interface ImportGrouping {
89
+ enabled?: boolean
90
+ groups?: ImportGroupType[]
91
+ separateGroups?: boolean
92
+ alphabetize?: boolean
93
+ }
94
+ /**
95
+ * Output normalizer configuration
96
+ */
97
+ export declare interface OutputNormalizerConfig {
98
+ lineEnding?: LineEnding
99
+ trailingNewline?: boolean
100
+ maxBlankLines?: number
101
+ trimTrailingWhitespace?: boolean
102
+ normalizeIndentation?: boolean
103
+ indent?: {
104
+ style?: 'spaces' | 'tabs'
105
+ size?: number
106
+ }
107
+ declarationOrder?: DeclarationOrder
108
+ importGrouping?: ImportGrouping
109
+ preserveComments?: boolean
110
+ insertFinalNewline?: boolean
111
+ }
112
+ /**
113
+ * Line ending style
114
+ */
115
+ export type LineEnding = 'lf' | 'crlf' | 'auto';
116
+ export type ImportGroupType = | 'builtin' // node:* modules
117
+ | 'external' // npm packages
118
+ | 'scoped' // @org/* packages
119
+ | 'internal' // @/* or ~/* aliases
120
+ | 'parent' // ../* imports
121
+ | 'sibling' // ./* imports
122
+ | 'index' // . or ./index
123
+ | 'type' // import type;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{rn,zr,We,sn,eo,on,an,cn,Hr,ln,un,to,no,ro}from"../chunk-0k0fhq13.js";export{rn as DEFAULT_DECLARATION_ORDER,zr as DEFAULT_IMPORT_GROUP_ORDER,no as createOutputNormalizer,eo as detectLineEnding,cn as ensureTrailingNewline,an as normalizeBlankLines,Hr as normalizeIndent,sn as normalizeLineEndings,We as normalizeOutput,ro as normalizerPresets,un as orderDeclarations,to as preserveCommentFormatting,ln as processImports,on as removeTrailingWhitespace};
@@ -0,0 +1,63 @@
1
+ import type { DtsGenerationConfig } from './types.js';
2
+ /**
3
+ * Build dependency graph from source files
4
+ */
5
+ export declare function buildProcessingGraph(files: string[], rootDir?: string): Promise<Map<string, ProcessingNode>>;
6
+ /**
7
+ * Process files in parallel respecting dependencies
8
+ */
9
+ export declare function processInParallel(files: string[], options?: ParallelProcessorConfig): Promise<ParallelProcessingResult>;
10
+ /**
11
+ * Get topological processing order (respects dependencies)
12
+ */
13
+ export declare function getTopologicalOrder(graph: Map<string, ProcessingNode>): string[];
14
+ /**
15
+ * Find files that can be processed independently (no dependencies on other files in the set)
16
+ */
17
+ export declare function findIndependentFiles(graph: Map<string, ProcessingNode>): string[];
18
+ /**
19
+ * Get processing levels (files at same level can be processed in parallel)
20
+ */
21
+ export declare function getProcessingLevels(graph: Map<string, ProcessingNode>): string[][];
22
+ /**
23
+ * Analyze graph for parallelization potential
24
+ */
25
+ export declare function analyzeParallelizationPotential(graph: Map<string, ProcessingNode>): {
26
+ totalFiles: number
27
+ independentFiles: number
28
+ maxParallelism: number
29
+ levels: number
30
+ estimatedSpeedup: number
31
+ };
32
+ /**
33
+ * Node in the processing dependency graph
34
+ */
35
+ export declare interface ProcessingNode {
36
+ path: string
37
+ dependencies: Set<string>
38
+ dependents: Set<string>
39
+ state: 'pending' | 'processing' | 'completed' | 'failed'
40
+ result?: string
41
+ error?: Error
42
+ duration?: number
43
+ }
44
+ /**
45
+ * Configuration for parallel processing
46
+ */
47
+ export declare interface ParallelProcessorConfig {
48
+ maxConcurrency?: number
49
+ rootDir?: string
50
+ config?: Partial<DtsGenerationConfig>
51
+ onProgress?: (completed: number, total: number, current: string) => void
52
+ onError?: (path: string, error: Error) => boolean
53
+ }
54
+ /**
55
+ * Result of parallel processing
56
+ */
57
+ export declare interface ParallelProcessingResult {
58
+ success: Map<string, string>
59
+ failed: Map<string, Error>
60
+ totalTimeMs: number
61
+ maxConcurrent: number
62
+ processingOrder: string[]
63
+ }
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ur,Xi,Zi,fr,dr,Qi}from"../chunk-sv8h007a.js";import"../chunk-y1g6v96c.js";import"../chunk-zk3w5sqv.js";import"../chunk-4fygcxtb.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{Qi as analyzeParallelizationPotential,ur as buildProcessingGraph,fr as findIndependentFiles,dr as getProcessingLevels,Zi as getTopologicalOrder,Xi as processInParallel};
@@ -0,0 +1,5 @@
1
+ import { tokenizeDeclarationSyntax } from './module-references.js';
2
+ /** A default before a required argument admits undefined, but keeps its position. */
3
+ export declare function normalizeDefaultParameterOrder(parameters: string): string;
4
+ declare type Token = ReturnType<typeof tokenizeDeclarationSyntax>[number];
5
+ export {};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{De}from"../chunk-0rmbc5zp.js";import"../chunk-1j6092xz.js";import"../chunk-zq93f8ca.js";export{De as normalizeDefaultParameterOrder};
@@ -0,0 +1,68 @@
1
+ export declare function getNodeText(node: SourceRange, sourceCode: string): string;
2
+ export declare function extractLeadingCommentsFromNode(node: SourceRange): string[];
3
+ /**
4
+ * @deprecated Use TypeScript AST-based extraction instead
5
+ */
6
+ export declare function removeLeadingComments(text: string): string;
7
+ /**
8
+ * @deprecated Not used by the extractor, which reads comments while it scans.
9
+ */
10
+ export declare function extractLeadingComments(source: string, position: number): string[];
11
+ /**
12
+ * @deprecated Not commonly used - use inline logic instead
13
+ */
14
+ export declare function extractTrailingComment(line: string): string | null;
15
+ /**
16
+ * @deprecated Use findMatchingBracket from processor/type-inference instead
17
+ */
18
+ export declare function extractBalancedSymbols(text: string, openSymbol: string, closeSymbol: string): { content: string, rest: string } | null;
19
+ /**
20
+ * @deprecated Use TypeScript AST-based extraction instead
21
+ */
22
+ export declare function parseFunctionDeclaration(text: string): FunctionSignature | null;
23
+ /**
24
+ * @deprecated Not used by the extractor, which reads modifiers while it scans.
25
+ */
26
+ export declare function isExportStatement(line: string): boolean;
27
+ /**
28
+ * @deprecated Not commonly used
29
+ */
30
+ export declare function isTypeOnlyExport(line: string): boolean;
31
+ /**
32
+ * @deprecated Use TypeScript AST-based extraction instead
33
+ */
34
+ export declare function parseVariableDeclaration(text: string): {
35
+ name: string
36
+ kind: 'const' | 'let' | 'var'
37
+ typeAnnotation?: string
38
+ value?: string
39
+ } | null;
40
+ declare interface SourceRange {
41
+ pos?: number
42
+ end?: number
43
+ getText?: () => string
44
+ getFullText?: () => string
45
+ }
46
+ /**
47
+ * @deprecated Interface kept for backward compatibility
48
+ */
49
+ export declare interface FunctionSignature {
50
+ name: string
51
+ generics: string
52
+ parameters: string
53
+ returnType: string
54
+ modifiers: string[]
55
+ }
56
+ /**
57
+ * Parser utilities - DEPRECATED
58
+ *
59
+ * This module contains legacy string-based parsing utilities.
60
+ * Most functionality has been superseded by TypeScript AST-based extraction
61
+ * in the extractor module.
62
+ *
63
+ * @deprecated Use extractor module for AST-based extraction and
64
+ * processor/type-inference for type inference utilities.
65
+ */
66
+ export { formatComments } from './processor/comments.js';
67
+ // Re-export commonly used utilities from their new locations
68
+ export { findMatchingBracket } from './processor/type-inference.js';
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ls,Ns,Zt,Bs,Ws,Qt,js,_s,Gs,Vs}from"../chunk-hnqm1zb3.js";import{o}from"../chunk-8d3sdkv4.js";import{f}from"../chunk-cv29b4zb.js";import"../chunk-32qexm3w.js";import"../chunk-0rmbc5zp.js";import"../chunk-1j6092xz.js";import"../chunk-zq93f8ca.js";export{Qt as extractBalancedSymbols,Bs as extractLeadingComments,Ns as extractLeadingCommentsFromNode,Ws as extractTrailingComment,o as findMatchingBracket,f as formatComments,Ls as getNodeText,_s as isExportStatement,Gs as isTypeOnlyExport,js as parseFunctionDeclaration,Vs as parseVariableDeclaration,Zt as removeLeadingComments};
@@ -0,0 +1,58 @@
1
+ import type { DtsGenerationConfig, GenerationStats } from '../types.js';
2
+ /**
3
+ * Create a Bun build plugin for dtsx
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * // build.ts
8
+ * import { dts } from '@dtsx/dtsx/plugins/bun'
9
+ *
10
+ * await Bun.build({
11
+ * entrypoints: ['./src/index.ts'],
12
+ * outdir: './dist',
13
+ * plugins: [
14
+ * dts({
15
+ * root: './src',
16
+ * outdir: './dist',
17
+ * }),
18
+ * ],
19
+ * })
20
+ * ```
21
+ */
22
+ export declare function dts(options?: BunPluginOptions): BunPlugin;
23
+ /**
24
+ * Alias for dts
25
+ */
26
+ export declare const bunDts: typeof dts;
27
+ /**
28
+ * Bun plugin options
29
+ */
30
+ export declare interface BunPluginOptions extends Partial<DtsGenerationConfig> {
31
+ preBuild?: boolean
32
+ postBuild?: boolean
33
+ onGenerated?: (stats: GenerationStats) => void
34
+ onError?: (error: Error) => void
35
+ failOnError?: boolean
36
+ }
37
+ /**
38
+ * Bun plugin interface
39
+ */
40
+ declare interface BunPlugin {
41
+ name: string
42
+ setup: (build: BunBuild) => void | Promise<void>
43
+ }
44
+ /**
45
+ * Bun build interface (minimal type)
46
+ */
47
+ declare interface BunBuild {
48
+ config: {
49
+ entrypoints: string[]
50
+ outdir?: string
51
+ root?: string
52
+ target?: 'bun' | 'browser' | 'node'
53
+ }
54
+ }
55
+ /**
56
+ * Default export
57
+ */
58
+ export default dts;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Fe,pa,ma}from"../../chunk-ja7bp731.js";import"../../chunk-0zfzhn19.js";import"../../chunk-rbx6q1r0.js";import"../../chunk-0k0fhq13.js";import"../../chunk-hzn9kmq7.js";import"../../chunk-y1g6v96c.js";import"../../chunk-zk3w5sqv.js";import"../../chunk-vkahj2ab.js";import"../../chunk-tka2m4af.js";import"../../chunk-kfk554fj.js";import"../../chunk-mkakbjvs.js";import"../../chunk-7tremqhs.js";import"../../chunk-danfamyx.js";import"../../chunk-wnqg6hem.js";import"../../chunk-0yg5mcrf.js";import"../../chunk-p023fhce.js";import"../../chunk-6yvk3q1e.js";import"../../chunk-ghfd34r7.js";import"../../chunk-bxc2herz.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{pa as bunDts,ma as default,Fe as dts};
@@ -0,0 +1,63 @@
1
+ import type { DtsGenerationConfig, GenerationStats } from '../types.js';
2
+ /**
3
+ * Create an esbuild plugin for dtsx
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * // build.ts
8
+ * import { dtsx } from '@dtsx/dtsx/plugins/esbuild'
9
+ * import * as esbuild from 'esbuild'
10
+ *
11
+ * await esbuild.build({
12
+ * entryPoints: ['./src/index.ts'],
13
+ * outdir: './dist',
14
+ * plugins: [
15
+ * dtsx({
16
+ * root: './src',
17
+ * outdir: './dist',
18
+ * }),
19
+ * ],
20
+ * })
21
+ * ```
22
+ */
23
+ export declare function dtsx(options?: EsbuildPluginOptions): EsbuildPlugin;
24
+ /**
25
+ * Alias for dtsx
26
+ */
27
+ export declare const esbuildDts: typeof dtsx;
28
+ /**
29
+ * Alias matching common naming convention
30
+ */
31
+ export declare const dts: typeof dtsx;
32
+ /**
33
+ * esbuild plugin options
34
+ */
35
+ export declare interface EsbuildPluginOptions extends Partial<DtsGenerationConfig> {
36
+ onStart?: boolean
37
+ onEnd?: boolean
38
+ onGenerated?: (stats: GenerationStats) => void
39
+ onError?: (error: Error) => void
40
+ }
41
+ /**
42
+ * esbuild plugin interface
43
+ */
44
+ declare interface EsbuildPlugin {
45
+ name: string
46
+ setup: (build: EsbuildBuild) => void | Promise<void>
47
+ }
48
+ /**
49
+ * esbuild build interface (minimal type)
50
+ */
51
+ declare interface EsbuildBuild {
52
+ onStart: (callback: () => { errors?: Array<{ text: string }> } | Promise<{ errors?: Array<{ text: string }> } | void> | void) => void
53
+ onEnd: (callback: (result: { errors: unknown[] }) => void | Promise<void>) => void
54
+ initialOptions: {
55
+ entryPoints?: string[] | Record<string, string>
56
+ outdir?: string
57
+ outfile?: string
58
+ }
59
+ }
60
+ /**
61
+ * Default export
62
+ */
63
+ export default dtsx;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ue,wa,Zn,xa}from"../../chunk-d0bazr3p.js";import"../../chunk-0zfzhn19.js";import"../../chunk-rbx6q1r0.js";import"../../chunk-0k0fhq13.js";import"../../chunk-hzn9kmq7.js";import"../../chunk-y1g6v96c.js";import"../../chunk-zk3w5sqv.js";import"../../chunk-vkahj2ab.js";import"../../chunk-tka2m4af.js";import"../../chunk-kfk554fj.js";import"../../chunk-mkakbjvs.js";import"../../chunk-7tremqhs.js";import"../../chunk-danfamyx.js";import"../../chunk-wnqg6hem.js";import"../../chunk-0yg5mcrf.js";import"../../chunk-p023fhce.js";import"../../chunk-6yvk3q1e.js";import"../../chunk-ghfd34r7.js";import"../../chunk-bxc2herz.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{xa as default,Zn as dts,ue as dtsx,wa as esbuildDts};
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Build tool plugins for dtsx
3
+ * Re-exports all available build tool integrations
4
+ */
5
+ // Vite
6
+ export { dts as viteDts, dts as vite, type VitePluginOptions } from './vite.js';
7
+ // Bun
8
+ export { dts as bunDts, dts as bun, type BunPluginOptions } from './bun.js';
9
+ // esbuild
10
+ export { dtsx as esbuildDts, dtsx as esbuild, dts as esbuildPlugin, type EsbuildPluginOptions } from './esbuild.js';
11
+ // tsup
12
+ export { dtsxPlugin as tsupDts, dtsxPlugin as tsup, dts as tsupPlugin, type TsupPluginOptions } from './tsup.js';
13
+ // tsdown
14
+ export { dts as tsdownDts, dts as tsdown, type TsdownDtsOptions, type TsdownDeclarationPlugin } from './tsdown.js';
15
+ // webpack
16
+ export { DtsxWebpackPlugin, dtsxWebpack as webpackDts, dts as webpackPlugin, type WebpackPluginOptions } from './webpack.js';
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"../../chunk-73dzve1s.js";import"../../chunk-pga5m4wm.js";import"../../chunk-sd8bywh9.js";import"../../chunk-83qnrx0m.js";import"../../chunk-zq93f8ca.js";import"../../chunk-1j6092xz.js";import"../../chunk-v6fwy63g.js";import"../../chunk-1qtghb2x.js";import"../../chunk-42j9cfte.js";import"../../chunk-32qexm3w.js";import"../../chunk-ag1b6d30.js";import"../../chunk-xfjfhe9d.js";import"../../chunk-0rmbc5zp.js";import"../../chunk-cv29b4zb.js";import"../../chunk-8d3sdkv4.js";import"../../chunk-cyr45de1.js";import"../../chunk-xa6rsd4b.js";import"../../chunk-yx1jy7fx.js";import"../../chunk-3t57mzvf.js";import"../../chunk-vf3ybe5r.js";import"../../chunk-ft2zk7jx.js";import"../../chunk-189nn4fc.js";import"../../chunk-3fbt79hx.js";import"../../chunk-jcckwgb9.js";import"../../chunk-4fygcxtb.js";import"../../chunk-g2120ysy.js";import"../../chunk-yay68832.js";import"../../chunk-cpmqa8kd.js";import"../../chunk-qzjzw9p2.js";import"../../chunk-p9vfxn8g.js";import"../../chunk-wnqg6hem.js";import"../../chunk-tka2m4af.js";import"../../chunk-ebjafajx.js";import"../../chunk-davy89dj.js";import"../../chunk-6yvk3q1e.js";import"../../chunk-p023fhce.js";import"../../chunk-danfamyx.js";import"../../chunk-7tremqhs.js";import"../../chunk-kfk554fj.js";import"../../chunk-vkahj2ab.js";import"../../chunk-rbx6q1r0.js";import"../../chunk-ghfd34r7.js";import"../../chunk-mkakbjvs.js";import"../../chunk-0k0fhq13.js";import"../../chunk-bxc2herz.js";import"../../chunk-zk3w5sqv.js";import"../../chunk-y1g6v96c.js";import"../../chunk-0yg5mcrf.js";import"../../chunk-hzn9kmq7.js";import"../../chunk-0zfzhn19.js";import{Ie}from"../../chunk-mwyjxjqa.js";import{Fe}from"../../chunk-ja7bp731.js";import{ue,Zn}from"../../chunk-d0bazr3p.js";import{le,Yn}from"../../chunk-9menejdz.js";import{nt}from"../../chunk-yrv6z221.js";import{Le,It,Xn}from"../../chunk-v93389xm.js";export{Le as DtsxWebpackPlugin,Fe as bun,Fe as bunDts,ue as esbuild,ue as esbuildDts,Zn as esbuildPlugin,nt as tsdown,nt as tsdownDts,le as tsup,le as tsupDts,Yn as tsupPlugin,Ie as vite,Ie as viteDts,It as webpackDts,Xn as webpackPlugin};
@@ -0,0 +1,30 @@
1
+ import type { DtsGenerationConfig } from '../types.js';
2
+ /** Use in tsdown's plugins array. No TypeScript compiler or tsdown runtime import. */
3
+ export declare function dts(options?: TsdownDtsOptions): TsdownDeclarationPlugin;
4
+ declare interface ResolvedBuild {
5
+ cwd?: string
6
+ root: string
7
+ outDir?: string
8
+ format: string
9
+ }
10
+ declare interface OutputFile {
11
+ type: string
12
+ fileName: string
13
+ isEntry?: boolean
14
+ facadeModuleId?: string | null
15
+ }
16
+ /** Structural host contract keeps the core SDK independent of tsdown and Rolldown. */
17
+ export declare interface TsdownDeclarationPlugin {
18
+ name: string
19
+ tsdownConfig: () => { dts: false }
20
+ tsdownConfigResolved: (config: ResolvedBuild) => void
21
+ generateBundle: (
22
+ this: { emitFile: (asset: { type: 'asset', fileName: string, source: string }) => string },
23
+ output: { dir?: string, format?: string },
24
+ bundle: Record<string, OutputFile>,
25
+ ) => Promise<void>
26
+ }
27
+ /** Declaration generation options; tsdown owns entries, output names and cleaning. */
28
+ export type TsdownDtsOptions = Omit<Partial<DtsGenerationConfig>,
29
+ 'entrypoints' | 'outdir' | 'bundle' | 'bundleOutput' | 'clean' | 'dryRun' | 'outputStructure' | 'declarationMap'>;
30
+ export default dts;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{nt,ga}from"../../chunk-yrv6z221.js";import"../../chunk-0zfzhn19.js";import"../../chunk-rbx6q1r0.js";import"../../chunk-0k0fhq13.js";import"../../chunk-hzn9kmq7.js";import"../../chunk-y1g6v96c.js";import"../../chunk-zk3w5sqv.js";import"../../chunk-vkahj2ab.js";import"../../chunk-tka2m4af.js";import"../../chunk-kfk554fj.js";import"../../chunk-mkakbjvs.js";import"../../chunk-7tremqhs.js";import"../../chunk-danfamyx.js";import"../../chunk-wnqg6hem.js";import"../../chunk-0yg5mcrf.js";import"../../chunk-p023fhce.js";import"../../chunk-6yvk3q1e.js";import"../../chunk-ghfd34r7.js";import"../../chunk-bxc2herz.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{ga as default,nt as dts};