rolldown 0.14.0 → 0.15.0-snapshot-5e456b6-20241203003703
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/cjs/cli.cjs +782 -854
- package/dist/cjs/experimental-index.cjs +68 -26
- package/dist/cjs/index.cjs +6 -8
- package/dist/cjs/parallel-plugin-worker.cjs +20 -14
- package/dist/cjs/parallel-plugin.cjs +1 -3
- package/dist/esm/cli.mjs +722 -796
- package/dist/esm/experimental-index.mjs +44 -7
- package/dist/esm/index.mjs +2 -4
- package/dist/esm/parallel-plugin-worker.mjs +15 -10
- package/dist/esm/parallel-plugin.mjs +1 -3
- package/dist/shared/{chunk-JoMxl5V2.cjs → chunk-BK2Ye-xa.cjs} +19 -6
- package/dist/shared/{consola.36c0034f-Xyw7SC_7.mjs → consola_36c0034f-DWsVjwtA.mjs} +218 -283
- package/dist/shared/{consola.36c0034f-HcmWcfPe.cjs → consola_36c0034f-_8_dG1Nr.cjs} +249 -295
- package/dist/shared/{prompt-hoPhcrA-.mjs → prompt-DGW8ZJmn.mjs} +125 -174
- package/dist/shared/{prompt-9Ij3R3TG.cjs → prompt-RFvZMmjc.cjs} +157 -204
- package/dist/shared/src-COU7qQBJ.cjs +2899 -0
- package/dist/shared/src-DEPa5yhI.mjs +2771 -0
- package/dist/types/api/build.d.ts +14 -0
- package/dist/types/api/experimental.d.ts +7 -0
- package/dist/types/api/rolldown/index.d.ts +3 -0
- package/dist/types/api/rolldown/rolldown-build.d.ts +12 -0
- package/dist/types/api/watch/index.d.ts +3 -0
- package/dist/types/{watcher.d.ts → api/watch/watcher.d.ts} +5 -3
- package/dist/types/binding.d.ts +175 -40
- package/dist/types/builtin-plugin/alias-plugin.d.ts +10 -0
- package/dist/types/builtin-plugin/constructors.d.ts +20 -0
- package/dist/types/builtin-plugin/replace-plugin.d.ts +28 -0
- package/dist/types/{options/normalized-ecma-transform-plugin-config.d.ts → builtin-plugin/transform-plugin.d.ts} +2 -1
- package/dist/types/builtin-plugin/utils.d.ts +8 -0
- package/dist/types/cli/arguments/normalize.d.ts +2 -6
- package/dist/types/cli/arguments/schema.d.ts +169 -81
- package/dist/types/constants/plugin.d.ts +3 -1
- package/dist/types/experimental-index.d.ts +5 -2
- package/dist/types/index.d.ts +13 -10
- package/dist/types/log/locate-character/index.d.ts +13 -0
- package/dist/types/log/logger.d.ts +2 -16
- package/dist/types/log/logging.d.ts +6 -3
- package/dist/types/log/logs.d.ts +2 -0
- package/dist/types/options/input-options-schema.d.ts +596 -0
- package/dist/types/options/input-options.d.ts +74 -430
- package/dist/types/options/normalized-input-options.d.ts +17 -11
- package/dist/types/options/normalized-output-options.d.ts +57 -21
- package/dist/types/options/output-options-schema.d.ts +147 -0
- package/dist/types/options/output-options.d.ts +72 -265
- package/dist/types/options/watch-options.d.ts +5 -0
- package/dist/types/plugin/bindingify-build-hooks.d.ts +9 -11
- package/dist/types/plugin/bindingify-hook-filter.d.ts +5 -5
- package/dist/types/plugin/bindingify-output-hooks.d.ts +13 -16
- package/dist/types/plugin/bindingify-plugin.d.ts +12 -3
- package/dist/types/plugin/bindingify-watch-hooks.d.ts +3 -5
- package/dist/types/plugin/hook-filter.d.ts +1 -1
- package/dist/types/plugin/index.d.ts +21 -18
- package/dist/types/plugin/minimal-plugin-context.d.ts +15 -0
- package/dist/types/plugin/plugin-context-data.d.ts +4 -5
- package/dist/types/plugin/plugin-context.d.ts +9 -4
- package/dist/types/plugin/plugin-driver.d.ts +4 -5
- package/dist/types/plugin/transform-plugin-context.d.ts +4 -3
- package/dist/types/rollup-types.d.ts +1 -1
- package/dist/types/treeshake/index.d.ts +0 -12
- package/dist/types/treeshake/module-side-effects.d.ts +111 -11
- package/dist/types/types/rolldown-output.d.ts +11 -2
- package/dist/types/types/utils.d.ts +1 -0
- package/dist/types/utils/bindingify-input-options.d.ts +7 -0
- package/dist/types/utils/bindingify-output-options.d.ts +3 -0
- package/dist/types/utils/define-config.d.ts +3 -0
- package/dist/types/utils/error.d.ts +1 -0
- package/dist/types/utils/normalize-hook.d.ts +1 -1
- package/dist/types/utils/normalize-plugin-option.d.ts +8 -3
- package/dist/types/{options/utils.d.ts → utils/normalize-string-or-regex.d.ts} +1 -1
- package/dist/types/utils/transform-rendered-chunk.d.ts +4 -0
- package/dist/types/utils/transform-rendered-module.d.ts +3 -0
- package/dist/types/utils/transform-sourcemap.d.ts +2 -0
- package/dist/types/utils/transform-to-rollup-output.d.ts +1 -0
- package/package.json +30 -22
- package/dist/shared/rolldown-binding.wasi.cjs +0 -187
- package/dist/shared/src_index-3pqhEViJ.cjs +0 -2785
- package/dist/shared/src_index-ywYMd4vB.mjs +0 -2786
- package/dist/shared/wasi-worker-browser.mjs +0 -39
- package/dist/shared/wasi-worker.mjs +0 -63
- package/dist/shared/watcher-worker.js +0 -1
- package/dist/types/constants/types.d.ts +0 -1
- package/dist/types/options/bindingify-input-options.d.ts +0 -4
- package/dist/types/options/bindingify-output-options.d.ts +0 -3
- package/dist/types/options/normalized-alias-plugin-config.d.ts +0 -8
- package/dist/types/options/watch-option.d.ts +0 -5
- package/dist/types/plugin/builtin-plugin.d.ts +0 -81
- package/dist/types/rolldown-build.d.ts +0 -10
- package/dist/types/rolldown.d.ts +0 -12
- package/dist/types/types/rendered-module.d.ts +0 -2
- package/dist/types/utils/normalize-input-options.d.ts +0 -3
- package/dist/types/utils/normalize-output-options.d.ts +0 -3
- package/dist/types/utils/normalize-tree-shake.d.ts +0 -3
- /package/dist/types/{utils/type-assert.d.ts → types/assert.d.ts} +0 -0
|
@@ -7,7 +7,7 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
7
7
|
watch: z.ZodOptional<z.ZodBoolean>;
|
|
8
8
|
}, Omit<z.objectUtil.extendShape<{
|
|
9
9
|
input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
10
|
-
plugins: z.ZodOptional<z.
|
|
10
|
+
plugins: z.ZodOptional<z.ZodType<import("../../plugin").RolldownPluginOption, z.ZodTypeDef, import("../../plugin").RolldownPluginOption>>;
|
|
11
11
|
external: z.ZodOptional<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]>>]>>;
|
|
12
12
|
resolve: z.ZodOptional<z.ZodObject<{
|
|
13
13
|
alias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -22,34 +22,103 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
22
22
|
symlinks: z.ZodOptional<z.ZodBoolean>;
|
|
23
23
|
tsconfigFilename: z.ZodOptional<z.ZodString>;
|
|
24
24
|
}, "strict", z.ZodTypeAny, {
|
|
25
|
+
modules?: string[] | undefined;
|
|
25
26
|
alias?: Record<string, string> | undefined;
|
|
27
|
+
extensionAlias?: Record<string, string[]> | undefined;
|
|
26
28
|
aliasFields?: string[][] | undefined;
|
|
27
29
|
conditionNames?: string[] | undefined;
|
|
28
|
-
extensionAlias?: Record<string, string[]> | undefined;
|
|
29
30
|
exportsFields?: string[][] | undefined;
|
|
30
31
|
extensions?: string[] | undefined;
|
|
31
32
|
mainFields?: string[] | undefined;
|
|
32
33
|
mainFiles?: string[] | undefined;
|
|
33
|
-
modules?: string[] | undefined;
|
|
34
34
|
symlinks?: boolean | undefined;
|
|
35
35
|
tsconfigFilename?: string | undefined;
|
|
36
36
|
}, {
|
|
37
|
+
modules?: string[] | undefined;
|
|
37
38
|
alias?: Record<string, string> | undefined;
|
|
39
|
+
extensionAlias?: Record<string, string[]> | undefined;
|
|
38
40
|
aliasFields?: string[][] | undefined;
|
|
39
41
|
conditionNames?: string[] | undefined;
|
|
40
|
-
extensionAlias?: Record<string, string[]> | undefined;
|
|
41
42
|
exportsFields?: string[][] | undefined;
|
|
42
43
|
extensions?: string[] | undefined;
|
|
43
44
|
mainFields?: string[] | undefined;
|
|
44
45
|
mainFiles?: string[] | undefined;
|
|
45
|
-
modules?: string[] | undefined;
|
|
46
46
|
symlinks?: boolean | undefined;
|
|
47
47
|
tsconfigFilename?: string | undefined;
|
|
48
48
|
}>>;
|
|
49
49
|
cwd: z.ZodOptional<z.ZodString>;
|
|
50
50
|
platform: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"node">, z.ZodLiteral<"browser">]>, z.ZodLiteral<"neutral">]>>;
|
|
51
51
|
shimMissingExports: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
-
treeshake: z.ZodOptional<z.
|
|
52
|
+
treeshake: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
53
|
+
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
54
|
+
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
|
|
55
|
+
external: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
sideEffects: z.ZodBoolean;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
sideEffects: boolean;
|
|
59
|
+
external?: boolean | undefined;
|
|
60
|
+
test?: RegExp | undefined;
|
|
61
|
+
}, {
|
|
62
|
+
sideEffects: boolean;
|
|
63
|
+
external?: boolean | undefined;
|
|
64
|
+
test?: RegExp | undefined;
|
|
65
|
+
}>, {
|
|
66
|
+
sideEffects: boolean;
|
|
67
|
+
external?: boolean | undefined;
|
|
68
|
+
test?: RegExp | undefined;
|
|
69
|
+
}, {
|
|
70
|
+
sideEffects: boolean;
|
|
71
|
+
external?: boolean | undefined;
|
|
72
|
+
test?: RegExp | undefined;
|
|
73
|
+
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
|
|
74
|
+
annotations: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
76
|
+
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
77
|
+
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
|
|
78
|
+
external: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
+
sideEffects: z.ZodBoolean;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
sideEffects: boolean;
|
|
82
|
+
external?: boolean | undefined;
|
|
83
|
+
test?: RegExp | undefined;
|
|
84
|
+
}, {
|
|
85
|
+
sideEffects: boolean;
|
|
86
|
+
external?: boolean | undefined;
|
|
87
|
+
test?: RegExp | undefined;
|
|
88
|
+
}>, {
|
|
89
|
+
sideEffects: boolean;
|
|
90
|
+
external?: boolean | undefined;
|
|
91
|
+
test?: RegExp | undefined;
|
|
92
|
+
}, {
|
|
93
|
+
sideEffects: boolean;
|
|
94
|
+
external?: boolean | undefined;
|
|
95
|
+
test?: RegExp | undefined;
|
|
96
|
+
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
|
|
97
|
+
annotations: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
99
|
+
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
100
|
+
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
|
|
101
|
+
external: z.ZodOptional<z.ZodBoolean>;
|
|
102
|
+
sideEffects: z.ZodBoolean;
|
|
103
|
+
}, "strip", z.ZodTypeAny, {
|
|
104
|
+
sideEffects: boolean;
|
|
105
|
+
external?: boolean | undefined;
|
|
106
|
+
test?: RegExp | undefined;
|
|
107
|
+
}, {
|
|
108
|
+
sideEffects: boolean;
|
|
109
|
+
external?: boolean | undefined;
|
|
110
|
+
test?: RegExp | undefined;
|
|
111
|
+
}>, {
|
|
112
|
+
sideEffects: boolean;
|
|
113
|
+
external?: boolean | undefined;
|
|
114
|
+
test?: RegExp | undefined;
|
|
115
|
+
}, {
|
|
116
|
+
sideEffects: boolean;
|
|
117
|
+
external?: boolean | undefined;
|
|
118
|
+
test?: RegExp | undefined;
|
|
119
|
+
}>, "many">]>, z.ZodLiteral<"no-external">]>>;
|
|
120
|
+
annotations: z.ZodOptional<z.ZodBoolean>;
|
|
121
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodBoolean]>>;
|
|
53
122
|
logLevel: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>>;
|
|
54
123
|
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>>;
|
|
55
124
|
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>>;
|
|
@@ -58,14 +127,17 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
58
127
|
enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>;
|
|
59
128
|
strictExecutionOrder: z.ZodOptional<z.ZodBoolean>;
|
|
60
129
|
disableLiveBindings: z.ZodOptional<z.ZodBoolean>;
|
|
130
|
+
resolveNewUrlToAsset: z.ZodOptional<z.ZodBoolean>;
|
|
61
131
|
}, "strict", z.ZodTypeAny, {
|
|
62
|
-
enableComposingJsPlugins?: boolean | undefined;
|
|
63
132
|
strictExecutionOrder?: boolean | undefined;
|
|
64
133
|
disableLiveBindings?: boolean | undefined;
|
|
65
|
-
|
|
134
|
+
resolveNewUrlToAsset?: boolean | undefined;
|
|
66
135
|
enableComposingJsPlugins?: boolean | undefined;
|
|
136
|
+
}, {
|
|
67
137
|
strictExecutionOrder?: boolean | undefined;
|
|
68
138
|
disableLiveBindings?: boolean | undefined;
|
|
139
|
+
resolveNewUrlToAsset?: boolean | undefined;
|
|
140
|
+
enableComposingJsPlugins?: boolean | undefined;
|
|
69
141
|
}>>;
|
|
70
142
|
define: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
71
143
|
inject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>>>;
|
|
@@ -79,21 +151,21 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
79
151
|
refresh: z.ZodOptional<z.ZodBoolean>;
|
|
80
152
|
development: z.ZodOptional<z.ZodBoolean>;
|
|
81
153
|
}, "strict", z.ZodTypeAny, {
|
|
154
|
+
development?: boolean | undefined;
|
|
155
|
+
refresh?: boolean | undefined;
|
|
82
156
|
mode?: "classic" | "automatic" | undefined;
|
|
83
157
|
factory?: string | undefined;
|
|
84
158
|
fragment?: string | undefined;
|
|
85
159
|
importSource?: string | undefined;
|
|
86
160
|
jsxImportSource?: string | undefined;
|
|
87
|
-
refresh?: boolean | undefined;
|
|
88
|
-
development?: boolean | undefined;
|
|
89
161
|
}, {
|
|
162
|
+
development?: boolean | undefined;
|
|
163
|
+
refresh?: boolean | undefined;
|
|
90
164
|
mode?: "classic" | "automatic" | undefined;
|
|
91
165
|
factory?: string | undefined;
|
|
92
166
|
fragment?: string | undefined;
|
|
93
167
|
importSource?: string | undefined;
|
|
94
168
|
jsxImportSource?: string | undefined;
|
|
95
|
-
refresh?: boolean | undefined;
|
|
96
|
-
development?: boolean | undefined;
|
|
97
169
|
}>>;
|
|
98
170
|
watch: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
99
171
|
skipWrite: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -111,48 +183,52 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
111
183
|
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">]>>;
|
|
112
184
|
chokidar: z.ZodOptional<z.ZodAny>;
|
|
113
185
|
}, "strict", z.ZodTypeAny, {
|
|
114
|
-
|
|
186
|
+
include?: string | RegExp | (string | RegExp)[] | undefined;
|
|
187
|
+
exclude?: string | RegExp | (string | RegExp)[] | undefined;
|
|
115
188
|
notify?: {
|
|
116
189
|
pollInterval?: number | undefined;
|
|
117
190
|
compareContents?: boolean | undefined;
|
|
118
191
|
} | undefined;
|
|
119
|
-
|
|
120
|
-
exclude?: string | RegExp | (string | RegExp)[] | undefined;
|
|
192
|
+
skipWrite?: boolean | undefined;
|
|
121
193
|
chokidar?: any;
|
|
122
194
|
}, {
|
|
123
|
-
|
|
195
|
+
include?: string | RegExp | (string | RegExp)[] | undefined;
|
|
196
|
+
exclude?: string | RegExp | (string | RegExp)[] | undefined;
|
|
124
197
|
notify?: {
|
|
125
198
|
pollInterval?: number | undefined;
|
|
126
199
|
compareContents?: boolean | undefined;
|
|
127
200
|
} | undefined;
|
|
128
|
-
|
|
129
|
-
exclude?: string | RegExp | (string | RegExp)[] | undefined;
|
|
201
|
+
skipWrite?: boolean | undefined;
|
|
130
202
|
chokidar?: any;
|
|
131
203
|
}>, z.ZodLiteral<false>]>>;
|
|
204
|
+
dropLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
132
205
|
}, {
|
|
133
206
|
external: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
134
207
|
inject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
135
208
|
treeshake: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
136
|
-
}>, "
|
|
209
|
+
}>, "plugins" | "onLog" | "onwarn" | "input" | "resolve" | "watch" | "experimental" | "profilerNames">>, Omit<z.objectUtil.extendShape<{
|
|
137
210
|
dir: z.ZodOptional<z.ZodString>;
|
|
138
211
|
file: z.ZodOptional<z.ZodString>;
|
|
139
212
|
exports: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"named">]>, z.ZodLiteral<"default">]>, z.ZodLiteral<"none">]>>;
|
|
213
|
+
hashCharacters: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"base64">, z.ZodLiteral<"base36">]>, z.ZodLiteral<"hex">]>>;
|
|
140
214
|
format: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"es">, z.ZodLiteral<"cjs">]>, z.ZodLiteral<"esm">]>, z.ZodLiteral<"module">]>, z.ZodLiteral<"commonjs">]>, z.ZodLiteral<"iife">]>, z.ZodLiteral<"umd">]>>;
|
|
141
215
|
sourcemap: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"inline">]>, z.ZodLiteral<"hidden">]>>;
|
|
142
|
-
sourcemapIgnoreList: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodType<import("../../
|
|
143
|
-
sourcemapPathTransform: z.ZodOptional<z.ZodType<import("../../
|
|
216
|
+
sourcemapIgnoreList: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodType<import("../../rollup").SourcemapIgnoreListOption, z.ZodTypeDef, import("../../rollup").SourcemapIgnoreListOption>]>>;
|
|
217
|
+
sourcemapPathTransform: z.ZodOptional<z.ZodType<import("../../rollup").SourcemapPathTransformOption, z.ZodTypeDef, import("../../rollup").SourcemapPathTransformOption>>;
|
|
144
218
|
banner: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<import("../..").RenderedChunk, z.ZodTypeDef, import("../..").RenderedChunk>], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodPromise<z.ZodString>]>>]>>;
|
|
145
219
|
footer: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<import("../..").RenderedChunk, z.ZodTypeDef, import("../..").RenderedChunk>], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodPromise<z.ZodString>]>>]>>;
|
|
146
220
|
intro: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<import("../..").RenderedChunk, z.ZodTypeDef, import("../..").RenderedChunk>], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodPromise<z.ZodString>]>>]>>;
|
|
147
221
|
outro: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<import("../..").RenderedChunk, z.ZodTypeDef, import("../..").RenderedChunk>], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodPromise<z.ZodString>]>>]>>;
|
|
148
222
|
extend: z.ZodOptional<z.ZodBoolean>;
|
|
149
223
|
esModule: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"if-default-prop">, z.ZodBoolean]>>;
|
|
224
|
+
assetFileNames: z.ZodOptional<z.ZodString>;
|
|
150
225
|
entryFileNames: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<import("../..").PreRenderedChunk, z.ZodTypeDef, import("../..").PreRenderedChunk>], z.ZodUnknown>, z.ZodString>]>>;
|
|
151
226
|
chunkFileNames: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<import("../..").PreRenderedChunk, z.ZodTypeDef, import("../..").PreRenderedChunk>], z.ZodUnknown>, z.ZodString>]>>;
|
|
152
|
-
|
|
227
|
+
cssEntryFileNames: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<import("../..").PreRenderedChunk, z.ZodTypeDef, import("../..").PreRenderedChunk>], z.ZodUnknown>, z.ZodString>]>>;
|
|
228
|
+
cssChunkFileNames: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<import("../..").PreRenderedChunk, z.ZodTypeDef, import("../..").PreRenderedChunk>], z.ZodUnknown>, z.ZodString>]>>;
|
|
153
229
|
minify: z.ZodOptional<z.ZodBoolean>;
|
|
154
230
|
name: z.ZodOptional<z.ZodString>;
|
|
155
|
-
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
231
|
+
globals: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodString>]>>;
|
|
156
232
|
externalLiveBindings: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
157
233
|
inlineDynamicImports: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
158
234
|
advancedChunks: z.ZodOptional<z.ZodObject<{
|
|
@@ -166,15 +242,15 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
166
242
|
minShareCount: z.ZodOptional<z.ZodNumber>;
|
|
167
243
|
}, "strict", z.ZodTypeAny, {
|
|
168
244
|
name: string;
|
|
245
|
+
test?: string | RegExp | undefined;
|
|
169
246
|
minSize?: number | undefined;
|
|
170
247
|
minShareCount?: number | undefined;
|
|
171
|
-
test?: string | RegExp | undefined;
|
|
172
248
|
priority?: number | undefined;
|
|
173
249
|
}, {
|
|
174
250
|
name: string;
|
|
251
|
+
test?: string | RegExp | undefined;
|
|
175
252
|
minSize?: number | undefined;
|
|
176
253
|
minShareCount?: number | undefined;
|
|
177
|
-
test?: string | RegExp | undefined;
|
|
178
254
|
priority?: number | undefined;
|
|
179
255
|
}>, "many">>;
|
|
180
256
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -182,9 +258,9 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
182
258
|
minShareCount?: number | undefined;
|
|
183
259
|
groups?: {
|
|
184
260
|
name: string;
|
|
261
|
+
test?: string | RegExp | undefined;
|
|
185
262
|
minSize?: number | undefined;
|
|
186
263
|
minShareCount?: number | undefined;
|
|
187
|
-
test?: string | RegExp | undefined;
|
|
188
264
|
priority?: number | undefined;
|
|
189
265
|
}[] | undefined;
|
|
190
266
|
}, {
|
|
@@ -192,18 +268,20 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
192
268
|
minShareCount?: number | undefined;
|
|
193
269
|
groups?: {
|
|
194
270
|
name: string;
|
|
271
|
+
test?: string | RegExp | undefined;
|
|
195
272
|
minSize?: number | undefined;
|
|
196
273
|
minShareCount?: number | undefined;
|
|
197
|
-
test?: string | RegExp | undefined;
|
|
198
274
|
priority?: number | undefined;
|
|
199
275
|
}[] | undefined;
|
|
200
276
|
}>>;
|
|
277
|
+
comments: z.ZodOptional<z.ZodEnum<["none", "preserve-legal"]>>;
|
|
201
278
|
}, {
|
|
202
279
|
banner: z.ZodOptional<z.ZodString>;
|
|
203
280
|
footer: z.ZodOptional<z.ZodString>;
|
|
204
281
|
intro: z.ZodOptional<z.ZodString>;
|
|
205
282
|
outro: z.ZodOptional<z.ZodString>;
|
|
206
283
|
esModule: z.ZodOptional<z.ZodBoolean>;
|
|
284
|
+
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
207
285
|
advancedChunks: z.ZodOptional<z.ZodObject<{
|
|
208
286
|
minSize: z.ZodOptional<z.ZodNumber>;
|
|
209
287
|
minShareCount: z.ZodOptional<z.ZodNumber>;
|
|
@@ -215,97 +293,107 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
215
293
|
minShareCount?: number | undefined;
|
|
216
294
|
}>>;
|
|
217
295
|
}>, "sourcemapIgnoreList" | "sourcemapPathTransform">>, "strict", z.ZodTypeAny, {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
platform?: "node" | "browser" | "neutral" | undefined;
|
|
221
|
-
shimMissingExports?: boolean | undefined;
|
|
222
|
-
treeshake?: boolean | undefined;
|
|
223
|
-
logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
|
|
224
|
-
jsx?: {
|
|
225
|
-
mode?: "classic" | "automatic" | undefined;
|
|
226
|
-
factory?: string | undefined;
|
|
227
|
-
fragment?: string | undefined;
|
|
228
|
-
importSource?: string | undefined;
|
|
229
|
-
jsxImportSource?: string | undefined;
|
|
230
|
-
refresh?: boolean | undefined;
|
|
231
|
-
development?: boolean | undefined;
|
|
232
|
-
} | undefined;
|
|
233
|
-
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
|
|
234
|
-
define?: Record<string, string> | undefined;
|
|
235
|
-
inject?: Record<string, string> | undefined;
|
|
236
|
-
watch?: boolean | undefined;
|
|
237
|
-
footer?: string | undefined;
|
|
296
|
+
name?: string | undefined;
|
|
297
|
+
exports?: "auto" | "named" | "default" | "none" | undefined;
|
|
238
298
|
banner?: string | undefined;
|
|
299
|
+
footer?: string | undefined;
|
|
239
300
|
intro?: string | undefined;
|
|
240
301
|
outro?: string | undefined;
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
302
|
+
esModule?: boolean | undefined;
|
|
303
|
+
globals?: Record<string, string> | undefined;
|
|
304
|
+
advancedChunks?: {
|
|
305
|
+
minSize?: number | undefined;
|
|
306
|
+
minShareCount?: number | undefined;
|
|
307
|
+
} | undefined;
|
|
244
308
|
dir?: string | undefined;
|
|
309
|
+
file?: string | undefined;
|
|
310
|
+
hashCharacters?: "base64" | "base36" | "hex" | undefined;
|
|
245
311
|
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
|
|
246
312
|
sourcemap?: boolean | "inline" | "hidden" | undefined;
|
|
247
313
|
extend?: boolean | undefined;
|
|
248
|
-
|
|
314
|
+
assetFileNames?: string | undefined;
|
|
249
315
|
entryFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
250
316
|
chunkFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
251
|
-
|
|
317
|
+
cssEntryFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
318
|
+
cssChunkFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
252
319
|
minify?: boolean | undefined;
|
|
253
|
-
globals?: Record<string, string> | undefined;
|
|
254
320
|
externalLiveBindings?: boolean | undefined;
|
|
255
321
|
inlineDynamicImports?: boolean | undefined;
|
|
256
|
-
|
|
257
|
-
minSize?: number | undefined;
|
|
258
|
-
minShareCount?: number | undefined;
|
|
259
|
-
} | undefined;
|
|
260
|
-
version?: boolean | undefined;
|
|
261
|
-
config?: string | boolean | undefined;
|
|
262
|
-
help?: boolean | undefined;
|
|
263
|
-
}, {
|
|
322
|
+
comments?: "none" | "preserve-legal" | undefined;
|
|
264
323
|
external?: string[] | undefined;
|
|
265
|
-
cwd?: string | undefined;
|
|
266
|
-
platform?: "node" | "browser" | "neutral" | undefined;
|
|
267
|
-
shimMissingExports?: boolean | undefined;
|
|
268
|
-
treeshake?: boolean | undefined;
|
|
269
|
-
logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
|
|
270
324
|
jsx?: {
|
|
325
|
+
development?: boolean | undefined;
|
|
326
|
+
refresh?: boolean | undefined;
|
|
271
327
|
mode?: "classic" | "automatic" | undefined;
|
|
272
328
|
factory?: string | undefined;
|
|
273
329
|
fragment?: string | undefined;
|
|
274
330
|
importSource?: string | undefined;
|
|
275
331
|
jsxImportSource?: string | undefined;
|
|
276
|
-
refresh?: boolean | undefined;
|
|
277
|
-
development?: boolean | undefined;
|
|
278
332
|
} | undefined;
|
|
279
|
-
|
|
280
|
-
|
|
333
|
+
platform?: "node" | "browser" | "neutral" | undefined;
|
|
334
|
+
logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
|
|
335
|
+
treeshake?: boolean | undefined;
|
|
281
336
|
inject?: Record<string, string> | undefined;
|
|
282
337
|
watch?: boolean | undefined;
|
|
283
|
-
|
|
338
|
+
cwd?: string | undefined;
|
|
339
|
+
shimMissingExports?: boolean | undefined;
|
|
340
|
+
moduleTypes?: Record<string, "base64" | "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined;
|
|
341
|
+
define?: Record<string, string> | undefined;
|
|
342
|
+
dropLabels?: string[] | undefined;
|
|
343
|
+
config?: string | boolean | undefined;
|
|
344
|
+
help?: boolean | undefined;
|
|
345
|
+
version?: boolean | undefined;
|
|
346
|
+
}, {
|
|
347
|
+
name?: string | undefined;
|
|
348
|
+
exports?: "auto" | "named" | "default" | "none" | undefined;
|
|
284
349
|
banner?: string | undefined;
|
|
350
|
+
footer?: string | undefined;
|
|
285
351
|
intro?: string | undefined;
|
|
286
352
|
outro?: string | undefined;
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
353
|
+
esModule?: boolean | undefined;
|
|
354
|
+
globals?: Record<string, string> | undefined;
|
|
355
|
+
advancedChunks?: {
|
|
356
|
+
minSize?: number | undefined;
|
|
357
|
+
minShareCount?: number | undefined;
|
|
358
|
+
} | undefined;
|
|
290
359
|
dir?: string | undefined;
|
|
360
|
+
file?: string | undefined;
|
|
361
|
+
hashCharacters?: "base64" | "base36" | "hex" | undefined;
|
|
291
362
|
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
|
|
292
363
|
sourcemap?: boolean | "inline" | "hidden" | undefined;
|
|
293
364
|
extend?: boolean | undefined;
|
|
294
|
-
|
|
365
|
+
assetFileNames?: string | undefined;
|
|
295
366
|
entryFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
296
367
|
chunkFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
297
|
-
|
|
368
|
+
cssEntryFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
369
|
+
cssChunkFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
298
370
|
minify?: boolean | undefined;
|
|
299
|
-
globals?: Record<string, string> | undefined;
|
|
300
371
|
externalLiveBindings?: boolean | undefined;
|
|
301
372
|
inlineDynamicImports?: boolean | undefined;
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
373
|
+
comments?: "none" | "preserve-legal" | undefined;
|
|
374
|
+
external?: string[] | undefined;
|
|
375
|
+
jsx?: {
|
|
376
|
+
development?: boolean | undefined;
|
|
377
|
+
refresh?: boolean | undefined;
|
|
378
|
+
mode?: "classic" | "automatic" | undefined;
|
|
379
|
+
factory?: string | undefined;
|
|
380
|
+
fragment?: string | undefined;
|
|
381
|
+
importSource?: string | undefined;
|
|
382
|
+
jsxImportSource?: string | undefined;
|
|
305
383
|
} | undefined;
|
|
306
|
-
|
|
384
|
+
platform?: "node" | "browser" | "neutral" | undefined;
|
|
385
|
+
logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
|
|
386
|
+
treeshake?: boolean | undefined;
|
|
387
|
+
inject?: Record<string, string> | undefined;
|
|
388
|
+
watch?: boolean | undefined;
|
|
389
|
+
cwd?: string | undefined;
|
|
390
|
+
shimMissingExports?: boolean | undefined;
|
|
391
|
+
moduleTypes?: Record<string, "base64" | "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined;
|
|
392
|
+
define?: Record<string, string> | undefined;
|
|
393
|
+
dropLabels?: string[] | undefined;
|
|
307
394
|
config?: string | boolean | undefined;
|
|
308
395
|
help?: boolean | undefined;
|
|
396
|
+
version?: boolean | undefined;
|
|
309
397
|
}>;
|
|
310
398
|
export type CliOptions = z.infer<typeof cliOptionsSchema>;
|
|
311
399
|
export declare const schema: ObjectSchema;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Plugin } from '../plugin';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "buildEnd", "onLog", "resolveDynamicImport", "closeBundle", "closeWatcher", "watchChange"];
|
|
3
|
+
export declare const ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES: readonly ["augmentChunkHash", "outputOptions", "renderChunk", "renderStart", "renderError", "writeBundle", "generateBundle"];
|
|
4
|
+
export declare const ENUMERATED_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "buildEnd", "onLog", "resolveDynamicImport", "closeBundle", "closeWatcher", "watchChange", "augmentChunkHash", "outputOptions", "renderChunk", "renderStart", "renderError", "writeBundle", "generateBundle", "footer", "banner", "intro", "outro"];
|
|
3
5
|
/**
|
|
4
6
|
* Names of all properties in a `Plugin` object. Includes `name` and `api`.
|
|
5
7
|
*/
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export { defineParallelPlugin } from './plugin/parallel-plugin';
|
|
2
|
-
export { experimental_scan as scan } from './
|
|
2
|
+
export { experimental_scan as scan } from './api/experimental';
|
|
3
3
|
export { transform } from './binding';
|
|
4
4
|
export type { TransformOptions, TransformResult } from './binding';
|
|
5
5
|
export { composeJsPlugins as composePlugins } from './utils/compose-js-plugins';
|
|
6
|
-
export { modulePreloadPolyfillPlugin, dynamicImportVarsPlugin, wasmHelperPlugin, wasmFallbackPlugin, importGlobPlugin, manifestPlugin, loadFallbackPlugin,
|
|
6
|
+
export { modulePreloadPolyfillPlugin, dynamicImportVarsPlugin, wasmHelperPlugin, wasmFallbackPlugin, importGlobPlugin, manifestPlugin, loadFallbackPlugin, jsonPlugin, buildImportAnalysisPlugin, viteResolvePlugin, } from './builtin-plugin/constructors';
|
|
7
|
+
export { transformPlugin } from './builtin-plugin/transform-plugin';
|
|
8
|
+
export { replacePlugin } from './builtin-plugin/replace-plugin';
|
|
9
|
+
export { aliasPlugin } from './builtin-plugin/alias-plugin';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
import { RolldownOutput, RolldownOutputAsset, RolldownOutputChunk, SourceMap } from './types/rolldown-output';
|
|
2
|
-
import type {
|
|
1
|
+
import { RolldownOutput, RolldownOutputAsset, RolldownOutputChunk, RolldownRenderedChunk, SourceMap } from './types/rolldown-output';
|
|
2
|
+
import type { InputOptions, InputOption, ExternalOption, JsxOptions } from './options/input-options';
|
|
3
3
|
import type { ModuleFormat, OutputOptions } from './options/output-options';
|
|
4
4
|
import type { RolldownOptions } from './types/rolldown-options';
|
|
5
5
|
import type { AsyncPluginHooks, CustomPluginOptions, FunctionPluginHooks, ImportKind, LoadResult, ModuleOptions, ModuleType, ObjectHook, ParallelPluginHooks, PartialResolvedId, Plugin, RolldownPlugin, ResolveIdResult, ResolvedId, SourceDescription, TransformResult } from './plugin';
|
|
6
6
|
import { DefineParallelPluginResult } from './plugin/parallel-plugin';
|
|
7
7
|
import { defineConfig } from './utils/define-config';
|
|
8
|
-
import { rolldown
|
|
8
|
+
import { rolldown } from './api/rolldown';
|
|
9
|
+
import { watch } from './api/watch';
|
|
9
10
|
import { ConfigExport } from './types/config-export';
|
|
10
|
-
import { RolldownBuild } from './rolldown-build';
|
|
11
|
+
import { RolldownBuild } from './api/rolldown/rolldown-build';
|
|
11
12
|
import { EmittedAsset, EmittedFile, PluginContext } from './plugin/plugin-context';
|
|
12
13
|
import { TransformPluginContext } from './plugin/transform-plugin-context';
|
|
13
14
|
import { InternalModuleFormat, NormalizedOutputOptions } from './options/normalized-output-options';
|
|
14
|
-
import {
|
|
15
|
+
import { PreRenderedChunk } from './binding';
|
|
15
16
|
import { PartialNull } from './types/utils';
|
|
16
17
|
import { NormalizedInputOptions } from './options/normalized-input-options';
|
|
17
18
|
import { ModuleInfo } from './types/module-info';
|
|
18
|
-
import { MinimalPluginContext } from './
|
|
19
|
+
import { MinimalPluginContext } from './plugin/minimal-plugin-context';
|
|
19
20
|
import { ExistingRawSourceMap, SourceMapInput } from './types/sourcemap';
|
|
20
21
|
import { OutputBundle } from './types/output-bundle';
|
|
21
|
-
import { WatchOptions } from './options/watch-
|
|
22
|
-
|
|
22
|
+
import { WatchOptions } from './options/watch-options';
|
|
23
|
+
import { Watcher } from './api/watch/watcher';
|
|
24
|
+
import { build, type BuildOptions } from './api/build';
|
|
25
|
+
export { defineConfig, rolldown, watch, build };
|
|
23
26
|
export declare const VERSION: string;
|
|
24
|
-
export type { RolldownOutputAsset, RolldownOutputChunk, RolldownOptions, RolldownOutput, RolldownBuild, InputOptions, NormalizedInputOptions, OutputOptions, NormalizedOutputOptions, Plugin, RolldownPlugin, DefineParallelPluginResult, ConfigExport, ImportKind, InputOption, ExternalOption, ModuleFormat, ModuleType, InternalModuleFormat, LoadResult, TransformResult, ResolveIdResult, PluginContext, TransformPluginContext, ObjectHook,
|
|
25
|
-
export type { RolldownOutput as RollupOutput, RolldownOptions as RollupOptions, RolldownBuild as RollupBuild, RolldownOutputChunk as OutputChunk, RolldownOutputAsset as OutputAsset, };
|
|
27
|
+
export type { RolldownOutputAsset, RolldownOutputChunk, RolldownOptions, RolldownOutput, RolldownBuild, InputOptions, NormalizedInputOptions, OutputOptions, NormalizedOutputOptions, Plugin, RolldownPlugin, DefineParallelPluginResult, ConfigExport, ImportKind, InputOption, ExternalOption, ModuleFormat, ModuleType, InternalModuleFormat, LoadResult, TransformResult, ResolveIdResult, PluginContext, TransformPluginContext, ObjectHook, PreRenderedChunk, SourceMap, SourceDescription, PartialNull, PartialResolvedId, ResolvedId, ModuleOptions, ModuleInfo, MinimalPluginContext, EmittedFile, EmittedAsset, CustomPluginOptions, AsyncPluginHooks, ParallelPluginHooks, FunctionPluginHooks, ExistingRawSourceMap, SourceMapInput, OutputBundle, JsxOptions, WatchOptions, Watcher, BuildOptions, };
|
|
28
|
+
export type { RolldownOutput as RollupOutput, RolldownOptions as RollupOptions, RolldownBuild as RollupBuild, RolldownOutputChunk as OutputChunk, RolldownOutputAsset as OutputAsset, RolldownRenderedChunk as RenderedChunk, };
|
|
26
29
|
export type { RollupError, RollupLog, LoggingFunction } from './rollup';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {string} source
|
|
3
|
+
* @param {import('./types').Options} [options]
|
|
4
|
+
*/
|
|
5
|
+
export function getLocator(source: string, options?: import("./types").Options | undefined): (search: string | number, index?: number | undefined) => Location | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* @param {string} source
|
|
8
|
+
* @param {string | number} search
|
|
9
|
+
* @param {import('./types').Options} [options]
|
|
10
|
+
* @returns {Location | undefined}
|
|
11
|
+
*/
|
|
12
|
+
export function locate(source: string, search: string | number, options?: import("./types").Options | undefined): Location | undefined;
|
|
13
|
+
export type Location = import("./types").Location;
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LogHandler } from '../rollup';
|
|
2
2
|
import type { Plugin } from '../plugin';
|
|
3
3
|
import { type LogLevelOption } from './logging';
|
|
4
4
|
import type { InputOptions } from '../options/input-options';
|
|
5
|
-
import type { NormalizedInputOptions } from '../options/normalized-input-options';
|
|
6
|
-
export interface PluginContextMeta {
|
|
7
|
-
rollupVersion: string;
|
|
8
|
-
rolldownVersion: string;
|
|
9
|
-
watchMode: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare class MinimalPluginContext {
|
|
12
|
-
debug: LoggingFunction;
|
|
13
|
-
info: LoggingFunction;
|
|
14
|
-
meta: PluginContextMeta;
|
|
15
|
-
warn: LoggingFunction;
|
|
16
|
-
readonly error: (error: RollupError | string) => never;
|
|
17
|
-
constructor(options: NormalizedInputOptions, plugin: Plugin);
|
|
18
|
-
}
|
|
19
5
|
export declare function getLogger(plugins: Plugin[], onLog: LogHandler, logLevel: LogLevelOption): LogHandler;
|
|
20
|
-
export declare const getOnLog: (config: InputOptions, logLevel: LogLevelOption, printLog?: LogHandler) =>
|
|
6
|
+
export declare const getOnLog: (config: InputOptions, logLevel: LogLevelOption, printLog?: LogHandler) => LogHandler;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export type LogLevel = 'info' | 'debug' | 'warn';
|
|
3
|
+
export type LogLevelOption = LogLevel | 'silent';
|
|
4
|
+
export type LogLevelWithError = LogLevel | 'error';
|
|
5
|
+
export type RollupLog = any;
|
|
6
|
+
export type RollupLogWithString = RollupLog | string;
|
|
2
7
|
export declare const LogLevelSchema: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>;
|
|
3
|
-
export declare const LogLevelWithErrorSchema: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"error">]>;
|
|
4
|
-
export type LogLevel = z.infer<typeof LogLevelSchema>;
|
|
5
8
|
export declare const LogLevelOptionSchema: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>;
|
|
6
|
-
export
|
|
9
|
+
export declare const LogLevelWithErrorSchema: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"error">]>;
|
|
7
10
|
export declare const LOG_LEVEL_SILENT: LogLevelOption;
|
|
8
11
|
export declare const LOG_LEVEL_ERROR = "error";
|
|
9
12
|
export declare const LOG_LEVEL_WARN: LogLevel;
|
package/dist/types/log/logs.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { RollupLog } from '../rollup';
|
|
2
2
|
export declare function logInvalidLogPosition(pluginName: string): RollupLog;
|
|
3
|
+
export declare function logInputHookInOutputPlugin(pluginName: string, hookName: string): RollupLog;
|
|
4
|
+
export declare function logCycleLoading(pluginName: string, moduleId: string): RollupLog;
|
|
3
5
|
export declare function logPluginError(error: Omit<RollupLog, 'code'> & {
|
|
4
6
|
code?: unknown;
|
|
5
7
|
}, plugin: string, { hook, id }?: {
|