histoire
Version:
A fast story book powered by Vite
43 lines • 1.48 kB
TypeScript
/** External registry controls; production always uses a five-second deadline. */
export interface RegistryOptions {
/** Test endpoint overriding default and scoped npm registry settings. */ registryUrl?: string;
/** Request and complete catalog-refresh deadline in milliseconds. */ timeoutMs?: number;
/** Cache clock, allowing deterministic TTL tests. */ now?: () => number;
}
/** npm-only metadata client: validated, deduplicated, cached, bounded and code-free. */
export declare function createRegistryClient(root: string, options?: RegistryOptions): {
packument: (id: string, signal?: AbortSignal) => Promise<import("./cache.js").CacheResult<{
name: string;
'dist-tags': {
latest: string;
};
time?: Record<string, string>;
versions: {
[k: string]: {};
};
}>>;
cachedPackument: (id: string) => Promise<import("./cache.js").CacheResult<{
name: string;
'dist-tags': {
latest: string;
};
time?: Record<string, string>;
versions: {
[k: string]: {};
};
}>>;
catalog: () => Promise<{
packuments: {
name: string;
'dist-tags': {
latest: string;
};
time?: Record<string, string>;
versions: {
[k: string]: {};
};
}[];
stale: boolean;
}>;
};
//# sourceMappingURL=registry.d.ts.map