@nest-boot/mikro-orm 7.6.1 → 8.0.0-beta.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/dist/index.d.ts +7 -7
- package/dist/index.js +7 -25
- package/dist/index.js.map +1 -1
- package/dist/interfaces/id-entity.interface.js +1 -2
- package/dist/interfaces/index.d.ts +2 -2
- package/dist/interfaces/index.js +2 -18
- package/dist/interfaces/index.js.map +1 -1
- package/dist/interfaces/mikro-orm-module-options.interface.js +1 -2
- package/dist/mikro-orm.module-definition.d.ts +1 -1
- package/dist/mikro-orm.module-definition.js +4 -8
- package/dist/mikro-orm.module-definition.js.map +1 -1
- package/dist/mikro-orm.module.d.ts +1 -1
- package/dist/mikro-orm.module.js +28 -30
- package/dist/mikro-orm.module.js.map +1 -1
- package/dist/property-types/index.d.ts +1 -1
- package/dist/property-types/index.js +1 -17
- package/dist/property-types/index.js.map +1 -1
- package/dist/property-types/vector.type.js +3 -6
- package/dist/property-types/vector.type.js.map +1 -1
- package/dist/services/entity.service.d.ts +4 -5
- package/dist/services/entity.service.js +111 -119
- package/dist/services/entity.service.js.map +1 -1
- package/dist/types/chunk-by-id-options.type.js +1 -2
- package/dist/types/id-or-entity.type.d.ts +1 -1
- package/dist/types/id-or-entity.type.js +1 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +2 -18
- package/dist/types/index.js.map +1 -1
- package/dist/utils/load-config-from-env.util.d.ts +1 -1
- package/dist/utils/load-config-from-env.util.js +7 -43
- package/dist/utils/load-config-from-env.util.js.map +1 -1
- package/package.json +32 -32
- package/dist/property-types/vector.type.spec.d.ts +0 -1
- package/dist/property-types/vector.type.spec.js +0 -34
- package/dist/property-types/vector.type.spec.js.map +0 -1
- package/dist/services/entity.service.spec.d.ts +0 -1
- package/dist/services/entity.service.spec.js +0 -212
- package/dist/services/entity.service.spec.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/utils/load-config-from-env.util.spec.d.ts +0 -1
- package/dist/utils/load-config-from-env.util.spec.js +0 -75
- package/dist/utils/load-config-from-env.util.spec.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export type { MikroOrmModuleOptions } from "./interfaces";
|
|
2
|
-
export * from "./interfaces";
|
|
3
|
-
export { MikroOrmModule } from "./mikro-orm.module";
|
|
4
|
-
export * from "./property-types";
|
|
5
|
-
export * from "./services/entity.service";
|
|
6
|
-
export * from "./types";
|
|
7
|
-
export * from "./utils/load-config-from-env.util";
|
|
1
|
+
export type { MikroOrmModuleOptions } from "./interfaces/index.js";
|
|
2
|
+
export * from "./interfaces/index.js";
|
|
3
|
+
export { MikroOrmModule } from "./mikro-orm.module.js";
|
|
4
|
+
export * from "./property-types/index.js";
|
|
5
|
+
export * from "./services/entity.service.js";
|
|
6
|
+
export * from "./types/index.js";
|
|
7
|
+
export * from "./utils/load-config-from-env.util.js";
|
|
8
8
|
export * from "@mikro-orm/nestjs";
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.MikroOrmModule = void 0;
|
|
18
|
-
__exportStar(require("./interfaces"), exports);
|
|
19
|
-
var mikro_orm_module_1 = require("./mikro-orm.module");
|
|
20
|
-
Object.defineProperty(exports, "MikroOrmModule", { enumerable: true, get: function () { return mikro_orm_module_1.MikroOrmModule; } });
|
|
21
|
-
__exportStar(require("./property-types"), exports);
|
|
22
|
-
__exportStar(require("./services/entity.service"), exports);
|
|
23
|
-
__exportStar(require("./types"), exports);
|
|
24
|
-
__exportStar(require("./utils/load-config-from-env.util"), exports);
|
|
25
|
-
__exportStar(require("@mikro-orm/nestjs"), exports);
|
|
1
|
+
export * from "./interfaces/index.js";
|
|
2
|
+
export { MikroOrmModule } from "./mikro-orm.module.js";
|
|
3
|
+
export * from "./property-types/index.js";
|
|
4
|
+
export * from "./services/entity.service.js";
|
|
5
|
+
export * from "./types/index.js";
|
|
6
|
+
export * from "./utils/load-config-from-env.util.js";
|
|
7
|
+
export * from "@mikro-orm/nestjs";
|
|
26
8
|
//# sourceMappingURL=index.js.map
|
package/dist/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":"AACA,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,sCAAsC,CAAC;AACrD,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./id-entity.interface";
|
|
2
|
-
export * from "./mikro-orm-module-options.interface";
|
|
1
|
+
export * from "./id-entity.interface.js";
|
|
2
|
+
export * from "./mikro-orm-module-options.interface.js";
|
package/dist/interfaces/index.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./id-entity.interface"), exports);
|
|
18
|
-
__exportStar(require("./mikro-orm-module-options.interface"), exports);
|
|
1
|
+
export * from "./id-entity.interface.js";
|
|
2
|
+
export * from "./mikro-orm-module-options.interface.js";
|
|
19
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,yCAAyC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MikroOrmModuleOptions } from "./interfaces/mikro-orm-module-options.interface";
|
|
1
|
+
import { MikroOrmModuleOptions } from "./interfaces/mikro-orm-module-options.interface.js";
|
|
2
2
|
export declare const MODULE_OPTIONS_TOKEN: unique symbol;
|
|
3
3
|
export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<MikroOrmModuleOptions, "forRoot", "create", {}>, BASE_MODULE_OPTIONS_TOKEN: string | symbol, OPTIONS_TYPE: MikroOrmModuleOptions & Partial<{}>, ASYNC_OPTIONS_TYPE: import("@nestjs/common").ConfigurableModuleAsyncOptions<MikroOrmModuleOptions, "create"> & Partial<{}>;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.ASYNC_OPTIONS_TYPE = exports.OPTIONS_TYPE = exports.BASE_MODULE_OPTIONS_TOKEN = exports.ConfigurableModuleClass = exports.MODULE_OPTIONS_TOKEN = void 0;
|
|
5
|
-
const common_1 = require("@nestjs/common");
|
|
6
|
-
exports.MODULE_OPTIONS_TOKEN = Symbol("MikroOrmModuleOptions");
|
|
7
|
-
_a = new common_1.ConfigurableModuleBuilder()
|
|
1
|
+
import { ConfigurableModuleBuilder } from "@nestjs/common";
|
|
2
|
+
export const MODULE_OPTIONS_TOKEN = Symbol("MikroOrmModuleOptions");
|
|
3
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN: BASE_MODULE_OPTIONS_TOKEN, OPTIONS_TYPE, ASYNC_OPTIONS_TYPE, } = new ConfigurableModuleBuilder()
|
|
8
4
|
.setClassMethodName("forRoot")
|
|
9
|
-
.build()
|
|
5
|
+
.build();
|
|
10
6
|
//# sourceMappingURL=mikro-orm.module-definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mikro-orm.module-definition.js","sourceRoot":"","sources":["../src/mikro-orm.module-definition.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mikro-orm.module-definition.js","sourceRoot":"","sources":["../src/mikro-orm.module-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAI3D,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC;AAEpE,MAAM,CAAC,MAAM,EACX,uBAAuB,EACvB,oBAAoB,EAAE,yBAAyB,EAC/C,YAAY,EACZ,kBAAkB,GACnB,GAAG,IAAI,yBAAyB,EAAyB;KACvD,kBAAkB,CAAC,SAAS,CAAC;KAC7B,KAAK,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MikroORM } from "@mikro-orm/core";
|
|
2
2
|
import { MikroOrmModule as BaseMikroOrmModule } from "@mikro-orm/nestjs";
|
|
3
3
|
import { type DynamicModule, OnModuleInit } from "@nestjs/common";
|
|
4
|
-
import { ASYNC_OPTIONS_TYPE, ConfigurableModuleClass, OPTIONS_TYPE } from "./mikro-orm.module-definition";
|
|
4
|
+
import { ASYNC_OPTIONS_TYPE, ConfigurableModuleClass, OPTIONS_TYPE } from "./mikro-orm.module-definition.js";
|
|
5
5
|
/**
|
|
6
6
|
* MikroORM integration module with request-scoped entity manager.
|
|
7
7
|
*
|
package/dist/mikro-orm.module.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,14 +7,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const mikro_orm_module_definition_1 = require("./mikro-orm.module-definition");
|
|
18
|
-
const load_config_from_env_util_1 = require("./utils/load-config-from-env.util");
|
|
10
|
+
import { EntityManager, MikroORM } from "@mikro-orm/core";
|
|
11
|
+
import { MikroOrmModule as BaseMikroOrmModule } from "@mikro-orm/nestjs";
|
|
12
|
+
import { RequestContext, RequestContextModule, } from "@nest-boot/request-context";
|
|
13
|
+
import { Global, Logger, Module, } from "@nestjs/common";
|
|
14
|
+
import { BASE_MODULE_OPTIONS_TOKEN, ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, } from "./mikro-orm.module-definition.js";
|
|
15
|
+
import { loadConfigFromEnv } from "./utils/load-config-from-env.util.js";
|
|
19
16
|
/**
|
|
20
17
|
* MikroORM integration module with request-scoped entity manager.
|
|
21
18
|
*
|
|
@@ -23,7 +20,8 @@ const load_config_from_env_util_1 = require("./utils/load-config-from-env.util")
|
|
|
23
20
|
* Wraps `@mikro-orm/nestjs` with automatic environment-based configuration
|
|
24
21
|
* and request context integration for per-request entity manager forking.
|
|
25
22
|
*/
|
|
26
|
-
let MikroOrmModule = class MikroOrmModule extends
|
|
23
|
+
let MikroOrmModule = class MikroOrmModule extends ConfigurableModuleClass {
|
|
24
|
+
orm;
|
|
27
25
|
/**
|
|
28
26
|
* Registers the MikroOrmModule with the given options.
|
|
29
27
|
* @param options - MikroORM configuration options
|
|
@@ -53,7 +51,7 @@ let MikroOrmModule = class MikroOrmModule extends mikro_orm_module_definition_1.
|
|
|
53
51
|
* @returns Dynamic module configuration
|
|
54
52
|
*/
|
|
55
53
|
static forFeature(...args) {
|
|
56
|
-
return
|
|
54
|
+
return BaseMikroOrmModule.forFeature(...args);
|
|
57
55
|
}
|
|
58
56
|
/**
|
|
59
57
|
* Registers MikroORM middleware for the module.
|
|
@@ -61,7 +59,7 @@ let MikroOrmModule = class MikroOrmModule extends mikro_orm_module_definition_1.
|
|
|
61
59
|
* @returns Dynamic module configuration
|
|
62
60
|
*/
|
|
63
61
|
static forMiddleware(...args) {
|
|
64
|
-
return
|
|
62
|
+
return BaseMikroOrmModule.forMiddleware(...args);
|
|
65
63
|
}
|
|
66
64
|
/**
|
|
67
65
|
* Clears the MikroORM metadata storage.
|
|
@@ -69,37 +67,36 @@ let MikroOrmModule = class MikroOrmModule extends mikro_orm_module_definition_1.
|
|
|
69
67
|
*/
|
|
70
68
|
static clearStorage(...args) {
|
|
71
69
|
// eslint-disable-next-line @typescript-eslint/no-confusing-void-expression
|
|
72
|
-
return
|
|
70
|
+
return BaseMikroOrmModule.clearStorage(...args);
|
|
73
71
|
}
|
|
74
72
|
/** Registers the MikroORM entity manager fork middleware in the request context. */
|
|
75
73
|
onModuleInit() {
|
|
76
|
-
|
|
77
|
-
ctx.set(
|
|
74
|
+
RequestContext.registerMiddleware("mikro-orm", (ctx, next) => {
|
|
75
|
+
ctx.set(EntityManager, this.orm.em.fork({ useContext: true }));
|
|
78
76
|
return next();
|
|
79
77
|
});
|
|
80
78
|
}
|
|
81
79
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
(
|
|
85
|
-
(0, common_1.Module)({
|
|
80
|
+
MikroOrmModule = __decorate([
|
|
81
|
+
Global(),
|
|
82
|
+
Module({
|
|
86
83
|
imports: [
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
inject: [
|
|
84
|
+
RequestContextModule,
|
|
85
|
+
BaseMikroOrmModule.forRootAsync({
|
|
86
|
+
inject: [MODULE_OPTIONS_TOKEN],
|
|
90
87
|
useFactory: async (options) => {
|
|
91
|
-
const logger = new
|
|
88
|
+
const logger = new Logger("MikroORM");
|
|
92
89
|
return {
|
|
93
90
|
registerRequestContext: false,
|
|
94
91
|
context: () => {
|
|
95
|
-
if (
|
|
96
|
-
return
|
|
92
|
+
if (RequestContext.isActive()) {
|
|
93
|
+
return RequestContext.get(EntityManager);
|
|
97
94
|
}
|
|
98
95
|
},
|
|
99
96
|
logger: (msg) => {
|
|
100
97
|
logger.log(msg);
|
|
101
98
|
},
|
|
102
|
-
...(await
|
|
99
|
+
...(await loadConfigFromEnv()),
|
|
103
100
|
...options,
|
|
104
101
|
};
|
|
105
102
|
},
|
|
@@ -107,13 +104,14 @@ exports.MikroOrmModule = MikroOrmModule = __decorate([
|
|
|
107
104
|
],
|
|
108
105
|
providers: [
|
|
109
106
|
{
|
|
110
|
-
provide:
|
|
111
|
-
inject: [{ token:
|
|
107
|
+
provide: MODULE_OPTIONS_TOKEN,
|
|
108
|
+
inject: [{ token: BASE_MODULE_OPTIONS_TOKEN, optional: true }],
|
|
112
109
|
useFactory: (options) => options ?? {},
|
|
113
110
|
},
|
|
114
111
|
],
|
|
115
|
-
exports: [
|
|
112
|
+
exports: [MODULE_OPTIONS_TOKEN],
|
|
116
113
|
}),
|
|
117
|
-
__metadata("design:paramtypes", [
|
|
114
|
+
__metadata("design:paramtypes", [MikroORM])
|
|
118
115
|
], MikroOrmModule);
|
|
116
|
+
export { MikroOrmModule };
|
|
119
117
|
//# sourceMappingURL=mikro-orm.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mikro-orm.module.js","sourceRoot":"","sources":["../src/mikro-orm.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mikro-orm.module.js","sourceRoot":"","sources":["../src/mikro-orm.module.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./vector.type";
|
|
1
|
+
export * from "./vector.type.js";
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./vector.type"), exports);
|
|
1
|
+
export * from "./vector.type.js";
|
|
18
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/property-types/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/property-types/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VectorType = void 0;
|
|
4
|
-
const mikro_orm_1 = require("pgvector/mikro-orm");
|
|
1
|
+
import { VectorType as BaseVectorType } from "pgvector/mikro-orm";
|
|
5
2
|
/**
|
|
6
3
|
* Custom MikroORM property type for pgvector vector columns with configurable dimensions.
|
|
7
4
|
*
|
|
@@ -9,7 +6,8 @@ const mikro_orm_1 = require("pgvector/mikro-orm");
|
|
|
9
6
|
* Extends the base pgvector `VectorType` to support specifying the vector
|
|
10
7
|
* dimension at the property level (e.g. `vector(1536)`).
|
|
11
8
|
*/
|
|
12
|
-
class VectorType extends
|
|
9
|
+
export class VectorType extends BaseVectorType {
|
|
10
|
+
dimensions;
|
|
13
11
|
/** Creates a new VectorType instance.
|
|
14
12
|
* @param dimensions - Optional vector dimension (e.g. 1536 for OpenAI embeddings)
|
|
15
13
|
*/
|
|
@@ -27,5 +25,4 @@ class VectorType extends mikro_orm_1.VectorType {
|
|
|
27
25
|
return super.getColumnType({ dimensions: this.dimensions, ...prop }, platform);
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
|
-
exports.VectorType = VectorType;
|
|
31
28
|
//# sourceMappingURL=vector.type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector.type.js","sourceRoot":"","sources":["../../src/property-types/vector.type.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vector.type.js","sourceRoot":"","sources":["../../src/property-types/vector.type.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAElE;;;;;;GAMG;AACH,MAAM,OAAO,UAAW,SAAQ,cAAc;IAIf;IAH7B;;OAEG;IACH,YAA6B,UAAmB;QAC9C,KAAK,EAAE,CAAC;QADmB,eAAU,GAAV,UAAU,CAAS;IAEhD,CAAC;IAED;;;;;OAKG;IACH,aAAa,CAAC,IAAoB,EAAE,QAAkB;QACpD,OAAO,KAAK,CAAC,aAAa,CACxB,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI,EAAE,EACxC,QAAQ,CACT,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { type AssignOptions, CountOptions, type EntityData, type EntityDTO, EntityManager, type ExpandQuery, FilterQuery, FindOptions, type FromEntityType, type IsSubset, type Loaded, type PopulatePath } from "@mikro-orm/core";
|
|
2
|
-
import type { RequiredEntityData } from "@mikro-orm/core/typings";
|
|
1
|
+
import { type AssignOptions, CountOptions, type EntityData, type EntityDTO, EntityManager, type ExpandQuery, FilterQuery, FindOptions, type FromEntityType, type IsSubset, type Loaded, type PopulatePath, type RequiredEntityData } from "@mikro-orm/core";
|
|
3
2
|
import { Type } from "@nestjs/common";
|
|
4
|
-
import type { IdEntity } from "../interfaces/id-entity.interface";
|
|
5
|
-
import type { ChunkByIdOptions } from "../types/chunk-by-id-options.type";
|
|
6
|
-
import type { IdOrEntity } from "../types/id-or-entity.type";
|
|
3
|
+
import type { IdEntity } from "../interfaces/id-entity.interface.js";
|
|
4
|
+
import type { ChunkByIdOptions } from "../types/chunk-by-id-options.type.js";
|
|
5
|
+
import type { IdOrEntity } from "../types/id-or-entity.type.js";
|
|
7
6
|
/** Options for configuring an {@link EntityService} instance. */
|
|
8
7
|
export interface EntityServiceOptions<Entity extends IdEntity> {
|
|
9
8
|
/** Entity property key used for soft-delete timestamps (defaults to `"deletedAt"`). */
|