lighten the load
This commit is contained in:
parent
24d1be590f
commit
ba7abf1897
|
@ -74,19 +74,17 @@ Install
|
|||
npm install --save greenlock@2.x
|
||||
```
|
||||
|
||||
<small>
|
||||
**Optional** dependency for *more efficient* RSA key generation:
|
||||
<small>(important for those on ARM devices like Raspberry Pi)</small>
|
||||
```bash
|
||||
npm install --save ursa
|
||||
```
|
||||
(important for those on ARM devices like Raspberry Pi)
|
||||
|
||||
**Optional** dependency for *Let's Encrypt v01* (pre-draft ACME spec) compatibility:
|
||||
<small>(important for those on ARM devices like Raspberry Pi)</small>
|
||||
```bash
|
||||
npm install --save le-acme-core
|
||||
```
|
||||
(important for those on ARM devices like Raspberry Pi)
|
||||
</small>
|
||||
|
||||
|
||||
### Production vs Staging
|
||||
|
|
8
index.js
8
index.js
|
@ -3,6 +3,12 @@
|
|||
var DAY = 24 * 60 * 60 * 1000;
|
||||
//var MIN = 60 * 1000;
|
||||
var ACME = require('acme-v2/compat').ACME;
|
||||
var PromiseA;
|
||||
try {
|
||||
PromiseA = require('bluebird');
|
||||
} catch(e) {
|
||||
PromiseA = global.Promise;
|
||||
}
|
||||
|
||||
var Greenlock = module.exports;
|
||||
Greenlock.Greenlock = Greenlock;
|
||||
|
@ -70,8 +76,6 @@ Greenlock._undefine = function (gl) {
|
|||
return gl;
|
||||
};
|
||||
Greenlock.create = function (gl) {
|
||||
var PromiseA = require('bluebird');
|
||||
|
||||
gl.store = gl.store || require('le-store-certbot').create({
|
||||
debug: gl.debug
|
||||
, configDir: gl.configDir
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
var PromiseA;
|
||||
try {
|
||||
PromiseA = require('bluebird');
|
||||
} catch(e) {
|
||||
PromiseA = global.Promise;
|
||||
}
|
||||
|
||||
function _log(debug) {
|
||||
if (debug) {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
|
@ -10,7 +17,6 @@ function _log(debug) {
|
|||
}
|
||||
|
||||
module.exports.create = function (gl) {
|
||||
var PromiseA = require('bluebird');
|
||||
var utils = require('./utils');
|
||||
var RSA = PromiseA.promisifyAll(require('rsa-compat').RSA);
|
||||
var log = gl.log || _log; // allow custom log
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "greenlock",
|
||||
"version": "2.2.20",
|
||||
"version": "2.3.0",
|
||||
"description": "Let's Encrypt for node.js on npm",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@ -57,9 +57,10 @@
|
|||
"devDependencies": {
|
||||
"request": "^2.75.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"trulyOptionalDependencies": {
|
||||
"bluebird": "^3.5.1",
|
||||
"le-acme-core": "^2.1.3"
|
||||
"le-acme-core": "^2.1.3",
|
||||
"ursa": "^0.9.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"acme": "^1.0.6",
|
||||
|
@ -71,7 +72,7 @@
|
|||
"le-store-certbot": "^2.1.0",
|
||||
"node.extend": "^1.1.5",
|
||||
"pkijs": "^1.3.27",
|
||||
"rsa-compat": "^1.3.2"
|
||||
"rsa-compat": "^1.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.5"
|
||||
|
|
Loading…
Reference in New Issue