bknd
Version:
Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.
48 lines (47 loc) • 2.44 kB
TypeScript
import { type CloudflareBkndConfig, type CloudflareEnv } from "bknd/adapter/cloudflare";
import type { GetPlatformProxyOptions } from "wrangler";
export type WithPlatformProxyOptions = {
/**
* By default, proxy is used if the PROXY environment variable is set to 1.
* You can override/force this by setting this option.
*/
useProxy?: boolean;
proxyOptions?: GetPlatformProxyOptions;
};
export declare function withPlatformProxy<Env extends CloudflareEnv>(config?: CloudflareBkndConfig<Env>, opts?: WithPlatformProxyOptions): {
app: (_env: Env) => Promise<{
beforeBuild: (app: import("../..").App<import("../..").Connection<unknown>, import("../../core/types").PartialRec<import("../..").ModuleConfigs>, import("../../App").AppOptions> | undefined, registries: {
readonly media: import("../../core/registry/Registry").Registry<{
cls: import("../../core/registry/Registry").Constructor<import("../..").StorageAdapter> & {
prototype: import("../..").StorageAdapter;
};
schema: import("jsonv-ts").Schema;
}, Record<string, {
cls: import("../../core/registry/Registry").Constructor<import("../..").StorageAdapter> & {
prototype: import("../..").StorageAdapter;
};
schema: import("jsonv-ts").Schema;
}>, import("../../core/registry/Registry").RegisterFn<{
cls: import("../../core/registry/Registry").Constructor<import("../..").StorageAdapter> & {
prototype: import("../..").StorageAdapter;
};
schema: import("jsonv-ts").Schema;
}>>;
} | undefined) => Promise<void>;
bindings: (env: any) => Promise<{
kv?: KVNamespace;
db?: D1Database;
}>;
connection: import("../..").Connection<unknown> | {
url: string;
} | import("../..").GenericSqliteConnection<any> | undefined;
config?: import("../../core/types").PartialRec<import("../..").ModuleConfigs> | undefined;
options?: import("../../App").AppOptions | undefined;
onBuilt?: ((app: import("../..").App) => import("../..").MaybePromise<void>) | undefined;
buildConfig?: {
[key: string]: any;
sync?: boolean;
forceBuild?: boolean;
} | undefined;
}>;
};