@replayio-app-building/netlify-recorder 0.46.0 → 0.47.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 +6 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -225,8 +225,9 @@ function installNetworkInterceptor(mode, calls) {
225
225
  );
226
226
  }
227
227
  consumed.add(matchIdx);
228
+ const duration = call.endTime - call.startTime;
228
229
  console.log(
229
- ` [network-replay] Consumed call ${consumed.size}/${calls.length}: ${call.method} ${call.url} => ${call.responseStatus}`
230
+ ` [network-replay] Consumed call ${consumed.size}/${calls.length}: ${call.method} ${call.url} => ${call.responseStatus} (original: ${duration}ms)`
230
231
  );
231
232
  const body = call.responseBody ?? "";
232
233
  const status = call.responseStatus;
@@ -1308,7 +1309,7 @@ async function backendRequestsInsert(sql, data) {
1308
1309
  async function backendRequestsGet(sql, id) {
1309
1310
  const rows = await sql`
1310
1311
  SELECT id, blob_data_url, handler_path, commit_sha, branch_name, repository_url,
1311
- status, recording_id, error_message, created_at, updated_at
1312
+ original_request_id, status, recording_id, error_message, created_at, updated_at
1312
1313
  FROM backend_requests WHERE id = ${id}
1313
1314
  `;
1314
1315
  return rows[0] ?? null;
@@ -1324,7 +1325,7 @@ async function backendRequestsList(sql, filters) {
1324
1325
  if (filters?.status) {
1325
1326
  const rows2 = await sql`
1326
1327
  SELECT id, blob_data_url, handler_path, commit_sha, branch_name, repository_url,
1327
- status, recording_id, error_message, created_at, updated_at
1328
+ original_request_id, status, recording_id, error_message, created_at, updated_at
1328
1329
  FROM backend_requests
1329
1330
  WHERE status = ${filters.status}
1330
1331
  ORDER BY created_at DESC
@@ -1446,7 +1447,8 @@ async function ensureRequestRecording(sql, requestId, options) {
1446
1447
  commitSha: request.commit_sha,
1447
1448
  branchName: request.branch_name,
1448
1449
  repositoryUrl: request.repository_url ?? void 0,
1449
- webhookUrl: options.webhookUrl
1450
+ webhookUrl: options.webhookUrl,
1451
+ originalRequestId: request.original_request_id ?? void 0
1450
1452
  })
1451
1453
  });
1452
1454
  if (!res.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replayio-app-building/netlify-recorder",
3
- "version": "0.46.0",
3
+ "version": "0.47.0",
4
4
  "description": "Capture and replay Netlify function executions as Replay recordings",
5
5
  "type": "module",
6
6
  "exports": {