@mikro-orm/core 7.0.0-dev.1 → 7.0.0-dev.10
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/EntityManager.d.ts +25 -16
- package/EntityManager.js +219 -209
- package/MikroORM.d.ts +7 -6
- package/MikroORM.js +33 -45
- package/cache/CacheAdapter.js +1 -2
- package/cache/FileCacheAdapter.d.ts +1 -1
- package/cache/FileCacheAdapter.js +18 -26
- package/cache/GeneratedCacheAdapter.d.ts +2 -2
- package/cache/GeneratedCacheAdapter.js +1 -5
- package/cache/MemoryCacheAdapter.d.ts +1 -1
- package/cache/MemoryCacheAdapter.js +1 -5
- package/cache/NullCacheAdapter.d.ts +1 -1
- package/cache/NullCacheAdapter.js +1 -5
- package/cache/index.d.ts +5 -5
- package/cache/index.js +5 -21
- package/connections/Connection.d.ts +7 -7
- package/connections/Connection.js +8 -12
- package/connections/index.d.ts +1 -1
- package/connections/index.js +1 -17
- package/decorators/Check.d.ts +2 -2
- package/decorators/Check.js +5 -8
- package/decorators/CreateRequestContext.d.ts +1 -1
- package/decorators/CreateRequestContext.js +13 -14
- package/decorators/Embeddable.d.ts +5 -5
- package/decorators/Embeddable.js +4 -7
- package/decorators/Embedded.d.ts +3 -3
- package/decorators/Embedded.js +10 -12
- package/decorators/Entity.d.ts +6 -6
- package/decorators/Entity.js +5 -9
- package/decorators/Enum.d.ts +3 -3
- package/decorators/Enum.js +7 -10
- package/decorators/Filter.d.ts +1 -1
- package/decorators/Filter.js +3 -6
- package/decorators/Formula.d.ts +2 -3
- package/decorators/Formula.js +7 -10
- package/decorators/Indexed.d.ts +10 -8
- package/decorators/Indexed.js +7 -11
- package/decorators/ManyToMany.d.ts +4 -4
- package/decorators/ManyToMany.js +10 -12
- package/decorators/ManyToOne.d.ts +4 -4
- package/decorators/ManyToOne.js +10 -12
- package/decorators/OneToMany.d.ts +6 -6
- package/decorators/OneToMany.js +11 -14
- package/decorators/OneToOne.d.ts +4 -4
- package/decorators/OneToOne.js +4 -7
- package/decorators/PrimaryKey.d.ts +3 -4
- package/decorators/PrimaryKey.js +10 -13
- package/decorators/Property.d.ts +6 -6
- package/decorators/Property.js +10 -12
- package/decorators/Transactional.d.ts +2 -2
- package/decorators/Transactional.js +7 -10
- package/decorators/hooks.js +23 -35
- package/decorators/index.d.ts +17 -17
- package/decorators/index.js +17 -36
- package/drivers/DatabaseDriver.d.ts +13 -12
- package/drivers/DatabaseDriver.js +60 -64
- package/drivers/IDatabaseDriver.d.ts +16 -13
- package/drivers/IDatabaseDriver.js +1 -4
- package/drivers/index.d.ts +2 -2
- package/drivers/index.js +2 -18
- package/entity/ArrayCollection.d.ts +3 -3
- package/entity/ArrayCollection.js +38 -35
- package/entity/BaseEntity.d.ts +6 -6
- package/entity/BaseEntity.js +17 -21
- package/entity/Collection.d.ts +6 -7
- package/entity/Collection.js +47 -51
- package/entity/EntityAssigner.d.ts +2 -2
- package/entity/EntityAssigner.js +58 -63
- package/entity/EntityFactory.d.ts +3 -3
- package/entity/EntityFactory.js +62 -63
- package/entity/EntityHelper.d.ts +2 -2
- package/entity/EntityHelper.js +44 -45
- package/entity/EntityIdentifier.d.ts +1 -1
- package/entity/EntityIdentifier.js +1 -5
- package/entity/EntityLoader.d.ts +5 -5
- package/entity/EntityLoader.js +106 -98
- package/entity/EntityRepository.d.ts +7 -7
- package/entity/EntityRepository.js +7 -11
- package/entity/EntityValidator.d.ts +1 -1
- package/entity/EntityValidator.js +25 -29
- package/entity/Reference.d.ts +4 -8
- package/entity/Reference.js +35 -42
- package/entity/WrappedEntity.d.ts +12 -12
- package/entity/WrappedEntity.js +23 -27
- package/entity/index.d.ts +13 -13
- package/entity/index.js +13 -29
- package/entity/utils.d.ts +1 -1
- package/entity/utils.js +9 -12
- package/entity/wrap.d.ts +1 -1
- package/entity/wrap.js +2 -6
- package/enums.d.ts +3 -3
- package/enums.js +37 -41
- package/errors.d.ts +1 -1
- package/errors.js +15 -24
- package/events/EventManager.d.ts +3 -3
- package/events/EventManager.js +8 -12
- package/events/EventSubscriber.d.ts +8 -5
- package/events/EventSubscriber.js +1 -2
- package/events/TransactionEventBroadcaster.d.ts +3 -3
- package/events/TransactionEventBroadcaster.js +1 -5
- package/events/index.d.ts +3 -3
- package/events/index.js +3 -19
- package/exceptions.js +18 -39
- package/hydration/Hydrator.d.ts +5 -5
- package/hydration/Hydrator.js +3 -6
- package/hydration/ObjectHydrator.d.ts +3 -3
- package/hydration/ObjectHydrator.js +26 -28
- package/hydration/index.d.ts +2 -2
- package/hydration/index.js +2 -18
- package/index.d.ts +21 -21
- package/index.js +21 -46
- package/logging/DefaultLogger.d.ts +1 -1
- package/logging/DefaultLogger.js +9 -13
- package/logging/Logger.d.ts +1 -1
- package/logging/Logger.js +1 -2
- package/logging/SimpleLogger.d.ts +2 -2
- package/logging/SimpleLogger.js +2 -6
- package/logging/colors.js +1 -5
- package/logging/index.d.ts +4 -4
- package/logging/index.js +4 -20
- package/metadata/EntitySchema.d.ts +14 -6
- package/metadata/EntitySchema.js +41 -45
- package/metadata/MetadataDiscovery.d.ts +7 -7
- package/metadata/MetadataDiscovery.js +181 -180
- package/metadata/MetadataProvider.d.ts +2 -2
- package/metadata/MetadataProvider.js +4 -7
- package/metadata/MetadataStorage.d.ts +2 -2
- package/metadata/MetadataStorage.js +15 -19
- package/metadata/MetadataValidator.d.ts +4 -4
- package/metadata/MetadataValidator.js +52 -55
- package/metadata/ReflectMetadataProvider.d.ts +2 -2
- package/metadata/ReflectMetadataProvider.js +8 -12
- package/metadata/index.d.ts +6 -6
- package/metadata/index.js +6 -22
- package/naming-strategy/AbstractNamingStrategy.d.ts +2 -2
- package/naming-strategy/AbstractNamingStrategy.js +4 -8
- package/naming-strategy/EntityCaseNamingStrategy.d.ts +1 -1
- package/naming-strategy/EntityCaseNamingStrategy.js +2 -6
- package/naming-strategy/MongoNamingStrategy.d.ts +1 -1
- package/naming-strategy/MongoNamingStrategy.js +2 -6
- package/naming-strategy/NamingStrategy.d.ts +1 -1
- package/naming-strategy/NamingStrategy.js +1 -2
- package/naming-strategy/UnderscoreNamingStrategy.d.ts +1 -1
- package/naming-strategy/UnderscoreNamingStrategy.js +2 -6
- package/naming-strategy/index.d.ts +5 -5
- package/naming-strategy/index.js +5 -21
- package/package.json +6 -15
- package/platforms/ExceptionConverter.d.ts +2 -2
- package/platforms/ExceptionConverter.js +4 -8
- package/platforms/Platform.d.ts +10 -10
- package/platforms/Platform.js +57 -61
- package/platforms/index.d.ts +2 -2
- package/platforms/index.js +2 -18
- package/serialization/EntitySerializer.d.ts +2 -2
- package/serialization/EntitySerializer.js +36 -41
- package/serialization/EntityTransformer.d.ts +1 -1
- package/serialization/EntityTransformer.js +27 -31
- package/serialization/SerializationContext.d.ts +2 -2
- package/serialization/SerializationContext.js +10 -14
- package/serialization/index.d.ts +3 -3
- package/serialization/index.js +3 -19
- package/types/ArrayType.d.ts +3 -3
- package/types/ArrayType.js +7 -11
- package/types/BigIntType.d.ts +4 -3
- package/types/BigIntType.js +6 -6
- package/types/BlobType.d.ts +3 -3
- package/types/BlobType.js +2 -8
- package/types/BooleanType.d.ts +3 -3
- package/types/BooleanType.js +2 -6
- package/types/CharacterType.d.ts +3 -3
- package/types/CharacterType.js +2 -6
- package/types/DateTimeType.d.ts +3 -3
- package/types/DateTimeType.js +2 -6
- package/types/DateType.d.ts +3 -3
- package/types/DateType.js +2 -6
- package/types/DecimalType.d.ts +3 -3
- package/types/DecimalType.js +4 -7
- package/types/DoubleType.d.ts +3 -3
- package/types/DoubleType.js +3 -6
- package/types/EnumArrayType.d.ts +4 -4
- package/types/EnumArrayType.js +5 -10
- package/types/EnumType.d.ts +3 -3
- package/types/EnumType.js +2 -6
- package/types/FloatType.d.ts +3 -3
- package/types/FloatType.js +2 -6
- package/types/IntegerType.d.ts +3 -3
- package/types/IntegerType.js +2 -6
- package/types/IntervalType.d.ts +3 -3
- package/types/IntervalType.js +2 -6
- package/types/JsonType.d.ts +3 -3
- package/types/JsonType.js +2 -6
- package/types/MediumIntType.d.ts +3 -3
- package/types/MediumIntType.js +2 -6
- package/types/SmallIntType.d.ts +3 -3
- package/types/SmallIntType.js +2 -6
- package/types/StringType.d.ts +3 -3
- package/types/StringType.js +2 -6
- package/types/TextType.d.ts +3 -3
- package/types/TextType.js +2 -6
- package/types/TimeType.d.ts +3 -3
- package/types/TimeType.js +4 -8
- package/types/TinyIntType.d.ts +3 -3
- package/types/TinyIntType.js +3 -6
- package/types/Type.d.ts +2 -2
- package/types/Type.js +5 -9
- package/types/Uint8ArrayType.d.ts +3 -3
- package/types/Uint8ArrayType.js +3 -9
- package/types/UnknownType.d.ts +3 -3
- package/types/UnknownType.js +2 -6
- package/types/UuidType.d.ts +3 -3
- package/types/UuidType.js +2 -6
- package/types/index.d.ts +25 -25
- package/types/index.js +52 -79
- package/typings.d.ts +33 -28
- package/typings.js +37 -38
- package/unit-of-work/ChangeSet.d.ts +1 -1
- package/unit-of-work/ChangeSet.js +13 -17
- package/unit-of-work/ChangeSetComputer.d.ts +8 -7
- package/unit-of-work/ChangeSetComputer.js +26 -30
- package/unit-of-work/ChangeSetPersister.d.ts +7 -6
- package/unit-of-work/ChangeSetPersister.js +51 -48
- package/unit-of-work/CommitOrderCalculator.d.ts +1 -1
- package/unit-of-work/CommitOrderCalculator.js +6 -10
- package/unit-of-work/IdentityMap.d.ts +1 -1
- package/unit-of-work/IdentityMap.js +1 -5
- package/unit-of-work/UnitOfWork.d.ts +8 -7
- package/unit-of-work/UnitOfWork.js +193 -178
- package/unit-of-work/index.d.ts +6 -6
- package/unit-of-work/index.js +6 -22
- package/utils/AbstractSchemaGenerator.d.ts +6 -6
- package/utils/AbstractSchemaGenerator.js +12 -13
- package/utils/Configuration.d.ts +26 -27
- package/utils/Configuration.js +50 -55
- package/utils/ConfigurationLoader.d.ts +9 -8
- package/utils/ConfigurationLoader.js +71 -86
- package/utils/Cursor.d.ts +6 -6
- package/utils/Cursor.js +22 -25
- package/utils/DataloaderUtils.d.ts +4 -4
- package/utils/DataloaderUtils.js +12 -16
- package/utils/EntityComparator.d.ts +2 -2
- package/utils/EntityComparator.js +109 -97
- package/utils/NullHighlighter.d.ts +1 -1
- package/utils/NullHighlighter.js +1 -5
- package/utils/QueryHelper.d.ts +3 -3
- package/utils/QueryHelper.js +47 -51
- package/utils/RawQueryFragment.d.ts +1 -1
- package/utils/RawQueryFragment.js +22 -25
- package/utils/RequestContext.d.ts +2 -2
- package/utils/RequestContext.js +3 -7
- package/utils/TransactionContext.d.ts +1 -1
- package/utils/TransactionContext.js +4 -8
- package/utils/Utils.d.ts +16 -12
- package/utils/Utils.js +96 -95
- package/utils/clone.js +8 -11
- package/utils/index.d.ts +13 -13
- package/utils/index.js +13 -29
- package/utils/resolveContextProvider.d.ts +3 -3
- package/utils/resolveContextProvider.js +9 -12
- package/utils/upsert-utils.d.ts +3 -3
- package/utils/upsert-utils.js +5 -9
- package/index.mjs +0 -199
package/types/index.js
CHANGED
|
@@ -1,80 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const UuidType_1 = require("./UuidType");
|
|
53
|
-
Object.defineProperty(exports, "UuidType", { enumerable: true, get: function () { return UuidType_1.UuidType; } });
|
|
54
|
-
exports.types = {
|
|
55
|
-
date: DateType_1.DateType,
|
|
56
|
-
time: TimeType_1.TimeType,
|
|
57
|
-
datetime: DateTimeType_1.DateTimeType,
|
|
58
|
-
bigint: BigIntType_1.BigIntType,
|
|
59
|
-
blob: BlobType_1.BlobType,
|
|
60
|
-
uint8array: Uint8ArrayType_1.Uint8ArrayType,
|
|
61
|
-
array: ArrayType_1.ArrayType,
|
|
62
|
-
enumArray: EnumArrayType_1.EnumArrayType,
|
|
63
|
-
enum: EnumType_1.EnumType,
|
|
64
|
-
json: JsonType_1.JsonType,
|
|
65
|
-
integer: IntegerType_1.IntegerType,
|
|
66
|
-
smallint: SmallIntType_1.SmallIntType,
|
|
67
|
-
tinyint: TinyIntType_1.TinyIntType,
|
|
68
|
-
mediumint: MediumIntType_1.MediumIntType,
|
|
69
|
-
float: FloatType_1.FloatType,
|
|
70
|
-
double: DoubleType_1.DoubleType,
|
|
71
|
-
boolean: BooleanType_1.BooleanType,
|
|
72
|
-
decimal: DecimalType_1.DecimalType,
|
|
73
|
-
character: CharacterType_1.CharacterType,
|
|
74
|
-
string: StringType_1.StringType,
|
|
75
|
-
uuid: UuidType_1.UuidType,
|
|
76
|
-
text: TextType_1.TextType,
|
|
77
|
-
interval: IntervalType_1.IntervalType,
|
|
78
|
-
unknown: UnknownType_1.UnknownType,
|
|
1
|
+
import { ArrayType } from './ArrayType.js';
|
|
2
|
+
import { BigIntType } from './BigIntType.js';
|
|
3
|
+
import { BlobType } from './BlobType.js';
|
|
4
|
+
import { BooleanType } from './BooleanType.js';
|
|
5
|
+
import { DateTimeType } from './DateTimeType.js';
|
|
6
|
+
import { DateType } from './DateType.js';
|
|
7
|
+
import { DecimalType } from './DecimalType.js';
|
|
8
|
+
import { DoubleType } from './DoubleType.js';
|
|
9
|
+
import { EnumArrayType } from './EnumArrayType.js';
|
|
10
|
+
import { EnumType } from './EnumType.js';
|
|
11
|
+
import { CharacterType } from './CharacterType.js';
|
|
12
|
+
import { FloatType } from './FloatType.js';
|
|
13
|
+
import { IntegerType } from './IntegerType.js';
|
|
14
|
+
import { IntervalType } from './IntervalType.js';
|
|
15
|
+
import { JsonType } from './JsonType.js';
|
|
16
|
+
import { MediumIntType } from './MediumIntType.js';
|
|
17
|
+
import { SmallIntType } from './SmallIntType.js';
|
|
18
|
+
import { StringType } from './StringType.js';
|
|
19
|
+
import { TextType } from './TextType.js';
|
|
20
|
+
import { TimeType } from './TimeType.js';
|
|
21
|
+
import { TinyIntType } from './TinyIntType.js';
|
|
22
|
+
import { Type } from './Type.js';
|
|
23
|
+
import { Uint8ArrayType } from './Uint8ArrayType.js';
|
|
24
|
+
import { UnknownType } from './UnknownType.js';
|
|
25
|
+
import { UuidType } from './UuidType.js';
|
|
26
|
+
export { Type, DateType, TimeType, DateTimeType, BigIntType, BlobType, Uint8ArrayType, ArrayType, EnumArrayType, EnumType, JsonType, IntegerType, SmallIntType, TinyIntType, MediumIntType, FloatType, DoubleType, BooleanType, DecimalType, StringType, UuidType, TextType, UnknownType, IntervalType, CharacterType, };
|
|
27
|
+
export const types = {
|
|
28
|
+
date: DateType,
|
|
29
|
+
time: TimeType,
|
|
30
|
+
datetime: DateTimeType,
|
|
31
|
+
bigint: BigIntType,
|
|
32
|
+
blob: BlobType,
|
|
33
|
+
uint8array: Uint8ArrayType,
|
|
34
|
+
array: ArrayType,
|
|
35
|
+
enumArray: EnumArrayType,
|
|
36
|
+
enum: EnumType,
|
|
37
|
+
json: JsonType,
|
|
38
|
+
integer: IntegerType,
|
|
39
|
+
smallint: SmallIntType,
|
|
40
|
+
tinyint: TinyIntType,
|
|
41
|
+
mediumint: MediumIntType,
|
|
42
|
+
float: FloatType,
|
|
43
|
+
double: DoubleType,
|
|
44
|
+
boolean: BooleanType,
|
|
45
|
+
decimal: DecimalType,
|
|
46
|
+
character: CharacterType,
|
|
47
|
+
string: StringType,
|
|
48
|
+
uuid: UuidType,
|
|
49
|
+
text: TextType,
|
|
50
|
+
interval: IntervalType,
|
|
51
|
+
unknown: UnknownType,
|
|
79
52
|
};
|
|
80
|
-
|
|
53
|
+
export const t = types;
|
package/typings.d.ts
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import type { Transaction } from './connections';
|
|
2
|
-
import { type Cascade, type DeferMode, type EventType, type LoadStrategy, type PopulatePath, type QueryOrderMap, ReferenceKind } from './enums';
|
|
3
|
-
import { type AssignOptions } from './entity/EntityAssigner';
|
|
4
|
-
import { type EntityIdentifier } from './entity/EntityIdentifier';
|
|
5
|
-
import { type EntityLoaderOptions } from './entity/EntityLoader';
|
|
6
|
-
import { type Collection } from './entity/Collection';
|
|
7
|
-
import { type EntityFactory } from './entity/EntityFactory';
|
|
8
|
-
import { type EntityRepository } from './entity/EntityRepository';
|
|
9
|
-
import { Reference, type ScalarReference } from './entity/Reference';
|
|
10
|
-
import type { MikroORM } from './MikroORM';
|
|
11
|
-
import type { SerializationContext
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
14
|
-
import type {
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
17
|
-
import type {
|
|
18
|
-
import type {
|
|
19
|
-
import type {
|
|
1
|
+
import type { Transaction } from './connections/Connection.js';
|
|
2
|
+
import { type Cascade, type DeferMode, type EventType, type LoadStrategy, type PopulatePath, type QueryOrderMap, ReferenceKind } from './enums.js';
|
|
3
|
+
import { type AssignOptions } from './entity/EntityAssigner.js';
|
|
4
|
+
import { type EntityIdentifier } from './entity/EntityIdentifier.js';
|
|
5
|
+
import { type EntityLoaderOptions } from './entity/EntityLoader.js';
|
|
6
|
+
import { type Collection } from './entity/Collection.js';
|
|
7
|
+
import { type EntityFactory } from './entity/EntityFactory.js';
|
|
8
|
+
import { type EntityRepository } from './entity/EntityRepository.js';
|
|
9
|
+
import { Reference, type ScalarReference } from './entity/Reference.js';
|
|
10
|
+
import type { MikroORM } from './MikroORM.js';
|
|
11
|
+
import type { SerializationContext } from './serialization/SerializationContext.js';
|
|
12
|
+
import type { SerializeOptions } from './serialization/EntitySerializer.js';
|
|
13
|
+
import type { MetadataStorage } from './metadata/MetadataStorage.js';
|
|
14
|
+
import type { EntitySchema } from './metadata/EntitySchema.js';
|
|
15
|
+
import type { Type, types } from './types/index.js';
|
|
16
|
+
import type { Platform } from './platforms/Platform.js';
|
|
17
|
+
import type { Configuration } from './utils/Configuration.js';
|
|
18
|
+
import type { RawQueryFragment } from './utils/RawQueryFragment.js';
|
|
19
|
+
import type { EntityManager } from './EntityManager.js';
|
|
20
|
+
import type { EmbeddedPrefixMode } from './decorators/Embedded.js';
|
|
21
|
+
import type { EventSubscriber } from './events/EventSubscriber.js';
|
|
22
|
+
import type { FindOneOptions, FindOptions, LoadHint } from './drivers/IDatabaseDriver.js';
|
|
20
23
|
export type Constructor<T = unknown> = new (...args: any[]) => T;
|
|
21
24
|
export type Dictionary<T = any> = {
|
|
22
25
|
[k: string]: T;
|
|
@@ -25,6 +28,7 @@ export type EntityKey<T = unknown, B extends boolean = false> = string & {
|
|
|
25
28
|
[K in keyof T]-?: CleanKeys<T, K, B> extends never ? never : K;
|
|
26
29
|
}[keyof T];
|
|
27
30
|
export type EntityValue<T> = T[EntityKey<T>];
|
|
31
|
+
export type EntityDataValue<T> = EntityData<T>[EntityKey<T>];
|
|
28
32
|
export type FilterKey<T> = keyof FilterQuery<T>;
|
|
29
33
|
export type AsyncFunction<R = any, T = Dictionary> = (args: T) => Promise<T>;
|
|
30
34
|
export type Compute<T> = {
|
|
@@ -173,7 +177,7 @@ export interface IWrappedEntityInternal<Entity extends object> extends IWrappedE
|
|
|
173
177
|
__touched: boolean;
|
|
174
178
|
__originalEntityData?: EntityData<Entity>;
|
|
175
179
|
__loadedProperties: Set<string>;
|
|
176
|
-
__identifier?: EntityIdentifier;
|
|
180
|
+
__identifier?: EntityIdentifier | EntityIdentifier[];
|
|
177
181
|
__managed: boolean;
|
|
178
182
|
__processing: boolean;
|
|
179
183
|
__schema?: string;
|
|
@@ -202,7 +206,7 @@ export type EntityName<T> = string | EntityClass<T> | EntitySchema<T, any> | {
|
|
|
202
206
|
};
|
|
203
207
|
export type GetRepository<Entity extends {
|
|
204
208
|
[k: PropertyKey]: any;
|
|
205
|
-
}, Fallback> = Entity[typeof EntityRepositoryType] extends EntityRepository<
|
|
209
|
+
}, Fallback> = Entity[typeof EntityRepositoryType] extends EntityRepository<any> | undefined ? NonNullable<Entity[typeof EntityRepositoryType]> : Fallback;
|
|
206
210
|
export type EntityDataPropValue<T> = T | Primary<T>;
|
|
207
211
|
type ExpandEntityProp<T, C extends boolean = false> = T extends Record<string, any> ? {
|
|
208
212
|
[K in keyof T as CleanKeys<T, K>]?: EntityDataProp<ExpandProperty<T[K]>, C> | EntityDataPropValue<ExpandProperty<T[K]>> | null;
|
|
@@ -237,7 +241,7 @@ type IsOptional<T, K extends keyof T, I> = T[K] extends Collection<any, any> ? t
|
|
|
237
241
|
type RequiredKeys<T, K extends keyof T, I> = IsOptional<T, K, I> extends false ? CleanKeys<T, K> : never;
|
|
238
242
|
type OptionalKeys<T, K extends keyof T, I> = IsOptional<T, K, I> extends false ? never : CleanKeys<T, K>;
|
|
239
243
|
export type EntityData<T, C extends boolean = false> = {
|
|
240
|
-
[K in EntityKey<T>]?: EntityDataItem<T[K], C>;
|
|
244
|
+
[K in EntityKey<T>]?: EntityDataItem<T[K] & {}, C>;
|
|
241
245
|
};
|
|
242
246
|
export type RequiredEntityData<T, I = never, C extends boolean = false> = {
|
|
243
247
|
[K in keyof T as RequiredKeys<T, K, I>]: T[K] | RequiredEntityDataProp<T[K], T, C> | Primary<T[K]>;
|
|
@@ -279,7 +283,7 @@ type PrimaryOrObject<T, U, C extends TypeConfig> = PreferExplicitConfig<C, Extra
|
|
|
279
283
|
} : Primary<U>;
|
|
280
284
|
export type EntityDTOProp<E, T, C extends TypeConfig = never> = T extends Scalar ? T : T extends {
|
|
281
285
|
__serialized?: infer U;
|
|
282
|
-
} ? U : T extends LoadedReference<infer U> ? EntityDTO<U, C> : T extends Reference<infer U> ? PrimaryOrObject<E, U, C> : T extends ScalarReference<infer U> ? U : T extends LoadedCollection<infer U> ? EntityDTO<U, C>[] : T extends Collection<infer U> ? PrimaryOrObject<E, U, C>[] : T extends readonly (infer U)[] ? (T extends readonly any[] ? T : U[]) : T extends Relation<T> ? EntityDTO<T, C> : T;
|
|
286
|
+
} ? (IsUnknown<U> extends false ? U : T) : T extends LoadedReference<infer U> ? EntityDTO<U, C> : T extends Reference<infer U> ? PrimaryOrObject<E, U, C> : T extends ScalarReference<infer U> ? U : T extends LoadedCollection<infer U> ? EntityDTO<U, C>[] : T extends Collection<infer U> ? PrimaryOrObject<E, U, C>[] : T extends readonly (infer U)[] ? (T extends readonly any[] ? T : U[]) : T extends Relation<T> ? EntityDTO<T, C> : T;
|
|
283
287
|
type DTOProbablyOptionalProps<T> = NonNullable<NullableKeys<T, undefined>>;
|
|
284
288
|
type DTOIsOptional<T, K extends keyof T> = T[K] extends LoadedCollection<any> ? false : K extends PrimaryProperty<T> ? false : K extends DTOProbablyOptionalProps<T> ? true : false;
|
|
285
289
|
type DTORequiredKeys<T, K extends keyof T> = DTOIsOptional<T, K> extends false ? ExcludeHidden<T, K> & CleanKeys<T, K> : never;
|
|
@@ -289,7 +293,9 @@ export type EntityDTO<T, C extends TypeConfig = never> = {
|
|
|
289
293
|
} & {
|
|
290
294
|
[K in keyof T as DTOOptionalKeys<T, K>]?: EntityDTOProp<T, T[K], C> | AddOptional<T[K]>;
|
|
291
295
|
};
|
|
292
|
-
|
|
296
|
+
type TargetKeys<T> = T extends EntityClass<infer P> ? keyof P : keyof T;
|
|
297
|
+
type CheckKey<T> = IsUnknown<T> extends false ? TargetKeys<T> : string;
|
|
298
|
+
export type CheckCallback<T> = (columns: Record<CheckKey<T>, string>) => string;
|
|
293
299
|
export type GeneratedColumnCallback<T> = (columns: Record<keyof T, string>) => string;
|
|
294
300
|
export interface CheckConstraint<T = any> {
|
|
295
301
|
name?: string;
|
|
@@ -413,7 +419,7 @@ export interface EntityMetadata<T = any> {
|
|
|
413
419
|
schema?: string;
|
|
414
420
|
pivotTable?: boolean;
|
|
415
421
|
virtual?: boolean;
|
|
416
|
-
expression?: string | ((em: any, where:
|
|
422
|
+
expression?: string | ((em: any, where: ObjectQuery<T>, options: FindOptions<T, any, any, any>) => MaybePromise<RawQueryFragment | object | string>);
|
|
417
423
|
discriminatorColumn?: EntityKey<T> | AnyString;
|
|
418
424
|
discriminatorValue?: number | string;
|
|
419
425
|
discriminatorMap?: Dictionary<string>;
|
|
@@ -468,7 +474,6 @@ export interface EntityMetadata<T = any> {
|
|
|
468
474
|
prototype: T;
|
|
469
475
|
class: EntityClass<T>;
|
|
470
476
|
abstract: boolean;
|
|
471
|
-
useCache: boolean;
|
|
472
477
|
filters: Dictionary<FilterDef>;
|
|
473
478
|
comment?: string;
|
|
474
479
|
selfReferencing?: boolean;
|
|
@@ -679,7 +684,7 @@ export interface MigrationObject {
|
|
|
679
684
|
}
|
|
680
685
|
export type FilterDef = {
|
|
681
686
|
name: string;
|
|
682
|
-
cond: Dictionary | ((args: Dictionary, type: 'read' | 'update' | 'delete', em: any, options?: FindOptions<any, any, any, any> | FindOneOptions<any, any, any, any>) => Dictionary | Promise<Dictionary>);
|
|
687
|
+
cond: Dictionary | ((args: Dictionary, type: 'read' | 'update' | 'delete', em: any, options?: FindOptions<any, any, any, any> | FindOneOptions<any, any, any, any>, entityName?: EntityName<any>) => Dictionary | Promise<Dictionary>);
|
|
683
688
|
default?: boolean;
|
|
684
689
|
entity?: string[];
|
|
685
690
|
args?: boolean;
|
|
@@ -724,7 +729,7 @@ export type MergeSelected<T, U, F extends string> = T extends Loaded<infer TT, i
|
|
|
724
729
|
type MergeFields<F1 extends string, F2 extends string, P1, P2> = P1 | P2 extends '*' ? '*' : F1 | F2;
|
|
725
730
|
type MergeExcludes<F extends string, E extends string> = F extends E ? never : Exclude<E, F>;
|
|
726
731
|
export type MergeLoaded<T, U, P extends string, F extends string, E extends string, R extends boolean = false> = T extends Loaded<U, infer PP, infer FF, infer EE> ? string extends FF ? Loaded<T, P, F, AnyStringToNever<EE> | E> : string extends P ? Loaded<U, never, F | (FF & string), MergeExcludes<F | (FF & string), EE | E>> : Loaded<U, P | AnyStringToNever<PP>, MergeFields<F, AnyStringToNever<FF>, P, PP>, MergeExcludes<MergeFields<F, AnyStringToNever<FF>, P, PP>, (R extends true ? never : EE) | E>> : Loaded<T, P, F>;
|
|
727
|
-
type AddOptional<T> = undefined | null extends T ? null | undefined : null extends T ? null : undefined extends T ? undefined : never;
|
|
732
|
+
export type AddOptional<T> = undefined | null extends T ? null | undefined : null extends T ? null : undefined extends T ? undefined : never;
|
|
728
733
|
type LoadedProp<T, L extends string = never, F extends string = '*', E extends string = never> = LoadedLoadable<T, Loaded<ExtractType<T>, L, F, E>>;
|
|
729
734
|
export type AddEager<T> = ExtractEagerProps<T> & string;
|
|
730
735
|
export type ExpandHint<T, L extends string> = L | AddEager<T>;
|
package/typings.js
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.HiddenProps = Symbol('HiddenProps');
|
|
14
|
-
exports.Config = Symbol('Config');
|
|
15
|
-
class EntityMetadata {
|
|
1
|
+
import { ReferenceKind, } from './enums.js';
|
|
2
|
+
import { Reference } from './entity/Reference.js';
|
|
3
|
+
import { EntityHelper } from './entity/EntityHelper.js';
|
|
4
|
+
import { Utils } from './utils/Utils.js';
|
|
5
|
+
import { EntityComparator } from './utils/EntityComparator.js';
|
|
6
|
+
export const EntityRepositoryType = Symbol('EntityRepositoryType');
|
|
7
|
+
export const PrimaryKeyProp = Symbol('PrimaryKeyProp');
|
|
8
|
+
export const OptionalProps = Symbol('OptionalProps');
|
|
9
|
+
export const EagerProps = Symbol('EagerProps');
|
|
10
|
+
export const HiddenProps = Symbol('HiddenProps');
|
|
11
|
+
export const Config = Symbol('Config');
|
|
12
|
+
export class EntityMetadata {
|
|
16
13
|
static counter = 0;
|
|
17
14
|
_id = 1000 * EntityMetadata.counter++; // keep the id >= 1000 to allow computing cache keys by simple addition
|
|
18
15
|
propertyOrder = new Map();
|
|
@@ -35,7 +32,7 @@ class EntityMetadata {
|
|
|
35
32
|
}
|
|
36
33
|
this.properties[prop.name] = prop;
|
|
37
34
|
this.propertyOrder.set(prop.name, this.props.length);
|
|
38
|
-
/*
|
|
35
|
+
/* v8 ignore next 3 */
|
|
39
36
|
if (sync) {
|
|
40
37
|
this.sync();
|
|
41
38
|
}
|
|
@@ -43,7 +40,7 @@ class EntityMetadata {
|
|
|
43
40
|
removeProperty(name, sync = true) {
|
|
44
41
|
delete this.properties[name];
|
|
45
42
|
this.propertyOrder.delete(name);
|
|
46
|
-
/*
|
|
43
|
+
/* v8 ignore next 3 */
|
|
47
44
|
if (sync) {
|
|
48
45
|
this.sync();
|
|
49
46
|
}
|
|
@@ -64,11 +61,11 @@ class EntityMetadata {
|
|
|
64
61
|
this.root ??= this;
|
|
65
62
|
const props = Object.values(this.properties).sort((a, b) => this.propertyOrder.get(a.name) - this.propertyOrder.get(b.name));
|
|
66
63
|
this.props = [...props.filter(p => p.primary), ...props.filter(p => !p.primary)];
|
|
67
|
-
this.relations = this.props.filter(prop => typeof prop.kind !== 'undefined' && prop.kind !==
|
|
64
|
+
this.relations = this.props.filter(prop => typeof prop.kind !== 'undefined' && prop.kind !== ReferenceKind.SCALAR && prop.kind !== ReferenceKind.EMBEDDED);
|
|
68
65
|
this.bidirectionalRelations = this.relations.filter(prop => prop.mappedBy || prop.inversedBy);
|
|
69
66
|
this.uniqueProps = this.props.filter(prop => prop.unique);
|
|
70
67
|
this.getterProps = this.props.filter(prop => prop.getter);
|
|
71
|
-
this.comparableProps = this.props.filter(prop =>
|
|
68
|
+
this.comparableProps = this.props.filter(prop => EntityComparator.isComparable(prop, this));
|
|
72
69
|
this.hydrateProps = this.props.filter(prop => {
|
|
73
70
|
// `prop.userDefined` is either `undefined` or `false`
|
|
74
71
|
const discriminator = this.root.discriminatorColumn === prop.name && prop.userDefined === false;
|
|
@@ -78,14 +75,14 @@ class EntityMetadata {
|
|
|
78
75
|
});
|
|
79
76
|
this.trackingProps = this.hydrateProps
|
|
80
77
|
.filter(prop => !prop.getter && !prop.setter && prop.trackChanges !== false)
|
|
81
|
-
.filter(prop => ![
|
|
78
|
+
.filter(prop => ![ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(prop.kind))
|
|
82
79
|
.filter(prop => !prop.serializedPrimaryKey);
|
|
83
80
|
this.selfReferencing = this.relations.some(prop => [this.className, this.root.className].includes(prop.targetMeta?.root.className ?? prop.type));
|
|
84
81
|
this.hasUniqueProps = this.uniques.length + this.uniqueProps.length > 0;
|
|
85
82
|
this.virtual = !!this.expression;
|
|
86
83
|
if (config) {
|
|
87
84
|
for (const prop of this.props) {
|
|
88
|
-
if (prop.enum && !prop.nativeEnumName && prop.items?.every(item =>
|
|
85
|
+
if (prop.enum && !prop.nativeEnumName && prop.items?.every(item => Utils.isString(item))) {
|
|
89
86
|
const name = config.getNamingStrategy().indexName(this.tableName, prop.fieldNames, 'check');
|
|
90
87
|
const exists = this.checks.findIndex(check => check.name === name);
|
|
91
88
|
if (exists !== -1) {
|
|
@@ -99,11 +96,11 @@ class EntityMetadata {
|
|
|
99
96
|
}
|
|
100
97
|
}
|
|
101
98
|
}
|
|
102
|
-
this.checks =
|
|
103
|
-
this.indexes =
|
|
104
|
-
this.uniques =
|
|
105
|
-
for (const hook of
|
|
106
|
-
this.hooks[hook] =
|
|
99
|
+
this.checks = Utils.removeDuplicates(this.checks);
|
|
100
|
+
this.indexes = Utils.removeDuplicates(this.indexes);
|
|
101
|
+
this.uniques = Utils.removeDuplicates(this.uniques);
|
|
102
|
+
for (const hook of Utils.keys(this.hooks)) {
|
|
103
|
+
this.hooks[hook] = Utils.removeDuplicates(this.hooks[hook]);
|
|
107
104
|
}
|
|
108
105
|
if (this.virtual) {
|
|
109
106
|
this.readonly = true;
|
|
@@ -112,8 +109,8 @@ class EntityMetadata {
|
|
|
112
109
|
this.props.forEach(prop => this.initIndexes(prop));
|
|
113
110
|
}
|
|
114
111
|
this.definedProperties = this.trackingProps.reduce((o, prop) => {
|
|
115
|
-
const isCollection = [
|
|
116
|
-
const isReference = [
|
|
112
|
+
const isCollection = [ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(prop.kind);
|
|
113
|
+
const isReference = [ReferenceKind.ONE_TO_ONE, ReferenceKind.MANY_TO_ONE].includes(prop.kind) && (prop.inversedBy || prop.mappedBy) && !prop.mapToPk;
|
|
117
114
|
if (isReference) {
|
|
118
115
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
119
116
|
const meta = this;
|
|
@@ -124,17 +121,20 @@ class EntityMetadata {
|
|
|
124
121
|
set(val) {
|
|
125
122
|
const wrapped = this.__helper;
|
|
126
123
|
const hydrator = wrapped.hydrator;
|
|
127
|
-
const entity =
|
|
128
|
-
const old =
|
|
129
|
-
|
|
124
|
+
const entity = Reference.unwrapReference(val ?? wrapped.__data[prop.name]);
|
|
125
|
+
const old = Reference.unwrapReference(wrapped.__data[prop.name]);
|
|
126
|
+
if (old && old !== entity && prop.kind === ReferenceKind.MANY_TO_ONE && prop.inversedBy && old[prop.inversedBy]) {
|
|
127
|
+
old[prop.inversedBy].removeWithoutPropagation(this);
|
|
128
|
+
}
|
|
129
|
+
wrapped.__data[prop.name] = Reference.wrapReference(val, prop);
|
|
130
130
|
// when propagation from inside hydration, we set the FK to the entity data immediately
|
|
131
131
|
if (val && hydrator.isRunning() && wrapped.__originalEntityData && prop.owner) {
|
|
132
|
-
wrapped.__originalEntityData[prop.name] =
|
|
132
|
+
wrapped.__originalEntityData[prop.name] = Utils.getPrimaryKeyValues(val, prop.targetMeta.primaryKeys, true);
|
|
133
133
|
}
|
|
134
134
|
else {
|
|
135
135
|
wrapped.__touched = !hydrator.isRunning();
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
EntityHelper.propagate(meta, entity, this, prop, Reference.unwrapReference(val), old);
|
|
138
138
|
},
|
|
139
139
|
enumerable: true,
|
|
140
140
|
configurable: true,
|
|
@@ -163,14 +163,14 @@ class EntityMetadata {
|
|
|
163
163
|
initIndexes(prop) {
|
|
164
164
|
const simpleIndex = this.indexes.find(index => index.properties === prop.name && !index.options && !index.type && !index.expression);
|
|
165
165
|
const simpleUnique = this.uniques.find(index => index.properties === prop.name && !index.options);
|
|
166
|
-
const owner = prop.kind ===
|
|
166
|
+
const owner = prop.kind === ReferenceKind.MANY_TO_ONE;
|
|
167
167
|
if (!prop.index && simpleIndex) {
|
|
168
|
-
|
|
168
|
+
Utils.defaultValue(simpleIndex, 'name', true);
|
|
169
169
|
prop.index = simpleIndex.name;
|
|
170
170
|
this.indexes.splice(this.indexes.indexOf(simpleIndex), 1);
|
|
171
171
|
}
|
|
172
172
|
if (!prop.unique && simpleUnique) {
|
|
173
|
-
|
|
173
|
+
Utils.defaultValue(simpleUnique, 'name', true);
|
|
174
174
|
prop.unique = simpleUnique.name;
|
|
175
175
|
this.uniques.splice(this.uniques.indexOf(simpleUnique), 1);
|
|
176
176
|
}
|
|
@@ -178,7 +178,7 @@ class EntityMetadata {
|
|
|
178
178
|
this.indexes.push({ properties: prop.name });
|
|
179
179
|
prop.index = false;
|
|
180
180
|
}
|
|
181
|
-
/*
|
|
181
|
+
/* v8 ignore next 4 */
|
|
182
182
|
if (owner && prop.fieldNames.length > 1 && prop.unique) {
|
|
183
183
|
this.uniques.push({ properties: prop.name });
|
|
184
184
|
prop.unique = false;
|
|
@@ -189,4 +189,3 @@ class EntityMetadata {
|
|
|
189
189
|
return this;
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
exports.EntityMetadata = EntityMetadata;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
|
-
import type { EntityData, EntityMetadata, EntityDictionary, Primary } from '../typings';
|
|
2
|
+
import type { EntityData, EntityMetadata, EntityDictionary, Primary } from '../typings.js';
|
|
3
3
|
export declare class ChangeSet<T extends object> {
|
|
4
4
|
entity: T;
|
|
5
5
|
type: ChangeSetType;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const wrap_1 = require("../entity/wrap");
|
|
6
|
-
const Utils_1 = require("../utils/Utils");
|
|
7
|
-
class ChangeSet {
|
|
1
|
+
import { inspect } from 'node:util';
|
|
2
|
+
import { helper } from '../entity/wrap.js';
|
|
3
|
+
import { Utils } from '../utils/Utils.js';
|
|
4
|
+
export class ChangeSet {
|
|
8
5
|
entity;
|
|
9
6
|
type;
|
|
10
7
|
payload;
|
|
@@ -19,11 +16,11 @@ class ChangeSet {
|
|
|
19
16
|
this.name = meta.className;
|
|
20
17
|
this.rootName = meta.root.className;
|
|
21
18
|
this.collection = meta.root.collection;
|
|
22
|
-
this.schema =
|
|
19
|
+
this.schema = helper(entity).__schema ?? meta.root.schema;
|
|
23
20
|
}
|
|
24
21
|
getPrimaryKey(object = false) {
|
|
25
22
|
if (!this.originalEntity) {
|
|
26
|
-
this.primaryKey ??=
|
|
23
|
+
this.primaryKey ??= helper(this.entity).getPrimaryKey(true);
|
|
27
24
|
}
|
|
28
25
|
else if (this.meta.compositePK) {
|
|
29
26
|
this.primaryKey = this.meta.primaryKeys.map(pk => this.originalEntity[pk]);
|
|
@@ -40,31 +37,30 @@ class ChangeSet {
|
|
|
40
37
|
});
|
|
41
38
|
}
|
|
42
39
|
if (object && this.primaryKey != null) {
|
|
43
|
-
return
|
|
40
|
+
return Utils.primaryKeyToObject(this.meta, this.primaryKey);
|
|
44
41
|
}
|
|
45
42
|
return this.primaryKey ?? null;
|
|
46
43
|
}
|
|
47
44
|
getSerializedPrimaryKey() {
|
|
48
|
-
this.serializedPrimaryKey ??=
|
|
45
|
+
this.serializedPrimaryKey ??= helper(this.entity).getSerializedPrimaryKey();
|
|
49
46
|
return this.serializedPrimaryKey;
|
|
50
47
|
}
|
|
51
48
|
/** @ignore */
|
|
52
|
-
[
|
|
49
|
+
[inspect.custom](depth = 2) {
|
|
53
50
|
const object = { ...this };
|
|
54
51
|
const hidden = ['meta', 'serializedPrimaryKey'];
|
|
55
52
|
hidden.forEach(k => delete object[k]);
|
|
56
|
-
const ret =
|
|
53
|
+
const ret = inspect(object, { depth });
|
|
57
54
|
const name = `${this.constructor.name}<${this.meta.className}>`;
|
|
58
|
-
/*
|
|
55
|
+
/* v8 ignore next */
|
|
59
56
|
return ret === '[Object]' ? `[${name}]` : name + ' ' + ret;
|
|
60
57
|
}
|
|
61
58
|
}
|
|
62
|
-
|
|
63
|
-
var ChangeSetType;
|
|
59
|
+
export var ChangeSetType;
|
|
64
60
|
(function (ChangeSetType) {
|
|
65
61
|
ChangeSetType["CREATE"] = "create";
|
|
66
62
|
ChangeSetType["UPDATE"] = "update";
|
|
67
63
|
ChangeSetType["DELETE"] = "delete";
|
|
68
64
|
ChangeSetType["UPDATE_EARLY"] = "update_early";
|
|
69
65
|
ChangeSetType["DELETE_EARLY"] = "delete_early";
|
|
70
|
-
})(ChangeSetType || (
|
|
66
|
+
})(ChangeSetType || (ChangeSetType = {}));
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type Configuration } from '../utils/Configuration';
|
|
2
|
-
import type { MetadataStorage } from '../metadata';
|
|
3
|
-
import type { AnyEntity } from '../typings';
|
|
4
|
-
import { ChangeSet } from './ChangeSet';
|
|
5
|
-
import { type
|
|
6
|
-
import type
|
|
7
|
-
import type {
|
|
1
|
+
import { type Configuration } from '../utils/Configuration.js';
|
|
2
|
+
import type { MetadataStorage } from '../metadata/MetadataStorage.js';
|
|
3
|
+
import type { AnyEntity } from '../typings.js';
|
|
4
|
+
import { ChangeSet } from './ChangeSet.js';
|
|
5
|
+
import { type EntityValidator } from '../entity/EntityValidator.js';
|
|
6
|
+
import { type Collection } from '../entity/Collection.js';
|
|
7
|
+
import type { Platform } from '../platforms/Platform.js';
|
|
8
|
+
import type { EntityManager } from '../EntityManager.js';
|
|
8
9
|
export declare class ChangeSetComputer {
|
|
9
10
|
private readonly validator;
|
|
10
11
|
private readonly collectionUpdates;
|