@openreplay/tracker 8.1.1 → 8.1.2-beta.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 CHANGED
@@ -1,5 +1,7 @@
1
1
  # 8.1.1
2
+
2
3
  [collective patch]
4
+
3
5
  - Console and network are now using proxy objects to capture calls (opt in for network), use ` { network: { useProxy: true } }` to enable it
4
6
  - Force disable Multitab feature for old browsers (2016 and older + safari 14)
5
7
 
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.1'; // TODO: version compatability check inside each plugin.
38
+ this.version = '8.1.2-beta.2'; // TODO: version compatability check inside each plugin.
39
39
  this.compressionThreshold = 24 * 1000;
40
40
  this.restartAttempts = 0;
41
41
  this.bc = null;
package/cjs/index.js CHANGED
@@ -57,6 +57,7 @@ function processOptions(obj) {
57
57
  }
58
58
  class API {
59
59
  constructor(options) {
60
+ var _a;
60
61
  this.options = options;
61
62
  // public featureFlags: FeatureFlags
62
63
  this.app = null;
@@ -118,7 +119,9 @@ class API {
118
119
  (0, scroll_js_1.default)(app);
119
120
  (0, focus_js_1.default)(app);
120
121
  (0, fonts_js_1.default)(app);
121
- (0, network_js_1.default)(app, options.network);
122
+ if (!((_a = options.network) === null || _a === void 0 ? void 0 : _a.ignoreNetwork)) {
123
+ (0, network_js_1.default)(app, options.network);
124
+ }
122
125
  (0, selection_js_1.default)(app);
123
126
  (0, tabs_js_1.default)(app);
124
127
  window.__OPENREPLAY__ = this;
@@ -151,7 +154,7 @@ class API {
151
154
  // no-cors issue only with text/plain or not-set Content-Type
152
155
  // req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
153
156
  req.send(JSON.stringify({
154
- trackerVersion: '8.1.1',
157
+ trackerVersion: '8.1.2-beta.2',
155
158
  projectKey: options.projectKey,
156
159
  doNotTrack,
157
160
  // TODO: add precise reason (an exact API missing)
@@ -2,5 +2,6 @@ import type App from '../app/index.js';
2
2
  export interface Options {
3
3
  consoleMethods: Array<string> | null;
4
4
  consoleThrottling: number;
5
+ ignoreConsole?: boolean;
5
6
  }
6
7
  export default function (app: App, opts: Partial<Options>): void;
@@ -87,7 +87,11 @@ function default_1(app, opts) {
87
87
  const options = Object.assign({
88
88
  consoleMethods,
89
89
  consoleThrottling: 30,
90
+ ignoreConsole: false,
90
91
  }, opts);
92
+ if (options.ignoreConsole) {
93
+ return;
94
+ }
91
95
  if (!Array.isArray(options.consoleMethods) || options.consoleMethods.length === 0) {
92
96
  return;
93
97
  }
@@ -11,6 +11,7 @@ export interface Options {
11
11
  obscureInputEmails: boolean;
12
12
  defaultInputMode: InputMode;
13
13
  obscureInputDates: boolean;
14
+ ignoreInputs?: boolean;
14
15
  }
15
16
  export default function (app: App, opts: Partial<Options>): void;
16
17
  export {};
@@ -80,7 +80,11 @@ function default_1(app, opts) {
80
80
  obscureInputEmails: true,
81
81
  defaultInputMode: 1 /* InputMode.Obscured */,
82
82
  obscureInputDates: false,
83
+ ignoreInputs: false,
83
84
  }, opts);
85
+ if (options.ignoreInputs) {
86
+ return;
87
+ }
84
88
  function getInputValue(id, node) {
85
89
  let value = node.value;
86
90
  let inputMode = options.defaultInputMode;
@@ -25,6 +25,7 @@ export interface Options {
25
25
  sanitizer?: Sanitizer;
26
26
  axiosInstances?: Array<AxiosInstance>;
27
27
  useProxy?: boolean;
28
+ ignoreNetwork?: boolean;
28
29
  }
29
30
  export default function (app: App, opts?: Partial<Options>): void;
30
31
  export {};
@@ -25,6 +25,7 @@ function default_1(app, opts = {}) {
25
25
  captureInIframes: true,
26
26
  axiosInstances: undefined,
27
27
  useProxy: false,
28
+ ignoreNetwork: false,
28
29
  }, opts);
29
30
  if (options.useProxy === false) {
30
31
  app.debug.warn('Network module is migrating to proxy api, to gradually migrate and test it set useProxy to true');
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.1'; // TODO: version compatability check inside each plugin.
35
+ this.version = '8.1.2-beta.2'; // TODO: version compatability check inside each plugin.
36
36
  this.compressionThreshold = 24 * 1000;
37
37
  this.restartAttempts = 0;
38
38
  this.bc = null;
package/lib/index.js CHANGED
@@ -52,6 +52,7 @@ function processOptions(obj) {
52
52
  }
53
53
  export default class API {
54
54
  constructor(options) {
55
+ var _a;
55
56
  this.options = options;
56
57
  // public featureFlags: FeatureFlags
57
58
  this.app = null;
@@ -113,7 +114,9 @@ export default class API {
113
114
  Scroll(app);
114
115
  Focus(app);
115
116
  Fonts(app);
116
- Network(app, options.network);
117
+ if (!((_a = options.network) === null || _a === void 0 ? void 0 : _a.ignoreNetwork)) {
118
+ Network(app, options.network);
119
+ }
117
120
  Selection(app);
118
121
  Tabs(app);
119
122
  window.__OPENREPLAY__ = this;
@@ -146,7 +149,7 @@ export default class API {
146
149
  // no-cors issue only with text/plain or not-set Content-Type
147
150
  // req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
148
151
  req.send(JSON.stringify({
149
- trackerVersion: '8.1.1',
152
+ trackerVersion: '8.1.2-beta.2',
150
153
  projectKey: options.projectKey,
151
154
  doNotTrack,
152
155
  // TODO: add precise reason (an exact API missing)
@@ -2,5 +2,6 @@ import type App from '../app/index.js';
2
2
  export interface Options {
3
3
  consoleMethods: Array<string> | null;
4
4
  consoleThrottling: number;
5
+ ignoreConsole?: boolean;
5
6
  }
6
7
  export default function (app: App, opts: Partial<Options>): void;
@@ -85,7 +85,11 @@ export default function (app, opts) {
85
85
  const options = Object.assign({
86
86
  consoleMethods,
87
87
  consoleThrottling: 30,
88
+ ignoreConsole: false,
88
89
  }, opts);
90
+ if (options.ignoreConsole) {
91
+ return;
92
+ }
89
93
  if (!Array.isArray(options.consoleMethods) || options.consoleMethods.length === 0) {
90
94
  return;
91
95
  }
@@ -11,6 +11,7 @@ export interface Options {
11
11
  obscureInputEmails: boolean;
12
12
  defaultInputMode: InputMode;
13
13
  obscureInputDates: boolean;
14
+ ignoreInputs?: boolean;
14
15
  }
15
16
  export default function (app: App, opts: Partial<Options>): void;
16
17
  export {};
@@ -76,7 +76,11 @@ export default function (app, opts) {
76
76
  obscureInputEmails: true,
77
77
  defaultInputMode: 1 /* InputMode.Obscured */,
78
78
  obscureInputDates: false,
79
+ ignoreInputs: false,
79
80
  }, opts);
81
+ if (options.ignoreInputs) {
82
+ return;
83
+ }
80
84
  function getInputValue(id, node) {
81
85
  let value = node.value;
82
86
  let inputMode = options.defaultInputMode;
@@ -25,6 +25,7 @@ export interface Options {
25
25
  sanitizer?: Sanitizer;
26
26
  axiosInstances?: Array<AxiosInstance>;
27
27
  useProxy?: boolean;
28
+ ignoreNetwork?: boolean;
28
29
  }
29
30
  export default function (app: App, opts?: Partial<Options>): void;
30
31
  export {};
@@ -23,6 +23,7 @@ export default function (app, opts = {}) {
23
23
  captureInIframes: true,
24
24
  axiosInstances: undefined,
25
25
  useProxy: false,
26
+ ignoreNetwork: false,
26
27
  }, opts);
27
28
  if (options.useProxy === false) {
28
29
  app.debug.warn('Network module is migrating to proxy api, to gradually migrate and test it set useProxy to true');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openreplay/tracker",
3
3
  "description": "The OpenReplay tracker main package",
4
- "version": "8.1.1",
4
+ "version": "8.1.2-beta.2",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"