@openreplay/tracker 14.0.10-beta.1 → 14.0.10
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 → dist/cjs}/index.js +27 -49
- package/dist/cjs/index.js.map +1 -0
- package/{cjs → dist/cjs/main}/app/index.d.ts +38 -6
- package/{lib → dist/cjs/main}/app/messages.gen.d.ts +2 -2
- package/{lib/app/nodes.d.ts → dist/cjs/main/app/nodes/index.d.ts} +15 -7
- package/dist/cjs/main/app/nodes/maintainer.d.ts +28 -0
- package/{cjs → dist/cjs/main}/app/observer/iframe_observer.d.ts +1 -1
- package/{lib → dist/cjs/main}/app/observer/iframe_offsets.d.ts +1 -1
- package/{lib → dist/cjs/main}/app/observer/observer.d.ts +6 -0
- package/{lib → dist/cjs/main}/app/observer/top_observer.d.ts +6 -2
- package/{cjs → dist/cjs/main}/app/sanitizer.d.ts +5 -2
- package/{cjs → dist/cjs/main}/app/session.d.ts +6 -3
- package/{lib → dist/cjs/main}/index.d.ts +2 -2
- package/{lib → dist/cjs/main}/modules/attributeSender.d.ts +5 -2
- package/{cjs → dist/cjs/main}/modules/conditionsManager.d.ts +1 -1
- package/{cjs → dist/cjs/main}/modules/tagWatcher.d.ts +8 -4
- package/{lib → dist/cjs/main}/modules/userTesting/SignalManager.d.ts +2 -2
- package/{lib → dist/cjs/main}/utils.d.ts +4 -3
- package/dist/lib/index.js +9323 -0
- package/dist/lib/index.js.map +1 -0
- package/{lib → dist/lib/main}/app/index.d.ts +38 -6
- package/{cjs → dist/lib/main}/app/messages.gen.d.ts +2 -2
- package/{cjs/app/nodes.d.ts → dist/lib/main/app/nodes/index.d.ts} +15 -7
- package/dist/lib/main/app/nodes/maintainer.d.ts +28 -0
- package/{lib → dist/lib/main}/app/observer/iframe_observer.d.ts +1 -1
- package/{cjs → dist/lib/main}/app/observer/iframe_offsets.d.ts +1 -1
- package/{cjs → dist/lib/main}/app/observer/observer.d.ts +6 -0
- package/{cjs → dist/lib/main}/app/observer/top_observer.d.ts +6 -2
- package/{lib → dist/lib/main}/app/sanitizer.d.ts +5 -2
- package/{lib → dist/lib/main}/app/session.d.ts +6 -3
- package/{cjs → dist/lib/main}/index.d.ts +2 -2
- package/{cjs → dist/lib/main}/modules/attributeSender.d.ts +5 -2
- package/{lib → dist/lib/main}/modules/conditionsManager.d.ts +1 -1
- package/{lib → dist/lib/main}/modules/tagWatcher.d.ts +8 -4
- package/{cjs → dist/lib/main}/modules/userTesting/SignalManager.d.ts +2 -2
- package/{cjs → dist/lib/main}/utils.d.ts +4 -3
- package/package.json +29 -10
- package/.eslintignore +0 -11
- package/.nvmrc +0 -1
- package/.prettierignore +0 -1
- package/CHANGELOG.md +0 -297
- package/bun.lockb +0 -0
- package/cjs/app/canvas.js +0 -204
- package/cjs/app/guards.js +0 -37
- package/cjs/app/index.js +0 -1366
- package/cjs/app/logger.js +0 -37
- package/cjs/app/messages.gen.js +0 -702
- package/cjs/app/nodes.js +0 -110
- package/cjs/app/observer/iframe_observer.js +0 -35
- package/cjs/app/observer/iframe_offsets.js +0 -56
- package/cjs/app/observer/observer.js +0 -352
- package/cjs/app/observer/shadow_root_observer.js +0 -24
- package/cjs/app/observer/top_observer.js +0 -134
- package/cjs/app/sanitizer.js +0 -82
- package/cjs/app/session.js +0 -140
- package/cjs/app/ticker.js +0 -48
- package/cjs/common/interaction.js +0 -2
- package/cjs/common/messages.gen.js +0 -4
- package/cjs/modules/attributeSender.js +0 -51
- package/cjs/modules/axiosSpy.js +0 -122
- package/cjs/modules/conditionsManager.js +0 -343
- package/cjs/modules/connection.js +0 -15
- package/cjs/modules/console.js +0 -127
- package/cjs/modules/constructedStyleSheets.js +0 -138
- package/cjs/modules/cssrules.js +0 -99
- package/cjs/modules/exception.js +0 -85
- package/cjs/modules/featureFlags.js +0 -89
- package/cjs/modules/focus.js +0 -45
- package/cjs/modules/fonts.js +0 -57
- package/cjs/modules/img.js +0 -110
- package/cjs/modules/input.js +0 -203
- package/cjs/modules/mouse.js +0 -195
- package/cjs/modules/network.js +0 -244
- package/cjs/modules/performance.js +0 -53
- package/cjs/modules/scroll.js +0 -84
- package/cjs/modules/selection.js +0 -37
- package/cjs/modules/tabs.js +0 -13
- package/cjs/modules/tagWatcher.js +0 -76
- package/cjs/modules/timing.js +0 -173
- package/cjs/modules/userTesting/SignalManager.js +0 -83
- package/cjs/modules/userTesting/dnd.js +0 -40
- package/cjs/modules/userTesting/index.js +0 -464
- package/cjs/modules/userTesting/recorder.js +0 -101
- package/cjs/modules/userTesting/styles.js +0 -266
- package/cjs/modules/userTesting/utils.js +0 -87
- package/cjs/modules/viewport.js +0 -43
- package/cjs/package.json +0 -1
- package/cjs/utils.js +0 -230
- package/coverage/clover.xml +0 -4304
- package/coverage/coverage-final.json +0 -55
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -206
- package/coverage/lcov-report/main/app/canvas.ts.html +0 -712
- package/coverage/lcov-report/main/app/guards.ts.html +0 -232
- package/coverage/lcov-report/main/app/index.html +0 -236
- package/coverage/lcov-report/main/app/index.ts.html +0 -3955
- package/coverage/lcov-report/main/app/logger.ts.html +0 -211
- package/coverage/lcov-report/main/app/messages.gen.ts.html +0 -3034
- package/coverage/lcov-report/main/app/nodes.ts.html +0 -406
- package/coverage/lcov-report/main/app/observer/iframe_observer.ts.html +0 -148
- package/coverage/lcov-report/main/app/observer/iframe_offsets.ts.html +0 -289
- package/coverage/lcov-report/main/app/observer/index.html +0 -161
- package/coverage/lcov-report/main/app/observer/shadow_root_observer.ts.html +0 -142
- package/coverage/lcov-report/main/app/observer/top_observer.ts.html +0 -541
- package/coverage/lcov-report/main/app/sanitizer.ts.html +0 -403
- package/coverage/lcov-report/main/app/session.ts.html +0 -622
- package/coverage/lcov-report/main/app/ticker.ts.html +0 -250
- package/coverage/lcov-report/main/index.html +0 -131
- package/coverage/lcov-report/main/index.ts.html +0 -1597
- package/coverage/lcov-report/main/modules/Network/beaconProxy.ts.html +0 -400
- package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +0 -1075
- package/coverage/lcov-report/main/modules/Network/index.html +0 -191
- package/coverage/lcov-report/main/modules/Network/index.ts.html +0 -244
- package/coverage/lcov-report/main/modules/Network/networkMessage.ts.html +0 -400
- package/coverage/lcov-report/main/modules/Network/utils.ts.html +0 -709
- package/coverage/lcov-report/main/modules/Network/xhrProxy.ts.html +0 -877
- package/coverage/lcov-report/main/modules/attributeSender.ts.html +0 -241
- package/coverage/lcov-report/main/modules/axiosSpy.ts.html +0 -709
- package/coverage/lcov-report/main/modules/conditionsManager.ts.html +0 -1381
- package/coverage/lcov-report/main/modules/connection.ts.html +0 -160
- package/coverage/lcov-report/main/modules/console.ts.html +0 -541
- package/coverage/lcov-report/main/modules/constructedStyleSheets.ts.html +0 -571
- package/coverage/lcov-report/main/modules/cssrules.ts.html +0 -418
- package/coverage/lcov-report/main/modules/exception.ts.html +0 -385
- package/coverage/lcov-report/main/modules/featureFlags.ts.html +0 -415
- package/coverage/lcov-report/main/modules/focus.ts.html +0 -220
- package/coverage/lcov-report/main/modules/fonts.ts.html +0 -289
- package/coverage/lcov-report/main/modules/img.ts.html +0 -436
- package/coverage/lcov-report/main/modules/index.html +0 -431
- package/coverage/lcov-report/main/modules/input.ts.html +0 -826
- package/coverage/lcov-report/main/modules/mouse.ts.html +0 -826
- package/coverage/lcov-report/main/modules/network.ts.html +0 -1123
- package/coverage/lcov-report/main/modules/performance.ts.html +0 -367
- package/coverage/lcov-report/main/modules/scroll.ts.html +0 -364
- package/coverage/lcov-report/main/modules/selection.ts.html +0 -202
- package/coverage/lcov-report/main/modules/tabs.ts.html +0 -124
- package/coverage/lcov-report/main/modules/tagWatcher.ts.html +0 -337
- package/coverage/lcov-report/main/modules/timing.ts.html +0 -877
- package/coverage/lcov-report/main/modules/userTesting/SignalManager.ts.html +0 -370
- package/coverage/lcov-report/main/modules/userTesting/dnd.ts.html +0 -220
- package/coverage/lcov-report/main/modules/userTesting/index.html +0 -191
- package/coverage/lcov-report/main/modules/userTesting/index.ts.html +0 -1909
- package/coverage/lcov-report/main/modules/userTesting/recorder.ts.html +0 -430
- package/coverage/lcov-report/main/modules/userTesting/styles.ts.html +0 -937
- package/coverage/lcov-report/main/modules/userTesting/utils.ts.html +0 -364
- package/coverage/lcov-report/main/modules/viewport.ts.html +0 -250
- package/coverage/lcov-report/main/utils.ts.html +0 -814
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/webworker/BatchWriter.ts.html +0 -499
- package/coverage/lcov-report/webworker/MessageEncoder.gen.ts.html +0 -1021
- package/coverage/lcov-report/webworker/PrimitiveEncoder.ts.html +0 -436
- package/coverage/lcov-report/webworker/QueueSender.ts.html +0 -547
- package/coverage/lcov-report/webworker/index.html +0 -176
- package/coverage/lcov-report/webworker/index.ts.html +0 -667
- package/coverage/lcov.info +0 -8425
- package/jest.config.js +0 -13
- package/lib/app/canvas.js +0 -202
- package/lib/app/guards.js +0 -26
- package/lib/app/index.js +0 -1336
- package/lib/app/logger.js +0 -33
- package/lib/app/messages.gen.js +0 -622
- package/lib/app/nodes.js +0 -107
- package/lib/app/observer/iframe_observer.js +0 -29
- package/lib/app/observer/iframe_offsets.js +0 -53
- package/lib/app/observer/observer.js +0 -349
- package/lib/app/observer/shadow_root_observer.js +0 -18
- package/lib/app/observer/top_observer.js +0 -128
- package/lib/app/sanitizer.js +0 -77
- package/lib/app/session.js +0 -137
- package/lib/app/ticker.js +0 -45
- package/lib/common/interaction.js +0 -1
- package/lib/common/messages.gen.js +0 -3
- package/lib/common/tsconfig.tsbuildinfo +0 -1
- package/lib/index.js +0 -423
- package/lib/modules/attributeSender.js +0 -46
- package/lib/modules/axiosSpy.js +0 -119
- package/lib/modules/conditionsManager.js +0 -340
- package/lib/modules/connection.js +0 -12
- package/lib/modules/console.js +0 -124
- package/lib/modules/constructedStyleSheets.js +0 -133
- package/lib/modules/cssrules.js +0 -97
- package/lib/modules/exception.js +0 -76
- package/lib/modules/featureFlags.js +0 -86
- package/lib/modules/focus.js +0 -42
- package/lib/modules/fonts.js +0 -54
- package/lib/modules/img.js +0 -107
- package/lib/modules/input.js +0 -198
- package/lib/modules/mouse.js +0 -192
- package/lib/modules/network.js +0 -238
- package/lib/modules/performance.js +0 -49
- package/lib/modules/scroll.js +0 -81
- package/lib/modules/selection.js +0 -35
- package/lib/modules/tabs.js +0 -10
- package/lib/modules/tagWatcher.js +0 -73
- package/lib/modules/timing.js +0 -170
- package/lib/modules/userTesting/SignalManager.js +0 -80
- package/lib/modules/userTesting/dnd.js +0 -37
- package/lib/modules/userTesting/index.js +0 -435
- package/lib/modules/userTesting/recorder.js +0 -97
- package/lib/modules/userTesting/styles.js +0 -263
- package/lib/modules/userTesting/utils.js +0 -79
- package/lib/modules/viewport.js +0 -40
- package/lib/utils.js +0 -211
- package/rollup.config.js +0 -12
- package/scripts/checkver.cjs +0 -7
- package/tsconfig-base.json +0 -16
- /package/{cjs → dist/cjs}/common/interaction.d.ts +0 -0
- /package/{cjs → dist/cjs}/common/messages.gen.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/app/canvas.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/app/guards.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/app/logger.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/app/observer/shadow_root_observer.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/app/ticker.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/axiosSpy.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/connection.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/console.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/constructedStyleSheets.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/cssrules.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/exception.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/featureFlags.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/focus.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/fonts.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/img.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/input.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/mouse.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/network.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/performance.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/scroll.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/selection.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/tabs.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/timing.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/userTesting/dnd.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/userTesting/index.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/userTesting/recorder.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/userTesting/styles.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/userTesting/utils.d.ts +0 -0
- /package/{cjs → dist/cjs/main}/modules/viewport.d.ts +0 -0
- /package/{lib → dist/lib}/common/interaction.d.ts +0 -0
- /package/{lib → dist/lib}/common/messages.gen.d.ts +0 -0
- /package/{lib → dist/lib/main}/app/canvas.d.ts +0 -0
- /package/{lib → dist/lib/main}/app/guards.d.ts +0 -0
- /package/{lib → dist/lib/main}/app/logger.d.ts +0 -0
- /package/{lib → dist/lib/main}/app/observer/shadow_root_observer.d.ts +0 -0
- /package/{lib → dist/lib/main}/app/ticker.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/axiosSpy.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/connection.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/console.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/constructedStyleSheets.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/cssrules.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/exception.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/featureFlags.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/focus.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/fonts.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/img.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/input.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/mouse.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/network.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/performance.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/scroll.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/selection.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/tabs.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/timing.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/userTesting/dnd.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/userTesting/index.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/userTesting/recorder.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/userTesting/styles.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/userTesting/utils.d.ts +0 -0
- /package/{lib → dist/lib/main}/modules/viewport.d.ts +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { Options as WebworkerOptions } from '
|
|
1
|
+
import type { Options as WebworkerOptions } from '../../common/interaction.js';
|
|
2
2
|
import AttributeSender from '../modules/attributeSender.js';
|
|
3
3
|
import FeatureFlags from '../modules/featureFlags.js';
|
|
4
4
|
import type { Options as NetworkOptions } from '../modules/network.js';
|
|
5
5
|
import Logger, { ILogLevel } from './logger.js';
|
|
6
6
|
import Message from './messages.gen.js';
|
|
7
|
-
import Nodes from './nodes.js';
|
|
7
|
+
import Nodes from './nodes/index.js';
|
|
8
8
|
import type { Options as ObserverOptions } from './observer/top_observer.js';
|
|
9
9
|
import Observer from './observer/top_observer.js';
|
|
10
10
|
import type { Options as SanitizerOptions } from './sanitizer.js';
|
|
@@ -12,12 +12,19 @@ import Sanitizer from './sanitizer.js';
|
|
|
12
12
|
import type { Options as SessOptions } from './session.js';
|
|
13
13
|
import Session from './session.js';
|
|
14
14
|
import Ticker from './ticker.js';
|
|
15
|
+
import { MaintainerOptions } from './nodes/maintainer.js';
|
|
15
16
|
export interface StartOptions {
|
|
16
17
|
userID?: string;
|
|
17
18
|
metadata?: Record<string, string>;
|
|
18
19
|
forceNew?: boolean;
|
|
19
20
|
sessionHash?: string;
|
|
20
21
|
assistOnly?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated We strongly advise to use .start().then instead.
|
|
24
|
+
*
|
|
25
|
+
* This method is kept for snippet compatibility only
|
|
26
|
+
* */
|
|
27
|
+
startCallback?: (result: StartPromiseReturn) => void;
|
|
21
28
|
}
|
|
22
29
|
interface OnStartInfo {
|
|
23
30
|
sessionID: string;
|
|
@@ -100,6 +107,23 @@ type AppOptions = {
|
|
|
100
107
|
parentDomain?: string;
|
|
101
108
|
};
|
|
102
109
|
network?: NetworkOptions;
|
|
110
|
+
/**
|
|
111
|
+
* use this flag to force angular detection to be offline
|
|
112
|
+
*
|
|
113
|
+
* basically goes around window.Zone api changes to mutation observer
|
|
114
|
+
* and event listeners
|
|
115
|
+
* */
|
|
116
|
+
forceNgOff?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* This option is used to change how tracker handles potentially detached nodes
|
|
119
|
+
*
|
|
120
|
+
* defaults here are tested and proven to be lightweight and easy on cpu
|
|
121
|
+
*
|
|
122
|
+
* consult the docs before changing it
|
|
123
|
+
* */
|
|
124
|
+
nodes?: {
|
|
125
|
+
maintainer: Partial<MaintainerOptions>;
|
|
126
|
+
};
|
|
103
127
|
} & WebworkerOptions & SessOptions;
|
|
104
128
|
export type Options = AppOptions & ObserverOptions & SanitizerOptions;
|
|
105
129
|
export declare const DEFAULT_INGEST_POINT = "https://api.openreplay.com/ingest";
|
|
@@ -146,16 +170,24 @@ export default class App {
|
|
|
146
170
|
private rootId;
|
|
147
171
|
private pageFrames;
|
|
148
172
|
private frameOderNumber;
|
|
149
|
-
private readonly initialHostName;
|
|
150
173
|
private features;
|
|
151
174
|
constructor(projectKey: string, sessionToken: string | undefined, options: Partial<Options>, signalError: (error: string, apis: string[]) => void, insideIframe: boolean);
|
|
152
175
|
/** used by child iframes for crossdomain only */
|
|
153
176
|
parentActive: boolean;
|
|
154
177
|
checkStatus: () => boolean;
|
|
155
178
|
parentCrossDomainFrameListener: (event: MessageEvent) => void;
|
|
156
|
-
|
|
179
|
+
/**
|
|
180
|
+
* context ids for iframes,
|
|
181
|
+
* order is not so important as long as its consistent
|
|
182
|
+
* */
|
|
183
|
+
trackedFrames: string[];
|
|
157
184
|
crossDomainIframeListener: (event: MessageEvent) => void;
|
|
158
|
-
|
|
185
|
+
/**
|
|
186
|
+
* { command : [remaining iframes] }
|
|
187
|
+
* + order of commands
|
|
188
|
+
**/
|
|
189
|
+
pollingQueue: Record<string, any>;
|
|
190
|
+
private readonly addCommand;
|
|
159
191
|
bootChildrenFrames: () => Promise<void>;
|
|
160
192
|
killChildrenFrames: () => void;
|
|
161
193
|
signalIframeTracker: () => void;
|
|
@@ -200,7 +232,7 @@ export default class App {
|
|
|
200
232
|
metadata: Record<string, string>;
|
|
201
233
|
userID: string | null;
|
|
202
234
|
timestamp: number;
|
|
203
|
-
projectID?: string
|
|
235
|
+
projectID?: string;
|
|
204
236
|
};
|
|
205
237
|
getSessionToken(): string | undefined;
|
|
206
238
|
getSessionID(): string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as Messages from '
|
|
2
|
-
export { default, Type } from '
|
|
1
|
+
import * as Messages from '../../common/messages.gen.js';
|
|
2
|
+
export { default, Type } from '../../common/messages.gen.js';
|
|
3
3
|
export declare function Timestamp(timestamp: number): Messages.Timestamp;
|
|
4
4
|
export declare function SetPageLocationDeprecated(url: string, referrer: string, navigationStart: number): Messages.SetPageLocationDeprecated;
|
|
5
5
|
export declare function SetViewportSize(width: number, height: number): Messages.SetViewportSize;
|
|
@@ -1,22 +1,30 @@
|
|
|
1
|
+
import { MaintainerOptions } from './maintainer.js';
|
|
1
2
|
type NodeCallback = (node: Node, isStart: boolean) => void;
|
|
3
|
+
export interface NodesOptions {
|
|
4
|
+
node_id: string;
|
|
5
|
+
forceNgOff: boolean;
|
|
6
|
+
maintainer?: Partial<MaintainerOptions>;
|
|
7
|
+
}
|
|
2
8
|
export default class Nodes {
|
|
3
|
-
private readonly
|
|
4
|
-
private nodes;
|
|
9
|
+
private readonly nodes;
|
|
5
10
|
private totalNodeAmount;
|
|
6
11
|
private readonly nodeCallbacks;
|
|
7
12
|
private readonly elementListeners;
|
|
8
13
|
private nextNodeId;
|
|
9
|
-
|
|
14
|
+
private readonly node_id;
|
|
15
|
+
private readonly forceNgOff;
|
|
16
|
+
private readonly maintainer;
|
|
17
|
+
constructor(params: NodesOptions);
|
|
10
18
|
syntheticMode(frameOrder: number): void;
|
|
11
|
-
attachNodeCallback(nodeCallback: NodeCallback):
|
|
19
|
+
attachNodeCallback(nodeCallback: NodeCallback): number;
|
|
12
20
|
scanTree: (cb: (node: Node | void) => void) => void;
|
|
13
|
-
attachNodeListener(node: Node, type: string, listener: EventListener, useCapture?: boolean)
|
|
21
|
+
attachNodeListener: (node: Node, type: string, listener: EventListener, useCapture?: boolean) => void;
|
|
14
22
|
registerNode(node: Node): [/*id:*/ number, /*isNew:*/ boolean];
|
|
15
|
-
unregisterNode(node: Node)
|
|
23
|
+
unregisterNode: (node: Node) => number | undefined;
|
|
16
24
|
cleanTree(): void;
|
|
17
25
|
callNodeCallbacks(node: Node, isStart: boolean): void;
|
|
18
26
|
getID(node: Node): number | undefined;
|
|
19
|
-
getNode(id: number): void | Node;
|
|
27
|
+
getNode(id: number): void | Node | undefined;
|
|
20
28
|
getNodeCount(): number;
|
|
21
29
|
clear(): void;
|
|
22
30
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface MaintainerOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Run cleanup each X ms
|
|
4
|
+
*
|
|
5
|
+
* @default 30 * 1000
|
|
6
|
+
* */
|
|
7
|
+
interval: number;
|
|
8
|
+
/**
|
|
9
|
+
* Maintainer checks nodes in small batches over 50ms timeouts
|
|
10
|
+
*
|
|
11
|
+
* @default 2500
|
|
12
|
+
* */
|
|
13
|
+
batchSize: number;
|
|
14
|
+
/**
|
|
15
|
+
* @default true
|
|
16
|
+
* */
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare class Maintainer {
|
|
20
|
+
private readonly nodes;
|
|
21
|
+
private readonly unregisterNode;
|
|
22
|
+
private interval;
|
|
23
|
+
private readonly options;
|
|
24
|
+
constructor(nodes: Map<number, Node | void>, unregisterNode: (node: Node) => void, options?: Partial<MaintainerOptions>);
|
|
25
|
+
start: () => void;
|
|
26
|
+
stop: () => void;
|
|
27
|
+
}
|
|
28
|
+
export default Maintainer;
|
|
@@ -10,6 +10,12 @@ export default abstract class Observer {
|
|
|
10
10
|
private readonly textSet;
|
|
11
11
|
constructor(app: App, isTopContext?: boolean);
|
|
12
12
|
private clear;
|
|
13
|
+
/**
|
|
14
|
+
* EXPERIMENTAL: Unbinds the removed nodes in case of iframe src change.
|
|
15
|
+
*
|
|
16
|
+
* right now, we're relying on nodes.maintainer
|
|
17
|
+
*/
|
|
18
|
+
private handleIframeSrcChange;
|
|
13
19
|
private sendNodeAttribute;
|
|
14
20
|
private sendNodeData;
|
|
15
21
|
private bindNode;
|
|
@@ -9,7 +9,11 @@ type ContextCallback = (context: Context) => void;
|
|
|
9
9
|
export default class TopObserver extends Observer {
|
|
10
10
|
private readonly options;
|
|
11
11
|
private readonly iframeOffsets;
|
|
12
|
-
|
|
12
|
+
readonly app: App;
|
|
13
|
+
constructor(params: {
|
|
14
|
+
app: App;
|
|
15
|
+
options: Partial<Options>;
|
|
16
|
+
});
|
|
13
17
|
private readonly contextCallbacks;
|
|
14
18
|
private readonly contextsSet;
|
|
15
19
|
attachContextCallback(cb: ContextCallback): void;
|
|
@@ -19,7 +23,7 @@ export default class TopObserver extends Observer {
|
|
|
19
23
|
private shadowRootObservers;
|
|
20
24
|
private handleShadowRoot;
|
|
21
25
|
observe(): void;
|
|
22
|
-
crossdomainObserve(
|
|
26
|
+
crossdomainObserve(rootNodeId: number, frameOder: number): void;
|
|
23
27
|
disconnect(): void;
|
|
24
28
|
}
|
|
25
29
|
export {};
|
|
@@ -11,11 +11,14 @@ export interface Options {
|
|
|
11
11
|
}
|
|
12
12
|
export declare const stringWiper: (input: string) => string;
|
|
13
13
|
export default class Sanitizer {
|
|
14
|
-
private readonly app;
|
|
15
14
|
private readonly obscured;
|
|
16
15
|
private readonly hidden;
|
|
17
16
|
private readonly options;
|
|
18
|
-
|
|
17
|
+
private readonly app;
|
|
18
|
+
constructor(params: {
|
|
19
|
+
app: App;
|
|
20
|
+
options?: Partial<Options>;
|
|
21
|
+
});
|
|
19
22
|
handleNode(id: number, parentID: number, node: Node): void;
|
|
20
23
|
sanitize(id: number, data: string): string;
|
|
21
24
|
isObscured(id: number): boolean;
|
|
@@ -21,8 +21,6 @@ export type Options = {
|
|
|
21
21
|
session_tabid_key: string;
|
|
22
22
|
};
|
|
23
23
|
export default class Session {
|
|
24
|
-
private readonly app;
|
|
25
|
-
private readonly options;
|
|
26
24
|
private metadata;
|
|
27
25
|
private userID;
|
|
28
26
|
private sessionID;
|
|
@@ -32,7 +30,12 @@ export default class Session {
|
|
|
32
30
|
private tabId;
|
|
33
31
|
userInfo: UserInfo;
|
|
34
32
|
private token;
|
|
35
|
-
|
|
33
|
+
private readonly app;
|
|
34
|
+
private readonly options;
|
|
35
|
+
constructor(params: {
|
|
36
|
+
app: App;
|
|
37
|
+
options: Options;
|
|
38
|
+
});
|
|
36
39
|
attachUpdateCallback(cb: OnUpdateCallback): void;
|
|
37
40
|
private handleUpdate;
|
|
38
41
|
assign(newInfo: Partial<SessionInfo>): void;
|
|
@@ -77,8 +77,8 @@ export default class API {
|
|
|
77
77
|
* */
|
|
78
78
|
startOfflineRecording(startOpts: Partial<StartOptions>, onSessionSent: () => void): Promise<never> | {
|
|
79
79
|
saveBuffer: () => void;
|
|
80
|
-
getBuffer: () =>
|
|
81
|
-
setBuffer: (buffer:
|
|
80
|
+
getBuffer: () => _Messages.default[];
|
|
81
|
+
setBuffer: (buffer: _Messages.default[]) => void;
|
|
82
82
|
};
|
|
83
83
|
/**
|
|
84
84
|
* Uploads the stored session buffer to backend
|
|
@@ -5,10 +5,13 @@ export declare class StringDictionary {
|
|
|
5
5
|
getKey(str: string): [number, boolean];
|
|
6
6
|
}
|
|
7
7
|
export default class AttributeSender {
|
|
8
|
+
private dict;
|
|
8
9
|
private readonly app;
|
|
9
10
|
private readonly isDictDisabled;
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
constructor(options: {
|
|
12
|
+
app: App;
|
|
13
|
+
isDictDisabled: boolean;
|
|
14
|
+
});
|
|
12
15
|
sendSetAttribute(id: number, name: string, value: string): void;
|
|
13
16
|
private applyDict;
|
|
14
17
|
clear(): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Message, { CustomEvent, JSException, MouseClick, NetworkRequest, SetPageLocation } from '
|
|
1
|
+
import Message, { CustomEvent, JSException, MouseClick, NetworkRequest, SetPageLocation } from '../../common/messages.gen.js';
|
|
2
2
|
import App, { StartOptions } from '../app/index.js';
|
|
3
3
|
import { IFeatureFlag } from './featureFlags.js';
|
|
4
4
|
interface Filter {
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
export declare const WATCHED_TAGS_KEY = "__or__watched_tags__";
|
|
2
2
|
declare class TagWatcher {
|
|
3
|
-
private readonly sessionStorage;
|
|
4
|
-
private readonly errLog;
|
|
5
|
-
private readonly onTag;
|
|
6
3
|
intervals: Record<string, ReturnType<typeof setInterval>>;
|
|
7
4
|
tags: {
|
|
8
5
|
id: number;
|
|
9
6
|
selector: string;
|
|
10
7
|
}[];
|
|
11
8
|
observer: IntersectionObserver;
|
|
12
|
-
|
|
9
|
+
private readonly sessionStorage;
|
|
10
|
+
private readonly errLog;
|
|
11
|
+
private readonly onTag;
|
|
12
|
+
constructor(params: {
|
|
13
|
+
sessionStorage: Storage;
|
|
14
|
+
errLog: (args: any[]) => void;
|
|
15
|
+
onTag: (tag: number) => void;
|
|
16
|
+
});
|
|
13
17
|
fetchTags(ingest: string, token: string): Promise<void>;
|
|
14
18
|
setTags(tags: {
|
|
15
19
|
id: number;
|
|
@@ -24,6 +24,6 @@ export default class SignalManager {
|
|
|
24
24
|
started: number;
|
|
25
25
|
}[];
|
|
26
26
|
}) => void;
|
|
27
|
-
signalTask: (taskId: number, status:
|
|
28
|
-
signalTest: (status:
|
|
27
|
+
signalTask: (taskId: number, status: "begin" | "done" | "skipped", taskAnswer?: string) => void | Promise<Response>;
|
|
28
|
+
signalTest: (status: "begin" | "done" | "skipped") => Promise<Response>;
|
|
29
29
|
}
|
|
@@ -15,6 +15,7 @@ export declare function hasOpenreplayAttribute(e: Element, attr: string): boolea
|
|
|
15
15
|
* checks if iframe is accessible
|
|
16
16
|
**/
|
|
17
17
|
export declare function canAccessIframe(iframe: HTMLIFrameElement): boolean;
|
|
18
|
+
export declare function canAccessTarget(target: EventTarget): boolean;
|
|
18
19
|
export declare function generateRandomId(len?: number): string;
|
|
19
20
|
export declare function inIframe(): boolean | null;
|
|
20
21
|
/**
|
|
@@ -22,8 +23,8 @@ export declare function inIframe(): boolean | null;
|
|
|
22
23
|
* we need to use this to achieve safe behavior
|
|
23
24
|
* */
|
|
24
25
|
export declare function ngSafeBrowserMethod(method: string): string;
|
|
25
|
-
export declare function createMutationObserver(cb: MutationCallback): MutationObserver;
|
|
26
|
-
export declare function createEventListener(target: EventTarget, event: string, cb: EventListenerOrEventListenerObject, capture?: boolean): void;
|
|
27
|
-
export declare function deleteEventListener(target: EventTarget, event: string, cb: EventListenerOrEventListenerObject, capture?: boolean): void;
|
|
26
|
+
export declare function createMutationObserver(cb: MutationCallback, forceNgOff?: boolean): MutationObserver;
|
|
27
|
+
export declare function createEventListener(target: EventTarget, event: string, cb: EventListenerOrEventListenerObject, capture?: boolean, forceNgOff?: boolean): void;
|
|
28
|
+
export declare function deleteEventListener(target: EventTarget, event: string, cb: EventListenerOrEventListenerObject, capture?: boolean, forceNgOff?: boolean): void;
|
|
28
29
|
export declare function requestIdleCb(callback: () => void): void;
|
|
29
30
|
export declare function simpleMerge<T>(defaultObj: T, givenObj: Partial<T>): T;
|
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": "14.0.10
|
|
4
|
+
"version": "14.0.10",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"logging",
|
|
7
7
|
"replay"
|
|
@@ -13,14 +13,29 @@
|
|
|
13
13
|
],
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"type": "module",
|
|
16
|
-
"
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"require": "./dist/cjs/index.js",
|
|
19
|
+
"import": "./dist/lib/index.js",
|
|
20
|
+
"types": "./dist/lib/main/index.d.ts"
|
|
21
|
+
},
|
|
22
|
+
"./cjs": {
|
|
23
|
+
"require": "./dist/cjs/index.js",
|
|
24
|
+
"types": "./dist/cjs/main/index.d.ts"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist/lib/**/*",
|
|
29
|
+
"dist/cjs/**/*"
|
|
30
|
+
],
|
|
31
|
+
"main": "./dist/cjs/index.js",
|
|
32
|
+
"module": "./dist/lib/index.js",
|
|
33
|
+
"types": "./dist/lib/main/index.d.ts",
|
|
17
34
|
"scripts": {
|
|
18
35
|
"lint": "eslint src --ext .ts,.js --fix --quiet",
|
|
19
36
|
"clean": "rm -Rf build && rm -Rf lib && rm -Rf cjs",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"compile": "node --experimental-modules --experimental-json-modules scripts/compile.cjs",
|
|
23
|
-
"build": "bun run clean && bun run tscRun && bun run rollup && bun run compile",
|
|
37
|
+
"build:common": "tsc -b src/common",
|
|
38
|
+
"build": "yarn run clean && yarn build:common && rollup --config rollup.config.js",
|
|
24
39
|
"lint-front": "lint-staged",
|
|
25
40
|
"test": "jest --coverage=false",
|
|
26
41
|
"test:ci": "jest --coverage=true",
|
|
@@ -32,9 +47,12 @@
|
|
|
32
47
|
"@jest/globals": "^29.3.1",
|
|
33
48
|
"@rollup/plugin-babel": "^6.0.4",
|
|
34
49
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
50
|
+
"@rollup/plugin-replace": "^6.0.1",
|
|
51
|
+
"@rollup/plugin-terser": "0.4.4",
|
|
52
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
|
35
53
|
"@typescript-eslint/eslint-plugin": "^5.30.0",
|
|
36
54
|
"@typescript-eslint/parser": "^5.30.0",
|
|
37
|
-
"eslint": "^
|
|
55
|
+
"eslint": "^8.57.1",
|
|
38
56
|
"eslint-config-prettier": "^9.0.0",
|
|
39
57
|
"eslint-plugin-prettier": "^5.0.1",
|
|
40
58
|
"jest": "^29.3.1",
|
|
@@ -43,15 +61,15 @@
|
|
|
43
61
|
"prettier": "^3.0.3",
|
|
44
62
|
"replace-in-files": "^2.0.3",
|
|
45
63
|
"rollup": "^4.1.4",
|
|
46
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
47
64
|
"semver": "^6.3.0",
|
|
48
65
|
"ts-jest": "^29.0.3",
|
|
49
|
-
"typescript": "^
|
|
66
|
+
"typescript": "^5.6.3"
|
|
50
67
|
},
|
|
51
68
|
"dependencies": {
|
|
52
69
|
"@medv/finder": "^3.2.0",
|
|
53
70
|
"@openreplay/network-proxy": "^1.0.3",
|
|
54
71
|
"error-stack-parser": "^2.0.6",
|
|
72
|
+
"error-stack-parser-es": "^0.1.5",
|
|
55
73
|
"fflate": "^0.8.2"
|
|
56
74
|
},
|
|
57
75
|
"engines": {
|
|
@@ -64,5 +82,6 @@
|
|
|
64
82
|
"*.{json,md,html,js,jsx,ts,tsx}": [
|
|
65
83
|
"prettier --write"
|
|
66
84
|
]
|
|
67
|
-
}
|
|
85
|
+
},
|
|
86
|
+
"packageManager": "yarn@4.5.0"
|
|
68
87
|
}
|
package/.eslintignore
DELETED
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
18
|
package/.prettierignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*.gen.ts
|