@monoscopetech/browser 0.5.7 → 0.5.8

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/replay.js CHANGED
@@ -112,7 +112,7 @@ export class MonoscopeReplay {
112
112
  this.isSaving = true;
113
113
  const { replayEventsBaseUrl, projectId } = this.config;
114
114
  // Construct base URL
115
- let baseUrl = replayEventsBaseUrl || "https://app.monoscope.tech";
115
+ let baseUrl = replayEventsBaseUrl || "https://app.apitoolkit.io";
116
116
  baseUrl = `${baseUrl}/rrweb/${projectId}`;
117
117
  // Get events to send and clear buffer
118
118
  const eventsToSend = [...this.events];
@@ -141,15 +141,16 @@ export class MonoscopeReplay {
141
141
  "Content-Type": "application/json",
142
142
  },
143
143
  body: JSON.stringify(payload),
144
- keepalive: true,
145
144
  });
146
145
  if (!response.ok) {
146
+ console.log(response);
147
147
  throw new Error(`Failed to save replay events: ${response.status} ${response.statusText}`);
148
148
  }
149
149
  console.log(`Successfully saved ${eventsToSend.length} replay events`);
150
150
  }
151
151
  }
152
152
  catch (error) {
153
+ console.log(error);
153
154
  console.error("Failed to save replay events:", error);
154
155
  this.events = [...eventsToSend, ...this.events];
155
156
  if (this.events.length > MAX_RETRY_EVENTS) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monoscopetech/browser",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",