@openreplay/tracker 10.0.0 → 10.0.3
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/CHANGELOG.md +14 -2
- package/cjs/app/index.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/modules/Network/fetchProxy.js +3 -0
- package/cjs/modules/Network/networkMessage.js +6 -3
- package/cjs/modules/network.js +2 -2
- package/cjs/utils.js +16 -2
- package/coverage/clover.xml +528 -451
- package/coverage/coverage-final.json +12 -11
- package/coverage/lcov-report/index.html +38 -38
- package/coverage/lcov-report/main/app/canvas.ts.html +475 -0
- package/coverage/lcov-report/main/app/guards.ts.html +46 -43
- package/coverage/lcov-report/main/app/index.html +36 -21
- package/coverage/lcov-report/main/app/index.ts.html +74 -8
- package/coverage/lcov-report/main/app/logger.ts.html +2 -2
- package/coverage/lcov-report/main/app/messages.gen.ts.html +38 -5
- package/coverage/lcov-report/main/app/nodes.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/iframe_observer.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/iframe_offsets.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/index.html +1 -1
- package/coverage/lcov-report/main/app/observer/shadow_root_observer.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/top_observer.ts.html +1 -1
- package/coverage/lcov-report/main/app/sanitizer.ts.html +12 -3
- package/coverage/lcov-report/main/app/session.ts.html +13 -4
- package/coverage/lcov-report/main/app/ticker.ts.html +1 -1
- package/coverage/lcov-report/main/index.html +19 -19
- package/coverage/lcov-report/main/index.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/beaconProxy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +12 -6
- package/coverage/lcov-report/main/modules/Network/index.html +12 -12
- package/coverage/lcov-report/main/modules/Network/index.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/networkMessage.ts.html +17 -8
- package/coverage/lcov-report/main/modules/Network/utils.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/xhrProxy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/attributeSender.ts.html +13 -4
- package/coverage/lcov-report/main/modules/axiosSpy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/connection.ts.html +1 -1
- package/coverage/lcov-report/main/modules/console.ts.html +1 -1
- package/coverage/lcov-report/main/modules/constructedStyleSheets.ts.html +1 -1
- package/coverage/lcov-report/main/modules/cssrules.ts.html +1 -1
- package/coverage/lcov-report/main/modules/exception.ts.html +1 -1
- package/coverage/lcov-report/main/modules/featureFlags.ts.html +1 -1
- package/coverage/lcov-report/main/modules/focus.ts.html +1 -1
- package/coverage/lcov-report/main/modules/fonts.ts.html +1 -1
- package/coverage/lcov-report/main/modules/img.ts.html +1 -1
- package/coverage/lcov-report/main/modules/index.html +8 -8
- package/coverage/lcov-report/main/modules/input.ts.html +1 -1
- package/coverage/lcov-report/main/modules/mouse.ts.html +1 -1
- package/coverage/lcov-report/main/modules/network.ts.html +3 -3
- package/coverage/lcov-report/main/modules/performance.ts.html +1 -1
- package/coverage/lcov-report/main/modules/scroll.ts.html +1 -1
- package/coverage/lcov-report/main/modules/selection.ts.html +1 -1
- package/coverage/lcov-report/main/modules/tabs.ts.html +1 -1
- package/coverage/lcov-report/main/modules/timing.ts.html +19 -7
- package/coverage/lcov-report/main/modules/viewport.ts.html +1 -1
- package/coverage/lcov-report/main/utils.ts.html +79 -88
- package/coverage/lcov-report/webworker/BatchWriter.ts.html +1 -1
- package/coverage/lcov-report/webworker/MessageEncoder.gen.ts.html +17 -5
- package/coverage/lcov-report/webworker/PrimitiveEncoder.ts.html +1 -1
- package/coverage/lcov-report/webworker/QueueSender.ts.html +1 -1
- package/coverage/lcov-report/webworker/index.html +7 -7
- package/coverage/lcov-report/webworker/index.ts.html +1 -1
- package/coverage/lcov.info +951 -796
- package/lib/app/index.js +1 -1
- package/lib/common/tsconfig.tsbuildinfo +1 -1
- package/lib/index.js +1 -1
- package/lib/modules/Network/fetchProxy.js +3 -0
- package/lib/modules/Network/networkMessage.js +6 -3
- package/lib/modules/network.js +2 -2
- package/lib/utils.js +16 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
|
+
# 10.0.3
|
|
2
|
+
|
|
3
|
+
- some safety guards for iframe components
|
|
4
|
+
|
|
5
|
+
# 10.0.2
|
|
6
|
+
|
|
7
|
+
- fix default ignore headers
|
|
8
|
+
|
|
9
|
+
# 10.0.1
|
|
10
|
+
|
|
11
|
+
- network proxy api is now default turned on
|
|
12
|
+
|
|
1
13
|
# 10.0.0
|
|
2
14
|
|
|
3
15
|
- networkRequest message changed to include `TransferredBodySize`
|
|
4
|
-
- tracker now attempts to create proxy for beacon api as well (if its in scope)
|
|
16
|
+
- tracker now attempts to create proxy for beacon api as well (if its in scope of the current env)
|
|
5
17
|
- safe wrapper for angular apps
|
|
6
|
-
- better browser lag handling
|
|
18
|
+
- better browser lag handling (and some performance improvements as a bonus)
|
|
7
19
|
|
|
8
20
|
# 9.0.11
|
|
9
21
|
|
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.
|
|
42
|
+
this.version = '10.0.3'; // 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.
|
|
165
|
+
trackerVersion: '10.0.3',
|
|
166
166
|
projectKey: options.projectKey,
|
|
167
167
|
doNotTrack,
|
|
168
168
|
// TODO: add precise reason (an exact API missing)
|
|
@@ -117,6 +117,9 @@ 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)
|
|
122
|
+
return target.apply(window, argsList);
|
|
120
123
|
const isORUrl = input instanceof URL || typeof input === 'string'
|
|
121
124
|
? this.isServiceUrl(String(input))
|
|
122
125
|
: this.isServiceUrl(String(input.url));
|
|
@@ -74,9 +74,12 @@ class NetworkMessage {
|
|
|
74
74
|
return { reqHs, resHs };
|
|
75
75
|
}
|
|
76
76
|
isHeaderIgnored(key) {
|
|
77
|
-
if (Array.isArray(this.ignoredHeaders))
|
|
78
|
-
return this.ignoredHeaders.includes(key);
|
|
79
|
-
|
|
77
|
+
if (Array.isArray(this.ignoredHeaders)) {
|
|
78
|
+
return this.ignoredHeaders.map((k) => k.toLowerCase()).includes(key.toLowerCase());
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
return this.ignoredHeaders;
|
|
82
|
+
}
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
85
|
exports.default = NetworkMessage;
|
package/cjs/modules/network.js
CHANGED
|
@@ -19,12 +19,12 @@ function strMethod(method) {
|
|
|
19
19
|
function default_1(app, opts = {}) {
|
|
20
20
|
const options = Object.assign({
|
|
21
21
|
failuresOnly: false,
|
|
22
|
-
ignoreHeaders: ['
|
|
22
|
+
ignoreHeaders: ['cookie', 'set-cookie', 'authorization'],
|
|
23
23
|
capturePayload: false,
|
|
24
24
|
sessionTokenHeader: false,
|
|
25
25
|
captureInIframes: true,
|
|
26
26
|
axiosInstances: undefined,
|
|
27
|
-
useProxy:
|
|
27
|
+
useProxy: true,
|
|
28
28
|
}, opts);
|
|
29
29
|
if (options.useProxy === false) {
|
|
30
30
|
app.debug.warn('Network module is migrating to proxy api, to gradually migrate and test it set useProxy to true');
|
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
|
-
|
|
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
|
-
|
|
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
|
/**
|