import type { TlsConfig } from '@pnpm/types'; import { type Dispatcher } from 'undici'; export type ClientCertificates = Record; export interface DispatcherOptions { ca?: string | string[] | Buffer; cert?: string | string[] | Buffer; key?: string | Buffer; localAddress?: string; maxSockets?: number; strictSsl?: boolean; timeout?: number; httpProxy?: string; httpsProxy?: string; noProxy?: boolean | string; clientCertificates?: ClientCertificates; } /** * Clear the dispatcher cache. Useful for testing. */ export declare function clearDispatcherCache(): void; /** * Destroy the global dispatcher and every cached dispatcher, closing their open * sockets. Intended for process shutdown only: once called, the module can no * longer perform network requests. This is used to work around a Windows crash * that happens when the process exits while sockets are still open * (https://github.com/nodejs/node/issues/56645). */ export declare function destroyDispatchers(): Promise; /** * Get a dispatcher for the given URI and options. * Returns undefined if no special configuration is needed (to use global dispatcher). */ export declare function getDispatcher(uri: string, opts: DispatcherOptions): Dispatcher | undefined;