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,24 @@
|
|
|
1
|
+
import __node_module__ from 'node:module';
|
|
2
|
+
const require = __node_module__.createRequire(import.meta.url)
|
|
3
|
+
import "../shared/utils_index-Wfcc8MjH.mjs";
|
|
4
|
+
import { experimental_scan, rolldown } from "../shared/rolldown-7z0huS4W.mjs";
|
|
5
|
+
import { pathToFileURL } from "node:url";
|
|
6
|
+
|
|
7
|
+
// src/plugin/index.ts
|
|
8
|
+
function defineParallelPlugin(pluginPath) {
|
|
9
|
+
return options => {
|
|
10
|
+
return {
|
|
11
|
+
_parallel:{
|
|
12
|
+
fileUrl:pathToFileURL(pluginPath).href,
|
|
13
|
+
options
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// src/utils/define-config.ts
|
|
20
|
+
function defineConfig(config) {
|
|
21
|
+
return config;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { defineConfig, defineParallelPlugin, experimental_scan, rolldown };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import __node_module__ from 'node:module';
|
|
2
|
+
const require = __node_module__.createRequire(import.meta.url)
|
|
3
|
+
import { __toESM, bindingifyPlugin, require_binding } from "../shared/utils_index-Wfcc8MjH.mjs";
|
|
4
|
+
import { parentPort, workerData } from "node:worker_threads";
|
|
5
|
+
|
|
6
|
+
// src/parallel-plugin-worker.ts
|
|
7
|
+
var import_binding = __toESM(require_binding());
|
|
8
|
+
const {registryId, pluginInfos, threadNumber} = workerData;
|
|
9
|
+
(async() => {
|
|
10
|
+
try{
|
|
11
|
+
const plugins = await Promise.all(pluginInfos.map(async pluginInfo => {
|
|
12
|
+
const pluginModule = await import(pluginInfo.fileUrl);
|
|
13
|
+
const definePluginImpl = pluginModule.default;
|
|
14
|
+
const plugin = await definePluginImpl(pluginInfo.options, {
|
|
15
|
+
threadNumber
|
|
16
|
+
});
|
|
17
|
+
return {
|
|
18
|
+
index:pluginInfo.index,
|
|
19
|
+
plugin:bindingifyPlugin(plugin, {}, {})
|
|
20
|
+
};
|
|
21
|
+
}));
|
|
22
|
+
(0,import_binding.registerPlugins)(registryId, plugins);
|
|
23
|
+
parentPort.postMessage({
|
|
24
|
+
type:'success'
|
|
25
|
+
});
|
|
26
|
+
}catch(error){
|
|
27
|
+
parentPort.postMessage({
|
|
28
|
+
type:'error',
|
|
29
|
+
error
|
|
30
|
+
});
|
|
31
|
+
}finally{
|
|
32
|
+
parentPort.unref();
|
|
33
|
+
}})();
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import __node_module__ from 'node:module';
|
|
2
|
+
const require = __node_module__.createRequire(import.meta.url)
|
|
3
|
+
|
|
4
|
+
// src/plugin/parallel-plugin-implementation.ts
|
|
5
|
+
function defineParallelPluginImplementation(plugin) {
|
|
6
|
+
return plugin;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { defineParallelPluginImplementation };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
// \0<runtime>
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = {
|
|
10
|
+
exports:{}
|
|
11
|
+
}).exports, mod),mod.exports);
|
|
12
|
+
var __export = (target, all) => {
|
|
13
|
+
for (var name in all) __defProp(target, name, {
|
|
14
|
+
get:all[name],
|
|
15
|
+
enumerable:true
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === 'object' || typeof from === 'function') for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
20
|
+
key = keys[i];
|
|
21
|
+
if ( !__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
22
|
+
get:(k => from[k]).bind(null, key),
|
|
23
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return to;
|
|
29
|
+
};
|
|
30
|
+
var __toESM = (mod, isNodeMode, target) => ((target = mod != null ? __create(__getProtoOf(mod)) : {}),__copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, 'default', {
|
|
31
|
+
value:mod,
|
|
32
|
+
enumerable:true
|
|
33
|
+
}) : target, mod));
|
|
34
|
+
|
|
35
|
+
exports.__commonJSMin = __commonJSMin;
|
|
36
|
+
exports.__export = __export;
|
|
37
|
+
exports.__toESM = __toESM;
|