feat: use proxy-agent to support various proxies (#10227)

This commit is contained in:
Alex Rudenko 2023-05-23 09:56:36 +02:00 committed by GitHub
parent 6f6edbb43d
commit 2c0bd54d2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 584 additions and 70 deletions

626
package-lock.json generated
View File

@ -2141,7 +2141,6 @@
},
"node_modules/acorn": {
"version": "8.8.1",
"dev": true,
"license": "MIT",
"bin": {
"acorn": "bin/acorn"
@ -2163,13 +2162,13 @@
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
"dev": true,
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/agent-base": {
"version": "6.0.2",
"dev": true,
"license": "MIT",
"dependencies": {
"debug": "4"
@ -2414,6 +2413,22 @@
"integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==",
"dev": true
},
"node_modules/ast-types": {
"version": "0.13.4",
"resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz",
"integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==",
"dependencies": {
"tslib": "^2.0.1"
},
"engines": {
"node": ">=4"
}
},
"node_modules/ast-types/node_modules/tslib": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.2.tgz",
"integrity": "sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA=="
},
"node_modules/balanced-match": {
"version": "1.0.2",
"license": "MIT"
@ -2436,6 +2451,14 @@
],
"license": "MIT"
},
"node_modules/basic-ftp": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.3.tgz",
"integrity": "sha512-QHX8HLlncOLpy54mh+k/sWIFd0ThmRqwe9ZjELybGZK+tZ8rUb9VO0saKJUROTbE+KhzDUT7xziGpGrW8Kmd+g==",
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/binary-extensions": {
"version": "2.2.0",
"license": "MIT",
@ -3037,6 +3060,14 @@
"node": ">=8"
}
},
"node_modules/data-uri-to-buffer": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-5.0.1.tgz",
"integrity": "sha512-a9l6T1qqDogvvnw0nKlfZzqsyikEBZBClF39V3TFoKhDtGBqHu2HkuomJc02j5zft8zrUaXEuoicLeW54RkzPg==",
"engines": {
"node": ">= 14"
}
},
"node_modules/debug": {
"version": "4.3.4",
"license": "MIT",
@ -3091,7 +3122,6 @@
},
"node_modules/deep-is": {
"version": "0.1.4",
"dev": true,
"license": "MIT"
},
"node_modules/deepmerge": {
@ -3135,6 +3165,20 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/degenerator": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/degenerator/-/degenerator-4.0.2.tgz",
"integrity": "sha512-HKwIFvZROUMfH3qI3gBpD61BYh7q3c3GXD5UGZzoVNJwVSYgZKvYl1fRMXc9ozoTxl/VZxKJ5v/bA+19tywFiw==",
"dependencies": {
"ast-types": "^0.13.2",
"escodegen": "^1.8.1",
"esprima": "^4.0.0",
"vm2": "^3.9.17"
},
"engines": {
"node": ">= 14"
}
},
"node_modules/delegates": {
"version": "1.0.0",
"dev": true,
@ -3381,6 +3425,74 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/escodegen": {
"version": "1.14.3",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
"integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
"dependencies": {
"esprima": "^4.0.1",
"estraverse": "^4.2.0",
"esutils": "^2.0.2",
"optionator": "^0.8.1"
},
"bin": {
"escodegen": "bin/escodegen.js",
"esgenerate": "bin/esgenerate.js"
},
"engines": {
"node": ">=4.0"
},
"optionalDependencies": {
"source-map": "~0.6.1"
}
},
"node_modules/escodegen/node_modules/levn": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
"integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==",
"dependencies": {
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/escodegen/node_modules/optionator": {
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
"integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
"dependencies": {
"deep-is": "~0.1.3",
"fast-levenshtein": "~2.0.6",
"levn": "~0.3.0",
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2",
"word-wrap": "~1.2.3"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/escodegen/node_modules/prelude-ls": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
"integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==",
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/escodegen/node_modules/type-check": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
"integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==",
"dependencies": {
"prelude-ls": "~1.1.2"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/eslint": {
"version": "8.39.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz",
@ -3881,7 +3993,6 @@
},
"node_modules/esprima": {
"version": "4.0.1",
"dev": true,
"license": "BSD-2-Clause",
"bin": {
"esparse": "bin/esparse.js",
@ -3935,14 +4046,12 @@
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
"dev": true,
"engines": {
"node": ">=4.0"
}
},
"node_modules/esutils": {
"version": "2.0.3",
"dev": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">=0.10.0"
@ -4082,7 +4191,6 @@
},
"node_modules/fast-levenshtein": {
"version": "2.0.6",
"dev": true,
"license": "MIT"
},
"node_modules/fastq": {
@ -4328,6 +4436,49 @@
"url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
}
},
"node_modules/get-uri": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.1.tgz",
"integrity": "sha512-7ZqONUVqaabogsYNWlYj0t3YZaL6dhuEueZXGF+/YVmf6dHmaFg8/6psJKqhx9QykIDKzpGcy2cn4oV4YC7V/Q==",
"dependencies": {
"basic-ftp": "^5.0.2",
"data-uri-to-buffer": "^5.0.1",
"debug": "^4.3.4",
"fs-extra": "^8.1.0"
},
"engines": {
"node": ">= 14"
}
},
"node_modules/get-uri/node_modules/fs-extra": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^4.0.0",
"universalify": "^0.1.0"
},
"engines": {
"node": ">=6 <7 || >=8"
}
},
"node_modules/get-uri/node_modules/jsonfile": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
"integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
"optionalDependencies": {
"graceful-fs": "^4.1.6"
}
},
"node_modules/get-uri/node_modules/universalify": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
"engines": {
"node": ">= 4.0.0"
}
},
"node_modules/git-raw-commits": {
"version": "2.0.11",
"resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.11.tgz",
@ -4446,7 +4597,6 @@
},
"node_modules/graceful-fs": {
"version": "4.2.10",
"dev": true,
"license": "ISC"
},
"node_modules/grapheme-splitter": {
@ -4663,6 +4813,7 @@
},
"node_modules/https-proxy-agent": {
"version": "5.0.1",
"dev": true,
"license": "MIT",
"dependencies": {
"agent-base": "6",
@ -4878,7 +5029,6 @@
},
"node_modules/ip": {
"version": "2.0.0",
"dev": true,
"license": "MIT"
},
"node_modules/irregular-plurals": {
@ -6459,6 +6609,14 @@
"node": ">= 0.6"
}
},
"node_modules/netmask": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz",
"integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==",
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/nice-try": {
"version": "1.0.5",
"dev": true,
@ -7127,6 +7285,77 @@
"node": ">=6"
}
},
"node_modules/pac-proxy-agent": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-6.0.2.tgz",
"integrity": "sha512-jh3apaSHpjtB6IfbiTBgt4svoyC18TvAo4N4hm/BPMK78W4mPt46JbeZm6yIXURX+8sMohURtLp3dDDFSHNk/Q==",
"dependencies": {
"agent-base": "^7.0.1",
"debug": "^4.3.4",
"get-uri": "^6.0.1",
"http-proxy-agent": "^6.0.1",
"https-proxy-agent": "^6.1.0",
"pac-resolver": "^6.0.1",
"socks-proxy-agent": "^8.0.1"
},
"engines": {
"node": ">= 14"
}
},
"node_modules/pac-proxy-agent/node_modules/agent-base": {
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.0.2.tgz",
"integrity": "sha512-k2/tQ1+8Zf50dEUJWklUP80LcE/+Ph+OJ6cf2Ff2fD/c/TtCe6ofnCoNMz9UnyxOQYlaAALZtEWETzn+1JjfHg==",
"dependencies": {
"debug": "^4.3.4"
},
"engines": {
"node": ">= 14"
}
},
"node_modules/pac-proxy-agent/node_modules/https-proxy-agent": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-6.2.0.tgz",
"integrity": "sha512-4xhCnMpxR9fupa7leh9uJK2P/qjYIeaM9uZ9c1bi1JDSwX2VH9NDk/oKSToNX4gBKa2WT31Mldne7e26ckohLQ==",
"dependencies": {
"agent-base": "^7.0.2",
"debug": "4"
},
"engines": {
"node": ">= 14"
}
},
"node_modules/pac-proxy-agent/node_modules/socks-proxy-agent": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.1.tgz",
"integrity": "sha512-59EjPbbgg8U3x62hhKOFVAmySQUcfRQ4C7Q/D5sEHnZTQRrQlNKINks44DMR1gwXp0p4LaVIeccX2KHTTcHVqQ==",
"dependencies": {
"agent-base": "^7.0.1",
"debug": "^4.3.4",
"socks": "^2.7.1"
},
"engines": {
"node": ">= 14"
}
},
"node_modules/pac-resolver": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-6.0.1.tgz",
"integrity": "sha512-dg497MhVT7jZegPRuOScQ/z0aV/5WR0gTdRu1md+Irs9J9o+ls5jIuxjo1WfaTG+eQQkxyn5HMGvWK+w7EIBkQ==",
"dependencies": {
"degenerator": "^4.0.1",
"ip": "^1.1.5",
"netmask": "^2.0.2"
},
"engines": {
"node": ">= 14"
}
},
"node_modules/pac-resolver/node_modules/ip": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz",
"integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg=="
},
"node_modules/pacote": {
"version": "15.1.0",
"dev": true,
@ -7406,9 +7635,72 @@
"signal-exit": "^3.0.2"
}
},
"node_modules/proxy-agent": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.2.0.tgz",
"integrity": "sha512-g3rBHXPhEa0Z1nxZkirj0+US1SCcA67SnjpxbdZf7BloLdULEUCzbQozsq+wFwhmMeZegeZISDZjPFN/Ct9DaQ==",
"dependencies": {
"agent-base": "^7.0.1",
"debug": "^4.3.4",
"http-proxy-agent": "^6.0.1",
"https-proxy-agent": "^6.1.0",
"lru-cache": "^7.14.1",
"pac-proxy-agent": "^6.0.2",
"proxy-from-env": "^1.1.0",
"socks-proxy-agent": "^8.0.1"
},
"engines": {
"node": ">= 14"
}
},
"node_modules/proxy-agent/node_modules/agent-base": {
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.0.2.tgz",
"integrity": "sha512-k2/tQ1+8Zf50dEUJWklUP80LcE/+Ph+OJ6cf2Ff2fD/c/TtCe6ofnCoNMz9UnyxOQYlaAALZtEWETzn+1JjfHg==",
"dependencies": {
"debug": "^4.3.4"
},
"engines": {
"node": ">= 14"
}
},
"node_modules/proxy-agent/node_modules/https-proxy-agent": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-6.2.0.tgz",
"integrity": "sha512-4xhCnMpxR9fupa7leh9uJK2P/qjYIeaM9uZ9c1bi1JDSwX2VH9NDk/oKSToNX4gBKa2WT31Mldne7e26ckohLQ==",
"dependencies": {
"agent-base": "^7.0.2",
"debug": "4"
},
"engines": {
"node": ">= 14"
}
},
"node_modules/proxy-agent/node_modules/lru-cache": {
"version": "7.18.3",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",
"integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",
"engines": {
"node": ">=12"
}
},
"node_modules/proxy-agent/node_modules/socks-proxy-agent": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.1.tgz",
"integrity": "sha512-59EjPbbgg8U3x62hhKOFVAmySQUcfRQ4C7Q/D5sEHnZTQRrQlNKINks44DMR1gwXp0p4LaVIeccX2KHTTcHVqQ==",
"dependencies": {
"agent-base": "^7.0.1",
"debug": "^4.3.4",
"socks": "^2.7.1"
},
"engines": {
"node": ">= 14"
}
},
"node_modules/proxy-from-env": {
"version": "1.1.0",
"license": "MIT"
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
},
"node_modules/pump": {
"version": "3.0.0",
@ -8272,7 +8564,6 @@
},
"node_modules/smart-buffer": {
"version": "4.2.0",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 6.0.0",
@ -8281,7 +8572,6 @@
},
"node_modules/socks": {
"version": "2.7.1",
"dev": true,
"license": "MIT",
"dependencies": {
"ip": "^2.0.0",
@ -8307,7 +8597,7 @@
},
"node_modules/source-map": {
"version": "0.6.1",
"dev": true,
"devOptional": true,
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
@ -9180,6 +9470,21 @@
"node": ">= 0.10"
}
},
"node_modules/vm2": {
"version": "3.9.19",
"resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.19.tgz",
"integrity": "sha512-J637XF0DHDMV57R6JyVsTak7nIL8gy5KH4r1HiwWLf/4GBbb5MKL5y7LpmF4A8E2nR6XmzpmMFQ7V7ppPTmUQg==",
"dependencies": {
"acorn": "^8.7.0",
"acorn-walk": "^8.2.0"
},
"bin": {
"vm2": "bin/vm2"
},
"engines": {
"node": ">=6.0"
}
},
"node_modules/wcwidth": {
"version": "1.0.1",
"license": "MIT",
@ -9262,7 +9567,6 @@
},
"node_modules/word-wrap": {
"version": "1.2.3",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@ -9467,10 +9771,8 @@
"dependencies": {
"debug": "4.3.4",
"extract-zip": "2.0.1",
"http-proxy-agent": "6.1.0",
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
"proxy-agent": "6.2.0",
"tar-fs": "2.1.1",
"unbzip2-stream": "1.4.3",
"yargs": "17.7.1"
@ -10588,10 +10890,8 @@
"@types/yargs": "17.0.22",
"debug": "4.3.4",
"extract-zip": "2.0.1",
"http-proxy-agent": "6.1.0",
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
"proxy-agent": "6.2.0",
"tar-fs": "2.1.1",
"unbzip2-stream": "1.4.3",
"yargs": "17.7.1"
@ -11166,8 +11466,7 @@
"dev": true
},
"acorn": {
"version": "8.8.1",
"dev": true
"version": "8.8.1"
},
"acorn-jsx": {
"version": "5.3.2",
@ -11179,11 +11478,11 @@
"acorn-walk": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
"dev": true
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA=="
},
"agent-base": {
"version": "6.0.2",
"dev": true,
"requires": {
"debug": "4"
}
@ -11332,12 +11631,32 @@
"integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==",
"dev": true
},
"ast-types": {
"version": "0.13.4",
"resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz",
"integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==",
"requires": {
"tslib": "^2.0.1"
},
"dependencies": {
"tslib": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.2.tgz",
"integrity": "sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA=="
}
}
},
"balanced-match": {
"version": "1.0.2"
},
"base64-js": {
"version": "1.5.1"
},
"basic-ftp": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.3.tgz",
"integrity": "sha512-QHX8HLlncOLpy54mh+k/sWIFd0ThmRqwe9ZjELybGZK+tZ8rUb9VO0saKJUROTbE+KhzDUT7xziGpGrW8Kmd+g=="
},
"binary-extensions": {
"version": "2.2.0"
},
@ -11719,6 +12038,11 @@
"integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==",
"dev": true
},
"data-uri-to-buffer": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-5.0.1.tgz",
"integrity": "sha512-a9l6T1qqDogvvnw0nKlfZzqsyikEBZBClF39V3TFoKhDtGBqHu2HkuomJc02j5zft8zrUaXEuoicLeW54RkzPg=="
},
"debug": {
"version": "4.3.4",
"requires": {
@ -11750,8 +12074,7 @@
}
},
"deep-is": {
"version": "0.1.4",
"dev": true
"version": "0.1.4"
},
"deepmerge": {
"version": "4.2.2",
@ -11775,6 +12098,17 @@
"object-keys": "^1.1.1"
}
},
"degenerator": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/degenerator/-/degenerator-4.0.2.tgz",
"integrity": "sha512-HKwIFvZROUMfH3qI3gBpD61BYh7q3c3GXD5UGZzoVNJwVSYgZKvYl1fRMXc9ozoTxl/VZxKJ5v/bA+19tywFiw==",
"requires": {
"ast-types": "^0.13.2",
"escodegen": "^1.8.1",
"esprima": "^4.0.0",
"vm2": "^3.9.17"
}
},
"delegates": {
"version": "1.0.0",
"dev": true
@ -11950,6 +12284,55 @@
"escape-string-regexp": {
"version": "4.0.0"
},
"escodegen": {
"version": "1.14.3",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
"integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
"requires": {
"esprima": "^4.0.1",
"estraverse": "^4.2.0",
"esutils": "^2.0.2",
"optionator": "^0.8.1",
"source-map": "~0.6.1"
},
"dependencies": {
"levn": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
"integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==",
"requires": {
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2"
}
},
"optionator": {
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
"integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
"requires": {
"deep-is": "~0.1.3",
"fast-levenshtein": "~2.0.6",
"levn": "~0.3.0",
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2",
"word-wrap": "~1.2.3"
}
},
"prelude-ls": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
"integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w=="
},
"type-check": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
"integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==",
"requires": {
"prelude-ls": "~1.1.2"
}
}
}
},
"eslint": {
"version": "8.39.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz",
@ -12278,8 +12661,7 @@
}
},
"esprima": {
"version": "4.0.1",
"dev": true
"version": "4.0.1"
},
"esquery": {
"version": "1.5.0",
@ -12314,12 +12696,10 @@
"estraverse": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
"dev": true
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw=="
},
"esutils": {
"version": "2.0.3",
"dev": true
"version": "2.0.3"
},
"execa": {
"version": "5.1.1",
@ -12414,8 +12794,7 @@
"dev": true
},
"fast-levenshtein": {
"version": "2.0.6",
"dev": true
"version": "2.0.6"
},
"fastq": {
"version": "1.13.0",
@ -12570,6 +12949,42 @@
"version": "4.4.0",
"dev": true
},
"get-uri": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.1.tgz",
"integrity": "sha512-7ZqONUVqaabogsYNWlYj0t3YZaL6dhuEueZXGF+/YVmf6dHmaFg8/6psJKqhx9QykIDKzpGcy2cn4oV4YC7V/Q==",
"requires": {
"basic-ftp": "^5.0.2",
"data-uri-to-buffer": "^5.0.1",
"debug": "^4.3.4",
"fs-extra": "^8.1.0"
},
"dependencies": {
"fs-extra": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
"requires": {
"graceful-fs": "^4.2.0",
"jsonfile": "^4.0.0",
"universalify": "^0.1.0"
}
},
"jsonfile": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
"integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
"requires": {
"graceful-fs": "^4.1.6"
}
},
"universalify": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="
}
}
},
"git-raw-commits": {
"version": "2.0.11",
"resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.11.tgz",
@ -12654,8 +13069,7 @@
}
},
"graceful-fs": {
"version": "4.2.10",
"dev": true
"version": "4.2.10"
},
"grapheme-splitter": {
"version": "1.0.4",
@ -12789,6 +13203,7 @@
},
"https-proxy-agent": {
"version": "5.0.1",
"dev": true,
"requires": {
"agent-base": "6",
"debug": "4"
@ -12919,8 +13334,7 @@
}
},
"ip": {
"version": "2.0.0",
"dev": true
"version": "2.0.0"
},
"irregular-plurals": {
"version": "3.3.0",
@ -13982,6 +14396,11 @@
"version": "0.6.3",
"dev": true
},
"netmask": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz",
"integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg=="
},
"nice-try": {
"version": "1.0.5",
"dev": true
@ -14422,6 +14841,66 @@
"version": "2.2.0",
"dev": true
},
"pac-proxy-agent": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-6.0.2.tgz",
"integrity": "sha512-jh3apaSHpjtB6IfbiTBgt4svoyC18TvAo4N4hm/BPMK78W4mPt46JbeZm6yIXURX+8sMohURtLp3dDDFSHNk/Q==",
"requires": {
"agent-base": "^7.0.1",
"debug": "^4.3.4",
"get-uri": "^6.0.1",
"http-proxy-agent": "^6.0.1",
"https-proxy-agent": "^6.1.0",
"pac-resolver": "^6.0.1",
"socks-proxy-agent": "^8.0.1"
},
"dependencies": {
"agent-base": {
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.0.2.tgz",
"integrity": "sha512-k2/tQ1+8Zf50dEUJWklUP80LcE/+Ph+OJ6cf2Ff2fD/c/TtCe6ofnCoNMz9UnyxOQYlaAALZtEWETzn+1JjfHg==",
"requires": {
"debug": "^4.3.4"
}
},
"https-proxy-agent": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-6.2.0.tgz",
"integrity": "sha512-4xhCnMpxR9fupa7leh9uJK2P/qjYIeaM9uZ9c1bi1JDSwX2VH9NDk/oKSToNX4gBKa2WT31Mldne7e26ckohLQ==",
"requires": {
"agent-base": "^7.0.2",
"debug": "4"
}
},
"socks-proxy-agent": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.1.tgz",
"integrity": "sha512-59EjPbbgg8U3x62hhKOFVAmySQUcfRQ4C7Q/D5sEHnZTQRrQlNKINks44DMR1gwXp0p4LaVIeccX2KHTTcHVqQ==",
"requires": {
"agent-base": "^7.0.1",
"debug": "^4.3.4",
"socks": "^2.7.1"
}
}
}
},
"pac-resolver": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-6.0.1.tgz",
"integrity": "sha512-dg497MhVT7jZegPRuOScQ/z0aV/5WR0gTdRu1md+Irs9J9o+ls5jIuxjo1WfaTG+eQQkxyn5HMGvWK+w7EIBkQ==",
"requires": {
"degenerator": "^4.0.1",
"ip": "^1.1.5",
"netmask": "^2.0.2"
},
"dependencies": {
"ip": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz",
"integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg=="
}
}
},
"pacote": {
"version": "15.1.0",
"dev": true,
@ -14589,8 +15068,59 @@
"signal-exit": "^3.0.2"
}
},
"proxy-agent": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.2.0.tgz",
"integrity": "sha512-g3rBHXPhEa0Z1nxZkirj0+US1SCcA67SnjpxbdZf7BloLdULEUCzbQozsq+wFwhmMeZegeZISDZjPFN/Ct9DaQ==",
"requires": {
"agent-base": "^7.0.1",
"debug": "^4.3.4",
"http-proxy-agent": "^6.0.1",
"https-proxy-agent": "^6.1.0",
"lru-cache": "^7.14.1",
"pac-proxy-agent": "^6.0.2",
"proxy-from-env": "^1.1.0",
"socks-proxy-agent": "^8.0.1"
},
"dependencies": {
"agent-base": {
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.0.2.tgz",
"integrity": "sha512-k2/tQ1+8Zf50dEUJWklUP80LcE/+Ph+OJ6cf2Ff2fD/c/TtCe6ofnCoNMz9UnyxOQYlaAALZtEWETzn+1JjfHg==",
"requires": {
"debug": "^4.3.4"
}
},
"https-proxy-agent": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-6.2.0.tgz",
"integrity": "sha512-4xhCnMpxR9fupa7leh9uJK2P/qjYIeaM9uZ9c1bi1JDSwX2VH9NDk/oKSToNX4gBKa2WT31Mldne7e26ckohLQ==",
"requires": {
"agent-base": "^7.0.2",
"debug": "4"
}
},
"lru-cache": {
"version": "7.18.3",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",
"integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA=="
},
"socks-proxy-agent": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.1.tgz",
"integrity": "sha512-59EjPbbgg8U3x62hhKOFVAmySQUcfRQ4C7Q/D5sEHnZTQRrQlNKINks44DMR1gwXp0p4LaVIeccX2KHTTcHVqQ==",
"requires": {
"agent-base": "^7.0.1",
"debug": "^4.3.4",
"socks": "^2.7.1"
}
}
}
},
"proxy-from-env": {
"version": "1.1.0"
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
},
"pump": {
"version": "3.0.0",
@ -15167,12 +15697,10 @@
"dev": true
},
"smart-buffer": {
"version": "4.2.0",
"dev": true
"version": "4.2.0"
},
"socks": {
"version": "2.7.1",
"dev": true,
"requires": {
"ip": "^2.0.0",
"smart-buffer": "^4.2.0"
@ -15189,7 +15717,7 @@
},
"source-map": {
"version": "0.6.1",
"dev": true
"devOptional": true
},
"source-map-support": {
"version": "0.5.21",
@ -15795,6 +16323,15 @@
"version": "13.9.0",
"dev": true
},
"vm2": {
"version": "3.9.19",
"resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.19.tgz",
"integrity": "sha512-J637XF0DHDMV57R6JyVsTak7nIL8gy5KH4r1HiwWLf/4GBbb5MKL5y7LpmF4A8E2nR6XmzpmMFQ7V7ppPTmUQg==",
"requires": {
"acorn": "^8.7.0",
"acorn-walk": "^8.2.0"
}
},
"wcwidth": {
"version": "1.0.1",
"requires": {
@ -15852,8 +16389,7 @@
}
},
"word-wrap": {
"version": "1.2.3",
"dev": true
"version": "1.2.3"
},
"workerpool": {
"version": "6.2.1"

View File

@ -99,10 +99,8 @@
"dependencies": {
"debug": "4.3.4",
"extract-zip": "2.0.1",
"http-proxy-agent": "6.1.0",
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
"proxy-agent": "6.2.0",
"tar-fs": "2.1.1",
"unbzip2-stream": "1.4.3",
"yargs": "17.7.1"

View File

@ -19,12 +19,7 @@ import * as http from 'http';
import * as https from 'https';
import {URL} from 'url';
import * as httpProxyAgent from 'http-proxy-agent';
import * as httpsProxyAgent from 'https-proxy-agent';
import {getProxyForUrl} from 'proxy-from-env';
const {HttpProxyAgent} = httpProxyAgent;
const {HttpsProxyAgent} = httpsProxyAgent;
import {ProxyAgent} from 'proxy-agent';
export function headHttpRequest(url: URL): Promise<boolean> {
return new Promise(resolve => {
@ -55,24 +50,9 @@ export function httpRequest(
path: url.pathname + url.search,
method,
headers: keepAlive ? {Connection: 'keep-alive'} : undefined,
agent: new ProxyAgent(),
};
const proxyURL = getProxyForUrl(url.toString());
if (proxyURL) {
const proxy = new URL(proxyURL);
if (proxy.protocol === 'http:') {
options.agent = new HttpProxyAgent(proxyURL);
} else {
options.agent = new HttpsProxyAgent({
host: proxy.host,
path: proxy.pathname,
port: proxy.port,
secureProxy: proxy.protocol === 'https:',
headers: options.headers,
});
}
}
const requestCallback = (res: http.IncomingMessage): void => {
if (
res.statusCode &&