mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
feat: 【破坏性更新】插件改为metadata加载模式,plugin-cert、plugin-lib包部分代码转移到certd-server中,影响自定义插件,需要修改相关import引用
ssh、aliyun、tencent、qiniu、oss等 access和client需要转移import
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user