From 6f93e05b8303c7c16e279a337c28ec040d6b3bdf Mon Sep 17 00:00:00 2001 From: Jayson Knight Date: Fri, 6 Feb 2026 23:59:33 -0500 Subject: [PATCH 01/16] Bump version to 0.11.5 Co-Authored-By: Warp --- .env | 2 +- deno.json | 2 +- package.json | 2 +- wrangler.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env b/.env index fb668a4c..3f8d49dc 100644 --- a/.env +++ b/.env @@ -3,7 +3,7 @@ # DO NOT put secrets here - use .env.local instead # Compiler version -COMPILER_VERSION=0.11.4 +COMPILER_VERSION=0.11.5 # Server port (default: 8787) PORT=8787 diff --git a/deno.json b/deno.json index 02a7b660..35591382 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@jk-com/adblock-compiler", - "version": "0.11.4", + "version": "0.11.5", "exports": "./src/index.ts", "publish": { "include": [ diff --git a/package.json b/package.json index b33075cc..aeef77ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adblock-compiler", - "version": "0.11.4", + "version": "0.11.5", "description": "Compiler-as-a-Service for adblock filter lists", "type": "module", "scripts": { diff --git a/wrangler.toml b/wrangler.toml index 6e0ff5a0..1641ab41 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -69,7 +69,7 @@ tag = "v1" # Environment variables (base - overridden by env.* sections) [vars] -COMPILER_VERSION = "0.11.4" +COMPILER_VERSION = "0.11.5" # TURNSTILE_SITE_KEY, ADMIN_KEY, etc. are loaded from .env files via .envrc # For local dev: managed by .env.development and .env.local # For production: managed via Cloudflare secrets (wrangler secret put ADMIN_KEY) From 2e441ca4e4a2d0efade3e0623910bb1fec343e56 Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Sat, 7 Feb 2026 05:24:18 +0000 Subject: [PATCH 02/16] Initial plan From 88ba21d9290dd395b789263d877fbe0b91401f9b Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Sat, 7 Feb 2026 05:26:13 +0000 Subject: [PATCH 03/16] Add direnv to Dockerfile build process Co-authored-by: jaypatrick <1800595+jaypatrick@users.noreply.github.com> --- Dockerfile | 5 +++-- README.md | 1 + docs/deployment/docker.md | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 487a4ae7..0d1dd926 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,7 @@ RUN apt-get update && apt-get install -y \ unzip \ ca-certificates \ dnsutils \ + direnv \ --no-install-recommends && \ update-ca-certificates && \ apt-get clean && \ @@ -81,8 +82,8 @@ COPY tsconfig.json ./ # Stage 3: Production runtime FROM node-base AS runtime -# Install curl for healthchecks -RUN apt-get update && apt-get install -y curl --no-install-recommends && \ +# Install curl and direnv for healthchecks and environment management +RUN apt-get update && apt-get install -y curl direnv --no-install-recommends && \ apt-get clean && rm -rf /var/lib/apt/lists/* # Copy node_modules from builder (for Wrangler) diff --git a/README.md b/README.md index a931c92b..bf54b010 100644 --- a/README.md +++ b/README.md @@ -451,6 +451,7 @@ Access the web UI at http://localhost:8787 - 🚀 Cloudflare Worker runtime with Wrangler dev server - 🌐 Full Web UI and REST API - 📊 Built-in health checks and monitoring +- 🔧 direnv integration for environment management - 🔒 Security: non-root user, minimal attack surface 📚 **[Complete Docker Guide](docs/deployment/docker.md)** - Production setups, Kubernetes deployment, CLI mode, and troubleshooting diff --git a/docs/deployment/docker.md b/docs/deployment/docker.md index e1559521..0890c3f1 100644 --- a/docs/deployment/docker.md +++ b/docs/deployment/docker.md @@ -62,6 +62,7 @@ The Docker image is built in multiple stages for optimal size and security: - ✅ Adblock Compiler library - ✅ Web UI (public/ directory) - ✅ Cloudflare Worker API (worker/) +- ✅ direnv for environment variable management - ✅ Health checks (requires curl, installed in runtime stage) - ✅ Non-root user for security From 0ff24d772464d48fdb36fceab20020c78c98d2e0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 23:54:18 +0000 Subject: [PATCH 04/16] Initial plan From da3fcda110f25c205db75b8d7451f6a433a362a3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 23:55:59 +0000 Subject: [PATCH 05/16] Fix release artifact download to exclude Docker cache artifacts Co-authored-by: jaypatrick <1800595+jaypatrick@users.noreply.github.com> --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d30b1912..f6466aa4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -187,6 +187,7 @@ jobs: uses: actions/download-artifact@v4 with: path: artifacts + pattern: hostlist-compiler-* - name: Prepare release assets run: | From ce396611f684f364c1ad4c27d6f3845e9d02be73 Mon Sep 17 00:00:00 2001 From: Jayson Knight Date: Sun, 8 Feb 2026 19:34:33 -0500 Subject: [PATCH 06/16] Create SECURITY.md for security policy Added a security policy document outlining supported versions and vulnerability reporting. --- SECURITY.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..034e8480 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +| ------- | ------------------ | +| 5.1.x | :white_check_mark: | +| 5.0.x | :x: | +| 4.0.x | :white_check_mark: | +| < 4.0 | :x: | + +## Reporting a Vulnerability + +Use this section to tell people how to report a vulnerability. + +Tell them where to go, how often they can expect to get an update on a +reported vulnerability, what to expect if the vulnerability is accepted or +declined, etc. From 17d99964fc3002dc4cdf4cda4270ec2971548f38 Mon Sep 17 00:00:00 2001 From: Jayson Knight Date: Sun, 8 Feb 2026 19:41:09 -0500 Subject: [PATCH 07/16] chore: update dependencies to latest versions - Update @adguard/agtree from v3.4.3 to v4.0.0 - Fix AGTreeParser for v4.0.0 API changes (SelectorList no longer has .value) - Update npm and deno dependencies - All tests passing (945 passed) Co-Authored-By: Warp --- deno.json | 2 +- deno.lock | 5 +- package-lock.json | 398 ++++++++++++++++------------------- package.json | 2 +- scripts/record-deployment.ts | 2 +- src/utils/AGTreeParser.ts | 8 +- 6 files changed, 199 insertions(+), 218 deletions(-) diff --git a/deno.json b/deno.json index 35591382..bb12f850 100644 --- a/deno.json +++ b/deno.json @@ -42,7 +42,7 @@ }, "imports": { "@/": "./src/", - "@adguard/agtree": "npm:@adguard/agtree@^3.4.3", + "@adguard/agtree": "npm:@adguard/agtree@^4.0.0", "@luca/cases": "jsr:@luca/cases@^1.0.0", "@std/path": "jsr:@std/path@^1.1.4", "@std/fs": "jsr:@std/fs@^1.0.22", diff --git a/deno.lock b/deno.lock index 46b3cc41..d4fd5f4c 100644 --- a/deno.lock +++ b/deno.lock @@ -14,7 +14,6 @@ "jsr:@std/path@^1.1.4": "1.1.4", "jsr:@std/testing@^1.0.17": "1.0.17", "jsr:@std/yaml@*": "1.0.10", - "npm:@adguard/agtree@^3.4.3": "3.4.3", "npm:@cloudflare/playwright-mcp@^0.0.5": "0.0.5_@cloudflare+workers-types@4.20260207.0", "npm:@cloudflare/workers-types@^4.20260207.0": "4.20260207.0", "npm:@electric-sql/pglite@~0.3.15": "0.3.15", @@ -2055,7 +2054,7 @@ "jsr:@std/fs@^1.0.22", "jsr:@std/path@^1.1.4", "jsr:@std/testing@^1.0.17", - "npm:@adguard/agtree@^3.4.3", + "npm:@adguard/agtree@4", "npm:@cloudflare/workers-types@^4.20260207.0", "npm:@prisma/adapter-pg@^7.3.0", "npm:@prisma/client@^7.3.0", @@ -2063,7 +2062,7 @@ ], "packageJson": { "dependencies": [ - "npm:@adguard/agtree@^3.4.3", + "npm:@adguard/agtree@4", "npm:@cloudflare/playwright-mcp@^0.0.5", "npm:@cloudflare/workers-types@^4.20260207.0", "npm:@electric-sql/pglite@~0.3.15", diff --git a/package-lock.json b/package-lock.json index 51404b46..d9afbdf9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "adblock-compiler", - "version": "0.11.4", + "version": "0.11.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "adblock-compiler", - "version": "0.11.4", + "version": "0.11.5", "dependencies": { - "@adguard/agtree": "^3.4.3", + "@adguard/agtree": "^4.0.0", "@electric-sql/pglite": "^0.3.15" }, "devDependencies": { @@ -18,19 +18,19 @@ } }, "node_modules/@adguard/agtree": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/@adguard/agtree/-/agtree-3.4.3.tgz", - "integrity": "sha512-T838KvYtWu3K6whQ46YLaIXYA7PbszX9QRp4dvNfF8iWdp98tcKHxXWslBwUN1DkcBOqqj4rrkarLmcwT2iAbg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@adguard/agtree/-/agtree-4.0.0.tgz", + "integrity": "sha512-K0C26AidT3G6O6zBWDDhIRkbYxpSS5gV8UMVlWX5eqJ0c/vd/eGtIOg0nKxpD0Qi7xphiHzAPjVYbGkfx0qwtA==", "license": "MIT", "dependencies": { "@adguard/css-tokenizer": "^1.2.0", "camelcase-keys": "^7.0.2", "clone-deep": "^4.0.1", + "glob-to-regexp": "^0.4.1", "is-ip": "3.1.0", "json5": "^2.2.3", "sprintf-js": "^1.1.3", "tldts": "^5.7.112", - "xregexp": "^5.1.1", "zod": "3.24.4" }, "engines": { @@ -65,6 +65,86 @@ "node": ">=18" } }, + "node_modules/@ai-sdk/provider-utils": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-2.2.8.tgz", + "integrity": "sha512-fqhG+4sCVv8x7nFzYnFo19ryhAa3w096Kmc3hWxMQfW/TubPOmt3A6tYZhl4mUfQWWQMsuSkLrtjlWuXBVSGQA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@ai-sdk/provider": "1.1.3", + "nanoid": "^3.3.8", + "secure-json-parse": "^2.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "zod": "^3.23.8" + } + }, + "node_modules/@ai-sdk/provider-utils/node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/@ai-sdk/react": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@ai-sdk/react/-/react-1.2.12.tgz", + "integrity": "sha512-jK1IZZ22evPZoQW3vlkZ7wvjYGYF+tRBKXtrcolduIkQ/m/sOAVcVeVDUDvh1T91xCnWCdUGCPZg2avZ90mv3g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@ai-sdk/provider-utils": "2.2.8", + "@ai-sdk/ui-utils": "1.2.11", + "swr": "^2.2.5", + "throttleit": "2.1.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "react": "^18 || ^19 || ^19.0.0-rc", + "zod": "^3.23.8" + }, + "peerDependenciesMeta": { + "zod": { + "optional": true + } + } + }, + "node_modules/@ai-sdk/ui-utils": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@ai-sdk/ui-utils/-/ui-utils-1.2.11.tgz", + "integrity": "sha512-3zcwCc8ezzFlwp3ZD15wAPjf2Au4s3vAbKsXQVyhxODHcmu0iyPO2Eua6D/vicq/AUm/BAo60r97O6HU+EI0+w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@ai-sdk/provider": "1.1.3", + "@ai-sdk/provider-utils": "2.2.8", + "zod-to-json-schema": "^3.24.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "zod": "^3.23.8" + } + }, "node_modules/@babel/runtime": { "version": "7.28.6", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", @@ -76,12 +156,13 @@ } }, "node_modules/@babel/runtime-corejs3": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.28.6.tgz", - "integrity": "sha512-kz2fAQ5UzjV7X7D3ySxmj3vRq89dTpqOZWv76Z6pNPztkwb/0Yj1Mtx1xFrYj6mbIHysxtBot8J4o0JLCblcFw==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.29.0.tgz", + "integrity": "sha512-TgUkdp71C9pIbBcHudc+gXZnihEDOjUAmXO1VO4HHGES7QLZcShR0stfKIxLSNIYx2fqhmJChOjm/wkF8wv4gA==", + "dev": true, "license": "MIT", "dependencies": { - "core-js-pure": "^3.43.0" + "core-js-pure": "^3.48.0" }, "engines": { "node": ">=6.9.0" @@ -121,27 +202,6 @@ "node": ">=18" } }, - "node_modules/@cloudflare/playwright-mcp/node_modules/zod": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", - "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", - "dev": true, - "license": "MIT", - "peer": true, - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/@cloudflare/playwright-mcp/node_modules/zod-to-json-schema": { - "version": "3.25.1", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz", - "integrity": "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==", - "dev": true, - "license": "ISC", - "peerDependencies": { - "zod": "^3.25 || ^4" - } - }, "node_modules/@cloudflare/unenv-preset": { "version": "2.12.0", "resolved": "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.12.0.tgz", @@ -248,8 +308,7 @@ "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20260207.0.tgz", "integrity": "sha512-PSxgnAOK0EtTytlY7/+gJcsQJYg0Qo7KlOMSC/wiBE+pBqKjuKdd1ZgM+NvpPNqZAjWV5jqAMTTNYEmgk27gYw==", "dev": true, - "license": "MIT OR Apache-2.0", - "peer": true + "license": "MIT OR Apache-2.0" }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", @@ -1255,9 +1314,9 @@ } }, "node_modules/@modelcontextprotocol/sdk": { - "version": "1.25.3", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.25.3.tgz", - "integrity": "sha512-vsAMBMERybvYgKbg/l4L1rhS7VXV1c0CtyJg72vwxONVX0l4ZfKVAnZEWTQixJGTzKnELjQ59e4NbdFDALRiAQ==", + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.26.0.tgz", + "integrity": "sha512-Y5RmPncpiDtTXDbLKswIJzTqu2hyBKxTNsgKqKclDbhIgg1wgtf1fRuvxgTnRfcnxtvvgbIEcqUOzZrJ6iSReg==", "dev": true, "license": "MIT", "dependencies": { @@ -1269,14 +1328,15 @@ "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", - "express": "^5.0.1", - "express-rate-limit": "^7.5.0", - "jose": "^6.1.1", + "express": "^5.2.1", + "express-rate-limit": "^8.2.1", + "hono": "^4.11.4", + "jose": "^6.1.3", "json-schema-typed": "^8.0.2", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.25 || ^4.0", - "zod-to-json-schema": "^3.25.0" + "zod-to-json-schema": "^3.25.1" }, "engines": { "node": ">=18" @@ -1300,21 +1360,10 @@ "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", "dev": true, "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } }, - "node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema": { - "version": "3.25.1", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz", - "integrity": "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==", - "dev": true, - "license": "ISC", - "peerDependencies": { - "zod": "^3.25 || ^4" - } - }, "node_modules/@opentelemetry/api": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", @@ -1415,87 +1464,7 @@ "react": "*" } }, - "node_modules/agents/node_modules/@ai-sdk/provider-utils": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-2.2.8.tgz", - "integrity": "sha512-fqhG+4sCVv8x7nFzYnFo19ryhAa3w096Kmc3hWxMQfW/TubPOmt3A6tYZhl4mUfQWWQMsuSkLrtjlWuXBVSGQA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@ai-sdk/provider": "1.1.3", - "nanoid": "^3.3.8", - "secure-json-parse": "^2.7.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "zod": "^3.23.8" - } - }, - "node_modules/agents/node_modules/@ai-sdk/provider-utils/node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/agents/node_modules/@ai-sdk/react": { - "version": "1.2.12", - "resolved": "https://registry.npmjs.org/@ai-sdk/react/-/react-1.2.12.tgz", - "integrity": "sha512-jK1IZZ22evPZoQW3vlkZ7wvjYGYF+tRBKXtrcolduIkQ/m/sOAVcVeVDUDvh1T91xCnWCdUGCPZg2avZ90mv3g==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@ai-sdk/provider-utils": "2.2.8", - "@ai-sdk/ui-utils": "1.2.11", - "swr": "^2.2.5", - "throttleit": "2.1.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "react": "^18 || ^19 || ^19.0.0-rc", - "zod": "^3.23.8" - }, - "peerDependenciesMeta": { - "zod": { - "optional": true - } - } - }, - "node_modules/agents/node_modules/@ai-sdk/ui-utils": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@ai-sdk/ui-utils/-/ui-utils-1.2.11.tgz", - "integrity": "sha512-3zcwCc8ezzFlwp3ZD15wAPjf2Au4s3vAbKsXQVyhxODHcmu0iyPO2Eua6D/vicq/AUm/BAo60r97O6HU+EI0+w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@ai-sdk/provider": "1.1.3", - "@ai-sdk/provider-utils": "2.2.8", - "zod-to-json-schema": "^3.24.1" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "zod": "^3.23.8" - } - }, - "node_modules/agents/node_modules/ai": { + "node_modules/ai": { "version": "4.3.19", "resolved": "https://registry.npmjs.org/ai/-/ai-4.3.19.tgz", "integrity": "sha512-dIE2bfNpqHN3r6IINp9znguYdhIOheKW2LDigAMrgt/upT3B8eBGPSCblENvaZGoq+hxaN9fSMzjWpbqloP+7Q==", @@ -1522,27 +1491,6 @@ } } }, - "node_modules/agents/node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", - "dev": true, - "license": "MIT", - "peer": true, - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/agents/node_modules/zod-to-json-schema": { - "version": "3.25.1", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz", - "integrity": "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==", - "dev": true, - "license": "ISC", - "peerDependencies": { - "zod": "^3.25 || ^4" - } - }, "node_modules/ajv": { "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", @@ -1733,17 +1681,13 @@ } }, "node_modules/cookie": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz", - "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" + "node": ">= 0.6" } }, "node_modules/cookie-signature": { @@ -1760,6 +1704,7 @@ "version": "3.48.0", "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.48.0.tgz", "integrity": "sha512-1slJgk89tWC51HQ1AEqG+s2VuwpTRr8ocu4n20QUcH1v9lAN0RXen0Q0AABa/DK1I7RrNWLucplOHMx8hfTGTw==", + "dev": true, "hasInstallScript": true, "license": "MIT", "funding": { @@ -2074,11 +2019,14 @@ } }, "node_modules/express-rate-limit": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.1.tgz", - "integrity": "sha512-7iN8iPMDzOMHPUYllBEsQdWVB6fPDMPqwjBaFrgr4Jgr/+okjvzAy+UHlYYL/Vs0OsOrMkwS6PJDkFlJwoxUnw==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.2.1.tgz", + "integrity": "sha512-PCZEIEIxqwhzw4KF0n7QF4QqruVTcF73O5kFKUnGOyjbCCgizBBiFaYpd/fnBLUMPw/BWw9OsiN7GgrNYr7j6g==", "dev": true, "license": "MIT", + "dependencies": { + "ip-address": "10.0.1" + }, "engines": { "node": ">= 16" }, @@ -2089,16 +2037,6 @@ "express": ">= 4.11" } }, - "node_modules/express/node_modules/cookie": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", - "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2229,6 +2167,12 @@ "node": ">= 0.4" } }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "license": "BSD-2-Clause" + }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -2269,12 +2213,11 @@ } }, "node_modules/hono": { - "version": "4.11.7", - "resolved": "https://registry.npmjs.org/hono/-/hono-4.11.7.tgz", - "integrity": "sha512-l7qMiNee7t82bH3SeyUCt9UF15EVmaBvsppY2zQtrbIhl/yzBTny+YUxsVjSjQ6gaqaeVtZmGocom8TzBlA4Yw==", + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.11.9.tgz", + "integrity": "sha512-Eaw2YTGM6WOxA6CXbckaEvslr2Ne4NFsKrvc0v97JD5awbmeBLO5w9Ho9L9kmKonrwF9RJlW6BxT1PVv/agBHQ==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=16.9.0" } @@ -2324,6 +2267,16 @@ "dev": true, "license": "ISC" }, + "node_modules/ip-address": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.0.1.tgz", + "integrity": "sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, "node_modules/ip-regex": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", @@ -2550,9 +2503,9 @@ } }, "node_modules/mimetext": { - "version": "3.0.27", - "resolved": "https://registry.npmjs.org/mimetext/-/mimetext-3.0.27.tgz", - "integrity": "sha512-mUhWAsZD1N/K6dbN4+a5Yq78OPnYQw1ubOSMasBntsLQ2S7KVNlvDEA8dwpr4a7PszWMzeslKahAprtwYMgaBA==", + "version": "3.0.28", + "resolved": "https://registry.npmjs.org/mimetext/-/mimetext-3.0.28.tgz", + "integrity": "sha512-eQXpbNrtxLCjUtiVbR/qR09dbPgZ2o+KR1uA7QKqGhbn8QV7HIL16mXXsobBL4/8TqoYh1us31kfz+dNfCev9g==", "dev": true, "license": "MIT", "dependencies": { @@ -2736,11 +2689,15 @@ } }, "node_modules/path-to-regexp": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", - "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", + "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", "dev": true, - "license": "MIT" + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } }, "node_modules/pathe": { "version": "2.0.3", @@ -2865,17 +2822,6 @@ "node": ">= 18" } }, - "node_modules/router/node_modules/path-to-regexp": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", - "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -3143,9 +3089,9 @@ } }, "node_modules/swr": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/swr/-/swr-2.3.8.tgz", - "integrity": "sha512-gaCPRVoMq8WGDcWj9p4YWzCMPHzE0WNl6W8ADIx9c3JBEIdMkJGMzW+uzXvxHMltwcYACr9jP+32H8/hgwMR7w==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/swr/-/swr-2.4.0.tgz", + "integrity": "sha512-sUlC20T8EOt1pHmDiqueUWMmRRX03W7w5YxovWX7VR2KHEPCTMly85x05vpkP5i6Bu4h44ePSMD9Tc+G2MItFw==", "dev": true, "license": "MIT", "dependencies": { @@ -3248,7 +3194,6 @@ "integrity": "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "pathe": "^2.0.3" } @@ -3306,7 +3251,6 @@ "dev": true, "hasInstallScript": true, "license": "Apache-2.0", - "peer": true, "bin": { "workerd": "bin/workerd" }, @@ -3356,6 +3300,13 @@ } } }, + "node_modules/wrangler/node_modules/path-to-regexp": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", + "dev": true, + "license": "MIT" + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -3385,15 +3336,6 @@ } } }, - "node_modules/xregexp": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-5.1.2.tgz", - "integrity": "sha512-6hGgEMCGhqCTFEJbqmWrNIPqfpdirdGWkqshu7fFZddmTSfgv5Sn9D2SaKloR79s5VUiUlpwzg3CM3G6D3VIlw==", - "license": "MIT", - "dependencies": { - "@babel/runtime-corejs3": "^7.26.9" - } - }, "node_modules/yaml": { "version": "2.8.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz", @@ -3434,6 +3376,40 @@ "@poppinss/exception": "^1.2.2", "error-stack-parser-es": "^1.0.5" } + }, + "node_modules/youch/node_modules/cookie": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz", + "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/zod": { + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-to-json-schema": { + "version": "3.25.1", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz", + "integrity": "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==", + "dev": true, + "license": "ISC", + "peerDependencies": { + "zod": "^3.25 || ^4" + } } } } diff --git a/package.json b/package.json index aeef77ac..239be6a7 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "wrangler": "^4.63.0" }, "dependencies": { - "@adguard/agtree": "^3.4.3", + "@adguard/agtree": "^4.0.0", "@electric-sql/pglite": "^0.3.15" } } diff --git a/scripts/record-deployment.ts b/scripts/record-deployment.ts index 7ae78935..9498ee57 100644 --- a/scripts/record-deployment.ts +++ b/scripts/record-deployment.ts @@ -173,7 +173,7 @@ async function queryD1( throw new Error(`D1 API error: ${response.status} ${response.statusText}\n${errorText}`); } - const data = await response.json(); + const data = await response.json() as D1QueryResult; return data; } diff --git a/src/utils/AGTreeParser.ts b/src/utils/AGTreeParser.ts index 5c53c462..a8e5faa8 100644 --- a/src/utils/AGTreeParser.ts +++ b/src/utils/AGTreeParser.ts @@ -406,7 +406,13 @@ export class AGTreeParser { if (typeof rule.body === 'object' && 'value' in rule.body) { body = rule.body.value; } else if (typeof rule.body === 'object' && 'selectorList' in rule.body) { - body = rule.body.selectorList.value; + // In v4.0.0, selectorList no longer has .value property + // Generate the full rule and extract the body part after the separator + const fullRule = rule.raws?.text ?? RuleGenerator.generate(rule); + const separatorIndex = fullRule.indexOf(rule.separator.value); + if (separatorIndex !== -1) { + body = fullRule.substring(separatorIndex + rule.separator.value.length); + } } } From c17403b8efb071b1c072a31cf4628b3b9da63ca9 Mon Sep 17 00:00:00 2001 From: Jayson Knight Date: Sun, 8 Feb 2026 19:42:32 -0500 Subject: [PATCH 08/16] chore: bump version to 0.11.6 Co-Authored-By: Warp --- deno.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deno.json b/deno.json index bb12f850..a9815e6c 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@jk-com/adblock-compiler", - "version": "0.11.5", + "version": "0.11.6", "exports": "./src/index.ts", "publish": { "include": [ diff --git a/package.json b/package.json index 239be6a7..7a8fbc01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adblock-compiler", - "version": "0.11.5", + "version": "0.11.6", "description": "Compiler-as-a-Service for adblock filter lists", "type": "module", "scripts": { From 003c5d3df86d2e6dbaccd3bf6e131df3dbd69e52 Mon Sep 17 00:00:00 2001 From: Jayson Knight Date: Sun, 8 Feb 2026 20:34:23 -0500 Subject: [PATCH 09/16] fix: Add Docker tag validation and remove unused dependency - Add version format validation in release workflow to prevent malformed tags - Remove @electric-sql/pglite dependency from package.json Co-Authored-By: Warp --- .github/workflows/release.yml | 13 +++++++++++-- package-lock.json | 13 +++---------- package.json | 3 +-- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f6466aa4..5f5231a7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -129,10 +129,19 @@ jobs: run: | set -euo pipefail if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - echo "version=${{ inputs.version }}" >> "$GITHUB_OUTPUT" + VERSION="${{ inputs.version }}" else - echo "version=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT" + VERSION="${GITHUB_REF#refs/tags/v}" + fi + + # Validate version format (must not start with . and must be semver-like) + if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+ ]]; then + echo "Error: Invalid version format '$VERSION'. Must start with a number (e.g., 0.11.6 or 0.11.6-beta.1)" >&2 + echo "If this is a tag issue, the tag may have been created incorrectly (e.g., 'v.0.11.6' instead of 'v0.11.6')" >&2 + exit 1 fi + + echo "version=$VERSION" >> "$GITHUB_OUTPUT" - name: Set up QEMU uses: docker/setup-qemu-action@v3 diff --git a/package-lock.json b/package-lock.json index d9afbdf9..8992b1b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,14 @@ { "name": "adblock-compiler", - "version": "0.11.5", + "version": "0.11.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "adblock-compiler", - "version": "0.11.5", + "version": "0.11.6", "dependencies": { - "@adguard/agtree": "^4.0.0", - "@electric-sql/pglite": "^0.3.15" + "@adguard/agtree": "^4.0.0" }, "devDependencies": { "@cloudflare/playwright-mcp": "^0.0.5", @@ -323,12 +322,6 @@ "node": ">=12" } }, - "node_modules/@electric-sql/pglite": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@electric-sql/pglite/-/pglite-0.3.15.tgz", - "integrity": "sha512-Cj++n1Mekf9ETfdc16TlDi+cDDQF0W7EcbyRHYOAeZdsAe8M/FJg18itDTSwyHfar2WIezawM9o0EKaRGVKygQ==", - "license": "Apache-2.0" - }, "node_modules/@emnapi/runtime": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.8.1.tgz", diff --git a/package.json b/package.json index 7a8fbc01..aaaee703 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "wrangler": "^4.63.0" }, "dependencies": { - "@adguard/agtree": "^4.0.0", - "@electric-sql/pglite": "^0.3.15" + "@adguard/agtree": "^4.0.0" } } From dfadf9e1680a51b77f379ef10efe6843308d9229 Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Mon, 9 Feb 2026 01:45:29 +0000 Subject: [PATCH 10/16] Initial plan From b2603c9d484bdfc564aaf1a46c547f2e6bda4c42 Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Mon, 9 Feb 2026 01:49:32 +0000 Subject: [PATCH 11/16] Replace hostlist-compiler with adblock-compiler in core files Co-authored-by: jaypatrick <1800595+jaypatrick@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 22 +++++++++++----------- .gitignore | 4 ++-- README.md | 20 ++++++++++---------- deno.json | 2 +- examples/china/README.md | 4 ++-- examples/cloudflare-worker/src/html.ts | 8 ++++---- examples/cloudflare-worker/test.html | 8 ++++---- examples/energized/README.md | 4 ++-- examples/sdn/README.md | 4 ++-- examples/whitelist/README.md | 4 ++-- src/cli/ArgumentParser.ts | 12 ++++++------ src/cli/CliApp.deno.ts | 10 +++++----- src/schemas/configuration.schema.json | 6 +++--- src/utils/headerFilter.test.ts | 6 +++--- worker/html.ts | 8 ++++---- wrangler.toml | 2 +- 17 files changed, 63 insertions(+), 63 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7d708a4..0efa0db3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -300,4 +300,4 @@ jobs: with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy public --project-name=hostlist-compiler-ui + command: pages deploy public --project-name=adblock-compiler-ui diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f5231a7..3109935f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,19 +66,19 @@ jobs: include: - target: x86_64-unknown-linux-gnu os: ubuntu-latest - artifact: hostlist-compiler-linux-x64 + artifact: adblock-compiler-linux-x64 - target: aarch64-unknown-linux-gnu os: ubuntu-latest - artifact: hostlist-compiler-linux-arm64 + artifact: adblock-compiler-linux-arm64 - target: x86_64-apple-darwin os: macos-15-intel - artifact: hostlist-compiler-macos-x64 + artifact: adblock-compiler-macos-x64 - target: aarch64-apple-darwin os: macos-14 - artifact: hostlist-compiler-macos-arm64 + artifact: adblock-compiler-macos-arm64 - target: x86_64-pc-windows-msvc os: windows-latest - artifact: hostlist-compiler-windows-x64.exe + artifact: adblock-compiler-windows-x64.exe steps: - uses: actions/checkout@v4 @@ -196,7 +196,7 @@ jobs: uses: actions/download-artifact@v4 with: path: artifacts - pattern: hostlist-compiler-* + pattern: adblock-compiler-* - name: Prepare release assets run: | @@ -237,11 +237,11 @@ jobs: | Platform | Architecture | Download | |----------|--------------|----------| - | Linux | x64 | `hostlist-compiler-linux-x64` | - | Linux | ARM64 | `hostlist-compiler-linux-arm64` | - | macOS | x64 (Intel) | `hostlist-compiler-macos-x64` | - | macOS | ARM64 (Apple Silicon) | `hostlist-compiler-macos-arm64` | - | Windows | x64 | `hostlist-compiler-windows-x64.exe` | + | Linux | x64 | `adblock-compiler-linux-x64` | + | Linux | ARM64 | `adblock-compiler-linux-arm64` | + | macOS | x64 (Intel) | `adblock-compiler-macos-x64` | + | macOS | ARM64 (Apple Silicon) | `adblock-compiler-macos-arm64` | + | Windows | x64 | `adblock-compiler-windows-x64.exe` | ## Checksums ``` diff --git a/.gitignore b/.gitignore index 11683a20..e216ed4e 100644 --- a/.gitignore +++ b/.gitignore @@ -22,8 +22,8 @@ yarn.lock # Build output dist/ -hostlist-compiler -hostlist-compiler.exe +adblock-compiler +adblock-compiler.exe # Cloudflare Workers .wrangler/ diff --git a/README.md b/README.md index bf54b010..d5171131 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ deno run --allow-read --allow-write --allow-net jsr:@jk-com/adblock-compiler -c Or install globally: ```bash -deno install --allow-read --allow-write --allow-net -n hostlist-compiler jsr:@jk-com/adblock-compiler/cli +deno install --allow-read --allow-write --allow-net -n adblock-compiler jsr:@jk-com/adblock-compiler/cli ``` ### Build from source @@ -104,7 +104,7 @@ cd adblock-compiler deno task build ``` -This creates a standalone `hostlist-compiler` executable. +This creates a standalone `adblock-compiler` executable. ### Using Docker @@ -127,7 +127,7 @@ Access the web UI at http://localhost:8787 Convert and compress a `/etc/hosts`-syntax blocklist to [AdGuard syntax](https://adguard-dns.io/kb/general/dns-filtering-syntax/). ```bash -hostlist-compiler -i hosts.txt -i hosts2.txt -o output.txt +adblock-compiler -i hosts.txt -i hosts2.txt -o output.txt ``` **Build a configurable blocklist from multiple sources** @@ -135,13 +135,13 @@ hostlist-compiler -i hosts.txt -i hosts2.txt -o output.txt Prepare the list configuration (read more about that [below](#configuration)) and run the compiler: ```bash -hostlist-compiler -c configuration.json -o output.txt +adblock-compiler -c configuration.json -o output.txt ``` **All command line options** ``` -Usage: hostlist-compiler [options] +Usage: adblock-compiler [options] Options: --config, -c Path to the compiler configuration file [string] @@ -154,9 +154,9 @@ Options: -h, --help Show help [boolean] Examples: - hostlist-compiler -c config.json -o compile a blocklist and write the + adblock-compiler -c config.json -o compile a blocklist and write the output.txt output to output.txt - hostlist-compiler -i compile a blocklist from the URL and + adblock-compiler -i compile a blocklist from the URL and https://example.org/hosts.txt -o write the output to output.txt output.txt ``` @@ -296,7 +296,7 @@ The last rule now `||example.com^` will correctly match the rule from the exclus Command-line arguments. ``` -Usage: hostlist-compiler [options] +Usage: adblock-compiler [options] Options: --version Show version number [boolean] @@ -307,7 +307,7 @@ Options: -h, --help Show help [boolean] Examples: - hostlist-compiler -c config.json -o compile a blocklist and write the + adblock-compiler -c config.json -o compile a blocklist and write the output.txt output to output.txt ``` @@ -841,7 +841,7 @@ deno publish ## Platform Support -The hostlist-compiler includes a **platform abstraction layer** that enables running in any JavaScript runtime, including: +The adblock-compiler includes a **platform abstraction layer** that enables running in any JavaScript runtime, including: - **Deno** (default) - **Node.js** (via npm compatibility) diff --git a/deno.json b/deno.json index a9815e6c..55f38143 100644 --- a/deno.json +++ b/deno.json @@ -16,7 +16,7 @@ "tasks": { "dev": "deno run -A --watch --allow-read --allow-write --allow-net src/cli.ts", "compile": "deno run --allow-read --allow-write --allow-net src/cli.ts", - "build": "deno compile --allow-read --allow-write --allow-net --output=hostlist-compiler src/cli.ts", + "build": "deno compile --allow-read --allow-write --allow-net --output=adblock-compiler src/cli.ts", "test": "deno test --allow-read --allow-write --allow-net --allow-env", "test:watch": "deno test --allow-read --allow-write --allow-net --allow-env --watch", "test:coverage": "deno test --allow-read --allow-write --allow-net --allow-env --coverage=coverage", diff --git a/examples/china/README.md b/examples/china/README.md index 8f4d2bae..62368e6f 100644 --- a/examples/china/README.md +++ b/examples/china/README.md @@ -6,7 +6,7 @@ include only lines that match a specific regular expression. Check [configuration.json](configuration.json) for more details. ``` -npm i -g @adguard/hostlist-compiler +deno install --allow-read --allow-write --allow-net -n adblock-compiler jsr:@jk-com/adblock-compiler/cli -hostlist-compiler -c configuration.json -o filter.txt +adblock-compiler -c configuration.json -o filter.txt ``` \ No newline at end of file diff --git a/examples/cloudflare-worker/src/html.ts b/examples/cloudflare-worker/src/html.ts index baaa5fb2..f1c515d3 100644 --- a/examples/cloudflare-worker/src/html.ts +++ b/examples/cloudflare-worker/src/html.ts @@ -7,12 +7,12 @@ export const HTML_CONTENT = ` - Hostlist Compiler - + Adblock Compiler + -

Redirecting to Hostlist Compiler...

-

If you are not redirected, click here.

+

Redirecting to Adblock Compiler...

+

If you are not redirected, click here.

For local development, use: npm run dev

`; diff --git a/examples/cloudflare-worker/test.html b/examples/cloudflare-worker/test.html index 6590c1a4..475ef90f 100644 --- a/examples/cloudflare-worker/test.html +++ b/examples/cloudflare-worker/test.html @@ -3,7 +3,7 @@ - Hostlist Compiler Worker Test + Adblock Compiler Worker Test