Merge pull request #5 from bipprojectbali/nico/26-feb-26/fix-seed-2

Fix Gambar
This commit is contained in:
2026-03-12 15:21:17 +08:00
committed by GitHub
2 changed files with 206 additions and 209 deletions

View File

@@ -12,7 +12,7 @@
"test": "bun test __tests__/api", "test": "bun test __tests__/api",
"test:ui": "bun test --ui __tests__/api", "test:ui": "bun test --ui __tests__/api",
"test:e2e": "bun run build && playwright test", "test:e2e": "bun run build && playwright test",
"build": "bun run scripts/build.ts", "build": "bun build ./src/index.html --outdir=dist --sourcemap --target=browser --minify --define:process.env.NODE_ENV='\"production\"' --env='VITE_*' && cp -r public/* dist/ 2>/dev/null || true",
"start": "NODE_ENV=production bun src/index.ts", "start": "NODE_ENV=production bun src/index.ts",
"seed": "bun prisma/seed.ts" "seed": "bun prisma/seed.ts"
}, },

View File

@@ -110,12 +110,10 @@ if (!isProduction) {
end(data: any) { end(data: any) {
// Handle potential Buffer or string data from Vite // Handle potential Buffer or string data from Vite
let body = data; let body = data;
// If we have collected chunks from write() calls, combine them // If we have collected chunks from write() calls, combine them
if (this._chunks && this._chunks.length > 0) { if (this._chunks && this._chunks.length > 0) {
body = Buffer.concat(this._chunks); body = Buffer.concat(this._chunks);
} }
if (data instanceof Uint8Array) { if (data instanceof Uint8Array) {
body = data; body = data;
} else if (typeof data === "string") { } else if (typeof data === "string") {
@@ -251,4 +249,3 @@ console.log(
); );
export type ApiApp = typeof app; export type ApiApp = typeof app;