v2.7.14: node v6 fix

This commit is contained in:
AJ ONeal 2019-04-07 18:27:49 -06:00
parent 461ad43620
commit 1b388788d8
3 changed files with 11 additions and 9 deletions

View File

@ -10,12 +10,14 @@ try {
} catch(e) {
PromiseA = global.Promise;
}
var util = require('util');
if (!PromiseA.promisify) {
PromiseA.promisify = require('util');
}
function promisifyAllSelf(obj) {
if (obj.__promisified) { return obj; }
Object.keys(obj).forEach(function (key) {
if ('function' === typeof obj[key] && !/Async$/.test(key)) {
obj[key + 'Async'] = util.promisify(obj[key]);
obj[key + 'Async'] = PromiseA.promisify(obj[key]);
}
});
obj.__promisified = true;
@ -30,7 +32,7 @@ function promisifyAllStore(obj) {
// wrap just in case it's synchronous (or improperly throws)
p = function (opts) { return PromiseA.resolve().then(function () { obj[key](opts); }); };
} else {
p = util.promisify(obj[key]);
p = PromiseA.promisify(obj[key]);
}
// internal backwards compat
obj[key + 'Async'] = p;

8
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "greenlock",
"version": "2.7.13",
"version": "2.7.14",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -18,9 +18,9 @@
}
},
"acme-v2": {
"version": "1.7.5",
"resolved": "https://registry.npmjs.org/acme-v2/-/acme-v2-1.7.5.tgz",
"integrity": "sha512-jru7mOO/gT/ZfpRJo7m8QDWy2xea7A0xZsR9zlvMfm0+kQsE8DI3DJXOVN/1iMeQOMCHp0sZVqYRqB42XAKAdw==",
"version": "1.7.6",
"resolved": "https://registry.npmjs.org/acme-v2/-/acme-v2-1.7.6.tgz",
"integrity": "sha512-k4ZlTI8txU7AweKny2MK9EAJTSCSu9ueodrv3v91r2NckTuHRu8ELzN3LbP5zlTrb2coNFay4uLcA3u4ona67A==",
"requires": {
"@coolaj86/urequest": "^1.3.6",
"rsa-compat": "^2.0.6"

View File

@ -1,6 +1,6 @@
{
"name": "greenlock",
"version": "2.7.13",
"version": "2.7.14",
"description": "Let's Encrypt for node.js on npm",
"main": "index.js",
"files": [
@ -39,7 +39,7 @@
},
"dependencies": {
"acme": "^1.3.0",
"acme-v2": "^1.7.5",
"acme-v2": "^1.7.6",
"cert-info": "^1.5.1",
"keypairs": "^1.2.14",
"le-challenge-dns": "^3.0.3",