@openreplay/tracker 9.0.9 → 9.0.11-beta.0
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 +8 -0
- package/cjs/app/index.js +1 -1
- package/cjs/index.js +17 -2
- package/cjs/modules/timing.d.ts +1 -0
- package/cjs/modules/timing.js +7 -0
- package/coverage/clover.xml +3426 -0
- package/coverage/coverage-final.json +50 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +206 -0
- package/coverage/lcov-report/main/app/guards.ts.html +229 -0
- package/coverage/lcov-report/main/app/index.html +221 -0
- package/coverage/lcov-report/main/app/index.ts.html +2182 -0
- package/coverage/lcov-report/main/app/logger.ts.html +277 -0
- package/coverage/lcov-report/main/app/messages.gen.ts.html +2827 -0
- package/coverage/lcov-report/main/app/nodes.ts.html +385 -0
- package/coverage/lcov-report/main/app/observer/iframe_observer.ts.html +148 -0
- package/coverage/lcov-report/main/app/observer/iframe_offsets.ts.html +289 -0
- package/coverage/lcov-report/main/app/observer/index.html +161 -0
- package/coverage/lcov-report/main/app/observer/shadow_root_observer.ts.html +142 -0
- package/coverage/lcov-report/main/app/observer/top_observer.ts.html +538 -0
- package/coverage/lcov-report/main/app/sanitizer.ts.html +394 -0
- package/coverage/lcov-report/main/app/session.ts.html +601 -0
- package/coverage/lcov-report/main/app/ticker.ts.html +250 -0
- package/coverage/lcov-report/main/index.html +131 -0
- package/coverage/lcov-report/main/index.ts.html +1213 -0
- package/coverage/lcov-report/main/modules/Network/beaconProxy.ts.html +391 -0
- package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +1027 -0
- package/coverage/lcov-report/main/modules/Network/index.html +191 -0
- package/coverage/lcov-report/main/modules/Network/index.ts.html +244 -0
- package/coverage/lcov-report/main/modules/Network/networkMessage.ts.html +385 -0
- package/coverage/lcov-report/main/modules/Network/utils.ts.html +700 -0
- package/coverage/lcov-report/main/modules/Network/xhrProxy.ts.html +850 -0
- package/coverage/lcov-report/main/modules/attributeSender.ts.html +232 -0
- package/coverage/lcov-report/main/modules/axiosSpy.ts.html +709 -0
- package/coverage/lcov-report/main/modules/connection.ts.html +160 -0
- package/coverage/lcov-report/main/modules/console.ts.html +541 -0
- package/coverage/lcov-report/main/modules/constructedStyleSheets.ts.html +559 -0
- package/coverage/lcov-report/main/modules/cssrules.ts.html +418 -0
- package/coverage/lcov-report/main/modules/exception.ts.html +385 -0
- package/coverage/lcov-report/main/modules/featureFlags.ts.html +412 -0
- package/coverage/lcov-report/main/modules/focus.ts.html +220 -0
- package/coverage/lcov-report/main/modules/fonts.ts.html +289 -0
- package/coverage/lcov-report/main/modules/img.ts.html +433 -0
- package/coverage/lcov-report/main/modules/index.html +401 -0
- package/coverage/lcov-report/main/modules/input.ts.html +826 -0
- package/coverage/lcov-report/main/modules/mouse.ts.html +826 -0
- package/coverage/lcov-report/main/modules/network.ts.html +1123 -0
- package/coverage/lcov-report/main/modules/performance.ts.html +367 -0
- package/coverage/lcov-report/main/modules/scroll.ts.html +364 -0
- package/coverage/lcov-report/main/modules/selection.ts.html +202 -0
- package/coverage/lcov-report/main/modules/tabs.ts.html +124 -0
- package/coverage/lcov-report/main/modules/timing.ts.html +841 -0
- package/coverage/lcov-report/main/modules/userTesting/dnd.ts.html +232 -0
- package/coverage/lcov-report/main/modules/userTesting/index.html +161 -0
- package/coverage/lcov-report/main/modules/userTesting/index.ts.html +1210 -0
- package/coverage/lcov-report/main/modules/userTesting/recorder.ts.html +361 -0
- package/coverage/lcov-report/main/modules/userTesting/styles.ts.html +865 -0
- package/coverage/lcov-report/main/modules/viewport.ts.html +250 -0
- package/coverage/lcov-report/main/utils.ts.html +406 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/webworker/BatchWriter.ts.html +481 -0
- package/coverage/lcov-report/webworker/MessageEncoder.gen.ts.html +961 -0
- package/coverage/lcov-report/webworker/PrimitiveEncoder.ts.html +436 -0
- package/coverage/lcov-report/webworker/QueueSender.ts.html +505 -0
- package/coverage/lcov-report/webworker/index.html +176 -0
- package/coverage/lcov-report/webworker/index.ts.html +628 -0
- package/coverage/lcov.info +6631 -0
- package/lib/app/index.js +1 -1
- package/lib/index.js +17 -2
- package/lib/modules/timing.d.ts +1 -0
- package/lib/modules/timing.js +7 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# 9.0.11
|
|
2
|
+
|
|
3
|
+
- fix window.open issue with sessionStorage being inherited (replicating tabId bug)
|
|
4
|
+
|
|
5
|
+
# 9.0.10
|
|
6
|
+
|
|
7
|
+
- added `excludedResourceUrls` to timings options to better sanitize network data
|
|
8
|
+
|
|
1
9
|
# 9.0.9
|
|
2
10
|
|
|
3
11
|
- Fix for `{disableStringDict: true}` behavior
|
package/cjs/app/index.js
CHANGED
|
@@ -42,7 +42,7 @@ class App {
|
|
|
42
42
|
this.stopCallbacks = [];
|
|
43
43
|
this.commitCallbacks = [];
|
|
44
44
|
this.activityState = ActivityState.NotActive;
|
|
45
|
-
this.version = '9.0.
|
|
45
|
+
this.version = '9.0.11-beta.0'; // TODO: version compatability check inside each plugin.
|
|
46
46
|
this.compressionThreshold = 24 * 1000;
|
|
47
47
|
this.restartAttempts = 0;
|
|
48
48
|
this.bc = null;
|
package/cjs/index.js
CHANGED
|
@@ -130,8 +130,8 @@ class API {
|
|
|
130
130
|
}
|
|
131
131
|
void this.featureFlags.reloadFlags();
|
|
132
132
|
});
|
|
133
|
+
const wOpen = window.open;
|
|
133
134
|
if (options.autoResetOnWindowOpen) {
|
|
134
|
-
const wOpen = window.open;
|
|
135
135
|
app.attachStartCallback(() => {
|
|
136
136
|
// @ts-ignore ?
|
|
137
137
|
window.open = function (...args) {
|
|
@@ -144,6 +144,21 @@ class API {
|
|
|
144
144
|
window.open = wOpen;
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
+
else {
|
|
148
|
+
app.attachStartCallback(() => {
|
|
149
|
+
// this function causes new tab to inherit sessionStorage completely,
|
|
150
|
+
// we don't really want that so we remove tabId for a short period
|
|
151
|
+
// @ts-ignore
|
|
152
|
+
window.open = function (...args) {
|
|
153
|
+
var _a;
|
|
154
|
+
const tabId = app.getTabId();
|
|
155
|
+
const sessStorage = (_a = app.sessionStorage) !== null && _a !== void 0 ? _a : window.sessionStorage;
|
|
156
|
+
sessStorage.removeItem(options.session_tabid_key || '__openreplay_tabid');
|
|
157
|
+
wOpen.call(window, ...args);
|
|
158
|
+
sessStorage.setItem(options.session_tabid_key || '__openreplay_tabid', tabId);
|
|
159
|
+
};
|
|
160
|
+
});
|
|
161
|
+
}
|
|
147
162
|
}
|
|
148
163
|
else {
|
|
149
164
|
console.log("OpenReplay: browser doesn't support API required for tracking or doNotTrack is set to 1.");
|
|
@@ -153,7 +168,7 @@ class API {
|
|
|
153
168
|
// no-cors issue only with text/plain or not-set Content-Type
|
|
154
169
|
// req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
|
155
170
|
req.send(JSON.stringify({
|
|
156
|
-
trackerVersion: '9.0.
|
|
171
|
+
trackerVersion: '9.0.11-beta.0',
|
|
157
172
|
projectKey: options.projectKey,
|
|
158
173
|
doNotTrack,
|
|
159
174
|
// TODO: add precise reason (an exact API missing)
|
package/cjs/modules/timing.d.ts
CHANGED
package/cjs/modules/timing.js
CHANGED
|
@@ -61,6 +61,7 @@ function default_1(app, opts) {
|
|
|
61
61
|
captureResourceTimings: true,
|
|
62
62
|
capturePageLoadTimings: true,
|
|
63
63
|
capturePageRenderTimings: true,
|
|
64
|
+
excludedResourceUrls: [],
|
|
64
65
|
}, opts);
|
|
65
66
|
if (!('PerformanceObserver' in window)) {
|
|
66
67
|
options.captureResourceTimings = false;
|
|
@@ -70,11 +71,17 @@ function default_1(app, opts) {
|
|
|
70
71
|
} // Resources are necessary for all timings
|
|
71
72
|
let resources = {};
|
|
72
73
|
function resourceTiming(entry) {
|
|
74
|
+
var _a;
|
|
73
75
|
if (entry.duration < 0 || !(0, utils_js_1.isURL)(entry.name) || app.isServiceURL(entry.name))
|
|
74
76
|
return;
|
|
75
77
|
if (resources !== null) {
|
|
76
78
|
resources[entry.name] = entry.startTime + entry.duration;
|
|
77
79
|
}
|
|
80
|
+
(_a = options.excludedResourceUrls) === null || _a === void 0 ? void 0 : _a.forEach((url) => {
|
|
81
|
+
if (entry.name.startsWith(url)) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
78
85
|
app.send((0, messages_gen_js_1.ResourceTiming)(entry.startTime + (0, utils_js_1.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,
|
|
79
86
|
// @ts-ignore
|
|
80
87
|
(entry.responseStatus && entry.responseStatus === 304) || entry.transferSize === 0));
|