rolldown 0.14.0-snapshot-db4090b-20241123003628 → 0.14.0-snapshot-87f7277-20241125003644
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 +3 -3
- package/dist/cjs/experimental-index.cjs +34 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/parallel-plugin-worker.cjs +2 -2
- package/dist/esm/cli.mjs +3 -3
- package/dist/esm/experimental-index.mjs +34 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/parallel-plugin-worker.mjs +2 -2
- package/dist/shared/rolldown-binding.wasi.cjs +39 -36
- package/dist/shared/{src_index-wJBYWP9G.mjs → src_index-AKIcG6mr.mjs} +229 -278
- package/dist/shared/{src_index-WgTHG2Z9.cjs → src_index-AzJK-lP0.cjs} +230 -280
- package/dist/types/binding.d.ts +23 -18
- package/dist/types/builtin-plugin/alias-plugin.d.ts +10 -0
- package/dist/types/builtin-plugin/constructors.d.ts +16 -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 +12 -0
- package/dist/types/cli/arguments/normalize.d.ts +2 -2
- package/dist/types/experimental-index.d.ts +5 -1
- package/dist/types/index.d.ts +4 -4
- package/dist/types/log/logger.d.ts +2 -16
- package/dist/types/options/input-options-schema.d.ts +588 -0
- package/dist/types/options/input-options.d.ts +99 -586
- package/dist/types/options/normalized-input-options.d.ts +8 -2
- package/dist/types/options/normalized-output-options.d.ts +12 -3
- package/dist/types/options/output-options-schema.d.ts +146 -0
- package/dist/types/options/output-options.d.ts +70 -142
- package/dist/types/options/watch-options.d.ts +5 -0
- package/dist/types/plugin/bindingify-build-hooks.d.ts +9 -10
- package/dist/types/plugin/bindingify-output-hooks.d.ts +12 -15
- 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/index.d.ts +2 -2
- package/dist/types/plugin/minimal-plugin-context.d.ts +15 -0
- package/dist/types/plugin/plugin-context.d.ts +3 -3
- package/dist/types/plugin/transform-plugin-context.d.ts +2 -3
- package/dist/types/rolldown-build.d.ts +2 -2
- package/dist/types/rolldown.d.ts +2 -2
- package/dist/types/types/rolldown-options.d.ts +2 -2
- package/dist/types/utils/bindingify-input-options.d.ts +5 -0
- package/dist/types/utils/bindingify-output-options.d.ts +3 -0
- package/dist/types/utils/create-bundler.d.ts +2 -2
- package/dist/types/utils/normalize-plugin-option.d.ts +1 -1
- package/package.json +15 -15
- package/dist/types/options/bindingify-input-options.d.ts +0 -5
- 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 -94
- package/dist/types/types/input-options.d.ts +0 -101
- package/dist/types/types/output-options.d.ts +0 -74
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { LogHandler } from '../rollup';
|
|
2
|
+
import { BindingNormalizedOptions } from '../binding';
|
|
3
|
+
export declare class NormalizedInputOptions {
|
|
4
|
+
onLog: LogHandler;
|
|
5
|
+
inner: BindingNormalizedOptions;
|
|
6
|
+
constructor(inner: BindingNormalizedOptions, onLog: LogHandler);
|
|
7
|
+
get shimMissingExports(): boolean;
|
|
8
|
+
get input(): string[] | Record<string, string>;
|
|
3
9
|
}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
import type { BindingNormalizedOptions } from '../binding';
|
|
2
|
+
import { ChunkFileNamesFunction } from './output-options';
|
|
3
|
+
export type InternalModuleFormat = 'es' | 'cjs' | 'iife' | 'umd' | 'app';
|
|
4
|
+
export interface NormalizedOutputOptions {
|
|
5
|
+
entryFileNames: string | ChunkFileNamesFunction;
|
|
6
|
+
format: InternalModuleFormat;
|
|
7
|
+
}
|
|
8
|
+
export declare class NormalizedOutputOptionsImpl implements NormalizedOutputOptions {
|
|
9
|
+
inner: BindingNormalizedOptions;
|
|
10
|
+
constructor(inner: BindingNormalizedOptions);
|
|
11
|
+
get entryFileNames(): string | (() => never);
|
|
12
|
+
get format(): "es" | "cjs" | "iife" | "umd" | "app";
|
|
4
13
|
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { RenderedChunk, PreRenderedChunk } from '../binding';
|
|
3
|
+
import type { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../rollup';
|
|
4
|
+
export declare const outputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
5
|
+
dir: z.ZodOptional<z.ZodString>;
|
|
6
|
+
file: z.ZodOptional<z.ZodString>;
|
|
7
|
+
exports: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"named">]>, z.ZodLiteral<"default">]>, z.ZodLiteral<"none">]>>;
|
|
8
|
+
hashCharacters: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"base64">, z.ZodLiteral<"base36">]>, z.ZodLiteral<"hex">]>>;
|
|
9
|
+
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">]>>;
|
|
10
|
+
sourcemap: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"inline">]>, z.ZodLiteral<"hidden">]>>;
|
|
11
|
+
sourcemapIgnoreList: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodType<SourcemapIgnoreListOption, z.ZodTypeDef, SourcemapIgnoreListOption>]>>;
|
|
12
|
+
sourcemapPathTransform: z.ZodOptional<z.ZodType<SourcemapPathTransformOption, z.ZodTypeDef, SourcemapPathTransformOption>>;
|
|
13
|
+
banner: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<RenderedChunk, z.ZodTypeDef, RenderedChunk>], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodPromise<z.ZodString>]>>]>>;
|
|
14
|
+
footer: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<RenderedChunk, z.ZodTypeDef, RenderedChunk>], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodPromise<z.ZodString>]>>]>>;
|
|
15
|
+
intro: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<RenderedChunk, z.ZodTypeDef, RenderedChunk>], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodPromise<z.ZodString>]>>]>>;
|
|
16
|
+
outro: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<RenderedChunk, z.ZodTypeDef, RenderedChunk>], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodPromise<z.ZodString>]>>]>>;
|
|
17
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
esModule: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"if-default-prop">, z.ZodBoolean]>>;
|
|
19
|
+
assetFileNames: z.ZodOptional<z.ZodString>;
|
|
20
|
+
entryFileNames: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PreRenderedChunk, z.ZodTypeDef, PreRenderedChunk>], z.ZodUnknown>, z.ZodString>]>>;
|
|
21
|
+
chunkFileNames: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PreRenderedChunk, z.ZodTypeDef, PreRenderedChunk>], z.ZodUnknown>, z.ZodString>]>>;
|
|
22
|
+
cssEntryFileNames: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PreRenderedChunk, z.ZodTypeDef, PreRenderedChunk>], z.ZodUnknown>, z.ZodString>]>>;
|
|
23
|
+
cssChunkFileNames: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PreRenderedChunk, z.ZodTypeDef, PreRenderedChunk>], z.ZodUnknown>, z.ZodString>]>>;
|
|
24
|
+
minify: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
name: z.ZodOptional<z.ZodString>;
|
|
26
|
+
globals: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodString>]>>;
|
|
27
|
+
externalLiveBindings: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
28
|
+
inlineDynamicImports: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
29
|
+
advancedChunks: z.ZodOptional<z.ZodObject<{
|
|
30
|
+
minSize: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
minShareCount: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
test: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>>;
|
|
35
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
minSize: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
minShareCount: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
}, "strict", z.ZodTypeAny, {
|
|
39
|
+
name: string;
|
|
40
|
+
test?: string | RegExp | undefined;
|
|
41
|
+
minSize?: number | undefined;
|
|
42
|
+
minShareCount?: number | undefined;
|
|
43
|
+
priority?: number | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
name: string;
|
|
46
|
+
test?: string | RegExp | undefined;
|
|
47
|
+
minSize?: number | undefined;
|
|
48
|
+
minShareCount?: number | undefined;
|
|
49
|
+
priority?: number | undefined;
|
|
50
|
+
}>, "many">>;
|
|
51
|
+
}, "strict", z.ZodTypeAny, {
|
|
52
|
+
minSize?: number | undefined;
|
|
53
|
+
minShareCount?: number | undefined;
|
|
54
|
+
groups?: {
|
|
55
|
+
name: string;
|
|
56
|
+
test?: string | RegExp | undefined;
|
|
57
|
+
minSize?: number | undefined;
|
|
58
|
+
minShareCount?: number | undefined;
|
|
59
|
+
priority?: number | undefined;
|
|
60
|
+
}[] | undefined;
|
|
61
|
+
}, {
|
|
62
|
+
minSize?: number | undefined;
|
|
63
|
+
minShareCount?: number | undefined;
|
|
64
|
+
groups?: {
|
|
65
|
+
name: string;
|
|
66
|
+
test?: string | RegExp | undefined;
|
|
67
|
+
minSize?: number | undefined;
|
|
68
|
+
minShareCount?: number | undefined;
|
|
69
|
+
priority?: number | undefined;
|
|
70
|
+
}[] | undefined;
|
|
71
|
+
}>>;
|
|
72
|
+
comments: z.ZodOptional<z.ZodEnum<["none", "preserve-legal"]>>;
|
|
73
|
+
}, {
|
|
74
|
+
banner: z.ZodOptional<z.ZodString>;
|
|
75
|
+
footer: z.ZodOptional<z.ZodString>;
|
|
76
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
77
|
+
outro: z.ZodOptional<z.ZodString>;
|
|
78
|
+
esModule: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
+
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
80
|
+
advancedChunks: z.ZodOptional<z.ZodObject<{
|
|
81
|
+
minSize: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
minShareCount: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
}, "strict", z.ZodTypeAny, {
|
|
84
|
+
minSize?: number | undefined;
|
|
85
|
+
minShareCount?: number | undefined;
|
|
86
|
+
}, {
|
|
87
|
+
minSize?: number | undefined;
|
|
88
|
+
minShareCount?: number | undefined;
|
|
89
|
+
}>>;
|
|
90
|
+
}>, "sourcemapIgnoreList" | "sourcemapPathTransform">, "strict", z.ZodTypeAny, {
|
|
91
|
+
file?: string | undefined;
|
|
92
|
+
name?: string | undefined;
|
|
93
|
+
exports?: "auto" | "named" | "default" | "none" | undefined;
|
|
94
|
+
banner?: string | undefined;
|
|
95
|
+
footer?: string | undefined;
|
|
96
|
+
intro?: string | undefined;
|
|
97
|
+
outro?: string | undefined;
|
|
98
|
+
esModule?: boolean | undefined;
|
|
99
|
+
globals?: Record<string, string> | undefined;
|
|
100
|
+
advancedChunks?: {
|
|
101
|
+
minSize?: number | undefined;
|
|
102
|
+
minShareCount?: number | undefined;
|
|
103
|
+
} | undefined;
|
|
104
|
+
dir?: string | undefined;
|
|
105
|
+
hashCharacters?: "base64" | "base36" | "hex" | undefined;
|
|
106
|
+
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
|
|
107
|
+
sourcemap?: boolean | "inline" | "hidden" | undefined;
|
|
108
|
+
extend?: boolean | undefined;
|
|
109
|
+
assetFileNames?: string | undefined;
|
|
110
|
+
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
111
|
+
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
112
|
+
cssEntryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
113
|
+
cssChunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
114
|
+
minify?: boolean | undefined;
|
|
115
|
+
externalLiveBindings?: boolean | undefined;
|
|
116
|
+
inlineDynamicImports?: boolean | undefined;
|
|
117
|
+
comments?: "none" | "preserve-legal" | undefined;
|
|
118
|
+
}, {
|
|
119
|
+
file?: string | undefined;
|
|
120
|
+
name?: string | undefined;
|
|
121
|
+
exports?: "auto" | "named" | "default" | "none" | undefined;
|
|
122
|
+
banner?: string | undefined;
|
|
123
|
+
footer?: string | undefined;
|
|
124
|
+
intro?: string | undefined;
|
|
125
|
+
outro?: string | undefined;
|
|
126
|
+
esModule?: boolean | undefined;
|
|
127
|
+
globals?: Record<string, string> | undefined;
|
|
128
|
+
advancedChunks?: {
|
|
129
|
+
minSize?: number | undefined;
|
|
130
|
+
minShareCount?: number | undefined;
|
|
131
|
+
} | undefined;
|
|
132
|
+
dir?: string | undefined;
|
|
133
|
+
hashCharacters?: "base64" | "base36" | "hex" | undefined;
|
|
134
|
+
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
|
|
135
|
+
sourcemap?: boolean | "inline" | "hidden" | undefined;
|
|
136
|
+
extend?: boolean | undefined;
|
|
137
|
+
assetFileNames?: string | undefined;
|
|
138
|
+
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
139
|
+
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
140
|
+
cssEntryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
141
|
+
cssChunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
142
|
+
minify?: boolean | undefined;
|
|
143
|
+
externalLiveBindings?: boolean | undefined;
|
|
144
|
+
inlineDynamicImports?: boolean | undefined;
|
|
145
|
+
comments?: "none" | "preserve-legal" | undefined;
|
|
146
|
+
}>;
|
|
@@ -1,146 +1,74 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { StringOrRegExp } from '../types/utils';
|
|
2
2
|
import type { RenderedChunk, PreRenderedChunk } from '../binding';
|
|
3
|
-
import
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
name: string;
|
|
46
|
-
test?: string | RegExp | undefined;
|
|
47
|
-
minSize?: number | undefined;
|
|
48
|
-
minShareCount?: number | undefined;
|
|
49
|
-
priority?: number | undefined;
|
|
50
|
-
}>, "many">>;
|
|
51
|
-
}, "strict", z.ZodTypeAny, {
|
|
52
|
-
minSize?: number | undefined;
|
|
53
|
-
minShareCount?: number | undefined;
|
|
54
|
-
groups?: {
|
|
55
|
-
name: string;
|
|
56
|
-
test?: string | RegExp | undefined;
|
|
57
|
-
minSize?: number | undefined;
|
|
58
|
-
minShareCount?: number | undefined;
|
|
59
|
-
priority?: number | undefined;
|
|
60
|
-
}[] | undefined;
|
|
61
|
-
}, {
|
|
62
|
-
minSize?: number | undefined;
|
|
63
|
-
minShareCount?: number | undefined;
|
|
3
|
+
import { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../rollup';
|
|
4
|
+
export type ModuleFormat = 'es' | 'cjs' | 'esm' | 'module' | 'commonjs' | 'iife' | 'umd';
|
|
5
|
+
export type AddonFunction = (chunk: RenderedChunk) => string | Promise<string>;
|
|
6
|
+
export type ChunkFileNamesFunction = (chunkInfo: PreRenderedChunk) => string;
|
|
7
|
+
export type GlobalsFunction = (name: string) => string;
|
|
8
|
+
export interface OutputOptions {
|
|
9
|
+
dir?: string;
|
|
10
|
+
file?: string;
|
|
11
|
+
exports?: 'auto' | 'named' | 'default' | 'none';
|
|
12
|
+
hashCharacters?: 'base64' | 'base36' | 'hex';
|
|
13
|
+
/**
|
|
14
|
+
* Expected format of generated code.
|
|
15
|
+
* - `'es'`, `'esm'` and `'module'` are the same format, all stand for ES module.
|
|
16
|
+
* - `'cjs'` and `'commonjs'` are the same format, all stand for CommonJS module.
|
|
17
|
+
* - `'iife'` stands for [Immediately Invoked Function Expression](https://developer.mozilla.org/en-US/docs/Glossary/IIFE).
|
|
18
|
+
* - `'umd'` stands for [Universal Module Definition](https://github.com/umdjs/umd).
|
|
19
|
+
*
|
|
20
|
+
* @default 'esm'
|
|
21
|
+
*/
|
|
22
|
+
format?: ModuleFormat;
|
|
23
|
+
sourcemap?: boolean | 'inline' | 'hidden';
|
|
24
|
+
sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption;
|
|
25
|
+
sourcemapPathTransform?: SourcemapPathTransformOption;
|
|
26
|
+
banner?: string | AddonFunction;
|
|
27
|
+
footer?: string | AddonFunction;
|
|
28
|
+
intro?: string | AddonFunction;
|
|
29
|
+
outro?: string | AddonFunction;
|
|
30
|
+
extend?: boolean;
|
|
31
|
+
esModule?: boolean | 'if-default-prop';
|
|
32
|
+
assetFileNames?: string;
|
|
33
|
+
entryFileNames?: string | ChunkFileNamesFunction;
|
|
34
|
+
chunkFileNames?: string | ChunkFileNamesFunction;
|
|
35
|
+
cssEntryFileNames?: string | ChunkFileNamesFunction;
|
|
36
|
+
cssChunkFileNames?: string | ChunkFileNamesFunction;
|
|
37
|
+
minify?: boolean;
|
|
38
|
+
name?: string;
|
|
39
|
+
globals?: Record<string, string> | GlobalsFunction;
|
|
40
|
+
externalLiveBindings?: boolean;
|
|
41
|
+
inlineDynamicImports?: boolean;
|
|
42
|
+
advancedChunks?: {
|
|
43
|
+
minSize?: number;
|
|
44
|
+
minShareCount?: number;
|
|
64
45
|
groups?: {
|
|
65
46
|
name: string;
|
|
66
|
-
test?:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}[]
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
minSize?: number | undefined;
|
|
88
|
-
minShareCount?: number | undefined;
|
|
89
|
-
}>>;
|
|
90
|
-
}>, "sourcemapIgnoreList" | "sourcemapPathTransform">, "strict", z.ZodTypeAny, {
|
|
91
|
-
file?: string | undefined;
|
|
92
|
-
name?: string | undefined;
|
|
93
|
-
exports?: "auto" | "named" | "default" | "none" | undefined;
|
|
94
|
-
banner?: string | undefined;
|
|
95
|
-
footer?: string | undefined;
|
|
96
|
-
intro?: string | undefined;
|
|
97
|
-
outro?: string | undefined;
|
|
98
|
-
esModule?: boolean | undefined;
|
|
99
|
-
globals?: Record<string, string> | undefined;
|
|
100
|
-
advancedChunks?: {
|
|
101
|
-
minSize?: number | undefined;
|
|
102
|
-
minShareCount?: number | undefined;
|
|
103
|
-
} | undefined;
|
|
104
|
-
dir?: string | undefined;
|
|
105
|
-
hashCharacters?: "base64" | "base36" | "hex" | undefined;
|
|
106
|
-
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
|
|
107
|
-
sourcemap?: boolean | "inline" | "hidden" | undefined;
|
|
108
|
-
extend?: boolean | undefined;
|
|
109
|
-
assetFileNames?: string | undefined;
|
|
110
|
-
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
111
|
-
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
112
|
-
cssEntryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
113
|
-
cssChunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
114
|
-
minify?: boolean | undefined;
|
|
115
|
-
externalLiveBindings?: boolean | undefined;
|
|
116
|
-
inlineDynamicImports?: boolean | undefined;
|
|
117
|
-
comments?: "none" | "preserve-legal" | undefined;
|
|
118
|
-
}, {
|
|
119
|
-
file?: string | undefined;
|
|
120
|
-
name?: string | undefined;
|
|
121
|
-
exports?: "auto" | "named" | "default" | "none" | undefined;
|
|
122
|
-
banner?: string | undefined;
|
|
123
|
-
footer?: string | undefined;
|
|
124
|
-
intro?: string | undefined;
|
|
125
|
-
outro?: string | undefined;
|
|
126
|
-
esModule?: boolean | undefined;
|
|
127
|
-
globals?: Record<string, string> | undefined;
|
|
47
|
+
test?: StringOrRegExp;
|
|
48
|
+
priority?: number;
|
|
49
|
+
minSize?: number;
|
|
50
|
+
minShareCount?: number;
|
|
51
|
+
}[];
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Control comments in the output.
|
|
55
|
+
*
|
|
56
|
+
* - `none`: no comments
|
|
57
|
+
* - `preserve-legal`: preserve comments that contain `@license`, `@preserve` or starts with `//!` `/*!`
|
|
58
|
+
*/
|
|
59
|
+
comments?: 'none' | 'preserve-legal';
|
|
60
|
+
}
|
|
61
|
+
interface OverwriteOutputOptionsForCli {
|
|
62
|
+
banner?: string;
|
|
63
|
+
footer?: string;
|
|
64
|
+
intro?: string;
|
|
65
|
+
outro?: string;
|
|
66
|
+
esModule?: boolean;
|
|
67
|
+
globals?: Record<string, string>;
|
|
128
68
|
advancedChunks?: {
|
|
129
|
-
minSize?: number
|
|
130
|
-
minShareCount?: number
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
sourcemap?: boolean | "inline" | "hidden" | undefined;
|
|
136
|
-
extend?: boolean | undefined;
|
|
137
|
-
assetFileNames?: string | undefined;
|
|
138
|
-
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
139
|
-
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
140
|
-
cssEntryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
141
|
-
cssChunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
142
|
-
minify?: boolean | undefined;
|
|
143
|
-
externalLiveBindings?: boolean | undefined;
|
|
144
|
-
inlineDynamicImports?: boolean | undefined;
|
|
145
|
-
comments?: "none" | "preserve-legal" | undefined;
|
|
146
|
-
}>;
|
|
69
|
+
minSize?: number;
|
|
70
|
+
minShareCount?: number;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export type OutputCliOptions = Omit<OutputOptions, keyof OverwriteOutputOptionsForCli | 'sourcemapIgnoreList' | 'sourcemapPathTransform'> & OverwriteOutputOptionsForCli;
|
|
74
|
+
export {};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { BindingPluginOptions } from '../binding';
|
|
2
|
-
import type { hookFilterExtension
|
|
3
|
-
import { NormalizedInputOptions } from '../options/normalized-input-options';
|
|
4
|
-
import { PluginContextData } from './plugin-context-data';
|
|
2
|
+
import type { hookFilterExtension } from './index';
|
|
5
3
|
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta';
|
|
6
|
-
|
|
7
|
-
export declare function
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function
|
|
12
|
-
export declare function
|
|
4
|
+
import type { BindingifyPluginArgs } from './bindingify-plugin';
|
|
5
|
+
export declare function bindingifyBuildStart(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['buildStart']>;
|
|
6
|
+
export declare function bindingifyBuildEnd(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['buildEnd']>;
|
|
7
|
+
export declare function bindingifyResolveId(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['resolveId'], hookFilterExtension<'transform'>>;
|
|
8
|
+
export declare function bindingifyResolveDynamicImport(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['resolveDynamicImport']>;
|
|
9
|
+
export declare function bindingifyTransform(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['transform']>;
|
|
10
|
+
export declare function bindingifyLoad(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['load']>;
|
|
11
|
+
export declare function bindingifyModuleParsed(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['moduleParsed']>;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import type { BindingPluginOptions } from '../binding';
|
|
2
|
-
import type { NormalizedInputOptions } from '../options/normalized-input-options';
|
|
3
|
-
import type { Plugin } from './index';
|
|
4
|
-
import { NormalizedOutputOptions } from '../options/normalized-output-options';
|
|
5
|
-
import { PluginContextData } from './plugin-context-data';
|
|
6
2
|
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta';
|
|
7
|
-
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function
|
|
12
|
-
export declare function
|
|
13
|
-
export declare function
|
|
14
|
-
export declare function
|
|
15
|
-
export declare function
|
|
16
|
-
export declare function
|
|
17
|
-
export declare function
|
|
3
|
+
import type { BindingifyPluginArgs } from './bindingify-plugin';
|
|
4
|
+
export declare function bindingifyRenderStart(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['renderStart']>;
|
|
5
|
+
export declare function bindingifyRenderChunk(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['renderChunk']>;
|
|
6
|
+
export declare function bindingifyAugmentChunkHash(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['augmentChunkHash']>;
|
|
7
|
+
export declare function bindingifyRenderError(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['renderError']>;
|
|
8
|
+
export declare function bindingifyGenerateBundle(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['generateBundle']>;
|
|
9
|
+
export declare function bindingifyWriteBundle(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['writeBundle']>;
|
|
10
|
+
export declare function bindingifyCloseBundle(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['closeBundle']>;
|
|
11
|
+
export declare function bindingifyBanner(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['banner']>;
|
|
12
|
+
export declare function bindingifyFooter(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['footer']>;
|
|
13
|
+
export declare function bindingifyIntro(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['intro']>;
|
|
14
|
+
export declare function bindingifyOutro(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['outro']>;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import type { BindingPluginOptions } from '../binding';
|
|
2
2
|
import type { Plugin } from './index';
|
|
3
|
-
import type {
|
|
4
|
-
import type { NormalizedOutputOptions } from '../options/normalized-output-options';
|
|
3
|
+
import type { OutputOptions } from '../options/output-options';
|
|
5
4
|
import { PluginContextData } from './plugin-context-data';
|
|
6
|
-
|
|
5
|
+
import type { LogHandler, LogLevelOption } from '../rollup';
|
|
6
|
+
import type { InputOptions } from '../options/input-options';
|
|
7
|
+
export interface BindingifyPluginArgs {
|
|
8
|
+
plugin: Plugin;
|
|
9
|
+
options: InputOptions;
|
|
10
|
+
outputOptions: OutputOptions;
|
|
11
|
+
pluginContextData: PluginContextData;
|
|
12
|
+
onLog: LogHandler;
|
|
13
|
+
logLevel: LogLevelOption;
|
|
14
|
+
}
|
|
15
|
+
export declare function bindingifyPlugin(plugin: Plugin, options: InputOptions, outputOptions: OutputOptions, pluginContextData: PluginContextData, onLog: LogHandler, logLevel: LogLevelOption): BindingPluginOptions;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { BindingPluginOptions } from '../binding';
|
|
2
|
-
import type { NormalizedInputOptions } from '../options/normalized-input-options';
|
|
3
|
-
import type { Plugin } from './index';
|
|
4
|
-
import { PluginContextData } from './plugin-context-data';
|
|
5
2
|
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta';
|
|
6
|
-
|
|
7
|
-
export declare function
|
|
3
|
+
import { BindingifyPluginArgs } from './bindingify-plugin';
|
|
4
|
+
export declare function bindingifyWatchChange(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['watchChange']>;
|
|
5
|
+
export declare function bindingifyCloseWatcher(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['closeWatcher']>;
|
|
@@ -9,9 +9,9 @@ import type { TransformPluginContext } from './transform-plugin-context';
|
|
|
9
9
|
import type { NormalizedOutputOptions } from '../options/normalized-output-options';
|
|
10
10
|
import type { LogLevel } from '../log/logging';
|
|
11
11
|
import type { RollupLog } from '../rollup';
|
|
12
|
-
import type { MinimalPluginContext } from '
|
|
12
|
+
import type { MinimalPluginContext } from './minimal-plugin-context';
|
|
13
13
|
import { InputOptions, OutputOptions } from '..';
|
|
14
|
-
import { BuiltinPlugin } from '
|
|
14
|
+
import { BuiltinPlugin } from '../builtin-plugin/constructors';
|
|
15
15
|
import { ParallelPlugin } from './parallel-plugin';
|
|
16
16
|
import type { DefinedHookNames } from '../constants/plugin';
|
|
17
17
|
import { DEFINED_HOOK_NAMES } from '../constants/plugin';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { LoggingFunction, LogHandler, LogLevelOption, RollupError } from '../rollup';
|
|
2
|
+
import type { Plugin } from '../plugin';
|
|
3
|
+
export interface PluginContextMeta {
|
|
4
|
+
rollupVersion: string;
|
|
5
|
+
rolldownVersion: string;
|
|
6
|
+
watchMode: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class MinimalPluginContext {
|
|
9
|
+
info: LoggingFunction;
|
|
10
|
+
warn: LoggingFunction;
|
|
11
|
+
debug: LoggingFunction;
|
|
12
|
+
meta: PluginContextMeta;
|
|
13
|
+
readonly error: (error: RollupError | string) => never;
|
|
14
|
+
constructor(onLog: LogHandler, logLevel: LogLevelOption, plugin: Plugin);
|
|
15
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { BindingPluginContext } from '../binding';
|
|
2
|
-
import type { NormalizedInputOptions } from '../options/normalized-input-options';
|
|
3
2
|
import type { CustomPluginOptions, ModuleOptions, Plugin, ResolvedId } from './index';
|
|
4
|
-
import { MinimalPluginContext } from '../
|
|
3
|
+
import { MinimalPluginContext } from '../plugin/minimal-plugin-context';
|
|
5
4
|
import { AssetSource } from '../utils/asset-source';
|
|
6
5
|
import { ModuleInfo } from '../types/module-info';
|
|
7
6
|
import { PluginContextData } from './plugin-context-data';
|
|
8
7
|
import { SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF } from '../constants/plugin-context';
|
|
9
8
|
import { PartialNull } from '../types/utils';
|
|
9
|
+
import type { LogHandler, LogLevelOption } from '../rollup';
|
|
10
10
|
export interface EmittedAsset {
|
|
11
11
|
type: 'asset';
|
|
12
12
|
name?: string;
|
|
@@ -37,5 +37,5 @@ export declare class PluginContext extends MinimalPluginContext {
|
|
|
37
37
|
* @deprecated This rollup API won't be supported by rolldown. Using this API will cause runtime error.
|
|
38
38
|
*/
|
|
39
39
|
readonly parse: (input: string, options?: any) => any;
|
|
40
|
-
constructor(
|
|
40
|
+
constructor(context: BindingPluginContext, plugin: Plugin, data: PluginContextData, onLog: LogHandler, logLevel: LogLevelOption);
|
|
41
41
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { BindingPluginContext, BindingTransformPluginContext } from '../binding';
|
|
2
|
-
import type { RollupError } from '../rollup';
|
|
2
|
+
import type { LogHandler, LogLevelOption, RollupError } from '../rollup';
|
|
3
3
|
import { PluginContext } from './plugin-context';
|
|
4
4
|
import { PluginContextData } from './plugin-context-data';
|
|
5
|
-
import { NormalizedInputOptions } from '..';
|
|
6
5
|
import type { Plugin } from './index';
|
|
7
6
|
export declare class TransformPluginContext extends PluginContext {
|
|
8
7
|
error: (error: RollupError | string, pos?: number | {
|
|
9
8
|
column: number;
|
|
10
9
|
line: number;
|
|
11
10
|
}) => never;
|
|
12
|
-
constructor(
|
|
11
|
+
constructor(context: BindingPluginContext, plugin: Plugin, data: PluginContextData, inner: BindingTransformPluginContext, moduleId: string, moduleSource: string, onLog: LogHandler, LogLevelOption: LogLevelOption);
|
|
13
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { InputOptions } from './
|
|
2
|
-
import type { OutputOptions } from './
|
|
1
|
+
import type { InputOptions } from './options/input-options';
|
|
2
|
+
import type { OutputOptions } from './options/output-options';
|
|
3
3
|
import type { RolldownOutput } from './types/rolldown-output';
|
|
4
4
|
export declare class RolldownBuild {
|
|
5
5
|
#private;
|
package/dist/types/rolldown.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { InputOptions } from './
|
|
1
|
+
import type { InputOptions } from './options/input-options';
|
|
2
2
|
import { RolldownBuild } from './rolldown-build';
|
|
3
3
|
import { Watcher } from './watcher';
|
|
4
|
-
import { WatchOptions } from './options/watch-
|
|
4
|
+
import { WatchOptions } from './options/watch-options';
|
|
5
5
|
export declare const rolldown: (input: InputOptions) => Promise<RolldownBuild>;
|
|
6
6
|
export declare const watch: (input: WatchOptions) => Promise<Watcher>;
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { InputOptions } from '../
|
|
2
|
-
import type { OutputOptions } from '../
|
|
1
|
+
import type { InputOptions } from '../options/input-options';
|
|
2
|
+
import type { OutputOptions } from '../options/output-options';
|
|
3
3
|
export interface RolldownOptions extends InputOptions {
|
|
4
4
|
output?: OutputOptions;
|
|
5
5
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RolldownPlugin } from '..';
|
|
2
|
+
import type { InputOptions } from '../options/input-options';
|
|
3
|
+
import type { OutputOptions } from '../options/output-options';
|
|
4
|
+
import type { BindingInputOptions } from '../binding';
|
|
5
|
+
export declare function bindingifyInputOptions(rawPlugins: RolldownPlugin[], inputOptions: InputOptions, outputOptions: OutputOptions): BindingInputOptions;
|