class WorkerCompiler

Web Worker / Cloudflare Worker compatible compiler. Designed to run in environments without file system access.

Constructors

new
WorkerCompiler(options?: WorkerCompilerOptions)

Creates a new WorkerCompiler

Properties

Methods

private
applySourceTransformations(
rules: string[],
source: ISource,
configuration: IConfiguration,
): Promise<string[]>

Applies source-level transformations.

Builds the content fetcher based on options.

compile(configuration: IConfiguration): Promise<string[]>

Compiles a filter list using the specified configuration.

compileWithMetrics(
configuration: IConfiguration,
benchmark?: boolean,
): Promise<WorkerCompilationResult>

Compiles a filter list with optional performance metrics.

private
prepareHeader(configuration: IConfiguration): string[]

Prepares the main list header.

private
prepareSourceHeader(source: ISource): string[]

Prepares the source header.