@pnpm/network.proxy-agent
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -1,4 +0,1 @@ | ||
import { HttpProxyAgent } from 'http-proxy-agent'; | ||
import { HttpsProxyAgent } from 'https-proxy-agent'; | ||
import { SocksProxyAgent } from 'socks-proxy-agent'; | ||
export interface ProxyAgentOptions { | ||
@@ -16,3 +13,2 @@ ca?: string | string[]; | ||
} | ||
export declare type GetProxyAgentResult = HttpProxyAgent | HttpsProxyAgent | SocksProxyAgent | undefined; | ||
export declare function getProxyAgent(uri: string, opts: ProxyAgentOptions): GetProxyAgentResult; | ||
export declare function getProxyAgent(uri: string, opts: ProxyAgentOptions): unknown; |
{ | ||
"name": "@pnpm/network.proxy-agent", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"homepage": "https://bit.dev/pnpm/network/proxy-agent", | ||
@@ -9,3 +9,3 @@ "main": "dist/index.js", | ||
"name": "proxy-agent", | ||
"version": "0.0.2" | ||
"version": "0.0.3" | ||
}, | ||
@@ -12,0 +12,0 @@ "dependencies": { |
@@ -1,4 +0,4 @@ | ||
import createHttpProxyAgent, { HttpProxyAgent } from 'http-proxy-agent' | ||
import createHttpsProxyAgent, { HttpsProxyAgent } from 'https-proxy-agent' | ||
import createSocksProxyAgent, { SocksProxyAgent } from 'socks-proxy-agent' | ||
import createHttpProxyAgent from 'http-proxy-agent' | ||
import createHttpsProxyAgent from 'https-proxy-agent' | ||
import createSocksProxyAgent from 'socks-proxy-agent' | ||
import LRU from 'lru-cache' | ||
@@ -23,5 +23,3 @@ | ||
export type GetProxyAgentResult = HttpProxyAgent | HttpsProxyAgent | SocksProxyAgent | undefined | ||
export function getProxyAgent (uri: string, opts: ProxyAgentOptions): GetProxyAgentResult { | ||
export function getProxyAgent (uri: string, opts: ProxyAgentOptions) { | ||
const parsedUri = new URL(uri) | ||
@@ -98,3 +96,3 @@ const pxuri = getProxyUri(parsedUri, opts) | ||
isHttps: boolean | ||
): GetProxyAgentResult { | ||
) { | ||
const popts = { | ||
@@ -101,0 +99,0 @@ auth: getAuth(proxyUrl), |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
2
32436
521