Add Gitea integration + ESLint setup

Phase 3: Gitea Integration
- Migration 012: app_settings table + gitea_commit_sha on endpoint_versions
- SettingsService: encrypted token storage (AES-256-GCM from JWT_SECRET)
- GiteaService: full REST API client — repo management, file CRUD,
  branches, commit history, diff/compare, pull requests, sync all
- giteaController + routes: 15 API endpoints for settings, branches,
  commits, PRs, endpoint info, sync
- VersionService hooks: auto-sync to Gitea on publish/draft (non-blocking)
- Frontend: Gitea tab in Settings (connection, sync status, branch mgmt),
  Gitea panel in EndpointEditor (file link, last commit SHA)
- docker-compose.gitea.yml: optional companion Gitea container
- Cache fix: index.html served with no-cache for instant deploys

ESLint Setup
- Backend: eslint 8 + @typescript-eslint configured
- Frontend: eslint 8 + @typescript-eslint + react-hooks + react-refresh
- Fixed 15 lint issues: unused imports, require statements, escapes,
  Function type, empty catch blocks
- Added npm run lint / lint:fix scripts

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-23 22:45:45 +03:00
parent 801d0cce5f
commit 8632e651bf
25 changed files with 2767 additions and 28 deletions

View File

@@ -16,7 +16,9 @@
"start:prod": "cd backend && pm2 start dist/server.js --name kis-api-builder-backend --env production",
"reload:prod": "npm run build && cd backend && pm2 reload kis-api-builder-backend",
"stop:prod": "cd backend && pm2 stop kis-api-builder-backend",
"delete:prod": "cd backend && pm2 delete kis-api-builder-backend"
"delete:prod": "cd backend && pm2 delete kis-api-builder-backend",
"lint": "cd backend && npx eslint src/ --ext ts && cd ../frontend && npx eslint src/ --ext ts,tsx",
"lint:fix": "cd backend && npx eslint src/ --ext ts --fix && cd ../frontend && npx eslint src/ --ext ts,tsx --fix"
},
"devDependencies": {
"concurrently": "^8.2.2"