greenlock-express
Advanced tools
Comparing version
@@ -1,44 +0,3 @@ | ||
"use strict"; | ||
'use strict'; | ||
require("./lib/compat"); | ||
var cluster = require("cluster"); | ||
// Greenlock Express | ||
var GLE = module.exports; | ||
// Node's cluster is awesome, because it encourages writing scalable services. | ||
// | ||
// The point of this provide an API that is consistent between single-process | ||
// and multi-process services so that beginners can more easily take advantage | ||
// of what cluster has to offer. | ||
// | ||
// This API provides just enough abstraction to make it easy, but leaves just | ||
// enough hoopla so that there's not a large gap in understanding what happens | ||
// under the hood. That's the hope, anyway. | ||
GLE.init = function(fn) { | ||
if (cluster.isWorker) { | ||
// ignore the init function and launch the worker | ||
return require("./worker.js").create(); | ||
} | ||
var opts = fn(); | ||
if (!opts || "object" !== typeof opts) { | ||
throw new Error( | ||
"the `Greenlock.init(fn)` function should return an object `{ maintainerEmail, packageAgent, notify }`" | ||
); | ||
} | ||
// just for ironic humor | ||
["cloudnative", "cloudscale", "webscale", "distributed", "blockchain"].forEach(function(k) { | ||
if (opts[k]) { | ||
opts.cluster = true; | ||
} | ||
}); | ||
if (opts.cluster) { | ||
return require("./master.js").create(opts); | ||
} | ||
return require("./single.js").create(opts); | ||
}; | ||
module.exports = require('@root/greenlock-express'); |
{ | ||
"name": "greenlock-express", | ||
"version": "3.0.10", | ||
"version": "3.0.11", | ||
"description": "Free SSL and managed or automatic HTTPS for node.js with Express, Koa, Connect, Hapi, and all other middleware systems.", | ||
@@ -21,2 +21,3 @@ "main": "greenlock-express.js", | ||
"@root/greenlock": "^3.0.17", | ||
"@root/greenlock-express": "^3.0.11", | ||
"redirect-https": "^1.1.5" | ||
@@ -23,0 +24,0 @@ }, |
@@ -118,3 +118,3 @@ # New Documentation & [v2/v3 Migration Guide](https://git.rootprojects.org/root/greenlock.js/src/branch/v3/MIGRATION_GUIDE_V2_V3.md) | ||
This example is shown with Express, but any node app will doGreenlock | ||
This example is shown with Express, but any node app will do. Greenlock | ||
works with everything. | ||
@@ -121,0 +121,0 @@ (or any node-style http app) |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 4 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
0
-100%2
-66.67%30647
-51.06%3
50%4
-76.47%2
-99.8%+ Added