@rolldown/browser 1.0.0-beta.10-commit.885ee53 → 1.0.0-beta.10-commit.bf212da
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 +5 -5
- package/dist/cli.mjs +1077 -1036
- package/dist/config.cjs +3 -3
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +5 -4
- package/dist/experimental-index.browser.mjs +1 -1
- package/dist/experimental-index.cjs +2 -2
- package/dist/experimental-index.d.mts +2 -2
- package/dist/experimental-index.mjs +14 -3
- package/dist/filter-index.d.mts +2 -2
- package/dist/filter-index.mjs +2 -1
- package/dist/index.browser.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +4 -3
- package/dist/parallel-plugin-worker.cjs +2 -2
- package/dist/parallel-plugin-worker.mjs +33 -27
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.cjs +1 -1
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +2 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/chunk-DSsiIF1Z.mjs +30 -0
- package/dist/shared/{define-config-cqCLLLZ-.d.mts → define-config-BIXBk1MV.d.mts} +1 -1
- package/dist/shared/dist-DeDsdiza.mjs +153 -0
- package/dist/shared/{load-config-F7nMcxMb.mjs → load-config--2oCCJCi.mjs} +19 -14
- package/dist/shared/{load-config-0bnuUeT5.cjs → load-config-CrWUKkBw.cjs} +1 -1
- package/dist/shared/{parse-ast-index-C31FpvkE.mjs → parse-ast-index-B3Tue26H.mjs} +28 -10
- package/dist/shared/{parse-ast-index-BuelS_NF.cjs → parse-ast-index-DL8_b_QU.cjs} +1 -1
- package/dist/shared/prompt-jPdbaKAj.mjs +854 -0
- package/dist/shared/{src-6t_bV_L5.mjs → src-_MeBFVb3.mjs} +1422 -1132
- package/dist/shared/{src-B3FAi7gC.cjs → src-heZFfrWc.cjs} +86 -16
- package/dist/{src-1eaUHc8G.js → src-DOq2164b.js} +6 -6
- package/package.json +1 -1
- package/dist/shared/dist-BoWaIc-K.mjs +0 -147
- package/dist/shared/prompt-C3zHEaSG.mjs +0 -852
- /package/dist/shared/{binding-Dod8fhx9.d.mts → binding-CHPrEDXp.d.mts} +0 -0
package/dist/config.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
1
|
+
const require_src = require('./shared/src-heZFfrWc.cjs');
|
|
2
2
|
require('./shared/dist-BMVjvV-v.cjs');
|
|
3
|
-
require('./shared/parse-ast-index-
|
|
4
|
-
const require_load_config = require('./shared/load-config-
|
|
3
|
+
require('./shared/parse-ast-index-DL8_b_QU.cjs');
|
|
4
|
+
const require_load_config = require('./shared/load-config-CrWUKkBw.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = require_src.version;
|
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-CHPrEDXp.mjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-BIXBk1MV.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,9 +1,10 @@
|
|
|
1
|
-
import { defineConfig, version } from "./shared/src-
|
|
2
|
-
import "./shared/dist-
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
4
|
-
import { loadConfig } from "./shared/load-config
|
|
1
|
+
import { defineConfig, version } from "./shared/src-_MeBFVb3.mjs";
|
|
2
|
+
import "./shared/dist-DeDsdiza.mjs";
|
|
3
|
+
import "./shared/parse-ast-index-B3Tue26H.mjs";
|
|
4
|
+
import { init_load_config, loadConfig } from "./shared/load-config--2oCCJCi.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
|
+
init_load_config();
|
|
7
8
|
const VERSION = version;
|
|
8
9
|
|
|
9
10
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-
|
|
1
|
+
import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-DOq2164b.js";
|
|
2
2
|
import { ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-heZFfrWc.cjs');
|
|
3
3
|
require('./shared/dist-BMVjvV-v.cjs');
|
|
4
|
-
require('./shared/parse-ast-index-
|
|
4
|
+
require('./shared/parse-ast-index-DL8_b_QU.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
6
6
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
7
7
|
|
|
@@ -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-CHPrEDXp.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-BIXBk1MV.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-
|
|
2
|
-
import "./shared/dist-
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-_MeBFVb3.mjs";
|
|
2
|
+
import "./shared/dist-DeDsdiza.mjs";
|
|
3
|
+
import "./shared/parse-ast-index-B3Tue26H.mjs";
|
|
4
4
|
import { ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
|
|
7
7
|
//#region src/api/experimental.ts
|
|
8
|
+
init_create_bundler();
|
|
9
|
+
init_transform_to_rollup_output();
|
|
8
10
|
/**
|
|
9
11
|
* This is an experimental API. It's behavior may change in the future.
|
|
10
12
|
*
|
|
@@ -30,12 +32,14 @@ function defineParallelPlugin(pluginPath) {
|
|
|
30
32
|
|
|
31
33
|
//#endregion
|
|
32
34
|
//#region src/builtin-plugin/alias-plugin.ts
|
|
35
|
+
init_constructors();
|
|
33
36
|
function aliasPlugin(config) {
|
|
34
37
|
return new BuiltinPlugin("builtin:alias", config);
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
//#endregion
|
|
38
41
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
42
|
+
init_constructors();
|
|
39
43
|
/**
|
|
40
44
|
* Replaces targeted strings in files while bundling.
|
|
41
45
|
*
|
|
@@ -69,6 +73,8 @@ function replacePlugin(values = {}, options = {}) {
|
|
|
69
73
|
|
|
70
74
|
//#endregion
|
|
71
75
|
//#region src/builtin-plugin/transform-plugin.ts
|
|
76
|
+
init_constructors();
|
|
77
|
+
init_normalize_string_or_regex();
|
|
72
78
|
function transformPlugin(config) {
|
|
73
79
|
if (config) config = {
|
|
74
80
|
...config,
|
|
@@ -80,5 +86,10 @@ function transformPlugin(config) {
|
|
|
80
86
|
return new BuiltinPlugin("builtin:transform", config);
|
|
81
87
|
}
|
|
82
88
|
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/experimental-index.ts
|
|
91
|
+
init_compose_js_plugins();
|
|
92
|
+
init_constructors();
|
|
93
|
+
|
|
83
94
|
//#endregion
|
|
84
95
|
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.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { withFilter } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-CHPrEDXp.mjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-BIXBk1MV.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,6 +1,7 @@
|
|
|
1
|
-
import { and, arraify, code, exclude, id, include, isPromiseLike, moduleType, not, or, queries, query } from "./shared/dist-
|
|
1
|
+
import { and, arraify, code, exclude, id, include, init_misc, isPromiseLike, moduleType, not, or, queries, query } from "./shared/dist-DeDsdiza.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin/with-filter.ts
|
|
4
|
+
init_misc();
|
|
4
5
|
function withFilterImpl(pluginOption, filterObjectList) {
|
|
5
6
|
if (isPromiseLike(pluginOption)) return pluginOption.then((p) => withFilter(p, filterObjectList));
|
|
6
7
|
if (pluginOption == false || pluginOption == null) return pluginOption;
|
package/dist/index.browser.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
1
|
+
const require_src = require('./shared/src-heZFfrWc.cjs');
|
|
2
2
|
require('./shared/dist-BMVjvV-v.cjs');
|
|
3
|
-
require('./shared/parse-ast-index-
|
|
3
|
+
require('./shared/parse-ast-index-DL8_b_QU.cjs');
|
|
4
4
|
|
|
5
5
|
exports.VERSION = require_src.VERSION;
|
|
6
6
|
exports.build = require_src.build;
|
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-CHPrEDXp.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-BIXBk1MV.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,5 +1,6 @@
|
|
|
1
|
-
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-
|
|
2
|
-
import "./shared/dist-
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { VERSION, build, defineConfig, init_src, rolldown, watch } from "./shared/src-_MeBFVb3.mjs";
|
|
2
|
+
import "./shared/dist-DeDsdiza.mjs";
|
|
3
|
+
import "./shared/parse-ast-index-B3Tue26H.mjs";
|
|
4
4
|
|
|
5
|
+
init_src();
|
|
5
6
|
export { VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-heZFfrWc.cjs');
|
|
3
3
|
require('./shared/dist-BMVjvV-v.cjs');
|
|
4
|
-
require('./shared/parse-ast-index-
|
|
4
|
+
require('./shared/parse-ast-index-DL8_b_QU.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
6
6
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
7
7
|
|
|
@@ -1,32 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./shared/
|
|
3
|
-
import "./shared/
|
|
1
|
+
import { __commonJS } from "./shared/chunk-DSsiIF1Z.mjs";
|
|
2
|
+
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-_MeBFVb3.mjs";
|
|
3
|
+
import "./shared/dist-DeDsdiza.mjs";
|
|
4
|
+
import "./shared/parse-ast-index-B3Tue26H.mjs";
|
|
4
5
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
5
6
|
import { parentPort, workerData } from "node:worker_threads";
|
|
6
7
|
|
|
7
8
|
//#region src/parallel-plugin-worker.ts
|
|
8
|
-
|
|
9
|
-
(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
type: "
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
9
|
+
var require_parallel_plugin_worker = __commonJS({ "src/parallel-plugin-worker.ts"() {
|
|
10
|
+
init_bindingify_plugin();
|
|
11
|
+
init_plugin_context_data();
|
|
12
|
+
const { registryId, pluginInfos, threadNumber } = workerData;
|
|
13
|
+
(async () => {
|
|
14
|
+
try {
|
|
15
|
+
const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
|
|
16
|
+
const pluginModule = await import(pluginInfo.fileUrl);
|
|
17
|
+
const definePluginImpl = pluginModule.default;
|
|
18
|
+
const plugin = await definePluginImpl(pluginInfo.options, { threadNumber });
|
|
19
|
+
return {
|
|
20
|
+
index: pluginInfo.index,
|
|
21
|
+
plugin: bindingifyPlugin(plugin, {}, {}, new PluginContextData(), [], () => {}, "info", false)
|
|
22
|
+
};
|
|
23
|
+
}));
|
|
24
|
+
registerPlugins(registryId, plugins);
|
|
25
|
+
parentPort.postMessage({ type: "success" });
|
|
26
|
+
} catch (error) {
|
|
27
|
+
parentPort.postMessage({
|
|
28
|
+
type: "error",
|
|
29
|
+
error
|
|
30
|
+
});
|
|
31
|
+
} finally {
|
|
32
|
+
parentPort.unref();
|
|
33
|
+
}
|
|
34
|
+
})();
|
|
35
|
+
} });
|
|
31
36
|
|
|
32
|
-
//#endregion
|
|
37
|
+
//#endregion
|
|
38
|
+
export default require_parallel_plugin_worker();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-CHPrEDXp.mjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-BIXBk1MV.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-DL8_b_QU.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
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __esm = (fn, res) => function() {
|
|
9
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
10
|
+
};
|
|
11
|
+
var __commonJS = (cb, mod) => function() {
|
|
12
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
16
|
+
key = keys[i];
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
18
|
+
get: ((k) => from[k]).bind(null, key),
|
|
19
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
25
|
+
value: mod,
|
|
26
|
+
enumerable: true
|
|
27
|
+
}) : target, mod));
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { __commonJS, __esm, __toESM };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingHmrOutput, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-
|
|
1
|
+
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingHmrOutput, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-CHPrEDXp.mjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { __esm } from "./chunk-DSsiIF1Z.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/misc.ts
|
|
4
|
+
function arraify(value) {
|
|
5
|
+
return Array.isArray(value) ? value : [value];
|
|
6
|
+
}
|
|
7
|
+
function isNullish(value) {
|
|
8
|
+
return value === null || value === void 0;
|
|
9
|
+
}
|
|
10
|
+
function isPromiseLike(value) {
|
|
11
|
+
return value && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
|
|
12
|
+
}
|
|
13
|
+
function unimplemented(info) {
|
|
14
|
+
if (info) throw new Error(`unimplemented: ${info}`);
|
|
15
|
+
throw new Error("unimplemented");
|
|
16
|
+
}
|
|
17
|
+
function unreachable(info) {
|
|
18
|
+
if (info) throw new Error(`unreachable: ${info}`);
|
|
19
|
+
throw new Error("unreachable");
|
|
20
|
+
}
|
|
21
|
+
function unsupported(info) {
|
|
22
|
+
throw new Error(`UNSUPPORTED: ${info}`);
|
|
23
|
+
}
|
|
24
|
+
function noop(..._args) {}
|
|
25
|
+
var init_misc = __esm({ "src/utils/misc.ts"() {} });
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region ../pluginutils/dist/index.js
|
|
29
|
+
function and(...args) {
|
|
30
|
+
return new And(...args);
|
|
31
|
+
}
|
|
32
|
+
function or(...args) {
|
|
33
|
+
return new Or(...args);
|
|
34
|
+
}
|
|
35
|
+
function not(expr) {
|
|
36
|
+
return new Not(expr);
|
|
37
|
+
}
|
|
38
|
+
function id(pattern, params) {
|
|
39
|
+
return new Id(pattern, params);
|
|
40
|
+
}
|
|
41
|
+
function moduleType(pattern) {
|
|
42
|
+
return new ModuleType(pattern);
|
|
43
|
+
}
|
|
44
|
+
function code(pattern) {
|
|
45
|
+
return new Code(pattern);
|
|
46
|
+
}
|
|
47
|
+
function query(key, pattern) {
|
|
48
|
+
return new Query(key, pattern);
|
|
49
|
+
}
|
|
50
|
+
function include(expr) {
|
|
51
|
+
return new Include(expr);
|
|
52
|
+
}
|
|
53
|
+
function exclude(expr) {
|
|
54
|
+
return new Exclude(expr);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* convert a queryObject to FilterExpression like
|
|
58
|
+
* ```js
|
|
59
|
+
* and(query(k1, v1), query(k2, v2))
|
|
60
|
+
* ```
|
|
61
|
+
* @param queryFilterObject The query filter object needs to be matched.
|
|
62
|
+
* @returns a `And` FilterExpression
|
|
63
|
+
*/
|
|
64
|
+
function queries(queryFilter) {
|
|
65
|
+
let arr = Object.entries(queryFilter).map(([key, value]) => {
|
|
66
|
+
return new Query(key, value);
|
|
67
|
+
});
|
|
68
|
+
return and(...arr);
|
|
69
|
+
}
|
|
70
|
+
var And, Or, Not, Id, ModuleType, Code, Query, Include, Exclude;
|
|
71
|
+
var init_dist = __esm({ "../pluginutils/dist/index.js"() {
|
|
72
|
+
And = class {
|
|
73
|
+
kind;
|
|
74
|
+
args;
|
|
75
|
+
constructor(...args) {
|
|
76
|
+
if (args.length === 0) throw new Error("`And` expects at least one operand");
|
|
77
|
+
this.args = args;
|
|
78
|
+
this.kind = "and";
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
Or = class {
|
|
82
|
+
kind;
|
|
83
|
+
args;
|
|
84
|
+
constructor(...args) {
|
|
85
|
+
if (args.length === 0) throw new Error("`Or` expects at least one operand");
|
|
86
|
+
this.args = args;
|
|
87
|
+
this.kind = "or";
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
Not = class {
|
|
91
|
+
kind;
|
|
92
|
+
expr;
|
|
93
|
+
constructor(expr) {
|
|
94
|
+
this.expr = expr;
|
|
95
|
+
this.kind = "not";
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
Id = class {
|
|
99
|
+
kind;
|
|
100
|
+
pattern;
|
|
101
|
+
params;
|
|
102
|
+
constructor(pattern, params) {
|
|
103
|
+
this.pattern = pattern;
|
|
104
|
+
this.kind = "id";
|
|
105
|
+
this.params = params ?? { cleanUrl: false };
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
ModuleType = class {
|
|
109
|
+
kind;
|
|
110
|
+
pattern;
|
|
111
|
+
constructor(pattern) {
|
|
112
|
+
this.pattern = pattern;
|
|
113
|
+
this.kind = "moduleType";
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
Code = class {
|
|
117
|
+
kind;
|
|
118
|
+
pattern;
|
|
119
|
+
constructor(expr) {
|
|
120
|
+
this.pattern = expr;
|
|
121
|
+
this.kind = "code";
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
Query = class {
|
|
125
|
+
kind;
|
|
126
|
+
key;
|
|
127
|
+
pattern;
|
|
128
|
+
constructor(key, pattern) {
|
|
129
|
+
this.pattern = pattern;
|
|
130
|
+
this.key = key;
|
|
131
|
+
this.kind = "query";
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
Include = class {
|
|
135
|
+
kind;
|
|
136
|
+
expr;
|
|
137
|
+
constructor(expr) {
|
|
138
|
+
this.expr = expr;
|
|
139
|
+
this.kind = "include";
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
Exclude = class {
|
|
143
|
+
kind;
|
|
144
|
+
expr;
|
|
145
|
+
constructor(expr) {
|
|
146
|
+
this.expr = expr;
|
|
147
|
+
this.kind = "exclude";
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
} });
|
|
151
|
+
|
|
152
|
+
//#endregion
|
|
153
|
+
export { and, arraify, code, exclude, id, include, init_dist, init_misc, isNullish, isPromiseLike, moduleType, noop, not, or, queries, query, unimplemented, unreachable, unsupported };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __esm } from "./chunk-DSsiIF1Z.mjs";
|
|
2
|
+
import { init_rolldown, rolldown } from "./src-_MeBFVb3.mjs";
|
|
2
3
|
import path from "node:path";
|
|
3
4
|
import { pathToFileURL } from "node:url";
|
|
4
5
|
import { cwd } from "node:process";
|
|
@@ -47,18 +48,6 @@ async function bundleTsConfig(configFile, isEsm) {
|
|
|
47
48
|
const fileName = result.output.find((chunk) => chunk.type === "chunk" && chunk.isEntry).fileName;
|
|
48
49
|
return path.join(outputDir, fileName);
|
|
49
50
|
}
|
|
50
|
-
const SUPPORTED_JS_CONFIG_FORMATS = [
|
|
51
|
-
".js",
|
|
52
|
-
".mjs",
|
|
53
|
-
".cjs"
|
|
54
|
-
];
|
|
55
|
-
const SUPPORTED_TS_CONFIG_FORMATS = [
|
|
56
|
-
".ts",
|
|
57
|
-
".mts",
|
|
58
|
-
".cts"
|
|
59
|
-
];
|
|
60
|
-
const SUPPORTED_CONFIG_FORMATS = [...SUPPORTED_JS_CONFIG_FORMATS, ...SUPPORTED_TS_CONFIG_FORMATS];
|
|
61
|
-
const DEFAULT_CONFIG_BASE = "rolldown.config";
|
|
62
51
|
async function findConfigFileNameInCwd() {
|
|
63
52
|
const filesInWorkingDirectory = new Set(await readdir(cwd()));
|
|
64
53
|
for (const extension of SUPPORTED_CONFIG_FORMATS) {
|
|
@@ -114,6 +103,22 @@ async function loadConfig(configPath) {
|
|
|
114
103
|
throw new Error("Error happened while loading config.", { cause: err });
|
|
115
104
|
}
|
|
116
105
|
}
|
|
106
|
+
var SUPPORTED_JS_CONFIG_FORMATS, SUPPORTED_TS_CONFIG_FORMATS, SUPPORTED_CONFIG_FORMATS, DEFAULT_CONFIG_BASE;
|
|
107
|
+
var init_load_config = __esm({ "src/utils/load-config.ts"() {
|
|
108
|
+
init_rolldown();
|
|
109
|
+
SUPPORTED_JS_CONFIG_FORMATS = [
|
|
110
|
+
".js",
|
|
111
|
+
".mjs",
|
|
112
|
+
".cjs"
|
|
113
|
+
];
|
|
114
|
+
SUPPORTED_TS_CONFIG_FORMATS = [
|
|
115
|
+
".ts",
|
|
116
|
+
".mts",
|
|
117
|
+
".cts"
|
|
118
|
+
];
|
|
119
|
+
SUPPORTED_CONFIG_FORMATS = [...SUPPORTED_JS_CONFIG_FORMATS, ...SUPPORTED_TS_CONFIG_FORMATS];
|
|
120
|
+
DEFAULT_CONFIG_BASE = "rolldown.config";
|
|
121
|
+
} });
|
|
117
122
|
|
|
118
123
|
//#endregion
|
|
119
|
-
export { loadConfig };
|
|
124
|
+
export { init_load_config, loadConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./src-
|
|
2
|
+
const require_src = require('./src-heZFfrWc.cjs');
|
|
3
3
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
4
4
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
5
5
|
const node_process = require_chunk.__toESM(require("node:process"));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __esm } from "./chunk-DSsiIF1Z.mjs";
|
|
1
2
|
import { parseAsync, parseSync } from "../rolldown-binding.wasi.cjs";
|
|
2
3
|
|
|
3
4
|
//#region src/utils/code-frame.ts
|
|
@@ -9,9 +10,6 @@ function spaces(index) {
|
|
|
9
10
|
function tabsToSpaces(value) {
|
|
10
11
|
return value.replace(/^\t+/, (match) => match.split(" ").join(" "));
|
|
11
12
|
}
|
|
12
|
-
const LINE_TRUNCATE_LENGTH = 120;
|
|
13
|
-
const MIN_CHARACTERS_SHOWN_AFTER_LOCATION = 10;
|
|
14
|
-
const ELLIPSIS = "...";
|
|
15
13
|
function getCodeFrame(source, line, column) {
|
|
16
14
|
let lines = source.split("\n");
|
|
17
15
|
if (line > lines.length) return "";
|
|
@@ -37,6 +35,12 @@ function getCodeFrame(source, line, column) {
|
|
|
37
35
|
return `${lineNumber}: ${displayedLine}`;
|
|
38
36
|
}).join("\n");
|
|
39
37
|
}
|
|
38
|
+
var LINE_TRUNCATE_LENGTH, MIN_CHARACTERS_SHOWN_AFTER_LOCATION, ELLIPSIS;
|
|
39
|
+
var init_code_frame = __esm({ "src/utils/code-frame.ts"() {
|
|
40
|
+
LINE_TRUNCATE_LENGTH = 120;
|
|
41
|
+
MIN_CHARACTERS_SHOWN_AFTER_LOCATION = 10;
|
|
42
|
+
ELLIPSIS = "...";
|
|
43
|
+
} });
|
|
40
44
|
|
|
41
45
|
//#endregion
|
|
42
46
|
//#region src/log/locate-character/index.js
|
|
@@ -98,10 +102,10 @@ function getLocator(source, options = {}) {
|
|
|
98
102
|
function locate(source, search, options) {
|
|
99
103
|
return getLocator(source, options)(search, options && options.startIndex);
|
|
100
104
|
}
|
|
105
|
+
var init_locate_character = __esm({ "src/log/locate-character/index.js"() {} });
|
|
101
106
|
|
|
102
107
|
//#endregion
|
|
103
108
|
//#region src/log/logs.ts
|
|
104
|
-
const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR";
|
|
105
109
|
function logParseError(message) {
|
|
106
110
|
return {
|
|
107
111
|
code: PARSE_ERROR,
|
|
@@ -178,9 +182,15 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
178
182
|
properties.frame = getCodeFrame(source, line, column);
|
|
179
183
|
}
|
|
180
184
|
}
|
|
185
|
+
var INVALID_LOG_POSITION, PLUGIN_ERROR, INPUT_HOOK_IN_OUTPUT_PLUGIN, CYCLE_LOADING, MULTIPLY_NOTIFY_OPTION, PARSE_ERROR;
|
|
186
|
+
var init_logs = __esm({ "src/log/logs.ts"() {
|
|
187
|
+
init_code_frame();
|
|
188
|
+
init_locate_character();
|
|
189
|
+
INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR";
|
|
190
|
+
} });
|
|
181
191
|
|
|
182
192
|
//#endregion
|
|
183
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.72.
|
|
193
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.72.2/node_modules/oxc-parser/wrap.mjs
|
|
184
194
|
function wrap$1(result) {
|
|
185
195
|
let program, module, comments, errors;
|
|
186
196
|
return {
|
|
@@ -215,6 +225,7 @@ function applyFix(program, fixPath) {
|
|
|
215
225
|
node.value = RegExp(node.regex.pattern, node.regex.flags);
|
|
216
226
|
} catch (_err) {}
|
|
217
227
|
}
|
|
228
|
+
var init_wrap = __esm({ "../../node_modules/.pnpm/oxc-parser@0.72.2/node_modules/oxc-parser/wrap.mjs"() {} });
|
|
218
229
|
|
|
219
230
|
//#endregion
|
|
220
231
|
//#region src/parse-ast-index.ts
|
|
@@ -239,10 +250,6 @@ function normalizeParseError(sourceText, errors) {
|
|
|
239
250
|
}
|
|
240
251
|
return error(logParseError(message));
|
|
241
252
|
}
|
|
242
|
-
const defaultParserOptions = {
|
|
243
|
-
lang: "js",
|
|
244
|
-
preserveParens: false
|
|
245
|
-
};
|
|
246
253
|
function parseAst(sourceText, options, filename) {
|
|
247
254
|
return wrap(parseSync(filename ?? "file.js", sourceText, {
|
|
248
255
|
...defaultParserOptions,
|
|
@@ -255,6 +262,17 @@ async function parseAstAsync(sourceText, options, filename) {
|
|
|
255
262
|
...options
|
|
256
263
|
}), sourceText);
|
|
257
264
|
}
|
|
265
|
+
var defaultParserOptions;
|
|
266
|
+
var init_parse_ast_index = __esm({ "src/parse-ast-index.ts"() {
|
|
267
|
+
init_locate_character();
|
|
268
|
+
init_logs();
|
|
269
|
+
init_code_frame();
|
|
270
|
+
init_wrap();
|
|
271
|
+
defaultParserOptions = {
|
|
272
|
+
lang: "js",
|
|
273
|
+
preserveParens: false
|
|
274
|
+
};
|
|
275
|
+
} });
|
|
258
276
|
|
|
259
277
|
//#endregion
|
|
260
|
-
export { augmentCodeLocation, error, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, parseAstAsync };
|
|
278
|
+
export { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, parseAstAsync };
|
|
@@ -181,7 +181,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
//#endregion
|
|
184
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.72.
|
|
184
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.72.2/node_modules/oxc-parser/wrap.mjs
|
|
185
185
|
function wrap$1(result) {
|
|
186
186
|
let program, module$1, comments, errors;
|
|
187
187
|
return {
|