This commit is contained in:
Rizky
2024-02-17 20:15:53 +07:00
parent af4b8110f6
commit 645f6d1739
4 changed files with 28 additions and 11 deletions
+4 -1
View File
@@ -20,7 +20,7 @@ export type SinglePage = {
name: true;
content_tree: any;
is_default_layout: true;
}
};
type PrasiServer = {
ws?: WebSocketHandler<{ url: string }>;
@@ -64,6 +64,9 @@ export const g = global as unknown as {
br: Record<string, Uint8Array>;
br_timeout: Set<string>;
};
createServer: (
arg: PrasiServer & { api: any; db: any }
) => (site_id: string) => Promise<PrasiServer & { api: any; db: any }>;
deploy: {
init: boolean;
raw: any;
+1 -1
View File
@@ -4,7 +4,7 @@ import { $ } from "execa";
import { g } from "./global";
export const preparePrisma = async () => {
if (await existsAsync(dir("app/db/.env"))) {
if ((await existsAsync(dir("app/db/.env"))) && !g.db) {
if (g.mode !== "dev") {
await $({ cwd: dir(`app/db`) })`bun prisma db pull`;
await $({ cwd: dir(`app/db`) })`bun prisma generate`;