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.
- package/bin/cli.js +1 -1
- package/dist/cjs/cli.cjs +772 -0
- package/dist/cjs/index.cjs +26 -0
- package/dist/cjs/parallel-plugin-worker.cjs +32 -0
- package/dist/{parallel-plugin.cjs → cjs/parallel-plugin.cjs} +2 -3
- package/dist/esm/cli.mjs +773 -0
- package/dist/esm/index.mjs +24 -0
- package/dist/esm/parallel-plugin-worker.mjs +33 -0
- package/dist/esm/parallel-plugin.mjs +9 -0
- package/dist/shared/chunk-WMSF1LUG.cjs +37 -0
- package/dist/shared/consola_36c0034f-ED9jtJgC.mjs +942 -0
- package/dist/shared/consola_36c0034f-RVbq7gBJ.cjs +945 -0
- package/dist/shared/prompt-Q6AgPcFh.cjs +859 -0
- package/dist/shared/prompt-uoOfg_gh.mjs +860 -0
- package/dist/shared/rolldown-7z0huS4W.mjs +49 -0
- package/dist/shared/rolldown-binding.wasi.cjs +26 -13
- package/dist/shared/rolldown-pt4wPK1i.cjs +48 -0
- package/dist/shared/utils_index-0Q22WhZL.cjs +5331 -0
- package/dist/shared/utils_index-Wfcc8MjH.mjs +5361 -0
- package/dist/shared/wasi-worker-browser.mjs +6 -7
- package/dist/shared/wasi-worker.mjs +5 -2
- package/package.json +52 -37
- package/dist/chunks/prompt.cjs +0 -443
- package/dist/chunks/prompt.cjs.map +0 -1
- package/dist/chunks/prompt.mjs +0 -436
- package/dist/chunks/prompt.mjs.map +0 -1
- package/dist/cli.cjs +0 -1961
- package/dist/cli.cjs.map +0 -1
- package/dist/cli.d.cts +0 -2
- package/dist/cli.d.mts +0 -2
- package/dist/cli.d.ts +0 -2
- package/dist/cli.mjs +0 -1939
- package/dist/cli.mjs.map +0 -1
- package/dist/index.cjs +0 -26
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -66
- package/dist/index.d.mts +0 -66
- package/dist/index.d.ts +0 -66
- package/dist/index.mjs +0 -21
- package/dist/index.mjs.map +0 -1
- package/dist/parallel-plugin-worker.cjs +0 -34
- package/dist/parallel-plugin-worker.cjs.map +0 -1
- package/dist/parallel-plugin-worker.d.cts +0 -2
- package/dist/parallel-plugin-worker.d.mts +0 -2
- package/dist/parallel-plugin-worker.d.ts +0 -2
- package/dist/parallel-plugin-worker.mjs +0 -32
- package/dist/parallel-plugin-worker.mjs.map +0 -1
- package/dist/parallel-plugin.cjs.map +0 -1
- package/dist/parallel-plugin.d.cts +0 -12
- package/dist/parallel-plugin.d.mts +0 -12
- package/dist/parallel-plugin.d.ts +0 -12
- package/dist/parallel-plugin.mjs +0 -6
- package/dist/parallel-plugin.mjs.map +0 -1
- package/dist/shared/rolldown.1ea1dc1e.d.cts +0 -1160
- package/dist/shared/rolldown.1ea1dc1e.d.mts +0 -1160
- package/dist/shared/rolldown.1ea1dc1e.d.ts +0 -1160
- package/dist/shared/rolldown.4d4592d7.cjs +0 -348
- package/dist/shared/rolldown.4d4592d7.cjs.map +0 -1
- package/dist/shared/rolldown.65028ebe.cjs +0 -547
- package/dist/shared/rolldown.65028ebe.cjs.map +0 -1
- package/dist/shared/rolldown.7d1ce9fc.mjs +0 -546
- package/dist/shared/rolldown.7d1ce9fc.mjs.map +0 -1
- package/dist/shared/rolldown.b914368a.mjs +0 -340
- 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
|
-
|
|
4
|
+
return plugin;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
exports.defineParallelPluginImplementation = defineParallelPluginImplementation;
|
|
8
|
-
//# sourceMappingURL=parallel-plugin.cjs.map
|