UNPKG

bknd

Version:

Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.

29 lines (28 loc) 956 B
import type { App, SafeUser } from ".."; import { type Context, type Env, Hono } from "hono"; import * as middlewares from "../modules/middlewares"; import type { EntityManager } from "../data/entities"; import { s } from "bknd/utils"; export interface ServerEnv extends Env { Variables: { app: App; auth?: { resolved: boolean; registered: boolean; skip: boolean; user?: SafeUser; }; html?: string; }; [key: string]: any; } export declare class Controller { protected middlewares: typeof middlewares; protected create(): Hono<ServerEnv>; static createServer(): Hono<ServerEnv>; getController(): Hono<ServerEnv>; protected isJsonRequest(c: Context<ServerEnv>): boolean; protected notFound(c: Context<ServerEnv>): Response | Promise<Response>; protected getEntitiesEnum(em: EntityManager<any>): s.StringSchema; registerMcp(): void; }