@mikro-orm/nestjs 5.1.6 → 5.1.7

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.
@@ -17,6 +17,7 @@ export declare class MikroOrmMiddlewareModule {
17
17
  inject: string[];
18
18
  useValue?: undefined;
19
19
  })[];
20
+ exports: string[];
20
21
  };
21
22
  configure(consumer: MiddlewareConsumer): void;
22
23
  }
@@ -37,6 +37,7 @@ let MikroOrmMiddlewareModule = MikroOrmMiddlewareModule_1 = class MikroOrmMiddle
37
37
  inject,
38
38
  },
39
39
  ],
40
+ exports: ['MikroORMs'],
40
41
  };
41
42
  }
42
43
  configure(consumer) {
@@ -85,9 +85,10 @@ function createMikroOrmRepositoryProviders(entities, contextName) {
85
85
  const inject = contextName ? (0, mikro_orm_common_1.getEntityManagerToken)(contextName) : core_1.EntityManager;
86
86
  (entities || []).forEach(entity => {
87
87
  const meta = metadata.find(meta => meta.class === entity);
88
- if (meta?.customRepository) {
88
+ const repository = (meta?.repository ?? meta?.customRepository);
89
+ if (repository) {
89
90
  providers.push({
90
- provide: meta.customRepository(),
91
+ provide: repository(),
91
92
  useFactory: em => em.getRepository(entity),
92
93
  inject: [inject],
93
94
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/nestjs",
3
- "version": "5.1.6",
3
+ "version": "5.1.7",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Martin Adamek",
@@ -54,8 +54,8 @@
54
54
  "@types/jest": "^29.2.4",
55
55
  "@types/node": "^18.11.17",
56
56
  "@types/supertest": "^2.0.12",
57
- "@typescript-eslint/eslint-plugin": "~5.48.0",
58
- "@typescript-eslint/parser": "~5.48.0",
57
+ "@typescript-eslint/eslint-plugin": "~5.51.0",
58
+ "@typescript-eslint/parser": "~5.51.0",
59
59
  "conventional-changelog": "^3.1.25",
60
60
  "conventional-changelog-cli": "^2.2.2",
61
61
  "eslint": "^8.30.0",
@@ -64,7 +64,7 @@
64
64
  "supertest": "^6.3.3",
65
65
  "ts-jest": "^29.0.3",
66
66
  "ts-node": "^10.9.1",
67
- "typescript": "4.9.4"
67
+ "typescript": "4.9.5"
68
68
  },
69
69
  "commitlint": {
70
70
  "extends": [
@@ -104,5 +104,5 @@
104
104
  "engines": {
105
105
  "node": ">= 14.0.0"
106
106
  },
107
- "packageManager": "yarn@3.3.1"
107
+ "packageManager": "yarn@3.4.1"
108
108
  }