rolldown 0.13.2 → 0.14.0
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/LICENSE +1 -1
- package/dist/cjs/cli.cjs +388 -95
- package/dist/cjs/experimental-index.cjs +2 -3
- package/dist/cjs/index.cjs +2 -13
- package/dist/cjs/parallel-plugin-worker.cjs +2 -2
- package/dist/esm/cli.mjs +387 -94
- package/dist/esm/experimental-index.mjs +1 -2
- package/dist/esm/index.mjs +2 -14
- package/dist/esm/parallel-plugin-worker.mjs +1 -1
- package/dist/shared/{consola.36c0034f-eps_ogJv.cjs → consola.36c0034f-HcmWcfPe.cjs} +2 -2
- package/dist/shared/{consola.36c0034f-m5cABVv4.mjs → consola.36c0034f-Xyw7SC_7.mjs} +1 -1
- package/dist/shared/{prompt-Ah5G71p-.cjs → prompt-9Ij3R3TG.cjs} +2 -2
- package/dist/shared/{prompt-9VjtYvi_.mjs → prompt-hoPhcrA-.mjs} +1 -1
- package/dist/shared/rolldown-binding.wasi.cjs +82 -73
- package/dist/shared/src_index-3pqhEViJ.cjs +2785 -0
- package/dist/shared/src_index-ywYMd4vB.mjs +2786 -0
- package/dist/shared/watcher-worker.js +1 -0
- package/dist/types/binding.d.ts +154 -66
- package/dist/types/cli/arguments/alias.d.ts +1 -0
- package/dist/types/cli/arguments/index.d.ts +1 -1
- package/dist/types/cli/arguments/normalize.d.ts +1 -0
- package/dist/types/cli/arguments/schema.d.ts +120 -35
- package/dist/types/constants/plugin.d.ts +1 -1
- package/dist/types/constants/types.d.ts +1 -0
- package/dist/types/experimental-index.d.ts +1 -0
- package/dist/types/index.d.ts +6 -5
- package/dist/types/log/logger.d.ts +9 -2
- package/dist/types/options/input-options.d.ts +241 -13
- package/dist/types/options/normalized-alias-plugin-config.d.ts +0 -2
- package/dist/types/options/normalized-output-options.d.ts +1 -1
- package/dist/types/options/output-options.d.ts +52 -54
- package/dist/types/options/watch-option.d.ts +5 -0
- package/dist/types/plugin/bindingify-hook-filter.d.ts +2 -0
- package/dist/types/plugin/bindingify-output-hooks.d.ts +1 -0
- package/dist/types/plugin/bindingify-watch-hooks.d.ts +7 -0
- package/dist/types/plugin/hook-filter.d.ts +48 -0
- package/dist/types/plugin/index.d.ts +9 -15
- package/dist/types/plugin/plugin-context-data.d.ts +1 -1
- package/dist/types/plugin/plugin-context.d.ts +2 -6
- package/dist/types/plugin/plugin-driver.d.ts +1 -0
- package/dist/types/rolldown-build.d.ts +1 -1
- package/dist/types/rolldown.d.ts +3 -0
- package/dist/types/types/utils.d.ts +1 -0
- package/dist/types/utils/create-bundler.d.ts +3 -2
- package/dist/types/utils/transform-to-rollup-output.d.ts +8 -3
- package/dist/types/watcher.d.ts +31 -0
- package/package.json +19 -17
- package/dist/shared/package-8qJYyGdm.cjs +0 -11
- package/dist/shared/package-unZcnfG9.mjs +0 -9
- package/dist/shared/plugin-context-data-F1I9ytXp.cjs +0 -1435
- package/dist/shared/plugin-context-data-iKSAvmTX.mjs +0 -1442
- package/dist/shared/rolldown-ESzFTeqV.cjs +0 -1087
- package/dist/shared/rolldown-Hf7txSlh.mjs +0 -1071
- /package/dist/shared/{chunk-gQ4GMlVi.cjs → chunk-JoMxl5V2.cjs} +0 -0
|
@@ -3,6 +3,31 @@ import { z } from 'zod';
|
|
|
3
3
|
import { TreeshakingOptions } from '../treeshake';
|
|
4
4
|
declare const inputOptionSchema: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
5
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]>>]>;
|
|
6
|
+
declare const jsxOptionsSchema: z.ZodObject<{
|
|
7
|
+
mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"automatic">]>>;
|
|
8
|
+
factory: z.ZodOptional<z.ZodString>;
|
|
9
|
+
fragment: z.ZodOptional<z.ZodString>;
|
|
10
|
+
importSource: z.ZodOptional<z.ZodString>;
|
|
11
|
+
jsxImportSource: z.ZodOptional<z.ZodString>;
|
|
12
|
+
refresh: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
+
development: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
}, "strict", z.ZodTypeAny, {
|
|
15
|
+
mode?: "classic" | "automatic" | undefined;
|
|
16
|
+
factory?: string | undefined;
|
|
17
|
+
fragment?: string | undefined;
|
|
18
|
+
importSource?: string | undefined;
|
|
19
|
+
jsxImportSource?: string | undefined;
|
|
20
|
+
refresh?: boolean | undefined;
|
|
21
|
+
development?: boolean | undefined;
|
|
22
|
+
}, {
|
|
23
|
+
mode?: "classic" | "automatic" | undefined;
|
|
24
|
+
factory?: string | undefined;
|
|
25
|
+
fragment?: string | undefined;
|
|
26
|
+
importSource?: string | undefined;
|
|
27
|
+
jsxImportSource?: string | undefined;
|
|
28
|
+
refresh?: boolean | undefined;
|
|
29
|
+
development?: boolean | undefined;
|
|
30
|
+
}>;
|
|
6
31
|
export declare const inputOptionsSchema: z.ZodObject<{
|
|
7
32
|
input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
8
33
|
plugins: z.ZodOptional<z.ZodArray<z.ZodType<RolldownPluginRec, z.ZodTypeDef, RolldownPluginRec>, "many">>;
|
|
@@ -11,6 +36,7 @@ export declare const inputOptionsSchema: z.ZodObject<{
|
|
|
11
36
|
alias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
12
37
|
aliasFields: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
|
|
13
38
|
conditionNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
39
|
+
extensionAlias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
|
|
14
40
|
exportsFields: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
|
|
15
41
|
extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
16
42
|
mainFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -22,6 +48,7 @@ export declare const inputOptionsSchema: z.ZodObject<{
|
|
|
22
48
|
alias?: Record<string, string> | undefined;
|
|
23
49
|
aliasFields?: string[][] | undefined;
|
|
24
50
|
conditionNames?: string[] | undefined;
|
|
51
|
+
extensionAlias?: Record<string, string[]> | undefined;
|
|
25
52
|
exportsFields?: string[][] | undefined;
|
|
26
53
|
extensions?: string[] | undefined;
|
|
27
54
|
mainFields?: string[] | undefined;
|
|
@@ -33,6 +60,7 @@ export declare const inputOptionsSchema: z.ZodObject<{
|
|
|
33
60
|
alias?: Record<string, string> | undefined;
|
|
34
61
|
aliasFields?: string[][] | undefined;
|
|
35
62
|
conditionNames?: string[] | undefined;
|
|
63
|
+
extensionAlias?: Record<string, string[]> | undefined;
|
|
36
64
|
exportsFields?: string[][] | undefined;
|
|
37
65
|
extensions?: string[] | undefined;
|
|
38
66
|
mainFields?: string[] | undefined;
|
|
@@ -48,24 +76,91 @@ export declare const inputOptionsSchema: z.ZodObject<{
|
|
|
48
76
|
logLevel: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>>;
|
|
49
77
|
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
78
|
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">]>>>;
|
|
79
|
+
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
80
|
experimental: z.ZodOptional<z.ZodObject<{
|
|
53
81
|
enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>;
|
|
82
|
+
strictExecutionOrder: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
+
disableLiveBindings: z.ZodOptional<z.ZodBoolean>;
|
|
54
84
|
}, "strict", z.ZodTypeAny, {
|
|
55
85
|
enableComposingJsPlugins?: boolean | undefined;
|
|
86
|
+
strictExecutionOrder?: boolean | undefined;
|
|
87
|
+
disableLiveBindings?: boolean | undefined;
|
|
56
88
|
}, {
|
|
57
89
|
enableComposingJsPlugins?: boolean | undefined;
|
|
90
|
+
strictExecutionOrder?: boolean | undefined;
|
|
91
|
+
disableLiveBindings?: boolean | undefined;
|
|
58
92
|
}>>;
|
|
59
93
|
define: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
60
94
|
inject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>>>;
|
|
95
|
+
profilerNames: z.ZodOptional<z.ZodBoolean>;
|
|
96
|
+
jsx: z.ZodOptional<z.ZodObject<{
|
|
97
|
+
mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"automatic">]>>;
|
|
98
|
+
factory: z.ZodOptional<z.ZodString>;
|
|
99
|
+
fragment: z.ZodOptional<z.ZodString>;
|
|
100
|
+
importSource: z.ZodOptional<z.ZodString>;
|
|
101
|
+
jsxImportSource: z.ZodOptional<z.ZodString>;
|
|
102
|
+
refresh: z.ZodOptional<z.ZodBoolean>;
|
|
103
|
+
development: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
}, "strict", z.ZodTypeAny, {
|
|
105
|
+
mode?: "classic" | "automatic" | undefined;
|
|
106
|
+
factory?: string | undefined;
|
|
107
|
+
fragment?: string | undefined;
|
|
108
|
+
importSource?: string | undefined;
|
|
109
|
+
jsxImportSource?: string | undefined;
|
|
110
|
+
refresh?: boolean | undefined;
|
|
111
|
+
development?: boolean | undefined;
|
|
112
|
+
}, {
|
|
113
|
+
mode?: "classic" | "automatic" | undefined;
|
|
114
|
+
factory?: string | undefined;
|
|
115
|
+
fragment?: string | undefined;
|
|
116
|
+
importSource?: string | undefined;
|
|
117
|
+
jsxImportSource?: string | undefined;
|
|
118
|
+
refresh?: boolean | undefined;
|
|
119
|
+
development?: boolean | undefined;
|
|
120
|
+
}>>;
|
|
121
|
+
watch: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
122
|
+
skipWrite: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
+
notify: z.ZodOptional<z.ZodObject<{
|
|
124
|
+
pollInterval: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
compareContents: z.ZodOptional<z.ZodBoolean>;
|
|
126
|
+
}, "strict", z.ZodTypeAny, {
|
|
127
|
+
pollInterval?: number | undefined;
|
|
128
|
+
compareContents?: boolean | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
pollInterval?: number | undefined;
|
|
131
|
+
compareContents?: boolean | undefined;
|
|
132
|
+
}>>;
|
|
133
|
+
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">]>>;
|
|
134
|
+
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">]>>;
|
|
135
|
+
chokidar: z.ZodOptional<z.ZodAny>;
|
|
136
|
+
}, "strict", z.ZodTypeAny, {
|
|
137
|
+
skipWrite?: boolean | undefined;
|
|
138
|
+
notify?: {
|
|
139
|
+
pollInterval?: number | undefined;
|
|
140
|
+
compareContents?: boolean | undefined;
|
|
141
|
+
} | undefined;
|
|
142
|
+
include?: string | RegExp | (string | RegExp)[] | undefined;
|
|
143
|
+
exclude?: string | RegExp | (string | RegExp)[] | undefined;
|
|
144
|
+
chokidar?: any;
|
|
145
|
+
}, {
|
|
146
|
+
skipWrite?: boolean | undefined;
|
|
147
|
+
notify?: {
|
|
148
|
+
pollInterval?: number | undefined;
|
|
149
|
+
compareContents?: boolean | undefined;
|
|
150
|
+
} | undefined;
|
|
151
|
+
include?: string | RegExp | (string | RegExp)[] | undefined;
|
|
152
|
+
exclude?: string | RegExp | (string | RegExp)[] | undefined;
|
|
153
|
+
chokidar?: any;
|
|
154
|
+
}>, z.ZodLiteral<false>]>>;
|
|
61
155
|
}, "strict", z.ZodTypeAny, {
|
|
62
156
|
input?: string | string[] | Record<string, string> | undefined;
|
|
63
157
|
plugins?: RolldownPluginRec[] | undefined;
|
|
64
|
-
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...
|
|
158
|
+
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args: unknown[]) => boolean | void | null | undefined) | undefined;
|
|
65
159
|
resolve?: {
|
|
66
160
|
alias?: Record<string, string> | undefined;
|
|
67
161
|
aliasFields?: string[][] | undefined;
|
|
68
162
|
conditionNames?: string[] | undefined;
|
|
163
|
+
extensionAlias?: Record<string, string[]> | undefined;
|
|
69
164
|
exportsFields?: string[][] | undefined;
|
|
70
165
|
extensions?: string[] | undefined;
|
|
71
166
|
mainFields?: string[] | undefined;
|
|
@@ -79,22 +174,45 @@ export declare const inputOptionsSchema: z.ZodObject<{
|
|
|
79
174
|
shimMissingExports?: boolean | undefined;
|
|
80
175
|
treeshake?: boolean | TreeshakingOptions | undefined;
|
|
81
176
|
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, ...
|
|
83
|
-
onwarn?: ((args_0: any, args_1: (args_0: any, ...
|
|
84
|
-
|
|
177
|
+
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;
|
|
178
|
+
onwarn?: ((args_0: any, args_1: (args_0: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined;
|
|
179
|
+
jsx?: {
|
|
180
|
+
mode?: "classic" | "automatic" | undefined;
|
|
181
|
+
factory?: string | undefined;
|
|
182
|
+
fragment?: string | undefined;
|
|
183
|
+
importSource?: string | undefined;
|
|
184
|
+
jsxImportSource?: string | undefined;
|
|
185
|
+
refresh?: boolean | undefined;
|
|
186
|
+
development?: boolean | undefined;
|
|
187
|
+
} | undefined;
|
|
188
|
+
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
|
|
85
189
|
experimental?: {
|
|
86
190
|
enableComposingJsPlugins?: boolean | undefined;
|
|
191
|
+
strictExecutionOrder?: boolean | undefined;
|
|
192
|
+
disableLiveBindings?: boolean | undefined;
|
|
87
193
|
} | undefined;
|
|
88
194
|
define?: Record<string, string> | undefined;
|
|
89
195
|
inject?: Record<string, string | [string, string]> | undefined;
|
|
196
|
+
profilerNames?: boolean | undefined;
|
|
197
|
+
watch?: false | {
|
|
198
|
+
skipWrite?: boolean | undefined;
|
|
199
|
+
notify?: {
|
|
200
|
+
pollInterval?: number | undefined;
|
|
201
|
+
compareContents?: boolean | undefined;
|
|
202
|
+
} | undefined;
|
|
203
|
+
include?: string | RegExp | (string | RegExp)[] | undefined;
|
|
204
|
+
exclude?: string | RegExp | (string | RegExp)[] | undefined;
|
|
205
|
+
chokidar?: any;
|
|
206
|
+
} | undefined;
|
|
90
207
|
}, {
|
|
91
208
|
input?: string | string[] | Record<string, string> | undefined;
|
|
92
209
|
plugins?: RolldownPluginRec[] | undefined;
|
|
93
|
-
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...
|
|
210
|
+
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args: unknown[]) => boolean | void | null | undefined) | undefined;
|
|
94
211
|
resolve?: {
|
|
95
212
|
alias?: Record<string, string> | undefined;
|
|
96
213
|
aliasFields?: string[][] | undefined;
|
|
97
214
|
conditionNames?: string[] | undefined;
|
|
215
|
+
extensionAlias?: Record<string, string[]> | undefined;
|
|
98
216
|
exportsFields?: string[][] | undefined;
|
|
99
217
|
extensions?: string[] | undefined;
|
|
100
218
|
mainFields?: string[] | undefined;
|
|
@@ -108,14 +226,36 @@ export declare const inputOptionsSchema: z.ZodObject<{
|
|
|
108
226
|
shimMissingExports?: boolean | undefined;
|
|
109
227
|
treeshake?: boolean | TreeshakingOptions | undefined;
|
|
110
228
|
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, ...
|
|
112
|
-
onwarn?: ((args_0: any, args_1: (args_0: any, ...
|
|
113
|
-
|
|
229
|
+
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;
|
|
230
|
+
onwarn?: ((args_0: any, args_1: (args_0: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined;
|
|
231
|
+
jsx?: {
|
|
232
|
+
mode?: "classic" | "automatic" | undefined;
|
|
233
|
+
factory?: string | undefined;
|
|
234
|
+
fragment?: string | undefined;
|
|
235
|
+
importSource?: string | undefined;
|
|
236
|
+
jsxImportSource?: string | undefined;
|
|
237
|
+
refresh?: boolean | undefined;
|
|
238
|
+
development?: boolean | undefined;
|
|
239
|
+
} | undefined;
|
|
240
|
+
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
|
|
114
241
|
experimental?: {
|
|
115
242
|
enableComposingJsPlugins?: boolean | undefined;
|
|
243
|
+
strictExecutionOrder?: boolean | undefined;
|
|
244
|
+
disableLiveBindings?: boolean | undefined;
|
|
116
245
|
} | undefined;
|
|
117
246
|
define?: Record<string, string> | undefined;
|
|
118
247
|
inject?: Record<string, string | [string, string]> | undefined;
|
|
248
|
+
profilerNames?: boolean | undefined;
|
|
249
|
+
watch?: false | {
|
|
250
|
+
skipWrite?: boolean | undefined;
|
|
251
|
+
notify?: {
|
|
252
|
+
pollInterval?: number | undefined;
|
|
253
|
+
compareContents?: boolean | undefined;
|
|
254
|
+
} | undefined;
|
|
255
|
+
include?: string | RegExp | (string | RegExp)[] | undefined;
|
|
256
|
+
exclude?: string | RegExp | (string | RegExp)[] | undefined;
|
|
257
|
+
chokidar?: any;
|
|
258
|
+
} | undefined;
|
|
119
259
|
}>;
|
|
120
260
|
export declare const inputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
121
261
|
input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
@@ -125,6 +265,7 @@ export declare const inputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extend
|
|
|
125
265
|
alias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
126
266
|
aliasFields: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
|
|
127
267
|
conditionNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
268
|
+
extensionAlias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
|
|
128
269
|
exportsFields: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
|
|
129
270
|
extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
130
271
|
mainFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -136,6 +277,7 @@ export declare const inputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extend
|
|
|
136
277
|
alias?: Record<string, string> | undefined;
|
|
137
278
|
aliasFields?: string[][] | undefined;
|
|
138
279
|
conditionNames?: string[] | undefined;
|
|
280
|
+
extensionAlias?: Record<string, string[]> | undefined;
|
|
139
281
|
exportsFields?: string[][] | undefined;
|
|
140
282
|
extensions?: string[] | undefined;
|
|
141
283
|
mainFields?: string[] | undefined;
|
|
@@ -147,6 +289,7 @@ export declare const inputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extend
|
|
|
147
289
|
alias?: Record<string, string> | undefined;
|
|
148
290
|
aliasFields?: string[][] | undefined;
|
|
149
291
|
conditionNames?: string[] | undefined;
|
|
292
|
+
extensionAlias?: Record<string, string[]> | undefined;
|
|
150
293
|
exportsFields?: string[][] | undefined;
|
|
151
294
|
extensions?: string[] | undefined;
|
|
152
295
|
mainFields?: string[] | undefined;
|
|
@@ -162,28 +305,103 @@ export declare const inputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extend
|
|
|
162
305
|
logLevel: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>>;
|
|
163
306
|
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
307
|
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">]>>>;
|
|
308
|
+
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
309
|
experimental: z.ZodOptional<z.ZodObject<{
|
|
167
310
|
enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>;
|
|
311
|
+
strictExecutionOrder: z.ZodOptional<z.ZodBoolean>;
|
|
312
|
+
disableLiveBindings: z.ZodOptional<z.ZodBoolean>;
|
|
168
313
|
}, "strict", z.ZodTypeAny, {
|
|
169
314
|
enableComposingJsPlugins?: boolean | undefined;
|
|
315
|
+
strictExecutionOrder?: boolean | undefined;
|
|
316
|
+
disableLiveBindings?: boolean | undefined;
|
|
170
317
|
}, {
|
|
171
318
|
enableComposingJsPlugins?: boolean | undefined;
|
|
319
|
+
strictExecutionOrder?: boolean | undefined;
|
|
320
|
+
disableLiveBindings?: boolean | undefined;
|
|
172
321
|
}>>;
|
|
173
322
|
define: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
174
323
|
inject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>>>;
|
|
324
|
+
profilerNames: z.ZodOptional<z.ZodBoolean>;
|
|
325
|
+
jsx: z.ZodOptional<z.ZodObject<{
|
|
326
|
+
mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"automatic">]>>;
|
|
327
|
+
factory: z.ZodOptional<z.ZodString>;
|
|
328
|
+
fragment: z.ZodOptional<z.ZodString>;
|
|
329
|
+
importSource: z.ZodOptional<z.ZodString>;
|
|
330
|
+
jsxImportSource: z.ZodOptional<z.ZodString>;
|
|
331
|
+
refresh: z.ZodOptional<z.ZodBoolean>;
|
|
332
|
+
development: z.ZodOptional<z.ZodBoolean>;
|
|
333
|
+
}, "strict", z.ZodTypeAny, {
|
|
334
|
+
mode?: "classic" | "automatic" | undefined;
|
|
335
|
+
factory?: string | undefined;
|
|
336
|
+
fragment?: string | undefined;
|
|
337
|
+
importSource?: string | undefined;
|
|
338
|
+
jsxImportSource?: string | undefined;
|
|
339
|
+
refresh?: boolean | undefined;
|
|
340
|
+
development?: boolean | undefined;
|
|
341
|
+
}, {
|
|
342
|
+
mode?: "classic" | "automatic" | undefined;
|
|
343
|
+
factory?: string | undefined;
|
|
344
|
+
fragment?: string | undefined;
|
|
345
|
+
importSource?: string | undefined;
|
|
346
|
+
jsxImportSource?: string | undefined;
|
|
347
|
+
refresh?: boolean | undefined;
|
|
348
|
+
development?: boolean | undefined;
|
|
349
|
+
}>>;
|
|
350
|
+
watch: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
351
|
+
skipWrite: z.ZodOptional<z.ZodBoolean>;
|
|
352
|
+
notify: z.ZodOptional<z.ZodObject<{
|
|
353
|
+
pollInterval: z.ZodOptional<z.ZodNumber>;
|
|
354
|
+
compareContents: z.ZodOptional<z.ZodBoolean>;
|
|
355
|
+
}, "strict", z.ZodTypeAny, {
|
|
356
|
+
pollInterval?: number | undefined;
|
|
357
|
+
compareContents?: boolean | undefined;
|
|
358
|
+
}, {
|
|
359
|
+
pollInterval?: number | undefined;
|
|
360
|
+
compareContents?: boolean | undefined;
|
|
361
|
+
}>>;
|
|
362
|
+
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">]>>;
|
|
363
|
+
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">]>>;
|
|
364
|
+
chokidar: z.ZodOptional<z.ZodAny>;
|
|
365
|
+
}, "strict", z.ZodTypeAny, {
|
|
366
|
+
skipWrite?: boolean | undefined;
|
|
367
|
+
notify?: {
|
|
368
|
+
pollInterval?: number | undefined;
|
|
369
|
+
compareContents?: boolean | undefined;
|
|
370
|
+
} | undefined;
|
|
371
|
+
include?: string | RegExp | (string | RegExp)[] | undefined;
|
|
372
|
+
exclude?: string | RegExp | (string | RegExp)[] | undefined;
|
|
373
|
+
chokidar?: any;
|
|
374
|
+
}, {
|
|
375
|
+
skipWrite?: boolean | undefined;
|
|
376
|
+
notify?: {
|
|
377
|
+
pollInterval?: number | undefined;
|
|
378
|
+
compareContents?: boolean | undefined;
|
|
379
|
+
} | undefined;
|
|
380
|
+
include?: string | RegExp | (string | RegExp)[] | undefined;
|
|
381
|
+
exclude?: string | RegExp | (string | RegExp)[] | undefined;
|
|
382
|
+
chokidar?: any;
|
|
383
|
+
}>, z.ZodLiteral<false>]>>;
|
|
175
384
|
}, {
|
|
176
385
|
external: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
177
386
|
inject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
178
387
|
treeshake: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
179
|
-
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental">, "strict", z.ZodTypeAny, {
|
|
388
|
+
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames" | "watch">, "strict", z.ZodTypeAny, {
|
|
180
389
|
external?: string[] | undefined;
|
|
181
390
|
cwd?: string | undefined;
|
|
182
391
|
platform?: "node" | "browser" | "neutral" | undefined;
|
|
183
392
|
shimMissingExports?: boolean | undefined;
|
|
184
393
|
treeshake?: boolean | undefined;
|
|
185
394
|
logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
|
|
186
|
-
|
|
395
|
+
jsx?: {
|
|
396
|
+
mode?: "classic" | "automatic" | undefined;
|
|
397
|
+
factory?: string | undefined;
|
|
398
|
+
fragment?: string | undefined;
|
|
399
|
+
importSource?: string | undefined;
|
|
400
|
+
jsxImportSource?: string | undefined;
|
|
401
|
+
refresh?: boolean | undefined;
|
|
402
|
+
development?: boolean | undefined;
|
|
403
|
+
} | undefined;
|
|
404
|
+
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
|
|
187
405
|
define?: Record<string, string> | undefined;
|
|
188
406
|
inject?: Record<string, string> | undefined;
|
|
189
407
|
}, {
|
|
@@ -193,7 +411,16 @@ export declare const inputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extend
|
|
|
193
411
|
shimMissingExports?: boolean | undefined;
|
|
194
412
|
treeshake?: boolean | undefined;
|
|
195
413
|
logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
|
|
196
|
-
|
|
414
|
+
jsx?: {
|
|
415
|
+
mode?: "classic" | "automatic" | undefined;
|
|
416
|
+
factory?: string | undefined;
|
|
417
|
+
fragment?: string | undefined;
|
|
418
|
+
importSource?: string | undefined;
|
|
419
|
+
jsxImportSource?: string | undefined;
|
|
420
|
+
refresh?: boolean | undefined;
|
|
421
|
+
development?: boolean | undefined;
|
|
422
|
+
} | undefined;
|
|
423
|
+
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
|
|
197
424
|
define?: Record<string, string> | undefined;
|
|
198
425
|
inject?: Record<string, string> | undefined;
|
|
199
426
|
}>;
|
|
@@ -227,4 +454,5 @@ interface OverwriteInputOptionsWithDoc {
|
|
|
227
454
|
export type InputOption = z.infer<typeof inputOptionSchema>;
|
|
228
455
|
export type InputOptions = Omit<RawInputOptions, keyof OverwriteInputOptionsWithDoc> & OverwriteInputOptionsWithDoc;
|
|
229
456
|
export type ExternalOption = z.infer<typeof externalSchema>;
|
|
457
|
+
export type JsxOptions = z.infer<typeof jsxOptionsSchema>;
|
|
230
458
|
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 {};
|
|
@@ -2,7 +2,7 @@ import type { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '..
|
|
|
2
2
|
import type { OutputOptions } from './output-options';
|
|
3
3
|
import type { RolldownPlugin } from '../plugin';
|
|
4
4
|
import type { PreRenderedChunk, RenderedChunk } from '../binding';
|
|
5
|
-
export type InternalModuleFormat = 'es' | 'cjs' | 'iife';
|
|
5
|
+
export type InternalModuleFormat = 'es' | 'cjs' | 'iife' | 'umd';
|
|
6
6
|
type AddonFunction = (chunk: RenderedChunk) => string | Promise<string>;
|
|
7
7
|
type ChunkFileNamesOption = string | ((chunk: PreRenderedChunk) => string) | undefined;
|
|
8
8
|
export interface NormalizedOutputOptions extends OutputOptions {
|