diff --git a/.travis.yml b/.travis.yml index f3fa8cd..94ab01f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ language: node_js node_js: + - '12' - '10' - - '8' diff --git a/cli.js b/cli.js index e8d28d3..e23be12 100755 --- a/cli.js +++ b/cli.js @@ -3,6 +3,7 @@ const meow = require('meow'); const logSymbols = require('log-symbols'); const isUp = require('is-up'); +const prependHttp = require('prepend-http'); const cli = meow(` Example @@ -18,7 +19,7 @@ if (cli.input.length === 0) { } (async () => { - const up = await isUp(cli.input[0]); + const up = await isUp(prependHttp(cli.input[0])); console.log(up ? `${logSymbols.success} Up` : `${logSymbols.error} Down`); - process.exit(up ? 0 : 2); + process.exitCode = up ? 0 : 2; })(); diff --git a/package.json b/package.json index 79ce8c2..8ee8130 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "Check whether a website is up or down", "license": "MIT", "repository": "sindresorhus/is-up-cli", + "funding": "https://github.com/sponsors/sindresorhus", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -13,7 +14,7 @@ "is-up": "cli.js" }, "engines": { - "node": ">=8" + "node": ">=10" }, "scripts": { "test": "xo && ava" @@ -35,14 +36,15 @@ "offline" ], "dependencies": { - "is-up": "^3.0.0", - "log-symbols": "^2.2.0", - "meow": "^5.0.0" + "is-up": "^4.0.0", + "log-symbols": "^3.0.0", + "meow": "^6.0.0", + "prepend-http": "^3.0.1" }, "devDependencies": { - "ava": "^0.25.0", - "execa": "^1.0.0", - "strip-ansi": "^5.0.0", - "xo": "^0.23.0" + "ava": "^1.0.0", + "execa": "^4.0.0", + "strip-ansi": "^6.0.0", + "xo": "^0.25.4" } } diff --git a/readme.md b/readme.md index 0432b3e..4d0ff05 100644 --- a/readme.md +++ b/readme.md @@ -4,14 +4,12 @@ - ## Install ``` $ npm install --global is-up-cli ``` - ## Usage ``` @@ -24,12 +22,6 @@ $ is-up --help Exits with code 0 if up and 2 if down ``` - ## Related - [is-up](https://github.com/sindresorhus/is-up) - API for this module - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com)