@openreplay/tracker 18.0.17 → 18.1.0-beta.0
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/dist/cjs/entry.js +201 -49
- package/dist/cjs/entry.js.map +1 -1
- package/dist/cjs/index.js +201 -49
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/main/app/index.d.ts +11 -0
- package/dist/cjs/main/modules/analytics/batcher.d.ts +2 -1
- package/dist/cjs/main/modules/analytics/utils.d.ts +1 -1
- package/dist/cjs/main/modules/conditionsManager.d.ts +2 -1
- package/dist/lib/entry.js +201 -49
- package/dist/lib/entry.js.map +1 -1
- package/dist/lib/index.js +201 -49
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/main/app/index.d.ts +11 -0
- package/dist/lib/main/modules/analytics/batcher.d.ts +2 -1
- package/dist/lib/main/modules/analytics/utils.d.ts +1 -1
- package/dist/lib/main/modules/conditionsManager.d.ts +2 -1
- package/dist/types/main/app/index.d.ts +11 -0
- package/dist/types/main/modules/analytics/batcher.d.ts +2 -1
- package/dist/types/main/modules/analytics/utils.d.ts +1 -1
- package/dist/types/main/modules/conditionsManager.d.ts +2 -1
- package/package.json +1 -1
|
@@ -68,6 +68,14 @@ type AppOptions = {
|
|
|
68
68
|
localStorage: Storage | null;
|
|
69
69
|
sessionStorage: Storage | null;
|
|
70
70
|
forceSingleTab?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* When a page is restored from the browser's back-forward cache (bfcache),
|
|
73
|
+
* the tracker resumes the existing session if it was frozen for less than this
|
|
74
|
+
* many milliseconds, and starts a fresh session otherwise (the previous one has
|
|
75
|
+
* likely gone stale server-side). Set to 0 to always restart on restore.
|
|
76
|
+
* @default 1800000 (30 min)
|
|
77
|
+
*/
|
|
78
|
+
bfcacheRestartThreshold?: number;
|
|
71
79
|
/** Sometimes helps to prevent session breaking due to dict reset */
|
|
72
80
|
disableStringDict?: boolean;
|
|
73
81
|
assistSocketHost?: string;
|
|
@@ -168,6 +176,7 @@ export default class App {
|
|
|
168
176
|
private frameOderNumber;
|
|
169
177
|
private frameLevel;
|
|
170
178
|
private emptyBatchCounter;
|
|
179
|
+
private lastHiddenAt;
|
|
171
180
|
constructor(projectKey: string, sessionToken: string | undefined, options: Partial<Options>, signalError: (error: string, apis: string[]) => void, insideIframe: boolean);
|
|
172
181
|
/** used by child iframes for crossdomain only */
|
|
173
182
|
parentActive: boolean;
|
|
@@ -253,6 +262,7 @@ export default class App {
|
|
|
253
262
|
private checkNodeId;
|
|
254
263
|
private initWorker;
|
|
255
264
|
private restart;
|
|
265
|
+
private handlePageShow;
|
|
256
266
|
private handleWorkerMsg;
|
|
257
267
|
private _debug;
|
|
258
268
|
send: (message: Message, urgent?: boolean) => void;
|
|
@@ -308,6 +318,7 @@ export default class App {
|
|
|
308
318
|
orderNumber: number;
|
|
309
319
|
coldStartTs: number;
|
|
310
320
|
singleBuffer: boolean;
|
|
321
|
+
private getSessionVersionHash;
|
|
311
322
|
private checkSessionToken;
|
|
312
323
|
/**
|
|
313
324
|
* start buffering messages without starting the actual session, which gives
|
|
@@ -13,7 +13,7 @@ interface ClientData {
|
|
|
13
13
|
/**
|
|
14
14
|
* Detects client browser, OS, and device information
|
|
15
15
|
*/
|
|
16
|
-
export declare function uaParse(sWindow: Window & typeof globalThis): ClientData;
|
|
16
|
+
export declare function uaParse(sWindow: Window & typeof globalThis, onOsVersionUpdate?: (osVersion: string) => void): ClientData;
|
|
17
17
|
export declare function isObject(item: any): boolean;
|
|
18
18
|
export declare function getUTCOffsetString(): string;
|
|
19
19
|
export {};
|
|
@@ -30,7 +30,8 @@ export default class ConditionsManager {
|
|
|
30
30
|
trigger(conditionName: string): void;
|
|
31
31
|
processMessage(message: Message): void;
|
|
32
32
|
processFlags(flag: IFeatureFlag[]): void;
|
|
33
|
-
|
|
33
|
+
durationInts: Array<ReturnType<typeof setInterval>>;
|
|
34
|
+
private clearDurationInt;
|
|
34
35
|
processDuration(durationMs: number, condName: string): void;
|
|
35
36
|
networkRequest(message: NetworkRequest): void;
|
|
36
37
|
customEvent(message: CustomEvent): void;
|
|
@@ -68,6 +68,14 @@ type AppOptions = {
|
|
|
68
68
|
localStorage: Storage | null;
|
|
69
69
|
sessionStorage: Storage | null;
|
|
70
70
|
forceSingleTab?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* When a page is restored from the browser's back-forward cache (bfcache),
|
|
73
|
+
* the tracker resumes the existing session if it was frozen for less than this
|
|
74
|
+
* many milliseconds, and starts a fresh session otherwise (the previous one has
|
|
75
|
+
* likely gone stale server-side). Set to 0 to always restart on restore.
|
|
76
|
+
* @default 1800000 (30 min)
|
|
77
|
+
*/
|
|
78
|
+
bfcacheRestartThreshold?: number;
|
|
71
79
|
/** Sometimes helps to prevent session breaking due to dict reset */
|
|
72
80
|
disableStringDict?: boolean;
|
|
73
81
|
assistSocketHost?: string;
|
|
@@ -168,6 +176,7 @@ export default class App {
|
|
|
168
176
|
private frameOderNumber;
|
|
169
177
|
private frameLevel;
|
|
170
178
|
private emptyBatchCounter;
|
|
179
|
+
private lastHiddenAt;
|
|
171
180
|
constructor(projectKey: string, sessionToken: string | undefined, options: Partial<Options>, signalError: (error: string, apis: string[]) => void, insideIframe: boolean);
|
|
172
181
|
/** used by child iframes for crossdomain only */
|
|
173
182
|
parentActive: boolean;
|
|
@@ -253,6 +262,7 @@ export default class App {
|
|
|
253
262
|
private checkNodeId;
|
|
254
263
|
private initWorker;
|
|
255
264
|
private restart;
|
|
265
|
+
private handlePageShow;
|
|
256
266
|
private handleWorkerMsg;
|
|
257
267
|
private _debug;
|
|
258
268
|
send: (message: Message, urgent?: boolean) => void;
|
|
@@ -308,6 +318,7 @@ export default class App {
|
|
|
308
318
|
orderNumber: number;
|
|
309
319
|
coldStartTs: number;
|
|
310
320
|
singleBuffer: boolean;
|
|
321
|
+
private getSessionVersionHash;
|
|
311
322
|
private checkSessionToken;
|
|
312
323
|
/**
|
|
313
324
|
* start buffering messages without starting the actual session, which gives
|
|
@@ -13,7 +13,7 @@ interface ClientData {
|
|
|
13
13
|
/**
|
|
14
14
|
* Detects client browser, OS, and device information
|
|
15
15
|
*/
|
|
16
|
-
export declare function uaParse(sWindow: Window & typeof globalThis): ClientData;
|
|
16
|
+
export declare function uaParse(sWindow: Window & typeof globalThis, onOsVersionUpdate?: (osVersion: string) => void): ClientData;
|
|
17
17
|
export declare function isObject(item: any): boolean;
|
|
18
18
|
export declare function getUTCOffsetString(): string;
|
|
19
19
|
export {};
|
|
@@ -30,7 +30,8 @@ export default class ConditionsManager {
|
|
|
30
30
|
trigger(conditionName: string): void;
|
|
31
31
|
processMessage(message: Message): void;
|
|
32
32
|
processFlags(flag: IFeatureFlag[]): void;
|
|
33
|
-
|
|
33
|
+
durationInts: Array<ReturnType<typeof setInterval>>;
|
|
34
|
+
private clearDurationInt;
|
|
34
35
|
processDuration(durationMs: number, condName: string): void;
|
|
35
36
|
networkRequest(message: NetworkRequest): void;
|
|
36
37
|
customEvent(message: CustomEvent): void;
|