detect-port
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -9,5 +9,9 @@ "use strict"; | ||
const node_util_1 = require("node:util"); | ||
const promises_1 = require("node:timers/promises"); | ||
const detect_port_js_1 = __importDefault(require("./detect-port.js")); | ||
const debug = (0, node_util_1.debuglog)('detect-port:wait-port'); | ||
function sleep(ms) { | ||
return new Promise(resolve => { | ||
setTimeout(resolve, ms); | ||
}); | ||
} | ||
class WaitPortRetryError extends Error { | ||
@@ -37,3 +41,3 @@ retries; | ||
if (freePort === port) { | ||
await (0, promises_1.setTimeout)(retryInterval); | ||
await sleep(retryInterval); | ||
return loop(); | ||
@@ -45,2 +49,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FpdC1wb3J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3dhaXQtcG9ydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUF3QkEsNEJBb0JDO0FBNUNELHlDQUFxQztBQUNyQyxtREFBMkQ7QUFDM0Qsc0VBQTBDO0FBRTFDLE1BQU0sS0FBSyxHQUFHLElBQUEsb0JBQVEsRUFBQyx1QkFBdUIsQ0FBQyxDQUFDO0FBRWhELE1BQWEsa0JBQW1CLFNBQVEsS0FBSztJQUMzQyxPQUFPLENBQVM7SUFDaEIsS0FBSyxDQUFTO0lBRWQsWUFBWSxPQUFlLEVBQUUsT0FBZSxFQUFFLEtBQWEsRUFBRSxPQUFzQjtRQUNqRixLQUFLLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO1FBQ3hCLElBQUksQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUM7UUFDbEMsSUFBSSxDQUFDLE9BQU8sR0FBRyxPQUFPLENBQUM7UUFDdkIsSUFBSSxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUM7U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xJQUFJLEtBQUssR0FBRyxDQUFDLENBQUM7SUFFZCxLQUFLLFVBQVUsSUFBSTtRQUNqQixLQUFLLENBQUMsb0NBQW9DLEVBQUUsSUFBSSxFQUFFLE9BQU8sRUFBRSxLQUFLLENBQUMsQ0FBQztRQUNsRSxJQUFJLEtBQUssR0FBRyxPQUFPLEVBQUUsQ0FBQztZQUNwQixNQUFNLEdBQUcsR0FBRyxJQUFJLGtCQUFrQixDQUFDLGtCQUFrQixFQUFFLE9BQU8sRUFBRSxLQUFLLENBQUMsQ0FBQztZQUN2RSxNQUFNLEdBQUcsQ0FBQztRQUNaLENBQUM7UUFDRCxLQUFLLEVBQUUsQ0FBQztRQUNSLE1BQU0sUUFBUSxHQUFHLE1BQU0sSUFBQSx3QkFBVSxFQUFDLElBQUksQ0FBQyxDQUFDO1FBQ3hDLElBQUksUUFBUSxLQUFLLElBQUksRUFBRSxDQUFDO1lBQ3RCLE1BQU0sS0FBSyxDQUFDLGFBQWEsQ0FBQyxDQUFDO1lBQzNCLE9BQU8sSUFBSSxFQUFFLENBQUM7UUFDaEIsQ0FBQztRQUNELE9BQU8sSUFBSSxDQUFDO0lBQ2QsQ0FBQztJQUVELE9BQU8sTUFBTSxJQUFJLEVBQUUsQ0FBQztBQUN0QixDQUFDIn0= |
import { debuglog } from 'node:util'; | ||
import { setTimeout as sleep } from 'node:timers/promises'; | ||
import detectPort from './detect-port.js'; | ||
const debug = debuglog('detect-port:wait-port'); | ||
function sleep(ms) { | ||
return new Promise(resolve => { | ||
setTimeout(resolve, ms); | ||
}); | ||
} | ||
export class WaitPortRetryError extends Error { | ||
@@ -35,2 +39,2 @@ retries; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FpdC1wb3J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3dhaXQtcG9ydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFB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ENBQUMsSUFBSSxDQUFDLENBQUM7UUFDeEMsSUFBSSxRQUFRLEtBQUssSUFBSSxFQUFFLENBQUM7WUFDdEIsTUFBTSxLQUFLLENBQUMsYUFBYSxDQUFDLENBQUM7WUFDM0IsT0FBTyxJQUFJLEVBQUUsQ0FBQztRQUNoQixDQUFDO1FBQ0QsT0FBTyxJQUFJLENBQUM7SUFDZCxDQUFDO0lBRUQsT0FBTyxNQUFNLElBQUksRUFBRSxDQUFDO0FBQ3RCLENBQUMifQ== |
{ | ||
"name": "detect-port", | ||
"version": "2.0.0" | ||
"version": "2.0.1" | ||
} |
{ | ||
"name": "detect-port", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Node.js implementation of port detector", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
import { debuglog } from 'node:util'; | ||
import { setTimeout as sleep } from 'node:timers/promises'; | ||
import detectPort from './detect-port.js'; | ||
@@ -7,2 +6,8 @@ | ||
function sleep(ms: number) { | ||
return new Promise(resolve => { | ||
setTimeout(resolve, ms); | ||
}); | ||
} | ||
export class WaitPortRetryError extends Error { | ||
@@ -9,0 +14,0 @@ retries: number; |
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
52597
764
0