fix(artifacts): diagnose unpacked ASAR integrity failures

This commit is contained in:
morluto
2026-07-13 17:00:37 +08:00
parent e933489fb5
commit a504342d2b
9 changed files with 68 additions and 6 deletions
+7
View File
@@ -11,6 +11,7 @@ export interface ArtifactEntry {
readonly encrypted: boolean;
readonly byteOffset: number | null;
readonly declaredSha256: string | null;
readonly unpacked: boolean;
readonly limitations: readonly string[];
readonly adapterKey: string;
/** Filesystem identity captured during traversal, when supplied by an adapter. */
@@ -51,6 +52,12 @@ export class ArtifactReaderFailure extends Error {
| "unavailable",
message: string,
options?: ErrorOptions,
readonly details?: Readonly<{
logicalPath: string;
declaredSha256: string | null;
calculatedSha256: string | null;
unpacked: boolean;
}>,
) {
super(message, options);
this.name = "ArtifactReaderFailure";