refactor: improve type handling and config structure

Updated various type definitions to improve flexibility and maintain consistency, including `MaybePromise` and `PartialRec`. Adjusted `App` class and related configurations to properly utilize these changes.
This commit is contained in:
dswbx
2025-09-18 09:58:12 +02:00
parent 07029e3797
commit 6e3060141b
5 changed files with 15 additions and 8 deletions

View File

@@ -2,7 +2,7 @@ import type { Config } from "@libsql/client/node";
import { StorageLocalAdapter } from "adapter/node/storage";
import type { CliBkndConfig, CliCommand } from "cli/types";
import { Option } from "commander";
import { config, type App, type CreateAppConfig } from "bknd";
import { config, type App, type CreateAppConfig, type MaybePromise } from "bknd";
import dotenv from "dotenv";
import { registries } from "modules/registries";
import c from "picocolors";
@@ -60,7 +60,7 @@ type MakeAppConfig = {
connection?: CreateAppConfig["connection"];
server?: { platform?: Platform };
setAdminHtml?: boolean;
onBuilt?: (app: App) => Promise<void>;
onBuilt?: (app: App) => MaybePromise<void>;
};
async function makeApp(config: MakeAppConfig) {