@mikro-orm/core 6.2.10-dev.74 → 6.2.10-dev.75
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "6.2.10-dev.
|
|
3
|
+
"version": "6.2.10-dev.75",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"esprima": "4.0.1",
|
|
65
65
|
"fs-extra": "11.2.0",
|
|
66
66
|
"globby": "11.1.0",
|
|
67
|
-
"mikro-orm": "6.2.10-dev.
|
|
67
|
+
"mikro-orm": "6.2.10-dev.75",
|
|
68
68
|
"reflect-metadata": "0.2.2"
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -5,7 +5,7 @@ import type { Configuration } from '../utils/Configuration';
|
|
|
5
5
|
* Before we process a property, we call `visit` that checks if it is not a cycle path (but allows to pass cycles that
|
|
6
6
|
* are defined in populate hint). If not, we proceed and call `leave` afterwards.
|
|
7
7
|
*/
|
|
8
|
-
export declare class SerializationContext<T> {
|
|
8
|
+
export declare class SerializationContext<T extends object> {
|
|
9
9
|
private readonly config;
|
|
10
10
|
private readonly populate;
|
|
11
11
|
private readonly fields?;
|
|
@@ -23,7 +23,7 @@ export declare class SerializationContext<T> {
|
|
|
23
23
|
/**
|
|
24
24
|
* When initializing new context, we need to propagate it to the whole entity graph recursively.
|
|
25
25
|
*/
|
|
26
|
-
static propagate(root: SerializationContext<
|
|
26
|
+
static propagate(root: SerializationContext<any>, entity: AnyEntity, isVisible: (meta: EntityMetadata, prop: string) => boolean): void;
|
|
27
27
|
isMarkedAsPopulated(entityName: string, prop: string): boolean;
|
|
28
28
|
isPartiallyLoaded(entityName: string, prop: string): boolean;
|
|
29
29
|
private register;
|
package/typings.d.ts
CHANGED
|
@@ -13,9 +13,9 @@ export type Constructor<T = unknown> = new (...args: any[]) => T;
|
|
|
13
13
|
export type Dictionary<T = any> = {
|
|
14
14
|
[k: string]: T;
|
|
15
15
|
};
|
|
16
|
-
export type EntityKey<T = unknown, B extends boolean = false> = string &
|
|
17
|
-
[K in keyof T
|
|
18
|
-
};
|
|
16
|
+
export type EntityKey<T = unknown, B extends boolean = false> = string & {
|
|
17
|
+
[K in keyof T]-?: CleanKeys<T, K, B> extends never ? never : K;
|
|
18
|
+
}[keyof T];
|
|
19
19
|
export type EntityValue<T> = T[EntityKey<T>];
|
|
20
20
|
export type FilterKey<T> = keyof FilterQuery<T>;
|
|
21
21
|
export type AsyncFunction<R = any, T = Dictionary> = (args: T) => Promise<T>;
|
|
@@ -126,7 +126,7 @@ export type ExpandQuery<T> = T extends object ? T extends Scalar ? never : Filte
|
|
|
126
126
|
export type EntityProps<T> = {
|
|
127
127
|
-readonly [K in EntityKey<T>]?: T[K];
|
|
128
128
|
};
|
|
129
|
-
export type ObjectQuery<T> = OperatorMap<T> &
|
|
129
|
+
export type ObjectQuery<T> = OperatorMap<T> & FilterObject<T>;
|
|
130
130
|
export type FilterQuery<T> = ObjectQuery<T> | NonNullable<ExpandScalar<Primary<T>>> | NonNullable<EntityProps<T> & OperatorMap<T>> | FilterQuery<T>[];
|
|
131
131
|
export type QBFilterQuery<T = any> = ObjectQuery<T> | Dictionary;
|
|
132
132
|
export interface IWrappedEntity<Entity extends object> {
|