@concepta/rockets-repository-typeorm
v0.0.1-dev.0
Published
TypeORM implementation of the Rockets dynamic repository contract (re-exported from @concepta/nestjs-repository-typeorm), plus the TypeORM SchemaEntityCompiler for the zod layer at the /zod subpath.
Readme
@concepta/rockets-repository-typeorm
TypeORM implementation of the Rockets dynamic repository contract.
This is a thin wrapper over
@concepta/nestjs-repository-typeorm:
the main entry re-exports the upstream package verbatim, so consumers depend
on a single @concepta/* package instead of reaching for the upstream one
directly. The Rockets-specific addition — the zod SchemaEntityCompiler —
lives at the /zod subpath and is the only code this package owns.
Install
npm install @concepta/rockets-repository-typeorm typeormRepository module
import { TypeOrmRepositoryModule } from '@concepta/rockets-repository-typeorm';
TypeOrmRepositoryModule.forFeature([UserEntity]);Everything exported by @concepta/nestjs-repository-typeorm
(TypeOrmRepositoryModule, TypeOrmRepository, TypeOrmTransaction,
the base entities, …) is re-exported from the main entry.
Zod entity compiler (/zod subpath)
Bridges the ORM-free zod layer (@concepta/rockets-core/zod) to concrete
TypeORM entity classes. Wire it once:
import { bindZodResources } from '@concepta/rockets-core/zod';
import { typeOrmZodEntityCompiler } from '@concepta/rockets-repository-typeorm/zod';
export const { zodResource, zodSubResource } =
bindZodResources(typeOrmZodEntityCompiler);zod and nestjs-zod are optional peers — you only pay for them if you
import the /zod subpath.
License
BSD-3-Clause
