rolldown 0.13.2 → 0.14.0-snapshot-18ee4d3-20241107003320

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 (63) hide show
  1. package/LICENSE +1 -1
  2. package/dist/cjs/cli.cjs +390 -96
  3. package/dist/cjs/experimental-index.cjs +2 -3
  4. package/dist/cjs/index.cjs +2 -13
  5. package/dist/cjs/parallel-plugin-worker.cjs +2 -2
  6. package/dist/esm/cli.mjs +389 -95
  7. package/dist/esm/experimental-index.mjs +1 -2
  8. package/dist/esm/index.mjs +2 -14
  9. package/dist/esm/parallel-plugin-worker.mjs +1 -1
  10. package/dist/shared/{consola.36c0034f-eps_ogJv.cjs → consola.36c0034f-HcmWcfPe.cjs} +2 -2
  11. package/dist/shared/{consola.36c0034f-m5cABVv4.mjs → consola.36c0034f-Xyw7SC_7.mjs} +1 -1
  12. package/dist/shared/{prompt-Ah5G71p-.cjs → prompt-9Ij3R3TG.cjs} +2 -2
  13. package/dist/shared/{prompt-9VjtYvi_.mjs → prompt-hoPhcrA-.mjs} +1 -1
  14. package/dist/shared/rolldown-binding.wasi.cjs +82 -73
  15. package/dist/shared/src_index-5gly_SB-.cjs +2772 -0
  16. package/dist/shared/src_index-p85M6ERL.mjs +2773 -0
  17. package/dist/shared/watcher-worker.js +1 -0
  18. package/dist/types/binding.d.ts +155 -67
  19. package/dist/types/cli/arguments/alias.d.ts +1 -0
  20. package/dist/types/cli/arguments/index.d.ts +1 -1
  21. package/dist/types/cli/arguments/normalize.d.ts +3 -6
  22. package/dist/types/cli/arguments/schema.d.ts +136 -51
  23. package/dist/types/constants/plugin.d.ts +1 -1
  24. package/dist/types/constants/types.d.ts +1 -0
  25. package/dist/types/experimental-index.d.ts +1 -0
  26. package/dist/types/index.d.ts +7 -6
  27. package/dist/types/log/logger.d.ts +10 -3
  28. package/dist/types/log/logging.d.ts +6 -3
  29. package/dist/types/options/input-options.d.ts +227 -58
  30. package/dist/types/options/normalized-alias-plugin-config.d.ts +0 -2
  31. package/dist/types/options/normalized-input-options.d.ts +1 -1
  32. package/dist/types/options/normalized-output-options.d.ts +3 -12
  33. package/dist/types/options/output-options.d.ts +34 -173
  34. package/dist/types/options/watch-option.d.ts +5 -0
  35. package/dist/types/plugin/bindingify-hook-filter.d.ts +2 -0
  36. package/dist/types/plugin/bindingify-output-hooks.d.ts +1 -0
  37. package/dist/types/plugin/bindingify-watch-hooks.d.ts +7 -0
  38. package/dist/types/plugin/hook-filter.d.ts +48 -0
  39. package/dist/types/plugin/index.d.ts +9 -15
  40. package/dist/types/plugin/plugin-context-data.d.ts +3 -5
  41. package/dist/types/plugin/plugin-context.d.ts +2 -6
  42. package/dist/types/plugin/plugin-driver.d.ts +1 -0
  43. package/dist/types/rolldown-build.d.ts +3 -3
  44. package/dist/types/rolldown.d.ts +4 -1
  45. package/dist/types/types/input-options.d.ts +92 -0
  46. package/dist/types/types/output-options.d.ts +53 -0
  47. package/dist/types/types/rolldown-options.d.ts +2 -2
  48. package/dist/types/types/utils.d.ts +2 -0
  49. package/dist/types/utils/create-bundler.d.ts +5 -4
  50. package/dist/types/utils/normalize-input-options.d.ts +1 -1
  51. package/dist/types/utils/normalize-output-options.d.ts +1 -1
  52. package/dist/types/utils/normalize-plugin-option.d.ts +1 -1
  53. package/dist/types/utils/normalize-tree-shake.d.ts +1 -1
  54. package/dist/types/utils/transform-to-rollup-output.d.ts +8 -3
  55. package/dist/types/watcher.d.ts +31 -0
  56. package/package.json +19 -17
  57. package/dist/shared/package-8qJYyGdm.cjs +0 -11
  58. package/dist/shared/package-unZcnfG9.mjs +0 -9
  59. package/dist/shared/plugin-context-data-F1I9ytXp.cjs +0 -1435
  60. package/dist/shared/plugin-context-data-iKSAvmTX.mjs +0 -1442
  61. package/dist/shared/rolldown-ESzFTeqV.cjs +0 -1087
  62. package/dist/shared/rolldown-Hf7txSlh.mjs +0 -1071
  63. /package/dist/shared/{chunk-gQ4GMlVi.cjs → chunk-JoMxl5V2.cjs} +0 -0
@@ -1,8 +1,6 @@
1
- import type { RolldownPluginRec } from '../plugin';
2
1
  import { z } from 'zod';
3
- import { TreeshakingOptions } from '../treeshake';
4
- declare const inputOptionSchema: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>;
5
- declare const externalSchema: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>, z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodString>, z.ZodBoolean], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodVoid, z.ZodNull]>, z.ZodUndefined]>, z.ZodBoolean]>>]>;
2
+ import type { RolldownPluginRec } from '../plugin';
3
+ import type { TreeshakingOptions } from '../treeshake';
6
4
  export declare const inputOptionsSchema: z.ZodObject<{
7
5
  input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>;
8
6
  plugins: z.ZodOptional<z.ZodArray<z.ZodType<RolldownPluginRec, z.ZodTypeDef, RolldownPluginRec>, "many">>;
@@ -11,6 +9,7 @@ export declare const inputOptionsSchema: z.ZodObject<{
11
9
  alias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
12
10
  aliasFields: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
13
11
  conditionNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
12
+ extensionAlias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
14
13
  exportsFields: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
15
14
  extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
16
15
  mainFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -19,25 +18,27 @@ export declare const inputOptionsSchema: z.ZodObject<{
19
18
  symlinks: z.ZodOptional<z.ZodBoolean>;
20
19
  tsconfigFilename: z.ZodOptional<z.ZodString>;
21
20
  }, "strict", z.ZodTypeAny, {
21
+ modules?: string[] | undefined;
22
22
  alias?: Record<string, string> | undefined;
23
+ extensionAlias?: Record<string, string[]> | undefined;
23
24
  aliasFields?: string[][] | undefined;
24
25
  conditionNames?: string[] | undefined;
25
26
  exportsFields?: string[][] | undefined;
26
27
  extensions?: string[] | undefined;
27
28
  mainFields?: string[] | undefined;
28
29
  mainFiles?: string[] | undefined;
29
- modules?: string[] | undefined;
30
30
  symlinks?: boolean | undefined;
31
31
  tsconfigFilename?: string | undefined;
32
32
  }, {
33
+ modules?: string[] | undefined;
33
34
  alias?: Record<string, string> | undefined;
35
+ extensionAlias?: Record<string, string[]> | undefined;
34
36
  aliasFields?: string[][] | undefined;
35
37
  conditionNames?: string[] | undefined;
36
38
  exportsFields?: string[][] | undefined;
37
39
  extensions?: string[] | undefined;
38
40
  mainFields?: string[] | undefined;
39
41
  mainFiles?: string[] | undefined;
40
- modules?: string[] | undefined;
41
42
  symlinks?: boolean | undefined;
42
43
  tsconfigFilename?: string | undefined;
43
44
  }>>;
@@ -48,74 +49,186 @@ export declare const inputOptionsSchema: z.ZodObject<{
48
49
  logLevel: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>>;
49
50
  onLog: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"error">]>, z.ZodUnion<[z.ZodAny, z.ZodString]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>;
50
51
  onwarn: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodAny, z.ZodString]>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodAny, z.ZodString]>>]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>;
51
- moduleTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"js">, z.ZodLiteral<"jsx">]>, z.ZodLiteral<"ts">]>, z.ZodLiteral<"tsx">]>, z.ZodLiteral<"json">]>, z.ZodLiteral<"text">]>, z.ZodLiteral<"base64">]>, z.ZodLiteral<"dataurl">]>, z.ZodLiteral<"binary">]>, z.ZodLiteral<"empty">]>>>;
52
+ moduleTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"js">, z.ZodLiteral<"jsx">]>, z.ZodLiteral<"ts">]>, z.ZodLiteral<"tsx">]>, z.ZodLiteral<"json">]>, z.ZodLiteral<"text">]>, z.ZodLiteral<"base64">]>, z.ZodLiteral<"dataurl">]>, z.ZodLiteral<"binary">]>, z.ZodLiteral<"empty">]>, z.ZodLiteral<"css">]>>>;
52
53
  experimental: z.ZodOptional<z.ZodObject<{
53
54
  enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>;
55
+ strictExecutionOrder: z.ZodOptional<z.ZodBoolean>;
56
+ disableLiveBindings: z.ZodOptional<z.ZodBoolean>;
54
57
  }, "strict", z.ZodTypeAny, {
58
+ strictExecutionOrder?: boolean | undefined;
59
+ disableLiveBindings?: boolean | undefined;
55
60
  enableComposingJsPlugins?: boolean | undefined;
56
61
  }, {
62
+ strictExecutionOrder?: boolean | undefined;
63
+ disableLiveBindings?: boolean | undefined;
57
64
  enableComposingJsPlugins?: boolean | undefined;
58
65
  }>>;
59
66
  define: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
60
67
  inject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>>>;
68
+ profilerNames: z.ZodOptional<z.ZodBoolean>;
69
+ jsx: z.ZodOptional<z.ZodObject<{
70
+ mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"automatic">]>>;
71
+ factory: z.ZodOptional<z.ZodString>;
72
+ fragment: z.ZodOptional<z.ZodString>;
73
+ importSource: z.ZodOptional<z.ZodString>;
74
+ jsxImportSource: z.ZodOptional<z.ZodString>;
75
+ refresh: z.ZodOptional<z.ZodBoolean>;
76
+ development: z.ZodOptional<z.ZodBoolean>;
77
+ }, "strict", z.ZodTypeAny, {
78
+ development?: boolean | undefined;
79
+ refresh?: boolean | undefined;
80
+ mode?: "classic" | "automatic" | undefined;
81
+ factory?: string | undefined;
82
+ fragment?: string | undefined;
83
+ importSource?: string | undefined;
84
+ jsxImportSource?: string | undefined;
85
+ }, {
86
+ development?: boolean | undefined;
87
+ refresh?: boolean | undefined;
88
+ mode?: "classic" | "automatic" | undefined;
89
+ factory?: string | undefined;
90
+ fragment?: string | undefined;
91
+ importSource?: string | undefined;
92
+ jsxImportSource?: string | undefined;
93
+ }>>;
94
+ watch: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
95
+ skipWrite: z.ZodOptional<z.ZodBoolean>;
96
+ notify: z.ZodOptional<z.ZodObject<{
97
+ pollInterval: z.ZodOptional<z.ZodNumber>;
98
+ compareContents: z.ZodOptional<z.ZodBoolean>;
99
+ }, "strict", z.ZodTypeAny, {
100
+ pollInterval?: number | undefined;
101
+ compareContents?: boolean | undefined;
102
+ }, {
103
+ pollInterval?: number | undefined;
104
+ compareContents?: boolean | undefined;
105
+ }>>;
106
+ include: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
107
+ exclude: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
108
+ chokidar: z.ZodOptional<z.ZodAny>;
109
+ }, "strict", z.ZodTypeAny, {
110
+ include?: string | RegExp | (string | RegExp)[] | undefined;
111
+ exclude?: string | RegExp | (string | RegExp)[] | undefined;
112
+ notify?: {
113
+ pollInterval?: number | undefined;
114
+ compareContents?: boolean | undefined;
115
+ } | undefined;
116
+ skipWrite?: boolean | undefined;
117
+ chokidar?: any;
118
+ }, {
119
+ include?: string | RegExp | (string | RegExp)[] | undefined;
120
+ exclude?: string | RegExp | (string | RegExp)[] | undefined;
121
+ notify?: {
122
+ pollInterval?: number | undefined;
123
+ compareContents?: boolean | undefined;
124
+ } | undefined;
125
+ skipWrite?: boolean | undefined;
126
+ chokidar?: any;
127
+ }>, z.ZodLiteral<false>]>>;
61
128
  }, "strict", z.ZodTypeAny, {
129
+ treeshake?: boolean | TreeshakingOptions | undefined;
62
130
  input?: string | string[] | Record<string, string> | undefined;
63
131
  plugins?: RolldownPluginRec[] | undefined;
64
- external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args_3: unknown[]) => boolean | void | null | undefined) | undefined;
132
+ external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args: unknown[]) => boolean | void | null | undefined) | undefined;
65
133
  resolve?: {
134
+ modules?: string[] | undefined;
66
135
  alias?: Record<string, string> | undefined;
136
+ extensionAlias?: Record<string, string[]> | undefined;
67
137
  aliasFields?: string[][] | undefined;
68
138
  conditionNames?: string[] | undefined;
69
139
  exportsFields?: string[][] | undefined;
70
140
  extensions?: string[] | undefined;
71
141
  mainFields?: string[] | undefined;
72
142
  mainFiles?: string[] | undefined;
73
- modules?: string[] | undefined;
74
143
  symlinks?: boolean | undefined;
75
144
  tsconfigFilename?: string | undefined;
76
145
  } | undefined;
77
146
  cwd?: string | undefined;
78
147
  platform?: "node" | "browser" | "neutral" | undefined;
79
148
  shimMissingExports?: boolean | undefined;
80
- treeshake?: boolean | TreeshakingOptions | undefined;
81
149
  logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
82
- onLog?: ((args_0: "info" | "debug" | "warn", args_1: any, args_2: (args_0: "info" | "debug" | "warn" | "error", args_1: any, ...args_2: unknown[]) => unknown, ...args_3: unknown[]) => unknown) | undefined;
83
- onwarn?: ((args_0: any, args_1: (args_0: any, ...args_1: unknown[]) => unknown, ...args_2: unknown[]) => unknown) | undefined;
84
- moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | undefined;
150
+ onLog?: ((args_0: "info" | "debug" | "warn", args_1: any, args_2: (args_0: "info" | "debug" | "warn" | "error", args_1: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined;
151
+ onwarn?: ((args_0: any, args_1: (args_0: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined;
152
+ moduleTypes?: Record<string, "jsx" | "js" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
85
153
  experimental?: {
154
+ strictExecutionOrder?: boolean | undefined;
155
+ disableLiveBindings?: boolean | undefined;
86
156
  enableComposingJsPlugins?: boolean | undefined;
87
157
  } | undefined;
88
158
  define?: Record<string, string> | undefined;
89
159
  inject?: Record<string, string | [string, string]> | undefined;
160
+ profilerNames?: boolean | undefined;
161
+ jsx?: {
162
+ development?: boolean | undefined;
163
+ refresh?: boolean | undefined;
164
+ mode?: "classic" | "automatic" | undefined;
165
+ factory?: string | undefined;
166
+ fragment?: string | undefined;
167
+ importSource?: string | undefined;
168
+ jsxImportSource?: string | undefined;
169
+ } | undefined;
170
+ watch?: false | {
171
+ include?: string | RegExp | (string | RegExp)[] | undefined;
172
+ exclude?: string | RegExp | (string | RegExp)[] | undefined;
173
+ notify?: {
174
+ pollInterval?: number | undefined;
175
+ compareContents?: boolean | undefined;
176
+ } | undefined;
177
+ skipWrite?: boolean | undefined;
178
+ chokidar?: any;
179
+ } | undefined;
90
180
  }, {
181
+ treeshake?: boolean | TreeshakingOptions | undefined;
91
182
  input?: string | string[] | Record<string, string> | undefined;
92
183
  plugins?: RolldownPluginRec[] | undefined;
93
- external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args_3: unknown[]) => boolean | void | null | undefined) | undefined;
184
+ external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args: unknown[]) => boolean | void | null | undefined) | undefined;
94
185
  resolve?: {
186
+ modules?: string[] | undefined;
95
187
  alias?: Record<string, string> | undefined;
188
+ extensionAlias?: Record<string, string[]> | undefined;
96
189
  aliasFields?: string[][] | undefined;
97
190
  conditionNames?: string[] | undefined;
98
191
  exportsFields?: string[][] | undefined;
99
192
  extensions?: string[] | undefined;
100
193
  mainFields?: string[] | undefined;
101
194
  mainFiles?: string[] | undefined;
102
- modules?: string[] | undefined;
103
195
  symlinks?: boolean | undefined;
104
196
  tsconfigFilename?: string | undefined;
105
197
  } | undefined;
106
198
  cwd?: string | undefined;
107
199
  platform?: "node" | "browser" | "neutral" | undefined;
108
200
  shimMissingExports?: boolean | undefined;
109
- treeshake?: boolean | TreeshakingOptions | undefined;
110
201
  logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
111
- onLog?: ((args_0: "info" | "debug" | "warn", args_1: any, args_2: (args_0: "info" | "debug" | "warn" | "error", args_1: any, ...args_2: unknown[]) => unknown, ...args_3: unknown[]) => unknown) | undefined;
112
- onwarn?: ((args_0: any, args_1: (args_0: any, ...args_1: unknown[]) => unknown, ...args_2: unknown[]) => unknown) | undefined;
113
- moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | undefined;
202
+ onLog?: ((args_0: "info" | "debug" | "warn", args_1: any, args_2: (args_0: "info" | "debug" | "warn" | "error", args_1: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined;
203
+ onwarn?: ((args_0: any, args_1: (args_0: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined;
204
+ moduleTypes?: Record<string, "jsx" | "js" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
114
205
  experimental?: {
206
+ strictExecutionOrder?: boolean | undefined;
207
+ disableLiveBindings?: boolean | undefined;
115
208
  enableComposingJsPlugins?: boolean | undefined;
116
209
  } | undefined;
117
210
  define?: Record<string, string> | undefined;
118
211
  inject?: Record<string, string | [string, string]> | undefined;
212
+ profilerNames?: boolean | undefined;
213
+ jsx?: {
214
+ development?: boolean | undefined;
215
+ refresh?: boolean | undefined;
216
+ mode?: "classic" | "automatic" | undefined;
217
+ factory?: string | undefined;
218
+ fragment?: string | undefined;
219
+ importSource?: string | undefined;
220
+ jsxImportSource?: string | undefined;
221
+ } | undefined;
222
+ watch?: false | {
223
+ include?: string | RegExp | (string | RegExp)[] | undefined;
224
+ exclude?: string | RegExp | (string | RegExp)[] | undefined;
225
+ notify?: {
226
+ pollInterval?: number | undefined;
227
+ compareContents?: boolean | undefined;
228
+ } | undefined;
229
+ skipWrite?: boolean | undefined;
230
+ chokidar?: any;
231
+ } | undefined;
119
232
  }>;
120
233
  export declare const inputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
121
234
  input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>;
@@ -125,6 +238,7 @@ export declare const inputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extend
125
238
  alias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
126
239
  aliasFields: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
127
240
  conditionNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
241
+ extensionAlias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
128
242
  exportsFields: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
129
243
  extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
130
244
  mainFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -133,25 +247,27 @@ export declare const inputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extend
133
247
  symlinks: z.ZodOptional<z.ZodBoolean>;
134
248
  tsconfigFilename: z.ZodOptional<z.ZodString>;
135
249
  }, "strict", z.ZodTypeAny, {
250
+ modules?: string[] | undefined;
136
251
  alias?: Record<string, string> | undefined;
252
+ extensionAlias?: Record<string, string[]> | undefined;
137
253
  aliasFields?: string[][] | undefined;
138
254
  conditionNames?: string[] | undefined;
139
255
  exportsFields?: string[][] | undefined;
140
256
  extensions?: string[] | undefined;
141
257
  mainFields?: string[] | undefined;
142
258
  mainFiles?: string[] | undefined;
143
- modules?: string[] | undefined;
144
259
  symlinks?: boolean | undefined;
145
260
  tsconfigFilename?: string | undefined;
146
261
  }, {
262
+ modules?: string[] | undefined;
147
263
  alias?: Record<string, string> | undefined;
264
+ extensionAlias?: Record<string, string[]> | undefined;
148
265
  aliasFields?: string[][] | undefined;
149
266
  conditionNames?: string[] | undefined;
150
267
  exportsFields?: string[][] | undefined;
151
268
  extensions?: string[] | undefined;
152
269
  mainFields?: string[] | undefined;
153
270
  mainFiles?: string[] | undefined;
154
- modules?: string[] | undefined;
155
271
  symlinks?: boolean | undefined;
156
272
  tsconfigFilename?: string | undefined;
157
273
  }>>;
@@ -162,69 +278,122 @@ export declare const inputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extend
162
278
  logLevel: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>>;
163
279
  onLog: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"error">]>, z.ZodUnion<[z.ZodAny, z.ZodString]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>;
164
280
  onwarn: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodAny, z.ZodString]>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodAny, z.ZodString]>>]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>;
165
- moduleTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"js">, z.ZodLiteral<"jsx">]>, z.ZodLiteral<"ts">]>, z.ZodLiteral<"tsx">]>, z.ZodLiteral<"json">]>, z.ZodLiteral<"text">]>, z.ZodLiteral<"base64">]>, z.ZodLiteral<"dataurl">]>, z.ZodLiteral<"binary">]>, z.ZodLiteral<"empty">]>>>;
281
+ moduleTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"js">, z.ZodLiteral<"jsx">]>, z.ZodLiteral<"ts">]>, z.ZodLiteral<"tsx">]>, z.ZodLiteral<"json">]>, z.ZodLiteral<"text">]>, z.ZodLiteral<"base64">]>, z.ZodLiteral<"dataurl">]>, z.ZodLiteral<"binary">]>, z.ZodLiteral<"empty">]>, z.ZodLiteral<"css">]>>>;
166
282
  experimental: z.ZodOptional<z.ZodObject<{
167
283
  enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>;
284
+ strictExecutionOrder: z.ZodOptional<z.ZodBoolean>;
285
+ disableLiveBindings: z.ZodOptional<z.ZodBoolean>;
168
286
  }, "strict", z.ZodTypeAny, {
287
+ strictExecutionOrder?: boolean | undefined;
288
+ disableLiveBindings?: boolean | undefined;
169
289
  enableComposingJsPlugins?: boolean | undefined;
170
290
  }, {
291
+ strictExecutionOrder?: boolean | undefined;
292
+ disableLiveBindings?: boolean | undefined;
171
293
  enableComposingJsPlugins?: boolean | undefined;
172
294
  }>>;
173
295
  define: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
174
296
  inject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>>>;
297
+ profilerNames: z.ZodOptional<z.ZodBoolean>;
298
+ jsx: z.ZodOptional<z.ZodObject<{
299
+ mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"automatic">]>>;
300
+ factory: z.ZodOptional<z.ZodString>;
301
+ fragment: z.ZodOptional<z.ZodString>;
302
+ importSource: z.ZodOptional<z.ZodString>;
303
+ jsxImportSource: z.ZodOptional<z.ZodString>;
304
+ refresh: z.ZodOptional<z.ZodBoolean>;
305
+ development: z.ZodOptional<z.ZodBoolean>;
306
+ }, "strict", z.ZodTypeAny, {
307
+ development?: boolean | undefined;
308
+ refresh?: boolean | undefined;
309
+ mode?: "classic" | "automatic" | undefined;
310
+ factory?: string | undefined;
311
+ fragment?: string | undefined;
312
+ importSource?: string | undefined;
313
+ jsxImportSource?: string | undefined;
314
+ }, {
315
+ development?: boolean | undefined;
316
+ refresh?: boolean | undefined;
317
+ mode?: "classic" | "automatic" | undefined;
318
+ factory?: string | undefined;
319
+ fragment?: string | undefined;
320
+ importSource?: string | undefined;
321
+ jsxImportSource?: string | undefined;
322
+ }>>;
323
+ watch: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
324
+ skipWrite: z.ZodOptional<z.ZodBoolean>;
325
+ notify: z.ZodOptional<z.ZodObject<{
326
+ pollInterval: z.ZodOptional<z.ZodNumber>;
327
+ compareContents: z.ZodOptional<z.ZodBoolean>;
328
+ }, "strict", z.ZodTypeAny, {
329
+ pollInterval?: number | undefined;
330
+ compareContents?: boolean | undefined;
331
+ }, {
332
+ pollInterval?: number | undefined;
333
+ compareContents?: boolean | undefined;
334
+ }>>;
335
+ include: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
336
+ exclude: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
337
+ chokidar: z.ZodOptional<z.ZodAny>;
338
+ }, "strict", z.ZodTypeAny, {
339
+ include?: string | RegExp | (string | RegExp)[] | undefined;
340
+ exclude?: string | RegExp | (string | RegExp)[] | undefined;
341
+ notify?: {
342
+ pollInterval?: number | undefined;
343
+ compareContents?: boolean | undefined;
344
+ } | undefined;
345
+ skipWrite?: boolean | undefined;
346
+ chokidar?: any;
347
+ }, {
348
+ include?: string | RegExp | (string | RegExp)[] | undefined;
349
+ exclude?: string | RegExp | (string | RegExp)[] | undefined;
350
+ notify?: {
351
+ pollInterval?: number | undefined;
352
+ compareContents?: boolean | undefined;
353
+ } | undefined;
354
+ skipWrite?: boolean | undefined;
355
+ chokidar?: any;
356
+ }>, z.ZodLiteral<false>]>>;
175
357
  }, {
176
358
  external: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
177
359
  inject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
178
360
  treeshake: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
179
- }>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental">, "strict", z.ZodTypeAny, {
361
+ }>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames" | "watch">, "strict", z.ZodTypeAny, {
362
+ treeshake?: boolean | undefined;
180
363
  external?: string[] | undefined;
181
364
  cwd?: string | undefined;
182
365
  platform?: "node" | "browser" | "neutral" | undefined;
183
366
  shimMissingExports?: boolean | undefined;
184
- treeshake?: boolean | undefined;
185
367
  logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
186
- moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | undefined;
368
+ moduleTypes?: Record<string, "jsx" | "js" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
187
369
  define?: Record<string, string> | undefined;
188
370
  inject?: Record<string, string> | undefined;
371
+ jsx?: {
372
+ development?: boolean | undefined;
373
+ refresh?: boolean | undefined;
374
+ mode?: "classic" | "automatic" | undefined;
375
+ factory?: string | undefined;
376
+ fragment?: string | undefined;
377
+ importSource?: string | undefined;
378
+ jsxImportSource?: string | undefined;
379
+ } | undefined;
189
380
  }, {
381
+ treeshake?: boolean | undefined;
190
382
  external?: string[] | undefined;
191
383
  cwd?: string | undefined;
192
384
  platform?: "node" | "browser" | "neutral" | undefined;
193
385
  shimMissingExports?: boolean | undefined;
194
- treeshake?: boolean | undefined;
195
386
  logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
196
- moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | undefined;
387
+ moduleTypes?: Record<string, "jsx" | "js" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
197
388
  define?: Record<string, string> | undefined;
198
389
  inject?: Record<string, string> | undefined;
390
+ jsx?: {
391
+ development?: boolean | undefined;
392
+ refresh?: boolean | undefined;
393
+ mode?: "classic" | "automatic" | undefined;
394
+ factory?: string | undefined;
395
+ fragment?: string | undefined;
396
+ importSource?: string | undefined;
397
+ jsxImportSource?: string | undefined;
398
+ } | undefined;
199
399
  }>;
200
- type RawInputOptions = z.infer<typeof inputOptionsSchema>;
201
- interface OverwriteInputOptionsWithDoc {
202
- /**
203
- * Inject import statements on demand.
204
- *
205
- * ## Supported patterns
206
- * ```js
207
- * {
208
- * // import { Promise } from 'es6-promise'
209
- * Promise: ['es6-promise', 'Promise'],
210
- *
211
- * // import { Promise as P } from 'es6-promise'
212
- * P: ['es6-promise', 'Promise'],
213
- *
214
- * // import $ from 'jquery'
215
- * $: 'jquery',
216
- *
217
- * // import * as fs from 'node:fs'
218
- * fs: ['node:fs', '*'],
219
- *
220
- * // Inject shims for property access pattern
221
- * 'Object.assign': path.resolve( 'src/helpers/object-assign.js' ),
222
- * }
223
- * ```
224
- */
225
- inject?: RawInputOptions['inject'];
226
- }
227
- export type InputOption = z.infer<typeof inputOptionSchema>;
228
- export type InputOptions = Omit<RawInputOptions, keyof OverwriteInputOptionsWithDoc> & OverwriteInputOptionsWithDoc;
229
- export type ExternalOption = z.infer<typeof externalSchema>;
230
- export {};
@@ -1,4 +1,3 @@
1
- import { BindingAliasPluginConfig } from '../binding';
2
1
  type AliasPluginAlias = {
3
2
  find: string | RegExp;
4
3
  replacement: string;
@@ -6,5 +5,4 @@ type AliasPluginAlias = {
6
5
  export type AliasPluginConfig = {
7
6
  entries: AliasPluginAlias[];
8
7
  };
9
- export declare function normalizeAliasPluginConfig(config?: AliasPluginConfig): BindingAliasPluginConfig | undefined;
10
8
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { LogLevelOption, RollupLog, NormalizedInputOptions as RollupNormalizedInputOptions } from '../rollup';
2
- import type { InputOptions } from './input-options';
2
+ import type { InputOptions } from '../types/input-options';
3
3
  import type { RolldownPlugin } from '../plugin';
4
4
  import type { LogLevel } from '../log/logging';
5
5
  import { NormalizedTreeshakingOptions } from '../treeshake';
@@ -1,27 +1,18 @@
1
- import type { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../rollup';
2
- import type { OutputOptions } from './output-options';
1
+ import type { SourcemapIgnoreListOption } from '../rollup';
2
+ import type { AddonFunction, OutputOptions } from '../types/output-options';
3
3
  import type { RolldownPlugin } from '../plugin';
4
- import type { PreRenderedChunk, RenderedChunk } from '../binding';
5
- export type InternalModuleFormat = 'es' | 'cjs' | 'iife';
6
- type AddonFunction = (chunk: RenderedChunk) => string | Promise<string>;
7
- type ChunkFileNamesOption = string | ((chunk: PreRenderedChunk) => string) | undefined;
4
+ export type InternalModuleFormat = 'es' | 'cjs' | 'iife' | 'umd';
8
5
  export interface NormalizedOutputOptions extends OutputOptions {
9
6
  plugins: RolldownPlugin[];
10
- dir: string | undefined;
11
7
  format: InternalModuleFormat;
12
8
  exports: 'auto' | 'named' | 'default' | 'none';
13
9
  sourcemap: boolean | 'inline' | 'hidden';
14
10
  sourcemapIgnoreList: SourcemapIgnoreListOption;
15
- sourcemapPathTransform: SourcemapPathTransformOption | undefined;
16
11
  banner: AddonFunction;
17
12
  footer: AddonFunction;
18
13
  intro: AddonFunction;
19
14
  outro: AddonFunction;
20
15
  esModule: boolean | 'if-default-prop';
21
- entryFileNames: ChunkFileNamesOption;
22
- chunkFileNames: ChunkFileNamesOption;
23
16
  assetFileNames: string;
24
- name: string | undefined;
25
17
  inlineDynamicImports: boolean;
26
18
  }
27
- export {};