@midwayjs/typeorm 4.0.0-beta.7 → 4.0.0-beta.8

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.
@@ -15,6 +15,9 @@ const decorator_1 = require("./decorator");
15
15
  const dataSourceManager_1 = require("./dataSourceManager");
16
16
  const typeorm_1 = require("typeorm");
17
17
  let OrmConfiguration = class OrmConfiguration {
18
+ app;
19
+ decoratorService;
20
+ dataSourceManager;
18
21
  async init() {
19
22
  this.decoratorService.registerPropertyHandler(decorator_1.ORM_MODEL_KEY, (propertyName, meta, instance) => {
20
23
  const dataSource = this.dataSourceManager.getDataSource(meta.connectionName ||
@@ -14,6 +14,9 @@ const core_1 = require("@midwayjs/core");
14
14
  const typeorm_1 = require("typeorm");
15
15
  const logger_1 = require("./logger");
16
16
  let TypeORMDataSourceManager = class TypeORMDataSourceManager extends core_1.DataSourceManager {
17
+ typeormConfig;
18
+ applicationContext;
19
+ loggerService;
17
20
  async init() {
18
21
  await this.initDataSource(this.typeormConfig, {
19
22
  concurrent: true,
package/dist/decorator.js CHANGED
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InjectDataSource = exports.EventSubscriberModel = exports.InjectEntityModel = exports.ORM_DATA_SOURCE_KEY = exports.ORM_MODEL_KEY = exports.EVENT_SUBSCRIBER_KEY = exports.ENTITY_MODEL_KEY = void 0;
3
+ exports.ORM_DATA_SOURCE_KEY = exports.ORM_MODEL_KEY = exports.EVENT_SUBSCRIBER_KEY = exports.ENTITY_MODEL_KEY = void 0;
4
+ exports.InjectEntityModel = InjectEntityModel;
5
+ exports.EventSubscriberModel = EventSubscriberModel;
6
+ exports.InjectDataSource = InjectDataSource;
4
7
  const core_1 = require("@midwayjs/core");
5
8
  const typeorm_1 = require("typeorm");
6
9
  exports.ENTITY_MODEL_KEY = 'typeorm:entity_model_key';
@@ -13,7 +16,6 @@ function InjectEntityModel(modelKey, connectionName) {
13
16
  connectionName,
14
17
  });
15
18
  }
16
- exports.InjectEntityModel = InjectEntityModel;
17
19
  /**
18
20
  * EventSubscriber - typeorm
19
21
  * implements EntitySubscriberInterface
@@ -25,11 +27,9 @@ function EventSubscriberModel() {
25
27
  (0, typeorm_1.EventSubscriber)()(target);
26
28
  };
27
29
  }
28
- exports.EventSubscriberModel = EventSubscriberModel;
29
30
  function InjectDataSource(dataSourceName) {
30
31
  return core_1.DecoratorManager.createCustomPropertyDecorator(exports.ORM_DATA_SOURCE_KEY, {
31
32
  dataSourceName,
32
33
  });
33
34
  }
34
- exports.InjectDataSource = InjectDataSource;
35
35
  //# sourceMappingURL=decorator.js.map
package/dist/logger.js CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TypeORMLogger = void 0;
4
4
  const typeorm_1 = require("typeorm");
5
5
  class TypeORMLogger extends typeorm_1.FileLogger {
6
+ typeormLogger;
6
7
  constructor(typeormLogger) {
7
8
  super(true);
8
9
  this.typeormLogger = typeormLogger;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/typeorm",
3
- "version": "4.0.0-beta.7",
3
+ "version": "4.0.0-beta.8",
4
4
  "description": "Midway Component for TypeORM",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
@@ -14,10 +14,10 @@
14
14
  "index.d.ts"
15
15
  ],
16
16
  "devDependencies": {
17
- "@midwayjs/core": "^4.0.0-beta.7",
18
- "@midwayjs/mock": "^4.0.0-beta.7",
17
+ "@midwayjs/core": "^4.0.0-beta.8",
18
+ "@midwayjs/mock": "^4.0.0-beta.8",
19
19
  "sqlite3": "5.1.7",
20
- "typeorm": "0.3.20"
20
+ "typeorm": "0.3.26"
21
21
  },
22
22
  "author": {
23
23
  "name": "czy88840616",
@@ -36,5 +36,5 @@
36
36
  "type": "git",
37
37
  "url": "https://github.com/midwayjs/midway.git"
38
38
  },
39
- "gitHead": "6a221788112b4d998b3958e0a275579f42816c59"
39
+ "gitHead": "355e55949fdd132b0bdcb4830222a0a027e92ded"
40
40
  }