Skip to content

Commit

Permalink
deps: @npmcli/agent@2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Sep 8, 2023
1 parent 42bef2c commit f76066a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 18 deletions.
8 changes: 3 additions & 5 deletions node_modules/@npmcli/agent/lib/agents.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const tls = require('tls')
const { once } = require('events')
const { createTimeout, abortRace, urlify, appendPort, cacheAgent } = require('./util')
const { normalizeOptions, cacheOptions } = require('./options')
const { getProxy, getProxyType, isSecureProxy, proxyCache } = require('./proxy.js')
const { getProxy, getProxyType, proxyCache } = require('./proxy.js')
const Errors = require('./errors.js')

const createAgent = (base, name) => {
Expand Down Expand Up @@ -43,18 +43,16 @@ const createAgent = (base, name) => {
return
}

const secure = isSecureProxy(proxy)

return cacheAgent({
key: cacheOptions({
...options,
...this.#options,
secure,
secure: SECURE,
timeouts: this.#timeouts,
proxy,
}),
cache: proxyCache,
secure,
secure: SECURE,
proxies: this.#proxy.proxies,
}, proxy, this.#options)
}
Expand Down
8 changes: 0 additions & 8 deletions node_modules/@npmcli/agent/lib/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ const PROXY_ENV = (() => {
})()

const SOCKS_PROTOCOLS = new Set(SocksProxyAgent.protocols)
const SECURE_PROTOCOLS = new Set([...SocksProxyAgent.protocols, 'https'])

const isSecureProxy = (url) => {
url = urlify(url)
const protocol = url.protocol.slice(0, -1)
return SECURE_PROTOCOLS.has(protocol)
}

const getProxyType = (url) => {
url = urlify(url)
Expand Down Expand Up @@ -91,6 +84,5 @@ const getProxy = (url, {
module.exports = {
getProxyType,
getProxy,
isSecureProxy,
proxyCache: PROXY_CACHE,
}
5 changes: 3 additions & 2 deletions node_modules/@npmcli/agent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@npmcli/agent",
"version": "2.1.0",
"version": "2.1.1",
"description": "the http/https agent used by the npm cli",
"main": "lib/index.js",
"scripts": {
Expand Down Expand Up @@ -35,7 +35,8 @@
"16.x",
"18.0.0",
"18.x"
]
],
"npmSpec": "next-9"
},
"dependencies": {
"http-proxy-agent": "^7.0.0",
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2855,9 +2855,9 @@
}
},
"node_modules/@npmcli/agent": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.1.0.tgz",
"integrity": "sha512-/HFJP3a/DzgIg+6TWVee3bQmnBcWeKKYE9DKQqS8SWpAV8oYDTn/zkDM8iQ7bWI6kDDgNfHOlEFZZpN/UXMwig==",
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.1.1.tgz",
"integrity": "sha512-6RlbiOAi6L6uUYF4/CDEkDZQnKw0XDsFJVrEpnib8rAx2WRMOsUyAdgnvDpX/fdkDWxtqE+NHwF465llI2wR0g==",
"inBundle": true,
"dependencies": {
"http-proxy-agent": "^7.0.0",
Expand Down

0 comments on commit f76066a

Please sign in to comment.