@bluelibs/runner - v5.5.0
    Preparing search index...

    Class MiddlewareManager

    Centralizes middleware composition and execution for both tasks and resources. Keeps observability emissions and unhandled error routing consistent.

    This is a facade that delegates to specialized composer classes for maintainability.

    Index

    Constructors

    Properties

    store: Store

    Accessors

    Methods

    • Gets all "everywhere" middlewares that apply to the given task

      Parameters

      • task: ITask<any, any, any>

      Returns ITaskMiddleware<any, void, void, any>[]

      Internal method exposed for testing - may be removed in future versions

    • Internal

      Snapshot of resource owners that registered middleware interceptors.

      Returns InterceptorOwnerSnapshot

    • Adds an interceptor for task or resource middleware execution Interceptors are executed in the order they are added, with the ability to modify, log, or prevent middleware execution

      Parameters

      • kind: "task"

        The type of middleware to intercept ("task" or "resource")

      • interceptor: TaskMiddlewareInterceptor

        The interceptor function to add

      Returns void

    • Adds an interceptor for task or resource middleware execution Interceptors are executed in the order they are added, with the ability to modify, log, or prevent middleware execution

      Parameters

      • kind: "resource"

        The type of middleware to intercept ("task" or "resource")

      • interceptor: ResourceMiddlewareInterceptor

        The interceptor function to add

      Returns void