@openreplay/tracker 7.0.3 → 8.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/CHANGELOG.md +4 -0
- package/cjs/app/index.d.ts +10 -0
- package/cjs/app/index.js +56 -5
- package/cjs/app/messages.gen.d.ts +2 -0
- package/cjs/app/messages.gen.js +15 -1
- package/cjs/app/observer/observer.js +2 -2
- package/cjs/app/sanitizer.d.ts +1 -0
- package/cjs/app/sanitizer.js +6 -4
- package/cjs/app/session.d.ts +4 -0
- package/cjs/app/session.js +18 -0
- package/cjs/common/interaction.d.ts +1 -0
- package/cjs/common/messages.gen.d.ts +12 -2
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +9 -1
- package/cjs/modules/attributeSender.d.ts +14 -0
- package/cjs/modules/attributeSender.js +44 -0
- package/cjs/modules/img.js +4 -4
- package/cjs/modules/tabs.d.ts +2 -0
- package/cjs/modules/tabs.js +13 -0
- package/cjs/utils.d.ts +1 -1
- package/cjs/utils.js +13 -11
- package/coverage/clover.xml +683 -620
- package/coverage/coverage-final.json +13 -12
- package/coverage/lcov-report/index.html +47 -47
- package/coverage/lcov-report/main/app/guards.ts.html +42 -42
- package/coverage/lcov-report/main/app/index.html +34 -34
- package/coverage/lcov-report/main/app/index.ts.html +62 -8
- package/coverage/lcov-report/main/app/logger.ts.html +1 -1
- package/coverage/lcov-report/main/app/messages.gen.ts.html +1 -1
- 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 +1 -1
- 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 +126 -6
- 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 +1 -1
- 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/{app/nodes.ts.html → modules/featureFlags.ts.html} +124 -127
- 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 +38 -8
- 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 +1 -1
- 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 +112 -112
- 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 +1232 -1092
- package/lib/app/index.d.ts +10 -0
- package/lib/app/index.js +57 -6
- package/lib/app/messages.gen.d.ts +2 -0
- package/lib/app/messages.gen.js +12 -0
- package/lib/app/observer/observer.js +3 -3
- package/lib/app/sanitizer.d.ts +1 -0
- package/lib/app/sanitizer.js +4 -3
- package/lib/app/session.d.ts +4 -0
- package/lib/app/session.js +18 -0
- package/lib/common/interaction.d.ts +1 -0
- package/lib/common/messages.gen.d.ts +12 -2
- package/lib/common/tsconfig.tsbuildinfo +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +9 -1
- package/lib/modules/attributeSender.d.ts +14 -0
- package/lib/modules/attributeSender.js +39 -0
- package/lib/modules/img.js +5 -5
- package/lib/modules/tabs.d.ts +2 -0
- package/lib/modules/tabs.js +10 -0
- package/lib/utils.d.ts +1 -1
- package/lib/utils.js +11 -9
- package/package.json +5 -2
- 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/main/vendors/finder/index.html +0 -116
- package/coverage/lcov-report/webworker/StringDictionary.ts.html +0 -124
|
@@ -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-15T15:49:15.198Z
|
|
383
383
|
</div>
|
|
384
384
|
<script src="../../prettify.js"></script>
|
|
385
385
|
<script>
|
|
@@ -544,7 +544,7 @@ export type Options = {
|
|
|
544
544
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
545
545
|
Code coverage generated by
|
|
546
546
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
547
|
-
at 2023-
|
|
547
|
+
at 2023-06-15T15:49:15.198Z
|
|
548
548
|
</div>
|
|
549
549
|
<script src="../../prettify.js"></script>
|
|
550
550
|
<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-15T15:49:15.198Z
|
|
239
239
|
</div>
|
|
240
240
|
<script src="../../prettify.js"></script>
|
|
241
241
|
<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/214</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/97</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/45</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/212</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -84,28 +84,28 @@
|
|
|
84
84
|
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
85
85
|
</td>
|
|
86
86
|
<td data-value="0" class="pct low">0%</td>
|
|
87
|
-
<td data-value="
|
|
87
|
+
<td data-value="163" class="abs low">0/163</td>
|
|
88
88
|
<td data-value="0" class="pct low">0%</td>
|
|
89
|
-
<td data-value="
|
|
89
|
+
<td data-value="73" class="abs low">0/73</td>
|
|
90
90
|
<td data-value="0" class="pct low">0%</td>
|
|
91
|
-
<td data-value="
|
|
91
|
+
<td data-value="31" class="abs low">0/31</td>
|
|
92
92
|
<td data-value="0" class="pct low">0%</td>
|
|
93
|
-
<td data-value="
|
|
93
|
+
<td data-value="161" class="abs low">0/161</td>
|
|
94
94
|
</tr>
|
|
95
95
|
|
|
96
96
|
<tr>
|
|
97
|
-
<td class="file
|
|
98
|
-
<td data-value="
|
|
99
|
-
<div class="chart"><div class="cover-fill" style="width:
|
|
97
|
+
<td class="file low" data-value="utils.ts"><a href="utils.ts.html">utils.ts</a></td>
|
|
98
|
+
<td data-value="0" class="pic low">
|
|
99
|
+
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
100
100
|
</td>
|
|
101
|
-
<td data-value="
|
|
102
|
-
<td data-value="51" class="abs
|
|
103
|
-
<td data-value="
|
|
104
|
-
<td data-value="24" class="abs
|
|
105
|
-
<td data-value="
|
|
106
|
-
<td data-value="14" class="abs
|
|
107
|
-
<td data-value="
|
|
108
|
-
<td data-value="51" class="abs
|
|
101
|
+
<td data-value="0" class="pct low">0%</td>
|
|
102
|
+
<td data-value="51" class="abs low">0/51</td>
|
|
103
|
+
<td data-value="0" class="pct low">0%</td>
|
|
104
|
+
<td data-value="24" class="abs low">0/24</td>
|
|
105
|
+
<td data-value="0" class="pct low">0%</td>
|
|
106
|
+
<td data-value="14" class="abs low">0/14</td>
|
|
107
|
+
<td data-value="0" class="pct low">0%</td>
|
|
108
|
+
<td data-value="51" class="abs low">0/51</td>
|
|
109
109
|
</tr>
|
|
110
110
|
|
|
111
111
|
</tbody>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at 2023-
|
|
119
|
+
at 2023-06-15T15:49:15.198Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../prettify.js"></script>
|
|
122
122
|
<script>
|