UNPKG

everything-dev

Version:

A consolidated product package for building Module Federation apps with oRPC APIs.

40 lines 1.73 kB
//#region src/integrity.d.ts interface SriUrlOptions { resolveEntryUrl?: boolean; maxBytes?: number; } declare function computeSriHash(content: string | Buffer): string; declare function computeSriHashForUrl(url: string, options?: SriUrlOptions): Promise<string | null>; declare function resolveEntryUrl(url: string): string; declare function verifySriForUrl(url: string, expectedIntegrity: string, options?: SriUrlOptions): Promise<void>; declare class IntegrityRegistry { private hashes; register(url: string, integrity: string): void; registerEntry(baseUrl: string, integrity: string): void; get(url: string): string | undefined; has(url: string): boolean; entries(): IterableIterator<[string, string]>; } declare function verifyConfigAgainstChain(localConfig: Record<string, unknown>, bosUrl: string): Promise<{ verified: boolean; mismatches: string[]; }>; interface DeployResultEntry { url: string; integrity?: string; urlField: string; integrityField?: string; } declare function reportDeployResult(opts: { url: string; integrity?: string | null; bosConfigPath: string; urlField: string; integrityField?: string; }): void; declare function parseDeployLines(output: string): DeployResultEntry[]; declare function applyDeployResults(config: Record<string, unknown>, results: DeployResultEntry[]): Record<string, unknown>; declare function findPluginKey(bosConfigPath: string, pluginDir: string): string | null; //#endregion export { DeployResultEntry, IntegrityRegistry, applyDeployResults, computeSriHash, computeSriHashForUrl, findPluginKey, parseDeployLines, reportDeployResult, resolveEntryUrl, verifyConfigAgainstChain, verifySriForUrl }; //# sourceMappingURL=integrity.d.mts.map