mirror of
https://github.com/sern-handler/cli
synced 2026-06-06 01:16:53 +00:00
s
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -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();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user