@@ -3009,43 +3009,6 @@ module.exports = (flag, argv = process.argv) => {
3009
3009
} ;
3010
3010
3011
3011
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
-
3049
3012
/***/ } ) ,
3050
3013
3051
3014
/***/ 467 :
@@ -7098,14 +7061,6 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("https");
7098
7061
7099
7062
/***/ } ) ,
7100
7063
7101
- /***/ 1631 :
7102
- /***/ ( ( module ) => {
7103
-
7104
- "use strict" ;
7105
- module . exports = __WEBPACK_EXTERNAL_createRequire ( import . meta. url ) ( "net" ) ;
7106
-
7107
- /***/ } ) ,
7108
-
7109
7064
/***/ 2087 :
7110
7065
/***/ ( ( module ) => {
7111
7066
@@ -7233,8 +7188,42 @@ var source = __nccwpck_require__(8818);
7233
7188
var better_logging = __nccwpck_require__ ( 1269 ) ;
7234
7189
; // CONCATENATED MODULE: external "child_process"
7235
7190
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
+
7238
7227
; // CONCATENATED MODULE: ./src/kill-process-and-wait.js
7239
7228
// Kill a spawned process (e.g Viceroy), and (a)wait for it
7240
7229
// to be completely killed
@@ -7268,7 +7257,7 @@ async function timeout(millis, message) {
7268
7257
async function viceroyReady ( viceroyHostname , viceroyPort ) {
7269
7258
let isViceroyReady = false ;
7270
7259
while ( ! isViceroyReady ) {
7271
- isViceroyReady = await is_port_reachable ( viceroyPort , { host : viceroyHostname } ) ;
7260
+ isViceroyReady = await isPortReachable ( viceroyPort , { host : viceroyHostname } ) ;
7272
7261
}
7273
7262
}
7274
7263
0 commit comments