wait-for-localhost
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -1,18 +0,41 @@ | ||
export interface Options { | ||
declare namespace waitForLocalhost { | ||
export interface Options { | ||
/** | ||
@default 80 | ||
*/ | ||
port?: number; | ||
/** | ||
Use the `GET` HTTP-method instead of `HEAD` to check if the server is running. | ||
@default false | ||
*/ | ||
useGet?: boolean; | ||
} | ||
} | ||
declare const waitForLocalhost: { | ||
/** | ||
* @default 80 | ||
*/ | ||
port?: number; | ||
Wait for localhost to be ready. | ||
/** | ||
* Use the `GET` HTTP-method instead of `HEAD` to check if the server is running. | ||
* | ||
* @default false | ||
@example | ||
``` | ||
import waitForLocalhost = require('wait-for-localhost'); | ||
(async () => { | ||
await waitForLocalhost({port: 8080}); | ||
console.log('Server is ready'); | ||
})(); | ||
``` | ||
*/ | ||
useGet?: boolean; | ||
} | ||
(options?: waitForLocalhost.Options): Promise<void>; | ||
/** | ||
* Wait for localhost to be ready. | ||
*/ | ||
export default function waitForLocalhost(options?: Options): Promise<void>; | ||
// TODO: Remove this for the next major release, refactor the whole definition to: | ||
// declare function waitForLocalhost( | ||
// options?: waitForLocalhost.Options | ||
// ): Promise<void>; | ||
// export = waitForLocalhost; | ||
default: typeof waitForLocalhost; | ||
}; | ||
export = waitForLocalhost; |
@@ -30,2 +30,3 @@ 'use strict'; | ||
module.exports = waitForLocalhost; | ||
// TODO: Remove this for the next major release | ||
module.exports.default = waitForLocalhost; |
{ | ||
"name": "wait-for-localhost", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "Wait for localhost to be ready", | ||
@@ -16,3 +16,3 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "xo && ava && tsd-check" | ||
"test": "xo && ava && tsd" | ||
}, | ||
@@ -33,8 +33,8 @@ "files": [ | ||
"devDependencies": { | ||
"ava": "^1.2.1", | ||
"create-test-server": "^2.1.1", | ||
"ava": "^1.4.1", | ||
"create-test-server": "^2.4.0", | ||
"delay": "^4.1.0", | ||
"tsd-check": "^0.3.0", | ||
"tsd": "^0.7.2", | ||
"xo": "^0.24.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4350
57