@nxrocks/common
Version:
Common library to share code among the `@nxrocks/*` plugins.
10 lines (9 loc) • 475 B
TypeScript
import { HttpsProxyAgent, HttpProxyAgent } from 'hpagent';
export declare function getPackageLatestNpmVersion(pkg: string): string;
export declare function getHttpProxyAgent(targetUrl: string, proxyUrl?: string): HttpProxyAgent | HttpsProxyAgent | undefined;
export declare function getCommonHttpHeaders(pkgName: string, targetUrl: string, proxyUrl?: string): {
agent?: HttpProxyAgent | HttpsProxyAgent | undefined;
headers: {
'User-Agent': string;
};
};