@tsed/mikro-orm 7.70.2 → 7.71.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/lib/cjs/MikroOrmModule.js +12 -12
- package/lib/cjs/MikroOrmModule.js.map +1 -1
- package/lib/cjs/decorators/entityManager.js +2 -2
- package/lib/cjs/decorators/entityManager.js.map +1 -1
- package/lib/cjs/decorators/orm.js +2 -2
- package/lib/cjs/decorators/orm.js.map +1 -1
- package/lib/cjs/decorators/subscriber.js +2 -2
- package/lib/cjs/decorators/subscriber.js.map +1 -1
- package/lib/cjs/decorators/transactional.js +2 -2
- package/lib/cjs/decorators/transactional.js.map +1 -1
- package/lib/cjs/index.js +17 -17
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/interceptors/TransactionalInterceptor.js +11 -11
- package/lib/cjs/interceptors/TransactionalInterceptor.js.map +1 -1
- package/lib/cjs/services/MikroOrmFactory.js +2 -2
- package/lib/cjs/services/MikroOrmFactory.js.map +1 -1
- package/lib/cjs/services/MikroOrmRegistry.js +3 -2
- package/lib/cjs/services/MikroOrmRegistry.js.map +1 -1
- package/lib/esm/MikroOrmModule.js.map +1 -1
- package/lib/esm/decorators/entityManager.js.map +1 -1
- package/lib/esm/decorators/orm.js.map +1 -1
- package/lib/esm/decorators/subscriber.js.map +1 -1
- package/lib/esm/decorators/transactional.js.map +1 -1
- package/lib/esm/index.js +2 -2
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/interceptors/TransactionalInterceptor.js.map +1 -1
- package/lib/esm/services/MikroOrmFactory.js.map +1 -1
- package/lib/esm/services/MikroOrmRegistry.js +2 -1
- package/lib/esm/services/MikroOrmRegistry.js.map +1 -1
- package/lib/types/decorators/transactional.d.ts +1 -1
- package/lib/types/index.d.ts +15 -15
- package/lib/types/interceptors/TransactionalInterceptor.d.ts +3 -3
- package/lib/types/services/MikroOrmFactory.d.ts +1 -1
- package/lib/types/services/MikroOrmRegistry.d.ts +1 -1
- package/package.json +13 -13
|
@@ -4,12 +4,12 @@ exports.MikroOrmModule = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
require("./services/MikroOrmFactory");
|
|
6
6
|
const di_1 = require("@tsed/di");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
7
|
+
const MikroOrmRegistry_js_1 = require("./services/MikroOrmRegistry.js");
|
|
8
|
+
const RetryStrategy_js_1 = require("./interfaces/RetryStrategy.js");
|
|
9
|
+
const OptimisticLockErrorFilter_js_1 = require("./filters/OptimisticLockErrorFilter.js");
|
|
10
|
+
const MikroOrmContext_js_1 = require("./services/MikroOrmContext.js");
|
|
11
11
|
const core_1 = require("@tsed/core");
|
|
12
|
-
const
|
|
12
|
+
const constants_js_1 = require("./constants.js");
|
|
13
13
|
let MikroOrmModule = class MikroOrmModule {
|
|
14
14
|
subscribers;
|
|
15
15
|
settings;
|
|
@@ -44,8 +44,8 @@ let MikroOrmModule = class MikroOrmModule {
|
|
|
44
44
|
return subscriber;
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
getManagedSubscribers(contextName =
|
|
48
|
-
return this.subscribers.filter((instance) => core_1.Store.from((0, core_1.classOf)(instance)).get(
|
|
47
|
+
getManagedSubscribers(contextName = constants_js_1.DEFAULT_CONTEXT_NAME) {
|
|
48
|
+
return this.subscribers.filter((instance) => core_1.Store.from((0, core_1.classOf)(instance)).get(constants_js_1.SUBSCRIBER_INJECTION_TYPE)?.contextName === contextName);
|
|
49
49
|
}
|
|
50
50
|
createContext(next) {
|
|
51
51
|
const instances = [...this.registry.values()];
|
|
@@ -59,11 +59,11 @@ tslib_1.__decorate([
|
|
|
59
59
|
], MikroOrmModule.prototype, "settings", void 0);
|
|
60
60
|
tslib_1.__decorate([
|
|
61
61
|
(0, di_1.Inject)(),
|
|
62
|
-
tslib_1.__metadata("design:type",
|
|
62
|
+
tslib_1.__metadata("design:type", MikroOrmRegistry_js_1.MikroOrmRegistry)
|
|
63
63
|
], MikroOrmModule.prototype, "registry", void 0);
|
|
64
64
|
tslib_1.__decorate([
|
|
65
65
|
(0, di_1.Inject)(),
|
|
66
|
-
tslib_1.__metadata("design:type",
|
|
66
|
+
tslib_1.__metadata("design:type", MikroOrmContext_js_1.MikroOrmContext)
|
|
67
67
|
], MikroOrmModule.prototype, "context", void 0);
|
|
68
68
|
tslib_1.__decorate([
|
|
69
69
|
(0, di_1.Inject)(),
|
|
@@ -71,12 +71,12 @@ tslib_1.__decorate([
|
|
|
71
71
|
], MikroOrmModule.prototype, "injector", void 0);
|
|
72
72
|
MikroOrmModule = tslib_1.__decorate([
|
|
73
73
|
(0, di_1.Module)({
|
|
74
|
-
responseFilters: [
|
|
74
|
+
responseFilters: [OptimisticLockErrorFilter_js_1.OptimisticLockErrorFilter]
|
|
75
75
|
}),
|
|
76
|
-
tslib_1.__param(0, (0, di_1.Inject)(
|
|
76
|
+
tslib_1.__param(0, (0, di_1.Inject)(constants_js_1.SUBSCRIBER_INJECTION_TYPE)),
|
|
77
77
|
tslib_1.__metadata("design:paramtypes", [Array])
|
|
78
78
|
], MikroOrmModule);
|
|
79
79
|
exports.MikroOrmModule = MikroOrmModule;
|
|
80
80
|
// TODO: the IoC container should provide null or undefined by default until tsedio/tsed#1694 is closed
|
|
81
|
-
(0, di_1.registerProvider)({ provide:
|
|
81
|
+
(0, di_1.registerProvider)({ provide: RetryStrategy_js_1.RetryStrategy, useValue: null });
|
|
82
82
|
//# sourceMappingURL=MikroOrmModule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MikroOrmModule.js","sourceRoot":"","sources":["../../src/MikroOrmModule.ts"],"names":[],"mappings":";;;;AAAA,sCAAoC;AACpC,iCAWkB;AAElB,
|
|
1
|
+
{"version":3,"file":"MikroOrmModule.js","sourceRoot":"","sources":["../../src/MikroOrmModule.ts"],"names":[],"mappings":";;;;AAAA,sCAAoC;AACpC,iCAWkB;AAElB,wEAAgE;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,WAAM,EAAC,wCAAyB,CAAC,CAAA;;GAbnC,cAAc,CA2D1B;AA3DY,wCAAc;AA6D3B,uGAAuG;AACvG,IAAA,qBAAgB,EAAC,EAAC,OAAO,EAAE,gCAAa,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC"}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Em = exports.EntityManager = void 0;
|
|
4
4
|
const di_1 = require("@tsed/di");
|
|
5
|
-
const
|
|
5
|
+
const MikroOrmRegistry_js_1 = require("../services/MikroOrmRegistry.js");
|
|
6
6
|
/**
|
|
7
7
|
* Get the entity manager for the given context name.
|
|
8
8
|
* @param {String} contextName
|
|
9
9
|
* @decorator
|
|
10
10
|
* @mikroOrm
|
|
11
11
|
*/
|
|
12
|
-
const EntityManager = (contextName) => (0, di_1.Inject)(
|
|
12
|
+
const EntityManager = (contextName) => (0, di_1.Inject)(MikroOrmRegistry_js_1.MikroOrmRegistry, (registry) => registry.get(contextName)?.em);
|
|
13
13
|
exports.EntityManager = EntityManager;
|
|
14
14
|
/**
|
|
15
15
|
* Get the entity manager for the given context name.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entityManager.js","sourceRoot":"","sources":["../../../src/decorators/entityManager.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAChC,
|
|
1
|
+
{"version":3,"file":"entityManager.js","sourceRoot":"","sources":["../../../src/decorators/entityManager.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAChC,yEAAiE;AAEjE;;;;;GAKG;AACI,MAAM,aAAa,GAAG,CAAC,WAAoB,EAAqB,EAAE,CACvE,IAAA,WAAM,EAAC,sCAAgB,EAAE,CAAC,QAA0B,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,EAAE,CAAsB,CAAC;AADlG,QAAA,aAAa,iBACqF;AAE/G;;;;;GAKG;AACU,QAAA,EAAE,GAAG,qBAAa,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Orm = void 0;
|
|
4
|
-
const
|
|
4
|
+
const MikroOrmRegistry_js_1 = require("../services/MikroOrmRegistry.js");
|
|
5
5
|
const di_1 = require("@tsed/di");
|
|
6
6
|
/**
|
|
7
7
|
* Get the ORM for the given context name.
|
|
8
8
|
* @param {String} contextName
|
|
9
9
|
*/
|
|
10
|
-
const Orm = (contextName) => (0, di_1.Inject)(
|
|
10
|
+
const Orm = (contextName) => (0, di_1.Inject)(MikroOrmRegistry_js_1.MikroOrmRegistry, (registry) => registry.get(contextName));
|
|
11
11
|
exports.Orm = Orm;
|
|
12
12
|
//# sourceMappingURL=orm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orm.js","sourceRoot":"","sources":["../../../src/decorators/orm.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"orm.js","sourceRoot":"","sources":["../../../src/decorators/orm.ts"],"names":[],"mappings":";;;AAAA,yEAAiE;AACjE,iCAAgC;AAEhC;;;GAGG;AACI,MAAM,GAAG,GAAG,CAAC,WAAoB,EAAqB,EAAE,CAC7D,IAAA,WAAM,EAAC,sCAAgB,EAAE,CAAC,QAA0B,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAsB,CAAC;AAD9F,QAAA,GAAG,OAC2F"}
|
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Subscriber = void 0;
|
|
4
4
|
const core_1 = require("@tsed/core");
|
|
5
5
|
const di_1 = require("@tsed/di");
|
|
6
|
-
const
|
|
6
|
+
const constants_js_1 = require("../constants.js");
|
|
7
7
|
/**
|
|
8
8
|
* Register a new subscriber for the given context name.
|
|
9
9
|
* @decorator
|
|
10
10
|
* @mikroOrm
|
|
11
11
|
*/
|
|
12
|
-
const Subscriber = (options = { contextName:
|
|
12
|
+
const Subscriber = (options = { contextName: constants_js_1.DEFAULT_CONTEXT_NAME }) => (0, core_1.useDecorators)((0, di_1.Injectable)({ type: constants_js_1.SUBSCRIBER_INJECTION_TYPE }), (0, core_1.StoreSet)(constants_js_1.SUBSCRIBER_INJECTION_TYPE, options));
|
|
13
13
|
exports.Subscriber = Subscriber;
|
|
14
14
|
//# sourceMappingURL=subscriber.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriber.js","sourceRoot":"","sources":["../../../src/decorators/subscriber.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,iCAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"subscriber.js","sourceRoot":"","sources":["../../../src/decorators/subscriber.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,iCAAoC;AACpC,kDAAgF;AAEhF;;;;GAIG;AACI,MAAM,UAAU,GAAG,CAAC,UAAiC,EAAC,WAAW,EAAE,mCAAoB,EAAC,EAAE,EAAE,CACjG,IAAA,oBAAa,EAAC,IAAA,eAAU,EAAC,EAAC,IAAI,EAAE,wCAAyB,EAAC,CAAC,EAAE,IAAA,eAAQ,EAAC,wCAAyB,EAAE,OAAO,CAAC,CAAC,CAAC;AADhG,QAAA,UAAU,cACsF"}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Transactional = void 0;
|
|
4
4
|
const di_1 = require("@tsed/di");
|
|
5
|
-
const
|
|
5
|
+
const TransactionalInterceptor_js_1 = require("../interceptors/TransactionalInterceptor.js");
|
|
6
6
|
/**
|
|
7
7
|
* Register a new request context for your method and execute it inside the context.
|
|
8
8
|
* @param {String | TransactionOptions} contextNameOrOptions
|
|
9
9
|
*/
|
|
10
|
-
const Transactional = (contextNameOrOptions) => (0, di_1.Intercept)(
|
|
10
|
+
const Transactional = (contextNameOrOptions) => (0, di_1.Intercept)(TransactionalInterceptor_js_1.TransactionalInterceptor, contextNameOrOptions);
|
|
11
11
|
exports.Transactional = Transactional;
|
|
12
12
|
//# sourceMappingURL=transactional.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactional.js","sourceRoot":"","sources":["../../../src/decorators/transactional.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,
|
|
1
|
+
{"version":3,"file":"transactional.js","sourceRoot":"","sources":["../../../src/decorators/transactional.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,6FAAyG;AAEzG;;;GAGG;AACI,MAAM,aAAa,GAAG,CAAC,oBAAkD,EAAmB,EAAE,CACnG,IAAA,cAAS,EAAC,sDAAwB,EAAE,oBAAoB,CAAC,CAAC;AAD/C,QAAA,aAAa,iBACkC"}
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @file Automatically generated by barrelsby.
|
|
4
|
-
*/
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
const tslib_1 = require("tslib");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
tslib_1.__exportStar(require("./
|
|
11
|
-
tslib_1.__exportStar(require("./decorators/
|
|
12
|
-
tslib_1.__exportStar(require("./decorators/
|
|
13
|
-
tslib_1.__exportStar(require("./
|
|
14
|
-
tslib_1.__exportStar(require("./
|
|
15
|
-
tslib_1.__exportStar(require("./
|
|
16
|
-
tslib_1.__exportStar(require("./
|
|
17
|
-
tslib_1.__exportStar(require("./interfaces/
|
|
18
|
-
tslib_1.__exportStar(require("./
|
|
19
|
-
tslib_1.__exportStar(require("./
|
|
20
|
-
tslib_1.__exportStar(require("./
|
|
4
|
+
/**
|
|
5
|
+
* @file Automatically generated by @tsed/barrels.
|
|
6
|
+
*/
|
|
7
|
+
tslib_1.__exportStar(require("./constants.js"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./decorators/entityManager.js"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./decorators/orm.js"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./decorators/subscriber.js"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./decorators/transactional.js"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./filters/OptimisticLockErrorFilter.js"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./interceptors/TransactionalInterceptor.js"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./interfaces/AfterTransactionCommit.js"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./interfaces/BeforeTransactionCommit.js"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./interfaces/RetryStrategy.js"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./MikroOrmModule.js"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./services/MikroOrmContext.js"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./services/MikroOrmFactory.js"), exports);
|
|
20
|
+
tslib_1.__exportStar(require("./services/MikroOrmRegistry.js"), exports);
|
|
21
21
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,yDAA+B;AAC/B,wEAA8C;AAC9C,8DAAoC;AACpC,qEAA2C;AAC3C,wEAA8C;AAC9C,iFAAuD;AACvD,qFAA2D;AAC3D,iFAAuD;AACvD,kFAAwD;AACxD,wEAA8C;AAC9C,8DAAoC;AACpC,wEAA8C;AAC9C,wEAA8C;AAC9C,yEAA+C"}
|
|
@@ -4,10 +4,10 @@ exports.TransactionalInterceptor = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const di_1 = require("@tsed/di");
|
|
6
6
|
const logger_1 = require("@tsed/logger");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
7
|
+
const RetryStrategy_js_1 = require("../interfaces/RetryStrategy.js");
|
|
8
|
+
const MikroOrmContext_js_1 = require("../services/MikroOrmContext.js");
|
|
9
|
+
const MikroOrmRegistry_js_1 = require("../services/MikroOrmRegistry.js");
|
|
10
|
+
const constants_js_1 = require("../constants.js");
|
|
11
11
|
let TransactionalInterceptor = class TransactionalInterceptor {
|
|
12
12
|
injector;
|
|
13
13
|
registry;
|
|
@@ -24,7 +24,7 @@ let TransactionalInterceptor = class TransactionalInterceptor {
|
|
|
24
24
|
intercept(context, next) {
|
|
25
25
|
const options = this.extractContextName(context.options);
|
|
26
26
|
if (options.retry && !this.retryStrategy) {
|
|
27
|
-
this.logger.warn(`To retry a transaction you have to implement a "${
|
|
27
|
+
this.logger.warn(`To retry a transaction you have to implement a "${RetryStrategy_js_1.RetryStrategy.description}" interface`);
|
|
28
28
|
}
|
|
29
29
|
return this.context.has(options.contextName) ? this.runWithinCtx(next, options) : this.runWithinNewCtx(next, options);
|
|
30
30
|
}
|
|
@@ -36,7 +36,7 @@ let TransactionalInterceptor = class TransactionalInterceptor {
|
|
|
36
36
|
const em = await this.getGlobalEntityManager(options.contextName);
|
|
37
37
|
return this.context.run([em], () => this.runWithinCtx(next, options));
|
|
38
38
|
}
|
|
39
|
-
getGlobalEntityManager(contextName =
|
|
39
|
+
getGlobalEntityManager(contextName = constants_js_1.DEFAULT_CONTEXT_NAME) {
|
|
40
40
|
const orm = this.registry.get(contextName);
|
|
41
41
|
if (!orm) {
|
|
42
42
|
throw new Error(`No such context: ${contextName}. Please register a corresponding MikroOrm instance using '@Configuration()' decorator.`);
|
|
@@ -49,7 +49,7 @@ let TransactionalInterceptor = class TransactionalInterceptor {
|
|
|
49
49
|
contextName: options
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
const { flushMode, isolationLevel, contextName =
|
|
52
|
+
const { flushMode, isolationLevel, contextName = constants_js_1.DEFAULT_CONTEXT_NAME, retry = false, disabled = false } = options ?? {};
|
|
53
53
|
return {
|
|
54
54
|
contextName,
|
|
55
55
|
retry,
|
|
@@ -86,7 +86,7 @@ let TransactionalInterceptor = class TransactionalInterceptor {
|
|
|
86
86
|
return this.injector.alterAsync("$afterTransactionCommit", forkedEm);
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
|
-
getEntityManager(contextName =
|
|
89
|
+
getEntityManager(contextName = constants_js_1.DEFAULT_CONTEXT_NAME) {
|
|
90
90
|
const em = this.context.get(contextName);
|
|
91
91
|
if (!em) {
|
|
92
92
|
throw new Error(`No such context: ${contextName}. Please check if the async context is lost in one of the asynchronous operations.`);
|
|
@@ -100,10 +100,10 @@ TransactionalInterceptor = tslib_1.__decorate([
|
|
|
100
100
|
tslib_1.__param(1, (0, di_1.Inject)()),
|
|
101
101
|
tslib_1.__param(2, (0, di_1.Inject)()),
|
|
102
102
|
tslib_1.__param(3, (0, di_1.Inject)()),
|
|
103
|
-
tslib_1.__param(4, (0, di_1.Inject)(
|
|
103
|
+
tslib_1.__param(4, (0, di_1.Inject)(RetryStrategy_js_1.RetryStrategy)),
|
|
104
104
|
tslib_1.__metadata("design:paramtypes", [di_1.InjectorService,
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
MikroOrmRegistry_js_1.MikroOrmRegistry,
|
|
106
|
+
MikroOrmContext_js_1.MikroOrmContext,
|
|
107
107
|
logger_1.Logger, Object])
|
|
108
108
|
], TransactionalInterceptor);
|
|
109
109
|
exports.TransactionalInterceptor = TransactionalInterceptor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionalInterceptor.js","sourceRoot":"","sources":["../../../src/interceptors/TransactionalInterceptor.ts"],"names":[],"mappings":";;;;AAAA,iCAAuH;AACvH,yCAAoC;AACpC
|
|
1
|
+
{"version":3,"file":"TransactionalInterceptor.js","sourceRoot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AC,oBAAoB,WAAW,oFAAoF,CAAC,CAAC;SACtI;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;CACF,CAAA;AA7GY,wBAAwB;IADpC,IAAA,gBAAW,GAAE;IAGT,mBAAA,IAAA,WAAM,GAAE,CAAA;IACR,mBAAA,IAAA,WAAM,GAAE,CAAA;IACR,mBAAA,IAAA,WAAM,GAAE,CAAA;IACR,mBAAA,IAAA,WAAM,GAAE,CAAA;IACR,mBAAA,IAAA,WAAM,EAAC,gCAAa,CAAC,CAAA;6CAJe,oBAAe;QACf,sCAAgB;QACjB,oCAAe;QAChB,eAAM;GALhC,wBAAwB,CA6GpC;AA7GY,4DAAwB"}
|
|
@@ -4,7 +4,7 @@ exports.MikroOrmFactory = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const core_1 = require("@mikro-orm/core");
|
|
6
6
|
const di_1 = require("@tsed/di");
|
|
7
|
-
const
|
|
7
|
+
const MikroOrmContext_js_1 = require("./MikroOrmContext.js");
|
|
8
8
|
let MikroOrmFactory = class MikroOrmFactory {
|
|
9
9
|
context;
|
|
10
10
|
constructor(context) {
|
|
@@ -20,7 +20,7 @@ let MikroOrmFactory = class MikroOrmFactory {
|
|
|
20
20
|
MikroOrmFactory = tslib_1.__decorate([
|
|
21
21
|
(0, di_1.Injectable)(),
|
|
22
22
|
tslib_1.__param(0, (0, di_1.Inject)()),
|
|
23
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
23
|
+
tslib_1.__metadata("design:paramtypes", [MikroOrmContext_js_1.MikroOrmContext])
|
|
24
24
|
], MikroOrmFactory);
|
|
25
25
|
exports.MikroOrmFactory = MikroOrmFactory;
|
|
26
26
|
//# sourceMappingURL=MikroOrmFactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MikroOrmFactory.js","sourceRoot":"","sources":["../../../src/services/MikroOrmFactory.ts"],"names":[],"mappings":";;;;AAAA,0CAAkD;AAClD,iCAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"MikroOrmFactory.js","sourceRoot":"","sources":["../../../src/services/MikroOrmFactory.ts"],"names":[],"mappings":";;;;AAAA,0CAAkD;AAClD,iCAA4C;AAC5C,6DAAqD;AAG9C,IAAM,eAAe,GAArB,MAAM,eAAe;IACa;IAAvC,YAAuC,OAAwB;QAAxB,YAAO,GAAP,OAAO,CAAiB;IAAG,CAAC;IAE5D,MAAM,CAAC,OAAgB;QAC5B,OAAO,eAAQ,CAAC,IAAI,CAAC;YACnB,GAAG,OAAO;YACV,OAAO,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;SAClD,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AATY,eAAe;IAD3B,IAAA,eAAU,GAAE;IAEE,mBAAA,IAAA,WAAM,GAAE,CAAA;6CAA2B,oCAAe;GADpD,eAAe,CAS3B;AATY,0CAAe"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MikroOrmRegistry = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const MikroOrmFactory_js_1 = require("./MikroOrmFactory.js");
|
|
6
6
|
const di_1 = require("@tsed/di");
|
|
7
7
|
const core_1 = require("@tsed/core");
|
|
8
8
|
const logger_1 = require("@tsed/logger");
|
|
@@ -51,7 +51,8 @@ MikroOrmRegistry = tslib_1.__decorate([
|
|
|
51
51
|
(0, di_1.Injectable)(),
|
|
52
52
|
tslib_1.__param(0, (0, di_1.Inject)()),
|
|
53
53
|
tslib_1.__param(1, (0, di_1.Inject)()),
|
|
54
|
-
tslib_1.__metadata("design:paramtypes", [logger_1.Logger,
|
|
54
|
+
tslib_1.__metadata("design:paramtypes", [logger_1.Logger,
|
|
55
|
+
MikroOrmFactory_js_1.MikroOrmFactory])
|
|
55
56
|
], MikroOrmRegistry);
|
|
56
57
|
exports.MikroOrmRegistry = MikroOrmRegistry;
|
|
57
58
|
//# sourceMappingURL=MikroOrmRegistry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MikroOrmRegistry.js","sourceRoot":"","sources":["../../../src/services/MikroOrmRegistry.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"MikroOrmRegistry.js","sourceRoot":"","sources":["../../../src/services/MikroOrmRegistry.ts"],"names":[],"mappings":";;;;AAAA,6DAAqD;AACrD,iCAA4C;AAE5C,qCAAqD;AACrD,yCAAoC;AAG7B,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAKE;IACA;IALZ,oBAAoB,GAAG,SAAS,CAAC;IACjC,SAAS,GAAG,IAAI,GAAG,EAAoB,CAAC;IAEzD,YAC6B,MAAc,EACd,eAAgC;QADhC,WAAM,GAAN,MAAM,CAAQ;QACd,oBAAe,GAAf,eAAe,CAAiB;IAC1D,CAAC;IAEG,KAAK,CAAC,QAAQ,CAA2B,OAAmB;QACjE,MAAM,WAAW,GAAG,IAAA,eAAQ,EAAS,OAAO,EAAE,aAAa,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAExF,IAAI,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;YACzB,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,CAAE,CAAC;SAC/B;QAED,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iDAAiD,EAAE,WAAW,CAAC,CAAC;QACjF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAE1C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAE5D,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAE1C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,yCAAyC,EAAE,WAAW,CAAC,CA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AC,IAAqC;QACzD,MAAM,SAAS,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9C,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAEhD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;CACF,CAAA;AA1DC;IAAC,QAAQ,CAAC,UAAU,EAAE,EAAE,CAAC;;gDACa;AAEtC;IAAC,MAAM,EAAE;8BACmB,gBAAgB;gDAAC;AAE7C;IAAC,MAAM,EAAE;8BACkB,eAAe;+CAAC;AAE3C;IAAC,MAAM,EAAE;8BACmB,eAAe;gDAAC;AAXjC,cAAc;IAH1B,MAAM,CAAC;QACN,eAAe,EAAE,CAAC,yBAAyB,CAAC;KAC7C,CAAC;IAca,WAAA,MAAM,CAAC,yBAAyB,CAAC,CAAA;;GAbnC,cAAc,CA2D1B;SA3DY,cAAc;AA6D3B,uGAAuG;AACvG,gBAAgB,CAAC,EAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entityManager.js","sourceRoot":"","sources":["../../../src/decorators/entityManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,gBAAgB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"entityManager.js","sourceRoot":"","sources":["../../../src/decorators/entityManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,WAAoB,EAAqB,EAAE,CACvE,MAAM,CAAC,gBAAgB,EAAE,CAAC,QAA0B,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,EAAE,CAAsB,CAAC;AAE/G;;;;;GAKG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orm.js","sourceRoot":"","sources":["../../../src/decorators/orm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"orm.js","sourceRoot":"","sources":["../../../src/decorators/orm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAEhC;;;GAGG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,WAAoB,EAAqB,EAAE,CAC7D,MAAM,CAAC,gBAAgB,EAAE,CAAC,QAA0B,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriber.js","sourceRoot":"","sources":["../../../src/decorators/subscriber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACpC,OAAO,EAAC,oBAAoB,EAAE,yBAAyB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"subscriber.js","sourceRoot":"","sources":["../../../src/decorators/subscriber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACpC,OAAO,EAAC,oBAAoB,EAAE,yBAAyB,EAAC,MAAM,iBAAiB,CAAC;AAEhF;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,UAAiC,EAAC,WAAW,EAAE,oBAAoB,EAAC,EAAE,EAAE,CACjG,aAAa,CAAC,UAAU,CAAC,EAAC,IAAI,EAAE,yBAAyB,EAAC,CAAC,EAAE,QAAQ,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactional.js","sourceRoot":"","sources":["../../../src/decorators/transactional.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AACnC,OAAO,EAAC,wBAAwB,EAAqB,MAAM,
|
|
1
|
+
{"version":3,"file":"transactional.js","sourceRoot":"","sources":["../../../src/decorators/transactional.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AACnC,OAAO,EAAC,wBAAwB,EAAqB,MAAM,6CAA6C,CAAC;AAEzG;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,oBAAkD,EAAmB,EAAE,CACnG,SAAS,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,CAAC"}
|
package/lib/esm/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file Automatically generated by
|
|
2
|
+
* @file Automatically generated by @tsed/barrels.
|
|
3
3
|
*/
|
|
4
|
-
export * from "./MikroOrmModule.js";
|
|
5
4
|
export * from "./constants.js";
|
|
6
5
|
export * from "./decorators/entityManager.js";
|
|
7
6
|
export * from "./decorators/orm.js";
|
|
@@ -12,6 +11,7 @@ export * from "./interceptors/TransactionalInterceptor.js";
|
|
|
12
11
|
export * from "./interfaces/AfterTransactionCommit.js";
|
|
13
12
|
export * from "./interfaces/BeforeTransactionCommit.js";
|
|
14
13
|
export * from "./interfaces/RetryStrategy.js";
|
|
14
|
+
export * from "./MikroOrmModule.js";
|
|
15
15
|
export * from "./services/MikroOrmContext.js";
|
|
16
16
|
export * from "./services/MikroOrmFactory.js";
|
|
17
17
|
export * from "./services/MikroOrmRegistry.js";
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionalInterceptor.js","sourceRoot":"","sources":["../../../src/interceptors/TransactionalInterceptor.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAE,eAAe,EAAE,WAAW,EAA0D,MAAM,UAAU,CAAC;AACvH,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AACpC,OAAO,EAAC,aAAa,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"TransactionalInterceptor.js","sourceRoot":"","sources":["../../../src/interceptors/TransactionalInterceptor.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAE,eAAe,EAAE,WAAW,EAA0D,MAAM,UAAU,CAAC;AACvH,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AACpC,OAAO,EAAC,aAAa,EAAC,MAAM,gCAA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P,MAAM,IAAI,KAAK,CAAC,oBAAoB,WAAW,oFAAoF,CAAC,CAAC;SACtI;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;CACF,CAAA;AA7GY,wBAAwB;IADpC,WAAW,EAAE;IAGT,WAAA,MAAM,EAAE,CAAA;IACR,WAAA,MAAM,EAAE,CAAA;IACR,WAAA,MAAM,EAAE,CAAA;IACR,WAAA,MAAM,EAAE,CAAA;IACR,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;qCAJe,eAAe;QACf,gBAAgB;QACjB,eAAe;QAChB,MAAM;GALhC,wBAAwB,CA6GpC;SA7GY,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MikroOrmFactory.js","sourceRoot":"","sources":["../../../src/services/MikroOrmFactory.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,QAAQ,EAAU,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAC,eAAe,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"MikroOrmFactory.js","sourceRoot":"","sources":["../../../src/services/MikroOrmFactory.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,QAAQ,EAAU,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAG9C,IAAM,eAAe,GAArB,MAAM,eAAe;IACa;IAAvC,YAAuC,OAAwB;QAAxB,YAAO,GAAP,OAAO,CAAiB;IAAG,CAAC;IAE5D,MAAM,CAAC,OAAgB;QAC5B,OAAO,QAAQ,CAAC,IAAI,CAAC;YACnB,GAAG,OAAO;YACV,OAAO,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;SAClD,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AATY,eAAe;IAD3B,UAAU,EAAE;IAEE,WAAA,MAAM,EAAE,CAAA;qCAA2B,eAAe;GADpD,eAAe,CAS3B;SATY,eAAe"}
|
|
@@ -48,7 +48,8 @@ MikroOrmRegistry = __decorate([
|
|
|
48
48
|
Injectable(),
|
|
49
49
|
__param(0, Inject()),
|
|
50
50
|
__param(1, Inject()),
|
|
51
|
-
__metadata("design:paramtypes", [Logger,
|
|
51
|
+
__metadata("design:paramtypes", [Logger,
|
|
52
|
+
MikroOrmFactory])
|
|
52
53
|
], MikroOrmRegistry);
|
|
53
54
|
export { MikroOrmRegistry };
|
|
54
55
|
//# sourceMappingURL=MikroOrmRegistry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MikroOrmRegistry.js","sourceRoot":"","sources":["../../../src/services/MikroOrmRegistry.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"MikroOrmRegistry.js","sourceRoot":"","sources":["../../../src/services/MikroOrmRegistry.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AACrD,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAG7B,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAKE;IACA;IALZ,oBAAoB,GAAG,SAAS,CAAC;IACjC,SAAS,GAAG,IAAI,GAAG,EAAoB,CAAC;IAEzD,YAC6B,MAAc,EACd,eAAgC;QADhC,WAAM,GAAN,MAAM,CAAQ;QACd,oBAAe,GAAf,eAAe,CAAiB;IAC1D,CAAC;IAEG,KAAK,CAAC,QAAQ,CAA2B,OAAmB;QACjE,MAAM,WAAW,GAAG,QAAQ,CAAS,OAAO,EAAE,aAA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,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;IAEO,KAAK,CAAC,OAAO,CAAC,QAAkB;QACtC,IAAI,MAAM,QAAQ,CAAC,WAAW,EAAE,EAAE;YAChC,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC7B;IACH,CAAC;CACF,CAAA;AArDY,gBAAgB;IAD5B,UAAU,EAAE;IAMR,WAAA,MAAM,EAAE,CAAA;IACR,WAAA,MAAM,EAAE,CAAA;qCAD0B,MAAM;QACG,eAAe;GANlD,gBAAgB,CAqD5B;SArDY,gBAAgB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransactionOptions } from "../interceptors/TransactionalInterceptor";
|
|
1
|
+
import { TransactionOptions } from "../interceptors/TransactionalInterceptor.js";
|
|
2
2
|
/**
|
|
3
3
|
* Register a new request context for your method and execute it inside the context.
|
|
4
4
|
* @param {String | TransactionOptions} contextNameOrOptions
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file Automatically generated by
|
|
2
|
+
* @file Automatically generated by @tsed/barrels.
|
|
3
3
|
*/
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./decorators/
|
|
7
|
-
export * from "./decorators/
|
|
8
|
-
export * from "./decorators/
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
11
|
-
export * from "./
|
|
12
|
-
export * from "./interfaces/
|
|
13
|
-
export * from "./interfaces/
|
|
14
|
-
export * from "./
|
|
15
|
-
export * from "./services/MikroOrmContext";
|
|
16
|
-
export * from "./services/MikroOrmFactory";
|
|
17
|
-
export * from "./services/MikroOrmRegistry";
|
|
4
|
+
export * from "./constants.js";
|
|
5
|
+
export * from "./decorators/entityManager.js";
|
|
6
|
+
export * from "./decorators/orm.js";
|
|
7
|
+
export * from "./decorators/subscriber.js";
|
|
8
|
+
export * from "./decorators/transactional.js";
|
|
9
|
+
export * from "./filters/OptimisticLockErrorFilter.js";
|
|
10
|
+
export * from "./interceptors/TransactionalInterceptor.js";
|
|
11
|
+
export * from "./interfaces/AfterTransactionCommit.js";
|
|
12
|
+
export * from "./interfaces/BeforeTransactionCommit.js";
|
|
13
|
+
export * from "./interfaces/RetryStrategy.js";
|
|
14
|
+
export * from "./MikroOrmModule.js";
|
|
15
|
+
export * from "./services/MikroOrmContext.js";
|
|
16
|
+
export * from "./services/MikroOrmFactory.js";
|
|
17
|
+
export * from "./services/MikroOrmRegistry.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InjectorService, InterceptorContext, InterceptorMethods, InterceptorNext } from "@tsed/di";
|
|
2
2
|
import { Logger } from "@tsed/logger";
|
|
3
|
-
import { RetryStrategy } from "../interfaces/RetryStrategy";
|
|
4
|
-
import { MikroOrmContext } from "../services/MikroOrmContext";
|
|
5
|
-
import { MikroOrmRegistry } from "../services/MikroOrmRegistry";
|
|
3
|
+
import { RetryStrategy } from "../interfaces/RetryStrategy.js";
|
|
4
|
+
import { MikroOrmContext } from "../services/MikroOrmContext.js";
|
|
5
|
+
import { MikroOrmRegistry } from "../services/MikroOrmRegistry.js";
|
|
6
6
|
import { FlushMode, IsolationLevel } from "@mikro-orm/core";
|
|
7
7
|
export interface TransactionOptions {
|
|
8
8
|
retry?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MikroORM, Options } from "@mikro-orm/core";
|
|
2
|
-
import { MikroOrmContext } from "./MikroOrmContext";
|
|
2
|
+
import { MikroOrmContext } from "./MikroOrmContext.js";
|
|
3
3
|
export declare class MikroOrmFactory {
|
|
4
4
|
private readonly context;
|
|
5
5
|
constructor(context: MikroOrmContext);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MikroOrmFactory } from "./MikroOrmFactory";
|
|
1
|
+
import { MikroOrmFactory } from "./MikroOrmFactory.js";
|
|
2
2
|
import { IDatabaseDriver as DatabaseDriver, MikroORM, Options } from "@mikro-orm/core";
|
|
3
3
|
import { Logger } from "@tsed/logger";
|
|
4
4
|
export declare class MikroOrmRegistry {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/mikro-orm",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.71.1",
|
|
4
4
|
"description": "MikroORM package for Ts.ED framework",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/cjs/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "yarn barrels && yarn build:ts",
|
|
17
|
-
"barrels": "
|
|
17
|
+
"barrels": "barrels",
|
|
18
18
|
"test": "jest",
|
|
19
19
|
"build:ts": "tsc --build tsconfig.json && tsc --build tsconfig.esm.json"
|
|
20
20
|
},
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@mikro-orm/core": "6.2.2",
|
|
26
26
|
"@mikro-orm/mongodb": "6.2.2",
|
|
27
|
-
"@tsed/
|
|
28
|
-
"@tsed/
|
|
29
|
-
"@tsed/
|
|
30
|
-
"@tsed/
|
|
27
|
+
"@tsed/barrels": "7.71.1",
|
|
28
|
+
"@tsed/common": "7.71.1",
|
|
29
|
+
"@tsed/core": "7.71.1",
|
|
30
|
+
"@tsed/di": "7.71.1",
|
|
31
|
+
"@tsed/json-mapper": "7.71.1",
|
|
31
32
|
"@tsed/logger": ">=6.7.5",
|
|
32
|
-
"@tsed/schema": "7.
|
|
33
|
-
"@tsed/testing-mongoose": "7.
|
|
34
|
-
"@tsed/typescript": "7.
|
|
35
|
-
"barrelsby": "^2.8.1",
|
|
33
|
+
"@tsed/schema": "7.71.1",
|
|
34
|
+
"@tsed/testing-mongoose": "7.71.1",
|
|
35
|
+
"@tsed/typescript": "7.71.1",
|
|
36
36
|
"cross-env": "7.0.3",
|
|
37
37
|
"eslint": "^8.57.0",
|
|
38
38
|
"jest": "^29.7.0",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@mikro-orm/core": ">=4.5.9",
|
|
43
|
-
"@tsed/common": "7.
|
|
44
|
-
"@tsed/core": "7.
|
|
45
|
-
"@tsed/di": "7.
|
|
43
|
+
"@tsed/common": "7.71.1",
|
|
44
|
+
"@tsed/core": "7.71.1",
|
|
45
|
+
"@tsed/di": "7.71.1",
|
|
46
46
|
"@tsed/logger": ">=6.7.5"
|
|
47
47
|
},
|
|
48
48
|
"repository": "https://github.com/tsedio/tsed",
|