@openreplay/tracker 4.1.11 → 5.0.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/.eslintignore +3 -0
- package/CHANGELOG.md +20 -0
- package/README.md +22 -18
- package/cjs/app/guards.d.ts +11 -12
- package/cjs/app/guards.js +2 -1
- package/cjs/app/index.d.ts +11 -8
- package/cjs/app/index.js +27 -8
- package/cjs/app/logger.d.ts +3 -3
- package/cjs/app/messages.gen.d.ts +8 -6
- package/cjs/app/messages.gen.js +116 -94
- package/cjs/app/nodes.d.ts +1 -1
- package/cjs/app/observer/iframe_offsets.d.ts +1 -1
- package/cjs/app/observer/observer.js +5 -5
- package/cjs/app/observer/top_observer.d.ts +2 -2
- package/cjs/app/observer/top_observer.js +1 -1
- package/cjs/app/session.d.ts +2 -2
- package/cjs/app/ticker.d.ts +1 -1
- package/cjs/common/interaction.d.ts +5 -5
- package/cjs/common/messages.gen.d.ts +104 -86
- package/cjs/index.d.ts +6 -2
- package/cjs/index.js +7 -5
- package/cjs/modules/cssrules.js +1 -1
- package/cjs/modules/focus.js +2 -2
- package/cjs/modules/fonts.js +2 -2
- package/cjs/modules/img.js +6 -5
- package/cjs/modules/input.d.ts +1 -1
- package/cjs/modules/input.js +15 -23
- package/cjs/modules/mouse.js +1 -1
- package/cjs/modules/network.d.ts +28 -0
- package/cjs/modules/network.js +203 -0
- package/cjs/modules/timing.js +7 -3
- package/cjs/modules/viewport.js +3 -1
- package/cjs/vendors/finder/finder.d.ts +1 -1
- package/jest.config.js +11 -0
- package/lib/app/guards.d.ts +11 -12
- package/lib/app/guards.js +2 -1
- package/lib/app/index.d.ts +11 -8
- package/lib/app/index.js +28 -9
- package/lib/app/logger.d.ts +3 -3
- package/lib/app/messages.gen.d.ts +8 -6
- package/lib/app/messages.gen.js +107 -87
- package/lib/app/nodes.d.ts +1 -1
- package/lib/app/observer/iframe_offsets.d.ts +1 -1
- package/lib/app/observer/observer.js +5 -5
- package/lib/app/observer/top_observer.d.ts +2 -2
- package/lib/app/observer/top_observer.js +1 -1
- package/lib/app/session.d.ts +2 -2
- package/lib/app/ticker.d.ts +1 -1
- package/lib/common/interaction.d.ts +5 -5
- package/lib/common/messages.gen.d.ts +104 -86
- package/lib/common/tsconfig.tsbuildinfo +1 -1
- package/lib/index.d.ts +6 -2
- package/lib/index.js +8 -6
- package/lib/modules/cssrules.js +1 -1
- package/lib/modules/focus.js +2 -2
- package/lib/modules/fonts.js +2 -2
- package/lib/modules/img.js +6 -5
- package/lib/modules/input.d.ts +1 -1
- package/lib/modules/input.js +15 -23
- package/lib/modules/mouse.js +1 -1
- package/lib/modules/network.d.ts +28 -0
- package/lib/modules/network.js +200 -0
- package/lib/modules/timing.js +8 -4
- package/lib/modules/viewport.js +3 -1
- package/lib/vendors/finder/finder.d.ts +1 -1
- package/package.json +8 -3
- package/tsconfig-base.json +2 -1
- package/cjs/app/messages.d.ts +0 -52
- package/cjs/app/messages.js +0 -234
- package/lib/app/messages.d.ts +0 -52
- package/lib/app/messages.js +0 -181
package/cjs/app/messages.gen.js
CHANGED
|
@@ -2,37 +2,18 @@
|
|
|
2
2
|
// Auto-generated, do not edit
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.CSSInsertRuleURLBased = exports.CustomIssue = exports.TechnicalInfo = exports.SetCSSDataURLBased = exports.SetNodeAttributeURLBased = exports.LongTask = exports.SetNodeFocus = exports.LoadFontFace = exports.SetPageVisibility = exports.ConnectionInformation = exports.ResourceTiming = exports.PerformanceTrack = exports.GraphQL = exports.NgRx = exports.MobX = exports.Vuex = exports.Redux = exports.StateAction = exports.OTable = exports.Profiler = exports.Fetch = exports.CSSDeleteRule = exports.CSSInsertRule = exports.Metadata = exports.UserAnonymousID = exports.UserID = exports.
|
|
6
|
-
exports.
|
|
7
|
-
function BatchMetadata(version, pageNo, firstIndex, timestamp, location) {
|
|
8
|
-
return [
|
|
9
|
-
81 /* BatchMetadata */,
|
|
10
|
-
version,
|
|
11
|
-
pageNo,
|
|
12
|
-
firstIndex,
|
|
13
|
-
timestamp,
|
|
14
|
-
location,
|
|
15
|
-
];
|
|
16
|
-
}
|
|
17
|
-
exports.BatchMetadata = BatchMetadata;
|
|
18
|
-
function PartitionedMessage(partNo, partTotal) {
|
|
19
|
-
return [
|
|
20
|
-
82 /* PartitionedMessage */,
|
|
21
|
-
partNo,
|
|
22
|
-
partTotal,
|
|
23
|
-
];
|
|
24
|
-
}
|
|
25
|
-
exports.PartitionedMessage = PartitionedMessage;
|
|
5
|
+
exports.CSSInsertRuleURLBased = exports.CustomIssue = exports.TechnicalInfo = exports.SetCSSDataURLBased = exports.SetNodeAttributeURLBased = exports.LongTask = exports.SetNodeFocus = exports.LoadFontFace = exports.SetPageVisibility = exports.ConnectionInformation = exports.ResourceTiming = exports.SetNodeAttributeDict = exports.StringDict = exports.PerformanceTrack = exports.GraphQL = exports.NgRx = exports.MobX = exports.Vuex = exports.Redux = exports.StateAction = exports.OTable = exports.Profiler = exports.Fetch = exports.CSSDeleteRule = exports.CSSInsertRule = exports.Metadata = exports.UserAnonymousID = exports.UserID = exports.CustomEvent = exports.PageRenderTiming = exports.PageLoadTiming = exports.ConsoleLog = exports.NetworkRequest = exports.MouseMove = exports.SetInputChecked = exports.SetInputValue = exports.SetInputTarget = exports.SetNodeScroll = exports.SetNodeData = exports.RemoveNodeAttribute = exports.SetNodeAttribute = exports.RemoveNode = exports.MoveNode = exports.CreateTextNode = exports.CreateElementNode = exports.CreateDocument = exports.SetViewportScroll = exports.SetViewportSize = exports.SetPageLocation = exports.Timestamp = void 0;
|
|
6
|
+
exports.PartitionedMessage = exports.BatchMetadata = exports.Zustand = exports.JSException = exports.AdoptedSSRemoveOwner = exports.AdoptedSSAddOwner = exports.AdoptedSSDeleteRule = exports.AdoptedSSInsertRuleURLBased = exports.AdoptedSSReplaceURLBased = exports.CreateIFrameDocument = exports.MouseClick = void 0;
|
|
26
7
|
function Timestamp(timestamp) {
|
|
27
8
|
return [
|
|
28
|
-
0 /* Timestamp */,
|
|
9
|
+
0 /* Messages.Type.Timestamp */,
|
|
29
10
|
timestamp,
|
|
30
11
|
];
|
|
31
12
|
}
|
|
32
13
|
exports.Timestamp = Timestamp;
|
|
33
14
|
function SetPageLocation(url, referrer, navigationStart) {
|
|
34
15
|
return [
|
|
35
|
-
4 /* SetPageLocation */,
|
|
16
|
+
4 /* Messages.Type.SetPageLocation */,
|
|
36
17
|
url,
|
|
37
18
|
referrer,
|
|
38
19
|
navigationStart,
|
|
@@ -41,7 +22,7 @@ function SetPageLocation(url, referrer, navigationStart) {
|
|
|
41
22
|
exports.SetPageLocation = SetPageLocation;
|
|
42
23
|
function SetViewportSize(width, height) {
|
|
43
24
|
return [
|
|
44
|
-
5 /* SetViewportSize */,
|
|
25
|
+
5 /* Messages.Type.SetViewportSize */,
|
|
45
26
|
width,
|
|
46
27
|
height,
|
|
47
28
|
];
|
|
@@ -49,7 +30,7 @@ function SetViewportSize(width, height) {
|
|
|
49
30
|
exports.SetViewportSize = SetViewportSize;
|
|
50
31
|
function SetViewportScroll(x, y) {
|
|
51
32
|
return [
|
|
52
|
-
6 /* SetViewportScroll */,
|
|
33
|
+
6 /* Messages.Type.SetViewportScroll */,
|
|
53
34
|
x,
|
|
54
35
|
y,
|
|
55
36
|
];
|
|
@@ -57,13 +38,13 @@ function SetViewportScroll(x, y) {
|
|
|
57
38
|
exports.SetViewportScroll = SetViewportScroll;
|
|
58
39
|
function CreateDocument() {
|
|
59
40
|
return [
|
|
60
|
-
7 /* CreateDocument */,
|
|
41
|
+
7 /* Messages.Type.CreateDocument */,
|
|
61
42
|
];
|
|
62
43
|
}
|
|
63
44
|
exports.CreateDocument = CreateDocument;
|
|
64
45
|
function CreateElementNode(id, parentID, index, tag, svg) {
|
|
65
46
|
return [
|
|
66
|
-
8 /* CreateElementNode */,
|
|
47
|
+
8 /* Messages.Type.CreateElementNode */,
|
|
67
48
|
id,
|
|
68
49
|
parentID,
|
|
69
50
|
index,
|
|
@@ -74,7 +55,7 @@ function CreateElementNode(id, parentID, index, tag, svg) {
|
|
|
74
55
|
exports.CreateElementNode = CreateElementNode;
|
|
75
56
|
function CreateTextNode(id, parentID, index) {
|
|
76
57
|
return [
|
|
77
|
-
9 /* CreateTextNode */,
|
|
58
|
+
9 /* Messages.Type.CreateTextNode */,
|
|
78
59
|
id,
|
|
79
60
|
parentID,
|
|
80
61
|
index,
|
|
@@ -83,7 +64,7 @@ function CreateTextNode(id, parentID, index) {
|
|
|
83
64
|
exports.CreateTextNode = CreateTextNode;
|
|
84
65
|
function MoveNode(id, parentID, index) {
|
|
85
66
|
return [
|
|
86
|
-
10 /* MoveNode */,
|
|
67
|
+
10 /* Messages.Type.MoveNode */,
|
|
87
68
|
id,
|
|
88
69
|
parentID,
|
|
89
70
|
index,
|
|
@@ -92,14 +73,14 @@ function MoveNode(id, parentID, index) {
|
|
|
92
73
|
exports.MoveNode = MoveNode;
|
|
93
74
|
function RemoveNode(id) {
|
|
94
75
|
return [
|
|
95
|
-
11 /* RemoveNode */,
|
|
76
|
+
11 /* Messages.Type.RemoveNode */,
|
|
96
77
|
id,
|
|
97
78
|
];
|
|
98
79
|
}
|
|
99
80
|
exports.RemoveNode = RemoveNode;
|
|
100
81
|
function SetNodeAttribute(id, name, value) {
|
|
101
82
|
return [
|
|
102
|
-
12 /* SetNodeAttribute */,
|
|
83
|
+
12 /* Messages.Type.SetNodeAttribute */,
|
|
103
84
|
id,
|
|
104
85
|
name,
|
|
105
86
|
value,
|
|
@@ -108,7 +89,7 @@ function SetNodeAttribute(id, name, value) {
|
|
|
108
89
|
exports.SetNodeAttribute = SetNodeAttribute;
|
|
109
90
|
function RemoveNodeAttribute(id, name) {
|
|
110
91
|
return [
|
|
111
|
-
13 /* RemoveNodeAttribute */,
|
|
92
|
+
13 /* Messages.Type.RemoveNodeAttribute */,
|
|
112
93
|
id,
|
|
113
94
|
name,
|
|
114
95
|
];
|
|
@@ -116,7 +97,7 @@ function RemoveNodeAttribute(id, name) {
|
|
|
116
97
|
exports.RemoveNodeAttribute = RemoveNodeAttribute;
|
|
117
98
|
function SetNodeData(id, data) {
|
|
118
99
|
return [
|
|
119
|
-
14 /* SetNodeData */,
|
|
100
|
+
14 /* Messages.Type.SetNodeData */,
|
|
120
101
|
id,
|
|
121
102
|
data,
|
|
122
103
|
];
|
|
@@ -124,7 +105,7 @@ function SetNodeData(id, data) {
|
|
|
124
105
|
exports.SetNodeData = SetNodeData;
|
|
125
106
|
function SetNodeScroll(id, x, y) {
|
|
126
107
|
return [
|
|
127
|
-
16 /* SetNodeScroll */,
|
|
108
|
+
16 /* Messages.Type.SetNodeScroll */,
|
|
128
109
|
id,
|
|
129
110
|
x,
|
|
130
111
|
y,
|
|
@@ -133,7 +114,7 @@ function SetNodeScroll(id, x, y) {
|
|
|
133
114
|
exports.SetNodeScroll = SetNodeScroll;
|
|
134
115
|
function SetInputTarget(id, label) {
|
|
135
116
|
return [
|
|
136
|
-
17 /* SetInputTarget */,
|
|
117
|
+
17 /* Messages.Type.SetInputTarget */,
|
|
137
118
|
id,
|
|
138
119
|
label,
|
|
139
120
|
];
|
|
@@ -141,7 +122,7 @@ function SetInputTarget(id, label) {
|
|
|
141
122
|
exports.SetInputTarget = SetInputTarget;
|
|
142
123
|
function SetInputValue(id, value, mask) {
|
|
143
124
|
return [
|
|
144
|
-
18 /* SetInputValue */,
|
|
125
|
+
18 /* Messages.Type.SetInputValue */,
|
|
145
126
|
id,
|
|
146
127
|
value,
|
|
147
128
|
mask,
|
|
@@ -150,7 +131,7 @@ function SetInputValue(id, value, mask) {
|
|
|
150
131
|
exports.SetInputValue = SetInputValue;
|
|
151
132
|
function SetInputChecked(id, checked) {
|
|
152
133
|
return [
|
|
153
|
-
19 /* SetInputChecked */,
|
|
134
|
+
19 /* Messages.Type.SetInputChecked */,
|
|
154
135
|
id,
|
|
155
136
|
checked,
|
|
156
137
|
];
|
|
@@ -158,15 +139,29 @@ function SetInputChecked(id, checked) {
|
|
|
158
139
|
exports.SetInputChecked = SetInputChecked;
|
|
159
140
|
function MouseMove(x, y) {
|
|
160
141
|
return [
|
|
161
|
-
20 /* MouseMove */,
|
|
142
|
+
20 /* Messages.Type.MouseMove */,
|
|
162
143
|
x,
|
|
163
144
|
y,
|
|
164
145
|
];
|
|
165
146
|
}
|
|
166
147
|
exports.MouseMove = MouseMove;
|
|
148
|
+
function NetworkRequest(type, method, url, request, response, status, timestamp, duration) {
|
|
149
|
+
return [
|
|
150
|
+
21 /* Messages.Type.NetworkRequest */,
|
|
151
|
+
type,
|
|
152
|
+
method,
|
|
153
|
+
url,
|
|
154
|
+
request,
|
|
155
|
+
response,
|
|
156
|
+
status,
|
|
157
|
+
timestamp,
|
|
158
|
+
duration,
|
|
159
|
+
];
|
|
160
|
+
}
|
|
161
|
+
exports.NetworkRequest = NetworkRequest;
|
|
167
162
|
function ConsoleLog(level, value) {
|
|
168
163
|
return [
|
|
169
|
-
22 /* ConsoleLog */,
|
|
164
|
+
22 /* Messages.Type.ConsoleLog */,
|
|
170
165
|
level,
|
|
171
166
|
value,
|
|
172
167
|
];
|
|
@@ -174,7 +169,7 @@ function ConsoleLog(level, value) {
|
|
|
174
169
|
exports.ConsoleLog = ConsoleLog;
|
|
175
170
|
function PageLoadTiming(requestStart, responseStart, responseEnd, domContentLoadedEventStart, domContentLoadedEventEnd, loadEventStart, loadEventEnd, firstPaint, firstContentfulPaint) {
|
|
176
171
|
return [
|
|
177
|
-
23 /* PageLoadTiming */,
|
|
172
|
+
23 /* Messages.Type.PageLoadTiming */,
|
|
178
173
|
requestStart,
|
|
179
174
|
responseStart,
|
|
180
175
|
responseEnd,
|
|
@@ -189,47 +184,38 @@ function PageLoadTiming(requestStart, responseStart, responseEnd, domContentLoad
|
|
|
189
184
|
exports.PageLoadTiming = PageLoadTiming;
|
|
190
185
|
function PageRenderTiming(speedIndex, visuallyComplete, timeToInteractive) {
|
|
191
186
|
return [
|
|
192
|
-
24 /* PageRenderTiming */,
|
|
187
|
+
24 /* Messages.Type.PageRenderTiming */,
|
|
193
188
|
speedIndex,
|
|
194
189
|
visuallyComplete,
|
|
195
190
|
timeToInteractive,
|
|
196
191
|
];
|
|
197
192
|
}
|
|
198
193
|
exports.PageRenderTiming = PageRenderTiming;
|
|
199
|
-
function
|
|
194
|
+
function CustomEvent(name, payload) {
|
|
200
195
|
return [
|
|
201
|
-
|
|
196
|
+
27 /* Messages.Type.CustomEvent */,
|
|
202
197
|
name,
|
|
203
|
-
message,
|
|
204
198
|
payload,
|
|
205
199
|
];
|
|
206
200
|
}
|
|
207
|
-
exports.
|
|
208
|
-
function RawCustomEvent(name, payload) {
|
|
209
|
-
return [
|
|
210
|
-
27 /* RawCustomEvent */,
|
|
211
|
-
name,
|
|
212
|
-
payload,
|
|
213
|
-
];
|
|
214
|
-
}
|
|
215
|
-
exports.RawCustomEvent = RawCustomEvent;
|
|
201
|
+
exports.CustomEvent = CustomEvent;
|
|
216
202
|
function UserID(id) {
|
|
217
203
|
return [
|
|
218
|
-
28 /* UserID */,
|
|
204
|
+
28 /* Messages.Type.UserID */,
|
|
219
205
|
id,
|
|
220
206
|
];
|
|
221
207
|
}
|
|
222
208
|
exports.UserID = UserID;
|
|
223
209
|
function UserAnonymousID(id) {
|
|
224
210
|
return [
|
|
225
|
-
29 /* UserAnonymousID */,
|
|
211
|
+
29 /* Messages.Type.UserAnonymousID */,
|
|
226
212
|
id,
|
|
227
213
|
];
|
|
228
214
|
}
|
|
229
215
|
exports.UserAnonymousID = UserAnonymousID;
|
|
230
216
|
function Metadata(key, value) {
|
|
231
217
|
return [
|
|
232
|
-
30 /* Metadata */,
|
|
218
|
+
30 /* Messages.Type.Metadata */,
|
|
233
219
|
key,
|
|
234
220
|
value,
|
|
235
221
|
];
|
|
@@ -237,7 +223,7 @@ function Metadata(key, value) {
|
|
|
237
223
|
exports.Metadata = Metadata;
|
|
238
224
|
function CSSInsertRule(id, rule, index) {
|
|
239
225
|
return [
|
|
240
|
-
37 /* CSSInsertRule */,
|
|
226
|
+
37 /* Messages.Type.CSSInsertRule */,
|
|
241
227
|
id,
|
|
242
228
|
rule,
|
|
243
229
|
index,
|
|
@@ -246,7 +232,7 @@ function CSSInsertRule(id, rule, index) {
|
|
|
246
232
|
exports.CSSInsertRule = CSSInsertRule;
|
|
247
233
|
function CSSDeleteRule(id, index) {
|
|
248
234
|
return [
|
|
249
|
-
38 /* CSSDeleteRule */,
|
|
235
|
+
38 /* Messages.Type.CSSDeleteRule */,
|
|
250
236
|
id,
|
|
251
237
|
index,
|
|
252
238
|
];
|
|
@@ -254,7 +240,7 @@ function CSSDeleteRule(id, index) {
|
|
|
254
240
|
exports.CSSDeleteRule = CSSDeleteRule;
|
|
255
241
|
function Fetch(method, url, request, response, status, timestamp, duration) {
|
|
256
242
|
return [
|
|
257
|
-
39 /* Fetch */,
|
|
243
|
+
39 /* Messages.Type.Fetch */,
|
|
258
244
|
method,
|
|
259
245
|
url,
|
|
260
246
|
request,
|
|
@@ -267,7 +253,7 @@ function Fetch(method, url, request, response, status, timestamp, duration) {
|
|
|
267
253
|
exports.Fetch = Fetch;
|
|
268
254
|
function Profiler(name, duration, args, result) {
|
|
269
255
|
return [
|
|
270
|
-
40 /* Profiler */,
|
|
256
|
+
40 /* Messages.Type.Profiler */,
|
|
271
257
|
name,
|
|
272
258
|
duration,
|
|
273
259
|
args,
|
|
@@ -277,7 +263,7 @@ function Profiler(name, duration, args, result) {
|
|
|
277
263
|
exports.Profiler = Profiler;
|
|
278
264
|
function OTable(key, value) {
|
|
279
265
|
return [
|
|
280
|
-
41 /* OTable */,
|
|
266
|
+
41 /* Messages.Type.OTable */,
|
|
281
267
|
key,
|
|
282
268
|
value,
|
|
283
269
|
];
|
|
@@ -285,14 +271,14 @@ function OTable(key, value) {
|
|
|
285
271
|
exports.OTable = OTable;
|
|
286
272
|
function StateAction(type) {
|
|
287
273
|
return [
|
|
288
|
-
42 /* StateAction */,
|
|
274
|
+
42 /* Messages.Type.StateAction */,
|
|
289
275
|
type,
|
|
290
276
|
];
|
|
291
277
|
}
|
|
292
278
|
exports.StateAction = StateAction;
|
|
293
279
|
function Redux(action, state, duration) {
|
|
294
280
|
return [
|
|
295
|
-
44 /* Redux */,
|
|
281
|
+
44 /* Messages.Type.Redux */,
|
|
296
282
|
action,
|
|
297
283
|
state,
|
|
298
284
|
duration,
|
|
@@ -301,7 +287,7 @@ function Redux(action, state, duration) {
|
|
|
301
287
|
exports.Redux = Redux;
|
|
302
288
|
function Vuex(mutation, state) {
|
|
303
289
|
return [
|
|
304
|
-
45 /* Vuex */,
|
|
290
|
+
45 /* Messages.Type.Vuex */,
|
|
305
291
|
mutation,
|
|
306
292
|
state,
|
|
307
293
|
];
|
|
@@ -309,7 +295,7 @@ function Vuex(mutation, state) {
|
|
|
309
295
|
exports.Vuex = Vuex;
|
|
310
296
|
function MobX(type, payload) {
|
|
311
297
|
return [
|
|
312
|
-
46 /* MobX */,
|
|
298
|
+
46 /* Messages.Type.MobX */,
|
|
313
299
|
type,
|
|
314
300
|
payload,
|
|
315
301
|
];
|
|
@@ -317,7 +303,7 @@ function MobX(type, payload) {
|
|
|
317
303
|
exports.MobX = MobX;
|
|
318
304
|
function NgRx(action, state, duration) {
|
|
319
305
|
return [
|
|
320
|
-
47 /* NgRx */,
|
|
306
|
+
47 /* Messages.Type.NgRx */,
|
|
321
307
|
action,
|
|
322
308
|
state,
|
|
323
309
|
duration,
|
|
@@ -326,7 +312,7 @@ function NgRx(action, state, duration) {
|
|
|
326
312
|
exports.NgRx = NgRx;
|
|
327
313
|
function GraphQL(operationKind, operationName, variables, response) {
|
|
328
314
|
return [
|
|
329
|
-
48 /* GraphQL */,
|
|
315
|
+
48 /* Messages.Type.GraphQL */,
|
|
330
316
|
operationKind,
|
|
331
317
|
operationName,
|
|
332
318
|
variables,
|
|
@@ -336,7 +322,7 @@ function GraphQL(operationKind, operationName, variables, response) {
|
|
|
336
322
|
exports.GraphQL = GraphQL;
|
|
337
323
|
function PerformanceTrack(frames, ticks, totalJSHeapSize, usedJSHeapSize) {
|
|
338
324
|
return [
|
|
339
|
-
49 /* PerformanceTrack */,
|
|
325
|
+
49 /* Messages.Type.PerformanceTrack */,
|
|
340
326
|
frames,
|
|
341
327
|
ticks,
|
|
342
328
|
totalJSHeapSize,
|
|
@@ -344,9 +330,26 @@ function PerformanceTrack(frames, ticks, totalJSHeapSize, usedJSHeapSize) {
|
|
|
344
330
|
];
|
|
345
331
|
}
|
|
346
332
|
exports.PerformanceTrack = PerformanceTrack;
|
|
333
|
+
function StringDict(key, value) {
|
|
334
|
+
return [
|
|
335
|
+
50 /* Messages.Type.StringDict */,
|
|
336
|
+
key,
|
|
337
|
+
value,
|
|
338
|
+
];
|
|
339
|
+
}
|
|
340
|
+
exports.StringDict = StringDict;
|
|
341
|
+
function SetNodeAttributeDict(id, nameKey, valueKey) {
|
|
342
|
+
return [
|
|
343
|
+
51 /* Messages.Type.SetNodeAttributeDict */,
|
|
344
|
+
id,
|
|
345
|
+
nameKey,
|
|
346
|
+
valueKey,
|
|
347
|
+
];
|
|
348
|
+
}
|
|
349
|
+
exports.SetNodeAttributeDict = SetNodeAttributeDict;
|
|
347
350
|
function ResourceTiming(timestamp, duration, ttfb, headerSize, encodedBodySize, decodedBodySize, url, initiator) {
|
|
348
351
|
return [
|
|
349
|
-
53 /* ResourceTiming */,
|
|
352
|
+
53 /* Messages.Type.ResourceTiming */,
|
|
350
353
|
timestamp,
|
|
351
354
|
duration,
|
|
352
355
|
ttfb,
|
|
@@ -360,7 +363,7 @@ function ResourceTiming(timestamp, duration, ttfb, headerSize, encodedBodySize,
|
|
|
360
363
|
exports.ResourceTiming = ResourceTiming;
|
|
361
364
|
function ConnectionInformation(downlink, type) {
|
|
362
365
|
return [
|
|
363
|
-
54 /* ConnectionInformation */,
|
|
366
|
+
54 /* Messages.Type.ConnectionInformation */,
|
|
364
367
|
downlink,
|
|
365
368
|
type,
|
|
366
369
|
];
|
|
@@ -368,14 +371,14 @@ function ConnectionInformation(downlink, type) {
|
|
|
368
371
|
exports.ConnectionInformation = ConnectionInformation;
|
|
369
372
|
function SetPageVisibility(hidden) {
|
|
370
373
|
return [
|
|
371
|
-
55 /* SetPageVisibility */,
|
|
374
|
+
55 /* Messages.Type.SetPageVisibility */,
|
|
372
375
|
hidden,
|
|
373
376
|
];
|
|
374
377
|
}
|
|
375
378
|
exports.SetPageVisibility = SetPageVisibility;
|
|
376
379
|
function LoadFontFace(parentID, family, source, descriptors) {
|
|
377
380
|
return [
|
|
378
|
-
57 /* LoadFontFace */,
|
|
381
|
+
57 /* Messages.Type.LoadFontFace */,
|
|
379
382
|
parentID,
|
|
380
383
|
family,
|
|
381
384
|
source,
|
|
@@ -385,14 +388,14 @@ function LoadFontFace(parentID, family, source, descriptors) {
|
|
|
385
388
|
exports.LoadFontFace = LoadFontFace;
|
|
386
389
|
function SetNodeFocus(id) {
|
|
387
390
|
return [
|
|
388
|
-
58 /* SetNodeFocus */,
|
|
391
|
+
58 /* Messages.Type.SetNodeFocus */,
|
|
389
392
|
id,
|
|
390
393
|
];
|
|
391
394
|
}
|
|
392
395
|
exports.SetNodeFocus = SetNodeFocus;
|
|
393
396
|
function LongTask(timestamp, duration, context, containerType, containerSrc, containerId, containerName) {
|
|
394
397
|
return [
|
|
395
|
-
59 /* LongTask */,
|
|
398
|
+
59 /* Messages.Type.LongTask */,
|
|
396
399
|
timestamp,
|
|
397
400
|
duration,
|
|
398
401
|
context,
|
|
@@ -405,7 +408,7 @@ function LongTask(timestamp, duration, context, containerType, containerSrc, con
|
|
|
405
408
|
exports.LongTask = LongTask;
|
|
406
409
|
function SetNodeAttributeURLBased(id, name, value, baseURL) {
|
|
407
410
|
return [
|
|
408
|
-
60 /* SetNodeAttributeURLBased */,
|
|
411
|
+
60 /* Messages.Type.SetNodeAttributeURLBased */,
|
|
409
412
|
id,
|
|
410
413
|
name,
|
|
411
414
|
value,
|
|
@@ -415,7 +418,7 @@ function SetNodeAttributeURLBased(id, name, value, baseURL) {
|
|
|
415
418
|
exports.SetNodeAttributeURLBased = SetNodeAttributeURLBased;
|
|
416
419
|
function SetCSSDataURLBased(id, data, baseURL) {
|
|
417
420
|
return [
|
|
418
|
-
61 /* SetCSSDataURLBased */,
|
|
421
|
+
61 /* Messages.Type.SetCSSDataURLBased */,
|
|
419
422
|
id,
|
|
420
423
|
data,
|
|
421
424
|
baseURL,
|
|
@@ -424,7 +427,7 @@ function SetCSSDataURLBased(id, data, baseURL) {
|
|
|
424
427
|
exports.SetCSSDataURLBased = SetCSSDataURLBased;
|
|
425
428
|
function TechnicalInfo(type, value) {
|
|
426
429
|
return [
|
|
427
|
-
63 /* TechnicalInfo */,
|
|
430
|
+
63 /* Messages.Type.TechnicalInfo */,
|
|
428
431
|
type,
|
|
429
432
|
value,
|
|
430
433
|
];
|
|
@@ -432,7 +435,7 @@ function TechnicalInfo(type, value) {
|
|
|
432
435
|
exports.TechnicalInfo = TechnicalInfo;
|
|
433
436
|
function CustomIssue(name, payload) {
|
|
434
437
|
return [
|
|
435
|
-
64 /* CustomIssue */,
|
|
438
|
+
64 /* Messages.Type.CustomIssue */,
|
|
436
439
|
name,
|
|
437
440
|
payload,
|
|
438
441
|
];
|
|
@@ -440,7 +443,7 @@ function CustomIssue(name, payload) {
|
|
|
440
443
|
exports.CustomIssue = CustomIssue;
|
|
441
444
|
function CSSInsertRuleURLBased(id, rule, index, baseURL) {
|
|
442
445
|
return [
|
|
443
|
-
67 /* CSSInsertRuleURLBased */,
|
|
446
|
+
67 /* Messages.Type.CSSInsertRuleURLBased */,
|
|
444
447
|
id,
|
|
445
448
|
rule,
|
|
446
449
|
index,
|
|
@@ -450,7 +453,7 @@ function CSSInsertRuleURLBased(id, rule, index, baseURL) {
|
|
|
450
453
|
exports.CSSInsertRuleURLBased = CSSInsertRuleURLBased;
|
|
451
454
|
function MouseClick(id, hesitationTime, label, selector) {
|
|
452
455
|
return [
|
|
453
|
-
69 /* MouseClick */,
|
|
456
|
+
69 /* Messages.Type.MouseClick */,
|
|
454
457
|
id,
|
|
455
458
|
hesitationTime,
|
|
456
459
|
label,
|
|
@@ -460,7 +463,7 @@ function MouseClick(id, hesitationTime, label, selector) {
|
|
|
460
463
|
exports.MouseClick = MouseClick;
|
|
461
464
|
function CreateIFrameDocument(frameID, id) {
|
|
462
465
|
return [
|
|
463
|
-
70 /* CreateIFrameDocument */,
|
|
466
|
+
70 /* Messages.Type.CreateIFrameDocument */,
|
|
464
467
|
frameID,
|
|
465
468
|
id,
|
|
466
469
|
];
|
|
@@ -468,7 +471,7 @@ function CreateIFrameDocument(frameID, id) {
|
|
|
468
471
|
exports.CreateIFrameDocument = CreateIFrameDocument;
|
|
469
472
|
function AdoptedSSReplaceURLBased(sheetID, text, baseURL) {
|
|
470
473
|
return [
|
|
471
|
-
71 /* AdoptedSSReplaceURLBased */,
|
|
474
|
+
71 /* Messages.Type.AdoptedSSReplaceURLBased */,
|
|
472
475
|
sheetID,
|
|
473
476
|
text,
|
|
474
477
|
baseURL,
|
|
@@ -477,7 +480,7 @@ function AdoptedSSReplaceURLBased(sheetID, text, baseURL) {
|
|
|
477
480
|
exports.AdoptedSSReplaceURLBased = AdoptedSSReplaceURLBased;
|
|
478
481
|
function AdoptedSSInsertRuleURLBased(sheetID, rule, index, baseURL) {
|
|
479
482
|
return [
|
|
480
|
-
73 /* AdoptedSSInsertRuleURLBased */,
|
|
483
|
+
73 /* Messages.Type.AdoptedSSInsertRuleURLBased */,
|
|
481
484
|
sheetID,
|
|
482
485
|
rule,
|
|
483
486
|
index,
|
|
@@ -487,7 +490,7 @@ function AdoptedSSInsertRuleURLBased(sheetID, rule, index, baseURL) {
|
|
|
487
490
|
exports.AdoptedSSInsertRuleURLBased = AdoptedSSInsertRuleURLBased;
|
|
488
491
|
function AdoptedSSDeleteRule(sheetID, index) {
|
|
489
492
|
return [
|
|
490
|
-
75 /* AdoptedSSDeleteRule */,
|
|
493
|
+
75 /* Messages.Type.AdoptedSSDeleteRule */,
|
|
491
494
|
sheetID,
|
|
492
495
|
index,
|
|
493
496
|
];
|
|
@@ -495,7 +498,7 @@ function AdoptedSSDeleteRule(sheetID, index) {
|
|
|
495
498
|
exports.AdoptedSSDeleteRule = AdoptedSSDeleteRule;
|
|
496
499
|
function AdoptedSSAddOwner(sheetID, id) {
|
|
497
500
|
return [
|
|
498
|
-
76 /* AdoptedSSAddOwner */,
|
|
501
|
+
76 /* Messages.Type.AdoptedSSAddOwner */,
|
|
499
502
|
sheetID,
|
|
500
503
|
id,
|
|
501
504
|
];
|
|
@@ -503,27 +506,46 @@ function AdoptedSSAddOwner(sheetID, id) {
|
|
|
503
506
|
exports.AdoptedSSAddOwner = AdoptedSSAddOwner;
|
|
504
507
|
function AdoptedSSRemoveOwner(sheetID, id) {
|
|
505
508
|
return [
|
|
506
|
-
77 /* AdoptedSSRemoveOwner */,
|
|
509
|
+
77 /* Messages.Type.AdoptedSSRemoveOwner */,
|
|
507
510
|
sheetID,
|
|
508
511
|
id,
|
|
509
512
|
];
|
|
510
513
|
}
|
|
511
514
|
exports.AdoptedSSRemoveOwner = AdoptedSSRemoveOwner;
|
|
515
|
+
function JSException(name, message, payload, metadata) {
|
|
516
|
+
return [
|
|
517
|
+
78 /* Messages.Type.JSException */,
|
|
518
|
+
name,
|
|
519
|
+
message,
|
|
520
|
+
payload,
|
|
521
|
+
metadata,
|
|
522
|
+
];
|
|
523
|
+
}
|
|
524
|
+
exports.JSException = JSException;
|
|
512
525
|
function Zustand(mutation, state) {
|
|
513
526
|
return [
|
|
514
|
-
79 /* Zustand */,
|
|
527
|
+
79 /* Messages.Type.Zustand */,
|
|
515
528
|
mutation,
|
|
516
529
|
state,
|
|
517
530
|
];
|
|
518
531
|
}
|
|
519
532
|
exports.Zustand = Zustand;
|
|
520
|
-
function
|
|
533
|
+
function BatchMetadata(version, pageNo, firstIndex, timestamp, location) {
|
|
521
534
|
return [
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
535
|
+
81 /* Messages.Type.BatchMetadata */,
|
|
536
|
+
version,
|
|
537
|
+
pageNo,
|
|
538
|
+
firstIndex,
|
|
539
|
+
timestamp,
|
|
540
|
+
location,
|
|
527
541
|
];
|
|
528
542
|
}
|
|
529
|
-
exports.
|
|
543
|
+
exports.BatchMetadata = BatchMetadata;
|
|
544
|
+
function PartitionedMessage(partNo, partTotal) {
|
|
545
|
+
return [
|
|
546
|
+
82 /* Messages.Type.PartitionedMessage */,
|
|
547
|
+
partNo,
|
|
548
|
+
partTotal,
|
|
549
|
+
];
|
|
550
|
+
}
|
|
551
|
+
exports.PartitionedMessage = PartitionedMessage;
|
package/cjs/app/nodes.d.ts
CHANGED
|
@@ -125,7 +125,7 @@ class Observer {
|
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
127
|
if (name === 'value' &&
|
|
128
|
-
(0, guards_js_1.hasTag)(node, '
|
|
128
|
+
(0, guards_js_1.hasTag)(node, 'input') &&
|
|
129
129
|
node.type !== 'button' &&
|
|
130
130
|
node.type !== 'reset' &&
|
|
131
131
|
node.type !== 'submit') {
|
|
@@ -135,7 +135,7 @@ class Observer {
|
|
|
135
135
|
this.app.send((0, messages_gen_js_1.RemoveNodeAttribute)(id, name));
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
|
-
if (name === 'style' || (name === 'href' && (0, guards_js_1.hasTag)(node, '
|
|
138
|
+
if (name === 'style' || (name === 'href' && (0, guards_js_1.hasTag)(node, 'link'))) {
|
|
139
139
|
this.app.send((0, messages_gen_js_1.SetNodeAttributeURLBased)(id, name, value, this.app.getBaseHref()));
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
@@ -145,7 +145,7 @@ class Observer {
|
|
|
145
145
|
this.app.send((0, messages_gen_js_1.SetNodeAttribute)(id, name, value));
|
|
146
146
|
}
|
|
147
147
|
sendNodeData(id, parentElement, data) {
|
|
148
|
-
if ((0, guards_js_1.hasTag)(parentElement, '
|
|
148
|
+
if ((0, guards_js_1.hasTag)(parentElement, 'style')) {
|
|
149
149
|
this.app.send((0, messages_gen_js_1.SetCSSDataURLBased)(id, data, this.app.getBaseHref()));
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
@@ -206,7 +206,7 @@ class Observer {
|
|
|
206
206
|
// Disable parent check for the upper context HTMLHtmlElement, because it is root there... (before)
|
|
207
207
|
// TODO: get rid of "special" cases (there is an issue with CreateDocument altered behaviour though)
|
|
208
208
|
// TODO: Clean the logic (though now it workd fine)
|
|
209
|
-
if (!(0, guards_js_1.hasTag)(node, '
|
|
209
|
+
if (!(0, guards_js_1.hasTag)(node, 'html') || !this.isTopContext) {
|
|
210
210
|
if (parent === null) {
|
|
211
211
|
// Sometimes one observation contains attribute mutations for the removimg node, which gets ignored here.
|
|
212
212
|
// That shouldn't affect the visual rendering ( should it? maybe when transition applied? )
|
|
@@ -314,7 +314,7 @@ class Observer {
|
|
|
314
314
|
});
|
|
315
315
|
this.clear();
|
|
316
316
|
}
|
|
317
|
-
// ISSSUE (nodeToBinde should be the same as node. Look at the comment about 0-node at the beginning of the file.)
|
|
317
|
+
// ISSSUE (nodeToBinde should be the same as node in all cases. Look at the comment about 0-node at the beginning of the file.)
|
|
318
318
|
// TODO: use one observer instance for all iframes/shadowRoots (composition instiad of inheritance)
|
|
319
319
|
observeRoot(node, beforeCommit, nodeToBind = node) {
|
|
320
320
|
this.observer.observe(node, {
|
|
@@ -4,8 +4,8 @@ import App from '../index.js';
|
|
|
4
4
|
export interface Options {
|
|
5
5
|
captureIFrames: boolean;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
type Context = Window & typeof globalThis;
|
|
8
|
+
type ContextCallback = (context: Context) => void;
|
|
9
9
|
export default class TopObserver extends Observer {
|
|
10
10
|
private readonly options;
|
|
11
11
|
private readonly iframeOffsets;
|
|
@@ -22,7 +22,7 @@ class TopObserver extends observer_js_1.default {
|
|
|
22
22
|
}, options);
|
|
23
23
|
// IFrames
|
|
24
24
|
this.app.nodes.attachNodeCallback((node) => {
|
|
25
|
-
if ((0, guards_js_1.hasTag)(node, '
|
|
25
|
+
if ((0, guards_js_1.hasTag)(node, 'iframe') &&
|
|
26
26
|
((this.options.captureIFrames && !(0, utils_js_1.hasOpenreplayAttribute)(node, 'obscured')) ||
|
|
27
27
|
(0, utils_js_1.hasOpenreplayAttribute)(node, 'capture'))) {
|
|
28
28
|
this.handleIframe(node);
|
package/cjs/app/session.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ interface SessionInfo {
|
|
|
6
6
|
timestamp: number;
|
|
7
7
|
projectID?: string;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
export
|
|
9
|
+
type OnUpdateCallback = (i: Partial<SessionInfo>) => void;
|
|
10
|
+
export type Options = {
|
|
11
11
|
session_token_key: string;
|
|
12
12
|
session_pageno_key: string;
|
|
13
13
|
};
|
package/cjs/app/ticker.d.ts
CHANGED