@openreplay/tracker 8.1.2-beta.2 → 8.1.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 +6 -0
- package/cjs/app/index.d.ts +1 -0
- package/cjs/app/index.js +3 -2
- package/cjs/index.js +2 -5
- 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 +3 -2
- package/lib/index.js +2 -5
- 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/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.2
|
|
38
|
+
this.version = '8.1.2'; // 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
|
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;
|
|
@@ -119,9 +118,7 @@ class API {
|
|
|
119
118
|
(0, scroll_js_1.default)(app);
|
|
120
119
|
(0, focus_js_1.default)(app);
|
|
121
120
|
(0, fonts_js_1.default)(app);
|
|
122
|
-
|
|
123
|
-
(0, network_js_1.default)(app, options.network);
|
|
124
|
-
}
|
|
121
|
+
(0, network_js_1.default)(app, options.network);
|
|
125
122
|
(0, selection_js_1.default)(app);
|
|
126
123
|
(0, tabs_js_1.default)(app);
|
|
127
124
|
window.__OPENREPLAY__ = this;
|
|
@@ -154,7 +151,7 @@ class API {
|
|
|
154
151
|
// no-cors issue only with text/plain or not-set Content-Type
|
|
155
152
|
// req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
|
156
153
|
req.send(JSON.stringify({
|
|
157
|
-
trackerVersion: '8.1.2
|
|
154
|
+
trackerVersion: '8.1.2',
|
|
158
155
|
projectKey: options.projectKey,
|
|
159
156
|
doNotTrack,
|
|
160
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.2
|
|
35
|
+
this.version = '8.1.2'; // 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
|
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;
|
|
@@ -114,9 +113,7 @@ export default class API {
|
|
|
114
113
|
Scroll(app);
|
|
115
114
|
Focus(app);
|
|
116
115
|
Fonts(app);
|
|
117
|
-
|
|
118
|
-
Network(app, options.network);
|
|
119
|
-
}
|
|
116
|
+
Network(app, options.network);
|
|
120
117
|
Selection(app);
|
|
121
118
|
Tabs(app);
|
|
122
119
|
window.__OPENREPLAY__ = this;
|
|
@@ -149,7 +146,7 @@ export default class API {
|
|
|
149
146
|
// no-cors issue only with text/plain or not-set Content-Type
|
|
150
147
|
// req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
|
151
148
|
req.send(JSON.stringify({
|
|
152
|
-
trackerVersion: '8.1.2
|
|
149
|
+
trackerVersion: '8.1.2',
|
|
153
150
|
projectKey: options.projectKey,
|
|
154
151
|
doNotTrack,
|
|
155
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');
|