fix: 修复自定义插件name丢失author导致找不到插件的bug

This commit is contained in:
xiaojunnuo
2026-01-15 23:43:07 +08:00
parent d5d7d73440
commit 2fbb58eb2b
22 changed files with 73 additions and 85 deletions

View File

@@ -276,7 +276,10 @@ export class Executor {
const lastStatus = this.lastStatusMap.get(step.id);
//执行任务
const plugin: RegistryItem<AbstractTaskPlugin> = pluginRegistry.get(step.type);
if (!plugin) {
currentLogger.error(`未找到插件${step.type}`);
throw new Error(`未找到插件${step.type}`);
}
//@ts-ignore
let instance: ITaskPlugin = null;
try {
@@ -285,7 +288,7 @@ export class Executor {
//@ts-ignore
instance = new pluginCls();
} catch (e: any) {
currentLogger.error(`实例化插件失败:${e.message}`);
currentLogger.error(`实例化插件失败:${step.type}:${e.message}`);
throw new Error(`实例化插件失败`, e);
}