histoire
Version:
A fast story book powered by Vite
60 lines • 2.5 kB
TypeScript
import type { CatalogPage, CatalogQuery, MarketplacePrefs, PluginDetail } from '@histoire/shared';
import type { Context } from '../../context.js';
import type { RegistryOptions } from './registry.js';
/** Catalog reads need only a root; full contexts add generation-scoped installed state. */
export type CatalogContext = Pick<Context, 'root'> & Partial<Pick<Context, 'pluginInventory'>>;
/** Server-owned catalog with offline official fallback and consent-gated registry reads. */
export declare function createCatalogService(ctx: CatalogContext, options?: RegistryOptions): {
catalog: (input: CatalogQuery) => Promise<CatalogPage>;
detail: (id: string, prefs: MarketplacePrefs) => Promise<PluginDetail>;
/** Exact metadata fetch shared by update checks, migrations and failure advice. */
packument: (id: string) => Promise<import("./cache.js").CacheResult<{
name: string;
'dist-tags': {
latest: string;
};
time?: Record<string, string>;
versions: {
[k: string]: {};
};
}>>;
/** Read-only planning lookup through the same registry configuration and identity guards. */
cachedPackument: (id: string) => Promise<import("./cache.js").CacheResult<{
name: string;
'dist-tags': {
latest: string;
};
time?: Record<string, string>;
versions: {
[k: string]: {};
};
}>>;
};
/** Shared catalog export for inventory, planning and jobs. */
export declare function getCatalogService(ctx: CatalogContext, options?: RegistryOptions): {
catalog: (input: CatalogQuery) => Promise<CatalogPage>;
detail: (id: string, prefs: MarketplacePrefs) => Promise<PluginDetail>;
/** Exact metadata fetch shared by update checks, migrations and failure advice. */
packument: (id: string) => Promise<import("./cache.js").CacheResult<{
name: string;
'dist-tags': {
latest: string;
};
time?: Record<string, string>;
versions: {
[k: string]: {};
};
}>>;
/** Read-only planning lookup through the same registry configuration and identity guards. */
cachedPackument: (id: string) => Promise<import("./cache.js").CacheResult<{
name: string;
'dist-tags': {
latest: string;
};
time?: Record<string, string>;
versions: {
[k: string]: {};
};
}>>;
};
//# sourceMappingURL=service.d.ts.map