fix(Dns01Handler): Update dependency versions and refine Dns01Handler implementation
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartacme',
|
||||
version: '6.1.2',
|
||||
version: '6.1.3',
|
||||
description: 'A TypeScript-based ACME client for LetsEncrypt certificate management with a focus on simplicity and power.'
|
||||
}
|
||||
|
@@ -5,14 +5,14 @@ import type { IChallengeHandler } from './IChallengeHandler.js';
|
||||
* DNS-01 challenge handler using CloudflareAccount and Smartdns.
|
||||
*/
|
||||
export class Dns01Handler implements IChallengeHandler<plugins.tsclass.network.IDnsChallenge> {
|
||||
private cf: any;
|
||||
private cf: plugins.tsclass.network.IConvenientDnsProvider;
|
||||
private smartdns: plugins.smartdnsClient.Smartdns;
|
||||
|
||||
constructor(
|
||||
cloudflareAccount: any,
|
||||
convenientDnsProvider: plugins.tsclass.network.IConvenientDnsProvider,
|
||||
smartdnsInstance?: plugins.smartdnsClient.Smartdns,
|
||||
) {
|
||||
this.cf = cloudflareAccount;
|
||||
this.cf = convenientDnsProvider;
|
||||
this.smartdns = smartdnsInstance ?? new plugins.smartdnsClient.Smartdns({});
|
||||
}
|
||||
|
||||
@@ -37,4 +37,8 @@ export class Dns01Handler implements IChallengeHandler<plugins.tsclass.network.I
|
||||
// remove DNS TXT record
|
||||
await this.cf.convenience.acmeRemoveDnsChallenge(ch);
|
||||
}
|
||||
|
||||
public async checkWetherDomainIsSupported(domainArg: string): Promise<boolean> {
|
||||
return this.cf.convenience.isDomainSupported(domainArg);
|
||||
}
|
||||
}
|
@@ -1,3 +1,8 @@
|
||||
// @apiclient.xyz scope
|
||||
import * as cloudflare from '@apiclient.xyz/cloudflare';
|
||||
|
||||
export { cloudflare };
|
||||
|
||||
// @apiglobal scope
|
||||
import * as typedserver from '@api.global/typedserver';
|
||||
|
||||
|
Reference in New Issue
Block a user