@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/cjs/entry.js CHANGED
@@ -4737,7 +4737,7 @@ class App {
4737
4737
  this.stopCallbacks = [];
4738
4738
  this.commitCallbacks = [];
4739
4739
  this.activityState = ActivityState.NotActive;
4740
- this.version = '15.2.1'; // TODO: version compatability check inside each plugin.
4740
+ this.version = '15.3.1'; // TODO: version compatability check inside each plugin.
4741
4741
  this.socketMode = false;
4742
4742
  this.compressionThreshold = 24 * 1000;
4743
4743
  this.bc = null;
@@ -5375,7 +5375,6 @@ class App {
5375
5375
  }
5376
5376
  }
5377
5377
  this.emptyBatchCounter = 0;
5378
- console.log('messages', this.messages.join(', '));
5379
5378
  try {
5380
5379
  requestIdleCb(() => {
5381
5380
  this.messages.unshift(Timestamp(this.timestamp()), TabData(this.session.getTabId()));
@@ -7347,12 +7346,14 @@ function Timing (app, opts) {
7347
7346
  if (shouldSkip) {
7348
7347
  return;
7349
7348
  }
7350
- const failed = entry.responseEnd === 0
7351
- || (entry.transferSize === 0 && entry.decodedBodySize === 0);
7349
+ const failed = entry.responseEnd === 0 || (entry.transferSize === 0 && entry.decodedBodySize === 0);
7350
+ const entryName = options.resourceNameSanitizer
7351
+ ? options.resourceNameSanitizer(entry.name)
7352
+ : entry.name;
7352
7353
  if (failed) {
7353
- app.send(ResourceTiming(entry.startTime + getTimeOrigin(), 0, 0, 0, 0, 0, entry.name, entry.initiatorType, 0, true));
7354
+ app.send(ResourceTiming(entry.startTime + getTimeOrigin(), 0, 0, 0, 0, 0, entryName, entry.initiatorType, 0, true));
7354
7355
  }
7355
- 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,
7356
+ 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,
7356
7357
  // @ts-ignore
7357
7358
  (entry.responseStatus && entry.responseStatus === 304) || entry.transferSize === 0));
7358
7359
  }
@@ -9372,7 +9373,7 @@ class API {
9372
9373
  this.signalStartIssue = (reason, missingApi) => {
9373
9374
  const doNotTrack = this.checkDoNotTrack();
9374
9375
  console.log("Tracker couldn't start due to:", JSON.stringify({
9375
- trackerVersion: '15.2.1',
9376
+ trackerVersion: '15.3.1',
9376
9377
  projectKey: this.options.projectKey,
9377
9378
  doNotTrack,
9378
9379
  reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,