Web Worker / Cloudflare Worker compatible compiler. Designed to run in environments without file system access.
new
WorkerCompiler(options?: WorkerCompilerOptions)
Creates a new WorkerCompiler
private
readonly
eventEmitter: CompilerEventEmitter
private
readonly
fetcher: IContentFetcher
private
readonly
headerGenerator: HeaderGenerator
private
readonly
pipeline: TransformationPipeline
private
readonly
tracingContext: TracingContext
private
readonly
validator: ConfigurationValidator
private
applySourceTransformations(): Promise<string[]>
Applies source-level transformations.
private
buildFetcher(options?: WorkerCompilerOptions): IContentFetcher
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.