everything-dev
Version:
A consolidated product package for building Module Federation apps with oRPC APIs.
24 lines • 1.06 kB
text/typescript
//#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[];
}>;
//#endregion
export { IntegrityRegistry, computeSriHash, computeSriHashForUrl, resolveEntryUrl, verifyConfigAgainstChain, verifySriForUrl };
//# sourceMappingURL=integrity.d.cts.map