bknd
Version:
Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.
26 lines (25 loc) • 990 B
TypeScript
import type { CloudflareBkndConfig, CloudflareEnv } from ".";
import { App } from "../..";
import type { Context, ExecutionContext } from "hono";
export declare const constants: {
exec_async_event_id: string;
cache_endpoint: string;
do_endpoint: string;
d1_session: {
cookie: string;
header: string;
};
};
export type CfMakeConfigArgs<Env extends CloudflareEnv = CloudflareEnv> = {
env: Env;
ctx?: ExecutionContext;
request?: Request;
};
export declare function d1SessionHelper(config: CloudflareBkndConfig<any>): {
get: (request?: Request) => D1SessionBookmark | undefined;
set: (c: Context, d1?: D1DatabaseSession) => void;
};
export declare function makeConfig<Env extends CloudflareEnv = CloudflareEnv>(config: CloudflareBkndConfig<Env>, args?: CfMakeConfigArgs<Env>): import("../..").CreateAppConfig;
export declare function registerAsyncsExecutionContext(app: App, ctx: {
waitUntil: ExecutionContext["waitUntil"];
}): void;