Remove Prisma once and for all

This commit is contained in:
Jesse Wierzbinski 2024-04-13 14:46:33 -10:00
parent 90d522eaa3
commit a65249b79d
No known key found for this signature in database
18 changed files with 112 additions and 563 deletions

View file

@ -13,7 +13,6 @@ await $`rm -rf dist && mkdir dist`;
await Bun.build({
entrypoints: [
`${process.cwd()}/index.ts`,
`${process.cwd()}/prisma.ts`,
`${process.cwd()}/cli.ts`,
// Force Bun to include endpoints
...Object.values(rawRoutes),
@ -22,7 +21,7 @@ await Bun.build({
target: "bun",
splitting: true,
minify: true,
external: ["bullmq", "@prisma/client", "frontend"],
external: ["bullmq", "frontend"],
}).then((output) => {
if (!output.success) {
console.log(output.logs);
@ -33,14 +32,6 @@ await Bun.build({
// I apologize for this
await $`sed -i 's|import("node_modules/|import("./node_modules/|g' dist/*.js`;
// Copy generated Prisma client to dist
await $`mkdir -p dist/node_modules/@prisma`;
await $`cp -r ${process.cwd()}/node_modules/@prisma dist/node_modules/`;
await $`cp -r ${process.cwd()}/node_modules/.prisma dist/node_modules`;
await $`mkdir -p dist/node_modules/.bin`;
await $`cp -r ${process.cwd()}/node_modules/.bin/prisma dist/node_modules/.bin`;
await $`cp -r ${process.cwd()}/node_modules/prisma dist/node_modules/`;
// Copy Sharp to dist
await $`mkdir -p dist/node_modules/@img`;
await $`cp -r node_modules/@img/sharp-libvips-linux-* dist/node_modules/@img`;