import { IncomingHttpEvent } from '../IncomingHttpEvent.js'; import { OutgoingHttpResponse } from '../OutgoingHttpResponse.js'; import { IBlueprint, ILogger, NextMiddleware, type MetaMiddleware } from '@stone-js/core'; /** * Kernel Middleware for serving static files from a directory. * If a static file is found, it serves the file; otherwise, the request is passed to the next middleware. */ export declare class StaticFileMiddleware { private readonly logger; private readonly rootDir; private readonly blueprint; /** * Create a new StaticFileMiddleware instance. * * @param container - The service container to inject dependencies. */ constructor({ blueprint, logger }: { blueprint: IBlueprint; logger: ILogger; }); /** * Handle incoming HTTP events and serve static files if applicable. * * @param event - The incoming HTTP event. * @param next - The next middleware in the pipeline. * @returns The outgoing HTTP response. * @throws {ForbiddenError|InternalServerError} If access to the file is forbidden. */ handle(event: IncomingHttpEvent, next: NextMiddleware): Promise; /** * Serve a static file. */ private serveFile; /** * Determine the file to serve, prioritizing compressed versions if supported by the client. * * @param event - The incoming HTTP event. * @returns The file to serve. */ private makeFile; } /** * Meta Middleware for serving static files from a directory. */ export declare const MetaStaticFileMiddleware: MetaMiddleware;