import { Registry, RegistryIndex } from "./types.js"; export declare class RegistryManager { private registries; private readonly filePath; private readonly configDir; private readonly defaultName; private readonly defaultIndexUrl; private readonly minIndexRefreshMs; /** * Constructs a RegistryManager and loads registries from file. * Ensures config directory exists. */ constructor(configPath?: string); private getRegistryCacheDir; private getRegistryIndexPath; private shouldRefreshIndex; private normalizeRepoUrl; private fetchAndCacheIndex; /** * Ensures that all registries have their index files downloaded in the cache. */ ensureIndexes(): Promise; /** * Initializes the registry list with the default registry. * Overwrites any existing registries in memory and file. */ private initialize; /** * Loads registries from file. If file is missing or invalid, initializes defaults. */ private load; /** * Saves registries to file atomically. Throws on error. */ private save; /** * Returns a copy of all registries. */ list(): Registry[]; /** * Adds a new registry. Throws if registry name already exists or is invalid. * @param registry Registry to add */ add(registry: Registry): Promise; /** * Removes a registry by name. Throws if name is default or not found. * @param name Name of registry to remove */ remove(name: string): void; /** * Validates the index data against the schema * @param indexData * @returns Whether the index data is valid */ validateIndexSchema(indexData: RegistryIndex): boolean; }