fix(core): update

This commit is contained in:
Philipp Kunz 2021-01-22 20:45:35 +00:00
parent 387f00078f
commit 5a0b12f6aa
3 changed files with 8241 additions and 1605 deletions

9806
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -24,21 +24,21 @@
},
"homepage": "https://gitlab.com/pushrocks/cflare#readme",
"dependencies": {
"@pushrocks/smartdelay": "^2.0.9",
"@pushrocks/smartlog": "^2.0.28",
"@pushrocks/smartpromise": "^3.0.6",
"@pushrocks/smartrequest": "^1.1.47",
"@pushrocks/smartstring": "^3.0.18",
"@tsclass/tsclass": "^3.0.17"
"@pushrocks/smartdelay": "^2.0.10",
"@pushrocks/smartlog": "^2.0.39",
"@pushrocks/smartpromise": "^3.1.3",
"@pushrocks/smartrequest": "^1.1.51",
"@pushrocks/smartstring": "^3.0.24",
"@tsclass/tsclass": "^3.0.29"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.24",
"@gitzone/tsbuild": "^2.1.25",
"@gitzone/tsrun": "^1.2.12",
"@gitzone/tstest": "^1.0.33",
"@gitzone/tstest": "^1.0.52",
"@pushrocks/qenv": "^4.0.10",
"@pushrocks/tapbundle": "^3.2.1",
"@types/node": "^14.0.13",
"tslint": "^6.1.2",
"@pushrocks/tapbundle": "^3.2.9",
"@types/node": "^14.14.22",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0"
},
"files": [

View File

@ -73,14 +73,16 @@ export class CloudflareAccount {
createRecord: async (
domainNameArg: string,
typeArg: plugins.tsclass.network.TDnsRecordType,
contentArg: string
contentArg: string,
ttlArg = 1
): Promise<any> => {
const domain = new plugins.smartstring.Domain(domainNameArg);
const domainIdArg = await this.convenience.getZoneId(domain.zoneName);
const dataObject = {
name: domain.fullName,
type: typeArg,
content: contentArg
content: contentArg,
ttl: ttlArg
};
const response = await this.request(
'POST',
@ -173,7 +175,7 @@ export class CloudflareAccount {
// acme convenience functions
acmeSetDnsChallenge: async (dnsChallenge: plugins.tsclass.network.IDnsChallenge) => {
await this.convenience.cleanRecord(dnsChallenge.hostName, 'TXT');
await this.convenience.createRecord(dnsChallenge.hostName, 'TXT', dnsChallenge.challenge);
await this.convenience.createRecord(dnsChallenge.hostName, 'TXT', dnsChallenge.challenge, 2);
},
acmeRemoveDnsChallenge: async (dnsChallenge: plugins.tsclass.network.IDnsChallenge) => {
await this.convenience.removeRecord(dnsChallenge.hostName, 'TXT');