refactor: register

pull/21/merge
xiaojunnuo 2023-05-09 09:56:31 +08:00
parent f358a0f226
commit e123ec4089
14 changed files with 25 additions and 18 deletions

View File

@ -23,3 +23,5 @@ export class AliyunAccess {
}) })
accessKeySecret = ""; accessKeySecret = "";
} }
new AliyunAccess();

View File

@ -120,3 +120,5 @@ export class AliyunDnsProvider implements IDnsProvider {
return ret.RecordId; return ret.RecordId;
} }
} }
new AliyunDnsProvider();

View File

@ -228,3 +228,5 @@ export class DeployCertToAliyunAckIngressPlugin implements ITaskPlugin {
} }
} }
} }
new DeployCertToAliyunAckIngressPlugin();

View File

@ -4,6 +4,7 @@ import Core from "@alicloud/pop-core";
import RPCClient from "@alicloud/pop-core"; import RPCClient from "@alicloud/pop-core";
import { AliyunAccess } from "../../access"; import { AliyunAccess } from "../../access";
@IsTaskPlugin({ @IsTaskPlugin({
name: "DeployCertToAliyunCDN", name: "DeployCertToAliyunCDN",
title: "部署证书至阿里云CDN", title: "部署证书至阿里云CDN",
@ -103,3 +104,4 @@ export class DeployCertToAliyunCDN implements ITaskPlugin {
} }
} }
} }
new DeployCertToAliyunCDN();

View File

@ -101,3 +101,5 @@ export class UploadCertToAliyun implements ITaskPlugin {
}); });
} }
} }
//注册插件
new UploadCertToAliyun();

View File

@ -1,21 +1,3 @@
import * as cert from "@certd/plugin-cert";
import * as aliyun from "@certd/plugin-aliyun";
import * as tencent from "@certd/plugin-tencent";
import * as host from "@certd/plugin-host";
import * as huawei from "@certd/plugin-huawei";
function register(exports: any) {
for (const key in exports) {
const value = exports[key];
console.log("value");
}
}
register(cert);
register(aliyun);
register(tencent);
register(host);
register(huawei);
export * from "@certd/plugin-cert"; export * from "@certd/plugin-cert";
export * from "@certd/plugin-aliyun"; export * from "@certd/plugin-aliyun";
export * from "@certd/plugin-tencent"; export * from "@certd/plugin-tencent";

View File

@ -289,3 +289,5 @@ export class CertApplyPlugin implements ITaskPlugin {
}; };
} }
} }
new CertApplyPlugin();

View File

@ -45,3 +45,5 @@ export class SshAccess implements IAccess {
}) })
privateKey!: string; privateKey!: string;
} }
new SshAccess();

View File

@ -60,3 +60,5 @@ export class HostShellExecutePlugin implements ITaskPlugin {
this.logger.info("exec res:", ret); this.logger.info("exec res:", ret);
} }
} }
new HostShellExecutePlugin();

View File

@ -98,3 +98,5 @@ export class UploadCertToHostPlugin implements ITaskPlugin {
this.hostKeyPath = keyPath; this.hostKeyPath = keyPath;
} }
} }
new UploadCertToHostPlugin();

View File

@ -23,3 +23,5 @@ export class HuaweiAccess {
}) })
accessKeySecret = ""; accessKeySecret = "";
} }
new HuaweiAccess();

View File

@ -112,3 +112,5 @@ export class HuaweiDnsProvider implements IDnsProvider {
return ret.RecordId; return ret.RecordId;
} }
} }
new HuaweiDnsProvider();

View File

@ -23,3 +23,5 @@ export class DnspodAccess {
}) })
id = ""; id = "";
} }
new DnspodAccess();

View File

@ -112,3 +112,4 @@ export class DnspodDnsProvider implements IDnsProvider {
return domain; return domain;
} }
} }
new DnspodDnsProvider();