Commit graph

5 commits

Author SHA1 Message Date
cac556a816 fix: replace any types in Cloudinary and media utilities (11 errors)
Phase 1 Batch 7: Cloudinary & Media type safety improvements

Fixed 11 any-type errors across 3 files:

1. src/lib/server/cloudinary.ts (2 errors)
   - Fixed UploadResult.colors: Array<{hex, rgb, population}> (line 72)
   - Fixed uploadFile customOptions: Record<string, unknown> (line 85)

2. src/lib/server/cloudinary-audit.ts (6 errors)
   - Fixed gallery arrays: Record<string, unknown>[] (lines 100, 319)
   - Fixed attachments arrays: Record<string, unknown>[] (lines 124, 364)
   - Fixed updates objects: Record<string, unknown> (lines 299, 352)

3. src/lib/server/media-usage.ts (3 errors)
   - Fixed extractMediaIds data parameter: unknown (line 188)
   - Fixed extractMediaFromRichText content parameter: unknown (line 227)
   - Fixed traverse node parameter: unknown (line 232)

Progress: 11 any-type errors remaining (down from 22)
2025-11-24 02:41:39 -08:00
274f1447a2 refactor(server): improve utilities and admin endpoints
- Enhance Apple Music client error handling
- Improve Cloudinary audit functionality
- Update Cloudinary utilities for better performance
- Enhance logger with better formatting
- Add media statistics endpoint
- Improve thumbnail regeneration process
- Update Last.fm stream with better error handling
- Add better TypeScript types throughout

Improves server-side reliability and performance.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-24 01:14:57 +01:00
1867187635 Fix broken reference deletion 2025-06-17 08:45:09 +01:00
ac0ecf2a92 Add broken reference cleanup functionality to Cloudinary audit
- Add cleanupBrokenReferences function to remove missing Cloudinary URLs from database
- Add PATCH endpoint to API for cleaning broken references
- Add UI section to show broken references with cleanup button
- Add confirmation modal for cleanup action
- Add console logging to debug delete button issue

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 18:57:57 +01:00
1f04a96dad feat: add Cloudinary audit functionality
- Add comprehensive audit system to identify orphaned Cloudinary files
- Create audit script with dry-run and execute modes
- Add formatBytes utility for human-readable file sizes
- Implement comparison logic between Cloudinary and database references
- Add API endpoint for programmatic access to audit functionality
- Include documentation for Cloudinary management

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 16:56:05 +01:00