optimize adapter imports to deduplicate

This commit is contained in:
dswbx
2025-01-25 14:13:34 +01:00
parent 89b1fd3909
commit 5b40d5eaf4
19 changed files with 64 additions and 64 deletions

View File

@@ -1,6 +1,6 @@
import type { FrameworkBkndConfig } from "bknd/adapter";
import { Hono } from "hono";
import { serveStatic } from "hono/cloudflare-workers";
import type { FrameworkBkndConfig } from "../index";
import { getCached } from "./modes/cached";
import { getDurable } from "./modes/durable";
import { getFresh, getWarm } from "./modes/fresh";

View File

@@ -1,5 +1,5 @@
import { createRuntimeApp } from "adapter";
import { App } from "bknd";
import { createRuntimeApp } from "bknd/adapter";
import type { CloudflareBkndConfig, Context } from "../index";
export async function getCached(config: CloudflareBkndConfig, { env, ctx, ...args }: Context) {

View File

@@ -1,7 +1,7 @@
import { DurableObject } from "cloudflare:workers";
import { createRuntimeApp, makeConfig } from "adapter";
import type { CloudflareBkndConfig, Context } from "adapter/cloudflare";
import type { App, CreateAppConfig } from "bknd";
import { createRuntimeApp, makeConfig } from "bknd/adapter";
import type { CloudflareBkndConfig, Context } from "../index";
export async function getDurable(config: CloudflareBkndConfig, ctx: Context) {
const { dobj } = config.bindings?.(ctx.env)!;

View File

@@ -1,5 +1,5 @@
import { createRuntimeApp } from "adapter";
import type { App } from "bknd";
import { createRuntimeApp } from "bknd/adapter";
import type { CloudflareBkndConfig, Context } from "../index";
export async function makeApp(config: CloudflareBkndConfig, ctx: Context) {