@midwayjs/typeorm 3.19.2 → 3.20.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,7 +27,14 @@ let TypeORMDataSourceManager = class TypeORMDataSourceManager extends core_1.Dat
27
27
  if (config['logging'] === undefined) {
28
28
  config['logger'] = new logger_1.TypeORMLogger(this.loggerService.getLogger('typeormLogger'));
29
29
  }
30
- const dataSource = new typeorm_1.DataSource(config);
30
+ const { customDataSourceClass, ...otherConfig } = config;
31
+ let dataSource;
32
+ if (customDataSourceClass) {
33
+ dataSource = new customDataSourceClass(otherConfig);
34
+ }
35
+ else {
36
+ dataSource = new typeorm_1.DataSource(otherConfig);
37
+ }
31
38
  await dataSource.initialize();
32
39
  return dataSource;
33
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/typeorm",
3
- "version": "3.19.2",
3
+ "version": "3.20.3",
4
4
  "main": "dist/index.js",
5
5
  "typings": "index.d.ts",
6
6
  "bin": {
@@ -13,8 +13,8 @@
13
13
  "index.d.ts"
14
14
  ],
15
15
  "devDependencies": {
16
- "@midwayjs/core": "^3.19.0",
17
- "@midwayjs/mock": "^3.19.2",
16
+ "@midwayjs/core": "^3.20.3",
17
+ "@midwayjs/mock": "^3.20.3",
18
18
  "sqlite3": "5.1.7",
19
19
  "typeorm": "0.3.20"
20
20
  },
@@ -35,5 +35,5 @@
35
35
  "type": "git",
36
36
  "url": "https://github.com/midwayjs/midway.git"
37
37
  },
38
- "gitHead": "57fd034be94897fb819b0d9ef776de0b9923ab0f"
38
+ "gitHead": "a0918e46838e220fd000997796dbc8d669d28746"
39
39
  }