ssl-checker
Advanced tools
Comparing version 1.2.1 to 2.0.0
{ | ||
"name": "ssl-checker", | ||
"version": "1.2.1", | ||
"version": "2.0.0", | ||
"description": "ssl-checker", | ||
"main": "index.js", | ||
"main": "./lib/cmjs/index.js", | ||
"module": "./lib/cmjs/index.js", | ||
"es2015": "./lib/es2015/index.js", | ||
"unpkg": "./lib/umd/index.js", | ||
"types": "./lib/index.d.ts", | ||
"scripts": { | ||
"lint": "eslint .", | ||
"test": "mocha --reporter spec --require babel-register", | ||
"posttest": "npm run lint" | ||
"test": "jest --config jestconfig.json", | ||
"test:coverage": "jest --coverage --config=jestconfig.json && cat ./coverage/lcov.info | codacy-coverage -v", | ||
"build": "yarn build:es2015 && yarn build:umd && yarn build:cmjs", | ||
"build:es2015": "tsc --module es2015 --outDir lib/es2015", | ||
"build:umd": "tsc --module umd --outDir lib/umd", | ||
"build:cmjs": "tsc --module commonjs --outDir lib/cmjs", | ||
"lint": "tslint -p tsconfig.json", | ||
"format": "prettier --write '**/*.{ts,md}'", | ||
"precommit": "pretty-quick --staged", | ||
"prepare": "npm run build", | ||
"prepublishOnly": "npm test && npm run lint", | ||
"preversion": "npm run lint", | ||
"version": "npm run format && git add -A src", | ||
"postversion": "git push && git push --tags" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/dyaa/node-ssl-checker.git" | ||
"url": "git+https://github.com/dyaa/ssl-checker.git" | ||
}, | ||
@@ -22,13 +37,19 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/dyaa/node-ssl-checker/issues" | ||
"url": "https://github.com/dyaa/ssl-checker/issues" | ||
}, | ||
"homepage": "https://github.com/dyaa/node-ssl-checker#readme", | ||
"homepage": "https://github.com/dyaa/ssl-checker#readme", | ||
"devDependencies": { | ||
"babel-core": "^6.24.1", | ||
"babel-eslint": "^9.0.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"chai": "^4.1.0", | ||
"eslint": "^5.6.0", | ||
"mocha": "^5.2.0" | ||
"@types/jest": "^24.0.18", | ||
"@types/node": "^12.7.11", | ||
"codacy-coverage": "^3.4.0", | ||
"codecov": "^3.5.0", | ||
"jest": "^24.9.0", | ||
"jest-extended": "^0.11.2", | ||
"prettier": "^1.18.2", | ||
"pretty-quick": "^1.11.1", | ||
"ts-jest": "^24.0.2", | ||
"tslint": "^5.20.0", | ||
"tslint-config-prettier": "^1.18.0", | ||
"typescript": "^3.6.3" | ||
} | ||
} |
# Node SSL Checker | ||
[![wercker status](https://app.wercker.com/status/d9c8e99c45ac59552e86375ac942697b/s/master "wercker status")](https://app.wercker.com/project/byKey/d9c8e99c45ac59552e86375ac942697b) [![npm version](https://badge.fury.io/js/ssl-checker.svg)](https://badge.fury.io/js/ssl-checker) [![npm](https://img.shields.io/npm/dt/ssl-checker.svg)](https://github.com/dyaa/node-ssl-checker) | ||
[![Build Status](https://github.com/dyaa/ssl-checker/workflows/test-sslChecker/badge.svg)](https://github.com/dyaa/ssl-checker/actions) | ||
[![npm version](https://badge.fury.io/js/ssl-checker.svg)](https://badge.fury.io/js/ssl-checker) [![npm](https://img.shields.io/npm/dt/ssl-checker.svg)](https://github.com/dyaa/node-ssl-checker) | ||
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4544a598aa6b4bc99883ef655e1dd90f)](https://www.codacy.com/manual/dyaa/node-ssl-checker?utm_source=github.com&utm_medium=referral&utm_content=dyaa/node-ssl-checker&utm_campaign=Badge_Grade) | ||
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/4544a598aa6b4bc99883ef655e1dd90f)](https://www.codacy.com/manual/dyaa/node-ssl-checker?utm_source=github.com&utm_medium=referral&utm_content=dyaa/node-ssl-checker&utm_campaign=Badge_Coverage) | ||
## Installation | ||
Simply add `ssl-checker` as a dependency: | ||
```bash | ||
$ npm install ssl-checker --save # npm i -s ssh-checker | ||
$ npm install ssl-checker --save # npm i -s ssl-checker | ||
# Or if you are using yarn (https://yarnpkg.com/lang/en/) | ||
# Or if you prefer using yarn (https://yarnpkg.com/lang/en/) | ||
$ yarn add ssl-checker | ||
@@ -16,34 +21,29 @@ ``` | ||
```javascript | ||
import sslChecker from 'ssl-checker'; | ||
```ts | ||
import sslChecker from "ssl-checker"; | ||
sslChecker("github.com").then(console.log).catch(console.error); | ||
sslChecker("github").then(console.log).catch((err) => { | ||
if (err.code === 'ENOTFOUND') { | ||
console.log("Please get back only or fix hostname"); | ||
} else { | ||
console.error(err); | ||
} | ||
}); | ||
const getSslDetails = async (hostname: string) => | ||
await sslChecker(hostname`ex. badssl.com`); | ||
``` | ||
## Options | ||
| Option | Default | | | ||
| ------ | -------- | ----------------------- | | ||
| Host | Required | your host *ex. github.com* | | ||
| Method | HEAD | can be GET too | | ||
| Port | 443 | Your ssl port number | | ||
```javascript | ||
var sslChecker = require("ssl-checker") | ||
sslChecker('dyaa.me', 'GET', 443).then(result => console.info(result)); | ||
| Option | Default | | | ||
| ------ | ------- | -------------------------------------------------- | | ||
| method | HEAD | can be GET too | | ||
| port | 443 | Your ssl entrypoint | | ||
| agent | HEAD | I dont know why but if you'd like provide agent id | | ||
```ts | ||
sslChecker("dyaa.me", { method: "GET", port: 443 }).then(console.info); | ||
``` | ||
## Response Example | ||
```json | ||
{ | ||
"valid": true, | ||
"days_remaining" : 90, | ||
"valid_from" : "issue date", | ||
"valid_to" : "expiry date" | ||
"days_remaining": 90, | ||
"valid": true, | ||
"valid_from": "issue date", | ||
"valid_to": "expiry date" | ||
} | ||
@@ -54,6 +54,5 @@ ``` | ||
Copylefted (c) 2018 [Dyaa Eldin Moustafa][1] Licensed under the [MIT license][2]. | ||
Copylefted (c) 8008 :trollface: [Dyaa Eldin Moustafa][1] Licensed under the [MIT license][2]. | ||
[1]: https://dyaa.me/ | ||
[2]: https://github.com/dyaa/node-ssl-checker/blob/master/LICENSE | ||
[1]: https://dyaa.me/ | ||
[2]: https://github.com/dyaa/node-ssl-checker/blob/master/LICENSE |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
9955
172
12
57