lighten the load

This commit is contained in:
AJ ONeal 2018-06-29 02:51:35 -06:00
parent 24d1be590f
commit ba7abf1897
4 changed files with 20 additions and 11 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"