Interface NpmClientOptions

Constructor options for NpmClient.

interface NpmClientOptions {
    depsDevUrl?: string;
    downloadsApiUrl?: string;
    jsdelivrUrl?: string;
    npmsApiUrl?: string;
    packagephobiaUrl?: string;
    registryUrl?: string;
    token?: string;
    unpkgUrl?: string;
}

Properties

depsDevUrl?: string

Base URL for the deps.dev API (default: 'https://api.deps.dev/v3').

downloadsApiUrl?: string

Base URL for the npm Downloads API (default: 'https://api.npmjs.org').

jsdelivrUrl?: string

Base URL for the jsDelivr data API (default: 'https://data.jsdelivr.com/v1').

npmsApiUrl?: string

Base URL for the npms.io API (default: 'https://api.npms.io/v2').

packagephobiaUrl?: string

Base URL for the Packagephobia API (default: 'https://packagephobia.com').

registryUrl?: string

Base URL for the npm registry (default: 'https://registry.npmjs.org'). Override for private registries or mirrors.

token?: string

Bearer token for authenticated requests (e.g. private registry access). Sent only to the registry and downloads API — never to third-party sources.

unpkgUrl?: string

Base URL for the unpkg CDN (default: 'https://unpkg.com').