@longzai-intelligence-builder/config 0.2.8 → 0.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,2 +1,1198 @@
1
- export type { Arrayable, AttwOptions, BuildContext, BuildFormat, BuilderConfig, BuilderConfigExport, BuilderConfigFn, BuilderHooks, CIOption, ConfigLoader, ConfigOptions, CopyEntry, CopyOptions, CopyOptionsFn, DepsOptions, DevtoolsOptions, DtsOptions, EntryConfig, ExportsOptions, Logger, LoggerOptions, LogLevel, LogType, NoExternalFn, PackageJsonWithPath, PresetDefinition, PublintOptions, ReportOptions, ResolvedBuilderConfig, RolldownChunk, RolldownContext, TsdownInputOption, WithEnabled, Workspace } from './types.js';
2
- //# sourceMappingURL=index.d.ts.map
1
+ import { Options } from "@longzai-intelligence-builder/rolldown-plugin-dts";
2
+ import { Hookable } from "hookable";
3
+ import { BuildOptions, ChecksOptions, ExternalOption, InputOptions, ModuleFormat, OutputAsset, OutputChunk, OutputOptions, Plugin } from "rolldown";
4
+ //#region src/types.d.ts
5
+ /**
6
+ * 日志类型
7
+ *
8
+ * 对齐 tsdown `LogType`(`src/utils/logger.ts`)。
9
+ */
10
+ type LogType = 'error' | 'warn' | 'info';
11
+ /**
12
+ * 日志级别
13
+ *
14
+ * 对齐 tsdown `LogLevel`(`src/utils/logger.ts`)。
15
+ */
16
+ type LogLevel = LogType | 'silent';
17
+ /**
18
+ * Logger 接口
19
+ *
20
+ * 对齐 tsdown `Logger`(`src/utils/logger.ts`)。
21
+ * config 包不依赖 core,故在此独立声明结构兼容的接口;
22
+ * core 的 `createLogger` 返回值与此接口结构兼容(TS 结构类型)。
23
+ */
24
+ interface Logger {
25
+ level: LogLevel;
26
+ options?: LoggerOptions;
27
+ info: (...args: any[]) => void;
28
+ warn: (...args: any[]) => void;
29
+ warnOnce: (...args: any[]) => void;
30
+ error: (...args: any[]) => void;
31
+ success: (...args: any[]) => void;
32
+ clearScreen: (type: LogType) => void;
33
+ }
34
+ /**
35
+ * Logger 选项
36
+ *
37
+ * 对齐 tsdown `LoggerOptions`(`src/utils/logger.ts`)。
38
+ */
39
+ interface LoggerOptions {
40
+ allowClearScreen?: boolean;
41
+ customLogger?: Logger;
42
+ console?: Console;
43
+ failOnWarn?: boolean | CIOption;
44
+ }
45
+ /**
46
+ * 带 packageJsonPath 的 package.json(对齐 tsdown PackageJsonWithPath)
47
+ *
48
+ * 在 config 包声明(而非 core/utils/package.ts),避免 core→config 循环依赖。
49
+ */
50
+ type PackageJsonWithPath = {
51
+ name?: string;
52
+ type?: string;
53
+ main?: string;
54
+ module?: string;
55
+ types?: string;
56
+ typings?: string;
57
+ exports?: unknown;
58
+ bin?: string | Record<string, string>;
59
+ engines?: {
60
+ node?: string;
61
+ };
62
+ dependencies?: Record<string, string>;
63
+ peerDependencies?: Record<string, string>;
64
+ optionalDependencies?: Record<string, string>;
65
+ publishConfig?: Record<string, unknown>;
66
+ packageJsonPath: string;
67
+ [key: string]: unknown;
68
+ };
69
+ /**
70
+ * rolldown 产物 chunk(附加 outDir)
71
+ *
72
+ * 对齐 tsdown `RolldownChunk`(`src/utils/chunks.ts`)。
73
+ */
74
+ type RolldownChunk = (OutputChunk | OutputAsset) & {
75
+ outDir: string;
76
+ };
77
+ /**
78
+ * 构建上下文(对齐 tsdown BuildContext)
79
+ */
80
+ interface BuildContext {
81
+ options: BuilderConfig;
82
+ hooks: Hookable<BuilderHooks>;
83
+ }
84
+ /**
85
+ * rolldown 构建上下文(对齐 tsdown RolldownContext)
86
+ */
87
+ interface RolldownContext {
88
+ buildOptions: BuildOptions;
89
+ /**
90
+ * 是否为 cjs 的第二次独立 dts 构建(emitDtsOnly)
91
+ */
92
+ cjsDts?: boolean;
93
+ /**
94
+ * 是否为双格式构建(es + cjs)
95
+ */
96
+ isDualFormat?: boolean;
97
+ }
98
+ /**
99
+ * builder 构建生命周期 hooks(对齐 tsdown TsdownHooks)
100
+ */
101
+ interface BuilderHooks {
102
+ 'build:prepare': (ctx: BuildContext) => void | Promise<void>;
103
+ 'build:before': (ctx: BuildContext & RolldownContext) => void | Promise<void>;
104
+ 'build:done': (ctx: BuildContext & {
105
+ chunks: RolldownChunk[];
106
+ }) => void | Promise<void>;
107
+ }
108
+ /**
109
+ * Awaitable 类型(对齐 tsdown utils/types.ts)
110
+ */
111
+ type Awaitable<T> = T | Promise<T>;
112
+ /**
113
+ * @vitejs/devtools start 选项的最小类型
114
+ */
115
+ interface DevtoolsStartOptions {
116
+ host?: string;
117
+ open?: boolean;
118
+ }
119
+ /**
120
+ * Devtools 选项(对齐 tsdown DevtoolsOptions)
121
+ *
122
+ * 扩展 rolldown 的 inputOptions.devtools,新增 ui / clean 字段。
123
+ */
124
+ interface DevtoolsOptions extends NonNullable<InputOptions['devtools']> {
125
+ /**
126
+ * **[experimental]** Enable devtools integration. `@vitejs/devtools` must be installed as a
127
+ * dependency.
128
+ *
129
+ * Defaults to true, if `@vitejs/devtools` is installed.
130
+ */
131
+ ui?: boolean | Partial<DevtoolsStartOptions>;
132
+ /**
133
+ * Clean devtools stale sessions.
134
+ *
135
+ * @default true
136
+ */
137
+ clean?: boolean;
138
+ }
139
+ /**
140
+ * Workspace 配置(对齐 tsdown Workspace)
141
+ *
142
+ * monorepo 多包构建配置。
143
+ */
144
+ interface Workspace {
145
+ /**
146
+ * Workspace 目录,支持 glob 模式
147
+ *
148
+ * - `auto`:自动检测 package.json 文件
149
+ *
150
+ * @default 'auto'
151
+ */
152
+ include?: 'auto' | (string & {}) | string[];
153
+ /**
154
+ * 排除目录
155
+ *
156
+ * @default ['**\/node_modules/**', '**\/dist/**', '**\/test?(s)/**', '**\/t?(e)mp/**']
157
+ */
158
+ exclude?: Arrayable<string>;
159
+ /**
160
+ * Workspace 配置文件路径
161
+ */
162
+ config?: boolean | string;
163
+ }
164
+ /**
165
+ * copy 条目(对齐 tsdown CopyEntry)
166
+ */
167
+ interface CopyEntry {
168
+ /**
169
+ * 源路径或 glob 模式
170
+ */
171
+ from: string | string[];
172
+ /**
173
+ * 目标路径(未指定时默认为输出目录)
174
+ */
175
+ to?: string;
176
+ /**
177
+ * 是否展平(不保留目录结构)
178
+ *
179
+ * @default true
180
+ */
181
+ flatten?: boolean;
182
+ /**
183
+ * 是否输出复制项到控制台
184
+ *
185
+ * @default false
186
+ */
187
+ verbose?: boolean;
188
+ /**
189
+ * 修改目标文件或文件夹名
190
+ */
191
+ rename?: string | ((name: string, extension: string, fullPath: string) => string);
192
+ }
193
+ /**
194
+ * copy 选项(对齐 tsdown CopyOptions)
195
+ */
196
+ type CopyOptions = Arrayable<string | CopyEntry>;
197
+ /**
198
+ * copy 选项函数(对齐 tsdown CopyOptionsFn)
199
+ */
200
+ type CopyOptionsFn = (options: BuilderConfig) => Awaitable<CopyOptions>;
201
+ /**
202
+ * report 选项(对齐 tsdown ReportOptions)
203
+ */
204
+ interface ReportOptions {
205
+ /**
206
+ * 是否报告 gzip 压缩大小
207
+ *
208
+ * @default true
209
+ */
210
+ gzip?: boolean;
211
+ /**
212
+ * 是否报告 brotli 压缩大小
213
+ *
214
+ * @default false
215
+ */
216
+ brotli?: boolean;
217
+ /**
218
+ * 超过此大小的文件跳过压缩计算
219
+ *
220
+ * @default 1000000 (1 MB)
221
+ */
222
+ maxCompressSize?: number;
223
+ }
224
+ /**
225
+ * exports 选项(对齐 tsdown ExportsOptions)
226
+ *
227
+ * package.json exports 字段自动生成配置。
228
+ */
229
+ interface ExportsOptions {
230
+ /**
231
+ * 开发模式下 exports 指向源码
232
+ */
233
+ devExports?: boolean | string;
234
+ /**
235
+ * 是否生成 package.json 的 exports 字段
236
+ */
237
+ packageJson?: boolean;
238
+ /**
239
+ * 是否为所有文件生成 exports
240
+ */
241
+ all?: boolean;
242
+ /**
243
+ * 排除的文件模式
244
+ */
245
+ exclude?: (RegExp | string)[];
246
+ /**
247
+ * 是否生成 legacy 字段(main/module)
248
+ */
249
+ legacy?: boolean;
250
+ /**
251
+ * 自定义追加的 exports
252
+ */
253
+ customExports?: Record<string, unknown> | ((exports: Record<string, unknown>, context: {
254
+ pkg: Record<string, unknown>;
255
+ chunks: unknown;
256
+ isPublish: boolean;
257
+ }) => Promise<Record<string, unknown>> | Record<string, unknown>);
258
+ /**
259
+ * 是否生成 inlinedDependencies 字段
260
+ */
261
+ inlinedDependencies?: boolean;
262
+ /**
263
+ * 子路径导出键是否加 .js 扩展名
264
+ */
265
+ extensions?: boolean;
266
+ /**
267
+ * bin 字段生成(auto-detect / string / Record / boolean)
268
+ */
269
+ bin?: boolean | string | Record<string, string>;
270
+ }
271
+ /**
272
+ * publint 选项(对齐 tsdown PublintOptions)
273
+ *
274
+ * 包质量检查。需安装 publint。
275
+ */
276
+ interface PublintOptions {
277
+ /**
278
+ * 预加载的 publint 模块
279
+ */
280
+ module?: unknown;
281
+ [key: string]: unknown;
282
+ }
283
+ /**
284
+ * attw 选项(对齐 tsdown AttwOptions)
285
+ *
286
+ * 类型导出正确性检查。需安装 @arethetypeswrong/core。
287
+ */
288
+ interface AttwOptions {
289
+ /**
290
+ * 预加载的 attw 模块
291
+ */
292
+ module?: unknown;
293
+ /**
294
+ * 解析模式
295
+ */
296
+ profile?: 'strict' | 'node16' | 'esm-only';
297
+ /**
298
+ * 检查级别
299
+ */
300
+ level?: 'error' | 'warn';
301
+ /**
302
+ * 忽略的规则
303
+ */
304
+ ignoreRules?: string[];
305
+ [key: string]: unknown;
306
+ }
307
+ /**
308
+ * CI 条件选项(对齐 tsdown CIOption)
309
+ *
310
+ * - `'ci-only'`:仅在 CI 环境启用
311
+ * - `'local-only'`:仅在本地(非 CI)环境启用
312
+ */
313
+ type CIOption = 'ci-only' | 'local-only';
314
+ /**
315
+ * 带 enabled 开关的选项类型(对齐 tsdown WithEnabled)
316
+ *
317
+ * 支持以下形态:
318
+ * - `boolean`:true 用默认值,false 关闭
319
+ * - `undefined`:同 true
320
+ * - `CIOption`:按 CI 环境条件判定
321
+ * - `T & { enabled?: boolean | CIOption }`:对象配置,enabled 控制开关
322
+ */
323
+ type WithEnabled<T> = boolean | undefined | CIOption | (T & {
324
+ enabled?: boolean | CIOption;
325
+ });
326
+ /**
327
+ * 构建格式类型
328
+ */
329
+ type BuildFormat = ModuleFormat | 'es' | 'cjs';
330
+ /**
331
+ * 单值或数组
332
+ *
333
+ * 对齐 tsdown `Arrayable`(`src/utils/types.ts`)。
334
+ */
335
+ type Arrayable<T> = T | T[];
336
+ /**
337
+ * 自定义"是否打包"判定函数
338
+ *
339
+ * 对齐 tsdown `NoExternalFn`(`src/features/deps.ts:25-28`)。返回真值表示
340
+ * 该依赖命中规则(如 alwaysBundle 命中则强制打包、onlyBundle 命中则允许打包)。
341
+ */
342
+ type NoExternalFn = (id: string, importer: string | undefined) => boolean | null | undefined | void;
343
+ /**
344
+ * 入口配置类型,支持 glob 与取反模式
345
+ *
346
+ * 对齐 tsdown `TsdownInputOption`:
347
+ * - 字符串:单个入口或 glob 模式
348
+ * - 数组:多个字符串/对象,支持 `!` 取反
349
+ * - 对象:键为入口名(可含 glob),值为路径或 glob 数组
350
+ */
351
+ type TsdownInputOption = Arrayable<string | Record<string, Arrayable<string>>>;
352
+ /**
353
+ * dts 配置选项(对齐 tsdown DtsOptions extends RolldownPluginDtsOptions)
354
+ *
355
+ * 继承 rolldown-plugin-dts 的完整 Options(generator/oxc/tsgo/parallel/incremental/
356
+ * build/eager/newContext/compilerOptions/resolver/entry/emitJs/cjsDefault/emitDtsOnly 等),
357
+ * 追加 builder 专有的 enabled 与 cjsReexport。
358
+ */
359
+ type DtsOptions = Options & {
360
+ /**
361
+ * 是否生成声明文件(builder 专有,对齐 tsdown DtsOptions.enabled)
362
+ */
363
+ enabled?: boolean;
364
+ /**
365
+ * cjs 双格式时用 re-export stub 代替第二次 tsc(builder 专有,对齐 tsdown DtsOptions.cjsReexport)
366
+ *
367
+ * 双格式 ['es','cjs'] 时,cjs 的 .d.cts 生成 `export type * from './xxx.d.mts'` stub,
368
+ * 完全跳过 tsc。仅双格式生效(单格式 cjs 仍走完整 dts)。
369
+ */
370
+ cjsReexport?: boolean;
371
+ };
372
+ /**
373
+ * 依赖处理选项
374
+ */
375
+ type DepsOptions = {
376
+ /**
377
+ * 始终打包进产物的依赖
378
+ *
379
+ * 对齐 tsdown `deps.alwaysBundle`:接受单值或数组,或自定义判定函数。
380
+ */
381
+ alwaysBundle?: Arrayable<string | RegExp> | NoExternalFn;
382
+ /**
383
+ * 始终外部化的依赖
384
+ */
385
+ neverBundle?: ExternalOption;
386
+ /**
387
+ * 是否跳过 node_modules 打包(库包默认 true,应用默认 false)
388
+ */
389
+ skipNodeModulesBundle?: boolean;
390
+ /**
391
+ * 允许打包的依赖白名单
392
+ *
393
+ * 对齐 tsdown `deps.onlyBundle`:
394
+ * - `undefined`(默认):检测到内联依赖时打提示,建议配置白名单
395
+ * - 数组或单值:仅允许列出的依赖被打包,未列出的内联依赖触发构建错误;未使用的白名单项打提示
396
+ * - `false`:关闭内联依赖检测提示
397
+ */
398
+ onlyBundle?: Arrayable<string | RegExp> | false;
399
+ /**
400
+ * 仅作用于声明文件(.d.ts)生成的依赖处理覆盖
401
+ *
402
+ * 对齐 tsdown `deps.dts`:dts 产物里 `alwaysBundle` 强制打包、`neverBundle`
403
+ * 强制外部化的判定独立于 JS 产物。典型场景:应用/CLI 包 JS 全量打包但希望
404
+ * dts 保留对某依赖的外部引用(避免内联整个类型源码)。
405
+ */
406
+ dts?: {
407
+ /**
408
+ * 仅在生成 .d.ts 时强制打包的依赖(覆盖顶层的 alwaysBundle)
409
+ */
410
+ alwaysBundle?: Arrayable<string | RegExp> | NoExternalFn;
411
+ /**
412
+ * 仅在生成 .d.ts 时强制外部化的依赖(追加到顶层的 neverBundle)
413
+ */
414
+ neverBundle?: ExternalOption;
415
+ };
416
+ };
417
+ /**
418
+ * builder 构建配置,基于 rolldown 的输入输出选项扩展
419
+ */
420
+ type BuilderConfig = {
421
+ /**
422
+ * 入口配置,支持 glob 与 `!` 取反(对齐 tsdown `TsdownInputOption`)
423
+ */
424
+ entry?: TsdownInputOption;
425
+ /**
426
+ * 当前工作目录
427
+ *
428
+ * 对齐 tsdown `cwd`(@default process.cwd())。配置解析与构建的基准目录。
429
+ */
430
+ cwd?: string;
431
+ /**
432
+ * 输出格式
433
+ */
434
+ format?: BuildFormat[] | BuildFormat;
435
+ /**
436
+ * 输出目录
437
+ */
438
+ outdir?: string;
439
+ /**
440
+ * 是否生成 dts 声明文件
441
+ */
442
+ dts?: DtsOptions | boolean;
443
+ /**
444
+ * tsconfig 文件路径
445
+ */
446
+ tsconfig?: string;
447
+ /**
448
+ * 是否压缩产物
449
+ *
450
+ * 对齐 tsdown `minify`:`boolean` 开关、`'dce-only'` 仅死代码消除、或 MinifyOptions 精细配置。
451
+ * 透传至 rolldown `output.minify`。
452
+ */
453
+ minify?: OutputOptions['minify'];
454
+ /**
455
+ * 是否生成 sourcemap
456
+ */
457
+ sourcemap?: boolean | 'inline';
458
+ /**
459
+ * 构建前清理
460
+ *
461
+ * 对齐 tsdown `clean`:
462
+ * - `true`(默认):清理输出目录
463
+ * - `false`:不清理
464
+ * - `string[]`:清理指定路径列表(glob 模式)
465
+ */
466
+ clean?: boolean | string[];
467
+ /**
468
+ * 输出文件扩展名
469
+ */
470
+ outExtensions?: () => {
471
+ js?: string;
472
+ dts?: string;
473
+ };
474
+ /**
475
+ * 依赖处理选项
476
+ */
477
+ deps?: DepsOptions;
478
+ /**
479
+ * 额外的 rolldown 插件
480
+ */
481
+ plugins?: Plugin[];
482
+ /**
483
+ * 外部依赖声明
484
+ */
485
+ external?: InputOptions['external'];
486
+ /**
487
+ * 构建目标平台
488
+ *
489
+ * 决定 rolldown 如何处理 Node 内置模块(`node:fs` / `node:path` 等)与
490
+ * 第三方包内部的裸名 `require('crypto')`。
491
+ *
492
+ * esm/dual 预设默认 `'neutral'`(不假定运行时,产物可同时被 Node 与浏览器
493
+ * 消费方安全打包,详见 issue 0057)。`'node'` 会让 rolldown 为 `__exportAll`
494
+ * 等 helper 注入带 `import "node:module"` 的 runtime chunk,被 webpack 二次
495
+ * 打包时抛 `UnhandledSchemeError`(issue 0033)。
496
+ *
497
+ * **按真实运行时覆盖此默认**:
498
+ *
499
+ * - 真有 `node:*` 依赖的纯 Node 包 → 设 `platform: 'node'`(消除 `node:` 内置 模块的 `UNRESOLVED_IMPORT` 警告,见 issue
500
+ * 0004)。
501
+ * - 零 Node 依赖、被浏览器/混合运行时消费的包 → 保持默认 `'neutral'`。
502
+ *
503
+ * 透传至 rolldown 的 `inputOptions.platform`;亦可直接通过
504
+ * `inputOptions.platform` 覆盖(优先级更高)。cjs 格式强制 `'node'`,不可覆盖。
505
+ *
506
+ * @default 'neutral'(esm/dual 预设)
507
+ */
508
+ platform?: InputOptions['platform'];
509
+ /**
510
+ * 是否注入 ESM 下 `__dirname` / `__filename` 的 polyfill
511
+ *
512
+ * 对齐 tsdown `shims`(默认 false)。仅在 `format 含 es && platform === 'node'`
513
+ * 时生效:通过 rolldown 的 `transform.inject` 把源码里的 `__dirname` / `__filename`
514
+ * 替换为从 `@longzai-intelligence-builder/core/shims` 导入的导出,使其在 ESM + Node
515
+ * 下可用(CJS 全局在 ESM 运行时不存在)。
516
+ *
517
+ * @default false
518
+ */
519
+ shims?: boolean;
520
+ /**
521
+ * 控制 Node 内置模块的 `node:` 协议
522
+ *
523
+ * 对齐 tsdown `nodeProtocol`:
524
+ * - `'strip'`:移除 `node:` 前缀(`node:fs` → `fs`)
525
+ * - `true`:添加 `node:` 前缀(`fs` → `node:fs`)
526
+ * - `false`(默认):不转换
527
+ */
528
+ nodeProtocol?: 'strip' | boolean;
529
+ /**
530
+ * 构建成功后执行的回调
531
+ *
532
+ * /**
533
+ * 构建成功后执行的回调
534
+ *
535
+ * 对齐 tsdown `onSuccess`:
536
+ *
537
+ * - string:以 shell 执行(tinyexec shell:true)
538
+ * - 函数:调用 `onSuccess(config, signal)`,传入 AbortSignal(watch 模式下可中断)
539
+ */
540
+ onSuccess?: string | ((config: BuilderConfig, signal: AbortSignal) => void | Promise<void>);
541
+ /**
542
+ * CommonJS 默认导出
543
+ *
544
+ * 对齐 tsdown `cjsDefault`:cjs 格式产物使用 `module.exports =` 默认导出。
545
+ * 透传至 rolldown `output.exports: 'auto'`。
546
+ *
547
+ * @default false
548
+ */
549
+ cjsDefault?: boolean;
550
+ /**
551
+ * dual 格式(esm + cjs)下,为 cjs 的 .d.cts 生成 re-export stub
552
+ *
553
+ * 对齐 tsdown `cjsReexport`:生成 `.d.cts` 文件,内容为 `export type * from './xxx.d.mts'`,
554
+ * 避免 TS2352 类型不重叠错误。仅 esm + cjs 同时输出时生效。
555
+ *
556
+ * @default false
557
+ */
558
+ cjsReexport?: boolean;
559
+ /**
560
+ * 编译目标(语法降级)
561
+ *
562
+ * 对齐 tsdown `target`,透传至 rolldown `transform.target`。
563
+ */
564
+ target?: string | string[] | false;
565
+ /**
566
+ * 编译期常量定义
567
+ *
568
+ * 对齐 tsdown `define`,透传至 rolldown `transform.define`。
569
+ */
570
+ define?: Record<string, string>;
571
+ /**
572
+ * 模块说明符别名
573
+ *
574
+ * 对齐 tsdown `alias`,透传至 rolldown `resolve.alias`。
575
+ */
576
+ alias?: Record<string, string>;
577
+ /**
578
+ * Tree shaking 配置
579
+ *
580
+ * 对齐 tsdown `treeshake`,透传至 rolldown `treeshake`。
581
+ */
582
+ treeshake?: InputOptions['treeshake'];
583
+ /**
584
+ * 文件 loader 映射
585
+ *
586
+ * 对齐 tsdown `loader`,透传至 rolldown `moduleTypes`。
587
+ */
588
+ loader?: InputOptions['moduleTypes'];
589
+ /**
590
+ * 输出 banner(注入到每个 chunk 头部)
591
+ *
592
+ * 对齐 tsdown `banner`,透传至 rolldown `output.postBanner`。
593
+ */
594
+ banner?: OutputOptions['postBanner'];
595
+ /**
596
+ * 输出 footer(注入到每个 chunk 尾部)
597
+ *
598
+ * 对齐 tsdown `footer`,透传至 rolldown `output.postFooter`。
599
+ */
600
+ footer?: OutputOptions['postFooter'];
601
+ /**
602
+ * IIFE/UMD 全局变量名
603
+ *
604
+ * 对齐 tsdown `globalName`,透传至 rolldown `output.name`。
605
+ */
606
+ globalName?: string;
607
+ /**
608
+ * 非打包模式(输出镜像源码结构)
609
+ *
610
+ * 对齐 tsdown `unbundle`,透传至 rolldown `output.preserveModules`。
611
+ *
612
+ * @default false
613
+ */
614
+ unbundle?: boolean;
615
+ /**
616
+ * 输入文件根目录(影响输出结构)
617
+ *
618
+ * 对齐 tsdown `root`,unbundle 时透传至 rolldown `output.preserveModulesRoot`。
619
+ */
620
+ root?: string;
621
+ /**
622
+ * chunk 文件名追加 hash
623
+ *
624
+ * 对齐 tsdown `hash`。
625
+ *
626
+ * @default false
627
+ */
628
+ hash?: boolean;
629
+ /**
630
+ * 使用固定扩展名(.cjs/.mjs)
631
+ *
632
+ * 对齐 tsdown `fixedExtension`。
633
+ */
634
+ fixedExtension?: boolean;
635
+ /**
636
+ * 额外的 rolldown 输入选项(支持函数形态按 format 分流,对齐 tsdown)
637
+ */
638
+ inputOptions?: InputOptions | ((options: InputOptions, format: BuildFormat) => InputOptions | void | null | Promise<InputOptions | void | null>);
639
+ /**
640
+ * 额外的 rolldown 输出选项(支持函数形态按 format 分流,对齐 tsdown)
641
+ */
642
+ outputOptions?: OutputOptions | ((options: OutputOptions, format: BuildFormat) => OutputOptions | void | null | Promise<OutputOptions | void | null>);
643
+ /**
644
+ * 日志级别
645
+ *
646
+ * 对齐 tsdown `logLevel`(@default 'info')。透传至 `createLogger` 的 level 参数。
647
+ */
648
+ logLevel?: LogLevel;
649
+ /**
650
+ * 自定义 logger 实例
651
+ *
652
+ * 对齐 tsdown `customLogger`。提供时直接使用该实例,绕过内部 logger 实现。
653
+ */
654
+ customLogger?: Logger;
655
+ /**
656
+ * 警告视为错误(构建失败)
657
+ *
658
+ * 对齐 tsdown `failOnWarn`(@default false)。开启时 warn/warnOnce 升级为 error,
659
+ * rolldown 的 onLog warn 也会被升级为构建错误。
660
+ */
661
+ failOnWarn?: boolean | CIOption;
662
+ /**
663
+ * 抑制匹配模式的告警
664
+ *
665
+ * 对齐 tsdown `suppressWarnings`。接受 string(子串匹配)、RegExp、数组、或谓词函数。
666
+ * 被匹配的告警在 failOnWarn 之前丢弃,不会导致构建失败。
667
+ */
668
+ suppressWarnings?: Arrayable<RegExp | string> | ((msg: string) => boolean);
669
+ /**
670
+ * CLI 输出中显示的包名标签
671
+ *
672
+ * 对齐 tsdown `name`。monorepo/workspace 场景下区分不同包的构建日志。
673
+ */
674
+ name?: string;
675
+ /**
676
+ * 构建生命周期 hooks
677
+ *
678
+ * 对齐 tsdown `hooks`。支持对象式(`{ 'build:prepare': fn }`)或函数式
679
+ * (`(hooks) => { hooks.hook('build:prepare', fn) }`)。
680
+ *
681
+ * 三个生命周期事件:
682
+ * - `build:prepare`:构建开始前
683
+ * - `build:before`:每次 rolldown 构建前(dual-format 每个 format 一次)
684
+ * - `build:done`:每次构建完成后
685
+ */
686
+ hooks?: Partial<BuilderHooks> | ((hooks: Hookable<BuilderHooks>) => Awaitable<void>);
687
+ /**
688
+ * Watch 模式
689
+ *
690
+ * 对齐 tsdown `watch`。boolean 启用监听;Arrayable<string> 指定额外监听路径。
691
+ *
692
+ * @default false
693
+ */
694
+ watch?: boolean | Arrayable<string>;
695
+ /**
696
+ * Watch 模式下不监听的文件/模式
697
+ *
698
+ * 对齐 tsdown `ignoreWatch`。
699
+ */
700
+ ignoreWatch?: Arrayable<string | RegExp>;
701
+ /**
702
+ * Devtools 集成
703
+ *
704
+ * 对齐 tsdown `devtools`。false 关闭;对象配置 ui/clean 等。
705
+ *
706
+ * @default false
707
+ */
708
+ devtools?: WithEnabled<DevtoolsOptions>;
709
+ /**
710
+ * Workspace 模式
711
+ *
712
+ * 对齐 tsdown `workspace`。启用 monorepo 多包构建:
713
+ * - true:自动检测所有含 package.json 的子包
714
+ * - string / string[]:glob 匹配子包目录
715
+ * - Workspace 对象:精细配置 include/exclude/config
716
+ *
717
+ * @default false
718
+ */
719
+ workspace?: Workspace | Arrayable<string> | true;
720
+ /**
721
+ * 构建后文件复制
722
+ *
723
+ * 对齐 tsdown `copy`。把静态资源(assets、css 等)复制到输出目录。
724
+ * 支持 string(glob)、CopyEntry 对象、数组、或函数。
725
+ *
726
+ * @default false
727
+ */
728
+ copy?: CopyOptions | CopyOptionsFn;
729
+ /**
730
+ * 构建后体积报告
731
+ *
732
+ * 对齐 tsdown `report`。输出产物大小汇总(raw/gzip/brotli)。
733
+ *
734
+ * @default true
735
+ */
736
+ report?: WithEnabled<ReportOptions>;
737
+ /**
738
+ * package.json exports 自动生成
739
+ *
740
+ * 对齐 tsdown `exports`。构建后根据产物入口、格式、types 自动生成 exports 字段。
741
+ *
742
+ * @default false
743
+ */
744
+ exports?: WithEnabled<ExportsOptions>;
745
+ /**
746
+ * publint 包质量检查
747
+ *
748
+ * 对齐 tsdown `publint`。构建后运行 publint 检查。
749
+ * 需安装 publint。
750
+ *
751
+ * @default false
752
+ */
753
+ publint?: WithEnabled<PublintOptions>;
754
+ /**
755
+ * attw 类型导出正确性检查
756
+ *
757
+ * 对齐 tsdown `attw`。构建后运行 @arethetypeswrong/core 检查。
758
+ * 需安装 @arethetypeswrong/core。
759
+ *
760
+ * @default false
761
+ */
762
+ attw?: WithEnabled<AttwOptions>;
763
+ /**
764
+ * import.meta.glob 支持
765
+ *
766
+ * 对齐 tsdown `globImport`(@default true)。启用后注入 rolldown 的 importGlobPlugin,
767
+ * 支持 Vite 风格的批量文件导入。
768
+ */
769
+ globImport?: boolean;
770
+ /**
771
+ * CSS 处理选项
772
+ *
773
+ * 对齐 tsdown `css`(来自 @tsdown/css)。builder 当前未集成 CSS 插件(见 0046),
774
+ * 此字段保留最小形状(splitting),供 exports 生成时判断是否跳过 CSS 子路径导出。
775
+ */
776
+ css?: {
777
+ splitting?: boolean;
778
+ inject?: unknown;
779
+ };
780
+ /**
781
+ * 可执行文件打包(对齐 tsdown exe)
782
+ *
783
+ * 启用后使用 Node.js SEA 将产物打成单文件可执行文件。
784
+ * 需要 @longzai-intelligence-builder/exe 包。
785
+ */
786
+ exe?: WithEnabled<{
787
+ /**
788
+ * 跨平台目标列表(platform/arch/nodeVersion 组合)
789
+ */
790
+ targets?: Array<{
791
+ platform: 'win' | 'darwin' | 'linux';
792
+ arch: 'x64' | 'arm64';
793
+ nodeVersion: string;
794
+ }>;
795
+ /**
796
+ * SEA 配置
797
+ */
798
+ seaConfig?: Record<string, unknown>;
799
+ /**
800
+ * 输出文件名(不含扩展名和平台后缀)
801
+ */
802
+ fileName?: string | ((chunk: {
803
+ fileName: string;
804
+ }) => string);
805
+ /**
806
+ * 输出目录(默认 'build')
807
+ */
808
+ outDir?: string;
809
+ }>;
810
+ /**
811
+ * 配置过滤器(workspace 多包场景)
812
+ *
813
+ * 对齐 tsdown `InlineConfig.filter`。按 cwd 相对路径或 name 过滤配置,
814
+ * 不匹配的配置在 resolveConfig 中返回 null(调用方跳过)。
815
+ * string 精确匹配、RegExp 正则匹配、数组任一匹配。
816
+ */
817
+ filter?: string | RegExp | (string | RegExp)[];
818
+ /**
819
+ * 是否将产物写入磁盘
820
+ *
821
+ * 对齐 tsdown `write`(@default true)。false 时只编译不写盘(试编译),
822
+ * 与 watch 模式互斥。
823
+ */
824
+ write?: boolean;
825
+ /**
826
+ * 构建检查选项
827
+ *
828
+ * 对齐 tsdown `checks`。继承 rolldown 的 ChecksOptions(circularDependency/eval/
829
+ * missingGlobalName 等),追加 builder 专有的 legacyCjs(控制 cjs + 新版 Node 告警)。
830
+ *
831
+ * @default { legacyCjs: true }
832
+ */
833
+ checks?: ChecksOptions & {
834
+ /**
835
+ * cjs 格式 + 支持require(ESM) 的 Node 版本时是否告警
836
+ *
837
+ * @default true
838
+ */
839
+ legacyCjs?: boolean;
840
+ };
841
+ /**
842
+ * @deprecated 使用 `unbundle` 代替
843
+ *
844
+ * 对齐 tsdown deprecated `bundle`。true → unbundle=false,false → unbundle=true。
845
+ */
846
+ bundle?: boolean;
847
+ /**
848
+ * @deprecated 使用 `nodeProtocol: 'strip'` 代替
849
+ *
850
+ * 对齐 tsdown deprecated `removeNodeProtocol`。true → nodeProtocol='strip'。
851
+ * 与 nodeProtocol 同时设置时抛错。
852
+ */
853
+ removeNodeProtocol?: boolean;
854
+ /**
855
+ * @deprecated 使用 `css.inject` 代替
856
+ *
857
+ * 对齐 tsdown deprecated `injectStyle`。合并到 css.inject,与 css.inject 同时设置时抛错。
858
+ */
859
+ injectStyle?: unknown;
860
+ /**
861
+ * @deprecated 使用 `copy` 代替
862
+ *
863
+ * 对齐 tsdown deprecated `publicDir`。映射到 copy,与 copy 同时设置时抛错。
864
+ */
865
+ publicDir?: unknown;
866
+ /**
867
+ * @deprecated 使用 `outExtensions` 代替
868
+ *
869
+ * 对齐 tsdown deprecated `outExtension`。映射到 outExtensions,同时设置时抛错。
870
+ */
871
+ outExtension?: () => {
872
+ js?: string;
873
+ dts?: string;
874
+ };
875
+ /**
876
+ * 注入到产物的环境变量(process.env.* / import.meta.env.*)
877
+ *
878
+ * 对齐 tsdown `env`。优先级:env file < process.env < config.env。
879
+ */
880
+ env?: Record<string, string>;
881
+ /**
882
+ * env 文件路径(如 `.env`)
883
+ *
884
+ * 对齐 tsdown `envFile`。读取后按 envPrefix 过滤,合并到 env。
885
+ * 依赖 Node.js >= 20.12.0 的 `util.parseEnv()`。
886
+ */
887
+ envFile?: string;
888
+ /**
889
+ * env 变量名前缀过滤(默认 'LZI_BUILDER_')
890
+ *
891
+ * 对齐 tsdown `envPrefix`。只有匹配前缀的变量才注入产物。
892
+ * 含空字符串时禁用过滤(注入全部,需谨慎)。
893
+ */
894
+ envPrefix?: string | string[];
895
+ /**
896
+ * 复用 Vite/Vitest 配置文件
897
+ *
898
+ * 对齐 tsdown `fromVite`。true 时加载 vite.config.ts,string 指定文件名。
899
+ * 合并 resolve.alias 与插件到当前构建。
900
+ */
901
+ fromVite?: boolean | string;
902
+ /**
903
+ * 未使用依赖检查(对齐 tsdown unused)
904
+ *
905
+ * 启用后集成 unplugin-unused 检测 package.json 中声明但实际未使用的依赖。
906
+ * 需要安装 unplugin-unused(动态 import)。
907
+ */
908
+ unused?: WithEnabled<Record<string, unknown>>;
909
+ };
910
+ /**
911
+ * 配置选项类型,消费方传入 defineConfig 的参数
912
+ */
913
+ type ConfigOptions = Partial<BuilderConfig>;
914
+ /**
915
+ * 入口配置类型
916
+ */
917
+ type EntryConfig = string | Record<string, string>;
918
+ /**
919
+ * 预设配置定义
920
+ */
921
+ type PresetDefinition = {
922
+ /**
923
+ * 入口配置
924
+ */
925
+ entry: EntryConfig;
926
+ /**
927
+ * 外部依赖
928
+ */
929
+ external?: string[];
930
+ /**
931
+ * 额外配置
932
+ */
933
+ extraConfig?: Partial<BuilderConfig>;
934
+ };
935
+ /**
936
+ * 解析后的构建配置(对齐 tsdown ResolvedConfig 的概念)
937
+ *
938
+ * resolveConfig 把 BuilderConfig 的可选字段填充默认值后返回此类型。
939
+ * 核心字段变为 required(解析后保证有值),新增 formats(归一化后的格式数组)
940
+ * 与 dtsEnabled(dts 是否启用)。
941
+ */
942
+ type ResolvedBuilderConfig = Required<Omit<BuilderConfig, 'format' | 'dts' | 'tsconfig' | 'onSuccess' | 'name' | 'customLogger' | 'target' | 'banner' | 'footer' | 'globalName' | 'root' | 'inputOptions' | 'outputOptions' | 'define' | 'alias' | 'treeshake' | 'loader' | 'banner' | 'footer' | 'hooks' | 'ignoreWatch' | 'external' | 'platform' | 'outExtensions' | 'deps' | 'entry' | 'minify' | 'sourcemap' | 'workspace' | 'copy' | 'report' | 'exports' | 'devtools' | 'failOnWarn' | 'suppressWarnings' | 'publint' | 'attw' | 'globImport' | 'clean' | 'css' | 'filter' | 'write' | 'checks' | 'bundle' | 'removeNodeProtocol' | 'injectStyle' | 'publicDir' | 'outExtension' | 'env' | 'envFile' | 'envPrefix' | 'fromVite' | 'unused' | 'exe'>> & {
943
+ /**
944
+ * 归一化后的格式数组(默认 ['es'])
945
+ */
946
+ formats: BuildFormat[];
947
+ /**
948
+ * 当前 bundle 的格式(单值,per-format 视图)
949
+ *
950
+ * 对齐 tsdown ResolvedConfig.format。builder 单 config 多 format 场景下,
951
+ * build.ts 的 format 循环里构造 per-format 视图 { ...resolved, format }。
952
+ * 默认取 formats[0]。
953
+ */
954
+ format: BuildFormat;
955
+ /**
956
+ * package.json(带 packageJsonPath,resolveConfig 读 cwd 向上查找)
957
+ *
958
+ * 对齐 tsdown ResolvedConfig.pkg。无 package.json 时为 undefined。
959
+ * 供 writeExports/publint/attw/bundleDone 使用。
960
+ */
961
+ pkg?: PackageJsonWithPath;
962
+ /**
963
+ * 包名标签(带颜色,用于日志输出)
964
+ *
965
+ * 对齐 tsdown ResolvedConfig.nameLabel。由 generateColor(name) + getNameLabel() 生成。
966
+ */
967
+ nameLabel: string | undefined;
968
+ /**
969
+ * dts 是否启用(dts !== false && dts !== undefined && dts.enabled !== false)
970
+ */
971
+ dtsEnabled: boolean;
972
+ /**
973
+ * dts 选项(dtsEnabled 时有值)
974
+ */
975
+ dts: DtsOptions | true | undefined;
976
+ /**
977
+ * tsconfig 路径(可能为 undefined)
978
+ */
979
+ tsconfig: string | undefined;
980
+ /**
981
+ * onSuccess 回调或 shell 命令(可能为 undefined)
982
+ */
983
+ onSuccess: BuilderConfig['onSuccess'];
984
+ /**
985
+ * 包名标签(可能为 undefined)
986
+ */
987
+ name: string | undefined;
988
+ /**
989
+ * 自定义 logger(可能为 undefined)
990
+ */
991
+ customLogger: Logger | undefined;
992
+ /**
993
+ * logger 实例(customLogger 优先,否则 createLogger)
994
+ *
995
+ * 对齐 tsdown ResolvedConfig.logger。供 writeExports/publint/attw 等使用。
996
+ */
997
+ logger: Logger;
998
+ /**
999
+ * 编译目标(可能为 undefined 或 false)
1000
+ */
1001
+ /**
1002
+ * 解析后的编译目标(false/undefined 禁用,string[] 已展开 baseline)
1003
+ *
1004
+ * 对齐 tsdown ResolvedConfig.target。resolveConfig 内调 resolveTarget 解析。
1005
+ */
1006
+ target: string[] | undefined;
1007
+ /**
1008
+ * 入口配置(可能为 undefined,runBuild 用 resolveEntry 处理)
1009
+ */
1010
+ entry: BuilderConfig['entry'];
1011
+ /**
1012
+ * 外部依赖(可能为 undefined)
1013
+ */
1014
+ external: BuilderConfig['external'];
1015
+ /**
1016
+ * 构建平台(可能为 undefined)
1017
+ */
1018
+ platform: BuilderConfig['platform'];
1019
+ /**
1020
+ * 输出扩展名函数(可能为 undefined)
1021
+ */
1022
+ outExtensions: BuilderConfig['outExtensions'];
1023
+ /**
1024
+ * deps 选项(可能为 undefined)
1025
+ */
1026
+ deps: BuilderConfig['deps'];
1027
+ /**
1028
+ * hooks(可能为 undefined)
1029
+ */
1030
+ hooks: BuilderConfig['hooks'];
1031
+ /**
1032
+ * ignoreWatch(可能为 undefined)
1033
+ */
1034
+ ignoreWatch: BuilderConfig['ignoreWatch'];
1035
+ /**
1036
+ * define 常量(可能为 undefined)
1037
+ */
1038
+ define: BuilderConfig['define'];
1039
+ /**
1040
+ * 模块别名(可能为 undefined)
1041
+ */
1042
+ alias: BuilderConfig['alias'];
1043
+ /**
1044
+ * treeshake 配置(可能为 undefined)
1045
+ */
1046
+ treeshake: BuilderConfig['treeshake'];
1047
+ /**
1048
+ * loader 映射(可能为 undefined)
1049
+ */
1050
+ loader: BuilderConfig['loader'];
1051
+ /**
1052
+ * banner(可能为 undefined)
1053
+ */
1054
+ banner: BuilderConfig['banner'];
1055
+ /**
1056
+ * footer(可能为 undefined)
1057
+ */
1058
+ footer: BuilderConfig['footer'];
1059
+ /**
1060
+ * IIFE/UMD 全局变量名(可能为 undefined)
1061
+ */
1062
+ globalName: BuilderConfig['globalName'];
1063
+ /**
1064
+ * 输入根目录(可能为 undefined)
1065
+ */
1066
+ root: BuilderConfig['root'];
1067
+ /**
1068
+ * 额外输入选项(可能为 undefined)
1069
+ */
1070
+ inputOptions: BuilderConfig['inputOptions'];
1071
+ /**
1072
+ * 额外输出选项(可能为 undefined)
1073
+ */
1074
+ outputOptions: BuilderConfig['outputOptions'];
1075
+ /**
1076
+ * 产物压缩(可能为 undefined,由 rolldown 默认处理)
1077
+ */
1078
+ minify: BuilderConfig['minify'];
1079
+ /**
1080
+ * sourcemap(可能为 undefined,由 rolldown 默认处理)
1081
+ */
1082
+ sourcemap: BuilderConfig['sourcemap'];
1083
+ /**
1084
+ * workspace 配置(可能为 undefined)
1085
+ */
1086
+ workspace: BuilderConfig['workspace'];
1087
+ /**
1088
+ * copy 选项(可能为 undefined)
1089
+ */
1090
+ copy: BuilderConfig['copy'];
1091
+ /**
1092
+ * report 选项(可能为 undefined 或 false)
1093
+ */
1094
+ report: ReportOptions | false;
1095
+ /**
1096
+ * exports 选项(可能为 undefined 或 false)
1097
+ */
1098
+ exports: ExportsOptions | false;
1099
+ /**
1100
+ * 解析后的 devtools 选项(false 关闭 / DevtoolsOptions)
1101
+ */
1102
+ devtools: DevtoolsOptions | false;
1103
+ /**
1104
+ * 解析后的 failOnWarn(boolean)
1105
+ */
1106
+ failOnWarn: boolean;
1107
+ /**
1108
+ * 解析后的 publint 选项(false 关闭 / PublintOptions)
1109
+ */
1110
+ publint: PublintOptions | false;
1111
+ /**
1112
+ * 解析后的 attw 选项(false 关闭 / AttwOptions)
1113
+ */
1114
+ attw: AttwOptions | false;
1115
+ /**
1116
+ * import.meta.glob 支持(boolean)
1117
+ */
1118
+ globImport: boolean;
1119
+ /**
1120
+ * CSS 处理选项(可能为 undefined,未集成 CSS 插件时)
1121
+ */
1122
+ css: BuilderConfig['css'];
1123
+ /**
1124
+ * 解析后的 clean 路径列表(glob 模式)
1125
+ */
1126
+ clean: string[];
1127
+ /**
1128
+ * 是否写入磁盘(对齐 tsdown ResolvedConfig.write)
1129
+ */
1130
+ write: boolean;
1131
+ /**
1132
+ * 解析后的 checks 选项(含 legacyCjs,对齐 tsdown ResolvedConfig.checks)
1133
+ */
1134
+ checks: ChecksOptions & {
1135
+ legacyCjs: boolean;
1136
+ };
1137
+ /**
1138
+ * 解析后的环境变量(合并 envFile + process.env + config.env,按 envPrefix 过滤)
1139
+ */
1140
+ env: Record<string, string>;
1141
+ /**
1142
+ * env 前缀数组(归一化后)
1143
+ */
1144
+ envPrefix: string[];
1145
+ /**
1146
+ * 解析后的 unused 选项(false 关闭 / Record 选项)
1147
+ */
1148
+ unused: false | Record<string, unknown>;
1149
+ /**
1150
+ * 解析后的 exe 选项(false 关闭 / ExeOptions)
1151
+ */
1152
+ exe: false | {
1153
+ targets?: Array<{
1154
+ platform: 'win' | 'darwin' | 'linux';
1155
+ arch: 'x64' | 'arm64';
1156
+ nodeVersion: string;
1157
+ }>;
1158
+ seaConfig?: Record<string, unknown>;
1159
+ fileName?: string | ((chunk: {
1160
+ fileName: string;
1161
+ }) => string);
1162
+ outDir?: string;
1163
+ };
1164
+ };
1165
+ /**
1166
+ * 配置加载器策略(对齐 tsdown configLoader)
1167
+ *
1168
+ * - auto:自动选择(bun/native TS → native,否则 unrun)
1169
+ * - native:原生 import()(通过 import-without-cache 追踪依赖)
1170
+ * - tsx:tsx/esm/api 加载
1171
+ * - unrun:unrun 加载(返回传递性依赖)
1172
+ */
1173
+ type ConfigLoader = 'auto' | 'native' | 'tsx' | 'unrun';
1174
+ /**
1175
+ * 配置函数(对齐 tsdown UserConfigFn)
1176
+ *
1177
+ * 配置文件可导出函数,接收 inlineConfig + CI 状态 + rootConfig(workspace 场景)。
1178
+ *
1179
+ * @param inlineConfig - 内联配置(CLI flags 等)
1180
+ * @param context - CI 状态 + workspace 根配置
1181
+ * @returns 单个或数组 BuilderConfig
1182
+ */
1183
+ type BuilderConfigFn = (inlineConfig?: {
1184
+ config?: boolean | string;
1185
+ configLoader?: ConfigLoader;
1186
+ cwd?: string;
1187
+ }, context?: {
1188
+ ci: boolean;
1189
+ rootConfig?: BuilderConfig;
1190
+ }) => Awaitable<Arrayable<BuilderConfig>>;
1191
+ /**
1192
+ * 配置文件导出类型(对齐 tsdown UserConfigExport)
1193
+ *
1194
+ * 配置文件可导出:单个配置对象、数组、或配置函数。
1195
+ */
1196
+ type BuilderConfigExport = Awaitable<Arrayable<BuilderConfig> | BuilderConfigFn>;
1197
+ //#endregion
1198
+ export type { Arrayable, AttwOptions, BuildContext, BuildFormat, BuilderConfig, BuilderConfigExport, BuilderConfigFn, BuilderHooks, CIOption, ConfigLoader, ConfigOptions, CopyEntry, CopyOptions, CopyOptionsFn, DepsOptions, DevtoolsOptions, DtsOptions, EntryConfig, ExportsOptions, LogLevel, LogType, Logger, LoggerOptions, NoExternalFn, PackageJsonWithPath, PresetDefinition, PublintOptions, ReportOptions, ResolvedBuilderConfig, RolldownChunk, RolldownContext, TsdownInputOption, WithEnabled, Workspace };