@openreplay/tracker 10.0.2 → 10.0.4

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 (75) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/cjs/app/index.js +1 -1
  3. package/cjs/index.js +1 -1
  4. package/cjs/modules/Network/fetchProxy.js +4 -2
  5. package/cjs/utils.js +16 -2
  6. package/coverage/clover.xml +1575 -733
  7. package/coverage/coverage-final.json +22 -14
  8. package/coverage/lcov-report/index.html +60 -45
  9. package/coverage/lcov-report/main/app/canvas.ts.html +475 -0
  10. package/coverage/lcov-report/main/app/guards.ts.html +5 -2
  11. package/coverage/lcov-report/main/app/index.html +34 -19
  12. package/coverage/lcov-report/main/app/index.ts.html +1086 -45
  13. package/coverage/lcov-report/main/app/logger.ts.html +1 -1
  14. package/coverage/lcov-report/main/app/messages.gen.ts.html +179 -146
  15. package/coverage/lcov-report/main/app/nodes.ts.html +1 -1
  16. package/coverage/lcov-report/main/app/observer/iframe_observer.ts.html +1 -1
  17. package/coverage/lcov-report/main/app/observer/iframe_offsets.ts.html +1 -1
  18. package/coverage/lcov-report/main/app/observer/index.html +1 -1
  19. package/coverage/lcov-report/main/app/observer/shadow_root_observer.ts.html +1 -1
  20. package/coverage/lcov-report/main/app/observer/top_observer.ts.html +1 -1
  21. package/coverage/lcov-report/main/app/sanitizer.ts.html +1 -1
  22. package/coverage/lcov-report/main/app/session.ts.html +1 -1
  23. package/coverage/lcov-report/main/app/ticker.ts.html +1 -1
  24. package/coverage/lcov-report/main/index.html +20 -20
  25. package/coverage/lcov-report/main/index.ts.html +274 -100
  26. package/coverage/lcov-report/main/modules/Network/beaconProxy.ts.html +19 -19
  27. package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +97 -97
  28. package/coverage/lcov-report/main/modules/Network/index.html +65 -65
  29. package/coverage/lcov-report/main/modules/Network/index.ts.html +33 -33
  30. package/coverage/lcov-report/main/modules/Network/networkMessage.ts.html +82 -73
  31. package/coverage/lcov-report/main/modules/Network/utils.ts.html +34 -34
  32. package/coverage/lcov-report/main/modules/Network/xhrProxy.ts.html +13 -13
  33. package/coverage/lcov-report/main/modules/attributeSender.ts.html +1 -1
  34. package/coverage/lcov-report/main/modules/axiosSpy.ts.html +1 -1
  35. package/coverage/lcov-report/main/modules/conditionsManager.ts.html +799 -0
  36. package/coverage/lcov-report/main/modules/connection.ts.html +1 -1
  37. package/coverage/lcov-report/main/modules/console.ts.html +1 -1
  38. package/coverage/lcov-report/main/modules/constructedStyleSheets.ts.html +1 -1
  39. package/coverage/lcov-report/main/modules/cssrules.ts.html +1 -1
  40. package/coverage/lcov-report/main/modules/exception.ts.html +1 -1
  41. package/coverage/lcov-report/main/modules/featureFlags.ts.html +10 -7
  42. package/coverage/lcov-report/main/modules/focus.ts.html +1 -1
  43. package/coverage/lcov-report/main/modules/fonts.ts.html +1 -1
  44. package/coverage/lcov-report/main/modules/img.ts.html +1 -1
  45. package/coverage/lcov-report/main/modules/index.html +27 -12
  46. package/coverage/lcov-report/main/modules/input.ts.html +1 -1
  47. package/coverage/lcov-report/main/modules/mouse.ts.html +1 -1
  48. package/coverage/lcov-report/main/modules/network.ts.html +2 -2
  49. package/coverage/lcov-report/main/modules/performance.ts.html +1 -1
  50. package/coverage/lcov-report/main/modules/scroll.ts.html +1 -1
  51. package/coverage/lcov-report/main/modules/selection.ts.html +1 -1
  52. package/coverage/lcov-report/main/modules/tabs.ts.html +1 -1
  53. package/coverage/lcov-report/main/modules/timing.ts.html +1 -1
  54. package/coverage/lcov-report/main/modules/userTesting/SignalManager.ts.html +370 -0
  55. package/coverage/lcov-report/main/modules/userTesting/dnd.ts.html +10 -22
  56. package/coverage/lcov-report/main/modules/userTesting/index.html +57 -27
  57. package/coverage/lcov-report/main/modules/userTesting/index.ts.html +814 -115
  58. package/coverage/lcov-report/main/modules/userTesting/recorder.ts.html +136 -67
  59. package/coverage/lcov-report/main/modules/userTesting/styles.ts.html +111 -39
  60. package/coverage/lcov-report/main/modules/userTesting/utils.ts.html +364 -0
  61. package/coverage/lcov-report/main/modules/viewport.ts.html +1 -1
  62. package/coverage/lcov-report/main/utils.ts.html +101 -59
  63. package/coverage/lcov-report/webworker/BatchWriter.ts.html +1 -1
  64. package/coverage/lcov-report/webworker/MessageEncoder.gen.ts.html +17 -5
  65. package/coverage/lcov-report/webworker/PrimitiveEncoder.ts.html +1 -1
  66. package/coverage/lcov-report/webworker/QueueSender.ts.html +1 -1
  67. package/coverage/lcov-report/webworker/index.html +9 -9
  68. package/coverage/lcov-report/webworker/index.ts.html +15 -9
  69. package/coverage/lcov.info +2699 -1150
  70. package/lib/app/index.js +1 -1
  71. package/lib/common/tsconfig.tsbuildinfo +1 -1
  72. package/lib/index.js +1 -1
  73. package/lib/modules/Network/fetchProxy.js +4 -2
  74. package/lib/utils.js +16 -2
  75. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 10.0.3
2
+
3
+ - some safety guards for iframe components
4
+
1
5
  # 10.0.2
2
6
 
3
7
  - fix default ignore headers
package/cjs/app/index.js CHANGED
@@ -39,7 +39,7 @@ class App {
39
39
  this.stopCallbacks = [];
40
40
  this.commitCallbacks = [];
41
41
  this.activityState = ActivityState.NotActive;
42
- this.version = '10.0.2'; // TODO: version compatability check inside each plugin.
42
+ this.version = '10.0.4'; // TODO: version compatability check inside each plugin.
43
43
  this.compressionThreshold = 24 * 1000;
44
44
  this.restartAttempts = 0;
45
45
  this.bc = null;
package/cjs/index.js CHANGED
@@ -162,7 +162,7 @@ class API {
162
162
  // no-cors issue only with text/plain or not-set Content-Type
163
163
  // req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
164
164
  req.send(JSON.stringify({
165
- trackerVersion: '10.0.2',
165
+ trackerVersion: '10.0.4',
166
166
  projectKey: options.projectKey,
167
167
  doNotTrack,
168
168
  // TODO: add precise reason (an exact API missing)
@@ -117,9 +117,11 @@ class FetchProxyHandler {
117
117
  apply(target, _, argsList) {
118
118
  const input = argsList[0];
119
119
  const init = argsList[1];
120
- // @ts-ignore
121
- if (!(input === null || input === void 0 ? void 0 : input.url) && !input)
120
+ if (!input ||
121
+ // @ts-ignore
122
+ (typeof input !== 'string' && !(input === null || input === void 0 ? void 0 : input.url))) {
122
123
  return target.apply(window, argsList);
124
+ }
123
125
  const isORUrl = input instanceof URL || typeof input === 'string'
124
126
  ? this.isServiceUrl(String(input))
125
127
  : this.isServiceUrl(String(input.url));
package/cjs/utils.js CHANGED
@@ -121,12 +121,26 @@ function createMutationObserver(cb) {
121
121
  exports.createMutationObserver = createMutationObserver;
122
122
  function createEventListener(target, event, cb, capture) {
123
123
  const safeAddEventListener = ngSafeBrowserMethod('addEventListener');
124
- target[safeAddEventListener](event, cb, capture);
124
+ try {
125
+ target[safeAddEventListener](event, cb, capture);
126
+ }
127
+ catch (e) {
128
+ console.debug(
129
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
130
+ `Openreplay: ${e.messages}; if this error is caused by an IframeObserver, ignore it`);
131
+ }
125
132
  }
126
133
  exports.createEventListener = createEventListener;
127
134
  function deleteEventListener(target, event, cb, capture) {
128
135
  const safeRemoveEventListener = ngSafeBrowserMethod('removeEventListener');
129
- target[safeRemoveEventListener](event, cb, capture);
136
+ try {
137
+ target[safeRemoveEventListener](event, cb, capture);
138
+ }
139
+ catch (e) {
140
+ console.debug(
141
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
142
+ `Openreplay: ${e.messages}; if this error is caused by an IframeObserver, ignore it`);
143
+ }
130
144
  }
131
145
  exports.deleteEventListener = deleteEventListener;
132
146
  /**