Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ENV NUXT_TELEMETRY_DISABLED=1

# RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn add --network-timeout 1000000 --no-lockfile --ignore-scripts prisma@6.11.1
RUN apk add --no-cache pnpm 7zip nginx
RUN pnpm install prisma@6.11.1
RUN pnpm install prisma@7.3.0
# init prisma to download all required files
RUN pnpm prisma init

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"@nuxt/image": "^1.10.0",
"@nuxt/kit": "^3.20.1",
"@nuxtjs/i18n": "^9.5.5",
"@prisma/client": "^6.11.1",
"@prisma/adapter-pg": "^7.3.0",
"@prisma/client": "^7.3.0",
"@simplewebauthn/browser": "^13.2.2",
"@simplewebauthn/server": "^13.2.2",
"@tailwindcss/vite": "^4.0.6",
Expand All @@ -56,7 +57,7 @@
"parse-cosekey": "^1.0.2",
"pino": "^9.7.0",
"pino-pretty": "^13.0.0",
"prisma": "6.11.1",
"prisma": "7.3.0",
"sanitize-filename": "^1.6.3",
"semver": "^7.7.1",
"shescape": "^2.1.8",
Expand Down
762 changes: 654 additions & 108 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions prisma.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import { config } from "dotenv";
import type { PrismaConfig } from "prisma";
import { defineConfig } from "prisma/config";
import path from "node:path";

// load .env variables
config();

export default {
// need to use built in env access as prisma's env function throws when DATABASE_URL is undefined
// this is acceptable as prisma throws already it actually needs the URL
const databaseURL = process.env.DATABASE_URL;

export default defineConfig({
schema: path.join("prisma"),
earlyAccess: true,
} satisfies PrismaConfig;
datasource: {
url: databaseURL,
},
});
3 changes: 1 addition & 2 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// TLDR: vite removes it during bundling it or something like that
generator client {
provider = "prisma-client"
output = "client"
output = "./client"
previewFeatures = ["fullTextSearchPostgres", "relationJoins"]
binaryTargets = ["native", "debian-openssl-3.0.x"]
}
Expand All @@ -21,5 +21,4 @@ generator client {

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
2 changes: 1 addition & 1 deletion server/api/v1/auth/signin/simple.post.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AuthMec } from "~/prisma/client/enums";
import type { JsonArray } from "@prisma/client/runtime/library";
import type { JsonArray } from "@prisma/client/runtime/client";
import { type } from "arktype";
import prisma from "~/server/internal/db/database";
import sessionHandler from "~/server/internal/session";
Expand Down
7 changes: 3 additions & 4 deletions server/internal/db/database.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { PrismaClient } from "~/prisma/client/client";
// import { PrismaPg } from "@prisma/adapter-pg";
import { PrismaPg } from "@prisma/adapter-pg";

const prismaClientSingleton = () => {
// const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL });
// const prisma = new PrismaClient({ adapter });
const prisma = new PrismaClient();
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL });
const prisma = new PrismaClient({ adapter });
return prisma;
};

Expand Down
2 changes: 1 addition & 1 deletion server/internal/library/manifest/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { JsonValue } from "@prisma/client/runtime/library";
import type { JsonValue } from "@prisma/client/runtime/client";

export type DropletManifest = V2Manifest;

Expand Down
2 changes: 1 addition & 1 deletion server/internal/session/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import prisma from "../db/database";
import type { SessionProvider, SessionWithToken } from "./types";
import cacheHandler from "../cache";
import type { SessionWhereInput, JsonFilter } from "~/prisma/client/models";
import type { InputJsonValue } from "@prisma/client/runtime/library";
import type { InputJsonValue } from "@prisma/client/runtime/client";

export default function createDBSessionHandler(): SessionProvider {
const cache = cacheHandler.createCache<SessionWithToken>("DBSession");
Expand Down
2 changes: 1 addition & 1 deletion server/plugins/05.library-init.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { LibraryBackend } from "~/prisma/client/enums";
import prisma from "../internal/db/database";
import type { JsonValue } from "@prisma/client/runtime/library";
import type { JsonValue } from "@prisma/client/runtime/client";
import type { LibraryProvider } from "../internal/library/provider";
import { FilesystemProvider } from "../internal/library/providers/filesystem";
import libraryManager from "../internal/library";
Expand Down