@cedarai/session-replay-sdk 0.6.0 → 0.6.2

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 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -150,7 +150,7 @@ var Transport = class {
150
150
  const json = JSON.stringify(payload);
151
151
  gzipCompress(json).then((compressed) => {
152
152
  if (this.queue.length > 0) {
153
- this.pendingBeaconBlob = new Blob([compressed], { type: "application/octet-stream" });
153
+ this.pendingBeaconBlob = new Blob([compressed], { type: "text/plain" });
154
154
  this.pendingBeaconUrl = `${this.config.serverUrl}/api/ingest?encoding=gzip`;
155
155
  }
156
156
  }).catch(() => {
@@ -366,7 +366,7 @@ var NetworkCapture = class {
366
366
  }
367
367
  // ── Fetch interception ────────────────────────────────────────
368
368
  interceptFetch() {
369
- this.originalFetch = globalThis.fetch;
369
+ this.originalFetch = globalThis.fetch.bind(globalThis);
370
370
  globalThis.fetch = async (input, init) => {
371
371
  const url = typeof input === "string" ? input : input instanceof URL ? input.href : input.url;
372
372
  if (url.startsWith(this.serverUrl)) {
@@ -665,7 +665,7 @@ var CedarReplay = {
665
665
  CedarReplay.stop();
666
666
  }
667
667
  config = initConfig;
668
- const originalFetch = globalThis.fetch;
668
+ const originalFetch = globalThis.fetch.bind(globalThis);
669
669
  transport = new Transport(
670
670
  {
671
671
  serverUrl: config.serverUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarai/session-replay-sdk",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",