rolldown 1.0.0-beta.3-commit.72028a5 → 1.0.0-beta.30
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/bin/cli.mjs +2 -0
- package/dist/{cjs/cli.cjs → cli.cjs} +620 -620
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.mts +1 -0
- package/dist/{esm/cli.mjs → cli.mjs} +596 -593
- package/dist/config.cjs +12 -0
- package/dist/config.d.cts +10 -0
- package/dist/config.d.mts +10 -0
- package/dist/config.mjs +10 -0
- package/dist/experimental-index.cjs +105 -0
- package/dist/experimental-index.d.cts +58 -0
- package/dist/experimental-index.d.mts +58 -0
- package/dist/experimental-index.mjs +82 -0
- package/dist/experimental-runtime-types.d.ts +66 -0
- package/dist/filter-index.cjs +105 -0
- package/dist/filter-index.d.cts +4 -0
- package/dist/filter-index.d.mts +4 -0
- package/dist/filter-index.mjs +44 -0
- package/dist/index.cjs +9 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +5 -0
- package/dist/{cjs/parallel-plugin-worker.cjs → parallel-plugin-worker.cjs} +6 -15
- package/dist/parallel-plugin-worker.d.cts +1 -0
- package/dist/parallel-plugin-worker.d.mts +1 -0
- package/dist/{esm/parallel-plugin-worker.mjs → parallel-plugin-worker.mjs} +5 -13
- package/dist/{cjs/parallel-plugin.cjs → parallel-plugin.cjs} +1 -2
- package/dist/parallel-plugin.d.cts +14 -0
- package/dist/parallel-plugin.d.mts +14 -0
- package/dist/{esm/parallel-plugin.mjs → parallel-plugin.mjs} +0 -1
- package/dist/parse-ast-index.cjs +4 -0
- package/dist/parse-ast-index.d.cts +8 -0
- package/dist/parse-ast-index.d.mts +8 -0
- package/dist/parse-ast-index.mjs +3 -0
- package/dist/shared/binding-BAyrv67G.d.cts +1309 -0
- package/dist/shared/binding-DUz1Q2JW.d.mts +1309 -0
- package/dist/shared/{chunk-qZFfknuJ.cjs → chunk-DDkG_k5U.cjs} +0 -1
- package/dist/shared/define-config-CMH1jWhX.d.cts +1331 -0
- package/dist/shared/define-config-D_KKKWbo.d.mts +1331 -0
- package/dist/shared/load-config-BWjPkvnW.mjs +119 -0
- package/dist/shared/load-config-BtTrX40c.cjs +125 -0
- package/dist/shared/misc-CQeo-AFx.mjs +22 -0
- package/dist/shared/misc-DksvspN4.cjs +58 -0
- package/dist/shared/parse-ast-index-DrqwhzH4.cjs +784 -0
- package/dist/shared/parse-ast-index-DyFjvjrb.mjs +656 -0
- package/dist/shared/{prompt-CxK9euq3.mjs → prompt-C5jz26Zn.mjs} +241 -240
- package/dist/shared/{prompt-ZZScCEWI.cjs → prompt-QNI93ne7.cjs} +245 -245
- package/dist/shared/src-CRRyjCYJ.cjs +4573 -0
- package/dist/shared/src-DR2upIfp.mjs +4381 -0
- package/package.json +69 -69
- package/bin/cli.js +0 -2
- package/dist/cjs/experimental-index.cjs +0 -85
- package/dist/cjs/index.cjs +0 -8
- package/dist/cjs/parse-ast-index.cjs +0 -4
- package/dist/esm/experimental-index.mjs +0 -57
- package/dist/esm/index.mjs +0 -4
- package/dist/esm/parse-ast-index.mjs +0 -3
- package/dist/shared/parse-ast-index-DIxeQDpE.mjs +0 -674
- package/dist/shared/parse-ast-index-Dh_sWnMa.cjs +0 -719
- package/dist/shared/src-CMVXQY3z.mjs +0 -2826
- package/dist/shared/src-CmTdtdJj.cjs +0 -3007
- package/dist/types/api/build.d.ts +0 -18
- package/dist/types/api/experimental.d.ts +0 -7
- package/dist/types/api/rolldown/index.d.ts +0 -3
- package/dist/types/api/rolldown/rolldown-build.d.ts +0 -13
- package/dist/types/api/watch/index.d.ts +0 -3
- package/dist/types/api/watch/watch-emitter.d.ts +0 -31
- package/dist/types/api/watch/watcher.d.ts +0 -13
- package/dist/types/binding.d.ts +0 -1435
- package/dist/types/builtin-plugin/alias-plugin.d.ts +0 -10
- package/dist/types/builtin-plugin/constructors.d.ts +0 -21
- package/dist/types/builtin-plugin/replace-plugin.d.ts +0 -28
- package/dist/types/builtin-plugin/transform-plugin.d.ts +0 -9
- package/dist/types/builtin-plugin/utils.d.ts +0 -8
- package/dist/types/cli/arguments/alias.d.ts +0 -16
- package/dist/types/cli/arguments/index.d.ts +0 -15
- package/dist/types/cli/arguments/normalize.d.ts +0 -12
- package/dist/types/cli/arguments/utils.d.ts +0 -8
- package/dist/types/cli/colors.d.ts +0 -11
- package/dist/types/cli/commands/bundle.d.ts +0 -3
- package/dist/types/cli/commands/help.d.ts +0 -1
- package/dist/types/cli/index.d.ts +0 -1
- package/dist/types/cli/load-config.d.ts +0 -5
- package/dist/types/cli/logger.d.ts +0 -5
- package/dist/types/constants/plugin-context.d.ts +0 -7
- package/dist/types/constants/plugin.d.ts +0 -45
- package/dist/types/experimental-index.d.ts +0 -9
- package/dist/types/index.d.ts +0 -30
- package/dist/types/log/log-handler.d.ts +0 -4
- package/dist/types/log/logger.d.ts +0 -6
- package/dist/types/log/logging.d.ts +0 -12
- package/dist/types/log/logs.d.ts +0 -18
- package/dist/types/options/input-options.d.ts +0 -181
- package/dist/types/options/normalized-input-options.d.ts +0 -18
- package/dist/types/options/normalized-output-options.d.ts +0 -70
- package/dist/types/options/output-options.d.ts +0 -182
- package/dist/types/options/watch-options.d.ts +0 -5
- package/dist/types/parallel-plugin-worker.d.ts +0 -1
- package/dist/types/parallel-plugin.d.ts +0 -1
- package/dist/types/parse-ast-index.d.ts +0 -5
- package/dist/types/plugin/bindingify-build-hooks.d.ts +0 -10
- package/dist/types/plugin/bindingify-hook-filter.d.ts +0 -7
- package/dist/types/plugin/bindingify-output-hooks.d.ts +0 -14
- package/dist/types/plugin/bindingify-plugin-hook-meta.d.ts +0 -8
- package/dist/types/plugin/bindingify-plugin.d.ts +0 -16
- package/dist/types/plugin/bindingify-watch-hooks.d.ts +0 -5
- package/dist/types/plugin/hook-filter.d.ts +0 -48
- package/dist/types/plugin/index.d.ts +0 -134
- package/dist/types/plugin/minimal-plugin-context.d.ts +0 -23
- package/dist/types/plugin/parallel-plugin-implementation.d.ts +0 -10
- package/dist/types/plugin/parallel-plugin.d.ts +0 -9
- package/dist/types/plugin/plugin-context-data.d.ts +0 -17
- package/dist/types/plugin/plugin-context.d.ts +0 -67
- package/dist/types/plugin/plugin-driver.d.ts +0 -8
- package/dist/types/plugin/transform-plugin-context.d.ts +0 -28
- package/dist/types/types/assert.d.ts +0 -14
- package/dist/types/types/config-export.d.ts +0 -5
- package/dist/types/types/misc.d.ts +0 -40
- package/dist/types/types/module-info.d.ts +0 -15
- package/dist/types/types/module-side-effects.d.ts +0 -12
- package/dist/types/types/output-bundle.d.ts +0 -4
- package/dist/types/types/rolldown-options.d.ts +0 -5
- package/dist/types/types/rolldown-output.d.ts +0 -66
- package/dist/types/types/schema.d.ts +0 -33
- package/dist/types/types/sourcemap.d.ts +0 -14
- package/dist/types/types/utils.d.ts +0 -13
- package/dist/types/utils/asset-source.d.ts +0 -4
- package/dist/types/utils/async-flatten.d.ts +0 -1
- package/dist/types/utils/bindingify-input-options.d.ts +0 -7
- package/dist/types/utils/bindingify-output-options.d.ts +0 -5
- package/dist/types/utils/code-frame.d.ts +0 -1
- package/dist/types/utils/compose-js-plugins.d.ts +0 -2
- package/dist/types/utils/create-bundler-option.d.ts +0 -11
- package/dist/types/utils/create-bundler.d.ts +0 -8
- package/dist/types/utils/define-config.d.ts +0 -5
- package/dist/types/utils/error.d.ts +0 -2
- package/dist/types/utils/initialize-parallel-plugins.d.ts +0 -19
- package/dist/types/utils/misc.d.ts +0 -6
- package/dist/types/utils/normalize-hook.d.ts +0 -7
- package/dist/types/utils/normalize-plugin-option.d.ts +0 -13
- package/dist/types/utils/normalize-string-or-regex.d.ts +0 -2
- package/dist/types/utils/plugin/index.d.ts +0 -2
- package/dist/types/utils/transform-module-info.d.ts +0 -4
- package/dist/types/utils/transform-rendered-chunk.d.ts +0 -4
- package/dist/types/utils/transform-rendered-module.d.ts +0 -3
- package/dist/types/utils/transform-side-effects.d.ts +0 -3
- package/dist/types/utils/transform-sourcemap.d.ts +0 -3
- package/dist/types/utils/transform-to-rollup-output.d.ts +0 -11
- package/dist/types/utils/validator.d.ts +0 -6
package/dist/config.cjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const require_src = require('./shared/src-CRRyjCYJ.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-DrqwhzH4.cjs');
|
|
3
|
+
require('./shared/misc-DksvspN4.cjs');
|
|
4
|
+
const require_load_config = require('./shared/load-config-BtTrX40c.cjs');
|
|
5
|
+
|
|
6
|
+
//#region src/config.ts
|
|
7
|
+
const VERSION = require_src.version;
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
exports.VERSION = VERSION;
|
|
11
|
+
exports.defineConfig = require_src.defineConfig;
|
|
12
|
+
exports.loadConfig = require_load_config.loadConfig;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "./shared/binding-BAyrv67G.cjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-CMH1jWhX.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/load-config.d.ts
|
|
5
|
+
declare function loadConfig(configPath: string): Promise<ConfigExport>;
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/config.d.ts
|
|
8
|
+
declare const VERSION: string;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { VERSION, defineConfig, loadConfig };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "./shared/binding-DUz1Q2JW.mjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-D_KKKWbo.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/load-config.d.ts
|
|
5
|
+
declare function loadConfig(configPath: string): Promise<ConfigExport>;
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/config.d.ts
|
|
8
|
+
declare const VERSION: string;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { VERSION, defineConfig, loadConfig };
|
package/dist/config.mjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "./shared/parse-ast-index-DyFjvjrb.mjs";
|
|
2
|
+
import { defineConfig, version } from "./shared/src-DR2upIfp.mjs";
|
|
3
|
+
import "./shared/misc-CQeo-AFx.mjs";
|
|
4
|
+
import { loadConfig } from "./shared/load-config-BWjPkvnW.mjs";
|
|
5
|
+
|
|
6
|
+
//#region src/config.ts
|
|
7
|
+
const VERSION = version;
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { VERSION, defineConfig, loadConfig };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
+
const require_src = require('./shared/src-CRRyjCYJ.cjs');
|
|
3
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-DrqwhzH4.cjs');
|
|
4
|
+
require('./shared/misc-DksvspN4.cjs');
|
|
5
|
+
const node_url = require_chunk.__toESM(require("node:url"));
|
|
6
|
+
|
|
7
|
+
//#region src/api/experimental.ts
|
|
8
|
+
/**
|
|
9
|
+
* This is an experimental API. It's behavior may change in the future.
|
|
10
|
+
*
|
|
11
|
+
* Calling this API will only execute the scan stage of rolldown.
|
|
12
|
+
*/
|
|
13
|
+
const experimental_scan = async (input) => {
|
|
14
|
+
const inputOptions = await require_src.PluginDriver.callOptionsHook(input);
|
|
15
|
+
const { impl: bundler, stopWorkers } = await require_src.createBundlerImpl(new require_parse_ast_index.BindingBundler(), inputOptions, {});
|
|
16
|
+
const output = await bundler.scan();
|
|
17
|
+
require_src.handleOutputErrors(output);
|
|
18
|
+
await stopWorkers?.();
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/plugin/parallel-plugin.ts
|
|
23
|
+
function defineParallelPlugin(pluginPath) {
|
|
24
|
+
return (options) => {
|
|
25
|
+
return { _parallel: {
|
|
26
|
+
fileUrl: (0, node_url.pathToFileURL)(pluginPath).href,
|
|
27
|
+
options
|
|
28
|
+
} };
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/builtin-plugin/alias-plugin.ts
|
|
34
|
+
function aliasPlugin(config) {
|
|
35
|
+
return new require_src.BuiltinPlugin("builtin:alias", config);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/builtin-plugin/replace-plugin.ts
|
|
40
|
+
/**
|
|
41
|
+
* Replaces targeted strings in files while bundling.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* // Basic usage
|
|
45
|
+
* ```js
|
|
46
|
+
* replacePlugin({
|
|
47
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
48
|
+
* __buildVersion: 15
|
|
49
|
+
* })
|
|
50
|
+
* ```
|
|
51
|
+
* @example
|
|
52
|
+
* // With options
|
|
53
|
+
* ```js
|
|
54
|
+
* replacePlugin({
|
|
55
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
56
|
+
* __buildVersion: 15
|
|
57
|
+
* }, {
|
|
58
|
+
* preventAssignment: false,
|
|
59
|
+
* })
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
function replacePlugin(values = {}, options = {}) {
|
|
63
|
+
return new require_src.BuiltinPlugin("builtin:replace", {
|
|
64
|
+
...options,
|
|
65
|
+
values
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/builtin-plugin/transform-plugin.ts
|
|
71
|
+
function transformPlugin(config) {
|
|
72
|
+
if (config) config = {
|
|
73
|
+
...config,
|
|
74
|
+
include: require_src.normalizedStringOrRegex(config.include),
|
|
75
|
+
exclude: require_src.normalizedStringOrRegex(config.exclude),
|
|
76
|
+
jsxRefreshInclude: require_src.normalizedStringOrRegex(config.jsxRefreshInclude),
|
|
77
|
+
jsxRefreshExclude: require_src.normalizedStringOrRegex(config.jsxRefreshExclude)
|
|
78
|
+
};
|
|
79
|
+
return new require_src.BuiltinPlugin("builtin:transform", config);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
//#endregion
|
|
83
|
+
exports.ResolverFactory = require_parse_ast_index.ResolverFactory;
|
|
84
|
+
exports.aliasPlugin = aliasPlugin;
|
|
85
|
+
exports.assetPlugin = require_src.assetPlugin;
|
|
86
|
+
exports.buildImportAnalysisPlugin = require_src.buildImportAnalysisPlugin;
|
|
87
|
+
exports.defineParallelPlugin = defineParallelPlugin;
|
|
88
|
+
exports.dynamicImportVarsPlugin = require_src.dynamicImportVarsPlugin;
|
|
89
|
+
exports.importGlobPlugin = require_src.importGlobPlugin;
|
|
90
|
+
exports.isolatedDeclaration = require_parse_ast_index.isolatedDeclaration;
|
|
91
|
+
exports.isolatedDeclarationPlugin = require_src.isolatedDeclarationPlugin;
|
|
92
|
+
exports.jsonPlugin = require_src.jsonPlugin;
|
|
93
|
+
exports.loadFallbackPlugin = require_src.loadFallbackPlugin;
|
|
94
|
+
exports.manifestPlugin = require_src.manifestPlugin;
|
|
95
|
+
exports.modulePreloadPolyfillPlugin = require_src.modulePreloadPolyfillPlugin;
|
|
96
|
+
exports.moduleRunnerTransform = require_parse_ast_index.moduleRunnerTransform;
|
|
97
|
+
exports.replacePlugin = replacePlugin;
|
|
98
|
+
exports.reporterPlugin = require_src.reporterPlugin;
|
|
99
|
+
exports.scan = experimental_scan;
|
|
100
|
+
exports.transform = require_parse_ast_index.transform;
|
|
101
|
+
exports.transformPlugin = transformPlugin;
|
|
102
|
+
exports.viteResolvePlugin = require_src.viteResolvePlugin;
|
|
103
|
+
exports.wasmFallbackPlugin = require_src.wasmFallbackPlugin;
|
|
104
|
+
exports.wasmHelperPlugin = require_src.wasmHelperPlugin;
|
|
105
|
+
exports.webWorkerPostPlugin = require_src.webWorkerPostPlugin;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-BAyrv67G.cjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-CMH1jWhX.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/api/experimental.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* This is an experimental API. It's behavior may change in the future.
|
|
8
|
+
*
|
|
9
|
+
* Calling this API will only execute the scan stage of rolldown.
|
|
10
|
+
*/
|
|
11
|
+
declare const experimental_scan: (input: InputOptions) => Promise<void>;
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/builtin-plugin/alias-plugin.d.ts
|
|
14
|
+
type AliasPluginAlias = {
|
|
15
|
+
find: string | RegExp;
|
|
16
|
+
replacement: string;
|
|
17
|
+
};
|
|
18
|
+
type AliasPluginConfig = {
|
|
19
|
+
entries: AliasPluginAlias[];
|
|
20
|
+
};
|
|
21
|
+
declare function aliasPlugin(config: AliasPluginConfig): BuiltinPlugin;
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/builtin-plugin/replace-plugin.d.ts
|
|
24
|
+
/**
|
|
25
|
+
* Replaces targeted strings in files while bundling.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // Basic usage
|
|
29
|
+
* ```js
|
|
30
|
+
* replacePlugin({
|
|
31
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
32
|
+
* __buildVersion: 15
|
|
33
|
+
* })
|
|
34
|
+
* ```
|
|
35
|
+
* @example
|
|
36
|
+
* // With options
|
|
37
|
+
* ```js
|
|
38
|
+
* replacePlugin({
|
|
39
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
40
|
+
* __buildVersion: 15
|
|
41
|
+
* }, {
|
|
42
|
+
* preventAssignment: false,
|
|
43
|
+
* })
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
declare function replacePlugin(values?: BindingReplacePluginConfig["values"], options?: Omit<BindingReplacePluginConfig, "values">): BuiltinPlugin;
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/builtin-plugin/transform-plugin.d.ts
|
|
49
|
+
type TransformPattern = string | RegExp | readonly (RegExp | string)[];
|
|
50
|
+
type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exclude" | "jsxRefreshInclude" | "jsxRefreshExclude"> & {
|
|
51
|
+
include?: TransformPattern;
|
|
52
|
+
exclude?: TransformPattern;
|
|
53
|
+
jsxRefreshInclude?: TransformPattern;
|
|
54
|
+
jsxRefreshExclude?: TransformPattern;
|
|
55
|
+
};
|
|
56
|
+
declare function transformPlugin(config?: TransformPluginConfig): BuiltinPlugin;
|
|
57
|
+
//#endregion
|
|
58
|
+
export { type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-DUz1Q2JW.mjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-D_KKKWbo.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/api/experimental.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* This is an experimental API. It's behavior may change in the future.
|
|
8
|
+
*
|
|
9
|
+
* Calling this API will only execute the scan stage of rolldown.
|
|
10
|
+
*/
|
|
11
|
+
declare const experimental_scan: (input: InputOptions) => Promise<void>;
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/builtin-plugin/alias-plugin.d.ts
|
|
14
|
+
type AliasPluginAlias = {
|
|
15
|
+
find: string | RegExp;
|
|
16
|
+
replacement: string;
|
|
17
|
+
};
|
|
18
|
+
type AliasPluginConfig = {
|
|
19
|
+
entries: AliasPluginAlias[];
|
|
20
|
+
};
|
|
21
|
+
declare function aliasPlugin(config: AliasPluginConfig): BuiltinPlugin;
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/builtin-plugin/replace-plugin.d.ts
|
|
24
|
+
/**
|
|
25
|
+
* Replaces targeted strings in files while bundling.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // Basic usage
|
|
29
|
+
* ```js
|
|
30
|
+
* replacePlugin({
|
|
31
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
32
|
+
* __buildVersion: 15
|
|
33
|
+
* })
|
|
34
|
+
* ```
|
|
35
|
+
* @example
|
|
36
|
+
* // With options
|
|
37
|
+
* ```js
|
|
38
|
+
* replacePlugin({
|
|
39
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
40
|
+
* __buildVersion: 15
|
|
41
|
+
* }, {
|
|
42
|
+
* preventAssignment: false,
|
|
43
|
+
* })
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
declare function replacePlugin(values?: BindingReplacePluginConfig["values"], options?: Omit<BindingReplacePluginConfig, "values">): BuiltinPlugin;
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/builtin-plugin/transform-plugin.d.ts
|
|
49
|
+
type TransformPattern = string | RegExp | readonly (RegExp | string)[];
|
|
50
|
+
type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exclude" | "jsxRefreshInclude" | "jsxRefreshExclude"> & {
|
|
51
|
+
include?: TransformPattern;
|
|
52
|
+
exclude?: TransformPattern;
|
|
53
|
+
jsxRefreshInclude?: TransformPattern;
|
|
54
|
+
jsxRefreshExclude?: TransformPattern;
|
|
55
|
+
};
|
|
56
|
+
declare function transformPlugin(config?: TransformPluginConfig): BuiltinPlugin;
|
|
57
|
+
//#endregion
|
|
58
|
+
export { type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { BindingBundler, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/parse-ast-index-DyFjvjrb.mjs";
|
|
2
|
+
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-DR2upIfp.mjs";
|
|
3
|
+
import "./shared/misc-CQeo-AFx.mjs";
|
|
4
|
+
import { pathToFileURL } from "node:url";
|
|
5
|
+
|
|
6
|
+
//#region src/api/experimental.ts
|
|
7
|
+
/**
|
|
8
|
+
* This is an experimental API. It's behavior may change in the future.
|
|
9
|
+
*
|
|
10
|
+
* Calling this API will only execute the scan stage of rolldown.
|
|
11
|
+
*/
|
|
12
|
+
const experimental_scan = async (input) => {
|
|
13
|
+
const inputOptions = await PluginDriver.callOptionsHook(input);
|
|
14
|
+
const { impl: bundler, stopWorkers } = await createBundlerImpl(new BindingBundler(), inputOptions, {});
|
|
15
|
+
const output = await bundler.scan();
|
|
16
|
+
handleOutputErrors(output);
|
|
17
|
+
await stopWorkers?.();
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/plugin/parallel-plugin.ts
|
|
22
|
+
function defineParallelPlugin(pluginPath) {
|
|
23
|
+
return (options) => {
|
|
24
|
+
return { _parallel: {
|
|
25
|
+
fileUrl: pathToFileURL(pluginPath).href,
|
|
26
|
+
options
|
|
27
|
+
} };
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/builtin-plugin/alias-plugin.ts
|
|
33
|
+
function aliasPlugin(config) {
|
|
34
|
+
return new BuiltinPlugin("builtin:alias", config);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/builtin-plugin/replace-plugin.ts
|
|
39
|
+
/**
|
|
40
|
+
* Replaces targeted strings in files while bundling.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* // Basic usage
|
|
44
|
+
* ```js
|
|
45
|
+
* replacePlugin({
|
|
46
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
47
|
+
* __buildVersion: 15
|
|
48
|
+
* })
|
|
49
|
+
* ```
|
|
50
|
+
* @example
|
|
51
|
+
* // With options
|
|
52
|
+
* ```js
|
|
53
|
+
* replacePlugin({
|
|
54
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
55
|
+
* __buildVersion: 15
|
|
56
|
+
* }, {
|
|
57
|
+
* preventAssignment: false,
|
|
58
|
+
* })
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
function replacePlugin(values = {}, options = {}) {
|
|
62
|
+
return new BuiltinPlugin("builtin:replace", {
|
|
63
|
+
...options,
|
|
64
|
+
values
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/builtin-plugin/transform-plugin.ts
|
|
70
|
+
function transformPlugin(config) {
|
|
71
|
+
if (config) config = {
|
|
72
|
+
...config,
|
|
73
|
+
include: normalizedStringOrRegex(config.include),
|
|
74
|
+
exclude: normalizedStringOrRegex(config.exclude),
|
|
75
|
+
jsxRefreshInclude: normalizedStringOrRegex(config.jsxRefreshInclude),
|
|
76
|
+
jsxRefreshExclude: normalizedStringOrRegex(config.jsxRefreshExclude)
|
|
77
|
+
};
|
|
78
|
+
return new BuiltinPlugin("builtin:transform", config);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
//#endregion
|
|
82
|
+
export { ResolverFactory, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export class DevRuntime {
|
|
2
|
+
/**
|
|
3
|
+
* @type {Record<string, Module>}
|
|
4
|
+
*/
|
|
5
|
+
modules: Record<string, Module>;
|
|
6
|
+
/**
|
|
7
|
+
* @param {string} _moduleId
|
|
8
|
+
*/
|
|
9
|
+
createModuleHotContext(_moduleId: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* @param {string[]} _boundaries
|
|
12
|
+
*/
|
|
13
|
+
applyUpdates(_boundaries: string[]): void;
|
|
14
|
+
/**
|
|
15
|
+
* @param {string} id
|
|
16
|
+
* @param {{ exports: any }} meta
|
|
17
|
+
*/
|
|
18
|
+
registerModule(id: string, meta: {
|
|
19
|
+
exports: any;
|
|
20
|
+
}): void;
|
|
21
|
+
/**
|
|
22
|
+
* @param {string} id
|
|
23
|
+
*/
|
|
24
|
+
loadExports(id: string): any;
|
|
25
|
+
/**
|
|
26
|
+
* __esmMin
|
|
27
|
+
*
|
|
28
|
+
* @type {<T>(fn: any, res: T) => () => T}
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
createEsmInitializer: <T>(fn: any, res: T) => () => T;
|
|
32
|
+
/**
|
|
33
|
+
* __commonJSMin
|
|
34
|
+
*
|
|
35
|
+
* @type {<T extends { exports: any }>(cb: any, mod: { exports: any }) => () => T}
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
createCjsInitializer: <T extends {
|
|
39
|
+
exports: any;
|
|
40
|
+
}>(cb: any, mod: {
|
|
41
|
+
exports: any;
|
|
42
|
+
}) => () => T;
|
|
43
|
+
/** @internal */
|
|
44
|
+
__toESM: any;
|
|
45
|
+
/** @internal */
|
|
46
|
+
__toCommonJS: any;
|
|
47
|
+
/** @internal */
|
|
48
|
+
__export: any;
|
|
49
|
+
/** @internal */
|
|
50
|
+
__toDynamicImportESM: any;
|
|
51
|
+
}
|
|
52
|
+
declare class Module {
|
|
53
|
+
/**
|
|
54
|
+
* @param {string} id
|
|
55
|
+
*/
|
|
56
|
+
constructor(id: string);
|
|
57
|
+
/**
|
|
58
|
+
* @type {any}
|
|
59
|
+
*/
|
|
60
|
+
exports: any;
|
|
61
|
+
/**
|
|
62
|
+
* @type {string}
|
|
63
|
+
*/
|
|
64
|
+
id: string;
|
|
65
|
+
}
|
|
66
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
+
const require_misc = require('./shared/misc-DksvspN4.cjs');
|
|
3
|
+
const __rolldown_pluginutils = require_chunk.__toESM(require("@rolldown/pluginutils"));
|
|
4
|
+
|
|
5
|
+
//#region src/plugin/with-filter.ts
|
|
6
|
+
function withFilterImpl(pluginOption, filterObjectList) {
|
|
7
|
+
if (require_misc.isPromiseLike(pluginOption)) return pluginOption.then((p) => withFilter(p, filterObjectList));
|
|
8
|
+
if (pluginOption == false || pluginOption == null) return pluginOption;
|
|
9
|
+
if (Array.isArray(pluginOption)) return pluginOption.map((p) => withFilter(p, filterObjectList));
|
|
10
|
+
let plugin = pluginOption;
|
|
11
|
+
let filterObjectIndex = findMatchedFilterObject(plugin.name, filterObjectList);
|
|
12
|
+
if (filterObjectIndex === -1) return plugin;
|
|
13
|
+
let filterObject = filterObjectList[filterObjectIndex];
|
|
14
|
+
Object.keys(plugin).forEach((key) => {
|
|
15
|
+
switch (key) {
|
|
16
|
+
case "transform":
|
|
17
|
+
case "resolveId":
|
|
18
|
+
case "load":
|
|
19
|
+
if (!plugin[key]) return;
|
|
20
|
+
if (typeof plugin[key] === "object") plugin[key].filter = filterObject[key] ?? plugin[key].filter;
|
|
21
|
+
else plugin[key] = {
|
|
22
|
+
handler: plugin[key],
|
|
23
|
+
filter: filterObject[key]
|
|
24
|
+
};
|
|
25
|
+
break;
|
|
26
|
+
default: break;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return plugin;
|
|
30
|
+
}
|
|
31
|
+
function withFilter(pluginOption, filterObject) {
|
|
32
|
+
return withFilterImpl(pluginOption, require_misc.arraify(filterObject));
|
|
33
|
+
}
|
|
34
|
+
function findMatchedFilterObject(pluginName, overrideFilterObjectList) {
|
|
35
|
+
if (overrideFilterObjectList.length === 1 && overrideFilterObjectList[0].pluginNamePattern === void 0) return 0;
|
|
36
|
+
for (let i = 0; i < overrideFilterObjectList.length; i++) for (let j = 0; j < (overrideFilterObjectList[i].pluginNamePattern ?? []).length; j++) {
|
|
37
|
+
let pattern = overrideFilterObjectList[i].pluginNamePattern[j];
|
|
38
|
+
if (typeof pattern === "string" && pattern === pluginName) return i;
|
|
39
|
+
else if (pattern instanceof RegExp && pattern.test(pluginName)) return i;
|
|
40
|
+
}
|
|
41
|
+
return -1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
Object.defineProperty(exports, 'and', {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function () {
|
|
48
|
+
return __rolldown_pluginutils.and;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, 'code', {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () {
|
|
54
|
+
return __rolldown_pluginutils.code;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(exports, 'exclude', {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: function () {
|
|
60
|
+
return __rolldown_pluginutils.exclude;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
Object.defineProperty(exports, 'id', {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
get: function () {
|
|
66
|
+
return __rolldown_pluginutils.id;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
Object.defineProperty(exports, 'include', {
|
|
70
|
+
enumerable: true,
|
|
71
|
+
get: function () {
|
|
72
|
+
return __rolldown_pluginutils.include;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(exports, 'moduleType', {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function () {
|
|
78
|
+
return __rolldown_pluginutils.moduleType;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
Object.defineProperty(exports, 'not', {
|
|
82
|
+
enumerable: true,
|
|
83
|
+
get: function () {
|
|
84
|
+
return __rolldown_pluginutils.not;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(exports, 'or', {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () {
|
|
90
|
+
return __rolldown_pluginutils.or;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
Object.defineProperty(exports, 'queries', {
|
|
94
|
+
enumerable: true,
|
|
95
|
+
get: function () {
|
|
96
|
+
return __rolldown_pluginutils.queries;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
Object.defineProperty(exports, 'query', {
|
|
100
|
+
enumerable: true,
|
|
101
|
+
get: function () {
|
|
102
|
+
return __rolldown_pluginutils.query;
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
exports.withFilter = withFilter;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "./shared/binding-BAyrv67G.cjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-CMH1jWhX.cjs";
|
|
3
|
+
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
4
|
+
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "./shared/binding-DUz1Q2JW.mjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-D_KKKWbo.mjs";
|
|
3
|
+
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
4
|
+
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { arraify, isPromiseLike } from "./shared/misc-CQeo-AFx.mjs";
|
|
2
|
+
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
3
|
+
|
|
4
|
+
//#region src/plugin/with-filter.ts
|
|
5
|
+
function withFilterImpl(pluginOption, filterObjectList) {
|
|
6
|
+
if (isPromiseLike(pluginOption)) return pluginOption.then((p) => withFilter(p, filterObjectList));
|
|
7
|
+
if (pluginOption == false || pluginOption == null) return pluginOption;
|
|
8
|
+
if (Array.isArray(pluginOption)) return pluginOption.map((p) => withFilter(p, filterObjectList));
|
|
9
|
+
let plugin = pluginOption;
|
|
10
|
+
let filterObjectIndex = findMatchedFilterObject(plugin.name, filterObjectList);
|
|
11
|
+
if (filterObjectIndex === -1) return plugin;
|
|
12
|
+
let filterObject = filterObjectList[filterObjectIndex];
|
|
13
|
+
Object.keys(plugin).forEach((key) => {
|
|
14
|
+
switch (key) {
|
|
15
|
+
case "transform":
|
|
16
|
+
case "resolveId":
|
|
17
|
+
case "load":
|
|
18
|
+
if (!plugin[key]) return;
|
|
19
|
+
if (typeof plugin[key] === "object") plugin[key].filter = filterObject[key] ?? plugin[key].filter;
|
|
20
|
+
else plugin[key] = {
|
|
21
|
+
handler: plugin[key],
|
|
22
|
+
filter: filterObject[key]
|
|
23
|
+
};
|
|
24
|
+
break;
|
|
25
|
+
default: break;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return plugin;
|
|
29
|
+
}
|
|
30
|
+
function withFilter(pluginOption, filterObject) {
|
|
31
|
+
return withFilterImpl(pluginOption, arraify(filterObject));
|
|
32
|
+
}
|
|
33
|
+
function findMatchedFilterObject(pluginName, overrideFilterObjectList) {
|
|
34
|
+
if (overrideFilterObjectList.length === 1 && overrideFilterObjectList[0].pluginNamePattern === void 0) return 0;
|
|
35
|
+
for (let i = 0; i < overrideFilterObjectList.length; i++) for (let j = 0; j < (overrideFilterObjectList[i].pluginNamePattern ?? []).length; j++) {
|
|
36
|
+
let pattern = overrideFilterObjectList[i].pluginNamePattern[j];
|
|
37
|
+
if (typeof pattern === "string" && pattern === pluginName) return i;
|
|
38
|
+
else if (pattern instanceof RegExp && pattern.test(pluginName)) return i;
|
|
39
|
+
}
|
|
40
|
+
return -1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const require_src = require('./shared/src-CRRyjCYJ.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-DrqwhzH4.cjs');
|
|
3
|
+
require('./shared/misc-DksvspN4.cjs');
|
|
4
|
+
|
|
5
|
+
exports.VERSION = require_src.VERSION;
|
|
6
|
+
exports.build = require_src.build;
|
|
7
|
+
exports.defineConfig = require_src.defineConfig;
|
|
8
|
+
exports.rolldown = require_src.rolldown;
|
|
9
|
+
exports.watch = require_src.watch;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-BAyrv67G.cjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-CMH1jWhX.cjs";
|
|
3
|
+
export { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-DUz1Q2JW.mjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-D_KKKWbo.mjs";
|
|
3
|
+
export { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
ADDED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
1
|
+
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
+
const require_src = require('./shared/src-CRRyjCYJ.cjs');
|
|
3
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-DrqwhzH4.cjs');
|
|
4
|
+
require('./shared/misc-DksvspN4.cjs');
|
|
5
5
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
6
6
|
|
|
7
7
|
//#region src/parallel-plugin-worker.ts
|
|
@@ -14,19 +14,10 @@ const { registryId, pluginInfos, threadNumber } = node_worker_threads.workerData
|
|
|
14
14
|
const plugin = await definePluginImpl(pluginInfo.options, { threadNumber });
|
|
15
15
|
return {
|
|
16
16
|
index: pluginInfo.index,
|
|
17
|
-
plugin: require_src.bindingifyPlugin(
|
|
18
|
-
plugin,
|
|
19
|
-
{},
|
|
20
|
-
{},
|
|
21
|
-
// TODO need to find a way to share pluginContextData
|
|
22
|
-
new require_src.PluginContextData(),
|
|
23
|
-
[],
|
|
24
|
-
() => {},
|
|
25
|
-
"info"
|
|
26
|
-
)
|
|
17
|
+
plugin: require_src.bindingifyPlugin(plugin, {}, {}, new require_src.PluginContextData(() => {}, {}, []), [], () => {}, "info", false)
|
|
27
18
|
};
|
|
28
19
|
}));
|
|
29
|
-
|
|
20
|
+
require_parse_ast_index.registerPlugins(registryId, plugins);
|
|
30
21
|
node_worker_threads.parentPort.postMessage({ type: "success" });
|
|
31
22
|
} catch (error) {
|
|
32
23
|
node_worker_threads.parentPort.postMessage({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|