@mikro-orm/nestjs 6.1.0 → 6.1.1
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.
- package/middleware.helper.d.ts +1 -1
- package/middleware.helper.js +13 -6
- package/mikro-orm.providers.js +1 -1
- package/package.json +7 -7
package/middleware.helper.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { MikroOrmMiddlewareModuleOptions } from './typings';
|
|
2
|
-
import type
|
|
2
|
+
import { type MiddlewareConsumer } from '@nestjs/common';
|
|
3
3
|
export declare function forRoutesPath(options: MikroOrmMiddlewareModuleOptions, consumer: MiddlewareConsumer): string;
|
package/middleware.helper.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.forRoutesPath = forRoutesPath;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
4
5
|
function forRoutesPath(options, consumer) {
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
}
|
|
8
|
-
|
|
6
|
+
if (options.forRoutesPath) {
|
|
7
|
+
return options.forRoutesPath;
|
|
8
|
+
}
|
|
9
|
+
// detect nest v11 based on a newly added enum value
|
|
10
|
+
if (common_1.HttpStatus.MULTI_STATUS) {
|
|
11
|
+
return '{*all}';
|
|
12
|
+
}
|
|
13
|
+
const isFastify = (consumer) => {
|
|
14
|
+
if (typeof consumer.httpAdapter !== 'object') {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
9
17
|
return consumer.httpAdapter.constructor.name.toLowerCase().startsWith('fastify');
|
|
10
18
|
};
|
|
11
|
-
return
|
|
12
|
-
(isNestMiddleware(consumer) && usingFastify(consumer) ? '(.*)' : '*');
|
|
19
|
+
return isFastify(consumer) ? '(.*)' : '*';
|
|
13
20
|
}
|
package/mikro-orm.providers.js
CHANGED
|
@@ -29,7 +29,7 @@ function createMikroOrmProvider(contextName, type = core_1.MikroORM) {
|
|
|
29
29
|
if (!options || Object.keys(options).length === 0) {
|
|
30
30
|
const config = await core_1.ConfigurationLoader.getConfiguration();
|
|
31
31
|
config.set('logger', mikro_orm_common_1.logger.log.bind(mikro_orm_common_1.logger));
|
|
32
|
-
options = config;
|
|
32
|
+
options = config.getAll();
|
|
33
33
|
}
|
|
34
34
|
return core_1.MikroORM.init(options);
|
|
35
35
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/nestjs",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Martin Adamek",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"lint": "eslint src/**/*.ts"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@mikro-orm/core": "^6.0.0 || ^6.0.0-dev.0",
|
|
43
|
+
"@mikro-orm/core": "^6.0.0 || ^6.0.0-dev.0 || ^7.0.0-dev.0",
|
|
44
44
|
"@nestjs/common": "^10.0.0 || ^11.0.5",
|
|
45
45
|
"@nestjs/core": "^10.0.0 || ^11.0.5"
|
|
46
46
|
},
|
|
@@ -51,21 +51,21 @@
|
|
|
51
51
|
"@nestjs/core": "^11.0.5",
|
|
52
52
|
"@nestjs/platform-express": "^11.0.5",
|
|
53
53
|
"@nestjs/testing": "^11.0.5",
|
|
54
|
+
"@stylistic/eslint-plugin-ts": "^3.0.1",
|
|
54
55
|
"@types/jest": "^29.5.12",
|
|
55
56
|
"@types/node": "^22.0.0",
|
|
56
57
|
"@types/supertest": "^6.0.2",
|
|
57
|
-
"@typescript-eslint/eslint-plugin": "~7.18.0",
|
|
58
|
-
"@typescript-eslint/parser": "~7.18.0",
|
|
59
58
|
"conventional-changelog": "^6.0.0",
|
|
60
59
|
"conventional-changelog-cli": "^5.0.0",
|
|
61
|
-
"eslint": "^
|
|
62
|
-
"eslint-plugin-import": "^2.
|
|
60
|
+
"eslint": "^9.19.0",
|
|
61
|
+
"eslint-plugin-import": "^2.31.0",
|
|
63
62
|
"jest": "^29.7.0",
|
|
64
63
|
"rxjs": "^7.8.1",
|
|
65
64
|
"supertest": "^7.0.0",
|
|
66
65
|
"ts-jest": "^29.1.2",
|
|
67
66
|
"ts-node": "^10.9.2",
|
|
68
|
-
"typescript": "5.7.3"
|
|
67
|
+
"typescript": "5.7.3",
|
|
68
|
+
"typescript-eslint": "^8.22.0"
|
|
69
69
|
},
|
|
70
70
|
"commitlint": {
|
|
71
71
|
"extends": [
|