diff --git a/package.json b/package.json index e25d7688..b87bba1c 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "dev": "bun clean && bun run --silent --watch ./pkgs/core/index.ts dev", "clean": "rm -rf app/static && rm -rf app/web/.parcel-cache", "build": "bun run --silent ./pkgs/core/build.ts", - "deploy": "bun run --silent ./pkgs/core/deploy.ts", + "db-pull": "bun run --silent ./pkgs/core/db-pull.ts", "prod": "bun run --silent ./pkgs/core/index.ts", "pull": "cd app/db && bun prisma db pull && bun prisma generate", "pkgs-upgrade": "bun run --silent ./pkgs/core/upgrade.ts" diff --git a/pkgs/core/db-pull.ts b/pkgs/core/db-pull.ts new file mode 100644 index 00000000..3ce14fa0 --- /dev/null +++ b/pkgs/core/db-pull.ts @@ -0,0 +1,11 @@ +import { dir } from "dir"; +import { $ } from "execa"; + +await $({ + cwd: dir.path("app/db"), + stdio: ["ignore", "inherit", "inherit"], +})`bun prisma db pull`; +await $({ + cwd: dir.path("app/db"), + stdio: ["ignore", "inherit", "inherit"], +})`bun prisma generate`; diff --git a/pkgs/core/deploy.ts b/pkgs/core/deploy.ts deleted file mode 100644 index 83ee79df..00000000 --- a/pkgs/core/deploy.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { dir } from "dir"; -import { $ } from "execa"; - -await $({ cwd: dir.path("app/db") })`bun prisma db pull`; -await $({ cwd: dir.path("app/db") })`bun prisma generate`;