Angular Modernizer
    Preparing search index...

    Immutable pipeline context that flows through the stages of a FluentKernel pipeline. Each stage creates a new context with updated state.

    Index

    Constructors

    • Creates a new pipeline context.

      Parameters

      • kernel: Kernel

        Kernel the stages run against.

      • files: readonly SourceFile[] = []

        Source files the pipeline works on.

      • violations: readonly KernelAnalysisResult[] = []

        Violations collected so far.

      • transformations: readonly TransformationResult[] = []

        Transformation results collected so far.

      • errors: readonly PipelineError[] = []

        Errors recorded so far.

      • metadata: Readonly<Record<string, unknown>> = {}

        Metadata added by stages.

      • originalTexts: ReadonlyMap<string, string> = ...

        Text of each file before the pipeline first transformed it, keyed by file path; a build check with rollback restores these.

      Returns PipelineContext

    Properties

    errors: readonly PipelineError[] = []

    Errors recorded so far.

    files: readonly SourceFile[] = []

    Source files the pipeline works on.

    kernel: Kernel

    Kernel the stages run against.

    metadata: Readonly<Record<string, unknown>> = {}

    Metadata added by stages.

    originalTexts: ReadonlyMap<string, string> = ...

    Text of each file before the pipeline first transformed it, keyed by file path; a build check with rollback restores these.

    transformations: readonly TransformationResult[] = []

    Transformation results collected so far.

    violations: readonly KernelAnalysisResult[] = []

    Violations collected so far.

    Methods

    • Creates a new context with an additional error. Immutable - returns new instance.

      Parameters

      • stage: string
      • message: string
      • error: Error

      Returns PipelineContext

    • Checks if the pipeline has encountered any errors.

      Returns boolean

    • Creates a new context with updated files. Immutable - returns new instance.

      Parameters

      • files: readonly SourceFile[]

      Returns PipelineContext

    • Creates a new context with updated metadata. Immutable - returns new instance.

      Parameters

      • metadata: Record<string, unknown>

      Returns PipelineContext

    • Creates a new context that remembers the original text of the given files. The first recorded text of a file wins, so it stays the text from before the pipeline changed the file. Immutable - returns new instance.

      Parameters

      • texts: ReadonlyMap<string, string>

      Returns PipelineContext