mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-07 12:57:47 +00:00
[cli] Fix vc dev when user has ipv6 configured (#7956)
Running tests from #7455 - Fixes #7306 - Closes #7455
This commit is contained in:
@@ -137,7 +137,7 @@
|
|||||||
"ini": "3.0.0",
|
"ini": "3.0.0",
|
||||||
"inquirer": "7.0.4",
|
"inquirer": "7.0.4",
|
||||||
"is-docker": "2.2.1",
|
"is-docker": "2.2.1",
|
||||||
"is-port-reachable": "3.0.0",
|
"is-port-reachable": "3.1.0",
|
||||||
"is-url": "1.2.2",
|
"is-url": "1.2.2",
|
||||||
"jaro-winkler": "0.2.8",
|
"jaro-winkler": "0.2.8",
|
||||||
"jsonlines": "0.1.1",
|
"jsonlines": "0.1.1",
|
||||||
|
|||||||
@@ -2447,12 +2447,10 @@ function needsBlockingBuild(buildMatch: BuildMatch): boolean {
|
|||||||
return typeof builder.shouldServe !== 'function';
|
return typeof builder.shouldServe !== 'function';
|
||||||
}
|
}
|
||||||
|
|
||||||
async function checkForPort(
|
async function checkForPort(port: number, timeout: number): Promise<void> {
|
||||||
port: number | undefined,
|
const opts = { host: '127.0.0.1' };
|
||||||
timeout: number
|
|
||||||
): Promise<void> {
|
|
||||||
const start = Date.now();
|
const start = Date.now();
|
||||||
while (!(await isPortReachable(port))) {
|
while (!(await isPortReachable(port, opts))) {
|
||||||
if (Date.now() - start > timeout) {
|
if (Date.now() - start > timeout) {
|
||||||
throw new Error(`Detecting port ${port} timed out after ${timeout}ms`);
|
throw new Error(`Detecting port ${port} timed out after ${timeout}ms`);
|
||||||
}
|
}
|
||||||
|
|||||||
10
packages/cli/types/is-port-reachable/index.d.ts
vendored
10
packages/cli/types/is-port-reachable/index.d.ts
vendored
@@ -1,10 +0,0 @@
|
|||||||
declare module 'is-port-reachable' {
|
|
||||||
export interface IsPortReachableOptions {
|
|
||||||
timeout?: number | undefined;
|
|
||||||
host?: string;
|
|
||||||
}
|
|
||||||
export default function (
|
|
||||||
port: number | undefined,
|
|
||||||
options?: IsPortReachableOptions
|
|
||||||
): Promise<boolean>;
|
|
||||||
}
|
|
||||||
@@ -7640,10 +7640,10 @@ is-port-reachable@2.0.1:
|
|||||||
resolved "https://registry.yarnpkg.com/is-port-reachable/-/is-port-reachable-2.0.1.tgz#e0778d0733beac1ade3ba72a5fe77db50a59926b"
|
resolved "https://registry.yarnpkg.com/is-port-reachable/-/is-port-reachable-2.0.1.tgz#e0778d0733beac1ade3ba72a5fe77db50a59926b"
|
||||||
integrity sha512-SqU55C5gkitgOhl2ccd2v23MbkbcOFa5e4aPo8h8VGqOifh7iDwG44bQBWGW/lZulTjl9AWIKP0NiUWpa+TtWA==
|
integrity sha512-SqU55C5gkitgOhl2ccd2v23MbkbcOFa5e4aPo8h8VGqOifh7iDwG44bQBWGW/lZulTjl9AWIKP0NiUWpa+TtWA==
|
||||||
|
|
||||||
is-port-reachable@3.0.0:
|
is-port-reachable@3.1.0:
|
||||||
version "3.0.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-port-reachable/-/is-port-reachable-3.0.0.tgz#edf721e7d354e6e00cbeb0fc174ad89bdf6056b3"
|
resolved "https://registry.yarnpkg.com/is-port-reachable/-/is-port-reachable-3.1.0.tgz#f6668d3bca9c36b07f737c48a8f875ab0653cd2b"
|
||||||
integrity sha512-056IzLiWHdgVd6Eq1F9HtJl+cIkvi5X2MJ/A1fjQtByHkzQE1wGardnPhqrarOGDF88BOW+297X7PDvZ2vcyVg==
|
integrity sha512-vjc0SSRNZ32s9SbZBzGaiP6YVB+xglLShhgZD/FHMZUXBvQWaV9CtzgeVhjccFJrI6RAMV+LX7NYxueW/A8W5A==
|
||||||
|
|
||||||
is-promise@^2.1.0:
|
is-promise@^2.1.0:
|
||||||
version "2.2.2"
|
version "2.2.2"
|
||||||
|
|||||||
Reference in New Issue
Block a user