docs: refresh per-package AGENTS.md + di-explainer to current binders
Six per-package AGENTS.md tables and the di-explainer wiring trace all showed pre-ADR-014 binder shapes. Refreshed to the post-ADR-015 reality: - Per-package "Public exports" tables now show the (config, tracer, logger, bus, queue) production signature and the (tracer, logger, bus, queue) dev-seed companion. auth and marketing-pages also list their newly-public ./di/container, ./di/symbols, and (marketing-pages only) ./services/mailer + ./services/recording-mailer subpaths. - di-explainer's wiring trace adds the resolveEventsAndJobs* step in bindAll(), the (config, tracer, logger, bus, queue) binder signature, and the // <gen:event-handlers> / // <gen:jobs> injection sites. No code change; pre-existing AGENTS.md staleness predates ADR-014 + ADR-015 — this commit catches both up.
This commit is contained in:
@@ -1188,9 +1188,12 @@ footer .colophon {
|
||||
<pre class="trace-tree"><code>bindAll()
|
||||
└─ resolveInstrumentation() ← Rule 0 (DSN check)
|
||||
└─ Noop or Sentry binders ← bind to sharedContainer
|
||||
└─ bindProductionX(config, tracer, logger)
|
||||
└─ resolveEventsAndJobs*() ← ADR-015 (env-driven bus + queue)
|
||||
└─ Payload-backed in prod, in-memory in dev-seed
|
||||
└─ bindProductionX(config, tracer, logger, bus, queue)
|
||||
└─ feature container also binds TRACER + LOGGER
|
||||
└─ withSpan(withCapture(...)) at every use case + controller</code></pre>
|
||||
└─ withSpan(withCapture(...)) at every use case + controller
|
||||
└─ // <gen:event-handlers> / // <gen:jobs> injection sites</code></pre>
|
||||
|
||||
<p class="trace-p"><strong>Why per-feature containers also get the binding:</strong> repository classes resolve TRACER/LOGGER through the container; controllers and use cases receive instrumentation via the bind-time wrapper instead.</p>
|
||||
</div>
|
||||
|
||||
@@ -31,7 +31,10 @@ Users collection + authentication use cases (sign-in, sign-up, sign-out). Provid
|
||||
| `./ui` | Placeholder — extend here when auth gains React Query builders, never re-add to root |
|
||||
| `./api` | `authRouter` (tRPC router) |
|
||||
| `./cms` | Payload Users collection definition |
|
||||
| `./di/bind-production` | `bindProductionAuth(container, config)` — swaps mock impls for real Payload-backed ones at app boot |
|
||||
| `./di/bind-production` | `bindProductionAuth(config, tracer, logger, bus, queue)` — swaps mock impls for real Payload-backed ones at app boot |
|
||||
| `./di/bind-dev-seed` | `bindDevSeedAuth(tracer, logger, bus, queue)` — replaces the default empty mock with a populated one for dev / Storybook |
|
||||
| `./di/container` | `authContainer` — the per-feature inversify container (consumed by e2e tests + production Payload event-tasks) |
|
||||
| `./di/symbols` | `AUTH_SYMBOLS` — DI symbol registry (consumed by e2e tests + production Payload event-tasks) |
|
||||
|
||||
## Use-case + controller patterns
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@ Articles collection + content use cases (get articles, get article by slug, crea
|
||||
| `./ui` | `articleBySlugQuery`, `listArticlesQuery` — React Query option builders |
|
||||
| `./api` | `blogRouter` (tRPC router) |
|
||||
| `./cms` | Payload Articles collection definition |
|
||||
| `./di/bind-production` | `bindProductionBlog(container, config)` |
|
||||
| `./di/bind-production` | `bindProductionBlog(config, tracer, logger, bus, queue)` — swaps mock impls for real Payload-backed ones at app boot |
|
||||
| `./di/bind-dev-seed` | `bindDevSeedBlog(tracer, logger, bus, queue)` — replaces the default empty mock with a populated one for dev / Storybook |
|
||||
|
||||
## Use-case + controller patterns
|
||||
|
||||
|
||||
@@ -29,7 +29,12 @@ Pages collection + SiteSettings global for site-wide metadata. Provides marketin
|
||||
| `./ui` | `pageBySlugQuery`, `siteSettingsQuery` — React Query option builders |
|
||||
| `./api` | `marketingPagesRouter` (tRPC router) |
|
||||
| `./cms` | Payload Pages collection + SiteSettings global |
|
||||
| `./di/bind-production` | `bindProductionMarketingPages(container, config)` |
|
||||
| `./di/bind-production` | `bindProductionMarketingPages(config, tracer, logger, bus, queue)` — swaps mock impls for real Payload-backed ones at app boot |
|
||||
| `./di/bind-dev-seed` | `bindDevSeedMarketingPages(tracer, logger, bus, queue)` — replaces the default empty mocks with populated ones for dev / Storybook |
|
||||
| `./di/container` | `marketingPagesContainer` — the per-feature inversify container (consumed by e2e tests + production Payload event-tasks) |
|
||||
| `./di/symbols` | `MARKETING_PAGES_SYMBOLS` — DI symbol registry (consumed by e2e tests + production Payload event-tasks) |
|
||||
| `./services/mailer` | `IMailerService` — interface for the welcome-email seam (ADR-015 proof-of-life) |
|
||||
| `./services/recording-mailer` | `RecordingMailerService` — test / dev-seed mailer that records calls instead of sending |
|
||||
|
||||
## Use-case + controller patterns
|
||||
|
||||
|
||||
@@ -33,7 +33,8 @@ Media upload collection (images, PDFs, etc.) and media-related use cases (get, l
|
||||
| `./ui` | Placeholder — extend here when media gains React Query builders, never re-add to root |
|
||||
| `./api` | `mediaRouter` (tRPC router) |
|
||||
| `./cms` | Payload Media collection definition |
|
||||
| `./di/bind-production` | `bindProductionMedia(container, config)` |
|
||||
| `./di/bind-production` | `bindProductionMedia(config, tracer, logger, bus, queue)` — swaps mock impls for real Payload-backed ones at app boot |
|
||||
| `./di/bind-dev-seed` | `bindDevSeedMedia(tracer, logger, bus, queue)` — replaces the default empty mock with a populated one for dev / Storybook |
|
||||
|
||||
## Use-case + controller patterns
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@ Header global for main site navigation. Provides the Header Payload global and t
|
||||
| `./ui` | `headerQuery` — React Query option builder |
|
||||
| `./api` | `navigationRouter` (tRPC router) |
|
||||
| `./cms` | Payload Header global definition |
|
||||
| `./di/bind-production` | `bindProductionNavigation(container, config)` |
|
||||
| `./di/bind-production` | `bindProductionNavigation(config, tracer, logger, bus, queue)` — swaps mock impls for real Payload-backed ones at app boot |
|
||||
| `./di/bind-dev-seed` | `bindDevSeedNavigation(tracer, logger, bus, queue)` — replaces the default empty mock with a populated one for dev / Storybook |
|
||||
|
||||
## Use-case + controller patterns
|
||||
|
||||
|
||||
Reference in New Issue
Block a user