From dc9869334d5450ee0cbf8b7eaddf2a2f8799a89e Mon Sep 17 00:00:00 2001 From: Atreya Bain Date: Fri, 1 Aug 2025 20:51:30 +0100 Subject: [PATCH] [add] join the pipelines --- src/index.mjs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/index.mjs b/src/index.mjs index 28cb091..6f8289e 100644 --- a/src/index.mjs +++ b/src/index.mjs @@ -40,21 +40,21 @@ export async function sliceAndWriteCalls(calls, FILE_PATH) { }); }, relatedModuleNamePath); - console.log(`Sliced code ${moduleName}\n`,slicedCode); - continue; - const writePath = path.resolve('./dist', moduleName); + // console.log(`Sliced code ${moduleName}\n`,slicedCode); + // continue; + const writePath = path.resolve('./dist', moduleName,'index.cjs'); if (writePath === moduleName) { throw Error("Unexpected Directory rewrite. Not allowed."); } mkdirSync(path.dirname(writePath), { recursive: true }); - console.log(`Writing to`, writePath); + console.log(`Writing module '${moduleName}' to '${writePath}'`); writePromises.push(writeFile(writePath, slicedCode)); } Promise.all(writePromises).then(p => { - console.log("write finished"); + // console.log("write finished"); }).catch(console.log); } @@ -86,7 +86,7 @@ function main() { if (process.argv[1] === import.meta.filename) { console.log("[SafeImport] started"); main(); - console.log("done"); + // console.log("done"); }