@replayio-app-building/netlify-recorder 0.56.0 → 0.57.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -984,7 +984,7 @@ async function finishRequest(requestContext, callbacks, response, options) {
984
984
  body: typeof response.body === "string" ? response.body : void 0
985
985
  },
986
986
  originalRequestId: options?.originalRequestId,
987
- packageVersion: "0.56.0"
987
+ packageVersion: "0.57.0"
988
988
  };
989
989
  const blobData = redactBlobData(rawBlobData);
990
990
  const blobContent = JSON.stringify(blobData);
@@ -1549,7 +1549,6 @@ async function createRequestRecording(blobUrlOrData, handlerPath, requestInfo, p
1549
1549
 
1550
1550
  // src/backendRequests.ts
1551
1551
  import { gzipSync } from "zlib";
1552
- import { createHash } from "crypto";
1553
1552
  import { UTApi } from "uploadthing/server";
1554
1553
  async function backendRequestsEnsureTable(sql) {
1555
1554
  await sql`
@@ -1681,9 +1680,9 @@ async function uploadBlobData(blobData, requestId) {
1681
1680
  const file = Object.assign(blob, { name: `blob-${requestId}.json.gz` });
1682
1681
  const result = await utapi.uploadFiles(file);
1683
1682
  if (result.error || !result.data?.ufsUrl) {
1684
- const tokenHash = createHash("sha256").update(token).digest("hex").slice(0, 8);
1683
+ const preview = token.length > 8 ? `${token.slice(0, 4)}\u2026${token.slice(-4)}` : "(short)";
1685
1684
  console.error(
1686
- `netlify-recorder: uploadBlobData failed for request ${requestId} (token length=${token.length}, hash=${tokenHash}\u2026): ${JSON.stringify(result.error ?? "no URL returned")}`
1685
+ `netlify-recorder: uploadBlobData failed for request ${requestId} (token: ${preview}, length=${token.length}): ${JSON.stringify(result.error ?? "no URL returned")}`
1687
1686
  );
1688
1687
  throw new Error(
1689
1688
  `Failed to upload blob data for request ${requestId}: ${JSON.stringify(result.error ?? "no URL returned")}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replayio-app-building/netlify-recorder",
3
- "version": "0.56.0",
3
+ "version": "0.57.0",
4
4
  "description": "Capture and replay Netlify function executions as Replay recordings",
5
5
  "type": "module",
6
6
  "exports": {