rolldown 1.0.0-beta.16 → 1.0.0-beta.17
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/cli.cjs +4 -4
- package/dist/cli.mjs +1040 -1079
- package/dist/config.cjs +3 -3
- package/dist/config.d.cts +2 -2
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +4 -6
- package/dist/experimental-index.cjs +7 -31
- package/dist/experimental-index.d.cts +2 -2
- package/dist/experimental-index.d.mts +2 -2
- package/dist/experimental-index.mjs +4 -22
- package/dist/filter-index.d.cts +2 -2
- package/dist/filter-index.d.mts +2 -2
- package/dist/filter-index.mjs +1 -2
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -4
- package/dist/parallel-plugin-worker.cjs +3 -4
- package/dist/parallel-plugin-worker.mjs +27 -34
- package/dist/parallel-plugin.d.cts +2 -2
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.cjs +1 -1
- package/dist/parse-ast-index.d.cts +1 -1
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -2
- package/dist/shared/{binding--Y47JZSL.d.cts → binding-CWvDTpOw.d.mts} +14 -14
- package/dist/shared/{binding-C_9au5Eg.d.mts → binding-um3VI33z.d.cts} +14 -14
- package/dist/shared/{define-config-DMWHsgSt.d.mts → define-config-Cm86JHb7.d.mts} +69 -9
- package/dist/shared/{define-config-CAyC9-af.d.cts → define-config-POPyhxOq.d.cts} +69 -9
- package/dist/shared/{load-config-BniS-jT_.cjs → load-config-B4zzmrcW.cjs} +1 -1
- package/dist/shared/{load-config-BT5Ts430.mjs → load-config-BlOqMlge.mjs} +14 -19
- package/dist/shared/{misc-DGAe2XOW.mjs → misc-BN0nse6C.mjs} +1 -4
- package/dist/shared/parse-ast-index-BpqxVgDm.mjs +616 -0
- package/dist/shared/parse-ast-index-XFcW-g8N.cjs +738 -0
- package/dist/shared/prompt-C5jz26Zn.mjs +852 -0
- package/dist/shared/{src-1lPDqeuR.cjs → src-C98Q0NLX.cjs} +43 -48
- package/dist/shared/{src-Cv4_zurW.mjs → src-CuIbdNSi.mjs} +1135 -1394
- package/package.json +18 -18
- package/dist/shared/chunk--iN_1bjD.mjs +0 -33
- package/dist/shared/parse-ast-index-BHkdbivO.mjs +0 -659
- package/dist/shared/parse-ast-index-hgMnddyI.cjs +0 -701
- package/dist/shared/prompt-CodO769G.mjs +0 -854
package/dist/config.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
2
|
-
require('./shared/parse-ast-index-
|
|
1
|
+
const require_src = require('./shared/src-C98Q0NLX.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-XFcW-g8N.cjs');
|
|
3
3
|
require('./shared/misc-BKp5iIef.cjs');
|
|
4
|
-
const require_load_config = require('./shared/load-config-
|
|
4
|
+
const require_load_config = require('./shared/load-config-B4zzmrcW.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = require_src.version;
|
package/dist/config.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding
|
|
2
|
-
import { ConfigExport, defineConfig } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-um3VI33z.cjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-POPyhxOq.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/load-config.d.ts
|
|
5
5
|
declare function loadConfig(configPath: string): Promise<ConfigExport>;
|
package/dist/config.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { ConfigExport, defineConfig } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-CWvDTpOw.mjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-Cm86JHb7.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/load-config.d.ts
|
|
5
5
|
declare function loadConfig(configPath: string): Promise<ConfigExport>;
|
package/dist/config.mjs
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./shared/
|
|
3
|
-
import "./shared/misc-
|
|
4
|
-
import {
|
|
1
|
+
import "./shared/parse-ast-index-BpqxVgDm.mjs";
|
|
2
|
+
import { defineConfig, version } from "./shared/src-CuIbdNSi.mjs";
|
|
3
|
+
import "./shared/misc-BN0nse6C.mjs";
|
|
4
|
+
import { loadConfig } from "./shared/load-config-BlOqMlge.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
|
-
init_define_config();
|
|
8
|
-
init_load_config();
|
|
9
7
|
const VERSION = version;
|
|
10
8
|
|
|
11
9
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
3
|
-
const require_parse_ast_index = require('./shared/parse-ast-index-
|
|
2
|
+
const require_src = require('./shared/src-C98Q0NLX.cjs');
|
|
3
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-XFcW-g8N.cjs');
|
|
4
4
|
require('./shared/misc-BKp5iIef.cjs');
|
|
5
5
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ const node_url = require_chunk.__toESM(require("node:url"));
|
|
|
12
12
|
*/
|
|
13
13
|
const experimental_scan = async (input) => {
|
|
14
14
|
const inputOptions = await require_src.PluginDriver.callOptionsHook(input);
|
|
15
|
-
const { bundler, stopWorkers } = await require_src.
|
|
15
|
+
const { impl: bundler, stopWorkers } = await require_src.createBundlerImpl(new require_parse_ast_index.BindingBundler(), inputOptions, {});
|
|
16
16
|
const output = await bundler.scan();
|
|
17
17
|
require_src.handleOutputErrors(output);
|
|
18
18
|
await stopWorkers?.();
|
|
@@ -82,16 +82,7 @@ function transformPlugin(config) {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
//#endregion
|
|
85
|
-
|
|
86
|
-
var import_binding = require_chunk.__toESM(require_parse_ast_index.require_binding());
|
|
87
|
-
|
|
88
|
-
//#endregion
|
|
89
|
-
Object.defineProperty(exports, 'ResolverFactory', {
|
|
90
|
-
enumerable: true,
|
|
91
|
-
get: function () {
|
|
92
|
-
return import_binding.ResolverFactory;
|
|
93
|
-
}
|
|
94
|
-
});
|
|
85
|
+
exports.ResolverFactory = require_parse_ast_index.ResolverFactory;
|
|
95
86
|
exports.aliasPlugin = aliasPlugin;
|
|
96
87
|
exports.assetPlugin = require_src.assetPlugin;
|
|
97
88
|
exports.buildImportAnalysisPlugin = require_src.buildImportAnalysisPlugin;
|
|
@@ -99,33 +90,18 @@ exports.composePlugins = require_src.composeJsPlugins;
|
|
|
99
90
|
exports.defineParallelPlugin = defineParallelPlugin;
|
|
100
91
|
exports.dynamicImportVarsPlugin = require_src.dynamicImportVarsPlugin;
|
|
101
92
|
exports.importGlobPlugin = require_src.importGlobPlugin;
|
|
102
|
-
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function () {
|
|
105
|
-
return import_binding.isolatedDeclaration;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
93
|
+
exports.isolatedDeclaration = require_parse_ast_index.isolatedDeclaration;
|
|
108
94
|
exports.isolatedDeclarationPlugin = require_src.isolatedDeclarationPlugin;
|
|
109
95
|
exports.jsonPlugin = require_src.jsonPlugin;
|
|
110
96
|
exports.loadFallbackPlugin = require_src.loadFallbackPlugin;
|
|
111
97
|
exports.manifestPlugin = require_src.manifestPlugin;
|
|
112
98
|
exports.moduleFederationPlugin = require_src.moduleFederationPlugin;
|
|
113
99
|
exports.modulePreloadPolyfillPlugin = require_src.modulePreloadPolyfillPlugin;
|
|
114
|
-
|
|
115
|
-
enumerable: true,
|
|
116
|
-
get: function () {
|
|
117
|
-
return import_binding.moduleRunnerTransform;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
100
|
+
exports.moduleRunnerTransform = require_parse_ast_index.moduleRunnerTransform;
|
|
120
101
|
exports.replacePlugin = replacePlugin;
|
|
121
102
|
exports.reporterPlugin = require_src.reporterPlugin;
|
|
122
103
|
exports.scan = experimental_scan;
|
|
123
|
-
|
|
124
|
-
enumerable: true,
|
|
125
|
-
get: function () {
|
|
126
|
-
return import_binding.transform;
|
|
127
|
-
}
|
|
128
|
-
});
|
|
104
|
+
exports.transform = require_parse_ast_index.transform;
|
|
129
105
|
exports.transformPlugin = transformPlugin;
|
|
130
106
|
exports.viteResolvePlugin = require_src.viteResolvePlugin;
|
|
131
107
|
exports.wasmFallbackPlugin = require_src.wasmFallbackPlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding
|
|
2
|
-
import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-
|
|
1
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-um3VI33z.cjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-POPyhxOq.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-
|
|
2
|
-
import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-
|
|
1
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-CWvDTpOw.mjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-Cm86JHb7.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins,
|
|
3
|
-
import
|
|
4
|
-
import "./shared/misc-DGAe2XOW.mjs";
|
|
1
|
+
import { BindingBundler, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/parse-ast-index-BpqxVgDm.mjs";
|
|
2
|
+
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-CuIbdNSi.mjs";
|
|
3
|
+
import "./shared/misc-BN0nse6C.mjs";
|
|
5
4
|
import { pathToFileURL } from "node:url";
|
|
6
5
|
|
|
7
6
|
//#region src/api/experimental.ts
|
|
8
|
-
init_plugin_driver();
|
|
9
|
-
init_create_bundler();
|
|
10
|
-
init_transform_to_rollup_output();
|
|
11
7
|
/**
|
|
12
8
|
* This is an experimental API. It's behavior may change in the future.
|
|
13
9
|
*
|
|
@@ -15,7 +11,7 @@ init_transform_to_rollup_output();
|
|
|
15
11
|
*/
|
|
16
12
|
const experimental_scan = async (input) => {
|
|
17
13
|
const inputOptions = await PluginDriver.callOptionsHook(input);
|
|
18
|
-
const { bundler, stopWorkers } = await
|
|
14
|
+
const { impl: bundler, stopWorkers } = await createBundlerImpl(new BindingBundler(), inputOptions, {});
|
|
19
15
|
const output = await bundler.scan();
|
|
20
16
|
handleOutputErrors(output);
|
|
21
17
|
await stopWorkers?.();
|
|
@@ -34,14 +30,12 @@ function defineParallelPlugin(pluginPath) {
|
|
|
34
30
|
|
|
35
31
|
//#endregion
|
|
36
32
|
//#region src/builtin-plugin/alias-plugin.ts
|
|
37
|
-
init_constructors();
|
|
38
33
|
function aliasPlugin(config) {
|
|
39
34
|
return new BuiltinPlugin("builtin:alias", config);
|
|
40
35
|
}
|
|
41
36
|
|
|
42
37
|
//#endregion
|
|
43
38
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
44
|
-
init_constructors();
|
|
45
39
|
/**
|
|
46
40
|
* Replaces targeted strings in files while bundling.
|
|
47
41
|
*
|
|
@@ -75,8 +69,6 @@ function replacePlugin(values = {}, options = {}) {
|
|
|
75
69
|
|
|
76
70
|
//#endregion
|
|
77
71
|
//#region src/builtin-plugin/transform-plugin.ts
|
|
78
|
-
init_constructors();
|
|
79
|
-
init_normalize_string_or_regex();
|
|
80
72
|
function transformPlugin(config) {
|
|
81
73
|
if (config) config = {
|
|
82
74
|
...config,
|
|
@@ -89,14 +81,4 @@ function transformPlugin(config) {
|
|
|
89
81
|
}
|
|
90
82
|
|
|
91
83
|
//#endregion
|
|
92
|
-
//#region src/experimental-index.ts
|
|
93
|
-
var import_binding = __toESM(require_binding());
|
|
94
|
-
init_compose_js_plugins();
|
|
95
|
-
init_constructors();
|
|
96
|
-
|
|
97
|
-
//#endregion
|
|
98
|
-
var ResolverFactory = import_binding.ResolverFactory;
|
|
99
|
-
var isolatedDeclaration = import_binding.isolatedDeclaration;
|
|
100
|
-
var moduleRunnerTransform = import_binding.moduleRunnerTransform;
|
|
101
|
-
var transform = import_binding.transform;
|
|
102
84
|
export { ResolverFactory, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
package/dist/filter-index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding
|
|
2
|
-
import { withFilter } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-um3VI33z.cjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-POPyhxOq.cjs";
|
|
3
3
|
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
4
4
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { withFilter } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-CWvDTpOw.mjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-Cm86JHb7.mjs";
|
|
3
3
|
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
4
4
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/filter-index.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { arraify,
|
|
1
|
+
import { arraify, isPromiseLike } from "./shared/misc-BN0nse6C.mjs";
|
|
2
2
|
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/with-filter.ts
|
|
5
|
-
init_misc();
|
|
6
5
|
function withFilterImpl(pluginOption, filterObjectList) {
|
|
7
6
|
if (isPromiseLike(pluginOption)) return pluginOption.then((p) => withFilter(p, filterObjectList));
|
|
8
7
|
if (pluginOption == false || pluginOption == null) return pluginOption;
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
2
|
-
require('./shared/parse-ast-index-
|
|
1
|
+
const require_src = require('./shared/src-C98Q0NLX.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-XFcW-g8N.cjs');
|
|
3
3
|
require('./shared/misc-BKp5iIef.cjs');
|
|
4
4
|
|
|
5
5
|
exports.VERSION = require_src.VERSION;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, 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, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, 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-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-um3VI33z.cjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, 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, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, 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-POPyhxOq.cjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, 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, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, 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
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding-
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, 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, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, 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-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-CWvDTpOw.mjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, 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, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, 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-Cm86JHb7.mjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, 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, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, 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
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./shared/
|
|
3
|
-
import "./shared/misc-
|
|
1
|
+
import "./shared/parse-ast-index-BpqxVgDm.mjs";
|
|
2
|
+
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-CuIbdNSi.mjs";
|
|
3
|
+
import "./shared/misc-BN0nse6C.mjs";
|
|
4
4
|
|
|
5
|
-
init_src();
|
|
6
5
|
export { VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
3
|
-
const require_parse_ast_index = require('./shared/parse-ast-index-
|
|
2
|
+
const require_src = require('./shared/src-C98Q0NLX.cjs');
|
|
3
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-XFcW-g8N.cjs');
|
|
4
4
|
require('./shared/misc-BKp5iIef.cjs');
|
|
5
5
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
6
6
|
|
|
7
7
|
//#region src/parallel-plugin-worker.ts
|
|
8
|
-
var import_binding = require_chunk.__toESM(require_parse_ast_index.require_binding());
|
|
9
8
|
const { registryId, pluginInfos, threadNumber } = node_worker_threads.workerData;
|
|
10
9
|
(async () => {
|
|
11
10
|
try {
|
|
@@ -18,7 +17,7 @@ const { registryId, pluginInfos, threadNumber } = node_worker_threads.workerData
|
|
|
18
17
|
plugin: require_src.bindingifyPlugin(plugin, {}, {}, new require_src.PluginContextData(), [], () => {}, "info", false)
|
|
19
18
|
};
|
|
20
19
|
}));
|
|
21
|
-
|
|
20
|
+
require_parse_ast_index.registerPlugins(registryId, plugins);
|
|
22
21
|
node_worker_threads.parentPort.postMessage({ type: "success" });
|
|
23
22
|
} catch (error) {
|
|
24
23
|
node_worker_threads.parentPort.postMessage({
|
|
@@ -1,38 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PluginContextData, bindingifyPlugin
|
|
3
|
-
import
|
|
4
|
-
import "./shared/misc-DGAe2XOW.mjs";
|
|
1
|
+
import { registerPlugins } from "./shared/parse-ast-index-BpqxVgDm.mjs";
|
|
2
|
+
import { PluginContextData, bindingifyPlugin } from "./shared/src-CuIbdNSi.mjs";
|
|
3
|
+
import "./shared/misc-BN0nse6C.mjs";
|
|
5
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
6
5
|
|
|
7
6
|
//#region src/parallel-plugin-worker.ts
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} finally {
|
|
32
|
-
parentPort.unref();
|
|
33
|
-
}
|
|
34
|
-
})();
|
|
35
|
-
} });
|
|
7
|
+
const { registryId, pluginInfos, threadNumber } = workerData;
|
|
8
|
+
(async () => {
|
|
9
|
+
try {
|
|
10
|
+
const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
|
|
11
|
+
const pluginModule = await import(pluginInfo.fileUrl);
|
|
12
|
+
const definePluginImpl = pluginModule.default;
|
|
13
|
+
const plugin = await definePluginImpl(pluginInfo.options, { threadNumber });
|
|
14
|
+
return {
|
|
15
|
+
index: pluginInfo.index,
|
|
16
|
+
plugin: bindingifyPlugin(plugin, {}, {}, new PluginContextData(), [], () => {}, "info", false)
|
|
17
|
+
};
|
|
18
|
+
}));
|
|
19
|
+
registerPlugins(registryId, plugins);
|
|
20
|
+
parentPort.postMessage({ type: "success" });
|
|
21
|
+
} catch (error) {
|
|
22
|
+
parentPort.postMessage({
|
|
23
|
+
type: "error",
|
|
24
|
+
error
|
|
25
|
+
});
|
|
26
|
+
} finally {
|
|
27
|
+
parentPort.unref();
|
|
28
|
+
}
|
|
29
|
+
})();
|
|
36
30
|
|
|
37
|
-
//#endregion
|
|
38
|
-
export default require_parallel_plugin_worker();
|
|
31
|
+
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-um3VI33z.cjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-POPyhxOq.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-CWvDTpOw.mjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-Cm86JHb7.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
package/dist/parse-ast-index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_parse_ast_index = require('./shared/parse-ast-index-
|
|
1
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-XFcW-g8N.cjs');
|
|
2
2
|
|
|
3
3
|
exports.parseAst = require_parse_ast_index.parseAst;
|
|
4
4
|
exports.parseAstAsync = require_parse_ast_index.parseAstAsync;
|
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -952,12 +952,23 @@ interface TypeScriptOptions {
|
|
|
952
952
|
declare class BindingBundleEndEventData {
|
|
953
953
|
output: string;
|
|
954
954
|
duration: number;
|
|
955
|
-
get result():
|
|
955
|
+
get result(): BindingBundlerImpl;
|
|
956
956
|
}
|
|
957
957
|
declare class BindingBundleErrorEventData {
|
|
958
|
-
get result():
|
|
958
|
+
get result(): BindingBundlerImpl;
|
|
959
959
|
get error(): Array<Error | BindingError>;
|
|
960
960
|
}
|
|
961
|
+
declare class BindingBundlerImpl {
|
|
962
|
+
constructor(option: BindingBundlerOptions);
|
|
963
|
+
write(): Promise<BindingOutputs>;
|
|
964
|
+
generate(): Promise<BindingOutputs>;
|
|
965
|
+
scan(): Promise<BindingOutputs>;
|
|
966
|
+
close(): Promise<void>;
|
|
967
|
+
get closed(): boolean;
|
|
968
|
+
getWatchFiles(): Promise<Array<string>>;
|
|
969
|
+
generateHmrPatch(changedFiles: Array<string>): Promise<BindingHmrOutput>;
|
|
970
|
+
hmrInvalidate(file: string, firstInvalidatedBy?: string | undefined | null): Promise<BindingHmrOutput>;
|
|
971
|
+
}
|
|
961
972
|
declare class BindingError {
|
|
962
973
|
kind: string;
|
|
963
974
|
message: string;
|
|
@@ -1083,17 +1094,6 @@ declare class BindingWatcherEvent {
|
|
|
1083
1094
|
bundleEventKind(): string;
|
|
1084
1095
|
bundleErrorData(): BindingBundleErrorEventData;
|
|
1085
1096
|
}
|
|
1086
|
-
declare class Bundler {
|
|
1087
|
-
constructor(option: BindingBundlerOptions);
|
|
1088
|
-
write(): Promise<BindingOutputs>;
|
|
1089
|
-
generate(): Promise<BindingOutputs>;
|
|
1090
|
-
scan(): Promise<BindingOutputs>;
|
|
1091
|
-
close(): Promise<void>;
|
|
1092
|
-
get closed(): boolean;
|
|
1093
|
-
getWatchFiles(): Promise<Array<string>>;
|
|
1094
|
-
generateHmrPatch(changedFiles: Array<string>): Promise<BindingHmrOutput>;
|
|
1095
|
-
hmrInvalidate(file: string, firstInvalidatedBy?: string | undefined | null): Promise<BindingHmrOutput>;
|
|
1096
|
-
}
|
|
1097
1097
|
declare class ParallelJsPluginRegistry {
|
|
1098
1098
|
id: number;
|
|
1099
1099
|
workerCount: number;
|
|
@@ -1653,4 +1653,4 @@ interface PreRenderedChunk {
|
|
|
1653
1653
|
exports: Array<string>;
|
|
1654
1654
|
}
|
|
1655
1655
|
//#endregion
|
|
1656
|
-
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent,
|
|
1656
|
+
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
|
|
@@ -952,12 +952,23 @@ interface TypeScriptOptions {
|
|
|
952
952
|
declare class BindingBundleEndEventData {
|
|
953
953
|
output: string;
|
|
954
954
|
duration: number;
|
|
955
|
-
get result():
|
|
955
|
+
get result(): BindingBundlerImpl;
|
|
956
956
|
}
|
|
957
957
|
declare class BindingBundleErrorEventData {
|
|
958
|
-
get result():
|
|
958
|
+
get result(): BindingBundlerImpl;
|
|
959
959
|
get error(): Array<Error | BindingError>;
|
|
960
960
|
}
|
|
961
|
+
declare class BindingBundlerImpl {
|
|
962
|
+
constructor(option: BindingBundlerOptions);
|
|
963
|
+
write(): Promise<BindingOutputs>;
|
|
964
|
+
generate(): Promise<BindingOutputs>;
|
|
965
|
+
scan(): Promise<BindingOutputs>;
|
|
966
|
+
close(): Promise<void>;
|
|
967
|
+
get closed(): boolean;
|
|
968
|
+
getWatchFiles(): Promise<Array<string>>;
|
|
969
|
+
generateHmrPatch(changedFiles: Array<string>): Promise<BindingHmrOutput>;
|
|
970
|
+
hmrInvalidate(file: string, firstInvalidatedBy?: string | undefined | null): Promise<BindingHmrOutput>;
|
|
971
|
+
}
|
|
961
972
|
declare class BindingError {
|
|
962
973
|
kind: string;
|
|
963
974
|
message: string;
|
|
@@ -1083,17 +1094,6 @@ declare class BindingWatcherEvent {
|
|
|
1083
1094
|
bundleEventKind(): string;
|
|
1084
1095
|
bundleErrorData(): BindingBundleErrorEventData;
|
|
1085
1096
|
}
|
|
1086
|
-
declare class Bundler {
|
|
1087
|
-
constructor(option: BindingBundlerOptions);
|
|
1088
|
-
write(): Promise<BindingOutputs>;
|
|
1089
|
-
generate(): Promise<BindingOutputs>;
|
|
1090
|
-
scan(): Promise<BindingOutputs>;
|
|
1091
|
-
close(): Promise<void>;
|
|
1092
|
-
get closed(): boolean;
|
|
1093
|
-
getWatchFiles(): Promise<Array<string>>;
|
|
1094
|
-
generateHmrPatch(changedFiles: Array<string>): Promise<BindingHmrOutput>;
|
|
1095
|
-
hmrInvalidate(file: string, firstInvalidatedBy?: string | undefined | null): Promise<BindingHmrOutput>;
|
|
1096
|
-
}
|
|
1097
1097
|
declare class ParallelJsPluginRegistry {
|
|
1098
1098
|
id: number;
|
|
1099
1099
|
workerCount: number;
|
|
@@ -1653,4 +1653,4 @@ interface PreRenderedChunk {
|
|
|
1653
1653
|
exports: Array<string>;
|
|
1654
1654
|
}
|
|
1655
1655
|
//#endregion
|
|
1656
|
-
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent,
|
|
1656
|
+
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrOutputPatch, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
|