docs(adr): rename ADR-012 — drop Lazar; update title + content + cross-refs
- Rename docs/decisions/adr-012-lazar-conformance.md → adr-012-feature-conventions.md - Strip "Lazar", "Plan 8/9/10/11", "refactor-logs" refs from all ADRs, architecture docs, HTML explainers, and feature/core AGENTS.md files - Update all incoming links in docs/, packages/*/AGENTS.md, HTML explainers Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,11 +18,12 @@ Generic, reusable primitives with **zero business knowledge**. This package is t
|
||||
## Public exports
|
||||
|
||||
From `package.json`:
|
||||
|
||||
- `.` — all utilities, Payload exports, tRPC init
|
||||
- `./payload` — Payload field/hook/block utilities only
|
||||
- `./trpc/init` — tRPC `initTRPC` instance + builders. **Plan 9:** also exports `t` (the raw `initTRPC.create({...})` instance) so feature packages can build their own procedures via `t.procedure.use(...)`
|
||||
- `./trpc/init` — tRPC `initTRPC` instance + builders; also exports `t` (the raw `initTRPC.create({...})` instance) so feature packages can build their own procedures via `t.procedure.use(...)`
|
||||
- `./trpc/context` — tRPC context factory only
|
||||
- `./trpc/define-error-middleware` — **Plan 9:** factory that builds a tRPC middleware translating domain errors to `TRPCError`. Takes `ReadonlyArray<readonly [ErrorCtor, TRPC_ERROR_CODE_KEY]>` tuples; uses `instanceof` discrimination; preserves the original error as `.cause`. **Owned by features:** each feature passes its own constructors in via `integrations/api/procedures.ts`. core-shared never enumerates feature-specific error classes — this stays boundary-clean
|
||||
- `./trpc/define-error-middleware` — factory that builds a tRPC middleware translating domain errors to `TRPCError`. Takes `ReadonlyArray<readonly [ErrorCtor, TRPC_ERROR_CODE_KEY]>` tuples; uses `instanceof` discrimination; preserves the original error as `.cause`. **Owned by features:** each feature passes its own constructors in via `integrations/api/procedures.ts`. core-shared never enumerates feature-specific error classes — this stays boundary-clean
|
||||
|
||||
## Test conventions
|
||||
|
||||
@@ -32,6 +33,7 @@ From `package.json`:
|
||||
- Run: `pnpm test --filter @repo/core-shared`
|
||||
|
||||
Covered areas:
|
||||
|
||||
- Slug field generation + validation
|
||||
- Payload hooks (publish-at timestamp, slugify-if-missing)
|
||||
- Access control helpers
|
||||
|
||||
Reference in New Issue
Block a user