@whotracksme/reporting 7.3.0 β 7.4.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 +16 -0
- package/package.json +3 -2
- package/reporting/example/index.js +2 -2
- package/reporting/snapshots/0001/snapshot.json +14 -14
- package/reporting/snapshots/0002/snapshot.json +14 -14
- package/reporting/snapshots/0003/snapshot.json +6 -6
- package/reporting/snapshots/0004/snapshot.json +6 -6
- package/reporting/snapshots/0005/snapshot.json +14 -14
- package/reporting/snapshots/0006/snapshot.json +16 -16
- package/reporting/src/alive-message-generator.js +29 -32
- package/reporting/src/reporting.js +1 -8
- package/reporting/src/request/index.js +28 -4
- package/reporting/test/alive-message-generator.spec.js +12 -20
- package/reporting/test/reporting.spec.js +0 -1
- package/reporting/test/request/index.spec.js +0 -1
- package/reporting/test/request/index.test.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# v7.4.0 (Tue Jul 01 2025)
|
|
2
|
+
|
|
3
|
+
#### π Enhancement
|
|
4
|
+
|
|
5
|
+
- Remove browserInfoProvider dependency [#162](https://github.com/whotracksme/webextension-packages/pull/162) ([@philipp-classen](https://github.com/philipp-classen))
|
|
6
|
+
|
|
7
|
+
#### π Internal
|
|
8
|
+
|
|
9
|
+
- Uses the staging patterns for the example extension [#161](https://github.com/whotracksme/webextension-packages/pull/161) ([@philipp-classen](https://github.com/philipp-classen))
|
|
10
|
+
|
|
11
|
+
#### Authors: 1
|
|
12
|
+
|
|
13
|
+
- Philipp ClaΓen ([@philipp-classen](https://github.com/philipp-classen))
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
1
17
|
# v7.3.0 (Wed May 21 2025)
|
|
2
18
|
|
|
3
19
|
#### π Enhancement
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whotracksme/reporting",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"scripts": {
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"idb": "^7.1.1",
|
|
47
47
|
"linkedom": "^0.18.10",
|
|
48
48
|
"pako": "^2.1.0",
|
|
49
|
-
"tldts-experimental": "^6.0.11"
|
|
49
|
+
"tldts-experimental": "^6.0.11",
|
|
50
|
+
"bowser": "^2.11.0"
|
|
50
51
|
}
|
|
51
52
|
}
|
|
@@ -73,7 +73,8 @@ const communication = {
|
|
|
73
73
|
const config = {
|
|
74
74
|
url: {
|
|
75
75
|
ALLOWED_COUNTRY_CODES: ['de'],
|
|
76
|
-
PATTERNS_URL:
|
|
76
|
+
PATTERNS_URL:
|
|
77
|
+
'https://cdn2.ghostery.com/staging-patterns/wtm-chrome-desktop/patterns.json',
|
|
77
78
|
CONFIG_URL: 'https://api.ghostery.net/api/v1/config',
|
|
78
79
|
},
|
|
79
80
|
request: {
|
|
@@ -88,7 +89,6 @@ const urlReporter = new UrlReporter({
|
|
|
88
89
|
storage: createStorage(),
|
|
89
90
|
connectDatabase: createStorage,
|
|
90
91
|
communication,
|
|
91
|
-
browserInfoProvider: async () => ({ browser: 'test' }),
|
|
92
92
|
});
|
|
93
93
|
|
|
94
94
|
const requestReporter = new RequestReporter(config.request, {
|
|
@@ -1619,7 +1619,7 @@
|
|
|
1619
1619
|
},
|
|
1620
1620
|
"ts": "",
|
|
1621
1621
|
"type": "wtm.request",
|
|
1622
|
-
"userAgent": "
|
|
1622
|
+
"userAgent": ""
|
|
1623
1623
|
},
|
|
1624
1624
|
{
|
|
1625
1625
|
"action": "wtm.attrack.tp_events",
|
|
@@ -3251,7 +3251,7 @@
|
|
|
3251
3251
|
},
|
|
3252
3252
|
"ts": "",
|
|
3253
3253
|
"type": "wtm.request",
|
|
3254
|
-
"userAgent": "
|
|
3254
|
+
"userAgent": ""
|
|
3255
3255
|
},
|
|
3256
3256
|
{
|
|
3257
3257
|
"action": "wtm.attrack.tokensv2",
|
|
@@ -3272,7 +3272,7 @@
|
|
|
3272
3272
|
},
|
|
3273
3273
|
"ts": "",
|
|
3274
3274
|
"type": "wtm.request",
|
|
3275
|
-
"userAgent": "
|
|
3275
|
+
"userAgent": ""
|
|
3276
3276
|
},
|
|
3277
3277
|
{
|
|
3278
3278
|
"action": "wtm.attrack.keysv2",
|
|
@@ -3462,7 +3462,7 @@
|
|
|
3462
3462
|
},
|
|
3463
3463
|
"ts": "",
|
|
3464
3464
|
"type": "wtm.request",
|
|
3465
|
-
"userAgent": "
|
|
3465
|
+
"userAgent": ""
|
|
3466
3466
|
},
|
|
3467
3467
|
{
|
|
3468
3468
|
"action": "wtm.attrack.keysv2",
|
|
@@ -3652,7 +3652,7 @@
|
|
|
3652
3652
|
},
|
|
3653
3653
|
"ts": "",
|
|
3654
3654
|
"type": "wtm.request",
|
|
3655
|
-
"userAgent": "
|
|
3655
|
+
"userAgent": ""
|
|
3656
3656
|
},
|
|
3657
3657
|
{
|
|
3658
3658
|
"action": "wtm.attrack.keysv2",
|
|
@@ -3678,7 +3678,7 @@
|
|
|
3678
3678
|
},
|
|
3679
3679
|
"ts": "",
|
|
3680
3680
|
"type": "wtm.request",
|
|
3681
|
-
"userAgent": "
|
|
3681
|
+
"userAgent": ""
|
|
3682
3682
|
},
|
|
3683
3683
|
{
|
|
3684
3684
|
"action": "wtm.attrack.keysv2",
|
|
@@ -3704,7 +3704,7 @@
|
|
|
3704
3704
|
},
|
|
3705
3705
|
"ts": "",
|
|
3706
3706
|
"type": "wtm.request",
|
|
3707
|
-
"userAgent": "
|
|
3707
|
+
"userAgent": ""
|
|
3708
3708
|
},
|
|
3709
3709
|
{
|
|
3710
3710
|
"action": "wtm.attrack.keysv2",
|
|
@@ -3730,7 +3730,7 @@
|
|
|
3730
3730
|
},
|
|
3731
3731
|
"ts": "",
|
|
3732
3732
|
"type": "wtm.request",
|
|
3733
|
-
"userAgent": "
|
|
3733
|
+
"userAgent": ""
|
|
3734
3734
|
},
|
|
3735
3735
|
{
|
|
3736
3736
|
"action": "wtm.attrack.keysv2",
|
|
@@ -3756,7 +3756,7 @@
|
|
|
3756
3756
|
},
|
|
3757
3757
|
"ts": "",
|
|
3758
3758
|
"type": "wtm.request",
|
|
3759
|
-
"userAgent": "
|
|
3759
|
+
"userAgent": ""
|
|
3760
3760
|
},
|
|
3761
3761
|
{
|
|
3762
3762
|
"action": "wtm.attrack.keysv2",
|
|
@@ -3782,7 +3782,7 @@
|
|
|
3782
3782
|
},
|
|
3783
3783
|
"ts": "",
|
|
3784
3784
|
"type": "wtm.request",
|
|
3785
|
-
"userAgent": "
|
|
3785
|
+
"userAgent": ""
|
|
3786
3786
|
},
|
|
3787
3787
|
{
|
|
3788
3788
|
"action": "wtm.attrack.keysv2",
|
|
@@ -3808,7 +3808,7 @@
|
|
|
3808
3808
|
},
|
|
3809
3809
|
"ts": "",
|
|
3810
3810
|
"type": "wtm.request",
|
|
3811
|
-
"userAgent": "
|
|
3811
|
+
"userAgent": ""
|
|
3812
3812
|
},
|
|
3813
3813
|
{
|
|
3814
3814
|
"action": "wtm.attrack.keysv2",
|
|
@@ -3834,7 +3834,7 @@
|
|
|
3834
3834
|
},
|
|
3835
3835
|
"ts": "",
|
|
3836
3836
|
"type": "wtm.request",
|
|
3837
|
-
"userAgent": "
|
|
3837
|
+
"userAgent": ""
|
|
3838
3838
|
},
|
|
3839
3839
|
{
|
|
3840
3840
|
"action": "wtm.attrack.keysv2",
|
|
@@ -3860,6 +3860,6 @@
|
|
|
3860
3860
|
},
|
|
3861
3861
|
"ts": "",
|
|
3862
3862
|
"type": "wtm.request",
|
|
3863
|
-
"userAgent": "
|
|
3863
|
+
"userAgent": ""
|
|
3864
3864
|
}
|
|
3865
|
-
]
|
|
3865
|
+
]
|
|
@@ -1108,7 +1108,7 @@
|
|
|
1108
1108
|
},
|
|
1109
1109
|
"ts": "",
|
|
1110
1110
|
"type": "wtm.request",
|
|
1111
|
-
"userAgent": "
|
|
1111
|
+
"userAgent": ""
|
|
1112
1112
|
},
|
|
1113
1113
|
{
|
|
1114
1114
|
"action": "wtm.attrack.tp_events",
|
|
@@ -2225,7 +2225,7 @@
|
|
|
2225
2225
|
},
|
|
2226
2226
|
"ts": "",
|
|
2227
2227
|
"type": "wtm.request",
|
|
2228
|
-
"userAgent": "
|
|
2228
|
+
"userAgent": ""
|
|
2229
2229
|
},
|
|
2230
2230
|
{
|
|
2231
2231
|
"action": "wtm.attrack.tokensv2",
|
|
@@ -2246,7 +2246,7 @@
|
|
|
2246
2246
|
},
|
|
2247
2247
|
"ts": "",
|
|
2248
2248
|
"type": "wtm.request",
|
|
2249
|
-
"userAgent": "
|
|
2249
|
+
"userAgent": ""
|
|
2250
2250
|
},
|
|
2251
2251
|
{
|
|
2252
2252
|
"action": "wtm.attrack.keysv2",
|
|
@@ -2272,7 +2272,7 @@
|
|
|
2272
2272
|
},
|
|
2273
2273
|
"ts": "",
|
|
2274
2274
|
"type": "wtm.request",
|
|
2275
|
-
"userAgent": "
|
|
2275
|
+
"userAgent": ""
|
|
2276
2276
|
},
|
|
2277
2277
|
{
|
|
2278
2278
|
"action": "wtm.attrack.keysv2",
|
|
@@ -2298,7 +2298,7 @@
|
|
|
2298
2298
|
},
|
|
2299
2299
|
"ts": "",
|
|
2300
2300
|
"type": "wtm.request",
|
|
2301
|
-
"userAgent": "
|
|
2301
|
+
"userAgent": ""
|
|
2302
2302
|
},
|
|
2303
2303
|
{
|
|
2304
2304
|
"action": "wtm.attrack.keysv2",
|
|
@@ -2324,7 +2324,7 @@
|
|
|
2324
2324
|
},
|
|
2325
2325
|
"ts": "",
|
|
2326
2326
|
"type": "wtm.request",
|
|
2327
|
-
"userAgent": "
|
|
2327
|
+
"userAgent": ""
|
|
2328
2328
|
},
|
|
2329
2329
|
{
|
|
2330
2330
|
"action": "wtm.attrack.keysv2",
|
|
@@ -2350,7 +2350,7 @@
|
|
|
2350
2350
|
},
|
|
2351
2351
|
"ts": "",
|
|
2352
2352
|
"type": "wtm.request",
|
|
2353
|
-
"userAgent": "
|
|
2353
|
+
"userAgent": ""
|
|
2354
2354
|
},
|
|
2355
2355
|
{
|
|
2356
2356
|
"action": "wtm.attrack.keysv2",
|
|
@@ -2376,7 +2376,7 @@
|
|
|
2376
2376
|
},
|
|
2377
2377
|
"ts": "",
|
|
2378
2378
|
"type": "wtm.request",
|
|
2379
|
-
"userAgent": "
|
|
2379
|
+
"userAgent": ""
|
|
2380
2380
|
},
|
|
2381
2381
|
{
|
|
2382
2382
|
"action": "wtm.attrack.keysv2",
|
|
@@ -2402,7 +2402,7 @@
|
|
|
2402
2402
|
},
|
|
2403
2403
|
"ts": "",
|
|
2404
2404
|
"type": "wtm.request",
|
|
2405
|
-
"userAgent": "
|
|
2405
|
+
"userAgent": ""
|
|
2406
2406
|
},
|
|
2407
2407
|
{
|
|
2408
2408
|
"action": "wtm.attrack.keysv2",
|
|
@@ -2428,7 +2428,7 @@
|
|
|
2428
2428
|
},
|
|
2429
2429
|
"ts": "",
|
|
2430
2430
|
"type": "wtm.request",
|
|
2431
|
-
"userAgent": "
|
|
2431
|
+
"userAgent": ""
|
|
2432
2432
|
},
|
|
2433
2433
|
{
|
|
2434
2434
|
"action": "wtm.attrack.keysv2",
|
|
@@ -2454,7 +2454,7 @@
|
|
|
2454
2454
|
},
|
|
2455
2455
|
"ts": "",
|
|
2456
2456
|
"type": "wtm.request",
|
|
2457
|
-
"userAgent": "
|
|
2457
|
+
"userAgent": ""
|
|
2458
2458
|
},
|
|
2459
2459
|
{
|
|
2460
2460
|
"action": "wtm.attrack.keysv2",
|
|
@@ -2480,7 +2480,7 @@
|
|
|
2480
2480
|
},
|
|
2481
2481
|
"ts": "",
|
|
2482
2482
|
"type": "wtm.request",
|
|
2483
|
-
"userAgent": "
|
|
2483
|
+
"userAgent": ""
|
|
2484
2484
|
},
|
|
2485
2485
|
{
|
|
2486
2486
|
"action": "wtm.attrack.keysv2",
|
|
@@ -2506,6 +2506,6 @@
|
|
|
2506
2506
|
},
|
|
2507
2507
|
"ts": "",
|
|
2508
2508
|
"type": "wtm.request",
|
|
2509
|
-
"userAgent": "
|
|
2509
|
+
"userAgent": ""
|
|
2510
2510
|
}
|
|
2511
|
-
]
|
|
2511
|
+
]
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
},
|
|
197
197
|
"ts": "",
|
|
198
198
|
"type": "wtm.request",
|
|
199
|
-
"userAgent": "
|
|
199
|
+
"userAgent": ""
|
|
200
200
|
},
|
|
201
201
|
{
|
|
202
202
|
"action": "wtm.attrack.tp_events",
|
|
@@ -398,7 +398,7 @@
|
|
|
398
398
|
},
|
|
399
399
|
"ts": "",
|
|
400
400
|
"type": "wtm.request",
|
|
401
|
-
"userAgent": "
|
|
401
|
+
"userAgent": ""
|
|
402
402
|
},
|
|
403
403
|
{
|
|
404
404
|
"action": "wtm.attrack.tokensv2",
|
|
@@ -419,7 +419,7 @@
|
|
|
419
419
|
},
|
|
420
420
|
"ts": "",
|
|
421
421
|
"type": "wtm.request",
|
|
422
|
-
"userAgent": "
|
|
422
|
+
"userAgent": ""
|
|
423
423
|
},
|
|
424
424
|
{
|
|
425
425
|
"action": "wtm.attrack.keysv2",
|
|
@@ -609,7 +609,7 @@
|
|
|
609
609
|
},
|
|
610
610
|
"ts": "",
|
|
611
611
|
"type": "wtm.request",
|
|
612
|
-
"userAgent": "
|
|
612
|
+
"userAgent": ""
|
|
613
613
|
},
|
|
614
614
|
{
|
|
615
615
|
"action": "wtm.attrack.keysv2",
|
|
@@ -799,6 +799,6 @@
|
|
|
799
799
|
},
|
|
800
800
|
"ts": "",
|
|
801
801
|
"type": "wtm.request",
|
|
802
|
-
"userAgent": "
|
|
802
|
+
"userAgent": ""
|
|
803
803
|
}
|
|
804
|
-
]
|
|
804
|
+
]
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
},
|
|
184
184
|
"ts": "",
|
|
185
185
|
"type": "wtm.request",
|
|
186
|
-
"userAgent": "
|
|
186
|
+
"userAgent": ""
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
189
|
"action": "wtm.attrack.tp_events",
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
},
|
|
370
370
|
"ts": "",
|
|
371
371
|
"type": "wtm.request",
|
|
372
|
-
"userAgent": "
|
|
372
|
+
"userAgent": ""
|
|
373
373
|
},
|
|
374
374
|
{
|
|
375
375
|
"action": "wtm.attrack.tokensv2",
|
|
@@ -390,7 +390,7 @@
|
|
|
390
390
|
},
|
|
391
391
|
"ts": "",
|
|
392
392
|
"type": "wtm.request",
|
|
393
|
-
"userAgent": "
|
|
393
|
+
"userAgent": ""
|
|
394
394
|
},
|
|
395
395
|
{
|
|
396
396
|
"action": "wtm.attrack.keysv2",
|
|
@@ -572,7 +572,7 @@
|
|
|
572
572
|
},
|
|
573
573
|
"ts": "",
|
|
574
574
|
"type": "wtm.request",
|
|
575
|
-
"userAgent": "
|
|
575
|
+
"userAgent": ""
|
|
576
576
|
},
|
|
577
577
|
{
|
|
578
578
|
"action": "wtm.attrack.keysv2",
|
|
@@ -754,6 +754,6 @@
|
|
|
754
754
|
},
|
|
755
755
|
"ts": "",
|
|
756
756
|
"type": "wtm.request",
|
|
757
|
-
"userAgent": "
|
|
757
|
+
"userAgent": ""
|
|
758
758
|
}
|
|
759
|
-
]
|
|
759
|
+
]
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
},
|
|
131
131
|
"ts": "",
|
|
132
132
|
"type": "wtm.request",
|
|
133
|
-
"userAgent": "
|
|
133
|
+
"userAgent": ""
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
"action": "wtm.attrack.tp_events",
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
},
|
|
253
253
|
"ts": "",
|
|
254
254
|
"type": "wtm.request",
|
|
255
|
-
"userAgent": "
|
|
255
|
+
"userAgent": ""
|
|
256
256
|
},
|
|
257
257
|
{
|
|
258
258
|
"action": "wtm.attrack.tp_events",
|
|
@@ -693,7 +693,7 @@
|
|
|
693
693
|
},
|
|
694
694
|
"ts": "",
|
|
695
695
|
"type": "wtm.request",
|
|
696
|
-
"userAgent": "
|
|
696
|
+
"userAgent": ""
|
|
697
697
|
},
|
|
698
698
|
{
|
|
699
699
|
"action": "wtm.attrack.tp_events",
|
|
@@ -1142,7 +1142,7 @@
|
|
|
1142
1142
|
},
|
|
1143
1143
|
"ts": "",
|
|
1144
1144
|
"type": "wtm.request",
|
|
1145
|
-
"userAgent": "
|
|
1145
|
+
"userAgent": ""
|
|
1146
1146
|
},
|
|
1147
1147
|
{
|
|
1148
1148
|
"action": "wtm.attrack.tp_events",
|
|
@@ -1275,7 +1275,7 @@
|
|
|
1275
1275
|
},
|
|
1276
1276
|
"ts": "",
|
|
1277
1277
|
"type": "wtm.request",
|
|
1278
|
-
"userAgent": "
|
|
1278
|
+
"userAgent": ""
|
|
1279
1279
|
},
|
|
1280
1280
|
{
|
|
1281
1281
|
"action": "wtm.attrack.tp_events",
|
|
@@ -1397,7 +1397,7 @@
|
|
|
1397
1397
|
},
|
|
1398
1398
|
"ts": "",
|
|
1399
1399
|
"type": "wtm.request",
|
|
1400
|
-
"userAgent": "
|
|
1400
|
+
"userAgent": ""
|
|
1401
1401
|
},
|
|
1402
1402
|
{
|
|
1403
1403
|
"action": "wtm.attrack.tp_events",
|
|
@@ -1838,7 +1838,7 @@
|
|
|
1838
1838
|
},
|
|
1839
1839
|
"ts": "",
|
|
1840
1840
|
"type": "wtm.request",
|
|
1841
|
-
"userAgent": "
|
|
1841
|
+
"userAgent": ""
|
|
1842
1842
|
},
|
|
1843
1843
|
{
|
|
1844
1844
|
"action": "wtm.attrack.tp_events",
|
|
@@ -2287,7 +2287,7 @@
|
|
|
2287
2287
|
},
|
|
2288
2288
|
"ts": "",
|
|
2289
2289
|
"type": "wtm.request",
|
|
2290
|
-
"userAgent": "
|
|
2290
|
+
"userAgent": ""
|
|
2291
2291
|
},
|
|
2292
2292
|
{
|
|
2293
2293
|
"action": "wtm.attrack.tokensv2",
|
|
@@ -2308,7 +2308,7 @@
|
|
|
2308
2308
|
},
|
|
2309
2309
|
"ts": "",
|
|
2310
2310
|
"type": "wtm.request",
|
|
2311
|
-
"userAgent": "
|
|
2311
|
+
"userAgent": ""
|
|
2312
2312
|
},
|
|
2313
2313
|
{
|
|
2314
2314
|
"action": "wtm.attrack.keysv2",
|
|
@@ -4590,7 +4590,7 @@
|
|
|
4590
4590
|
},
|
|
4591
4591
|
"ts": "",
|
|
4592
4592
|
"type": "wtm.request",
|
|
4593
|
-
"userAgent": "
|
|
4593
|
+
"userAgent": ""
|
|
4594
4594
|
},
|
|
4595
4595
|
{
|
|
4596
4596
|
"action": "wtm.attrack.keysv2",
|
|
@@ -6876,7 +6876,7 @@
|
|
|
6876
6876
|
},
|
|
6877
6877
|
"ts": "",
|
|
6878
6878
|
"type": "wtm.request",
|
|
6879
|
-
"userAgent": "
|
|
6879
|
+
"userAgent": ""
|
|
6880
6880
|
},
|
|
6881
6881
|
{
|
|
6882
6882
|
"action": "wtm.attrack.keysv2",
|
|
@@ -6902,7 +6902,7 @@
|
|
|
6902
6902
|
},
|
|
6903
6903
|
"ts": "",
|
|
6904
6904
|
"type": "wtm.request",
|
|
6905
|
-
"userAgent": "
|
|
6905
|
+
"userAgent": ""
|
|
6906
6906
|
},
|
|
6907
6907
|
{
|
|
6908
6908
|
"action": "wtm.attrack.keysv2",
|
|
@@ -6928,6 +6928,6 @@
|
|
|
6928
6928
|
},
|
|
6929
6929
|
"ts": "",
|
|
6930
6930
|
"type": "wtm.request",
|
|
6931
|
-
"userAgent": "
|
|
6931
|
+
"userAgent": ""
|
|
6932
6932
|
}
|
|
6933
|
-
]
|
|
6933
|
+
]
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
},
|
|
112
112
|
"ts": "",
|
|
113
113
|
"type": "wtm.request",
|
|
114
|
-
"userAgent": "
|
|
114
|
+
"userAgent": ""
|
|
115
115
|
},
|
|
116
116
|
{
|
|
117
117
|
"action": "wtm.attrack.tp_events",
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
},
|
|
238
238
|
"ts": "",
|
|
239
239
|
"type": "wtm.request",
|
|
240
|
-
"userAgent": "
|
|
240
|
+
"userAgent": ""
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
243
|
"action": "wtm.attrack.tp_events",
|
|
@@ -408,7 +408,7 @@
|
|
|
408
408
|
},
|
|
409
409
|
"ts": "",
|
|
410
410
|
"type": "wtm.request",
|
|
411
|
-
"userAgent": "
|
|
411
|
+
"userAgent": ""
|
|
412
412
|
},
|
|
413
413
|
{
|
|
414
414
|
"action": "wtm.attrack.tp_events",
|
|
@@ -526,7 +526,7 @@
|
|
|
526
526
|
},
|
|
527
527
|
"ts": "",
|
|
528
528
|
"type": "wtm.request",
|
|
529
|
-
"userAgent": "
|
|
529
|
+
"userAgent": ""
|
|
530
530
|
},
|
|
531
531
|
{
|
|
532
532
|
"action": "wtm.attrack.tp_events",
|
|
@@ -1006,7 +1006,7 @@
|
|
|
1006
1006
|
},
|
|
1007
1007
|
"ts": "",
|
|
1008
1008
|
"type": "wtm.request",
|
|
1009
|
-
"userAgent": "
|
|
1009
|
+
"userAgent": ""
|
|
1010
1010
|
},
|
|
1011
1011
|
{
|
|
1012
1012
|
"action": "wtm.attrack.tp_events",
|
|
@@ -1120,7 +1120,7 @@
|
|
|
1120
1120
|
},
|
|
1121
1121
|
"ts": "",
|
|
1122
1122
|
"type": "wtm.request",
|
|
1123
|
-
"userAgent": "
|
|
1123
|
+
"userAgent": ""
|
|
1124
1124
|
},
|
|
1125
1125
|
{
|
|
1126
1126
|
"action": "wtm.attrack.tp_events",
|
|
@@ -1246,7 +1246,7 @@
|
|
|
1246
1246
|
},
|
|
1247
1247
|
"ts": "",
|
|
1248
1248
|
"type": "wtm.request",
|
|
1249
|
-
"userAgent": "
|
|
1249
|
+
"userAgent": ""
|
|
1250
1250
|
},
|
|
1251
1251
|
{
|
|
1252
1252
|
"action": "wtm.attrack.tp_events",
|
|
@@ -1417,7 +1417,7 @@
|
|
|
1417
1417
|
},
|
|
1418
1418
|
"ts": "",
|
|
1419
1419
|
"type": "wtm.request",
|
|
1420
|
-
"userAgent": "
|
|
1420
|
+
"userAgent": ""
|
|
1421
1421
|
},
|
|
1422
1422
|
{
|
|
1423
1423
|
"action": "wtm.attrack.tp_events",
|
|
@@ -1535,7 +1535,7 @@
|
|
|
1535
1535
|
},
|
|
1536
1536
|
"ts": "",
|
|
1537
1537
|
"type": "wtm.request",
|
|
1538
|
-
"userAgent": "
|
|
1538
|
+
"userAgent": ""
|
|
1539
1539
|
},
|
|
1540
1540
|
{
|
|
1541
1541
|
"action": "wtm.attrack.tp_events",
|
|
@@ -2015,7 +2015,7 @@
|
|
|
2015
2015
|
},
|
|
2016
2016
|
"ts": "",
|
|
2017
2017
|
"type": "wtm.request",
|
|
2018
|
-
"userAgent": "
|
|
2018
|
+
"userAgent": ""
|
|
2019
2019
|
},
|
|
2020
2020
|
{
|
|
2021
2021
|
"action": "wtm.attrack.tokensv2",
|
|
@@ -2036,7 +2036,7 @@
|
|
|
2036
2036
|
},
|
|
2037
2037
|
"ts": "",
|
|
2038
2038
|
"type": "wtm.request",
|
|
2039
|
-
"userAgent": "
|
|
2039
|
+
"userAgent": ""
|
|
2040
2040
|
},
|
|
2041
2041
|
{
|
|
2042
2042
|
"action": "wtm.attrack.keysv2",
|
|
@@ -3734,7 +3734,7 @@
|
|
|
3734
3734
|
},
|
|
3735
3735
|
"ts": "",
|
|
3736
3736
|
"type": "wtm.request",
|
|
3737
|
-
"userAgent": "
|
|
3737
|
+
"userAgent": ""
|
|
3738
3738
|
},
|
|
3739
3739
|
{
|
|
3740
3740
|
"action": "wtm.attrack.keysv2",
|
|
@@ -5432,7 +5432,7 @@
|
|
|
5432
5432
|
},
|
|
5433
5433
|
"ts": "",
|
|
5434
5434
|
"type": "wtm.request",
|
|
5435
|
-
"userAgent": "
|
|
5435
|
+
"userAgent": ""
|
|
5436
5436
|
},
|
|
5437
5437
|
{
|
|
5438
5438
|
"action": "wtm.attrack.keysv2",
|
|
@@ -5458,7 +5458,7 @@
|
|
|
5458
5458
|
},
|
|
5459
5459
|
"ts": "",
|
|
5460
5460
|
"type": "wtm.request",
|
|
5461
|
-
"userAgent": "
|
|
5461
|
+
"userAgent": ""
|
|
5462
5462
|
},
|
|
5463
5463
|
{
|
|
5464
5464
|
"action": "wtm.attrack.keysv2",
|
|
@@ -5484,6 +5484,6 @@
|
|
|
5484
5484
|
},
|
|
5485
5485
|
"ts": "",
|
|
5486
5486
|
"type": "wtm.request",
|
|
5487
|
-
"userAgent": "
|
|
5487
|
+
"userAgent": ""
|
|
5488
5488
|
}
|
|
5489
|
-
]
|
|
5489
|
+
]
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import logger from './logger';
|
|
13
|
-
import { requireParam, requireString
|
|
13
|
+
import { requireParam, requireString } from './utils';
|
|
14
|
+
import Bowser from 'bowser';
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Responsible for generating information to be included in the "alive" message.
|
|
@@ -24,27 +25,21 @@ import { requireParam, requireString, lazyInitAsync } from './utils';
|
|
|
24
25
|
* breaks something on Windows.
|
|
25
26
|
*/
|
|
26
27
|
export default class AliveMessageGenerator {
|
|
27
|
-
constructor({
|
|
28
|
-
browserInfoProvider,
|
|
29
|
-
navigatorApi,
|
|
30
|
-
quorumChecker,
|
|
31
|
-
storage,
|
|
32
|
-
storageKey,
|
|
33
|
-
}) {
|
|
34
|
-
requireParam(browserInfoProvider);
|
|
28
|
+
constructor({ navigatorApi, quorumChecker, storage, storageKey }) {
|
|
35
29
|
this.quorumChecker = requireParam(quorumChecker);
|
|
36
30
|
this.storage = requireParam(storage);
|
|
37
31
|
this.storageKey = requireString(storageKey);
|
|
38
32
|
this.navigatorApi = navigatorApi || globalThis.navigator;
|
|
33
|
+
}
|
|
39
34
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
get staticConfig() {
|
|
36
|
+
this._staticConfig ||= this._generateBaseConfig();
|
|
37
|
+
return this._staticConfig;
|
|
43
38
|
}
|
|
44
39
|
|
|
45
40
|
async generateMessage(ctry, hour) {
|
|
46
41
|
const config = {
|
|
47
|
-
...
|
|
42
|
+
...this.staticConfig,
|
|
48
43
|
ctry,
|
|
49
44
|
};
|
|
50
45
|
|
|
@@ -71,35 +66,37 @@ export default class AliveMessageGenerator {
|
|
|
71
66
|
browser: '',
|
|
72
67
|
version: '',
|
|
73
68
|
os: '',
|
|
69
|
+
platform: '',
|
|
70
|
+
engine: '',
|
|
74
71
|
language: '',
|
|
75
72
|
ctry: '--',
|
|
76
73
|
t: hour,
|
|
77
74
|
};
|
|
78
75
|
}
|
|
79
76
|
|
|
80
|
-
_generateBaseConfig(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
77
|
+
_generateBaseConfig() {
|
|
78
|
+
let browser, version, os, platform, engine;
|
|
79
|
+
const { language, userAgent } = this.navigatorApi;
|
|
80
|
+
if (userAgent) {
|
|
81
|
+
const browserInfo = Bowser.parse(userAgent);
|
|
82
|
+
browser = browserInfo.browser?.name;
|
|
83
|
+
os = browserInfo.os?.name;
|
|
84
|
+
platform = browserInfo.platform?.type;
|
|
85
|
+
engine = browserInfo.engine?.name;
|
|
88
86
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
'"navigator" API unavailable (should only happen when run in NodeJs 20 or lower)',
|
|
95
|
-
);
|
|
87
|
+
// extracts only the major version (e.g. "96.0.1" -> 96)
|
|
88
|
+
const majorVersion = parseInt(browserInfo.browser?.version, 10);
|
|
89
|
+
if (!isNaN(majorVersion)) {
|
|
90
|
+
version = String(majorVersion);
|
|
91
|
+
}
|
|
96
92
|
}
|
|
97
|
-
language = language || '';
|
|
98
93
|
|
|
99
94
|
return {
|
|
100
|
-
browser:
|
|
101
|
-
version, // major version
|
|
102
|
-
os:
|
|
95
|
+
browser: browser || '',
|
|
96
|
+
version: version || '', // major version
|
|
97
|
+
os: os || '',
|
|
98
|
+
platform: platform || '', // e.g. 'desktop'
|
|
99
|
+
engine: engine || '', // e.g. 'Blink'
|
|
103
100
|
language: language || '', // e.g. 'en-US'
|
|
104
101
|
};
|
|
105
102
|
}
|
|
@@ -38,13 +38,7 @@ import { BloomFilter } from './bloom-filters';
|
|
|
38
38
|
const SECOND = 1000;
|
|
39
39
|
|
|
40
40
|
export default class Reporting {
|
|
41
|
-
constructor({
|
|
42
|
-
config,
|
|
43
|
-
storage,
|
|
44
|
-
communication,
|
|
45
|
-
connectDatabase,
|
|
46
|
-
browserInfoProvider,
|
|
47
|
-
}) {
|
|
41
|
+
constructor({ config, storage, communication, connectDatabase }) {
|
|
48
42
|
// Defines whether Reporting is fully initialized and has permission
|
|
49
43
|
// to collect data.
|
|
50
44
|
this.isActive = false;
|
|
@@ -152,7 +146,6 @@ export default class Reporting {
|
|
|
152
146
|
});
|
|
153
147
|
|
|
154
148
|
const aliveMessageGenerator = new AliveMessageGenerator({
|
|
155
|
-
browserInfoProvider,
|
|
156
149
|
quorumChecker: this.quorumChecker,
|
|
157
150
|
storage,
|
|
158
151
|
storageKey: 'alive_config',
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* file, You can obtain one at http://mozilla.org/MPL/2.0
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
+
import Bowser from 'bowser';
|
|
13
|
+
|
|
12
14
|
/* eslint-disable no-param-reassign */
|
|
13
15
|
import { isLocalIP } from '../network.js';
|
|
14
16
|
import Config from './config.js';
|
|
@@ -42,13 +44,14 @@ const DAY_CHANGE_INTERVAL = 20 * 1000;
|
|
|
42
44
|
const RECENTLY_MODIFIED_TTL = 30 * 1000;
|
|
43
45
|
|
|
44
46
|
export default class RequestReporter {
|
|
47
|
+
#userAgent;
|
|
48
|
+
|
|
45
49
|
constructor(
|
|
46
50
|
settings,
|
|
47
51
|
{
|
|
48
52
|
trustedClock,
|
|
49
53
|
countryProvider,
|
|
50
54
|
onMessageReady,
|
|
51
|
-
getBrowserInfo,
|
|
52
55
|
onTrackerInteraction = (event, state) => {
|
|
53
56
|
logger.info('Tracker', event, 'with url:', state.url);
|
|
54
57
|
},
|
|
@@ -61,7 +64,6 @@ export default class RequestReporter {
|
|
|
61
64
|
this.trustedClock = trustedClock;
|
|
62
65
|
this.countryProvider = countryProvider;
|
|
63
66
|
this.onTrackerInteraction = onTrackerInteraction;
|
|
64
|
-
this.getBrowserInfo = getBrowserInfo;
|
|
65
67
|
this.isRequestAllowed = isRequestAllowed;
|
|
66
68
|
if (dryRunMode) {
|
|
67
69
|
logger.warn(
|
|
@@ -166,6 +168,30 @@ export default class RequestReporter {
|
|
|
166
168
|
this.onMessageReady(message);
|
|
167
169
|
}
|
|
168
170
|
|
|
171
|
+
get userAgent() {
|
|
172
|
+
if (this.#userAgent === undefined) {
|
|
173
|
+
try {
|
|
174
|
+
const userAgent = globalThis.navigator?.userAgent;
|
|
175
|
+
if (userAgent) {
|
|
176
|
+
const { browser } = Bowser.parse(userAgent);
|
|
177
|
+
this.#userAgent = {
|
|
178
|
+
'Chrome': 'chrome',
|
|
179
|
+
'Chromium': 'chrome',
|
|
180
|
+
'Firefox': 'firefox',
|
|
181
|
+
'Microsoft Edge': 'edge',
|
|
182
|
+
'Opera': 'opera',
|
|
183
|
+
'Safari': 'safari',
|
|
184
|
+
'Yandex Browser': 'yandex',
|
|
185
|
+
}[browser?.name];
|
|
186
|
+
}
|
|
187
|
+
} catch (e) {
|
|
188
|
+
logger.warn('Failed to determine userAgent', e);
|
|
189
|
+
}
|
|
190
|
+
this.#userAgent ||= '';
|
|
191
|
+
}
|
|
192
|
+
return this.#userAgent;
|
|
193
|
+
}
|
|
194
|
+
|
|
169
195
|
/** Global module initialisation.
|
|
170
196
|
*/
|
|
171
197
|
async init() {
|
|
@@ -210,8 +236,6 @@ export default class RequestReporter {
|
|
|
210
236
|
|
|
211
237
|
await this.pageStore.init();
|
|
212
238
|
|
|
213
|
-
this.userAgent = (await this.getBrowserInfo()).name;
|
|
214
|
-
|
|
215
239
|
this.pageLogger = new PageLogger(this.config.placeHolder);
|
|
216
240
|
this.cookieContext = new CookieContext(this.config, this.qs_whitelist);
|
|
217
241
|
await this.cookieContext.init();
|
|
@@ -18,18 +18,15 @@ describe('#AliveMessageGenerator', function () {
|
|
|
18
18
|
const anotherHour = '2024030804';
|
|
19
19
|
|
|
20
20
|
const storageKey = 'some-storage-key';
|
|
21
|
-
let browserInfoProvider;
|
|
22
21
|
let navigatorApi;
|
|
23
22
|
let quorumChecker;
|
|
24
23
|
let storage;
|
|
25
24
|
let uut;
|
|
26
25
|
|
|
27
|
-
let _browserInfo;
|
|
28
26
|
let _shouldPassQuorum;
|
|
29
27
|
|
|
30
28
|
function newAliveMessageGenerator() {
|
|
31
29
|
return new AliveMessageGenerator({
|
|
32
|
-
browserInfoProvider,
|
|
33
30
|
navigatorApi,
|
|
34
31
|
quorumChecker,
|
|
35
32
|
storage,
|
|
@@ -37,8 +34,8 @@ describe('#AliveMessageGenerator', function () {
|
|
|
37
34
|
});
|
|
38
35
|
}
|
|
39
36
|
|
|
40
|
-
// Helper that
|
|
41
|
-
// it keeps the storage but purges everything that was in memory.
|
|
37
|
+
// Helper that simulates an event like a restart of the service worker/background script:
|
|
38
|
+
// it keeps the storage, but purges everything that was in memory.
|
|
42
39
|
async function simulateRestart() {
|
|
43
40
|
uut = newAliveMessageGenerator();
|
|
44
41
|
}
|
|
@@ -52,16 +49,11 @@ describe('#AliveMessageGenerator', function () {
|
|
|
52
49
|
}
|
|
53
50
|
|
|
54
51
|
beforeEach(() => {
|
|
55
|
-
_browserInfo = {
|
|
56
|
-
browser: 'Firefox',
|
|
57
|
-
version: '122',
|
|
58
|
-
os: 'Linux',
|
|
59
|
-
language: 'en-US',
|
|
60
|
-
};
|
|
61
52
|
navigatorApi = {
|
|
53
|
+
userAgent:
|
|
54
|
+
'Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0',
|
|
62
55
|
language: 'en-US',
|
|
63
56
|
};
|
|
64
|
-
browserInfoProvider = async () => _browserInfo;
|
|
65
57
|
|
|
66
58
|
quorumChecker = {
|
|
67
59
|
_incCalls: 0,
|
|
@@ -154,19 +146,17 @@ describe('#AliveMessageGenerator', function () {
|
|
|
154
146
|
runGenericTests();
|
|
155
147
|
|
|
156
148
|
it('should share the config', async function () {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
version: '122.1',
|
|
160
|
-
os: 'Linux',
|
|
161
|
-
language: 'en-US',
|
|
162
|
-
};
|
|
149
|
+
navigatorApi.userAgent =
|
|
150
|
+
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36';
|
|
163
151
|
navigatorApi.language = 'de-DE';
|
|
164
152
|
|
|
165
153
|
const message = await uut.generateMessage('de', '2024010203');
|
|
166
154
|
expect(message).to.eql({
|
|
167
|
-
browser: '
|
|
168
|
-
version: '
|
|
155
|
+
browser: 'Chrome',
|
|
156
|
+
version: '138', // only major version
|
|
169
157
|
os: 'Linux',
|
|
158
|
+
platform: 'desktop',
|
|
159
|
+
engine: 'Blink',
|
|
170
160
|
language: 'de-DE', // from window.navigator
|
|
171
161
|
ctry: 'de',
|
|
172
162
|
t: '2024010203',
|
|
@@ -184,6 +174,8 @@ describe('#AliveMessageGenerator', function () {
|
|
|
184
174
|
browser: '',
|
|
185
175
|
version: '',
|
|
186
176
|
os: '',
|
|
177
|
+
platform: '',
|
|
178
|
+
engine: '',
|
|
187
179
|
language: '',
|
|
188
180
|
ctry: '--',
|
|
189
181
|
t: '2024010203',
|