import type { NestApplicationOptions } from '@nestjs/common'; import { secureHeaders } from 'hono/secure-headers'; import type { Server as NativeServer } from 'node:http'; import type { NestHono } from '#adapter/core/context'; import type { Server } from '#adapter/core/ports/server'; import type { Transport } from '#adapter/core/ports/transport'; import type { TrustProxy } from '#adapter/core/request/request'; import type { CorsConfig } from '#adapter/features/cors/index'; import type { OnRequestHook, OnResponseHook } from '#adapter/features/front-steps/index'; import { RouteAdapter } from '#adapter/core/route/route-adapter'; import { mountSse } from '#adapter/features/sse'; type SecureHeadersOptions = NonNullable[0]>; interface TransportOptions { readonly bodyLimit?: number; readonly rawBody?: boolean; readonly secureHeaders?: boolean | SecureHeadersOptions; readonly transport: Transport; readonly trustProxy?: TrustProxy; } declare const toTrustProxy: (value: unknown) => TrustProxy; declare const settingValue: (name: string, value: unknown) => string | readonly string[]; declare abstract class HonoLifecycle extends RouteAdapter { protected readonly hono: NestHono; protected readonly interceptor: typeof mountSse; protected readonly transport: Transport; protected trustProxy: TrustProxy; protected bodyLimit: number; protected bodyParsingEnabled: boolean; protected rawBodyEnabled: boolean; protected corsOptions: CorsConfig | undefined; private onRequestHook; private onResponseHook; private closing; private forceCloseConnections; private return503OnClosing; /** * Installs everything the application is built with before a route is registered: the security * headers, the request steps, and the compatibility bridges. Kept apart from the constructor so * the constructor reads as the field initialisation it is. */ private installPieces; protected constructor(options: TransportOptions); private installGuards; getType(): 'hono'; getHono(): NestHono; getHttpServer(): Server & NativeServer; isRouteOrderSensitive(): boolean; setOnRequestHook(hook: OnRequestHook): void; setOnResponseHook(hook: OnResponseHook): void; private readShutdownOptions; initHttpServer(options: NestApplicationOptions): void; getTransport(): Transport; listen(port: string | number, callback?: () => void): void; listen(port: string | number, hostname: string, callback?: () => void): void; close(): Promise; protected keepRawBody(rawBody?: boolean): void; private installSecurityHeaders; } interface HonoLifecycle { beforeClose: () => void; getInstance: () => TInstance; } export { HonoLifecycle, settingValue, toTrustProxy }; export type { TransportOptions }; //# sourceMappingURL=hono-lifecycle.d.ts.map