Native Deno filter downloader
new
FilterDownloader(options?: DownloaderOptions,logger?: ILogger,)
Creates a new FilterDownloader
download(): Promise<string[]>
Static convenience method for one-off downloads
private
readonly
circuitBreakers: Map<string, CircuitBreaker>
private
readonly
options: Required<DownloaderOptions>
private
readonly
visitedUrls: Set<string>
download(source: string): Promise<string[]>
Downloads and processes a filter list from a URL or file path
private
downloadInternal(source: string,depth: number,): Promise<string[]>
Internal download method with include depth tracking
private
fetchUrl(url: string): Promise<string>
Fetches content from a URL with retry logic and circuit breaker
private
findEndIfIndex(lines: string[],startIndex: number,): number
Finds the index of the matching !#endif for a !#if at startIndex
private
getCircuitBreaker(url: string): CircuitBreaker | null
Gets or creates a circuit breaker for a URL
getCircuitBreakerStats(): Map<string, ReturnType<CircuitBreaker["getStats"]>>
Gets circuit breaker statistics for all URLs Useful for monitoring and debugging
private
parseConditionalBlock(lines: string[],startIndex: number,): ConditionalBlock
Parses a conditional block (!#if ... !#else ... !#endif)
private
processDirectives(lines: string[],basePath: string,depth: number,): Promise<string[]>
Processes preprocessor directives in the filter content
private
readFile(path: string): Promise<string>
Reads content from a local file
resetCircuitBreakers(): void
Resets all circuit breakers Useful for manual recovery or testing