@openreplay/tracker 8.1.2-beta.3 → 8.1.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 +6 -0
- package/cjs/app/index.d.ts +1 -0
- package/cjs/app/index.js +4 -3
- package/cjs/index.d.ts +1 -2
- package/cjs/index.js +4 -9
- package/cjs/modules/attributeSender.d.ts +2 -1
- package/cjs/modules/attributeSender.js +6 -1
- package/cjs/modules/console.d.ts +0 -1
- package/cjs/modules/console.js +0 -4
- package/cjs/modules/input.d.ts +0 -1
- package/cjs/modules/input.js +0 -4
- package/cjs/modules/network.d.ts +0 -1
- package/cjs/modules/network.js +0 -1
- package/lib/app/index.d.ts +1 -0
- package/lib/app/index.js +4 -3
- package/lib/index.d.ts +1 -2
- package/lib/index.js +4 -9
- package/lib/modules/attributeSender.d.ts +2 -1
- package/lib/modules/attributeSender.js +6 -1
- package/lib/modules/console.d.ts +0 -1
- package/lib/modules/console.js +0 -4
- package/lib/modules/input.d.ts +0 -1
- package/lib/modules/input.js +0 -4
- package/lib/modules/network.d.ts +0 -1
- package/lib/modules/network.js +0 -1
- package/package.json +1 -1
- package/coverage/clover.xml +0 -2973
- package/coverage/coverage-final.json +0 -44
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -191
- package/coverage/lcov-report/main/app/guards.ts.html +0 -229
- package/coverage/lcov-report/main/app/index.html +0 -206
- package/coverage/lcov-report/main/app/index.ts.html +0 -2149
- package/coverage/lcov-report/main/app/logger.ts.html +0 -277
- package/coverage/lcov-report/main/app/messages.gen.ts.html +0 -2752
- package/coverage/lcov-report/main/app/observer/iframe_observer.ts.html +0 -148
- package/coverage/lcov-report/main/app/observer/iframe_offsets.ts.html +0 -289
- package/coverage/lcov-report/main/app/observer/index.html +0 -161
- package/coverage/lcov-report/main/app/observer/shadow_root_observer.ts.html +0 -142
- package/coverage/lcov-report/main/app/observer/top_observer.ts.html +0 -535
- package/coverage/lcov-report/main/app/sanitizer.ts.html +0 -394
- package/coverage/lcov-report/main/app/session.ts.html +0 -601
- package/coverage/lcov-report/main/app/ticker.ts.html +0 -250
- package/coverage/lcov-report/main/index.html +0 -131
- package/coverage/lcov-report/main/index.ts.html +0 -1144
- package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +0 -949
- package/coverage/lcov-report/main/modules/Network/index.html +0 -176
- package/coverage/lcov-report/main/modules/Network/index.ts.html +0 -169
- package/coverage/lcov-report/main/modules/Network/networkMessage.ts.html +0 -382
- package/coverage/lcov-report/main/modules/Network/utils.ts.html +0 -700
- package/coverage/lcov-report/main/modules/Network/xhrProxy.ts.html +0 -823
- package/coverage/lcov-report/main/modules/attributeSender.ts.html +0 -217
- package/coverage/lcov-report/main/modules/axiosSpy.ts.html +0 -700
- package/coverage/lcov-report/main/modules/connection.ts.html +0 -160
- package/coverage/lcov-report/main/modules/console.ts.html +0 -535
- package/coverage/lcov-report/main/modules/constructedStyleSheets.ts.html +0 -559
- package/coverage/lcov-report/main/modules/cssrules.ts.html +0 -418
- package/coverage/lcov-report/main/modules/exception.ts.html +0 -385
- package/coverage/lcov-report/main/modules/featureFlags.ts.html +0 -415
- package/coverage/lcov-report/main/modules/focus.ts.html +0 -220
- package/coverage/lcov-report/main/modules/fonts.ts.html +0 -289
- package/coverage/lcov-report/main/modules/img.ts.html +0 -433
- package/coverage/lcov-report/main/modules/index.html +0 -401
- package/coverage/lcov-report/main/modules/input.ts.html +0 -811
- package/coverage/lcov-report/main/modules/mouse.ts.html +0 -826
- package/coverage/lcov-report/main/modules/network.ts.html +0 -1129
- package/coverage/lcov-report/main/modules/performance.ts.html +0 -367
- package/coverage/lcov-report/main/modules/scroll.ts.html +0 -364
- package/coverage/lcov-report/main/modules/selection.ts.html +0 -202
- package/coverage/lcov-report/main/modules/tabs.ts.html +0 -124
- package/coverage/lcov-report/main/modules/timing.ts.html +0 -841
- package/coverage/lcov-report/main/modules/viewport.ts.html +0 -250
- package/coverage/lcov-report/main/utils.ts.html +0 -406
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/webworker/BatchWriter.ts.html +0 -481
- package/coverage/lcov-report/webworker/MessageEncoder.gen.ts.html +0 -949
- package/coverage/lcov-report/webworker/PrimitiveEncoder.ts.html +0 -436
- package/coverage/lcov-report/webworker/QueueSender.ts.html +0 -505
- package/coverage/lcov-report/webworker/index.html +0 -176
- package/coverage/lcov-report/webworker/index.ts.html +0 -616
- package/coverage/lcov.info +0 -5854
package/CHANGELOG.md
CHANGED
package/cjs/app/index.d.ts
CHANGED
package/cjs/app/index.js
CHANGED
|
@@ -35,7 +35,7 @@ class App {
|
|
|
35
35
|
this.stopCallbacks = [];
|
|
36
36
|
this.commitCallbacks = [];
|
|
37
37
|
this.activityState = ActivityState.NotActive;
|
|
38
|
-
this.version = '8.1.
|
|
38
|
+
this.version = '8.1.3'; // TODO: version compatability check inside each plugin.
|
|
39
39
|
this.compressionThreshold = 24 * 1000;
|
|
40
40
|
this.restartAttempts = 0;
|
|
41
41
|
this.bc = null;
|
|
@@ -58,6 +58,7 @@ class App {
|
|
|
58
58
|
__debug_report_edp: null,
|
|
59
59
|
localStorage: null,
|
|
60
60
|
sessionStorage: null,
|
|
61
|
+
disableStringDict: false,
|
|
61
62
|
forceSingleTab: false,
|
|
62
63
|
}, options);
|
|
63
64
|
if (!this.options.forceSingleTab && globalThis && 'BroadcastChannel' in globalThis) {
|
|
@@ -74,7 +75,7 @@ class App {
|
|
|
74
75
|
this.debug = new logger_js_1.default(this.options.__debug__);
|
|
75
76
|
this.notify = new logger_js_1.default(this.options.verbose ? logger_js_1.LogLevel.Warnings : logger_js_1.LogLevel.Silent);
|
|
76
77
|
this.session = new session_js_1.default(this, this.options);
|
|
77
|
-
this.attributeSender = new attributeSender_js_1.default(this);
|
|
78
|
+
this.attributeSender = new attributeSender_js_1.default(this, Boolean(this.options.disableStringDict));
|
|
78
79
|
this.session.attachUpdateCallback(({ userID, metadata }) => {
|
|
79
80
|
if (userID != null) {
|
|
80
81
|
// TODO: nullable userID
|
|
@@ -299,7 +300,7 @@ class App {
|
|
|
299
300
|
}
|
|
300
301
|
const ingest = this.options.ingestPoint;
|
|
301
302
|
const isSaas = /api\.openreplay\.com/.test(ingest);
|
|
302
|
-
const projectPath = isSaas ? 'https://openreplay.com/ingest' : ingest;
|
|
303
|
+
const projectPath = isSaas ? 'https://app.openreplay.com/ingest' : ingest;
|
|
303
304
|
const url = projectPath.replace(/ingest$/, `${projectID}/session/${sessionID}`);
|
|
304
305
|
if (options === null || options === void 0 ? void 0 : options.withCurrentTime) {
|
|
305
306
|
const jumpTo = (0, utils_js_1.now)() - timestamp;
|
package/cjs/index.d.ts
CHANGED
|
@@ -16,11 +16,10 @@ import type { StartPromiseReturn } from './app/index.js';
|
|
|
16
16
|
export type Options = Partial<AppOptions & ConsoleOptions & ExceptionOptions & InputOptions & PerformanceOptions & TimingOptions> & {
|
|
17
17
|
projectID?: number;
|
|
18
18
|
projectKey: string;
|
|
19
|
-
ignoreTimings?: boolean;
|
|
20
19
|
sessionToken?: string;
|
|
21
20
|
respectDoNotTrack?: boolean;
|
|
22
21
|
autoResetOnWindowOpen?: boolean;
|
|
23
|
-
network?:
|
|
22
|
+
network?: NetworkOptions;
|
|
24
23
|
mouse?: MouseHandlerOptions;
|
|
25
24
|
__DISABLE_SECURE_MODE?: boolean;
|
|
26
25
|
};
|
package/cjs/index.js
CHANGED
|
@@ -57,7 +57,6 @@ function processOptions(obj) {
|
|
|
57
57
|
}
|
|
58
58
|
class API {
|
|
59
59
|
constructor(options) {
|
|
60
|
-
var _a;
|
|
61
60
|
this.options = options;
|
|
62
61
|
// public featureFlags: FeatureFlags
|
|
63
62
|
this.app = null;
|
|
@@ -114,16 +113,12 @@ class API {
|
|
|
114
113
|
(0, img_js_1.default)(app);
|
|
115
114
|
(0, input_js_1.default)(app, options);
|
|
116
115
|
(0, mouse_js_1.default)(app, options.mouse);
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
(0, performance_js_1.default)(app, options);
|
|
120
|
-
}
|
|
116
|
+
(0, timing_js_1.default)(app, options);
|
|
117
|
+
(0, performance_js_1.default)(app, options);
|
|
121
118
|
(0, scroll_js_1.default)(app);
|
|
122
119
|
(0, focus_js_1.default)(app);
|
|
123
120
|
(0, fonts_js_1.default)(app);
|
|
124
|
-
|
|
125
|
-
(0, network_js_1.default)(app, options.network);
|
|
126
|
-
}
|
|
121
|
+
(0, network_js_1.default)(app, options.network);
|
|
127
122
|
(0, selection_js_1.default)(app);
|
|
128
123
|
(0, tabs_js_1.default)(app);
|
|
129
124
|
window.__OPENREPLAY__ = this;
|
|
@@ -156,7 +151,7 @@ class API {
|
|
|
156
151
|
// no-cors issue only with text/plain or not-set Content-Type
|
|
157
152
|
// req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
|
158
153
|
req.send(JSON.stringify({
|
|
159
|
-
trackerVersion: '8.1.
|
|
154
|
+
trackerVersion: '8.1.3',
|
|
160
155
|
projectKey: options.projectKey,
|
|
161
156
|
doNotTrack,
|
|
162
157
|
// TODO: add precise reason (an exact API missing)
|
|
@@ -6,8 +6,9 @@ export declare class StringDictionary {
|
|
|
6
6
|
}
|
|
7
7
|
export default class AttributeSender {
|
|
8
8
|
private readonly app;
|
|
9
|
+
private readonly isDictDisabled;
|
|
9
10
|
private dict;
|
|
10
|
-
constructor(app: App);
|
|
11
|
+
constructor(app: App, isDictDisabled: boolean);
|
|
11
12
|
sendSetAttribute(id: number, name: string, value: string): void;
|
|
12
13
|
private applyDict;
|
|
13
14
|
clear(): void;
|
|
@@ -17,11 +17,16 @@ class StringDictionary {
|
|
|
17
17
|
}
|
|
18
18
|
exports.StringDictionary = StringDictionary;
|
|
19
19
|
class AttributeSender {
|
|
20
|
-
constructor(app) {
|
|
20
|
+
constructor(app, isDictDisabled) {
|
|
21
21
|
this.app = app;
|
|
22
|
+
this.isDictDisabled = isDictDisabled;
|
|
22
23
|
this.dict = new StringDictionary();
|
|
23
24
|
}
|
|
24
25
|
sendSetAttribute(id, name, value) {
|
|
26
|
+
if (this.isDictDisabled) {
|
|
27
|
+
const msg = [12 /* Type.SetNodeAttribute */, id, name, value];
|
|
28
|
+
this.app.send(msg);
|
|
29
|
+
}
|
|
25
30
|
const message = [
|
|
26
31
|
51 /* Type.SetNodeAttributeDict */,
|
|
27
32
|
id,
|
package/cjs/modules/console.d.ts
CHANGED
package/cjs/modules/console.js
CHANGED
|
@@ -87,11 +87,7 @@ function default_1(app, opts) {
|
|
|
87
87
|
const options = Object.assign({
|
|
88
88
|
consoleMethods,
|
|
89
89
|
consoleThrottling: 30,
|
|
90
|
-
ignoreConsole: false,
|
|
91
90
|
}, opts);
|
|
92
|
-
if (options.ignoreConsole) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
91
|
if (!Array.isArray(options.consoleMethods) || options.consoleMethods.length === 0) {
|
|
96
92
|
return;
|
|
97
93
|
}
|
package/cjs/modules/input.d.ts
CHANGED
package/cjs/modules/input.js
CHANGED
|
@@ -80,11 +80,7 @@ function default_1(app, opts) {
|
|
|
80
80
|
obscureInputEmails: true,
|
|
81
81
|
defaultInputMode: 1 /* InputMode.Obscured */,
|
|
82
82
|
obscureInputDates: false,
|
|
83
|
-
ignoreInputs: false,
|
|
84
83
|
}, opts);
|
|
85
|
-
if (options.ignoreInputs) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
84
|
function getInputValue(id, node) {
|
|
89
85
|
let value = node.value;
|
|
90
86
|
let inputMode = options.defaultInputMode;
|
package/cjs/modules/network.d.ts
CHANGED
package/cjs/modules/network.js
CHANGED
|
@@ -25,7 +25,6 @@ function default_1(app, opts = {}) {
|
|
|
25
25
|
captureInIframes: true,
|
|
26
26
|
axiosInstances: undefined,
|
|
27
27
|
useProxy: false,
|
|
28
|
-
ignoreNetwork: false,
|
|
29
28
|
}, opts);
|
|
30
29
|
if (options.useProxy === false) {
|
|
31
30
|
app.debug.warn('Network module is migrating to proxy api, to gradually migrate and test it set useProxy to true');
|
package/lib/app/index.d.ts
CHANGED
package/lib/app/index.js
CHANGED
|
@@ -32,7 +32,7 @@ export default class App {
|
|
|
32
32
|
this.stopCallbacks = [];
|
|
33
33
|
this.commitCallbacks = [];
|
|
34
34
|
this.activityState = ActivityState.NotActive;
|
|
35
|
-
this.version = '8.1.
|
|
35
|
+
this.version = '8.1.3'; // TODO: version compatability check inside each plugin.
|
|
36
36
|
this.compressionThreshold = 24 * 1000;
|
|
37
37
|
this.restartAttempts = 0;
|
|
38
38
|
this.bc = null;
|
|
@@ -55,6 +55,7 @@ export default class App {
|
|
|
55
55
|
__debug_report_edp: null,
|
|
56
56
|
localStorage: null,
|
|
57
57
|
sessionStorage: null,
|
|
58
|
+
disableStringDict: false,
|
|
58
59
|
forceSingleTab: false,
|
|
59
60
|
}, options);
|
|
60
61
|
if (!this.options.forceSingleTab && globalThis && 'BroadcastChannel' in globalThis) {
|
|
@@ -71,7 +72,7 @@ export default class App {
|
|
|
71
72
|
this.debug = new Logger(this.options.__debug__);
|
|
72
73
|
this.notify = new Logger(this.options.verbose ? LogLevel.Warnings : LogLevel.Silent);
|
|
73
74
|
this.session = new Session(this, this.options);
|
|
74
|
-
this.attributeSender = new AttributeSender(this);
|
|
75
|
+
this.attributeSender = new AttributeSender(this, Boolean(this.options.disableStringDict));
|
|
75
76
|
this.session.attachUpdateCallback(({ userID, metadata }) => {
|
|
76
77
|
if (userID != null) {
|
|
77
78
|
// TODO: nullable userID
|
|
@@ -296,7 +297,7 @@ export default class App {
|
|
|
296
297
|
}
|
|
297
298
|
const ingest = this.options.ingestPoint;
|
|
298
299
|
const isSaas = /api\.openreplay\.com/.test(ingest);
|
|
299
|
-
const projectPath = isSaas ? 'https://openreplay.com/ingest' : ingest;
|
|
300
|
+
const projectPath = isSaas ? 'https://app.openreplay.com/ingest' : ingest;
|
|
300
301
|
const url = projectPath.replace(/ingest$/, `${projectID}/session/${sessionID}`);
|
|
301
302
|
if (options === null || options === void 0 ? void 0 : options.withCurrentTime) {
|
|
302
303
|
const jumpTo = now() - timestamp;
|
package/lib/index.d.ts
CHANGED
|
@@ -16,11 +16,10 @@ import type { StartPromiseReturn } from './app/index.js';
|
|
|
16
16
|
export type Options = Partial<AppOptions & ConsoleOptions & ExceptionOptions & InputOptions & PerformanceOptions & TimingOptions> & {
|
|
17
17
|
projectID?: number;
|
|
18
18
|
projectKey: string;
|
|
19
|
-
ignoreTimings?: boolean;
|
|
20
19
|
sessionToken?: string;
|
|
21
20
|
respectDoNotTrack?: boolean;
|
|
22
21
|
autoResetOnWindowOpen?: boolean;
|
|
23
|
-
network?:
|
|
22
|
+
network?: NetworkOptions;
|
|
24
23
|
mouse?: MouseHandlerOptions;
|
|
25
24
|
__DISABLE_SECURE_MODE?: boolean;
|
|
26
25
|
};
|
package/lib/index.js
CHANGED
|
@@ -52,7 +52,6 @@ function processOptions(obj) {
|
|
|
52
52
|
}
|
|
53
53
|
export default class API {
|
|
54
54
|
constructor(options) {
|
|
55
|
-
var _a;
|
|
56
55
|
this.options = options;
|
|
57
56
|
// public featureFlags: FeatureFlags
|
|
58
57
|
this.app = null;
|
|
@@ -109,16 +108,12 @@ export default class API {
|
|
|
109
108
|
Img(app);
|
|
110
109
|
Input(app, options);
|
|
111
110
|
Mouse(app, options.mouse);
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
Performance(app, options);
|
|
115
|
-
}
|
|
111
|
+
Timing(app, options);
|
|
112
|
+
Performance(app, options);
|
|
116
113
|
Scroll(app);
|
|
117
114
|
Focus(app);
|
|
118
115
|
Fonts(app);
|
|
119
|
-
|
|
120
|
-
Network(app, options.network);
|
|
121
|
-
}
|
|
116
|
+
Network(app, options.network);
|
|
122
117
|
Selection(app);
|
|
123
118
|
Tabs(app);
|
|
124
119
|
window.__OPENREPLAY__ = this;
|
|
@@ -151,7 +146,7 @@ export default class API {
|
|
|
151
146
|
// no-cors issue only with text/plain or not-set Content-Type
|
|
152
147
|
// req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
|
153
148
|
req.send(JSON.stringify({
|
|
154
|
-
trackerVersion: '8.1.
|
|
149
|
+
trackerVersion: '8.1.3',
|
|
155
150
|
projectKey: options.projectKey,
|
|
156
151
|
doNotTrack,
|
|
157
152
|
// TODO: add precise reason (an exact API missing)
|
|
@@ -6,8 +6,9 @@ export declare class StringDictionary {
|
|
|
6
6
|
}
|
|
7
7
|
export default class AttributeSender {
|
|
8
8
|
private readonly app;
|
|
9
|
+
private readonly isDictDisabled;
|
|
9
10
|
private dict;
|
|
10
|
-
constructor(app: App);
|
|
11
|
+
constructor(app: App, isDictDisabled: boolean);
|
|
11
12
|
sendSetAttribute(id: number, name: string, value: string): void;
|
|
12
13
|
private applyDict;
|
|
13
14
|
clear(): void;
|
|
@@ -13,11 +13,16 @@ export class StringDictionary {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
export default class AttributeSender {
|
|
16
|
-
constructor(app) {
|
|
16
|
+
constructor(app, isDictDisabled) {
|
|
17
17
|
this.app = app;
|
|
18
|
+
this.isDictDisabled = isDictDisabled;
|
|
18
19
|
this.dict = new StringDictionary();
|
|
19
20
|
}
|
|
20
21
|
sendSetAttribute(id, name, value) {
|
|
22
|
+
if (this.isDictDisabled) {
|
|
23
|
+
const msg = [12 /* Type.SetNodeAttribute */, id, name, value];
|
|
24
|
+
this.app.send(msg);
|
|
25
|
+
}
|
|
21
26
|
const message = [
|
|
22
27
|
51 /* Type.SetNodeAttributeDict */,
|
|
23
28
|
id,
|
package/lib/modules/console.d.ts
CHANGED
package/lib/modules/console.js
CHANGED
|
@@ -85,11 +85,7 @@ export default function (app, opts) {
|
|
|
85
85
|
const options = Object.assign({
|
|
86
86
|
consoleMethods,
|
|
87
87
|
consoleThrottling: 30,
|
|
88
|
-
ignoreConsole: false,
|
|
89
88
|
}, opts);
|
|
90
|
-
if (options.ignoreConsole) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
89
|
if (!Array.isArray(options.consoleMethods) || options.consoleMethods.length === 0) {
|
|
94
90
|
return;
|
|
95
91
|
}
|
package/lib/modules/input.d.ts
CHANGED
package/lib/modules/input.js
CHANGED
|
@@ -76,11 +76,7 @@ export default function (app, opts) {
|
|
|
76
76
|
obscureInputEmails: true,
|
|
77
77
|
defaultInputMode: 1 /* InputMode.Obscured */,
|
|
78
78
|
obscureInputDates: false,
|
|
79
|
-
ignoreInputs: false,
|
|
80
79
|
}, opts);
|
|
81
|
-
if (options.ignoreInputs) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
80
|
function getInputValue(id, node) {
|
|
85
81
|
let value = node.value;
|
|
86
82
|
let inputMode = options.defaultInputMode;
|
package/lib/modules/network.d.ts
CHANGED
package/lib/modules/network.js
CHANGED
|
@@ -23,7 +23,6 @@ export default function (app, opts = {}) {
|
|
|
23
23
|
captureInIframes: true,
|
|
24
24
|
axiosInstances: undefined,
|
|
25
25
|
useProxy: false,
|
|
26
|
-
ignoreNetwork: false,
|
|
27
26
|
}, opts);
|
|
28
27
|
if (options.useProxy === false) {
|
|
29
28
|
app.debug.warn('Network module is migrating to proxy api, to gradually migrate and test it set useProxy to true');
|