Skip to content

Commit 1171a6c

Browse files
Bump is-port-reachable from 3.1.0 to 4.0.0 in /.github/actions/compute-sdk-test (#242)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 7794452 commit 1171a6c

File tree

3 files changed

+49
-58
lines changed

3 files changed

+49
-58
lines changed

.github/actions/compute-sdk-test/dist/main.js

Lines changed: 37 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3009,43 +3009,6 @@ module.exports = (flag, argv = process.argv) => {
30093009
};
30103010

30113011

3012-
/***/ }),
3013-
3014-
/***/ 4157:
3015-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
3016-
3017-
"use strict";
3018-
3019-
const net = __nccwpck_require__(1631);
3020-
3021-
module.exports = async (port, {timeout = 1000, host} = {}) => {
3022-
const promise = new Promise(((resolve, reject) => {
3023-
const socket = new net.Socket();
3024-
3025-
const onError = () => {
3026-
socket.destroy();
3027-
reject();
3028-
};
3029-
3030-
socket.setTimeout(timeout);
3031-
socket.once('error', onError);
3032-
socket.once('timeout', onError);
3033-
3034-
socket.connect(port, host, () => {
3035-
socket.end();
3036-
resolve();
3037-
});
3038-
}));
3039-
3040-
try {
3041-
await promise;
3042-
return true;
3043-
} catch (_) {
3044-
return false;
3045-
}
3046-
};
3047-
3048-
30493012
/***/ }),
30503013

30513014
/***/ 467:
@@ -7098,14 +7061,6 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("https");
70987061

70997062
/***/ }),
71007063

7101-
/***/ 1631:
7102-
/***/ ((module) => {
7103-
7104-
"use strict";
7105-
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("net");
7106-
7107-
/***/ }),
7108-
71097064
/***/ 2087:
71107065
/***/ ((module) => {
71117066

@@ -7233,8 +7188,42 @@ var source = __nccwpck_require__(8818);
72337188
var better_logging = __nccwpck_require__(1269);
72347189
;// CONCATENATED MODULE: external "child_process"
72357190
const external_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("child_process");
7236-
// EXTERNAL MODULE: ./node_modules/is-port-reachable/index.js
7237-
var is_port_reachable = __nccwpck_require__(4157);
7191+
;// CONCATENATED MODULE: external "node:net"
7192+
const external_node_net_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:net");
7193+
;// CONCATENATED MODULE: ./node_modules/is-port-reachable/index.js
7194+
7195+
7196+
async function isPortReachable(port, {host, timeout = 1000} = {}) {
7197+
if (typeof host !== 'string') {
7198+
throw new TypeError('Specify a `host`');
7199+
}
7200+
7201+
const promise = new Promise(((resolve, reject) => {
7202+
const socket = new external_node_net_namespaceObject.Socket();
7203+
7204+
const onError = () => {
7205+
socket.destroy();
7206+
reject();
7207+
};
7208+
7209+
socket.setTimeout(timeout);
7210+
socket.once('error', onError);
7211+
socket.once('timeout', onError);
7212+
7213+
socket.connect(port, host, () => {
7214+
socket.end();
7215+
resolve();
7216+
});
7217+
}));
7218+
7219+
try {
7220+
await promise;
7221+
return true;
7222+
} catch {
7223+
return false;
7224+
}
7225+
}
7226+
72387227
;// CONCATENATED MODULE: ./src/kill-process-and-wait.js
72397228
// Kill a spawned process (e.g Viceroy), and (a)wait for it
72407229
// to be completely killed
@@ -7268,7 +7257,7 @@ async function timeout(millis, message) {
72687257
async function viceroyReady(viceroyHostname, viceroyPort) {
72697258
let isViceroyReady = false;
72707259
while (!isViceroyReady) {
7271-
isViceroyReady = await is_port_reachable(viceroyPort, {host: viceroyHostname});
7260+
isViceroyReady = await isPortReachable(viceroyPort, {host: viceroyHostname});
72727261
}
72737262
}
72747263

.github/actions/compute-sdk-test/package-lock.json

Lines changed: 11 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/compute-sdk-test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@actions/github": "^5.0.3",
1414
"better-logging": "^5.0.0",
1515
"chalk": "^4.1.2",
16-
"is-port-reachable": "^3.0.0",
16+
"is-port-reachable": "^4.0.0",
1717
"node-fetch": "^2.6.1"
1818
},
1919
"devDependencies": {

0 commit comments

Comments
 (0)