rolldown 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 +1075 -1036
- package/dist/config.cjs +3 -3
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +5 -4
- package/dist/experimental-index.cjs +2 -2
- package/dist/experimental-index.d.mts +2 -2
- package/dist/experimental-index.mjs +12 -3
- package/dist/filter-index.d.mts +2 -2
- package/dist/filter-index.mjs +2 -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 +34 -28
- 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/shared/chunk--iN_1bjD.mjs +33 -0
- package/dist/shared/{define-config-CpexVifn.d.mts → define-config-BL025qn5.d.mts} +1 -1
- package/dist/shared/{load-config-DTXGCmId.cjs → load-config-DEyy-phc.cjs} +1 -1
- package/dist/shared/{load-config-WuIFSl0A.mjs → load-config-ZOGX0N6a.mjs} +19 -14
- package/dist/shared/{misc-BN0nse6C.mjs → misc-DGAe2XOW.mjs} +4 -1
- package/dist/shared/{parse-ast-index-PSQWLeSo.mjs → parse-ast-index-BkTjw5qC.mjs} +30 -40
- package/dist/shared/{parse-ast-index-BvK1MT-L.cjs → parse-ast-index-D7OUxwJp.cjs} +1 -1
- package/dist/shared/prompt-Dc0i9ubg.mjs +854 -0
- package/dist/shared/{src-DrHV5x1X.cjs → src-BOhIOXwi.cjs} +86 -16
- package/dist/shared/{src-BB5r5vkG.mjs → src-aebl8_bs.mjs} +1428 -1110
- package/package.json +20 -20
- 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-
|
|
2
|
-
require('./shared/parse-ast-index-
|
|
1
|
+
const require_src = require('./shared/src-BOhIOXwi.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-D7OUxwJp.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-DEyy-phc.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-BL025qn5.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 "./shared/
|
|
2
|
-
import
|
|
3
|
-
import "./shared/misc-
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
1
|
+
import { defineConfig, version } from "./shared/src-aebl8_bs.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-BkTjw5qC.mjs";
|
|
3
|
+
import "./shared/misc-DGAe2XOW.mjs";
|
|
4
|
+
import { init_load_config, loadConfig } from "./shared/load-config-ZOGX0N6a.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
|
+
init_load_config();
|
|
7
8
|
const VERSION = version;
|
|
8
9
|
|
|
9
10
|
//#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-BOhIOXwi.cjs');
|
|
3
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-D7OUxwJp.cjs');
|
|
4
4
|
require('./shared/misc-BKp5iIef.cjs');
|
|
5
5
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
6
6
|
|
|
@@ -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-BL025qn5.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { __toESM
|
|
2
|
-
import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-
|
|
3
|
-
import "./shared/
|
|
1
|
+
import { __toESM } from "./shared/chunk--iN_1bjD.mjs";
|
|
2
|
+
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-aebl8_bs.mjs";
|
|
3
|
+
import { require_binding } from "./shared/parse-ast-index-BkTjw5qC.mjs";
|
|
4
|
+
import "./shared/misc-DGAe2XOW.mjs";
|
|
4
5
|
import { pathToFileURL } from "node:url";
|
|
5
6
|
|
|
6
7
|
//#region src/api/experimental.ts
|
|
8
|
+
init_create_bundler();
|
|
9
|
+
init_transform_to_rollup_output();
|
|
7
10
|
/**
|
|
8
11
|
* This is an experimental API. It's behavior may change in the future.
|
|
9
12
|
*
|
|
@@ -29,12 +32,14 @@ function defineParallelPlugin(pluginPath) {
|
|
|
29
32
|
|
|
30
33
|
//#endregion
|
|
31
34
|
//#region src/builtin-plugin/alias-plugin.ts
|
|
35
|
+
init_constructors();
|
|
32
36
|
function aliasPlugin(config) {
|
|
33
37
|
return new BuiltinPlugin("builtin:alias", config);
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
//#endregion
|
|
37
41
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
42
|
+
init_constructors();
|
|
38
43
|
/**
|
|
39
44
|
* Replaces targeted strings in files while bundling.
|
|
40
45
|
*
|
|
@@ -68,6 +73,8 @@ function replacePlugin(values = {}, options = {}) {
|
|
|
68
73
|
|
|
69
74
|
//#endregion
|
|
70
75
|
//#region src/builtin-plugin/transform-plugin.ts
|
|
76
|
+
init_constructors();
|
|
77
|
+
init_normalize_string_or_regex();
|
|
71
78
|
function transformPlugin(config) {
|
|
72
79
|
if (config) config = {
|
|
73
80
|
...config,
|
|
@@ -82,6 +89,8 @@ function transformPlugin(config) {
|
|
|
82
89
|
//#endregion
|
|
83
90
|
//#region src/experimental-index.ts
|
|
84
91
|
var import_binding = __toESM(require_binding());
|
|
92
|
+
init_compose_js_plugins();
|
|
93
|
+
init_constructors();
|
|
85
94
|
|
|
86
95
|
//#endregion
|
|
87
96
|
var ResolverFactory = import_binding.ResolverFactory;
|
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-BL025qn5.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,7 +1,8 @@
|
|
|
1
|
-
import { arraify, isPromiseLike } from "./shared/misc-
|
|
1
|
+
import { arraify, init_misc, isPromiseLike } from "./shared/misc-DGAe2XOW.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();
|
|
5
6
|
function withFilterImpl(pluginOption, filterObjectList) {
|
|
6
7
|
if (isPromiseLike(pluginOption)) return pluginOption.then((p) => withFilter(p, filterObjectList));
|
|
7
8
|
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-BOhIOXwi.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-D7OUxwJp.cjs');
|
|
3
3
|
require('./shared/misc-BKp5iIef.cjs');
|
|
4
4
|
|
|
5
5
|
exports.VERSION = require_src.VERSION;
|
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-BL025qn5.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 "./shared/
|
|
2
|
-
import
|
|
3
|
-
import "./shared/misc-
|
|
1
|
+
import { VERSION, build, defineConfig, init_src, rolldown, watch } from "./shared/src-aebl8_bs.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-BkTjw5qC.mjs";
|
|
3
|
+
import "./shared/misc-DGAe2XOW.mjs";
|
|
4
4
|
|
|
5
|
+
init_src();
|
|
5
6
|
export { VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -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-BOhIOXwi.cjs');
|
|
3
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-D7OUxwJp.cjs');
|
|
4
4
|
require('./shared/misc-BKp5iIef.cjs');
|
|
5
5
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
6
6
|
|
|
@@ -1,32 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PluginContextData, bindingifyPlugin } from "./shared/src-
|
|
3
|
-
import "./shared/
|
|
1
|
+
import { __commonJS, __toESM } from "./shared/chunk--iN_1bjD.mjs";
|
|
2
|
+
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-aebl8_bs.mjs";
|
|
3
|
+
import { require_binding } from "./shared/parse-ast-index-BkTjw5qC.mjs";
|
|
4
|
+
import "./shared/misc-DGAe2XOW.mjs";
|
|
4
5
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
6
|
|
|
6
7
|
//#region src/parallel-plugin-worker.ts
|
|
7
|
-
var
|
|
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
|
-
}
|
|
8
|
+
var require_parallel_plugin_worker = __commonJS({ "src/parallel-plugin-worker.ts"() {
|
|
9
|
+
var import_binding = __toESM(require_binding());
|
|
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
|
+
(0, import_binding.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-BL025qn5.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-D7OUxwJp.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
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
|
|
3
|
+
//#region rolldown:runtime
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __esm = (fn, res) => function() {
|
|
11
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
12
|
+
};
|
|
13
|
+
var __commonJS = (cb, mod) => function() {
|
|
14
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
18
|
+
key = keys[i];
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
20
|
+
get: ((k) => from[k]).bind(null, key),
|
|
21
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
27
|
+
value: mod,
|
|
28
|
+
enumerable: true
|
|
29
|
+
}) : target, mod));
|
|
30
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { __commonJS, __esm, __require, __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 { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
3
3
|
import { Program } from "@oxc-project/types";
|
|
4
4
|
|
|
@@ -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-BOhIOXwi.cjs');
|
|
3
3
|
const node_fs = require_chunk.__toESM(require("node:fs"));
|
|
4
4
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
5
5
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __esm } from "./chunk--iN_1bjD.mjs";
|
|
2
|
+
import { init_rolldown, rolldown } from "./src-aebl8_bs.mjs";
|
|
2
3
|
import fs from "node:fs";
|
|
3
4
|
import path from "node:path";
|
|
4
5
|
import { pathToFileURL } from "node:url";
|
|
@@ -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,3 +1,5 @@
|
|
|
1
|
+
import { __esm } from "./chunk--iN_1bjD.mjs";
|
|
2
|
+
|
|
1
3
|
//#region src/utils/misc.ts
|
|
2
4
|
function arraify(value) {
|
|
3
5
|
return Array.isArray(value) ? value : [value];
|
|
@@ -20,6 +22,7 @@ function unsupported(info) {
|
|
|
20
22
|
throw new Error(`UNSUPPORTED: ${info}`);
|
|
21
23
|
}
|
|
22
24
|
function noop(..._args) {}
|
|
25
|
+
var init_misc = __esm({ "src/utils/misc.ts"() {} });
|
|
23
26
|
|
|
24
27
|
//#endregion
|
|
25
|
-
export { arraify, isNullish, isPromiseLike, noop, unimplemented, unreachable, unsupported };
|
|
28
|
+
export { arraify, init_misc, isNullish, isPromiseLike, noop, unimplemented, unreachable, unsupported };
|
|
@@ -1,32 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __commonJS, __esm, __require, __toESM } from "./chunk--iN_1bjD.mjs";
|
|
2
2
|
|
|
3
|
-
//#region rolldown:runtime
|
|
4
|
-
var __create = Object.create;
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __commonJS = (cb, mod) => function() {
|
|
11
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
15
|
-
key = keys[i];
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
-
get: ((k) => from[k]).bind(null, key),
|
|
18
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
-
value: mod,
|
|
25
|
-
enumerable: true
|
|
26
|
-
}) : target, mod));
|
|
27
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
3
|
//#region src/webcontainer-fallback.js
|
|
31
4
|
var require_webcontainer_fallback = __commonJS({ "src/webcontainer-fallback.js"(exports, module) {
|
|
32
5
|
const fs = __require("node:fs");
|
|
@@ -54,7 +27,7 @@ var require_webcontainer_fallback = __commonJS({ "src/webcontainer-fallback.js"(
|
|
|
54
27
|
//#endregion
|
|
55
28
|
//#region src/binding.js
|
|
56
29
|
var require_binding = __commonJS({ "src/binding.js"(exports, module) {
|
|
57
|
-
const { createRequire
|
|
30
|
+
const { createRequire } = __require("node:module");
|
|
58
31
|
const { readFileSync } = __require("node:fs");
|
|
59
32
|
let nativeBinding = null;
|
|
60
33
|
const loadErrors = [];
|
|
@@ -415,9 +388,6 @@ function spaces(index) {
|
|
|
415
388
|
function tabsToSpaces(value) {
|
|
416
389
|
return value.replace(/^\t+/, (match) => match.split(" ").join(" "));
|
|
417
390
|
}
|
|
418
|
-
const LINE_TRUNCATE_LENGTH = 120;
|
|
419
|
-
const MIN_CHARACTERS_SHOWN_AFTER_LOCATION = 10;
|
|
420
|
-
const ELLIPSIS = "...";
|
|
421
391
|
function getCodeFrame(source, line, column) {
|
|
422
392
|
let lines = source.split("\n");
|
|
423
393
|
if (line > lines.length) return "";
|
|
@@ -443,6 +413,12 @@ function getCodeFrame(source, line, column) {
|
|
|
443
413
|
return `${lineNumber}: ${displayedLine}`;
|
|
444
414
|
}).join("\n");
|
|
445
415
|
}
|
|
416
|
+
var LINE_TRUNCATE_LENGTH, MIN_CHARACTERS_SHOWN_AFTER_LOCATION, ELLIPSIS;
|
|
417
|
+
var init_code_frame = __esm({ "src/utils/code-frame.ts"() {
|
|
418
|
+
LINE_TRUNCATE_LENGTH = 120;
|
|
419
|
+
MIN_CHARACTERS_SHOWN_AFTER_LOCATION = 10;
|
|
420
|
+
ELLIPSIS = "...";
|
|
421
|
+
} });
|
|
446
422
|
|
|
447
423
|
//#endregion
|
|
448
424
|
//#region src/log/locate-character/index.js
|
|
@@ -504,10 +480,10 @@ function getLocator(source, options = {}) {
|
|
|
504
480
|
function locate(source, search, options) {
|
|
505
481
|
return getLocator(source, options)(search, options && options.startIndex);
|
|
506
482
|
}
|
|
483
|
+
var init_locate_character = __esm({ "src/log/locate-character/index.js"() {} });
|
|
507
484
|
|
|
508
485
|
//#endregion
|
|
509
486
|
//#region src/log/logs.ts
|
|
510
|
-
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";
|
|
511
487
|
function logParseError(message) {
|
|
512
488
|
return {
|
|
513
489
|
code: PARSE_ERROR,
|
|
@@ -584,9 +560,15 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
584
560
|
properties.frame = getCodeFrame(source, line, column);
|
|
585
561
|
}
|
|
586
562
|
}
|
|
563
|
+
var INVALID_LOG_POSITION, PLUGIN_ERROR, INPUT_HOOK_IN_OUTPUT_PLUGIN, CYCLE_LOADING, MULTIPLY_NOTIFY_OPTION, PARSE_ERROR;
|
|
564
|
+
var init_logs = __esm({ "src/log/logs.ts"() {
|
|
565
|
+
init_code_frame();
|
|
566
|
+
init_locate_character();
|
|
567
|
+
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";
|
|
568
|
+
} });
|
|
587
569
|
|
|
588
570
|
//#endregion
|
|
589
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.72.
|
|
571
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.72.2/node_modules/oxc-parser/wrap.mjs
|
|
590
572
|
function wrap$1(result) {
|
|
591
573
|
let program, module$1, comments, errors;
|
|
592
574
|
return {
|
|
@@ -621,10 +603,10 @@ function applyFix(program, fixPath) {
|
|
|
621
603
|
node.value = RegExp(node.regex.pattern, node.regex.flags);
|
|
622
604
|
} catch (_err) {}
|
|
623
605
|
}
|
|
606
|
+
var init_wrap = __esm({ "../../node_modules/.pnpm/oxc-parser@0.72.2/node_modules/oxc-parser/wrap.mjs"() {} });
|
|
624
607
|
|
|
625
608
|
//#endregion
|
|
626
609
|
//#region src/parse-ast-index.ts
|
|
627
|
-
var import_binding = __toESM(require_binding());
|
|
628
610
|
function wrap(result, sourceText) {
|
|
629
611
|
result = wrap$1(result);
|
|
630
612
|
if (result.errors.length > 0) return normalizeParseError(sourceText, result.errors);
|
|
@@ -646,10 +628,6 @@ function normalizeParseError(sourceText, errors) {
|
|
|
646
628
|
}
|
|
647
629
|
return error(logParseError(message));
|
|
648
630
|
}
|
|
649
|
-
const defaultParserOptions = {
|
|
650
|
-
lang: "js",
|
|
651
|
-
preserveParens: false
|
|
652
|
-
};
|
|
653
631
|
function parseAst(sourceText, options, filename) {
|
|
654
632
|
return wrap((0, import_binding.parseSync)(filename ?? "file.js", sourceText, {
|
|
655
633
|
...defaultParserOptions,
|
|
@@ -662,6 +640,18 @@ async function parseAstAsync(sourceText, options, filename) {
|
|
|
662
640
|
...options
|
|
663
641
|
}), sourceText);
|
|
664
642
|
}
|
|
643
|
+
var import_binding, defaultParserOptions;
|
|
644
|
+
var init_parse_ast_index = __esm({ "src/parse-ast-index.ts"() {
|
|
645
|
+
import_binding = __toESM(require_binding());
|
|
646
|
+
init_locate_character();
|
|
647
|
+
init_logs();
|
|
648
|
+
init_code_frame();
|
|
649
|
+
init_wrap();
|
|
650
|
+
defaultParserOptions = {
|
|
651
|
+
lang: "js",
|
|
652
|
+
preserveParens: false
|
|
653
|
+
};
|
|
654
|
+
} });
|
|
665
655
|
|
|
666
656
|
//#endregion
|
|
667
|
-
export {
|
|
657
|
+
export { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, parseAstAsync, require_binding };
|
|
@@ -559,7 +559,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
559
559
|
}
|
|
560
560
|
|
|
561
561
|
//#endregion
|
|
562
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.72.
|
|
562
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.72.2/node_modules/oxc-parser/wrap.mjs
|
|
563
563
|
function wrap$1(result) {
|
|
564
564
|
let program, module$1, comments, errors;
|
|
565
565
|
return {
|