joist-core 2.5.0-next.1 → 2.5.0-next.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.
Files changed (986) hide show
  1. package/build/BaseEntity.cjs +9 -3
  2. package/build/BaseEntity.cjs.map +1 -1
  3. package/build/BaseEntity.d.cts +4 -4
  4. package/build/BaseEntity.d.cts.map +1 -1
  5. package/build/BaseEntity.d.mts +4 -4
  6. package/build/BaseEntity.d.mts.map +1 -1
  7. package/build/BaseEntity.js +9 -3
  8. package/build/BaseEntity.js.map +1 -1
  9. package/build/Entity.cjs +2 -3
  10. package/build/Entity.d.cts +0 -2
  11. package/build/Entity.d.cts.map +1 -1
  12. package/build/Entity.d.mts +0 -2
  13. package/build/Entity.d.mts.map +1 -1
  14. package/build/Entity.js +2 -3
  15. package/build/EntityFields.d.cts +0 -2
  16. package/build/EntityFields.d.cts.map +1 -1
  17. package/build/EntityFields.d.mts +0 -2
  18. package/build/EntityFields.d.mts.map +1 -1
  19. package/build/EntityManager.cjs +54 -52
  20. package/build/EntityManager.cjs.map +1 -1
  21. package/build/EntityManager.d.cts +34 -36
  22. package/build/EntityManager.d.cts.map +1 -1
  23. package/build/EntityManager.d.mts +34 -36
  24. package/build/EntityManager.d.mts.map +1 -1
  25. package/build/EntityManager.js +54 -52
  26. package/build/EntityManager.js.map +1 -1
  27. package/build/EntityMetadata.cjs +3 -4
  28. package/build/EntityMetadata.cjs.map +1 -1
  29. package/build/EntityMetadata.d.cts +8 -6
  30. package/build/EntityMetadata.d.cts.map +1 -1
  31. package/build/EntityMetadata.d.mts +8 -6
  32. package/build/EntityMetadata.d.mts.map +1 -1
  33. package/build/EntityMetadata.js +3 -4
  34. package/build/EntityMetadata.js.map +1 -1
  35. package/build/EnumMetadata.d.cts +0 -2
  36. package/build/EnumMetadata.d.cts.map +1 -1
  37. package/build/EnumMetadata.d.mts +0 -2
  38. package/build/EnumMetadata.d.mts.map +1 -1
  39. package/build/IndexManager.cjs +4 -5
  40. package/build/IndexManager.d.cts +1 -3
  41. package/build/IndexManager.d.cts.map +1 -1
  42. package/build/IndexManager.d.mts +1 -3
  43. package/build/IndexManager.d.mts.map +1 -1
  44. package/build/IndexManager.js +4 -5
  45. package/build/InstanceData.cjs +9 -5
  46. package/build/InstanceData.cjs.map +1 -1
  47. package/build/InstanceData.d.cts +8 -5
  48. package/build/InstanceData.d.cts.map +1 -1
  49. package/build/InstanceData.d.mts +8 -5
  50. package/build/InstanceData.d.mts.map +1 -1
  51. package/build/InstanceData.js +9 -5
  52. package/build/InstanceData.js.map +1 -1
  53. package/build/PluginManager.cjs +3 -4
  54. package/build/PluginManager.cjs.map +1 -1
  55. package/build/PluginManager.d.cts +7 -6
  56. package/build/PluginManager.d.cts.map +1 -1
  57. package/build/PluginManager.d.mts +7 -6
  58. package/build/PluginManager.d.mts.map +1 -1
  59. package/build/PluginManager.js +3 -4
  60. package/build/PluginManager.js.map +1 -1
  61. package/build/RowData.cjs +1 -2
  62. package/build/RowData.d.cts +0 -2
  63. package/build/RowData.d.cts.map +1 -1
  64. package/build/RowData.d.mts +0 -2
  65. package/build/RowData.d.mts.map +1 -1
  66. package/build/RowData.js +1 -2
  67. package/build/_virtual/_rolldown/runtime.cjs +1 -2
  68. package/build/batchloaders/BatchLoader.cjs +1 -2
  69. package/build/batchloaders/BatchLoader.d.cts +0 -2
  70. package/build/batchloaders/BatchLoader.d.cts.map +1 -1
  71. package/build/batchloaders/BatchLoader.d.mts +0 -2
  72. package/build/batchloaders/BatchLoader.d.mts.map +1 -1
  73. package/build/batchloaders/BatchLoader.js +1 -2
  74. package/build/batchloaders/enumCollectionBatchLoader.cjs +3 -4
  75. package/build/batchloaders/enumCollectionBatchLoader.d.cts +1 -3
  76. package/build/batchloaders/enumCollectionBatchLoader.d.cts.map +1 -1
  77. package/build/batchloaders/enumCollectionBatchLoader.d.mts +1 -3
  78. package/build/batchloaders/enumCollectionBatchLoader.d.mts.map +1 -1
  79. package/build/batchloaders/enumCollectionBatchLoader.js +3 -4
  80. package/build/batchloaders/loadBatchLoader.cjs +5 -6
  81. package/build/batchloaders/loadBatchLoader.d.cts +2 -4
  82. package/build/batchloaders/loadBatchLoader.d.cts.map +1 -1
  83. package/build/batchloaders/loadBatchLoader.d.mts +2 -4
  84. package/build/batchloaders/loadBatchLoader.d.mts.map +1 -1
  85. package/build/batchloaders/loadBatchLoader.js +5 -6
  86. package/build/batchloaders/manyToManyBatchLoader.cjs +4 -5
  87. package/build/batchloaders/manyToManyBatchLoader.d.cts +1 -3
  88. package/build/batchloaders/manyToManyBatchLoader.d.cts.map +1 -1
  89. package/build/batchloaders/manyToManyBatchLoader.d.mts +1 -3
  90. package/build/batchloaders/manyToManyBatchLoader.d.mts.map +1 -1
  91. package/build/batchloaders/manyToManyBatchLoader.js +4 -5
  92. package/build/batchloaders/oneToManyBatchLoader.cjs +4 -5
  93. package/build/batchloaders/oneToManyBatchLoader.d.cts +2 -4
  94. package/build/batchloaders/oneToManyBatchLoader.d.cts.map +1 -1
  95. package/build/batchloaders/oneToManyBatchLoader.d.mts +2 -4
  96. package/build/batchloaders/oneToManyBatchLoader.d.mts.map +1 -1
  97. package/build/batchloaders/oneToManyBatchLoader.js +4 -5
  98. package/build/batchloaders/oneToOneBatchLoader.cjs +6 -7
  99. package/build/batchloaders/oneToOneBatchLoader.d.cts +2 -4
  100. package/build/batchloaders/oneToOneBatchLoader.d.cts.map +1 -1
  101. package/build/batchloaders/oneToOneBatchLoader.d.mts +2 -4
  102. package/build/batchloaders/oneToOneBatchLoader.d.mts.map +1 -1
  103. package/build/batchloaders/oneToOneBatchLoader.js +6 -7
  104. package/build/batchloaders/populateBatchLoader.cjs +11 -12
  105. package/build/batchloaders/populateBatchLoader.d.cts +2 -4
  106. package/build/batchloaders/populateBatchLoader.d.cts.map +1 -1
  107. package/build/batchloaders/populateBatchLoader.d.mts +2 -4
  108. package/build/batchloaders/populateBatchLoader.d.mts.map +1 -1
  109. package/build/batchloaders/populateBatchLoader.js +11 -12
  110. package/build/batchloaders/recursiveChildrenBatchLoader.cjs +6 -7
  111. package/build/batchloaders/recursiveChildrenBatchLoader.d.cts +2 -4
  112. package/build/batchloaders/recursiveChildrenBatchLoader.d.cts.map +1 -1
  113. package/build/batchloaders/recursiveChildrenBatchLoader.d.mts +2 -4
  114. package/build/batchloaders/recursiveChildrenBatchLoader.d.mts.map +1 -1
  115. package/build/batchloaders/recursiveChildrenBatchLoader.js +6 -7
  116. package/build/batchloaders/recursiveM2mBatchLoader.cjs +5 -6
  117. package/build/batchloaders/recursiveM2mBatchLoader.d.cts +2 -4
  118. package/build/batchloaders/recursiveM2mBatchLoader.d.cts.map +1 -1
  119. package/build/batchloaders/recursiveM2mBatchLoader.d.mts +2 -4
  120. package/build/batchloaders/recursiveM2mBatchLoader.d.mts.map +1 -1
  121. package/build/batchloaders/recursiveM2mBatchLoader.js +5 -6
  122. package/build/batchloaders/recursiveParentsBatchLoader.cjs +6 -7
  123. package/build/batchloaders/recursiveParentsBatchLoader.d.cts +2 -4
  124. package/build/batchloaders/recursiveParentsBatchLoader.d.cts.map +1 -1
  125. package/build/batchloaders/recursiveParentsBatchLoader.d.mts +2 -4
  126. package/build/batchloaders/recursiveParentsBatchLoader.d.mts.map +1 -1
  127. package/build/batchloaders/recursiveParentsBatchLoader.js +6 -7
  128. package/build/changes.cjs +7 -8
  129. package/build/changes.d.cts +3 -5
  130. package/build/changes.d.cts.map +1 -1
  131. package/build/changes.d.mts +3 -5
  132. package/build/changes.d.mts.map +1 -1
  133. package/build/changes.js +7 -8
  134. package/build/config.cjs +9 -10
  135. package/build/config.d.cts +6 -8
  136. package/build/config.d.cts.map +1 -1
  137. package/build/config.d.mts +6 -8
  138. package/build/config.d.mts.map +1 -1
  139. package/build/config.js +9 -10
  140. package/build/configure.cjs +11 -12
  141. package/build/configure.d.cts +3 -5
  142. package/build/configure.d.cts.map +1 -1
  143. package/build/configure.d.mts +3 -5
  144. package/build/configure.d.mts.map +1 -1
  145. package/build/configure.js +11 -12
  146. package/build/dataloaders/buildCandidateBatchQuery.cjs +499 -0
  147. package/build/dataloaders/buildCandidateBatchQuery.cjs.map +1 -0
  148. package/build/dataloaders/buildCandidateBatchQuery.d.cts +57 -0
  149. package/build/dataloaders/buildCandidateBatchQuery.d.cts.map +1 -0
  150. package/build/dataloaders/buildCandidateBatchQuery.d.mts +57 -0
  151. package/build/dataloaders/buildCandidateBatchQuery.d.mts.map +1 -0
  152. package/build/dataloaders/buildCandidateBatchQuery.js +498 -0
  153. package/build/dataloaders/buildCandidateBatchQuery.js.map +1 -0
  154. package/build/dataloaders/collectFindArguments.cjs +48 -0
  155. package/build/dataloaders/collectFindArguments.cjs.map +1 -0
  156. package/build/dataloaders/collectFindArguments.d.cts +31 -0
  157. package/build/dataloaders/collectFindArguments.d.cts.map +1 -0
  158. package/build/dataloaders/collectFindArguments.d.mts +31 -0
  159. package/build/dataloaders/collectFindArguments.d.mts.map +1 -0
  160. package/build/dataloaders/collectFindArguments.js +47 -0
  161. package/build/dataloaders/collectFindArguments.js.map +1 -0
  162. package/build/dataloaders/fastWhereFilterHash.cjs +3 -4
  163. package/build/dataloaders/fastWhereFilterHash.d.cts +0 -2
  164. package/build/dataloaders/fastWhereFilterHash.d.cts.map +1 -1
  165. package/build/dataloaders/fastWhereFilterHash.d.mts +0 -2
  166. package/build/dataloaders/fastWhereFilterHash.d.mts.map +1 -1
  167. package/build/dataloaders/fastWhereFilterHash.js +3 -4
  168. package/build/dataloaders/findByUniqueDataLoader.cjs +2 -3
  169. package/build/dataloaders/findByUniqueDataLoader.d.cts +2 -4
  170. package/build/dataloaders/findByUniqueDataLoader.d.cts.map +1 -1
  171. package/build/dataloaders/findByUniqueDataLoader.d.mts +2 -4
  172. package/build/dataloaders/findByUniqueDataLoader.d.mts.map +1 -1
  173. package/build/dataloaders/findByUniqueDataLoader.js +2 -3
  174. package/build/dataloaders/findCountDataLoader.cjs +8 -9
  175. package/build/dataloaders/findCountDataLoader.d.cts +3 -5
  176. package/build/dataloaders/findCountDataLoader.d.cts.map +1 -1
  177. package/build/dataloaders/findCountDataLoader.d.mts +3 -5
  178. package/build/dataloaders/findCountDataLoader.d.mts.map +1 -1
  179. package/build/dataloaders/findCountDataLoader.js +8 -9
  180. package/build/dataloaders/findDataLoader.cjs +48 -77
  181. package/build/dataloaders/findDataLoader.cjs.map +1 -1
  182. package/build/dataloaders/findDataLoader.d.cts +5 -7
  183. package/build/dataloaders/findDataLoader.d.cts.map +1 -1
  184. package/build/dataloaders/findDataLoader.d.mts +5 -7
  185. package/build/dataloaders/findDataLoader.d.mts.map +1 -1
  186. package/build/dataloaders/findDataLoader.js +48 -77
  187. package/build/dataloaders/findDataLoader.js.map +1 -1
  188. package/build/dataloaders/findIdsDataLoader.cjs +6 -7
  189. package/build/dataloaders/findIdsDataLoader.d.cts +2 -4
  190. package/build/dataloaders/findIdsDataLoader.d.cts.map +1 -1
  191. package/build/dataloaders/findIdsDataLoader.d.mts +2 -4
  192. package/build/dataloaders/findIdsDataLoader.d.mts.map +1 -1
  193. package/build/dataloaders/findIdsDataLoader.js +6 -7
  194. package/build/dataloaders/findOrCreateDataLoader.cjs +7 -8
  195. package/build/dataloaders/findOrCreateDataLoader.d.cts +2 -4
  196. package/build/dataloaders/findOrCreateDataLoader.d.cts.map +1 -1
  197. package/build/dataloaders/findOrCreateDataLoader.d.mts +2 -4
  198. package/build/dataloaders/findOrCreateDataLoader.d.mts.map +1 -1
  199. package/build/dataloaders/findOrCreateDataLoader.js +7 -8
  200. package/build/dataloaders/findPaginatedDataLoader.cjs +6 -7
  201. package/build/dataloaders/findPaginatedDataLoader.d.cts +3 -5
  202. package/build/dataloaders/findPaginatedDataLoader.d.cts.map +1 -1
  203. package/build/dataloaders/findPaginatedDataLoader.d.mts +3 -5
  204. package/build/dataloaders/findPaginatedDataLoader.d.mts.map +1 -1
  205. package/build/dataloaders/findPaginatedDataLoader.js +6 -7
  206. package/build/dataloaders/lensDataLoader.cjs +5 -6
  207. package/build/dataloaders/lensDataLoader.d.cts +1 -3
  208. package/build/dataloaders/lensDataLoader.d.cts.map +1 -1
  209. package/build/dataloaders/lensDataLoader.d.mts +1 -3
  210. package/build/dataloaders/lensDataLoader.d.mts.map +1 -1
  211. package/build/dataloaders/lensDataLoader.js +5 -6
  212. package/build/dataloaders/manyToManyFindDataLoader.cjs +1 -2
  213. package/build/dataloaders/manyToManyFindDataLoader.d.cts +2 -4
  214. package/build/dataloaders/manyToManyFindDataLoader.d.cts.map +1 -1
  215. package/build/dataloaders/manyToManyFindDataLoader.d.mts +2 -4
  216. package/build/dataloaders/manyToManyFindDataLoader.d.mts.map +1 -1
  217. package/build/dataloaders/manyToManyFindDataLoader.js +1 -2
  218. package/build/dataloaders/oneToManyFindDataLoader.cjs +1 -2
  219. package/build/dataloaders/oneToManyFindDataLoader.d.cts +2 -4
  220. package/build/dataloaders/oneToManyFindDataLoader.d.cts.map +1 -1
  221. package/build/dataloaders/oneToManyFindDataLoader.d.mts +2 -4
  222. package/build/dataloaders/oneToManyFindDataLoader.d.mts.map +1 -1
  223. package/build/dataloaders/oneToManyFindDataLoader.js +1 -2
  224. package/build/defaults.cjs +7 -8
  225. package/build/defaults.d.cts +2 -4
  226. package/build/defaults.d.cts.map +1 -1
  227. package/build/defaults.d.mts +2 -4
  228. package/build/defaults.d.mts.map +1 -1
  229. package/build/defaults.js +7 -8
  230. package/build/drivers/Driver.cjs +1 -1
  231. package/build/drivers/Driver.d.cts +2 -4
  232. package/build/drivers/Driver.d.cts.map +1 -1
  233. package/build/drivers/Driver.d.mts +2 -4
  234. package/build/drivers/Driver.d.mts.map +1 -1
  235. package/build/drivers/Driver.js +1 -1
  236. package/build/drivers/EntityWriter.cjs +6 -7
  237. package/build/drivers/EntityWriter.d.cts +1 -3
  238. package/build/drivers/EntityWriter.d.cts.map +1 -1
  239. package/build/drivers/EntityWriter.d.mts +1 -3
  240. package/build/drivers/EntityWriter.d.mts.map +1 -1
  241. package/build/drivers/EntityWriter.js +6 -7
  242. package/build/drivers/IdAssigner.cjs +7 -4
  243. package/build/drivers/IdAssigner.cjs.map +1 -1
  244. package/build/drivers/IdAssigner.d.cts +1 -2
  245. package/build/drivers/IdAssigner.d.cts.map +1 -1
  246. package/build/drivers/IdAssigner.d.mts +1 -2
  247. package/build/drivers/IdAssigner.d.mts.map +1 -1
  248. package/build/drivers/IdAssigner.js +7 -4
  249. package/build/drivers/IdAssigner.js.map +1 -1
  250. package/build/drivers/driverApi.cjs +4 -5
  251. package/build/drivers/driverApi.d.cts +2 -4
  252. package/build/drivers/driverApi.d.cts.map +1 -1
  253. package/build/drivers/driverApi.d.mts +2 -4
  254. package/build/drivers/driverApi.d.mts.map +1 -1
  255. package/build/drivers/driverApi.js +4 -5
  256. package/build/drivers/index.d.cts +1 -1
  257. package/build/drivers/index.d.mts +1 -1
  258. package/build/fields.cjs +72 -17
  259. package/build/fields.cjs.map +1 -1
  260. package/build/fields.d.cts +2 -2
  261. package/build/fields.d.cts.map +1 -1
  262. package/build/fields.d.mts +2 -2
  263. package/build/fields.d.mts.map +1 -1
  264. package/build/fields.js +72 -17
  265. package/build/fields.js.map +1 -1
  266. package/build/flush/FlushLock.cjs +1 -2
  267. package/build/flush/FlushLock.cjs.map +1 -1
  268. package/build/flush/FlushLock.d.cts +0 -2
  269. package/build/flush/FlushLock.d.cts.map +1 -1
  270. package/build/flush/FlushLock.d.mts +0 -2
  271. package/build/flush/FlushLock.d.mts.map +1 -1
  272. package/build/flush/FlushLock.js +1 -2
  273. package/build/flush/JoinRows.cjs +3 -4
  274. package/build/flush/JoinRows.d.cts +2 -4
  275. package/build/flush/JoinRows.d.cts.map +1 -1
  276. package/build/flush/JoinRows.d.mts +2 -4
  277. package/build/flush/JoinRows.d.mts.map +1 -1
  278. package/build/flush/JoinRows.js +3 -4
  279. package/build/flush/PendingChanges.d.cts +0 -2
  280. package/build/flush/PendingChanges.d.cts.map +1 -1
  281. package/build/flush/PendingChanges.d.mts +0 -2
  282. package/build/flush/PendingChanges.d.mts.map +1 -1
  283. package/build/flush/ReadDrift.cjs +7 -8
  284. package/build/flush/ReadDrift.cjs.map +1 -1
  285. package/build/flush/ReadDrift.d.cts +2 -4
  286. package/build/flush/ReadDrift.d.cts.map +1 -1
  287. package/build/flush/ReadDrift.d.mts +2 -4
  288. package/build/flush/ReadDrift.d.mts.map +1 -1
  289. package/build/flush/ReadDrift.js +7 -8
  290. package/build/flush/ReadDrift.js.map +1 -1
  291. package/build/flush/Todo.cjs +3 -4
  292. package/build/flush/Todo.d.cts +2 -4
  293. package/build/flush/Todo.d.cts.map +1 -1
  294. package/build/flush/Todo.d.mts +2 -4
  295. package/build/flush/Todo.d.mts.map +1 -1
  296. package/build/flush/Todo.js +3 -4
  297. package/build/getProperties.cjs +3 -4
  298. package/build/getProperties.d.cts +0 -2
  299. package/build/getProperties.d.cts.map +1 -1
  300. package/build/getProperties.d.mts +0 -2
  301. package/build/getProperties.d.mts.map +1 -1
  302. package/build/getProperties.js +3 -4
  303. package/build/index.cjs +58 -57
  304. package/build/index.cjs.map +1 -1
  305. package/build/index.d.cts +50 -52
  306. package/build/index.d.cts.map +1 -1
  307. package/build/index.d.mts +50 -52
  308. package/build/index.d.mts.map +1 -1
  309. package/build/index.js +58 -57
  310. package/build/index.js.map +1 -1
  311. package/build/json.cjs +8 -9
  312. package/build/json.d.cts +2 -4
  313. package/build/json.d.cts.map +1 -1
  314. package/build/json.d.mts +2 -4
  315. package/build/json.d.mts.map +1 -1
  316. package/build/json.js +8 -9
  317. package/build/k.cjs +1 -2
  318. package/build/k.js +1 -2
  319. package/build/keys.cjs +5 -6
  320. package/build/keys.d.cts +3 -5
  321. package/build/keys.d.cts.map +1 -1
  322. package/build/keys.d.mts +3 -5
  323. package/build/keys.d.mts.map +1 -1
  324. package/build/keys.js +5 -6
  325. package/build/loading/HintTree.cjs +1 -2
  326. package/build/loading/HintTree.d.cts +2 -4
  327. package/build/loading/HintTree.d.cts.map +1 -1
  328. package/build/loading/HintTree.d.mts +2 -4
  329. package/build/loading/HintTree.d.mts.map +1 -1
  330. package/build/loading/HintTree.js +1 -2
  331. package/build/loading/IsLoadedCache.cjs +1 -2
  332. package/build/loading/IsLoadedCache.d.cts +0 -2
  333. package/build/loading/IsLoadedCache.d.cts.map +1 -1
  334. package/build/loading/IsLoadedCache.d.mts +0 -2
  335. package/build/loading/IsLoadedCache.d.mts.map +1 -1
  336. package/build/loading/IsLoadedCache.js +1 -2
  337. package/build/loading/loadHints.cjs +1 -2
  338. package/build/loading/loadHints.d.cts +4 -6
  339. package/build/loading/loadHints.d.cts.map +1 -1
  340. package/build/loading/loadHints.d.mts +4 -6
  341. package/build/loading/loadHints.d.mts.map +1 -1
  342. package/build/loading/loadHints.js +1 -2
  343. package/build/loading/loadLens.cjs +6 -7
  344. package/build/loading/loadLens.d.cts +2 -4
  345. package/build/loading/loadLens.d.cts.map +1 -1
  346. package/build/loading/loadLens.d.mts +2 -4
  347. package/build/loading/loadLens.d.mts.map +1 -1
  348. package/build/loading/loadLens.js +6 -7
  349. package/build/loading/withLoaded.cjs +1 -2
  350. package/build/loading/withLoaded.d.cts +2 -4
  351. package/build/loading/withLoaded.d.cts.map +1 -1
  352. package/build/loading/withLoaded.d.mts +2 -4
  353. package/build/loading/withLoaded.d.mts.map +1 -1
  354. package/build/loading/withLoaded.js +1 -2
  355. package/build/logging/FactoryLogger.cjs +2 -3
  356. package/build/logging/FactoryLogger.d.cts +1 -3
  357. package/build/logging/FactoryLogger.d.cts.map +1 -1
  358. package/build/logging/FactoryLogger.d.mts +1 -3
  359. package/build/logging/FactoryLogger.d.mts.map +1 -1
  360. package/build/logging/FactoryLogger.js +2 -3
  361. package/build/logging/FieldLogger.cjs +1 -2
  362. package/build/logging/FieldLogger.d.cts +0 -2
  363. package/build/logging/FieldLogger.d.cts.map +1 -1
  364. package/build/logging/FieldLogger.d.mts +0 -2
  365. package/build/logging/FieldLogger.d.mts.map +1 -1
  366. package/build/logging/FieldLogger.js +1 -2
  367. package/build/logging/ReactionLogger.cjs +3 -4
  368. package/build/logging/ReactionLogger.d.cts +3 -5
  369. package/build/logging/ReactionLogger.d.cts.map +1 -1
  370. package/build/logging/ReactionLogger.d.mts +3 -5
  371. package/build/logging/ReactionLogger.d.mts.map +1 -1
  372. package/build/logging/ReactionLogger.js +3 -4
  373. package/build/metrics/EntityMetrics.cjs +1 -2
  374. package/build/metrics/EntityMetrics.d.cts +0 -2
  375. package/build/metrics/EntityMetrics.d.cts.map +1 -1
  376. package/build/metrics/EntityMetrics.d.mts +0 -2
  377. package/build/metrics/EntityMetrics.d.mts.map +1 -1
  378. package/build/metrics/EntityMetrics.js +1 -2
  379. package/build/newEntity.cjs +5 -6
  380. package/build/newEntity.cjs.map +1 -1
  381. package/build/newEntity.d.cts +2 -4
  382. package/build/newEntity.d.cts.map +1 -1
  383. package/build/newEntity.d.mts +2 -4
  384. package/build/newEntity.d.mts.map +1 -1
  385. package/build/newEntity.js +5 -6
  386. package/build/newEntity.js.map +1 -1
  387. package/build/newTestInstance.cjs +9 -10
  388. package/build/newTestInstance.d.cts +3 -5
  389. package/build/newTestInstance.d.cts.map +1 -1
  390. package/build/newTestInstance.d.mts +3 -5
  391. package/build/newTestInstance.d.mts.map +1 -1
  392. package/build/newTestInstance.js +9 -10
  393. package/build/normalizeHints.cjs +1 -2
  394. package/build/normalizeHints.d.cts +1 -3
  395. package/build/normalizeHints.d.cts.map +1 -1
  396. package/build/normalizeHints.d.mts +1 -3
  397. package/build/normalizeHints.d.mts.map +1 -1
  398. package/build/normalizeHints.js +1 -2
  399. package/build/nowUTC.cjs +1 -2
  400. package/build/nowUTC.d.cts +0 -2
  401. package/build/nowUTC.d.cts.map +1 -1
  402. package/build/nowUTC.d.mts +0 -2
  403. package/build/nowUTC.d.mts.map +1 -1
  404. package/build/nowUTC.js +1 -2
  405. package/build/plugins/ImmutableEntitiesPlugin.cjs +3 -4
  406. package/build/plugins/ImmutableEntitiesPlugin.d.cts +1 -3
  407. package/build/plugins/ImmutableEntitiesPlugin.d.cts.map +1 -1
  408. package/build/plugins/ImmutableEntitiesPlugin.d.mts +1 -3
  409. package/build/plugins/ImmutableEntitiesPlugin.d.mts.map +1 -1
  410. package/build/plugins/ImmutableEntitiesPlugin.js +3 -4
  411. package/build/plugins/PreloadPlugin.cjs +1 -1
  412. package/build/plugins/PreloadPlugin.d.cts +4 -6
  413. package/build/plugins/PreloadPlugin.d.cts.map +1 -1
  414. package/build/plugins/PreloadPlugin.d.mts +4 -6
  415. package/build/plugins/PreloadPlugin.d.mts.map +1 -1
  416. package/build/plugins/PreloadPlugin.js +1 -1
  417. package/build/preloading/JsonAggregatePreloader.cjs +9 -10
  418. package/build/preloading/JsonAggregatePreloader.d.cts +3 -5
  419. package/build/preloading/JsonAggregatePreloader.d.cts.map +1 -1
  420. package/build/preloading/JsonAggregatePreloader.d.mts +3 -5
  421. package/build/preloading/JsonAggregatePreloader.d.mts.map +1 -1
  422. package/build/preloading/JsonAggregatePreloader.js +9 -10
  423. package/build/preloading/canPreload.cjs +1 -2
  424. package/build/preloading/canPreload.d.cts +0 -2
  425. package/build/preloading/canPreload.d.cts.map +1 -1
  426. package/build/preloading/canPreload.d.mts +0 -2
  427. package/build/preloading/canPreload.d.mts.map +1 -1
  428. package/build/preloading/canPreload.js +1 -2
  429. package/build/preloading/partitionHint.cjs +4 -5
  430. package/build/preloading/partitionHint.d.cts +1 -3
  431. package/build/preloading/partitionHint.d.cts.map +1 -1
  432. package/build/preloading/partitionHint.d.mts +1 -3
  433. package/build/preloading/partitionHint.d.mts.map +1 -1
  434. package/build/preloading/partitionHint.js +4 -5
  435. package/build/queries/ConditionBuilder.cjs +2 -3
  436. package/build/queries/ConditionBuilder.d.cts +1 -3
  437. package/build/queries/ConditionBuilder.d.cts.map +1 -1
  438. package/build/queries/ConditionBuilder.d.mts +1 -3
  439. package/build/queries/ConditionBuilder.d.mts.map +1 -1
  440. package/build/queries/ConditionBuilder.js +2 -3
  441. package/build/queries/conditions.cjs +1 -2
  442. package/build/queries/conditions.d.cts +0 -2
  443. package/build/queries/conditions.d.cts.map +1 -1
  444. package/build/queries/conditions.d.mts +0 -2
  445. package/build/queries/conditions.d.mts.map +1 -1
  446. package/build/queries/conditions.js +1 -2
  447. package/build/queries/entityQueryUtils.cjs +2 -3
  448. package/build/queries/entityQueryUtils.d.cts +1 -3
  449. package/build/queries/entityQueryUtils.d.cts.map +1 -1
  450. package/build/queries/entityQueryUtils.d.mts +1 -3
  451. package/build/queries/entityQueryUtils.d.mts.map +1 -1
  452. package/build/queries/entityQueryUtils.js +2 -3
  453. package/build/queries/find/Aliases.cjs +4 -5
  454. package/build/queries/find/Aliases.d.cts +5 -7
  455. package/build/queries/find/Aliases.d.cts.map +1 -1
  456. package/build/queries/find/Aliases.d.mts +5 -7
  457. package/build/queries/find/Aliases.d.mts.map +1 -1
  458. package/build/queries/find/Aliases.js +4 -5
  459. package/build/queries/find/DeferredAlias.cjs +1 -2
  460. package/build/queries/find/DeferredAlias.d.cts +2 -4
  461. package/build/queries/find/DeferredAlias.d.cts.map +1 -1
  462. package/build/queries/find/DeferredAlias.d.mts +2 -4
  463. package/build/queries/find/DeferredAlias.d.mts.map +1 -1
  464. package/build/queries/find/DeferredAlias.js +1 -2
  465. package/build/queries/find/EntityFilter.cjs +1 -2
  466. package/build/queries/find/EntityFilter.d.cts +3 -5
  467. package/build/queries/find/EntityFilter.d.cts.map +1 -1
  468. package/build/queries/find/EntityFilter.d.mts +3 -5
  469. package/build/queries/find/EntityFilter.d.mts.map +1 -1
  470. package/build/queries/find/EntityFilter.js +1 -2
  471. package/build/queries/find/EntityGraphQLFilter.cjs +1 -2
  472. package/build/queries/find/EntityGraphQLFilter.d.cts +2 -4
  473. package/build/queries/find/EntityGraphQLFilter.d.cts.map +1 -1
  474. package/build/queries/find/EntityGraphQLFilter.d.mts +2 -4
  475. package/build/queries/find/EntityGraphQLFilter.d.mts.map +1 -1
  476. package/build/queries/find/EntityGraphQLFilter.js +1 -2
  477. package/build/queries/find/QueryParser.cjs +9 -10
  478. package/build/queries/find/QueryParser.cjs.map +1 -1
  479. package/build/queries/find/QueryParser.collectionJoins.cjs +1 -2
  480. package/build/queries/find/QueryParser.collectionJoins.d.cts +0 -2
  481. package/build/queries/find/QueryParser.collectionJoins.d.cts.map +1 -1
  482. package/build/queries/find/QueryParser.collectionJoins.d.mts +0 -2
  483. package/build/queries/find/QueryParser.collectionJoins.d.mts.map +1 -1
  484. package/build/queries/find/QueryParser.collectionJoins.js +1 -2
  485. package/build/queries/find/QueryParser.d.cts +4 -4
  486. package/build/queries/find/QueryParser.d.cts.map +1 -1
  487. package/build/queries/find/QueryParser.d.mts +4 -4
  488. package/build/queries/find/QueryParser.d.mts.map +1 -1
  489. package/build/queries/find/QueryParser.js +9 -10
  490. package/build/queries/find/QueryParser.js.map +1 -1
  491. package/build/queries/find/QueryParser.pruning.cjs +2 -3
  492. package/build/queries/find/QueryParser.pruning.d.cts +0 -2
  493. package/build/queries/find/QueryParser.pruning.d.cts.map +1 -1
  494. package/build/queries/find/QueryParser.pruning.d.mts +0 -2
  495. package/build/queries/find/QueryParser.pruning.d.mts.map +1 -1
  496. package/build/queries/find/QueryParser.pruning.js +2 -3
  497. package/build/queries/find/QueryVisitor.cjs +1 -2
  498. package/build/queries/find/QueryVisitor.d.cts +0 -2
  499. package/build/queries/find/QueryVisitor.d.cts.map +1 -1
  500. package/build/queries/find/QueryVisitor.d.mts +0 -2
  501. package/build/queries/find/QueryVisitor.d.mts.map +1 -1
  502. package/build/queries/find/QueryVisitor.js +1 -2
  503. package/build/queries/find/buildFindQuery.cjs +5 -6
  504. package/build/queries/find/buildFindQuery.cjs.map +1 -1
  505. package/build/queries/find/buildFindQuery.d.cts +0 -2
  506. package/build/queries/find/buildFindQuery.d.cts.map +1 -1
  507. package/build/queries/find/buildFindQuery.d.mts +0 -2
  508. package/build/queries/find/buildFindQuery.d.mts.map +1 -1
  509. package/build/queries/find/buildFindQuery.js +5 -6
  510. package/build/queries/find/buildFindQuery.js.map +1 -1
  511. package/build/queries/find/scopes.cjs +1 -2
  512. package/build/queries/find/scopes.d.cts +5 -7
  513. package/build/queries/find/scopes.d.cts.map +1 -1
  514. package/build/queries/find/scopes.d.mts +5 -7
  515. package/build/queries/find/scopes.d.mts.map +1 -1
  516. package/build/queries/find/scopes.js +1 -2
  517. package/build/queries/parsedConditions.cjs +1 -2
  518. package/build/queries/parsedConditions.d.cts +0 -2
  519. package/build/queries/parsedConditions.d.cts.map +1 -1
  520. package/build/queries/parsedConditions.d.mts +0 -2
  521. package/build/queries/parsedConditions.d.mts.map +1 -1
  522. package/build/queries/parsedConditions.js +1 -2
  523. package/build/queries/renderConditions.cjs +3 -4
  524. package/build/queries/renderConditions.d.cts +0 -2
  525. package/build/queries/renderConditions.d.cts.map +1 -1
  526. package/build/queries/renderConditions.d.mts +0 -2
  527. package/build/queries/renderConditions.d.mts.map +1 -1
  528. package/build/queries/renderConditions.js +3 -4
  529. package/build/queries/skipCondition.cjs +1 -2
  530. package/build/queries/skipCondition.d.cts +0 -2
  531. package/build/queries/skipCondition.d.cts.map +1 -1
  532. package/build/queries/skipCondition.d.mts +0 -2
  533. package/build/queries/skipCondition.d.mts.map +1 -1
  534. package/build/queries/skipCondition.js +1 -2
  535. package/build/queries/sql/AliasAssigner.cjs +1 -2
  536. package/build/queries/sql/AliasAssigner.d.cts +0 -2
  537. package/build/queries/sql/AliasAssigner.d.cts.map +1 -1
  538. package/build/queries/sql/AliasAssigner.d.mts +0 -2
  539. package/build/queries/sql/AliasAssigner.d.mts.map +1 -1
  540. package/build/queries/sql/AliasAssigner.js +1 -2
  541. package/build/queries/sql/Expr.cjs +3 -4
  542. package/build/queries/sql/Expr.d.cts +2 -4
  543. package/build/queries/sql/Expr.d.cts.map +1 -1
  544. package/build/queries/sql/Expr.d.mts +2 -4
  545. package/build/queries/sql/Expr.d.mts.map +1 -1
  546. package/build/queries/sql/Expr.js +3 -4
  547. package/build/queries/sql/JoinTree.cjs +3 -4
  548. package/build/queries/sql/JoinTree.d.cts +5 -7
  549. package/build/queries/sql/JoinTree.d.cts.map +1 -1
  550. package/build/queries/sql/JoinTree.d.mts +5 -7
  551. package/build/queries/sql/JoinTree.d.mts.map +1 -1
  552. package/build/queries/sql/JoinTree.js +3 -4
  553. package/build/queries/sql/Tables.cjs +8 -9
  554. package/build/queries/sql/Tables.d.cts +5 -7
  555. package/build/queries/sql/Tables.d.cts.map +1 -1
  556. package/build/queries/sql/Tables.d.mts +5 -7
  557. package/build/queries/sql/Tables.d.mts.map +1 -1
  558. package/build/queries/sql/Tables.js +8 -9
  559. package/build/queries/sql/custom.cjs +1 -2
  560. package/build/queries/sql/custom.d.cts +2 -4
  561. package/build/queries/sql/custom.d.cts.map +1 -1
  562. package/build/queries/sql/custom.d.mts +2 -4
  563. package/build/queries/sql/custom.d.mts.map +1 -1
  564. package/build/queries/sql/custom.js +1 -2
  565. package/build/queries/sql/execute.cjs +6 -7
  566. package/build/queries/sql/execute.d.cts +6 -8
  567. package/build/queries/sql/execute.d.cts.map +1 -1
  568. package/build/queries/sql/execute.d.mts +6 -8
  569. package/build/queries/sql/execute.d.mts.map +1 -1
  570. package/build/queries/sql/execute.js +6 -7
  571. package/build/queries/sql/expressions/arrayAgg.cjs +2 -3
  572. package/build/queries/sql/expressions/arrayAgg.d.cts +1 -3
  573. package/build/queries/sql/expressions/arrayAgg.d.cts.map +1 -1
  574. package/build/queries/sql/expressions/arrayAgg.d.mts +1 -3
  575. package/build/queries/sql/expressions/arrayAgg.d.mts.map +1 -1
  576. package/build/queries/sql/expressions/arrayAgg.js +2 -3
  577. package/build/queries/sql/expressions/case.cjs +2 -3
  578. package/build/queries/sql/expressions/case.d.cts +1 -3
  579. package/build/queries/sql/expressions/case.d.cts.map +1 -1
  580. package/build/queries/sql/expressions/case.d.mts +1 -3
  581. package/build/queries/sql/expressions/case.d.mts.map +1 -1
  582. package/build/queries/sql/expressions/case.js +2 -3
  583. package/build/queries/sql/expressions/coalesce.cjs +2 -3
  584. package/build/queries/sql/expressions/coalesce.d.cts +1 -3
  585. package/build/queries/sql/expressions/coalesce.d.cts.map +1 -1
  586. package/build/queries/sql/expressions/coalesce.d.mts +1 -3
  587. package/build/queries/sql/expressions/coalesce.d.mts.map +1 -1
  588. package/build/queries/sql/expressions/coalesce.js +2 -3
  589. package/build/queries/sql/expressions/codecs.cjs +2 -3
  590. package/build/queries/sql/expressions/codecs.d.cts +0 -2
  591. package/build/queries/sql/expressions/codecs.d.cts.map +1 -1
  592. package/build/queries/sql/expressions/codecs.d.mts +0 -2
  593. package/build/queries/sql/expressions/codecs.d.mts.map +1 -1
  594. package/build/queries/sql/expressions/codecs.js +2 -3
  595. package/build/queries/sql/expressions/expression.cjs +4 -5
  596. package/build/queries/sql/expressions/expression.d.cts +2 -4
  597. package/build/queries/sql/expressions/expression.d.cts.map +1 -1
  598. package/build/queries/sql/expressions/expression.d.mts +2 -4
  599. package/build/queries/sql/expressions/expression.d.mts.map +1 -1
  600. package/build/queries/sql/expressions/expression.js +4 -5
  601. package/build/queries/sql/expressions/greatest.cjs +2 -3
  602. package/build/queries/sql/expressions/greatest.d.cts +1 -3
  603. package/build/queries/sql/expressions/greatest.d.cts.map +1 -1
  604. package/build/queries/sql/expressions/greatest.d.mts +1 -3
  605. package/build/queries/sql/expressions/greatest.d.mts.map +1 -1
  606. package/build/queries/sql/expressions/greatest.js +2 -3
  607. package/build/queries/sql/expressions/least.cjs +2 -3
  608. package/build/queries/sql/expressions/least.d.cts +1 -3
  609. package/build/queries/sql/expressions/least.d.cts.map +1 -1
  610. package/build/queries/sql/expressions/least.d.mts +1 -3
  611. package/build/queries/sql/expressions/least.d.mts.map +1 -1
  612. package/build/queries/sql/expressions/least.js +2 -3
  613. package/build/queries/sql/expressions/nullIf.cjs +2 -3
  614. package/build/queries/sql/expressions/nullIf.d.cts +1 -3
  615. package/build/queries/sql/expressions/nullIf.d.cts.map +1 -1
  616. package/build/queries/sql/expressions/nullIf.d.mts +1 -3
  617. package/build/queries/sql/expressions/nullIf.d.mts.map +1 -1
  618. package/build/queries/sql/expressions/nullIf.js +2 -3
  619. package/build/queries/sql/expressions/parseExpression.cjs +3 -4
  620. package/build/queries/sql/expressions/parseExpression.d.cts +0 -2
  621. package/build/queries/sql/expressions/parseExpression.d.cts.map +1 -1
  622. package/build/queries/sql/expressions/parseExpression.d.mts +0 -2
  623. package/build/queries/sql/expressions/parseExpression.d.mts.map +1 -1
  624. package/build/queries/sql/expressions/parseExpression.js +3 -4
  625. package/build/queries/sql/expressions/types.d.cts +1 -3
  626. package/build/queries/sql/expressions/types.d.cts.map +1 -1
  627. package/build/queries/sql/expressions/types.d.mts +1 -3
  628. package/build/queries/sql/expressions/types.d.mts.map +1 -1
  629. package/build/queries/sql/keywords.cjs +1 -2
  630. package/build/queries/sql/keywords.d.cts +0 -2
  631. package/build/queries/sql/keywords.d.cts.map +1 -1
  632. package/build/queries/sql/keywords.d.mts +0 -2
  633. package/build/queries/sql/keywords.d.mts.map +1 -1
  634. package/build/queries/sql/keywords.js +1 -2
  635. package/build/queries/sql/query.cjs +9 -10
  636. package/build/queries/sql/query.d.cts +6 -8
  637. package/build/queries/sql/query.d.cts.map +1 -1
  638. package/build/queries/sql/query.d.mts +6 -8
  639. package/build/queries/sql/query.d.mts.map +1 -1
  640. package/build/queries/sql/query.js +9 -10
  641. package/build/queries/unnest.cjs +1 -2
  642. package/build/queries/unnest.d.cts +1 -3
  643. package/build/queries/unnest.d.cts.map +1 -1
  644. package/build/queries/unnest.d.mts +1 -3
  645. package/build/queries/unnest.d.mts.map +1 -1
  646. package/build/queries/unnest.js +1 -2
  647. package/build/queries/valueFilters.cjs +3 -4
  648. package/build/queries/valueFilters.d.cts +2 -4
  649. package/build/queries/valueFilters.d.cts.map +1 -1
  650. package/build/queries/valueFilters.d.mts +2 -4
  651. package/build/queries/valueFilters.d.mts.map +1 -1
  652. package/build/queries/valueFilters.js +3 -4
  653. package/build/reactivity/ReactionsManager.cjs +6 -7
  654. package/build/reactivity/ReactionsManager.d.cts +2 -4
  655. package/build/reactivity/ReactionsManager.d.cts.map +1 -1
  656. package/build/reactivity/ReactionsManager.d.mts +2 -4
  657. package/build/reactivity/ReactionsManager.d.mts.map +1 -1
  658. package/build/reactivity/ReactionsManager.js +6 -7
  659. package/build/reactivity/reactiveHints.cjs +8 -9
  660. package/build/reactivity/reactiveHints.d.cts +8 -10
  661. package/build/reactivity/reactiveHints.d.cts.map +1 -1
  662. package/build/reactivity/reactiveHints.d.mts +8 -10
  663. package/build/reactivity/reactiveHints.d.mts.map +1 -1
  664. package/build/reactivity/reactiveHints.js +8 -9
  665. package/build/relations/AbstractPropertyImpl.cjs +1 -2
  666. package/build/relations/AbstractPropertyImpl.d.cts +0 -2
  667. package/build/relations/AbstractPropertyImpl.d.cts.map +1 -1
  668. package/build/relations/AbstractPropertyImpl.d.mts +0 -2
  669. package/build/relations/AbstractPropertyImpl.d.mts.map +1 -1
  670. package/build/relations/AbstractPropertyImpl.js +1 -2
  671. package/build/relations/AbstractRelationImpl.cjs +1 -2
  672. package/build/relations/AbstractRelationImpl.d.cts +0 -2
  673. package/build/relations/AbstractRelationImpl.d.cts.map +1 -1
  674. package/build/relations/AbstractRelationImpl.d.mts +0 -2
  675. package/build/relations/AbstractRelationImpl.d.mts.map +1 -1
  676. package/build/relations/AbstractRelationImpl.js +1 -2
  677. package/build/relations/AsyncProperty.cjs +3 -4
  678. package/build/relations/AsyncProperty.d.cts +2 -4
  679. package/build/relations/AsyncProperty.d.cts.map +1 -1
  680. package/build/relations/AsyncProperty.d.mts +2 -4
  681. package/build/relations/AsyncProperty.d.mts.map +1 -1
  682. package/build/relations/AsyncProperty.js +3 -4
  683. package/build/relations/AsyncReactiveField.cjs +10 -11
  684. package/build/relations/AsyncReactiveField.d.cts +4 -6
  685. package/build/relations/AsyncReactiveField.d.cts.map +1 -1
  686. package/build/relations/AsyncReactiveField.d.mts +4 -6
  687. package/build/relations/AsyncReactiveField.d.mts.map +1 -1
  688. package/build/relations/AsyncReactiveField.js +10 -11
  689. package/build/relations/Collection.cjs +3 -4
  690. package/build/relations/Collection.d.cts +2 -4
  691. package/build/relations/Collection.d.cts.map +1 -1
  692. package/build/relations/Collection.d.mts +2 -4
  693. package/build/relations/Collection.d.mts.map +1 -1
  694. package/build/relations/Collection.js +3 -4
  695. package/build/relations/CustomCollection.cjs +5 -6
  696. package/build/relations/CustomCollection.d.cts +4 -6
  697. package/build/relations/CustomCollection.d.cts.map +1 -1
  698. package/build/relations/CustomCollection.d.mts +4 -6
  699. package/build/relations/CustomCollection.d.mts.map +1 -1
  700. package/build/relations/CustomCollection.js +5 -6
  701. package/build/relations/CustomReference.cjs +7 -8
  702. package/build/relations/CustomReference.d.cts +6 -8
  703. package/build/relations/CustomReference.d.cts.map +1 -1
  704. package/build/relations/CustomReference.d.mts +6 -8
  705. package/build/relations/CustomReference.d.mts.map +1 -1
  706. package/build/relations/CustomReference.js +7 -8
  707. package/build/relations/EnumCollection.cjs +4 -5
  708. package/build/relations/EnumCollection.d.cts +3 -5
  709. package/build/relations/EnumCollection.d.cts.map +1 -1
  710. package/build/relations/EnumCollection.d.mts +3 -5
  711. package/build/relations/EnumCollection.d.mts.map +1 -1
  712. package/build/relations/EnumCollection.js +4 -5
  713. package/build/relations/LargeCollection.cjs +2 -2
  714. package/build/relations/LargeCollection.d.cts +2 -4
  715. package/build/relations/LargeCollection.d.cts.map +1 -1
  716. package/build/relations/LargeCollection.d.mts +2 -4
  717. package/build/relations/LargeCollection.d.mts.map +1 -1
  718. package/build/relations/LargeCollection.js +2 -2
  719. package/build/relations/LazyField.cjs +9 -10
  720. package/build/relations/LazyField.d.cts +2 -4
  721. package/build/relations/LazyField.d.cts.map +1 -1
  722. package/build/relations/LazyField.d.mts +2 -4
  723. package/build/relations/LazyField.d.mts.map +1 -1
  724. package/build/relations/LazyField.js +9 -10
  725. package/build/relations/ManyToManyCollection.cjs +7 -8
  726. package/build/relations/ManyToManyCollection.d.cts +2 -4
  727. package/build/relations/ManyToManyCollection.d.cts.map +1 -1
  728. package/build/relations/ManyToManyCollection.d.mts +2 -4
  729. package/build/relations/ManyToManyCollection.d.mts.map +1 -1
  730. package/build/relations/ManyToManyCollection.js +7 -8
  731. package/build/relations/ManyToManyLargeCollection.cjs +8 -9
  732. package/build/relations/ManyToManyLargeCollection.d.cts +4 -6
  733. package/build/relations/ManyToManyLargeCollection.d.cts.map +1 -1
  734. package/build/relations/ManyToManyLargeCollection.d.mts +4 -6
  735. package/build/relations/ManyToManyLargeCollection.d.mts.map +1 -1
  736. package/build/relations/ManyToManyLargeCollection.js +8 -9
  737. package/build/relations/ManyToOneReference.cjs +11 -12
  738. package/build/relations/ManyToOneReference.d.cts +6 -8
  739. package/build/relations/ManyToOneReference.d.cts.map +1 -1
  740. package/build/relations/ManyToOneReference.d.mts +6 -8
  741. package/build/relations/ManyToOneReference.d.mts.map +1 -1
  742. package/build/relations/ManyToOneReference.js +11 -12
  743. package/build/relations/OneToManyCollection.cjs +7 -8
  744. package/build/relations/OneToManyCollection.d.cts +3 -5
  745. package/build/relations/OneToManyCollection.d.cts.map +1 -1
  746. package/build/relations/OneToManyCollection.d.mts +3 -5
  747. package/build/relations/OneToManyCollection.d.mts.map +1 -1
  748. package/build/relations/OneToManyCollection.js +7 -8
  749. package/build/relations/OneToManyLargeCollection.cjs +7 -8
  750. package/build/relations/OneToManyLargeCollection.d.cts +4 -6
  751. package/build/relations/OneToManyLargeCollection.d.cts.map +1 -1
  752. package/build/relations/OneToManyLargeCollection.d.mts +4 -6
  753. package/build/relations/OneToManyLargeCollection.d.mts.map +1 -1
  754. package/build/relations/OneToManyLargeCollection.js +7 -8
  755. package/build/relations/OneToOneReference.cjs +10 -11
  756. package/build/relations/OneToOneReference.d.cts +5 -7
  757. package/build/relations/OneToOneReference.d.cts.map +1 -1
  758. package/build/relations/OneToOneReference.d.mts +5 -7
  759. package/build/relations/OneToOneReference.d.mts.map +1 -1
  760. package/build/relations/OneToOneReference.js +10 -11
  761. package/build/relations/PolymorphicReference.cjs +12 -13
  762. package/build/relations/PolymorphicReference.d.cts +5 -7
  763. package/build/relations/PolymorphicReference.d.cts.map +1 -1
  764. package/build/relations/PolymorphicReference.d.mts +5 -7
  765. package/build/relations/PolymorphicReference.d.mts.map +1 -1
  766. package/build/relations/PolymorphicReference.js +12 -13
  767. package/build/relations/PropertySymbols.cjs +1 -2
  768. package/build/relations/PropertySymbols.d.cts +0 -2
  769. package/build/relations/PropertySymbols.d.cts.map +1 -1
  770. package/build/relations/PropertySymbols.d.mts +0 -2
  771. package/build/relations/PropertySymbols.d.mts.map +1 -1
  772. package/build/relations/PropertySymbols.js +1 -2
  773. package/build/relations/ReactiveField.cjs +9 -10
  774. package/build/relations/ReactiveField.d.cts +4 -6
  775. package/build/relations/ReactiveField.d.cts.map +1 -1
  776. package/build/relations/ReactiveField.d.mts +4 -6
  777. package/build/relations/ReactiveField.d.mts.map +1 -1
  778. package/build/relations/ReactiveField.js +9 -10
  779. package/build/relations/ReactiveGetter.cjs +2 -3
  780. package/build/relations/ReactiveGetter.d.cts +2 -4
  781. package/build/relations/ReactiveGetter.d.cts.map +1 -1
  782. package/build/relations/ReactiveGetter.d.mts +2 -4
  783. package/build/relations/ReactiveGetter.d.mts.map +1 -1
  784. package/build/relations/ReactiveGetter.js +2 -3
  785. package/build/relations/ReactiveManyToMany.cjs +21 -14
  786. package/build/relations/ReactiveManyToMany.cjs.map +1 -1
  787. package/build/relations/ReactiveManyToMany.d.cts +4 -6
  788. package/build/relations/ReactiveManyToMany.d.cts.map +1 -1
  789. package/build/relations/ReactiveManyToMany.d.mts +4 -6
  790. package/build/relations/ReactiveManyToMany.d.mts.map +1 -1
  791. package/build/relations/ReactiveManyToMany.js +21 -14
  792. package/build/relations/ReactiveManyToMany.js.map +1 -1
  793. package/build/relations/ReactiveManyToManyOtherSide.cjs +4 -5
  794. package/build/relations/ReactiveManyToManyOtherSide.d.cts +4 -6
  795. package/build/relations/ReactiveManyToManyOtherSide.d.cts.map +1 -1
  796. package/build/relations/ReactiveManyToManyOtherSide.d.mts +4 -6
  797. package/build/relations/ReactiveManyToManyOtherSide.d.mts.map +1 -1
  798. package/build/relations/ReactiveManyToManyOtherSide.js +4 -5
  799. package/build/relations/ReactiveReference.cjs +11 -12
  800. package/build/relations/ReactiveReference.d.cts +7 -9
  801. package/build/relations/ReactiveReference.d.cts.map +1 -1
  802. package/build/relations/ReactiveReference.d.mts +7 -9
  803. package/build/relations/ReactiveReference.d.mts.map +1 -1
  804. package/build/relations/ReactiveReference.js +11 -12
  805. package/build/relations/ReadOnlyCollection.cjs +3 -4
  806. package/build/relations/ReadOnlyCollection.d.cts +1 -3
  807. package/build/relations/ReadOnlyCollection.d.cts.map +1 -1
  808. package/build/relations/ReadOnlyCollection.d.mts +1 -3
  809. package/build/relations/ReadOnlyCollection.d.mts.map +1 -1
  810. package/build/relations/ReadOnlyCollection.js +3 -4
  811. package/build/relations/RecursiveCollection.cjs +5 -6
  812. package/build/relations/RecursiveCollection.d.cts +3 -5
  813. package/build/relations/RecursiveCollection.d.cts.map +1 -1
  814. package/build/relations/RecursiveCollection.d.mts +3 -5
  815. package/build/relations/RecursiveCollection.d.mts.map +1 -1
  816. package/build/relations/RecursiveCollection.js +5 -6
  817. package/build/relations/RecursiveCycleError.cjs +1 -2
  818. package/build/relations/RecursiveCycleError.d.cts +0 -2
  819. package/build/relations/RecursiveCycleError.d.cts.map +1 -1
  820. package/build/relations/RecursiveCycleError.d.mts +0 -2
  821. package/build/relations/RecursiveCycleError.d.mts.map +1 -1
  822. package/build/relations/RecursiveCycleError.js +1 -2
  823. package/build/relations/Reference.cjs +4 -5
  824. package/build/relations/Reference.d.cts +3 -5
  825. package/build/relations/Reference.d.cts.map +1 -1
  826. package/build/relations/Reference.d.mts +3 -5
  827. package/build/relations/Reference.d.mts.map +1 -1
  828. package/build/relations/Reference.js +4 -5
  829. package/build/relations/ReferenceSymbols.cjs +1 -2
  830. package/build/relations/ReferenceSymbols.d.cts +0 -2
  831. package/build/relations/ReferenceSymbols.d.cts.map +1 -1
  832. package/build/relations/ReferenceSymbols.d.mts +0 -2
  833. package/build/relations/ReferenceSymbols.d.mts.map +1 -1
  834. package/build/relations/ReferenceSymbols.js +1 -2
  835. package/build/relations/Relation.cjs +3 -4
  836. package/build/relations/Relation.d.cts +1 -3
  837. package/build/relations/Relation.d.cts.map +1 -1
  838. package/build/relations/Relation.d.mts +1 -3
  839. package/build/relations/Relation.d.mts.map +1 -1
  840. package/build/relations/Relation.js +3 -4
  841. package/build/relations/RelationSymbols.cjs +1 -2
  842. package/build/relations/RelationSymbols.d.cts +0 -2
  843. package/build/relations/RelationSymbols.d.cts.map +1 -1
  844. package/build/relations/RelationSymbols.d.mts +0 -2
  845. package/build/relations/RelationSymbols.d.mts.map +1 -1
  846. package/build/relations/RelationSymbols.js +1 -2
  847. package/build/relations/hasAsyncMethod.cjs +6 -7
  848. package/build/relations/hasAsyncMethod.d.cts +2 -4
  849. package/build/relations/hasAsyncMethod.d.cts.map +1 -1
  850. package/build/relations/hasAsyncMethod.d.mts +2 -4
  851. package/build/relations/hasAsyncMethod.d.mts.map +1 -1
  852. package/build/relations/hasAsyncMethod.js +6 -7
  853. package/build/relations/hasManyDerived.cjs +4 -5
  854. package/build/relations/hasManyDerived.d.cts +2 -4
  855. package/build/relations/hasManyDerived.d.cts.map +1 -1
  856. package/build/relations/hasManyDerived.d.mts +2 -4
  857. package/build/relations/hasManyDerived.d.mts.map +1 -1
  858. package/build/relations/hasManyDerived.js +4 -5
  859. package/build/relations/hasManyThrough.cjs +3 -4
  860. package/build/relations/hasManyThrough.d.cts +0 -2
  861. package/build/relations/hasManyThrough.d.cts.map +1 -1
  862. package/build/relations/hasManyThrough.d.mts +0 -2
  863. package/build/relations/hasManyThrough.d.mts.map +1 -1
  864. package/build/relations/hasManyThrough.js +3 -4
  865. package/build/relations/hasOneDerived.cjs +4 -5
  866. package/build/relations/hasOneDerived.d.cts +2 -4
  867. package/build/relations/hasOneDerived.d.cts.map +1 -1
  868. package/build/relations/hasOneDerived.d.mts +2 -4
  869. package/build/relations/hasOneDerived.d.mts.map +1 -1
  870. package/build/relations/hasOneDerived.js +4 -5
  871. package/build/relations/hasOneThrough.cjs +3 -4
  872. package/build/relations/hasOneThrough.d.cts +0 -2
  873. package/build/relations/hasOneThrough.d.cts.map +1 -1
  874. package/build/relations/hasOneThrough.d.mts +0 -2
  875. package/build/relations/hasOneThrough.d.mts.map +1 -1
  876. package/build/relations/hasOneThrough.js +3 -4
  877. package/build/relations/hasProperty.cjs +5 -6
  878. package/build/relations/hasProperty.d.cts +2 -4
  879. package/build/relations/hasProperty.d.cts.map +1 -1
  880. package/build/relations/hasProperty.d.mts +2 -4
  881. package/build/relations/hasProperty.d.mts.map +1 -1
  882. package/build/relations/hasProperty.js +5 -6
  883. package/build/relations/hasReactiveAsyncMethod.cjs +5 -6
  884. package/build/relations/hasReactiveAsyncMethod.d.cts +3 -5
  885. package/build/relations/hasReactiveAsyncMethod.d.cts.map +1 -1
  886. package/build/relations/hasReactiveAsyncMethod.d.mts +3 -5
  887. package/build/relations/hasReactiveAsyncMethod.d.mts.map +1 -1
  888. package/build/relations/hasReactiveAsyncMethod.js +5 -6
  889. package/build/relations/index.cjs +9 -9
  890. package/build/relations/index.d.cts +3 -3
  891. package/build/relations/index.d.mts +3 -3
  892. package/build/relations/index.js +9 -9
  893. package/build/relations/isCascadeDelete.cjs +1 -2
  894. package/build/relations/isCascadeDelete.d.cts +0 -2
  895. package/build/relations/isCascadeDelete.d.cts.map +1 -1
  896. package/build/relations/isCascadeDelete.d.mts +0 -2
  897. package/build/relations/isCascadeDelete.d.mts.map +1 -1
  898. package/build/relations/isCascadeDelete.js +1 -2
  899. package/build/resurrection.cjs +4 -5
  900. package/build/resurrection.d.cts +2 -4
  901. package/build/resurrection.d.cts.map +1 -1
  902. package/build/resurrection.d.mts +2 -4
  903. package/build/resurrection.d.mts.map +1 -1
  904. package/build/resurrection.js +4 -5
  905. package/build/rules.cjs +6 -7
  906. package/build/rules.d.cts +3 -5
  907. package/build/rules.d.cts.map +1 -1
  908. package/build/rules.d.mts +3 -5
  909. package/build/rules.d.mts.map +1 -1
  910. package/build/rules.js +6 -7
  911. package/build/runtimeConfig.cjs +1 -2
  912. package/build/runtimeConfig.d.cts +0 -2
  913. package/build/runtimeConfig.d.cts.map +1 -1
  914. package/build/runtimeConfig.d.mts +0 -2
  915. package/build/runtimeConfig.d.mts.map +1 -1
  916. package/build/runtimeConfig.js +1 -2
  917. package/build/serde/TypeInfo.cjs +1 -2
  918. package/build/serde/TypeInfo.d.cts +0 -2
  919. package/build/serde/TypeInfo.d.cts.map +1 -1
  920. package/build/serde/TypeInfo.d.mts +0 -2
  921. package/build/serde/TypeInfo.d.mts.map +1 -1
  922. package/build/serde/TypeInfo.js +1 -2
  923. package/build/serde/columns.cjs +1 -2
  924. package/build/serde/columns.d.cts +2 -4
  925. package/build/serde/columns.d.cts.map +1 -1
  926. package/build/serde/columns.d.mts +2 -4
  927. package/build/serde/columns.d.mts.map +1 -1
  928. package/build/serde/columns.js +1 -2
  929. package/build/serde/fieldSerde.cjs +4 -5
  930. package/build/serde/fieldSerde.d.cts +4 -6
  931. package/build/serde/fieldSerde.d.cts.map +1 -1
  932. package/build/serde/fieldSerde.d.mts +4 -6
  933. package/build/serde/fieldSerde.d.mts.map +1 -1
  934. package/build/serde/fieldSerde.js +4 -5
  935. package/build/serde/serde.cjs +4 -5
  936. package/build/serde/serde.cjs.map +1 -1
  937. package/build/serde/serde.d.cts +0 -2
  938. package/build/serde/serde.d.cts.map +1 -1
  939. package/build/serde/serde.d.mts +0 -2
  940. package/build/serde/serde.d.mts.map +1 -1
  941. package/build/serde/serde.js +4 -5
  942. package/build/serde/temporal.cjs +1 -2
  943. package/build/serde/temporal.cjs.map +1 -1
  944. package/build/serde/temporal.d.cts +0 -2
  945. package/build/serde/temporal.d.cts.map +1 -1
  946. package/build/serde/temporal.d.mts +0 -2
  947. package/build/serde/temporal.d.mts.map +1 -1
  948. package/build/serde/temporal.js +1 -2
  949. package/build/serde/temporalMappers.cjs +1 -2
  950. package/build/serde/temporalMappers.d.cts +1 -3
  951. package/build/serde/temporalMappers.d.cts.map +1 -1
  952. package/build/serde/temporalMappers.d.mts +1 -3
  953. package/build/serde/temporalMappers.d.mts.map +1 -1
  954. package/build/serde/temporalMappers.js +1 -2
  955. package/build/transitions.cjs +2 -3
  956. package/build/transitions.d.cts +3 -5
  957. package/build/transitions.d.cts.map +1 -1
  958. package/build/transitions.d.mts +3 -5
  959. package/build/transitions.d.mts.map +1 -1
  960. package/build/transitions.js +2 -3
  961. package/build/trusted.cjs +1 -2
  962. package/build/trusted.cjs.map +1 -1
  963. package/build/trusted.d.cts +0 -2
  964. package/build/trusted.d.cts.map +1 -1
  965. package/build/trusted.d.mts +0 -2
  966. package/build/trusted.d.mts.map +1 -1
  967. package/build/trusted.js +1 -2
  968. package/build/typeMap.cjs +1 -1
  969. package/build/typeMap.d.cts +1 -3
  970. package/build/typeMap.d.cts.map +1 -1
  971. package/build/typeMap.d.mts +1 -3
  972. package/build/typeMap.d.mts.map +1 -1
  973. package/build/typeMap.js +1 -1
  974. package/build/upsert.cjs +7 -8
  975. package/build/upsert.d.cts +3 -5
  976. package/build/upsert.d.cts.map +1 -1
  977. package/build/upsert.d.mts +3 -5
  978. package/build/upsert.d.mts.map +1 -1
  979. package/build/upsert.js +7 -8
  980. package/build/utils.cjs +3 -4
  981. package/build/utils.d.cts +2 -4
  982. package/build/utils.d.cts.map +1 -1
  983. package/build/utils.d.mts +2 -4
  984. package/build/utils.d.mts.map +1 -1
  985. package/build/utils.js +3 -4
  986. package/package.json +4 -4
@@ -2,9 +2,15 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_keys = require("./keys.cjs");
3
3
  const require_EntityMetadata = require("./EntityMetadata.cjs");
4
4
  const require_InstanceData = require("./InstanceData.cjs");
5
- require("./index.cjs");
6
5
  require("./Entity.cjs");
7
- //#region src/BaseEntity.ts
6
+ require("./index.cjs");
7
+ // src/BaseEntity.ts
8
+ const readWordDescriptor = {
9
+ value: 0,
10
+ enumerable: false,
11
+ writable: true,
12
+ configurable: true
13
+ };
8
14
  /**
9
15
  * Returns the internal `__data` tracking field for `entity`.
10
16
  *
@@ -103,8 +109,8 @@ function baseEntityCstr(em, entity, isNew) {
103
109
  writable: false,
104
110
  configurable: false
105
111
  });
112
+ for (let word = 0; word < data.metadata.fieldReadWordCount; word++) Object.defineProperty(entity, word === 0 ? "__readFields" : `__readFields${word}`, readWordDescriptor);
106
113
  }
107
- //#endregion
108
114
  exports.BaseEntity = BaseEntity;
109
115
  exports.baseEntityCstr = baseEntityCstr;
110
116
  exports.getInstanceData = getInstanceData;
@@ -1 +1 @@
1
- {"version":3,"file":"BaseEntity.cjs","names":["deTagId","getMetadata","keyToNumber","InstanceData"],"sources":["../src/BaseEntity.ts"],"sourcesContent":["import { type IdType } from \"src/Entity.ts\";\nimport {\n type Entity,\n type EntityManager,\n type EntityMetadata,\n InstanceData,\n type TaggedId,\n deTagId,\n getMetadata,\n keyToNumber,\n} from \"src/index.ts\";\n\n/**\n * Returns the internal `__data` tracking field for `entity`.\n *\n * This should be treated as an internal API and may change without notice.\n */\nexport function getInstanceData(entity: Entity): InstanceData {\n return BaseEntity.getInstanceData(entity);\n}\n\n/**\n * The base class for all entities.\n *\n * Currently, this just adds the `.load(lensFn)` method for declarative reference traversal.\n */\nexport abstract class BaseEntity<EM extends EntityManager, I extends IdType = IdType> implements Entity {\n public static getInstanceData(entity: Entity): InstanceData {\n return (entity as BaseEntity<any>).__data;\n }\n // We use a protected field so that subclass getters can easily access `this.__data.relations`.\n protected readonly __data!: InstanceData;\n\n /** The single-arg constructor is our psuedo-public API that can only be called by the EntityManager. */\n constructor(em: EntityManager);\n constructor(em: EntityManager, isNew?: boolean) {\n if (isNew === undefined) {\n throw new Error(\"Entities must be constructed by calling em.create or em.load\");\n }\n // This code path won't be reused for real entities, as they go through the `newEntity`\n // construction process that lazifies the relations.\n baseEntityCstr(em, this, isNew);\n }\n\n // This gives rules a way to access the fully typed object instead of their Reacted view.\n // And we make it public so that a function that takes Reacted<...> can accept a Loaded<...>\n // that sufficiently overlaps.\n get fullNonReactiveAccess(): this {\n return this;\n }\n\n /** @returns the entity's id, tagged/untagged based on your config, or a runtime error if it's new/unassigned. */\n abstract id: I;\n\n /** @returns the entity's, tagged/untagged based on your config, or undefined if it's new/unassigned. */\n abstract get idMaybe(): I | undefined;\n\n /** @returns the entity's id, always tagged, or a runtime error if it's new/unassigned. */\n abstract idTagged: TaggedId;\n\n /** @returns the entity's id, always tagged, or undefined if it's new/unassigned. */\n abstract get idTaggedMaybe(): TaggedId | undefined;\n\n /** @returns the entity's id, always untagged, or a runtime error if it's unassigned. */\n get idUntagged(): string {\n return deTagId(getMetadata(this), this.id);\n }\n\n abstract set(opts: unknown): void;\n\n /**\n * Similar to `set` but applies \"Partial API\" semantics, i.e. `null` means unset and `undefined` means don't change.\n */\n abstract setPartial(opts: unknown): void;\n\n /**\n * Similar to `set` but applies \"Partial API\" semantics, i.e. `null` means unset and `undefined` means don't change.\n */\n abstract setDeepPartial(opts: unknown): Promise<void>;\n\n /**\n * Returns whether the entity is new.\n *\n * This is not just `this.id === undefined`, because just assigning an id doesn't mean the entity\n * is no longer new; this only flips to `false` after the `flush` transaction has been committed.\n */\n get isNewEntity(): boolean {\n return this.__data.isNewEntity;\n }\n\n get isDeletedEntity(): boolean {\n return this.__data.isDeletedEntity;\n }\n\n get isDirtyEntity(): boolean {\n return this.__data.isDirtyEntity;\n }\n\n toString(): string {\n const meta = getMetadata(this);\n return toStringWithPrefix(meta, this, meta.type);\n }\n\n toTaggedString(): string {\n const meta = getMetadata(this);\n return toStringWithPrefix(meta, this, meta.tagName);\n }\n\n public get em(): EM {\n return this.__data.em as EM;\n }\n\n /**\n * A very simple toJSON that just returns the id.\n *\n * This is for security reasons, to avoid accidentally logging sensitive data; you\n * can specify more fields, and potentially nested return data, by using passing\n * a {@link JsonHint} to `toJSON`.\n */\n public toJSON(): object {\n return { id: this.idMaybe || null };\n }\n\n [Symbol.toStringTag](): string {\n return this.toString();\n }\n\n /**\n * Hooks into node's `console.log` to avoid sprawling output of our relations/internal state.\n *\n * See https://nodejs.org/api/util.html#custom-inspection-functions-on-objects.\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")](): string {\n return this.toString();\n }\n\n /** A bag of non-persisted state, typically for flags that control business logic behavior. */\n declare readonly transientFields: Record<string, unknown>;\n}\n\nfunction toStringWithPrefix(meta: EntityMetadata, entity: Entity, prefix: string): string {\n // Start with `Author` or `a`, depending on the caller\n let result = prefix;\n // Add `#1` if this is an em.create-d entity\n const data = getInstanceData(entity);\n const createId = data.createId;\n if (createId) {\n result += `#${createId}`;\n }\n // Add the `:1` but only after our flush is complete, otherwise the id is\n // internally assigned but not really flushed/committed to the db yet\n const dbId = entity.idTaggedMaybe;\n if (data.pendingOperation !== \"insert\" && dbId) {\n // Strip the tag because we add back the entity prefix\n result += `:${keyToNumber(meta, dbId)}`;\n }\n return result;\n}\n\n/**\n * The constructor logic for `BaseEntity` but exposed so that `newEntity` can use it too\n * on its `Object.create`-d instances.\n */\nexport function baseEntityCstr(em: EntityManager, entity: BaseEntity<any, any>, isNew: boolean): void {\n const data = new InstanceData(em, entity, (entity.constructor as any).metadata, isNew);\n // This makes it non-enumerable to avoid Jest/recursive things tripping over it\n Object.defineProperty(entity, \"__data\", { value: data, enumerable: false, writable: false, configurable: false });\n}\n"],"mappings":";;;;;;;;;;;;AAiBA,SAAgB,gBAAgB,QAA8B;CAC5D,OAAO,WAAW,gBAAgB,MAAM;AAC1C;;;;;;AAOA,IAAsB,aAAtB,MAAwG;CACtG,OAAc,gBAAgB,QAA8B;EAC1D,OAAQ,OAA2B;CACrC;CAEA;CAIA,YAAY,IAAmB,OAAiB;EAC9C,IAAI,UAAU,KAAA,GACZ,MAAM,IAAI,MAAM,8DAA8D;EAIhF,eAAe,IAAI,MAAM,KAAK;CAChC;CAKA,IAAI,wBAA8B;EAChC,OAAO;CACT;;CAeA,IAAI,aAAqB;EACvB,OAAOA,aAAAA,QAAQC,uBAAAA,YAAY,IAAI,GAAG,KAAK,EAAE;CAC3C;;;;;;;CAoBA,IAAI,cAAuB;EACzB,OAAO,KAAK,OAAO;CACrB;CAEA,IAAI,kBAA2B;EAC7B,OAAO,KAAK,OAAO;CACrB;CAEA,IAAI,gBAAyB;EAC3B,OAAO,KAAK,OAAO;CACrB;CAEA,WAAmB;EACjB,MAAM,OAAOA,uBAAAA,YAAY,IAAI;EAC7B,OAAO,mBAAmB,MAAM,MAAM,KAAK,IAAI;CACjD;CAEA,iBAAyB;EACvB,MAAM,OAAOA,uBAAAA,YAAY,IAAI;EAC7B,OAAO,mBAAmB,MAAM,MAAM,KAAK,OAAO;CACpD;CAEA,IAAW,KAAS;EAClB,OAAO,KAAK,OAAO;CACrB;;;;;;;;CASA,SAAwB;EACtB,OAAO,EAAE,IAAI,KAAK,WAAW,KAAK;CACpC;CAEA,CAAC,OAAO,eAAuB;EAC7B,OAAO,KAAK,SAAS;CACvB;;;;;;CAOA,CAAC,OAAO,IAAI,4BAA4B,KAAa;EACnD,OAAO,KAAK,SAAS;CACvB;AAIF;AAEA,SAAS,mBAAmB,MAAsB,QAAgB,QAAwB;CAExF,IAAI,SAAS;CAEb,MAAM,OAAO,gBAAgB,MAAM;CACnC,MAAM,WAAW,KAAK;CACtB,IAAI,UACF,UAAU,IAAI;CAIhB,MAAM,OAAO,OAAO;CACpB,IAAI,KAAK,qBAAqB,YAAY,MAExC,UAAU,IAAIC,aAAAA,YAAY,MAAM,IAAI;CAEtC,OAAO;AACT;;;;;AAMA,SAAgB,eAAe,IAAmB,QAA8B,OAAsB;CACpG,MAAM,OAAO,IAAIC,qBAAAA,aAAa,IAAI,QAAS,OAAO,YAAoB,UAAU,KAAK;CAErF,OAAO,eAAe,QAAQ,UAAU;EAAE,OAAO;EAAM,YAAY;EAAO,UAAU;EAAO,cAAc;CAAM,CAAC;AAClH"}
1
+ {"version":3,"file":"BaseEntity.cjs","names":["deTagId","getMetadata","keyToNumber","InstanceData"],"sources":["../src/BaseEntity.ts"],"sourcesContent":["import { type IdType } from \"src/Entity.ts\";\nimport {\n type Entity,\n type EntityManager,\n type EntityMetadata,\n InstanceData,\n type TaggedId,\n deTagId,\n getMetadata,\n keyToNumber,\n} from \"src/index.ts\";\n\n// getProperties deletes its throwaway entity's own fields so callback access to `this` hits a guard proxy.\n// That includes these non-enumerable words, so they must be configurable (deletable).\nconst readWordDescriptor: PropertyDescriptor = { value: 0, enumerable: false, writable: true, configurable: true };\n\n/**\n * Returns the internal `__data` tracking field for `entity`.\n *\n * This should be treated as an internal API and may change without notice.\n */\nexport function getInstanceData(entity: Entity): InstanceData {\n return BaseEntity.getInstanceData(entity);\n}\n\n/**\n * The base class for all entities.\n *\n * Currently, this just adds the `.load(lensFn)` method for declarative reference traversal.\n */\nexport abstract class BaseEntity<EM extends EntityManager, I extends IdType = IdType> implements Entity {\n public static getInstanceData(entity: Entity): InstanceData {\n return (entity as BaseEntity<any>).__data;\n }\n\n // We use a protected field so that subclass getters can easily access `this.__data.relations`.\n protected readonly __data!: InstanceData;\n /** First-read completion bits; extra words are declared by each generated root type as needed. */\n declare protected __readFields: number;\n\n /** The single-arg constructor is our psuedo-public API that can only be called by the EntityManager. */\n constructor(em: EntityManager);\n constructor(em: EntityManager, isNew?: boolean) {\n if (isNew === undefined) {\n throw new Error(\"Entities must be constructed by calling em.create or em.load\");\n }\n // This code path won't be reused for real entities, as they go through the `newEntity`\n // construction process that lazifies the relations.\n baseEntityCstr(em, this, isNew);\n }\n\n // This gives rules a way to access the fully typed object instead of their Reacted view.\n // And we make it public so that a function that takes Reacted<...> can accept a Loaded<...>\n // that sufficiently overlaps.\n get fullNonReactiveAccess(): this {\n return this;\n }\n\n /** @returns the entity's id, tagged/untagged based on your config, or a runtime error if it's new/unassigned. */\n abstract id: I;\n\n /** @returns the entity's, tagged/untagged based on your config, or undefined if it's new/unassigned. */\n abstract get idMaybe(): I | undefined;\n\n /** @returns the entity's id, always tagged, or a runtime error if it's new/unassigned. */\n abstract idTagged: TaggedId;\n\n /** @returns the entity's id, always tagged, or undefined if it's new/unassigned. */\n abstract get idTaggedMaybe(): TaggedId | undefined;\n\n /** @returns the entity's id, always untagged, or a runtime error if it's unassigned. */\n get idUntagged(): string {\n return deTagId(getMetadata(this), this.id);\n }\n\n abstract set(opts: unknown): void;\n\n /**\n * Similar to `set` but applies \"Partial API\" semantics, i.e. `null` means unset and `undefined` means don't change.\n */\n abstract setPartial(opts: unknown): void;\n\n /**\n * Similar to `set` but applies \"Partial API\" semantics, i.e. `null` means unset and `undefined` means don't change.\n */\n abstract setDeepPartial(opts: unknown): Promise<void>;\n\n /**\n * Returns whether the entity is new.\n *\n * This is not just `this.id === undefined`, because just assigning an id doesn't mean the entity\n * is no longer new; this only flips to `false` after the `flush` transaction has been committed.\n */\n get isNewEntity(): boolean {\n return this.__data.isNewEntity;\n }\n\n get isDeletedEntity(): boolean {\n return this.__data.isDeletedEntity;\n }\n\n get isDirtyEntity(): boolean {\n return this.__data.isDirtyEntity;\n }\n\n toString(): string {\n const meta = getMetadata(this);\n return toStringWithPrefix(meta, this, meta.type);\n }\n\n toTaggedString(): string {\n const meta = getMetadata(this);\n return toStringWithPrefix(meta, this, meta.tagName);\n }\n\n public get em(): EM {\n return this.__data.em as EM;\n }\n\n /**\n * A very simple toJSON that just returns the id.\n *\n * This is for security reasons, to avoid accidentally logging sensitive data; you\n * can specify more fields, and potentially nested return data, by using passing\n * a {@link JsonHint} to `toJSON`.\n */\n public toJSON(): object {\n return { id: this.idMaybe || null };\n }\n\n [Symbol.toStringTag](): string {\n return this.toString();\n }\n\n /**\n * Hooks into node's `console.log` to avoid sprawling output of our relations/internal state.\n *\n * See https://nodejs.org/api/util.html#custom-inspection-functions-on-objects.\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")](): string {\n return this.toString();\n }\n\n /** A bag of non-persisted state, typically for flags that control business logic behavior. */\n declare readonly transientFields: Record<string, unknown>;\n}\n\nfunction toStringWithPrefix(meta: EntityMetadata, entity: Entity, prefix: string): string {\n // Start with `Author` or `a`, depending on the caller\n let result = prefix;\n // Add `#1` if this is an em.create-d entity\n const data = getInstanceData(entity);\n const createId = data.createId;\n if (createId) {\n result += `#${createId}`;\n }\n // Add the `:1` but only after our flush is complete, otherwise the id is\n // internally assigned but not really flushed/committed to the db yet\n const dbId = entity.idTaggedMaybe;\n if (data.pendingOperation !== \"insert\" && dbId) {\n // Strip the tag because we add back the entity prefix\n result += `:${keyToNumber(meta, dbId)}`;\n }\n return result;\n}\n\n/**\n * The constructor logic for `BaseEntity` but exposed so that `newEntity` can use it too\n * on its `Object.create`-d instances.\n */\nexport function baseEntityCstr(em: EntityManager, entity: BaseEntity<any, any>, isNew: boolean): void {\n const data = new InstanceData(em, entity, (entity.constructor as any).metadata, isNew);\n // This makes it non-enumerable to avoid Jest/recursive things tripping over it\n Object.defineProperty(entity, \"__data\", { value: data, enumerable: false, writable: false, configurable: false });\n // Constructors are bypassed for real entities, so initialize every needed word here,\n // in the same order for the entire inheritance family. Reusing the descriptor avoids per-entity descriptor objects.\n for (let word = 0; word < data.metadata.fieldReadWordCount; word++) {\n Object.defineProperty(entity, word === 0 ? \"__readFields\" : `__readFields${word}`, readWordDescriptor);\n }\n}\n"],"mappings":";;;;;;;AAcA,MAAM,qBAAyC;CAAE,OAAO;CAAG,YAAY;CAAO,UAAU;CAAM,cAAc;AAAK;;;;;;AAOjH,SAAgB,gBAAgB,QAA8B;CAC5D,OAAO,WAAW,gBAAgB,MAAM;AAC1C;;;;;;AAOA,IAAsB,aAAtB,MAAwG;CACtG,OAAc,gBAAgB,QAA8B;EAC1D,OAAQ,OAA2B;CACrC;CAGA;CAMA,YAAY,IAAmB,OAAiB;EAC9C,IAAI,UAAU,KAAA,GACZ,MAAM,IAAI,MAAM,8DAA8D;EAIhF,eAAe,IAAI,MAAM,KAAK;CAChC;CAKA,IAAI,wBAA8B;EAChC,OAAO;CACT;;CAeA,IAAI,aAAqB;EACvB,OAAOA,aAAAA,QAAQC,uBAAAA,YAAY,IAAI,GAAG,KAAK,EAAE;CAC3C;;;;;;;CAoBA,IAAI,cAAuB;EACzB,OAAO,KAAK,OAAO;CACrB;CAEA,IAAI,kBAA2B;EAC7B,OAAO,KAAK,OAAO;CACrB;CAEA,IAAI,gBAAyB;EAC3B,OAAO,KAAK,OAAO;CACrB;CAEA,WAAmB;EACjB,MAAM,OAAOA,uBAAAA,YAAY,IAAI;EAC7B,OAAO,mBAAmB,MAAM,MAAM,KAAK,IAAI;CACjD;CAEA,iBAAyB;EACvB,MAAM,OAAOA,uBAAAA,YAAY,IAAI;EAC7B,OAAO,mBAAmB,MAAM,MAAM,KAAK,OAAO;CACpD;CAEA,IAAW,KAAS;EAClB,OAAO,KAAK,OAAO;CACrB;;;;;;;;CASA,SAAwB;EACtB,OAAO,EAAE,IAAI,KAAK,WAAW,KAAK;CACpC;CAEA,CAAC,OAAO,eAAuB;EAC7B,OAAO,KAAK,SAAS;CACvB;;;;;;CAOA,CAAC,OAAO,IAAI,4BAA4B,KAAa;EACnD,OAAO,KAAK,SAAS;CACvB;AAIF;AAEA,SAAS,mBAAmB,MAAsB,QAAgB,QAAwB;CAExF,IAAI,SAAS;CAEb,MAAM,OAAO,gBAAgB,MAAM;CACnC,MAAM,WAAW,KAAK;CACtB,IAAI,UACF,UAAU,IAAI;CAIhB,MAAM,OAAO,OAAO;CACpB,IAAI,KAAK,qBAAqB,YAAY,MAExC,UAAU,IAAIC,aAAAA,YAAY,MAAM,IAAI;CAEtC,OAAO;AACT;;;;;AAMA,SAAgB,eAAe,IAAmB,QAA8B,OAAsB;CACpG,MAAM,OAAO,IAAIC,qBAAAA,aAAa,IAAI,QAAS,OAAO,YAAoB,UAAU,KAAK;CAErF,OAAO,eAAe,QAAQ,UAAU;EAAE,OAAO;EAAM,YAAY;EAAO,UAAU;EAAO,cAAc;CAAM,CAAC;CAGhH,KAAK,IAAI,OAAO,GAAG,OAAO,KAAK,SAAS,oBAAoB,QAC1D,OAAO,eAAe,QAAQ,SAAS,IAAI,iBAAiB,eAAe,QAAQ,kBAAkB;AAEzG"}
@@ -1,8 +1,7 @@
1
1
  import { InstanceData } from "./InstanceData.cjs";
2
- import "./index.cjs";
3
- import { EntityManager, TaggedId } from "./EntityManager.cjs";
4
2
  import { Entity, IdType } from "./Entity.cjs";
5
- //#region src/BaseEntity.d.ts
3
+ import { EntityManager, TaggedId } from "./EntityManager.cjs";
4
+ import "./index.cjs";
6
5
  /**
7
6
  * Returns the internal `__data` tracking field for `entity`.
8
7
  *
@@ -17,6 +16,8 @@ export declare function getInstanceData(entity: Entity): InstanceData;
17
16
  export declare abstract class BaseEntity<EM extends EntityManager, I extends IdType = IdType> implements Entity {
18
17
  static getInstanceData(entity: Entity): InstanceData;
19
18
  protected readonly __data: InstanceData;
19
+ /** First-read completion bits; extra words are declared by each generated root type as needed. */
20
+ protected __readFields: number;
20
21
  /** The single-arg constructor is our psuedo-public API that can only be called by the EntityManager. */
21
22
  constructor(em: EntityManager);
22
23
  get fullNonReactiveAccess(): this;
@@ -68,5 +69,4 @@ export declare abstract class BaseEntity<EM extends EntityManager, I extends IdT
68
69
  * on its `Object.create`-d instances.
69
70
  */
70
71
  export declare function baseEntityCstr(em: EntityManager, entity: BaseEntity<any, any>, isNew: boolean): void;
71
- //#endregion
72
72
  //# sourceMappingURL=BaseEntity.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseEntity.d.cts","names":[],"sources":["../src/BaseEntity.ts"],"mappings":";;;;;;;;;;wBAiBgB,gBAAgB,QAAQ,SAAS;;;;;;8BAS3B,WAAW,WAAW,eAAe,UAAU,SAAS,mBAAmB;SACjF,gBAAgB,QAAQ,SAAS;qBAI5B,QAAS;;EAG5B,YAAY,IAAI;MAaZ;;WAKK,IAAI;;eAGA,WAAW;;WAGf,UAAU;;eAGN,iBAAiB;;MAG1B;WAIK,IAAI;;;;WAKJ,WAAW;;;;WAKX,eAAe,gBAAgB;;;;;;;MAQpC;MAIA;MAIA;EAIJ;EAKA;MAKW,MAAM;;;;;;;;EAWV;GAIN,OAAO;;WAcS,iBAAiB;;;;;;wBA0BpB,eAAe,IAAI,eAAe,QAAQ,sBAAsB"}
1
+ {"version":3,"file":"BaseEntity.d.cts","names":[],"sources":["../src/BaseEntity.ts"],"mappings":";;;;;;;;;wBAqBgB,gBAAgB,QAAQ,SAAS;;;;;;8BAS3B,WAAW,WAAW,eAAe,UAAU,SAAS,mBAAmB;SACjF,gBAAgB,QAAQ,SAAS;qBAK5B,QAAS;;YAEV;;EAGlB,YAAY,IAAI;MAaZ;;WAKK,IAAI;;eAGA,WAAW;;WAGf,UAAU;;eAGN,iBAAiB;;MAG1B;WAIK,IAAI;;;;WAKJ,WAAW;;;;WAKX,eAAe,gBAAgB;;;;;;;MAQpC;MAIA;MAIA;EAIJ;EAKA;MAKW,MAAM;;;;;;;;EAWV;GAIN,OAAO;;WAcS,iBAAiB;;;;;;wBA0BpB,eAAe,IAAI,eAAe,QAAQ,sBAAsB"}
@@ -1,8 +1,7 @@
1
1
  import { InstanceData } from "./InstanceData.mjs";
2
- import "./index.mjs";
3
- import { EntityManager, TaggedId } from "./EntityManager.mjs";
4
2
  import { Entity, IdType } from "./Entity.mjs";
5
- //#region src/BaseEntity.d.ts
3
+ import { EntityManager, TaggedId } from "./EntityManager.mjs";
4
+ import "./index.mjs";
6
5
  /**
7
6
  * Returns the internal `__data` tracking field for `entity`.
8
7
  *
@@ -17,6 +16,8 @@ export declare function getInstanceData(entity: Entity): InstanceData;
17
16
  export declare abstract class BaseEntity<EM extends EntityManager, I extends IdType = IdType> implements Entity {
18
17
  static getInstanceData(entity: Entity): InstanceData;
19
18
  protected readonly __data: InstanceData;
19
+ /** First-read completion bits; extra words are declared by each generated root type as needed. */
20
+ protected __readFields: number;
20
21
  /** The single-arg constructor is our psuedo-public API that can only be called by the EntityManager. */
21
22
  constructor(em: EntityManager);
22
23
  get fullNonReactiveAccess(): this;
@@ -68,5 +69,4 @@ export declare abstract class BaseEntity<EM extends EntityManager, I extends IdT
68
69
  * on its `Object.create`-d instances.
69
70
  */
70
71
  export declare function baseEntityCstr(em: EntityManager, entity: BaseEntity<any, any>, isNew: boolean): void;
71
- //#endregion
72
72
  //# sourceMappingURL=BaseEntity.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseEntity.d.mts","names":[],"sources":["../src/BaseEntity.ts"],"mappings":";;;;;;;;;;wBAiBgB,gBAAgB,QAAQ,SAAS;;;;;;8BAS3B,WAAW,WAAW,eAAe,UAAU,SAAS,mBAAmB;SACjF,gBAAgB,QAAQ,SAAS;qBAI5B,QAAS;;EAG5B,YAAY,IAAI;MAaZ;;WAKK,IAAI;;eAGA,WAAW;;WAGf,UAAU;;eAGN,iBAAiB;;MAG1B;WAIK,IAAI;;;;WAKJ,WAAW;;;;WAKX,eAAe,gBAAgB;;;;;;;MAQpC;MAIA;MAIA;EAIJ;EAKA;MAKW,MAAM;;;;;;;;EAWV;GAIN,OAAO;;WAcS,iBAAiB;;;;;;wBA0BpB,eAAe,IAAI,eAAe,QAAQ,sBAAsB"}
1
+ {"version":3,"file":"BaseEntity.d.mts","names":[],"sources":["../src/BaseEntity.ts"],"mappings":";;;;;;;;;wBAqBgB,gBAAgB,QAAQ,SAAS;;;;;;8BAS3B,WAAW,WAAW,eAAe,UAAU,SAAS,mBAAmB;SACjF,gBAAgB,QAAQ,SAAS;qBAK5B,QAAS;;YAEV;;EAGlB,YAAY,IAAI;MAaZ;;WAKK,IAAI;;eAGA,WAAW;;WAGf,UAAU;;eAGN,iBAAiB;;MAG1B;WAIK,IAAI;;;;WAKJ,WAAW;;;;WAKX,eAAe,gBAAgB;;;;;;;MAQpC;MAIA;MAIA;EAIJ;EAKA;MAKW,MAAM;;;;;;;;EAWV;GAIN,OAAO;;WAcS,iBAAiB;;;;;;wBA0BpB,eAAe,IAAI,eAAe,QAAQ,sBAAsB"}
@@ -1,9 +1,15 @@
1
1
  import { deTagId, keyToNumber } from "./keys.js";
2
2
  import { getMetadata } from "./EntityMetadata.js";
3
3
  import { InstanceData } from "./InstanceData.js";
4
- import "./index.js";
5
4
  import "./Entity.js";
6
- //#region src/BaseEntity.ts
5
+ import "./index.js";
6
+ // src/BaseEntity.ts
7
+ const readWordDescriptor = {
8
+ value: 0,
9
+ enumerable: false,
10
+ writable: true,
11
+ configurable: true
12
+ };
7
13
  /**
8
14
  * Returns the internal `__data` tracking field for `entity`.
9
15
  *
@@ -102,8 +108,8 @@ function baseEntityCstr(em, entity, isNew) {
102
108
  writable: false,
103
109
  configurable: false
104
110
  });
111
+ for (let word = 0; word < data.metadata.fieldReadWordCount; word++) Object.defineProperty(entity, word === 0 ? "__readFields" : `__readFields${word}`, readWordDescriptor);
105
112
  }
106
- //#endregion
107
113
  export { BaseEntity, baseEntityCstr, getInstanceData };
108
114
 
109
115
  //# sourceMappingURL=BaseEntity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseEntity.js","names":[],"sources":["../src/BaseEntity.ts"],"sourcesContent":["import { type IdType } from \"src/Entity.ts\";\nimport {\n type Entity,\n type EntityManager,\n type EntityMetadata,\n InstanceData,\n type TaggedId,\n deTagId,\n getMetadata,\n keyToNumber,\n} from \"src/index.ts\";\n\n/**\n * Returns the internal `__data` tracking field for `entity`.\n *\n * This should be treated as an internal API and may change without notice.\n */\nexport function getInstanceData(entity: Entity): InstanceData {\n return BaseEntity.getInstanceData(entity);\n}\n\n/**\n * The base class for all entities.\n *\n * Currently, this just adds the `.load(lensFn)` method for declarative reference traversal.\n */\nexport abstract class BaseEntity<EM extends EntityManager, I extends IdType = IdType> implements Entity {\n public static getInstanceData(entity: Entity): InstanceData {\n return (entity as BaseEntity<any>).__data;\n }\n // We use a protected field so that subclass getters can easily access `this.__data.relations`.\n protected readonly __data!: InstanceData;\n\n /** The single-arg constructor is our psuedo-public API that can only be called by the EntityManager. */\n constructor(em: EntityManager);\n constructor(em: EntityManager, isNew?: boolean) {\n if (isNew === undefined) {\n throw new Error(\"Entities must be constructed by calling em.create or em.load\");\n }\n // This code path won't be reused for real entities, as they go through the `newEntity`\n // construction process that lazifies the relations.\n baseEntityCstr(em, this, isNew);\n }\n\n // This gives rules a way to access the fully typed object instead of their Reacted view.\n // And we make it public so that a function that takes Reacted<...> can accept a Loaded<...>\n // that sufficiently overlaps.\n get fullNonReactiveAccess(): this {\n return this;\n }\n\n /** @returns the entity's id, tagged/untagged based on your config, or a runtime error if it's new/unassigned. */\n abstract id: I;\n\n /** @returns the entity's, tagged/untagged based on your config, or undefined if it's new/unassigned. */\n abstract get idMaybe(): I | undefined;\n\n /** @returns the entity's id, always tagged, or a runtime error if it's new/unassigned. */\n abstract idTagged: TaggedId;\n\n /** @returns the entity's id, always tagged, or undefined if it's new/unassigned. */\n abstract get idTaggedMaybe(): TaggedId | undefined;\n\n /** @returns the entity's id, always untagged, or a runtime error if it's unassigned. */\n get idUntagged(): string {\n return deTagId(getMetadata(this), this.id);\n }\n\n abstract set(opts: unknown): void;\n\n /**\n * Similar to `set` but applies \"Partial API\" semantics, i.e. `null` means unset and `undefined` means don't change.\n */\n abstract setPartial(opts: unknown): void;\n\n /**\n * Similar to `set` but applies \"Partial API\" semantics, i.e. `null` means unset and `undefined` means don't change.\n */\n abstract setDeepPartial(opts: unknown): Promise<void>;\n\n /**\n * Returns whether the entity is new.\n *\n * This is not just `this.id === undefined`, because just assigning an id doesn't mean the entity\n * is no longer new; this only flips to `false` after the `flush` transaction has been committed.\n */\n get isNewEntity(): boolean {\n return this.__data.isNewEntity;\n }\n\n get isDeletedEntity(): boolean {\n return this.__data.isDeletedEntity;\n }\n\n get isDirtyEntity(): boolean {\n return this.__data.isDirtyEntity;\n }\n\n toString(): string {\n const meta = getMetadata(this);\n return toStringWithPrefix(meta, this, meta.type);\n }\n\n toTaggedString(): string {\n const meta = getMetadata(this);\n return toStringWithPrefix(meta, this, meta.tagName);\n }\n\n public get em(): EM {\n return this.__data.em as EM;\n }\n\n /**\n * A very simple toJSON that just returns the id.\n *\n * This is for security reasons, to avoid accidentally logging sensitive data; you\n * can specify more fields, and potentially nested return data, by using passing\n * a {@link JsonHint} to `toJSON`.\n */\n public toJSON(): object {\n return { id: this.idMaybe || null };\n }\n\n [Symbol.toStringTag](): string {\n return this.toString();\n }\n\n /**\n * Hooks into node's `console.log` to avoid sprawling output of our relations/internal state.\n *\n * See https://nodejs.org/api/util.html#custom-inspection-functions-on-objects.\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")](): string {\n return this.toString();\n }\n\n /** A bag of non-persisted state, typically for flags that control business logic behavior. */\n declare readonly transientFields: Record<string, unknown>;\n}\n\nfunction toStringWithPrefix(meta: EntityMetadata, entity: Entity, prefix: string): string {\n // Start with `Author` or `a`, depending on the caller\n let result = prefix;\n // Add `#1` if this is an em.create-d entity\n const data = getInstanceData(entity);\n const createId = data.createId;\n if (createId) {\n result += `#${createId}`;\n }\n // Add the `:1` but only after our flush is complete, otherwise the id is\n // internally assigned but not really flushed/committed to the db yet\n const dbId = entity.idTaggedMaybe;\n if (data.pendingOperation !== \"insert\" && dbId) {\n // Strip the tag because we add back the entity prefix\n result += `:${keyToNumber(meta, dbId)}`;\n }\n return result;\n}\n\n/**\n * The constructor logic for `BaseEntity` but exposed so that `newEntity` can use it too\n * on its `Object.create`-d instances.\n */\nexport function baseEntityCstr(em: EntityManager, entity: BaseEntity<any, any>, isNew: boolean): void {\n const data = new InstanceData(em, entity, (entity.constructor as any).metadata, isNew);\n // This makes it non-enumerable to avoid Jest/recursive things tripping over it\n Object.defineProperty(entity, \"__data\", { value: data, enumerable: false, writable: false, configurable: false });\n}\n"],"mappings":";;;;;;;;;;;AAiBA,SAAgB,gBAAgB,QAA8B;CAC5D,OAAO,WAAW,gBAAgB,MAAM;AAC1C;;;;;;AAOA,IAAsB,aAAtB,MAAwG;CACtG,OAAc,gBAAgB,QAA8B;EAC1D,OAAQ,OAA2B;CACrC;CAEA;CAIA,YAAY,IAAmB,OAAiB;EAC9C,IAAI,UAAU,KAAA,GACZ,MAAM,IAAI,MAAM,8DAA8D;EAIhF,eAAe,IAAI,MAAM,KAAK;CAChC;CAKA,IAAI,wBAA8B;EAChC,OAAO;CACT;;CAeA,IAAI,aAAqB;EACvB,OAAO,QAAQ,YAAY,IAAI,GAAG,KAAK,EAAE;CAC3C;;;;;;;CAoBA,IAAI,cAAuB;EACzB,OAAO,KAAK,OAAO;CACrB;CAEA,IAAI,kBAA2B;EAC7B,OAAO,KAAK,OAAO;CACrB;CAEA,IAAI,gBAAyB;EAC3B,OAAO,KAAK,OAAO;CACrB;CAEA,WAAmB;EACjB,MAAM,OAAO,YAAY,IAAI;EAC7B,OAAO,mBAAmB,MAAM,MAAM,KAAK,IAAI;CACjD;CAEA,iBAAyB;EACvB,MAAM,OAAO,YAAY,IAAI;EAC7B,OAAO,mBAAmB,MAAM,MAAM,KAAK,OAAO;CACpD;CAEA,IAAW,KAAS;EAClB,OAAO,KAAK,OAAO;CACrB;;;;;;;;CASA,SAAwB;EACtB,OAAO,EAAE,IAAI,KAAK,WAAW,KAAK;CACpC;CAEA,CAAC,OAAO,eAAuB;EAC7B,OAAO,KAAK,SAAS;CACvB;;;;;;CAOA,CAAC,OAAO,IAAI,4BAA4B,KAAa;EACnD,OAAO,KAAK,SAAS;CACvB;AAIF;AAEA,SAAS,mBAAmB,MAAsB,QAAgB,QAAwB;CAExF,IAAI,SAAS;CAEb,MAAM,OAAO,gBAAgB,MAAM;CACnC,MAAM,WAAW,KAAK;CACtB,IAAI,UACF,UAAU,IAAI;CAIhB,MAAM,OAAO,OAAO;CACpB,IAAI,KAAK,qBAAqB,YAAY,MAExC,UAAU,IAAI,YAAY,MAAM,IAAI;CAEtC,OAAO;AACT;;;;;AAMA,SAAgB,eAAe,IAAmB,QAA8B,OAAsB;CACpG,MAAM,OAAO,IAAI,aAAa,IAAI,QAAS,OAAO,YAAoB,UAAU,KAAK;CAErF,OAAO,eAAe,QAAQ,UAAU;EAAE,OAAO;EAAM,YAAY;EAAO,UAAU;EAAO,cAAc;CAAM,CAAC;AAClH"}
1
+ {"version":3,"file":"BaseEntity.js","names":[],"sources":["../src/BaseEntity.ts"],"sourcesContent":["import { type IdType } from \"src/Entity.ts\";\nimport {\n type Entity,\n type EntityManager,\n type EntityMetadata,\n InstanceData,\n type TaggedId,\n deTagId,\n getMetadata,\n keyToNumber,\n} from \"src/index.ts\";\n\n// getProperties deletes its throwaway entity's own fields so callback access to `this` hits a guard proxy.\n// That includes these non-enumerable words, so they must be configurable (deletable).\nconst readWordDescriptor: PropertyDescriptor = { value: 0, enumerable: false, writable: true, configurable: true };\n\n/**\n * Returns the internal `__data` tracking field for `entity`.\n *\n * This should be treated as an internal API and may change without notice.\n */\nexport function getInstanceData(entity: Entity): InstanceData {\n return BaseEntity.getInstanceData(entity);\n}\n\n/**\n * The base class for all entities.\n *\n * Currently, this just adds the `.load(lensFn)` method for declarative reference traversal.\n */\nexport abstract class BaseEntity<EM extends EntityManager, I extends IdType = IdType> implements Entity {\n public static getInstanceData(entity: Entity): InstanceData {\n return (entity as BaseEntity<any>).__data;\n }\n\n // We use a protected field so that subclass getters can easily access `this.__data.relations`.\n protected readonly __data!: InstanceData;\n /** First-read completion bits; extra words are declared by each generated root type as needed. */\n declare protected __readFields: number;\n\n /** The single-arg constructor is our psuedo-public API that can only be called by the EntityManager. */\n constructor(em: EntityManager);\n constructor(em: EntityManager, isNew?: boolean) {\n if (isNew === undefined) {\n throw new Error(\"Entities must be constructed by calling em.create or em.load\");\n }\n // This code path won't be reused for real entities, as they go through the `newEntity`\n // construction process that lazifies the relations.\n baseEntityCstr(em, this, isNew);\n }\n\n // This gives rules a way to access the fully typed object instead of their Reacted view.\n // And we make it public so that a function that takes Reacted<...> can accept a Loaded<...>\n // that sufficiently overlaps.\n get fullNonReactiveAccess(): this {\n return this;\n }\n\n /** @returns the entity's id, tagged/untagged based on your config, or a runtime error if it's new/unassigned. */\n abstract id: I;\n\n /** @returns the entity's, tagged/untagged based on your config, or undefined if it's new/unassigned. */\n abstract get idMaybe(): I | undefined;\n\n /** @returns the entity's id, always tagged, or a runtime error if it's new/unassigned. */\n abstract idTagged: TaggedId;\n\n /** @returns the entity's id, always tagged, or undefined if it's new/unassigned. */\n abstract get idTaggedMaybe(): TaggedId | undefined;\n\n /** @returns the entity's id, always untagged, or a runtime error if it's unassigned. */\n get idUntagged(): string {\n return deTagId(getMetadata(this), this.id);\n }\n\n abstract set(opts: unknown): void;\n\n /**\n * Similar to `set` but applies \"Partial API\" semantics, i.e. `null` means unset and `undefined` means don't change.\n */\n abstract setPartial(opts: unknown): void;\n\n /**\n * Similar to `set` but applies \"Partial API\" semantics, i.e. `null` means unset and `undefined` means don't change.\n */\n abstract setDeepPartial(opts: unknown): Promise<void>;\n\n /**\n * Returns whether the entity is new.\n *\n * This is not just `this.id === undefined`, because just assigning an id doesn't mean the entity\n * is no longer new; this only flips to `false` after the `flush` transaction has been committed.\n */\n get isNewEntity(): boolean {\n return this.__data.isNewEntity;\n }\n\n get isDeletedEntity(): boolean {\n return this.__data.isDeletedEntity;\n }\n\n get isDirtyEntity(): boolean {\n return this.__data.isDirtyEntity;\n }\n\n toString(): string {\n const meta = getMetadata(this);\n return toStringWithPrefix(meta, this, meta.type);\n }\n\n toTaggedString(): string {\n const meta = getMetadata(this);\n return toStringWithPrefix(meta, this, meta.tagName);\n }\n\n public get em(): EM {\n return this.__data.em as EM;\n }\n\n /**\n * A very simple toJSON that just returns the id.\n *\n * This is for security reasons, to avoid accidentally logging sensitive data; you\n * can specify more fields, and potentially nested return data, by using passing\n * a {@link JsonHint} to `toJSON`.\n */\n public toJSON(): object {\n return { id: this.idMaybe || null };\n }\n\n [Symbol.toStringTag](): string {\n return this.toString();\n }\n\n /**\n * Hooks into node's `console.log` to avoid sprawling output of our relations/internal state.\n *\n * See https://nodejs.org/api/util.html#custom-inspection-functions-on-objects.\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")](): string {\n return this.toString();\n }\n\n /** A bag of non-persisted state, typically for flags that control business logic behavior. */\n declare readonly transientFields: Record<string, unknown>;\n}\n\nfunction toStringWithPrefix(meta: EntityMetadata, entity: Entity, prefix: string): string {\n // Start with `Author` or `a`, depending on the caller\n let result = prefix;\n // Add `#1` if this is an em.create-d entity\n const data = getInstanceData(entity);\n const createId = data.createId;\n if (createId) {\n result += `#${createId}`;\n }\n // Add the `:1` but only after our flush is complete, otherwise the id is\n // internally assigned but not really flushed/committed to the db yet\n const dbId = entity.idTaggedMaybe;\n if (data.pendingOperation !== \"insert\" && dbId) {\n // Strip the tag because we add back the entity prefix\n result += `:${keyToNumber(meta, dbId)}`;\n }\n return result;\n}\n\n/**\n * The constructor logic for `BaseEntity` but exposed so that `newEntity` can use it too\n * on its `Object.create`-d instances.\n */\nexport function baseEntityCstr(em: EntityManager, entity: BaseEntity<any, any>, isNew: boolean): void {\n const data = new InstanceData(em, entity, (entity.constructor as any).metadata, isNew);\n // This makes it non-enumerable to avoid Jest/recursive things tripping over it\n Object.defineProperty(entity, \"__data\", { value: data, enumerable: false, writable: false, configurable: false });\n // Constructors are bypassed for real entities, so initialize every needed word here,\n // in the same order for the entire inheritance family. Reusing the descriptor avoids per-entity descriptor objects.\n for (let word = 0; word < data.metadata.fieldReadWordCount; word++) {\n Object.defineProperty(entity, word === 0 ? \"__readFields\" : `__readFields${word}`, readWordDescriptor);\n }\n}\n"],"mappings":";;;;;;AAcA,MAAM,qBAAyC;CAAE,OAAO;CAAG,YAAY;CAAO,UAAU;CAAM,cAAc;AAAK;;;;;;AAOjH,SAAgB,gBAAgB,QAA8B;CAC5D,OAAO,WAAW,gBAAgB,MAAM;AAC1C;;;;;;AAOA,IAAsB,aAAtB,MAAwG;CACtG,OAAc,gBAAgB,QAA8B;EAC1D,OAAQ,OAA2B;CACrC;CAGA;CAMA,YAAY,IAAmB,OAAiB;EAC9C,IAAI,UAAU,KAAA,GACZ,MAAM,IAAI,MAAM,8DAA8D;EAIhF,eAAe,IAAI,MAAM,KAAK;CAChC;CAKA,IAAI,wBAA8B;EAChC,OAAO;CACT;;CAeA,IAAI,aAAqB;EACvB,OAAO,QAAQ,YAAY,IAAI,GAAG,KAAK,EAAE;CAC3C;;;;;;;CAoBA,IAAI,cAAuB;EACzB,OAAO,KAAK,OAAO;CACrB;CAEA,IAAI,kBAA2B;EAC7B,OAAO,KAAK,OAAO;CACrB;CAEA,IAAI,gBAAyB;EAC3B,OAAO,KAAK,OAAO;CACrB;CAEA,WAAmB;EACjB,MAAM,OAAO,YAAY,IAAI;EAC7B,OAAO,mBAAmB,MAAM,MAAM,KAAK,IAAI;CACjD;CAEA,iBAAyB;EACvB,MAAM,OAAO,YAAY,IAAI;EAC7B,OAAO,mBAAmB,MAAM,MAAM,KAAK,OAAO;CACpD;CAEA,IAAW,KAAS;EAClB,OAAO,KAAK,OAAO;CACrB;;;;;;;;CASA,SAAwB;EACtB,OAAO,EAAE,IAAI,KAAK,WAAW,KAAK;CACpC;CAEA,CAAC,OAAO,eAAuB;EAC7B,OAAO,KAAK,SAAS;CACvB;;;;;;CAOA,CAAC,OAAO,IAAI,4BAA4B,KAAa;EACnD,OAAO,KAAK,SAAS;CACvB;AAIF;AAEA,SAAS,mBAAmB,MAAsB,QAAgB,QAAwB;CAExF,IAAI,SAAS;CAEb,MAAM,OAAO,gBAAgB,MAAM;CACnC,MAAM,WAAW,KAAK;CACtB,IAAI,UACF,UAAU,IAAI;CAIhB,MAAM,OAAO,OAAO;CACpB,IAAI,KAAK,qBAAqB,YAAY,MAExC,UAAU,IAAI,YAAY,MAAM,IAAI;CAEtC,OAAO;AACT;;;;;AAMA,SAAgB,eAAe,IAAmB,QAA8B,OAAsB;CACpG,MAAM,OAAO,IAAI,aAAa,IAAI,QAAS,OAAO,YAAoB,UAAU,KAAK;CAErF,OAAO,eAAe,QAAQ,UAAU;EAAE,OAAO;EAAM,YAAY;EAAO,UAAU;EAAO,cAAc;CAAM,CAAC;CAGhH,KAAK,IAAI,OAAO,GAAG,OAAO,KAAK,SAAS,oBAAoB,QAC1D,OAAO,eAAe,QAAQ,SAAS,IAAI,iBAAiB,eAAe,QAAQ,kBAAkB;AAEzG"}
package/build/Entity.cjs CHANGED
@@ -1,12 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("./index.cjs");
3
2
  require("./EntityManager.cjs");
3
+ require("./index.cjs");
4
4
  const require_BaseEntity = require("./BaseEntity.cjs");
5
- //#region src/Entity.ts
5
+ // src/Entity.ts
6
6
  function isEntity(maybeEntity) {
7
7
  return maybeEntity instanceof require_BaseEntity.BaseEntity;
8
8
  }
9
- //#endregion
10
9
  exports.isEntity = isEntity;
11
10
 
12
11
  //# sourceMappingURL=Entity.cjs.map
@@ -1,5 +1,4 @@
1
1
  import { EntityManager, TaggedId } from "./EntityManager.cjs";
2
- //#region src/Entity.d.ts
3
2
  export declare function isEntity(maybeEntity: unknown): maybeEntity is Entity;
4
3
  /** All the types we support for entity `id` fields. */
5
4
  export type IdType = number | string;
@@ -37,5 +36,4 @@ export interface Entity {
37
36
  */
38
37
  toTaggedString(): string;
39
38
  }
40
- //#endregion
41
39
  //# sourceMappingURL=Entity.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Entity.d.cts","names":[],"sources":["../src/Entity.ts"],"mappings":";;wBAGgB,SAAS,uBAAuB,eAAe;;YAKnD;;iBAGK;;EAEf,IAAI;EACJ,SAAS;;EAET,UAAU;EACV,eAAe;WACN,IAAI;WACJ;WACA;WACA;WACA,iBAAiB;EAC1B,IAAI;EACJ,WAAW;EACX,eAAe,gBAAgB;;;;;;;;;;EAU/B;;;;;;;EAOA"}
1
+ {"version":3,"file":"Entity.d.cts","names":[],"sources":["../src/Entity.ts"],"mappings":";wBAGgB,SAAS,uBAAuB,eAAe;;YAKnD;;iBAGK;;EAEf,IAAI;EACJ,SAAS;;EAET,UAAU;EACV,eAAe;WACN,IAAI;WACJ;WACA;WACA;WACA,iBAAiB;EAC1B,IAAI;EACJ,WAAW;EACX,eAAe,gBAAgB;;;;;;;;;;EAU/B;;;;;;;EAOA"}
@@ -1,5 +1,4 @@
1
1
  import { EntityManager, TaggedId } from "./EntityManager.mjs";
2
- //#region src/Entity.d.ts
3
2
  export declare function isEntity(maybeEntity: unknown): maybeEntity is Entity;
4
3
  /** All the types we support for entity `id` fields. */
5
4
  export type IdType = number | string;
@@ -37,5 +36,4 @@ export interface Entity {
37
36
  */
38
37
  toTaggedString(): string;
39
38
  }
40
- //#endregion
41
39
  //# sourceMappingURL=Entity.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Entity.d.mts","names":[],"sources":["../src/Entity.ts"],"mappings":";;wBAGgB,SAAS,uBAAuB,eAAe;;YAKnD;;iBAGK;;EAEf,IAAI;EACJ,SAAS;;EAET,UAAU;EACV,eAAe;WACN,IAAI;WACJ;WACA;WACA;WACA,iBAAiB;EAC1B,IAAI;EACJ,WAAW;EACX,eAAe,gBAAgB;;;;;;;;;;EAU/B;;;;;;;EAOA"}
1
+ {"version":3,"file":"Entity.d.mts","names":[],"sources":["../src/Entity.ts"],"mappings":";wBAGgB,SAAS,uBAAuB,eAAe;;YAKnD;;iBAGK;;EAEf,IAAI;EACJ,SAAS;;EAET,UAAU;EACV,eAAe;WACN,IAAI;WACJ;WACA;WACA;WACA,iBAAiB;EAC1B,IAAI;EACJ,WAAW;EACX,eAAe,gBAAgB;;;;;;;;;;EAU/B;;;;;;;EAOA"}
package/build/Entity.js CHANGED
@@ -1,11 +1,10 @@
1
- import "./index.js";
2
1
  import "./EntityManager.js";
2
+ import "./index.js";
3
3
  import { BaseEntity } from "./BaseEntity.js";
4
- //#region src/Entity.ts
4
+ // src/Entity.ts
5
5
  function isEntity(maybeEntity) {
6
6
  return maybeEntity instanceof BaseEntity;
7
7
  }
8
- //#endregion
9
8
  export { isEntity };
10
9
 
11
10
  //# sourceMappingURL=Entity.js.map
@@ -1,4 +1,3 @@
1
- //#region src/EntityFields.d.ts
2
1
  /** All the fields for an entity in the `FieldsOf` / `EntityField` format. */
3
2
  export type EntityFields<T> = { [K in keyof T]: EntityField; };
4
3
  export type EntityField = {
@@ -31,5 +30,4 @@ export type SettableFields<F> = { [K in keyof F]: F[K] extends {
31
30
  kind: "m2o";
32
31
  derived: false;
33
32
  } ? F[K] : never; };
34
- //#endregion
35
33
  //# sourceMappingURL=EntityFields.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EntityFields.d.cts","names":[],"sources":["../src/EntityFields.ts"],"mappings":";;YACY,aAAa,QACtB,WAAW,IAAI;YAGN;EACN;EAAmB;EAAe;EAAiB;EAA6B;;EAChF;EAAc;EAAe;;EAC7B;EAAa;EAAe;EAA2B;;EACvD;EAAc;EAAe;;;YAGvB,eAAe,QACxB,WAAW,IAAI,EAAE;EAAa;EAAmB;IAC9C,EAAE,KACF,EAAE;EAAa;IACb,EAAE,KACF,EAAE;EAAa;EAAa;IAC1B,EAAE"}
1
+ {"version":3,"file":"EntityFields.d.cts","names":[],"sources":["../src/EntityFields.ts"],"mappings":";YACY,aAAa,QACtB,WAAW,IAAI;YAGN;EACN;EAAmB;EAAe;EAAiB;EAA6B;;EAChF;EAAc;EAAe;;EAC7B;EAAa;EAAe;EAA2B;;EACvD;EAAc;EAAe;;;YAGvB,eAAe,QACxB,WAAW,IAAI,EAAE;EAAa;EAAmB;IAC9C,EAAE,KACF,EAAE;EAAa;IACb,EAAE,KACF,EAAE;EAAa;EAAa;IAC1B,EAAE"}
@@ -1,4 +1,3 @@
1
- //#region src/EntityFields.d.ts
2
1
  /** All the fields for an entity in the `FieldsOf` / `EntityField` format. */
3
2
  export type EntityFields<T> = { [K in keyof T]: EntityField; };
4
3
  export type EntityField = {
@@ -31,5 +30,4 @@ export type SettableFields<F> = { [K in keyof F]: F[K] extends {
31
30
  kind: "m2o";
32
31
  derived: false;
33
32
  } ? F[K] : never; };
34
- //#endregion
35
33
  //# sourceMappingURL=EntityFields.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EntityFields.d.mts","names":[],"sources":["../src/EntityFields.ts"],"mappings":";;YACY,aAAa,QACtB,WAAW,IAAI;YAGN;EACN;EAAmB;EAAe;EAAiB;EAA6B;;EAChF;EAAc;EAAe;;EAC7B;EAAa;EAAe;EAA2B;;EACvD;EAAc;EAAe;;;YAGvB,eAAe,QACxB,WAAW,IAAI,EAAE;EAAa;EAAmB;IAC9C,EAAE,KACF,EAAE;EAAa;IACb,EAAE,KACF,EAAE;EAAa;EAAa;IAC1B,EAAE"}
1
+ {"version":3,"file":"EntityFields.d.mts","names":[],"sources":["../src/EntityFields.ts"],"mappings":";YACY,aAAa,QACtB,WAAW,IAAI;YAGN;EACN;EAAmB;EAAe;EAAiB;EAA6B;;EAChF;EAAc;EAAe;;EAC7B;EAAa;EAAe;EAA2B;;EACvD;EAAc;EAAe;;;YAGvB,eAAe,QACxB,WAAW,IAAI,EAAE;EAAa;EAAmB;IAC9C,EAAE,KACF,EAAE;EAAa;IACb,EAAE,KACF,EAAE;EAAa;EAAa;IAC1B,EAAE"}
@@ -1,79 +1,79 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
3
+ const require_BaseEntity = require("./BaseEntity.cjs");
3
4
  const require_batchloaders_BatchLoader = require("./batchloaders/BatchLoader.cjs");
4
- require("./relations/Collection.cjs");
5
- const require_newEntity = require("./newEntity.cjs");
5
+ require("./batchloaders/enumCollectionBatchLoader.cjs");
6
6
  const require_relations_CustomCollection = require("./relations/CustomCollection.cjs");
7
7
  const require_relations_CustomReference = require("./relations/CustomReference.cjs");
8
8
  const require_normalizeHints = require("./normalizeHints.cjs");
9
+ const require_batchloaders_loadBatchLoader = require("./batchloaders/loadBatchLoader.cjs");
10
+ require("./batchloaders/manyToManyBatchLoader.cjs");
11
+ require("./batchloaders/oneToManyBatchLoader.cjs");
12
+ const require_relations_RecursiveCycleError = require("./relations/RecursiveCycleError.cjs");
13
+ require("./batchloaders/oneToOneBatchLoader.cjs");
14
+ const require_batchloaders_populateBatchLoader = require("./batchloaders/populateBatchLoader.cjs");
9
15
  require("./batchloaders/recursiveChildrenBatchLoader.cjs");
10
16
  require("./batchloaders/recursiveM2mBatchLoader.cjs");
11
17
  require("./batchloaders/recursiveParentsBatchLoader.cjs");
12
- const require_relations_RecursiveCycleError = require("./relations/RecursiveCycleError.cjs");
13
- require("./relations/RecursiveCollection.cjs");
14
- const require_reactivity_reactiveHints = require("./reactivity/reactiveHints.cjs");
15
- const require_loading_loadHints = require("./loading/loadHints.cjs");
16
- const require_relations_hasAsyncMethod = require("./relations/hasAsyncMethod.cjs");
17
- const require_relations_AsyncProperty = require("./relations/AsyncProperty.cjs");
18
18
  const require_keys = require("./keys.cjs");
19
- const require_RowData = require("./RowData.cjs");
20
- const require_relations_LazyField = require("./relations/LazyField.cjs");
19
+ const require_config = require("./config.cjs");
20
+ const require_configure = require("./configure.cjs");
21
21
  const require_relations_Reference = require("./relations/Reference.cjs");
22
- require("./batchloaders/manyToManyBatchLoader.cjs");
23
- require("./batchloaders/oneToManyBatchLoader.cjs");
24
- const require_queries_find_scopes = require("./queries/find/scopes.cjs");
22
+ const require_dataloaders_findByUniqueDataLoader = require("./dataloaders/findByUniqueDataLoader.cjs");
23
+ const require_dataloaders_findCountDataLoader = require("./dataloaders/findCountDataLoader.cjs");
24
+ const require_dataloaders_findDataLoader = require("./dataloaders/findDataLoader.cjs");
25
25
  const require_relations_OneToManyCollection = require("./relations/OneToManyCollection.cjs");
26
26
  const require_relations_ManyToOneReference = require("./relations/ManyToOneReference.cjs");
27
- require("./batchloaders/oneToOneBatchLoader.cjs");
27
+ const require_dataloaders_findIdsDataLoader = require("./dataloaders/findIdsDataLoader.cjs");
28
28
  const require_relations_ReactiveReference = require("./relations/ReactiveReference.cjs");
29
29
  const require_relations_OneToOneReference = require("./relations/OneToOneReference.cjs");
30
30
  const require_relations_PolymorphicReference = require("./relations/PolymorphicReference.cjs");
31
- require("./relations/index.cjs");
32
- const require_utils = require("./utils.cjs");
33
- const require_fields = require("./fields.cjs");
34
- const require_flush_ReadDrift = require("./flush/ReadDrift.cjs");
35
- require("./typeMap.cjs");
31
+ const require_dataloaders_findOrCreateDataLoader = require("./dataloaders/findOrCreateDataLoader.cjs");
32
+ const require_dataloaders_findPaginatedDataLoader = require("./dataloaders/findPaginatedDataLoader.cjs");
33
+ require("./dataloaders/lensDataLoader.cjs");
34
+ const require_defaults = require("./defaults.cjs");
35
+ require("./drivers/index.cjs");
36
36
  const require_rules = require("./rules.cjs");
37
- const require_config = require("./config.cjs");
38
- const require_configure = require("./configure.cjs");
37
+ const require_Entity = require("./Entity.cjs");
38
+ const require_fields = require("./fields.cjs");
39
39
  const require_EntityMetadata = require("./EntityMetadata.cjs");
40
- const require_trusted = require("./trusted.cjs");
41
- const require_defaults = require("./defaults.cjs");
42
- require("./dataloaders/lensDataLoader.cjs");
40
+ const require_flush_FlushLock = require("./flush/FlushLock.cjs");
41
+ const require_flush_JoinRows = require("./flush/JoinRows.cjs");
42
+ const require_flush_ReadDrift = require("./flush/ReadDrift.cjs");
43
43
  const require_loading_loadLens = require("./loading/loadLens.cjs");
44
- require("./logging/FactoryLogger.cjs");
45
- const require_newTestInstance = require("./newTestInstance.cjs");
44
+ const require_flush_Todo = require("./flush/Todo.cjs");
45
+ const require_index = require("./index.cjs");
46
46
  const require_queries_find_EntityFilter = require("./queries/find/EntityFilter.cjs");
47
- const require_flush_JoinRows = require("./flush/JoinRows.cjs");
48
- const require_PluginManager = require("./PluginManager.cjs");
47
+ const require_IndexManager = require("./IndexManager.cjs");
48
+ const require_loading_IsLoadedCache = require("./loading/IsLoadedCache.cjs");
49
49
  const require_queries_find_QueryParser_collectionJoins = require("./queries/find/QueryParser.collectionJoins.cjs");
50
- const require_flush_Todo = require("./flush/Todo.cjs");
51
- const require_dataloaders_findDataLoader = require("./dataloaders/findDataLoader.cjs");
52
- require("./drivers/index.cjs");
50
+ const require_loading_loadHints = require("./loading/loadHints.cjs");
51
+ require("./logging/FactoryLogger.cjs");
53
52
  const require_logging_FieldLogger = require("./logging/FieldLogger.cjs");
54
53
  const require_logging_ReactionLogger = require("./logging/ReactionLogger.cjs");
54
+ const require_newEntity = require("./newEntity.cjs");
55
+ const require_newTestInstance = require("./newTestInstance.cjs");
56
+ const require_PluginManager = require("./PluginManager.cjs");
55
57
  require("./plugins/PreloadPlugin.cjs");
56
- const require_queries_sql_query = require("./queries/sql/query.cjs");
57
- const require_upsert = require("./upsert.cjs");
58
- const require_index = require("./index.cjs");
59
- require("./batchloaders/enumCollectionBatchLoader.cjs");
60
- const require_batchloaders_loadBatchLoader = require("./batchloaders/loadBatchLoader.cjs");
61
- const require_batchloaders_populateBatchLoader = require("./batchloaders/populateBatchLoader.cjs");
62
- const require_dataloaders_findByUniqueDataLoader = require("./dataloaders/findByUniqueDataLoader.cjs");
63
- const require_dataloaders_findCountDataLoader = require("./dataloaders/findCountDataLoader.cjs");
64
- const require_dataloaders_findIdsDataLoader = require("./dataloaders/findIdsDataLoader.cjs");
65
- const require_dataloaders_findOrCreateDataLoader = require("./dataloaders/findOrCreateDataLoader.cjs");
66
- const require_dataloaders_findPaginatedDataLoader = require("./dataloaders/findPaginatedDataLoader.cjs");
67
- const require_flush_FlushLock = require("./flush/FlushLock.cjs");
68
- const require_IndexManager = require("./IndexManager.cjs");
69
- const require_loading_IsLoadedCache = require("./loading/IsLoadedCache.cjs");
58
+ const require_queries_find_scopes = require("./queries/find/scopes.cjs");
70
59
  const require_queries_sql_execute = require("./queries/sql/execute.cjs");
60
+ const require_queries_sql_query = require("./queries/sql/query.cjs");
71
61
  const require_reactivity_ReactionsManager = require("./reactivity/ReactionsManager.cjs");
72
- const require_Entity = require("./Entity.cjs");
73
- const require_BaseEntity = require("./BaseEntity.cjs");
62
+ const require_reactivity_reactiveHints = require("./reactivity/reactiveHints.cjs");
63
+ const require_relations_AsyncProperty = require("./relations/AsyncProperty.cjs");
64
+ require("./relations/Collection.cjs");
65
+ const require_relations_hasAsyncMethod = require("./relations/hasAsyncMethod.cjs");
66
+ require("./relations/index.cjs");
67
+ const require_relations_LazyField = require("./relations/LazyField.cjs");
68
+ require("./relations/RecursiveCollection.cjs");
69
+ const require_RowData = require("./RowData.cjs");
70
+ const require_trusted = require("./trusted.cjs");
71
+ require("./typeMap.cjs");
72
+ const require_upsert = require("./upsert.cjs");
73
+ const require_utils = require("./utils.cjs");
74
74
  let dataloader = require("dataloader");
75
75
  dataloader = require_runtime.__toESM(dataloader, 1);
76
- //#region src/EntityManager.ts
76
+ // src/EntityManager.ts
77
77
  Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
78
78
  function isId(value) {
79
79
  return value && typeof value === "string";
@@ -1051,6 +1051,7 @@ var EntityManager = class EntityManager {
1051
1051
  const instanceData = require_BaseEntity.getInstanceData(e);
1052
1052
  if (e.isNewEntity && !e.isDeletedEntity) this.#entitiesById.set(e.idTagged, e);
1053
1053
  instanceData.resetAfterFlushed();
1054
+ if (e.isDeletedEntity) this.#readSet.delete(e);
1054
1055
  const { relations } = instanceData;
1055
1056
  if (relations) {
1056
1057
  for (const rel of Object.values(relations)) if (rel instanceof require_relations_AsyncProperty.AsyncPropertyImpl || rel instanceof require_relations_LazyField.LazyFieldImpl) rel.resetAfterFlush();
@@ -1064,10 +1065,12 @@ var EntityManager = class EntityManager {
1064
1065
  this.#batchLoaders = {};
1065
1066
  this.#preloadedRelations = /* @__PURE__ */ new Map();
1066
1067
  }
1067
- for (const e of createdThenDeleted) require_BaseEntity.getInstanceData(e).fixupCreatedThenDeleted();
1068
+ for (const e of createdThenDeleted) {
1069
+ require_BaseEntity.getInstanceData(e).fixupCreatedThenDeleted();
1070
+ this.#readSet.delete(e);
1071
+ }
1068
1072
  this.#merging?.clear();
1069
1073
  this.#rm.clear();
1070
- this.#readSet.clear();
1071
1074
  return [...allFlushedEntities].sort((a, b) => require_BaseEntity.getInstanceData(a).entityIndex - require_BaseEntity.getInstanceData(b).entityIndex);
1072
1075
  } catch (e) {
1073
1076
  if (!(e instanceof InMemoryRollbackError)) this.#flushError = e;
@@ -1230,8 +1233,8 @@ var EntityManager = class EntityManager {
1230
1233
  assertUnchanged(entityOrEntities) {
1231
1234
  const entities = require_Entity.isEntity(entityOrEntities) ? [entityOrEntities] : entityOrEntities;
1232
1235
  for (const entity of entities) {
1236
+ if (this.#readSet.has(entity)) continue;
1233
1237
  if (entity.em !== this) throw new Error("assertUnchanged requires entities from this EntityManager");
1234
- if (entity.isNewEntity) continue;
1235
1238
  if (!require_EntityMetadata.getBaseMeta(require_EntityMetadata.getMetadata(entity)).timestampFields?.updatedAt) throw new Error(`assertUnchanged requires updatedAt on ${entity}`);
1236
1239
  this.#readSet.add(entity);
1237
1240
  }
@@ -1988,7 +1991,6 @@ function createRowFromEntityData(e, opts = {}) {
1988
1991
  }
1989
1992
  return row;
1990
1993
  }
1991
- //#endregion
1992
1994
  exports.EntityManager = EntityManager;
1993
1995
  exports.FailedFlushError = FailedFlushError;
1994
1996
  exports.NotFoundError = NotFoundError;