@replayio-app-building/netlify-recorder 0.27.0 → 0.29.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.
- package/dist/index.js +8 -9
- package/package.json +5 -6
package/dist/index.js
CHANGED
|
@@ -602,7 +602,13 @@ function createRecordingRequestHandler(handler, options) {
|
|
|
602
602
|
);
|
|
603
603
|
}
|
|
604
604
|
setCurrentRequestId(null);
|
|
605
|
-
|
|
605
|
+
return {
|
|
606
|
+
...errorResponse,
|
|
607
|
+
headers: {
|
|
608
|
+
...errorResponse.headers,
|
|
609
|
+
"X-Replay-Request-Id": requestId
|
|
610
|
+
}
|
|
611
|
+
};
|
|
606
612
|
}
|
|
607
613
|
reqContext.cleanup();
|
|
608
614
|
setCurrentRequestId(null);
|
|
@@ -940,6 +946,7 @@ async function createRequestRecording(blobUrlOrData, handlerPath, requestInfo) {
|
|
|
940
946
|
}
|
|
941
947
|
|
|
942
948
|
// src/backendRequests.ts
|
|
949
|
+
import { UTApi } from "uploadthing/server";
|
|
943
950
|
async function backendRequestsEnsureTable(sql) {
|
|
944
951
|
await sql`
|
|
945
952
|
CREATE TABLE IF NOT EXISTS backend_requests (
|
|
@@ -1050,14 +1057,6 @@ async function backendRequestsUpdateStatus(sql, id, status, recordingId, errorMe
|
|
|
1050
1057
|
}
|
|
1051
1058
|
}
|
|
1052
1059
|
async function uploadBlobData(blobData, requestId) {
|
|
1053
|
-
let UTApi;
|
|
1054
|
-
try {
|
|
1055
|
-
({ UTApi } = await Function('return import("uploadthing/server")')());
|
|
1056
|
-
} catch {
|
|
1057
|
-
throw new Error(
|
|
1058
|
-
"netlify-recorder requires the 'uploadthing' package. Install it with: npm install uploadthing"
|
|
1059
|
-
);
|
|
1060
|
-
}
|
|
1061
1060
|
const token = process.env.UPLOADTHING_TOKEN;
|
|
1062
1061
|
if (!token) {
|
|
1063
1062
|
throw new Error(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@replayio-app-building/netlify-recorder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "Capture and replay Netlify function executions as Replay recordings",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -17,16 +17,15 @@
|
|
|
17
17
|
"check": "tsc --noEmit",
|
|
18
18
|
"prepublishOnly": "tsup"
|
|
19
19
|
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"uploadthing": "^7.7.4"
|
|
22
|
+
},
|
|
20
23
|
"peerDependencies": {
|
|
21
|
-
"@replayio/app-building": ">=1.0.0"
|
|
22
|
-
"uploadthing": ">=7.0.0"
|
|
24
|
+
"@replayio/app-building": ">=1.0.0"
|
|
23
25
|
},
|
|
24
26
|
"peerDependenciesMeta": {
|
|
25
27
|
"@replayio/app-building": {
|
|
26
28
|
"optional": true
|
|
27
|
-
},
|
|
28
|
-
"uploadthing": {
|
|
29
|
-
"optional": true
|
|
30
29
|
}
|
|
31
30
|
},
|
|
32
31
|
"devDependencies": {
|