fix tests and imports

This commit is contained in:
dswbx
2025-06-25 09:42:25 +02:00
parent 57ae2f333c
commit a9f3a582eb
4 changed files with 26 additions and 17 deletions

View File

@@ -1,10 +1,10 @@
import { D1Connection, type D1ConnectionConfig } from "./connection/D1Connection";
import { d1Sqlite, type D1ConnectionConfig } from "./connection/D1Connection";
export * from "./cloudflare-workers.adapter";
export { makeApp, getFresh } from "./modes/fresh";
export { getCached } from "./modes/cached";
export { DurableBkndApp, getDurable } from "./modes/durable";
export { D1Connection, type D1ConnectionConfig };
export { d1Sqlite, type D1ConnectionConfig };
export {
getBinding,
getBindings,
@@ -14,6 +14,9 @@ export {
} from "./bindings";
export { constants } from "./config";
export function d1(config: D1ConnectionConfig) {
return new D1Connection(config);
// for compatibility with old code
export function d1<DB extends D1Database | D1DatabaseSession = D1Database>(
config: D1ConnectionConfig<DB>,
) {
return d1Sqlite<DB>(config);
}