This commit is contained in:
Jacob Nguyen
2024-03-22 02:32:11 -05:00
parent c9b2de0621
commit fcca124c20
2 changed files with 16 additions and 1 deletions

View File

@@ -154,7 +154,7 @@ export async function build(options: Record<string, any>) {
console.log(commandsPaths)
const commandsImports = commandsPaths.map(file => {
const fname = p.parse(file)
return `import ${fname.name} from "./${p.join(`./commands/${file}`).replace(/\\/g, '/')}"`
return `import ${fname.name} from "./${p.join(`./commands/${file}`).split(p.sep).join(p.posix.sep)}"`
});
console.log(commandsImports)
await esbuild.build({

View File

@@ -21,6 +21,21 @@ class JsonResponse extends Response {
}
}
async function executeModule(
emitter,
logger,
errHandler,
{ module, task, args },
) {
try {
await module.execute(args);
emitter.emit('module.activate', /*resultPayload(PayloadType.Success, module)*/);
} catch(e) {
throw e /* { } */
}
}
const router = Router();
/**