Extract slug-api npm package #245

Merged
erik merged 1 commit from feat/task-8f5c9063-slug-api-package into main 2026-06-29 12:11:51 -05:00
Owner

Summary

  • Add @evcraddock/slug-api workspace package with standard Slugkit response helpers, health/meta helpers, bearer-auth middleware helpers, and OpenAPI serving helpers.
  • Update template-site API modules to consume package exports while preserving local route composition and service/customization escape hatches.
  • Add generated-site dependency mapping for @evcraddock/slug-api@0.1.0.
  • Add @evcraddock/slug-api to the Forgejo npm package release workflow choices.
  • Document package exports and local API route override guidance.

Verification

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

Task: #task-8f5c9063

## Summary - Add `@evcraddock/slug-api` workspace package with standard Slugkit response helpers, health/meta helpers, bearer-auth middleware helpers, and OpenAPI serving helpers. - Update template-site API modules to consume package exports while preserving local route composition and service/customization escape hatches. - Add generated-site dependency mapping for `@evcraddock/slug-api@0.1.0`. - Add `@evcraddock/slug-api` to the Forgejo npm package release workflow choices. - Document package exports and local API route override guidance. ## Verification - `npm run build --workspaces` - `npm run typecheck --workspaces` - `npm test --workspace @evcraddock/slug-api` - `npm test --workspace @slugkit/template-site -- src/api` - `npm test --workspace @evcraddock/slug-cli -- commands.test.ts` - `npm run package:pack:dry-run -- --workspace @evcraddock/slug-api` - `npm run package:release -- --workspace @evcraddock/slug-api --dry-run` - `./scripts/pre-pr.sh` Task: #task-8f5c9063
feat: extract slug api package
Some checks failed
CI / build-lint-test (pull_request) Failing after 33s
39accc4fa1
Task: #task-8f5c9063
erik force-pushed feat/task-8f5c9063-slug-api-package from 39accc4fa1
Some checks failed
CI / build-lint-test (pull_request) Failing after 33s
to f383def655
Some checks failed
CI / build-lint-test (pull_request) Has been cancelled
2026-06-29 12:01:36 -05:00
Compare
erik force-pushed feat/task-8f5c9063-slug-api-package from f383def655
Some checks failed
CI / build-lint-test (pull_request) Has been cancelled
to 64bab5694a
All checks were successful
CI / build-lint-test (pull_request) Successful in 56s
2026-06-29 12:07:27 -05:00
Compare
Author
Owner

Review summary

PR #245 extracts generic Slugkit API helpers into @evcraddock/slug-api while preserving generated-site route composition and service ownership in local template API modules. The root workspace order was made explicit so package builds run dependency packages before consumers in CI.

Acceptance criteria

  • @evcraddock/slug-api exists as a workspace package — packages/slug-api includes package metadata, TS configs, README, public exports, and tests.
  • Template site consumes @evcraddock/slug-api through the local workspace link during monorepo development — template/site/package.json declares @evcraddock/slug-api: 0.1.0, which npm links locally in the workspace.
  • Template-site Slugkit API behavior remains unchanged — existing API tests pass, along with full pre-PR/CI.
  • Generated sites created after release depend on the published package — generated-site dependency mapping now includes @evcraddock/slug-api@0.1.0.
  • Local API route modules preserve customization escape hatches — template API wrappers remain in template/site/src/api/*, and template/site/src/api/README.md documents route override points.
  • Public exports are documented and tested — package README documents exports; package tests cover response helpers, health/meta helpers, OpenAPI serving, and bearer auth middleware.
  • Package is published and post-publish mount/import verification succeeds — not applicable until after this implementation PR is merged; this PR adds the release workflow choice needed to publish.
  • ./scripts/pre-pr.sh passes — verified locally and Forgejo CI run #348 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-api and verify install/mount/import before closing the task.

Verdict

Approved. Stop at the human merge gate.

### Review summary PR #245 extracts generic Slugkit API helpers into `@evcraddock/slug-api` while preserving generated-site route composition and service ownership in local template API modules. The root workspace order was made explicit so package builds run dependency packages before consumers in CI. ### Acceptance criteria - [x] `@evcraddock/slug-api` exists as a workspace package — `packages/slug-api` includes package metadata, TS configs, README, public exports, and tests. - [x] Template site consumes `@evcraddock/slug-api` through the local workspace link during monorepo development — `template/site/package.json` declares `@evcraddock/slug-api: 0.1.0`, which npm links locally in the workspace. - [x] Template-site Slugkit API behavior remains unchanged — existing API tests pass, along with full pre-PR/CI. - [x] Generated sites created after release depend on the published package — generated-site dependency mapping now includes `@evcraddock/slug-api@0.1.0`. - [x] Local API route modules preserve customization escape hatches — template API wrappers remain in `template/site/src/api/*`, and `template/site/src/api/README.md` documents route override points. - [x] Public exports are documented and tested — package README documents exports; package tests cover response helpers, health/meta helpers, OpenAPI serving, and bearer auth middleware. - [ ] Package is published and post-publish mount/import verification succeeds — not applicable until after this implementation PR is merged; this PR adds the release workflow choice needed to publish. - [x] `./scripts/pre-pr.sh` passes — verified locally and Forgejo CI run #348 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-api` and verify install/mount/import before closing the task. ### Verdict Approved. Stop at the human merge gate.
erik merged commit cb6ec12bca into main 2026-06-29 12:11:51 -05:00
erik deleted branch feat/task-8f5c9063-slug-api-package 2026-06-29 12:11:51 -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!245
No description provided.