Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
006e15ac53 |
30
README.md
30
README.md
@ -1,3 +1,10 @@
|
|||||||
|
# Mirror of git.rootprojects.org/root/greenlock.js
|
||||||
|
|
||||||
|
Github does not expose the ability to automatically update mirrors,
|
||||||
|
so this may lag behind the official repository which is found at:
|
||||||
|
|
||||||
|
- <https://git.rootprojects.org/root/greenlock.js>
|
||||||
|
|
||||||
# New Documentation & [v4 Migration Guide](https://git.rootprojects.org/root/greenlock.js/src/branch/master/MIGRATION_GUIDE.md)
|
# New Documentation & [v4 Migration Guide](https://git.rootprojects.org/root/greenlock.js/src/branch/master/MIGRATION_GUIDE.md)
|
||||||
|
|
||||||
We're still working on the full documentation for this new version,
|
We're still working on the full documentation for this new version,
|
||||||
@ -83,12 +90,11 @@ Certificates are renewed every 45 days by default, and renewal checks will happe
|
|||||||
var pkg = require('./package.json');
|
var pkg = require('./package.json');
|
||||||
var Greenlock = require('greenlock');
|
var Greenlock = require('greenlock');
|
||||||
var greenlock = Greenlock.create({
|
var greenlock = Greenlock.create({
|
||||||
packageRoot: __dirname,
|
configDir: './greenlock.d/config.json',
|
||||||
configDir: "./greenlock.d/",
|
|
||||||
packageAgent: pkg.name + '/' + pkg.version,
|
packageAgent: pkg.name + '/' + pkg.version,
|
||||||
maintainerEmail: pkg.author,
|
maintainerEmail: pkg.author,
|
||||||
staging: true,
|
staging: true,
|
||||||
notify: function(event, details) {
|
notify: function (event, details) {
|
||||||
if ('error' === event) {
|
if ('error' === event) {
|
||||||
// `details` is an error object in this case
|
// `details` is an error object in this case
|
||||||
console.error(details);
|
console.error(details);
|
||||||
@ -101,7 +107,7 @@ greenlock.manager
|
|||||||
agreeToTerms: true,
|
agreeToTerms: true,
|
||||||
subscriberEmail: 'webhosting@example.com'
|
subscriberEmail: 'webhosting@example.com'
|
||||||
})
|
})
|
||||||
.then(function(fullConfig) {
|
.then(function (fullConfig) {
|
||||||
// ...
|
// ...
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@ -123,7 +129,7 @@ greenlock
|
|||||||
subject: altnames[0],
|
subject: altnames[0],
|
||||||
altnames: altnames
|
altnames: altnames
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(function () {
|
||||||
// saved config to db (or file system)
|
// saved config to db (or file system)
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@ -146,13 +152,13 @@ or wait for the renewal to complete (or for it to fail again).
|
|||||||
```js
|
```js
|
||||||
greenlock
|
greenlock
|
||||||
.get({ servername: subject })
|
.get({ servername: subject })
|
||||||
.then(function(pems) {
|
.then(function (pems) {
|
||||||
if (pems && pems.privkey && pems.cert && pems.chain) {
|
if (pems && pems.privkey && pems.cert && pems.chain) {
|
||||||
console.info('Success');
|
console.info('Success');
|
||||||
}
|
}
|
||||||
//console.log(pems);
|
//console.log(pems);
|
||||||
})
|
})
|
||||||
.catch(function(e) {
|
.catch(function (e) {
|
||||||
console.error('Big bad error:', e.code);
|
console.error('Big bad error:', e.code);
|
||||||
console.error(e);
|
console.error(e);
|
||||||
});
|
});
|
||||||
@ -178,7 +184,7 @@ Creates an instance of greenlock with _environment_-level values.
|
|||||||
|
|
||||||
var pkg = require('./package.json');
|
var pkg = require('./package.json');
|
||||||
var gl = Greenlock.create({
|
var gl = Greenlock.create({
|
||||||
configDir: './greenlock.d/',
|
configDir: './greenlock.d/config.json',
|
||||||
|
|
||||||
// Staging for testing environments
|
// Staging for testing environments
|
||||||
staging: true,
|
staging: true,
|
||||||
@ -301,7 +307,7 @@ of certificate requests.
|
|||||||
- [Store Callback Documentation](https://git.rootprojects.org/root/greenlock-store-test.js)
|
- [Store Callback Documentation](https://git.rootprojects.org/root/greenlock-store-test.js)
|
||||||
|
|
||||||
```js
|
```js
|
||||||
return greenlock.get({ servername }).then(function(site) {
|
return greenlock.get({ servername }).then(function (site) {
|
||||||
if (!site) {
|
if (!site) {
|
||||||
console.log(servername + ' was not found in any site config');
|
console.log(servername + ' was not found in any site config');
|
||||||
return;
|
return;
|
||||||
@ -332,8 +338,8 @@ You are not required to call it. If you implement the `store` callbacks, the cer
|
|||||||
will automatically be saved (and if you don't implement them, they all get saved to disk).
|
will automatically be saved (and if you don't implement them, they all get saved to disk).
|
||||||
|
|
||||||
```js
|
```js
|
||||||
return greenlock.renew({}).then(function(results) {
|
return greenlock.renew({}).then(function (results) {
|
||||||
results.forEach(function(site) {
|
results.forEach(function (site) {
|
||||||
if (site.error) {
|
if (site.error) {
|
||||||
console.error(site.subject, site.error);
|
console.error(site.subject, site.error);
|
||||||
return;
|
return;
|
||||||
@ -369,7 +375,7 @@ If you are implementing your own `manager` callbacks, I recommend that you mark
|
|||||||
```js
|
```js
|
||||||
gl.remove({
|
gl.remove({
|
||||||
subject: 'example.com'
|
subject: 'example.com'
|
||||||
}).then(function(siteConfig) {
|
}).then(function (siteConfig) {
|
||||||
// save the old site config elsewhere, just in case you need it again
|
// save the old site config elsewhere, just in case you need it again
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
@ -124,6 +124,7 @@ Init._init = function(opts) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//var mkdirp = promisify(require("@root/mkdirp"));
|
||||||
opts.configFile = path.join(
|
opts.configFile = path.join(
|
||||||
path.resolve(opts.packageRoot, opts.configDir),
|
path.resolve(opts.packageRoot, opts.configDir),
|
||||||
'config.json'
|
'config.json'
|
||||||
|
32
package-lock.json
generated
32
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@root/greenlock",
|
"name": "@root/greenlock",
|
||||||
"version": "4.0.5",
|
"version": "4.0.4",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -24,23 +24,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@root/acme": {
|
"@root/acme": {
|
||||||
"version": "3.1.0",
|
"version": "3.0.9",
|
||||||
"resolved": "https://registry.npmjs.org/@root/acme/-/acme-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@root/acme/-/acme-3.0.9.tgz",
|
||||||
"integrity": "sha512-GAyaW63cpSYd2KvVp5lHLbCWeEhJPKZK9nsJvZJOKsD9Uv88KEttn4FpDZEJ+2q3Jsey0DWpuQ2I4ft0JV9p2w==",
|
"integrity": "sha512-/FgJF6RUrkqNpLmxqjktHaWMsLOwma6D+e4EBoxKtTjTAI+dBqW8Z8cH38feUsiIBR5LimPeYmBo/oqU3oMkKQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@root/csr": "^0.8.1",
|
|
||||||
"@root/encoding": "^1.0.1",
|
"@root/encoding": "^1.0.1",
|
||||||
"@root/keypairs": "^0.10.0",
|
"@root/keypairs": "^0.9.0",
|
||||||
"@root/pem": "^1.0.4",
|
"@root/pem": "^1.0.4",
|
||||||
"@root/request": "^1.6.1",
|
"@root/request": "^1.3.11",
|
||||||
"@root/x509": "^0.7.2"
|
"@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": {
|
"@root/asn1": {
|
||||||
@ -67,9 +59,9 @@
|
|||||||
"integrity": "sha512-OaEub02ufoU038gy6bsNHQOjIn8nUjGiLcaRmJ40IUykneJkIW5fxDqKxQx48cszuNflYldsJLPPXCrGfHs8yQ=="
|
"integrity": "sha512-OaEub02ufoU038gy6bsNHQOjIn8nUjGiLcaRmJ40IUykneJkIW5fxDqKxQx48cszuNflYldsJLPPXCrGfHs8yQ=="
|
||||||
},
|
},
|
||||||
"@root/keypairs": {
|
"@root/keypairs": {
|
||||||
"version": "0.10.0",
|
"version": "0.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/@root/keypairs/-/keypairs-0.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/@root/keypairs/-/keypairs-0.9.0.tgz",
|
||||||
"integrity": "sha512-t8VocY46Mtb0NTsxzyLLf5tsgfw0BXLYVADAyiRdEdqHcvPFGJdjkXNtHVQuSV/FMaC65iTOHVP4E6X8iT3Ikg==",
|
"integrity": "sha512-NXE2L9Gv7r3iC4kB/gTPZE1vO9Ox/p14zDzAJ5cGpTpytbWOlWF7QoHSJbtVX4H7mRG/Hp7HR3jWdWdb2xaaXg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@root/encoding": "^1.0.1",
|
"@root/encoding": "^1.0.1",
|
||||||
"@root/pem": "^1.0.4",
|
"@root/pem": "^1.0.4",
|
||||||
@ -87,9 +79,9 @@
|
|||||||
"integrity": "sha512-rEUDiUsHtild8GfIjFE9wXtcVxeS+ehCJQBwbQQ3IVfORKHK93CFnRtkr69R75lZFjcmKYVc+AXDB+AeRFOULA=="
|
"integrity": "sha512-rEUDiUsHtild8GfIjFE9wXtcVxeS+ehCJQBwbQQ3IVfORKHK93CFnRtkr69R75lZFjcmKYVc+AXDB+AeRFOULA=="
|
||||||
},
|
},
|
||||||
"@root/request": {
|
"@root/request": {
|
||||||
"version": "1.6.1",
|
"version": "1.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/@root/request/-/request-1.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/@root/request/-/request-1.4.2.tgz",
|
||||||
"integrity": "sha512-8wrWyeBLRp7T8J36GkT3RODJ6zYmL0/maWlAUD5LOXT28D3TDquUepyYDKYANNA3Gc8R5ZCgf+AXvSTYpJEWwQ=="
|
"integrity": "sha512-J8FM4+SJuc7WRC+Jz17m+VT2lgI7HtatHhxN1F2ck5aIKUAxJEaR4u/gLBsgT60mVHevKCjKN0O8115UtJjwLw=="
|
||||||
},
|
},
|
||||||
"@root/x509": {
|
"@root/x509": {
|
||||||
"version": "0.7.2",
|
"version": "0.7.2",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@root/greenlock",
|
"name": "@root/greenlock",
|
||||||
"version": "4.0.5",
|
"version": "4.0.4",
|
||||||
"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",
|
||||||
@ -39,11 +39,11 @@
|
|||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@greenlock/manager": "^3.1.0",
|
"@greenlock/manager": "^3.1.0",
|
||||||
"@root/acme": "^3.1.0",
|
"@root/acme": "^3.0.9",
|
||||||
"@root/csr": "^0.8.1",
|
"@root/csr": "^0.8.1",
|
||||||
"@root/keypairs": "^0.10.0",
|
"@root/keypairs": "^0.9.0",
|
||||||
"@root/mkdirp": "^1.0.0",
|
"@root/mkdirp": "^1.0.0",
|
||||||
"@root/request": "^1.6.1",
|
"@root/request": "^1.4.2",
|
||||||
"acme-http-01-standalone": "^3.0.5",
|
"acme-http-01-standalone": "^3.0.5",
|
||||||
"cert-info": "^1.5.1",
|
"cert-info": "^1.5.1",
|
||||||
"greenlock-store-fs": "^3.2.2",
|
"greenlock-store-fs": "^3.2.2",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user