Comparing version 0.1.0 to 0.2.0
@@ -11,3 +11,3 @@ | ||
var table = new Table({ | ||
head: ['Remote', 'Status', 'Delay'] | ||
head: ['URI', 'Method', 'Status', 'Delay'] | ||
}); | ||
@@ -44,3 +44,3 @@ | ||
} | ||
table.push([remotes[i].fullUrl(), resultText, result.delay + 'ms']) | ||
table.push([remotes[i].fullUrl(), remotes[i].method(), resultText, result.delay + 'ms']) | ||
} | ||
@@ -47,0 +47,0 @@ } |
{ | ||
"name": "crow", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "a remote URL tester for the terminal", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
113
README.md
@@ -9,63 +9,64 @@ | ||
## Installation | ||
``` | ||
~ npm install -g crow | ||
~ crow remotes.json | ||
┌──────────────────────────────┬────────┬─────────────────────────────────┬────────┐ | ||
│ URI │ Method │ Status │ Delay │ | ||
├──────────────────────────────┼────────┼─────────────────────────────────┼────────┤ | ||
│ https://arkhaios.net:443/ │ GET │ UNABLE_TO_VERIFY_LEAF_SIGNATURE │ 312ms │ | ||
├──────────────────────────────┼────────┼─────────────────────────────────┼────────┤ | ||
│ https://elipsis.io:443/login │ POST │ Error: HTTP 403 │ 698ms │ | ||
├──────────────────────────────┼────────┼─────────────────────────────────┼────────┤ | ||
│ https://google.com:443/ │ GET │ ok │ 2624ms │ | ||
├──────────────────────────────┼────────┼─────────────────────────────────┼────────┤ | ||
│ http://google.com:80/ │ GET │ ok │ 1575ms │ | ||
├──────────────────────────────┼────────┼─────────────────────────────────┼────────┤ | ||
│ http://nowhere:80/ │ GET │ getaddrinfo ENOTFOUND │ 33ms │ | ||
└──────────────────────────────┴────────┴─────────────────────────────────┴────────┘ | ||
``` | ||
npm i -g crow | ||
The URLs are alphabetically ordered by domain, port and path | ||
## Config file | ||
```remotes.json``` | ||
File ```remotes.json``` | ||
[ | ||
{ | ||
"protocol": "https", | ||
"domain": "google.com", | ||
"port": 443, | ||
"path": "/" | ||
}, { | ||
"protocol": "http", | ||
"domain": "google.com", | ||
"port": 80, | ||
"path": "/" | ||
}, { | ||
"protocol": "https", | ||
"domain": "arkhaios.net", | ||
"port": 443, | ||
"path": "/" | ||
}, { | ||
"protocol": "http", | ||
"domain": "nowhere", | ||
"port": 80, | ||
"path": "/" | ||
}, { | ||
"protocol": "https", | ||
"domain": "elipsis.io", | ||
"port": 443, | ||
"path": "/login", | ||
"method": "POST", | ||
"headers": { | ||
"Content-Type": "application/json" | ||
}, | ||
"body": { | ||
"email": "hello@elipsis.io", | ||
"password": "123456" | ||
} | ||
``` | ||
[ | ||
{ | ||
"protocol": "https", | ||
"domain": "google.com", | ||
"port": 443, | ||
"path": "/" | ||
}, { | ||
"protocol": "http", | ||
"domain": "google.com", | ||
"port": 80, | ||
"path": "/" | ||
}, { | ||
"protocol": "https", | ||
"domain": "arkhaios.net", | ||
"port": 443, | ||
"path": "/" | ||
}, { | ||
"protocol": "http", | ||
"domain": "nowhere", | ||
"port": 80, | ||
"path": "/" | ||
}, { | ||
"protocol": "https", | ||
"domain": "elipsis.io", | ||
"port": 443, | ||
"path": "/login", | ||
"method": "POST", | ||
"headers": { | ||
"Content-Type": "application/json" | ||
}, | ||
"body": { | ||
"email": "hello@elipsis.io", | ||
"password": "123456" | ||
} | ||
] | ||
## Example | ||
➜ ~ crow remotes.json | ||
┌──────────────────────────────┬─────────────────────────────────┬────────┐ | ||
│ Remote │ Status │ Delay │ | ||
├──────────────────────────────┼─────────────────────────────────┼────────┤ | ||
│ https://arkhaios.net:443/ │ UNABLE_TO_VERIFY_LEAF_SIGNATURE │ 187ms │ | ||
├──────────────────────────────┼─────────────────────────────────┼────────┤ | ||
│ https://elipsis.io:443/login │ Error: HTTP 500 │ 360ms │ | ||
├──────────────────────────────┼─────────────────────────────────┼────────┤ | ||
│ https://google.com:443/ │ ok │ 2755ms │ | ||
├──────────────────────────────┼─────────────────────────────────┼────────┤ | ||
│ http://google.com:80/ │ ok │ 1649ms │ | ||
├──────────────────────────────┼─────────────────────────────────┼────────┤ | ||
│ http://nowhere:80/ │ getaddrinfo ENOTFOUND │ 31ms │ | ||
└──────────────────────────────┴─────────────────────────────────┴────────┘ | ||
} | ||
] | ||
``` |
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
11847
72