Angular Modernizer
    Preparing search index...

    Fluent kernel with a chainable, builder-style API for analysis and transformation pipelines on top of an initialized Kernel.

    Each builder call adds a stage; FluentKernel.execute runs them in order.

    const result = await FluentKernel.create(kernel)
    .analyze(['src/**/*.ts'], rules)
    .filter(v => v.severity === 'high')
    .transform('inheritance-to-composition')
    .buildCheck()
    .execute();
    Index

    Methods

    • Adds analysis stage to the pipeline.

      Parameters

      • files: readonly string[]

        File paths or glob patterns to analyze

      • rules: readonly KernelAnalysisRule[]

        Analysis rules to apply

      Returns this

      This instance for chaining

    • Adds build validation stage to the pipeline.

      Parameters

      • rollbackOnFailure: boolean = false

        Whether to rollback on build failure

      Returns this

      This instance for chaining

    • Clears all pipeline stages.

      Returns this

      This instance for chaining

    • Executes the pipeline and returns the result. Terminal operation - ends the chain.

      Returns Promise<PipelineResult>

      Pipeline execution result

    • Adds filter stage to the pipeline. Filters violations based on predicate.

      Parameters

      Returns this

      This instance for chaining

    • Gets the underlying kernel instance.

      Returns Kernel

      Kernel instance

    • Registers a progress callback for pipeline execution. The callback will be invoked after each stage completes.

      Parameters

      Returns this

      This instance for chaining

    • Adds post-transformation validation stage.

      Returns this

      This instance for chaining

    • Adds pre-transformation validation stage.

      Returns this

      This instance for chaining

    • Stops the pipeline at the first failing stage and lets every build check of the pipeline roll back the files of a failed build.

      Returns this

      This instance for chaining

    • Converts the pipeline to an RxJS Observable for reactive execution. Requires rxjs to be installed as a peer dependency.

      Emits events for:

      • stage-start: When a stage begins execution
      • stage-complete: When a stage completes successfully
      • stage-error: When a stage encounters an error
      • progress: Progress updates during execution
      • complete: Final pipeline result
      • error: Fatal pipeline error

      Returns Promise<unknown>

      Promise<Observable> or throws if RxJS not available

      Error if RxJS is not installed

      Error if no stages are configured

      const observable = await FluentKernel.create(kernel)
      .analyze(files, rules)
      .filter(v => v.severity === 'high')
      .toObservable();

      observable
      .pipe(
      tap(event => console.info('Event:', event.type)),
      filter(event => event.type === 'complete')
      )
      .subscribe({
      next: (event) => console.info('Pipeline event:', event),
      error: (err) => console.error('Pipeline failed:', err),
      complete: () => console.info('Pipeline complete')
      });
    • Adds transformation stage to the pipeline.

      Parameters

      • transformationType: string

        Type of transformation to apply

      • Optionalpatterns: readonly string[]

        Optional file patterns to transform

      • OptionalpluginConfig: Record<string, Record<string, unknown>>

        Optional plugin config keyed by plugin name (see TransformStage)

      Returns this

      This instance for chaining

    • Enables verbose logging for pipeline execution.

      Returns this

      This instance for chaining

    • Adds custom metadata to the pipeline result.

      Parameters

      • metadata: Record<string, unknown>

        Custom metadata

      Returns this

      This instance for chaining