@art-ws/ssl-info 1.0.5 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,10 +6,21 @@ CLI wrapper over [Node SSL Checker](https://github.com/dyaa/ssl-checker).
6
6
 
7
7
  * Print to console JSON response or specific value (daysRemaining, valid, validFrom, validTo, validFor).
8
8
 
9
- ## Examples
9
+
10
+ ## Install
10
11
 
11
12
  ```bash
13
+ sudo npm -g install @art-ws/ssl-info
14
+
15
+ # Check installation
12
16
  ssl-info --help
17
+ ssl-info --version
18
+ ```
19
+
20
+ ## Examples
21
+
22
+ ```bash
23
+
13
24
  ssl-info google.com
14
25
  ssl-info google.com daysRemaining
15
26
  ```
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const { main } = require("../main.js")
3
+ const { main } = require("./index.js")
4
4
 
5
5
  main().catch((e) => {
6
6
  console.error(e)
@@ -24,12 +24,14 @@ async function main() {
24
24
  .example(`${app} google.com daysRemaining`, "")
25
25
 
26
26
  const hostname = argv.hostname || argv._[0]
27
- const prop = argv.hostname || argv._[1]
28
- const info = await sslChecker(hostname)
29
- if (prop) {
30
- console.log(info[prop])
31
- } else {
32
- console.log(JSON.stringify(info))
27
+ if (hostname) {
28
+ const prop = argv.hostname || argv._[1]
29
+ const info = await sslChecker(hostname)
30
+ if (prop) {
31
+ console.log(info[prop])
32
+ } else {
33
+ console.log(JSON.stringify(info))
34
+ }
33
35
  }
34
36
  }
35
37
 
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@art-ws/ssl-info",
3
- "version": "1.0.5",
3
+ "version": "1.0.8",
4
4
  "description": "Node SSL Checker",
5
5
  "homepage": "https://github.com/art-ws/ssl-info",
6
+ "main": "index.js",
6
7
  "license": "MIT",
7
8
  "bin": {
8
- "ssl-info": "bin/index.js"
9
+ "ssl-info": "./cli.js"
9
10
  },
10
11
  "files": [
11
- "bin",
12
12
  "*.js"
13
13
  ],
14
14
  "author": {