class PlatformDownloader

Platform-agnostic filter downloader. Uses IContentFetcher for all source access.

Constructors

new
PlatformDownloader(
fetcher?: IContentFetcher,
logger?: ILogger,
)

Creates a new PlatformDownloader

Properties

private
readonly
fetcher: IContentFetcher
private
readonly
logger: ILogger
private
readonly
options: Required<PlatformDownloaderOptions>
private
readonly
visitedUrls: Set<string>

Methods

download(source: string): Promise<string[]>

Downloads and processes a filter list from a source.

private
downloadInternal(
source: string,
depth: number,
): Promise<string[]>

Internal download method with include depth tracking

private
findEndIfIndex(
lines: string[],
startIndex: number,
): number

Finds the index of the matching !#endif

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