feat: 【破坏性更新】插件改为metadata加载模式,plugin-cert、plugin-lib包部分代码转移到certd-server中,影响自定义插件,需要修改相关import引用

ssh、aliyun、tencent、qiniu、oss等 access和client需要转移import
This commit is contained in:
xiaojunnuo
2025-12-31 17:01:37 +08:00
parent 9c26598831
commit a3fb24993d
312 changed files with 14321 additions and 597 deletions
@@ -11,6 +11,9 @@ export const ADDON_INPUT_KEY = "pipeline:addon:input";
export function IsAddon(define: AddonDefine): ClassDecorator {
return (target: any) => {
if (process.env.certd_plugin_loadmode === "metadata") {
return;
}
target = Decorator.target(target);
const inputs: any = {};
@@ -36,6 +39,9 @@ export function IsAddon(define: AddonDefine): ClassDecorator {
export function AddonInput(input?: AddonInputDefine): PropertyDecorator {
return (target, propertyKey) => {
if (process.env.certd_plugin_loadmode === "metadata") {
return;
}
target = Decorator.target(target, propertyKey);
// const _type = Reflect.getMetadata("design:type", target, propertyKey);
Reflect.defineMetadata(ADDON_INPUT_KEY, input, target, propertyKey);