@openreplay/tracker 8.1.2-beta.1 → 8.1.2-beta.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/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-beta.1'; // TODO: version compatability check inside each plugin.
38
+ this.version = '8.1.2-beta.3'; // 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.d.ts CHANGED
@@ -16,10 +16,11 @@ 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;
19
20
  sessionToken?: string;
20
21
  respectDoNotTrack?: boolean;
21
22
  autoResetOnWindowOpen?: boolean;
22
- network?: NetworkOptions;
23
+ network?: Partial<NetworkOptions>;
23
24
  mouse?: MouseHandlerOptions;
24
25
  __DISABLE_SECURE_MODE?: boolean;
25
26
  };
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;
@@ -113,12 +114,16 @@ class API {
113
114
  (0, img_js_1.default)(app);
114
115
  (0, input_js_1.default)(app, options);
115
116
  (0, mouse_js_1.default)(app, options.mouse);
116
- (0, timing_js_1.default)(app, options);
117
- (0, performance_js_1.default)(app, options);
117
+ if (options.ignoreTimings) {
118
+ (0, timing_js_1.default)(app, options);
119
+ (0, performance_js_1.default)(app, options);
120
+ }
118
121
  (0, scroll_js_1.default)(app);
119
122
  (0, focus_js_1.default)(app);
120
123
  (0, fonts_js_1.default)(app);
121
- (0, network_js_1.default)(app, options.network);
124
+ if (!((_a = options.network) === null || _a === void 0 ? void 0 : _a.ignoreNetwork)) {
125
+ (0, network_js_1.default)(app, options.network);
126
+ }
122
127
  (0, selection_js_1.default)(app);
123
128
  (0, tabs_js_1.default)(app);
124
129
  window.__OPENREPLAY__ = this;
@@ -151,7 +156,7 @@ class API {
151
156
  // no-cors issue only with text/plain or not-set Content-Type
152
157
  // req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
153
158
  req.send(JSON.stringify({
154
- trackerVersion: '8.1.2-beta.1',
159
+ trackerVersion: '8.1.2-beta.3',
155
160
  projectKey: options.projectKey,
156
161
  doNotTrack,
157
162
  // 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
  }
@@ -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.2-beta.1'; // TODO: version compatability check inside each plugin.
35
+ this.version = '8.1.2-beta.3'; // 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.d.ts CHANGED
@@ -16,10 +16,11 @@ 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;
19
20
  sessionToken?: string;
20
21
  respectDoNotTrack?: boolean;
21
22
  autoResetOnWindowOpen?: boolean;
22
- network?: NetworkOptions;
23
+ network?: Partial<NetworkOptions>;
23
24
  mouse?: MouseHandlerOptions;
24
25
  __DISABLE_SECURE_MODE?: boolean;
25
26
  };
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;
@@ -108,12 +109,16 @@ export default class API {
108
109
  Img(app);
109
110
  Input(app, options);
110
111
  Mouse(app, options.mouse);
111
- Timing(app, options);
112
- Performance(app, options);
112
+ if (options.ignoreTimings) {
113
+ Timing(app, options);
114
+ Performance(app, options);
115
+ }
113
116
  Scroll(app);
114
117
  Focus(app);
115
118
  Fonts(app);
116
- Network(app, options.network);
119
+ if (!((_a = options.network) === null || _a === void 0 ? void 0 : _a.ignoreNetwork)) {
120
+ Network(app, options.network);
121
+ }
117
122
  Selection(app);
118
123
  Tabs(app);
119
124
  window.__OPENREPLAY__ = this;
@@ -146,7 +151,7 @@ export default class API {
146
151
  // no-cors issue only with text/plain or not-set Content-Type
147
152
  // req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
148
153
  req.send(JSON.stringify({
149
- trackerVersion: '8.1.2-beta.1',
154
+ trackerVersion: '8.1.2-beta.3',
150
155
  projectKey: options.projectKey,
151
156
  doNotTrack,
152
157
  // 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
  }
@@ -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.2-beta.1",
4
+ "version": "8.1.2-beta.3",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"