diff --git a/packages/core/pipeline/src/plugin/api.ts b/packages/core/pipeline/src/plugin/api.ts index fabee1fc..d41f14a1 100644 --- a/packages/core/pipeline/src/plugin/api.ts +++ b/packages/core/pipeline/src/plugin/api.ts @@ -9,6 +9,7 @@ import { ILogger, logger, utils } from "../utils/index.js"; import { HttpClient } from "../utils/index.js"; import dayjs from "dayjs"; import _ from "lodash-es"; +import { IPluginConfigService } from "../service/config"; export type UserInfo = { role: "admin" | "user"; id: any; @@ -72,6 +73,8 @@ export type TaskInstanceContext = { emailService: IEmailService; //cname记录服务 cnameProxyService: ICnameProxyService; + //插件配置服务 + configService: IPluginConfigService; //流水线上下文 pipelineContext: IContext; //用户上下文 diff --git a/packages/core/pipeline/src/service/config.ts b/packages/core/pipeline/src/service/config.ts new file mode 100644 index 00000000..10356532 --- /dev/null +++ b/packages/core/pipeline/src/service/config.ts @@ -0,0 +1,13 @@ +import { FormItemProps } from "../d.ts/index.js"; + +export type PluginConfig = { + show: false; + sysInput: { + [key: string]: {}; + }; +}; + +//插件配置服务 +export type IPluginConfigService = { + getPluginConfig: (pluginName: string) => Promise; +};