A lightweight wrapper around TypeORM repository and service patterns that integrates with gRPC Boom for consistent error handling. Current stable version is 1.0.16, released sporadically with minor updates. It provides base classes (BaseRepository and BaseService) to standardize CRUD operations with hooks like preSave, preUpdate, preDelete, and preResult. Compared to other TypeORM wrappers, this library specifically targets gRPC services and generates gRPC-friendly error objects using gRPC Boom. It requires TypeORM, gRPC, and gRPC Boom as peer dependencies.
npm install grpc-typeorm-infrastructureNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to define a TypeORM entity, extend BaseRepository, and perform a save operation.
Use super(Hero.name) instead of super(Hero).
Handle errors using gRPC error handling patterns.
Use delete(record: T, options?) instead of deleteOneById.
Ensure correct import statement: import BaseRepository from 'grpc-typeorm-infrastructure'
Pass the entity class name as string: super(Hero.name)