Skip to content

Commit

Permalink
Merge pull request #20 from Enigmatis/fix-types-in-typeorm
Browse files Browse the repository at this point in the history
fix: fixed tests
  • Loading branch information
DoctorVoid authored Dec 15, 2019
2 parents bfcd672 + 911f58f commit 3235f5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/connections/create-connection.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { PolarisLogger } from '@enigmatis/polaris-logs';
import * as path from 'path';
import { ConnectionOptions, createConnection } from 'typeorm';
import { PolarisEntityManager } from '../polaris-entity-manager';
import { PolarisTypeormLogger } from '../polaris-typeorm-logger';
Expand All @@ -14,7 +15,9 @@ export async function createPolarisConnection(
options.extra
? Object.assign(options.extra, configObj)
: Object.assign(options, { extra: configObj });
Object.assign(options, { subscribers: ['src/subscribers/*.ts', options.subscribers] });
Object.assign(options, {
subscribers: [path.resolve(__dirname, '../') + '/subscribers/*.ts', options.subscribers],
});
const connection = await createConnection(options);
Object.defineProperty(connection, 'manager', { value: new PolarisEntityManager(connection) });
return connection;
Expand Down

0 comments on commit 3235f5f

Please sign in to comment.