create-servers
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -193,2 +193,6 @@ 'use strict'; | ||
function normalizeCertFile(root, file) { | ||
if (Array.isArray(file)) return file.map(function map(item) { | ||
return normalizeCertFile(root, item) | ||
}); | ||
// | ||
@@ -195,0 +199,0 @@ // Assumption that this is a Buffer, a PEM file, or something broken |
{ | ||
"name": "create-servers", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "Create an http AND/OR an https server and call the same request handler.", | ||
@@ -30,5 +30,5 @@ "main": "index.js", | ||
"devDependencies": { | ||
"sinon": "^1.17.4", | ||
"tape": "~4.6.0" | ||
"sinon": "^5.0.7", | ||
"tape": "~4.9.0" | ||
} | ||
} |
@@ -257,2 +257,22 @@ /* | ||
test('supports cert array instead of strings', function (t) { | ||
t.plan(3); | ||
var root = path.join(__dirname, 'fixtures'); | ||
createServers({ | ||
log: console.log, | ||
https: { | ||
port: 3456, | ||
root: root, | ||
cert: [fs.readFileSync(path.resolve(root, 'agent2-cert.pem'))], | ||
key: fs.readFileSync(path.resolve(root, 'agent2-key.pem')) | ||
}, | ||
handler: fend | ||
}, function (err, servers) { | ||
t.error(err); | ||
t.equals(typeof servers, 'object'); | ||
t.equals(typeof servers.https, 'object'); | ||
servers.https.close(); | ||
}); | ||
}); | ||
test('supports requestCert https option', function (t) { | ||
@@ -259,0 +279,0 @@ t.plan(2); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
19782
456
4
10