/** * @file esm-auth.types.ts * @description Authentication configuration for private npm registries and esm.sh CDN. */ /** * Authentication configuration for accessing private npm registries. * Used both for version resolution (npm registry API) and ESM bundle fetching. */ export interface EsmRegistryAuth { /** * Custom registry URL (e.g., 'https://npm.pkg.github.com'). * If not provided, defaults to 'https://registry.npmjs.org'. */ registryUrl?: string; /** * Bearer token for authentication. * Mutually exclusive with `tokenEnvVar`. */ token?: string; /** * Environment variable name containing the bearer token. * Resolved at runtime for security (avoids storing tokens in config). * Mutually exclusive with `token`. */ tokenEnvVar?: string; } /** * Zod schema for EsmRegistryAuth validation. */ export declare const esmRegistryAuthSchema: import("@frontmcp/lazy-zod").ZodObject<{ registryUrl: import("@frontmcp/lazy-zod").ZodOptional; token: import("@frontmcp/lazy-zod").ZodOptional; tokenEnvVar: import("@frontmcp/lazy-zod").ZodOptional; }, import("zod/v4/core").$strip>; /** * Default npm registry URL. */ export declare const DEFAULT_NPM_REGISTRY = "https://registry.npmjs.org"; /** * Resolve the bearer token from an EsmRegistryAuth configuration. * Handles both direct tokens and environment variable references. * * @param auth - Registry auth configuration (optional) * @returns The resolved token, or undefined if no auth configured * @throws Error if tokenEnvVar is specified but the environment variable is not set */ export declare function resolveRegistryToken(auth?: EsmRegistryAuth): string | undefined; /** * Get the registry URL from auth configuration, falling back to default. */ export declare function getRegistryUrl(auth?: EsmRegistryAuth): string; //# sourceMappingURL=esm-auth.types.d.ts.map