mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
chore: drizzle config root
This commit is contained in:
@@ -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",
|
||||
},
|
||||
});
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -219,7 +219,6 @@ export const listSnapshotFilesDto = describeRoute({
|
||||
*/
|
||||
export const restoreSnapshotBody = type({
|
||||
snapshotId: "string",
|
||||
path: "string?",
|
||||
include: "string[]?",
|
||||
exclude: "string[]?",
|
||||
});
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user