@openreplay/tracker 15.2.1 → 15.3.1

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/lib/index.js CHANGED
@@ -4733,7 +4733,7 @@ class App {
4733
4733
  this.stopCallbacks = [];
4734
4734
  this.commitCallbacks = [];
4735
4735
  this.activityState = ActivityState.NotActive;
4736
- this.version = '15.2.1'; // TODO: version compatability check inside each plugin.
4736
+ this.version = '15.3.1'; // TODO: version compatability check inside each plugin.
4737
4737
  this.socketMode = false;
4738
4738
  this.compressionThreshold = 24 * 1000;
4739
4739
  this.bc = null;
@@ -5371,7 +5371,6 @@ class App {
5371
5371
  }
5372
5372
  }
5373
5373
  this.emptyBatchCounter = 0;
5374
- console.log('messages', this.messages.join(', '));
5375
5374
  try {
5376
5375
  requestIdleCb(() => {
5377
5376
  this.messages.unshift(Timestamp(this.timestamp()), TabData(this.session.getTabId()));
@@ -7343,12 +7342,14 @@ function Timing (app, opts) {
7343
7342
  if (shouldSkip) {
7344
7343
  return;
7345
7344
  }
7346
- const failed = entry.responseEnd === 0
7347
- || (entry.transferSize === 0 && entry.decodedBodySize === 0);
7345
+ const failed = entry.responseEnd === 0 || (entry.transferSize === 0 && entry.decodedBodySize === 0);
7346
+ const entryName = options.resourceNameSanitizer
7347
+ ? options.resourceNameSanitizer(entry.name)
7348
+ : entry.name;
7348
7349
  if (failed) {
7349
- app.send(ResourceTiming(entry.startTime + getTimeOrigin(), 0, 0, 0, 0, 0, entry.name, entry.initiatorType, 0, true));
7350
+ app.send(ResourceTiming(entry.startTime + getTimeOrigin(), 0, 0, 0, 0, 0, entryName, entry.initiatorType, 0, true));
7350
7351
  }
7351
- app.send(ResourceTiming(entry.startTime + getTimeOrigin(), entry.duration, entry.responseStart && entry.startTime ? entry.responseStart - entry.startTime : 0, entry.transferSize > entry.encodedBodySize ? entry.transferSize - entry.encodedBodySize : 0, entry.encodedBodySize || 0, entry.decodedBodySize || 0, entry.name, entry.initiatorType, entry.transferSize,
7352
+ app.send(ResourceTiming(entry.startTime + getTimeOrigin(), entry.duration, entry.responseStart && entry.startTime ? entry.responseStart - entry.startTime : 0, entry.transferSize > entry.encodedBodySize ? entry.transferSize - entry.encodedBodySize : 0, entry.encodedBodySize || 0, entry.decodedBodySize || 0, entryName, entry.initiatorType, entry.transferSize,
7352
7353
  // @ts-ignore
7353
7354
  (entry.responseStatus && entry.responseStatus === 304) || entry.transferSize === 0));
7354
7355
  }
@@ -9368,7 +9369,7 @@ class API {
9368
9369
  this.signalStartIssue = (reason, missingApi) => {
9369
9370
  const doNotTrack = this.checkDoNotTrack();
9370
9371
  console.log("Tracker couldn't start due to:", JSON.stringify({
9371
- trackerVersion: '15.2.1',
9372
+ trackerVersion: '15.3.1',
9372
9373
  projectKey: this.options.projectKey,
9373
9374
  doNotTrack,
9374
9375
  reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,