Logos DX
    Preparing search index...

    Class PipeContext<FailArgs>

    Context object passed as the last argument to pipe middleware callbacks. Simpler than HookContext — no returns() needed since you control flow by calling or not calling next().

    hooks.add('execute', async (next, opts, ctx) => {
    // Modify opts for inner layers
    ctx.args({ ...opts, headers: { ...opts.headers, Auth: token } });

    // Call next to continue the chain, or don't to short-circuit
    return next();
    });

    Type Parameters

    • FailArgs extends unknown[] = [string]
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    scope: HookScope

    Request-scoped state bag shared across hook runs and engine instances.

    Methods

    • Replace args for next() and downstream middleware.

      Parameters

      • ...args: unknown[]

      Returns void

      ctx.args({ ...opts, timeout: 5000 });
      return next(); // next receives modified opts