Files
agentic-dev/packages/blog
Danijel Martinek e6560bc9cb feat(blog): add bind-dev-seed binder + dev seed
Sets the canonical pattern for all 5 features. Three new files:

- src/__seeds__/dev.ts — buildDevArticles() function returning 3
  realistic articles (welcome, vertical-feature-architecture,
  wip-post) built from articleFactory with id/slug/title/status
  overrides only.
- src/di/bind-dev-seed.ts — bindDevSeedBlog() async function that
  unbinds IArticlesRepository, constructs MockArticlesRepository,
  seeds it via buildDevArticles(), and rebinds via .toConstantValue.
- src/di/bind-dev-seed.test.ts — 3 tests: populated repo, welcome
  article reachable by slug, idempotent (callable twice).

package.json adds the ./di/bind-dev-seed subpath export, parallel to
./di/bind-production.

Tests + use cases continue to construct MockArticlesRepository
directly — they never go through bindDevSeedBlog. The seed only attaches
when called explicitly at app boot.
2026-05-06 19:00:31 +02:00
..