rolldown 0.14.0 → 0.15.0-commit.1265c2c
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 +960 -966
- 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 +914 -922
- 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-BFvIen8E.cjs} +13 -11
- package/dist/shared/{consola.36c0034f-HcmWcfPe.cjs → consola_36c0034f-B7L-radJ.cjs} +249 -295
- package/dist/shared/{consola.36c0034f-Xyw7SC_7.mjs → consola_36c0034f-D9ce-831.mjs} +221 -286
- package/dist/shared/{prompt-9Ij3R3TG.cjs → prompt-BiXtYIJ2.cjs} +157 -204
- package/dist/shared/{prompt-hoPhcrA-.mjs → prompt-DlQ-08lk.mjs} +125 -174
- package/dist/shared/src-BtX1cCkj.mjs +2851 -0
- package/dist/shared/src-Di4duR8G.cjs +2985 -0
- package/dist/tsconfig.dts.tsbuildinfo +1 -0
- package/dist/types/api/build.d.ts +16 -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/watch-emitter.d.ts} +17 -17
- package/dist/types/api/watch/watcher.d.ts +13 -0
- package/dist/types/binding.d.ts +273 -49
- 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 +8 -0
- package/dist/types/cli/arguments/index.d.ts +5 -3
- package/dist/types/cli/arguments/normalize.d.ts +2 -6
- package/dist/types/cli/arguments/schema.d.ts +10 -309
- package/dist/types/cli/colors.d.ts +11 -1
- package/dist/types/cli/load-config.d.ts +3 -0
- package/dist/types/cli/logger.d.ts +5 -0
- package/dist/types/constants/plugin.d.ts +10 -1
- package/dist/types/experimental-index.d.ts +5 -2
- package/dist/types/index.d.ts +13 -10
- package/dist/types/log/logger.d.ts +2 -16
- package/dist/types/log/logging.d.ts +11 -8
- package/dist/types/log/logs.d.ts +3 -0
- package/dist/types/options/input-options-schema.d.ts +4 -0
- package/dist/types/options/input-options.d.ts +89 -430
- package/dist/types/options/normalized-input-options.d.ts +17 -11
- package/dist/types/options/normalized-output-options.d.ts +60 -21
- package/dist/types/options/output-options-schema.d.ts +3 -0
- package/dist/types/options/output-options.d.ts +73 -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 -4
- 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/rollup.d.ts +4 -0
- package/dist/types/treeshake/index.d.ts +0 -12
- package/dist/types/treeshake/module-side-effects.d.ts +14 -15
- package/dist/types/types/rolldown-output.d.ts +17 -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/create-bundler-option.d.ts +11 -0
- package/dist/types/utils/define-config.d.ts +3 -0
- package/dist/types/utils/error.d.ts +2 -0
- package/dist/types/utils/misc.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/dist/types/utils/zod-ext.d.ts +6 -5
- 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/cli/utils.d.ts +0 -6
- 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
|
@@ -1,27 +1,66 @@
|
|
|
1
|
+
import { type UnsupportedFnRet } from '../utils/misc';
|
|
2
|
+
import type { BindingNormalizedOptions } from '../binding';
|
|
1
3
|
import type { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../rollup';
|
|
2
|
-
import type { OutputOptions } from './output-options';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type ChunkFileNamesOption = string | ((chunk: PreRenderedChunk) => string) | undefined;
|
|
8
|
-
export interface NormalizedOutputOptions extends OutputOptions {
|
|
9
|
-
plugins: RolldownPlugin[];
|
|
4
|
+
import type { ChunkFileNamesFunction, GlobalsFunction, OutputOptions } from './output-options';
|
|
5
|
+
export type InternalModuleFormat = 'es' | 'cjs' | 'iife' | 'umd' | 'app';
|
|
6
|
+
export interface NormalizedOutputOptions {
|
|
7
|
+
name: string | undefined;
|
|
8
|
+
file: string | undefined;
|
|
10
9
|
dir: string | undefined;
|
|
10
|
+
entryFileNames: string | ChunkFileNamesFunction;
|
|
11
|
+
chunkFileNames: string | ChunkFileNamesFunction;
|
|
12
|
+
assetFileNames: string;
|
|
11
13
|
format: InternalModuleFormat;
|
|
12
|
-
exports: '
|
|
14
|
+
exports: NonNullable<OutputOptions['exports']>;
|
|
13
15
|
sourcemap: boolean | 'inline' | 'hidden';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
banner: AddonFunction;
|
|
17
|
-
footer: AddonFunction;
|
|
18
|
-
intro: AddonFunction;
|
|
19
|
-
outro: AddonFunction;
|
|
20
|
-
esModule: boolean | 'if-default-prop';
|
|
21
|
-
entryFileNames: ChunkFileNamesOption;
|
|
22
|
-
chunkFileNames: ChunkFileNamesOption;
|
|
23
|
-
assetFileNames: string;
|
|
24
|
-
name: string | undefined;
|
|
16
|
+
cssEntryFileNames: string | ChunkFileNamesFunction;
|
|
17
|
+
cssChunkFileNames: string | ChunkFileNamesFunction;
|
|
25
18
|
inlineDynamicImports: boolean;
|
|
19
|
+
externalLiveBindings: boolean;
|
|
20
|
+
banner: OutputOptions['banner'];
|
|
21
|
+
footer: OutputOptions['footer'];
|
|
22
|
+
intro: OutputOptions['intro'];
|
|
23
|
+
outro: OutputOptions['outro'];
|
|
24
|
+
esModule: boolean | 'if-default-prop';
|
|
25
|
+
extend: boolean;
|
|
26
|
+
globals: Record<string, string> | GlobalsFunction;
|
|
27
|
+
hashCharacters: 'base64' | 'base36' | 'hex';
|
|
28
|
+
sourcemapDebugIds: boolean;
|
|
29
|
+
sourcemapIgnoreList: SourcemapIgnoreListOption | undefined;
|
|
30
|
+
sourcemapPathTransform: SourcemapPathTransformOption | undefined;
|
|
31
|
+
minify: boolean;
|
|
32
|
+
comments: 'none' | 'preserve-legal';
|
|
33
|
+
polyfillRequire: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare class NormalizedOutputOptionsImpl implements NormalizedOutputOptions {
|
|
36
|
+
inner: BindingNormalizedOptions;
|
|
37
|
+
constructor(inner: BindingNormalizedOptions);
|
|
38
|
+
get dir(): string | undefined;
|
|
39
|
+
get entryFileNames(): string | UnsupportedFnRet;
|
|
40
|
+
get chunkFileNames(): string | UnsupportedFnRet;
|
|
41
|
+
get assetFileNames(): string;
|
|
42
|
+
get format(): 'es' | 'cjs' | 'app' | 'iife' | 'umd';
|
|
43
|
+
get exports(): 'default' | 'named' | 'none' | 'auto';
|
|
44
|
+
get sourcemap(): boolean | 'inline' | 'hidden';
|
|
45
|
+
get cssEntryFileNames(): string | UnsupportedFnRet;
|
|
46
|
+
get cssChunkFileNames(): string | UnsupportedFnRet;
|
|
47
|
+
get shimMissingExports(): boolean;
|
|
48
|
+
get name(): string | undefined;
|
|
49
|
+
get file(): string | undefined;
|
|
50
|
+
get inlineDynamicImports(): boolean;
|
|
51
|
+
get externalLiveBindings(): boolean;
|
|
52
|
+
get banner(): string | UnsupportedFnRet | undefined;
|
|
53
|
+
get footer(): string | UnsupportedFnRet | undefined;
|
|
54
|
+
get intro(): string | UnsupportedFnRet | undefined;
|
|
55
|
+
get outro(): string | UnsupportedFnRet | undefined;
|
|
56
|
+
get esModule(): boolean | 'if-default-prop';
|
|
57
|
+
get extend(): boolean;
|
|
58
|
+
get globals(): Record<string, string> | UnsupportedFnRet;
|
|
59
|
+
get hashCharacters(): 'base64' | 'base36' | 'hex';
|
|
60
|
+
get sourcemapDebugIds(): boolean;
|
|
61
|
+
get sourcemapIgnoreList(): UnsupportedFnRet | undefined;
|
|
62
|
+
get sourcemapPathTransform(): UnsupportedFnRet | undefined;
|
|
63
|
+
get minify(): boolean;
|
|
64
|
+
get comments(): 'none' | 'preserve-legal';
|
|
65
|
+
get polyfillRequire(): boolean;
|
|
26
66
|
}
|
|
27
|
-
export {};
|
|
@@ -1,270 +1,78 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
minShareCount?: number | undefined;
|
|
45
|
-
test?: string | RegExp | undefined;
|
|
46
|
-
priority?: number | undefined;
|
|
47
|
-
}>, "many">>;
|
|
48
|
-
}, "strict", z.ZodTypeAny, {
|
|
49
|
-
minSize?: number | undefined;
|
|
50
|
-
minShareCount?: number | undefined;
|
|
51
|
-
groups?: {
|
|
52
|
-
name: string;
|
|
53
|
-
minSize?: number | undefined;
|
|
54
|
-
minShareCount?: number | undefined;
|
|
55
|
-
test?: string | RegExp | undefined;
|
|
56
|
-
priority?: number | undefined;
|
|
57
|
-
}[] | undefined;
|
|
58
|
-
}, {
|
|
59
|
-
minSize?: number | undefined;
|
|
60
|
-
minShareCount?: number | undefined;
|
|
61
|
-
groups?: {
|
|
62
|
-
name: string;
|
|
63
|
-
minSize?: number | undefined;
|
|
64
|
-
minShareCount?: number | undefined;
|
|
65
|
-
test?: string | RegExp | undefined;
|
|
66
|
-
priority?: number | undefined;
|
|
67
|
-
}[] | undefined;
|
|
68
|
-
}>>;
|
|
69
|
-
}, "strict", z.ZodTypeAny, {
|
|
70
|
-
footer?: string | ((args_0: RenderedChunk, ...args: unknown[]) => string | Promise<string>) | undefined;
|
|
71
|
-
banner?: string | ((args_0: RenderedChunk, ...args: unknown[]) => string | Promise<string>) | undefined;
|
|
72
|
-
intro?: string | ((args_0: RenderedChunk, ...args: unknown[]) => string | Promise<string>) | undefined;
|
|
73
|
-
outro?: string | ((args_0: RenderedChunk, ...args: unknown[]) => string | Promise<string>) | undefined;
|
|
74
|
-
file?: string | undefined;
|
|
75
|
-
name?: string | undefined;
|
|
76
|
-
exports?: "auto" | "named" | "default" | "none" | undefined;
|
|
77
|
-
dir?: string | undefined;
|
|
78
|
-
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
|
|
79
|
-
sourcemap?: boolean | "inline" | "hidden" | undefined;
|
|
80
|
-
sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption | undefined;
|
|
81
|
-
sourcemapPathTransform?: SourcemapPathTransformOption | undefined;
|
|
82
|
-
extend?: boolean | undefined;
|
|
83
|
-
esModule?: boolean | "if-default-prop" | undefined;
|
|
84
|
-
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
85
|
-
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
86
|
-
assetFileNames?: string | undefined;
|
|
87
|
-
minify?: boolean | undefined;
|
|
88
|
-
globals?: Record<string, string> | undefined;
|
|
89
|
-
externalLiveBindings?: boolean | undefined;
|
|
90
|
-
inlineDynamicImports?: boolean | undefined;
|
|
91
|
-
advancedChunks?: {
|
|
92
|
-
minSize?: number | undefined;
|
|
93
|
-
minShareCount?: number | undefined;
|
|
94
|
-
groups?: {
|
|
95
|
-
name: string;
|
|
96
|
-
minSize?: number | undefined;
|
|
97
|
-
minShareCount?: number | undefined;
|
|
98
|
-
test?: string | RegExp | undefined;
|
|
99
|
-
priority?: number | undefined;
|
|
100
|
-
}[] | undefined;
|
|
101
|
-
} | undefined;
|
|
102
|
-
}, {
|
|
103
|
-
footer?: string | ((args_0: RenderedChunk, ...args: unknown[]) => string | Promise<string>) | undefined;
|
|
104
|
-
banner?: string | ((args_0: RenderedChunk, ...args: unknown[]) => string | Promise<string>) | undefined;
|
|
105
|
-
intro?: string | ((args_0: RenderedChunk, ...args: unknown[]) => string | Promise<string>) | undefined;
|
|
106
|
-
outro?: string | ((args_0: RenderedChunk, ...args: unknown[]) => string | Promise<string>) | undefined;
|
|
107
|
-
file?: string | undefined;
|
|
108
|
-
name?: string | undefined;
|
|
109
|
-
exports?: "auto" | "named" | "default" | "none" | undefined;
|
|
110
|
-
dir?: string | undefined;
|
|
111
|
-
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
|
|
112
|
-
sourcemap?: boolean | "inline" | "hidden" | undefined;
|
|
113
|
-
sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption | undefined;
|
|
114
|
-
sourcemapPathTransform?: SourcemapPathTransformOption | undefined;
|
|
115
|
-
extend?: boolean | undefined;
|
|
116
|
-
esModule?: boolean | "if-default-prop" | undefined;
|
|
117
|
-
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
118
|
-
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
119
|
-
assetFileNames?: string | undefined;
|
|
120
|
-
minify?: boolean | undefined;
|
|
121
|
-
globals?: Record<string, string> | undefined;
|
|
122
|
-
externalLiveBindings?: boolean | undefined;
|
|
123
|
-
inlineDynamicImports?: boolean | undefined;
|
|
1
|
+
import type { StringOrRegExp } from '../types/utils';
|
|
2
|
+
import type { PreRenderedChunk } from '../binding';
|
|
3
|
+
import { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../rollup';
|
|
4
|
+
import { RolldownOutputPluginOption } from '../plugin';
|
|
5
|
+
import { RolldownRenderedChunk } from '../types/rolldown-output';
|
|
6
|
+
export type ModuleFormat = 'es' | 'cjs' | 'esm' | 'module' | 'commonjs' | 'iife' | 'umd' | 'experimental-app';
|
|
7
|
+
export type AddonFunction = (chunk: RolldownRenderedChunk) => string | Promise<string>;
|
|
8
|
+
export type ChunkFileNamesFunction = (chunkInfo: PreRenderedChunk) => string;
|
|
9
|
+
export type GlobalsFunction = (name: string) => string;
|
|
10
|
+
export interface OutputOptions {
|
|
11
|
+
dir?: string;
|
|
12
|
+
file?: string;
|
|
13
|
+
exports?: 'auto' | 'named' | 'default' | 'none';
|
|
14
|
+
hashCharacters?: 'base64' | 'base36' | 'hex';
|
|
15
|
+
/**
|
|
16
|
+
* Expected format of generated code.
|
|
17
|
+
* - `'es'`, `'esm'` and `'module'` are the same format, all stand for ES module.
|
|
18
|
+
* - `'cjs'` and `'commonjs'` are the same format, all stand for CommonJS module.
|
|
19
|
+
* - `'iife'` stands for [Immediately Invoked Function Expression](https://developer.mozilla.org/en-US/docs/Glossary/IIFE).
|
|
20
|
+
* - `'umd'` stands for [Universal Module Definition](https://github.com/umdjs/umd).
|
|
21
|
+
*
|
|
22
|
+
* @default 'esm'
|
|
23
|
+
*/
|
|
24
|
+
format?: ModuleFormat;
|
|
25
|
+
sourcemap?: boolean | 'inline' | 'hidden';
|
|
26
|
+
sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption;
|
|
27
|
+
sourcemapPathTransform?: SourcemapPathTransformOption;
|
|
28
|
+
banner?: string | AddonFunction;
|
|
29
|
+
footer?: string | AddonFunction;
|
|
30
|
+
intro?: string | AddonFunction;
|
|
31
|
+
outro?: string | AddonFunction;
|
|
32
|
+
extend?: boolean;
|
|
33
|
+
esModule?: boolean | 'if-default-prop';
|
|
34
|
+
assetFileNames?: string;
|
|
35
|
+
entryFileNames?: string | ChunkFileNamesFunction;
|
|
36
|
+
chunkFileNames?: string | ChunkFileNamesFunction;
|
|
37
|
+
cssEntryFileNames?: string | ChunkFileNamesFunction;
|
|
38
|
+
cssChunkFileNames?: string | ChunkFileNamesFunction;
|
|
39
|
+
minify?: boolean;
|
|
40
|
+
name?: string;
|
|
41
|
+
globals?: Record<string, string> | GlobalsFunction;
|
|
42
|
+
externalLiveBindings?: boolean;
|
|
43
|
+
inlineDynamicImports?: boolean;
|
|
124
44
|
advancedChunks?: {
|
|
125
|
-
minSize?: number
|
|
126
|
-
minShareCount?: number
|
|
127
|
-
groups?: {
|
|
128
|
-
name: string;
|
|
129
|
-
minSize?: number | undefined;
|
|
130
|
-
minShareCount?: number | undefined;
|
|
131
|
-
test?: string | RegExp | undefined;
|
|
132
|
-
priority?: number | undefined;
|
|
133
|
-
}[] | undefined;
|
|
134
|
-
} | undefined;
|
|
135
|
-
}>;
|
|
136
|
-
export declare const outputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
137
|
-
dir: z.ZodOptional<z.ZodString>;
|
|
138
|
-
file: z.ZodOptional<z.ZodString>;
|
|
139
|
-
exports: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"named">]>, z.ZodLiteral<"default">]>, z.ZodLiteral<"none">]>>;
|
|
140
|
-
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
|
-
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<SourcemapIgnoreListOption, z.ZodTypeDef, SourcemapIgnoreListOption>]>>;
|
|
143
|
-
sourcemapPathTransform: z.ZodOptional<z.ZodType<SourcemapPathTransformOption, z.ZodTypeDef, SourcemapPathTransformOption>>;
|
|
144
|
-
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>]>>]>>;
|
|
145
|
-
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>]>>]>>;
|
|
146
|
-
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>]>>]>>;
|
|
147
|
-
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>]>>]>>;
|
|
148
|
-
extend: z.ZodOptional<z.ZodBoolean>;
|
|
149
|
-
esModule: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"if-default-prop">, z.ZodBoolean]>>;
|
|
150
|
-
entryFileNames: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PreRenderedChunk, z.ZodTypeDef, PreRenderedChunk>], z.ZodUnknown>, z.ZodString>]>>;
|
|
151
|
-
chunkFileNames: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PreRenderedChunk, z.ZodTypeDef, PreRenderedChunk>], z.ZodUnknown>, z.ZodString>]>>;
|
|
152
|
-
assetFileNames: z.ZodOptional<z.ZodString>;
|
|
153
|
-
minify: z.ZodOptional<z.ZodBoolean>;
|
|
154
|
-
name: z.ZodOptional<z.ZodString>;
|
|
155
|
-
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
156
|
-
externalLiveBindings: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
157
|
-
inlineDynamicImports: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
158
|
-
advancedChunks: z.ZodOptional<z.ZodObject<{
|
|
159
|
-
minSize: z.ZodOptional<z.ZodNumber>;
|
|
160
|
-
minShareCount: z.ZodOptional<z.ZodNumber>;
|
|
161
|
-
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
162
|
-
name: z.ZodString;
|
|
163
|
-
test: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>>;
|
|
164
|
-
priority: z.ZodOptional<z.ZodNumber>;
|
|
165
|
-
minSize: z.ZodOptional<z.ZodNumber>;
|
|
166
|
-
minShareCount: z.ZodOptional<z.ZodNumber>;
|
|
167
|
-
}, "strict", z.ZodTypeAny, {
|
|
168
|
-
name: string;
|
|
169
|
-
minSize?: number | undefined;
|
|
170
|
-
minShareCount?: number | undefined;
|
|
171
|
-
test?: string | RegExp | undefined;
|
|
172
|
-
priority?: number | undefined;
|
|
173
|
-
}, {
|
|
174
|
-
name: string;
|
|
175
|
-
minSize?: number | undefined;
|
|
176
|
-
minShareCount?: number | undefined;
|
|
177
|
-
test?: string | RegExp | undefined;
|
|
178
|
-
priority?: number | undefined;
|
|
179
|
-
}>, "many">>;
|
|
180
|
-
}, "strict", z.ZodTypeAny, {
|
|
181
|
-
minSize?: number | undefined;
|
|
182
|
-
minShareCount?: number | undefined;
|
|
183
|
-
groups?: {
|
|
184
|
-
name: string;
|
|
185
|
-
minSize?: number | undefined;
|
|
186
|
-
minShareCount?: number | undefined;
|
|
187
|
-
test?: string | RegExp | undefined;
|
|
188
|
-
priority?: number | undefined;
|
|
189
|
-
}[] | undefined;
|
|
190
|
-
}, {
|
|
191
|
-
minSize?: number | undefined;
|
|
192
|
-
minShareCount?: number | undefined;
|
|
45
|
+
minSize?: number;
|
|
46
|
+
minShareCount?: number;
|
|
193
47
|
groups?: {
|
|
194
48
|
name: string;
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}[]
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
footer?: string | undefined;
|
|
219
|
-
banner?: string | undefined;
|
|
220
|
-
intro?: string | undefined;
|
|
221
|
-
outro?: string | undefined;
|
|
222
|
-
file?: string | undefined;
|
|
223
|
-
name?: string | undefined;
|
|
224
|
-
exports?: "auto" | "named" | "default" | "none" | undefined;
|
|
225
|
-
dir?: string | undefined;
|
|
226
|
-
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
|
|
227
|
-
sourcemap?: boolean | "inline" | "hidden" | undefined;
|
|
228
|
-
extend?: boolean | undefined;
|
|
229
|
-
esModule?: boolean | undefined;
|
|
230
|
-
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
231
|
-
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
232
|
-
assetFileNames?: string | undefined;
|
|
233
|
-
minify?: boolean | undefined;
|
|
234
|
-
globals?: Record<string, string> | undefined;
|
|
235
|
-
externalLiveBindings?: boolean | undefined;
|
|
236
|
-
inlineDynamicImports?: boolean | undefined;
|
|
237
|
-
advancedChunks?: {
|
|
238
|
-
minSize?: number | undefined;
|
|
239
|
-
minShareCount?: number | undefined;
|
|
240
|
-
} | undefined;
|
|
241
|
-
}, {
|
|
242
|
-
footer?: string | undefined;
|
|
243
|
-
banner?: string | undefined;
|
|
244
|
-
intro?: string | undefined;
|
|
245
|
-
outro?: string | undefined;
|
|
246
|
-
file?: string | undefined;
|
|
247
|
-
name?: string | undefined;
|
|
248
|
-
exports?: "auto" | "named" | "default" | "none" | undefined;
|
|
249
|
-
dir?: string | undefined;
|
|
250
|
-
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
|
|
251
|
-
sourcemap?: boolean | "inline" | "hidden" | undefined;
|
|
252
|
-
extend?: boolean | undefined;
|
|
253
|
-
esModule?: boolean | undefined;
|
|
254
|
-
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
255
|
-
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
256
|
-
assetFileNames?: string | undefined;
|
|
257
|
-
minify?: boolean | undefined;
|
|
258
|
-
globals?: Record<string, string> | undefined;
|
|
259
|
-
externalLiveBindings?: boolean | undefined;
|
|
260
|
-
inlineDynamicImports?: boolean | undefined;
|
|
49
|
+
test?: StringOrRegExp;
|
|
50
|
+
priority?: number;
|
|
51
|
+
minSize?: number;
|
|
52
|
+
minShareCount?: number;
|
|
53
|
+
}[];
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Control comments in the output.
|
|
57
|
+
*
|
|
58
|
+
* - `none`: no comments
|
|
59
|
+
* - `preserve-legal`: preserve comments that contain `@license`, `@preserve` or starts with `//!` `/*!`
|
|
60
|
+
*/
|
|
61
|
+
comments?: 'none' | 'preserve-legal';
|
|
62
|
+
plugins?: RolldownOutputPluginOption;
|
|
63
|
+
polyfillRequire?: boolean;
|
|
64
|
+
}
|
|
65
|
+
interface OverwriteOutputOptionsForCli {
|
|
66
|
+
banner?: string;
|
|
67
|
+
footer?: string;
|
|
68
|
+
intro?: string;
|
|
69
|
+
outro?: string;
|
|
70
|
+
esModule?: boolean;
|
|
71
|
+
globals?: Record<string, string>;
|
|
261
72
|
advancedChunks?: {
|
|
262
|
-
minSize?: number
|
|
263
|
-
minShareCount?: number
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
export type
|
|
267
|
-
export type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
|
|
268
|
-
export type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
|
|
269
|
-
export type ModuleFormat = z.infer<typeof ModuleFormatSchema>;
|
|
73
|
+
minSize?: number;
|
|
74
|
+
minShareCount?: number;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export type OutputCliOptions = Omit<OutputOptions, keyof OverwriteOutputOptionsForCli | 'sourcemapIgnoreList' | 'sourcemapPathTransform'> & OverwriteOutputOptionsForCli;
|
|
270
78
|
export {};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type { BindingPluginOptions } from '../binding';
|
|
2
|
-
import type { hookFilterExtension, Plugin } from './index';
|
|
3
|
-
import { NormalizedInputOptions } from '../options/normalized-input-options';
|
|
4
|
-
import { PluginContextData } from './plugin-context-data';
|
|
1
|
+
import type { BindingGeneralHookFilter, BindingPluginOptions, BindingTransformHookFilter } from '../binding';
|
|
5
2
|
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
|
|
3
|
+
import type { BindingifyPluginArgs } from './bindingify-plugin';
|
|
4
|
+
export declare function bindingifyBuildStart(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['buildStart']>;
|
|
5
|
+
export declare function bindingifyBuildEnd(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['buildEnd']>;
|
|
6
|
+
export declare function bindingifyResolveId(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['resolveId'], BindingGeneralHookFilter | undefined>;
|
|
7
|
+
export declare function bindingifyResolveDynamicImport(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['resolveDynamicImport']>;
|
|
8
|
+
export declare function bindingifyTransform(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['transform'], BindingTransformHookFilter | undefined>;
|
|
9
|
+
export declare function bindingifyLoad(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['load'], BindingGeneralHookFilter | undefined>;
|
|
10
|
+
export declare function bindingifyModuleParsed(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['moduleParsed']>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BindingGeneralHookFilter, BindingTransformHookFilter } from '../binding.d';
|
|
2
|
-
import { hookFilterExtension } from '.';
|
|
3
1
|
import type { StringFilter } from './hook-filter';
|
|
2
|
+
import type { HookFilterExtension } from '.';
|
|
3
|
+
import type { BindingGeneralHookFilter, BindingTransformHookFilter } from '../binding.d';
|
|
4
4
|
export declare function bindingifyStringFilter(matcher: StringFilter): BindingGeneralHookFilter;
|
|
5
|
-
export declare function bindingifyResolveIdFilter(filterOption?:
|
|
6
|
-
export declare function bindingifyLoadFilter(filterOption?:
|
|
7
|
-
export declare function bindingifyTransformFilter(filterOption?:
|
|
5
|
+
export declare function bindingifyResolveIdFilter(filterOption?: HookFilterExtension<'resolveId'>['filter']): BindingGeneralHookFilter | undefined;
|
|
6
|
+
export declare function bindingifyLoadFilter(filterOption?: HookFilterExtension<'load'>['filter']): BindingGeneralHookFilter | undefined;
|
|
7
|
+
export declare function bindingifyTransformFilter(filterOption?: HookFilterExtension<'transform'>['filter']): BindingTransformHookFilter | undefined;
|
|
@@ -1,17 +1,14 @@
|
|
|
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
1
|
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta';
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
2
|
+
import type { BindingifyPluginArgs } from './bindingify-plugin';
|
|
3
|
+
import type { BindingPluginOptions } from '../binding';
|
|
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']>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MaybeArray } from '../types/utils';
|
|
2
|
-
import type { StringOrRegExp } from '../
|
|
2
|
+
import type { StringOrRegExp } from '../types/utils';
|
|
3
3
|
import type { ModuleType } from '../index';
|
|
4
4
|
export type StringFilter = MaybeArray<StringOrRegExp> | {
|
|
5
5
|
include?: MaybeArray<StringOrRegExp>;
|