You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
830 B
31 lines
830 B
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.getFreePortAsync = getFreePortAsync;
|
|
function _freeportAsync() {
|
|
const data = _interopRequireDefault(require("freeport-async"));
|
|
_freeportAsync = function () {
|
|
return data;
|
|
};
|
|
return data;
|
|
}
|
|
function _internal() {
|
|
const data = require("../internal");
|
|
_internal = function () {
|
|
return data;
|
|
};
|
|
return data;
|
|
}
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
async function getFreePortAsync(rangeStart) {
|
|
const port = await (0, _freeportAsync().default)(rangeStart, {
|
|
hostnames: [null, 'localhost']
|
|
});
|
|
if (!port) {
|
|
throw new (_internal().XDLError)('NO_PORT_FOUND', 'No available port found');
|
|
}
|
|
return port;
|
|
}
|
|
//# sourceMappingURL=getFreePortAsync.js.map
|