@npmcli/agent
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -65,3 +65,3 @@ 'use strict' | ||
if (Array.isArray(ProxyAgent)) { | ||
ProxyAgent = options.secureEndpoint ? ProxyAgent[1] : ProxyAgent[0] | ||
ProxyAgent = this.isSecureEndpoint(options) ? ProxyAgent[1] : ProxyAgent[0] | ||
} | ||
@@ -110,2 +110,3 @@ | ||
let timeout = this.#timeouts.connection | ||
const isSecureEndpoint = this.isSecureEndpoint(options) | ||
@@ -129,3 +130,3 @@ const proxy = this.#getProxy(options) | ||
} else { | ||
socket = (options.secureEndpoint ? tls : net).connect(options) | ||
socket = (isSecureEndpoint ? tls : net).connect(options) | ||
} | ||
@@ -139,4 +140,4 @@ | ||
const connectPromise = socket[options.secureEndpoint ? 'secureConnecting' : 'connecting'] | ||
? once(socket, options.secureEndpoint ? 'secureConnect' : 'connect', { signal }) | ||
const connectPromise = socket[isSecureEndpoint ? 'secureConnecting' : 'connecting'] | ||
? once(socket, isSecureEndpoint ? 'secureConnect' : 'connect', { signal }) | ||
: Promise.resolve() | ||
@@ -143,0 +144,0 @@ |
{ | ||
"name": "@npmcli/agent", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "the http/https agent used by the npm cli", | ||
@@ -9,3 +9,3 @@ "main": "lib/index.js", | ||
"test": "tap", | ||
"lint": "eslint \"**/*.js\"", | ||
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", | ||
"postlint": "template-oss-check", | ||
@@ -32,3 +32,3 @@ "template-oss-apply": "template-oss-apply --force", | ||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", | ||
"version": "4.19.0", | ||
"version": "4.21.3", | ||
"publish": "true" | ||
@@ -45,3 +45,3 @@ }, | ||
"@npmcli/eslint-config": "^4.0.0", | ||
"@npmcli/template-oss": "4.19.0", | ||
"@npmcli/template-oss": "4.21.3", | ||
"minipass-fetch": "^3.0.3", | ||
@@ -48,0 +48,0 @@ "nock": "^13.2.7", |
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
17666
463