rolldown 1.0.0-beta.9-commit.ca4e9dd → 1.0.0-rc.1

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 (68) hide show
  1. package/README.md +11 -0
  2. package/bin/cli.mjs +1 -0
  3. package/dist/cli-setup.mjs +17 -0
  4. package/dist/cli.mjs +1085 -1281
  5. package/dist/config.d.mts +2 -4
  6. package/dist/config.mjs +8 -5
  7. package/dist/experimental-index.d.mts +161 -76
  8. package/dist/experimental-index.mjs +227 -61
  9. package/dist/experimental-runtime-types.d.ts +98 -0
  10. package/dist/filter-index.d.mts +196 -4
  11. package/dist/filter-index.mjs +328 -4
  12. package/dist/get-log-filter.d.mts +7 -0
  13. package/dist/get-log-filter.mjs +48 -0
  14. package/dist/index.d.mts +4 -4
  15. package/dist/index.mjs +56 -5
  16. package/dist/parallel-plugin-worker.mjs +27 -33
  17. package/dist/parallel-plugin.d.mts +7 -8
  18. package/dist/parse-ast-index.d.mts +4 -5
  19. package/dist/parse-ast-index.mjs +2 -2
  20. package/dist/plugins-index.d.mts +30 -0
  21. package/dist/plugins-index.mjs +40 -0
  22. package/dist/shared/binding-B92Lq__Q.d.mts +1687 -0
  23. package/dist/shared/binding-C-UNREnT.mjs +585 -0
  24. package/dist/shared/bindingify-input-options-Cb-01HR1.mjs +2233 -0
  25. package/dist/shared/constructors-D_KFsTQ-.d.mts +28 -0
  26. package/dist/shared/constructors-aZ82R2dj.mjs +61 -0
  27. package/dist/shared/define-config-BVG4QvnP.mjs +7 -0
  28. package/dist/shared/define-config-DO4TBkJV.d.mts +3457 -0
  29. package/dist/shared/{load-config-Hg0usN_9.mjs → load-config-D6cey0o1.mjs} +23 -33
  30. package/dist/shared/logging-wIy4zY9I.d.mts +50 -0
  31. package/dist/shared/logs-NH298mHo.mjs +183 -0
  32. package/dist/shared/{misc-DGAe2XOW.mjs → misc-CCZIsXVO.mjs} +1 -7
  33. package/dist/shared/normalize-string-or-regex-Dq50a7l9.mjs +61 -0
  34. package/dist/shared/parse-ast-index-B6LAhWD8.mjs +99 -0
  35. package/dist/shared/{prompt-CxjDC0Gn.cjs → prompt-tlfjalEt.mjs} +301 -308
  36. package/dist/shared/rolldown-CIC_OHw3.mjs +42 -0
  37. package/dist/shared/rolldown-build-KB1YaNe-.mjs +2369 -0
  38. package/dist/shared/watch-B2WRkpw2.mjs +379 -0
  39. package/package.json +86 -98
  40. package/dist/cli.cjs +0 -1748
  41. package/dist/config.cjs +0 -12
  42. package/dist/config.d.cts +0 -12
  43. package/dist/experimental-index.cjs +0 -132
  44. package/dist/experimental-index.d.cts +0 -96
  45. package/dist/filter-index.cjs +0 -105
  46. package/dist/filter-index.d.cts +0 -5
  47. package/dist/index.cjs +0 -9
  48. package/dist/index.d.cts +0 -4
  49. package/dist/parallel-plugin-worker.cjs +0 -33
  50. package/dist/parallel-plugin-worker.d.cts +0 -1
  51. package/dist/parallel-plugin.cjs +0 -8
  52. package/dist/parallel-plugin.d.cts +0 -15
  53. package/dist/parse-ast-index.cjs +0 -4
  54. package/dist/parse-ast-index.d.cts +0 -9
  55. package/dist/shared/binding.d-Dz3qQrbl.d.mts +0 -1682
  56. package/dist/shared/binding.d-QXzDcVmm.d.cts +0 -1682
  57. package/dist/shared/chunk--iN_1bjD.mjs +0 -33
  58. package/dist/shared/chunk-DDkG_k5U.cjs +0 -39
  59. package/dist/shared/define-config.d-CUcDq_vm.d.cts +0 -1080
  60. package/dist/shared/define-config.d-qV1PzX_C.d.mts +0 -1080
  61. package/dist/shared/load-config-Cy3vMDpE.cjs +0 -125
  62. package/dist/shared/misc-BKp5iIef.cjs +0 -67
  63. package/dist/shared/parse-ast-index-0m6JgGc9.mjs +0 -655
  64. package/dist/shared/parse-ast-index-Cn_efzjO.cjs +0 -697
  65. package/dist/shared/prompt-uGrwvyp0.mjs +0 -854
  66. package/dist/shared/src-CqsZy-Xs.cjs +0 -4654
  67. package/dist/shared/src-sZov5fTK.mjs +0 -4704
  68. /package/dist/{cli.d.cts → cli-setup.d.mts} +0 -0
package/dist/config.cjs DELETED
@@ -1,12 +0,0 @@
1
- const require_src = require('./shared/src-CqsZy-Xs.cjs');
2
- require('./shared/parse-ast-index-Cn_efzjO.cjs');
3
- require('./shared/misc-BKp5iIef.cjs');
4
- const require_load_config = require('./shared/load-config-Cy3vMDpE.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,12 +0,0 @@
1
- import "./shared/binding.d-QXzDcVmm.cjs";
2
- import { ConfigExport, defineConfig } from "./shared/define-config.d-CUcDq_vm.cjs";
3
-
4
- //#region src/utils/load-config.d.ts
5
- declare function loadConfig(configPath: string): Promise<ConfigExport>;
6
-
7
- //#endregion
8
- //#region src/config.d.ts
9
- declare const VERSION: string;
10
-
11
- //#endregion
12
- export { VERSION, defineConfig, loadConfig };
@@ -1,132 +0,0 @@
1
- const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-CqsZy-Xs.cjs');
3
- const require_parse_ast_index = require('./shared/parse-ast-index-Cn_efzjO.cjs');
4
- require('./shared/misc-BKp5iIef.cjs');
5
- const node_url = require_chunk.__toESM(require("node:url"));
6
-
7
- //#region src/api/experimental.ts
8
- /**
9
- * This is an experimental API. It's behavior may change in the future.
10
- *
11
- * Calling this API will only execute the scan stage of rolldown.
12
- */
13
- const experimental_scan = async (input) => {
14
- const { bundler, stopWorkers } = await require_src.createBundler(input, {});
15
- const output = await bundler.scan();
16
- require_src.handleOutputErrors(output);
17
- await stopWorkers?.();
18
- };
19
-
20
- //#endregion
21
- //#region src/plugin/parallel-plugin.ts
22
- function defineParallelPlugin(pluginPath) {
23
- return (options) => {
24
- return { _parallel: {
25
- fileUrl: (0, node_url.pathToFileURL)(pluginPath).href,
26
- options
27
- } };
28
- };
29
- }
30
-
31
- //#endregion
32
- //#region src/builtin-plugin/alias-plugin.ts
33
- function aliasPlugin(config) {
34
- return new require_src.BuiltinPlugin("builtin:alias", config);
35
- }
36
-
37
- //#endregion
38
- //#region src/builtin-plugin/replace-plugin.ts
39
- /**
40
- * Replaces targeted strings in files while bundling.
41
- *
42
- * @example
43
- * // Basic usage
44
- * ```js
45
- * replacePlugin({
46
- * 'process.env.NODE_ENV': JSON.stringify('production'),
47
- * __buildDate__: () => JSON.stringify(new Date()),
48
- * __buildVersion: 15
49
- * })
50
- * ```
51
- * @example
52
- * // With options
53
- * ```js
54
- * replacePlugin({
55
- * 'process.env.NODE_ENV': JSON.stringify('production'),
56
- * __buildDate__: () => JSON.stringify(new Date()),
57
- * __buildVersion: 15
58
- * }, {
59
- * preventAssignment: false,
60
- * })
61
- * ```
62
- */
63
- function replacePlugin(values = {}, options = {}) {
64
- return new require_src.BuiltinPlugin("builtin:replace", {
65
- ...options,
66
- values
67
- });
68
- }
69
-
70
- //#endregion
71
- //#region src/builtin-plugin/transform-plugin.ts
72
- function transformPlugin(config) {
73
- if (config) config = {
74
- ...config,
75
- include: require_src.normalizedStringOrRegex(config.include),
76
- exclude: require_src.normalizedStringOrRegex(config.exclude),
77
- jsxRefreshInclude: require_src.normalizedStringOrRegex(config.jsxRefreshInclude),
78
- jsxRefreshExclude: require_src.normalizedStringOrRegex(config.jsxRefreshExclude)
79
- };
80
- return new require_src.BuiltinPlugin("builtin:transform", config);
81
- }
82
-
83
- //#endregion
84
- //#region src/experimental-index.ts
85
- var import_binding = require_chunk.__toESM(require_parse_ast_index.require_binding());
86
-
87
- //#endregion
88
- Object.defineProperty(exports, 'ResolverFactory', {
89
- enumerable: true,
90
- get: function () {
91
- return import_binding.ResolverFactory;
92
- }
93
- });
94
- exports.aliasPlugin = aliasPlugin;
95
- exports.assetPlugin = require_src.assetPlugin;
96
- exports.buildImportAnalysisPlugin = require_src.buildImportAnalysisPlugin;
97
- exports.composePlugins = require_src.composeJsPlugins;
98
- exports.defineParallelPlugin = defineParallelPlugin;
99
- exports.dynamicImportVarsPlugin = require_src.dynamicImportVarsPlugin;
100
- exports.importGlobPlugin = require_src.importGlobPlugin;
101
- Object.defineProperty(exports, 'isolatedDeclaration', {
102
- enumerable: true,
103
- get: function () {
104
- return import_binding.isolatedDeclaration;
105
- }
106
- });
107
- exports.isolatedDeclarationPlugin = require_src.isolatedDeclarationPlugin;
108
- exports.jsonPlugin = require_src.jsonPlugin;
109
- exports.loadFallbackPlugin = require_src.loadFallbackPlugin;
110
- exports.manifestPlugin = require_src.manifestPlugin;
111
- exports.moduleFederationPlugin = require_src.moduleFederationPlugin;
112
- exports.modulePreloadPolyfillPlugin = require_src.modulePreloadPolyfillPlugin;
113
- Object.defineProperty(exports, 'moduleRunnerTransform', {
114
- enumerable: true,
115
- get: function () {
116
- return import_binding.moduleRunnerTransform;
117
- }
118
- });
119
- exports.replacePlugin = replacePlugin;
120
- exports.reporterPlugin = require_src.reporterPlugin;
121
- exports.scan = experimental_scan;
122
- Object.defineProperty(exports, 'transform', {
123
- enumerable: true,
124
- get: function () {
125
- return import_binding.transform;
126
- }
127
- });
128
- exports.transformPlugin = transformPlugin;
129
- exports.viteResolvePlugin = require_src.viteResolvePlugin;
130
- exports.wasmFallbackPlugin = require_src.wasmFallbackPlugin;
131
- exports.wasmHelperPlugin = require_src.wasmHelperPlugin;
132
- exports.webWorkerPostPlugin = require_src.webWorkerPostPlugin;
@@ -1,96 +0,0 @@
1
- import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult$1 as TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding.d-QXzDcVmm.cjs";
2
- import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config.d-CUcDq_vm.cjs";
3
-
4
- //#region src/api/experimental.d.ts
5
- /**
6
- * This is an experimental API. It's behavior may change in the future.
7
- *
8
- * Calling this API will only execute the scan stage of rolldown.
9
- */
10
- /**
11
- * This is an experimental API. It's behavior may change in the future.
12
- *
13
- * Calling this API will only execute the scan stage of rolldown.
14
- */
15
- declare const experimental_scan: (input: InputOptions) => Promise<void>;
16
-
17
- //#endregion
18
- //#region src/utils/compose-js-plugins.d.ts
19
- declare function composeJsPlugins(plugins: RolldownPlugin[]): RolldownPlugin[];
20
-
21
- //#endregion
22
- //#region src/builtin-plugin/alias-plugin.d.ts
23
- type AliasPluginAlias = {
24
- find: string | RegExp
25
- replacement: string
26
- };
27
- type AliasPluginConfig = {
28
- entries: AliasPluginAlias[]
29
- };
30
- declare function aliasPlugin(config: AliasPluginConfig): BuiltinPlugin;
31
-
32
- //#endregion
33
- //#region src/builtin-plugin/replace-plugin.d.ts
34
- /**
35
- * Replaces targeted strings in files while bundling.
36
- *
37
- * @example
38
- * // Basic usage
39
- * ```js
40
- * replacePlugin({
41
- * 'process.env.NODE_ENV': JSON.stringify('production'),
42
- * __buildDate__: () => JSON.stringify(new Date()),
43
- * __buildVersion: 15
44
- * })
45
- * ```
46
- * @example
47
- * // With options
48
- * ```js
49
- * replacePlugin({
50
- * 'process.env.NODE_ENV': JSON.stringify('production'),
51
- * __buildDate__: () => JSON.stringify(new Date()),
52
- * __buildVersion: 15
53
- * }, {
54
- * preventAssignment: false,
55
- * })
56
- * ```
57
- */
58
- /**
59
- * Replaces targeted strings in files while bundling.
60
- *
61
- * @example
62
- * // Basic usage
63
- * ```js
64
- * replacePlugin({
65
- * 'process.env.NODE_ENV': JSON.stringify('production'),
66
- * __buildDate__: () => JSON.stringify(new Date()),
67
- * __buildVersion: 15
68
- * })
69
- * ```
70
- * @example
71
- * // With options
72
- * ```js
73
- * replacePlugin({
74
- * 'process.env.NODE_ENV': JSON.stringify('production'),
75
- * __buildDate__: () => JSON.stringify(new Date()),
76
- * __buildVersion: 15
77
- * }, {
78
- * preventAssignment: false,
79
- * })
80
- * ```
81
- */
82
- declare function replacePlugin(values?: BindingReplacePluginConfig["values"], options?: Omit<BindingReplacePluginConfig, "values">): BuiltinPlugin;
83
-
84
- //#endregion
85
- //#region src/builtin-plugin/transform-plugin.d.ts
86
- type TransformPattern = string | RegExp | readonly (RegExp | string)[];
87
- type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exclude" | "jsxRefreshInclude" | "jsxRefreshExclude"> & {
88
- include?: TransformPattern
89
- exclude?: TransformPattern
90
- jsxRefreshInclude?: TransformPattern
91
- jsxRefreshExclude?: TransformPattern
92
- };
93
- declare function transformPlugin(config?: TransformPluginConfig): BuiltinPlugin;
94
-
95
- //#endregion
96
- export { IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions as ResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, 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 };
@@ -1,105 +0,0 @@
1
- const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_misc = require('./shared/misc-BKp5iIef.cjs');
3
- const __rolldown_pluginutils = require_chunk.__toESM(require("@rolldown/pluginutils"));
4
-
5
- //#region src/plugin/with-filter.ts
6
- function withFilterImpl(pluginOption, filterObjectList) {
7
- if (require_misc.isPromiseLike(pluginOption)) return pluginOption.then((p) => withFilter(p, filterObjectList));
8
- if (pluginOption == false || pluginOption == null) return pluginOption;
9
- if (Array.isArray(pluginOption)) return pluginOption.map((p) => withFilter(p, filterObjectList));
10
- let plugin = pluginOption;
11
- let filterObjectIndex = findMatchedFilterObject(plugin.name, filterObjectList);
12
- if (filterObjectIndex === -1) return plugin;
13
- let filterObject = filterObjectList[filterObjectIndex];
14
- Object.keys(plugin).forEach((key) => {
15
- switch (key) {
16
- case "transform":
17
- case "resolveId":
18
- case "load":
19
- if (!plugin[key]) return;
20
- if (typeof plugin[key] === "object") plugin[key].filter = filterObject[key] ?? plugin[key].filter;
21
- else plugin[key] = {
22
- handler: plugin[key],
23
- filter: filterObject[key]
24
- };
25
- break;
26
- default: break;
27
- }
28
- });
29
- return plugin;
30
- }
31
- function withFilter(pluginOption, filterObject) {
32
- return withFilterImpl(pluginOption, require_misc.arraify(filterObject));
33
- }
34
- function findMatchedFilterObject(pluginName, overrideFilterObjectList) {
35
- if (overrideFilterObjectList.length === 1 && overrideFilterObjectList[0].pluginNamePattern === void 0) return 0;
36
- for (let i = 0; i < overrideFilterObjectList.length; i++) for (let j = 0; j < (overrideFilterObjectList[i].pluginNamePattern ?? []).length; j++) {
37
- let pattern = overrideFilterObjectList[i].pluginNamePattern[j];
38
- if (typeof pattern === "string" && pattern === pluginName) return i;
39
- else if (pattern instanceof RegExp && pattern.test(pluginName)) return i;
40
- }
41
- return -1;
42
- }
43
-
44
- //#endregion
45
- Object.defineProperty(exports, 'and', {
46
- enumerable: true,
47
- get: function () {
48
- return __rolldown_pluginutils.and;
49
- }
50
- });
51
- Object.defineProperty(exports, 'code', {
52
- enumerable: true,
53
- get: function () {
54
- return __rolldown_pluginutils.code;
55
- }
56
- });
57
- Object.defineProperty(exports, 'exclude', {
58
- enumerable: true,
59
- get: function () {
60
- return __rolldown_pluginutils.exclude;
61
- }
62
- });
63
- Object.defineProperty(exports, 'id', {
64
- enumerable: true,
65
- get: function () {
66
- return __rolldown_pluginutils.id;
67
- }
68
- });
69
- Object.defineProperty(exports, 'include', {
70
- enumerable: true,
71
- get: function () {
72
- return __rolldown_pluginutils.include;
73
- }
74
- });
75
- Object.defineProperty(exports, 'moduleType', {
76
- enumerable: true,
77
- get: function () {
78
- return __rolldown_pluginutils.moduleType;
79
- }
80
- });
81
- Object.defineProperty(exports, 'not', {
82
- enumerable: true,
83
- get: function () {
84
- return __rolldown_pluginutils.not;
85
- }
86
- });
87
- Object.defineProperty(exports, 'or', {
88
- enumerable: true,
89
- get: function () {
90
- return __rolldown_pluginutils.or;
91
- }
92
- });
93
- Object.defineProperty(exports, 'queries', {
94
- enumerable: true,
95
- get: function () {
96
- return __rolldown_pluginutils.queries;
97
- }
98
- });
99
- Object.defineProperty(exports, 'query', {
100
- enumerable: true,
101
- get: function () {
102
- return __rolldown_pluginutils.query;
103
- }
104
- });
105
- exports.withFilter = withFilter;
@@ -1,5 +0,0 @@
1
- import "./shared/binding.d-QXzDcVmm.cjs";
2
- import { withFilter } from "./shared/define-config.d-CUcDq_vm.cjs";
3
- import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
4
-
5
- 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-CqsZy-Xs.cjs');
2
- require('./shared/parse-ast-index-Cn_efzjO.cjs');
3
- require('./shared/misc-BKp5iIef.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,4 +0,0 @@
1
- import { PreRenderedChunk } from "./shared/binding.d-QXzDcVmm.cjs";
2
- import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config.d-CUcDq_vm.cjs";
3
-
4
- 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 };
@@ -1,33 +0,0 @@
1
- const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-CqsZy-Xs.cjs');
3
- const require_parse_ast_index = require('./shared/parse-ast-index-Cn_efzjO.cjs');
4
- require('./shared/misc-BKp5iIef.cjs');
5
- const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
6
-
7
- //#region src/parallel-plugin-worker.ts
8
- var import_binding = require_chunk.__toESM(require_parse_ast_index.require_binding());
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, import_binding.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,15 +0,0 @@
1
- import "./shared/binding.d-QXzDcVmm.cjs";
2
- import { MaybePromise, Plugin } from "./shared/define-config.d-CUcDq_vm.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
-
14
- //#endregion
15
- export { Context, ParallelPluginImplementation, defineParallelPluginImplementation };
@@ -1,4 +0,0 @@
1
- const require_parse_ast_index = require('./shared/parse-ast-index-Cn_efzjO.cjs');
2
-
3
- exports.parseAst = require_parse_ast_index.parseAst;
4
- exports.parseAstAsync = require_parse_ast_index.parseAstAsync;
@@ -1,9 +0,0 @@
1
- import { ParseResult, ParserOptions } from "./shared/binding.d-QXzDcVmm.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
-
8
- //#endregion
9
- export { ParseResult, ParserOptions, parseAst, parseAstAsync };