feat(m14): backup & admin (zip via fflate, admin guard, tests, e2e)

- BackupService (admin-only: createBackup zips DB+uploads via fflate to
  backups/backup-<ts>.zip, listBackups newest-first, getBackupPath with
  path-traversal guard)
- Admin backup APIs: GET/POST /api/admin/backups, GET /api/admin/backups/:filename
- Admin backups screen (admin-only) + BackupCreateButton
- Playwright globalSetup seeds a system_admin user for admin E2E
- add fflate dependency
- Unit tests (BackupService: zip content, list, admin guard, traversal) +
  e2e backup (create/list/download + non-admin 403)
This commit is contained in:
Ken Yasue
2026-06-25 02:35:35 +02:00
parent 384e61386a
commit 0026edd22b
9 changed files with 346 additions and 1 deletions

View File

@ -8,6 +8,7 @@ export default defineConfig({
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
globalSetup: './tests/e2e/globalSetup.ts',
use: {
baseURL: 'http://localhost:3000',
trace: 'on-first-retry',