UNPKG

everything-dev

Version:

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

19 lines (17 loc) • 884 B
import { isVerifyError } from "../verify/engine.mjs"; //#region src/services/deploy/manifest-verify.ts function manifestDocumentUrl(base, manifest) { return `${base.replace(/\/$/, "")}/${manifest.replace(/^\//, "")}`; } function reasonOf(error) { if (!isVerifyError(error)) return error instanceof Error ? error.message : String(error); if (error._tag === "IntegrityMismatch") return `integrity mismatch for ${error.url} (expected ${error.expected}, computed ${error.actual})`; if (error._tag === "ProvenanceUnknown") { if (error.status !== void 0) return `manifest fetch failed: ${error.status}`; return `manifest fetch failed: ${error.cause instanceof Error ? error.cause.message : String(error.cause)}`; } return `signature invalid for ${error.url}: ${error.reason}`; } //#endregion export { manifestDocumentUrl, reasonOf }; //# sourceMappingURL=manifest-verify.mjs.map