@@ -7,7 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
77This repository is a comprehensive multi-language toolkit for ad-blocking, network protection, and AdGuard DNS management:
88
99### Rules Compilers (4 languages)
10- - ** TypeScript** (` src/rules-compiler-typescript/ ` ) - Node.js 18 + with Deno and Bun support, optional Rust frontend
10+ - ** TypeScript** (` src/rules-compiler-typescript/ ` ) - Deno 2.0 + with npm compatibility
1111- ** C#/.NET 10** (` src/rules-compiler-dotnet/ ` ) - Library and Spectre.Console CLI with DI support
1212- ** Python 3.9+** (` src/rules-compiler-python/ ` ) - pip-installable package with CLI and API
1313- ** Rust** (` src/rules-compiler-rust/ ` ) - High-performance single binary with zero runtime deps
@@ -23,12 +23,12 @@ This repository is a comprehensive multi-language toolkit for ad-blocking, netwo
2323
2424### API Client & Tools
2525- ** AdGuard API Client - .NET** (` src/adguard-api-dotnet/ ` ) - C# SDK for AdGuard DNS API v1.11
26- - ** AdGuard API Client - TypeScript** (` src/adguard-api-typescript/ ` ) - TypeScript SDK with Node.js, Deno, and Bun support
26+ - ** AdGuard API Client - TypeScript** (` src/adguard-api-typescript/ ` ) - TypeScript SDK with Deno support
2727- ** Console UI** (` src/adguard-api-dotnet/src/AdGuard.ConsoleUI/ ` ) - Spectre.Console interactive interface
28- - ** Linear Import Tool** (` src/linear/ ` ) - TypeScript tool with Node.js, Deno, and Bun support
28+ - ** Linear Import Tool** (` src/linear/ ` ) - TypeScript tool with Deno support
2929
3030### Website
31- - ** Gatsby Site** (` src/website/ ` ) - Portfolio site deployed to GitHub Pages
31+ - ** Gatsby Site** (` src/website/ ` ) - Portfolio site deployed to GitHub Pages (Node.js)
3232
3333### Configuration Support
3434All compilers support JSON, YAML, and TOML configuration formats with full @adguard/hostlist-compiler compatibility.
@@ -40,7 +40,7 @@ A fully-featured Docker environment with all compilers and tools:
4040``` dockerfile
4141# Dockerfile.warp
4242FROM mcr.microsoft.com/dotnet/sdk:10.0-noble
43- # Includes: .NET 10 SDK, Node.js 22 LTS , Python 3.12, Rust stable, PowerShell 7
43+ # Includes: .NET 10 SDK, Deno 2.x , Python 3.12, Rust stable, PowerShell 7
4444# Pre-installed: hostlist-compiler, yq, pytest, ruff, clippy, Pester
4545```
4646
@@ -65,29 +65,23 @@ Warp Environment: `jaysonknight/warp-env:ad-blocking` (ID: `Egji4sZU4TNIOwNasFU7
6565### TypeScript Rules Compiler (` src/rules-compiler-typescript/ ` )
6666``` bash
6767cd src/rules-compiler-typescript
68- npm ci # Install dependencies
69- npm run build # Build TypeScript
70- npm test # Run Jest tests
71- npm run test:coverage # Run tests with coverage
72- npm run lint # ESLint
73- npm run compile # Compile filter rules
74- npm run compile:yaml # Compile using YAML config
75- npm run compile:toml # Compile using TOML config
76- npm run dev # Run with ts-node
68+
69+ # Deno tasks
70+ deno task compile # Compile filter rules
71+ deno task compile:yaml # Compile using YAML config
72+ deno task compile:toml # Compile using TOML config
73+ deno task dev # Run with watch mode
74+ deno task test # Run Deno tests
75+ deno task test:coverage # Run tests with coverage
76+ deno task lint # Lint source files
77+ deno task fmt # Format source files
78+ deno task check # Type check
79+ deno task version # Show version
7780
7881# CLI with options
79- npm run compile -- -c config.yaml -r -d
80- npm run compile -- --help
81- npm run compile -- --version
82-
83- # Bun commands (alternative runtime)
84- bun install # Install dependencies
85- bun run bun:build # Build with Bun
86- bun run bun:dev # Run with Bun
87- bun run bun:compile # Compile filter rules
88- bun run bun:compile:yaml # Compile using YAML config
89- bun run bun:compile:toml # Compile using TOML config
90- bun run bun:test # Run tests with Bun
82+ deno task compile -- -c config.yaml -r -d
83+ deno run --allow-read --allow-write --allow-env --allow-run src/mod.ts --help
84+ deno run --allow-read --allow-write --allow-env --allow-run src/mod.ts --version
9185```
9286
9387### Shell Scripts (` src/rules-compiler-shell/ ` )
@@ -188,19 +182,43 @@ dotnet run --project src/AdGuard.ConsoleUI/AdGuard.ConsoleUI.csproj
188182dotnet run --project src/AdGuard.ApiClient.Benchmarks -c Release
189183```
190184
185+ ### TypeScript API Client (` src/adguard-api-typescript/ ` )
186+ ``` bash
187+ cd src/adguard-api-typescript
188+
189+ # Deno tasks
190+ deno task start # Start CLI
191+ deno task sync # Sync rules
192+ deno task cli # Run CLI directly
193+ deno task test # Run tests
194+ deno task test:coverage # Run tests with coverage
195+ deno task lint # Lint source files
196+ deno task fmt # Format source files
197+ deno task check # Type check
198+ ```
199+
200+ ### Linear Import Tool (` src/linear/ ` )
201+ ``` bash
202+ cd src/linear
203+
204+ # Deno tasks
205+ deno task import # Run import tool
206+ deno task import:docs # Import documentation
207+ deno task import:dry-run # Preview import
208+ deno task cli # Run CLI directly
209+ deno task test # Run tests
210+ deno task lint # Lint source files
211+ deno task fmt # Format source files
212+ deno task check # Type check
213+ ```
214+
191215### Gatsby Website (` src/website/ ` )
192216``` bash
193217cd src/website
194218npm ci
195219npm run develop # Dev server at localhost:8000
196220npm run build # Production build
197221npm run serve # Serve local build
198-
199- # Bun commands (experimental Gatsby support)
200- bun install # Install dependencies (faster)
201- bun run bun:develop # Dev server with Bun
202- bun run bun:build # Production build with Bun
203- bun run bun:serve # Serve local build with Bun
204222```
205223
206224### PowerShell RulesCompiler Module (` src/adguard-api-powershell/ ` )
@@ -229,12 +247,12 @@ Invoke-ScriptAnalyzer -Path src/adguard-api-powershell -Recurse
229247
230248## Running Individual Tests
231249
232- ### TypeScript (Jest )
250+ ### TypeScript (Deno )
233251``` bash
234252cd src/rules-compiler-typescript
235- npx jest cli.test.ts # By file
236- npx jest -t " should compile rules " # By test name
237- npm run test:coverage # With coverage
253+ deno test src/ cli.test.ts # By file
254+ deno test --filter " parseArgs " # By test name
255+ deno task test:coverage # With coverage
238256```
239257
240258### .NET (xUnit)
@@ -286,15 +304,15 @@ cargo test config:: # Tests in module
286304
287305### Rules Compiler - TypeScript (` src/rules-compiler-typescript/ ` )
288306- TypeScript wrapper around @adguard/hostlist-compiler
307+ - Deno 2.0+ runtime with npm compatibility
289308- Supports JSON, YAML, and TOML configuration formats
290309- ` src/cli.ts ` - Command-line interface with argument parsing
291310- ` src/config-reader.ts ` - Multi-format configuration reader
292311- ` src/compiler.ts ` - Core compilation logic
293312- ` src/mod.ts ` - Deno entry point
294313- ` frontend-rust/ ` - Optional Rust CLI frontend
295- - Deno support via ` deno.json `
296- - Bun support via ` bunfig.toml ` and ` bun:* ` npm scripts
297- - ESLint and Jest for testing
314+ - ` deno.json ` - Deno configuration and tasks
315+ - Uses Deno's built-in testing framework
298316
299317### Shell Scripts (` src/rules-compiler-shell/ ` )
300318- Cross-platform shell scripts for filter compilation
@@ -330,7 +348,7 @@ cargo test config:: # Tests in module
330348- ` src/compiler.rs ` - ` RulesCompiler ` struct and ` compile_rules() ` function
331349- ` src/main.rs ` - clap-based CLI with argument parsing
332350- ` src/error.rs ` - ` CompilerError ` enum with thiserror
333- - Single binary distribution with zero runtime dependencies (except Node.js for hostlist-compiler)
351+ - Single binary distribution with zero runtime dependencies (except hostlist-compiler)
334352- Key structs: ` RulesCompiler ` , ` CompilerConfiguration ` , ` CompilerResult ` , ` VersionInfo `
335353- LTO optimization enabled for small binary size
336354
@@ -343,26 +361,24 @@ cargo test config:: # Tests in module
343361
344362### API Client - TypeScript (` src/adguard-api-typescript/ ` )
345363- TypeScript SDK for AdGuard DNS API v1.11 with feature parity to .NET version
346- - Node.js 18+, Deno 2.0+, and Bun 1.0+ support
364+ - Deno 2.0+ runtime with npm compatibility
347365- ` src/client.ts ` - Main ` AdGuardDnsClient ` class with fluent API
348366- ` src/api/ ` - API endpoint implementations (account, devices, DNS servers, statistics, etc.)
349367- ` src/repositories/ ` - Higher-level repository pattern abstractions
350368- ` src/cli/ ` - Interactive CLI with menu-driven interface
351369- ` src/mod.ts ` - Deno entry point
352- - Bun support via ` bunfig.toml ` and ` bun:* ` npm scripts
353370- Key classes: ` AdGuardDnsClient ` , ` DeviceRepository ` , ` DnsServerRepository ` , ` UserRulesRepository `
354- - Dependencies: axios, commander, inquirer, chalk
371+ - Dependencies (via npm:) : axios, commander, inquirer, chalk
355372
356373### Linear Import Tool (` src/linear/ ` )
357374- TypeScript tool for importing documentation into Linear project management
358- - Node.js 18+, Deno 2.0+, and Bun 1.0+ support
359- - ` src/linear-import.ts ` - Main CLI entry point (Node.js)
375+ - Deno 2.0+ runtime with npm compatibility
376+ - ` src/linear-import.ts ` - Main CLI entry point
360377- ` src/mod.ts ` - Deno entry point
361- - Bun support via ` bunfig.toml ` and ` bun:* ` npm scripts
362378- ` src/parser.ts ` - Markdown documentation parser
363379- ` src/linear-client.ts ` - Linear API client wrapper
364380- ` src/types.ts ` - TypeScript type definitions
365- - Dependencies: @linear/sdk , commander, marked, dotenv
381+ - Dependencies (via npm:) : @linear/sdk , commander, marked, dotenv
366382
367383### Console UI (` src/adguard-api-dotnet/src/AdGuard.ConsoleUI/ ` )
368384- Spectre.Console menu-driven interface
@@ -412,16 +428,22 @@ RemoveComments, Compress, RemoveModifiers, Validate, ValidateAllowIp, Deduplicat
412428| Variable | Description |
413429| ----------| -------------|
414430| ` AdGuard:ApiKey ` | API credential for console UI (can also prompt interactively) |
431+ | ` ADGUARD_API_KEY ` | API credential for TypeScript client |
432+ | ` ADGUARD_AdGuard__ApiKey ` | .NET-compatible API credential format |
415433| ` LINEAR_API_KEY ` | For Linear import scripts (` src/linear/ ` ) |
416- | ` DEBUG ` | Set to any value to enable debug logging in PowerShell modules |
434+ | ` LINEAR_TEAM_ID ` | Optional Linear team ID |
435+ | ` LINEAR_PROJECT_NAME ` | Optional Linear project name |
436+ | ` DEBUG ` | Set to any value to enable debug logging |
437+ | ` LOG_LEVEL ` | Log level (DEBUG, INFO, WARN, ERROR, SILENT) |
438+ | ` LOG_FORMAT ` | Set to ` json ` for structured logging |
417439| ` RULESCOMPILER_config ` | Default configuration file path (.NET compiler) |
418440| ` RULESCOMPILER_Logging__LogLevel__Default ` | Log level for .NET compiler |
419441
420442## CI/CD Alignment
421443
422444GitHub Actions workflows validate:
423445- ` .github/workflows/dotnet.yml ` - Builds/tests .NET projects (API client and rules compiler) with .NET 10
424- - ` .github/workflows/typescript.yml ` - Node 20, tsc --noEmit, eslint for rules-compiler-typescript and website
446+ - ` .github/workflows/typescript.yml ` - Deno 2.x for TypeScript projects, Node.js 22 for website
425447- ` .github/workflows/gatsby.yml ` - Builds website and deploys to GitHub Pages
426448- ` .github/workflows/security.yml ` - Consolidated security scanning (CodeQL, DevSkim, PSScriptAnalyzer)
427449- ` .github/workflows/release.yml ` - Builds and publishes release binaries (.NET, Rust, Python)
@@ -433,8 +455,8 @@ GitHub Actions workflows validate:
433455| Requirement | Version | Required For |
434456| -------------| ---------| --------------|
435457| .NET SDK | 10.0+ | .NET compiler, API client |
436- | Node.js | 22.x LTS | All compilers, Website |
437- | Bun | 1.0+ | TypeScript projects (optional alternative to Node.js ) |
458+ | Deno | 2.0+ | TypeScript projects (rules compiler, API client, linear) |
459+ | Node.js | 22.x LTS | Website (Gatsby ) |
438460| PowerShell | 7+ | PowerShell scripts |
439461| Python | 3.9+ | Python compiler |
440462| Rust | 1.85+ | Rust compiler (install via rustup) |
@@ -445,6 +467,7 @@ GitHub Actions workflows validate:
445467
446468- ** Main filter list** : ` rules/adguard_user_filter.txt `
447469- ** Compiler configs** : ` src/rules-compiler-*/ `
470+ - ** Deno configs** : ` src/*/deno.json `
448471- ** OpenAPI spec** : ` api/openapi.yaml `
449472- ** Docker config** : ` Dockerfile.warp ` , ` docker-compose.yml ` , ` .dockerignore `
450473- ** Documentation** : ` docs/ `
0 commit comments