npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@concepta/nestjs-typeorm-ext

v4.0.0-alpha.44

Published

Rockets NestJS TypeORM Extended

Downloads

371

Readme

Rockets NestJS TypeOrm Extended

Extremely powerful extension of the NestJS TypeOrm module that allows your dynamic modules to accept drop-in replacements of custom entities and repositories at registration time.

Project

NPM Latest NPM Downloads GH Last Commit GH Contrib NestJS Dep

Overview

The TypeOrm Ext module provides a powerful wrapper around the @nestjs/typeorm module.

While still using the identical configuration options of the TypeOrm module, you can increase the extensibility of your custom module by designing it to accept custom entity and repository overrides.

This pattern allows you to publish modules that are loosely coupled to their own entity and repository definitions. This enables implementations of your module to define their own concrete data storage.

Installation

yarn add @concepta/nestjs-typeorm-ext

Module Design

Designing your module to use this extension is fairly straight forward, but a bit too verbose for this readme.

To see how this was implemented in our UserModule please refer to that module's user.module.ts

Usage

app.module.ts

// ...
import { TypeOrmExtModule } from '@concepta/nestjs-typeorm-ext';
import { UserModule } from '@concepta/nestjs-user';
import { CustomUserRepository } from 'path/to/custom-user.repository';
import { CustomUser } from 'path/to/custom-user.entity';

@Module({
  imports: [
    TypeOrmExtModule.forRoot({
      type: 'postgres',
      url: 'postgres://user:pass@localhost:5432/postgres',
      entities: [CustomUser],
    }),
    UserModule.forRoot({
      entities: {
        user: { entity: CustomUser, repository: CustomUserRepository },
      },
    }),
  ],
})
export class AppModule {}

Configuration

Data Source Options

The module options are identical the the NestJS TypeOrm module.