perf: 隐藏运行策略选项

This commit is contained in:
xiaojunnuo
2025-04-10 09:35:50 +08:00
parent 57309ae3d5
commit 2951df0cd9
6 changed files with 17 additions and 3 deletions

View File

@@ -64,6 +64,7 @@ export type PluginDefine = Registrable & {
};
};
needPlus?: boolean;
showRunStrategy?: boolean;
};
export type ITaskPlugin = {

View File

@@ -48,11 +48,21 @@ export function IsTaskPlugin(define: PluginDefine): ClassDecorator {
inputMap[item[0]] = item[1];
});
merge(define, { input: inputMap, autowire: autowires, output: outputs });
const defaultConfig = {
showRunStrategy: false,
default: {
strategy: {
runStrategy: 1, // 0:正常执行1:成功后跳过
},
},
};
define = merge(defaultConfig, define, { input: inputMap, autowire: autowires, output: outputs });
Reflect.defineMetadata(PLUGIN_CLASS_KEY, define, target);
target.define = define;
pluginRegistry.register(define.name, {
define,
target,