- Compile src/db/migrate.ts to dist/migrate.js during build - Copy dist/migrate.js to Stage 2 (runner) inside Dockerfile - Run bun dist/migrate.js on db:migrate command - Modify schema.sql to use CREATE TABLE IF NOT EXISTS and ALTER TABLE to add file_hash to existing database instances on VPS Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
31 lines
1.1 KiB
JSON
31 lines
1.1 KiB
JSON
{
|
|
"name": "teleuploader",
|
|
"version": "1.0.0",
|
|
"description": "Telegram file uploader backend",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "bun --hot src/index.ts",
|
|
"build": "bun build src/index.ts --target=bun --outfile=dist/index.js && bun build src/db/migrate.ts --target=bun --outfile=dist/migrate.js",
|
|
"start": "NODE_ENV=production bun dist/index.js",
|
|
"db:migrate": "bun dist/migrate.js",
|
|
"test": "bun test test/rateLimit.test.ts && bun test test/file.test.ts && bun test test/telegram.test.ts && bun test test/upload.test.ts && bun test test/files.test.ts && bun test test/health.test.ts && bun test test/bot.test.ts && bun test test/bootstrap.test.ts && bun test test/swagger.test.ts",
|
|
"lint": "bunx biome check src test",
|
|
"format": "bunx biome format --write src test"
|
|
},
|
|
"dependencies": {
|
|
"@prisma/engines": "^7.8.0",
|
|
"drizzle-orm": "^0.45.2",
|
|
"nanoid": "^5.0.4",
|
|
"pg": "^8.11.0",
|
|
"postgres": "^3.4.9",
|
|
"telegraf": "^4.15.0",
|
|
"winston": "^3.11.0"
|
|
},
|
|
"devDependencies": {
|
|
"@biomejs/biome": "^2.4.15",
|
|
"@types/node": "^25.8.0",
|
|
"drizzle-kit": "^0.31.10",
|
|
"typescript": "^6.0.3"
|
|
}
|
|
}
|