chore: drizzle config root

This commit is contained in:
Nicolas Meienberger
2025-10-31 22:05:28 +01:00
parent afeaf87bb0
commit c64e50bdec
9 changed files with 21 additions and 22 deletions

View File

@@ -1,11 +0,0 @@
import "dotenv/config";
import { defineConfig } from "drizzle-kit";
export default defineConfig({
out: "./drizzle",
schema: "./src/db/schema.ts",
dialect: "sqlite",
dbCredentials: {
url: "ironmount.db",
},
});

View File

@@ -4,9 +4,7 @@
"scripts": {
"dev": "bun run --watch src/index.ts",
"build": "rm -rf dist && bun build.ts",
"tsc": "tsc --noEmit",
"gen:migrations": "drizzle-kit generate",
"studio": "drizzle-kit studio"
"tsc": "tsc --noEmit"
},
"dependencies": {
"@hono/standard-validator": "^0.1.5",
@@ -27,7 +25,6 @@
"devDependencies": {
"@libsql/client": "^0.15.15",
"@types/bun": "^1.3.0",
"@types/dockerode": "^3.3.44",
"drizzle-kit": "^0.31.5"
"@types/dockerode": "^3.3.44"
}
}

View File

@@ -92,9 +92,9 @@ export const repositoriesController = new Hono()
)
.post("/:name/restore", restoreSnapshotDto, validator("json", restoreSnapshotBody), async (c) => {
const { name } = c.req.param();
const { snapshotId, path, include, exclude } = c.req.valid("json");
const { snapshotId, include, exclude } = c.req.valid("json");
const result = await repositoriesService.restoreSnapshot(name, snapshotId, { path, include, exclude });
const result = await repositoriesService.restoreSnapshot(name, snapshotId, { include, exclude });
return c.json<RestoreSnapshotDto>(result, 200);
});

View File

@@ -219,7 +219,6 @@ export const listSnapshotFilesDto = describeRoute({
*/
export const restoreSnapshotBody = type({
snapshotId: "string",
path: "string?",
include: "string[]?",
exclude: "string[]?",
});

View File

@@ -164,11 +164,7 @@ const listSnapshotFiles = async (name: string, snapshotId: string, path?: string
const restoreSnapshot = async (
name: string,
snapshotId: string,
options?: {
path?: string;
include?: string[];
exclude?: string[];
},
options?: { include?: string[]; exclude?: string[] },
) => {
const repository = await db.query.repositoriesTable.findFirst({
where: eq(repositoriesTable.name, name),