@rolldown/browser 1.0.0-beta.35 → 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 (49) hide show
  1. package/dist/cli.mjs +18 -29
  2. package/dist/config.d.mts +2 -2
  3. package/dist/config.mjs +4 -4
  4. package/dist/experimental-index.browser.mjs +5 -3
  5. package/dist/experimental-index.d.mts +8 -5
  6. package/dist/experimental-index.mjs +7 -5
  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 +4 -5
  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.wasm32-wasi.wasm +0 -0
  17. package/dist/shared/{binding-9k0egz6L.d.mts → binding-wK0CRIMb.d.mts} +1 -0
  18. package/dist/shared/{define-config-DhrkZ_o7.d.cts → define-config-BcNhk996.d.mts} +2 -2
  19. package/dist/shared/{dist-ByKQkexh.mjs → dist-CHTC3-kR.mjs} +1 -1
  20. package/dist/shared/{load-config-BCjD-AGJ.mjs → load-config-M8Gvqt1X.mjs} +4 -6
  21. package/dist/shared/{parse-ast-index-C_CZT4St.mjs → parse-ast-index-C3TkGcEQ.mjs} +1 -1
  22. package/dist/shared/{prompt-C5jz26Zn.mjs → prompt-DuG2i9ud.mjs} +4 -7
  23. package/dist/shared/{src-B0RCtUy7.mjs → src-Dc4fRARy.mjs} +70 -43
  24. package/dist/{src-C8U06Im1.js → src-Cl6h35QH.js} +70 -44
  25. package/package.json +10 -24
  26. package/dist/cli.cjs +0 -1771
  27. package/dist/cli.d.cts +0 -1
  28. package/dist/config.cjs +0 -12
  29. package/dist/config.d.cts +0 -10
  30. package/dist/experimental-index.cjs +0 -176
  31. package/dist/experimental-index.d.cts +0 -99
  32. package/dist/filter-index.cjs +0 -53
  33. package/dist/filter-index.d.cts +0 -4
  34. package/dist/index.cjs +0 -9
  35. package/dist/index.d.cts +0 -3
  36. package/dist/parallel-plugin-worker.cjs +0 -35
  37. package/dist/parallel-plugin-worker.d.cts +0 -1
  38. package/dist/parallel-plugin.cjs +0 -8
  39. package/dist/parallel-plugin.d.cts +0 -14
  40. package/dist/parse-ast-index.cjs +0 -4
  41. package/dist/parse-ast-index.d.cts +0 -8
  42. package/dist/shared/binding-D13M6Llu.d.cts +0 -1425
  43. package/dist/shared/chunk-DDkG_k5U.cjs +0 -39
  44. package/dist/shared/define-config-DJXaSinS.d.mts +0 -1421
  45. package/dist/shared/dist-CK0hotcm.cjs +0 -240
  46. package/dist/shared/load-config-BJKhRKZL.cjs +0 -130
  47. package/dist/shared/parse-ast-index-J0xVKZRe.cjs +0 -327
  48. package/dist/shared/prompt-Q05EYrFb.cjs +0 -858
  49. package/dist/shared/src-Bd4BGX4v.cjs +0 -4788
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-Bd4BGX4v.cjs');
2
- require('./shared/parse-ast-index-J0xVKZRe.cjs');
3
- require('./shared/dist-CK0hotcm.cjs');
4
- const require_load_config = require('./shared/load-config-BJKhRKZL.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-DhrkZ_o7.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,176 +0,0 @@
1
- const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-Bd4BGX4v.cjs');
3
- require('./shared/parse-ast-index-J0xVKZRe.cjs');
4
- require('./shared/dist-CK0hotcm.cjs');
5
- let src_rolldown_binding_wasi_cjs = require("./rolldown-binding.wasi.cjs");
6
- src_rolldown_binding_wasi_cjs = require_chunk.__toESM(src_rolldown_binding_wasi_cjs);
7
- let node_url = require("node:url");
8
- node_url = require_chunk.__toESM(node_url);
9
-
10
- //#region src/api/dev/dev-engine.ts
11
- var DevEngine = class DevEngine {
12
- #inner;
13
- #cachedBuildFinishPromise = null;
14
- static async create(inputOptions, outputOptions = {}, devOptions = {}) {
15
- inputOptions = await require_src.PluginDriver.callOptionsHook(inputOptions);
16
- const options = await require_src.createBundlerOptions(inputOptions, outputOptions, false);
17
- const bindingDevOptions = {
18
- onHmrUpdates: devOptions.onHmrUpdates,
19
- usePolling: devOptions.usePolling,
20
- pollInterval: devOptions.pollInterval
21
- };
22
- const inner = new src_rolldown_binding_wasi_cjs.BindingDevEngine(options.bundlerOptions, bindingDevOptions);
23
- return new DevEngine(inner);
24
- }
25
- constructor(inner) {
26
- this.#inner = inner;
27
- }
28
- async run() {
29
- await this.#inner.run();
30
- }
31
- async ensureCurrentBuildFinish() {
32
- if (this.#cachedBuildFinishPromise) return this.#cachedBuildFinishPromise;
33
- const promise = this.#inner.ensureCurrentBuildFinish().then(() => {
34
- this.#cachedBuildFinishPromise = null;
35
- });
36
- this.#cachedBuildFinishPromise = promise;
37
- return promise;
38
- }
39
- async ensureLatestBuild() {
40
- await this.#inner.ensureLatestBuild();
41
- }
42
- async invalidate(file, firstInvalidatedBy) {
43
- return this.#inner.invalidate(file, firstInvalidatedBy);
44
- }
45
- };
46
-
47
- //#endregion
48
- //#region src/api/dev/index.ts
49
- var dev = DevEngine.create;
50
-
51
- //#endregion
52
- //#region src/api/experimental.ts
53
- /**
54
- * This is an experimental API. It's behavior may change in the future.
55
- *
56
- * Calling this API will only execute the scan stage of rolldown.
57
- */
58
- const experimental_scan = async (input) => {
59
- const inputOptions = await require_src.PluginDriver.callOptionsHook(input);
60
- const { impl: bundler, stopWorkers } = await require_src.createBundlerImpl(new src_rolldown_binding_wasi_cjs.BindingBundler(), inputOptions, {});
61
- const output = await bundler.scan();
62
- require_src.handleOutputErrors(output);
63
- await stopWorkers?.();
64
- };
65
-
66
- //#endregion
67
- //#region src/plugin/parallel-plugin.ts
68
- function defineParallelPlugin(pluginPath) {
69
- return (options) => {
70
- return { _parallel: {
71
- fileUrl: (0, node_url.pathToFileURL)(pluginPath).href,
72
- options
73
- } };
74
- };
75
- }
76
-
77
- //#endregion
78
- //#region src/builtin-plugin/alias-plugin.ts
79
- function aliasPlugin(config) {
80
- return require_src.createBuiltinPlugin("builtin:alias", config);
81
- }
82
-
83
- //#endregion
84
- //#region src/builtin-plugin/replace-plugin.ts
85
- /**
86
- * Replaces targeted strings in files while bundling.
87
- *
88
- * @example
89
- * // Basic usage
90
- * ```js
91
- * replacePlugin({
92
- * 'process.env.NODE_ENV': JSON.stringify('production'),
93
- * __buildVersion: 15
94
- * })
95
- * ```
96
- * @example
97
- * // With options
98
- * ```js
99
- * replacePlugin({
100
- * 'process.env.NODE_ENV': JSON.stringify('production'),
101
- * __buildVersion: 15
102
- * }, {
103
- * preventAssignment: false,
104
- * })
105
- * ```
106
- */
107
- function replacePlugin(values = {}, options = {}) {
108
- Object.keys(values).forEach((key) => {
109
- values[key] = values[key].toString();
110
- });
111
- return require_src.createBuiltinPlugin("builtin:replace", {
112
- ...options,
113
- values
114
- });
115
- }
116
-
117
- //#endregion
118
- //#region src/builtin-plugin/transform-plugin.ts
119
- function transformPlugin(config) {
120
- if (config) config = {
121
- ...config,
122
- include: require_src.normalizedStringOrRegex(config.include),
123
- exclude: require_src.normalizedStringOrRegex(config.exclude),
124
- jsxRefreshInclude: require_src.normalizedStringOrRegex(config.jsxRefreshInclude),
125
- jsxRefreshExclude: require_src.normalizedStringOrRegex(config.jsxRefreshExclude)
126
- };
127
- return require_src.createBuiltinPlugin("builtin:transform", config);
128
- }
129
-
130
- //#endregion
131
- exports.DevEngine = DevEngine;
132
- Object.defineProperty(exports, 'ResolverFactory', {
133
- enumerable: true,
134
- get: function () {
135
- return src_rolldown_binding_wasi_cjs.ResolverFactory;
136
- }
137
- });
138
- exports.aliasPlugin = aliasPlugin;
139
- exports.assetPlugin = require_src.assetPlugin;
140
- exports.buildImportAnalysisPlugin = require_src.buildImportAnalysisPlugin;
141
- exports.defineParallelPlugin = defineParallelPlugin;
142
- exports.dev = dev;
143
- exports.dynamicImportVarsPlugin = require_src.dynamicImportVarsPlugin;
144
- exports.esmExternalRequirePlugin = require_src.esmExternalRequirePlugin;
145
- exports.importGlobPlugin = require_src.importGlobPlugin;
146
- Object.defineProperty(exports, 'isolatedDeclaration', {
147
- enumerable: true,
148
- get: function () {
149
- return src_rolldown_binding_wasi_cjs.isolatedDeclaration;
150
- }
151
- });
152
- exports.isolatedDeclarationPlugin = require_src.isolatedDeclarationPlugin;
153
- exports.jsonPlugin = require_src.jsonPlugin;
154
- exports.loadFallbackPlugin = require_src.loadFallbackPlugin;
155
- exports.manifestPlugin = require_src.manifestPlugin;
156
- exports.modulePreloadPolyfillPlugin = require_src.modulePreloadPolyfillPlugin;
157
- Object.defineProperty(exports, 'moduleRunnerTransform', {
158
- enumerable: true,
159
- get: function () {
160
- return src_rolldown_binding_wasi_cjs.moduleRunnerTransform;
161
- }
162
- });
163
- exports.replacePlugin = replacePlugin;
164
- exports.reporterPlugin = require_src.reporterPlugin;
165
- exports.scan = experimental_scan;
166
- Object.defineProperty(exports, 'transform', {
167
- enumerable: true,
168
- get: function () {
169
- return src_rolldown_binding_wasi_cjs.transform;
170
- }
171
- });
172
- exports.transformPlugin = transformPlugin;
173
- exports.viteResolvePlugin = require_src.viteResolvePlugin;
174
- exports.wasmFallbackPlugin = require_src.wasmFallbackPlugin;
175
- exports.wasmHelperPlugin = require_src.wasmHelperPlugin;
176
- exports.webWorkerPostPlugin = require_src.webWorkerPostPlugin;
@@ -1,99 +0,0 @@
1
- import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, 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-DhrkZ_o7.cjs";
3
-
4
- //#region src/api/dev/dev-options.d.ts
5
- interface DevOptions {
6
- onHmrUpdates?: (updates: BindingHmrUpdate[]) => void | Promise<void>;
7
- usePolling?: boolean;
8
- pollInterval?: number;
9
- }
10
- //#endregion
11
- //#region src/api/dev/dev-engine.d.ts
12
- declare class DevEngine {
13
- #private;
14
- static create(inputOptions: InputOptions, outputOptions?: OutputOptions, devOptions?: DevOptions): Promise<DevEngine>;
15
- private constructor();
16
- run(): Promise<void>;
17
- ensureCurrentBuildFinish(): Promise<void>;
18
- ensureLatestBuild(): Promise<void>;
19
- invalidate(file: string, firstInvalidatedBy?: string): Promise<BindingHmrUpdate>;
20
- }
21
- //#endregion
22
- //#region src/api/dev/index.d.ts
23
- declare var dev: typeof DevEngine.create;
24
- //#endregion
25
- //#region src/api/experimental.d.ts
26
- /**
27
- * This is an experimental API. It's behavior may change in the future.
28
- *
29
- * Calling this API will only execute the scan stage of rolldown.
30
- */
31
- declare const experimental_scan: (input: InputOptions) => Promise<void>;
32
- //#endregion
33
- //#region src/builtin-plugin/constructors.d.ts
34
- declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): BuiltinPlugin;
35
- type DynamicImportVarsPluginConfig = Omit<BindingDynamicImportVarsPluginConfig, "include" | "exclude"> & {
36
- include?: StringOrRegExp | StringOrRegExp[];
37
- exclude?: StringOrRegExp | StringOrRegExp[];
38
- };
39
- declare function dynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
40
- declare function importGlobPlugin(config?: BindingImportGlobPluginConfig): BuiltinPlugin;
41
- declare function reporterPlugin(config?: BindingReporterPluginConfig): BuiltinPlugin;
42
- declare function manifestPlugin(config?: BindingManifestPluginConfig): BuiltinPlugin;
43
- declare function wasmHelperPlugin(config?: BindingWasmHelperPluginConfig): BuiltinPlugin;
44
- declare function wasmFallbackPlugin(): BuiltinPlugin;
45
- declare function loadFallbackPlugin(): BuiltinPlugin;
46
- declare function jsonPlugin(config?: BindingJsonPluginConfig): BuiltinPlugin;
47
- declare function buildImportAnalysisPlugin(config: BindingBuildImportAnalysisPluginConfig): BuiltinPlugin;
48
- declare function viteResolvePlugin(config: BindingViteResolvePluginConfig): BuiltinPlugin;
49
- declare function isolatedDeclarationPlugin(config?: BindingIsolatedDeclarationPluginConfig): BuiltinPlugin;
50
- declare function assetPlugin(config?: BindingAssetPluginConfig): BuiltinPlugin;
51
- declare function webWorkerPostPlugin(): BuiltinPlugin;
52
- declare function esmExternalRequirePlugin(config?: BindingEsmExternalRequirePluginConfig): BuiltinPlugin;
53
- //#endregion
54
- //#region src/builtin-plugin/alias-plugin.d.ts
55
- type AliasPluginAlias = {
56
- find: string | RegExp;
57
- replacement: string;
58
- };
59
- type AliasPluginConfig = {
60
- entries: AliasPluginAlias[];
61
- };
62
- declare function aliasPlugin(config: AliasPluginConfig): BuiltinPlugin;
63
- //#endregion
64
- //#region src/builtin-plugin/replace-plugin.d.ts
65
- /**
66
- * Replaces targeted strings in files while bundling.
67
- *
68
- * @example
69
- * // Basic usage
70
- * ```js
71
- * replacePlugin({
72
- * 'process.env.NODE_ENV': JSON.stringify('production'),
73
- * __buildVersion: 15
74
- * })
75
- * ```
76
- * @example
77
- * // With options
78
- * ```js
79
- * replacePlugin({
80
- * 'process.env.NODE_ENV': JSON.stringify('production'),
81
- * __buildVersion: 15
82
- * }, {
83
- * preventAssignment: false,
84
- * })
85
- * ```
86
- */
87
- declare function replacePlugin(values?: BindingReplacePluginConfig["values"], options?: Omit<BindingReplacePluginConfig, "values">): BuiltinPlugin;
88
- //#endregion
89
- //#region src/builtin-plugin/transform-plugin.d.ts
90
- type TransformPattern = string | RegExp | readonly (RegExp | string)[];
91
- type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exclude" | "jsxRefreshInclude" | "jsxRefreshExclude"> & {
92
- include?: TransformPattern;
93
- exclude?: TransformPattern;
94
- jsxRefreshInclude?: TransformPattern;
95
- jsxRefreshExclude?: TransformPattern;
96
- };
97
- declare function transformPlugin(config?: TransformPluginConfig): BuiltinPlugin;
98
- //#endregion
99
- export { DevEngine, type DevOptions, 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-DhrkZ_o7.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-Bd4BGX4v.cjs');
2
- require('./shared/parse-ast-index-J0xVKZRe.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-DhrkZ_o7.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,35 +0,0 @@
1
- const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-Bd4BGX4v.cjs');
3
- require('./shared/parse-ast-index-J0xVKZRe.cjs');
4
- require('./shared/dist-CK0hotcm.cjs');
5
- let node_worker_threads = require("node:worker_threads");
6
- node_worker_threads = require_chunk.__toESM(node_worker_threads);
7
- let src_rolldown_binding_wasi_cjs = require("./rolldown-binding.wasi.cjs");
8
- src_rolldown_binding_wasi_cjs = require_chunk.__toESM(src_rolldown_binding_wasi_cjs);
9
-
10
- //#region src/parallel-plugin-worker.ts
11
- const { registryId, pluginInfos, threadNumber } = node_worker_threads.workerData;
12
- (async () => {
13
- try {
14
- const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
15
- const pluginModule = await import(pluginInfo.fileUrl);
16
- const definePluginImpl = pluginModule.default;
17
- const plugin = await definePluginImpl(pluginInfo.options, { threadNumber });
18
- return {
19
- index: pluginInfo.index,
20
- plugin: require_src.bindingifyPlugin(plugin, {}, {}, new require_src.PluginContextData(() => {}, {}, []), [], () => {}, "info", false)
21
- };
22
- }));
23
- (0, src_rolldown_binding_wasi_cjs.registerPlugins)(registryId, plugins);
24
- node_worker_threads.parentPort.postMessage({ type: "success" });
25
- } catch (error) {
26
- node_worker_threads.parentPort.postMessage({
27
- type: "error",
28
- error
29
- });
30
- } finally {
31
- node_worker_threads.parentPort.unref();
32
- }
33
- })();
34
-
35
- //#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-DhrkZ_o7.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-J0xVKZRe.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 };