-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: improve resource dialect conversion accuracy #25
base: main
Are you sure you want to change the base?
Conversation
@@ -9,11 +9,11 @@ const createFilter = (rules, filterId = 0) => { | |||
|
|||
export default async function convert(rules, { resourcesPath } = {}) { | |||
const filter = createFilter(rules.map(normalizeFilter)); | |||
const conversionResult = await converter.convertStaticRuleSet(filter, { resourcesPath }); | |||
const conversionResult = await converter.convertStaticRuleSet(filter, { resourcesPath: '/a' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the use of "/a" intended here, or should it be using the "resourcesPath" from the arguments?
Update: I assume, it is intended. Perhaps we can give some hint where it originates from (some Adguard convention?). Though I'm not sure where a comment could fit best, since "/a" is also used at other places. I wonder if extracting a constant for it could help?
This PR improves redirect resource dialect conversion accuracy by redefining mapping file with multiple dialects. Since we're using AG converter, it's better to convert into AG first then remap output into uBo dialect again for better converage.
The code is written for the numbers of filters in custom filters level. We must optimize the logic to reuse on the backend which processes a lot of filters.