@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.
Files changed (86) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/cjs/app/index.d.ts +1 -0
  3. package/cjs/app/index.js +4 -3
  4. package/cjs/index.d.ts +1 -2
  5. package/cjs/index.js +4 -9
  6. package/cjs/modules/attributeSender.d.ts +2 -1
  7. package/cjs/modules/attributeSender.js +6 -1
  8. package/cjs/modules/console.d.ts +0 -1
  9. package/cjs/modules/console.js +0 -4
  10. package/cjs/modules/input.d.ts +0 -1
  11. package/cjs/modules/input.js +0 -4
  12. package/cjs/modules/network.d.ts +0 -1
  13. package/cjs/modules/network.js +0 -1
  14. package/lib/app/index.d.ts +1 -0
  15. package/lib/app/index.js +4 -3
  16. package/lib/index.d.ts +1 -2
  17. package/lib/index.js +4 -9
  18. package/lib/modules/attributeSender.d.ts +2 -1
  19. package/lib/modules/attributeSender.js +6 -1
  20. package/lib/modules/console.d.ts +0 -1
  21. package/lib/modules/console.js +0 -4
  22. package/lib/modules/input.d.ts +0 -1
  23. package/lib/modules/input.js +0 -4
  24. package/lib/modules/network.d.ts +0 -1
  25. package/lib/modules/network.js +0 -1
  26. package/package.json +1 -1
  27. package/coverage/clover.xml +0 -2973
  28. package/coverage/coverage-final.json +0 -44
  29. package/coverage/lcov-report/base.css +0 -224
  30. package/coverage/lcov-report/block-navigation.js +0 -87
  31. package/coverage/lcov-report/favicon.png +0 -0
  32. package/coverage/lcov-report/index.html +0 -191
  33. package/coverage/lcov-report/main/app/guards.ts.html +0 -229
  34. package/coverage/lcov-report/main/app/index.html +0 -206
  35. package/coverage/lcov-report/main/app/index.ts.html +0 -2149
  36. package/coverage/lcov-report/main/app/logger.ts.html +0 -277
  37. package/coverage/lcov-report/main/app/messages.gen.ts.html +0 -2752
  38. package/coverage/lcov-report/main/app/observer/iframe_observer.ts.html +0 -148
  39. package/coverage/lcov-report/main/app/observer/iframe_offsets.ts.html +0 -289
  40. package/coverage/lcov-report/main/app/observer/index.html +0 -161
  41. package/coverage/lcov-report/main/app/observer/shadow_root_observer.ts.html +0 -142
  42. package/coverage/lcov-report/main/app/observer/top_observer.ts.html +0 -535
  43. package/coverage/lcov-report/main/app/sanitizer.ts.html +0 -394
  44. package/coverage/lcov-report/main/app/session.ts.html +0 -601
  45. package/coverage/lcov-report/main/app/ticker.ts.html +0 -250
  46. package/coverage/lcov-report/main/index.html +0 -131
  47. package/coverage/lcov-report/main/index.ts.html +0 -1144
  48. package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +0 -949
  49. package/coverage/lcov-report/main/modules/Network/index.html +0 -176
  50. package/coverage/lcov-report/main/modules/Network/index.ts.html +0 -169
  51. package/coverage/lcov-report/main/modules/Network/networkMessage.ts.html +0 -382
  52. package/coverage/lcov-report/main/modules/Network/utils.ts.html +0 -700
  53. package/coverage/lcov-report/main/modules/Network/xhrProxy.ts.html +0 -823
  54. package/coverage/lcov-report/main/modules/attributeSender.ts.html +0 -217
  55. package/coverage/lcov-report/main/modules/axiosSpy.ts.html +0 -700
  56. package/coverage/lcov-report/main/modules/connection.ts.html +0 -160
  57. package/coverage/lcov-report/main/modules/console.ts.html +0 -535
  58. package/coverage/lcov-report/main/modules/constructedStyleSheets.ts.html +0 -559
  59. package/coverage/lcov-report/main/modules/cssrules.ts.html +0 -418
  60. package/coverage/lcov-report/main/modules/exception.ts.html +0 -385
  61. package/coverage/lcov-report/main/modules/featureFlags.ts.html +0 -415
  62. package/coverage/lcov-report/main/modules/focus.ts.html +0 -220
  63. package/coverage/lcov-report/main/modules/fonts.ts.html +0 -289
  64. package/coverage/lcov-report/main/modules/img.ts.html +0 -433
  65. package/coverage/lcov-report/main/modules/index.html +0 -401
  66. package/coverage/lcov-report/main/modules/input.ts.html +0 -811
  67. package/coverage/lcov-report/main/modules/mouse.ts.html +0 -826
  68. package/coverage/lcov-report/main/modules/network.ts.html +0 -1129
  69. package/coverage/lcov-report/main/modules/performance.ts.html +0 -367
  70. package/coverage/lcov-report/main/modules/scroll.ts.html +0 -364
  71. package/coverage/lcov-report/main/modules/selection.ts.html +0 -202
  72. package/coverage/lcov-report/main/modules/tabs.ts.html +0 -124
  73. package/coverage/lcov-report/main/modules/timing.ts.html +0 -841
  74. package/coverage/lcov-report/main/modules/viewport.ts.html +0 -250
  75. package/coverage/lcov-report/main/utils.ts.html +0 -406
  76. package/coverage/lcov-report/prettify.css +0 -1
  77. package/coverage/lcov-report/prettify.js +0 -2
  78. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  79. package/coverage/lcov-report/sorter.js +0 -196
  80. package/coverage/lcov-report/webworker/BatchWriter.ts.html +0 -481
  81. package/coverage/lcov-report/webworker/MessageEncoder.gen.ts.html +0 -949
  82. package/coverage/lcov-report/webworker/PrimitiveEncoder.ts.html +0 -436
  83. package/coverage/lcov-report/webworker/QueueSender.ts.html +0 -505
  84. package/coverage/lcov-report/webworker/index.html +0 -176
  85. package/coverage/lcov-report/webworker/index.ts.html +0 -616
  86. package/coverage/lcov.info +0 -5854
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 9.0.0
2
+
3
+ - Option to disable string dictionary
4
+ - Introduced Feature flags api
5
+ - Fixed input durations recorded on programmable autofill
6
+
1
7
  # 8.1.1
2
8
 
3
9
  [collective patch]
@@ -53,6 +53,7 @@ type AppOptions = {
53
53
  localStorage: Storage | null;
54
54
  sessionStorage: Storage | null;
55
55
  forceSingleTab?: boolean;
56
+ disableStringDict?: boolean;
56
57
  onStart?: StartCallback;
57
58
  network?: NetworkOptions;
58
59
  } & WebworkerOptions & SessOptions;
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.3'; // TODO: version compatability check inside each plugin.
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?: Partial<NetworkOptions>;
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
- if (options.ignoreTimings) {
118
- (0, timing_js_1.default)(app, options);
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
- if (!((_a = options.network) === null || _a === void 0 ? void 0 : _a.ignoreNetwork)) {
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.2-beta.3',
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,
@@ -2,6 +2,5 @@ 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;
6
5
  }
7
6
  export default function (app: App, opts: Partial<Options>): void;
@@ -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
  }
@@ -11,7 +11,6 @@ export interface Options {
11
11
  obscureInputEmails: boolean;
12
12
  defaultInputMode: InputMode;
13
13
  obscureInputDates: boolean;
14
- ignoreInputs?: boolean;
15
14
  }
16
15
  export default function (app: App, opts: Partial<Options>): void;
17
16
  export {};
@@ -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;
@@ -25,7 +25,6 @@ export interface Options {
25
25
  sanitizer?: Sanitizer;
26
26
  axiosInstances?: Array<AxiosInstance>;
27
27
  useProxy?: boolean;
28
- ignoreNetwork?: boolean;
29
28
  }
30
29
  export default function (app: App, opts?: Partial<Options>): void;
31
30
  export {};
@@ -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');
@@ -53,6 +53,7 @@ type AppOptions = {
53
53
  localStorage: Storage | null;
54
54
  sessionStorage: Storage | null;
55
55
  forceSingleTab?: boolean;
56
+ disableStringDict?: boolean;
56
57
  onStart?: StartCallback;
57
58
  network?: NetworkOptions;
58
59
  } & WebworkerOptions & SessOptions;
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.3'; // TODO: version compatability check inside each plugin.
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?: Partial<NetworkOptions>;
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
- if (options.ignoreTimings) {
113
- Timing(app, options);
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
- if (!((_a = options.network) === null || _a === void 0 ? void 0 : _a.ignoreNetwork)) {
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.2-beta.3',
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,
@@ -2,6 +2,5 @@ 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;
6
5
  }
7
6
  export default function (app: App, opts: Partial<Options>): void;
@@ -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
  }
@@ -11,7 +11,6 @@ export interface Options {
11
11
  obscureInputEmails: boolean;
12
12
  defaultInputMode: InputMode;
13
13
  obscureInputDates: boolean;
14
- ignoreInputs?: boolean;
15
14
  }
16
15
  export default function (app: App, opts: Partial<Options>): void;
17
16
  export {};
@@ -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;
@@ -25,7 +25,6 @@ export interface Options {
25
25
  sanitizer?: Sanitizer;
26
26
  axiosInstances?: Array<AxiosInstance>;
27
27
  useProxy?: boolean;
28
- ignoreNetwork?: boolean;
29
28
  }
30
29
  export default function (app: App, opts?: Partial<Options>): void;
31
30
  export {};
@@ -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');
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.3",
4
+ "version": "8.1.3",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"