1
0
Fork 0

resolve comments

pull/1547/head
Tatyana Kostromskaya 2023-10-06 12:39:29 +00:00
parent eae1b66cb0
commit 13e0ce9cf7
3 changed files with 16 additions and 24 deletions

View File

@ -1,29 +1,28 @@
{ {
"name": "@actions/http-client", "name": "@actions/http-client",
"version": "3.0.0", "version": "2.2.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@actions/http-client", "name": "@actions/http-client",
"version": "3.0.0", "version": "2.2.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"tunnel": "^0.0.6" "tunnel": "^0.0.6",
"undici": "^5.25.4"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "20.7.1", "@types/node": "20.7.1",
"@types/proxy": "^1.0.1", "@types/proxy": "^1.0.1",
"@types/tunnel": "0.0.3", "@types/tunnel": "0.0.3",
"proxy": "^2.1.1", "proxy": "^2.1.1"
"undici": "^5.25.4"
} }
}, },
"node_modules/@fastify/busboy": { "node_modules/@fastify/busboy": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz",
"integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==", "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==",
"dev": true,
"engines": { "engines": {
"node": ">=14" "node": ">=14"
} }
@ -220,7 +219,6 @@
"version": "5.25.4", "version": "5.25.4",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.25.4.tgz", "resolved": "https://registry.npmjs.org/undici/-/undici-5.25.4.tgz",
"integrity": "sha512-450yJxT29qKMf3aoudzFpIciqpx6Pji3hEWaXqXmanbXF58LTAGCKxcJjxMXWu3iG+Mudgo3ZUfDB6YDFd/dAw==", "integrity": "sha512-450yJxT29qKMf3aoudzFpIciqpx6Pji3hEWaXqXmanbXF58LTAGCKxcJjxMXWu3iG+Mudgo3ZUfDB6YDFd/dAw==",
"dev": true,
"dependencies": { "dependencies": {
"@fastify/busboy": "^2.0.0" "@fastify/busboy": "^2.0.0"
}, },
@ -233,8 +231,7 @@
"@fastify/busboy": { "@fastify/busboy": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz",
"integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==", "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ=="
"dev": true
}, },
"@types/node": { "@types/node": {
"version": "20.7.1", "version": "20.7.1",
@ -387,7 +384,6 @@
"version": "5.25.4", "version": "5.25.4",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.25.4.tgz", "resolved": "https://registry.npmjs.org/undici/-/undici-5.25.4.tgz",
"integrity": "sha512-450yJxT29qKMf3aoudzFpIciqpx6Pji3hEWaXqXmanbXF58LTAGCKxcJjxMXWu3iG+Mudgo3ZUfDB6YDFd/dAw==", "integrity": "sha512-450yJxT29qKMf3aoudzFpIciqpx6Pji3hEWaXqXmanbXF58LTAGCKxcJjxMXWu3iG+Mudgo3ZUfDB6YDFd/dAw==",
"dev": true,
"requires": { "requires": {
"@fastify/busboy": "^2.0.0" "@fastify/busboy": "^2.0.0"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@actions/http-client", "name": "@actions/http-client",
"version": "3.0.0", "version": "2.2.0",
"description": "Actions Http Client", "description": "Actions Http Client",
"keywords": [ "keywords": [
"github", "github",
@ -42,10 +42,10 @@
"@types/node": "20.7.1", "@types/node": "20.7.1",
"@types/tunnel": "0.0.3", "@types/tunnel": "0.0.3",
"proxy": "^2.1.1", "proxy": "^2.1.1",
"undici": "^5.25.4",
"@types/proxy": "^1.0.1" "@types/proxy": "^1.0.1"
}, },
"dependencies": { "dependencies": {
"tunnel": "^0.0.6" "tunnel": "^0.0.6",
"undici": "^5.25.4"
} }
} }

View File

@ -727,18 +727,14 @@ export class HttpClient {
} }
const usingSsl = parsedUrl.protocol === 'https:' const usingSsl = parsedUrl.protocol === 'https:'
proxyAgent = new ProxyAgent({
// This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. uri: proxyUrl.href,
if (proxyUrl && proxyUrl.hostname) { pipelining: !this._keepAlive ? 0 : 1,
proxyAgent = new ProxyAgent({ ...((proxyUrl.username || proxyUrl.password) && {
uri: proxyUrl.href, token: `${proxyUrl.username}:${proxyUrl.password}`
pipelining: !this._keepAlive ? 0 : 1,
...((proxyUrl.username || proxyUrl.password) && {
token: `${proxyUrl.username}:${proxyUrl.password}`
})
}) })
this._proxyAgentDispatcher = proxyAgent })
} this._proxyAgentDispatcher = proxyAgent
if (usingSsl && this._ignoreSslError) { if (usingSsl && this._ignoreSslError) {
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process