rolldown 0.10.2 → 0.10.3

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 (64) hide show
  1. package/bin/cli.js +1 -1
  2. package/dist/cjs/cli.cjs +772 -0
  3. package/dist/cjs/index.cjs +26 -0
  4. package/dist/cjs/parallel-plugin-worker.cjs +32 -0
  5. package/dist/{parallel-plugin.cjs → cjs/parallel-plugin.cjs} +2 -3
  6. package/dist/esm/cli.mjs +773 -0
  7. package/dist/esm/index.mjs +24 -0
  8. package/dist/esm/parallel-plugin-worker.mjs +33 -0
  9. package/dist/esm/parallel-plugin.mjs +9 -0
  10. package/dist/shared/chunk-WMSF1LUG.cjs +37 -0
  11. package/dist/shared/consola_36c0034f-ED9jtJgC.mjs +942 -0
  12. package/dist/shared/consola_36c0034f-RVbq7gBJ.cjs +945 -0
  13. package/dist/shared/prompt-Q6AgPcFh.cjs +859 -0
  14. package/dist/shared/prompt-uoOfg_gh.mjs +860 -0
  15. package/dist/shared/rolldown-7z0huS4W.mjs +49 -0
  16. package/dist/shared/rolldown-binding.wasi.cjs +26 -13
  17. package/dist/shared/rolldown-pt4wPK1i.cjs +48 -0
  18. package/dist/shared/utils_index-0Q22WhZL.cjs +5331 -0
  19. package/dist/shared/utils_index-Wfcc8MjH.mjs +5361 -0
  20. package/dist/shared/wasi-worker-browser.mjs +6 -7
  21. package/dist/shared/wasi-worker.mjs +5 -2
  22. package/package.json +52 -37
  23. package/dist/chunks/prompt.cjs +0 -443
  24. package/dist/chunks/prompt.cjs.map +0 -1
  25. package/dist/chunks/prompt.mjs +0 -436
  26. package/dist/chunks/prompt.mjs.map +0 -1
  27. package/dist/cli.cjs +0 -1961
  28. package/dist/cli.cjs.map +0 -1
  29. package/dist/cli.d.cts +0 -2
  30. package/dist/cli.d.mts +0 -2
  31. package/dist/cli.d.ts +0 -2
  32. package/dist/cli.mjs +0 -1939
  33. package/dist/cli.mjs.map +0 -1
  34. package/dist/index.cjs +0 -26
  35. package/dist/index.cjs.map +0 -1
  36. package/dist/index.d.cts +0 -66
  37. package/dist/index.d.mts +0 -66
  38. package/dist/index.d.ts +0 -66
  39. package/dist/index.mjs +0 -21
  40. package/dist/index.mjs.map +0 -1
  41. package/dist/parallel-plugin-worker.cjs +0 -34
  42. package/dist/parallel-plugin-worker.cjs.map +0 -1
  43. package/dist/parallel-plugin-worker.d.cts +0 -2
  44. package/dist/parallel-plugin-worker.d.mts +0 -2
  45. package/dist/parallel-plugin-worker.d.ts +0 -2
  46. package/dist/parallel-plugin-worker.mjs +0 -32
  47. package/dist/parallel-plugin-worker.mjs.map +0 -1
  48. package/dist/parallel-plugin.cjs.map +0 -1
  49. package/dist/parallel-plugin.d.cts +0 -12
  50. package/dist/parallel-plugin.d.mts +0 -12
  51. package/dist/parallel-plugin.d.ts +0 -12
  52. package/dist/parallel-plugin.mjs +0 -6
  53. package/dist/parallel-plugin.mjs.map +0 -1
  54. package/dist/shared/rolldown.1ea1dc1e.d.cts +0 -1160
  55. package/dist/shared/rolldown.1ea1dc1e.d.mts +0 -1160
  56. package/dist/shared/rolldown.1ea1dc1e.d.ts +0 -1160
  57. package/dist/shared/rolldown.4d4592d7.cjs +0 -348
  58. package/dist/shared/rolldown.4d4592d7.cjs.map +0 -1
  59. package/dist/shared/rolldown.65028ebe.cjs +0 -547
  60. package/dist/shared/rolldown.65028ebe.cjs.map +0 -1
  61. package/dist/shared/rolldown.7d1ce9fc.mjs +0 -546
  62. package/dist/shared/rolldown.7d1ce9fc.mjs.map +0 -1
  63. package/dist/shared/rolldown.b914368a.mjs +0 -340
  64. package/dist/shared/rolldown.b914368a.mjs.map +0 -1
@@ -0,0 +1,26 @@
1
+ const { __toESM } = require("../shared/chunk-WMSF1LUG.cjs");
2
+ require("../shared/utils_index-0Q22WhZL.cjs");
3
+ const { experimental_scan, rolldown } = require("../shared/rolldown-pt4wPK1i.cjs");
4
+ const { pathToFileURL } = __toESM(require("node:url"));
5
+
6
+ // src/plugin/index.ts
7
+ function defineParallelPlugin(pluginPath) {
8
+ return options => {
9
+ return {
10
+ _parallel:{
11
+ fileUrl:pathToFileURL(pluginPath).href,
12
+ options
13
+ }
14
+ };
15
+ };
16
+ }
17
+
18
+ // src/utils/define-config.ts
19
+ function defineConfig(config) {
20
+ return config;
21
+ }
22
+
23
+ exports.defineConfig = defineConfig;
24
+ exports.defineParallelPlugin = defineParallelPlugin;
25
+ exports.experimental_scan = experimental_scan;
26
+ exports.rolldown = rolldown;
@@ -0,0 +1,32 @@
1
+ const { __toESM } = require("../shared/chunk-WMSF1LUG.cjs");
2
+ const { bindingifyPlugin, require_binding } = require("../shared/utils_index-0Q22WhZL.cjs");
3
+ const { parentPort, workerData } = __toESM(require("node:worker_threads"));
4
+
5
+ // src/parallel-plugin-worker.ts
6
+ var import_binding = __toESM(require_binding());
7
+ const {registryId, pluginInfos, threadNumber} = workerData;
8
+ (async() => {
9
+ try{
10
+ const plugins = await Promise.all(pluginInfos.map(async pluginInfo => {
11
+ const pluginModule = await import(pluginInfo.fileUrl);
12
+ const definePluginImpl = pluginModule.default;
13
+ const plugin = await definePluginImpl(pluginInfo.options, {
14
+ threadNumber
15
+ });
16
+ return {
17
+ index:pluginInfo.index,
18
+ plugin:bindingifyPlugin(plugin, {}, {})
19
+ };
20
+ }));
21
+ (0,import_binding.registerPlugins)(registryId, plugins);
22
+ parentPort.postMessage({
23
+ type:'success'
24
+ });
25
+ }catch(error){
26
+ parentPort.postMessage({
27
+ type:'error',
28
+ error
29
+ });
30
+ }finally{
31
+ parentPort.unref();
32
+ }})();
@@ -1,8 +1,7 @@
1
- 'use strict';
2
1
 
2
+ // src/plugin/parallel-plugin-implementation.ts
3
3
  function defineParallelPluginImplementation(plugin) {
4
- return plugin;
4
+ return plugin;
5
5
  }
6
6
 
7
7
  exports.defineParallelPluginImplementation = defineParallelPluginImplementation;
8
- //# sourceMappingURL=parallel-plugin.cjs.map