cms.c2sgmbh/src/lib/video/index.ts
Martin Porwoll 913897c87c feat: add comprehensive video feature with collections, hooks, and tests
Video Feature Implementation:
- Add Videos and VideoCategories collections with multi-tenant support
- Extend VideoBlock with library/upload/embed sources and playback options
- Add featuredVideo group to Posts collection with processed embed URLs

Hooks & Validation:
- Add processFeaturedVideo hook for URL parsing and privacy mode embedding
- Add createSlugValidationHook for tenant-scoped slug uniqueness
- Add video-utils library (parseVideoUrl, generateEmbedUrl, formatDuration)

Testing:
- Add 84 unit tests for video-utils (URL parsing, duration, embed generation)
- Add 14 integration tests for Videos collection CRUD and slug validation

Database:
- Migration for videos, video_categories tables with locales
- Migration for Posts featuredVideo processed fields
- Update payload internal tables for new collections

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 10:48:33 +00:00

21 lines
371 B
TypeScript

/**
* Video Module
*
* Exportiert alle Video-bezogenen Funktionen und Typen.
*/
export {
parseVideoUrl,
generateEmbedUrl,
formatDuration,
parseDuration,
getAspectRatioClass,
extractVideoId,
isValidVideoUrl,
getVideoPlatform,
getVideoThumbnail,
validateVideoUrl,
type VideoPlatform,
type VideoInfo,
type EmbedOptions,
} from './video-utils'