mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
perf: 隐藏运行策略选项
This commit is contained in:
@@ -64,6 +64,7 @@ export type PluginDefine = Registrable & {
|
||||
};
|
||||
};
|
||||
needPlus?: boolean;
|
||||
showRunStrategy?: boolean;
|
||||
};
|
||||
|
||||
export type ITaskPlugin = {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user