mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
perf: EAB授权支持绑定邮箱,支持公共EAB设置
This commit is contained in:
@@ -217,6 +217,8 @@ export class Executor {
|
||||
const instance: ITaskPlugin = new plugin.target();
|
||||
// @ts-ignore
|
||||
const define: PluginDefine = plugin.define;
|
||||
const pluginName = define.name;
|
||||
const pluginConfig = await this.options.pluginConfigService.getPluginConfig(pluginName);
|
||||
//从outputContext读取输入参数
|
||||
const input = cloneDeep(step.input);
|
||||
Decorator.inject(define.input, instance, input, (item, key) => {
|
||||
@@ -238,6 +240,12 @@ export class Executor {
|
||||
}
|
||||
});
|
||||
|
||||
const sysInput = pluginConfig.sysSetting?.input || {};
|
||||
//注入系统设置参数
|
||||
for (const sysInputKey in sysInput) {
|
||||
input[sysInputKey] = sysInput[sysInputKey];
|
||||
}
|
||||
|
||||
const newInputHash = hashUtils.md5(JSON.stringify(input));
|
||||
step.status!.inputHash = newInputHash;
|
||||
//判断是否需要跳过
|
||||
|
||||
@@ -26,7 +26,10 @@ export type TaskOutputDefine = {
|
||||
type?: string;
|
||||
};
|
||||
|
||||
export type TaskInputDefine = FormItemProps;
|
||||
export type TaskInputDefine = {
|
||||
required?: boolean;
|
||||
isSys?: boolean;
|
||||
} & FormItemProps;
|
||||
|
||||
export type PluginDefine = Registrable & {
|
||||
default?: any;
|
||||
|
||||
@@ -2,11 +2,11 @@ export type PluginConfig = {
|
||||
name: string;
|
||||
disabled: boolean;
|
||||
sysSetting: {
|
||||
[key: string]: any;
|
||||
input: Record<string, any>;
|
||||
};
|
||||
};
|
||||
|
||||
//插件配置服务
|
||||
export type IPluginConfigService = {
|
||||
getPluginConfig: (pluginName: string) => Promise<any>;
|
||||
getPluginConfig: (pluginName: string) => Promise<PluginConfig>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user