43 lines
1.2 KiB
Markdown
43 lines
1.2 KiB
Markdown
# Tasks: enterprise-compress-image
|
|
|
|
## 1. Scaffold
|
|
|
|
- [x] 1.1 `universal/compression/compress-image/`; 100/100/100/100; guard tests; CLAUDE/README/FOLDERS.
|
|
|
|
## 2. Errors + schemas
|
|
|
|
- [x] 2.1 `src/error-codes.ts`, `src/errors/compression-errors.ts`.
|
|
- [x] 2.2 Zod schemas per type.
|
|
|
|
## 3. Format adapters
|
|
|
|
- [x] 3.1 `src/adapters/jpeg.ts` (jsquash/jpeg).
|
|
- [x] 3.2 `src/adapters/png.ts` (jsquash/png).
|
|
- [x] 3.3 `src/adapters/webp.ts` (jsquash/webp).
|
|
- [x] 3.4 `src/adapters/avif.ts` (jsquash/avif).
|
|
- [x] 3.5 Co-located `.md` + fixture tests.
|
|
|
|
## 4. Resize
|
|
|
|
- [x] 4.1 `src/resize/resize.ts` — max-dimension constraint via jsquash/resize.
|
|
|
|
## 5. Planner / compressor
|
|
|
|
- [x] 5.1 `src/planner/planner.ts` — build `CompressionPlan` from `ResolvedCompressionOptions`.
|
|
- [x] 5.2 `src/compressor/image-compressor.ts` — `ImageCompressor`.
|
|
- [x] 5.3 OTel histogram + counter + gauge.
|
|
|
|
## 6. Presets / constants
|
|
|
|
- [x] 6.1 `src/types/compression.types.ts` exports `QUALITY_PRESETS`, `VALID_FORMATS`, `VALID_PRESETS`, `FORMAT_QUALITY_RANGES`, `MAX_DIMENSION`.
|
|
|
|
## 7. Docs / barrel / subpath exports / README
|
|
|
|
## 8. Benchmarks
|
|
|
|
- [x] 8.1 Compress 1 MB / 10 MB test images per format.
|
|
|
|
## 9. Ship gate
|
|
|
|
- [x] 9.1 Verification sequence; fold + archive.
|