@openreplay/tracker 7.0.3 → 7.0.4
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/app/index.d.ts +1 -0
- package/cjs/app/index.js +4 -2
- package/cjs/common/interaction.d.ts +1 -0
- package/cjs/index.js +1 -1
- package/coverage/clover.xml +1412 -900
- package/coverage/coverage-final.json +22 -16
- package/coverage/lcov-report/index.html +58 -43
- package/coverage/lcov-report/main/app/guards.ts.html +42 -42
- package/coverage/lcov-report/main/app/index.html +46 -46
- package/coverage/lcov-report/main/app/index.ts.html +104 -8
- package/coverage/lcov-report/main/app/logger.ts.html +1 -1
- package/coverage/lcov-report/main/app/messages.gen.ts.html +146 -146
- package/coverage/lcov-report/main/app/observer/iframe_observer.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/iframe_offsets.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/index.html +1 -1
- package/coverage/lcov-report/main/app/observer/shadow_root_observer.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/top_observer.ts.html +1 -1
- package/coverage/lcov-report/main/app/sanitizer.ts.html +98 -98
- package/coverage/lcov-report/main/app/session.ts.html +47 -5
- package/coverage/lcov-report/main/app/ticker.ts.html +1 -1
- package/coverage/lcov-report/main/index.html +24 -24
- package/coverage/lcov-report/main/index.ts.html +138 -6
- package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +949 -0
- package/coverage/lcov-report/main/{vendors/finder → modules/Network}/index.html +72 -12
- package/coverage/lcov-report/main/modules/Network/index.ts.html +169 -0
- package/coverage/lcov-report/main/{app/nodes.ts.html → modules/Network/networkMessage.ts.html} +130 -115
- package/coverage/lcov-report/main/modules/Network/utils.ts.html +700 -0
- package/coverage/lcov-report/main/modules/Network/xhrProxy.ts.html +823 -0
- package/coverage/lcov-report/main/modules/attributeSender.ts.html +217 -0
- package/coverage/lcov-report/main/modules/axiosSpy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/connection.ts.html +1 -1
- package/coverage/lcov-report/main/modules/console.ts.html +174 -147
- package/coverage/lcov-report/main/modules/constructedStyleSheets.ts.html +1 -1
- package/coverage/lcov-report/main/modules/cssrules.ts.html +1 -1
- package/coverage/lcov-report/main/modules/exception.ts.html +1 -1
- package/coverage/lcov-report/main/modules/featureFlags.ts.html +415 -0
- package/coverage/lcov-report/main/modules/focus.ts.html +1 -1
- package/coverage/lcov-report/main/modules/fonts.ts.html +1 -1
- package/coverage/lcov-report/main/modules/img.ts.html +6 -6
- package/coverage/lcov-report/main/modules/index.html +54 -24
- package/coverage/lcov-report/main/modules/input.ts.html +1 -1
- package/coverage/lcov-report/main/modules/mouse.ts.html +1 -1
- package/coverage/lcov-report/main/modules/network.ts.html +70 -70
- package/coverage/lcov-report/main/modules/performance.ts.html +1 -1
- package/coverage/lcov-report/main/modules/scroll.ts.html +1 -1
- package/coverage/lcov-report/main/modules/selection.ts.html +1 -1
- package/coverage/lcov-report/main/modules/tabs.ts.html +1 -1
- package/coverage/lcov-report/main/modules/timing.ts.html +1 -1
- package/coverage/lcov-report/main/modules/viewport.ts.html +1 -1
- package/coverage/lcov-report/main/utils.ts.html +97 -97
- package/coverage/lcov-report/webworker/BatchWriter.ts.html +125 -176
- package/coverage/lcov-report/webworker/MessageEncoder.gen.ts.html +88 -88
- package/coverage/lcov-report/webworker/PrimitiveEncoder.ts.html +110 -110
- package/coverage/lcov-report/webworker/QueueSender.ts.html +140 -110
- package/coverage/lcov-report/webworker/index.html +56 -71
- package/coverage/lcov-report/webworker/index.ts.html +34 -10
- package/coverage/lcov.info +2525 -1553
- package/lib/app/index.d.ts +1 -0
- package/lib/app/index.js +4 -2
- package/lib/common/interaction.d.ts +1 -0
- package/lib/common/tsconfig.tsbuildinfo +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/coverage/lcov-report/main/app/observer/observer.ts.html +0 -1282
- package/coverage/lcov-report/main/vendors/finder/finder.ts.html +0 -1381
- package/coverage/lcov-report/webworker/StringDictionary.ts.html +0 -124
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
134
134
|
Code coverage generated by
|
|
135
135
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
136
|
-
at 2023-
|
|
136
|
+
at 2023-06-28T10:44:28.733Z
|
|
137
137
|
</div>
|
|
138
138
|
<script src="../../../prettify.js"></script>
|
|
139
139
|
<script>
|
|
@@ -274,7 +274,7 @@ type OffsetState = {
|
|
|
274
274
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
275
275
|
Code coverage generated by
|
|
276
276
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
277
|
-
at 2023-
|
|
277
|
+
at 2023-06-28T10:44:28.733Z
|
|
278
278
|
</div>
|
|
279
279
|
<script src="../../../prettify.js"></script>
|
|
280
280
|
<script>
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
147
147
|
Code coverage generated by
|
|
148
148
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
149
|
-
at 2023-
|
|
149
|
+
at 2023-06-28T10:44:28.733Z
|
|
150
150
|
</div>
|
|
151
151
|
<script src="../../../prettify.js"></script>
|
|
152
152
|
<script>
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
128
128
|
Code coverage generated by
|
|
129
129
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
130
|
-
at 2023-
|
|
130
|
+
at 2023-06-28T10:44:28.733Z
|
|
131
131
|
</div>
|
|
132
132
|
<script src="../../../prettify.js"></script>
|
|
133
133
|
<script>
|
|
@@ -520,7 +520,7 @@ const attachShadowNativeFn = <span class="cstat-no" title="statement not covered
|
|
|
520
520
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
521
521
|
Code coverage generated by
|
|
522
522
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
523
|
-
at 2023-
|
|
523
|
+
at 2023-06-28T10:44:28.733Z
|
|
524
524
|
</div>
|
|
525
525
|
<script src="../../../prettify.js"></script>
|
|
526
526
|
<script>
|
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>0/42</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>0/21</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>0/10</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>0/41</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</template>
|
|
63
63
|
</div>
|
|
64
|
-
<div class='status-line
|
|
64
|
+
<div class='status-line low'></div>
|
|
65
65
|
<pre><table class="coverage">
|
|
66
66
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
67
|
<a name='L2'></a><a href='#L2'>2</a>
|
|
@@ -167,13 +167,13 @@
|
|
|
167
167
|
<a name='L102'></a><a href='#L102'>102</a>
|
|
168
168
|
<a name='L103'></a><a href='#L103'>103</a>
|
|
169
169
|
<a name='L104'></a><a href='#L104'>104</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
170
|
-
<span class="cline-any cline-
|
|
171
|
-
<span class="cline-any cline-
|
|
170
|
+
<span class="cline-any cline-no"> </span>
|
|
171
|
+
<span class="cline-any cline-no"> </span>
|
|
172
172
|
<span class="cline-any cline-neutral"> </span>
|
|
173
|
-
<span class="cline-any cline-
|
|
174
|
-
<span class="cline-any cline-
|
|
175
|
-
<span class="cline-any cline-
|
|
176
|
-
<span class="cline-any cline-
|
|
173
|
+
<span class="cline-any cline-no"> </span>
|
|
174
|
+
<span class="cline-any cline-no"> </span>
|
|
175
|
+
<span class="cline-any cline-no"> </span>
|
|
176
|
+
<span class="cline-any cline-no"> </span>
|
|
177
177
|
<span class="cline-any cline-neutral"> </span>
|
|
178
178
|
<span class="cline-any cline-neutral"> </span>
|
|
179
179
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -182,18 +182,18 @@
|
|
|
182
182
|
<span class="cline-any cline-neutral"> </span>
|
|
183
183
|
<span class="cline-any cline-neutral"> </span>
|
|
184
184
|
<span class="cline-any cline-neutral"> </span>
|
|
185
|
-
<span class="cline-any cline-
|
|
186
|
-
<span class="cline-any cline-
|
|
185
|
+
<span class="cline-any cline-no"> </span>
|
|
186
|
+
<span class="cline-any cline-no"> </span>
|
|
187
187
|
<span class="cline-any cline-neutral"> </span>
|
|
188
188
|
<span class="cline-any cline-neutral"> </span>
|
|
189
189
|
<span class="cline-any cline-neutral"> </span>
|
|
190
|
-
<span class="cline-any cline-
|
|
191
|
-
<span class="cline-any cline-
|
|
192
|
-
<span class="cline-any cline-
|
|
190
|
+
<span class="cline-any cline-no"> </span>
|
|
191
|
+
<span class="cline-any cline-no"> </span>
|
|
192
|
+
<span class="cline-any cline-no"> </span>
|
|
193
193
|
<span class="cline-any cline-neutral"> </span>
|
|
194
194
|
<span class="cline-any cline-neutral"> </span>
|
|
195
|
-
<span class="cline-any cline-
|
|
196
|
-
<span class="cline-any cline-
|
|
195
|
+
<span class="cline-any cline-no"> </span>
|
|
196
|
+
<span class="cline-any cline-no"> </span>
|
|
197
197
|
<span class="cline-any cline-neutral"> </span>
|
|
198
198
|
<span class="cline-any cline-neutral"> </span>
|
|
199
199
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -203,80 +203,80 @@
|
|
|
203
203
|
<span class="cline-any cline-neutral"> </span>
|
|
204
204
|
<span class="cline-any cline-neutral"> </span>
|
|
205
205
|
<span class="cline-any cline-neutral"> </span>
|
|
206
|
-
<span class="cline-any cline-
|
|
206
|
+
<span class="cline-any cline-no"> </span>
|
|
207
207
|
<span class="cline-any cline-neutral"> </span>
|
|
208
208
|
<span class="cline-any cline-neutral"> </span>
|
|
209
209
|
<span class="cline-any cline-neutral"> </span>
|
|
210
210
|
<span class="cline-any cline-neutral"> </span>
|
|
211
|
-
<span class="cline-any cline-
|
|
211
|
+
<span class="cline-any cline-no"> </span>
|
|
212
212
|
<span class="cline-any cline-neutral"> </span>
|
|
213
|
-
<span class="cline-any cline-
|
|
213
|
+
<span class="cline-any cline-no"> </span>
|
|
214
214
|
<span class="cline-any cline-neutral"> </span>
|
|
215
215
|
<span class="cline-any cline-neutral"> </span>
|
|
216
216
|
<span class="cline-any cline-neutral"> </span>
|
|
217
217
|
<span class="cline-any cline-neutral"> </span>
|
|
218
|
-
<span class="cline-any cline-
|
|
218
|
+
<span class="cline-any cline-no"> </span>
|
|
219
219
|
<span class="cline-any cline-neutral"> </span>
|
|
220
220
|
<span class="cline-any cline-neutral"> </span>
|
|
221
|
-
<span class="cline-any cline-
|
|
222
|
-
<span class="cline-any cline-
|
|
223
|
-
<span class="cline-any cline-
|
|
224
|
-
<span class="cline-any cline-
|
|
221
|
+
<span class="cline-any cline-no"> </span>
|
|
222
|
+
<span class="cline-any cline-no"> </span>
|
|
223
|
+
<span class="cline-any cline-no"> </span>
|
|
224
|
+
<span class="cline-any cline-no"> </span>
|
|
225
225
|
<span class="cline-any cline-neutral"> </span>
|
|
226
|
-
<span class="cline-any cline-
|
|
227
|
-
<span class="cline-any cline-
|
|
226
|
+
<span class="cline-any cline-no"> </span>
|
|
227
|
+
<span class="cline-any cline-no"> </span>
|
|
228
228
|
<span class="cline-any cline-neutral"> </span>
|
|
229
229
|
<span class="cline-any cline-neutral"> </span>
|
|
230
230
|
<span class="cline-any cline-neutral"> </span>
|
|
231
231
|
<span class="cline-any cline-neutral"> </span>
|
|
232
232
|
<span class="cline-any cline-neutral"> </span>
|
|
233
|
-
<span class="cline-any cline-
|
|
233
|
+
<span class="cline-any cline-no"> </span>
|
|
234
234
|
<span class="cline-any cline-neutral"> </span>
|
|
235
|
-
<span class="cline-any cline-
|
|
235
|
+
<span class="cline-any cline-no"> </span>
|
|
236
236
|
<span class="cline-any cline-neutral"> </span>
|
|
237
237
|
<span class="cline-any cline-neutral"> </span>
|
|
238
|
-
<span class="cline-any cline-
|
|
239
|
-
<span class="cline-any cline-
|
|
238
|
+
<span class="cline-any cline-no"> </span>
|
|
239
|
+
<span class="cline-any cline-no"> </span>
|
|
240
240
|
<span class="cline-any cline-neutral"> </span>
|
|
241
|
-
<span class="cline-any cline-
|
|
242
|
-
<span class="cline-any cline-
|
|
243
|
-
<span class="cline-any cline-
|
|
244
|
-
<span class="cline-any cline-
|
|
245
|
-
<span class="cline-any cline-
|
|
241
|
+
<span class="cline-any cline-no"> </span>
|
|
242
|
+
<span class="cline-any cline-no"> </span>
|
|
243
|
+
<span class="cline-any cline-no"> </span>
|
|
244
|
+
<span class="cline-any cline-no"> </span>
|
|
245
|
+
<span class="cline-any cline-no"> </span>
|
|
246
246
|
<span class="cline-any cline-neutral"> </span>
|
|
247
247
|
<span class="cline-any cline-neutral"> </span>
|
|
248
|
-
<span class="cline-any cline-
|
|
248
|
+
<span class="cline-any cline-no"> </span>
|
|
249
249
|
<span class="cline-any cline-neutral"> </span>
|
|
250
250
|
<span class="cline-any cline-neutral"> </span>
|
|
251
251
|
<span class="cline-any cline-neutral"> </span>
|
|
252
|
-
<span class="cline-any cline-
|
|
252
|
+
<span class="cline-any cline-no"> </span>
|
|
253
253
|
<span class="cline-any cline-neutral"> </span>
|
|
254
254
|
<span class="cline-any cline-neutral"> </span>
|
|
255
255
|
<span class="cline-any cline-neutral"> </span>
|
|
256
|
-
<span class="cline-any cline-
|
|
256
|
+
<span class="cline-any cline-no"> </span>
|
|
257
257
|
<span class="cline-any cline-neutral"> </span>
|
|
258
258
|
<span class="cline-any cline-neutral"> </span>
|
|
259
259
|
<span class="cline-any cline-neutral"> </span>
|
|
260
|
-
<span class="cline-any cline-
|
|
261
|
-
<span class="cline-any cline-
|
|
262
|
-
<span class="cline-any cline-
|
|
260
|
+
<span class="cline-any cline-no"> </span>
|
|
261
|
+
<span class="cline-any cline-no"> </span>
|
|
262
|
+
<span class="cline-any cline-no"> </span>
|
|
263
263
|
<span class="cline-any cline-neutral"> </span>
|
|
264
|
-
<span class="cline-any cline-
|
|
264
|
+
<span class="cline-any cline-no"> </span>
|
|
265
265
|
<span class="cline-any cline-neutral"> </span>
|
|
266
266
|
<span class="cline-any cline-neutral"> </span>
|
|
267
267
|
<span class="cline-any cline-neutral"> </span>
|
|
268
|
-
<span class="cline-any cline-
|
|
269
|
-
<span class="cline-any cline-
|
|
268
|
+
<span class="cline-any cline-no"> </span>
|
|
269
|
+
<span class="cline-any cline-no"> </span>
|
|
270
270
|
<span class="cline-any cline-neutral"> </span>
|
|
271
271
|
<span class="cline-any cline-neutral"> </span>
|
|
272
272
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import type App from './index.js'
|
|
273
|
-
import { stars, hasOpenreplayAttribute } from '../utils.js'
|
|
274
|
-
import { isElementNode } from './guards.js'
|
|
273
|
+
<span class="cstat-no" title="statement not covered" >import { stars, hasOpenreplayAttribute } from '../utils.js'</span>
|
|
274
|
+
<span class="cstat-no" title="statement not covered" >import { isElementNode } from './guards.js'</span>
|
|
275
275
|
|
|
276
|
-
export enum
|
|
277
|
-
Plain
|
|
278
|
-
Obscured
|
|
279
|
-
Hidden
|
|
276
|
+
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >export enum S</span>anitizeLevel {</span>
|
|
277
|
+
<span class="cstat-no" title="statement not covered" > Plain,</span>
|
|
278
|
+
<span class="cstat-no" title="statement not covered" > Obscured,</span>
|
|
279
|
+
<span class="cstat-no" title="statement not covered" > Hidden,</span>
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
export interface Options {
|
|
@@ -285,18 +285,18 @@ export interface Options {
|
|
|
285
285
|
domSanitizer?: (node: Element) => SanitizeLevel
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
export const stringWiper = (
|
|
289
|
-
input
|
|
288
|
+
export const <span class="cstat-no" title="statement not covered" >stringWiper = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(</span>i</span>nput: string) =></span>
|
|
289
|
+
<span class="cstat-no" title="statement not covered" > input</span>
|
|
290
290
|
.trim()
|
|
291
291
|
.replace(/[^\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]/g, '█')
|
|
292
292
|
|
|
293
|
-
export default class
|
|
294
|
-
private readonly obscured: Set<number> = new Set()
|
|
295
|
-
private readonly hidden: Set<number> = new Set()
|
|
293
|
+
<span class="cstat-no" title="statement not covered" >export default class S</span>anitizer {
|
|
294
|
+
private readonly <span class="cstat-no" title="statement not covered" >obscured: Set<number> = new Set()</span>
|
|
295
|
+
private readonly <span class="cstat-no" title="statement not covered" >hidden: Set<number> = new Set()</span>
|
|
296
296
|
private readonly options: Options
|
|
297
297
|
|
|
298
|
-
constructor(private readonly
|
|
299
|
-
this.options = Object.assign(
|
|
298
|
+
<span class="fstat-no" title="function not covered" > constructor(private readonly <span class="cstat-no" title="statement not covered" >a</span>pp: App,</span> options: Partial<Options>) {
|
|
299
|
+
<span class="cstat-no" title="statement not covered" > this.options = Object.assign(</span>
|
|
300
300
|
{
|
|
301
301
|
obscureTextEmails: true,
|
|
302
302
|
obscureTextNumbers: false,
|
|
@@ -305,71 +305,71 @@ export default class Sanitizer {
|
|
|
305
305
|
)
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
handleNode(id: number, parentID: number, node: Node) {
|
|
309
|
-
if (
|
|
308
|
+
<span class="fstat-no" title="function not covered" > handleNode(</span>id: number, parentID: number, node: Node) {
|
|
309
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (</span>
|
|
310
310
|
this.obscured.has(parentID) ||
|
|
311
311
|
(isElementNode(node) &&
|
|
312
312
|
(hasOpenreplayAttribute(node, 'masked') || hasOpenreplayAttribute(node, 'obscured')))
|
|
313
313
|
) {
|
|
314
|
-
this.obscured.add(id)
|
|
314
|
+
<span class="cstat-no" title="statement not covered" > this.obscured.add(id)</span>
|
|
315
315
|
}
|
|
316
|
-
if (
|
|
316
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (</span>
|
|
317
317
|
this.hidden.has(parentID) ||
|
|
318
318
|
(isElementNode(node) &&
|
|
319
319
|
(hasOpenreplayAttribute(node, 'htmlmasked') || hasOpenreplayAttribute(node, 'hidden')))
|
|
320
320
|
) {
|
|
321
|
-
this.hidden.add(id)
|
|
321
|
+
<span class="cstat-no" title="statement not covered" > this.hidden.add(id)</span>
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
if (this.options.domSanitizer !== undefined && isElementNode(node)) {
|
|
325
|
-
const sanitizeLevel = this.options.domSanitizer(node)
|
|
326
|
-
if (sanitizeLevel === SanitizeLevel.Obscured) {
|
|
327
|
-
this.obscured.add(id)
|
|
324
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (this.options.domSanitizer !== undefined && isElementNode(node)) {</span>
|
|
325
|
+
const sanitizeLevel = <span class="cstat-no" title="statement not covered" >this.options.domSanitizer(node)</span>
|
|
326
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (sanitizeLevel === SanitizeLevel.Obscured) {</span>
|
|
327
|
+
<span class="cstat-no" title="statement not covered" > this.obscured.add(id)</span>
|
|
328
328
|
}
|
|
329
|
-
if (sanitizeLevel === SanitizeLevel.Hidden) {
|
|
330
|
-
this.hidden.add(id)
|
|
329
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (sanitizeLevel === SanitizeLevel.Hidden) {</span>
|
|
330
|
+
<span class="cstat-no" title="statement not covered" > this.hidden.add(id)</span>
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
sanitize(id: number, data: string): string {
|
|
336
|
-
if (this.obscured.has(id)) {
|
|
335
|
+
<span class="fstat-no" title="function not covered" > sanitize(</span>id: number, data: string): string {
|
|
336
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (this.obscured.has(id)) {</span>
|
|
337
337
|
// TODO: is it the best place to put trim() ? Might trimmed spaces be considered in layout in certain cases?
|
|
338
|
-
return stringWiper(data)
|
|
338
|
+
<span class="cstat-no" title="statement not covered" > return stringWiper(data)</span>
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
if (this.options.obscureTextNumbers) {
|
|
342
|
-
data = data.replace(/\d/g, '0')
|
|
341
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (this.options.obscureTextNumbers) {</span>
|
|
342
|
+
<span class="cstat-no" title="statement not covered" > data = data.replace(/\d/g, '0')</span>
|
|
343
343
|
}
|
|
344
|
-
if (this.options.obscureTextEmails) {
|
|
345
|
-
data = data.replace(/^\w+([.-]\w+)*@\w+([.-]\w+)*\.\w{2,3}$/g, (
|
|
346
|
-
const [name, domain] = email.split('@')
|
|
347
|
-
const [domainName, host] = domain.split('.')
|
|
348
|
-
return `${stars(name)}@${stars(domainName)}.${stars(host)}
|
|
344
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (this.options.obscureTextEmails) {</span>
|
|
345
|
+
<span class="cstat-no" title="statement not covered" > data = data.replace(/^\w+([.-]\w+)*@\w+([.-]\w+)*\.\w{2,3}$/g, <span class="fstat-no" title="function not covered" >(e</span>mail) => {</span>
|
|
346
|
+
const [name, domain] = <span class="cstat-no" title="statement not covered" >email.split('@')</span>
|
|
347
|
+
const [domainName, host] = <span class="cstat-no" title="statement not covered" >domain.split('.')</span>
|
|
348
|
+
<span class="cstat-no" title="statement not covered" > return `${stars(name)}@${stars(domainName)}.${stars(host)}`</span>
|
|
349
349
|
})
|
|
350
350
|
}
|
|
351
|
-
return data
|
|
351
|
+
<span class="cstat-no" title="statement not covered" > return data</span>
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
-
isObscured(id: number): boolean {
|
|
355
|
-
return this.obscured.has(id)
|
|
354
|
+
<span class="fstat-no" title="function not covered" > isObscured(</span>id: number): boolean {
|
|
355
|
+
<span class="cstat-no" title="statement not covered" > return this.obscured.has(id)</span>
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
-
isHidden(id: number) {
|
|
359
|
-
return this.hidden.has(id)
|
|
358
|
+
<span class="fstat-no" title="function not covered" > isHidden(</span>id: number) {
|
|
359
|
+
<span class="cstat-no" title="statement not covered" > return this.hidden.has(id)</span>
|
|
360
360
|
}
|
|
361
361
|
|
|
362
|
-
getInnerTextSecure(el: HTMLElement): string {
|
|
363
|
-
const id = this.app.nodes.getID(el)
|
|
364
|
-
if (!id) {
|
|
365
|
-
return ''
|
|
362
|
+
<span class="fstat-no" title="function not covered" > getInnerTextSecure(</span>el: HTMLElement): string {
|
|
363
|
+
const id = <span class="cstat-no" title="statement not covered" >this.app.nodes.getID(el)</span>
|
|
364
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (!id) {</span>
|
|
365
|
+
<span class="cstat-no" title="statement not covered" > return ''</span>
|
|
366
366
|
}
|
|
367
|
-
return this.sanitize(id, el.innerText)
|
|
367
|
+
<span class="cstat-no" title="statement not covered" > return this.sanitize(id, el.innerText)</span>
|
|
368
368
|
}
|
|
369
369
|
|
|
370
|
-
clear(): void {
|
|
371
|
-
this.obscured.clear()
|
|
372
|
-
this.hidden.clear()
|
|
370
|
+
<span class="fstat-no" title="function not covered" > clear(</span>): void {
|
|
371
|
+
<span class="cstat-no" title="statement not covered" > this.obscured.clear()</span>
|
|
372
|
+
<span class="cstat-no" title="statement not covered" > this.hidden.clear()</span>
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
</pre></td></tr></table></pre>
|
|
@@ -379,7 +379,7 @@ export default class Sanitizer {
|
|
|
379
379
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
380
380
|
Code coverage generated by
|
|
381
381
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
382
|
-
at 2023-
|
|
382
|
+
at 2023-06-28T10:44:28.733Z
|
|
383
383
|
</div>
|
|
384
384
|
<script src="../../prettify.js"></script>
|
|
385
385
|
<script>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/74</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/
|
|
42
|
+
<span class='fraction'>0/19</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/70</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -221,7 +221,21 @@
|
|
|
221
221
|
<a name='L156'></a><a href='#L156'>156</a>
|
|
222
222
|
<a name='L157'></a><a href='#L157'>157</a>
|
|
223
223
|
<a name='L158'></a><a href='#L158'>158</a>
|
|
224
|
-
<a name='L159'></a><a href='#L159'>159</a
|
|
224
|
+
<a name='L159'></a><a href='#L159'>159</a>
|
|
225
|
+
<a name='L160'></a><a href='#L160'>160</a>
|
|
226
|
+
<a name='L161'></a><a href='#L161'>161</a>
|
|
227
|
+
<a name='L162'></a><a href='#L162'>162</a>
|
|
228
|
+
<a name='L163'></a><a href='#L163'>163</a>
|
|
229
|
+
<a name='L164'></a><a href='#L164'>164</a>
|
|
230
|
+
<a name='L165'></a><a href='#L165'>165</a>
|
|
231
|
+
<a name='L166'></a><a href='#L166'>166</a>
|
|
232
|
+
<a name='L167'></a><a href='#L167'>167</a>
|
|
233
|
+
<a name='L168'></a><a href='#L168'>168</a>
|
|
234
|
+
<a name='L169'></a><a href='#L169'>169</a>
|
|
235
|
+
<a name='L170'></a><a href='#L170'>170</a>
|
|
236
|
+
<a name='L171'></a><a href='#L171'>171</a>
|
|
237
|
+
<a name='L172'></a><a href='#L172'>172</a>
|
|
238
|
+
<a name='L173'></a><a href='#L173'>173</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
225
239
|
<span class="cline-any cline-no"> </span>
|
|
226
240
|
<span class="cline-any cline-neutral"> </span>
|
|
227
241
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -239,6 +253,15 @@
|
|
|
239
253
|
<span class="cline-any cline-neutral"> </span>
|
|
240
254
|
<span class="cline-any cline-neutral"> </span>
|
|
241
255
|
<span class="cline-any cline-neutral"> </span>
|
|
256
|
+
<span class="cline-any cline-neutral"> </span>
|
|
257
|
+
<span class="cline-any cline-neutral"> </span>
|
|
258
|
+
<span class="cline-any cline-neutral"> </span>
|
|
259
|
+
<span class="cline-any cline-neutral"> </span>
|
|
260
|
+
<span class="cline-any cline-neutral"> </span>
|
|
261
|
+
<span class="cline-any cline-neutral"> </span>
|
|
262
|
+
<span class="cline-any cline-neutral"> </span>
|
|
263
|
+
<span class="cline-any cline-neutral"> </span>
|
|
264
|
+
<span class="cline-any cline-neutral"> </span>
|
|
242
265
|
<span class="cline-any cline-no"> </span>
|
|
243
266
|
<span class="cline-any cline-no"> </span>
|
|
244
267
|
<span class="cline-any cline-no"> </span>
|
|
@@ -248,6 +271,7 @@
|
|
|
248
271
|
<span class="cline-any cline-neutral"> </span>
|
|
249
272
|
<span class="cline-any cline-neutral"> </span>
|
|
250
273
|
<span class="cline-any cline-neutral"> </span>
|
|
274
|
+
<span class="cline-any cline-neutral"> </span>
|
|
251
275
|
<span class="cline-any cline-no"> </span>
|
|
252
276
|
<span class="cline-any cline-no"> </span>
|
|
253
277
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -297,6 +321,10 @@
|
|
|
297
321
|
<span class="cline-any cline-neutral"> </span>
|
|
298
322
|
<span class="cline-any cline-neutral"> </span>
|
|
299
323
|
<span class="cline-any cline-no"> </span>
|
|
324
|
+
<span class="cline-any cline-neutral"> </span>
|
|
325
|
+
<span class="cline-any cline-neutral"> </span>
|
|
326
|
+
<span class="cline-any cline-neutral"> </span>
|
|
327
|
+
<span class="cline-any cline-no"> </span>
|
|
300
328
|
<span class="cline-any cline-no"> </span>
|
|
301
329
|
<span class="cline-any cline-no"> </span>
|
|
302
330
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -382,6 +410,15 @@
|
|
|
382
410
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import type App from './index.js'
|
|
383
411
|
<span class="cstat-no" title="statement not covered" >import { generateRandomId } from '../utils.js'</span>
|
|
384
412
|
|
|
413
|
+
interface UserInfo {
|
|
414
|
+
userBrowser: string
|
|
415
|
+
userCity: string
|
|
416
|
+
userCountry: string
|
|
417
|
+
userDevice: string
|
|
418
|
+
userOS: string
|
|
419
|
+
userState: string
|
|
420
|
+
}
|
|
421
|
+
|
|
385
422
|
interface SessionInfo {
|
|
386
423
|
sessionID: string | undefined
|
|
387
424
|
metadata: Record<string, string>
|
|
@@ -405,6 +442,7 @@ export type Options = {
|
|
|
405
442
|
private <span class="cstat-no" title="statement not covered" >timestamp = 0</span>
|
|
406
443
|
private projectID: string | undefined
|
|
407
444
|
private tabId: string
|
|
445
|
+
public userInfo: UserInfo
|
|
408
446
|
|
|
409
447
|
<span class="fstat-no" title="function not covered" > constructor(private readonly <span class="cstat-no" title="statement not covered" >a</span>pp: App,</span> private readonly <span class="cstat-no" title="statement not covered" >options: Options)</span> {
|
|
410
448
|
<span class="cstat-no" title="statement not covered" > this.createTabId()</span>
|
|
@@ -452,6 +490,10 @@ export type Options = {
|
|
|
452
490
|
<span class="cstat-no" title="statement not covered" > this.userID = userID</span>
|
|
453
491
|
<span class="cstat-no" title="statement not covered" > this.handleUpdate({ userID })</span>
|
|
454
492
|
}
|
|
493
|
+
|
|
494
|
+
<span class="fstat-no" title="function not covered" > setUserInfo(</span>userInfo: UserInfo) {
|
|
495
|
+
<span class="cstat-no" title="statement not covered" > this.userInfo = userInfo</span>
|
|
496
|
+
}
|
|
455
497
|
|
|
456
498
|
private <span class="fstat-no" title="function not covered" >getPageNumber(</span>): number | undefined {
|
|
457
499
|
const pageNoStr = <span class="cstat-no" title="statement not covered" >this.app.sessionStorage.getItem(this.options.session_pageno_key)</span>
|
|
@@ -544,7 +586,7 @@ export type Options = {
|
|
|
544
586
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
545
587
|
Code coverage generated by
|
|
546
588
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
547
|
-
at 2023-
|
|
589
|
+
at 2023-06-28T10:44:28.733Z
|
|
548
590
|
</div>
|
|
549
591
|
<script src="../../prettify.js"></script>
|
|
550
592
|
<script>
|
|
@@ -235,7 +235,7 @@ function <span class="fstat-no" title="function not covered" >wrap(</span>callba
|
|
|
235
235
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
236
236
|
Code coverage generated by
|
|
237
237
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
238
|
-
at 2023-
|
|
238
|
+
at 2023-06-28T10:44:28.733Z
|
|
239
239
|
</div>
|
|
240
240
|
<script src="../../prettify.js"></script>
|
|
241
241
|
<script>
|