is-ovhcloud-down
Advanced tools
Comparing version 2.0.1 to 3.0.0
29
cli.js
#!/usr/bin/env node | ||
'use strict'; | ||
const meow = require('meow'); | ||
const got = require('got'); | ||
import process from 'node:process'; | ||
import meow from 'meow'; | ||
import got from 'got'; | ||
@@ -10,9 +10,20 @@ meow(` | ||
🦄 It's down. Go outside! | ||
`); | ||
`, { | ||
importMeta: import.meta, | ||
}); | ||
got.head('ovhcloud.com').then(() => { | ||
(async () => { | ||
const {statusCode} = await got('https://ovhcloud.com', { | ||
timeout: 10_000, | ||
retry: 2, | ||
}); | ||
if (statusCode !== 200) { | ||
console.log('\n🦄 It\'s down!'); | ||
process.exitCode = 1; | ||
return; | ||
} | ||
console.error('\n 🐈 It\'s up!'); | ||
process.exitCode = 1; | ||
}).catch(() => { | ||
console.log('\n🦄 It\'s down!'); | ||
}); | ||
process.exitCode = 0; | ||
})(); |
{ | ||
"name": "is-ovhcloud-down", | ||
"version": "2.0.1", | ||
"version": "3.0.0", | ||
"description": "Check if OVHcloud is down", | ||
@@ -9,8 +9,8 @@ "license": "MIT", | ||
"name": "Antoine Leblanc", | ||
"email": "ant.leblanc@gmail.com", | ||
"url": "antleblanc.me" | ||
"email": "ant.leblanc@gmail.com" | ||
}, | ||
"bin": "cli.js", | ||
"type": "module", | ||
"bin": "./cli.js", | ||
"engines": { | ||
"node": ">=10" | ||
"node": ">=16.0.0" | ||
}, | ||
@@ -33,10 +33,10 @@ "scripts": { | ||
"dependencies": { | ||
"got": "^11.0.1", | ||
"meow": "^6.1.0" | ||
"got": "^11.8.2", | ||
"meow": "^10.1.1" | ||
}, | ||
"devDependencies": { | ||
"ava": "^2.4.0", | ||
"execa": "^0.6.0", | ||
"xo": "^0.30.0" | ||
"ava": "^3.15.0", | ||
"execa": "^5.1.1", | ||
"xo": "^0.45.0" | ||
} | ||
} |
2940
24
Yes
+ Addedcamelcase@6.3.0(transitive)
+ Addedcamelcase-keys@7.0.2(transitive)
+ Addeddecamelize@5.0.1(transitive)
+ Addedfind-up@5.0.0(transitive)
+ Addedhosted-git-info@4.1.0(transitive)
+ Addedindent-string@5.0.0(transitive)
+ Addedlocate-path@6.0.0(transitive)
+ Addedlru-cache@6.0.0(transitive)
+ Addedmeow@10.1.5(transitive)
+ Addednormalize-package-data@3.0.3(transitive)
+ Addedp-limit@3.1.0(transitive)
+ Addedp-locate@5.0.0(transitive)
+ Addedread-pkg@6.0.0(transitive)
+ Addedread-pkg-up@8.0.0(transitive)
+ Addedredent@4.0.0(transitive)
+ Addedsemver@7.7.1(transitive)
+ Addedstrip-indent@4.0.0(transitive)
+ Addedtrim-newlines@4.1.1(transitive)
+ Addedtype-fest@1.4.0(transitive)
+ Addedyallist@4.0.0(transitive)
+ Addedyargs-parser@20.2.9(transitive)
+ Addedyocto-queue@0.1.0(transitive)
- Removedcamelcase@5.3.1(transitive)
- Removedcamelcase-keys@6.2.2(transitive)
- Removedfind-up@4.1.0(transitive)
- Removedhosted-git-info@2.8.9(transitive)
- Removedindent-string@4.0.0(transitive)
- Removedlocate-path@5.0.0(transitive)
- Removedmeow@6.1.1(transitive)
- Removednormalize-package-data@2.5.0(transitive)
- Removedp-limit@2.3.0(transitive)
- Removedp-locate@4.1.0(transitive)
- Removedp-try@2.2.0(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedquick-lru@4.0.1(transitive)
- Removedread-pkg@5.2.0(transitive)
- Removedread-pkg-up@7.0.1(transitive)
- Removedredent@3.0.0(transitive)
- Removedresolve@1.22.10(transitive)
- Removedsemver@5.7.2(transitive)
- Removedstrip-indent@3.0.0(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedtrim-newlines@3.0.1(transitive)
- Removedtype-fest@0.13.10.6.00.8.1(transitive)
- Removedyargs-parser@18.1.3(transitive)
Updatedgot@^11.8.2
Updatedmeow@^10.1.1