@mikro-orm/nestjs 5.2.2 → 6.0.0
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/mikro-orm-core.module.d.ts +2 -3
- package/mikro-orm-core.module.js +64 -6
- package/mikro-orm-middleware.module.d.ts +3 -3
- package/mikro-orm-middleware.module.js +1 -1
- package/mikro-orm.common.d.ts +3 -3
- package/mikro-orm.entities.storage.d.ts +7 -0
- package/mikro-orm.entities.storage.js +13 -0
- package/mikro-orm.middleware.d.ts +1 -1
- package/mikro-orm.module.d.ts +3 -3
- package/mikro-orm.module.js +1 -1
- package/mikro-orm.providers.d.ts +4 -6
- package/mikro-orm.providers.js +7 -7
- package/multiple-mikro-orm.middleware.d.ts +2 -2
- package/package.json +26 -25
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type DynamicModule, type MiddlewareConsumer, type OnApplicationShutdown } from '@nestjs/common';
|
|
2
2
|
import { ModuleRef } from '@nestjs/core';
|
|
3
|
-
import type
|
|
4
|
-
import { MikroOrmModuleOptions } from './typings';
|
|
3
|
+
import { MikroOrmModuleOptions, type MikroOrmModuleAsyncOptions, type MikroOrmModuleSyncOptions } from './typings';
|
|
5
4
|
export declare class MikroOrmCoreModule implements OnApplicationShutdown {
|
|
6
5
|
private readonly options;
|
|
7
6
|
private readonly moduleRef;
|
package/mikro-orm-core.module.js
CHANGED
|
@@ -40,11 +40,11 @@ exports.MikroOrmCoreModule = void 0;
|
|
|
40
40
|
const core_1 = require("@mikro-orm/core");
|
|
41
41
|
const common_1 = require("@nestjs/common");
|
|
42
42
|
const core_2 = require("@nestjs/core");
|
|
43
|
-
const mikro_orm_common_1 = require("./mikro-orm.common");
|
|
44
|
-
const mikro_orm_providers_1 = require("./mikro-orm.providers");
|
|
45
|
-
const mikro_orm_middleware_1 = require("./mikro-orm.middleware");
|
|
46
43
|
const middleware_helper_1 = require("./middleware.helper");
|
|
44
|
+
const mikro_orm_common_1 = require("./mikro-orm.common");
|
|
47
45
|
const mikro_orm_entities_storage_1 = require("./mikro-orm.entities.storage");
|
|
46
|
+
const mikro_orm_middleware_1 = require("./mikro-orm.middleware");
|
|
47
|
+
const mikro_orm_providers_1 = require("./mikro-orm.providers");
|
|
48
48
|
async function tryRequire(name) {
|
|
49
49
|
try {
|
|
50
50
|
return await Promise.resolve(`${name}`).then(s => __importStar(require(s)));
|
|
@@ -53,6 +53,17 @@ async function tryRequire(name) {
|
|
|
53
53
|
return undefined; // ignore, optional dependency
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
+
// TODO: provide the package name via some platform method, prefer that over the static map when available
|
|
57
|
+
const PACKAGES = {
|
|
58
|
+
MongoDriver: '@mikro-orm/mongo',
|
|
59
|
+
MySqlDriver: '@mikro-orm/mysql',
|
|
60
|
+
MsSqlDriver: '@mikro-orm/mssql',
|
|
61
|
+
MariaDbDriver: '@mikro-orm/mariadb',
|
|
62
|
+
PostgreSqlDriver: '@mikro-orm/postgresql',
|
|
63
|
+
SqliteDriver: '@mikro-orm/sqlite',
|
|
64
|
+
LibSqlDriver: '@mikro-orm/libsql',
|
|
65
|
+
BetterSqliteDriver: '@mikro-orm/better-sqlite',
|
|
66
|
+
};
|
|
56
67
|
let MikroOrmCoreModule = MikroOrmCoreModule_1 = class MikroOrmCoreModule {
|
|
57
68
|
constructor(options, moduleRef) {
|
|
58
69
|
this.options = options;
|
|
@@ -63,11 +74,34 @@ let MikroOrmCoreModule = MikroOrmCoreModule_1 = class MikroOrmCoreModule {
|
|
|
63
74
|
const knex = await tryRequire('@mikro-orm/knex');
|
|
64
75
|
const mongo = await tryRequire('@mikro-orm/mongodb');
|
|
65
76
|
const em = await this.createEntityManager(options);
|
|
77
|
+
if (em && !contextName) {
|
|
78
|
+
const packageName = PACKAGES[em.getDriver().constructor.name];
|
|
79
|
+
const driverPackage = await tryRequire(packageName);
|
|
80
|
+
if (driverPackage) {
|
|
81
|
+
return {
|
|
82
|
+
module: MikroOrmCoreModule_1,
|
|
83
|
+
providers: [
|
|
84
|
+
{ provide: mikro_orm_common_1.MIKRO_ORM_MODULE_OPTIONS, useValue: options || {} },
|
|
85
|
+
(0, mikro_orm_providers_1.createMikroOrmProvider)(contextName),
|
|
86
|
+
(0, mikro_orm_providers_1.createMikroOrmProvider)(contextName, driverPackage.MikroORM),
|
|
87
|
+
(0, mikro_orm_providers_1.createEntityManagerProvider)(options?.scope, core_1.EntityManager),
|
|
88
|
+
(0, mikro_orm_providers_1.createEntityManagerProvider)(options?.scope, driverPackage.EntityManager),
|
|
89
|
+
],
|
|
90
|
+
exports: [
|
|
91
|
+
core_1.MikroORM,
|
|
92
|
+
core_1.EntityManager,
|
|
93
|
+
driverPackage.EntityManager,
|
|
94
|
+
driverPackage.MikroORM,
|
|
95
|
+
],
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
}
|
|
66
99
|
return {
|
|
67
100
|
module: MikroOrmCoreModule_1,
|
|
68
101
|
providers: [
|
|
69
102
|
{ provide: mikro_orm_common_1.MIKRO_ORM_MODULE_OPTIONS, useValue: options || {} },
|
|
70
103
|
(0, mikro_orm_providers_1.createMikroOrmProvider)(contextName),
|
|
104
|
+
...(mongo ? [(0, mikro_orm_providers_1.createMikroOrmProvider)(contextName, mongo.MikroORM)] : []),
|
|
71
105
|
(0, mikro_orm_providers_1.createEntityManagerProvider)(options?.scope, core_1.EntityManager, contextName),
|
|
72
106
|
...(em ? [(0, mikro_orm_providers_1.createEntityManagerProvider)(options?.scope, em.constructor, contextName)] : []),
|
|
73
107
|
...(knex ? [(0, mikro_orm_providers_1.createEntityManagerProvider)(options?.scope, knex.EntityManager, contextName)] : []),
|
|
@@ -78,7 +112,7 @@ let MikroOrmCoreModule = MikroOrmCoreModule_1 = class MikroOrmCoreModule {
|
|
|
78
112
|
contextName ? (0, mikro_orm_common_1.getEntityManagerToken)(contextName) : core_1.EntityManager,
|
|
79
113
|
...(em && !contextName ? [em.constructor] : []),
|
|
80
114
|
...(knex && !contextName ? [knex.EntityManager] : []),
|
|
81
|
-
...(mongo && !contextName ? [mongo.EntityManager] : []),
|
|
115
|
+
...(mongo && !contextName ? [mongo.EntityManager, mongo.MikroORM] : []),
|
|
82
116
|
],
|
|
83
117
|
};
|
|
84
118
|
}
|
|
@@ -87,6 +121,30 @@ let MikroOrmCoreModule = MikroOrmCoreModule_1 = class MikroOrmCoreModule {
|
|
|
87
121
|
const knex = await tryRequire('@mikro-orm/knex');
|
|
88
122
|
const mongo = await tryRequire('@mikro-orm/mongodb');
|
|
89
123
|
const em = await this.createEntityManager(options);
|
|
124
|
+
if (em && !contextName) {
|
|
125
|
+
const packageName = PACKAGES[em.getDriver().constructor.name];
|
|
126
|
+
const driverPackage = await tryRequire(packageName);
|
|
127
|
+
if (driverPackage) {
|
|
128
|
+
return {
|
|
129
|
+
module: MikroOrmCoreModule_1,
|
|
130
|
+
imports: options.imports || [],
|
|
131
|
+
providers: [
|
|
132
|
+
...(options.providers || []),
|
|
133
|
+
...(0, mikro_orm_providers_1.createAsyncProviders)({ ...options, contextName: options.contextName }),
|
|
134
|
+
(0, mikro_orm_providers_1.createMikroOrmProvider)(contextName),
|
|
135
|
+
(0, mikro_orm_providers_1.createMikroOrmProvider)(contextName, driverPackage.MikroORM),
|
|
136
|
+
(0, mikro_orm_providers_1.createEntityManagerProvider)(options?.scope, core_1.EntityManager),
|
|
137
|
+
(0, mikro_orm_providers_1.createEntityManagerProvider)(options?.scope, driverPackage.EntityManager),
|
|
138
|
+
],
|
|
139
|
+
exports: [
|
|
140
|
+
core_1.MikroORM,
|
|
141
|
+
core_1.EntityManager,
|
|
142
|
+
driverPackage.EntityManager,
|
|
143
|
+
driverPackage.MikroORM,
|
|
144
|
+
],
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
}
|
|
90
148
|
return {
|
|
91
149
|
module: MikroOrmCoreModule_1,
|
|
92
150
|
imports: options.imports || [],
|
|
@@ -104,7 +162,7 @@ let MikroOrmCoreModule = MikroOrmCoreModule_1 = class MikroOrmCoreModule {
|
|
|
104
162
|
contextName ? (0, mikro_orm_common_1.getEntityManagerToken)(contextName) : core_1.EntityManager,
|
|
105
163
|
...(em && !contextName ? [em.constructor] : []),
|
|
106
164
|
...(knex && !contextName ? [knex.EntityManager] : []),
|
|
107
|
-
...(mongo && !contextName ? [mongo.EntityManager] : []),
|
|
165
|
+
...(mongo && !contextName ? [mongo.EntityManager, mongo.MikroORM] : []),
|
|
108
166
|
],
|
|
109
167
|
};
|
|
110
168
|
}
|
|
@@ -135,7 +193,7 @@ let MikroOrmCoreModule = MikroOrmCoreModule_1 = class MikroOrmCoreModule {
|
|
|
135
193
|
const orm = this.moduleRef.get(token);
|
|
136
194
|
if (orm) {
|
|
137
195
|
await orm.close();
|
|
138
|
-
mikro_orm_entities_storage_1.MikroOrmEntitiesStorage.
|
|
196
|
+
mikro_orm_entities_storage_1.MikroOrmEntitiesStorage.clearLater();
|
|
139
197
|
}
|
|
140
198
|
mikro_orm_common_1.CONTEXT_NAMES.length = 0;
|
|
141
199
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { MikroOrmMiddlewareModuleOptions } from './typings';
|
|
1
|
+
import { type MiddlewareConsumer } from '@nestjs/common';
|
|
3
2
|
import type { MikroORM } from '@mikro-orm/core';
|
|
3
|
+
import { MikroOrmMiddlewareModuleOptions } from './typings';
|
|
4
4
|
export declare class MikroOrmMiddlewareModule {
|
|
5
5
|
private readonly options;
|
|
6
6
|
constructor(options: MikroOrmMiddlewareModuleOptions);
|
|
@@ -13,7 +13,7 @@ export declare class MikroOrmMiddlewareModule {
|
|
|
13
13
|
inject?: undefined;
|
|
14
14
|
} | {
|
|
15
15
|
provide: string;
|
|
16
|
-
useFactory: (...args: MikroORM[]) => MikroORM<import("@mikro-orm/core").IDatabaseDriver<import("@mikro-orm/core").Connection
|
|
16
|
+
useFactory: (...args: MikroORM[]) => MikroORM<import("@mikro-orm/core").IDatabaseDriver<import("@mikro-orm/core").Connection>, import("@mikro-orm/core").EntityManager<import("@mikro-orm/core").IDatabaseDriver<import("@mikro-orm/core").Connection>>>[];
|
|
17
17
|
inject: string[];
|
|
18
18
|
useValue?: undefined;
|
|
19
19
|
})[];
|
|
@@ -15,9 +15,9 @@ var MikroOrmMiddlewareModule_1;
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.MikroOrmMiddlewareModule = void 0;
|
|
17
17
|
const common_1 = require("@nestjs/common");
|
|
18
|
+
const middleware_helper_1 = require("./middleware.helper");
|
|
18
19
|
const mikro_orm_common_1 = require("./mikro-orm.common");
|
|
19
20
|
const multiple_mikro_orm_middleware_1 = require("./multiple-mikro-orm.middleware");
|
|
20
|
-
const middleware_helper_1 = require("./middleware.helper");
|
|
21
21
|
let MikroOrmMiddlewareModule = MikroOrmMiddlewareModule_1 = class MikroOrmMiddlewareModule {
|
|
22
22
|
constructor(options) {
|
|
23
23
|
this.options = options;
|
package/mikro-orm.common.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export declare const MIKRO_ORM_MODULE_OPTIONS: unique symbol;
|
|
|
4
4
|
export declare const CONTEXT_NAMES: string[];
|
|
5
5
|
export declare const logger: Logger;
|
|
6
6
|
export declare const getMikroORMToken: (name: string) => string;
|
|
7
|
-
export declare const InjectMikroORM: (name: string) =>
|
|
7
|
+
export declare const InjectMikroORM: (name: string) => PropertyDecorator & ParameterDecorator;
|
|
8
8
|
export declare const getEntityManagerToken: (name: string) => string;
|
|
9
|
-
export declare const InjectEntityManager: (name: string) =>
|
|
9
|
+
export declare const InjectEntityManager: (name: string) => PropertyDecorator & ParameterDecorator;
|
|
10
10
|
export declare const getRepositoryToken: <T extends object>(entity: EntityName<T>, name?: string) => string;
|
|
11
|
-
export declare const InjectRepository: <T extends object>(entity: EntityName<T>, name?: string) =>
|
|
11
|
+
export declare const InjectRepository: <T extends object>(entity: EntityName<T>, name?: string) => PropertyDecorator & ParameterDecorator;
|
|
@@ -2,7 +2,14 @@ import type { AnyEntity } from '@mikro-orm/core';
|
|
|
2
2
|
import type { EntityName } from './typings';
|
|
3
3
|
export declare class MikroOrmEntitiesStorage {
|
|
4
4
|
private static readonly storage;
|
|
5
|
+
private static shouldClear;
|
|
5
6
|
static addEntity(entity: EntityName<AnyEntity>, contextName?: string): void;
|
|
6
7
|
static getEntities(contextName?: string): never[] | IterableIterator<EntityName<Partial<any>>>;
|
|
7
8
|
static clear(contextName?: string): void;
|
|
9
|
+
/**
|
|
10
|
+
* When the `addEntity` is called next, the storage will be cleared automatically before it.
|
|
11
|
+
* We want to keep the cache, as it's populated on require time, but sometimes (tests) the contexts could be cleared.
|
|
12
|
+
* This resolves both cases by deferring the `clear` call to the first `addEntity` call.
|
|
13
|
+
*/
|
|
14
|
+
static clearLater(): void;
|
|
8
15
|
}
|
|
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MikroOrmEntitiesStorage = void 0;
|
|
4
4
|
class MikroOrmEntitiesStorage {
|
|
5
5
|
static addEntity(entity, contextName = 'default') {
|
|
6
|
+
if (this.shouldClear) {
|
|
7
|
+
this.clear(contextName);
|
|
8
|
+
this.shouldClear = false;
|
|
9
|
+
}
|
|
6
10
|
let set = this.storage.get(contextName);
|
|
7
11
|
if (!set) {
|
|
8
12
|
set = new Set();
|
|
@@ -16,6 +20,15 @@ class MikroOrmEntitiesStorage {
|
|
|
16
20
|
static clear(contextName = 'default') {
|
|
17
21
|
this.storage.get(contextName)?.clear();
|
|
18
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* When the `addEntity` is called next, the storage will be cleared automatically before it.
|
|
25
|
+
* We want to keep the cache, as it's populated on require time, but sometimes (tests) the contexts could be cleared.
|
|
26
|
+
* This resolves both cases by deferring the `clear` call to the first `addEntity` call.
|
|
27
|
+
*/
|
|
28
|
+
static clearLater() {
|
|
29
|
+
this.shouldClear = true;
|
|
30
|
+
}
|
|
19
31
|
}
|
|
20
32
|
exports.MikroOrmEntitiesStorage = MikroOrmEntitiesStorage;
|
|
21
33
|
MikroOrmEntitiesStorage.storage = new Map();
|
|
34
|
+
MikroOrmEntitiesStorage.shouldClear = false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MikroORM } from '@mikro-orm/core';
|
|
2
|
-
import type
|
|
2
|
+
import { type NestMiddleware } from '@nestjs/common';
|
|
3
3
|
export declare class MikroOrmMiddleware implements NestMiddleware {
|
|
4
4
|
private readonly orm;
|
|
5
5
|
constructor(orm: MikroORM);
|
package/mikro-orm.module.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
3
|
-
import type {
|
|
1
|
+
import { type AnyEntity } from '@mikro-orm/core';
|
|
2
|
+
import { type DynamicModule } from '@nestjs/common';
|
|
3
|
+
import type { EntityName, MikroOrmMiddlewareModuleOptions, MikroOrmModuleAsyncOptions, MikroOrmModuleFeatureOptions, MikroOrmModuleSyncOptions } from './typings';
|
|
4
4
|
export declare class MikroOrmModule {
|
|
5
5
|
/**
|
|
6
6
|
* Clears the entity storage. This is useful for testing purposes, when you want to isolate the tests.
|
package/mikro-orm.module.js
CHANGED
|
@@ -10,10 +10,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.MikroOrmModule = void 0;
|
|
11
11
|
const core_1 = require("@mikro-orm/core");
|
|
12
12
|
const common_1 = require("@nestjs/common");
|
|
13
|
-
const mikro_orm_providers_1 = require("./mikro-orm.providers");
|
|
14
13
|
const mikro_orm_core_module_1 = require("./mikro-orm-core.module");
|
|
15
14
|
const mikro_orm_middleware_module_1 = require("./mikro-orm-middleware.module");
|
|
16
15
|
const mikro_orm_entities_storage_1 = require("./mikro-orm.entities.storage");
|
|
16
|
+
const mikro_orm_providers_1 = require("./mikro-orm.providers");
|
|
17
17
|
let MikroOrmModule = MikroOrmModule_1 = class MikroOrmModule {
|
|
18
18
|
/**
|
|
19
19
|
* Clears the entity storage. This is useful for testing purposes, when you want to isolate the tests.
|
package/mikro-orm.providers.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import {
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
import { Scope } from '@nestjs/common';
|
|
6
|
-
export declare function createMikroOrmProvider(contextName?: string): Provider;
|
|
1
|
+
import { EntityManager, type AnyEntity } from '@mikro-orm/core';
|
|
2
|
+
import { Scope, type Provider, type Type } from '@nestjs/common';
|
|
3
|
+
import type { EntityName, MikroOrmModuleAsyncOptions } from './typings';
|
|
4
|
+
export declare function createMikroOrmProvider(contextName?: string, type?: Type): Provider;
|
|
7
5
|
export declare function createEntityManagerProvider(scope?: Scope, entityManager?: Type, contextName?: string): Provider<EntityManager>;
|
|
8
6
|
export declare function createMikroOrmAsyncOptionsProvider(options: MikroOrmModuleAsyncOptions): Provider;
|
|
9
7
|
export declare function createAsyncProviders(options: MikroOrmModuleAsyncOptions): Provider[];
|
package/mikro-orm.providers.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createMikroOrmRepositoryProviders = exports.createAsyncProviders = exports.createMikroOrmAsyncOptionsProvider = exports.createEntityManagerProvider = exports.createMikroOrmProvider = void 0;
|
|
4
|
-
const mikro_orm_common_1 = require("./mikro-orm.common");
|
|
5
4
|
const core_1 = require("@mikro-orm/core");
|
|
5
|
+
const mikro_orm_common_1 = require("./mikro-orm.common");
|
|
6
6
|
const common_1 = require("@nestjs/common");
|
|
7
7
|
const mikro_orm_entities_storage_1 = require("./mikro-orm.entities.storage");
|
|
8
|
-
function createMikroOrmProvider(contextName) {
|
|
8
|
+
function createMikroOrmProvider(contextName, type = core_1.MikroORM) {
|
|
9
9
|
return {
|
|
10
|
-
provide: contextName ? (0, mikro_orm_common_1.getMikroORMToken)(contextName) :
|
|
10
|
+
provide: contextName ? (0, mikro_orm_common_1.getMikroORMToken)(contextName) : type,
|
|
11
11
|
useFactory: async (options) => {
|
|
12
12
|
options = { ...options };
|
|
13
13
|
if (options?.autoLoadEntities) {
|
|
@@ -31,7 +31,7 @@ function createEntityManagerProvider(scope = common_1.Scope.DEFAULT, entityManag
|
|
|
31
31
|
return {
|
|
32
32
|
provide: entityManager,
|
|
33
33
|
scope,
|
|
34
|
-
useFactory: (em) => em,
|
|
34
|
+
useFactory: (em) => em, // just a simple alias, unlike `useExisting` from nest, this works with request scopes too
|
|
35
35
|
inject: [core_1.EntityManager], // depend on the EM from core package
|
|
36
36
|
};
|
|
37
37
|
}
|
|
@@ -47,8 +47,8 @@ function createMikroOrmAsyncOptionsProvider(options) {
|
|
|
47
47
|
if (options.useFactory) {
|
|
48
48
|
return {
|
|
49
49
|
provide: mikro_orm_common_1.MIKRO_ORM_MODULE_OPTIONS,
|
|
50
|
-
useFactory: (...args) => {
|
|
51
|
-
const factoryOptions = options.useFactory(...args);
|
|
50
|
+
useFactory: async (...args) => {
|
|
51
|
+
const factoryOptions = await options.useFactory(...args);
|
|
52
52
|
return options.contextName
|
|
53
53
|
? { contextName: options.contextName, ...factoryOptions }
|
|
54
54
|
: factoryOptions;
|
|
@@ -86,7 +86,7 @@ function createMikroOrmRepositoryProviders(entities, contextName) {
|
|
|
86
86
|
const inject = contextName ? (0, mikro_orm_common_1.getEntityManagerToken)(contextName) : core_1.EntityManager;
|
|
87
87
|
(entities || []).forEach(entity => {
|
|
88
88
|
const meta = metadata.find(meta => meta.class === entity);
|
|
89
|
-
const repository =
|
|
89
|
+
const repository = meta?.repository;
|
|
90
90
|
if (repository) {
|
|
91
91
|
providers.push({
|
|
92
92
|
provide: repository(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
1
|
+
import { type MikroORM } from '@mikro-orm/core';
|
|
2
|
+
import { type NestMiddleware } from '@nestjs/common';
|
|
3
3
|
export declare class MultipleMikroOrmMiddleware implements NestMiddleware {
|
|
4
4
|
private readonly orm;
|
|
5
5
|
constructor(orm: MikroORM[]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/nestjs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Martin Adamek",
|
|
@@ -40,31 +40,32 @@
|
|
|
40
40
|
"lint": "eslint src/**/*.ts"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@mikro-orm/core": "^
|
|
44
|
-
"@nestjs/common": "^
|
|
45
|
-
"@nestjs/core": "^
|
|
43
|
+
"@mikro-orm/core": "^6.0.0",
|
|
44
|
+
"@nestjs/common": "^10.0.0",
|
|
45
|
+
"@nestjs/core": "^10.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@mikro-orm/core": "^
|
|
49
|
-
"@mikro-orm/sqlite": "^
|
|
50
|
-
"@nestjs/common": "^
|
|
51
|
-
"@nestjs/core": "^
|
|
52
|
-
"@nestjs/platform-express": "^
|
|
53
|
-
"@nestjs/testing": "^
|
|
54
|
-
"@types/jest": "^29.5.
|
|
55
|
-
"@types/node": "^20.
|
|
56
|
-
"@types/supertest": "^
|
|
57
|
-
"@typescript-eslint/eslint-plugin": "~
|
|
58
|
-
"@typescript-eslint/parser": "~
|
|
59
|
-
"conventional-changelog": "^
|
|
60
|
-
"conventional-changelog-cli": "^
|
|
61
|
-
"eslint": "^8.
|
|
62
|
-
"
|
|
48
|
+
"@mikro-orm/core": "^6.2.7",
|
|
49
|
+
"@mikro-orm/sqlite": "^6.2.7",
|
|
50
|
+
"@nestjs/common": "^10.3.8",
|
|
51
|
+
"@nestjs/core": "^10.3.8",
|
|
52
|
+
"@nestjs/platform-express": "^10.3.8",
|
|
53
|
+
"@nestjs/testing": "^10.3.8",
|
|
54
|
+
"@types/jest": "^29.5.12",
|
|
55
|
+
"@types/node": "^20.12.12",
|
|
56
|
+
"@types/supertest": "^6.0.2",
|
|
57
|
+
"@typescript-eslint/eslint-plugin": "~7.9.0",
|
|
58
|
+
"@typescript-eslint/parser": "~7.9.0",
|
|
59
|
+
"conventional-changelog": "^6.0.0",
|
|
60
|
+
"conventional-changelog-cli": "^5.0.0",
|
|
61
|
+
"eslint": "^8.57.0",
|
|
62
|
+
"eslint-plugin-import": "^2.29.1",
|
|
63
|
+
"jest": "^29.7.0",
|
|
63
64
|
"rxjs": "^7.8.1",
|
|
64
|
-
"supertest": "^
|
|
65
|
-
"ts-jest": "^29.1.
|
|
66
|
-
"ts-node": "^10.9.
|
|
67
|
-
"typescript": "5.
|
|
65
|
+
"supertest": "^7.0.0",
|
|
66
|
+
"ts-jest": "^29.1.2",
|
|
67
|
+
"ts-node": "^10.9.2",
|
|
68
|
+
"typescript": "5.4.5"
|
|
68
69
|
},
|
|
69
70
|
"commitlint": {
|
|
70
71
|
"extends": [
|
|
@@ -102,7 +103,7 @@
|
|
|
102
103
|
]
|
|
103
104
|
},
|
|
104
105
|
"engines": {
|
|
105
|
-
"node": ">=
|
|
106
|
+
"node": ">= 18.12.0"
|
|
106
107
|
},
|
|
107
|
-
"packageManager": "yarn@
|
|
108
|
+
"packageManager": "yarn@4.2.2"
|
|
108
109
|
}
|