Files
memecoin-botV2/.pnpm-store/v10/files/2d/9f401288fc5cd1755b5bf859e94e98e7a9829aee6738fb7057d779fd6ac7cce42b4ade1cb374af4e3a0f6ce03f819bca9436db71fb5549855c21f18cb3e086

30 lines
1.1 KiB
Plaintext

import { n as __toESM, t as require_binding } from "./shared/binding-Zhafd14U.mjs";
import { c as PluginContextData, n as bindingifyPlugin } from "./shared/bindingify-input-options-C-Zsy1EG.mjs";
import { parentPort, workerData } from "node:worker_threads";
//#region src/parallel-plugin-worker.ts
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
const { registryId, pluginInfos, threadNumber } = workerData;
(async () => {
try {
const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
const definePluginImpl = (await import(pluginInfo.fileUrl)).default;
const plugin = await definePluginImpl(pluginInfo.options, { threadNumber });
return {
index: pluginInfo.index,
plugin: bindingifyPlugin(plugin, {}, {}, new PluginContextData(() => {}, {}, [], []), [], () => {}, "info", false, void 0)
};
}));
(0, import_binding.registerPlugins)(registryId, plugins);
parentPort.postMessage({ type: "success" });
} catch (error) {
parentPort.postMessage({
type: "error",
error
});
} finally {
parentPort.unref();
}
})();
//#endregion
export {};