From 6c3f3aaa107aa8c6f7f83c2c50ff039922a448b6 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Thu, 5 Sep 2024 14:27:37 -0400 Subject: [PATCH] ? --- dist/index.js | 11 ++++++++++- pnpm-lock.yaml | 6 +++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 729387e..fe555fa 100644 --- a/dist/index.js +++ b/dist/index.js @@ -90887,7 +90887,7 @@ const external_node_dns_promises_namespaceObject = __WEBPACK_EXTERNAL_createRequ var cache = __nccwpck_require__(6878); ;// CONCATENATED MODULE: external "node:child_process" const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:child_process"); -;// CONCATENATED MODULE: ./node_modules/.pnpm/github.com+DeterminateSystems+detsys-ts@ba6925e6787ee975f5102b50fa7c9350bfd6b3f4_ck2sk6yei7uoqbpevv6lntwyfm/node_modules/detsys-ts/dist/index.js +;// CONCATENATED MODULE: ./node_modules/.pnpm/github.com+DeterminateSystems+detsys-ts@587b7693c9842add262f500274f83458ca5ce770_6sj4em4j5br4ek4v5n2gpc224m/node_modules/detsys-ts/dist/index.js var __defProp = Object.defineProperty; var __export = (target, all) => { for (var name in all) @@ -91734,18 +91734,27 @@ async function verifyEtag(filename, expectedEtag) { try { const parsedEtag = parseEtag(expectedEtag); if (parsedEtag === void 0) { + core.info( + `Verifying etag failed: etag did not parse: ${expectedEtag}` + ); return "corrupt"; } const fd = await (0,promises_namespaceObject.open)(filename, "r"); let actualEtag; if (parsedEtag.chunks === void 0) { + core.debug(`Verifying etag with a simple md5`); actualEtag = await calculateMd5Etag(fd); } else { + core.debug(`Verifying etag with a chunked md5 from s3`); actualEtag = await calculateS3ChunkedEtag(fd, parsedEtag.chunks); } + await fd.close(); if (expectedEtag === actualEtag) { return "valid"; } else { + core.info( + `Verifying etag failed: etag mismatch. Wanted ${expectedEtag}, got ${actualEtag}` + ); return "corrupt"; } } catch (e) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7bd36b2..1ad55d0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ dependencies: version: 5.1.1 detsys-ts: specifier: github:DeterminateSystems/detsys-ts#verify-etag - version: github.com/DeterminateSystems/detsys-ts/ba6925e6787ee975f5102b50fa7c9350bfd6b3f4 + version: github.com/DeterminateSystems/detsys-ts/587b7693c9842add262f500274f83458ca5ce770 got: specifier: ^14.3.0 version: 14.3.0 @@ -5753,10 +5753,10 @@ packages: engines: { node: ">=10" } dev: true - github.com/DeterminateSystems/detsys-ts/ba6925e6787ee975f5102b50fa7c9350bfd6b3f4: + github.com/DeterminateSystems/detsys-ts/587b7693c9842add262f500274f83458ca5ce770: resolution: { - tarball: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/ba6925e6787ee975f5102b50fa7c9350bfd6b3f4, + tarball: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/587b7693c9842add262f500274f83458ca5ce770, } name: detsys-ts version: 1.0.0