feat: add CI/CD, code quality, testing and security hardening
CI / quality (push) Failing after 6m22s
CI / quality (push) Failing after 6m22s
Implements Max_Code_Quality_CICD_Production.md: TypeScript strict mode, ESLint flat config with type-checking and security plugin, Prettier, Husky + lint-staged, Vitest with 80%+ coverage (473 tests), Playwright e2e, Electron security hardening (contextIsolation, CSP, IPC validation), electron-builder + electron-updater, Dockerfile, Gitea Actions CI/release workflows, and SonarQube docker-compose setup. Also fixes two real bugs found while writing tests: unawaited clipboard promises and a mermaid container ref timing issue in CoachDrawingView. Fixes lint-staged on Windows/Node 24 by invoking eslint/prettier via `node <bin>.js` instead of their .cmd shims, which Node's child_process now refuses to spawn without shell:true. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
1959ddb41a
commit
e9690a49f9
+41
-5
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "forge-avatar",
|
||||
"version": "1.0.0",
|
||||
"description": "Avatar de bureau IA specialise en sante et securite au travail",
|
||||
"description": "Avatar de bureau IA Max, assistant vocal avec modes Coach et Assistant",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "Vandal William",
|
||||
"scripts": {
|
||||
@@ -17,35 +17,71 @@
|
||||
"build:unpack": "npm run build && electron-builder --dir",
|
||||
"build:win": "npm run build && electron-builder --win",
|
||||
"build:mac": "electron-vite build && electron-builder --mac",
|
||||
"build:linux": "electron-vite build && electron-builder --linux"
|
||||
"build:linux": "electron-vite build && electron-builder --linux",
|
||||
"test": "vitest run",
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"test:watch": "vitest",
|
||||
"test:e2e": "npm run build && playwright test",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,tsx}": [
|
||||
"node node_modules/eslint/bin/eslint.js --fix",
|
||||
"node node_modules/prettier/bin/prettier.cjs --write"
|
||||
],
|
||||
"*.{json,md,yml,yaml}": [
|
||||
"node node_modules/prettier/bin/prettier.cjs --write"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@electron-toolkit/preload": "^3.0.2",
|
||||
"@electron-toolkit/utils": "^4.0.0",
|
||||
"@pixiv/three-vrm": "^3.5.5",
|
||||
"@pixiv/three-vrm-animation": "^3.5.5",
|
||||
"cheerio": "^1.2.0",
|
||||
"docx": "^9.13.0",
|
||||
"dotenv": "^18.0.8",
|
||||
"electron-updater": "^6.8.11",
|
||||
"mammoth": "^1.13.0",
|
||||
"mermaid": "^12.2.0",
|
||||
"pdf-lib": "^1.17.1",
|
||||
"pdf-parse": "^1.1.1",
|
||||
"pptxgenjs": "^4.0.1",
|
||||
"roughjs": "^4.6.6",
|
||||
"three": "^0.186.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-toolkit/eslint-config-prettier": "^3.0.1",
|
||||
"@electron-toolkit/eslint-config-ts": "^4.0.0",
|
||||
"@electron-toolkit/tsconfig": "^2.0.0",
|
||||
"@playwright/test": "^1.64.1",
|
||||
"@testing-library/jest-dom": "^7.0.1",
|
||||
"@testing-library/react": "^16.3.3",
|
||||
"@testing-library/user-event": "^14.6.8",
|
||||
"@types/node": "^24.19.2",
|
||||
"@types/pdf-parse": "^1.1.5",
|
||||
"@types/react": "^19.3.0",
|
||||
"@types/react-dom": "^19.3.0",
|
||||
"@types/three": "^0.186.0",
|
||||
"@vitejs/plugin-react": "^6.1.2",
|
||||
"@vitest/coverage-v8": "^5.0.5",
|
||||
"electron": "^44.7.2",
|
||||
"electron-builder": "^26.15.3",
|
||||
"electron-playwright-helpers": "^3.1.2",
|
||||
"electron-vite": "^6.0.0",
|
||||
"eslint": "^9.39.5",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^7.1.1",
|
||||
"eslint-plugin-react-refresh": "^0.5.7",
|
||||
"eslint-plugin-security": "^4.2.0",
|
||||
"husky": "^9.1.7",
|
||||
"jsdom": "^30.1.3",
|
||||
"lint-staged": "^17.6.0",
|
||||
"playwright": "^1.64.1",
|
||||
"prettier": "^3.9.10",
|
||||
"react": "^19.3.0",
|
||||
"react-dom": "^19.3.0",
|
||||
"typescript": "^5.9.3",
|
||||
"vite": "^8.3.4"
|
||||
"vite": "^8.3.4",
|
||||
"vitest": "^5.0.5"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user