- admin token 载荷新增 ver 版本号,与当前版本不一致即失效;版本持久化到 platform_configs,重启/多实例(30s同步)均生效 - 新增 POST /api/admin/session/revoke-all(requireAdmin):一键吊销全部后台登录态;后台右上角新增入口 - 令牌有效期改为可配置 ADMIN_TOKEN_TTL_HOURS(默认由 7 天收紧到 24 小时) - 移除 server 未使用的 @prisma/client / prisma(server/src 零引用),pnpm 移除 331 个包;pnpm audit --prod 由 46 个漏洞降为 0 - 新增回归护栏 admin-token-revocation.spec.ts(91 套件/653 用例全绿);冒烟 6/6
41 行
914 B
JSON
41 行
914 B
JSON
{
|
|
"name": "peiwan-server",
|
|
"version": "1.0.0",
|
|
"description": "陪玩小程序核心业务服务端",
|
|
"main": "dist/index.js",
|
|
"scripts": {
|
|
"dev": "tsx watch src/index.ts",
|
|
"test": "jest --verbose",
|
|
"test:watch": "jest --watch",
|
|
"build": "tsc",
|
|
"start": "node dist/src/index.js",
|
|
"backfill:ownership": "tsx scripts/backfill-ownership.ts"
|
|
},
|
|
"keywords": [
|
|
"peiwan",
|
|
"game",
|
|
"activity",
|
|
"tdd"
|
|
],
|
|
"author": "",
|
|
"license": "ISC",
|
|
"devDependencies": {
|
|
"@types/cors": "^2.8.19",
|
|
"@types/express": "^5.0.6",
|
|
"@types/jest": "^29.5.14",
|
|
"@types/multer": "^2.3.0",
|
|
"@types/node": "^22.13.4",
|
|
"jest": "^29.7.0",
|
|
"ts-jest": "^29.2.5",
|
|
"tsx": "^4.23.15",
|
|
"typescript": "^5.7.3"
|
|
},
|
|
"dependencies": {
|
|
"cors": "^2.8.6",
|
|
"dotenv": "^18.0.4",
|
|
"express": "^5.2.1",
|
|
"multer": "^2.4.0",
|
|
"mysql2": "^3.24.4"
|
|
}
|
|
}
|