refactor: register

This commit is contained in:
xiaojunnuo
2023-05-09 10:16:49 +08:00
parent e123ec4089
commit 9747d40734
24 changed files with 144 additions and 19 deletions

View File

@@ -156,7 +156,7 @@ export class CertApplyPlugin implements ITaskPlugin {
})
cert?: CertInfo;
async onInit() {
async onInstance() {
this.acme = new AcmeService({ userContext: this.userContext, logger: this.logger });
}
@@ -228,7 +228,7 @@ export class CertApplyPlugin implements ITaskPlugin {
const dnsProvider: IDnsProvider = new DnsProviderClass();
const context = { access, logger: this.logger, http: this.http };
Decorator.inject(dnsProviderDefine.autowire, dnsProvider, context);
await dnsProvider.onInit();
await dnsProvider.onInstance();
const cert = await this.acme.order({
email,