Skip to content

Commit 7d0e2f3

Browse files
authored
Change HttpProxyAgent imports (#8457)
2 parents 56f0b65 + f4c6e44 commit 7d0e2f3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/packageManager/proxy.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { Url } from 'url';
7-
import HttpProxyAgent from 'http-proxy-agent';
8-
import HttpsProxyAgent from 'https-proxy-agent';
7+
import { HttpProxyAgent, HttpProxyAgentOptions } from 'http-proxy-agent';
8+
import { HttpsProxyAgent, HttpsProxyAgentOptions } from 'https-proxy-agent';
99
import { Agent } from 'http';
1010

1111
function getSystemProxyURL(requestURL: Url): string | undefined {
@@ -34,11 +34,11 @@ export function getProxyAgent(requestURL: Url, proxy: string, strictSSL: boolean
3434
return undefined;
3535
}
3636

37-
const opts: HttpProxyAgent.HttpProxyAgentOptions<string> & HttpsProxyAgent.HttpsProxyAgentOptions<string> = {
37+
const opts: HttpProxyAgentOptions<string> & HttpsProxyAgentOptions<string> = {
3838
rejectUnauthorized: strictSSL,
3939
};
4040

4141
return requestURL.protocol === 'http:'
42-
? new HttpProxyAgent.HttpProxyAgent(proxyEndpoint, opts)
43-
: new HttpsProxyAgent.HttpsProxyAgent(proxyEndpoint, opts);
42+
? new HttpProxyAgent(proxyEndpoint, opts)
43+
: new HttpsProxyAgent(proxyEndpoint, opts);
4444
}

0 commit comments

Comments
 (0)