Comparing version 0.0.12 to 0.0.13
16
index.js
@@ -52,2 +52,3 @@ 'use strict'; | ||
method: 'GET', | ||
host: urlInfo.hostname, | ||
hostname: urlInfo.hostname, | ||
@@ -65,3 +66,2 @@ path: urlInfo.pathname | ||
socket.end(); | ||
const peerCertificate = socket.getPeerCertificate(true); | ||
@@ -82,3 +82,3 @@ if(Object.keys(peerCertificate).length !== 0) { | ||
const _op = {}; | ||
for(var i in opts) { | ||
for(let i in opts) { | ||
if (i !== 'port' || i !== 'hostname') { | ||
@@ -88,3 +88,2 @@ _op[i] = opts[i]; | ||
} | ||
const socket = tls.connect( | ||
@@ -97,3 +96,3 @@ opts.port, | ||
socket.on('error', (error) => { | ||
socket.on('error', error => { | ||
reject(error); | ||
@@ -180,5 +179,8 @@ }); | ||
let defaults = requestOptions(requestUrl, { protocol: 'https', port: 443, }); | ||
delete defaults.method; | ||
let defaults = requestOptions(requestUrl, { port: 443, }); | ||
['method', 'path'].map(v => { | ||
if (defaults[v]) { | ||
delete defaults[v] | ||
} | ||
}); | ||
const options = Object.assign(defaults, opts); | ||
@@ -185,0 +187,0 @@ const promise = tlsInformation(options); |
{ | ||
"name": "page-data", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "simple page data get client tool", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
259508
5
7485
4