auth.provider API
    Preparing search index...

    Interface AppHandle

    The public handle returned by createApp. Theme D: every field is readonly; the component map is frozen; dispose is the only mutator.

    Per A2-β §6.3.

    interface AppHandle {
        components: Readonly<Partial<ComponentMap>>;
        readinessProbes: readonly ReadinessProbe[];
        router: Router;
        routes: readonly OrderedRouteContribution[];
        dispose(): Promise<void>;
        listen(
            port: number,
        ): Promise<Server<typeof IncomingMessage, typeof ServerResponse>>;
    }
    Index
    components: Readonly<Partial<ComponentMap>>

    Read-only typed view of the materialised component map, Object.frozen. Typed as Partial because keys are only present when a module produced them (or they were provided via bootstrapComponents / overrideComponents).

    readinessProbes: readonly ReadinessProbe[]

    Probes registered by builders during boot, in registration order.

    A composition root feeds these to the readiness route (routes/Readiness.mts) — mounted on the host app rather than inside router, so it stays answerable while the auth pipeline is degraded, which is exactly when readiness has something to say. Empty when nothing registered a probe (a memory-only deployment has no dependency to be unready for).

    router: Router

    Express router with all RouteContribution entries mounted in the order computed by assembleApp §5.6. Consumer code mounts this at its host server (app.use(handle.router)) or calls handle.listen(port).

    routes: readonly OrderedRouteContribution[]

    Ordered route contributions in final mount order after before/after resolution. Populated by assembleApp (stage 6). Per A2-β §6.3 / A2-γ §7.2.

    • Run cleanup callbacks in reverse-topological order against requires, then call Symbol.asyncDispose on values that implement it (where no lifecycle[K].cleanup was declared). Errors thrown during individual cleanup callbacks are aggregated; the returned Promise rejects with an AggregateError whose errors field contains every cleanup error.

      Returns Promise<void>

    • Listen on the given port. Returns a Promise that resolves to a Server once listening. Composition roots that want their own express app may ignore this method and use router directly.

      Parameters

      • port: number

      Returns Promise<Server<typeof IncomingMessage, typeof ServerResponse>>