histoire
Version:
A fast story book powered by Vite
43 lines • 1.94 kB
TypeScript
import type { PluginDetail } from '@histoire/shared';
import { z } from 'zod';
/** Packument parser also runs on disk cache reads. */
export declare const packumentSchema: z.ZodPipe<z.ZodObject<{
name: z.ZodString;
'dist-tags': z.ZodObject<{
latest: z.ZodString;
}, z.core.$strip>;
versions: z.ZodRecord<z.ZodString, z.ZodUnknown>;
time: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>, z.ZodTransform<{
name: string;
'dist-tags': {
latest: string;
};
time?: Record<string, string>;
versions: {
[k: string]: {};
};
}, {
name: string;
'dist-tags': {
latest: string;
};
versions: Record<string, unknown>;
time?: Record<string, string>;
}>>;
/** Parsed packument without any executable content. */
export type RegistryPackument = z.infer<typeof packumentSchema>;
/** Declarative version metadata exported for update/planner consumers. */
export interface RegistryRelease {
/** Exact published version. */ version: string;
/** Validated manifest and registry attributes for this version. */ detail: PluginDetail;
/** Optional peer package names, which do not require an absent install. */ optionalPeers: string[];
/** Deprecated releases cannot be offered as updates. */ deprecated: boolean;
}
/** Read published version without trusting its package identity or official claims. */
export declare function registryRelease(packument: RegistryPackument, version: string): RegistryRelease | undefined;
/** Latest valid manifest plus bounded version metadata; never evaluate package code. */
export declare function registryDetail(packument: RegistryPackument): RegistryRelease | undefined;
/** All valid version-specific releases, memoized through the exact-version reader. */
export declare function registryReleases(packument: RegistryPackument): RegistryRelease[];
//# sourceMappingURL=registry-entry.d.ts.map