Initial Commit
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
# Tasks: enterprise-video-thumbnails
|
||||
|
||||
## 1. Scaffold
|
||||
|
||||
- [x] 1.1 Create `packages/media/video/video-thumbnails/` skeleton: `package.json` at `0.1.0`, `tsconfig.lib.json`, `vite.config.ts`, `vitest.config.ts`, polyfills setup.
|
||||
- [x] 1.2 Add `video` plugin to `media` super-category in `scripts/folder-reorg/assignment.yml`.
|
||||
|
||||
## 2. Error codes + error class
|
||||
|
||||
- [x] 2.1 `src/error-codes/error-codes.ts` — `defineCodes("VIDEO_THUMBNAILS", [...])` for all nine codes.
|
||||
- [x] 2.2 `src/errors/video-thumbnails-error.ts` — `VideoThumbnailsError extends SuaveplanError<VideoThumbnailsCode>`.
|
||||
- [x] 2.3 Sibling `.md` for each.
|
||||
|
||||
## 3. Zod schemas
|
||||
|
||||
- [x] 3.1 `src/schemas/schemas.ts` — `ThumbnailConfigSchema`, `ThumbnailOptionsSchema`, `SpriteSheetConfigSchema`, `VideoMetadataSchema`, `ThumbnailResultSchema`, `SpriteSheetResultSchema`.
|
||||
- [x] 3.2 Inferred types in `schemas.types.ts`.
|
||||
|
||||
## 4. Telemetry
|
||||
|
||||
- [x] 4.1 `src/telemetry/telemetry.ts` — `getTelemetry()` returns `{ extractDuration, extractTotal, spriteSheetDuration, spriteSheetFrames }` lazily via `metrics.getMeter`.
|
||||
|
||||
## 5. Runner
|
||||
|
||||
- [x] 5.1 `src/runner/runner.ts` — `FfmpegRunner` interface + `ExtractInput`/`TileInput`/`ProbeResult`.
|
||||
- [x] 5.2 `src/runner/fluent-ffmpeg-runner.ts` — `FluentFfmpegRunner` default impl using `fluent-ffmpeg` + `@ffmpeg-installer/ffmpeg`; threads `AbortSignal` to `command.kill("SIGKILL")`.
|
||||
|
||||
## 6. ThumbnailGenerator
|
||||
|
||||
- [x] 6.1 `src/thumbnail-generator/thumbnail-generator.ts` — `generate`, `generateMultiple`, `extractSlidingWindow`, `getMetadata`, `isAvailable`.
|
||||
- [x] 6.2 Boundary Zod validation; OTel emission; `AbortSignal` propagation.
|
||||
|
||||
## 7. SpriteSheetGenerator
|
||||
|
||||
- [x] 7.1 `src/sprite-sheet/sprite-sheet.ts` — N×M tile via `runner.tile`; auto-detect duration via `runner.probe`.
|
||||
|
||||
## 8. Barrel + subpath exports
|
||||
|
||||
- [x] 8.1 `src/index.ts` explicit named exports.
|
||||
- [x] 8.2 `package.json` `exports` map covers `.`, `./errors`, `./schemas`, `./runner`, `./thumbnail-generator`, `./sprite-sheet`, `./telemetry`.
|
||||
|
||||
## 9. Real-fixture test suite
|
||||
|
||||
- [x] 9.1 `tests/setup/fixtures.ts` synthesises a 5-second 320×240 MP4 via ffmpeg `lavfi` once per worker; cached temp path.
|
||||
- [x] 9.2 Tests exercise every public surface (extract, multiple, sliding-window, sprite-sheet, getMetadata, isAvailable, abort, validation errors, every error code).
|
||||
|
||||
## 10. Docs
|
||||
|
||||
- [x] 10.1 Sibling `.md` for every `.ts` (≥200 words, 6 sections).
|
||||
- [x] 10.2 `README.md` at package root with modules table.
|
||||
|
||||
## 11. MANIFEST refresh
|
||||
|
||||
- [x] 11.1 `bun scripts/folder-reorg/generate-manifest.ts`.
|
||||
|
||||
## 12. Ship gate
|
||||
|
||||
- [x] 12.1 `bunx turbo lint typecheck test build --filter=@suaveplan/video-thumbnails` green.
|
||||
- [x] 12.2 `bunx turbo test:coverage --filter=@suaveplan/video-thumbnails` 100/100/100/100.
|
||||
- [x] 12.3 Fold `specs/video-thumbnails/spec.md` into `openspec/specs/video-thumbnails/spec.md`.
|
||||
- [x] 12.4 Move change folder to `openspec/archive/2026-05-25-enterprise-video-thumbnails/`.
|
||||
- [x] 12.5 Flip `STATUS.md` row to `✅`, update counters.
|
||||
Reference in New Issue
Block a user