joist-core 2.3.0-next.97 → 2.3.0-next.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/BaseEntity.cjs.map +1 -1
- package/build/BaseEntity.js.map +1 -1
- package/build/Entity.cjs.map +1 -1
- package/build/Entity.js.map +1 -1
- package/build/EntityManager.cjs +45 -46
- package/build/EntityManager.cjs.map +1 -1
- package/build/EntityManager.d.cts +7 -7
- package/build/EntityManager.d.cts.map +1 -1
- package/build/EntityManager.d.mts +7 -7
- package/build/EntityManager.d.mts.map +1 -1
- package/build/EntityManager.js +27 -28
- package/build/EntityManager.js.map +1 -1
- package/build/EntityMetadata.cjs +0 -2
- package/build/EntityMetadata.cjs.map +1 -1
- package/build/EntityMetadata.d.cts +3 -3
- package/build/EntityMetadata.d.mts +3 -3
- package/build/EntityMetadata.js +0 -2
- package/build/EntityMetadata.js.map +1 -1
- package/build/IndexManager.cjs +1 -1
- package/build/IndexManager.cjs.map +1 -1
- package/build/IndexManager.js +1 -1
- package/build/IndexManager.js.map +1 -1
- package/build/InstanceData.cjs.map +1 -1
- package/build/InstanceData.js.map +1 -1
- package/build/PluginManager.cjs +0 -1
- package/build/PluginManager.cjs.map +1 -1
- package/build/PluginManager.d.cts +1 -1
- package/build/PluginManager.d.mts +1 -1
- package/build/PluginManager.js +0 -1
- package/build/PluginManager.js.map +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.cjs +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.cjs.map +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.d.cts +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.d.mts +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.js +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.js.map +1 -1
- package/build/batchloaders/loadBatchLoader.cjs +3 -4
- package/build/batchloaders/loadBatchLoader.cjs.map +1 -1
- package/build/batchloaders/loadBatchLoader.d.cts +1 -1
- package/build/batchloaders/loadBatchLoader.d.mts +1 -1
- package/build/batchloaders/loadBatchLoader.js +2 -3
- package/build/batchloaders/loadBatchLoader.js.map +1 -1
- package/build/batchloaders/manyToManyBatchLoader.cjs +1 -1
- package/build/batchloaders/manyToManyBatchLoader.cjs.map +1 -1
- package/build/batchloaders/manyToManyBatchLoader.d.cts +1 -1
- package/build/batchloaders/manyToManyBatchLoader.d.mts +1 -1
- package/build/batchloaders/manyToManyBatchLoader.js +1 -1
- package/build/batchloaders/manyToManyBatchLoader.js.map +1 -1
- package/build/batchloaders/oneToManyBatchLoader.cjs +1 -1
- package/build/batchloaders/oneToManyBatchLoader.cjs.map +1 -1
- package/build/batchloaders/oneToManyBatchLoader.js +1 -1
- package/build/batchloaders/oneToManyBatchLoader.js.map +1 -1
- package/build/batchloaders/oneToOneBatchLoader.cjs +1 -1
- package/build/batchloaders/oneToOneBatchLoader.cjs.map +1 -1
- package/build/batchloaders/oneToOneBatchLoader.js +1 -1
- package/build/batchloaders/oneToOneBatchLoader.js.map +1 -1
- package/build/batchloaders/populateBatchLoader.cjs +11 -12
- package/build/batchloaders/populateBatchLoader.cjs.map +1 -1
- package/build/batchloaders/populateBatchLoader.d.cts +1 -1
- package/build/batchloaders/populateBatchLoader.d.mts +1 -1
- package/build/batchloaders/populateBatchLoader.js +7 -8
- package/build/batchloaders/populateBatchLoader.js.map +1 -1
- package/build/batchloaders/recursiveChildrenBatchLoader.cjs +2 -2
- package/build/batchloaders/recursiveChildrenBatchLoader.cjs.map +1 -1
- package/build/batchloaders/recursiveChildrenBatchLoader.js +2 -2
- package/build/batchloaders/recursiveChildrenBatchLoader.js.map +1 -1
- package/build/batchloaders/recursiveM2mBatchLoader.cjs +2 -2
- package/build/batchloaders/recursiveM2mBatchLoader.cjs.map +1 -1
- package/build/batchloaders/recursiveM2mBatchLoader.js +2 -2
- package/build/batchloaders/recursiveM2mBatchLoader.js.map +1 -1
- package/build/batchloaders/recursiveParentsBatchLoader.cjs +2 -2
- package/build/batchloaders/recursiveParentsBatchLoader.cjs.map +1 -1
- package/build/batchloaders/recursiveParentsBatchLoader.js +2 -2
- package/build/batchloaders/recursiveParentsBatchLoader.js.map +1 -1
- package/build/changes.cjs +2 -3
- package/build/changes.cjs.map +1 -1
- package/build/changes.js +2 -3
- package/build/changes.js.map +1 -1
- package/build/config.cjs +3 -3
- package/build/config.cjs.map +1 -1
- package/build/config.d.cts +2 -2
- package/build/config.d.mts +2 -2
- package/build/config.js +1 -1
- package/build/config.js.map +1 -1
- package/build/configure.cjs +10 -10
- package/build/configure.cjs.map +1 -1
- package/build/configure.js +5 -5
- package/build/configure.js.map +1 -1
- package/build/dataloaders/fastWhereFilterHash.cjs +8 -8
- package/build/dataloaders/fastWhereFilterHash.cjs.map +1 -1
- package/build/dataloaders/fastWhereFilterHash.d.cts.map +1 -1
- package/build/dataloaders/fastWhereFilterHash.d.mts.map +1 -1
- package/build/dataloaders/fastWhereFilterHash.js +3 -3
- package/build/dataloaders/fastWhereFilterHash.js.map +1 -1
- package/build/dataloaders/findByUniqueDataLoader.cjs.map +1 -1
- package/build/dataloaders/findByUniqueDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findByUniqueDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findByUniqueDataLoader.js.map +1 -1
- package/build/dataloaders/findCountDataLoader.cjs +2 -2
- package/build/dataloaders/findCountDataLoader.cjs.map +1 -1
- package/build/dataloaders/findCountDataLoader.js +1 -1
- package/build/dataloaders/findCountDataLoader.js.map +1 -1
- package/build/dataloaders/findDataLoader.cjs +6 -6
- package/build/dataloaders/findDataLoader.cjs.map +1 -1
- package/build/dataloaders/findDataLoader.d.cts +1 -1
- package/build/dataloaders/findDataLoader.d.mts +1 -1
- package/build/dataloaders/findDataLoader.js +3 -3
- package/build/dataloaders/findDataLoader.js.map +1 -1
- package/build/dataloaders/findIdsDataLoader.cjs +3 -3
- package/build/dataloaders/findIdsDataLoader.cjs.map +1 -1
- package/build/dataloaders/findIdsDataLoader.js +2 -2
- package/build/dataloaders/findIdsDataLoader.js.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.cjs +1 -1
- package/build/dataloaders/findOrCreateDataLoader.cjs.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.js +1 -1
- package/build/dataloaders/findOrCreateDataLoader.js.map +1 -1
- package/build/dataloaders/findPaginatedDataLoader.cjs +6 -6
- package/build/dataloaders/findPaginatedDataLoader.cjs.map +1 -1
- package/build/dataloaders/findPaginatedDataLoader.d.cts +1 -1
- package/build/dataloaders/findPaginatedDataLoader.d.mts +1 -1
- package/build/dataloaders/findPaginatedDataLoader.js +3 -3
- package/build/dataloaders/findPaginatedDataLoader.js.map +1 -1
- package/build/dataloaders/lensDataLoader.cjs +3 -3
- package/build/dataloaders/lensDataLoader.cjs.map +1 -1
- package/build/dataloaders/lensDataLoader.d.cts.map +1 -1
- package/build/dataloaders/lensDataLoader.d.mts.map +1 -1
- package/build/dataloaders/lensDataLoader.js +2 -2
- package/build/dataloaders/lensDataLoader.js.map +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.cjs +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.cjs.map +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.d.cts.map +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.d.mts.map +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.js +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.js.map +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.cjs +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.cjs.map +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.d.cts.map +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.d.mts.map +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.js +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.js.map +1 -1
- package/build/defaults.cjs +5 -5
- package/build/defaults.cjs.map +1 -1
- package/build/defaults.d.cts +1 -1
- package/build/defaults.d.cts.map +1 -1
- package/build/defaults.d.mts +1 -1
- package/build/defaults.d.mts.map +1 -1
- package/build/defaults.js +4 -4
- package/build/defaults.js.map +1 -1
- package/build/drivers/Driver.cjs +0 -1
- package/build/drivers/Driver.d.cts +1 -1
- package/build/drivers/Driver.d.mts +1 -1
- package/build/drivers/Driver.js +0 -1
- package/build/drivers/EntityWriter.cjs +6 -7
- package/build/drivers/EntityWriter.cjs.map +1 -1
- package/build/drivers/EntityWriter.d.cts +1 -1
- package/build/drivers/EntityWriter.d.mts +1 -1
- package/build/drivers/EntityWriter.js +2 -3
- package/build/drivers/EntityWriter.js.map +1 -1
- package/build/drivers/IdAssigner.cjs +0 -1
- package/build/drivers/IdAssigner.cjs.map +1 -1
- package/build/drivers/IdAssigner.d.cts +1 -1
- package/build/drivers/IdAssigner.d.mts +1 -1
- package/build/drivers/IdAssigner.js +0 -1
- package/build/drivers/IdAssigner.js.map +1 -1
- package/build/drivers/driverApi.cjs +19 -0
- package/build/drivers/driverApi.cjs.map +1 -0
- package/build/drivers/driverApi.d.cts +22 -0
- package/build/drivers/driverApi.d.cts.map +1 -0
- package/build/drivers/driverApi.d.mts +22 -0
- package/build/drivers/driverApi.d.mts.map +1 -0
- package/build/drivers/driverApi.js +18 -0
- package/build/drivers/driverApi.js.map +1 -0
- package/build/fields.cjs +3 -3
- package/build/fields.cjs.map +1 -1
- package/build/fields.js +2 -2
- package/build/fields.js.map +1 -1
- package/build/{FlushLock.cjs → flush/FlushLock.cjs} +1 -1
- package/build/flush/FlushLock.cjs.map +1 -0
- package/build/{FlushLock.d.cts → flush/FlushLock.d.cts} +1 -1
- package/build/flush/FlushLock.d.cts.map +1 -0
- package/build/{FlushLock.d.mts → flush/FlushLock.d.mts} +1 -1
- package/build/flush/FlushLock.d.mts.map +1 -0
- package/build/{FlushLock.js → flush/FlushLock.js} +1 -1
- package/build/flush/FlushLock.js.map +1 -0
- package/build/{JoinRows.cjs → flush/JoinRows.cjs} +5 -8
- package/build/flush/JoinRows.cjs.map +1 -0
- package/build/{JoinRows.d.cts → flush/JoinRows.d.cts} +5 -5
- package/build/flush/JoinRows.d.cts.map +1 -0
- package/build/{JoinRows.d.mts → flush/JoinRows.d.mts} +5 -5
- package/build/flush/JoinRows.d.mts.map +1 -0
- package/build/{JoinRows.js → flush/JoinRows.js} +5 -8
- package/build/flush/JoinRows.js.map +1 -0
- package/build/{PendingChanges.cjs → flush/PendingChanges.cjs} +0 -1
- package/build/{PendingChanges.d.cts → flush/PendingChanges.d.cts} +2 -2
- package/build/flush/PendingChanges.d.cts.map +1 -0
- package/build/{PendingChanges.d.mts → flush/PendingChanges.d.mts} +2 -2
- package/build/flush/PendingChanges.d.mts.map +1 -0
- package/build/flush/PendingChanges.js +1 -0
- package/build/{Todo.cjs → flush/Todo.cjs} +4 -6
- package/build/flush/Todo.cjs.map +1 -0
- package/build/{Todo.d.cts → flush/Todo.d.cts} +3 -3
- package/build/flush/Todo.d.cts.map +1 -0
- package/build/{Todo.d.mts → flush/Todo.d.mts} +3 -3
- package/build/flush/Todo.d.mts.map +1 -0
- package/build/{Todo.js → flush/Todo.js} +4 -6
- package/build/flush/Todo.js.map +1 -0
- package/build/getProperties.cjs.map +1 -1
- package/build/getProperties.js.map +1 -1
- package/build/index.cjs +100 -100
- package/build/index.cjs.map +1 -1
- package/build/index.d.cts +15 -15
- package/build/index.d.mts +15 -15
- package/build/index.js +42 -42
- package/build/index.js.map +1 -1
- package/build/json.cjs +4 -4
- package/build/json.cjs.map +1 -1
- package/build/json.js +3 -3
- package/build/json.js.map +1 -1
- package/build/keys.cjs +1 -1
- package/build/keys.cjs.map +1 -1
- package/build/keys.js +1 -1
- package/build/keys.js.map +1 -1
- package/build/{HintTree.cjs → loading/HintTree.cjs} +2 -5
- package/build/loading/HintTree.cjs.map +1 -0
- package/build/{HintTree.d.cts → loading/HintTree.d.cts} +3 -3
- package/build/loading/HintTree.d.cts.map +1 -0
- package/build/{HintTree.d.mts → loading/HintTree.d.mts} +3 -3
- package/build/loading/HintTree.d.mts.map +1 -0
- package/build/{HintTree.js → loading/HintTree.js} +2 -5
- package/build/loading/HintTree.js.map +1 -0
- package/build/{IsLoadedCache.cjs → loading/IsLoadedCache.cjs} +2 -3
- package/build/loading/IsLoadedCache.cjs.map +1 -0
- package/build/{IsLoadedCache.d.cts → loading/IsLoadedCache.d.cts} +2 -2
- package/build/loading/IsLoadedCache.d.cts.map +1 -0
- package/build/{IsLoadedCache.d.mts → loading/IsLoadedCache.d.mts} +2 -2
- package/build/loading/IsLoadedCache.d.mts.map +1 -0
- package/build/{IsLoadedCache.js → loading/IsLoadedCache.js} +2 -3
- package/build/{IsLoadedCache.cjs.map → loading/IsLoadedCache.js.map} +1 -1
- package/build/{loadHints.cjs → loading/loadHints.cjs} +6 -11
- package/build/loading/loadHints.cjs.map +1 -0
- package/build/{loadHints.d.cts → loading/loadHints.d.cts} +14 -14
- package/build/loading/loadHints.d.cts.map +1 -0
- package/build/{loadHints.d.mts → loading/loadHints.d.mts} +14 -14
- package/build/loading/loadHints.d.mts.map +1 -0
- package/build/{loadHints.js → loading/loadHints.js} +3 -8
- package/build/loading/loadHints.js.map +1 -0
- package/build/{loadLens.cjs → loading/loadLens.cjs} +8 -9
- package/build/loading/loadLens.cjs.map +1 -0
- package/build/{loadLens.d.cts → loading/loadLens.d.cts} +3 -3
- package/build/loading/loadLens.d.cts.map +1 -0
- package/build/{loadLens.d.mts → loading/loadLens.d.mts} +3 -3
- package/build/loading/loadLens.d.mts.map +1 -0
- package/build/{loadLens.js → loading/loadLens.js} +8 -9
- package/build/loading/loadLens.js.map +1 -0
- package/build/{withLoaded.cjs → loading/withLoaded.cjs} +12 -13
- package/build/loading/withLoaded.cjs.map +1 -0
- package/build/{withLoaded.d.cts → loading/withLoaded.d.cts} +9 -9
- package/build/loading/withLoaded.d.cts.map +1 -0
- package/build/{withLoaded.d.mts → loading/withLoaded.d.mts} +9 -9
- package/build/loading/withLoaded.d.mts.map +1 -0
- package/build/{withLoaded.js → loading/withLoaded.js} +10 -11
- package/build/loading/withLoaded.js.map +1 -0
- package/build/logging/FactoryLogger.cjs.map +1 -1
- package/build/logging/FactoryLogger.d.cts.map +1 -1
- package/build/logging/FactoryLogger.d.mts.map +1 -1
- package/build/logging/FactoryLogger.js.map +1 -1
- package/build/logging/FieldLogger.cjs.map +1 -1
- package/build/logging/FieldLogger.d.cts.map +1 -1
- package/build/logging/FieldLogger.d.mts.map +1 -1
- package/build/logging/FieldLogger.js.map +1 -1
- package/build/logging/ReactionLogger.cjs +0 -2
- package/build/logging/ReactionLogger.cjs.map +1 -1
- package/build/logging/ReactionLogger.d.cts +2 -2
- package/build/logging/ReactionLogger.d.cts.map +1 -1
- package/build/logging/ReactionLogger.d.mts +2 -2
- package/build/logging/ReactionLogger.d.mts.map +1 -1
- package/build/logging/ReactionLogger.js +0 -2
- package/build/logging/ReactionLogger.js.map +1 -1
- package/build/newEntity.cjs.map +1 -1
- package/build/newEntity.js.map +1 -1
- package/build/newTestInstance.cjs +3 -3
- package/build/newTestInstance.cjs.map +1 -1
- package/build/newTestInstance.d.cts +1 -1
- package/build/newTestInstance.d.cts.map +1 -1
- package/build/newTestInstance.d.mts +1 -1
- package/build/newTestInstance.d.mts.map +1 -1
- package/build/newTestInstance.js +2 -2
- package/build/newTestInstance.js.map +1 -1
- package/build/normalizeHints.cjs +0 -2
- package/build/normalizeHints.cjs.map +1 -1
- package/build/normalizeHints.d.cts +2 -2
- package/build/normalizeHints.d.mts +2 -2
- package/build/normalizeHints.js +0 -2
- package/build/normalizeHints.js.map +1 -1
- package/build/nowUTC.cjs +2 -2
- package/build/nowUTC.cjs.map +1 -1
- package/build/nowUTC.d.cts +1 -1
- package/build/nowUTC.d.mts +1 -1
- package/build/nowUTC.js +1 -1
- package/build/nowUTC.js.map +1 -1
- package/build/plugins/ImmutableEntitiesPlugin.cjs.map +1 -1
- package/build/plugins/ImmutableEntitiesPlugin.js.map +1 -1
- package/build/plugins/PreloadPlugin.cjs +0 -2
- package/build/plugins/PreloadPlugin.d.cts +2 -2
- package/build/plugins/PreloadPlugin.d.mts +2 -2
- package/build/plugins/PreloadPlugin.js +0 -2
- package/build/preloading/JsonAggregatePreloader.cjs +1 -4
- package/build/preloading/JsonAggregatePreloader.cjs.map +1 -1
- package/build/preloading/JsonAggregatePreloader.d.cts +2 -2
- package/build/preloading/JsonAggregatePreloader.d.cts.map +1 -1
- package/build/preloading/JsonAggregatePreloader.d.mts +2 -2
- package/build/preloading/JsonAggregatePreloader.d.mts.map +1 -1
- package/build/preloading/JsonAggregatePreloader.js +1 -4
- package/build/preloading/JsonAggregatePreloader.js.map +1 -1
- package/build/preloading/canPreload.cjs.map +1 -1
- package/build/preloading/canPreload.js.map +1 -1
- package/build/preloading/partitionHint.cjs +2 -3
- package/build/preloading/partitionHint.cjs.map +1 -1
- package/build/preloading/partitionHint.d.cts +1 -1
- package/build/preloading/partitionHint.d.mts +1 -1
- package/build/preloading/partitionHint.js +2 -3
- package/build/preloading/partitionHint.js.map +1 -1
- package/build/queries/ConditionBuilder.cjs.map +1 -1
- package/build/queries/ConditionBuilder.d.cts +1 -1
- package/build/queries/ConditionBuilder.d.mts +1 -1
- package/build/queries/ConditionBuilder.js.map +1 -1
- package/build/queries/conditions.cjs.map +1 -1
- package/build/queries/conditions.js.map +1 -1
- package/build/queries/entityQueryUtils.cjs.map +1 -1
- package/build/queries/entityQueryUtils.js.map +1 -1
- package/build/queries/find/Aliases.cjs +1 -1
- package/build/queries/find/Aliases.cjs.map +1 -1
- package/build/queries/find/Aliases.d.cts.map +1 -1
- package/build/queries/find/Aliases.d.mts.map +1 -1
- package/build/queries/find/Aliases.js +1 -1
- package/build/queries/find/Aliases.js.map +1 -1
- package/build/queries/find/DeferredAlias.cjs.map +1 -1
- package/build/queries/find/DeferredAlias.js.map +1 -1
- package/build/queries/find/EntityFilter.cjs.map +1 -1
- package/build/queries/find/EntityFilter.js.map +1 -1
- package/build/queries/find/EntityGraphQLFilter.cjs.map +1 -1
- package/build/queries/find/EntityGraphQLFilter.js.map +1 -1
- package/build/queries/find/QueryParser.cjs +2 -2
- package/build/queries/find/QueryParser.cjs.map +1 -1
- package/build/queries/find/QueryParser.collectionJoins.cjs.map +1 -1
- package/build/queries/find/QueryParser.collectionJoins.js.map +1 -1
- package/build/queries/find/QueryParser.d.cts.map +1 -1
- package/build/queries/find/QueryParser.d.mts.map +1 -1
- package/build/queries/find/QueryParser.js +2 -2
- package/build/queries/find/QueryParser.js.map +1 -1
- package/build/queries/find/QueryParser.pruning.cjs.map +1 -1
- package/build/queries/find/QueryParser.pruning.js.map +1 -1
- package/build/queries/find/QueryVisitor.cjs.map +1 -1
- package/build/queries/find/QueryVisitor.js.map +1 -1
- package/build/queries/find/buildFindQuery.cjs.map +1 -1
- package/build/queries/find/buildFindQuery.js.map +1 -1
- package/build/queries/find/scopes.cjs.map +1 -1
- package/build/queries/find/scopes.d.cts +1 -1
- package/build/queries/find/scopes.d.mts +1 -1
- package/build/queries/find/scopes.js.map +1 -1
- package/build/queries/parsedConditions.cjs.map +1 -1
- package/build/queries/parsedConditions.js.map +1 -1
- package/build/queries/renderConditions.cjs.map +1 -1
- package/build/queries/renderConditions.js.map +1 -1
- package/build/queries/skipCondition.cjs.map +1 -1
- package/build/queries/skipCondition.js.map +1 -1
- package/build/queries/sql/AliasAssigner.cjs.map +1 -1
- package/build/queries/sql/AliasAssigner.js.map +1 -1
- package/build/queries/sql/Expr.cjs +2 -2
- package/build/queries/sql/Expr.cjs.map +1 -1
- package/build/queries/sql/Expr.d.cts +1 -1
- package/build/queries/sql/Expr.d.mts +1 -1
- package/build/queries/sql/Expr.js +1 -1
- package/build/queries/sql/Expr.js.map +1 -1
- package/build/queries/sql/Tables.cjs +1 -1
- package/build/queries/sql/Tables.cjs.map +1 -1
- package/build/queries/sql/Tables.d.cts.map +1 -1
- package/build/queries/sql/Tables.d.mts.map +1 -1
- package/build/queries/sql/Tables.js +1 -1
- package/build/queries/sql/Tables.js.map +1 -1
- package/build/queries/sql/execute.cjs +1 -1
- package/build/queries/sql/execute.cjs.map +1 -1
- package/build/queries/sql/execute.js +1 -1
- package/build/queries/sql/execute.js.map +1 -1
- package/build/queries/sql/expressions/arrayAgg.cjs.map +1 -1
- package/build/queries/sql/expressions/arrayAgg.js.map +1 -1
- package/build/queries/sql/expressions/case.cjs.map +1 -1
- package/build/queries/sql/expressions/case.js.map +1 -1
- package/build/queries/sql/expressions/coalesce.cjs.map +1 -1
- package/build/queries/sql/expressions/coalesce.js.map +1 -1
- package/build/queries/sql/expressions/codecs.cjs +2 -2
- package/build/queries/sql/expressions/codecs.cjs.map +1 -1
- package/build/queries/sql/expressions/codecs.js +1 -1
- package/build/queries/sql/expressions/codecs.js.map +1 -1
- package/build/queries/sql/expressions/expression.cjs.map +1 -1
- package/build/queries/sql/expressions/expression.d.cts.map +1 -1
- package/build/queries/sql/expressions/expression.d.mts.map +1 -1
- package/build/queries/sql/expressions/expression.js.map +1 -1
- package/build/queries/sql/expressions/greatest.cjs.map +1 -1
- package/build/queries/sql/expressions/greatest.js.map +1 -1
- package/build/queries/sql/expressions/least.cjs.map +1 -1
- package/build/queries/sql/expressions/least.js.map +1 -1
- package/build/queries/sql/expressions/nullIf.cjs.map +1 -1
- package/build/queries/sql/expressions/nullIf.js.map +1 -1
- package/build/queries/sql/expressions/parseExpression.cjs.map +1 -1
- package/build/queries/sql/expressions/parseExpression.js.map +1 -1
- package/build/queries/sql/expressions/types.d.cts.map +1 -1
- package/build/queries/sql/expressions/types.d.mts.map +1 -1
- package/build/queries/sql/query.cjs +1 -1
- package/build/queries/sql/query.cjs.map +1 -1
- package/build/queries/sql/query.d.cts +1 -1
- package/build/queries/sql/query.d.mts +1 -1
- package/build/queries/sql/query.js +1 -1
- package/build/queries/sql/query.js.map +1 -1
- package/build/{unnest.cjs → queries/unnest.cjs} +1 -2
- package/build/queries/unnest.cjs.map +1 -0
- package/build/{unnest.d.cts → queries/unnest.d.cts} +3 -3
- package/build/queries/unnest.d.cts.map +1 -0
- package/build/{unnest.d.mts → queries/unnest.d.mts} +3 -3
- package/build/queries/unnest.d.mts.map +1 -0
- package/build/{unnest.js → queries/unnest.js} +1 -2
- package/build/queries/unnest.js.map +1 -0
- package/build/queries/valueFilters.cjs.map +1 -1
- package/build/queries/valueFilters.d.cts +1 -1
- package/build/queries/valueFilters.d.cts.map +1 -1
- package/build/queries/valueFilters.d.mts +1 -1
- package/build/queries/valueFilters.d.mts.map +1 -1
- package/build/queries/valueFilters.js.map +1 -1
- package/build/{ReactionsManager.cjs → reactivity/ReactionsManager.cjs} +8 -10
- package/build/reactivity/ReactionsManager.cjs.map +1 -0
- package/build/{ReactionsManager.d.cts → reactivity/ReactionsManager.d.cts} +5 -6
- package/build/reactivity/ReactionsManager.d.cts.map +1 -0
- package/build/{ReactionsManager.d.mts → reactivity/ReactionsManager.d.mts} +5 -6
- package/build/reactivity/ReactionsManager.d.mts.map +1 -0
- package/build/{ReactionsManager.js → reactivity/ReactionsManager.js} +6 -8
- package/build/reactivity/ReactionsManager.js.map +1 -0
- package/build/{reactiveHints.cjs → reactivity/reactiveHints.cjs} +12 -16
- package/build/reactivity/reactiveHints.cjs.map +1 -0
- package/build/{reactiveHints.d.cts → reactivity/reactiveHints.d.cts} +17 -17
- package/build/reactivity/reactiveHints.d.cts.map +1 -0
- package/build/{reactiveHints.d.mts → reactivity/reactiveHints.d.mts} +17 -17
- package/build/reactivity/reactiveHints.d.mts.map +1 -0
- package/build/{reactiveHints.js → reactivity/reactiveHints.js} +12 -16
- package/build/reactivity/reactiveHints.js.map +1 -0
- package/build/relations/AbstractRelationImpl.cjs.map +1 -1
- package/build/relations/AbstractRelationImpl.js.map +1 -1
- package/build/relations/AsyncProperty.cjs.map +1 -1
- package/build/relations/AsyncProperty.js.map +1 -1
- package/build/relations/AsyncReactiveField.cjs +6 -6
- package/build/relations/AsyncReactiveField.cjs.map +1 -1
- package/build/relations/AsyncReactiveField.d.cts +1 -1
- package/build/relations/AsyncReactiveField.d.mts +1 -1
- package/build/relations/AsyncReactiveField.js +4 -4
- package/build/relations/AsyncReactiveField.js.map +1 -1
- package/build/relations/Collection.cjs +1 -1
- package/build/relations/Collection.cjs.map +1 -1
- package/build/relations/Collection.js +1 -1
- package/build/relations/Collection.js.map +1 -1
- package/build/relations/CustomCollection.cjs.map +1 -1
- package/build/relations/CustomCollection.d.cts +1 -1
- package/build/relations/CustomCollection.d.mts +1 -1
- package/build/relations/CustomCollection.js.map +1 -1
- package/build/relations/CustomReference.cjs +1 -1
- package/build/relations/CustomReference.cjs.map +1 -1
- package/build/relations/CustomReference.d.cts +1 -1
- package/build/relations/CustomReference.d.mts +1 -1
- package/build/relations/CustomReference.js +1 -1
- package/build/relations/CustomReference.js.map +1 -1
- package/build/relations/EnumCollection.cjs.map +1 -1
- package/build/relations/EnumCollection.d.cts +1 -1
- package/build/relations/EnumCollection.d.mts +1 -1
- package/build/relations/EnumCollection.js.map +1 -1
- package/build/relations/LazyField.cjs +4 -4
- package/build/relations/LazyField.cjs.map +1 -1
- package/build/relations/LazyField.js +4 -4
- package/build/relations/LazyField.js.map +1 -1
- package/build/relations/ManyToManyCollection.cjs +3 -3
- package/build/relations/ManyToManyCollection.cjs.map +1 -1
- package/build/relations/ManyToManyCollection.js +3 -3
- package/build/relations/ManyToManyCollection.js.map +1 -1
- package/build/relations/ManyToManyLargeCollection.cjs +3 -3
- package/build/relations/ManyToManyLargeCollection.cjs.map +1 -1
- package/build/relations/ManyToManyLargeCollection.js +3 -3
- package/build/relations/ManyToManyLargeCollection.js.map +1 -1
- package/build/relations/ManyToOneReference.cjs +4 -4
- package/build/relations/ManyToOneReference.cjs.map +1 -1
- package/build/relations/ManyToOneReference.js +4 -4
- package/build/relations/ManyToOneReference.js.map +1 -1
- package/build/relations/OneToManyCollection.cjs +1 -2
- package/build/relations/OneToManyCollection.cjs.map +1 -1
- package/build/relations/OneToManyCollection.d.cts +1 -1
- package/build/relations/OneToManyCollection.d.mts +1 -1
- package/build/relations/OneToManyCollection.js +1 -2
- package/build/relations/OneToManyCollection.js.map +1 -1
- package/build/relations/OneToManyLargeCollection.cjs +1 -1
- package/build/relations/OneToManyLargeCollection.cjs.map +1 -1
- package/build/relations/OneToManyLargeCollection.js +1 -1
- package/build/relations/OneToManyLargeCollection.js.map +1 -1
- package/build/relations/OneToOneReference.cjs +5 -5
- package/build/relations/OneToOneReference.cjs.map +1 -1
- package/build/relations/OneToOneReference.js +5 -5
- package/build/relations/OneToOneReference.js.map +1 -1
- package/build/relations/PolymorphicReference.cjs +3 -3
- package/build/relations/PolymorphicReference.cjs.map +1 -1
- package/build/relations/PolymorphicReference.js +3 -3
- package/build/relations/PolymorphicReference.js.map +1 -1
- package/build/relations/ReactiveField.cjs +5 -6
- package/build/relations/ReactiveField.cjs.map +1 -1
- package/build/relations/ReactiveField.d.cts +2 -2
- package/build/relations/ReactiveField.d.mts +2 -2
- package/build/relations/ReactiveField.js +3 -4
- package/build/relations/ReactiveField.js.map +1 -1
- package/build/relations/ReactiveGetter.cjs +0 -1
- package/build/relations/ReactiveGetter.cjs.map +1 -1
- package/build/relations/ReactiveGetter.d.cts +1 -1
- package/build/relations/ReactiveGetter.d.mts +1 -1
- package/build/relations/ReactiveGetter.js +0 -1
- package/build/relations/ReactiveGetter.js.map +1 -1
- package/build/relations/ReactiveManyToMany.cjs +5 -6
- package/build/relations/ReactiveManyToMany.cjs.map +1 -1
- package/build/relations/ReactiveManyToMany.d.cts +2 -2
- package/build/relations/ReactiveManyToMany.d.cts.map +1 -1
- package/build/relations/ReactiveManyToMany.d.mts +2 -2
- package/build/relations/ReactiveManyToMany.d.mts.map +1 -1
- package/build/relations/ReactiveManyToMany.js +3 -4
- package/build/relations/ReactiveManyToMany.js.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.cjs +1 -3
- package/build/relations/ReactiveManyToManyOtherSide.cjs.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.d.cts +2 -2
- package/build/relations/ReactiveManyToManyOtherSide.d.mts +2 -2
- package/build/relations/ReactiveManyToManyOtherSide.js +1 -3
- package/build/relations/ReactiveManyToManyOtherSide.js.map +1 -1
- package/build/relations/ReactiveReference.cjs +8 -9
- package/build/relations/ReactiveReference.cjs.map +1 -1
- package/build/relations/ReactiveReference.d.cts +2 -2
- package/build/relations/ReactiveReference.d.cts.map +1 -1
- package/build/relations/ReactiveReference.d.mts +2 -2
- package/build/relations/ReactiveReference.d.mts.map +1 -1
- package/build/relations/ReactiveReference.js +6 -7
- package/build/relations/ReactiveReference.js.map +1 -1
- package/build/relations/ReadOnlyCollection.cjs.map +1 -1
- package/build/relations/ReadOnlyCollection.js.map +1 -1
- package/build/relations/RecursiveCollection.cjs +3 -4
- package/build/relations/RecursiveCollection.cjs.map +1 -1
- package/build/relations/RecursiveCollection.d.cts +1 -1
- package/build/relations/RecursiveCollection.d.mts +1 -1
- package/build/relations/RecursiveCollection.js +3 -4
- package/build/relations/RecursiveCollection.js.map +1 -1
- package/build/relations/RecursiveCycleError.cjs.map +1 -1
- package/build/relations/RecursiveCycleError.js.map +1 -1
- package/build/relations/Reference.cjs +1 -1
- package/build/relations/Reference.cjs.map +1 -1
- package/build/relations/Reference.js +1 -1
- package/build/relations/Reference.js.map +1 -1
- package/build/relations/Relation.cjs.map +1 -1
- package/build/relations/Relation.js.map +1 -1
- package/build/relations/hasAsyncMethod.cjs +2 -2
- package/build/relations/hasAsyncMethod.cjs.map +1 -1
- package/build/relations/hasAsyncMethod.d.cts +1 -1
- package/build/relations/hasAsyncMethod.d.mts +1 -1
- package/build/relations/hasAsyncMethod.js +1 -1
- package/build/relations/hasAsyncMethod.js.map +1 -1
- package/build/relations/hasManyDerived.cjs +3 -3
- package/build/relations/hasManyDerived.cjs.map +1 -1
- package/build/relations/hasManyDerived.d.cts +1 -1
- package/build/relations/hasManyDerived.d.mts +1 -1
- package/build/relations/hasManyDerived.js +2 -2
- package/build/relations/hasManyDerived.js.map +1 -1
- package/build/relations/hasManyThrough.cjs +6 -6
- package/build/relations/hasManyThrough.cjs.map +1 -1
- package/build/relations/hasManyThrough.d.cts +1 -1
- package/build/relations/hasManyThrough.d.mts +1 -1
- package/build/relations/hasManyThrough.js +2 -2
- package/build/relations/hasManyThrough.js.map +1 -1
- package/build/relations/hasOneDerived.cjs +3 -3
- package/build/relations/hasOneDerived.cjs.map +1 -1
- package/build/relations/hasOneDerived.d.cts +1 -1
- package/build/relations/hasOneDerived.d.mts +1 -1
- package/build/relations/hasOneDerived.js +2 -2
- package/build/relations/hasOneDerived.js.map +1 -1
- package/build/relations/hasOneThrough.cjs +7 -7
- package/build/relations/hasOneThrough.cjs.map +1 -1
- package/build/relations/hasOneThrough.d.cts +1 -1
- package/build/relations/hasOneThrough.d.mts +1 -1
- package/build/relations/hasOneThrough.js +2 -2
- package/build/relations/hasOneThrough.js.map +1 -1
- package/build/relations/hasProperty.cjs +4 -4
- package/build/relations/hasProperty.cjs.map +1 -1
- package/build/relations/hasProperty.d.cts +2 -2
- package/build/relations/hasProperty.d.mts +2 -2
- package/build/relations/hasProperty.js +2 -2
- package/build/relations/hasProperty.js.map +1 -1
- package/build/relations/index.cjs +10 -10
- package/build/relations/index.js +10 -10
- package/build/relations/isCascadeDelete.cjs.map +1 -1
- package/build/relations/isCascadeDelete.js.map +1 -1
- package/build/resurrection.cjs.map +1 -1
- package/build/resurrection.js.map +1 -1
- package/build/rules.cjs +3 -4
- package/build/rules.cjs.map +1 -1
- package/build/rules.d.cts +1 -1
- package/build/rules.d.mts +1 -1
- package/build/rules.js +3 -4
- package/build/rules.js.map +1 -1
- package/build/runtimeConfig.cjs.map +1 -1
- package/build/runtimeConfig.js.map +1 -1
- package/build/{TypeInfo.cjs → serde/TypeInfo.cjs} +1 -1
- package/build/serde/TypeInfo.cjs.map +1 -0
- package/build/{TypeInfo.d.cts → serde/TypeInfo.d.cts} +2 -2
- package/build/serde/TypeInfo.d.cts.map +1 -0
- package/build/{TypeInfo.d.mts → serde/TypeInfo.d.mts} +2 -2
- package/build/serde/TypeInfo.d.mts.map +1 -0
- package/build/{TypeInfo.js → serde/TypeInfo.js} +1 -1
- package/build/serde/TypeInfo.js.map +1 -0
- package/build/{columns.cjs → serde/columns.cjs} +1 -1
- package/build/serde/columns.cjs.map +1 -0
- package/build/{columns.d.cts → serde/columns.d.cts} +2 -2
- package/build/serde/columns.d.cts.map +1 -0
- package/build/{columns.d.mts → serde/columns.d.mts} +2 -2
- package/build/serde/columns.d.mts.map +1 -0
- package/build/{columns.js → serde/columns.js} +1 -1
- package/build/serde/columns.js.map +1 -0
- package/build/{fieldSerde.cjs → serde/fieldSerde.cjs} +6 -6
- package/build/serde/fieldSerde.cjs.map +1 -0
- package/build/{fieldSerde.d.cts → serde/fieldSerde.d.cts} +5 -5
- package/build/serde/fieldSerde.d.cts.map +1 -0
- package/build/{fieldSerde.d.mts → serde/fieldSerde.d.mts} +5 -5
- package/build/serde/fieldSerde.d.mts.map +1 -0
- package/build/{fieldSerde.js → serde/fieldSerde.js} +6 -6
- package/build/serde/fieldSerde.js.map +1 -0
- package/build/{serde.cjs → serde/serde.cjs} +25 -26
- package/build/serde/serde.cjs.map +1 -0
- package/build/{serde.d.cts → serde/serde.d.cts} +1 -1
- package/build/serde/serde.d.cts.map +1 -0
- package/build/{serde.d.mts → serde/serde.d.mts} +1 -1
- package/build/serde/serde.d.mts.map +1 -0
- package/build/{serde.js → serde/serde.js} +4 -5
- package/build/serde/serde.js.map +1 -0
- package/build/{temporal.cjs → serde/temporal.cjs} +1 -1
- package/build/serde/temporal.cjs.map +1 -0
- package/build/{temporal.d.cts → serde/temporal.d.cts} +1 -1
- package/build/serde/temporal.d.cts.map +1 -0
- package/build/{temporal.d.mts → serde/temporal.d.mts} +1 -1
- package/build/serde/temporal.d.mts.map +1 -0
- package/build/{temporal.js → serde/temporal.js} +1 -1
- package/build/serde/temporal.js.map +1 -0
- package/build/{temporalMappers.cjs → serde/temporalMappers.cjs} +4 -5
- package/build/serde/temporalMappers.cjs.map +1 -0
- package/build/{temporalMappers.d.cts → serde/temporalMappers.d.cts} +1 -1
- package/build/serde/temporalMappers.d.cts.map +1 -0
- package/build/{temporalMappers.d.mts → serde/temporalMappers.d.mts} +1 -1
- package/build/serde/temporalMappers.d.mts.map +1 -0
- package/build/{temporalMappers.js → serde/temporalMappers.js} +2 -3
- package/build/serde/temporalMappers.js.map +1 -0
- package/build/upsert.cjs +1 -1
- package/build/upsert.cjs.map +1 -1
- package/build/upsert.d.cts.map +1 -1
- package/build/upsert.d.mts.map +1 -1
- package/build/upsert.js +1 -1
- package/build/upsert.js.map +1 -1
- package/build/utils.cjs +0 -1
- package/build/utils.cjs.map +1 -1
- package/build/utils.d.cts +1 -1
- package/build/utils.d.mts +1 -1
- package/build/utils.js +0 -1
- package/build/utils.js.map +1 -1
- package/package.json +2 -2
- package/build/FlushLock.cjs.map +0 -1
- package/build/FlushLock.d.cts.map +0 -1
- package/build/FlushLock.d.mts.map +0 -1
- package/build/FlushLock.js.map +0 -1
- package/build/HintTree.cjs.map +0 -1
- package/build/HintTree.d.cts.map +0 -1
- package/build/HintTree.d.mts.map +0 -1
- package/build/HintTree.js.map +0 -1
- package/build/IsLoadedCache.d.cts.map +0 -1
- package/build/IsLoadedCache.d.mts.map +0 -1
- package/build/IsLoadedCache.js.map +0 -1
- package/build/JoinRows.cjs.map +0 -1
- package/build/JoinRows.d.cts.map +0 -1
- package/build/JoinRows.d.mts.map +0 -1
- package/build/JoinRows.js.map +0 -1
- package/build/PendingChanges.d.cts.map +0 -1
- package/build/PendingChanges.d.mts.map +0 -1
- package/build/PendingChanges.js +0 -2
- package/build/ReactionsManager.cjs.map +0 -1
- package/build/ReactionsManager.d.cts.map +0 -1
- package/build/ReactionsManager.d.mts.map +0 -1
- package/build/ReactionsManager.js.map +0 -1
- package/build/Todo.cjs.map +0 -1
- package/build/Todo.d.cts.map +0 -1
- package/build/Todo.d.mts.map +0 -1
- package/build/Todo.js.map +0 -1
- package/build/TypeInfo.cjs.map +0 -1
- package/build/TypeInfo.d.cts.map +0 -1
- package/build/TypeInfo.d.mts.map +0 -1
- package/build/TypeInfo.js.map +0 -1
- package/build/columns.cjs.map +0 -1
- package/build/columns.d.cts.map +0 -1
- package/build/columns.d.mts.map +0 -1
- package/build/columns.js.map +0 -1
- package/build/driverApi.cjs +0 -18
- package/build/driverApi.cjs.map +0 -1
- package/build/driverApi.d.cts +0 -22
- package/build/driverApi.d.cts.map +0 -1
- package/build/driverApi.d.mts +0 -22
- package/build/driverApi.d.mts.map +0 -1
- package/build/driverApi.js +0 -18
- package/build/driverApi.js.map +0 -1
- package/build/fieldSerde.cjs.map +0 -1
- package/build/fieldSerde.d.cts.map +0 -1
- package/build/fieldSerde.d.mts.map +0 -1
- package/build/fieldSerde.js.map +0 -1
- package/build/loadHints.cjs.map +0 -1
- package/build/loadHints.d.cts.map +0 -1
- package/build/loadHints.d.mts.map +0 -1
- package/build/loadHints.js.map +0 -1
- package/build/loadLens.cjs.map +0 -1
- package/build/loadLens.d.cts.map +0 -1
- package/build/loadLens.d.mts.map +0 -1
- package/build/loadLens.js.map +0 -1
- package/build/reactiveHints.cjs.map +0 -1
- package/build/reactiveHints.d.cts.map +0 -1
- package/build/reactiveHints.d.mts.map +0 -1
- package/build/reactiveHints.js.map +0 -1
- package/build/serde.cjs.map +0 -1
- package/build/serde.d.cts.map +0 -1
- package/build/serde.d.mts.map +0 -1
- package/build/serde.js.map +0 -1
- package/build/temporal.cjs.map +0 -1
- package/build/temporal.d.cts.map +0 -1
- package/build/temporal.d.mts.map +0 -1
- package/build/temporal.js.map +0 -1
- package/build/temporalMappers.cjs.map +0 -1
- package/build/temporalMappers.d.cts.map +0 -1
- package/build/temporalMappers.d.mts.map +0 -1
- package/build/temporalMappers.js.map +0 -1
- package/build/unnest.cjs.map +0 -1
- package/build/unnest.d.cts.map +0 -1
- package/build/unnest.d.mts.map +0 -1
- package/build/unnest.js.map +0 -1
- package/build/withLoaded.cjs.map +0 -1
- package/build/withLoaded.d.cts.map +0 -1
- package/build/withLoaded.d.mts.map +0 -1
- package/build/withLoaded.js.map +0 -1
package/build/BaseEntity.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseEntity.cjs","names":["deTagId","getMetadata","keyToNumber","InstanceData"],"sources":["../src/BaseEntity.ts"],"sourcesContent":["import { type IdType } from \"
|
|
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"}
|
package/build/BaseEntity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseEntity.js","names":[],"sources":["../src/BaseEntity.ts"],"sourcesContent":["import { type IdType } from \"
|
|
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"}
|
package/build/Entity.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Entity.cjs","names":["BaseEntity"],"sources":["../src/Entity.ts"],"sourcesContent":["import { type EntityManager, type TaggedId } from \"
|
|
1
|
+
{"version":3,"file":"Entity.cjs","names":["BaseEntity"],"sources":["../src/Entity.ts"],"sourcesContent":["import { type EntityManager, type TaggedId } from \"src/EntityManager.ts\";\nimport { BaseEntity } from \"src/index.ts\";\n\nexport function isEntity(maybeEntity: unknown): maybeEntity is Entity {\n return maybeEntity instanceof BaseEntity;\n}\n\n/** All the types we support for entity `id` fields. */\nexport type IdType = number | string;\n\n/** A marker/base interface for all of our entity types. */\nexport interface Entity {\n /** The entity id, either tagged or untagged; the per-application `Entity` will specialize appropriately. */\n id: IdType;\n idMaybe: IdType | undefined;\n /** The entity id that is always tagged, regardless of the idType config. */\n idTagged: TaggedId;\n idTaggedMaybe: TaggedId | undefined;\n readonly em: EntityManager;\n readonly isNewEntity: boolean;\n readonly isDeletedEntity: boolean;\n readonly isDirtyEntity: boolean;\n readonly transientFields: Record<string, unknown>;\n set(opts: unknown): void;\n setPartial(opts: unknown): void;\n setDeepPartial(opts: unknown): Promise<void>;\n /**\n * Returns `type:id`, i.e. `Author:1` for persisted entities and `Author#1` for new entities.\n *\n * Once an entity is persisted, we'll return `Author#1:1` to denote \"the previously-new author #1\n * is now authors row id=1 in the database\".\n *\n * This is meant to be used for developer-facing logging and debugging, and not a user-facing\n * name / display name.\n */\n toString(): string;\n /**\n * Returns `tag:id`, i.e. `a:1` for persisted entities and `a#1` for new entities.\n *\n * This is meant to be used for developer-facing logging and debugging, and not a user-facing\n * name / display name.\n */\n toTaggedString(): string;\n}\n"],"mappings":";;;;;AAGA,SAAgB,SAAS,aAA6C;CACpE,OAAO,uBAAuBA,mBAAAA;AAChC"}
|
package/build/Entity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Entity.js","names":[],"sources":["../src/Entity.ts"],"sourcesContent":["import { type EntityManager, type TaggedId } from \"
|
|
1
|
+
{"version":3,"file":"Entity.js","names":[],"sources":["../src/Entity.ts"],"sourcesContent":["import { type EntityManager, type TaggedId } from \"src/EntityManager.ts\";\nimport { BaseEntity } from \"src/index.ts\";\n\nexport function isEntity(maybeEntity: unknown): maybeEntity is Entity {\n return maybeEntity instanceof BaseEntity;\n}\n\n/** All the types we support for entity `id` fields. */\nexport type IdType = number | string;\n\n/** A marker/base interface for all of our entity types. */\nexport interface Entity {\n /** The entity id, either tagged or untagged; the per-application `Entity` will specialize appropriately. */\n id: IdType;\n idMaybe: IdType | undefined;\n /** The entity id that is always tagged, regardless of the idType config. */\n idTagged: TaggedId;\n idTaggedMaybe: TaggedId | undefined;\n readonly em: EntityManager;\n readonly isNewEntity: boolean;\n readonly isDeletedEntity: boolean;\n readonly isDirtyEntity: boolean;\n readonly transientFields: Record<string, unknown>;\n set(opts: unknown): void;\n setPartial(opts: unknown): void;\n setDeepPartial(opts: unknown): Promise<void>;\n /**\n * Returns `type:id`, i.e. `Author:1` for persisted entities and `Author#1` for new entities.\n *\n * Once an entity is persisted, we'll return `Author#1:1` to denote \"the previously-new author #1\n * is now authors row id=1 in the database\".\n *\n * This is meant to be used for developer-facing logging and debugging, and not a user-facing\n * name / display name.\n */\n toString(): string;\n /**\n * Returns `tag:id`, i.e. `a:1` for persisted entities and `a#1` for new entities.\n *\n * This is meant to be used for developer-facing logging and debugging, and not a user-facing\n * name / display name.\n */\n toTaggedString(): string;\n}\n"],"mappings":";;;;AAGA,SAAgB,SAAS,aAA6C;CACpE,OAAO,uBAAuB;AAChC"}
|
package/build/EntityManager.cjs
CHANGED
|
@@ -2,57 +2,55 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
3
3
|
const require_batchloaders_BatchLoader = require("./batchloaders/BatchLoader.cjs");
|
|
4
4
|
require("./relations/Collection.cjs");
|
|
5
|
+
const require_relations_CustomCollection = require("./relations/CustomCollection.cjs");
|
|
6
|
+
const require_relations_CustomReference = require("./relations/CustomReference.cjs");
|
|
7
|
+
const require_normalizeHints = require("./normalizeHints.cjs");
|
|
8
|
+
require("./batchloaders/recursiveChildrenBatchLoader.cjs");
|
|
9
|
+
require("./batchloaders/recursiveM2mBatchLoader.cjs");
|
|
10
|
+
require("./batchloaders/recursiveParentsBatchLoader.cjs");
|
|
11
|
+
const require_relations_RecursiveCycleError = require("./relations/RecursiveCycleError.cjs");
|
|
12
|
+
require("./relations/RecursiveCollection.cjs");
|
|
13
|
+
const require_reactivity_reactiveHints = require("./reactivity/reactiveHints.cjs");
|
|
14
|
+
const require_loading_loadHints = require("./loading/loadHints.cjs");
|
|
15
|
+
const require_relations_hasAsyncMethod = require("./relations/hasAsyncMethod.cjs");
|
|
16
|
+
const require_relations_AsyncProperty = require("./relations/AsyncProperty.cjs");
|
|
5
17
|
const require_fields = require("./fields.cjs");
|
|
6
|
-
const
|
|
7
|
-
const require_logging_ReactionLogger = require("./logging/ReactionLogger.cjs");
|
|
8
|
-
const require_trusted = require("./trusted.cjs");
|
|
9
|
-
const require_ReactionsManager = require("./ReactionsManager.cjs");
|
|
10
|
-
const require_JoinRows = require("./JoinRows.cjs");
|
|
18
|
+
const require_keys = require("./keys.cjs");
|
|
11
19
|
const require_RowData = require("./RowData.cjs");
|
|
12
|
-
const require_relations_RecursiveCycleError = require("./relations/RecursiveCycleError.cjs");
|
|
13
20
|
const require_relations_LazyField = require("./relations/LazyField.cjs");
|
|
14
|
-
require("./
|
|
15
|
-
require("./batchloaders/
|
|
21
|
+
const require_relations_Reference = require("./relations/Reference.cjs");
|
|
22
|
+
require("./batchloaders/manyToManyBatchLoader.cjs");
|
|
16
23
|
require("./batchloaders/oneToManyBatchLoader.cjs");
|
|
17
24
|
const require_queries_find_scopes = require("./queries/find/scopes.cjs");
|
|
18
|
-
const require_IsLoadedCache = require("./IsLoadedCache.cjs");
|
|
19
25
|
const require_relations_OneToManyCollection = require("./relations/OneToManyCollection.cjs");
|
|
20
26
|
const require_relations_ManyToOneReference = require("./relations/ManyToOneReference.cjs");
|
|
21
|
-
|
|
27
|
+
require("./batchloaders/oneToOneBatchLoader.cjs");
|
|
22
28
|
const require_relations_ReactiveReference = require("./relations/ReactiveReference.cjs");
|
|
23
29
|
const require_relations_OneToOneReference = require("./relations/OneToOneReference.cjs");
|
|
24
|
-
require("./batchloaders/recursiveChildrenBatchLoader.cjs");
|
|
25
|
-
require("./batchloaders/recursiveM2mBatchLoader.cjs");
|
|
26
|
-
require("./batchloaders/recursiveParentsBatchLoader.cjs");
|
|
27
|
-
require("./relations/RecursiveCollection.cjs");
|
|
28
|
-
const require_reactiveHints = require("./reactiveHints.cjs");
|
|
29
|
-
const require_normalizeHints = require("./normalizeHints.cjs");
|
|
30
|
-
const require_loadHints = require("./loadHints.cjs");
|
|
31
|
-
const require_utils = require("./utils.cjs");
|
|
32
|
-
const require_newEntity = require("./newEntity.cjs");
|
|
33
|
-
const require_relations_CustomCollection = require("./relations/CustomCollection.cjs");
|
|
34
|
-
const require_relations_CustomReference = require("./relations/CustomReference.cjs");
|
|
35
|
-
const require_relations_hasAsyncMethod = require("./relations/hasAsyncMethod.cjs");
|
|
36
|
-
const require_relations_AsyncProperty = require("./relations/AsyncProperty.cjs");
|
|
37
|
-
require("./batchloaders/manyToManyBatchLoader.cjs");
|
|
38
30
|
const require_relations_PolymorphicReference = require("./relations/PolymorphicReference.cjs");
|
|
39
31
|
require("./relations/index.cjs");
|
|
40
|
-
const
|
|
32
|
+
const require_utils = require("./utils.cjs");
|
|
33
|
+
const require_newEntity = require("./newEntity.cjs");
|
|
34
|
+
require("./typeMap.cjs");
|
|
41
35
|
const require_rules = require("./rules.cjs");
|
|
42
36
|
const require_configure = require("./configure.cjs");
|
|
43
37
|
const require_config = require("./config.cjs");
|
|
44
38
|
const require_EntityMetadata = require("./EntityMetadata.cjs");
|
|
39
|
+
const require_trusted = require("./trusted.cjs");
|
|
45
40
|
const require_defaults = require("./defaults.cjs");
|
|
46
41
|
require("./dataloaders/lensDataLoader.cjs");
|
|
47
|
-
const
|
|
42
|
+
const require_loading_loadLens = require("./loading/loadLens.cjs");
|
|
48
43
|
require("./logging/FactoryLogger.cjs");
|
|
49
44
|
const require_newTestInstance = require("./newTestInstance.cjs");
|
|
50
45
|
const require_queries_find_EntityFilter = require("./queries/find/EntityFilter.cjs");
|
|
46
|
+
const require_flush_JoinRows = require("./flush/JoinRows.cjs");
|
|
51
47
|
const require_PluginManager = require("./PluginManager.cjs");
|
|
52
48
|
const require_queries_find_QueryParser_collectionJoins = require("./queries/find/QueryParser.collectionJoins.cjs");
|
|
49
|
+
const require_flush_Todo = require("./flush/Todo.cjs");
|
|
53
50
|
const require_dataloaders_findDataLoader = require("./dataloaders/findDataLoader.cjs");
|
|
54
51
|
require("./drivers/index.cjs");
|
|
55
52
|
const require_logging_FieldLogger = require("./logging/FieldLogger.cjs");
|
|
53
|
+
const require_logging_ReactionLogger = require("./logging/ReactionLogger.cjs");
|
|
56
54
|
require("./plugins/PreloadPlugin.cjs");
|
|
57
55
|
const require_queries_sql_query = require("./queries/sql/query.cjs");
|
|
58
56
|
const require_upsert = require("./upsert.cjs");
|
|
@@ -65,10 +63,11 @@ const require_dataloaders_findCountDataLoader = require("./dataloaders/findCount
|
|
|
65
63
|
const require_dataloaders_findIdsDataLoader = require("./dataloaders/findIdsDataLoader.cjs");
|
|
66
64
|
const require_dataloaders_findOrCreateDataLoader = require("./dataloaders/findOrCreateDataLoader.cjs");
|
|
67
65
|
const require_dataloaders_findPaginatedDataLoader = require("./dataloaders/findPaginatedDataLoader.cjs");
|
|
68
|
-
const
|
|
66
|
+
const require_flush_FlushLock = require("./flush/FlushLock.cjs");
|
|
69
67
|
const require_IndexManager = require("./IndexManager.cjs");
|
|
70
|
-
require("./
|
|
68
|
+
const require_loading_IsLoadedCache = require("./loading/IsLoadedCache.cjs");
|
|
71
69
|
const require_queries_sql_execute = require("./queries/sql/execute.cjs");
|
|
70
|
+
const require_reactivity_ReactionsManager = require("./reactivity/ReactionsManager.cjs");
|
|
72
71
|
const require_Entity = require("./Entity.cjs");
|
|
73
72
|
const require_BaseEntity = require("./BaseEntity.cjs");
|
|
74
73
|
let dataloader = require("dataloader");
|
|
@@ -127,9 +126,9 @@ var EntityManager = class EntityManager {
|
|
|
127
126
|
#batchLoaders = {};
|
|
128
127
|
#joinRows = {};
|
|
129
128
|
/** Stores any `source -> downstream` reactions to recalc during `em.flush`. */
|
|
130
|
-
#rm = new
|
|
129
|
+
#rm = new require_reactivity_ReactionsManager.ReactionsManager(this);
|
|
131
130
|
/** Ensures our `em.flush` method is not interrupted. */
|
|
132
|
-
#fl = new
|
|
131
|
+
#fl = new require_flush_FlushLock.FlushLock();
|
|
133
132
|
#hooks = {
|
|
134
133
|
beforeBegin: [],
|
|
135
134
|
afterBegin: [],
|
|
@@ -138,7 +137,7 @@ var EntityManager = class EntityManager {
|
|
|
138
137
|
};
|
|
139
138
|
#preloader;
|
|
140
139
|
#fieldLogger = require_logging_FieldLogger.noopFieldLogger;
|
|
141
|
-
#isLoadedCache = new
|
|
140
|
+
#isLoadedCache = new require_loading_IsLoadedCache.IsLoadedCache();
|
|
142
141
|
#merging;
|
|
143
142
|
/** Track `a#1`, `a#2`, etc indexes for `em.create`-d entities. */
|
|
144
143
|
#createCounter = void 0;
|
|
@@ -187,7 +186,7 @@ var EntityManager = class EntityManager {
|
|
|
187
186
|
return em.#merging?.has(entity) ?? false;
|
|
188
187
|
},
|
|
189
188
|
joinRows(m2m) {
|
|
190
|
-
return require_utils.getOrSet(em.#joinRows, m2m.joinTableName, () => new
|
|
189
|
+
return require_utils.getOrSet(em.#joinRows, m2m.joinTableName, () => new require_flush_JoinRows.JoinRows(m2m, em.#rm));
|
|
191
190
|
},
|
|
192
191
|
/** Returns `a:1.books` if it's in our preload cache. */
|
|
193
192
|
getPreloadedRelation(taggedId, fieldName) {
|
|
@@ -748,7 +747,7 @@ var EntityManager = class EntityManager {
|
|
|
748
747
|
return entities;
|
|
749
748
|
}
|
|
750
749
|
async loadLens(entities, fn, populate) {
|
|
751
|
-
const result = await
|
|
750
|
+
const result = await require_loading_loadLens.loadLens(entities, fn);
|
|
752
751
|
if (populate) await this.populate(result, populate);
|
|
753
752
|
return result;
|
|
754
753
|
}
|
|
@@ -775,7 +774,7 @@ var EntityManager = class EntityManager {
|
|
|
775
774
|
return e !== void 0 && !require_BaseEntity.getInstanceData(e).isDeletedAndFlushed;
|
|
776
775
|
});
|
|
777
776
|
if (list.length === 0) return !fn ? entityOrList : fn(entityOrList);
|
|
778
|
-
if (!opts.forceReload && list.every((entity) => !entity.isNewEntity &&
|
|
777
|
+
if (!opts.forceReload && list.every((entity) => !entity.isNewEntity && require_loading_loadHints.isLoadedForPopulate(entity, hintOpt))) return fn ? fn(entityOrList) : entityOrList;
|
|
779
778
|
const meta = require_EntityMetadata.getMetadata(list[0]);
|
|
780
779
|
if (this.#preloader) {
|
|
781
780
|
const [preload, non] = this.#preloader.partitionHint(meta, hintOpt);
|
|
@@ -825,7 +824,7 @@ var EntityManager = class EntityManager {
|
|
|
825
824
|
async assignNewIds() {
|
|
826
825
|
let pendingEntities = this.entities.filter((e) => e.isNewEntity && !e.isDeletedEntity && !e.idTaggedMaybe);
|
|
827
826
|
await this.getLoader("assign-new-ids", "global", async (entities) => {
|
|
828
|
-
let todos =
|
|
827
|
+
let todos = require_flush_Todo.createTodos(entities);
|
|
829
828
|
await this.driver.assignNewIds(this, todos);
|
|
830
829
|
for (const e of entities) this.#entitiesById.set(e.idTagged, e);
|
|
831
830
|
return entities;
|
|
@@ -891,10 +890,10 @@ var EntityManager = class EntityManager {
|
|
|
891
890
|
const pendingHooks = /* @__PURE__ */ new Set();
|
|
892
891
|
const alreadyRanHooks = /* @__PURE__ */ new Set();
|
|
893
892
|
findPendingFlushEntities(this.#maybePendingFlushEntities, hooksInvoked, pendingFlush, pendingHooks, alreadyRanHooks);
|
|
894
|
-
if (alreadyRanHooks.size > 0) maybeBumpUpdatedAt(this.#rm,
|
|
893
|
+
if (alreadyRanHooks.size > 0) maybeBumpUpdatedAt(this.#rm, require_flush_Todo.createTodos(alreadyRanHooks), now);
|
|
895
894
|
while (pendingHooks.size > 0) await this.#fl.allowWrites(async () => {
|
|
896
|
-
let todos =
|
|
897
|
-
await require_defaults.setAsyncDefaults(suppressedDefaultTypeErrors, this.ctx,
|
|
895
|
+
let todos = require_flush_Todo.createTodos(pendingHooks);
|
|
896
|
+
await require_defaults.setAsyncDefaults(suppressedDefaultTypeErrors, this.ctx, require_flush_Todo.Todo.groupInsertsByTypeAndSubType(todos));
|
|
898
897
|
maybeBumpUpdatedAt(this.#rm, todos, now);
|
|
899
898
|
for (const group of maybeSetupHookOrdering(todos)) {
|
|
900
899
|
await beforeCreate(this.ctx, group);
|
|
@@ -968,7 +967,7 @@ var EntityManager = class EntityManager {
|
|
|
968
967
|
"deletes"
|
|
969
968
|
]) for (const e of todo[key]) if (!commitRuleSeen.has(e)) {
|
|
970
969
|
commitRuleSeen.add(e);
|
|
971
|
-
|
|
970
|
+
require_flush_Todo.getTodo(commitRuleTodos, e)[key].push(e);
|
|
972
971
|
}
|
|
973
972
|
}
|
|
974
973
|
for (const [table, todo] of Object.entries(joinRowTodos)) {
|
|
@@ -986,8 +985,8 @@ var EntityManager = class EntityManager {
|
|
|
986
985
|
}
|
|
987
986
|
let entitiesToFlush = await runHooksOnPendingEntities();
|
|
988
987
|
for (const e of entitiesToFlush) allFlushedEntities.add(e);
|
|
989
|
-
let entityTodos =
|
|
990
|
-
let joinRowTodos =
|
|
988
|
+
let entityTodos = require_flush_Todo.createTodos(entitiesToFlush);
|
|
989
|
+
let joinRowTodos = require_flush_Todo.combineJoinRows(this.#joinRows);
|
|
991
990
|
await runValidation(entityTodos, joinRowTodos, !skipValidation);
|
|
992
991
|
this.#rm.throwIfAnySuppressedTypeErrors();
|
|
993
992
|
if (suppressedDefaultTypeErrors.length > 0) throw suppressedDefaultTypeErrors[0];
|
|
@@ -1011,8 +1010,8 @@ var EntityManager = class EntityManager {
|
|
|
1011
1010
|
now = getNow();
|
|
1012
1011
|
entitiesToFlush = await runHooksOnPendingEntities();
|
|
1013
1012
|
for (const e of entitiesToFlush) allFlushedEntities.add(e);
|
|
1014
|
-
entityTodos =
|
|
1015
|
-
joinRowTodos =
|
|
1013
|
+
entityTodos = require_flush_Todo.createTodos(entitiesToFlush);
|
|
1014
|
+
joinRowTodos = require_flush_Todo.combineJoinRows(this.#joinRows);
|
|
1016
1015
|
await runValidation(entityTodos, joinRowTodos, true);
|
|
1017
1016
|
this.#rm.throwIfAnySuppressedTypeErrors();
|
|
1018
1017
|
} else entityTodos = {};
|
|
@@ -1286,7 +1285,7 @@ var EntityManager = class EntityManager {
|
|
|
1286
1285
|
while (entities.length > 0) {
|
|
1287
1286
|
const p = entities.flatMap(getCascadeDeleteRelations).map((r) => r.load().then(() => r.maybeCascadeDelete()));
|
|
1288
1287
|
await Promise.all(p);
|
|
1289
|
-
const todos =
|
|
1288
|
+
const todos = require_flush_Todo.createTodos(entities);
|
|
1290
1289
|
await beforeDelete(this.ctx, todos);
|
|
1291
1290
|
for (const entity of entities) {
|
|
1292
1291
|
const relations = require_index.getRelations(entity);
|
|
@@ -1444,7 +1443,7 @@ var EntityManager = class EntityManager {
|
|
|
1444
1443
|
if (source.isDirtyEntity) require_utils.fail("cannot import dirty entities");
|
|
1445
1444
|
hint ??= {};
|
|
1446
1445
|
if (!normalizedHint) {
|
|
1447
|
-
|
|
1446
|
+
require_loading_loadHints.assertLoaded(source, hint);
|
|
1448
1447
|
normalizedHint = require_normalizeHints.deepNormalizeHint(hint);
|
|
1449
1448
|
}
|
|
1450
1449
|
if (source.em === this) return source;
|
|
@@ -1578,7 +1577,7 @@ async function validateReactiveRules(em, logger, todos, joinRowTodos, getRules =
|
|
|
1578
1577
|
const walks = [];
|
|
1579
1578
|
async function followAndQueue(triggered, rule) {
|
|
1580
1579
|
if (triggered.length === 0) return;
|
|
1581
|
-
const found = (await
|
|
1580
|
+
const found = (await require_reactivity_reactiveHints.followReverseHint(rule.name, triggered, rule.path)).filter((entity) => !entity.isDeletedEntity).filter((e) => e instanceof rule.cstr);
|
|
1582
1581
|
let entities = fns.get(rule.fn);
|
|
1583
1582
|
if (!entities) {
|
|
1584
1583
|
entities = /* @__PURE__ */ new Set();
|