refactor: add KV cache, env validation, logger types, constants

- Add KV cache abstraction layer (src/services/kv-cache.ts)
- Add Zod-based env validation (src/utils/env-validation.ts)
- Improve logger types: any → unknown for type safety
- Add centralized constants file (src/constants/index.ts)
- Fix security.ts unused import

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
kappa
2026-01-29 10:40:51 +09:00
parent 3a671a5707
commit 699eed1530
6 changed files with 446 additions and 10 deletions

View File

@@ -138,6 +138,8 @@ export async function validateWebhookRequest(
}
// Rate Limiting (Cloudflare KV 기반)
// NOTE: Future migration to KVCache abstraction layer (kv-cache.ts) planned
// Current implementation kept for backward compatibility
interface RateLimitData {
count: number;
resetAt: number;