From 12a40fea118f4312c8ea69208a3c2342246de980 Mon Sep 17 00:00:00 2001 From: Maxim Topciu Date: Tue, 2 Apr 2024 17:52:15 +0300 Subject: [PATCH] Fix adguard-api, add example building for api Merge in ADGUARD-FILTERS/tsurlfilter from fix/api to master Squashed commit of the following: commit 871a2f296c02102829314c825826a47e608dcd6a Author: Maxim Topciu Date: Tue Apr 2 11:34:58 2024 +0300 use types where possible commit dcfe912a4077dd916d4655901ddadf444d26a05d Author: Maxim Topciu Date: Tue Apr 2 11:31:15 2024 +0300 update changelog commit c49026f9c53467b4efd436647d8c0e96d07c37d0 Author: Maxim Topciu Date: Tue Apr 2 11:29:25 2024 +0300 extract zip filename to the constant commit 43518213a50d5617abb003017a7d739704b8c2e4 Author: Maxim Topciu Date: Mon Apr 1 19:34:38 2024 +0300 update pnpm file commit 7a0cc4dbb6f67ae48baa4cb3dfe11270ad2d05c2 Author: Maxim Topciu Date: Mon Apr 1 19:29:58 2024 +0300 revert some configs commit 14df4d9fe149aa5b4ab241be9210e990c7213f65 Author: Maxim Topciu Date: Mon Apr 1 19:20:11 2024 +0300 Build sample extension with adguard api commit 60c40643f361b2dbe796509af70ffac337fc332f Author: Maxim Topciu Date: Mon Apr 1 19:12:55 2024 +0300 Fix api, add example building for api --- bamboo-specs/adguard-api-build.yaml | 9 + bamboo-specs/adguard-api-example-tests.yaml | 94 +++ bamboo-specs/bamboo.yaml | 3 + packages/adguard-api/.editorconfig | 2 +- packages/adguard-api/.eslintrc.js | 22 +- packages/adguard-api/.prettierrc.js | 3 - packages/adguard-api/CHANGELOG.md | 6 + packages/adguard-api/package.json | 9 +- .../adguard-api/src/background/filters/api.ts | 38 +- .../src/background/filters/index.ts | 6 +- .../src/background/filters/locale-detect.ts | 94 +-- .../src/background/filters/metadata.ts | 18 +- .../src/background/filters/rules.ts | 2 +- .../src/background/filters/update.ts | 2 +- .../src/background/filters/versions.ts | 20 +- packages/adguard-api/src/background/index.ts | 8 +- packages/adguard-api/src/background/main.ts | 33 +- .../adguard-api/src/background/network.ts | 12 +- .../adguard-api/src/background/notifier.ts | 6 +- .../src/background/request-blocking-logger.ts | 10 +- .../schemas/configuration/configuration.ts | 2 +- .../background/schemas/configuration/index.ts | 2 +- .../schemas/filter-version/filter-version.ts | 4 +- .../schemas/filter-version/index.ts | 2 +- .../src/background/schemas/index.ts | 6 +- .../src/background/schemas/metadata/filter.ts | 2 +- .../src/background/schemas/metadata/group.ts | 2 +- .../src/background/schemas/metadata/index.ts | 8 +- .../background/schemas/metadata/metadata.ts | 8 +- .../src/background/schemas/metadata/tag.ts | 2 +- .../src/background/schemas/preprocessor.ts | 6 +- .../adguard-api/src/background/storage.ts | 2 +- .../src/background/utils/browser-utils.ts | 2 +- .../adguard-api/src/background/utils/i18n.ts | 4 +- .../adguard-api/src/background/utils/index.ts | 6 +- .../src/background/utils/user-agent.ts | 30 +- .../src/background/utils/version.ts | 10 +- .../src/content-script/assistant.ts | 2 +- .../adguard-api/src/content-script/index.ts | 2 +- packages/adguard-api/tsconfig.json | 5 +- packages/examples/adguard-api/.editorconfig | 2 +- packages/examples/adguard-api/.eslintrc.js | 22 +- packages/examples/adguard-api/.prettierrc.js | 3 - .../adguard-api/extension/src/index.ts | 35 +- packages/examples/adguard-api/package.json | 74 +- .../adguard-api/scripts/build/build-runner.ts | 9 +- .../adguard-api/scripts/build/build.ts | 11 +- .../adguard-api/scripts/build/index.ts | 2 +- .../scripts/build/webpack.config.ts | 53 +- .../scripts/build/zip-directory.ts | 61 ++ .../examples/adguard-api/scripts/constants.ts | 16 +- .../examples/tswebextension-mv2/package.json | 2 +- .../examples/tswebextension-mv3/package.json | 4 +- pnpm-lock.yaml | 688 +++++++++++++----- 54 files changed, 1020 insertions(+), 466 deletions(-) create mode 100644 bamboo-specs/adguard-api-example-tests.yaml delete mode 100644 packages/adguard-api/.prettierrc.js delete mode 100644 packages/examples/adguard-api/.prettierrc.js create mode 100644 packages/examples/adguard-api/scripts/build/zip-directory.ts diff --git a/bamboo-specs/adguard-api-build.yaml b/bamboo-specs/adguard-api-build.yaml index 5b17055b7..d81336584 100644 --- a/bamboo-specs/adguard-api-build.yaml +++ b/bamboo-specs/adguard-api-build.yaml @@ -43,8 +43,12 @@ Build: # Install dependencies pnpm install + # Build api npx lerna run build --scope @adguard/api --include-dependencies + # Build extension with api, for manual testing + npx lerna run build --scope adguard-api-example --include-dependencies + cd packages/adguard-api pnpm pack && mv adguard-api-*.tgz adguard-api.tgz - inject-variables: @@ -80,6 +84,11 @@ Build: pattern: adguard-api.tgz shared: true required: true + - name: extension.zip + location: packages/examples/adguard-api/build + pattern: extension.zip + shared: true + required: true requirements: - adg-docker: 'true' diff --git a/bamboo-specs/adguard-api-example-tests.yaml b/bamboo-specs/adguard-api-example-tests.yaml new file mode 100644 index 000000000..988f4df46 --- /dev/null +++ b/bamboo-specs/adguard-api-example-tests.yaml @@ -0,0 +1,94 @@ +--- +version: 2 +plan: + project-key: AJL + key: AGAPIEXTEST + name: adguard-api-example - tests +variables: + dockerContainer: adguard/node-ssh:18.19--0 + +stages: + - Test: + manual: false + final: false + jobs: + - Test + +Test: + key: TEST + docker: + image: "${bamboo.dockerContainer}" + volumes: + ${system.PNPM_DIR}: "${bamboo.cachePnpm}" + tasks: + - checkout: + force-clean-build: 'true' + - script: + interpreter: SHELL + scripts: + - |- + set -e + set -x + + # Fix mixed logs + exec 2>&1 + + ls -alt + + # Set cache directory + pnpm config set store-dir ${bamboo.cachePnpm} + + # Install deps + pnpm install + + # Lint + pnpm --filter adguard-api-example lint + + # Build + npx lerna run build --scope adguard-api-example --include-dependencies + artifacts: + - name: extension.zip + location: packages/examples/adguard-api/build + pattern: extension.zip + shared: true + required: false + final-tasks: + - script: + interpreter: SHELL + scripts: + - |- + set -x + set -e + + # Fix mixed logs + exec 2>&1 + + ls -la + + echo "Size before cleanup:" && du -h | tail -n 1 + + pnpm clean + + echo "Size after cleanup:" && du -h | tail -n 1 + requirements: + - adg-docker: 'true' + +branches: + create: for-pull-request + delete: + after-deleted-days: '1' + after-inactive-days: '5' + link-to-jira: 'true' + +notifications: + - events: + - plan-status-changed + recipients: + - webhook: + name: Build webhook + url: http://prod.jirahub.service.eu.consul/v1/webhook/bamboo + +labels: [ ] + +other: + concurrent-build-plugin: system-default diff --git a/bamboo-specs/bamboo.yaml b/bamboo-specs/bamboo.yaml index 5e63dbda0..22e463ec5 100644 --- a/bamboo-specs/bamboo.yaml +++ b/bamboo-specs/bamboo.yaml @@ -84,3 +84,6 @@ --- !include 'logger-test.yaml' + +--- +!include 'adguard-api-example-tests.yaml' diff --git a/packages/adguard-api/.editorconfig b/packages/adguard-api/.editorconfig index c172d113b..e62bc058a 100644 --- a/packages/adguard-api/.editorconfig +++ b/packages/adguard-api/.editorconfig @@ -4,4 +4,4 @@ insert_final_newline = true end_of_line = lf indent_style = space indent_size = 4 -max_line_length = 120 \ No newline at end of file +max_line_length = 120 diff --git a/packages/adguard-api/.eslintrc.js b/packages/adguard-api/.eslintrc.js index ee43b0801..33ec53346 100644 --- a/packages/adguard-api/.eslintrc.js +++ b/packages/adguard-api/.eslintrc.js @@ -10,14 +10,23 @@ module.exports = { env: { browser: true, }, + plugins: [ + 'import', + 'import-newlines', + ], extends: [ 'airbnb-base', 'airbnb-typescript/base', 'plugin:jsdoc/recommended', - 'plugin:prettier/recommended', + 'plugin:@typescript-eslint/eslint-recommended', ], rules: { - '@typescript-eslint/explicit-function-return-type': 'error', + indent: 'off', + '@typescript-eslint/indent': ['error', 4], + 'no-bitwise': 'off', + 'no-new': 'off', + 'max-len': ['error', { code: 120, ignoreUrls: true }], + 'import-newlines/enforce': ['error', 3, 120], 'import/prefer-default-export': 'off', 'jsdoc/require-param-type': 'off', 'jsdoc/require-returns-type': 'off', @@ -26,5 +35,12 @@ module.exports = { 'jsdoc/tag-lines': 'off', 'jsdoc/require-throws': 'error', 'jsdoc/require-file-overview': 'error', + '@typescript-eslint/no-non-null-assertion': 'off', + 'no-continue': 'off', + 'import/no-extraneous-dependencies': ['error', { devDependencies: true }], + 'no-restricted-syntax': ['error', 'LabeledStatement', 'WithStatement'], + 'no-constant-condition': ['error', { checkLoops: false }], + '@typescript-eslint/interface-name-prefix': 'off', + 'arrow-body-style': 'off', }, -}; \ No newline at end of file +}; diff --git a/packages/adguard-api/.prettierrc.js b/packages/adguard-api/.prettierrc.js deleted file mode 100644 index 66c9e4b71..000000000 --- a/packages/adguard-api/.prettierrc.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - editorConfig: true, -}; diff --git a/packages/adguard-api/CHANGELOG.md b/packages/adguard-api/CHANGELOG.md index b31672f00..5d3e67c90 100644 --- a/packages/adguard-api/CHANGELOG.md +++ b/packages/adguard-api/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.1.4] - 2024-04-02 + +### Changed +- Update `@adguard/tswebextension` to `^1.0.22`. +- Update `@adguard/filters-downloader` to `^2.2.0`. + ## [2.1.3] - 2024-02-15 ### Changed diff --git a/packages/adguard-api/package.json b/packages/adguard-api/package.json index ed19637a0..ab223e89d 100644 --- a/packages/adguard-api/package.json +++ b/packages/adguard-api/package.json @@ -1,6 +1,6 @@ { "name": "@adguard/api", - "version": "2.1.3", + "version": "2.1.4", "description": "This is a TypeScript library that implements AdGuard's extension API", "main": "dist/adguard-api.js", "files": [ @@ -36,8 +36,8 @@ "license": "GPL-3.0-only", "dependencies": { "@adguard/assistant": "^4.3.70", - "@adguard/filters-downloader": "^1.1.23", - "@adguard/tswebextension": "^1.0.14", + "@adguard/filters-downloader": "^2.2.0", + "@adguard/tswebextension": "^1.0.22", "webextension-polyfill": "0.10.0", "zod": "3.22.4" }, @@ -55,11 +55,8 @@ "eslint": "8.54.0", "eslint-config-airbnb-base": "15.0.0", "eslint-config-airbnb-typescript": "17.1.0", - "eslint-config-prettier": "^9.0.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-jsdoc": "^46.9.0", - "eslint-plugin-prettier": "^5.0.1", - "prettier": "^3.1.0", "rollup": "^4.6.0", "ts-node": "^10.9.1", "typescript": "^5.3.2" diff --git a/packages/adguard-api/src/background/filters/api.ts b/packages/adguard-api/src/background/filters/api.ts index 4093c791e..6eba4522d 100644 --- a/packages/adguard-api/src/background/filters/api.ts +++ b/packages/adguard-api/src/background/filters/api.ts @@ -15,15 +15,15 @@ * You should have received a copy of the GNU General Public License * along with Adguard API. If not, see . */ -import { Network } from "../network"; -import { Storage } from "../storage"; -import { MetadataApi } from "./metadata"; -import { VersionsApi } from "./versions"; -import { FilterRulesApi } from "./rules"; -import { BrowserUtils, I18n } from "../utils"; -import { FilterMetadata } from "../schemas"; -import { notifier, NotifierEventType } from "../notifier"; -import { Logger } from "../logger"; +import { Network } from '../network'; +import { Storage } from '../storage'; +import { MetadataApi } from './metadata'; +import { VersionsApi } from './versions'; +import { FilterRulesApi } from './rules'; +import { BrowserUtils, I18n } from '../utils'; +import { FilterMetadata } from '../schemas'; +import { notifier, NotifierEventType } from '../notifier'; +import { Logger } from '../logger'; /** * Filter Api provides methods for managing filters data @@ -72,13 +72,11 @@ export class FiltersApi { * @param filterIds - list of filter ids * @returns filters data for {@link TsWebExtension} configuration */ - public async getFilters(filterIds: number[]): Promise< - { - content: string; - filterId: number; - trusted: boolean; - }[] - > { + public async getFilters(filterIds: number[]): Promise<{ + content: string; + filterId: number; + trusted: boolean; + }[]> { const tasks = filterIds.map((id) => this.getFilter(id)); return Promise.all(tasks); @@ -106,7 +104,7 @@ export class FiltersApi { return { filterId, - content: (rules || []).join("\n"), + content: (rules || []).join('\n'), trusted: true, }; } @@ -123,7 +121,7 @@ export class FiltersApi { * @returns List of outdated filters ids. */ public async updateFilters(): Promise { - this.logger.info("Update filters"); + this.logger.info('Update filters'); /** * Reload filters metadata from backend for correct * version matching on update check. @@ -171,8 +169,8 @@ export class FiltersApi { const promises = await Promise.allSettled(tasks); // Handles errors promises.forEach((promise) => { - if (promise.status === "rejected") { - this.logger.error("Cannot remove obsoleted filter from storage due to: ", promise.reason); + if (promise.status === 'rejected') { + this.logger.error('Cannot remove obsoleted filter from storage due to: ', promise.reason); } }); diff --git a/packages/adguard-api/src/background/filters/index.ts b/packages/adguard-api/src/background/filters/index.ts index b5f1fe26a..b6ea27e24 100644 --- a/packages/adguard-api/src/background/filters/index.ts +++ b/packages/adguard-api/src/background/filters/index.ts @@ -19,10 +19,10 @@ // Entry point for filter management modules // Filters data management API -export { FiltersApi } from "./api"; +export { FiltersApi } from './api'; // Service for scheduling filters rules updates -export { FiltersUpdateService } from "./update"; +export { FiltersUpdateService } from './update'; // Service for auto-enabling language filters -export { LocaleDetectService } from "./locale-detect"; +export { LocaleDetectService } from './locale-detect'; diff --git a/packages/adguard-api/src/background/filters/locale-detect.ts b/packages/adguard-api/src/background/filters/locale-detect.ts index 0e3be567f..74e306af2 100644 --- a/packages/adguard-api/src/background/filters/locale-detect.ts +++ b/packages/adguard-api/src/background/filters/locale-detect.ts @@ -16,13 +16,13 @@ * along with Adguard API. If not, see . */ -import browser, { Tabs } from "webextension-polyfill"; -import { isHttpRequest, getDomain } from "@adguard/tswebextension"; +import browser, { Tabs } from 'webextension-polyfill'; +import { isHttpRequest, getDomain } from '@adguard/tswebextension'; -import { UserAgent } from "../utils"; -import { Configuration } from "../schemas"; -import { FiltersApi } from "./api"; -import { notifier, NotifierEventType } from "../notifier"; +import { UserAgent } from '../utils'; +import { Configuration } from '../schemas'; +import { FiltersApi } from './api'; +import { notifier, NotifierEventType } from '../notifier'; export type BrowsingLanguage = { language: string; @@ -48,67 +48,67 @@ export class LocaleDetectService { // Page locale to filter language data mapping private static domainToLanguagesMap: Record = { // Russian - ru: "ru", - ua: "ru", - by: "ru", - kz: "ru", + ru: 'ru', + ua: 'ru', + by: 'ru', + kz: 'ru', // English - com: "en", - au: "en", - uk: "en", - nz: "en", + com: 'en', + au: 'en', + uk: 'en', + nz: 'en', // German - de: "de", - at: "de", + de: 'de', + at: 'de', // Japanese - jp: "ja", + jp: 'ja', // Dutch - nl: "nl", + nl: 'nl', // French - fr: "fr", + fr: 'fr', // Spanish - es: "es", + es: 'es', // Italian - it: "it", + it: 'it', // Portuguese - pt: "pt", + pt: 'pt', // Polish - pl: "pl", + pl: 'pl', // Czech - cz: "cs", + cz: 'cs', // Bulgarian - bg: "bg", + bg: 'bg', // Lithuanian - lt: "lt", + lt: 'lt', // Latvian - lv: "lv", + lv: 'lv', // Arabic - eg: "ar", - dz: "ar", - kw: "ar", - ae: "ar", + eg: 'ar', + dz: 'ar', + kw: 'ar', + ae: 'ar', // Slovakian - sk: "sk", + sk: 'sk', // Romanian - ro: "ro", + ro: 'ro', // Suomi - fi: "fi", + fi: 'fi', // Icelandic - is: "is", + is: 'is', // Norwegian - no: "no", + no: 'no', // Greek - gr: "el", + gr: 'el', // Hungarian - hu: "hu", + hu: 'hu', // Hebrew - il: "he", + il: 'he', // Chinese - cn: "zh", + cn: 'zh', // Indonesian - id: "id", + id: 'id', // Turkish - tr: "tr", + tr: 'tr', }; // Memory storage for language hits @@ -156,7 +156,7 @@ export class LocaleDetectService { * @param tab - Tab details record */ private onTabUpdated(_tabId: number, _changeInfo: Tabs.OnUpdatedChangeInfoType, tab: Tabs.Tab): void { - if (tab.status === "complete") { + if (tab.status === 'complete') { this.detectTabLanguage(tab); } } @@ -168,9 +168,9 @@ export class LocaleDetectService { */ private async detectTabLanguage(tab: Tabs.Tab): Promise { if ( - !tab.url || + !tab.url // Check language only for http://... tabs - !isHttpRequest(tab.url) + || !isHttpRequest(tab.url) ) { return; } @@ -195,7 +195,7 @@ export class LocaleDetectService { // https://github.com/AdguardTeam/AdguardBrowserExtension/issues/1354 const host = getDomain(tab.url); if (host && host.length > 8) { - const parts = host.split("."); + const parts = host.split('.'); const tld = parts.at(-1); if (!tld) { @@ -224,7 +224,7 @@ export class LocaleDetectService { * For an unknown language "und" will be returned * https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/detectLanguage */ - if (!language || language === "und") { + if (!language || language === 'und') { return; } diff --git a/packages/adguard-api/src/background/filters/metadata.ts b/packages/adguard-api/src/background/filters/metadata.ts index 24a761552..6c9d67678 100644 --- a/packages/adguard-api/src/background/filters/metadata.ts +++ b/packages/adguard-api/src/background/filters/metadata.ts @@ -16,13 +16,13 @@ * along with Adguard API. If not, see . */ -import { Network } from "../network"; -import { Storage } from "../storage"; -import { metadataValidator, Metadata, FilterMetadata } from "../schemas"; -import { Logger } from "../logger"; +import { Network } from '../network'; +import { Storage } from '../storage'; +import { metadataValidator, Metadata, FilterMetadata } from '../schemas'; +import { Logger } from '../logger'; // Metadata storage key for browser.storage.local -export const METADATA_STORAGE_KEY = "metadata"; +export const METADATA_STORAGE_KEY = 'metadata'; /** * Metadata Api provides methods for managing app {@link Metadata} @@ -54,7 +54,7 @@ export class MetadataApi { public async init(): Promise { const storageData = await this.storage.get(METADATA_STORAGE_KEY); - if (typeof storageData !== "string") { + if (typeof storageData !== 'string') { await this.loadMetadata(); return; } @@ -63,7 +63,7 @@ export class MetadataApi { const metadata = JSON.parse(storageData); this.metadata = metadataValidator.parse(metadata); } catch (e) { - this.logger.warn("Can`t parse data from metadata storage, load it from backend", e); + this.logger.warn('Can`t parse data from metadata storage, load it from backend', e); await this.loadMetadata(); } } @@ -77,7 +77,7 @@ export class MetadataApi { await this.storage.set(METADATA_STORAGE_KEY, JSON.stringify(metadata)); this.metadata = metadata; } catch (e) { - this.logger.error("Can`t download metadata", e); + this.logger.error('Can`t download metadata', e); } } @@ -89,7 +89,7 @@ export class MetadataApi { */ public getFiltersMetadata(): FilterMetadata[] { if (!this.metadata) { - throw new Error("Metadata is not loaded!"); + throw new Error('Metadata is not loaded!'); } return this.metadata.filters; } diff --git a/packages/adguard-api/src/background/filters/rules.ts b/packages/adguard-api/src/background/filters/rules.ts index adcad7ceb..72ad24ce2 100644 --- a/packages/adguard-api/src/background/filters/rules.ts +++ b/packages/adguard-api/src/background/filters/rules.ts @@ -16,7 +16,7 @@ * along with Adguard API. If not, see . */ -import { Storage } from "../storage"; +import { Storage } from '../storage'; /** * Api for write and read filters rules from extension storage diff --git a/packages/adguard-api/src/background/filters/update.ts b/packages/adguard-api/src/background/filters/update.ts index 31774a758..fc54e47bb 100644 --- a/packages/adguard-api/src/background/filters/update.ts +++ b/packages/adguard-api/src/background/filters/update.ts @@ -16,7 +16,7 @@ * along with Adguard API. If not, see . */ -import { FiltersApi } from "./api"; +import { FiltersApi } from './api'; /** * Service for scheduling filters rules updates diff --git a/packages/adguard-api/src/background/filters/versions.ts b/packages/adguard-api/src/background/filters/versions.ts index 0528445ba..4536ced61 100644 --- a/packages/adguard-api/src/background/filters/versions.ts +++ b/packages/adguard-api/src/background/filters/versions.ts @@ -16,12 +16,12 @@ * along with Adguard API. If not, see . */ -import { Storage } from "../storage"; -import { filterVersionStorageDataValidator, FilterVersionData, FilterVersionStorageData } from "../schemas"; -import { Logger } from "../logger"; +import { Storage } from '../storage'; +import { filterVersionStorageDataValidator, FilterVersionData, FilterVersionStorageData } from '../schemas'; +import { Logger } from '../logger'; // Filters versions data storage key for browser.storage.local -export const FILTERS_VERSIONS_KEY = "versions"; +export const FILTERS_VERSIONS_KEY = 'versions'; /** * Api for managing filter version data @@ -49,7 +49,7 @@ export class VersionsApi { public async init(): Promise { const storageData = await this.storage.get(FILTERS_VERSIONS_KEY); - if (typeof storageData !== "string") { + if (typeof storageData !== 'string') { this.loadDefaultData(); return; } @@ -58,7 +58,7 @@ export class VersionsApi { const versions = JSON.parse(storageData); this.versions = filterVersionStorageDataValidator.parse(versions); } catch (e) { - this.logger.warn("Can`t parse data from versions storage, load default data", e); + this.logger.warn('Can`t parse data from versions storage, load default data', e); this.loadDefaultData(); } } @@ -73,7 +73,7 @@ export class VersionsApi { */ public getInstalledFilters(): number[] { if (!this.versions) { - throw new Error("Filter versions are not initialized"); + throw new Error('Filter versions are not initialized'); } return Object.keys(this.versions).map((id) => Number(id)); } @@ -87,7 +87,7 @@ export class VersionsApi { */ public get(filterId: number): FilterVersionData | undefined { if (!this.versions) { - throw new Error("Filter versions are not initialized"); + throw new Error('Filter versions are not initialized'); } return this.versions[filterId]; @@ -102,7 +102,7 @@ export class VersionsApi { */ public async set(filterId: number, data: FilterVersionData): Promise { if (!this.versions) { - throw new Error("Filter versions are not initialized"); + throw new Error('Filter versions are not initialized'); } this.versions[filterId] = data; @@ -117,7 +117,7 @@ export class VersionsApi { */ public async delete(filterId: number): Promise { if (!this.versions) { - throw new Error("Filter versions are not initialized"); + throw new Error('Filter versions are not initialized'); } delete this.versions[filterId]; diff --git a/packages/adguard-api/src/background/index.ts b/packages/adguard-api/src/background/index.ts index 420989ef3..b14457d3f 100644 --- a/packages/adguard-api/src/background/index.ts +++ b/packages/adguard-api/src/background/index.ts @@ -16,15 +16,15 @@ * along with Adguard API. If not, see . */ -export { MESSAGE_HANDLER_NAME } from "@adguard/tswebextension"; +export { MESSAGE_HANDLER_NAME } from '@adguard/tswebextension'; // API entry point // API Configuration type -export type { Configuration } from "./schemas"; +export type { Configuration } from './schemas'; // Request blocking event type -export type { RequestBlockingEvent } from "./request-blocking-logger"; +export type { RequestBlockingEvent } from './request-blocking-logger'; // Public interface -export { AdguardApi } from "./main"; +export { AdguardApi } from './main'; diff --git a/packages/adguard-api/src/background/main.ts b/packages/adguard-api/src/background/main.ts index d02a1a7b8..cc69a972c 100644 --- a/packages/adguard-api/src/background/main.ts +++ b/packages/adguard-api/src/background/main.ts @@ -22,15 +22,20 @@ import { type MessageHandlerMV2, EventChannel, createTsWebExtension, -} from "@adguard/tswebextension"; +} from '@adguard/tswebextension'; -import { Network } from "./network"; -import { Storage } from "./storage"; -import { FiltersApi, FiltersUpdateService, LocaleDetectService } from "./filters"; -import { Configuration, configurationValidator } from "./schemas"; -import { DeleteFiltersEvent, DetectFiltersEvent, notifier, NotifierEventType } from "./notifier"; -import { RequestBlockingLogger } from "./request-blocking-logger"; -import { Logger } from "./logger"; +import { Network } from './network'; +import { Storage } from './storage'; +import { FiltersApi, FiltersUpdateService, LocaleDetectService } from './filters'; +import { Configuration, configurationValidator } from './schemas'; +import { + DeleteFiltersEvent, + DetectFiltersEvent, + notifier, + NotifierEventType, +} from './notifier'; +import { RequestBlockingLogger } from './request-blocking-logger'; +import { Logger } from './logger'; /** * By the rules of Firefox AMO we cannot use remote scripts (and our JS rules can be counted as such). @@ -42,9 +47,9 @@ import { Logger } from "./logger"; * 3. We also allow "User rules" to work since those rules are added manually by the user. * This way filters maintainers can test new rules before including them in the filters. */ -import localScriptRules from "../local_script_rules.json"; +import localScriptRules from '../local_script_rules.json'; -export const WEB_ACCESSIBLE_RESOURCES_PATH = "adguard"; +export const WEB_ACCESSIBLE_RESOURCES_PATH = 'adguard'; /** * AdGuard API is filtering library, provided following features: @@ -226,7 +231,7 @@ export class AdguardApi { */ private async createTsWebExtensionConfiguration(): Promise { if (!this.configuration) { - throw new Error("Api configuration is not set"); + throw new Error('Api configuration is not set'); } let allowlistInverted = false; @@ -250,7 +255,7 @@ export class AdguardApi { userrules, settings: { documentBlockingPageUrl: this.configuration.documentBlockingPageUrl, - assistantUrl: "adguard-assistant.js", + assistantUrl: 'adguard-assistant.js', filteringEnabled: this.configuration.filteringEnabled, debugScriptlets: false, stealthModeEnabled: true, @@ -280,7 +285,7 @@ export class AdguardApi { await this.tswebextension.configure(tsWebExtensionConfig); - this.logger.info("Reload engine with updated filter ids list"); + this.logger.info('Reload engine with updated filter ids list'); } /** @@ -307,7 +312,7 @@ export class AdguardApi { */ private async handleDetectFilters(event: DetectFiltersEvent): Promise { if (!this.configuration) { - throw new Error("Api configuration is not set"); + throw new Error('Api configuration is not set'); } const { filters: currentFilters } = this.configuration; diff --git a/packages/adguard-api/src/background/network.ts b/packages/adguard-api/src/background/network.ts index f07f15004..dab14adc3 100644 --- a/packages/adguard-api/src/background/network.ts +++ b/packages/adguard-api/src/background/network.ts @@ -16,10 +16,10 @@ * along with Adguard API. If not, see . */ -import FiltersDownloader, { type DefinedExpressions } from "@adguard/filters-downloader/browser"; +import { FiltersDownloader, type DefinedExpressions } from '@adguard/filters-downloader/browser'; -import { UserAgent } from "./utils"; -import { metadataValidator, Metadata, Configuration } from "./schemas"; +import { UserAgent } from './utils'; +import { metadataValidator, Metadata, Configuration } from './schemas'; /** * Network requests API @@ -64,10 +64,10 @@ export class Network { */ public async downloadFilterRules(filterId: number): Promise { if (!this.filterRulesUrl) { - throw new Error("filterRulesUrl option is not set"); + throw new Error('filterRulesUrl option is not set'); } - const url = this.filterRulesUrl.replace("{filter_id}", String(filterId)); + const url = this.filterRulesUrl.replace('{filter_id}', String(filterId)); return FiltersDownloader.download(url, this.filterCompilerConditionsConstants); } @@ -80,7 +80,7 @@ export class Network { */ public async downloadFiltersMetadata(): Promise { if (!this.filtersMetadataUrl) { - throw new Error("filtersMetadataUrl option is not set"); + throw new Error('filtersMetadataUrl option is not set'); } const response = await fetch(this.filtersMetadataUrl); diff --git a/packages/adguard-api/src/background/notifier.ts b/packages/adguard-api/src/background/notifier.ts index 9c72168b8..99877ad00 100644 --- a/packages/adguard-api/src/background/notifier.ts +++ b/packages/adguard-api/src/background/notifier.ts @@ -17,9 +17,9 @@ */ export enum NotifierEventType { - DetectFilters = "DetectFilters", - UpdateFilters = "UpdateFilters", - DeleteFilters = "DeleteFilters", + DetectFilters = 'DetectFilters', + UpdateFilters = 'UpdateFilters', + DeleteFilters = 'DeleteFilters', } export type DetectFiltersEvent = { diff --git a/packages/adguard-api/src/background/request-blocking-logger.ts b/packages/adguard-api/src/background/request-blocking-logger.ts index b21c05ea3..1f2eddf4d 100644 --- a/packages/adguard-api/src/background/request-blocking-logger.ts +++ b/packages/adguard-api/src/background/request-blocking-logger.ts @@ -23,7 +23,7 @@ import { EventChannel, EventChannelListener, FilteringEventType, -} from "@adguard/tswebextension"; +} from '@adguard/tswebextension'; export type RequestBlockingEvent = { // Tab identifier. @@ -75,7 +75,13 @@ export class RequestBlockingLogger implements RequestBlockingLoggerInterface { * @param event - {@link ApplyBasicRuleEvent} */ private onBasicRuleApply(event: ApplyBasicRuleEvent): void { - const { rule, tabId, requestUrl, requestType, frameUrl } = event.data; + const { + rule, + tabId, + requestUrl, + requestType, + frameUrl, + } = event.data; // exclude allowlist rules if (rule.isAllowlist()) { diff --git a/packages/adguard-api/src/background/schemas/configuration/configuration.ts b/packages/adguard-api/src/background/schemas/configuration/configuration.ts index 28076d68b..ff18ec64f 100644 --- a/packages/adguard-api/src/background/schemas/configuration/configuration.ts +++ b/packages/adguard-api/src/background/schemas/configuration/configuration.ts @@ -16,7 +16,7 @@ * along with Adguard API. If not, see . */ -import zod from "zod"; +import zod from 'zod'; /** * {@link AdguardApi} configuration runtime validator diff --git a/packages/adguard-api/src/background/schemas/configuration/index.ts b/packages/adguard-api/src/background/schemas/configuration/index.ts index c5a691540..875105ce7 100644 --- a/packages/adguard-api/src/background/schemas/configuration/index.ts +++ b/packages/adguard-api/src/background/schemas/configuration/index.ts @@ -19,4 +19,4 @@ // Configuration schema entry point // AdguardApi configuration type and runtime validator -export * from "./configuration"; +export * from './configuration'; diff --git a/packages/adguard-api/src/background/schemas/filter-version/filter-version.ts b/packages/adguard-api/src/background/schemas/filter-version/filter-version.ts index ddda067ad..c3507694f 100644 --- a/packages/adguard-api/src/background/schemas/filter-version/filter-version.ts +++ b/packages/adguard-api/src/background/schemas/filter-version/filter-version.ts @@ -16,8 +16,8 @@ * along with Adguard API. If not, see . */ -import zod from "zod"; -import { SchemaPreprocessor } from "../preprocessor"; +import zod from 'zod'; +import { SchemaPreprocessor } from '../preprocessor'; /** * Runtime validator for persistent filter version data diff --git a/packages/adguard-api/src/background/schemas/filter-version/index.ts b/packages/adguard-api/src/background/schemas/filter-version/index.ts index 5c75bc66f..13db09066 100644 --- a/packages/adguard-api/src/background/schemas/filter-version/index.ts +++ b/packages/adguard-api/src/background/schemas/filter-version/index.ts @@ -19,4 +19,4 @@ // Filter version schema entry point // Filter version validators and types -export * from "./filter-version"; +export * from './filter-version'; diff --git a/packages/adguard-api/src/background/schemas/index.ts b/packages/adguard-api/src/background/schemas/index.ts index 7f64db9c5..6e0057fc9 100644 --- a/packages/adguard-api/src/background/schemas/index.ts +++ b/packages/adguard-api/src/background/schemas/index.ts @@ -19,10 +19,10 @@ // Schemas entry point // Api Configuration schema entry point -export * from "./configuration"; +export * from './configuration'; // Metadata schema entry point -export * from "./metadata"; +export * from './metadata'; // Filter version data entry point -export * from "./filter-version"; +export * from './filter-version'; diff --git a/packages/adguard-api/src/background/schemas/metadata/filter.ts b/packages/adguard-api/src/background/schemas/metadata/filter.ts index c0e57a171..8036858be 100644 --- a/packages/adguard-api/src/background/schemas/metadata/filter.ts +++ b/packages/adguard-api/src/background/schemas/metadata/filter.ts @@ -16,7 +16,7 @@ * along with Adguard API. If not, see . */ -import zod, { z } from "zod"; +import zod, { z } from 'zod'; /** * Filter metadata item runtime validator diff --git a/packages/adguard-api/src/background/schemas/metadata/group.ts b/packages/adguard-api/src/background/schemas/metadata/group.ts index f12af84a4..720a3b10c 100644 --- a/packages/adguard-api/src/background/schemas/metadata/group.ts +++ b/packages/adguard-api/src/background/schemas/metadata/group.ts @@ -16,7 +16,7 @@ * along with Adguard API. If not, see . */ -import zod from "zod"; +import zod from 'zod'; /** * Filter group metadata item runtime validator diff --git a/packages/adguard-api/src/background/schemas/metadata/index.ts b/packages/adguard-api/src/background/schemas/metadata/index.ts index 5efeeef73..df1fa0212 100644 --- a/packages/adguard-api/src/background/schemas/metadata/index.ts +++ b/packages/adguard-api/src/background/schemas/metadata/index.ts @@ -19,13 +19,13 @@ // Metadata schema entry point // Metadata runtime validator and types -export * from "./metadata"; +export * from './metadata'; // Filter metadata item runtime validator and types -export * from "./filter"; +export * from './filter'; // Filter tag metadata item runtime validator and types -export * from "./tag"; +export * from './tag'; // Filter group metadata item runtime validator and types -export * from "./group"; +export * from './group'; diff --git a/packages/adguard-api/src/background/schemas/metadata/metadata.ts b/packages/adguard-api/src/background/schemas/metadata/metadata.ts index e0a258670..04f168a8c 100644 --- a/packages/adguard-api/src/background/schemas/metadata/metadata.ts +++ b/packages/adguard-api/src/background/schemas/metadata/metadata.ts @@ -16,11 +16,11 @@ * along with Adguard API. If not, see . */ -import zod from "zod"; +import zod from 'zod'; -import { filterMetadataValidator } from "./filter"; -import { tagMetadataValidator } from "./tag"; -import { groupMetadataValidator } from "./group"; +import { filterMetadataValidator } from './filter'; +import { tagMetadataValidator } from './tag'; +import { groupMetadataValidator } from './group'; /** * Metadata runtime validator diff --git a/packages/adguard-api/src/background/schemas/metadata/tag.ts b/packages/adguard-api/src/background/schemas/metadata/tag.ts index 4d437f5e8..68e354003 100644 --- a/packages/adguard-api/src/background/schemas/metadata/tag.ts +++ b/packages/adguard-api/src/background/schemas/metadata/tag.ts @@ -16,7 +16,7 @@ * along with Adguard API. If not, see . */ -import zod from "zod"; +import zod from 'zod'; /** * Filter tag metadata item runtime validator diff --git a/packages/adguard-api/src/background/schemas/preprocessor.ts b/packages/adguard-api/src/background/schemas/preprocessor.ts index 916044211..8c363fc63 100644 --- a/packages/adguard-api/src/background/schemas/preprocessor.ts +++ b/packages/adguard-api/src/background/schemas/preprocessor.ts @@ -16,7 +16,7 @@ * along with Adguard API. If not, see . */ -import zod from "zod"; +import zod from 'zod'; /** * In some cases we want to preprocessing input before validation @@ -42,7 +42,7 @@ export class SchemaPreprocessor { * @returns number value, if string passed, else returns original value */ private static castStringToNumber(value: unknown): number | unknown { - if (typeof value === "string") { + if (typeof value === 'string') { return Number(value); } @@ -56,7 +56,7 @@ export class SchemaPreprocessor { * @returns boolean value, if string passed, else returns original value */ private static castStringToBoolean(value: unknown): boolean | unknown { - if (typeof value === "string") { + if (typeof value === 'string') { try { return Boolean(JSON.parse(value)); } catch (e) { diff --git a/packages/adguard-api/src/background/storage.ts b/packages/adguard-api/src/background/storage.ts index 42203400d..a09a7a1ce 100644 --- a/packages/adguard-api/src/background/storage.ts +++ b/packages/adguard-api/src/background/storage.ts @@ -16,7 +16,7 @@ * along with Adguard API. If not, see . */ -import browser from "webextension-polyfill"; +import browser from 'webextension-polyfill'; /** * Dev-friendly API for key-value extension storage diff --git a/packages/adguard-api/src/background/utils/browser-utils.ts b/packages/adguard-api/src/background/utils/browser-utils.ts index 80e82c2cf..6a831355b 100644 --- a/packages/adguard-api/src/background/utils/browser-utils.ts +++ b/packages/adguard-api/src/background/utils/browser-utils.ts @@ -16,7 +16,7 @@ * along with Adguard API. If not, see . */ -import { Version } from "./version"; +import { Version } from './version'; /** * Helper class for working with browser extension context diff --git a/packages/adguard-api/src/background/utils/i18n.ts b/packages/adguard-api/src/background/utils/i18n.ts index 11aaea622..8fe7c92b5 100644 --- a/packages/adguard-api/src/background/utils/i18n.ts +++ b/packages/adguard-api/src/background/utils/i18n.ts @@ -28,13 +28,13 @@ export class I18n { * @returns matched locale or null, if locale is not found */ public static find(locales: string[], locale: string): string | null { - const lang = locale.replace("-", "_"); + const lang = locale.replace('-', '_'); if (locales.includes(lang)) { return lang; } - const [localePart] = lang.split("_"); + const [localePart] = lang.split('_'); if (localePart && locales.includes(localePart)) { return localePart; diff --git a/packages/adguard-api/src/background/utils/index.ts b/packages/adguard-api/src/background/utils/index.ts index 7e7ddc7a3..96a8c4b15 100644 --- a/packages/adguard-api/src/background/utils/index.ts +++ b/packages/adguard-api/src/background/utils/index.ts @@ -19,10 +19,10 @@ // Entry point for API helper classes // Helper class for working with browser extension context -export { BrowserUtils } from "./browser-utils"; +export { BrowserUtils } from './browser-utils'; // Helper class for user agent data -export { UserAgent } from "./user-agent"; +export { UserAgent } from './user-agent'; // Helper class for working with i18n locales -export { I18n } from "./i18n"; +export { I18n } from './i18n'; diff --git a/packages/adguard-api/src/background/utils/user-agent.ts b/packages/adguard-api/src/background/utils/user-agent.ts index 8d677978c..15da2399e 100644 --- a/packages/adguard-api/src/background/utils/user-agent.ts +++ b/packages/adguard-api/src/background/utils/user-agent.ts @@ -71,39 +71,39 @@ type BrowserData = { export class UserAgent { private static browserDataMap: Record = { Chrome: { - brand: "Google Chrome", - uaStringName: "Chrome", + brand: 'Google Chrome', + uaStringName: 'Chrome', }, Firefox: { - uaStringName: "Firefox", + uaStringName: 'Firefox', }, Safari: { - uaStringName: "Safari", + uaStringName: 'Safari', }, Opera: { - brand: "Opera", - uaStringName: "OPR", + brand: 'Opera', + uaStringName: 'OPR', }, YaBrowser: { - brand: "Yandex", - uaStringName: "YaBrowser", + brand: 'Yandex', + uaStringName: 'YaBrowser', }, Edge: { - uaStringName: "edge", + uaStringName: 'edge', }, EdgeChromium: { - brand: "Microsoft Edge", - uaStringName: "edg", + brand: 'Microsoft Edge', + uaStringName: 'edg', }, }; - public static isChrome = UserAgent.isTargetBrowser("Chrome"); + public static isChrome = UserAgent.isTargetBrowser('Chrome'); - public static isFirefox = UserAgent.isTargetBrowser("Firefox"); + public static isFirefox = UserAgent.isTargetBrowser('Firefox'); - public static isOpera = UserAgent.isTargetBrowser("Opera"); + public static isOpera = UserAgent.isTargetBrowser('Opera'); - public static isEdge = UserAgent.isTargetBrowser("Edge"); + public static isEdge = UserAgent.isTargetBrowser('Edge'); /** * Check if current browser is as given diff --git a/packages/adguard-api/src/background/utils/version.ts b/packages/adguard-api/src/background/utils/version.ts index 8816bcd9b..ac59f5e8c 100644 --- a/packages/adguard-api/src/background/utils/version.ts +++ b/packages/adguard-api/src/background/utils/version.ts @@ -35,14 +35,14 @@ export class Version { public data: number[] = []; constructor(version: string) { - const parts = String(version || "").split(".", Version.MAX_LENGTH); + const parts = String(version || '').split('.', Version.MAX_LENGTH); for (let i = 0; i < Version.MAX_LENGTH; i += 1) { - if (parts[i] === "") { + if (parts[i] === '') { throw new Error(`Found empty part in string '${version}'`); } - const part = parts[i] || "0"; + const part = parts[i] || '0'; if (Number.isNaN(Number.parseInt(part, 10))) { throw new Error(`Can not parse '${version}' string`); @@ -64,8 +64,8 @@ export class Version { const leftPart = this.data[i]; const rightPart = version?.data?.[i]; - if (typeof leftPart !== "number" || typeof rightPart !== "number") { - throw new Error("Can not compare versions"); + if (typeof leftPart !== 'number' || typeof rightPart !== 'number') { + throw new Error('Can not compare versions'); } if (leftPart > rightPart) { diff --git a/packages/adguard-api/src/content-script/assistant.ts b/packages/adguard-api/src/content-script/assistant.ts index b902f3b70..0c9be2dbd 100644 --- a/packages/adguard-api/src/content-script/assistant.ts +++ b/packages/adguard-api/src/content-script/assistant.ts @@ -15,4 +15,4 @@ * You should have received a copy of the GNU General Public License * along with Adguard API. If not, see . */ -import "@adguard/tswebextension/assistant-inject"; +import '@adguard/tswebextension/assistant-inject'; diff --git a/packages/adguard-api/src/content-script/index.ts b/packages/adguard-api/src/content-script/index.ts index 82db7d12a..8b516974e 100644 --- a/packages/adguard-api/src/content-script/index.ts +++ b/packages/adguard-api/src/content-script/index.ts @@ -16,4 +16,4 @@ * along with Adguard API. If not, see . */ -import "@adguard/tswebextension/content-script"; +import '@adguard/tswebextension/content-script'; diff --git a/packages/adguard-api/tsconfig.json b/packages/adguard-api/tsconfig.json index fc0335ac8..60e0cae16 100644 --- a/packages/adguard-api/tsconfig.json +++ b/packages/adguard-api/tsconfig.json @@ -8,12 +8,13 @@ "tasks/**/*.ts", "constants.ts", "rollup.config.ts", + ".eslintrc.js" ], "ts-node": { "swc": true, "compilerOptions": { "module": "nodenext", - "moduleResolution": "nodenext", + "moduleResolution": "nodenext" } } -} \ No newline at end of file +} diff --git a/packages/examples/adguard-api/.editorconfig b/packages/examples/adguard-api/.editorconfig index c172d113b..e62bc058a 100644 --- a/packages/examples/adguard-api/.editorconfig +++ b/packages/examples/adguard-api/.editorconfig @@ -4,4 +4,4 @@ insert_final_newline = true end_of_line = lf indent_style = space indent_size = 4 -max_line_length = 120 \ No newline at end of file +max_line_length = 120 diff --git a/packages/examples/adguard-api/.eslintrc.js b/packages/examples/adguard-api/.eslintrc.js index 509a36e44..09c9da8a2 100644 --- a/packages/examples/adguard-api/.eslintrc.js +++ b/packages/examples/adguard-api/.eslintrc.js @@ -10,16 +10,32 @@ module.exports = { env: { browser: true, }, + plugins: [ + 'import', + 'import-newlines', + ], extends: [ 'airbnb-base', 'airbnb-typescript/base', 'plugin:jsdoc/recommended', - 'plugin:prettier/recommended' + 'plugin:@typescript-eslint/eslint-recommended', ], rules: { - 'import/prefer-default-export': 0, + indent: 'off', + '@typescript-eslint/indent': ['error', 4], 'jsdoc/require-param-type': 0, 'jsdoc/require-returns-type': 0, - + 'no-bitwise': 'off', + 'no-new': 'off', + 'max-len': ['error', { code: 120, ignoreUrls: true }], + 'import-newlines/enforce': ['error', 3, 120], + 'import/prefer-default-export': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + 'no-continue': 'off', + 'import/no-extraneous-dependencies': ['error', { devDependencies: true }], + 'no-restricted-syntax': ['error', 'LabeledStatement', 'WithStatement'], + 'no-constant-condition': ['error', { checkLoops: false }], + '@typescript-eslint/interface-name-prefix': 'off', + 'arrow-body-style': 'off', }, }; diff --git a/packages/examples/adguard-api/.prettierrc.js b/packages/examples/adguard-api/.prettierrc.js deleted file mode 100644 index 66c9e4b71..000000000 --- a/packages/examples/adguard-api/.prettierrc.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - editorConfig: true, -}; diff --git a/packages/examples/adguard-api/extension/src/index.ts b/packages/examples/adguard-api/extension/src/index.ts index bc89e4d45..1df72f440 100644 --- a/packages/examples/adguard-api/extension/src/index.ts +++ b/packages/examples/adguard-api/extension/src/index.ts @@ -1,6 +1,11 @@ /* eslint-disable no-console */ -import browser from "webextension-polyfill"; -import { AdguardApi, Configuration, RequestBlockingEvent, MESSAGE_HANDLER_NAME } from "@adguard/api"; +import browser from 'webextension-polyfill'; +import { + AdguardApi, + type Configuration, + type RequestBlockingEvent, + MESSAGE_HANDLER_NAME, +} from '@adguard/api'; (async (): Promise => { // create new AdguardApi instance @@ -12,10 +17,10 @@ import { AdguardApi, Configuration, RequestBlockingEvent, MESSAGE_HANDLER_NAME } 215, // example of obsoleted filter. ], filteringEnabled: true, - allowlist: ["www.example.com"], - rules: ["example.org##h1"], - filterRulesUrl: "https://filters.adtidy.org/extension/chromium/filters/{filter_id}.txt", - filtersMetadataUrl: "https://filters.adtidy.org/extension/chromium/filters.json", + allowlist: ['www.example.com'], + rules: ['example.org##h1'], + filterRulesUrl: 'https://filters.adtidy.org/extension/chromium/filters/{filter_id}.txt', + filtersMetadataUrl: 'https://filters.adtidy.org/extension/chromium/filters.json', }; // console log event on request blocking @@ -25,22 +30,22 @@ import { AdguardApi, Configuration, RequestBlockingEvent, MESSAGE_HANDLER_NAME } // console log current rules count, loaded in engine const logTotalCount = (): void => { - console.log("Total rules count:", adguardApi.getRulesCount()); + console.log('Total rules count:', adguardApi.getRulesCount()); }; adguardApi.onRequestBlocked.addListener(onRequestBlocked); configuration = await adguardApi.start(configuration); - console.log("Finished Adguard API initialization."); - console.log("Applied configuration: ", JSON.stringify(configuration)); + console.log('Finished Adguard API initialization.'); + console.log('Applied configuration: ', JSON.stringify(configuration)); logTotalCount(); - configuration.allowlist!.push("www.google.com"); + configuration.allowlist!.push('www.google.com'); await adguardApi.configure(configuration); - console.log("Finished Adguard API re-configuration"); + console.log('Finished Adguard API re-configuration'); logTotalCount(); const onAssistantCreateRule = async (rule: string) => { @@ -48,7 +53,7 @@ import { AdguardApi, Configuration, RequestBlockingEvent, MESSAGE_HANDLER_NAME } console.log(`Rule ${rule} was created by Adguard Assistant`); configuration.rules!.push(rule); await adguardApi.configure(configuration); - console.log("Finished Adguard API re-configuration"); + console.log('Finished Adguard API re-configuration'); logTotalCount(); }; @@ -60,7 +65,7 @@ import { AdguardApi, Configuration, RequestBlockingEvent, MESSAGE_HANDLER_NAME } await adguardApi.configure(configuration); - console.log("Finished Adguard API re-configuration"); + console.log('Finished Adguard API re-configuration'); logTotalCount(); }; @@ -73,7 +78,7 @@ import { AdguardApi, Configuration, RequestBlockingEvent, MESSAGE_HANDLER_NAME } // define custom message handler const handleAppMessage = async (message: any) => { switch (message.type) { - case "OPEN_ASSISTANT": { + case 'OPEN_ASSISTANT': { const active = await browser.tabs.query({ active: true }); if (active[0]?.id) { await adguardApi.openAssistant(active[0].id); @@ -99,6 +104,6 @@ import { AdguardApi, Configuration, RequestBlockingEvent, MESSAGE_HANDLER_NAME } adguardApi.onAssistantCreateRule.unsubscribe(onAssistantCreateRule); adguardApi.onFiltersDeletion.unsubscribe(onFiltersDeletion); await adguardApi.stop(); - console.log("Adguard API has been disabled."); + console.log('Adguard API has been disabled.'); }, 60 * 1000); })(); diff --git a/packages/examples/adguard-api/package.json b/packages/examples/adguard-api/package.json index 1aef93b64..5b6581a69 100644 --- a/packages/examples/adguard-api/package.json +++ b/packages/examples/adguard-api/package.json @@ -1,38 +1,40 @@ { - "name": "adguard-api-example", - "version": "0.0.1", - "description": "Sample extension based on @adguard/api", - "author": "Adguard Software Ltd.", - "license": "GPL-3.0", - "scripts": { - "build": "node -r @swc-node/register ./scripts/build/index.ts", - "lint": "eslint 'extension/**/*.ts' 'scripts/**/*.ts'", - "tswebextension": "tswebextension" - }, - "dependencies": { - "@adguard/api": "^2.1.0", - "webextension-polyfill": "^0.10.0" - }, - "devDependencies": { - "@adguard/tswebextension": "^1.0.0", - "@swc-node/register": "^1.6.6", - "@swc/core": "^1.3.75", - "@types/webextension-polyfill": "^0.10.7", - "@typescript-eslint/eslint-plugin": "^5.41.0", - "@typescript-eslint/parser": "^5.41.0", - "clean-webpack-plugin": "^4.0.0", - "copy-webpack-plugin": "^10.0.0", - "eslint": "^8.6.0", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-airbnb-typescript": "^16.1.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-import": "^2.25.4", - "eslint-plugin-jsdoc": "^39.3.24", - "eslint-plugin-prettier": "^4.2.1", - "eslint-webpack-plugin": "^3.2.0", - "html-webpack-plugin": "^5.5.0", - "prettier": "^2.7.1", - "swc-loader": "^0.2.3", - "webpack": "^5.64.2" - } + "name": "adguard-api-example", + "version": "0.0.1", + "description": "Sample extension based on @adguard/api", + "author": "Adguard Software Ltd.", + "license": "GPL-3.0", + "scripts": { + "build": "rimraf build && node -r @swc-node/register ./scripts/build/index.ts", + "lint": "eslint 'extension/**/*.ts' 'scripts/**/*.ts'" + }, + "dependencies": { + "@adguard/api": "workspace:^", + "webextension-polyfill": "^0.10.0" + }, + "devDependencies": { + "@adguard/tswebextension": "workspace:^", + "@swc-node/register": "^1.6.6", + "@swc/core": "^1.3.75", + "@types/archiver": "^6.0.2", + "@types/webextension-polyfill": "^0.10.7", + "@typescript-eslint/eslint-plugin": "^5.41.0", + "@typescript-eslint/parser": "^5.41.0", + "archiver": "^7.0.1", + "clean-webpack-plugin": "^4.0.0", + "copy-webpack-plugin": "^10.0.0", + "crypto-browserify": "^3.12.0", + "eslint": "^8.6.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-config-airbnb-typescript": "^16.1.0", + "eslint-plugin-import": "^2.25.4", + "eslint-plugin-jsdoc": "^39.3.24", + "eslint-webpack-plugin": "^3.2.0", + "html-webpack-plugin": "^5.5.0", + "rimraf": "^5.0.5", + "stream-browserify": "^3.0.0", + "swc-loader": "^0.2.3", + "vm-browserify": "^1.1.2", + "webpack": "^5.64.2" + } } diff --git a/packages/examples/adguard-api/scripts/build/build-runner.ts b/packages/examples/adguard-api/scripts/build/build-runner.ts index b5d73e0a9..e1a6d1b79 100644 --- a/packages/examples/adguard-api/scripts/build/build-runner.ts +++ b/packages/examples/adguard-api/scripts/build/build-runner.ts @@ -1,6 +1,5 @@ /* eslint-disable no-console */ -/* eslint-disable import/no-extraneous-dependencies */ -import webpack, { Stats, Configuration } from "webpack"; +import webpack, { Stats, Configuration } from 'webpack'; type CompilerCallback = (err?: Error | null, stats?: Stats) => void; @@ -27,8 +26,8 @@ export const buildRunner = (webpackConfig: Configuration, watch = false): Promis all: false, errors: true, moduleTrace: true, - logging: "error", - }) + logging: 'error', + }), ); reject(); return; @@ -38,7 +37,7 @@ export const buildRunner = (webpackConfig: Configuration, watch = false): Promis stats.toString({ chunks: false, // Makes the build much quieter colors: true, // Shows colors in the console - }) + }), ); resolve(); }); diff --git a/packages/examples/adguard-api/scripts/build/build.ts b/packages/examples/adguard-api/scripts/build/build.ts index ab04a94a0..2cec58f8a 100644 --- a/packages/examples/adguard-api/scripts/build/build.ts +++ b/packages/examples/adguard-api/scripts/build/build.ts @@ -1,13 +1,16 @@ /* eslint-disable no-console */ -import { copyWar } from "@adguard/tswebextension/cli"; -import { buildRunner } from "./build-runner"; -import { config } from "./webpack.config"; -import { WEB_ACCESSIBLE_RESOURCES_PATH } from "../constants"; +import { copyWar } from '@adguard/tswebextension/cli'; +import path from 'path'; +import { buildRunner } from './build-runner'; +import { config } from './webpack.config'; +import { BUILD_PATH, BUILD_ZIP_FILE_NAME, WEB_ACCESSIBLE_RESOURCES_PATH } from '../constants'; +import { zipDirectory } from './zip-directory'; const build = async () => { try { await buildRunner(config); await copyWar(WEB_ACCESSIBLE_RESOURCES_PATH); + await zipDirectory(BUILD_PATH, path.join(BUILD_PATH, '..', BUILD_ZIP_FILE_NAME)); } catch (e) { console.log(e); process.exit(1); diff --git a/packages/examples/adguard-api/scripts/build/index.ts b/packages/examples/adguard-api/scripts/build/index.ts index 026e70523..ad728f8a9 100644 --- a/packages/examples/adguard-api/scripts/build/index.ts +++ b/packages/examples/adguard-api/scripts/build/index.ts @@ -1,3 +1,3 @@ -import { build } from "./build"; +import { build } from './build'; build(); diff --git a/packages/examples/adguard-api/scripts/build/webpack.config.ts b/packages/examples/adguard-api/scripts/build/webpack.config.ts index a5623c408..2e5fb1602 100644 --- a/packages/examples/adguard-api/scripts/build/webpack.config.ts +++ b/packages/examples/adguard-api/scripts/build/webpack.config.ts @@ -1,24 +1,35 @@ -import path from "path"; -import { Configuration } from "webpack"; -import CopyWebpackPlugin from "copy-webpack-plugin"; -import HtmlWebpackPlugin from "html-webpack-plugin"; -import { CleanWebpackPlugin } from "clean-webpack-plugin"; -import { BACKGROUND_PATH, CONTENT_SCRIPT, POPUP_PATH, BUILD_PATH, ASSISTANT_INJECT } from "../constants"; +import path from 'path'; +import { Configuration } from 'webpack'; +import CopyWebpackPlugin from 'copy-webpack-plugin'; +import HtmlWebpackPlugin from 'html-webpack-plugin'; +import { CleanWebpackPlugin } from 'clean-webpack-plugin'; +import { + BACKGROUND_PATH, + CONTENT_SCRIPT, + POPUP_PATH, + BUILD_PATH, + ASSISTANT_INJECT, +} from '../constants'; export const config: Configuration = { - mode: "production", + mode: 'production', entry: { background: BACKGROUND_PATH, - "content-script": CONTENT_SCRIPT, - "adguard-assistant": ASSISTANT_INJECT, + 'content-script': CONTENT_SCRIPT, + 'adguard-assistant': ASSISTANT_INJECT, popup: POPUP_PATH, }, output: { path: BUILD_PATH, - filename: "[name].js", + filename: '[name].js', }, resolve: { - extensions: ["*", ".ts", ".js"], + extensions: ['*', '.ts', '.js'], + fallback: { + crypto: require.resolve('crypto-browserify'), + stream: require.resolve('stream-browserify'), + vm: require.resolve('vm-browserify'), + }, }, module: { rules: [ @@ -27,7 +38,7 @@ export const config: Configuration = { exclude: /node_modules/, use: [ { - loader: "swc-loader", + loader: 'swc-loader', options: { env: { targets: { @@ -48,23 +59,23 @@ export const config: Configuration = { plugins: [ new CleanWebpackPlugin(), new HtmlWebpackPlugin({ - template: path.join(BACKGROUND_PATH, "index.html"), - filename: "background.html", - chunks: ["background"], + template: path.join(BACKGROUND_PATH, 'index.html'), + filename: 'background.html', + chunks: ['background'], cache: false, }), new HtmlWebpackPlugin({ - template: path.join(POPUP_PATH, "index.html"), - filename: "popup.html", - chunks: ["popup"], + template: path.join(POPUP_PATH, 'index.html'), + filename: 'popup.html', + chunks: ['popup'], cache: false, }), new CopyWebpackPlugin({ patterns: [ { - context: "extension", - from: "manifest.json", - to: "manifest.json", + context: 'extension', + from: 'manifest.json', + to: 'manifest.json', }, ], }), diff --git a/packages/examples/adguard-api/scripts/build/zip-directory.ts b/packages/examples/adguard-api/scripts/build/zip-directory.ts new file mode 100644 index 000000000..e8d01228b --- /dev/null +++ b/packages/examples/adguard-api/scripts/build/zip-directory.ts @@ -0,0 +1,61 @@ +/* eslint-disable no-console */ +import fs from 'fs'; +// eslint-disable-next-line import/no-extraneous-dependencies +import archiver from 'archiver'; + +/** + * Asynchronously zips a directory and saves the archive to a specified output path. + * + * @param sourceDir - The source directory you want to zip. + * @param outPath - The output path for the zip file. + * @returns Promise that resolves when the archive has been finalized. + */ +export const zipDirectory = (sourceDir: string, outPath: string): Promise => { + const output = fs.createWriteStream(outPath); + const archive = archiver('zip', { + zlib: { level: 9 }, + }); + + // Explicitly typing the resolve and reject functions + let resolveArchivePromise: () => void; + let rejectArchivePromise: (error: Error) => void; + + const archivePromise = new Promise((resolve, reject) => { + resolveArchivePromise = resolve; + rejectArchivePromise = reject; + }); + + output.on('close', () => { + console.log(`Archive created successfully. Total bytes: ${archive.pointer()}`); + if (resolveArchivePromise) { + resolveArchivePromise(); + } + }); + + archive.on('warning', (err) => { + if (err.code === 'ENOENT') { + // Log warning + console.warn(err); + } else if (rejectArchivePromise) { + rejectArchivePromise(err); + } + }); + + archive.on('error', (err) => { + if (rejectArchivePromise) { + rejectArchivePromise(err); + } + }); + + // Pipe archive data to the file. + archive.pipe(output); + + // Append files from a directory, recursively. + archive.directory(sourceDir, false); + + // Begin the archiving process. + archive.finalize(); + + // Return the promise that resolves upon archive completion. + return archivePromise; +}; diff --git a/packages/examples/adguard-api/scripts/constants.ts b/packages/examples/adguard-api/scripts/constants.ts index 0208f9ab7..2276c9ec2 100644 --- a/packages/examples/adguard-api/scripts/constants.ts +++ b/packages/examples/adguard-api/scripts/constants.ts @@ -1,13 +1,15 @@ -import path from "path"; +import path from 'path'; -export const BUILD_PATH = path.join(__dirname, "../build"); +export const BUILD_PATH = path.join(__dirname, '../build/extension'); -export const WEB_ACCESSIBLE_RESOURCES_PATH = path.join(__dirname, "../build/adguard"); +export const BUILD_ZIP_FILE_NAME = 'extension.zip'; -export const BACKGROUND_PATH = path.join(__dirname, "../extension/pages/background"); +export const WEB_ACCESSIBLE_RESOURCES_PATH = path.join(__dirname, '../build/extension/adguard'); -export const CONTENT_SCRIPT = path.join(__dirname, "../extension/pages/content-script"); +export const BACKGROUND_PATH = path.join(__dirname, '../extension/pages/background'); -export const ASSISTANT_INJECT = path.join(__dirname, "../extension/pages/assistant-inject"); +export const CONTENT_SCRIPT = path.join(__dirname, '../extension/pages/content-script'); -export const POPUP_PATH = path.join(__dirname, "../extension/pages/popup"); +export const ASSISTANT_INJECT = path.join(__dirname, '../extension/pages/assistant-inject'); + +export const POPUP_PATH = path.join(__dirname, '../extension/pages/popup'); diff --git a/packages/examples/tswebextension-mv2/package.json b/packages/examples/tswebextension-mv2/package.json index 91ceb24f0..7ffdab8ee 100644 --- a/packages/examples/tswebextension-mv2/package.json +++ b/packages/examples/tswebextension-mv2/package.json @@ -14,7 +14,7 @@ "tswebextension": "tswebextension" }, "dependencies": { - "@adguard/tswebextension": "^0.3.10", + "@adguard/tswebextension": "workspace:^", "bowser": "^2.11.0", "formik": "^2.2.9", "react": "^17.0.2", diff --git a/packages/examples/tswebextension-mv3/package.json b/packages/examples/tswebextension-mv3/package.json index eb0a57d76..e4d5d1724 100644 --- a/packages/examples/tswebextension-mv3/package.json +++ b/packages/examples/tswebextension-mv3/package.json @@ -15,12 +15,12 @@ "test": "rimraf tmp && cross-env PW_EXPERIMENTAL_SERVICE_WORKER_NETWORK_EVENTS=1 node -r @swc-node/register ./scripts/browser-test/index.ts" }, "dependencies": { - "@adguard/tswebextension": "^0.3.10", + "@adguard/tswebextension": "workspace:^", "react": "^17.0.2", "react-dom": "^17.0.2" }, "devDependencies": { - "@adguard/tsurlfilter": "^2.1.7", + "@adguard/tsurlfilter": "workspace:^", "@swc-node/register": "^1.6.6", "@swc/core": "^1.3.76", "@types/chrome": "^0.0.260", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8fec1825d..bee633efb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,10 +18,10 @@ importers: specifier: ^4.3.70 version: 4.3.70 '@adguard/filters-downloader': - specifier: ^1.1.23 - version: 1.1.23 + specifier: ^2.2.0 + version: 2.2.0 '@adguard/tswebextension': - specifier: ^1.0.14 + specifier: ^1.0.22 version: link:../tswebextension webextension-polyfill: specifier: 0.10.0 @@ -69,21 +69,12 @@ importers: eslint-config-airbnb-typescript: specifier: 17.1.0 version: 17.1.0(@typescript-eslint/eslint-plugin@6.21.0)(@typescript-eslint/parser@6.13.1)(eslint-plugin-import@2.29.1)(eslint@8.54.0) - eslint-config-prettier: - specifier: ^9.0.0 - version: 9.1.0(eslint@8.54.0) eslint-plugin-import: specifier: ^2.29.0 version: 2.29.1(@typescript-eslint/parser@6.13.1)(eslint@8.54.0) eslint-plugin-jsdoc: specifier: ^46.9.0 version: 46.10.1(eslint@8.54.0) - eslint-plugin-prettier: - specifier: ^5.0.1 - version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.54.0)(prettier@3.2.5) - prettier: - specifier: ^3.1.0 - version: 3.2.5 rollup: specifier: ^4.6.0 version: 4.13.0 @@ -101,7 +92,7 @@ importers: version: 1.0.8 '@adguard/scriptlets': specifier: ^1.9.61 - version: 1.10.1 + version: 1.10.25 clone-deep: specifier: ^4.0.1 version: 4.0.1 @@ -401,14 +392,14 @@ importers: packages/examples/adguard-api: dependencies: '@adguard/api': - specifier: ^2.1.0 + specifier: workspace:^ version: link:../../adguard-api webextension-polyfill: specifier: ^0.10.0 version: 0.10.0 devDependencies: '@adguard/tswebextension': - specifier: ^1.0.0 + specifier: workspace:^ version: link:../../tswebextension '@swc-node/register': specifier: ^1.6.6 @@ -416,6 +407,9 @@ importers: '@swc/core': specifier: ^1.3.75 version: 1.4.8(@swc/helpers@0.5.7) + '@types/archiver': + specifier: ^6.0.2 + version: 6.0.2 '@types/webextension-polyfill': specifier: ^0.10.7 version: 0.10.7 @@ -425,12 +419,18 @@ importers: '@typescript-eslint/parser': specifier: ^5.41.0 version: 5.62.0(eslint@8.54.0)(typescript@5.4.2) + archiver: + specifier: ^7.0.1 + version: 7.0.1 clean-webpack-plugin: specifier: ^4.0.0 version: 4.0.0(webpack@5.90.3) copy-webpack-plugin: specifier: ^10.0.0 version: 10.2.4(webpack@5.90.3) + crypto-browserify: + specifier: ^3.12.0 + version: 3.12.0 eslint: specifier: ^8.6.0 version: 8.54.0 @@ -440,30 +440,30 @@ importers: eslint-config-airbnb-typescript: specifier: ^16.1.0 version: 16.2.0(@typescript-eslint/eslint-plugin@5.62.0)(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.29.1)(eslint@8.54.0) - eslint-config-prettier: - specifier: ^8.5.0 - version: 8.10.0(eslint@8.54.0) eslint-plugin-import: specifier: ^2.25.4 version: 2.29.1(@typescript-eslint/parser@5.62.0)(eslint@8.54.0) eslint-plugin-jsdoc: specifier: ^39.3.24 version: 39.9.1(eslint@8.54.0) - eslint-plugin-prettier: - specifier: ^4.2.1 - version: 4.2.1(eslint-config-prettier@8.10.0)(eslint@8.54.0)(prettier@2.8.8) eslint-webpack-plugin: specifier: ^3.2.0 version: 3.2.0(eslint@8.54.0)(webpack@5.90.3) html-webpack-plugin: specifier: ^5.5.0 version: 5.6.0(webpack@5.90.3) - prettier: - specifier: ^2.7.1 - version: 2.8.8 + rimraf: + specifier: ^5.0.5 + version: 5.0.5 + stream-browserify: + specifier: ^3.0.0 + version: 3.0.0 swc-loader: specifier: ^0.2.3 version: 0.2.6(@swc/core@1.4.8)(webpack@5.90.3) + vm-browserify: + specifier: ^1.1.2 + version: 1.1.2 webpack: specifier: ^5.64.2 version: 5.90.3(@swc/core@1.4.8) @@ -471,8 +471,8 @@ importers: packages/examples/tswebextension-mv2: dependencies: '@adguard/tswebextension': - specifier: ^0.3.10 - version: 0.3.22 + specifier: workspace:^ + version: link:../../tswebextension bowser: specifier: ^2.11.0 version: 2.11.0 @@ -550,8 +550,8 @@ importers: packages/examples/tswebextension-mv3: dependencies: '@adguard/tswebextension': - specifier: ^0.3.10 - version: 0.3.22 + specifier: workspace:^ + version: link:../../tswebextension react: specifier: ^17.0.2 version: 17.0.2 @@ -560,7 +560,7 @@ importers: version: 17.0.2(react@17.0.2) devDependencies: '@adguard/tsurlfilter': - specifier: ^2.1.7 + specifier: workspace:^ version: link:../../tsurlfilter '@swc-node/register': specifier: ^1.6.6 @@ -1014,6 +1014,15 @@ packages: resolution: {integrity: sha512-q5o4ejQgRQMFbtV49X1ark0Ytb+MP/3vC9XErHqAcvh6wHpN/Hm2Q1+jbhiHHIs/H2rCU20TyVwZlGs0xtQ60w==} dev: false + /@adguard/diff-builder@1.0.17: + resolution: {integrity: sha512-pKM8oUQcl8IrVyJIlqwiAUMX4manZrfe2S/a9Np3VDbnaQFbGTwW1cmQoKffmdFUwk7dEKzQ83ILm1OuOu6kZw==} + hasBin: true + dependencies: + commander: 11.1.0 + crypto-js: 4.2.0 + diff: github.com/105th/jsdiff/2be2e7df90e8eebd99f0385c7b1dc16c2f4dcc1a + dev: false + /@adguard/ecss-tree@1.0.8: resolution: {integrity: sha512-Y5dfzWH5nnzEH9URuzOQ1RXl0bzmLiGO7Nt9Wc/na7uD5UHqoz4PlzVllFpO1bLA+Cqq5ebNrz+uWRKN3BxSTg==} dependencies: @@ -1025,22 +1034,17 @@ packages: engines: {node: '>=14'} dev: false - /@adguard/filters-downloader@1.1.23: - resolution: {integrity: sha512-BPzcwtkjRZWb+m2XK1d/lD1qg0kYFBCuSf07y8Utv6ZMU82RcwRG3B1kLLLe+y2mOcz1VgW3tNN77dDzxgjP9A==} + /@adguard/filters-downloader@2.2.0: + resolution: {integrity: sha512-VhmMNR12e9Juz2SoSDEpVIGW7PxZf0FspbOkEnqfwy7nH4R3ps1nJrQ5z1YmmwaaBEzv+P1NfnRbxfIET4juCA==} engines: {node: '>=18'} dependencies: - axios: 0.21.4 + '@adguard/diff-builder': 1.0.17 + axios: 1.6.2 + crypto-js: 4.2.0 transitivePeerDependencies: - debug dev: false - /@adguard/scriptlets@1.10.1: - resolution: {integrity: sha512-tGZOmdo/KFDQ5chkKES6l9VfI8kaGCjy4i4fFEHeOvi28xm1sdSb8F7jWJpqLicqC8FjydJU72i8hhZYejRQ4Q==} - dependencies: - '@babel/runtime': 7.24.1 - js-yaml: 3.14.1 - dev: false - /@adguard/scriptlets@1.10.25: resolution: {integrity: sha512-q5s7PZ0oIizmcYQa/UI++MxQ7Cb3pdy1K9VY7yj+wtJ/xevEo/nxSLhnU/ijhSMvlAdFlGEkY898munZNfCUYA==} dependencies: @@ -1048,43 +1052,6 @@ packages: js-yaml: 3.14.1 dev: false - /@adguard/tsurlfilter@2.2.18: - resolution: {integrity: sha512-QZM3YOi+3kEW6OxGILJB9xcE99PZY+mPocME/wtKpDITEcQ/wOOV+9Qn5LBCSCEbu19gkKlLNSzBCi4FKAgv8g==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@adguard/scriptlets': 1.10.25 - cidr-tools: 6.4.2 - commander: 9.4.1 - is-cidr: 4.0.2 - is-ip: 3.1.0 - lru_map: 0.4.1 - punycode: 2.1.1 - tldts: 5.6.45 - zod: 3.19.1 - dev: false - - /@adguard/tswebextension@0.3.22: - resolution: {integrity: sha512-fp0HbO5vkR5P2kvPBsX1oI4IDXV5gvh72474UXxRElPtKAdq/SIOLLqvsWEuW9mwwjYgnQAwFTfJJl8b9dlzXQ==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@adguard/assistant': 4.3.70 - '@adguard/extended-css': 2.0.56 - '@adguard/scriptlets': 1.10.1 - '@adguard/tsurlfilter': 2.2.18 - bowser: 2.11.0 - commander: 11.0.0 - fs-extra: 11.1.1 - lru_map: 0.4.1 - nanoid: 4.0.2 - text-encoding: github.com/AdguardTeam/text-encoding/4268d6b7dc0e15f57134545ae1c8c59e9c5ced70 - tldts: 6.1.13 - tslib: 2.5.3 - webextension-polyfill: 0.10.0 - zod: 3.21.4 - dev: false - /@ampproject/remapping@2.3.0: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} @@ -3639,11 +3606,6 @@ packages: dev: true optional: true - /@pkgr/core@0.1.1: - resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - dev: true - /@rollup/plugin-alias@5.1.0(rollup@3.29.4): resolution: {integrity: sha512-lpA3RZ9PdIG7qqhEfv79tBffNaoDuukFDrmhLqg9ifv99u/ehn+lOg30x2zmhf8AQqQUZaMk/B9fZraQ6/acDQ==} engines: {node: '>=14.0.0'} @@ -4612,6 +4574,12 @@ packages: minimatch: 9.0.3 dev: true + /@types/archiver@6.0.2: + resolution: {integrity: sha512-KmROQqbQzKGuaAbmK+ZcytkJ51+YqDa7NmbXjmtC5YBLSyQYo21YaUnQ3HbaPFKL1ooo6RQ6OPYPIDyxfpDDXw==} + dependencies: + '@types/readdir-glob': 1.1.5 + dev: true + /@types/babel__core@7.20.5: resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} dependencies: @@ -4905,6 +4873,12 @@ packages: '@types/scheduler': 0.16.8 csstype: 3.1.3 + /@types/readdir-glob@1.1.5: + resolution: {integrity: sha512-raiuEPUYqXu+nvtY2Pe8s8FEmZ3x5yAH4VkLdihcPdalvsHltomrRC9BzuStrJ9yk06470hS0Crw0f1pXqD+Hg==} + dependencies: + '@types/node': 20.11.30 + dev: true + /@types/resolve@1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: @@ -5965,6 +5939,13 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true + /abort-controller@3.0.0: + resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} + engines: {node: '>=6.5'} + dependencies: + event-target-shim: 5.0.1 + dev: true + /accepts@1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} @@ -6269,6 +6250,32 @@ packages: file-type: 4.4.0 dev: true + /archiver-utils@5.0.2: + resolution: {integrity: sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==} + engines: {node: '>= 14'} + dependencies: + glob: 10.3.10 + graceful-fs: 4.2.11 + is-stream: 2.0.1 + lazystream: 1.0.1 + lodash: 4.17.21 + normalize-path: 3.0.0 + readable-stream: 4.5.2 + dev: true + + /archiver@7.0.1: + resolution: {integrity: sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==} + engines: {node: '>= 14'} + dependencies: + archiver-utils: 5.0.2 + async: 3.2.5 + buffer-crc32: 1.0.0 + readable-stream: 4.5.2 + readdir-glob: 1.1.3 + tar-stream: 3.1.7 + zip-stream: 6.0.1 + dev: true + /are-docs-informative@0.0.2: resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==} engines: {node: '>=14'} @@ -6451,6 +6458,14 @@ packages: engines: {node: '>=8'} dev: true + /asn1.js@4.10.1: + resolution: {integrity: sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==} + dependencies: + bn.js: 4.12.0 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: true + /asn1@0.2.6: resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==} dependencies: @@ -6477,7 +6492,6 @@ packages: /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - dev: true /at-least-node@1.0.0: resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} @@ -6504,14 +6518,6 @@ packages: resolution: {integrity: sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==} dev: true - /axios@0.21.4: - resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==} - dependencies: - follow-redirects: 1.15.6 - transitivePeerDependencies: - - debug - dev: false - /axios@0.24.0: resolution: {integrity: sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==} dependencies: @@ -6528,6 +6534,16 @@ packages: - debug dev: true + /axios@1.6.2: + resolution: {integrity: sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==} + dependencies: + follow-redirects: 1.15.6 + form-data: 4.0.0 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + dev: false + /axios@1.6.8: resolution: {integrity: sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==} dependencies: @@ -6538,6 +6554,10 @@ packages: - debug dev: true + /b4a@1.6.6: + resolution: {integrity: sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==} + dev: true + /babel-jest@29.7.0(@babel/core@7.24.3): resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -6670,6 +6690,12 @@ packages: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true + /bare-events@2.2.2: + resolution: {integrity: sha512-h7z00dWdG0PYOQEvChhOSWvOfkIKsdZGkWr083FgN/HyoQuebSew/cgirYqh9SCuy/hRvxc5Vy6Fw8xAmYHLkQ==} + requiresBuild: true + dev: true + optional: true + /base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} dev: true @@ -6714,6 +6740,14 @@ packages: resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} dev: true + /bn.js@4.12.0: + resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + dev: true + + /bn.js@5.2.1: + resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} + dev: true + /body-parser@1.19.1: resolution: {integrity: sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==} engines: {node: '>= 0.8'} @@ -6774,10 +6808,65 @@ packages: fill-range: 7.0.1 dev: true + /brorand@1.1.0: + resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + dev: true + /browser-process-hrtime@1.0.0: resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==} dev: true + /browserify-aes@1.2.0: + resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} + dependencies: + buffer-xor: 1.0.3 + cipher-base: 1.0.4 + create-hash: 1.2.0 + evp_bytestokey: 1.0.3 + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: true + + /browserify-cipher@1.0.1: + resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} + dependencies: + browserify-aes: 1.2.0 + browserify-des: 1.0.2 + evp_bytestokey: 1.0.3 + dev: true + + /browserify-des@1.0.2: + resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} + dependencies: + cipher-base: 1.0.4 + des.js: 1.1.0 + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: true + + /browserify-rsa@4.1.0: + resolution: {integrity: sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==} + dependencies: + bn.js: 5.2.1 + randombytes: 2.1.0 + dev: true + + /browserify-sign@4.2.3: + resolution: {integrity: sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==} + engines: {node: '>= 0.12'} + dependencies: + bn.js: 5.2.1 + browserify-rsa: 4.1.0 + create-hash: 1.2.0 + create-hmac: 1.1.7 + elliptic: 6.5.5 + hash-base: 3.0.4 + inherits: 2.0.4 + parse-asn1: 5.1.7 + readable-stream: 2.3.8 + safe-buffer: 5.2.1 + dev: true + /browserslist@4.23.0: resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -6817,6 +6906,11 @@ packages: resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} dev: true + /buffer-crc32@1.0.0: + resolution: {integrity: sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==} + engines: {node: '>=8.0.0'} + dev: true + /buffer-equal-constant-time@1.0.1: resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} dev: true @@ -6829,6 +6923,10 @@ packages: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} dev: true + /buffer-xor@1.0.3: + resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} + dev: true + /buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} dependencies: @@ -6836,6 +6934,13 @@ packages: ieee754: 1.2.1 dev: true + /buffer@6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + dev: true + /builtin-modules@3.3.0: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} @@ -7113,6 +7218,13 @@ packages: string-natural-compare: 3.0.1 dev: false + /cipher-base@1.0.4: + resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: true + /cjs-module-lexer@1.2.3: resolution: {integrity: sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==} dev: true @@ -7281,7 +7393,6 @@ packages: engines: {node: '>= 0.8'} dependencies: delayed-stream: 1.0.0 - dev: true /commander@10.0.1: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} @@ -7292,6 +7403,11 @@ packages: resolution: {integrity: sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==} engines: {node: '>=16'} + /commander@11.1.0: + resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} + engines: {node: '>=16'} + dev: false + /commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} dev: true @@ -7338,6 +7454,17 @@ packages: dot-prop: 5.3.0 dev: true + /compress-commons@6.0.2: + resolution: {integrity: sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==} + engines: {node: '>= 14'} + dependencies: + crc-32: 1.2.2 + crc32-stream: 6.0.0 + is-stream: 2.0.1 + normalize-path: 3.0.0 + readable-stream: 4.5.2 + dev: true + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true @@ -7556,6 +7683,48 @@ packages: request: 2.88.2 dev: true + /crc-32@1.2.2: + resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==} + engines: {node: '>=0.8'} + hasBin: true + dev: true + + /crc32-stream@6.0.0: + resolution: {integrity: sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==} + engines: {node: '>= 14'} + dependencies: + crc-32: 1.2.2 + readable-stream: 4.5.2 + dev: true + + /create-ecdh@4.0.4: + resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} + dependencies: + bn.js: 4.12.0 + elliptic: 6.5.5 + dev: true + + /create-hash@1.2.0: + resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} + dependencies: + cipher-base: 1.0.4 + inherits: 2.0.4 + md5.js: 1.3.5 + ripemd160: 2.0.2 + sha.js: 2.4.11 + dev: true + + /create-hmac@1.1.7: + resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + dependencies: + cipher-base: 1.0.4 + create-hash: 1.2.0 + inherits: 2.0.4 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + dev: true + /create-jest@29.7.0(@types/node@18.7.1)(ts-node@10.9.2): resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -7615,6 +7784,26 @@ packages: which: 2.0.2 dev: true + /crypto-browserify@3.12.0: + resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==} + dependencies: + browserify-cipher: 1.0.1 + browserify-sign: 4.2.3 + create-ecdh: 4.0.4 + create-hash: 1.2.0 + create-hmac: 1.1.7 + diffie-hellman: 5.0.3 + inherits: 2.0.4 + pbkdf2: 3.1.2 + public-encrypt: 4.0.3 + randombytes: 2.1.0 + randomfill: 1.0.4 + dev: true + + /crypto-js@4.2.0: + resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} + dev: false + /crypto-random-string@2.0.0: resolution: {integrity: sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==} engines: {node: '>=8'} @@ -7985,7 +8174,6 @@ packages: /delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - dev: true /delegates@1.0.0: resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} @@ -8000,6 +8188,13 @@ packages: resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==} dev: true + /des.js@1.1.0: + resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==} + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: true + /destroy@1.0.4: resolution: {integrity: sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg==} dev: true @@ -8029,6 +8224,14 @@ packages: engines: {node: '>=0.3.1'} dev: true + /diffie-hellman@5.0.3: + resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} + dependencies: + bn.js: 4.12.0 + miller-rabin: 4.0.1 + randombytes: 2.1.0 + dev: true + /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -8191,6 +8394,18 @@ packages: resolution: {integrity: sha512-hRg81qzvUEibX2lDxnFlVCHACa+LtrCPIsWAxo161LDYIB3jauf57RGsMZV9mvGwE98yGH06icj3zBEoOkxd/w==} dev: true + /elliptic@6.5.5: + resolution: {integrity: sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==} + dependencies: + bn.js: 4.12.0 + brorand: 1.1.0 + hash.js: 1.1.7 + hmac-drbg: 1.0.1 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + dev: true + /emittery@0.13.1: resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} engines: {node: '>=12'} @@ -8715,24 +8930,6 @@ packages: - eslint-plugin-import dev: true - /eslint-config-prettier@8.10.0(eslint@8.54.0): - resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - dependencies: - eslint: 8.54.0 - dev: true - - /eslint-config-prettier@9.1.0(eslint@8.54.0): - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - dependencies: - eslint: 8.54.0 - dev: true - /eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} dependencies: @@ -9255,44 +9452,6 @@ packages: eslint: 8.11.0 dev: true - /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.10.0)(eslint@8.54.0)(prettier@2.8.8): - resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} - engines: {node: '>=12.0.0'} - peerDependencies: - eslint: '>=7.28.0' - eslint-config-prettier: '*' - prettier: '>=2.0.0' - peerDependenciesMeta: - eslint-config-prettier: - optional: true - dependencies: - eslint: 8.54.0 - eslint-config-prettier: 8.10.0(eslint@8.54.0) - prettier: 2.8.8 - prettier-linter-helpers: 1.0.0 - dev: true - - /eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0)(eslint@8.54.0)(prettier@3.2.5): - resolution: {integrity: sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - '@types/eslint': '>=8.0.0' - eslint: '>=8.0.0' - eslint-config-prettier: '*' - prettier: '>=3.0.0' - peerDependenciesMeta: - '@types/eslint': - optional: true - eslint-config-prettier: - optional: true - dependencies: - eslint: 8.54.0 - eslint-config-prettier: 9.1.0(eslint@8.54.0) - prettier: 3.2.5 - prettier-linter-helpers: 1.0.0 - synckit: 0.8.8 - dev: true - /eslint-plugin-react@7.34.1(eslint@8.25.0): resolution: {integrity: sha512-N97CxlouPT1AHt8Jn0mhhN2RrADlUAsk1/atcT2KyA/l9Q/E6ll7OIGwNumFmWfZ9skV3XXccYS19h80rHtgkw==} engines: {node: '>=4'} @@ -9747,6 +9906,11 @@ packages: engines: {node: '>= 0.6'} dev: true + /event-target-shim@5.0.1: + resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} + engines: {node: '>=6'} + dev: true + /eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} dev: true @@ -9756,6 +9920,13 @@ packages: engines: {node: '>=0.8.x'} dev: true + /evp_bytestokey@1.0.3: + resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} + dependencies: + md5.js: 1.3.5 + safe-buffer: 5.2.1 + dev: true + /execa@4.1.0: resolution: {integrity: sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==} engines: {node: '>=10'} @@ -9930,8 +10101,8 @@ packages: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true - /fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} + /fast-fifo@1.3.2: + resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} dev: true /fast-glob@3.3.2: @@ -10169,7 +10340,6 @@ packages: asynckit: 0.4.0 combined-stream: 1.0.8 mime-types: 2.1.35 - dev: true /formik@2.4.5(react@17.0.2): resolution: {integrity: sha512-Gxlht0TD3vVdzMDHwkiNZqJ7Mvg77xQNfmBRrNtvzcHZs72TJppSTDKHpImCMJZwcWPBJ8jSQQ95GJzXFf1nAQ==} @@ -10806,6 +10976,30 @@ packages: engines: {node: '>= 0.4.0'} dev: true + /hash-base@3.0.4: + resolution: {integrity: sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==} + engines: {node: '>=4'} + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: true + + /hash-base@3.1.0: + resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} + engines: {node: '>=4'} + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.2 + safe-buffer: 5.2.1 + dev: true + + /hash.js@1.1.7: + resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: true + /hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -10818,6 +11012,14 @@ packages: hasBin: true dev: true + /hmac-drbg@1.0.1: + resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + dependencies: + hash.js: 1.1.7 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + dev: true + /hoist-non-react-statics@3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} dependencies: @@ -11536,6 +11738,11 @@ packages: engines: {node: '>=8'} dev: true + /is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + dev: true + /is-stream@3.0.0: resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -12637,6 +12844,13 @@ packages: package-json: 6.5.0 dev: true + /lazystream@1.0.1: + resolution: {integrity: sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==} + engines: {node: '>= 0.6.3'} + dependencies: + readable-stream: 2.3.8 + dev: true + /lcid@3.1.1: resolution: {integrity: sha512-M6T051+5QCGLBQb8id3hdvIW8+zeFV2FyBGFS9IEK5H9Wt4MueD4bW1eWikpHgZp+5xR3l5c8pZUkQsIA0BFZg==} engines: {node: '>=8'} @@ -13321,6 +13535,14 @@ packages: resolution: {integrity: sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q==} dev: true + /md5.js@1.3.5: + resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: true + /mdn-data@2.0.30: resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} @@ -13385,17 +13607,23 @@ packages: picomatch: 2.3.1 dev: true + /miller-rabin@4.0.1: + resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} + hasBin: true + dependencies: + bn.js: 4.12.0 + brorand: 1.1.0 + dev: true + /mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} - dev: true /mime-types@2.1.35: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} dependencies: mime-db: 1.52.0 - dev: true /mime@1.6.0: resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} @@ -13423,6 +13651,14 @@ packages: engines: {node: '>=4'} dev: true + /minimalistic-assert@1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + dev: true + + /minimalistic-crypto-utils@1.0.1: + resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + dev: true + /minimatch@3.0.5: resolution: {integrity: sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==} dependencies: @@ -14433,6 +14669,18 @@ packages: callsites: 3.1.0 dev: true + /parse-asn1@5.1.7: + resolution: {integrity: sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==} + engines: {node: '>= 0.10'} + dependencies: + asn1.js: 4.10.1 + browserify-aes: 1.2.0 + evp_bytestokey: 1.0.3 + hash-base: 3.0.4 + pbkdf2: 3.1.2 + safe-buffer: 5.2.1 + dev: true + /parse-css@0.1.0: resolution: {integrity: sha512-PQwcHqP7MD7yjHa7j+Vl4ptUke27t4fe9ngErHY5LFIy6qYg/YeuZ1llkMp00zJkYvqczQlJGE/C8BwZJ7/Gfw==} dev: true @@ -14558,6 +14806,17 @@ packages: engines: {node: '>=8'} dev: true + /pbkdf2@3.1.2: + resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} + engines: {node: '>=0.12'} + dependencies: + create-hash: 1.2.0 + create-hmac: 1.1.7 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + dev: true + /pend@1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} dev: true @@ -14763,25 +15022,6 @@ packages: engines: {node: '>=4'} dev: true - /prettier-linter-helpers@1.0.0: - resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} - engines: {node: '>=6.0.0'} - dependencies: - fast-diff: 1.3.0 - dev: true - - /prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} - hasBin: true - dev: true - - /prettier@3.2.5: - resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} - engines: {node: '>=14'} - hasBin: true - dev: true - /pretty-error@4.0.0: resolution: {integrity: sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==} dependencies: @@ -14811,6 +15051,11 @@ packages: resolution: {integrity: sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==} dev: true + /process@0.11.10: + resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} + engines: {node: '>= 0.6.0'} + dev: true + /promise-inflight@1.0.1: resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} peerDependencies: @@ -14872,12 +15117,22 @@ packages: /proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} - dev: true /psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} dev: true + /public-encrypt@4.0.3: + resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} + dependencies: + bn.js: 4.12.0 + browserify-rsa: 4.1.0 + create-hash: 1.2.0 + parse-asn1: 5.1.7 + randombytes: 2.1.0 + safe-buffer: 5.2.1 + dev: true + /pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} dependencies: @@ -14927,6 +15182,10 @@ packages: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true + /queue-tick@1.0.1: + resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==} + dev: true + /queue@6.0.2: resolution: {integrity: sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==} dependencies: @@ -14948,6 +15207,13 @@ packages: safe-buffer: 5.2.1 dev: true + /randomfill@1.0.4: + resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} + dependencies: + randombytes: 2.1.0 + safe-buffer: 5.2.1 + dev: true + /range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} @@ -15100,6 +15366,23 @@ packages: util-deprecate: 1.0.2 dev: true + /readable-stream@4.5.2: + resolution: {integrity: sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + abort-controller: 3.0.0 + buffer: 6.0.3 + events: 3.3.0 + process: 0.11.10 + string_decoder: 1.3.0 + dev: true + + /readdir-glob@1.1.3: + resolution: {integrity: sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==} + dependencies: + minimatch: 5.1.6 + dev: true + /real-require@0.1.0: resolution: {integrity: sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==} engines: {node: '>= 12.13.0'} @@ -15384,6 +15667,13 @@ packages: glob: 10.3.10 dev: true + /ripemd160@2.0.2: + resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + dev: true + /rollup-plugin-cleanup@3.2.1(rollup@2.77.3): resolution: {integrity: sha512-zuv8EhoO3TpnrU8MX8W7YxSbO4gmOR0ny06Lm3nkFfq0IVKdBUtHwhVzY1OAJyNCIAdLiyPnOrU0KnO0Fri1GQ==} engines: {node: ^10.14.2 || >=12.0.0} @@ -16154,6 +16444,13 @@ packages: engines: {node: '>= 0.6'} dev: true + /stream-browserify@3.0.0: + resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==} + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.2 + dev: true + /stream-shift@1.0.3: resolution: {integrity: sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==} dev: true @@ -16173,6 +16470,15 @@ packages: stream-to-array: 2.3.0 dev: true + /streamx@2.16.1: + resolution: {integrity: sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==} + dependencies: + fast-fifo: 1.3.2 + queue-tick: 1.0.1 + optionalDependencies: + bare-events: 2.2.2 + dev: true + /strict-uri-encode@1.1.0: resolution: {integrity: sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==} engines: {node: '>=0.10.0'} @@ -16413,14 +16719,6 @@ packages: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} dev: true - /synckit@0.8.8: - resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} - engines: {node: ^14.18.0 || >=16.0.0} - dependencies: - '@pkgr/core': 0.1.1 - tslib: 2.6.2 - dev: true - /tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} @@ -16450,6 +16748,14 @@ packages: readable-stream: 3.6.2 dev: true + /tar-stream@3.1.7: + resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==} + dependencies: + b4a: 1.6.6 + fast-fifo: 1.3.2 + streamx: 2.16.1 + dev: true + /tar@6.1.11: resolution: {integrity: sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==} engines: {node: '>= 10'} @@ -17349,6 +17655,10 @@ packages: extsprintf: 1.3.0 dev: true + /vm-browserify@1.1.2: + resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} + dev: true + /vscode-oniguruma@1.7.0: resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} dev: true @@ -17900,6 +18210,15 @@ packages: jszip: 3.10.1 dev: true + /zip-stream@6.0.1: + resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==} + engines: {node: '>= 14'} + dependencies: + archiver-utils: 5.0.2 + compress-commons: 6.0.2 + readable-stream: 4.5.2 + dev: true + /zod@3.19.1: resolution: {integrity: sha512-LYjZsEDhCdYET9ikFu6dVPGp2YH9DegXjdJToSzD9rO6fy4qiRYFoyEYwps88OseJlPyl2NOe2iJuhEhL7IpEA==} dev: false @@ -17911,6 +18230,13 @@ packages: /zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} + github.com/105th/jsdiff/2be2e7df90e8eebd99f0385c7b1dc16c2f4dcc1a: + resolution: {tarball: https://codeload.github.com/105th/jsdiff/tar.gz/2be2e7df90e8eebd99f0385c7b1dc16c2f4dcc1a} + name: diff + version: 5.1.1 + engines: {node: '>=0.3.1'} + dev: false + github.com/AdguardTeam/text-encoding/4268d6b7dc0e15f57134545ae1c8c59e9c5ced70: resolution: {tarball: https://codeload.github.com/AdguardTeam/text-encoding/tar.gz/4268d6b7dc0e15f57134545ae1c8c59e9c5ced70} name: text-encoding