7420afa380
- 新增路由元信息类型定义 (requiresAuth, roles, title) - 实现路由守卫中的角色权限校验逻辑 - 新增 403 禁止访问页面 - 提取权限校验函数 checkRoutePermission,提高可测试性 - 修复 JSON.parse 异常处理,增强健壮性 - 优化页面标题动态设置 测试优化: - 重构 global-setup.ts,支持 JAR 文件启动后端服务 - 优化测试用例等待逻辑,减少硬编码延迟 - 简化 playwright 配置,移除多浏览器支持 - 新增路由权限守卫单元测试 关联需求:权限系统完善
69 lines
2.5 KiB
JSON
69 lines
2.5 KiB
JSON
{
|
|
"name": "novalon-manage-web",
|
|
"version": "1.0.0",
|
|
"description": "Novalon Enterprise Management System Frontend",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"dev:local": "vite --mode development-local",
|
|
"dev:test": "vite --mode test",
|
|
"build": "vue-tsc && vite build",
|
|
"build:test": "vue-tsc && vite build --mode test",
|
|
"build:prod": "vue-tsc && vite build --mode production",
|
|
"preview": "vite preview",
|
|
"test": "vitest --run",
|
|
"test:ui": "vitest --ui",
|
|
"test:unit": "vitest --run --coverage",
|
|
"test:coverage": "vitest --run --coverage",
|
|
"test:e2e": "playwright test",
|
|
"test:e2e:smoke": "playwright test --project=smoke",
|
|
"test:e2e:journeys": "playwright test --project=journeys",
|
|
"test:e2e:headed": "playwright test --headed",
|
|
"test:e2e:debug": "playwright test --debug",
|
|
"test:e2e:perf": "node scripts/measure-e2e-performance.js",
|
|
"test:perf": "node scripts/performance-test.js performance",
|
|
"test:load": "node scripts/performance-test.js load",
|
|
"test:perf:all": "node scripts/performance-test.js all",
|
|
"test:edge": "playwright test edge-cases.spec.ts",
|
|
"test:performance-opt": "playwright test performance-optimization.spec.ts",
|
|
"test:parallel-opt": "playwright test parallel-optimization.spec.ts",
|
|
"test:all-opt": "playwright test edge-cases.spec.ts performance-optimization.spec.ts parallel-optimization.spec.ts",
|
|
"test:monitor": "node e2e/performanceMonitor.js report",
|
|
"type-check": "vue-tsc --noEmit",
|
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx --fix --ignore-path .gitignore",
|
|
"format": "prettier --write src/"
|
|
},
|
|
"dependencies": {
|
|
"@element-plus/icons-vue": "^2.3.2",
|
|
"axios": "^1.6.2",
|
|
"crypto-js": "^4.2.0",
|
|
"date-fns": "^4.1.0",
|
|
"dayjs": "^1.11.10",
|
|
"element-plus": "^2.13.5",
|
|
"jwt-decode": "^4.0.0",
|
|
"pinia": "^3.0.4",
|
|
"vue": "^3.5.26",
|
|
"vue-i18n": "^9.8.0",
|
|
"vue-router": "^4.6.4"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.40.1",
|
|
"@types/crypto-js": "^4.2.2",
|
|
"@types/node": "^20.10.0",
|
|
"@typescript-eslint/eslint-plugin": "^6.18.1",
|
|
"@typescript-eslint/parser": "^6.18.1",
|
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
"@vitest/coverage-v8": "^4.1.1",
|
|
"@vitest/ui": "^4.0.16",
|
|
"@vue/test-utils": "^2.4.3",
|
|
"eslint": "^8.56.0",
|
|
"eslint-plugin-vue": "^9.19.2",
|
|
"jsdom": "^27.4.0",
|
|
"prettier": "^3.1.1",
|
|
"typescript": "^5.9.3",
|
|
"vite": "^7.3.1",
|
|
"vitest": "^4.0.16",
|
|
"vue-tsc": "^3.2.2"
|
|
}
|
|
}
|