Initial commit : monorepo seiche (serveur Fastify + web Vite/React, Docker, config VS Code)

This commit is contained in:
bot-claude
2026-08-25 09:55:13 +02:00
commit 5174c37a31
61 changed files with 7117 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
import path from "node:path";
import type { Config } from "../src/config";
import { type Database, openInMemoryDatabase } from "../src/db/client";
export const MIGRATIONS_FOLDER = path.resolve(import.meta.dirname, "../drizzle");
export function makeConfig(overrides: Partial<Config> = {}): Config {
return {
port: 8787,
host: "127.0.0.1",
dataDir: "/tmp/seiche-tests",
sessionTtlMs: 8 * 60 * 60 * 1000,
sessionAbsoluteTtlMs: 7 * 24 * 60 * 60 * 1000,
maxLoginAttemptsPerMinute: 5,
publicDir: null,
external: {
adapter: "example",
baseUrl: "",
apiKey: "",
healthPath: "/health",
listPath: "/items",
timeoutMs: 10_000,
retries: 2,
cacheTtlMs: 30_000,
},
...overrides,
};
}
/** Base SQLite in-memory avec les migrations jouées. */
export async function openTestDb(): Promise<Database> {
return openInMemoryDatabase(MIGRATIONS_FOLDER);
}