acme-dns-01-cloudflare
Advanced tools
Comparing version
@@ -9,5 +9,8 @@ # Changelog | ||
## [1.2.1] - 2020-04-26 | ||
- Fix promise rejections to always return an Error instance for better compatibility with ACME.js | ||
## [1.2.0] - 2020-04-26 | ||
- Add ACME.js propagationDelay support | ||
- Wait 10 seconds before attempting first propagation check, to prevent poluting the DNS cache with an invalid result | ||
- Wait 10 seconds before attempting first propagation check, to prevent polluting the DNS cache with an invalid result | ||
@@ -14,0 +17,0 @@ ## [1.1.1] - 2020-02-04 |
23
index.js
@@ -65,3 +65,3 @@ 'use strict'; | ||
if(!args.challenge){ | ||
return Promise.reject("You must be using Greenlock v2.7+ to use acme-dns-01-cloudflare"); | ||
throw new Error("You must be using Greenlock v2.7+ to use acme-dns-01-cloudflare"); | ||
} | ||
@@ -72,3 +72,3 @@ try{ | ||
if(!zone){ | ||
return Promise.reject(`Could not find a zone for '${fullRecordName}'.`); | ||
throw new Error(`Could not find a zone for '${fullRecordName}'.`); | ||
} | ||
@@ -90,2 +90,5 @@ // add record | ||
}catch(err){ | ||
if(err instanceof Error){ | ||
throw err; | ||
} | ||
throw new Error(err); | ||
@@ -97,3 +100,3 @@ } | ||
if(!args.challenge){ | ||
return Promise.reject("You must be using Greenlock v2.7+ to use acme-dns-01-cloudflare"); | ||
throw new Error("You must be using Greenlock v2.7+ to use acme-dns-01-cloudflare"); | ||
} | ||
@@ -104,7 +107,7 @@ try{ | ||
if(!zone){ | ||
return Promise.reject(`Could not find a zone for '${fullRecordName}'.`); | ||
throw new Error(`Could not find a zone for '${fullRecordName}'.`); | ||
} | ||
const records = await this.getTxtRecords(zone, fullRecordName); | ||
if(!records.length){ | ||
return Promise.reject(`No TXT records found for ${fullRecordName}`); | ||
throw new Error(`No TXT records found for ${fullRecordName}`); | ||
} | ||
@@ -124,2 +127,5 @@ for(const record of records){ | ||
}catch(err){ | ||
if(err instanceof Error){ | ||
throw err; | ||
} | ||
throw new Error(err); | ||
@@ -132,3 +138,3 @@ } | ||
if(!args.challenge){ | ||
return Promise.reject("You must be using Greenlock v2.7+ to use acme-dns-01-cloudflare"); | ||
throw new Error("You must be using Greenlock v2.7+ to use acme-dns-01-cloudflare"); | ||
} | ||
@@ -139,3 +145,3 @@ try{ | ||
if(!zone){ | ||
return Promise.reject(`Could not find a zone for '${fullRecordName}'.`); | ||
throw new Error(`Could not find a zone for '${fullRecordName}'.`); | ||
} | ||
@@ -174,2 +180,5 @@ const records = await this.getTxtRecords(zone, fullRecordName); | ||
}catch(err){ | ||
if(err instanceof Error){ | ||
throw err; | ||
} | ||
throw new Error(err); | ||
@@ -176,0 +185,0 @@ } |
{ | ||
"name": "acme-dns-01-cloudflare", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Cloudflare DNS for Let's Encrypt / ACME dns-01 challenges with Greenlock.js and ACME.js", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
14211
1.73%213
4.41%