Files
agentic-dev/packages/blog/package.json
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

37 lines
974 B
JSON

{
"name": "@repo/blog",
"private": true,
"version": "0.0.0",
"type": "module",
"exports": {
".": "./src/index.ts",
"./ui": "./src/ui/index.ts",
"./cms": "./src/integrations/cms/index.ts",
"./api": "./src/integrations/api/router.ts",
"./di/bind-production": "./src/di/bind-production.ts",
"./di/bind-dev-seed": "./src/di/bind-dev-seed.ts"
},
"scripts": {
"build": "tsc --noEmit",
"lint": "eslint .",
"test": "vitest run --passWithNoTests",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@repo/core-shared": "workspace:*",
"@trpc/server": "^11.0.0",
"inversify": "^6.2.0",
"payload": "^3.14.0",
"reflect-metadata": "^0.2.2",
"zod": "^3.24.0"
},
"devDependencies": {
"@repo/core-eslint": "workspace:*",
"@repo/core-testing": "workspace:*",
"@repo/core-typescript": "workspace:*",
"@types/node": "^22.0.0",
"@vitest/coverage-v8": "^3.2.4",
"vitest": "^3.1.0"
}
}