@openreplay/tracker 16.0.0 → 16.0.2-beta.1

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.
@@ -194,6 +194,8 @@ export default class App {
194
194
  startTimeout: ReturnType<typeof setTimeout> | null;
195
195
  allowAppStart(): void;
196
196
  private checkNodeId;
197
+ heartbeatInterval: ReturnType<typeof setInterval> | null;
198
+ restartTimeout: ReturnType<typeof setTimeout> | null;
197
199
  private initWorker;
198
200
  private handleWorkerMsg;
199
201
  private _debug;
@@ -211,6 +213,9 @@ export default class App {
211
213
  * but in turn we don't overload batch writer on session start with 1000 batches
212
214
  * */
213
215
  private _cStartCommit;
216
+ /**
217
+ * called every 30ms via this.ticker
218
+ * */
214
219
  private commit;
215
220
  private postToWorker;
216
221
  private delay;
@@ -1,5 +1,9 @@
1
1
  import App from './index.js';
2
2
  type Callback = () => void;
3
+ /**
4
+ * Takes a callback and n as number of turn skips
5
+ * Every tick is 30ms, so attach(cb, 3) will call cb every 90ms
6
+ * */
3
7
  export default class Ticker {
4
8
  private readonly app;
5
9
  private timer;
@@ -22,7 +22,7 @@ export type ToWorkerData = null | 'stop' | Start | Auth | Array<Message> | {
22
22
  } | {
23
23
  type: 'uncompressed';
24
24
  batch: Uint8Array;
25
- } | 'forceFlushBatch' | 'check_queue';
25
+ } | 'forceFlushBatch' | 'check_queue' | 'heartbeat_q';
26
26
  type Failure = {
27
27
  type: 'failure';
28
28
  reason: string;
@@ -33,5 +33,5 @@ type QEmpty = {
33
33
  export type FromWorkerData = 'a_stop' | 'a_start' | Failure | 'not_init' | {
34
34
  type: 'compress';
35
35
  batch: Uint8Array;
36
- } | QEmpty;
36
+ } | QEmpty | 'heartbeat_a';
37
37
  export {};
@@ -194,6 +194,8 @@ export default class App {
194
194
  startTimeout: ReturnType<typeof setTimeout> | null;
195
195
  allowAppStart(): void;
196
196
  private checkNodeId;
197
+ heartbeatInterval: ReturnType<typeof setInterval> | null;
198
+ restartTimeout: ReturnType<typeof setTimeout> | null;
197
199
  private initWorker;
198
200
  private handleWorkerMsg;
199
201
  private _debug;
@@ -211,6 +213,9 @@ export default class App {
211
213
  * but in turn we don't overload batch writer on session start with 1000 batches
212
214
  * */
213
215
  private _cStartCommit;
216
+ /**
217
+ * called every 30ms via this.ticker
218
+ * */
214
219
  private commit;
215
220
  private postToWorker;
216
221
  private delay;
@@ -1,5 +1,9 @@
1
1
  import App from './index.js';
2
2
  type Callback = () => void;
3
+ /**
4
+ * Takes a callback and n as number of turn skips
5
+ * Every tick is 30ms, so attach(cb, 3) will call cb every 90ms
6
+ * */
3
7
  export default class Ticker {
4
8
  private readonly app;
5
9
  private timer;
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": "16.0.0",
4
+ "version": "16.0.2-beta.1",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"