From 5a395b732bdefef7de68e84a4f536e7fc5c63c23 Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Wed, 4 Oct 2023 12:27:24 +0000 Subject: [PATCH] . --- packages/http-client/__tests__/proxy.test.ts | 2 +- packages/http-client/package-lock.json | 16 ++++++++-------- packages/http-client/package.json | 6 +++--- packages/http-client/src/index.ts | 1 + 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/packages/http-client/__tests__/proxy.test.ts b/packages/http-client/__tests__/proxy.test.ts index 1a0e28a7..ad0c55bd 100644 --- a/packages/http-client/__tests__/proxy.test.ts +++ b/packages/http-client/__tests__/proxy.test.ts @@ -13,7 +13,7 @@ const _proxyUrl = 'http://127.0.0.1:8080' describe('proxy', () => { beforeAll(async () => { // Start proxy server - _proxyServer = proxy() + _proxyServer = proxy.createProxy() await new Promise(resolve => { const port = Number(_proxyUrl.split(':')[2]) _proxyServer.listen(port, () => resolve()) diff --git a/packages/http-client/package-lock.json b/packages/http-client/package-lock.json index 3e74c390..8391d4f4 100644 --- a/packages/http-client/package-lock.json +++ b/packages/http-client/package-lock.json @@ -12,8 +12,8 @@ "tunnel": "^0.0.6" }, "devDependencies": { - "@types/node": "^20.7.1", - "@types/proxy": "^1.0.2", + "@types/node": "20.7.1", + "@types/proxy": "^1.0.1", "@types/tunnel": "0.0.3", "proxy": "^2.1.1", "undici": "^5.25.4" @@ -29,9 +29,9 @@ } }, "node_modules/@types/node": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.2.tgz", - "integrity": "sha512-Vvycsc9FQdwhxE3y3DzeIxuEJbWGDsnrxvMADzTDF/lcdR9/K+AQIeAghTQsHtotg/q0j3WEOYS/jQgSdWue3w==", + "version": "20.7.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.7.1.tgz", + "integrity": "sha512-LT+OIXpp2kj4E2S/p91BMe+VgGX2+lfO+XTpfXhh+bCk2LkQtHZSub8ewFBMGP5ClysPjTDFa4sMI8Q3n4T0wg==", "dev": true }, "node_modules/@types/proxy": { @@ -237,9 +237,9 @@ "dev": true }, "@types/node": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.2.tgz", - "integrity": "sha512-Vvycsc9FQdwhxE3y3DzeIxuEJbWGDsnrxvMADzTDF/lcdR9/K+AQIeAghTQsHtotg/q0j3WEOYS/jQgSdWue3w==", + "version": "20.7.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.7.1.tgz", + "integrity": "sha512-LT+OIXpp2kj4E2S/p91BMe+VgGX2+lfO+XTpfXhh+bCk2LkQtHZSub8ewFBMGP5ClysPjTDFa4sMI8Q3n4T0wg==", "dev": true }, "@types/proxy": { diff --git a/packages/http-client/package.json b/packages/http-client/package.json index 95261de3..4f88f1f9 100644 --- a/packages/http-client/package.json +++ b/packages/http-client/package.json @@ -39,11 +39,11 @@ "url": "https://github.com/actions/toolkit/issues" }, "devDependencies": { - "@types/node": "^20.7.1", - "@types/proxy": "^1.0.2", + "@types/node": "20.7.1", "@types/tunnel": "0.0.3", "proxy": "^2.1.1", - "undici": "^5.25.4" + "undici": "^5.25.4", + "@types/proxy": "^1.0.1" }, "dependencies": { "tunnel": "^0.0.6" diff --git a/packages/http-client/src/index.ts b/packages/http-client/src/index.ts index a63e61b7..406b7f89 100644 --- a/packages/http-client/src/index.ts +++ b/packages/http-client/src/index.ts @@ -6,6 +6,7 @@ import * as ifm from './interfaces' import * as net from 'net' import * as pm from './proxy' import * as tunnel from 'tunnel' +import { ProxyAgent, Agent, fetch as undiciFetch } from "undici"; export enum HttpCodes { OK = 200,