chore(template): clean-slate template snapshot from bb4a0c7
Curated, product-agnostic snapshot of the post-story-04 tree: demo content deleted, auth-only reference feature, web-next shell, all gates green. Product-specific docs, ADRs 027-029, PRDs/epics/archive, editor library traces, and product naming are curated out; generic template repairs (coverage provider devDeps, root test:coverage script, live lint fixes, root-only release-please) are kept. See TEMPLATE.md for provenance, curation list, and usage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
This commit is contained in:
25
turbo/generators/templates/reader/reader.ts.hbs
Normal file
25
turbo/generators/templates/reader/reader.ts.hbs
Normal file
@@ -0,0 +1,25 @@
|
||||
// packages/{{kebabCase feature}}/src/integrations/readers/{{kebabCase feature}}.reader.ts
|
||||
|
||||
import type { I{{pascalCase feature}}Reader } from "./{{kebabCase feature}}.reader.interface";
|
||||
|
||||
/**
|
||||
* Internal implementation of I{{pascalCase feature}}Reader.
|
||||
* Wraps existing use cases — does not add domain logic.
|
||||
* Constructed by bind-production / bind-dev-seed; never exported.
|
||||
*
|
||||
* All injected use cases MUST be ReadOnly-branded (mutates: false).
|
||||
*/
|
||||
export class {{pascalCase feature}}Reader implements I{{pascalCase feature}}Reader {
|
||||
// Inject ReadOnly-branded use cases via constructor:
|
||||
//
|
||||
// constructor(
|
||||
// private getUser: ReadOnly<IGetUserUseCase>,
|
||||
// ) {}
|
||||
//
|
||||
// Then delegate:
|
||||
//
|
||||
// async exists(userId: string): Promise<boolean> {
|
||||
// const user = await this.getUser({ id: userId });
|
||||
// return user !== null;
|
||||
// }
|
||||
}
|
||||
Reference in New Issue
Block a user