@openreplay/tracker 10.0.0 → 10.0.2
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 +10 -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/coverage/clover.xml +436 -432
- package/coverage/coverage-final.json +13 -13
- package/coverage/lcov-report/index.html +38 -38
- package/coverage/lcov-report/main/app/guards.ts.html +1 -1
- package/coverage/lcov-report/main/app/index.html +13 -13
- package/coverage/lcov-report/main/app/index.ts.html +18 -3
- package/coverage/lcov-report/main/app/logger.ts.html +2 -2
- package/coverage/lcov-report/main/app/messages.gen.ts.html +144 -144
- 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 +19 -19
- package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +102 -96
- package/coverage/lcov-report/main/modules/Network/index.html +65 -65
- package/coverage/lcov-report/main/modules/Network/index.ts.html +33 -33
- package/coverage/lcov-report/main/modules/Network/networkMessage.ts.html +71 -71
- package/coverage/lcov-report/main/modules/Network/utils.ts.html +34 -34
- package/coverage/lcov-report/main/modules/Network/xhrProxy.ts.html +13 -13
- 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 +2 -2
- 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 +54 -63
- package/coverage/lcov-report/webworker/BatchWriter.ts.html +1 -1
- package/coverage/lcov-report/webworker/MessageEncoder.gen.ts.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/webworker/index.ts.html +1 -1
- package/coverage/lcov.info +704 -692
- package/lib/app/index.js +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/package.json +1 -1
package/lib/app/index.js
CHANGED
|
@@ -36,7 +36,7 @@ export default class App {
|
|
|
36
36
|
this.stopCallbacks = [];
|
|
37
37
|
this.commitCallbacks = [];
|
|
38
38
|
this.activityState = ActivityState.NotActive;
|
|
39
|
-
this.version = '10.0.
|
|
39
|
+
this.version = '10.0.2'; // TODO: version compatability check inside each plugin.
|
|
40
40
|
this.compressionThreshold = 24 * 1000;
|
|
41
41
|
this.restartAttempts = 0;
|
|
42
42
|
this.bc = null;
|
package/lib/index.js
CHANGED
|
@@ -157,7 +157,7 @@ export default class API {
|
|
|
157
157
|
// no-cors issue only with text/plain or not-set Content-Type
|
|
158
158
|
// req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
|
159
159
|
req.send(JSON.stringify({
|
|
160
|
-
trackerVersion: '10.0.
|
|
160
|
+
trackerVersion: '10.0.2',
|
|
161
161
|
projectKey: options.projectKey,
|
|
162
162
|
doNotTrack,
|
|
163
163
|
// TODO: add precise reason (an exact API missing)
|
|
@@ -113,6 +113,9 @@ export class FetchProxyHandler {
|
|
|
113
113
|
apply(target, _, argsList) {
|
|
114
114
|
const input = argsList[0];
|
|
115
115
|
const init = argsList[1];
|
|
116
|
+
// @ts-ignore
|
|
117
|
+
if (!(input === null || input === void 0 ? void 0 : input.url) && !input)
|
|
118
|
+
return target.apply(window, argsList);
|
|
116
119
|
const isORUrl = input instanceof URL || typeof input === 'string'
|
|
117
120
|
? this.isServiceUrl(String(input))
|
|
118
121
|
: this.isServiceUrl(String(input.url));
|
|
@@ -71,8 +71,11 @@ export default class NetworkMessage {
|
|
|
71
71
|
return { reqHs, resHs };
|
|
72
72
|
}
|
|
73
73
|
isHeaderIgnored(key) {
|
|
74
|
-
if (Array.isArray(this.ignoredHeaders))
|
|
75
|
-
return this.ignoredHeaders.includes(key);
|
|
76
|
-
|
|
74
|
+
if (Array.isArray(this.ignoredHeaders)) {
|
|
75
|
+
return this.ignoredHeaders.map((k) => k.toLowerCase()).includes(key.toLowerCase());
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
return this.ignoredHeaders;
|
|
79
|
+
}
|
|
77
80
|
}
|
|
78
81
|
}
|
package/lib/modules/network.js
CHANGED
|
@@ -17,12 +17,12 @@ function strMethod(method) {
|
|
|
17
17
|
export default function (app, opts = {}) {
|
|
18
18
|
const options = Object.assign({
|
|
19
19
|
failuresOnly: false,
|
|
20
|
-
ignoreHeaders: ['
|
|
20
|
+
ignoreHeaders: ['cookie', 'set-cookie', 'authorization'],
|
|
21
21
|
capturePayload: false,
|
|
22
22
|
sessionTokenHeader: false,
|
|
23
23
|
captureInIframes: true,
|
|
24
24
|
axiosInstances: undefined,
|
|
25
|
-
useProxy:
|
|
25
|
+
useProxy: true,
|
|
26
26
|
}, opts);
|
|
27
27
|
if (options.useProxy === false) {
|
|
28
28
|
app.debug.warn('Network module is migrating to proxy api, to gradually migrate and test it set useProxy to true');
|