- S1: .githooks/pre-commit blocks .env commits, .env.test in .gitignore - S3: TOKEN_SECRET centralized to config/token.ts, all files import from it - S3: checkTokenSecret enforces min 32-char TOKEN_SECRET at startup - S5: Refresh Token mechanism (Access 2h + Refresh 30d, dual token) - S5: POST /auth/refresh endpoint with rotation and max 5 per user - S5: Frontend request.ts auto-refresh on 40101, concurrent-safe - S6: Soft delete (deleted_at column), admin soft-delete with confirmName - S6: POST /admin/users/:id/restore endpoint - S6: All user queries filter deleted_at IS NULL - S7: DB connection requires env vars, no fallback credentials - Infra: jest.config.js, vitest.config.ts, .env.test - Infra: node-cron, jest, ts-jest, supertest, vitest, @pinia/testing
41 lines
1.3 KiB
JSON
41 lines
1.3 KiB
JSON
{
|
|
"name": "xiaocai-client",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev:h5": "uni -p h5",
|
|
"dev:mp-weixin": "uni -p mp-weixin",
|
|
"build:h5": "uni build -p h5",
|
|
"build:mp-weixin": "uni build -p mp-weixin",
|
|
"lint": "eslint src --ext .ts,.vue",
|
|
"test": "vitest run"
|
|
},
|
|
"dependencies": {
|
|
"@dcloudio/uni-app": "3.0.0-alpha-5010120260525001",
|
|
"@dcloudio/uni-app-plus": "3.0.0-alpha-5010120260525001",
|
|
"@dcloudio/uni-components": "3.0.0-alpha-5010120260525001",
|
|
"@dcloudio/uni-h5": "3.0.0-alpha-5010120260525001",
|
|
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-5010120260525001",
|
|
"@qiun/ucharts": "^2.5.0-20230101",
|
|
"pinia": "^2.1.7",
|
|
"vue": "^3.4.0"
|
|
},
|
|
"devDependencies": {
|
|
"@dcloudio/types": "^3.4.0",
|
|
"@dcloudio/uni-automator": "3.0.0-alpha-5010120260525001",
|
|
"@dcloudio/uni-cli-shared": "3.0.0-alpha-5010120260525001",
|
|
"@dcloudio/uni-stacktracey": "3.0.0-alpha-5010120260525001",
|
|
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-5010120260525001",
|
|
"@pinia/testing": "^0.1.7",
|
|
"@types/node": "^20.11.0",
|
|
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
"@typescript-eslint/parser": "^6.19.0",
|
|
"@vue/test-utils": "^2.4.11",
|
|
"eslint": "^8.56.0",
|
|
"sass": "^1.70.0",
|
|
"typescript": "^5.3.0",
|
|
"vite": "^5.0.0",
|
|
"vitest": "^1.6.1"
|
|
}
|
|
}
|