support init(deps)

This commit is contained in:
AJ ONeal 2019-06-15 14:36:20 -06:00
parent c8b895633c
commit fb69d25250
2 changed files with 14 additions and 1 deletions

View File

@ -407,6 +407,19 @@ module.exports.create = function (gl) {
copy.challenges[challenge.type].remove(copy, challenge.altname, challenge.token, done);
}
};
certReq.init = function (deps) {
var copy = utils.merge(deps, args);
copy = utils.merge(copy, gl);
utils.tplCopy(copy);
Object.keys(copy.challenges).forEach(function (key) {
if ('function' === typeof copy.challenges[key].init) {
copy.challenges[key].init(copy);
}
});
return null;
};
certReq.getZones = function (challenge) {
var copy = utils.merge({ dnsHosts: args.domains.map(function (x) { return 'xxxx.' + x; }) }, args);
copy = utils.merge(copy, gl);

View File

@ -1,6 +1,6 @@
{
"name": "greenlock",
"version": "2.8.0",
"version": "2.8.1",
"description": "Greenlock is Let's Encrypt (ACME) client for node.js",
"homepage": "https://greenlock.domains/",
"main": "index.js",