feat(arayüz): API istemcisi, TanStack Query, ts-rs tip üretimi ve oturum durumu
- Backend: ts-rs ile DTO'lardan TypeScript tipleri (frontend/src/types, npm run types) - Hata ve health yanıtları tipli yapılara çevrildi - lib/api.ts: tek API istemcisi, Türkçe ApiError, ağ hatası mesajı - lib/query.ts: QueryClient (4xx tekrar denenmez, 401 → oturum kapanır) - lib/auth.ts: useMe, useLogin, useRegister, useLogout - Vitest: 7 API istemcisi testi (toplam 29) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -16,7 +16,8 @@
|
||||
"db:reset": "docker exec kakeibo-mongo mongosh --quiet --eval \"db.getSiblingDB('kakeibo_dev').dropDatabase(); db.adminCommand({listDatabases:1}).databases.filter(d => d.name.startsWith('kakeibo_test_')).forEach(d => db.getSiblingDB(d.name).dropDatabase()); print('kakeibo_dev ve test veritabanları sıfırlandı.')\"",
|
||||
"test": "cd backend && cargo test && cd .. && npm --prefix frontend test",
|
||||
"lint": "cd backend && cargo clippy && cd .. && npm --prefix frontend run lint",
|
||||
"icons": "bash scripts/icons.sh"
|
||||
"icons": "bash scripts/icons.sh",
|
||||
"types": "cd backend && cargo test -q export_bindings"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^10.0.7"
|
||||
|
||||
Reference in New Issue
Block a user