@adguard/filters-compiler 3.2.1 → 3.2.3
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/dist/build.txt +1 -1
- package/dist/index.cjs +7 -6
- package/dist/index.js +7 -6
- package/package.json +1 -1
package/dist/build.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
version=3.2.
|
|
1
|
+
version=3.2.3
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var path$1 = require('path');
|
|
4
|
+
var url = require('url');
|
|
4
5
|
var tsurlfilter = require('@adguard/tsurlfilter');
|
|
5
6
|
var fs$1 = require('fs');
|
|
6
7
|
var md5 = require('md5');
|
|
@@ -1410,7 +1411,7 @@ const cleanupAndOptimizeRules = function (rules, config, optimizationConfig, fil
|
|
|
1410
1411
|
|
|
1411
1412
|
/* eslint-disable global-require */
|
|
1412
1413
|
|
|
1413
|
-
const __dirname$4 = path$1.dirname(
|
|
1414
|
+
const __dirname$4 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href))));
|
|
1414
1415
|
|
|
1415
1416
|
const RULES_SEPARATOR = '\r\n';
|
|
1416
1417
|
let filterIdsPool = [];
|
|
@@ -2782,7 +2783,7 @@ const optimizeDomainBlockingRules = async (lines) => {
|
|
|
2782
2783
|
/* eslint-disable global-require */
|
|
2783
2784
|
|
|
2784
2785
|
|
|
2785
|
-
const __dirname$3 = path$1.dirname(
|
|
2786
|
+
const __dirname$3 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href))));
|
|
2786
2787
|
|
|
2787
2788
|
const TEMPLATE_FILE = 'template.txt';
|
|
2788
2789
|
const FILTER_FILE = 'filter.txt';
|
|
@@ -3675,7 +3676,7 @@ const schemaValidator = { validate: validate$1 };
|
|
|
3675
3676
|
|
|
3676
3677
|
/* eslint-disable global-require */
|
|
3677
3678
|
|
|
3678
|
-
const __dirname$2 = path$1.dirname(
|
|
3679
|
+
const __dirname$2 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href))));
|
|
3679
3680
|
|
|
3680
3681
|
/**
|
|
3681
3682
|
* Each filter, group, tag should have two keys.
|
|
@@ -4623,7 +4624,7 @@ const platformsConfig = {
|
|
|
4623
4624
|
'configuration': {
|
|
4624
4625
|
'removeRulePatterns': [
|
|
4625
4626
|
...CHROMIUM_BASED_EXTENSION_PATTERNS,
|
|
4626
|
-
...
|
|
4627
|
+
...REDIRECT_RULE_MODIFIER_PATTERNS,
|
|
4627
4628
|
],
|
|
4628
4629
|
'replacements': null,
|
|
4629
4630
|
'ignoreRuleHints': false,
|
|
@@ -4670,7 +4671,7 @@ const platformsConfig = {
|
|
|
4670
4671
|
'configuration': {
|
|
4671
4672
|
'removeRulePatterns': [
|
|
4672
4673
|
...CHROMIUM_BASED_EXTENSION_PATTERNS,
|
|
4673
|
-
...
|
|
4674
|
+
...REDIRECT_RULE_MODIFIER_PATTERNS,
|
|
4674
4675
|
],
|
|
4675
4676
|
'replacements': null,
|
|
4676
4677
|
'ignoreRuleHints': false,
|
|
@@ -4809,7 +4810,7 @@ const platformsConfig = {
|
|
|
4809
4810
|
// Sets configuration compatibility
|
|
4810
4811
|
tsurlfilter.setConfiguration({ compatibility: tsurlfilter.CompatibilityTypes.Corelibs });
|
|
4811
4812
|
|
|
4812
|
-
const __dirname$1 = path$1.dirname(
|
|
4813
|
+
const __dirname$1 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href))));
|
|
4813
4814
|
|
|
4814
4815
|
const jsonSchemasConfigDir = path$1.join(__dirname$1, './schemas/');
|
|
4815
4816
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import path$1 from 'path';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
2
3
|
import { RuleFactory, CosmeticRule, NetworkRule, setConfiguration, CompatibilityTypes } from '@adguard/tsurlfilter';
|
|
3
4
|
import fs$1 from 'fs';
|
|
4
5
|
import md5 from 'md5';
|
|
@@ -1407,7 +1408,7 @@ const cleanupAndOptimizeRules = function (rules, config, optimizationConfig, fil
|
|
|
1407
1408
|
|
|
1408
1409
|
/* eslint-disable global-require */
|
|
1409
1410
|
|
|
1410
|
-
const __dirname$3 = path$1.dirname(
|
|
1411
|
+
const __dirname$3 = path$1.dirname(fileURLToPath(import.meta.url));
|
|
1411
1412
|
|
|
1412
1413
|
const RULES_SEPARATOR = '\r\n';
|
|
1413
1414
|
let filterIdsPool = [];
|
|
@@ -2779,7 +2780,7 @@ const optimizeDomainBlockingRules = async (lines) => {
|
|
|
2779
2780
|
/* eslint-disable global-require */
|
|
2780
2781
|
|
|
2781
2782
|
|
|
2782
|
-
const __dirname$2 = path$1.dirname(
|
|
2783
|
+
const __dirname$2 = path$1.dirname(fileURLToPath(import.meta.url));
|
|
2783
2784
|
|
|
2784
2785
|
const TEMPLATE_FILE = 'template.txt';
|
|
2785
2786
|
const FILTER_FILE = 'filter.txt';
|
|
@@ -3672,7 +3673,7 @@ const schemaValidator = { validate: validate$1 };
|
|
|
3672
3673
|
|
|
3673
3674
|
/* eslint-disable global-require */
|
|
3674
3675
|
|
|
3675
|
-
const __dirname$1 = path$1.dirname(
|
|
3676
|
+
const __dirname$1 = path$1.dirname(fileURLToPath(import.meta.url));
|
|
3676
3677
|
|
|
3677
3678
|
/**
|
|
3678
3679
|
* Each filter, group, tag should have two keys.
|
|
@@ -4620,7 +4621,7 @@ const platformsConfig = {
|
|
|
4620
4621
|
'configuration': {
|
|
4621
4622
|
'removeRulePatterns': [
|
|
4622
4623
|
...CHROMIUM_BASED_EXTENSION_PATTERNS,
|
|
4623
|
-
...
|
|
4624
|
+
...REDIRECT_RULE_MODIFIER_PATTERNS,
|
|
4624
4625
|
],
|
|
4625
4626
|
'replacements': null,
|
|
4626
4627
|
'ignoreRuleHints': false,
|
|
@@ -4667,7 +4668,7 @@ const platformsConfig = {
|
|
|
4667
4668
|
'configuration': {
|
|
4668
4669
|
'removeRulePatterns': [
|
|
4669
4670
|
...CHROMIUM_BASED_EXTENSION_PATTERNS,
|
|
4670
|
-
...
|
|
4671
|
+
...REDIRECT_RULE_MODIFIER_PATTERNS,
|
|
4671
4672
|
],
|
|
4672
4673
|
'replacements': null,
|
|
4673
4674
|
'ignoreRuleHints': false,
|
|
@@ -4806,7 +4807,7 @@ const platformsConfig = {
|
|
|
4806
4807
|
// Sets configuration compatibility
|
|
4807
4808
|
setConfiguration({ compatibility: CompatibilityTypes.Corelibs });
|
|
4808
4809
|
|
|
4809
|
-
const __dirname = path$1.dirname(
|
|
4810
|
+
const __dirname = path$1.dirname(fileURLToPath(import.meta.url));
|
|
4810
4811
|
|
|
4811
4812
|
const jsonSchemasConfigDir = path$1.join(__dirname, './schemas/');
|
|
4812
4813
|
|