@ghostery/trackerdb 1.0.749 → 1.0.751

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/cli.js CHANGED
@@ -63,6 +63,18 @@ function parseArguments() {
63
63
  getDomainMetadata: true,
64
64
  })
65
65
  : engine.metadata.fromDomain(url);
66
+
67
+ // Tags are not provided by the engine, but we can enrich the matches using the json export
68
+ if (matches.length > 0) {
69
+ const db = JSON.parse(
70
+ readFileSync(path.join(__dirname, 'dist', 'trackerdb.json')),
71
+ );
72
+ for (const match of matches) {
73
+ if (match.pattern && db.patterns[match.pattern.key]) {
74
+ match.pattern.tags = db.patterns[match.pattern.key].tags;
75
+ }
76
+ }
77
+ }
66
78
  const matchingEnd = Date.now();
67
79
 
68
80
  debug('Timing:', {
Binary file