import type { FetchProtocol, Meta } from "./types"; type TarbalUrlTransformer = (name: string, version: string, url: string) => string; export type NpmRegistryOpts = { /** * A url that can act as a proxy, the request will be sent to this proxyUrl if set, with the * original url appended as `?registryurl=...`. So for example: * https://proxy.dev/?registryurl=https://google.com * * This is often used when CORS headers are not set */ proxyUrl?: string; /** * Whether we should only activate this registry for these scopes */ scopeWhitelist?: string[]; authType?: string; authToken?: string; /** * Allows you to overwrite the tarball url if you have a custom location for it. */ provideTarballUrl?: TarbalUrlTransformer; proxyEnabled?: boolean; }; export declare class NpmRegistryFetcher implements FetchProtocol { private registryLocation; private tarStore; private packageMetadata; /** * A url that can act as a proxy, the request will be sent to this proxyUrl if set, with the * original url appended as `?registryurl=...`. So for example: * https://proxy.dev/?registryurl=https://google.com */ private proxyUrl; private scopeWhitelist; private authToken; private provideTarballUrl?; private proxyEnabled?; private authType; constructor(registryLocation: string, config: NpmRegistryOpts); private getProxiedUrl; private getTarballUrl; private getPackageUrl; private getRequestInit; private fetchRegistry; private getPackageMetadata; private getAbsoluteVersion; private getVersionInfo; file(name: string, version: string, path: string): Promise; meta(name: string, version: string): Promise; massFiles(name: string, version: string): Promise>; condition: (name: string, _version: string) => boolean; } export {}; //# sourceMappingURL=npm-registry.d.ts.map