feat: make queues durable by default and add seed helpers
This commit is contained in:
@@ -33,6 +33,7 @@ import {
|
||||
getDbPerformanceSnapshot,
|
||||
} from "@wrnexus/db";
|
||||
import { connectFromConfig } from "@wrnexus/db/connect";
|
||||
import { configureQueueStorage, type QueueStorageConfig } from "@wrnexus/queue";
|
||||
import { configureStorage, type StorageConfig } from "@wrnexus/uploader";
|
||||
import { setAuthzCatalog, type AuthzCatalog, type AuthzModule } from "@wrnexus/authz";
|
||||
import { loadAppAuthzCatalog } from "./authz-boot.ts";
|
||||
@@ -102,6 +103,8 @@ export interface ServeOptions {
|
||||
/** Inject the live-reload client (defaults to true in development). */
|
||||
hmr?: boolean;
|
||||
appConfig?: Record<string, unknown>;
|
||||
/** Queue persistence; durable SQLite is used when omitted. */
|
||||
queue?: QueueStorageConfig;
|
||||
/** Resolved absolute path to the global CSS entry, or null. */
|
||||
styleEntry?: string | null;
|
||||
/** Custom styles config (e.g. a Tailwind/PostCSS processor). */
|
||||
@@ -220,6 +223,7 @@ function resolveDevToolbarConfig(
|
||||
export async function startServer(opts: ServeOptions): Promise<RunningServer> {
|
||||
const appDir = resolve(opts.appDir);
|
||||
const appRoot = dirname(appDir);
|
||||
configureQueueStorage({ ...opts.queue, appRoot });
|
||||
const mode: Mode = opts.mode ?? "development";
|
||||
const importConfig = (opts.appConfig?.imports ?? {}) as {
|
||||
mode?: "legacy" | "compatible" | "explicit";
|
||||
|
||||
Reference in New Issue
Block a user