Skip to content

Commit

Permalink
chore(): resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Jun 1, 2022
2 parents 3d3a3f1 + 06372e8 commit 1f699cd
Show file tree
Hide file tree
Showing 5 changed files with 2,234 additions and 2,099 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"

services:
postgres:
image: postgres:14.2
image: postgres:14.3
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
Expand Down
3 changes: 2 additions & 1 deletion lib/interfaces/typeorm-options.interface.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ModuleMetadata, Type } from '@nestjs/common';
import { ModuleMetadata, Provider, Type } from '@nestjs/common';
import { DataSource, DataSourceOptions } from 'typeorm';

export type TypeOrmModuleOptions = {
Expand Down Expand Up @@ -50,4 +50,5 @@ export interface TypeOrmModuleAsyncOptions
) => Promise<TypeOrmModuleOptions> | TypeOrmModuleOptions;
dataSourceFactory?: TypeOrmDataSourceFactory;
inject?: any[];
extraProviders?: Provider[];
}
7 changes: 4 additions & 3 deletions lib/typeorm-core.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Module,
OnApplicationShutdown,
Provider,
Type,
Type
} from '@nestjs/common';
import { ModuleRef } from '@nestjs/core';
import { defer, lastValueFrom } from 'rxjs';
Expand All @@ -16,14 +16,14 @@ import {
getDataSourceName,
getDataSourceToken,
getEntityManagerToken,
handleRetry,
handleRetry
} from './common/typeorm.utils';
import { EntitiesMetadataStorage } from './entities-metadata.storage';
import {
TypeOrmDataSourceFactory,
TypeOrmModuleAsyncOptions,
TypeOrmModuleOptions,
TypeOrmOptionsFactory,
TypeOrmOptionsFactory
} from './interfaces/typeorm-options.interface';
import { TYPEORM_MODULE_ID, TYPEORM_MODULE_OPTIONS } from './typeorm.constants';

Expand Down Expand Up @@ -109,6 +109,7 @@ export class TypeOrmCoreModule implements OnApplicationShutdown {
provide: TYPEORM_MODULE_ID,
useValue: generateString(),
},
...(options.extraProviders || []),
];
const exports: Array<Provider | Function> = [
entityManagerProvider,
Expand Down
Loading

0 comments on commit 1f699cd

Please sign in to comment.