@openreplay/tracker 4.1.9-beta.2 → 4.1.9-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.
Files changed (40) hide show
  1. package/cjs/app/guards.d.ts +1 -1
  2. package/cjs/app/index.d.ts +7 -7
  3. package/cjs/app/index.js +3 -3
  4. package/cjs/app/logger.d.ts +3 -3
  5. package/cjs/app/messages.gen.d.ts +2 -2
  6. package/cjs/app/messages.gen.js +79 -79
  7. package/cjs/app/nodes.d.ts +1 -1
  8. package/cjs/app/observer/iframe_offsets.d.ts +1 -1
  9. package/cjs/app/observer/top_observer.d.ts +2 -2
  10. package/cjs/app/session.d.ts +2 -2
  11. package/cjs/app/ticker.d.ts +1 -1
  12. package/cjs/common/interaction.d.ts +5 -5
  13. package/cjs/common/messages.gen.d.ts +75 -75
  14. package/cjs/index.d.ts +1 -1
  15. package/cjs/modules/cssrules.js +1 -1
  16. package/cjs/modules/input.d.ts +1 -1
  17. package/cjs/modules/input.js +6 -6
  18. package/cjs/modules/network.d.ts +3 -3
  19. package/cjs/vendors/finder/finder.d.ts +1 -1
  20. package/lib/app/guards.d.ts +1 -1
  21. package/lib/app/index.d.ts +7 -7
  22. package/lib/app/index.js +3 -3
  23. package/lib/app/logger.d.ts +3 -3
  24. package/lib/app/messages.gen.d.ts +2 -2
  25. package/lib/app/messages.gen.js +75 -75
  26. package/lib/app/nodes.d.ts +1 -1
  27. package/lib/app/observer/iframe_offsets.d.ts +1 -1
  28. package/lib/app/observer/top_observer.d.ts +2 -2
  29. package/lib/app/session.d.ts +2 -2
  30. package/lib/app/ticker.d.ts +1 -1
  31. package/lib/common/interaction.d.ts +5 -5
  32. package/lib/common/messages.gen.d.ts +75 -75
  33. package/lib/common/tsconfig.tsbuildinfo +1 -1
  34. package/lib/index.d.ts +1 -1
  35. package/lib/modules/cssrules.js +1 -1
  36. package/lib/modules/input.d.ts +1 -1
  37. package/lib/modules/input.js +6 -6
  38. package/lib/modules/network.d.ts +3 -3
  39. package/lib/vendors/finder/finder.d.ts +1 -1
  40. package/package.json +1 -1
@@ -1,6 +1,4 @@
1
1
  export declare const enum Type {
2
- BatchMetadata = 81,
3
- PartitionedMessage = 82,
4
2
  Timestamp = 0,
5
3
  SetPageLocation = 4,
6
4
  SetViewportSize = 5,
@@ -58,45 +56,34 @@ export declare const enum Type {
58
56
  AdoptedSSAddOwner = 76,
59
57
  AdoptedSSRemoveOwner = 77,
60
58
  Zustand = 79,
61
- JSException = 78
59
+ JSException = 78,
60
+ BatchMetadata = 81,
61
+ PartitionedMessage = 82
62
62
  }
63
- export declare type BatchMetadata = [
64
- Type.BatchMetadata,
65
- number,
66
- number,
67
- number,
68
- number,
69
- string
70
- ];
71
- export declare type PartitionedMessage = [
72
- Type.PartitionedMessage,
73
- number,
74
- number
75
- ];
76
- export declare type Timestamp = [
63
+ export type Timestamp = [
77
64
  Type.Timestamp,
78
65
  number
79
66
  ];
80
- export declare type SetPageLocation = [
67
+ export type SetPageLocation = [
81
68
  Type.SetPageLocation,
82
69
  string,
83
70
  string,
84
71
  number
85
72
  ];
86
- export declare type SetViewportSize = [
73
+ export type SetViewportSize = [
87
74
  Type.SetViewportSize,
88
75
  number,
89
76
  number
90
77
  ];
91
- export declare type SetViewportScroll = [
78
+ export type SetViewportScroll = [
92
79
  Type.SetViewportScroll,
93
80
  number,
94
81
  number
95
82
  ];
96
- export declare type CreateDocument = [
83
+ export type CreateDocument = [
97
84
  Type.CreateDocument
98
85
  ];
99
- export declare type CreateElementNode = [
86
+ export type CreateElementNode = [
100
87
  Type.CreateElementNode,
101
88
  number,
102
89
  number,
@@ -104,66 +91,66 @@ export declare type CreateElementNode = [
104
91
  string,
105
92
  boolean
106
93
  ];
107
- export declare type CreateTextNode = [
94
+ export type CreateTextNode = [
108
95
  Type.CreateTextNode,
109
96
  number,
110
97
  number,
111
98
  number
112
99
  ];
113
- export declare type MoveNode = [
100
+ export type MoveNode = [
114
101
  Type.MoveNode,
115
102
  number,
116
103
  number,
117
104
  number
118
105
  ];
119
- export declare type RemoveNode = [
106
+ export type RemoveNode = [
120
107
  Type.RemoveNode,
121
108
  number
122
109
  ];
123
- export declare type SetNodeAttribute = [
110
+ export type SetNodeAttribute = [
124
111
  Type.SetNodeAttribute,
125
112
  number,
126
113
  string,
127
114
  string
128
115
  ];
129
- export declare type RemoveNodeAttribute = [
116
+ export type RemoveNodeAttribute = [
130
117
  Type.RemoveNodeAttribute,
131
118
  number,
132
119
  string
133
120
  ];
134
- export declare type SetNodeData = [
121
+ export type SetNodeData = [
135
122
  Type.SetNodeData,
136
123
  number,
137
124
  string
138
125
  ];
139
- export declare type SetNodeScroll = [
126
+ export type SetNodeScroll = [
140
127
  Type.SetNodeScroll,
141
128
  number,
142
129
  number,
143
130
  number
144
131
  ];
145
- export declare type SetInputTarget = [
132
+ export type SetInputTarget = [
146
133
  Type.SetInputTarget,
147
134
  number,
148
135
  string
149
136
  ];
150
- export declare type SetInputValue = [
137
+ export type SetInputValue = [
151
138
  Type.SetInputValue,
152
139
  number,
153
140
  string,
154
141
  number
155
142
  ];
156
- export declare type SetInputChecked = [
143
+ export type SetInputChecked = [
157
144
  Type.SetInputChecked,
158
145
  number,
159
146
  boolean
160
147
  ];
161
- export declare type MouseMove = [
148
+ export type MouseMove = [
162
149
  Type.MouseMove,
163
150
  number,
164
151
  number
165
152
  ];
166
- export declare type NetworkRequest = [
153
+ export type NetworkRequest = [
167
154
  Type.NetworkRequest,
168
155
  string,
169
156
  string,
@@ -174,12 +161,12 @@ export declare type NetworkRequest = [
174
161
  number,
175
162
  number
176
163
  ];
177
- export declare type ConsoleLog = [
164
+ export type ConsoleLog = [
178
165
  Type.ConsoleLog,
179
166
  string,
180
167
  string
181
168
  ];
182
- export declare type PageLoadTiming = [
169
+ export type PageLoadTiming = [
183
170
  Type.PageLoadTiming,
184
171
  number,
185
172
  number,
@@ -191,48 +178,48 @@ export declare type PageLoadTiming = [
191
178
  number,
192
179
  number
193
180
  ];
194
- export declare type PageRenderTiming = [
181
+ export type PageRenderTiming = [
195
182
  Type.PageRenderTiming,
196
183
  number,
197
184
  number,
198
185
  number
199
186
  ];
200
- export declare type JSExceptionDeprecated = [
187
+ export type JSExceptionDeprecated = [
201
188
  Type.JSExceptionDeprecated,
202
189
  string,
203
190
  string,
204
191
  string
205
192
  ];
206
- export declare type CustomEvent = [
193
+ export type CustomEvent = [
207
194
  Type.CustomEvent,
208
195
  string,
209
196
  string
210
197
  ];
211
- export declare type UserID = [
198
+ export type UserID = [
212
199
  Type.UserID,
213
200
  string
214
201
  ];
215
- export declare type UserAnonymousID = [
202
+ export type UserAnonymousID = [
216
203
  Type.UserAnonymousID,
217
204
  string
218
205
  ];
219
- export declare type Metadata = [
206
+ export type Metadata = [
220
207
  Type.Metadata,
221
208
  string,
222
209
  string
223
210
  ];
224
- export declare type CSSInsertRule = [
211
+ export type CSSInsertRule = [
225
212
  Type.CSSInsertRule,
226
213
  number,
227
214
  string,
228
215
  number
229
216
  ];
230
- export declare type CSSDeleteRule = [
217
+ export type CSSDeleteRule = [
231
218
  Type.CSSDeleteRule,
232
219
  number,
233
220
  number
234
221
  ];
235
- export declare type Fetch = [
222
+ export type Fetch = [
236
223
  Type.Fetch,
237
224
  string,
238
225
  string,
@@ -242,59 +229,59 @@ export declare type Fetch = [
242
229
  number,
243
230
  number
244
231
  ];
245
- export declare type Profiler = [
232
+ export type Profiler = [
246
233
  Type.Profiler,
247
234
  string,
248
235
  number,
249
236
  string,
250
237
  string
251
238
  ];
252
- export declare type OTable = [
239
+ export type OTable = [
253
240
  Type.OTable,
254
241
  string,
255
242
  string
256
243
  ];
257
- export declare type StateAction = [
244
+ export type StateAction = [
258
245
  Type.StateAction,
259
246
  string
260
247
  ];
261
- export declare type Redux = [
248
+ export type Redux = [
262
249
  Type.Redux,
263
250
  string,
264
251
  string,
265
252
  number
266
253
  ];
267
- export declare type Vuex = [
254
+ export type Vuex = [
268
255
  Type.Vuex,
269
256
  string,
270
257
  string
271
258
  ];
272
- export declare type MobX = [
259
+ export type MobX = [
273
260
  Type.MobX,
274
261
  string,
275
262
  string
276
263
  ];
277
- export declare type NgRx = [
264
+ export type NgRx = [
278
265
  Type.NgRx,
279
266
  string,
280
267
  string,
281
268
  number
282
269
  ];
283
- export declare type GraphQL = [
270
+ export type GraphQL = [
284
271
  Type.GraphQL,
285
272
  string,
286
273
  string,
287
274
  string,
288
275
  string
289
276
  ];
290
- export declare type PerformanceTrack = [
277
+ export type PerformanceTrack = [
291
278
  Type.PerformanceTrack,
292
279
  number,
293
280
  number,
294
281
  number,
295
282
  number
296
283
  ];
297
- export declare type ResourceTiming = [
284
+ export type ResourceTiming = [
298
285
  Type.ResourceTiming,
299
286
  number,
300
287
  number,
@@ -305,27 +292,27 @@ export declare type ResourceTiming = [
305
292
  string,
306
293
  string
307
294
  ];
308
- export declare type ConnectionInformation = [
295
+ export type ConnectionInformation = [
309
296
  Type.ConnectionInformation,
310
297
  number,
311
298
  string
312
299
  ];
313
- export declare type SetPageVisibility = [
300
+ export type SetPageVisibility = [
314
301
  Type.SetPageVisibility,
315
302
  boolean
316
303
  ];
317
- export declare type LoadFontFace = [
304
+ export type LoadFontFace = [
318
305
  Type.LoadFontFace,
319
306
  number,
320
307
  string,
321
308
  string,
322
309
  string
323
310
  ];
324
- export declare type SetNodeFocus = [
311
+ export type SetNodeFocus = [
325
312
  Type.SetNodeFocus,
326
313
  number
327
314
  ];
328
- export declare type LongTask = [
315
+ export type LongTask = [
329
316
  Type.LongTask,
330
317
  number,
331
318
  number,
@@ -335,87 +322,100 @@ export declare type LongTask = [
335
322
  string,
336
323
  string
337
324
  ];
338
- export declare type SetNodeAttributeURLBased = [
325
+ export type SetNodeAttributeURLBased = [
339
326
  Type.SetNodeAttributeURLBased,
340
327
  number,
341
328
  string,
342
329
  string,
343
330
  string
344
331
  ];
345
- export declare type SetCSSDataURLBased = [
332
+ export type SetCSSDataURLBased = [
346
333
  Type.SetCSSDataURLBased,
347
334
  number,
348
335
  string,
349
336
  string
350
337
  ];
351
- export declare type TechnicalInfo = [
338
+ export type TechnicalInfo = [
352
339
  Type.TechnicalInfo,
353
340
  string,
354
341
  string
355
342
  ];
356
- export declare type CustomIssue = [
343
+ export type CustomIssue = [
357
344
  Type.CustomIssue,
358
345
  string,
359
346
  string
360
347
  ];
361
- export declare type CSSInsertRuleURLBased = [
348
+ export type CSSInsertRuleURLBased = [
362
349
  Type.CSSInsertRuleURLBased,
363
350
  number,
364
351
  string,
365
352
  number,
366
353
  string
367
354
  ];
368
- export declare type MouseClick = [
355
+ export type MouseClick = [
369
356
  Type.MouseClick,
370
357
  number,
371
358
  number,
372
359
  string,
373
360
  string
374
361
  ];
375
- export declare type CreateIFrameDocument = [
362
+ export type CreateIFrameDocument = [
376
363
  Type.CreateIFrameDocument,
377
364
  number,
378
365
  number
379
366
  ];
380
- export declare type AdoptedSSReplaceURLBased = [
367
+ export type AdoptedSSReplaceURLBased = [
381
368
  Type.AdoptedSSReplaceURLBased,
382
369
  number,
383
370
  string,
384
371
  string
385
372
  ];
386
- export declare type AdoptedSSInsertRuleURLBased = [
373
+ export type AdoptedSSInsertRuleURLBased = [
387
374
  Type.AdoptedSSInsertRuleURLBased,
388
375
  number,
389
376
  string,
390
377
  number,
391
378
  string
392
379
  ];
393
- export declare type AdoptedSSDeleteRule = [
380
+ export type AdoptedSSDeleteRule = [
394
381
  Type.AdoptedSSDeleteRule,
395
382
  number,
396
383
  number
397
384
  ];
398
- export declare type AdoptedSSAddOwner = [
385
+ export type AdoptedSSAddOwner = [
399
386
  Type.AdoptedSSAddOwner,
400
387
  number,
401
388
  number
402
389
  ];
403
- export declare type AdoptedSSRemoveOwner = [
390
+ export type AdoptedSSRemoveOwner = [
404
391
  Type.AdoptedSSRemoveOwner,
405
392
  number,
406
393
  number
407
394
  ];
408
- export declare type Zustand = [
395
+ export type Zustand = [
409
396
  Type.Zustand,
410
397
  string,
411
398
  string
412
399
  ];
413
- export declare type JSException = [
400
+ export type JSException = [
414
401
  Type.JSException,
415
402
  string,
416
403
  string,
417
404
  string,
418
405
  string
419
406
  ];
420
- declare type Message = BatchMetadata | PartitionedMessage | Timestamp | SetPageLocation | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequest | ConsoleLog | PageLoadTiming | PageRenderTiming | JSExceptionDeprecated | CustomEvent | UserID | UserAnonymousID | Metadata | CSSInsertRule | CSSDeleteRule | Fetch | Profiler | OTable | StateAction | Redux | Vuex | MobX | NgRx | GraphQL | PerformanceTrack | ResourceTiming | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | LongTask | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | CSSInsertRuleURLBased | MouseClick | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | Zustand | JSException;
407
+ export type BatchMetadata = [
408
+ Type.BatchMetadata,
409
+ number,
410
+ number,
411
+ number,
412
+ number,
413
+ string
414
+ ];
415
+ export type PartitionedMessage = [
416
+ Type.PartitionedMessage,
417
+ number,
418
+ number
419
+ ];
420
+ type Message = Timestamp | SetPageLocation | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequest | ConsoleLog | PageLoadTiming | PageRenderTiming | JSExceptionDeprecated | CustomEvent | UserID | UserAnonymousID | Metadata | CSSInsertRule | CSSDeleteRule | Fetch | Profiler | OTable | StateAction | Redux | Vuex | MobX | NgRx | GraphQL | PerformanceTrack | ResourceTiming | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | LongTask | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | CSSInsertRuleURLBased | MouseClick | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | Zustand | JSException | BatchMetadata | PartitionedMessage;
421
421
  export default Message;
package/cjs/index.d.ts CHANGED
@@ -12,7 +12,7 @@ import type { Options as TimingOptions } from './modules/timing.js';
12
12
  import type { Options as NetworkOptions } from './modules/network.js';
13
13
  import type { StartOptions } from './app/index.js';
14
14
  import type { StartPromiseReturn } from './app/index.js';
15
- export declare type Options = Partial<AppOptions & ConsoleOptions & ExceptionOptions & InputOptions & PerformanceOptions & TimingOptions> & {
15
+ export type Options = Partial<AppOptions & ConsoleOptions & ExceptionOptions & InputOptions & PerformanceOptions & TimingOptions> & {
16
16
  projectID?: number;
17
17
  projectKey: string;
18
18
  sessionToken?: string;
@@ -76,7 +76,7 @@ function default_1(app) {
76
76
  patchContext(window);
77
77
  app.observer.attachContextCallback(patchContext);
78
78
  app.nodes.attachNodeCallback((node) => {
79
- if (!((0, guards_js_1.hasTag)(node, 'style')) || !node.sheet) {
79
+ if (!(0, guards_js_1.hasTag)(node, 'style') || !node.sheet) {
80
80
  return;
81
81
  }
82
82
  if (node.textContent !== null && node.textContent.trim().length > 0) {
@@ -1,5 +1,5 @@
1
1
  import type App from '../app/index.js';
2
- declare type TextEditableElement = HTMLInputElement | HTMLTextAreaElement;
2
+ type TextEditableElement = HTMLInputElement | HTMLTextAreaElement;
3
3
  export declare function getInputLabel(node: TextEditableElement): string;
4
4
  export declare const enum InputMode {
5
5
  Plain = 0,
@@ -68,7 +68,7 @@ function default_1(app, opts) {
68
68
  const options = Object.assign({
69
69
  obscureInputNumbers: true,
70
70
  obscureInputEmails: true,
71
- defaultInputMode: 0 /* Plain */,
71
+ defaultInputMode: 0 /* InputMode.Plain */,
72
72
  obscureInputDates: false,
73
73
  }, opts);
74
74
  function sendInputTarget(id, node) {
@@ -81,22 +81,22 @@ function default_1(app, opts) {
81
81
  let value = node.value;
82
82
  let inputMode = options.defaultInputMode;
83
83
  if (node.type === 'password' || app.sanitizer.isHidden(id)) {
84
- inputMode = 2 /* Hidden */;
84
+ inputMode = 2 /* InputMode.Hidden */;
85
85
  }
86
86
  else if (app.sanitizer.isObscured(id) ||
87
- (inputMode === 0 /* Plain */ &&
87
+ (inputMode === 0 /* InputMode.Plain */ &&
88
88
  ((options.obscureInputNumbers && node.type !== 'date' && /\d\d\d\d/.test(value)) ||
89
89
  (options.obscureInputDates && node.type === 'date') ||
90
90
  (options.obscureInputEmails && (node.type === 'email' || !!~value.indexOf('@')))))) {
91
- inputMode = 1 /* Obscured */;
91
+ inputMode = 1 /* InputMode.Obscured */;
92
92
  }
93
93
  let mask = 0;
94
94
  switch (inputMode) {
95
- case 2 /* Hidden */:
95
+ case 2 /* InputMode.Hidden */:
96
96
  mask = -1;
97
97
  value = '';
98
98
  break;
99
- case 1 /* Obscured */:
99
+ case 1 /* InputMode.Obscured */:
100
100
  mask = value.length;
101
101
  value = '';
102
102
  break;
@@ -1,6 +1,6 @@
1
1
  import type App from '../app/index.js';
2
- declare type XHRRequestBody = Parameters<XMLHttpRequest['send']>[0];
3
- declare type FetchRequestBody = RequestInit['body'];
2
+ type XHRRequestBody = Parameters<XMLHttpRequest['send']>[0];
3
+ type FetchRequestBody = RequestInit['body'];
4
4
  interface RequestData {
5
5
  body: XHRRequestBody | FetchRequestBody;
6
6
  headers: Record<string, string>;
@@ -16,7 +16,7 @@ interface RequestResponseData {
16
16
  request: RequestData;
17
17
  response: ResponseData;
18
18
  }
19
- declare type Sanitizer = (data: RequestResponseData) => RequestResponseData | null;
19
+ type Sanitizer = (data: RequestResponseData) => RequestResponseData | null;
20
20
  export interface Options {
21
21
  sessionTokenHeader: string | boolean;
22
22
  failuresOnly: boolean;
@@ -1,4 +1,4 @@
1
- export declare type Options = {
1
+ export type Options = {
2
2
  root: Element;
3
3
  idName: (name: string) => boolean;
4
4
  className: (name: string) => boolean;
@@ -4,7 +4,7 @@ export declare function isElementNode(node: Node): node is Element;
4
4
  export declare function isTextNode(node: Node): node is Text;
5
5
  export declare function isDocument(node: Node): node is Document;
6
6
  export declare function isRootNode(node: Node): node is Document | DocumentFragment;
7
- declare type TagTypeMap = {
7
+ type TagTypeMap = {
8
8
  html: HTMLHtmlElement;
9
9
  body: HTMLBodyElement;
10
10
  img: HTMLImageElement;
@@ -22,19 +22,19 @@ interface OnStartInfo {
22
22
  userUUID: string;
23
23
  }
24
24
  declare const CANCELED: "canceled";
25
- declare type SuccessfulStart = OnStartInfo & {
25
+ type SuccessfulStart = OnStartInfo & {
26
26
  success: true;
27
27
  };
28
- declare type UnsuccessfulStart = {
28
+ type UnsuccessfulStart = {
29
29
  reason: typeof CANCELED | string;
30
30
  success: false;
31
31
  };
32
32
  declare const UnsuccessfulStart: (reason: string) => UnsuccessfulStart;
33
33
  declare const SuccessfulStart: (body: OnStartInfo) => SuccessfulStart;
34
- export declare type StartPromiseReturn = SuccessfulStart | UnsuccessfulStart;
35
- declare type StartCallback = (i: OnStartInfo) => void;
36
- declare type CommitCallback = (messages: Array<Message>) => void;
37
- declare type AppOptions = {
34
+ export type StartPromiseReturn = SuccessfulStart | UnsuccessfulStart;
35
+ type StartCallback = (i: OnStartInfo) => void;
36
+ type CommitCallback = (messages: Array<Message>) => void;
37
+ type AppOptions = {
38
38
  revID: string;
39
39
  node_id: string;
40
40
  session_reset_key: string;
@@ -51,7 +51,7 @@ declare type AppOptions = {
51
51
  sessionStorage: Storage | null;
52
52
  onStart?: StartCallback;
53
53
  } & WebworkerOptions & SessOptions;
54
- export declare type Options = AppOptions & ObserverOptions & SanitizerOptions;
54
+ export type Options = AppOptions & ObserverOptions & SanitizerOptions;
55
55
  export declare const DEFAULT_INGEST_POINT = "https://api.openreplay.com/ingest";
56
56
  export default class App {
57
57
  readonly nodes: Nodes;
package/lib/app/index.js CHANGED
@@ -74,7 +74,7 @@ export default class App {
74
74
  this.session.applySessionHash(sessionToken);
75
75
  }
76
76
  try {
77
- this.worker = new Worker(URL.createObjectURL(new Blob(['"use strict";class t{constructor(t,i,s,e=10,n=1e3){this.onUnauthorised=i,this.onFailure=s,this.MAX_ATTEMPTS_COUNT=e,this.ATTEMPT_TIMEOUT=n,this.attemptsCount=0,this.busy=!1,this.queue=[],this.token=null,this.ingestURL=t+"/v1/web/i"}authorise(t){this.token=t,this.busy||this.sendNext()}push(t){this.busy||!this.token?this.queue.push(t):this.sendBatch(t)}sendNext(){const t=this.queue.shift();t?this.sendBatch(t):this.busy=!1}retry(t){this.attemptsCount>=this.MAX_ATTEMPTS_COUNT?this.onFailure(`Failed to send batch after ${this.attemptsCount} attempts.`):(this.attemptsCount++,setTimeout(()=>this.sendBatch(t),this.ATTEMPT_TIMEOUT*this.attemptsCount))}sendBatch(t){this.busy=!0,fetch(this.ingestURL,{body:t,method:"POST",headers:{Authorization:"Bearer "+this.token},keepalive:t.length<65536}).then(i=>{if(401===i.status)return this.busy=!1,void this.onUnauthorised();i.status>=400?this.retry(t):(this.attemptsCount=0,this.sendNext())}).catch(i=>{console.warn("OpenReplay:",i),this.retry(t)})}clean(){this.queue.length=0,this.token=null}}const i="function"==typeof TextEncoder?new TextEncoder:{encode(t){const i=t.length,s=new Uint8Array(3*i);let e=-1;for(let n=0,r=0,h=0;h!==i;){if(n=t.charCodeAt(h),h+=1,n>=55296&&n<=56319){if(h===i){s[e+=1]=239,s[e+=1]=191,s[e+=1]=189;break}if(r=t.charCodeAt(h),!(r>=56320&&r<=57343)){s[e+=1]=239,s[e+=1]=191,s[e+=1]=189;continue}if(n=1024*(n-55296)+r-56320+65536,h+=1,n>65535){s[e+=1]=240|n>>>18,s[e+=1]=128|n>>>12&63,s[e+=1]=128|n>>>6&63,s[e+=1]=128|63&n;continue}}n<=127?s[e+=1]=0|n:n<=2047?(s[e+=1]=192|n>>>6,s[e+=1]=128|63&n):(s[e+=1]=224|n>>>12,s[e+=1]=128|n>>>6&63,s[e+=1]=128|63&n)}return s.subarray(0,e+1)}};class s extends class{constructor(t){this.size=t,this.offset=0,this.checkpointOffset=0,this.data=new Uint8Array(t)}getCurrentOffset(){return this.offset}checkpoint(){this.checkpointOffset=this.offset}get isEmpty(){return 0===this.offset}skip(t){return this.offset+=t,this.offset<=this.size}set(t,i){this.data.set(t,i)}boolean(t){return this.data[this.offset++]=+t,this.offset<=this.size}uint(t){for((t<0||t>Number.MAX_SAFE_INTEGER)&&(t=0);t>=128;)this.data[this.offset++]=t%256|128,t=Math.floor(t/128);return this.data[this.offset++]=t,this.offset<=this.size}int(t){return t=Math.round(t),this.uint(t>=0?2*t:-2*t-1)}string(t){const s=i.encode(t),e=s.byteLength;return!(!this.uint(e)||this.offset+e>this.size)&&(this.data.set(s,this.offset),this.offset+=e,!0)}reset(){this.offset=0,this.checkpointOffset=0}flush(){const t=this.data.slice(0,this.checkpointOffset);return this.reset(),t}}{encode(t){switch(t[0]){case 81:return this.uint(t[1])&&this.uint(t[2])&&this.uint(t[3])&&this.int(t[4])&&this.string(t[5]);case 82:return this.uint(t[1])&&this.uint(t[2]);case 0:return this.uint(t[1]);case 4:return this.string(t[1])&&this.string(t[2])&&this.uint(t[3]);case 5:return this.uint(t[1])&&this.uint(t[2]);case 6:return this.int(t[1])&&this.int(t[2]);case 7:return!0;case 8:return this.uint(t[1])&&this.uint(t[2])&&this.uint(t[3])&&this.string(t[4])&&this.boolean(t[5]);case 9:case 10:return this.uint(t[1])&&this.uint(t[2])&&this.uint(t[3]);case 11:return this.uint(t[1]);case 12:return this.uint(t[1])&&this.string(t[2])&&this.string(t[3]);case 13:case 14:return this.uint(t[1])&&this.string(t[2]);case 16:return this.uint(t[1])&&this.int(t[2])&&this.int(t[3]);case 17:return this.uint(t[1])&&this.string(t[2]);case 18:return this.uint(t[1])&&this.string(t[2])&&this.int(t[3]);case 19:return this.uint(t[1])&&this.boolean(t[2]);case 20:return this.uint(t[1])&&this.uint(t[2]);case 21:return this.string(t[1])&&this.string(t[2])&&this.string(t[3])&&this.string(t[4])&&this.string(t[5])&&this.uint(t[6])&&this.uint(t[7])&&this.uint(t[8]);case 22:return this.string(t[1])&&this.string(t[2]);case 23:return this.uint(t[1])&&this.uint(t[2])&&this.uint(t[3])&&this.uint(t[4])&&this.uint(t[5])&&this.uint(t[6])&&this.uint(t[7])&&this.uint(t[8])&&this.uint(t[9]);case 24:return this.uint(t[1])&&this.uint(t[2])&&this.uint(t[3]);case 25:return this.string(t[1])&&this.string(t[2])&&this.string(t[3]);case 27:return this.string(t[1])&&this.string(t[2]);case 28:case 29:return this.string(t[1]);case 30:return this.string(t[1])&&this.string(t[2]);case 37:return this.uint(t[1])&&this.string(t[2])&&this.uint(t[3]);case 38:return this.uint(t[1])&&this.uint(t[2]);case 39:return this.string(t[1])&&this.string(t[2])&&this.string(t[3])&&this.string(t[4])&&this.uint(t[5])&&this.uint(t[6])&&this.uint(t[7]);case 40:return this.string(t[1])&&this.uint(t[2])&&this.string(t[3])&&this.string(t[4]);case 41:return this.string(t[1])&&this.string(t[2]);case 42:return this.string(t[1]);case 44:return this.string(t[1])&&this.string(t[2])&&this.uint(t[3]);case 45:case 46:return this.string(t[1])&&this.string(t[2]);case 47:return this.string(t[1])&&this.string(t[2])&&this.uint(t[3]);case 48:return this.string(t[1])&&this.string(t[2])&&this.string(t[3])&&this.string(t[4]);case 49:return this.int(t[1])&&this.int(t[2])&&this.uint(t[3])&&this.uint(t[4]);case 53:return this.uint(t[1])&&this.uint(t[2])&&this.uint(t[3])&&this.uint(t[4])&&this.uint(t[5])&&this.uint(t[6])&&this.string(t[7])&&this.string(t[8]);case 54:return this.uint(t[1])&&this.string(t[2]);case 55:return this.boolean(t[1]);case 57:return this.uint(t[1])&&this.string(t[2])&&this.string(t[3])&&this.string(t[4]);case 58:return this.int(t[1]);case 59:return this.uint(t[1])&&this.uint(t[2])&&this.uint(t[3])&&this.uint(t[4])&&this.string(t[5])&&this.string(t[6])&&this.string(t[7]);case 60:return this.uint(t[1])&&this.string(t[2])&&this.string(t[3])&&this.string(t[4]);case 61:return this.uint(t[1])&&this.string(t[2])&&this.string(t[3]);case 63:case 64:return this.string(t[1])&&this.string(t[2]);case 67:return this.uint(t[1])&&this.string(t[2])&&this.uint(t[3])&&this.string(t[4]);case 69:return this.uint(t[1])&&this.uint(t[2])&&this.string(t[3])&&this.string(t[4]);case 70:return this.uint(t[1])&&this.uint(t[2]);case 71:return this.uint(t[1])&&this.string(t[2])&&this.string(t[3]);case 73:return this.uint(t[1])&&this.string(t[2])&&this.uint(t[3])&&this.string(t[4]);case 75:case 76:case 77:return this.uint(t[1])&&this.uint(t[2]);case 79:return this.string(t[1])&&this.string(t[2]);case 78:return this.string(t[1])&&this.string(t[2])&&this.string(t[3])&&this.string(t[4])}}}class e{constructor(t,i,e,n){this.pageNo=t,this.timestamp=i,this.url=e,this.onBatch=n,this.nextIndex=0,this.beaconSize=2e5,this.encoder=new s(this.beaconSize),this.sizeBuffer=new Uint8Array(3),this.isEmpty=!0,this.beaconSizeLimit=1e6,this.prepare()}writeType(t){return this.encoder.uint(t[0])}writeFields(t){return this.encoder.encode(t)}writeSizeAt(t,i){for(let i=0;i<3;i++)this.sizeBuffer[i]=t>>8*i;this.encoder.set(this.sizeBuffer,i)}prepare(){if(!this.encoder.isEmpty)return;const t=[81,1,this.pageNo,this.nextIndex,this.timestamp,this.url];this.writeType(t),this.writeFields(t),this.isEmpty=!0}writeWithSize(t){const i=this.encoder;if(!this.writeType(t)||!i.skip(3))return!1;const s=i.getCurrentOffset(),e=this.writeFields(t);if(e){const e=i.getCurrentOffset()-s;if(e>16777215)return console.warn("OpenReplay: max message size overflow."),!1;this.writeSizeAt(e,s-3),i.checkpoint(),this.isEmpty=this.isEmpty&&0===t[0],this.nextIndex++}return e}setBeaconSizeLimit(t){this.beaconSizeLimit=t}writeMessage(t){0===t[0]&&(this.timestamp=t[1]),4===t[0]&&(this.url=t[1]),this.writeWithSize(t)||(this.finaliseBatch(),this.writeWithSize(t)||(this.encoder=new s(this.beaconSizeLimit),this.prepare(),this.writeWithSize(t)||console.warn("OpenReplay: beacon size overflow. Skipping large message.",t,this),this.encoder=new s(this.beaconSize),this.prepare()))}finaliseBatch(){this.isEmpty||(this.onBatch(this.encoder.flush()),this.prepare())}clean(){this.encoder.reset()}}var n;!function(t){t[t.NotActive=0]="NotActive",t[t.Starting=1]="Starting",t[t.Stopping=2]="Stopping",t[t.Active=3]="Active"}(n||(n={}));let r=null,h=null;function u(){h&&h.finaliseBatch()}function a(){n.Stopping,null!==g&&(clearInterval(g),g=null),h&&(h.clean(),h=null),r&&(r.clean(),r=null),n.NotActive}function c(){postMessage("restart"),a()}n.NotActive;let o,g=null;self.onmessage=({data:i})=>{if(null!=i){if("stop"===i)return u(),void a();if(Array.isArray(i)){if(!h)throw new Error("WebWorker: writer not initialised. Service Should be Started.");const t=h;i.forEach(i=>{55===i[0]&&(i[1]?o=setTimeout(()=>c(),18e5):clearTimeout(o)),t.writeMessage(i)})}else{if("start"===i.type)return n.Starting,r=new t(i.ingestPoint,()=>{c()},t=>{!function(t){postMessage({type:"failure",reason:t}),a()}(t)},i.connAttemptCount,i.connAttemptGap),h=new e(i.pageNo,i.timestamp,i.url,t=>r&&r.push(t)),null===g&&(g=setInterval(u,1e4)),n.Active;if("auth"===i.type){if(!r)throw new Error("WebWorker: sender not initialised. Received auth.");if(!h)throw new Error("WebWorker: writer not initialised. Received auth.");return r.authorise(i.token),void(i.beaconSizeLimit&&h.setBeaconSizeLimit(i.beaconSizeLimit))}}}else u()};'], { type: 'text/javascript' })));
77
+ this.worker = new Worker(URL.createObjectURL(new Blob(['"use strict";class t{constructor(t,i,s,e=10,n=1e3){this.onUnauthorised=i,this.onFailure=s,this.MAX_ATTEMPTS_COUNT=e,this.ATTEMPT_TIMEOUT=n,this.attemptsCount=0,this.busy=!1,this.queue=[],this.token=null,this.ingestURL=t+"/v1/web/i"}authorise(t){this.token=t,this.busy||this.sendNext()}push(t){this.busy||!this.token?this.queue.push(t):this.sendBatch(t)}sendNext(){const t=this.queue.shift();t?this.sendBatch(t):this.busy=!1}retry(t){this.attemptsCount>=this.MAX_ATTEMPTS_COUNT?this.onFailure(`Failed to send batch after ${this.attemptsCount} attempts.`):(this.attemptsCount++,setTimeout(()=>this.sendBatch(t),this.ATTEMPT_TIMEOUT*this.attemptsCount))}sendBatch(t){this.busy=!0,fetch(this.ingestURL,{body:t,method:"POST",headers:{Authorization:"Bearer "+this.token},keepalive:t.length<65536}).then(i=>{if(401===i.status)return this.busy=!1,void this.onUnauthorised();i.status>=400?this.retry(t):(this.attemptsCount=0,this.sendNext())}).catch(i=>{console.warn("OpenReplay:",i),this.retry(t)})}clean(){this.queue.length=0,this.token=null}}const i="function"==typeof TextEncoder?new TextEncoder:{encode(t){const i=t.length,s=new Uint8Array(3*i);let e=-1;for(let n=0,r=0,h=0;h!==i;){if(n=t.charCodeAt(h),h+=1,n>=55296&&n<=56319){if(h===i){s[e+=1]=239,s[e+=1]=191,s[e+=1]=189;break}if(r=t.charCodeAt(h),!(r>=56320&&r<=57343)){s[e+=1]=239,s[e+=1]=191,s[e+=1]=189;continue}if(n=1024*(n-55296)+r-56320+65536,h+=1,n>65535){s[e+=1]=240|n>>>18,s[e+=1]=128|n>>>12&63,s[e+=1]=128|n>>>6&63,s[e+=1]=128|63&n;continue}}n<=127?s[e+=1]=0|n:n<=2047?(s[e+=1]=192|n>>>6,s[e+=1]=128|63&n):(s[e+=1]=224|n>>>12,s[e+=1]=128|n>>>6&63,s[e+=1]=128|63&n)}return s.subarray(0,e+1)}};class s extends class{constructor(t){this.size=t,this.offset=0,this.checkpointOffset=0,this.data=new Uint8Array(t)}getCurrentOffset(){return this.offset}checkpoint(){this.checkpointOffset=this.offset}get isEmpty(){return 0===this.offset}skip(t){return this.offset+=t,this.offset<=this.size}set(t,i){this.data.set(t,i)}boolean(t){return this.data[this.offset++]=+t,this.offset<=this.size}uint(t){for((t<0||t>Number.MAX_SAFE_INTEGER)&&(t=0);t>=128;)this.data[this.offset++]=t%256|128,t=Math.floor(t/128);return this.data[this.offset++]=t,this.offset<=this.size}int(t){return t=Math.round(t),this.uint(t>=0?2*t:-2*t-1)}string(t){const s=i.encode(t),e=s.byteLength;return!(!this.uint(e)||this.offset+e>this.size)&&(this.data.set(s,this.offset),this.offset+=e,!0)}reset(){this.offset=0,this.checkpointOffset=0}flush(){const t=this.data.slice(0,this.checkpointOffset);return this.reset(),t}}{encode(t){switch(t[0]){case 0:return this.uint(t[1]);case 4:return this.string(t[1])&&this.string(t[2])&&this.uint(t[3]);case 5:return this.uint(t[1])&&this.uint(t[2]);case 6:return this.int(t[1])&&this.int(t[2]);case 7:return!0;case 8:return this.uint(t[1])&&this.uint(t[2])&&this.uint(t[3])&&this.string(t[4])&&this.boolean(t[5]);case 9:case 10:return this.uint(t[1])&&this.uint(t[2])&&this.uint(t[3]);case 11:return this.uint(t[1]);case 12:return this.uint(t[1])&&this.string(t[2])&&this.string(t[3]);case 13:case 14:return this.uint(t[1])&&this.string(t[2]);case 16:return this.uint(t[1])&&this.int(t[2])&&this.int(t[3]);case 17:return this.uint(t[1])&&this.string(t[2]);case 18:return this.uint(t[1])&&this.string(t[2])&&this.int(t[3]);case 19:return this.uint(t[1])&&this.boolean(t[2]);case 20:return this.uint(t[1])&&this.uint(t[2]);case 21:return this.string(t[1])&&this.string(t[2])&&this.string(t[3])&&this.string(t[4])&&this.string(t[5])&&this.uint(t[6])&&this.uint(t[7])&&this.uint(t[8]);case 22:return this.string(t[1])&&this.string(t[2]);case 23:return this.uint(t[1])&&this.uint(t[2])&&this.uint(t[3])&&this.uint(t[4])&&this.uint(t[5])&&this.uint(t[6])&&this.uint(t[7])&&this.uint(t[8])&&this.uint(t[9]);case 24:return this.uint(t[1])&&this.uint(t[2])&&this.uint(t[3]);case 25:return this.string(t[1])&&this.string(t[2])&&this.string(t[3]);case 27:return this.string(t[1])&&this.string(t[2]);case 28:case 29:return this.string(t[1]);case 30:return this.string(t[1])&&this.string(t[2]);case 37:return this.uint(t[1])&&this.string(t[2])&&this.uint(t[3]);case 38:return this.uint(t[1])&&this.uint(t[2]);case 39:return this.string(t[1])&&this.string(t[2])&&this.string(t[3])&&this.string(t[4])&&this.uint(t[5])&&this.uint(t[6])&&this.uint(t[7]);case 40:return this.string(t[1])&&this.uint(t[2])&&this.string(t[3])&&this.string(t[4]);case 41:return this.string(t[1])&&this.string(t[2]);case 42:return this.string(t[1]);case 44:return this.string(t[1])&&this.string(t[2])&&this.uint(t[3]);case 45:case 46:return this.string(t[1])&&this.string(t[2]);case 47:return this.string(t[1])&&this.string(t[2])&&this.uint(t[3]);case 48:return this.string(t[1])&&this.string(t[2])&&this.string(t[3])&&this.string(t[4]);case 49:return this.int(t[1])&&this.int(t[2])&&this.uint(t[3])&&this.uint(t[4]);case 53:return this.uint(t[1])&&this.uint(t[2])&&this.uint(t[3])&&this.uint(t[4])&&this.uint(t[5])&&this.uint(t[6])&&this.string(t[7])&&this.string(t[8]);case 54:return this.uint(t[1])&&this.string(t[2]);case 55:return this.boolean(t[1]);case 57:return this.uint(t[1])&&this.string(t[2])&&this.string(t[3])&&this.string(t[4]);case 58:return this.int(t[1]);case 59:return this.uint(t[1])&&this.uint(t[2])&&this.uint(t[3])&&this.uint(t[4])&&this.string(t[5])&&this.string(t[6])&&this.string(t[7]);case 60:return this.uint(t[1])&&this.string(t[2])&&this.string(t[3])&&this.string(t[4]);case 61:return this.uint(t[1])&&this.string(t[2])&&this.string(t[3]);case 63:case 64:return this.string(t[1])&&this.string(t[2]);case 67:return this.uint(t[1])&&this.string(t[2])&&this.uint(t[3])&&this.string(t[4]);case 69:return this.uint(t[1])&&this.uint(t[2])&&this.string(t[3])&&this.string(t[4]);case 70:return this.uint(t[1])&&this.uint(t[2]);case 71:return this.uint(t[1])&&this.string(t[2])&&this.string(t[3]);case 73:return this.uint(t[1])&&this.string(t[2])&&this.uint(t[3])&&this.string(t[4]);case 75:case 76:case 77:return this.uint(t[1])&&this.uint(t[2]);case 79:return this.string(t[1])&&this.string(t[2]);case 78:return this.string(t[1])&&this.string(t[2])&&this.string(t[3])&&this.string(t[4]);case 81:return this.uint(t[1])&&this.uint(t[2])&&this.uint(t[3])&&this.int(t[4])&&this.string(t[5]);case 82:return this.uint(t[1])&&this.uint(t[2])}}}class e{constructor(t,i,e,n){this.pageNo=t,this.timestamp=i,this.url=e,this.onBatch=n,this.nextIndex=0,this.beaconSize=2e5,this.encoder=new s(this.beaconSize),this.sizeBuffer=new Uint8Array(3),this.isEmpty=!0,this.beaconSizeLimit=1e6,this.prepare()}writeType(t){return this.encoder.uint(t[0])}writeFields(t){return this.encoder.encode(t)}writeSizeAt(t,i){for(let i=0;i<3;i++)this.sizeBuffer[i]=t>>8*i;this.encoder.set(this.sizeBuffer,i)}prepare(){if(!this.encoder.isEmpty)return;const t=[81,1,this.pageNo,this.nextIndex,this.timestamp,this.url];this.writeType(t),this.writeFields(t),this.isEmpty=!0}writeWithSize(t){const i=this.encoder;if(!this.writeType(t)||!i.skip(3))return!1;const s=i.getCurrentOffset(),e=this.writeFields(t);if(e){const e=i.getCurrentOffset()-s;if(e>16777215)return console.warn("OpenReplay: max message size overflow."),!1;this.writeSizeAt(e,s-3),i.checkpoint(),this.isEmpty=this.isEmpty&&0===t[0],this.nextIndex++}return e}setBeaconSizeLimit(t){this.beaconSizeLimit=t}writeMessage(t){0===t[0]&&(this.timestamp=t[1]),4===t[0]&&(this.url=t[1]),this.writeWithSize(t)||(this.finaliseBatch(),this.writeWithSize(t)||(this.encoder=new s(this.beaconSizeLimit),this.prepare(),this.writeWithSize(t)||console.warn("OpenReplay: beacon size overflow. Skipping large message.",t,this),this.encoder=new s(this.beaconSize),this.prepare()))}finaliseBatch(){this.isEmpty||(this.onBatch(this.encoder.flush()),this.prepare())}clean(){this.encoder.reset()}}var n;!function(t){t[t.NotActive=0]="NotActive",t[t.Starting=1]="Starting",t[t.Stopping=2]="Stopping",t[t.Active=3]="Active"}(n||(n={}));let r=null,h=null;function u(){h&&h.finaliseBatch()}function a(){n.Stopping,null!==g&&(clearInterval(g),g=null),h&&(h.clean(),h=null),r&&(r.clean(),r=null),n.NotActive}function c(){postMessage("restart"),a()}n.NotActive;let o,g=null;self.onmessage=({data:i})=>{if(null!=i){if("stop"===i)return u(),void a();if(Array.isArray(i)){if(!h)throw new Error("WebWorker: writer not initialised. Restarting tracker...");const t=h;i.forEach(i=>{55===i[0]&&(i[1]?o=setTimeout(()=>c(),18e5):clearTimeout(o)),t.writeMessage(i)})}else{if("start"===i.type)return n.Starting,r=new t(i.ingestPoint,()=>{c()},t=>{!function(t){postMessage({type:"failure",reason:t}),a()}(t)},i.connAttemptCount,i.connAttemptGap),h=new e(i.pageNo,i.timestamp,i.url,t=>r&&r.push(t)),null===g&&(g=setInterval(u,1e4)),n.Active;if("auth"===i.type){if(!r)throw new Error("WebWorker: sender not initialised. Received auth.");if(!h)throw new Error("WebWorker: writer not initialised. Received auth.");return r.authorise(i.token),void(i.beaconSizeLimit&&h.setBeaconSizeLimit(i.beaconSizeLimit))}}}else u()};'], { type: 'text/javascript' })));
78
78
  this.worker.onerror = (e) => {
79
79
  this._debug('webworker_error', e);
80
80
  };
@@ -121,12 +121,12 @@ export default class App {
121
121
  return;
122
122
  }
123
123
  // === Back compatibility with Fetch/Axios plugins ===
124
- if (message[0] === 39 /* Fetch */) {
124
+ if (message[0] === 39 /* MType.Fetch */) {
125
125
  this._usingOldFetchPlugin = true;
126
126
  deprecationWarn('Fetch plugin', "'network' init option");
127
127
  deprecationWarn('Axios plugin', "'network' init option");
128
128
  }
129
- if (this._usingOldFetchPlugin && message[0] === 21 /* NetworkRequest */) {
129
+ if (this._usingOldFetchPlugin && message[0] === 21 /* MType.NetworkRequest */) {
130
130
  return;
131
131
  }
132
132
  // ====================================================
@@ -5,8 +5,8 @@ export declare const LogLevel: {
5
5
  readonly Errors: 2;
6
6
  readonly Silent: 0;
7
7
  };
8
- declare type LogLevel = typeof LogLevel[keyof typeof LogLevel];
9
- declare type CustomLevel = {
8
+ type LogLevel = typeof LogLevel[keyof typeof LogLevel];
9
+ type CustomLevel = {
10
10
  error: boolean;
11
11
  warn: boolean;
12
12
  log: boolean;
@@ -15,7 +15,7 @@ interface _Options {
15
15
  level: LogLevel | CustomLevel;
16
16
  messages?: number[];
17
17
  }
18
- export declare type Options = true | _Options | LogLevel;
18
+ export type Options = true | _Options | LogLevel;
19
19
  export default class Logger {
20
20
  private readonly options;
21
21
  constructor(options?: Options);
@@ -1,7 +1,5 @@
1
1
  import * as Messages from '../common/messages.gen.js';
2
2
  export { default, Type } from '../common/messages.gen.js';
3
- export declare function BatchMetadata(version: number, pageNo: number, firstIndex: number, timestamp: number, location: string): Messages.BatchMetadata;
4
- export declare function PartitionedMessage(partNo: number, partTotal: number): Messages.PartitionedMessage;
5
3
  export declare function Timestamp(timestamp: number): Messages.Timestamp;
6
4
  export declare function SetPageLocation(url: string, referrer: string, navigationStart: number): Messages.SetPageLocation;
7
5
  export declare function SetViewportSize(width: number, height: number): Messages.SetViewportSize;
@@ -60,3 +58,5 @@ export declare function AdoptedSSAddOwner(sheetID: number, id: number): Messages
60
58
  export declare function AdoptedSSRemoveOwner(sheetID: number, id: number): Messages.AdoptedSSRemoveOwner;
61
59
  export declare function Zustand(mutation: string, state: string): Messages.Zustand;
62
60
  export declare function JSException(name: string, message: string, payload: string, metadata: string): Messages.JSException;
61
+ export declare function BatchMetadata(version: number, pageNo: number, firstIndex: number, timestamp: number, location: string): Messages.BatchMetadata;
62
+ export declare function PartitionedMessage(partNo: number, partTotal: number): Messages.PartitionedMessage;