mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
upgrade vite + fix types
This commit is contained in:
@@ -4,11 +4,11 @@ import path from "node:path";
|
||||
import { type RuntimeBkndConfig, createRuntimeApp } from "bknd/adapter";
|
||||
import { registerLocalMediaAdapter } from ".";
|
||||
import { config, type App } from "bknd";
|
||||
import type { ServeOptions } from "bun";
|
||||
import { serveStatic } from "hono/bun";
|
||||
|
||||
type BunEnv = Bun.Env;
|
||||
export type BunBkndConfig<Env = BunEnv> = RuntimeBkndConfig<Env> & Omit<ServeOptions, "fetch">;
|
||||
export type BunBkndConfig<Env = BunEnv> = RuntimeBkndConfig<Env> &
|
||||
Omit<Bun.Serve.Options<undefined, string>, "fetch">;
|
||||
|
||||
export async function createApp<Env = BunEnv>(
|
||||
{ distPath, serveStatic: _serveStatic, ...config }: BunBkndConfig<Env> = {},
|
||||
@@ -60,7 +60,7 @@ export function serve<Env = BunEnv>(
|
||||
args: Env = Bun.env as Env,
|
||||
) {
|
||||
Bun.serve({
|
||||
...serveOptions,
|
||||
...(serveOptions as any),
|
||||
port,
|
||||
fetch: createHandler(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user