Bakes the git short commit hash into the client bundle at build time and exposes the same info from the server via GET /api/version. The header displays the loaded build's commit and flags when it no longer matches what the server is running, so a stale open tab is easy to spot after a deploy. The Docker build now includes .git so the hash can be resolved during the image build. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
32 lines
902 B
JSON
32 lines
902 B
JSON
{
|
|
"name": "@citytracker/server",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"main": "dist/index.js",
|
|
"scripts": {
|
|
"dev": "tsx watch src/index.ts",
|
|
"build": "tsc && node -e \"require('fs').cpSync('src/db/migrations','dist/db/migrations',{recursive:true})\" && node scripts/write-version.js",
|
|
"start": "node dist/index.js",
|
|
"clean": "rimraf dist"
|
|
},
|
|
"dependencies": {
|
|
"@citytracker/shared": "*",
|
|
"adm-zip": "^0.6.0",
|
|
"argon2": "^0.40.3",
|
|
"better-sqlite3": "^11.3.0",
|
|
"express": "^4.21.0",
|
|
"express-session": "^1.18.0",
|
|
"multer": "^1.4.5-lts.1",
|
|
"zod": "^3.23.8"
|
|
},
|
|
"devDependencies": {
|
|
"@types/better-sqlite3": "^7.6.11",
|
|
"@types/express": "^4.17.21",
|
|
"@types/express-session": "^1.18.0",
|
|
"@types/multer": "^1.4.11",
|
|
"@types/node": "^20.14.15",
|
|
"rimraf": "^5.0.9",
|
|
"tsx": "^4.19.0",
|
|
"typescript": "^5.5.4"
|
|
}
|
|
}
|