admin-projects/package.json
wangdl 176593a8c2
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 12s
feat: Token 安全升级 — localStorage 迁移至 httpOnly cookie
- api-client: withCredentials: true,移除 Authorization header 注入
- api-client: 401 刷新改为 cookie 模式,无需前端传 refreshToken
- token.ts: 废弃 localStorage token 读写,保留 admin user 缓存
- use-auth-query: 移除 setTokens/clearTokens 调用
- auth.ts: logout 不再传 refreshToken(cookie 标识会话)

Breaking: 需要后端同步部署(登录/刷新 Set-Cookie + 守卫读 cookie)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-04 11:18:02 +08:00

49 lines
1.3 KiB
JSON

{
"name": "admin-projects-tmp",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
"@ant-design/icons": "^6.2.3",
"@ant-design/pro-components": "^2.8.10",
"@tanstack/react-query": "^5.100.11",
"antd": "^5.29.3",
"axios": "^1.18.1",
"cookie-parser": "^1.4.7",
"dayjs": "^1.11.20",
"echarts": "^6.1.0",
"echarts-for-react": "^3.0.6",
"react": "^19.2.6",
"react-dom": "^19.2.6",
"react-markdown": "^10.1.0",
"react-router-dom": "^7.15.1",
"react-syntax-highlighter": "^16.1.1",
"remark-gfm": "^4.0.1",
"zustand": "^5.0.14"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@tailwindcss/vite": "^4.3.0",
"@types/cookie-parser": "^1.4.10",
"@types/node": "^24.12.3",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@types/react-syntax-highlighter": "^15.5.13",
"@vitejs/plugin-react": "^6.0.1",
"eslint": "^10.3.0",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.2",
"globals": "^17.6.0",
"tailwindcss": "^4.3.0",
"typescript": "~6.0.2",
"typescript-eslint": "^8.59.2",
"vite": "^8.0.12"
}
}