Files
competition-website/package.json

71 lines
1.7 KiB
JSON
Raw Normal View History

{
"name": "competition-website-backend",
"version": "1.0.0",
"description": "通信与导航应用技术创新赛线上选拔赛网站后端",
"private": true,
"egg": {
"declarations": false,
"typescript": false
},
"dependencies": {
"@alicloud/dysmsapi20170525": "^4.6.0",
"@alicloud/openapi-client": "^0.4.15",
"@alicloud/tea-util": "^1.4.11",
"@artus/core": "^2.2.4",
"@eggjs/router": "^3.0.6",
"archiver": "^8.0.0",
feat(exam/auth): 登录闸门 + 交卷稳定性加固(R4-R8) R4 登录/交卷背压闸门 - app/middleware/concurrency_guard.js: 新增。超限即 429 + Retry-After(立即拒绝式, 不排队;实测 429 P50=34ms)。RETRY_AFTER 收敛为单一有依据常量 = '2' (≈1.8 个满载窗口;实测 bcryptjs 1129ms / 原生 265ms 每窗口)。 配额:LOGIN_MAX=16 / SUBMIT_MAX=24 / HEAVY_REQ_MAX=20,各 *REQ_MAX 覆盖。 - config/config.default.js: 闸门配额与连接池容量配置;DB dialect 锁 mysql。 R7 顺序红线 + R8 Retry-After 同源 + 原生 bcrypt - 3 处硬编码 '2' 收敛为单一常量;补"勿因换实现而删闸门"红线注释。 - bcryptjs -> bcrypt@6(N-API,Windows/Linux 均免编译;drop-in,存量哈希 $2b$10$ 兼容)。 - app/model/account.js / app/service/auth.js: 同步哈希实现注释(D4 全族 5 处陈旧 SHA256 注释修正)。 答题链路与综合大题 - app/controller/exam.js: 中职/高职综合大题接口(GET big-question / POST big-answer, 逐问 2000 字上限校验);uploadWord 对中职/高职封堵(400)。 - app/service/exam.js: 抽题快照 question_snapshot 落库、答案归集键修正。 - app/controller/auth.js / app/service/auth.js: toClientUser() 唯一出口, 未发布态按组剔除 score,exam_score/word_score/ppt_score 任何情况下不下发。 - app/router.js: 新增大题与管理端路由。 - app/extend/helper.js: 下载文件名 RFC5987 编码(禁双重编码)。 - app.js: 池容量断言按 env 区分单/多 worker(防 dev 假日志)。 验证:ci-gates.sh 9/9 全绿;verify_login_guard.py 28/28(含 D 组变异 9/9); 真实登录/抽题/交卷端到端 code=0;前端构建 BUILD_RC=0。
2026-09-22 09:16:55 +08:00
"bcrypt": "^6.0.0",
"cliui": "^9.0.1",
"egg": "^3.34.0",
"egg-cors": "^2.2.4",
"egg-scripts": "^2.17.0",
"egg-sequelize": "^6.0.0",
"egg-validate": "^2.0.2",
"get-ready": "^2.0.1",
"jsonwebtoken": "^9.0.2",
"multer": "^1.4.5-lts.1",
"mysql2": "^3.6.5",
"mz-modules": "^2.1.0",
"svg-captcha": "^1.4.0",
"tslib": "^2.8.1",
"xlsx": "^0.18.0",
"ylru": "^1.4.0"
},
"devDependencies": {
"egg-bin": "^6.3.0",
"egg-mock": "^5.0.0",
"sequelize-cli": "^6.6.2",
"string-width": "^4.2.3",
"wt": "^1.2.0"
},
"engines": {
"node": ">=16.0.0"
},
"scripts": {
"start": "egg-scripts start --daemon --title=competition-website-backend",
"stop": "egg-scripts stop --title=competition-website-backend",
"dev": "egg-bin dev",
"debug": "egg-bin debug",
"test": "npm run lint -- --fix && npm run test-local",
"test-local": "egg-bin test",
"cov": "egg-bin cov",
"lint": "eslint .",
"ci": "npm run cov"
},
"ci": {
"version": "14, 16",
"type": "github"
},
"repository": {
"type": "git",
"url": ""
},
"keywords": [
"egg",
"competition",
"backend"
],
"author": "",
"license": "MIT"
}