kindergarten_java/reading-platform-frontend/package.json
tonytech 2a394a4882 chore(api): 接入 orval 自动生成 API 客户端
- 新增 orval.config.ts:从 OpenAPI spec 自动生成 TypeScript 代码
- 新增 src/api/request.ts:orval mutator,复用现有 axios 实例
- 新增 src/api/generated/:自动生成的 API 函数和类型定义(106个接口,155个类型)
- 新增 api-spec.json:后端 OpenAPI 规范快照
- package.json 新增脚本:api:fetch / api:gen / api:update

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 11:03:56 +08:00

47 lines
1.4 KiB
JSON

{
"name": "reading-platform-frontend",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc && vite build",
"preview": "vite preview",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"api:fetch": "curl -s http://8.148.151.56:3002/v3/api-docs -o api-spec.json && echo API spec updated",
"api:gen": "orval --config orval.config.ts",
"api:update": "npm run api:fetch && npm run api:gen"
},
"dependencies": {
"@ant-design/icons-vue": "^7.0.1",
"@fullcalendar/core": "^6.1.20",
"@fullcalendar/daygrid": "^6.1.20",
"@fullcalendar/interaction": "^6.1.20",
"@fullcalendar/timegrid": "^6.1.20",
"@fullcalendar/vue3": "^6.1.20",
"ant-design-vue": "^4.1.2",
"axios": "^1.6.7",
"dayjs": "^1.11.10",
"echarts": "^6.0.0",
"lodash-es": "^4.17.21",
"lucide-vue-next": "^0.575.0",
"pinia": "^2.1.7",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
},
"devDependencies": {
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.11.28",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/tsconfig": "^0.5.1",
"orval": "^7.13.2",
"sass-embedded": "^1.97.3",
"typescript": "~5.4.0",
"unplugin-auto-import": "^0.17.5",
"unplugin-vue-components": "^0.26.0",
"vite": "^5.1.6",
"vite-plugin-compression": "^0.5.1",
"vue-tsc": "^2.0.6"
}
}