Extract slug-media npm package #243

Merged
erik merged 1 commit from feat/task-4f6fb4a9-slug-media-package into main 2026-06-29 11:06:49 -05:00
Owner

Summary

  • Add @evcraddock/slug-media workspace package with S3-compatible storage, media config parsing, upload validation, object-key/public-URL helpers, and media API error mapping.
  • Update template-site media modules to use package exports while keeping local wrappers for config, storage, persistence, and API customization escape hatches.
  • Add generated-site dependency mapping for @evcraddock/slug-media@0.1.0.
  • Add @evcraddock/slug-media to the Forgejo npm package release workflow choices.
  • Document package exports and local media customization points.

Verification

  • npm run build --workspaces
  • npm run typecheck --workspaces
  • npm test --workspace @evcraddock/slug-media
  • npm test --workspace @slugkit/template-site -- src/media src/api/__tests__/media.test.ts
  • npm test --workspace @evcraddock/slug-cli -- commands.test.ts
  • npm run package:pack:dry-run -- --workspace @evcraddock/slug-media
  • npm run package:release -- --workspace @evcraddock/slug-media --dry-run
  • ./scripts/pre-pr.sh

Task: #task-4f6fb4a9

## Summary - Add `@evcraddock/slug-media` workspace package with S3-compatible storage, media config parsing, upload validation, object-key/public-URL helpers, and media API error mapping. - Update template-site media modules to use package exports while keeping local wrappers for config, storage, persistence, and API customization escape hatches. - Add generated-site dependency mapping for `@evcraddock/slug-media@0.1.0`. - Add `@evcraddock/slug-media` to the Forgejo npm package release workflow choices. - Document package exports and local media customization points. ## Verification - `npm run build --workspaces` - `npm run typecheck --workspaces` - `npm test --workspace @evcraddock/slug-media` - `npm test --workspace @slugkit/template-site -- src/media src/api/__tests__/media.test.ts` - `npm test --workspace @evcraddock/slug-cli -- commands.test.ts` - `npm run package:pack:dry-run -- --workspace @evcraddock/slug-media` - `npm run package:release -- --workspace @evcraddock/slug-media --dry-run` - `./scripts/pre-pr.sh` Task: #task-4f6fb4a9
feat: extract slug media package
All checks were successful
CI / build-lint-test (pull_request) Successful in 53s
ff057b2b84
Task: #task-4f6fb4a9
erik force-pushed feat/task-4f6fb4a9-slug-media-package from ff057b2b84
All checks were successful
CI / build-lint-test (pull_request) Successful in 53s
to c263ff2ab0
All checks were successful
CI / build-lint-test (pull_request) Successful in 49s
2026-06-29 11:03:19 -05:00
Compare
Author
Owner

Review summary

PR #243 extracts reusable media behavior into @evcraddock/slug-media while keeping generated-site customization points in local template media modules. The package release workflow now includes @evcraddock/slug-media, so the package can be published from Forgejo CI after this PR lands on main.

Acceptance criteria

  • @evcraddock/slug-media exists as a workspace package — packages/slug-media includes package metadata, TS configs, README, source exports, and tests.
  • Template site consumes @evcraddock/slug-media through the local workspace link during monorepo development — template/site/package.json declares @evcraddock/slug-media: 0.1.0, which npm links locally in the workspace.
  • Template-site media API behavior remains unchanged — package extraction is covered by existing template media service/API tests and full CI.
  • Generated sites created after release depend on the published package — generated-site dependency mapping now includes @evcraddock/slug-media@0.1.0.
  • Local wrapper modules document customization escape hatches — template/site/src/media/README.md documents config, storage, persistence, and API-error customization points.
  • Public exports are documented and tested — package README documents public exports and package tests cover config, validation, URL/key helpers, storage helper construction, and error mapping.
  • Package is published and post-publish install verification succeeds — not applicable until after this implementation PR is merged; the release workflow choice was added in this PR to enable the required post-merge publish.
  • ./scripts/pre-pr.sh passes — verified locally and Forgejo CI run #338 passed.

Blocking issues

None for merging this implementation PR.

Warnings

  • Post-merge release still required: dispatch the Forgejo npm package release workflow for @evcraddock/slug-media and verify install/import before closing the task.

Verdict

Approved. Stop at the human merge gate.

### Review summary PR #243 extracts reusable media behavior into `@evcraddock/slug-media` while keeping generated-site customization points in local template media modules. The package release workflow now includes `@evcraddock/slug-media`, so the package can be published from Forgejo CI after this PR lands on `main`. ### Acceptance criteria - [x] `@evcraddock/slug-media` exists as a workspace package — `packages/slug-media` includes package metadata, TS configs, README, source exports, and tests. - [x] Template site consumes `@evcraddock/slug-media` through the local workspace link during monorepo development — `template/site/package.json` declares `@evcraddock/slug-media: 0.1.0`, which npm links locally in the workspace. - [x] Template-site media API behavior remains unchanged — package extraction is covered by existing template media service/API tests and full CI. - [x] Generated sites created after release depend on the published package — generated-site dependency mapping now includes `@evcraddock/slug-media@0.1.0`. - [x] Local wrapper modules document customization escape hatches — `template/site/src/media/README.md` documents config, storage, persistence, and API-error customization points. - [x] Public exports are documented and tested — package README documents public exports and package tests cover config, validation, URL/key helpers, storage helper construction, and error mapping. - [ ] Package is published and post-publish install verification succeeds — not applicable until after this implementation PR is merged; the release workflow choice was added in this PR to enable the required post-merge publish. - [x] `./scripts/pre-pr.sh` passes — verified locally and Forgejo CI run #338 passed. ### Blocking issues None for merging this implementation PR. ### Warnings - Post-merge release still required: dispatch the Forgejo npm package release workflow for `@evcraddock/slug-media` and verify install/import before closing the task. ### Verdict Approved. Stop at the human merge gate.
erik merged commit e8d4629b73 into main 2026-06-29 11:06:49 -05:00
erik deleted branch feat/task-4f6fb4a9-slug-media-package 2026-06-29 11:06:49 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/slugkit!243
No description provided.