v3.0.8: bugfix packageAgent and default challenges / store
This commit is contained in:
parent
49a7f2da8f
commit
6665dc3cf8
54
greenlock.js
54
greenlock.js
|
@ -33,7 +33,7 @@ G.create = function(gconf) {
|
||||||
U._validMx(gconf.maintainerEmail).catch(function() {
|
U._validMx(gconf.maintainerEmail).catch(function() {
|
||||||
console.error(
|
console.error(
|
||||||
'invalid maintainer contact info:',
|
'invalid maintainer contact info:',
|
||||||
gconf.maintainer.Email
|
gconf.maintainerEmail
|
||||||
);
|
);
|
||||||
// maybe a little harsh?
|
// maybe a little harsh?
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
@ -215,17 +215,17 @@ G.create = function(gconf) {
|
||||||
// TODO look at the other one
|
// TODO look at the other one
|
||||||
UserEvents.notify({
|
UserEvents.notify({
|
||||||
/*
|
/*
|
||||||
// maintainer should be only on pre-publish, or maybe install, I think
|
// maintainer should be only on pre-publish, or maybe install, I think
|
||||||
maintainerEmail: greenlock._defaults._maintainerEmail,
|
maintainerEmail: greenlock._defaults._maintainerEmail,
|
||||||
name: greenlock._defaults._maintainerPackage,
|
name: greenlock._defaults._packageAgent,
|
||||||
version: greenlock._defaults._maintainerPackageVersion,
|
version: greenlock._defaults._maintainerPackageVersion,
|
||||||
//action: params.pems._type,
|
//action: params.pems._type,
|
||||||
domains: params.altnames,
|
domains: params.altnames,
|
||||||
subscriberEmail: greenlock._defaults._subscriberEmail,
|
subscriberEmail: greenlock._defaults._subscriberEmail,
|
||||||
// TODO enable for Greenlock Pro
|
// TODO enable for Greenlock Pro
|
||||||
//customerEmail: args.customerEmail
|
//customerEmail: args.customerEmail
|
||||||
telemetry: greenlock._defaults.telemetry
|
telemetry: greenlock._defaults.telemetry
|
||||||
*/
|
*/
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -311,13 +311,19 @@ G.create = function(gconf) {
|
||||||
}
|
}
|
||||||
var site = sites[0];
|
var site = sites[0];
|
||||||
site = JSON.parse(JSON.stringify(site));
|
site = JSON.parse(JSON.stringify(site));
|
||||||
if (!site.store) {
|
if (site.store && site.challenges) {
|
||||||
site.store = greenlock._defaults.store;
|
return site;
|
||||||
}
|
}
|
||||||
if (!site.challenges) {
|
return greenlock.manager.defaults().then(function(mconf) {
|
||||||
site.challenges = greenlock._defaults.challenges;
|
if (!site.store) {
|
||||||
}
|
site.store = mconf.store || greenlock._defaults.store;
|
||||||
return site;
|
}
|
||||||
|
if (!site.challenges) {
|
||||||
|
site.challenges =
|
||||||
|
mconf.challenges || greenlock._defaults.challenges;
|
||||||
|
}
|
||||||
|
return site;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -396,9 +402,14 @@ G.create = function(gconf) {
|
||||||
};
|
};
|
||||||
|
|
||||||
greenlock._acme = function(args) {
|
greenlock._acme = function(args) {
|
||||||
|
var packageAgent = greenlock._defaults.packageAgent || '';
|
||||||
|
// because Greenlock_Express/v3.x Greenlock/v3 is redundant
|
||||||
|
if (!/greenlock/i.test(packageAgent)) {
|
||||||
|
packageAgent = (packageAgent + ' Greenlock/' + pkg.version).trim();
|
||||||
|
}
|
||||||
var acme = ACME.create({
|
var acme = ACME.create({
|
||||||
maintainerEmail: greenlock._defaults.maintainerEmail,
|
maintainerEmail: greenlock._defaults.maintainerEmail,
|
||||||
packageAgent: greenlock._defaults.packageAgent,
|
packageAgent: packageAgent,
|
||||||
notify: greenlock._notify,
|
notify: greenlock._notify,
|
||||||
debug: greenlock._defaults.debug || args.debug
|
debug: greenlock._defaults.debug || args.debug
|
||||||
});
|
});
|
||||||
|
@ -515,11 +526,6 @@ G._defaults = function(opts) {
|
||||||
defaults.find = opts.find;
|
defaults.find = opts.find;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!defaults._maintainerPackage) {
|
|
||||||
defaults._maintainerPackage = pkg.name;
|
|
||||||
defaults._maintainerPackageVersion = pkg.version;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!defaults.directoryUrl) {
|
if (!defaults.directoryUrl) {
|
||||||
if (defaults.staging) {
|
if (defaults.staging) {
|
||||||
defaults.directoryUrl =
|
defaults.directoryUrl =
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@root/greenlock",
|
"name": "@root/greenlock",
|
||||||
"version": "3.0.7",
|
"version": "3.0.8",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@root/greenlock",
|
"name": "@root/greenlock",
|
||||||
"version": "3.0.7",
|
"version": "3.0.8",
|
||||||
"description": "The easiest Let's Encrypt client for Node.js and Browsers",
|
"description": "The easiest Let's Encrypt client for Node.js and Browsers",
|
||||||
"homepage": "https://rootprojects.org/greenlock/",
|
"homepage": "https://rootprojects.org/greenlock/",
|
||||||
"main": "greenlock.js",
|
"main": "greenlock.js",
|
||||||
|
|
Loading…
Reference in New Issue