Extract slug-media npm package #235

Closed
opened 2026-06-28 22:33:12 -05:00 by erik · 3 comments
Owner

Goal

Create @evcraddock/slug-media for reusable S3-compatible media storage and upload validation behavior while keeping template-site media routes and presentation customizable.

Requirements

  • Implement the work described in docs/npm-specs/02-slug-media.md.
  • Create packages/slug-media with TypeScript build, tests, README, package metadata, and public exports.
  • Extract media storage helpers, upload validation, MIME type parsing/enforcement, upload size enforcement, object key generation, public URL construction, and media error mapping.
  • Update the template site to consume @evcraddock/slug-media via workspace:*.
  • Keep local wrapper modules under template/site/src/media/* where they expose site-specific configuration, persistence, routes, or customization points.
  • Ensure generated sites created after release depend on the published @evcraddock/slug-media package version.
  • Publish the package to npm and verify post-publish install/import behavior.

Acceptance criteria

  • @evcraddock/slug-media exists as a workspace package.
  • Template site consumes @evcraddock/slug-media via workspace:*.
  • Template-site media API behavior remains unchanged.
  • Generated sites created after release depend on the published @evcraddock/slug-media package.
  • Local wrapper modules document customization escape hatches.
  • Public exports are documented and tested.
  • Package is published and post-publish install verification succeeds.
  • ./scripts/pre-pr.sh passes.

Dependencies

  • task-059991ea
## Goal Create `@evcraddock/slug-media` for reusable S3-compatible media storage and upload validation behavior while keeping template-site media routes and presentation customizable. ## Requirements - Implement the work described in `docs/npm-specs/02-slug-media.md`. - Create `packages/slug-media` with TypeScript build, tests, README, package metadata, and public exports. - Extract media storage helpers, upload validation, MIME type parsing/enforcement, upload size enforcement, object key generation, public URL construction, and media error mapping. - Update the template site to consume `@evcraddock/slug-media` via `workspace:*`. - Keep local wrapper modules under `template/site/src/media/*` where they expose site-specific configuration, persistence, routes, or customization points. - Ensure generated sites created after release depend on the published `@evcraddock/slug-media` package version. - Publish the package to npm and verify post-publish install/import behavior. ## Acceptance criteria - [ ] `@evcraddock/slug-media` exists as a workspace package. - [ ] Template site consumes `@evcraddock/slug-media` via `workspace:*`. - [ ] Template-site media API behavior remains unchanged. - [ ] Generated sites created after release depend on the published `@evcraddock/slug-media` package. - [ ] Local wrapper modules document customization escape hatches. - [ ] Public exports are documented and tested. - [ ] Package is published and post-publish install verification succeeds. - [ ] `./scripts/pre-pr.sh` passes. ## Dependencies - task-059991ea
Author
Owner

Synced from todu comment by @todu on 2026-06-29T16:05:02.866Z

Review update

  • PR: #243 is open with Forgejo CI run #338 passing.
  • Result: approved for merge.
  • Verified: @evcraddock/slug-media package extraction, template wrapper integration, generated-site dependency mapping, package pack/release dry-runs, ./scripts/pre-pr.sh, and Forgejo CI build-lint-test passed.
  • Follow-up: after merge, publish @evcraddock/slug-media@0.1.0 through Forgejo CI and verify post-publish install/import before task closure.
_Synced from todu comment by @todu on 2026-06-29T16:05:02.866Z_ ### Review update - PR: #243 is open with Forgejo CI run #338 passing. - Result: approved for merge. - Verified: `@evcraddock/slug-media` package extraction, template wrapper integration, generated-site dependency mapping, package pack/release dry-runs, `./scripts/pre-pr.sh`, and Forgejo CI `build-lint-test` passed. - Follow-up: after merge, publish `@evcraddock/slug-media@0.1.0` through Forgejo CI and verify post-publish install/import before task closure.
erik 2026-06-29 11:19:26 -05:00
Author
Owner

Synced from todu comment by @todu on 2026-06-29T16:17:33.657Z

Completed

  • Merged PR #243 into main, adding @evcraddock/slug-media under packages/slug-media with package metadata, README, TypeScript build config, public exports, and tests.
  • Updated the template site to consume @evcraddock/slug-media@0.1.0 through npm workspace linking while preserving local media wrapper modules and documenting customization escape hatches in template/site/src/media/README.md.
  • Updated generated-site dependency handling so future generated sites depend on published @evcraddock/slug-media@0.1.0.
  • Verified template media behavior through focused media tests, full ./scripts/pre-pr.sh, PR CI, and post-merge push CI.
  • Published @evcraddock/slug-media@0.1.0 through Forgejo CI and verified npm view plus temporary install/import and S3 storage helper construction.
_Synced from todu comment by @todu on 2026-06-29T16:17:33.657Z_ ### Completed - Merged PR #243 into `main`, adding `@evcraddock/slug-media` under `packages/slug-media` with package metadata, README, TypeScript build config, public exports, and tests. - Updated the template site to consume `@evcraddock/slug-media@0.1.0` through npm workspace linking while preserving local media wrapper modules and documenting customization escape hatches in `template/site/src/media/README.md`. - Updated generated-site dependency handling so future generated sites depend on published `@evcraddock/slug-media@0.1.0`. - Verified template media behavior through focused media tests, full `./scripts/pre-pr.sh`, PR CI, and post-merge push CI. - Published `@evcraddock/slug-media@0.1.0` through Forgejo CI and verified npm view plus temporary install/import and S3 storage helper construction.
Author
Owner

Synced from todu comment by @todu on 2026-06-29T16:16:07.418Z

Update

  • Merged PR #243 into main.
  • Published @evcraddock/slug-media@0.1.0 through Forgejo CI.
  • Verified npm view @evcraddock/slug-media@0.1.0 version returns 0.1.0.
  • Verified a temporary project can install/import @evcraddock/slug-media@0.1.0 and construct the S3 storage helper.
  • Forgejo release workflow run #341 passed after npm registry propagation completed.
_Synced from todu comment by @todu on 2026-06-29T16:16:07.418Z_ ### Update - Merged PR #243 into `main`. - Published `@evcraddock/slug-media@0.1.0` through Forgejo CI. - Verified `npm view @evcraddock/slug-media@0.1.0 version` returns `0.1.0`. - Verified a temporary project can install/import `@evcraddock/slug-media@0.1.0` and construct the S3 storage helper. - Forgejo release workflow run #341 passed after npm registry propagation completed.
Sign in to join this conversation.
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#235
No description provided.