diesel-core
Version:
Web framework built on Web Standards
13 lines (12 loc) • 1.16 kB
TypeScript
import { Server } from "bun";
import { ContextType, DieselT, HookType } from "../types";
import Diesel from "../main";
export declare function runHooks<T extends any[]>(label: HookType, hooksArray: any, args: T): Promise<Response | undefined>;
export declare function runMiddlewares(diesel: DieselT, pathname: string, ctx: ContextType): Promise<Response | null>;
export declare function executeBunMiddlewares(middlewares: Function[], req: Request, server: Server): Promise<any>;
export declare function runFilter(diesel: Diesel, path: string, ctx: ContextType): Promise<any>;
export declare function handleFilterRequest(diesel: Diesel, path: string, ctx: ContextType): Promise<any>;
export declare function handleBunFilterRequest(diesel: DieselT, path: string, req: Request, server: Server): Promise<Response | undefined>;
export declare function handleRouteNotFound(diesel: Diesel, ctx: ContextType, pathname: string): Promise<Response | undefined>;
export declare function generateErrorResponse(status: number, error: string): Response;
export declare function handleStaticFiles(diesel: Diesel, pathname: string, ctx: ContextType): Promise<Response | null>;