@tsed/mikro-orm 8.33.0 → 8.35.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/lib/esm/MikroOrmModule.js +3 -3
- package/lib/esm/decorators/subscriber.js +1 -1
- package/lib/esm/decorators/transactional.js +1 -1
- package/lib/esm/filters/OptimisticLockErrorFilter.js +1 -1
- package/lib/esm/interceptors/TransactionalInterceptor.js +2 -2
- package/lib/esm/services/MikroOrmContext.js +1 -1
- package/lib/esm/services/MikroOrmFactory.js +1 -1
- package/lib/esm/services/MikroOrmRegistry.js +1 -1
- package/lib/types/MikroOrmModule.d.ts +1 -1
- package/lib/types/filters/OptimisticLockErrorFilter.d.ts +1 -1
- package/lib/types/interceptors/TransactionalInterceptor.d.ts +1 -1
- package/package.json +10 -11
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
2
|
import "./services/MikroOrmFactory.js";
|
|
3
|
-
import { classOf, isFunction, Store } from "@tsed/core";
|
|
4
3
|
import { Constant, Inject, InjectorService, LocalsContainer, Module, registerProvider } from "@tsed/di";
|
|
5
4
|
import { DEFAULT_CONTEXT_NAME, SUBSCRIBER_INJECTION_TYPE } from "./constants.js";
|
|
6
|
-
import {
|
|
7
|
-
import { RetryStrategy } from "./interfaces/RetryStrategy.js";
|
|
5
|
+
import { Store, classOf, isFunction } from "@tsed/core";
|
|
8
6
|
import { MikroOrmContext } from "./services/MikroOrmContext.js";
|
|
9
7
|
import { MikroOrmRegistry } from "./services/MikroOrmRegistry.js";
|
|
8
|
+
import { OptimisticLockErrorFilter } from "./filters/OptimisticLockErrorFilter.js";
|
|
9
|
+
import { RetryStrategy } from "./interfaces/RetryStrategy.js";
|
|
10
10
|
let MikroOrmModule = class MikroOrmModule {
|
|
11
11
|
constructor(subscribers) {
|
|
12
12
|
this.subscribers = subscribers;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { DEFAULT_CONTEXT_NAME, SUBSCRIBER_INJECTION_TYPE } from "../constants.js";
|
|
1
2
|
import { StoreSet, useDecorators } from "@tsed/core";
|
|
2
3
|
import { Injectable } from "@tsed/di";
|
|
3
|
-
import { DEFAULT_CONTEXT_NAME, SUBSCRIBER_INJECTION_TYPE } from "../constants.js";
|
|
4
4
|
/**
|
|
5
5
|
* Register a new subscriber for the given context name.
|
|
6
6
|
* @decorator
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Intercept } from "@tsed/di";
|
|
2
1
|
import { TransactionalInterceptor } from "../interceptors/TransactionalInterceptor.js";
|
|
2
|
+
import { Intercept } from "@tsed/di";
|
|
3
3
|
/**
|
|
4
4
|
* Register a new request context for your method and execute it inside the context.
|
|
5
5
|
* @param {String | TransactionOptions} contextNameOrOptions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { OptimisticLockError } from "@mikro-orm/core";
|
|
3
2
|
import { Catch } from "@tsed/platform-exceptions";
|
|
3
|
+
import { OptimisticLockError } from "@mikro-orm/core";
|
|
4
4
|
let OptimisticLockErrorFilter = class OptimisticLockErrorFilter {
|
|
5
5
|
catch(exception, ctx) {
|
|
6
6
|
const { response, logger } = ctx;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
2
|
import { Inject, InjectorService, Interceptor } from "@tsed/di";
|
|
3
|
-
import { Logger } from "@tsed/logger";
|
|
4
3
|
import { DEFAULT_CONTEXT_NAME } from "../constants.js";
|
|
5
|
-
import {
|
|
4
|
+
import { Logger } from "@tsed/logger";
|
|
6
5
|
import { MikroOrmContext } from "../services/MikroOrmContext.js";
|
|
7
6
|
import { MikroOrmRegistry } from "../services/MikroOrmRegistry.js";
|
|
7
|
+
import { RetryStrategy } from "../interfaces/RetryStrategy.js";
|
|
8
8
|
let TransactionalInterceptor = class TransactionalInterceptor {
|
|
9
9
|
constructor(injector, registry, context, logger, retryStrategy) {
|
|
10
10
|
this.injector = injector;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
-
import { MikroORM } from "@mikro-orm/core";
|
|
3
2
|
import { Inject, Injectable } from "@tsed/di";
|
|
3
|
+
import { MikroORM } from "@mikro-orm/core";
|
|
4
4
|
import { MikroOrmContext } from "./MikroOrmContext.js";
|
|
5
5
|
let MikroOrmFactory = class MikroOrmFactory {
|
|
6
6
|
constructor(context) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
-
import { catchAsyncError, getValue } from "@tsed/core";
|
|
3
2
|
import { Inject, Injectable } from "@tsed/di";
|
|
3
|
+
import { catchAsyncError, getValue } from "@tsed/core";
|
|
4
4
|
import { Logger } from "@tsed/logger";
|
|
5
5
|
import { MikroOrmFactory } from "./MikroOrmFactory.js";
|
|
6
6
|
let MikroOrmRegistry = class MikroOrmRegistry {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./services/MikroOrmFactory.js";
|
|
2
|
-
import { EventSubscriber, Options } from "@mikro-orm/core";
|
|
3
2
|
import { AlterRunInContext, OnDestroy, OnInit } from "@tsed/di";
|
|
3
|
+
import { EventSubscriber, Options } from "@mikro-orm/core";
|
|
4
4
|
declare global {
|
|
5
5
|
namespace TsED {
|
|
6
6
|
interface Configuration {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OptimisticLockError } from "@mikro-orm/core";
|
|
2
1
|
import { type ExceptionFilterMethods } from "@tsed/platform-exceptions";
|
|
2
|
+
import { OptimisticLockError } from "@mikro-orm/core";
|
|
3
3
|
import { PlatformContext } from "@tsed/platform-http";
|
|
4
4
|
export declare class OptimisticLockErrorFilter implements ExceptionFilterMethods<OptimisticLockError> {
|
|
5
5
|
catch(exception: OptimisticLockError, ctx: PlatformContext): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FlushMode, IsolationLevel } from "@mikro-orm/core";
|
|
2
2
|
import { InjectorService, InterceptorContext, InterceptorMethods, InterceptorNext } from "@tsed/di";
|
|
3
3
|
import { Logger } from "@tsed/logger";
|
|
4
|
-
import { RetryStrategy } from "../interfaces/RetryStrategy.js";
|
|
5
4
|
import { MikroOrmContext } from "../services/MikroOrmContext.js";
|
|
6
5
|
import { MikroOrmRegistry } from "../services/MikroOrmRegistry.js";
|
|
6
|
+
import { RetryStrategy } from "../interfaces/RetryStrategy.js";
|
|
7
7
|
export interface TransactionOptions {
|
|
8
8
|
retry?: boolean;
|
|
9
9
|
disabled?: boolean;
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/mikro-orm",
|
|
3
|
+
"version": "8.35.0",
|
|
3
4
|
"description": "MikroORM package for Ts.ED framework",
|
|
4
|
-
"type": "module",
|
|
5
|
-
"version": "8.33.0",
|
|
6
5
|
"source": "./src/index.ts",
|
|
6
|
+
"type": "module",
|
|
7
7
|
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
9
9
|
"typings": "./lib/types/index.d.ts",
|
|
@@ -28,17 +28,16 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@mikro-orm/core": "6.3.12",
|
|
30
30
|
"@mikro-orm/mongodb": "6.3.12",
|
|
31
|
-
"@tsed/barrels": "8.
|
|
32
|
-
"@tsed/core": "8.
|
|
33
|
-
"@tsed/di": "8.
|
|
34
|
-
"@tsed/json-mapper": "8.
|
|
31
|
+
"@tsed/barrels": "8.35.0",
|
|
32
|
+
"@tsed/core": "8.35.0",
|
|
33
|
+
"@tsed/di": "8.35.0",
|
|
34
|
+
"@tsed/json-mapper": "8.35.0",
|
|
35
35
|
"@tsed/logger": "^8.0.0",
|
|
36
|
-
"@tsed/platform-http": "8.
|
|
37
|
-
"@tsed/schema": "8.
|
|
38
|
-
"@tsed/testcontainers-mongo": "8.
|
|
39
|
-
"@tsed/typescript": "8.
|
|
36
|
+
"@tsed/platform-http": "8.35.0",
|
|
37
|
+
"@tsed/schema": "8.35.0",
|
|
38
|
+
"@tsed/testcontainers-mongo": "8.35.0",
|
|
39
|
+
"@tsed/typescript": "8.35.0",
|
|
40
40
|
"cross-env": "7.0.3",
|
|
41
|
-
"eslint": "9.12.0",
|
|
42
41
|
"ts-mockito": "^2.6.1",
|
|
43
42
|
"typescript": "6.0.2",
|
|
44
43
|
"vitest": "4.1.4"
|