refactor: strengthen client boundaries and quality gates

This commit is contained in:
hectorzhao
2026-08-28 14:26:58 +08:00
parent 3af145abe5
commit ad27acad7e
51 changed files with 7703 additions and 697 deletions
+20 -4
View File
@@ -2,6 +2,7 @@
"name": "cmpp-platform-frontend",
"version": "0.1.0",
"private": true,
"packageManager": "npm@11.6.2",
"type": "module",
"scripts": {
"dev": "npm run build && vite preview --host 0.0.0.0",
@@ -17,9 +18,11 @@
"spike:gateway": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"$env:Path='C:\\Program Files\\Go\\bin;'+$env:Path; Push-Location gateway; go test ./...; Pop-Location\"",
"spike:bullmq": "node api/src/spike/bullmq-link-spike.mjs",
"test:api": "npm --prefix api test",
"test:frontend": "vitest run",
"test:frontend:coverage": "vitest run --coverage",
"test:gateway": "npm run spike:gateway",
"lint": "npm run quality:verify && tsc --noEmit",
"format:check": "git diff --check",
"lint": "npm run quality:verify && node tools/quality/run-changed-code-quality.mjs lint && tsc --noEmit",
"format:check": "git diff --check && node tools/quality/run-changed-code-quality.mjs format",
"quality:verify": "node tools/quality/verify-code-quality.mjs",
"bundle:verify": "node tools/quality/verify-bundle-budget.mjs",
"verify:phase1": "npm run spike:contracts && npm run spike:gateway && npm run spike:bullmq && npm run prisma:generate && npm run build:api && npm run build",
@@ -30,7 +33,7 @@
"verify:phase6": "npm run verify:phase5",
"verify:phase7": "npm run verify:phase6",
"verify:phase8": "npm run verify:phase7",
"verify:quality": "npm run lint && npm run format:check && npm run build && npm run bundle:verify && npm --prefix api run test:coverage"
"verify:quality": "npm run lint && npm run format:check && npm run test:frontend:coverage && npm run build && npm run bundle:verify && npm --prefix api run test:incremental-coverage && npm --prefix api run test:coverage"
},
"dependencies": {
"@vitejs/plugin-react": "^6.0.2",
@@ -46,10 +49,23 @@
"zustand": "^5.0.14"
},
"devDependencies": {
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.3",
"@testing-library/user-event": "^14.6.6",
"@types/node": "^25.9.3",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"typescript": "^6.0.3"
"@vitest/coverage-v8": "^4.1.11",
"eslint": "^9.39.4",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.5.2",
"globals": "^17.4.0",
"jsdom": "^30.0.1",
"msw": "^2.15.0",
"prettier": "^3.9.6",
"typescript": "^6.0.3",
"typescript-eslint": "^8.68.0",
"vitest": "^4.1.11"
},
"overrides": {
"nanoid": "3.3.18",