## 新增功能 ### 1. 屏幕阅读器兼容性增强(a11y) - 无障碍工具库:src/shared/lib/a11y.ts - aria-live Hook:src/shared/hooks/use-aria-live.ts - a11y 组件:skip-link/visually-hidden/focus-trap/aria-status - 增强 UI:table.tsx 系统性 ARIA role,dialog.tsx aria-modal - 审计文档:docs/accessibility/a11y-audit.md(WCAG 2.1 AA 清单) ### 2. 视觉回归测试 - 测试套件:tests/visual/(homepage + 3 个 dashboard) - 3 视口(desktop/tablet/mobile)× 2 主题(light/dark) - 动态元素遮罩,避免误报 - playwright.config.ts 新增 visual-chromium 项目 - 文档:docs/testing/visual-regression.md ### 3. 短信/微信推送渠道集成 - 新模块:src/modules/notifications/ - 4 个渠道:SMS(阿里云/腾讯云)、WeChat(公众号)、Email(SMTP)、In-App - 分发器按用户偏好并行多渠道发送 - 外部 SDK 动态 import,Mock 模式开发可用 - 文档:docs/notifications/channels.md ### 4. 漏洞扫描 CI 集成 - CI security-scan job:npm audit + Snyk + Trivy FS + OWASP ZAP - 独立工作流 security.yml:每周一深度扫描 + 容器镜像扫描 - 配置:suppressions.json + .trivyignore - 本地脚本:security-scan.sh/ps1 - 文档:docs/security/scanning.md(SLA 分级) ### 5. 灾备方案 - 脚本:backup-verify/backup-offsite-sync/dr-drill/failover/health-check - CI 增强:备份后校验+异地同步,每周灾备演练 - 独立工作流 dr-drill.yml:每周一凌晨 4 点自动演练 - 文档:docs/dr/dr-plan.md(RTO 4h/RPO 24h)+ dr-runbook.md(6 故障场景) ## 验证 - npx tsc --noEmit:0 错误 - npm run lint:0 错误 0 警告
124 lines
4.6 KiB
JSON
124 lines
4.6 KiB
JSON
{
|
|
"name": "cicd",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "eslint",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "npm run test:unit && npm run test:integration && npm run test:e2e",
|
|
"test:ci": "npm run test:unit && npm run test:integration && npm run test:e2e",
|
|
"test:unit": "vitest run --config vitest.unit.config.ts",
|
|
"test:unit:watch": "vitest --config vitest.unit.config.ts",
|
|
"test:integration": "vitest run --config vitest.config.ts",
|
|
"test:integration:watch": "vitest --config vitest.config.ts",
|
|
"test:integration:coverage": "vitest run --config vitest.config.ts --coverage",
|
|
"test:e2e": "playwright test --project=chromium",
|
|
"test:e2e:smoke": "playwright test --project=chromium tests/e2e/smoke-auth.spec.ts",
|
|
"test:e2e:full-routes": "playwright test --project=chromium tests/e2e/full-route-regression.spec.ts",
|
|
"test:visual": "playwright test --project=visual-chromium",
|
|
"test:visual:update": "playwright test --project=visual-chromium --update-snapshots",
|
|
"db:create": "npx tsx scripts/create-db.ts",
|
|
"db:seed": "npx tsx scripts/seed.ts",
|
|
"db:generate": "drizzle-kit generate",
|
|
"db:migrate": "drizzle-kit migrate",
|
|
"db:push": "drizzle-kit push",
|
|
"db:setup": "npx tsx scripts/create-db.ts && drizzle-kit migrate && npx tsx scripts/seed.ts",
|
|
"audit": "npm audit --audit-level=moderate",
|
|
"audit:report": "npm audit --json > audit-report.json",
|
|
"security:audit": "npm audit --audit-level=moderate",
|
|
"security:scan": "bash scripts/security-scan.sh",
|
|
"backup": "bash scripts/backup-db.sh",
|
|
"restore": "bash scripts/restore-db.sh",
|
|
"dr:backup-verify": "bash scripts/backup-verify.sh",
|
|
"dr:offsite-sync": "bash scripts/backup-offsite-sync.sh",
|
|
"dr:drill": "bash scripts/dr-drill.sh",
|
|
"dr:drill:ps1": "powershell -ExecutionPolicy Bypass -File scripts/dr-drill.ps1",
|
|
"dr:health-check": "bash scripts/health-check.sh",
|
|
"dr:failover": "bash scripts/failover.sh"
|
|
},
|
|
"dependencies": {
|
|
"@dnd-kit/core": "^6.3.1",
|
|
"@dnd-kit/sortable": "^10.0.0",
|
|
"@dnd-kit/utilities": "^3.2.2",
|
|
"@hookform/resolvers": "^5.2.2",
|
|
"@paralleldrive/cuid2": "^3.0.4",
|
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
"@radix-ui/react-avatar": "^1.1.11",
|
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
"@radix-ui/react-collapsible": "^1.1.12",
|
|
"@radix-ui/react-context-menu": "^2.2.16",
|
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
"@radix-ui/react-hover-card": "^1.1.15",
|
|
"@radix-ui/react-progress": "^1.1.8",
|
|
"@radix-ui/react-radio-group": "^1.3.8",
|
|
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
"@radix-ui/react-select": "^2.2.6",
|
|
"@radix-ui/react-separator": "^1.1.8",
|
|
"@radix-ui/react-slot": "^1.2.4",
|
|
"@radix-ui/react-switch": "^1.3.1",
|
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
"@t3-oss/env-nextjs": "^0.13.10",
|
|
"@tanstack/react-query": "^5.90.12",
|
|
"@tanstack/react-table": "^8.21.3",
|
|
"@tiptap/extension-placeholder": "^3.15.3",
|
|
"@tiptap/pm": "^3.15.3",
|
|
"@tiptap/react": "^3.15.3",
|
|
"@tiptap/starter-kit": "^3.15.3",
|
|
"bcryptjs": "^2.4.3",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"drizzle-orm": "^0.45.1",
|
|
"exceljs": "^4.4.0",
|
|
"lucide-react": "^0.562.0",
|
|
"mysql2": "^3.16.0",
|
|
"next": "16.0.10",
|
|
"next-auth": "^5.0.0-beta.30",
|
|
"next-themes": "^0.4.6",
|
|
"nuqs": "^2.8.5",
|
|
"openai": "^6.25.0",
|
|
"p-queue": "^9.1.0",
|
|
"react": "19.2.1",
|
|
"react-dom": "19.2.1",
|
|
"react-hook-form": "^7.69.0",
|
|
"react-markdown": "^10.1.0",
|
|
"recharts": "^3.6.0",
|
|
"rehype-sanitize": "^6.0.0",
|
|
"remark-breaks": "^4.0.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"sonner": "^2.0.7",
|
|
"tailwind-merge": "^3.4.0",
|
|
"tailwindcss-animate": "^1.0.7",
|
|
"tiptap-markdown": "^0.9.0",
|
|
"zod": "^4.2.1",
|
|
"zustand": "^5.0.9"
|
|
},
|
|
"devDependencies": {
|
|
"@faker-js/faker": "^10.1.0",
|
|
"@playwright/test": "^1.58.2",
|
|
"@tailwindcss/postcss": "^4",
|
|
"@tailwindcss/typography": "^0.5.16",
|
|
"@testing-library/jest-dom": "^6.9.1",
|
|
"@testing-library/react": "^16.3.2",
|
|
"@types/bcryptjs": "^2.4.6",
|
|
"@types/node": "^20",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"@vitest/coverage-v8": "^4.1.0",
|
|
"dotenv": "^17.2.3",
|
|
"drizzle-kit": "^0.31.8",
|
|
"eslint": "^9",
|
|
"eslint-config-next": "16.0.10",
|
|
"jsdom": "^29.1.1",
|
|
"prettier": "^3.7.4",
|
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
"tailwindcss": "^4",
|
|
"typescript": "^5",
|
|
"vitest": "^4.1.0"
|
|
}
|
|
}
|