@openreplay/tracker 12.0.7-beta.1 → 12.0.7

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/cjs/app/index.js CHANGED
@@ -80,7 +80,7 @@ class App {
80
80
  this.stopCallbacks = [];
81
81
  this.commitCallbacks = [];
82
82
  this.activityState = ActivityState.NotActive;
83
- this.version = '12.0.7-beta.1'; // TODO: version compatability check inside each plugin.
83
+ this.version = '12.0.7'; // TODO: version compatability check inside each plugin.
84
84
  this.compressionThreshold = 24 * 1000;
85
85
  this.restartAttempts = 0;
86
86
  this.bc = null;
package/cjs/index.js CHANGED
@@ -97,7 +97,7 @@ class API {
97
97
  const orig = this.options.ingestPoint || index_js_1.DEFAULT_INGEST_POINT;
98
98
  req.open('POST', orig + '/v1/web/not-started');
99
99
  req.send(JSON.stringify({
100
- trackerVersion: '12.0.7-beta.1',
100
+ trackerVersion: '12.0.7',
101
101
  projectKey: this.options.projectKey,
102
102
  doNotTrack,
103
103
  reason,
@@ -208,7 +208,6 @@ class API {
208
208
  app.attachStartCallback(() => {
209
209
  const tabId = app.getTabId();
210
210
  const sessStorage = app.sessionStorage ?? window.sessionStorage;
211
- // @ts-ignore ?
212
211
  window.open = function (...args) {
213
212
  if (options.autoResetOnWindowOpen) {
214
213
  app.resetNextPageSession(true);
@@ -216,9 +215,9 @@ class API {
216
215
  if (options.resetTabOnWindowOpen) {
217
216
  sessStorage.removeItem(options.session_tabid_key || '__openreplay_tabid');
218
217
  }
219
- wOpen.call(window, ...args);
220
218
  app.resetNextPageSession(false);
221
219
  sessStorage.setItem(options.session_tabid_key || '__openreplay_tabid', tabId);
220
+ return wOpen.call(window, ...args);
222
221
  };
223
222
  });
224
223
  app.attachStopCallback(() => {
@@ -259,7 +259,8 @@ class FetchProxyHandler {
259
259
  // Otherwise, not chunked, the response is not a stream,
260
260
  // so it's completed and can be cloned for `text()` calling.
261
261
  item.readyState = 4;
262
- void this.handleResponseBody(resp.clone(), item).then((responseValue) => {
262
+ this.handleResponseBody(resp.clone(), item)
263
+ .then((responseValue) => {
263
264
  item.responseSize =
264
265
  typeof responseValue === 'string' ? responseValue.length : responseValue.byteLength;
265
266
  item.responseSizeText = (0, utils_js_1.formatByteSize)(item.responseSize);
@@ -268,6 +269,14 @@ class FetchProxyHandler {
268
269
  if (msg) {
269
270
  this.sendMessage(msg);
270
271
  }
272
+ })
273
+ .catch((e) => {
274
+ if (e.name !== 'AbortError') {
275
+ throw e;
276
+ }
277
+ else {
278
+ // ignore AbortError
279
+ }
271
280
  });
272
281
  }
273
282
  return new Proxy(resp, new ResponseProxyHandler(resp, item));
package/lib/app/index.js CHANGED
@@ -51,7 +51,7 @@ export default class App {
51
51
  this.stopCallbacks = [];
52
52
  this.commitCallbacks = [];
53
53
  this.activityState = ActivityState.NotActive;
54
- this.version = '12.0.7-beta.1'; // TODO: version compatability check inside each plugin.
54
+ this.version = '12.0.7'; // TODO: version compatability check inside each plugin.
55
55
  this.compressionThreshold = 24 * 1000;
56
56
  this.restartAttempts = 0;
57
57
  this.bc = null;
package/lib/index.js CHANGED
@@ -66,7 +66,7 @@ export default class API {
66
66
  const orig = this.options.ingestPoint || DEFAULT_INGEST_POINT;
67
67
  req.open('POST', orig + '/v1/web/not-started');
68
68
  req.send(JSON.stringify({
69
- trackerVersion: '12.0.7-beta.1',
69
+ trackerVersion: '12.0.7',
70
70
  projectKey: this.options.projectKey,
71
71
  doNotTrack,
72
72
  reason,
@@ -177,7 +177,6 @@ export default class API {
177
177
  app.attachStartCallback(() => {
178
178
  const tabId = app.getTabId();
179
179
  const sessStorage = app.sessionStorage ?? window.sessionStorage;
180
- // @ts-ignore ?
181
180
  window.open = function (...args) {
182
181
  if (options.autoResetOnWindowOpen) {
183
182
  app.resetNextPageSession(true);
@@ -185,9 +184,9 @@ export default class API {
185
184
  if (options.resetTabOnWindowOpen) {
186
185
  sessStorage.removeItem(options.session_tabid_key || '__openreplay_tabid');
187
186
  }
188
- wOpen.call(window, ...args);
189
187
  app.resetNextPageSession(false);
190
188
  sessStorage.setItem(options.session_tabid_key || '__openreplay_tabid', tabId);
189
+ return wOpen.call(window, ...args);
191
190
  };
192
191
  });
193
192
  app.attachStopCallback(() => {
@@ -232,7 +232,8 @@ export class FetchProxyHandler {
232
232
  // Otherwise, not chunked, the response is not a stream,
233
233
  // so it's completed and can be cloned for `text()` calling.
234
234
  item.readyState = 4;
235
- void this.handleResponseBody(resp.clone(), item).then((responseValue) => {
235
+ this.handleResponseBody(resp.clone(), item)
236
+ .then((responseValue) => {
236
237
  item.responseSize =
237
238
  typeof responseValue === 'string' ? responseValue.length : responseValue.byteLength;
238
239
  item.responseSizeText = formatByteSize(item.responseSize);
@@ -241,6 +242,14 @@ export class FetchProxyHandler {
241
242
  if (msg) {
242
243
  this.sendMessage(msg);
243
244
  }
245
+ })
246
+ .catch((e) => {
247
+ if (e.name !== 'AbortError') {
248
+ throw e;
249
+ }
250
+ else {
251
+ // ignore AbortError
252
+ }
244
253
  });
245
254
  }
246
255
  return new Proxy(resp, new ResponseProxyHandler(resp, item));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openreplay/tracker",
3
3
  "description": "The OpenReplay tracker main package",
4
- "version": "12.0.7-beta.1",
4
+ "version": "12.0.7",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"