@mikro-orm/core 7.0.0-dev.0 → 7.0.0-dev.2

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.
Files changed (261) hide show
  1. package/EntityManager.d.ts +18 -13
  2. package/EntityManager.js +202 -202
  3. package/MikroORM.d.ts +7 -6
  4. package/MikroORM.js +33 -45
  5. package/cache/CacheAdapter.js +1 -2
  6. package/cache/FileCacheAdapter.d.ts +1 -1
  7. package/cache/FileCacheAdapter.js +18 -26
  8. package/cache/GeneratedCacheAdapter.d.ts +2 -2
  9. package/cache/GeneratedCacheAdapter.js +1 -5
  10. package/cache/MemoryCacheAdapter.d.ts +1 -1
  11. package/cache/MemoryCacheAdapter.js +1 -5
  12. package/cache/NullCacheAdapter.d.ts +1 -1
  13. package/cache/NullCacheAdapter.js +1 -5
  14. package/cache/index.d.ts +5 -5
  15. package/cache/index.js +5 -21
  16. package/connections/Connection.d.ts +7 -7
  17. package/connections/Connection.js +8 -12
  18. package/connections/index.d.ts +1 -1
  19. package/connections/index.js +1 -17
  20. package/decorators/Check.d.ts +1 -1
  21. package/decorators/Check.js +5 -8
  22. package/decorators/CreateRequestContext.d.ts +1 -1
  23. package/decorators/CreateRequestContext.js +9 -13
  24. package/decorators/Embeddable.d.ts +1 -1
  25. package/decorators/Embeddable.js +3 -6
  26. package/decorators/Embedded.d.ts +1 -1
  27. package/decorators/Embedded.js +10 -12
  28. package/decorators/Entity.d.ts +2 -2
  29. package/decorators/Entity.js +5 -8
  30. package/decorators/Enum.d.ts +2 -2
  31. package/decorators/Enum.js +7 -10
  32. package/decorators/Filter.d.ts +1 -1
  33. package/decorators/Filter.js +3 -6
  34. package/decorators/Formula.d.ts +2 -2
  35. package/decorators/Formula.js +7 -10
  36. package/decorators/Indexed.d.ts +2 -2
  37. package/decorators/Indexed.js +6 -10
  38. package/decorators/ManyToMany.d.ts +3 -3
  39. package/decorators/ManyToMany.js +10 -12
  40. package/decorators/ManyToOne.d.ts +3 -3
  41. package/decorators/ManyToOne.js +10 -12
  42. package/decorators/OneToMany.d.ts +3 -3
  43. package/decorators/OneToMany.js +11 -14
  44. package/decorators/OneToOne.d.ts +4 -4
  45. package/decorators/OneToOne.js +4 -7
  46. package/decorators/PrimaryKey.d.ts +2 -2
  47. package/decorators/PrimaryKey.js +10 -13
  48. package/decorators/Property.d.ts +5 -5
  49. package/decorators/Property.js +10 -12
  50. package/decorators/Transactional.d.ts +2 -2
  51. package/decorators/Transactional.js +7 -10
  52. package/decorators/hooks.js +23 -35
  53. package/decorators/index.d.ts +17 -17
  54. package/decorators/index.js +17 -36
  55. package/drivers/DatabaseDriver.d.ts +13 -12
  56. package/drivers/DatabaseDriver.js +60 -64
  57. package/drivers/IDatabaseDriver.d.ts +12 -12
  58. package/drivers/IDatabaseDriver.js +1 -4
  59. package/drivers/index.d.ts +2 -2
  60. package/drivers/index.js +2 -18
  61. package/entity/ArrayCollection.d.ts +2 -2
  62. package/entity/ArrayCollection.js +29 -33
  63. package/entity/BaseEntity.d.ts +6 -6
  64. package/entity/BaseEntity.js +17 -21
  65. package/entity/Collection.d.ts +6 -6
  66. package/entity/Collection.js +40 -44
  67. package/entity/EntityAssigner.d.ts +2 -2
  68. package/entity/EntityAssigner.js +58 -63
  69. package/entity/EntityFactory.d.ts +3 -3
  70. package/entity/EntityFactory.js +58 -62
  71. package/entity/EntityHelper.d.ts +2 -2
  72. package/entity/EntityHelper.js +41 -45
  73. package/entity/EntityIdentifier.d.ts +1 -1
  74. package/entity/EntityIdentifier.js +1 -5
  75. package/entity/EntityLoader.d.ts +5 -5
  76. package/entity/EntityLoader.js +92 -96
  77. package/entity/EntityRepository.d.ts +7 -7
  78. package/entity/EntityRepository.js +7 -11
  79. package/entity/EntityValidator.d.ts +1 -1
  80. package/entity/EntityValidator.js +25 -29
  81. package/entity/Reference.d.ts +2 -2
  82. package/entity/Reference.js +35 -42
  83. package/entity/WrappedEntity.d.ts +12 -12
  84. package/entity/WrappedEntity.js +23 -27
  85. package/entity/index.d.ts +13 -13
  86. package/entity/index.js +13 -29
  87. package/entity/utils.d.ts +1 -1
  88. package/entity/utils.js +9 -12
  89. package/entity/wrap.d.ts +1 -1
  90. package/entity/wrap.js +2 -6
  91. package/enums.d.ts +3 -3
  92. package/enums.js +37 -41
  93. package/errors.d.ts +1 -1
  94. package/errors.js +15 -24
  95. package/events/EventManager.d.ts +3 -3
  96. package/events/EventManager.js +8 -12
  97. package/events/EventSubscriber.d.ts +5 -4
  98. package/events/EventSubscriber.js +1 -2
  99. package/events/TransactionEventBroadcaster.d.ts +3 -3
  100. package/events/TransactionEventBroadcaster.js +1 -5
  101. package/events/index.d.ts +3 -3
  102. package/events/index.js +3 -19
  103. package/exceptions.js +18 -39
  104. package/hydration/Hydrator.d.ts +5 -5
  105. package/hydration/Hydrator.js +3 -6
  106. package/hydration/ObjectHydrator.d.ts +3 -3
  107. package/hydration/ObjectHydrator.js +25 -28
  108. package/hydration/index.d.ts +2 -2
  109. package/hydration/index.js +2 -18
  110. package/index.d.ts +21 -21
  111. package/index.js +21 -46
  112. package/logging/DefaultLogger.d.ts +1 -1
  113. package/logging/DefaultLogger.js +9 -13
  114. package/logging/Logger.d.ts +1 -1
  115. package/logging/Logger.js +1 -2
  116. package/logging/SimpleLogger.d.ts +2 -2
  117. package/logging/SimpleLogger.js +2 -6
  118. package/logging/colors.js +1 -5
  119. package/logging/index.d.ts +4 -4
  120. package/logging/index.js +4 -20
  121. package/metadata/EntitySchema.d.ts +12 -4
  122. package/metadata/EntitySchema.js +41 -45
  123. package/metadata/MetadataDiscovery.d.ts +7 -7
  124. package/metadata/MetadataDiscovery.js +174 -177
  125. package/metadata/MetadataProvider.d.ts +2 -2
  126. package/metadata/MetadataProvider.js +4 -7
  127. package/metadata/MetadataStorage.d.ts +2 -2
  128. package/metadata/MetadataStorage.js +15 -19
  129. package/metadata/MetadataValidator.d.ts +4 -4
  130. package/metadata/MetadataValidator.js +49 -53
  131. package/metadata/ReflectMetadataProvider.d.ts +2 -2
  132. package/metadata/ReflectMetadataProvider.js +8 -12
  133. package/metadata/index.d.ts +6 -6
  134. package/metadata/index.js +6 -22
  135. package/naming-strategy/AbstractNamingStrategy.d.ts +2 -2
  136. package/naming-strategy/AbstractNamingStrategy.js +4 -8
  137. package/naming-strategy/EntityCaseNamingStrategy.d.ts +1 -1
  138. package/naming-strategy/EntityCaseNamingStrategy.js +2 -6
  139. package/naming-strategy/MongoNamingStrategy.d.ts +1 -1
  140. package/naming-strategy/MongoNamingStrategy.js +2 -6
  141. package/naming-strategy/NamingStrategy.d.ts +1 -1
  142. package/naming-strategy/NamingStrategy.js +1 -2
  143. package/naming-strategy/UnderscoreNamingStrategy.d.ts +1 -1
  144. package/naming-strategy/UnderscoreNamingStrategy.js +2 -6
  145. package/naming-strategy/index.d.ts +5 -5
  146. package/naming-strategy/index.js +5 -21
  147. package/package.json +5 -14
  148. package/platforms/ExceptionConverter.d.ts +2 -2
  149. package/platforms/ExceptionConverter.js +4 -8
  150. package/platforms/Platform.d.ts +10 -10
  151. package/platforms/Platform.js +57 -61
  152. package/platforms/index.d.ts +2 -2
  153. package/platforms/index.js +2 -18
  154. package/serialization/EntitySerializer.d.ts +2 -2
  155. package/serialization/EntitySerializer.js +36 -41
  156. package/serialization/EntityTransformer.d.ts +1 -1
  157. package/serialization/EntityTransformer.js +27 -31
  158. package/serialization/SerializationContext.d.ts +2 -2
  159. package/serialization/SerializationContext.js +10 -14
  160. package/serialization/index.d.ts +3 -3
  161. package/serialization/index.js +3 -19
  162. package/types/ArrayType.d.ts +3 -3
  163. package/types/ArrayType.js +7 -11
  164. package/types/BigIntType.d.ts +3 -3
  165. package/types/BigIntType.js +3 -6
  166. package/types/BlobType.d.ts +3 -3
  167. package/types/BlobType.js +2 -8
  168. package/types/BooleanType.d.ts +3 -3
  169. package/types/BooleanType.js +2 -6
  170. package/types/CharacterType.d.ts +3 -3
  171. package/types/CharacterType.js +2 -6
  172. package/types/DateTimeType.d.ts +3 -3
  173. package/types/DateTimeType.js +2 -6
  174. package/types/DateType.d.ts +3 -3
  175. package/types/DateType.js +2 -6
  176. package/types/DecimalType.d.ts +3 -3
  177. package/types/DecimalType.js +4 -7
  178. package/types/DoubleType.d.ts +3 -3
  179. package/types/DoubleType.js +3 -6
  180. package/types/EnumArrayType.d.ts +4 -4
  181. package/types/EnumArrayType.js +5 -10
  182. package/types/EnumType.d.ts +3 -3
  183. package/types/EnumType.js +2 -6
  184. package/types/FloatType.d.ts +3 -3
  185. package/types/FloatType.js +2 -6
  186. package/types/IntegerType.d.ts +3 -3
  187. package/types/IntegerType.js +2 -6
  188. package/types/IntervalType.d.ts +3 -3
  189. package/types/IntervalType.js +2 -6
  190. package/types/JsonType.d.ts +3 -3
  191. package/types/JsonType.js +2 -6
  192. package/types/MediumIntType.d.ts +3 -3
  193. package/types/MediumIntType.js +2 -6
  194. package/types/SmallIntType.d.ts +3 -3
  195. package/types/SmallIntType.js +2 -6
  196. package/types/StringType.d.ts +3 -3
  197. package/types/StringType.js +2 -6
  198. package/types/TextType.d.ts +3 -3
  199. package/types/TextType.js +2 -6
  200. package/types/TimeType.d.ts +3 -3
  201. package/types/TimeType.js +4 -8
  202. package/types/TinyIntType.d.ts +3 -3
  203. package/types/TinyIntType.js +3 -6
  204. package/types/Type.d.ts +2 -2
  205. package/types/Type.js +5 -9
  206. package/types/Uint8ArrayType.d.ts +3 -3
  207. package/types/Uint8ArrayType.js +3 -9
  208. package/types/UnknownType.d.ts +3 -3
  209. package/types/UnknownType.js +2 -6
  210. package/types/UuidType.d.ts +3 -3
  211. package/types/UuidType.js +2 -6
  212. package/types/index.d.ts +25 -25
  213. package/types/index.js +52 -79
  214. package/typings.d.ts +22 -20
  215. package/typings.js +34 -38
  216. package/unit-of-work/ChangeSet.d.ts +1 -1
  217. package/unit-of-work/ChangeSet.js +13 -17
  218. package/unit-of-work/ChangeSetComputer.d.ts +8 -7
  219. package/unit-of-work/ChangeSetComputer.js +26 -30
  220. package/unit-of-work/ChangeSetPersister.d.ts +7 -6
  221. package/unit-of-work/ChangeSetPersister.js +44 -47
  222. package/unit-of-work/CommitOrderCalculator.d.ts +1 -1
  223. package/unit-of-work/CommitOrderCalculator.js +6 -10
  224. package/unit-of-work/IdentityMap.d.ts +1 -1
  225. package/unit-of-work/IdentityMap.js +1 -5
  226. package/unit-of-work/UnitOfWork.d.ts +8 -7
  227. package/unit-of-work/UnitOfWork.js +171 -172
  228. package/unit-of-work/index.d.ts +6 -6
  229. package/unit-of-work/index.js +6 -22
  230. package/utils/AbstractSchemaGenerator.d.ts +6 -6
  231. package/utils/AbstractSchemaGenerator.js +7 -11
  232. package/utils/Configuration.d.ts +26 -27
  233. package/utils/Configuration.js +50 -55
  234. package/utils/ConfigurationLoader.d.ts +9 -8
  235. package/utils/ConfigurationLoader.js +71 -86
  236. package/utils/Cursor.d.ts +3 -3
  237. package/utils/Cursor.js +22 -25
  238. package/utils/DataloaderUtils.d.ts +4 -4
  239. package/utils/DataloaderUtils.js +12 -16
  240. package/utils/EntityComparator.d.ts +2 -2
  241. package/utils/EntityComparator.js +48 -52
  242. package/utils/NullHighlighter.d.ts +1 -1
  243. package/utils/NullHighlighter.js +1 -5
  244. package/utils/QueryHelper.d.ts +3 -3
  245. package/utils/QueryHelper.js +47 -51
  246. package/utils/RawQueryFragment.d.ts +1 -1
  247. package/utils/RawQueryFragment.js +16 -24
  248. package/utils/RequestContext.d.ts +2 -2
  249. package/utils/RequestContext.js +3 -7
  250. package/utils/TransactionContext.d.ts +1 -1
  251. package/utils/TransactionContext.js +4 -8
  252. package/utils/Utils.d.ts +16 -12
  253. package/utils/Utils.js +89 -93
  254. package/utils/clone.js +8 -11
  255. package/utils/index.d.ts +13 -13
  256. package/utils/index.js +13 -29
  257. package/utils/resolveContextProvider.d.ts +3 -3
  258. package/utils/resolveContextProvider.js +9 -12
  259. package/utils/upsert-utils.d.ts +3 -3
  260. package/utils/upsert-utils.js +5 -9
  261. package/index.mjs +0 -199
package/entity/wrap.js CHANGED
@@ -1,12 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.wrap = wrap;
4
- exports.helper = helper;
5
1
  /**
6
2
  * wraps entity type with WrappedEntity internal properties and helpers like init/isInitialized/populated/toJSON
7
3
  * use `preferHelper = true` to have access to the internal `__` properties like `__meta` or `__em`
8
4
  */
9
- function wrap(entity, preferHelper = false) {
5
+ export function wrap(entity, preferHelper = false) {
10
6
  if (!entity) {
11
7
  return entity;
12
8
  }
@@ -20,6 +16,6 @@ function wrap(entity, preferHelper = false) {
20
16
  * use `preferHelper = true` to have access to the internal `__` properties like `__meta` or `__em`
21
17
  * @internal
22
18
  */
23
- function helper(entity) {
19
+ export function helper(entity) {
24
20
  return entity.__helper;
25
21
  }
package/enums.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import type { Dictionary, EntityKey, ExpandProperty } from './typings';
2
- import type { Transaction } from './connections';
3
- import type { LogContext } from './logging';
1
+ import type { Dictionary, EntityKey, ExpandProperty } from './typings.js';
2
+ import type { Transaction } from './connections/Connection.js';
3
+ import type { LogContext } from './logging/Logger.js';
4
4
  export declare enum FlushMode {
5
5
  /** The `EntityManager` delays the flush until the current Transaction is committed. */
6
6
  COMMIT = "commit",
package/enums.js CHANGED
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DeferMode = exports.PlainObject = exports.EventTypeMap = exports.EventType = exports.IsolationLevel = exports.LockMode = exports.DataloaderType = exports.LoadStrategy = exports.Cascade = exports.ReferenceKind = exports.SCALAR_TYPES = exports.QueryFlag = exports.QueryOrderNumeric = exports.QueryOrder = exports.JSON_KEY_OPERATORS = exports.ARRAY_OPERATORS = exports.QueryOperator = exports.GroupOperator = exports.PopulatePath = exports.PopulateHint = exports.FlushMode = void 0;
4
- var FlushMode;
1
+ export var FlushMode;
5
2
  (function (FlushMode) {
6
3
  /** The `EntityManager` delays the flush until the current Transaction is committed. */
7
4
  FlushMode["COMMIT"] = "commit";
@@ -9,23 +6,23 @@ var FlushMode;
9
6
  FlushMode["AUTO"] = "auto";
10
7
  /** Flushes the `EntityManager` before every query. */
11
8
  FlushMode["ALWAYS"] = "always";
12
- })(FlushMode || (exports.FlushMode = FlushMode = {}));
13
- var PopulateHint;
9
+ })(FlushMode || (FlushMode = {}));
10
+ export var PopulateHint;
14
11
  (function (PopulateHint) {
15
12
  PopulateHint["INFER"] = "infer";
16
13
  PopulateHint["ALL"] = "all";
17
- })(PopulateHint || (exports.PopulateHint = PopulateHint = {}));
18
- var PopulatePath;
14
+ })(PopulateHint || (PopulateHint = {}));
15
+ export var PopulatePath;
19
16
  (function (PopulatePath) {
20
17
  PopulatePath["INFER"] = "$infer";
21
18
  PopulatePath["ALL"] = "*";
22
- })(PopulatePath || (exports.PopulatePath = PopulatePath = {}));
23
- var GroupOperator;
19
+ })(PopulatePath || (PopulatePath = {}));
20
+ export var GroupOperator;
24
21
  (function (GroupOperator) {
25
22
  GroupOperator["$and"] = "and";
26
23
  GroupOperator["$or"] = "or";
27
- })(GroupOperator || (exports.GroupOperator = GroupOperator = {}));
28
- var QueryOperator;
24
+ })(GroupOperator || (GroupOperator = {}));
25
+ export var QueryOperator;
29
26
  (function (QueryOperator) {
30
27
  QueryOperator["$eq"] = "=";
31
28
  QueryOperator["$in"] = "in";
@@ -50,8 +47,8 @@ var QueryOperator;
50
47
  QueryOperator["$hasKey"] = "?";
51
48
  QueryOperator["$hasKeys"] = "?&";
52
49
  QueryOperator["$hasSomeKeys"] = "?|";
53
- })(QueryOperator || (exports.QueryOperator = QueryOperator = {}));
54
- exports.ARRAY_OPERATORS = [
50
+ })(QueryOperator || (QueryOperator = {}));
51
+ export const ARRAY_OPERATORS = [
55
52
  '$eq',
56
53
  '$gt',
57
54
  '$gte',
@@ -62,12 +59,12 @@ exports.ARRAY_OPERATORS = [
62
59
  '$contains',
63
60
  '$contained',
64
61
  ];
65
- exports.JSON_KEY_OPERATORS = [
62
+ export const JSON_KEY_OPERATORS = [
66
63
  '$hasKey',
67
64
  '$hasKeys',
68
65
  '$hasSomeKeys',
69
66
  ];
70
- var QueryOrder;
67
+ export var QueryOrder;
71
68
  (function (QueryOrder) {
72
69
  QueryOrder["ASC"] = "ASC";
73
70
  QueryOrder["ASC_NULLS_LAST"] = "ASC NULLS LAST";
@@ -81,13 +78,13 @@ var QueryOrder;
81
78
  QueryOrder["desc"] = "desc";
82
79
  QueryOrder["desc_nulls_last"] = "desc nulls last";
83
80
  QueryOrder["desc_nulls_first"] = "desc nulls first";
84
- })(QueryOrder || (exports.QueryOrder = QueryOrder = {}));
85
- var QueryOrderNumeric;
81
+ })(QueryOrder || (QueryOrder = {}));
82
+ export var QueryOrderNumeric;
86
83
  (function (QueryOrderNumeric) {
87
84
  QueryOrderNumeric[QueryOrderNumeric["ASC"] = 1] = "ASC";
88
85
  QueryOrderNumeric[QueryOrderNumeric["DESC"] = -1] = "DESC";
89
- })(QueryOrderNumeric || (exports.QueryOrderNumeric = QueryOrderNumeric = {}));
90
- var QueryFlag;
86
+ })(QueryOrderNumeric || (QueryOrderNumeric = {}));
87
+ export var QueryFlag;
91
88
  (function (QueryFlag) {
92
89
  QueryFlag["DISTINCT"] = "DISTINCT";
93
90
  QueryFlag["PAGINATE"] = "PAGINATE";
@@ -99,9 +96,9 @@ var QueryFlag;
99
96
  QueryFlag["AUTO_JOIN_ONE_TO_ONE_OWNER"] = "AUTO_JOIN_ONE_TO_ONE_OWNER";
100
97
  QueryFlag["INFER_POPULATE"] = "INFER_POPULATE";
101
98
  QueryFlag["IDENTITY_INSERT"] = "IDENTITY_INSERT";
102
- })(QueryFlag || (exports.QueryFlag = QueryFlag = {}));
103
- exports.SCALAR_TYPES = ['string', 'number', 'boolean', 'bigint', 'Date', 'Buffer', 'RegExp'];
104
- var ReferenceKind;
99
+ })(QueryFlag || (QueryFlag = {}));
100
+ export const SCALAR_TYPES = ['string', 'number', 'boolean', 'bigint', 'Date', 'Buffer', 'RegExp'];
101
+ export var ReferenceKind;
105
102
  (function (ReferenceKind) {
106
103
  ReferenceKind["SCALAR"] = "scalar";
107
104
  ReferenceKind["ONE_TO_ONE"] = "1:1";
@@ -109,8 +106,8 @@ var ReferenceKind;
109
106
  ReferenceKind["MANY_TO_ONE"] = "m:1";
110
107
  ReferenceKind["MANY_TO_MANY"] = "m:n";
111
108
  ReferenceKind["EMBEDDED"] = "embedded";
112
- })(ReferenceKind || (exports.ReferenceKind = ReferenceKind = {}));
113
- var Cascade;
109
+ })(ReferenceKind || (ReferenceKind = {}));
110
+ export var Cascade;
114
111
  (function (Cascade) {
115
112
  Cascade["PERSIST"] = "persist";
116
113
  Cascade["MERGE"] = "merge";
@@ -120,20 +117,20 @@ var Cascade;
120
117
  Cascade["SCHEDULE_ORPHAN_REMOVAL"] = "schedule_orphan_removal";
121
118
  /** @internal */
122
119
  Cascade["CANCEL_ORPHAN_REMOVAL"] = "cancel_orphan_removal";
123
- })(Cascade || (exports.Cascade = Cascade = {}));
124
- var LoadStrategy;
120
+ })(Cascade || (Cascade = {}));
121
+ export var LoadStrategy;
125
122
  (function (LoadStrategy) {
126
123
  LoadStrategy["SELECT_IN"] = "select-in";
127
124
  LoadStrategy["JOINED"] = "joined";
128
- })(LoadStrategy || (exports.LoadStrategy = LoadStrategy = {}));
129
- var DataloaderType;
125
+ })(LoadStrategy || (LoadStrategy = {}));
126
+ export var DataloaderType;
130
127
  (function (DataloaderType) {
131
128
  DataloaderType[DataloaderType["NONE"] = 0] = "NONE";
132
129
  DataloaderType[DataloaderType["REFERENCE"] = 1] = "REFERENCE";
133
130
  DataloaderType[DataloaderType["COLLECTION"] = 2] = "COLLECTION";
134
131
  DataloaderType[DataloaderType["ALL"] = 3] = "ALL";
135
- })(DataloaderType || (exports.DataloaderType = DataloaderType = {}));
136
- var LockMode;
132
+ })(DataloaderType || (DataloaderType = {}));
133
+ export var LockMode;
137
134
  (function (LockMode) {
138
135
  LockMode[LockMode["NONE"] = 0] = "NONE";
139
136
  LockMode[LockMode["OPTIMISTIC"] = 1] = "OPTIMISTIC";
@@ -143,16 +140,16 @@ var LockMode;
143
140
  LockMode[LockMode["PESSIMISTIC_WRITE_OR_FAIL"] = 5] = "PESSIMISTIC_WRITE_OR_FAIL";
144
141
  LockMode[LockMode["PESSIMISTIC_PARTIAL_READ"] = 6] = "PESSIMISTIC_PARTIAL_READ";
145
142
  LockMode[LockMode["PESSIMISTIC_READ_OR_FAIL"] = 7] = "PESSIMISTIC_READ_OR_FAIL";
146
- })(LockMode || (exports.LockMode = LockMode = {}));
147
- var IsolationLevel;
143
+ })(LockMode || (LockMode = {}));
144
+ export var IsolationLevel;
148
145
  (function (IsolationLevel) {
149
146
  IsolationLevel["READ_UNCOMMITTED"] = "read uncommitted";
150
147
  IsolationLevel["READ_COMMITTED"] = "read committed";
151
148
  IsolationLevel["SNAPSHOT"] = "snapshot";
152
149
  IsolationLevel["REPEATABLE_READ"] = "repeatable read";
153
150
  IsolationLevel["SERIALIZABLE"] = "serializable";
154
- })(IsolationLevel || (exports.IsolationLevel = IsolationLevel = {}));
155
- var EventType;
151
+ })(IsolationLevel || (IsolationLevel = {}));
152
+ export var EventType;
156
153
  (function (EventType) {
157
154
  EventType["onInit"] = "onInit";
158
155
  EventType["onLoad"] = "onLoad";
@@ -173,16 +170,15 @@ var EventType;
173
170
  EventType["afterTransactionCommit"] = "afterTransactionCommit";
174
171
  EventType["beforeTransactionRollback"] = "beforeTransactionRollback";
175
172
  EventType["afterTransactionRollback"] = "afterTransactionRollback";
176
- })(EventType || (exports.EventType = EventType = {}));
177
- exports.EventTypeMap = Object.keys(EventType).reduce((a, b, i) => {
173
+ })(EventType || (EventType = {}));
174
+ export const EventTypeMap = Object.keys(EventType).reduce((a, b, i) => {
178
175
  a[b] = i;
179
176
  return a;
180
177
  }, {});
181
- class PlainObject {
178
+ export class PlainObject {
182
179
  }
183
- exports.PlainObject = PlainObject;
184
- var DeferMode;
180
+ export var DeferMode;
185
181
  (function (DeferMode) {
186
182
  DeferMode["INITIALLY_IMMEDIATE"] = "immediate";
187
183
  DeferMode["INITIALLY_DEFERRED"] = "deferred";
188
- })(DeferMode || (exports.DeferMode = DeferMode = {}));
184
+ })(DeferMode || (DeferMode = {}));
package/errors.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { AnyEntity, Constructor, Dictionary, EntityMetadata, EntityProperty, IPrimaryKey } from './typings';
1
+ import type { AnyEntity, Constructor, Dictionary, EntityMetadata, EntityProperty, IPrimaryKey } from './typings.js';
2
2
  export declare class ValidationError<T extends AnyEntity = AnyEntity> extends Error {
3
3
  readonly entity?: T | undefined;
4
4
  constructor(message: string, entity?: T | undefined);
package/errors.js CHANGED
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotFoundError = exports.MetadataError = exports.OptimisticLockError = exports.CursorError = exports.ValidationError = void 0;
4
- const node_util_1 = require("node:util");
5
- class ValidationError extends Error {
1
+ import { inspect } from 'node:util';
2
+ export class ValidationError extends Error {
6
3
  entity;
7
4
  constructor(message, entity) {
8
5
  super(message);
@@ -19,7 +16,7 @@ class ValidationError extends Error {
19
16
  }
20
17
  static fromWrongPropertyType(entity, property, expectedType, givenType, givenValue) {
21
18
  const entityName = entity.constructor.name;
22
- const msg = `Trying to set ${entityName}.${property} of type '${expectedType}' to ${(0, node_util_1.inspect)(givenValue)} of type '${givenType}'`;
19
+ const msg = `Trying to set ${entityName}.${property} of type '${expectedType}' to ${inspect(givenValue)} of type '${givenType}'`;
23
20
  return new ValidationError(msg);
24
21
  }
25
22
  static fromWrongRepositoryType(entityName, repoType, method) {
@@ -42,13 +39,12 @@ class ValidationError extends Error {
42
39
  }
43
40
  static notEntity(owner, prop, data) {
44
41
  const type = Object.prototype.toString.call(data).match(/\[object (\w+)]/)[1].toLowerCase();
45
- return new ValidationError(`Entity of type ${prop.type} expected for property ${owner.constructor.name}.${prop.name}, ${(0, node_util_1.inspect)(data)} of type ${type} given. If you are using Object.assign(entity, data), use em.assign(entity, data) instead.`);
42
+ return new ValidationError(`Entity of type ${prop.type} expected for property ${owner.constructor.name}.${prop.name}, ${inspect(data)} of type ${type} given. If you are using Object.assign(entity, data), use em.assign(entity, data) instead.`);
46
43
  }
47
44
  static notDiscoveredEntity(data, meta, action = 'persist') {
48
- /* istanbul ignore next */
45
+ /* v8 ignore next */
49
46
  const type = meta?.className ?? Object.prototype.toString.call(data).match(/\[object (\w+)]/)[1].toLowerCase();
50
47
  let err = `Trying to ${action} not discovered entity of type ${type}.`;
51
- /* istanbul ignore else */
52
48
  if (meta) {
53
49
  err += ` Entity with this name was discovered, but not the prototype you are passing to the ORM. If using EntitySchema, be sure to point to the implementation via \`class\`.`;
54
50
  }
@@ -66,7 +62,7 @@ class ValidationError extends Error {
66
62
  }
67
63
  static propertyRequired(entity, property) {
68
64
  const entityName = entity.__meta.className;
69
- return new ValidationError(`Value for ${entityName}.${property.name} is required, '${entity[property.name]}' found\nentity: ${(0, node_util_1.inspect)(entity)}`, entity);
65
+ return new ValidationError(`Value for ${entityName}.${property.name} is required, '${entity[property.name]}' found\nentity: ${inspect(entity)}`, entity);
70
66
  }
71
67
  static cannotModifyInverseCollection(owner, property) {
72
68
  const inverseCollection = `${owner.constructor.name}.${property.name}`;
@@ -96,14 +92,13 @@ class ValidationError extends Error {
96
92
  return new ValidationError('Using global EntityManager instance methods for context specific actions is disallowed. If you need to work with the global instance\'s identity map, use `allowGlobalContext` configuration option or `fork()` instead.');
97
93
  }
98
94
  static cannotUseOperatorsInsideEmbeddables(className, propName, payload) {
99
- return new ValidationError(`Using operators inside embeddables is not allowed, move the operator above. (property: ${className}.${propName}, payload: ${(0, node_util_1.inspect)(payload)})`);
95
+ return new ValidationError(`Using operators inside embeddables is not allowed, move the operator above. (property: ${className}.${propName}, payload: ${inspect(payload)})`);
100
96
  }
101
97
  static invalidEmbeddableQuery(className, propName, embeddableType) {
102
98
  return new ValidationError(`Invalid query for entity '${className}', property '${propName}' does not exist in embeddable '${embeddableType}'`);
103
99
  }
104
100
  }
105
- exports.ValidationError = ValidationError;
106
- class CursorError extends ValidationError {
101
+ export class CursorError extends ValidationError {
107
102
  static entityNotPopulated(entity, prop) {
108
103
  return new CursorError(`Cannot create cursor, value for '${entity.constructor.name}.${prop}' is missing.`);
109
104
  }
@@ -111,8 +106,7 @@ class CursorError extends ValidationError {
111
106
  return new CursorError(`Invalid cursor condition, value for '${entityName}.${prop}' is missing.`);
112
107
  }
113
108
  }
114
- exports.CursorError = CursorError;
115
- class OptimisticLockError extends ValidationError {
109
+ export class OptimisticLockError extends ValidationError {
116
110
  static notVersioned(meta) {
117
111
  return new OptimisticLockError(`Cannot obtain optimistic lock on unversioned entity ${meta.className}`);
118
112
  }
@@ -127,8 +121,7 @@ class OptimisticLockError extends ValidationError {
127
121
  return new OptimisticLockError(`The optimistic lock failed, version ${expectedLockVersion} was expected, but is actually ${actualLockVersion}`, entity);
128
122
  }
129
123
  }
130
- exports.OptimisticLockError = OptimisticLockError;
131
- class MetadataError extends ValidationError {
124
+ export class MetadataError extends ValidationError {
132
125
  static fromMissingPrimaryKey(meta) {
133
126
  return new MetadataError(`${meta.className} entity is missing @PrimaryKey()`);
134
127
  }
@@ -158,7 +151,7 @@ class MetadataError extends ValidationError {
158
151
  static fromInversideSidePrimary(meta, owner, prop) {
159
152
  return new MetadataError(`${meta.className}.${prop.name} cannot be primary key as it is defined as inverse side. Maybe you should swap the use of 'inversedBy' and 'mappedBy'.`);
160
153
  }
161
- /* istanbul ignore next */
154
+ /* v8 ignore next 3 */
162
155
  static entityNotFound(name, path) {
163
156
  return new MetadataError(`Entity '${name}' not found in ${path}`);
164
157
  }
@@ -208,7 +201,7 @@ class MetadataError extends ValidationError {
208
201
  return this.fromMessage(meta, prop, `is non-persistent relation which targets composite primary key. This is not supported and will cause issues, 'persist: false' should be added to the properties representing single columns instead.`);
209
202
  }
210
203
  static propertyTargetsEntityType(meta, prop, target) {
211
- /* istanbul ignore next */
204
+ /* v8 ignore next */
212
205
  const suggestion = target.embeddable ? 'Embedded' : 'ManyToOne';
213
206
  return this.fromMessage(meta, prop, `is defined as scalar @Property(), but its type is a discovered entity ${target.className}. Maybe you want to use @${suggestion}() decorator instead?`);
214
207
  }
@@ -219,13 +212,11 @@ class MetadataError extends ValidationError {
219
212
  return new MetadataError(`${meta.className}.${prop.name} ${message}`);
220
213
  }
221
214
  }
222
- exports.MetadataError = MetadataError;
223
- class NotFoundError extends ValidationError {
215
+ export class NotFoundError extends ValidationError {
224
216
  static findOneFailed(name, where) {
225
- return new NotFoundError(`${name} not found (${(0, node_util_1.inspect)(where)})`);
217
+ return new NotFoundError(`${name} not found (${inspect(where)})`);
226
218
  }
227
219
  static findExactlyOneFailed(name, where) {
228
- return new NotFoundError(`Wrong number of ${name} entities found for query ${(0, node_util_1.inspect)(where)}, expected exactly one`);
220
+ return new NotFoundError(`Wrong number of ${name} entities found for query ${inspect(where)}, expected exactly one`);
229
221
  }
230
222
  }
231
- exports.NotFoundError = NotFoundError;
@@ -1,6 +1,6 @@
1
- import type { EntityMetadata } from '../typings';
2
- import type { EventArgs, EventSubscriber, FlushEventArgs, TransactionEventArgs } from './EventSubscriber';
3
- import { EventType, type TransactionEventType } from '../enums';
1
+ import type { EntityMetadata } from '../typings.js';
2
+ import type { EventArgs, EventSubscriber, FlushEventArgs, TransactionEventArgs } from './EventSubscriber.js';
3
+ import { EventType, type TransactionEventType } from '../enums.js';
4
4
  export declare class EventManager {
5
5
  private readonly listeners;
6
6
  private readonly entities;
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EventManager = void 0;
4
- const Utils_1 = require("../utils/Utils");
5
- const enums_1 = require("../enums");
6
- class EventManager {
1
+ import { Utils } from '../utils/Utils.js';
2
+ import { EventType, EventTypeMap } from '../enums.js';
3
+ export class EventManager {
7
4
  listeners = {};
8
5
  entities = new Map();
9
6
  cache = new Map();
@@ -15,7 +12,7 @@ class EventManager {
15
12
  this.subscribers.push(subscriber);
16
13
  this.entities.set(subscriber, this.getSubscribedEntities(subscriber));
17
14
  this.cache.clear();
18
- Utils_1.Utils.keys(enums_1.EventType)
15
+ Utils.keys(EventType)
19
16
  .filter(event => event in subscriber)
20
17
  .forEach(event => {
21
18
  this.listeners[event] ??= [];
@@ -39,13 +36,13 @@ class EventManager {
39
36
  listeners.push(listener[event].bind(listener));
40
37
  }
41
38
  }
42
- if (event === enums_1.EventType.onInit) {
39
+ if (event === EventType.onInit) {
43
40
  return listeners.forEach(listener => listener(args));
44
41
  }
45
- return Utils_1.Utils.runSerial(listeners, listener => listener(args));
42
+ return Utils.runSerial(listeners, listener => listener(args));
46
43
  }
47
44
  hasListeners(event, meta) {
48
- const cacheKey = meta._id + enums_1.EventTypeMap[event];
45
+ const cacheKey = meta._id + EventTypeMap[event];
49
46
  if (this.cache.has(cacheKey)) {
50
47
  return this.cache.get(cacheKey);
51
48
  }
@@ -71,7 +68,6 @@ class EventManager {
71
68
  if (!listener.getSubscribedEntities) {
72
69
  return [];
73
70
  }
74
- return listener.getSubscribedEntities().map(name => Utils_1.Utils.className(name));
71
+ return listener.getSubscribedEntities().map(name => Utils.className(name));
75
72
  }
76
73
  }
77
- exports.EventManager = EventManager;
@@ -1,7 +1,8 @@
1
- import type { EntityName, EntityMetadata } from '../typings';
2
- import type { EntityManager } from '../EntityManager';
3
- import type { ChangeSet, UnitOfWork } from '../unit-of-work';
4
- import type { Transaction } from '../connections';
1
+ import type { EntityName, EntityMetadata } from '../typings.js';
2
+ import type { EntityManager } from '../EntityManager.js';
3
+ import type { UnitOfWork } from '../unit-of-work/UnitOfWork.js';
4
+ import type { ChangeSet } from '../unit-of-work/ChangeSet.js';
5
+ import type { Transaction } from '../connections/Connection.js';
5
6
  export interface EventArgs<T> {
6
7
  entity: T;
7
8
  em: EntityManager;
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,6 +1,6 @@
1
- import type { Transaction } from '../connections';
2
- import type { EntityManager } from '../EntityManager';
3
- import type { TransactionEventType } from '../enums';
1
+ import type { Transaction } from '../connections/Connection.js';
2
+ import type { EntityManager } from '../EntityManager.js';
3
+ import type { TransactionEventType } from '../enums.js';
4
4
  export declare class TransactionEventBroadcaster {
5
5
  private readonly em;
6
6
  readonly context?: {
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TransactionEventBroadcaster = void 0;
4
- class TransactionEventBroadcaster {
1
+ export class TransactionEventBroadcaster {
5
2
  em;
6
3
  context;
7
4
  constructor(em, context) {
@@ -16,4 +13,3 @@ class TransactionEventBroadcaster {
16
13
  });
17
14
  }
18
15
  }
19
- exports.TransactionEventBroadcaster = TransactionEventBroadcaster;
package/events/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './EventSubscriber';
2
- export * from './EventManager';
3
- export * from './TransactionEventBroadcaster';
1
+ export * from './EventSubscriber.js';
2
+ export * from './EventManager.js';
3
+ export * from './TransactionEventBroadcaster.js';
package/events/index.js CHANGED
@@ -1,19 +1,3 @@
1
- "use strict";
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("./EventSubscriber"), exports);
18
- __exportStar(require("./EventManager"), exports);
19
- __exportStar(require("./TransactionEventBroadcaster"), exports);
1
+ export * from './EventSubscriber.js';
2
+ export * from './EventManager.js';
3
+ export * from './TransactionEventBroadcaster.js';
package/exceptions.js CHANGED
@@ -1,10 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UniqueConstraintViolationException = exports.TableNotFoundException = exports.TableExistsException = exports.SyntaxErrorException = exports.ReadOnlyException = exports.NotNullConstraintViolationException = exports.NonUniqueFieldNameException = exports.LockWaitTimeoutException = exports.InvalidFieldNameException = exports.CheckConstraintViolationException = exports.ForeignKeyConstraintViolationException = exports.DeadlockException = exports.DatabaseObjectNotFoundException = exports.DatabaseObjectExistsException = exports.ConstraintViolationException = exports.ServerException = exports.ConnectionException = exports.DriverException = void 0;
4
1
  /**
5
2
  * Base class for all errors detected in the driver.
6
3
  */
7
- class DriverException extends Error {
4
+ export class DriverException extends Error {
8
5
  code;
9
6
  errno;
10
7
  sqlState;
@@ -18,25 +15,21 @@ class DriverException extends Error {
18
15
  this.stack += '\n\n' + previous.stack.split('\n').filter(l => l.trim().startsWith('at ')).join('\n');
19
16
  }
20
17
  }
21
- exports.DriverException = DriverException;
22
18
  /**
23
19
  * Base class for all connection related errors detected in the driver.
24
20
  */
25
- class ConnectionException extends DriverException {
21
+ export class ConnectionException extends DriverException {
26
22
  }
27
- exports.ConnectionException = ConnectionException;
28
23
  /**
29
24
  * Base class for all server related errors detected in the driver.
30
25
  */
31
- class ServerException extends DriverException {
26
+ export class ServerException extends DriverException {
32
27
  }
33
- exports.ServerException = ServerException;
34
28
  /**
35
29
  * Base class for all constraint violation related errors detected in the driver.
36
30
  */
37
- class ConstraintViolationException extends ServerException {
31
+ export class ConstraintViolationException extends ServerException {
38
32
  }
39
- exports.ConstraintViolationException = ConstraintViolationException;
40
33
  /**
41
34
  * Base class for all already existing database object related errors detected in the driver.
42
35
  *
@@ -44,9 +37,8 @@ exports.ConstraintViolationException = ConstraintViolationException;
44
37
  * such as schemas, tables, views, sequences, triggers, constraints, indexes,
45
38
  * functions, stored procedures etc.
46
39
  */
47
- class DatabaseObjectExistsException extends ServerException {
40
+ export class DatabaseObjectExistsException extends ServerException {
48
41
  }
49
- exports.DatabaseObjectExistsException = DatabaseObjectExistsException;
50
42
  /**
51
43
  * Base class for all unknown database object related errors detected in the driver.
52
44
  *
@@ -54,78 +46,65 @@ exports.DatabaseObjectExistsException = DatabaseObjectExistsException;
54
46
  * such as schemas, tables, views, sequences, triggers, constraints, indexes,
55
47
  * functions, stored procedures etc.
56
48
  */
57
- class DatabaseObjectNotFoundException extends ServerException {
49
+ export class DatabaseObjectNotFoundException extends ServerException {
58
50
  }
59
- exports.DatabaseObjectNotFoundException = DatabaseObjectNotFoundException;
60
51
  /**
61
52
  * Exception for a deadlock error of a transaction detected in the driver.
62
53
  */
63
- class DeadlockException extends ServerException {
54
+ export class DeadlockException extends ServerException {
64
55
  }
65
- exports.DeadlockException = DeadlockException;
66
56
  /**
67
57
  * Exception for a foreign key constraint violation detected in the driver.
68
58
  */
69
- class ForeignKeyConstraintViolationException extends ConstraintViolationException {
59
+ export class ForeignKeyConstraintViolationException extends ConstraintViolationException {
70
60
  }
71
- exports.ForeignKeyConstraintViolationException = ForeignKeyConstraintViolationException;
72
61
  /**
73
62
  * Exception for a check constraint violation detected in the driver.
74
63
  */
75
- class CheckConstraintViolationException extends ConstraintViolationException {
64
+ export class CheckConstraintViolationException extends ConstraintViolationException {
76
65
  }
77
- exports.CheckConstraintViolationException = CheckConstraintViolationException;
78
66
  /**
79
67
  * Exception for an invalid specified field name in a statement detected in the driver.
80
68
  */
81
- class InvalidFieldNameException extends ServerException {
69
+ export class InvalidFieldNameException extends ServerException {
82
70
  }
83
- exports.InvalidFieldNameException = InvalidFieldNameException;
84
71
  /**
85
72
  * Exception for a lock wait timeout error of a transaction detected in the driver.
86
73
  */
87
- class LockWaitTimeoutException extends ServerException {
74
+ export class LockWaitTimeoutException extends ServerException {
88
75
  }
89
- exports.LockWaitTimeoutException = LockWaitTimeoutException;
90
76
  /**
91
77
  * Exception for a non-unique/ambiguous specified field name in a statement detected in the driver.
92
78
  */
93
- class NonUniqueFieldNameException extends ServerException {
79
+ export class NonUniqueFieldNameException extends ServerException {
94
80
  }
95
- exports.NonUniqueFieldNameException = NonUniqueFieldNameException;
96
81
  /**
97
82
  * Exception for a NOT NULL constraint violation detected in the driver.
98
83
  */
99
- class NotNullConstraintViolationException extends ConstraintViolationException {
84
+ export class NotNullConstraintViolationException extends ConstraintViolationException {
100
85
  }
101
- exports.NotNullConstraintViolationException = NotNullConstraintViolationException;
102
86
  /**
103
87
  * Exception for a write operation attempt on a read-only database element detected in the driver.
104
88
  */
105
- class ReadOnlyException extends ServerException {
89
+ export class ReadOnlyException extends ServerException {
106
90
  }
107
- exports.ReadOnlyException = ReadOnlyException;
108
91
  /**
109
92
  * Exception for a syntax error in a statement detected in the driver.
110
93
  */
111
- class SyntaxErrorException extends ServerException {
94
+ export class SyntaxErrorException extends ServerException {
112
95
  }
113
- exports.SyntaxErrorException = SyntaxErrorException;
114
96
  /**
115
97
  * Exception for an already existing table referenced in a statement detected in the driver.
116
98
  */
117
- class TableExistsException extends DatabaseObjectExistsException {
99
+ export class TableExistsException extends DatabaseObjectExistsException {
118
100
  }
119
- exports.TableExistsException = TableExistsException;
120
101
  /**
121
102
  * Exception for an unknown table referenced in a statement detected in the driver.
122
103
  */
123
- class TableNotFoundException extends DatabaseObjectNotFoundException {
104
+ export class TableNotFoundException extends DatabaseObjectNotFoundException {
124
105
  }
125
- exports.TableNotFoundException = TableNotFoundException;
126
106
  /**
127
107
  * Exception for a unique constraint violation detected in the driver.
128
108
  */
129
- class UniqueConstraintViolationException extends ConstraintViolationException {
109
+ export class UniqueConstraintViolationException extends ConstraintViolationException {
130
110
  }
131
- exports.UniqueConstraintViolationException = UniqueConstraintViolationException;
@@ -1,8 +1,8 @@
1
- import type { EntityData, EntityMetadata, EntityProperty, IHydrator } from '../typings';
2
- import type { EntityFactory } from '../entity/EntityFactory';
3
- import type { Platform } from '../platforms/Platform';
4
- import type { MetadataStorage } from '../metadata/MetadataStorage';
5
- import type { Configuration } from '../utils/Configuration';
1
+ import type { EntityData, EntityMetadata, EntityProperty, IHydrator } from '../typings.js';
2
+ import type { EntityFactory } from '../entity/EntityFactory.js';
3
+ import type { Platform } from '../platforms/Platform.js';
4
+ import type { MetadataStorage } from '../metadata/MetadataStorage.js';
5
+ import type { Configuration } from '../utils/Configuration.js';
6
6
  export declare abstract class Hydrator implements IHydrator {
7
7
  protected readonly metadata: MetadataStorage;
8
8
  protected readonly platform: Platform;
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Hydrator = void 0;
4
- /* istanbul ignore next */
5
- class Hydrator {
1
+ /* v8 ignore start */
2
+ export class Hydrator {
6
3
  metadata;
7
4
  platform;
8
5
  config;
@@ -48,4 +45,4 @@ class Hydrator {
48
45
  entity[prop.name] = data[prop.name];
49
46
  }
50
47
  }
51
- exports.Hydrator = Hydrator;
48
+ /* v8 ignore stop */