Compare commits
9 Commits
Author | SHA1 | Date |
---|---|---|
|
f01286d5b1 | |
|
aea967e210 | |
|
89e2fec39f | |
|
1a60d53c32 | |
|
6dc711b880 | |
|
d78e437ec0 | |
|
6df8692385 | |
|
8ab7ad25f2 | |
|
8c11b56aa9 |
|
@ -1,5 +1,5 @@
|
|||
greenlock.json*
|
||||
TODO.txt
|
||||
TODO*
|
||||
link.sh
|
||||
.env
|
||||
.greenlockrc
|
||||
|
|
|
@ -83,7 +83,8 @@ Certificates are renewed every 45 days by default, and renewal checks will happe
|
|||
var pkg = require('./package.json');
|
||||
var Greenlock = require('greenlock');
|
||||
var greenlock = Greenlock.create({
|
||||
configDir: './greenlock.d/config.json',
|
||||
packageRoot: __dirname,
|
||||
configDir: "./greenlock.d/",
|
||||
packageAgent: pkg.name + '/' + pkg.version,
|
||||
maintainerEmail: pkg.author,
|
||||
staging: true,
|
||||
|
@ -177,7 +178,7 @@ Creates an instance of greenlock with _environment_-level values.
|
|||
|
||||
var pkg = require('./package.json');
|
||||
var gl = Greenlock.create({
|
||||
configDir: './greenlock.d/config.json',
|
||||
configDir: './greenlock.d/',
|
||||
|
||||
// Staging for testing environments
|
||||
staging: true,
|
||||
|
@ -402,8 +403,8 @@ Greenlock comes with reasonable defaults but when you install it,
|
|||
you should also install any plugins that you need.
|
||||
|
||||
```bash
|
||||
npm install --save @root/greenlock
|
||||
npm install --save greenlock-manager-fs
|
||||
npm install --save @root/greenlock@v4
|
||||
npm install --save @greenlock/manager
|
||||
npm install --save greenlock-store-fs
|
||||
npm install --save acme-http-01-standalone
|
||||
```
|
||||
|
|
|
@ -5,14 +5,20 @@ var args = process.argv.slice(2);
|
|||
var arg0 = args[0];
|
||||
//console.log(args);
|
||||
|
||||
var found = ['certonly', 'add', 'update', 'config', 'defaults', 'remove', 'init'].some(
|
||||
function(k) {
|
||||
if (k === arg0) {
|
||||
require('./' + k);
|
||||
return true;
|
||||
}
|
||||
var found = [
|
||||
'certonly',
|
||||
'add',
|
||||
'update',
|
||||
'config',
|
||||
'defaults',
|
||||
'remove',
|
||||
'init'
|
||||
].some(function(k) {
|
||||
if (k === arg0) {
|
||||
require('./' + k);
|
||||
return true;
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
if (!found) {
|
||||
console.error(arg0 + ': command not yet implemented');
|
||||
|
|
|
@ -36,6 +36,9 @@ cli.main(async function(argList, flags) {
|
|||
flags.manager.module = manager;
|
||||
|
||||
try {
|
||||
if ('.' === String(manager)[0]) {
|
||||
manager = require('path').resolve(pkgRoot, manager);
|
||||
}
|
||||
P._loadSync(manager);
|
||||
} catch (e) {
|
||||
try {
|
||||
|
|
|
@ -124,8 +124,10 @@ Init._init = function(opts) {
|
|||
);
|
||||
}
|
||||
|
||||
//var mkdirp = promisify(require("@root/mkdirp"));
|
||||
opts.configFile = path.join(opts.configDir, 'config.json');
|
||||
opts.configFile = path.join(
|
||||
path.resolve(opts.packageRoot, opts.configDir),
|
||||
'config.json'
|
||||
);
|
||||
var config;
|
||||
try {
|
||||
config = JSON.parse(fs.readFileSync(opts.configFile));
|
||||
|
|
|
@ -12,13 +12,25 @@ module.exports.wrap = function(greenlock, gconf) {
|
|||
var myFind = gconf.find;
|
||||
delete gconf.find;
|
||||
|
||||
var mega = mergeManager(gconf);
|
||||
var mega = mergeManager(greenlock, gconf);
|
||||
|
||||
greenlock.manager = {};
|
||||
greenlock.sites = {};
|
||||
//greenlock.accounts = {};
|
||||
//greenlock.certs = {};
|
||||
|
||||
greenlock.manager._modulename = gconf.manager.module;
|
||||
if ('/' === String(gconf.manager.module)[0]) {
|
||||
greenlock.manager._modulename = require('path').relative(
|
||||
gconf.packageRoot,
|
||||
greenlock.manager._modulename
|
||||
);
|
||||
if ('.' !== String(greenlock.manager._modulename)[0]) {
|
||||
greenlock.manager._modulename =
|
||||
'./' + greenlock.manager._modulename;
|
||||
}
|
||||
}
|
||||
|
||||
var allowed = [
|
||||
'accountKeyType', //: ["P-256", "RSA-2048"],
|
||||
'serverKeyType', //: ["RSA-2048", "P-256"],
|
||||
|
@ -409,6 +421,7 @@ function loadManager(gconf) {
|
|||
);
|
||||
}
|
||||
*/
|
||||
|
||||
try {
|
||||
// wrap this to be safe for @greenlock/manager
|
||||
m = require(gconf.manager.module).create(gconf.manager);
|
||||
|
@ -431,7 +444,7 @@ function loadManager(gconf) {
|
|||
return m;
|
||||
}
|
||||
|
||||
function mergeManager(gconf) {
|
||||
function mergeManager(greenlock, gconf) {
|
||||
var mng;
|
||||
function m() {
|
||||
if (mng) {
|
||||
|
@ -554,6 +567,21 @@ function mergeManager(gconf) {
|
|||
mega.get = m().get;
|
||||
}
|
||||
|
||||
if (!mega.find) {
|
||||
mega._nofind = false;
|
||||
mega.find = async function(opts) {
|
||||
if (!mega._nofind) {
|
||||
console.warn(
|
||||
'Warning: manager `' +
|
||||
greenlock.manager._modulename +
|
||||
'` does not implement `find({})`\n'
|
||||
);
|
||||
mega._nofind = true;
|
||||
}
|
||||
return [];
|
||||
};
|
||||
}
|
||||
|
||||
if (!mega.get) {
|
||||
mega.get = function(opts) {
|
||||
var servername = opts.servername;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@root/greenlock",
|
||||
"version": "4.0.1",
|
||||
"version": "4.0.5",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -24,15 +24,23 @@
|
|||
}
|
||||
},
|
||||
"@root/acme": {
|
||||
"version": "3.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@root/acme/-/acme-3.0.8.tgz",
|
||||
"integrity": "sha512-VmBvLvWdCDkolkanI9Dzm1ouSWPaAa2eCCwcDZcVQbWoNiUIOqbbd57fcMA/gZxLyuJPStD2WXFuEuSMPDxcww==",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@root/acme/-/acme-3.1.0.tgz",
|
||||
"integrity": "sha512-GAyaW63cpSYd2KvVp5lHLbCWeEhJPKZK9nsJvZJOKsD9Uv88KEttn4FpDZEJ+2q3Jsey0DWpuQ2I4ft0JV9p2w==",
|
||||
"requires": {
|
||||
"@root/csr": "^0.8.1",
|
||||
"@root/encoding": "^1.0.1",
|
||||
"@root/keypairs": "^0.9.0",
|
||||
"@root/keypairs": "^0.10.0",
|
||||
"@root/pem": "^1.0.4",
|
||||
"@root/request": "^1.3.11",
|
||||
"@root/request": "^1.6.1",
|
||||
"@root/x509": "^0.7.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@root/request": {
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@root/request/-/request-1.6.1.tgz",
|
||||
"integrity": "sha512-8wrWyeBLRp7T8J36GkT3RODJ6zYmL0/maWlAUD5LOXT28D3TDquUepyYDKYANNA3Gc8R5ZCgf+AXvSTYpJEWwQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@root/asn1": {
|
||||
|
@ -59,9 +67,9 @@
|
|||
"integrity": "sha512-OaEub02ufoU038gy6bsNHQOjIn8nUjGiLcaRmJ40IUykneJkIW5fxDqKxQx48cszuNflYldsJLPPXCrGfHs8yQ=="
|
||||
},
|
||||
"@root/keypairs": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/@root/keypairs/-/keypairs-0.9.0.tgz",
|
||||
"integrity": "sha512-NXE2L9Gv7r3iC4kB/gTPZE1vO9Ox/p14zDzAJ5cGpTpytbWOlWF7QoHSJbtVX4H7mRG/Hp7HR3jWdWdb2xaaXg==",
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@root/keypairs/-/keypairs-0.10.0.tgz",
|
||||
"integrity": "sha512-t8VocY46Mtb0NTsxzyLLf5tsgfw0BXLYVADAyiRdEdqHcvPFGJdjkXNtHVQuSV/FMaC65iTOHVP4E6X8iT3Ikg==",
|
||||
"requires": {
|
||||
"@root/encoding": "^1.0.1",
|
||||
"@root/pem": "^1.0.4",
|
||||
|
@ -79,9 +87,9 @@
|
|||
"integrity": "sha512-rEUDiUsHtild8GfIjFE9wXtcVxeS+ehCJQBwbQQ3IVfORKHK93CFnRtkr69R75lZFjcmKYVc+AXDB+AeRFOULA=="
|
||||
},
|
||||
"@root/request": {
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@root/request/-/request-1.4.2.tgz",
|
||||
"integrity": "sha512-J8FM4+SJuc7WRC+Jz17m+VT2lgI7HtatHhxN1F2ck5aIKUAxJEaR4u/gLBsgT60mVHevKCjKN0O8115UtJjwLw=="
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@root/request/-/request-1.6.1.tgz",
|
||||
"integrity": "sha512-8wrWyeBLRp7T8J36GkT3RODJ6zYmL0/maWlAUD5LOXT28D3TDquUepyYDKYANNA3Gc8R5ZCgf+AXvSTYpJEWwQ=="
|
||||
},
|
||||
"@root/x509": {
|
||||
"version": "0.7.2",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@root/greenlock",
|
||||
"version": "4.0.1",
|
||||
"version": "4.0.5",
|
||||
"description": "The easiest Let's Encrypt client for Node.js and Browsers",
|
||||
"homepage": "https://rootprojects.org/greenlock/",
|
||||
"main": "greenlock.js",
|
||||
|
@ -39,11 +39,11 @@
|
|||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
"@greenlock/manager": "^3.1.0",
|
||||
"@root/acme": "^3.0.8",
|
||||
"@root/acme": "^3.1.0",
|
||||
"@root/csr": "^0.8.1",
|
||||
"@root/keypairs": "^0.9.0",
|
||||
"@root/keypairs": "^0.10.0",
|
||||
"@root/mkdirp": "^1.0.0",
|
||||
"@root/request": "^1.4.2",
|
||||
"@root/request": "^1.6.1",
|
||||
"acme-http-01-standalone": "^3.0.5",
|
||||
"cert-info": "^1.5.1",
|
||||
"greenlock-store-fs": "^3.2.2",
|
||||
|
|
|
@ -146,7 +146,7 @@ P._normalizeChallenge = function(name, ch) {
|
|||
};
|
||||
}
|
||||
|
||||
// init, zones, set, get, remove
|
||||
// init, zones, set, get, remove, propagationDelay
|
||||
if (ch.init) {
|
||||
if (2 === ch.init.length) {
|
||||
warn();
|
||||
|
@ -183,6 +183,9 @@ P._normalizeChallenge = function(name, ch) {
|
|||
}
|
||||
gch.get = wrappy(ch.get);
|
||||
}
|
||||
if("number" === typeof ch.propagationDelay) {
|
||||
gch.propagationDelay = ch.propagationDelay;
|
||||
}
|
||||
|
||||
return gch;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue