everything-dev
Version:
A consolidated product package for building Module Federation apps with oRPC APIs.
46 lines • 2.11 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 const SriVerificationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
readonly _tag: "SriVerificationError";
} & Readonly<A>;
declare class SriVerificationError extends SriVerificationError_base<{
readonly detail: string;
}> {
constructor(message: string);
get message(): 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;
/** A plain pipeline-state value (e.g. the built MF container name). */
value?: string;
valueField?: string;
/** Dotted paths deleted after applying this entry — clears stale
* pipeline-state fields (e.g. the retired flat `manifest` pointer). */
removeFields?: string[];
}
declare function applyDeployResults(config: Record<string, unknown>, results: DeployResultEntry[]): Record<string, unknown>;
//#endregion
export { DeployResultEntry, IntegrityRegistry, SriVerificationError, applyDeployResults, computeSriHash, computeSriHashForUrl, resolveEntryUrl, verifyConfigAgainstChain, verifySriForUrl };
//# sourceMappingURL=integrity.d.cts.map