@rolldown/browser 1.0.0-beta.34 → 1.0.0-beta.36

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.
Files changed (51) hide show
  1. package/dist/cli.mjs +219 -230
  2. package/dist/config.d.mts +2 -2
  3. package/dist/config.mjs +4 -4
  4. package/dist/experimental-index.browser.mjs +22 -6
  5. package/dist/experimental-index.d.mts +16 -4
  6. package/dist/experimental-index.mjs +24 -8
  7. package/dist/filter-index.d.mts +2 -2
  8. package/dist/filter-index.mjs +1 -1
  9. package/dist/index.browser.mjs +1 -1
  10. package/dist/index.d.mts +2 -2
  11. package/dist/index.mjs +3 -3
  12. package/dist/parallel-plugin-worker.mjs +5 -6
  13. package/dist/parallel-plugin.d.mts +2 -2
  14. package/dist/parse-ast-index.d.mts +1 -1
  15. package/dist/parse-ast-index.mjs +1 -1
  16. package/dist/rolldown-binding.wasi-browser.js +4 -0
  17. package/dist/rolldown-binding.wasi.cjs +4 -0
  18. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  19. package/dist/shared/{binding-9k0egz6L.d.mts → binding-wK0CRIMb.d.mts} +1 -0
  20. package/dist/shared/{define-config-DzIQxNqU.d.mts → define-config-BcNhk996.d.mts} +30 -3
  21. package/dist/shared/{dist-ByKQkexh.mjs → dist-CHTC3-kR.mjs} +1 -1
  22. package/dist/shared/{load-config--VYNOtUY.mjs → load-config-M8Gvqt1X.mjs} +4 -6
  23. package/dist/shared/{parse-ast-index-C_CZT4St.mjs → parse-ast-index-C3TkGcEQ.mjs} +1 -1
  24. package/dist/shared/{prompt-C5jz26Zn.mjs → prompt-DuG2i9ud.mjs} +4 -7
  25. package/dist/shared/{src-B4V64IkU.mjs → src-Dc4fRARy.mjs} +143 -72
  26. package/dist/{src-Bl12Y5ab.js → src-Cl6h35QH.js} +141 -71
  27. package/package.json +10 -24
  28. package/dist/cli.cjs +0 -1766
  29. package/dist/cli.d.cts +0 -1
  30. package/dist/config.cjs +0 -12
  31. package/dist/config.d.cts +0 -10
  32. package/dist/experimental-index.cjs +0 -160
  33. package/dist/experimental-index.d.cts +0 -90
  34. package/dist/filter-index.cjs +0 -53
  35. package/dist/filter-index.d.cts +0 -4
  36. package/dist/index.cjs +0 -9
  37. package/dist/index.d.cts +0 -3
  38. package/dist/parallel-plugin-worker.cjs +0 -33
  39. package/dist/parallel-plugin-worker.d.cts +0 -1
  40. package/dist/parallel-plugin.cjs +0 -8
  41. package/dist/parallel-plugin.d.cts +0 -14
  42. package/dist/parse-ast-index.cjs +0 -4
  43. package/dist/parse-ast-index.d.cts +0 -8
  44. package/dist/shared/binding-D13M6Llu.d.cts +0 -1425
  45. package/dist/shared/chunk-DDkG_k5U.cjs +0 -39
  46. package/dist/shared/define-config-D5AluabE.d.cts +0 -1394
  47. package/dist/shared/dist-CK0hotcm.cjs +0 -240
  48. package/dist/shared/load-config-DfHD1OI9.cjs +0 -125
  49. package/dist/shared/parse-ast-index-ChWj_C49.cjs +0 -326
  50. package/dist/shared/prompt-QNI93ne7.cjs +0 -854
  51. package/dist/shared/src-McCMqGpa.cjs +0 -4738
package/dist/cli.d.cts DELETED
@@ -1 +0,0 @@
1
- export {};
package/dist/config.cjs DELETED
@@ -1,12 +0,0 @@
1
- const require_src = require('./shared/src-McCMqGpa.cjs');
2
- require('./shared/parse-ast-index-ChWj_C49.cjs');
3
- require('./shared/dist-CK0hotcm.cjs');
4
- const require_load_config = require('./shared/load-config-DfHD1OI9.cjs');
5
-
6
- //#region src/config.ts
7
- const VERSION = require_src.version;
8
-
9
- //#endregion
10
- exports.VERSION = VERSION;
11
- exports.defineConfig = require_src.defineConfig;
12
- exports.loadConfig = require_load_config.loadConfig;
package/dist/config.d.cts DELETED
@@ -1,10 +0,0 @@
1
- import "./shared/binding-D13M6Llu.cjs";
2
- import { ConfigExport, defineConfig } from "./shared/define-config-D5AluabE.cjs";
3
-
4
- //#region src/utils/load-config.d.ts
5
- declare function loadConfig(configPath: string): Promise<ConfigExport>;
6
- //#endregion
7
- //#region src/config.d.ts
8
- declare const VERSION: string;
9
- //#endregion
10
- export { VERSION, defineConfig, loadConfig };
@@ -1,160 +0,0 @@
1
- const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-McCMqGpa.cjs');
3
- require('./shared/parse-ast-index-ChWj_C49.cjs');
4
- require('./shared/dist-CK0hotcm.cjs');
5
- const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
6
- const node_url = require_chunk.__toESM(require("node:url"));
7
-
8
- //#region src/api/dev/dev-engine.ts
9
- var DevEngine = class DevEngine {
10
- #inner;
11
- #cachedBuildFinishPromise = null;
12
- static async create(inputOptions, outputOptions) {
13
- inputOptions = await require_src.PluginDriver.callOptionsHook(inputOptions);
14
- const options = await require_src.createBundlerOptions(inputOptions, outputOptions, false);
15
- const inner = new src_rolldown_binding_wasi_cjs.BindingDevEngine(options.bundlerOptions);
16
- return new DevEngine(inner);
17
- }
18
- constructor(inner) {
19
- this.#inner = inner;
20
- }
21
- async run() {
22
- await this.#inner.run();
23
- }
24
- async ensureCurrentBuildFinish() {
25
- if (this.#cachedBuildFinishPromise) return this.#cachedBuildFinishPromise;
26
- const promise = this.#inner.ensureCurrentBuildFinish().then(() => {
27
- this.#cachedBuildFinishPromise = null;
28
- });
29
- this.#cachedBuildFinishPromise = promise;
30
- return promise;
31
- }
32
- };
33
-
34
- //#endregion
35
- //#region src/api/dev/index.ts
36
- var dev = DevEngine.create;
37
-
38
- //#endregion
39
- //#region src/api/experimental.ts
40
- /**
41
- * This is an experimental API. It's behavior may change in the future.
42
- *
43
- * Calling this API will only execute the scan stage of rolldown.
44
- */
45
- const experimental_scan = async (input) => {
46
- const inputOptions = await require_src.PluginDriver.callOptionsHook(input);
47
- const { impl: bundler, stopWorkers } = await require_src.createBundlerImpl(new src_rolldown_binding_wasi_cjs.BindingBundler(), inputOptions, {});
48
- const output = await bundler.scan();
49
- require_src.handleOutputErrors(output);
50
- await stopWorkers?.();
51
- };
52
-
53
- //#endregion
54
- //#region src/plugin/parallel-plugin.ts
55
- function defineParallelPlugin(pluginPath) {
56
- return (options) => {
57
- return { _parallel: {
58
- fileUrl: (0, node_url.pathToFileURL)(pluginPath).href,
59
- options
60
- } };
61
- };
62
- }
63
-
64
- //#endregion
65
- //#region src/builtin-plugin/alias-plugin.ts
66
- function aliasPlugin(config) {
67
- return new require_src.BuiltinPlugin("builtin:alias", config);
68
- }
69
-
70
- //#endregion
71
- //#region src/builtin-plugin/replace-plugin.ts
72
- /**
73
- * Replaces targeted strings in files while bundling.
74
- *
75
- * @example
76
- * // Basic usage
77
- * ```js
78
- * replacePlugin({
79
- * 'process.env.NODE_ENV': JSON.stringify('production'),
80
- * __buildVersion: 15
81
- * })
82
- * ```
83
- * @example
84
- * // With options
85
- * ```js
86
- * replacePlugin({
87
- * 'process.env.NODE_ENV': JSON.stringify('production'),
88
- * __buildVersion: 15
89
- * }, {
90
- * preventAssignment: false,
91
- * })
92
- * ```
93
- */
94
- function replacePlugin(values = {}, options = {}) {
95
- return new require_src.BuiltinPlugin("builtin:replace", {
96
- ...options,
97
- values
98
- });
99
- }
100
-
101
- //#endregion
102
- //#region src/builtin-plugin/transform-plugin.ts
103
- function transformPlugin(config) {
104
- if (config) config = {
105
- ...config,
106
- include: require_src.normalizedStringOrRegex(config.include),
107
- exclude: require_src.normalizedStringOrRegex(config.exclude),
108
- jsxRefreshInclude: require_src.normalizedStringOrRegex(config.jsxRefreshInclude),
109
- jsxRefreshExclude: require_src.normalizedStringOrRegex(config.jsxRefreshExclude)
110
- };
111
- return new require_src.BuiltinPlugin("builtin:transform", config);
112
- }
113
-
114
- //#endregion
115
- exports.DevEngine = DevEngine;
116
- Object.defineProperty(exports, 'ResolverFactory', {
117
- enumerable: true,
118
- get: function () {
119
- return src_rolldown_binding_wasi_cjs.ResolverFactory;
120
- }
121
- });
122
- exports.aliasPlugin = aliasPlugin;
123
- exports.assetPlugin = require_src.assetPlugin;
124
- exports.buildImportAnalysisPlugin = require_src.buildImportAnalysisPlugin;
125
- exports.defineParallelPlugin = defineParallelPlugin;
126
- exports.dev = dev;
127
- exports.dynamicImportVarsPlugin = require_src.dynamicImportVarsPlugin;
128
- exports.esmExternalRequirePlugin = require_src.esmExternalRequirePlugin;
129
- exports.importGlobPlugin = require_src.importGlobPlugin;
130
- Object.defineProperty(exports, 'isolatedDeclaration', {
131
- enumerable: true,
132
- get: function () {
133
- return src_rolldown_binding_wasi_cjs.isolatedDeclaration;
134
- }
135
- });
136
- exports.isolatedDeclarationPlugin = require_src.isolatedDeclarationPlugin;
137
- exports.jsonPlugin = require_src.jsonPlugin;
138
- exports.loadFallbackPlugin = require_src.loadFallbackPlugin;
139
- exports.manifestPlugin = require_src.manifestPlugin;
140
- exports.modulePreloadPolyfillPlugin = require_src.modulePreloadPolyfillPlugin;
141
- Object.defineProperty(exports, 'moduleRunnerTransform', {
142
- enumerable: true,
143
- get: function () {
144
- return src_rolldown_binding_wasi_cjs.moduleRunnerTransform;
145
- }
146
- });
147
- exports.replacePlugin = replacePlugin;
148
- exports.reporterPlugin = require_src.reporterPlugin;
149
- exports.scan = experimental_scan;
150
- Object.defineProperty(exports, 'transform', {
151
- enumerable: true,
152
- get: function () {
153
- return src_rolldown_binding_wasi_cjs.transform;
154
- }
155
- });
156
- exports.transformPlugin = transformPlugin;
157
- exports.viteResolvePlugin = require_src.viteResolvePlugin;
158
- exports.wasmFallbackPlugin = require_src.wasmFallbackPlugin;
159
- exports.wasmHelperPlugin = require_src.wasmHelperPlugin;
160
- exports.webWorkerPostPlugin = require_src.webWorkerPostPlugin;
@@ -1,90 +0,0 @@
1
- import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-D13M6Llu.cjs";
2
- import { BuiltinPlugin, InputOptions, OutputOptions, StringOrRegExp, defineParallelPlugin } from "./shared/define-config-D5AluabE.cjs";
3
-
4
- //#region src/api/dev/dev-engine.d.ts
5
- declare class DevEngine {
6
- #private;
7
- static create(inputOptions: InputOptions, outputOptions: OutputOptions): Promise<DevEngine>;
8
- private constructor();
9
- run(): Promise<void>;
10
- ensureCurrentBuildFinish(): Promise<void>;
11
- }
12
- //#endregion
13
- //#region src/api/dev/index.d.ts
14
- declare var dev: typeof DevEngine.create;
15
- //#endregion
16
- //#region src/api/experimental.d.ts
17
- /**
18
- * This is an experimental API. It's behavior may change in the future.
19
- *
20
- * Calling this API will only execute the scan stage of rolldown.
21
- */
22
- declare const experimental_scan: (input: InputOptions) => Promise<void>;
23
- //#endregion
24
- //#region src/builtin-plugin/constructors.d.ts
25
- declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): BuiltinPlugin;
26
- type DynamicImportVarsPluginConfig = Omit<BindingDynamicImportVarsPluginConfig, "include" | "exclude"> & {
27
- include?: StringOrRegExp | StringOrRegExp[];
28
- exclude?: StringOrRegExp | StringOrRegExp[];
29
- };
30
- declare function dynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
31
- declare function importGlobPlugin(config?: BindingImportGlobPluginConfig): BuiltinPlugin;
32
- declare function reporterPlugin(config?: BindingReporterPluginConfig): BuiltinPlugin;
33
- declare function manifestPlugin(config?: BindingManifestPluginConfig): BuiltinPlugin;
34
- declare function wasmHelperPlugin(config?: BindingWasmHelperPluginConfig): BuiltinPlugin;
35
- declare function wasmFallbackPlugin(): BuiltinPlugin;
36
- declare function loadFallbackPlugin(): BuiltinPlugin;
37
- declare function jsonPlugin(config?: BindingJsonPluginConfig): BuiltinPlugin;
38
- declare function buildImportAnalysisPlugin(config: BindingBuildImportAnalysisPluginConfig): BuiltinPlugin;
39
- declare function viteResolvePlugin(config: BindingViteResolvePluginConfig): BuiltinPlugin;
40
- declare function isolatedDeclarationPlugin(config?: BindingIsolatedDeclarationPluginConfig): BuiltinPlugin;
41
- declare function assetPlugin(config?: BindingAssetPluginConfig): BuiltinPlugin;
42
- declare function webWorkerPostPlugin(): BuiltinPlugin;
43
- declare function esmExternalRequirePlugin(config?: BindingEsmExternalRequirePluginConfig): BuiltinPlugin;
44
- //#endregion
45
- //#region src/builtin-plugin/alias-plugin.d.ts
46
- type AliasPluginAlias = {
47
- find: string | RegExp;
48
- replacement: string;
49
- };
50
- type AliasPluginConfig = {
51
- entries: AliasPluginAlias[];
52
- };
53
- declare function aliasPlugin(config: AliasPluginConfig): BuiltinPlugin;
54
- //#endregion
55
- //#region src/builtin-plugin/replace-plugin.d.ts
56
- /**
57
- * Replaces targeted strings in files while bundling.
58
- *
59
- * @example
60
- * // Basic usage
61
- * ```js
62
- * replacePlugin({
63
- * 'process.env.NODE_ENV': JSON.stringify('production'),
64
- * __buildVersion: 15
65
- * })
66
- * ```
67
- * @example
68
- * // With options
69
- * ```js
70
- * replacePlugin({
71
- * 'process.env.NODE_ENV': JSON.stringify('production'),
72
- * __buildVersion: 15
73
- * }, {
74
- * preventAssignment: false,
75
- * })
76
- * ```
77
- */
78
- declare function replacePlugin(values?: BindingReplacePluginConfig["values"], options?: Omit<BindingReplacePluginConfig, "values">): BuiltinPlugin;
79
- //#endregion
80
- //#region src/builtin-plugin/transform-plugin.d.ts
81
- type TransformPattern = string | RegExp | readonly (RegExp | string)[];
82
- type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exclude" | "jsxRefreshInclude" | "jsxRefreshExclude"> & {
83
- include?: TransformPattern;
84
- exclude?: TransformPattern;
85
- jsxRefreshInclude?: TransformPattern;
86
- jsxRefreshExclude?: TransformPattern;
87
- };
88
- declare function transformPlugin(config?: TransformPluginConfig): BuiltinPlugin;
89
- //#endregion
90
- export { DevEngine, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
@@ -1,53 +0,0 @@
1
- const require_dist = require('./shared/dist-CK0hotcm.cjs');
2
-
3
- //#region src/plugin/with-filter.ts
4
- function withFilterImpl(pluginOption, filterObjectList) {
5
- if (require_dist.isPromiseLike(pluginOption)) return pluginOption.then((p) => withFilter(p, filterObjectList));
6
- if (pluginOption == false || pluginOption == null) return pluginOption;
7
- if (Array.isArray(pluginOption)) return pluginOption.map((p) => withFilter(p, filterObjectList));
8
- let plugin = pluginOption;
9
- let filterObjectIndex = findMatchedFilterObject(plugin.name, filterObjectList);
10
- if (filterObjectIndex === -1) return plugin;
11
- let filterObject = filterObjectList[filterObjectIndex];
12
- Object.keys(plugin).forEach((key) => {
13
- switch (key) {
14
- case "transform":
15
- case "resolveId":
16
- case "load":
17
- if (!plugin[key]) return;
18
- if (typeof plugin[key] === "object") plugin[key].filter = filterObject[key] ?? plugin[key].filter;
19
- else plugin[key] = {
20
- handler: plugin[key],
21
- filter: filterObject[key]
22
- };
23
- break;
24
- default: break;
25
- }
26
- });
27
- return plugin;
28
- }
29
- function withFilter(pluginOption, filterObject) {
30
- return withFilterImpl(pluginOption, require_dist.arraify(filterObject));
31
- }
32
- function findMatchedFilterObject(pluginName, overrideFilterObjectList) {
33
- if (overrideFilterObjectList.length === 1 && overrideFilterObjectList[0].pluginNamePattern === void 0) return 0;
34
- for (let i = 0; i < overrideFilterObjectList.length; i++) for (let j = 0; j < (overrideFilterObjectList[i].pluginNamePattern ?? []).length; j++) {
35
- let pattern = overrideFilterObjectList[i].pluginNamePattern[j];
36
- if (typeof pattern === "string" && pattern === pluginName) return i;
37
- else if (pattern instanceof RegExp && pattern.test(pluginName)) return i;
38
- }
39
- return -1;
40
- }
41
-
42
- //#endregion
43
- exports.and = require_dist.and;
44
- exports.code = require_dist.code;
45
- exports.exclude = require_dist.exclude;
46
- exports.id = require_dist.id;
47
- exports.include = require_dist.include;
48
- exports.moduleType = require_dist.moduleType;
49
- exports.not = require_dist.not;
50
- exports.or = require_dist.or;
51
- exports.queries = require_dist.queries;
52
- exports.query = require_dist.query;
53
- exports.withFilter = withFilter;
@@ -1,4 +0,0 @@
1
- import "./shared/binding-D13M6Llu.cjs";
2
- import { withFilter } from "./shared/define-config-D5AluabE.cjs";
3
- import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
4
- export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
package/dist/index.cjs DELETED
@@ -1,9 +0,0 @@
1
- const require_src = require('./shared/src-McCMqGpa.cjs');
2
- require('./shared/parse-ast-index-ChWj_C49.cjs');
3
- require('./shared/dist-CK0hotcm.cjs');
4
-
5
- exports.VERSION = require_src.VERSION;
6
- exports.build = require_src.build;
7
- exports.defineConfig = require_src.defineConfig;
8
- exports.rolldown = require_src.rolldown;
9
- exports.watch = require_src.watch;
package/dist/index.d.cts DELETED
@@ -1,3 +0,0 @@
1
- import { PreRenderedChunk } from "./shared/binding-D13M6Llu.cjs";
2
- import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-D5AluabE.cjs";
3
- export { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
@@ -1,33 +0,0 @@
1
- const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-McCMqGpa.cjs');
3
- require('./shared/parse-ast-index-ChWj_C49.cjs');
4
- require('./shared/dist-CK0hotcm.cjs');
5
- const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
6
- const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
7
-
8
- //#region src/parallel-plugin-worker.ts
9
- const { registryId, pluginInfos, threadNumber } = node_worker_threads.workerData;
10
- (async () => {
11
- try {
12
- const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
13
- const pluginModule = await import(pluginInfo.fileUrl);
14
- const definePluginImpl = pluginModule.default;
15
- const plugin = await definePluginImpl(pluginInfo.options, { threadNumber });
16
- return {
17
- index: pluginInfo.index,
18
- plugin: require_src.bindingifyPlugin(plugin, {}, {}, new require_src.PluginContextData(() => {}, {}, []), [], () => {}, "info", false)
19
- };
20
- }));
21
- (0, src_rolldown_binding_wasi_cjs.registerPlugins)(registryId, plugins);
22
- node_worker_threads.parentPort.postMessage({ type: "success" });
23
- } catch (error) {
24
- node_worker_threads.parentPort.postMessage({
25
- type: "error",
26
- error
27
- });
28
- } finally {
29
- node_worker_threads.parentPort.unref();
30
- }
31
- })();
32
-
33
- //#endregion
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
-
2
- //#region src/plugin/parallel-plugin-implementation.ts
3
- function defineParallelPluginImplementation(plugin) {
4
- return plugin;
5
- }
6
-
7
- //#endregion
8
- exports.defineParallelPluginImplementation = defineParallelPluginImplementation;
@@ -1,14 +0,0 @@
1
- import "./shared/binding-D13M6Llu.cjs";
2
- import { MaybePromise, Plugin } from "./shared/define-config-D5AluabE.cjs";
3
-
4
- //#region src/plugin/parallel-plugin-implementation.d.ts
5
- type ParallelPluginImplementation = Plugin;
6
- type Context = {
7
- /**
8
- * Thread number
9
- */
10
- threadNumber: number;
11
- };
12
- declare function defineParallelPluginImplementation<Options>(plugin: (Options: Options, context: Context) => MaybePromise<ParallelPluginImplementation>): (Options: Options, context: Context) => MaybePromise<ParallelPluginImplementation>;
13
- //#endregion
14
- export { type Context, type ParallelPluginImplementation, defineParallelPluginImplementation };
@@ -1,4 +0,0 @@
1
- const require_parse_ast_index = require('./shared/parse-ast-index-ChWj_C49.cjs');
2
-
3
- exports.parseAst = require_parse_ast_index.parseAst;
4
- exports.parseAstAsync = require_parse_ast_index.parseAstAsync;
@@ -1,8 +0,0 @@
1
- import { ParseResult, ParserOptions } from "./shared/binding-D13M6Llu.cjs";
2
- import { Program } from "@oxc-project/types";
3
-
4
- //#region src/parse-ast-index.d.ts
5
- declare function parseAst(sourceText: string, options?: ParserOptions | undefined | null, filename?: string): Program;
6
- declare function parseAstAsync(sourceText: string, options?: ParserOptions | undefined | null, filename?: string): Promise<Program>;
7
- //#endregion
8
- export { type ParseResult, type ParserOptions, parseAst, parseAstAsync };