linkinator
Advanced tools
Comparing version 2.14.3 to 2.14.4
@@ -40,3 +40,3 @@ "use strict"; | ||
if (!hasHttpPaths) { | ||
const port = options.port || 5000 + Math.round(Math.random() * 1000); | ||
let port = options.port; | ||
server = await server_1.startWebServer({ | ||
@@ -48,2 +48,6 @@ root: options.serverRoot, | ||
}); | ||
if (port === undefined) { | ||
const addr = server.address(); | ||
port = addr.port; | ||
} | ||
for (let i = 0; i < options.path.length; i++) { | ||
@@ -50,0 +54,0 @@ if (options.path[i].startsWith('/')) { |
@@ -5,3 +5,3 @@ /// <reference types="node" /> | ||
root: string; | ||
port: number; | ||
port?: number; | ||
markdown?: boolean; | ||
@@ -8,0 +8,0 @@ directoryListing?: boolean; |
@@ -26,4 +26,8 @@ "use strict"; | ||
.createServer((req, res) => handleRequest(req, res, root, options)) | ||
.listen(options.port, () => resolve(server)) | ||
.listen(options.port || 0, () => resolve(server)) | ||
.on('error', reject); | ||
if (!options.port) { | ||
const addr = server.address(); | ||
options.port = addr.port; | ||
} | ||
enableDestroy(server); | ||
@@ -30,0 +34,0 @@ }); |
{ | ||
"name": "linkinator", | ||
"description": "Find broken links, missing images, etc in your HTML. Scurry around your site and find all those broken links.", | ||
"version": "2.14.3", | ||
"version": "2.14.4", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "repository": "JustinBeckwith/linkinator", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
98303
1347