joist-core 2.4.0-next.37 → 2.4.0-next.39
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.d.cts +3 -4
- package/build/BaseEntity.d.cts.map +1 -1
- package/build/BaseEntity.d.mts +3 -4
- package/build/BaseEntity.d.mts.map +1 -1
- package/build/Entity.d.cts +3 -4
- package/build/Entity.d.cts.map +1 -1
- package/build/Entity.d.mts +3 -4
- package/build/Entity.d.mts.map +1 -1
- package/build/EntityFields.d.cts +3 -4
- package/build/EntityFields.d.cts.map +1 -1
- package/build/EntityFields.d.mts +3 -4
- package/build/EntityFields.d.mts.map +1 -1
- package/build/EntityManager.cjs +11 -3
- package/build/EntityManager.cjs.map +1 -1
- package/build/EntityManager.d.cts +47 -41
- package/build/EntityManager.d.cts.map +1 -1
- package/build/EntityManager.d.mts +47 -41
- package/build/EntityManager.d.mts.map +1 -1
- package/build/EntityManager.js +11 -3
- package/build/EntityManager.js.map +1 -1
- package/build/EntityMetadata.d.cts +31 -32
- package/build/EntityMetadata.d.cts.map +1 -1
- package/build/EntityMetadata.d.mts +31 -32
- package/build/EntityMetadata.d.mts.map +1 -1
- package/build/EnumMetadata.d.cts +1 -2
- package/build/EnumMetadata.d.cts.map +1 -1
- package/build/EnumMetadata.d.mts +1 -2
- package/build/EnumMetadata.d.mts.map +1 -1
- package/build/IndexManager.cjs.map +1 -1
- package/build/IndexManager.d.cts +2 -3
- package/build/IndexManager.d.cts.map +1 -1
- package/build/IndexManager.d.mts +2 -3
- package/build/IndexManager.d.mts.map +1 -1
- package/build/IndexManager.js.map +1 -1
- package/build/InstanceData.cjs.map +1 -1
- package/build/InstanceData.d.cts +1 -2
- package/build/InstanceData.d.cts.map +1 -1
- package/build/InstanceData.d.mts +1 -2
- package/build/InstanceData.d.mts.map +1 -1
- package/build/InstanceData.js.map +1 -1
- package/build/PluginManager.cjs.map +1 -1
- package/build/PluginManager.d.cts +4 -4
- package/build/PluginManager.d.cts.map +1 -1
- package/build/PluginManager.d.mts +4 -4
- package/build/PluginManager.d.mts.map +1 -1
- package/build/PluginManager.js.map +1 -1
- package/build/RowData.d.cts +3 -4
- package/build/RowData.d.cts.map +1 -1
- package/build/RowData.d.mts +3 -4
- package/build/RowData.d.mts.map +1 -1
- package/build/batchloaders/BatchLoader.cjs.map +1 -1
- package/build/batchloaders/BatchLoader.d.cts +1 -2
- package/build/batchloaders/BatchLoader.d.cts.map +1 -1
- package/build/batchloaders/BatchLoader.d.mts +1 -2
- package/build/batchloaders/BatchLoader.d.mts.map +1 -1
- package/build/batchloaders/BatchLoader.js.map +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.d.cts +2 -3
- package/build/batchloaders/enumCollectionBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.d.mts +2 -3
- package/build/batchloaders/enumCollectionBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/loadBatchLoader.d.cts +2 -3
- package/build/batchloaders/loadBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/loadBatchLoader.d.mts +2 -3
- package/build/batchloaders/loadBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/manyToManyBatchLoader.d.cts +2 -3
- package/build/batchloaders/manyToManyBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/manyToManyBatchLoader.d.mts +2 -3
- package/build/batchloaders/manyToManyBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/oneToManyBatchLoader.d.cts +2 -3
- package/build/batchloaders/oneToManyBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/oneToManyBatchLoader.d.mts +2 -3
- package/build/batchloaders/oneToManyBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/oneToOneBatchLoader.d.cts +2 -3
- package/build/batchloaders/oneToOneBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/oneToOneBatchLoader.d.mts +2 -3
- package/build/batchloaders/oneToOneBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/populateBatchLoader.d.cts +2 -3
- package/build/batchloaders/populateBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/populateBatchLoader.d.mts +2 -3
- package/build/batchloaders/populateBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/recursiveChildrenBatchLoader.d.cts +2 -3
- package/build/batchloaders/recursiveChildrenBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/recursiveChildrenBatchLoader.d.mts +2 -3
- package/build/batchloaders/recursiveChildrenBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/recursiveM2mBatchLoader.d.cts +2 -3
- package/build/batchloaders/recursiveM2mBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/recursiveM2mBatchLoader.d.mts +2 -3
- package/build/batchloaders/recursiveM2mBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/recursiveParentsBatchLoader.d.cts +2 -3
- package/build/batchloaders/recursiveParentsBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/recursiveParentsBatchLoader.d.mts +2 -3
- package/build/batchloaders/recursiveParentsBatchLoader.d.mts.map +1 -1
- package/build/changes.cjs.map +1 -1
- package/build/changes.d.cts +9 -10
- package/build/changes.d.cts.map +1 -1
- package/build/changes.d.mts +9 -10
- package/build/changes.d.mts.map +1 -1
- package/build/changes.js.map +1 -1
- package/build/config.d.cts +17 -17
- package/build/config.d.cts.map +1 -1
- package/build/config.d.mts +17 -17
- package/build/config.d.mts.map +1 -1
- package/build/configure.d.cts +8 -9
- package/build/configure.d.cts.map +1 -1
- package/build/configure.d.mts +8 -9
- package/build/configure.d.mts.map +1 -1
- package/build/dataloaders/fastWhereFilterHash.d.cts +1 -2
- package/build/dataloaders/fastWhereFilterHash.d.cts.map +1 -1
- package/build/dataloaders/fastWhereFilterHash.d.mts +1 -2
- package/build/dataloaders/fastWhereFilterHash.d.mts.map +1 -1
- package/build/dataloaders/findByUniqueDataLoader.d.cts +2 -3
- package/build/dataloaders/findByUniqueDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findByUniqueDataLoader.d.mts +2 -3
- package/build/dataloaders/findByUniqueDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findCountDataLoader.d.cts +4 -5
- package/build/dataloaders/findCountDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findCountDataLoader.d.mts +4 -5
- package/build/dataloaders/findCountDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findDataLoader.d.cts +11 -12
- package/build/dataloaders/findDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findDataLoader.d.mts +11 -12
- package/build/dataloaders/findDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findIdsDataLoader.d.cts +2 -3
- package/build/dataloaders/findIdsDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findIdsDataLoader.d.mts +2 -3
- package/build/dataloaders/findIdsDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.d.cts +3 -3
- package/build/dataloaders/findOrCreateDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.d.mts +3 -3
- package/build/dataloaders/findOrCreateDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findPaginatedDataLoader.d.cts +1 -2
- package/build/dataloaders/findPaginatedDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findPaginatedDataLoader.d.mts +1 -2
- package/build/dataloaders/findPaginatedDataLoader.d.mts.map +1 -1
- package/build/dataloaders/lensDataLoader.d.cts +2 -3
- package/build/dataloaders/lensDataLoader.d.cts.map +1 -1
- package/build/dataloaders/lensDataLoader.d.mts +2 -3
- package/build/dataloaders/lensDataLoader.d.mts.map +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.d.cts +2 -3
- package/build/dataloaders/manyToManyFindDataLoader.d.cts.map +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.d.mts +2 -3
- package/build/dataloaders/manyToManyFindDataLoader.d.mts.map +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.d.cts +2 -3
- package/build/dataloaders/oneToManyFindDataLoader.d.cts.map +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.d.mts +2 -3
- package/build/dataloaders/oneToManyFindDataLoader.d.mts.map +1 -1
- package/build/defaults.cjs.map +1 -1
- package/build/defaults.d.cts +7 -7
- package/build/defaults.d.cts.map +1 -1
- package/build/defaults.d.mts +7 -7
- package/build/defaults.d.mts.map +1 -1
- package/build/defaults.js.map +1 -1
- package/build/drivers/Driver.d.cts +2 -3
- package/build/drivers/Driver.d.cts.map +1 -1
- package/build/drivers/Driver.d.mts +2 -3
- package/build/drivers/Driver.d.mts.map +1 -1
- package/build/drivers/EntityWriter.d.cts +7 -7
- package/build/drivers/EntityWriter.d.cts.map +1 -1
- package/build/drivers/EntityWriter.d.mts +7 -7
- package/build/drivers/EntityWriter.d.mts.map +1 -1
- package/build/drivers/IdAssigner.cjs.map +1 -1
- package/build/drivers/IdAssigner.d.cts +5 -5
- package/build/drivers/IdAssigner.d.cts.map +1 -1
- package/build/drivers/IdAssigner.d.mts +5 -5
- package/build/drivers/IdAssigner.d.mts.map +1 -1
- package/build/drivers/IdAssigner.js.map +1 -1
- package/build/drivers/driverApi.d.cts +2 -3
- package/build/drivers/driverApi.d.cts.map +1 -1
- package/build/drivers/driverApi.d.mts +2 -3
- package/build/drivers/driverApi.d.mts.map +1 -1
- package/build/fields.d.cts +6 -7
- package/build/fields.d.cts.map +1 -1
- package/build/fields.d.mts +6 -7
- package/build/fields.d.mts.map +1 -1
- package/build/flush/FlushLock.cjs.map +1 -1
- package/build/flush/FlushLock.d.cts +1 -2
- package/build/flush/FlushLock.d.cts.map +1 -1
- package/build/flush/FlushLock.d.mts +1 -2
- package/build/flush/FlushLock.d.mts.map +1 -1
- package/build/flush/FlushLock.js.map +1 -1
- package/build/flush/JoinRows.cjs.map +1 -1
- package/build/flush/JoinRows.d.cts +5 -6
- package/build/flush/JoinRows.d.cts.map +1 -1
- package/build/flush/JoinRows.d.mts +5 -6
- package/build/flush/JoinRows.d.mts.map +1 -1
- package/build/flush/JoinRows.js.map +1 -1
- package/build/flush/PendingChanges.d.cts +5 -6
- package/build/flush/PendingChanges.d.cts.map +1 -1
- package/build/flush/PendingChanges.d.mts +5 -6
- package/build/flush/PendingChanges.d.mts.map +1 -1
- package/build/flush/Todo.d.cts +5 -6
- package/build/flush/Todo.d.cts.map +1 -1
- package/build/flush/Todo.d.mts +5 -6
- package/build/flush/Todo.d.mts.map +1 -1
- package/build/getProperties.d.cts +3 -4
- package/build/getProperties.d.cts.map +1 -1
- package/build/getProperties.d.mts +3 -4
- package/build/getProperties.d.mts.map +1 -1
- package/build/index.d.cts +17 -17
- package/build/index.d.cts.map +1 -1
- package/build/index.d.mts +17 -17
- package/build/index.d.mts.map +1 -1
- package/build/json.d.cts +11 -11
- package/build/json.d.cts.map +1 -1
- package/build/json.d.mts +11 -11
- package/build/json.d.mts.map +1 -1
- package/build/keys.d.cts +27 -27
- package/build/keys.d.cts.map +1 -1
- package/build/keys.d.mts +27 -27
- package/build/keys.d.mts.map +1 -1
- package/build/loading/HintTree.d.cts +3 -4
- package/build/loading/HintTree.d.cts.map +1 -1
- package/build/loading/HintTree.d.mts +3 -4
- package/build/loading/HintTree.d.mts.map +1 -1
- package/build/loading/IsLoadedCache.cjs.map +1 -1
- package/build/loading/IsLoadedCache.d.cts +2 -3
- package/build/loading/IsLoadedCache.d.cts.map +1 -1
- package/build/loading/IsLoadedCache.d.mts +2 -3
- package/build/loading/IsLoadedCache.d.mts.map +1 -1
- package/build/loading/IsLoadedCache.js.map +1 -1
- package/build/loading/loadHints.d.cts +17 -17
- package/build/loading/loadHints.d.cts.map +1 -1
- package/build/loading/loadHints.d.mts +17 -17
- package/build/loading/loadHints.d.mts.map +1 -1
- package/build/loading/loadLens.d.cts +13 -13
- package/build/loading/loadLens.d.cts.map +1 -1
- package/build/loading/loadLens.d.mts +13 -13
- package/build/loading/loadLens.d.mts.map +1 -1
- package/build/loading/withLoaded.d.cts +5 -6
- package/build/loading/withLoaded.d.cts.map +1 -1
- package/build/loading/withLoaded.d.mts +5 -6
- package/build/loading/withLoaded.d.mts.map +1 -1
- package/build/logging/FactoryLogger.d.cts +3 -4
- package/build/logging/FactoryLogger.d.cts.map +1 -1
- package/build/logging/FactoryLogger.d.mts +3 -4
- package/build/logging/FactoryLogger.d.mts.map +1 -1
- package/build/logging/FieldLogger.cjs.map +1 -1
- package/build/logging/FieldLogger.d.cts +4 -5
- package/build/logging/FieldLogger.d.cts.map +1 -1
- package/build/logging/FieldLogger.d.mts +4 -5
- package/build/logging/FieldLogger.d.mts.map +1 -1
- package/build/logging/FieldLogger.js.map +1 -1
- package/build/logging/ReactionLogger.d.cts +7 -7
- package/build/logging/ReactionLogger.d.cts.map +1 -1
- package/build/logging/ReactionLogger.d.mts +7 -7
- package/build/logging/ReactionLogger.d.mts.map +1 -1
- package/build/newEntity.cjs.map +1 -1
- package/build/newEntity.d.cts +4 -5
- package/build/newEntity.d.cts.map +1 -1
- package/build/newEntity.d.mts +4 -5
- package/build/newEntity.d.mts.map +1 -1
- package/build/newEntity.js.map +1 -1
- package/build/newTestInstance.d.cts +21 -21
- package/build/newTestInstance.d.cts.map +1 -1
- package/build/newTestInstance.d.mts +21 -21
- package/build/newTestInstance.d.mts.map +1 -1
- package/build/normalizeHints.d.cts +7 -8
- package/build/normalizeHints.d.cts.map +1 -1
- package/build/normalizeHints.d.mts +7 -8
- package/build/normalizeHints.d.mts.map +1 -1
- package/build/nowUTC.d.cts +4 -5
- package/build/nowUTC.d.cts.map +1 -1
- package/build/nowUTC.d.mts +4 -5
- package/build/nowUTC.d.mts.map +1 -1
- package/build/plugins/ImmutableEntitiesPlugin.d.cts +1 -2
- package/build/plugins/ImmutableEntitiesPlugin.d.cts.map +1 -1
- package/build/plugins/ImmutableEntitiesPlugin.d.mts +1 -2
- package/build/plugins/ImmutableEntitiesPlugin.d.mts.map +1 -1
- package/build/plugins/PreloadPlugin.d.cts +3 -4
- package/build/plugins/PreloadPlugin.d.cts.map +1 -1
- package/build/plugins/PreloadPlugin.d.mts +3 -4
- package/build/plugins/PreloadPlugin.d.mts.map +1 -1
- package/build/preloading/JsonAggregatePreloader.d.cts +1 -2
- package/build/preloading/JsonAggregatePreloader.d.cts.map +1 -1
- package/build/preloading/JsonAggregatePreloader.d.mts +1 -2
- package/build/preloading/JsonAggregatePreloader.d.mts.map +1 -1
- package/build/preloading/canPreload.d.cts +1 -2
- package/build/preloading/canPreload.d.cts.map +1 -1
- package/build/preloading/canPreload.d.mts +1 -2
- package/build/preloading/canPreload.d.mts.map +1 -1
- package/build/preloading/partitionHint.d.cts +1 -2
- package/build/preloading/partitionHint.d.cts.map +1 -1
- package/build/preloading/partitionHint.d.mts +1 -2
- package/build/preloading/partitionHint.d.mts.map +1 -1
- package/build/queries/ConditionBuilder.d.cts +2 -2
- package/build/queries/ConditionBuilder.d.cts.map +1 -1
- package/build/queries/ConditionBuilder.d.mts +2 -2
- package/build/queries/ConditionBuilder.d.mts.map +1 -1
- package/build/queries/conditions.d.cts +11 -12
- package/build/queries/conditions.d.cts.map +1 -1
- package/build/queries/conditions.d.mts +11 -12
- package/build/queries/conditions.d.mts.map +1 -1
- package/build/queries/entityQueryUtils.d.cts +4 -5
- package/build/queries/entityQueryUtils.d.cts.map +1 -1
- package/build/queries/entityQueryUtils.d.mts +4 -5
- package/build/queries/entityQueryUtils.d.mts.map +1 -1
- package/build/queries/find/Aliases.d.cts +16 -16
- package/build/queries/find/Aliases.d.cts.map +1 -1
- package/build/queries/find/Aliases.d.mts +16 -16
- package/build/queries/find/Aliases.d.mts.map +1 -1
- package/build/queries/find/DeferredAlias.d.cts +5 -6
- package/build/queries/find/DeferredAlias.d.cts.map +1 -1
- package/build/queries/find/DeferredAlias.d.mts +5 -6
- package/build/queries/find/DeferredAlias.d.mts.map +1 -1
- package/build/queries/find/EntityFilter.d.cts +12 -13
- package/build/queries/find/EntityFilter.d.cts.map +1 -1
- package/build/queries/find/EntityFilter.d.mts +12 -13
- package/build/queries/find/EntityFilter.d.mts.map +1 -1
- package/build/queries/find/EntityGraphQLFilter.d.cts +8 -9
- package/build/queries/find/EntityGraphQLFilter.d.cts.map +1 -1
- package/build/queries/find/EntityGraphQLFilter.d.mts +8 -9
- package/build/queries/find/EntityGraphQLFilter.d.mts.map +1 -1
- package/build/queries/find/QueryParser.collectionJoins.d.cts +1 -2
- package/build/queries/find/QueryParser.collectionJoins.d.cts.map +1 -1
- package/build/queries/find/QueryParser.collectionJoins.d.mts +1 -2
- package/build/queries/find/QueryParser.collectionJoins.d.mts.map +1 -1
- package/build/queries/find/QueryParser.d.cts +18 -18
- package/build/queries/find/QueryParser.d.cts.map +1 -1
- package/build/queries/find/QueryParser.d.mts +18 -18
- package/build/queries/find/QueryParser.d.mts.map +1 -1
- package/build/queries/find/QueryParser.pruning.d.cts +2 -3
- package/build/queries/find/QueryParser.pruning.d.cts.map +1 -1
- package/build/queries/find/QueryParser.pruning.d.mts +2 -3
- package/build/queries/find/QueryParser.pruning.d.mts.map +1 -1
- package/build/queries/find/QueryVisitor.d.cts +4 -4
- package/build/queries/find/QueryVisitor.d.cts.map +1 -1
- package/build/queries/find/QueryVisitor.d.mts +4 -4
- package/build/queries/find/QueryVisitor.d.mts.map +1 -1
- package/build/queries/find/buildFindQuery.d.cts +3 -3
- package/build/queries/find/buildFindQuery.d.cts.map +1 -1
- package/build/queries/find/buildFindQuery.d.mts +3 -3
- package/build/queries/find/buildFindQuery.d.mts.map +1 -1
- package/build/queries/find/scopes.cjs.map +1 -1
- package/build/queries/find/scopes.d.cts +12 -13
- package/build/queries/find/scopes.d.cts.map +1 -1
- package/build/queries/find/scopes.d.mts +12 -13
- package/build/queries/find/scopes.d.mts.map +1 -1
- package/build/queries/find/scopes.js.map +1 -1
- package/build/queries/parsedConditions.d.cts +7 -8
- package/build/queries/parsedConditions.d.cts.map +1 -1
- package/build/queries/parsedConditions.d.mts +7 -8
- package/build/queries/parsedConditions.d.mts.map +1 -1
- package/build/queries/renderConditions.d.cts +3 -4
- package/build/queries/renderConditions.d.cts.map +1 -1
- package/build/queries/renderConditions.d.mts +3 -4
- package/build/queries/renderConditions.d.mts.map +1 -1
- package/build/queries/skipCondition.d.cts +1 -2
- package/build/queries/skipCondition.d.cts.map +1 -1
- package/build/queries/skipCondition.d.mts +1 -2
- package/build/queries/skipCondition.d.mts.map +1 -1
- package/build/queries/sql/AliasAssigner.cjs.map +1 -1
- package/build/queries/sql/AliasAssigner.d.cts +1 -2
- package/build/queries/sql/AliasAssigner.d.cts.map +1 -1
- package/build/queries/sql/AliasAssigner.d.mts +1 -2
- package/build/queries/sql/AliasAssigner.d.mts.map +1 -1
- package/build/queries/sql/AliasAssigner.js.map +1 -1
- package/build/queries/sql/Expr.d.cts +26 -27
- package/build/queries/sql/Expr.d.cts.map +1 -1
- package/build/queries/sql/Expr.d.mts +26 -27
- package/build/queries/sql/Expr.d.mts.map +1 -1
- package/build/queries/sql/JoinTree.d.cts +5 -5
- package/build/queries/sql/JoinTree.d.cts.map +1 -1
- package/build/queries/sql/JoinTree.d.mts +5 -5
- package/build/queries/sql/JoinTree.d.mts.map +1 -1
- package/build/queries/sql/Tables.d.cts +39 -39
- package/build/queries/sql/Tables.d.cts.map +1 -1
- package/build/queries/sql/Tables.d.mts +39 -39
- package/build/queries/sql/Tables.d.mts.map +1 -1
- package/build/queries/sql/custom.d.cts +14 -14
- package/build/queries/sql/custom.d.cts.map +1 -1
- package/build/queries/sql/custom.d.mts +14 -14
- package/build/queries/sql/custom.d.mts.map +1 -1
- package/build/queries/sql/execute.d.cts +15 -15
- package/build/queries/sql/execute.d.cts.map +1 -1
- package/build/queries/sql/execute.d.mts +15 -15
- package/build/queries/sql/execute.d.mts.map +1 -1
- package/build/queries/sql/expressions/arrayAgg.d.cts +5 -6
- package/build/queries/sql/expressions/arrayAgg.d.cts.map +1 -1
- package/build/queries/sql/expressions/arrayAgg.d.mts +5 -6
- package/build/queries/sql/expressions/arrayAgg.d.mts.map +1 -1
- package/build/queries/sql/expressions/case.d.cts +10 -10
- package/build/queries/sql/expressions/case.d.cts.map +1 -1
- package/build/queries/sql/expressions/case.d.mts +10 -10
- package/build/queries/sql/expressions/case.d.mts.map +1 -1
- package/build/queries/sql/expressions/coalesce.d.cts +5 -6
- package/build/queries/sql/expressions/coalesce.d.cts.map +1 -1
- package/build/queries/sql/expressions/coalesce.d.mts +5 -6
- package/build/queries/sql/expressions/coalesce.d.mts.map +1 -1
- package/build/queries/sql/expressions/codecs.d.cts +1 -2
- package/build/queries/sql/expressions/codecs.d.cts.map +1 -1
- package/build/queries/sql/expressions/codecs.d.mts +1 -2
- package/build/queries/sql/expressions/codecs.d.mts.map +1 -1
- package/build/queries/sql/expressions/expression.d.cts +6 -6
- package/build/queries/sql/expressions/expression.d.cts.map +1 -1
- package/build/queries/sql/expressions/expression.d.mts +6 -6
- package/build/queries/sql/expressions/expression.d.mts.map +1 -1
- package/build/queries/sql/expressions/greatest.d.cts +5 -6
- package/build/queries/sql/expressions/greatest.d.cts.map +1 -1
- package/build/queries/sql/expressions/greatest.d.mts +5 -6
- package/build/queries/sql/expressions/greatest.d.mts.map +1 -1
- package/build/queries/sql/expressions/least.d.cts +5 -6
- package/build/queries/sql/expressions/least.d.cts.map +1 -1
- package/build/queries/sql/expressions/least.d.mts +5 -6
- package/build/queries/sql/expressions/least.d.mts.map +1 -1
- package/build/queries/sql/expressions/nullIf.d.cts +5 -6
- package/build/queries/sql/expressions/nullIf.d.cts.map +1 -1
- package/build/queries/sql/expressions/nullIf.d.mts +5 -6
- package/build/queries/sql/expressions/nullIf.d.mts.map +1 -1
- package/build/queries/sql/expressions/parseExpression.d.cts +5 -6
- package/build/queries/sql/expressions/parseExpression.d.cts.map +1 -1
- package/build/queries/sql/expressions/parseExpression.d.mts +5 -6
- package/build/queries/sql/expressions/parseExpression.d.mts.map +1 -1
- package/build/queries/sql/expressions/types.d.cts +11 -11
- package/build/queries/sql/expressions/types.d.cts.map +1 -1
- package/build/queries/sql/expressions/types.d.mts +11 -11
- package/build/queries/sql/expressions/types.d.mts.map +1 -1
- package/build/queries/sql/keywords.d.cts +4 -5
- package/build/queries/sql/keywords.d.cts.map +1 -1
- package/build/queries/sql/keywords.d.mts +4 -5
- package/build/queries/sql/keywords.d.mts.map +1 -1
- package/build/queries/sql/query.cjs.map +1 -1
- package/build/queries/sql/query.d.cts +67 -67
- package/build/queries/sql/query.d.cts.map +1 -1
- package/build/queries/sql/query.d.mts +67 -67
- package/build/queries/sql/query.d.mts.map +1 -1
- package/build/queries/sql/query.js.map +1 -1
- package/build/queries/unnest.d.cts +2 -3
- package/build/queries/unnest.d.cts.map +1 -1
- package/build/queries/unnest.d.mts +2 -3
- package/build/queries/unnest.d.mts.map +1 -1
- package/build/queries/valueFilters.d.cts +5 -6
- package/build/queries/valueFilters.d.cts.map +1 -1
- package/build/queries/valueFilters.d.mts +5 -6
- package/build/queries/valueFilters.d.mts.map +1 -1
- package/build/reactivity/ReactionsManager.cjs.map +1 -1
- package/build/reactivity/ReactionsManager.d.cts +2 -3
- package/build/reactivity/ReactionsManager.d.cts.map +1 -1
- package/build/reactivity/ReactionsManager.d.mts +2 -3
- package/build/reactivity/ReactionsManager.d.mts.map +1 -1
- package/build/reactivity/ReactionsManager.js.map +1 -1
- package/build/reactivity/reactiveHints.d.cts +18 -18
- package/build/reactivity/reactiveHints.d.cts.map +1 -1
- package/build/reactivity/reactiveHints.d.mts +18 -18
- package/build/reactivity/reactiveHints.d.mts.map +1 -1
- package/build/relations/AbstractPropertyImpl.cjs.map +1 -1
- package/build/relations/AbstractPropertyImpl.d.cts +1 -2
- package/build/relations/AbstractPropertyImpl.d.cts.map +1 -1
- package/build/relations/AbstractPropertyImpl.d.mts +1 -2
- package/build/relations/AbstractPropertyImpl.d.mts.map +1 -1
- package/build/relations/AbstractPropertyImpl.js.map +1 -1
- package/build/relations/AbstractRelationImpl.d.cts +1 -2
- package/build/relations/AbstractRelationImpl.d.cts.map +1 -1
- package/build/relations/AbstractRelationImpl.d.mts +1 -2
- package/build/relations/AbstractRelationImpl.d.mts.map +1 -1
- package/build/relations/AsyncProperty.cjs.map +1 -1
- package/build/relations/AsyncProperty.d.cts +5 -6
- package/build/relations/AsyncProperty.d.cts.map +1 -1
- package/build/relations/AsyncProperty.d.mts +5 -6
- package/build/relations/AsyncProperty.d.mts.map +1 -1
- package/build/relations/AsyncProperty.js.map +1 -1
- package/build/relations/AsyncReactiveField.cjs.map +1 -1
- package/build/relations/AsyncReactiveField.d.cts +4 -5
- package/build/relations/AsyncReactiveField.d.cts.map +1 -1
- package/build/relations/AsyncReactiveField.d.mts +4 -5
- package/build/relations/AsyncReactiveField.d.mts.map +1 -1
- package/build/relations/AsyncReactiveField.js.map +1 -1
- package/build/relations/Collection.d.cts +4 -5
- package/build/relations/Collection.d.cts.map +1 -1
- package/build/relations/Collection.d.mts +4 -5
- package/build/relations/Collection.d.mts.map +1 -1
- package/build/relations/CustomCollection.cjs.map +1 -1
- package/build/relations/CustomCollection.d.cts +3 -4
- package/build/relations/CustomCollection.d.cts.map +1 -1
- package/build/relations/CustomCollection.d.mts +3 -4
- package/build/relations/CustomCollection.d.mts.map +1 -1
- package/build/relations/CustomCollection.js.map +1 -1
- package/build/relations/CustomReference.cjs.map +1 -1
- package/build/relations/CustomReference.d.cts +3 -4
- package/build/relations/CustomReference.d.cts.map +1 -1
- package/build/relations/CustomReference.d.mts +3 -4
- package/build/relations/CustomReference.d.mts.map +1 -1
- package/build/relations/CustomReference.js.map +1 -1
- package/build/relations/EnumCollection.cjs.map +1 -1
- package/build/relations/EnumCollection.d.cts +5 -5
- package/build/relations/EnumCollection.d.cts.map +1 -1
- package/build/relations/EnumCollection.d.mts +5 -5
- package/build/relations/EnumCollection.d.mts.map +1 -1
- package/build/relations/EnumCollection.js.map +1 -1
- package/build/relations/LargeCollection.d.cts +1 -2
- package/build/relations/LargeCollection.d.cts.map +1 -1
- package/build/relations/LargeCollection.d.mts +1 -2
- package/build/relations/LargeCollection.d.mts.map +1 -1
- package/build/relations/LazyField.cjs.map +1 -1
- package/build/relations/LazyField.d.cts +7 -8
- package/build/relations/LazyField.d.cts.map +1 -1
- package/build/relations/LazyField.d.mts +7 -8
- package/build/relations/LazyField.d.mts.map +1 -1
- package/build/relations/LazyField.js.map +1 -1
- package/build/relations/ManyToManyCollection.cjs.map +1 -1
- package/build/relations/ManyToManyCollection.d.cts +2 -3
- package/build/relations/ManyToManyCollection.d.cts.map +1 -1
- package/build/relations/ManyToManyCollection.d.mts +2 -3
- package/build/relations/ManyToManyCollection.d.mts.map +1 -1
- package/build/relations/ManyToManyCollection.js.map +1 -1
- package/build/relations/ManyToManyLargeCollection.d.cts +2 -3
- package/build/relations/ManyToManyLargeCollection.d.cts.map +1 -1
- package/build/relations/ManyToManyLargeCollection.d.mts +2 -3
- package/build/relations/ManyToManyLargeCollection.d.mts.map +1 -1
- package/build/relations/ManyToOneReference.cjs.map +1 -1
- package/build/relations/ManyToOneReference.d.cts +6 -7
- package/build/relations/ManyToOneReference.d.cts.map +1 -1
- package/build/relations/ManyToOneReference.d.mts +6 -7
- package/build/relations/ManyToOneReference.d.mts.map +1 -1
- package/build/relations/ManyToOneReference.js.map +1 -1
- package/build/relations/OneToManyCollection.cjs.map +1 -1
- package/build/relations/OneToManyCollection.d.cts +2 -3
- package/build/relations/OneToManyCollection.d.cts.map +1 -1
- package/build/relations/OneToManyCollection.d.mts +2 -3
- package/build/relations/OneToManyCollection.d.mts.map +1 -1
- package/build/relations/OneToManyCollection.js.map +1 -1
- package/build/relations/OneToManyLargeCollection.cjs.map +1 -1
- package/build/relations/OneToManyLargeCollection.d.cts +2 -3
- package/build/relations/OneToManyLargeCollection.d.cts.map +1 -1
- package/build/relations/OneToManyLargeCollection.d.mts +2 -3
- package/build/relations/OneToManyLargeCollection.d.mts.map +1 -1
- package/build/relations/OneToManyLargeCollection.js.map +1 -1
- package/build/relations/OneToOneReference.cjs.map +1 -1
- package/build/relations/OneToOneReference.d.cts +7 -7
- package/build/relations/OneToOneReference.d.cts.map +1 -1
- package/build/relations/OneToOneReference.d.mts +7 -7
- package/build/relations/OneToOneReference.d.mts.map +1 -1
- package/build/relations/OneToOneReference.js.map +1 -1
- package/build/relations/PolymorphicReference.cjs.map +1 -1
- package/build/relations/PolymorphicReference.d.cts +4 -5
- package/build/relations/PolymorphicReference.d.cts.map +1 -1
- package/build/relations/PolymorphicReference.d.mts +4 -5
- package/build/relations/PolymorphicReference.d.mts.map +1 -1
- package/build/relations/PolymorphicReference.js.map +1 -1
- package/build/relations/PropertySymbols.d.cts +1 -2
- package/build/relations/PropertySymbols.d.cts.map +1 -1
- package/build/relations/PropertySymbols.d.mts +1 -2
- package/build/relations/PropertySymbols.d.mts.map +1 -1
- package/build/relations/ReactiveField.cjs.map +1 -1
- package/build/relations/ReactiveField.d.cts +4 -5
- package/build/relations/ReactiveField.d.cts.map +1 -1
- package/build/relations/ReactiveField.d.mts +4 -5
- package/build/relations/ReactiveField.d.mts.map +1 -1
- package/build/relations/ReactiveField.js.map +1 -1
- package/build/relations/ReactiveGetter.cjs.map +1 -1
- package/build/relations/ReactiveGetter.d.cts +4 -5
- package/build/relations/ReactiveGetter.d.cts.map +1 -1
- package/build/relations/ReactiveGetter.d.mts +4 -5
- package/build/relations/ReactiveGetter.d.mts.map +1 -1
- package/build/relations/ReactiveGetter.js.map +1 -1
- package/build/relations/ReactiveManyToMany.cjs.map +1 -1
- package/build/relations/ReactiveManyToMany.d.cts +4 -5
- package/build/relations/ReactiveManyToMany.d.cts.map +1 -1
- package/build/relations/ReactiveManyToMany.d.mts +4 -5
- package/build/relations/ReactiveManyToMany.d.mts.map +1 -1
- package/build/relations/ReactiveManyToMany.js.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.cjs.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.d.cts +4 -5
- package/build/relations/ReactiveManyToManyOtherSide.d.cts.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.d.mts +4 -5
- package/build/relations/ReactiveManyToManyOtherSide.d.mts.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.js.map +1 -1
- package/build/relations/ReactiveReference.cjs.map +1 -1
- package/build/relations/ReactiveReference.d.cts +5 -6
- package/build/relations/ReactiveReference.d.cts.map +1 -1
- package/build/relations/ReactiveReference.d.mts +5 -6
- package/build/relations/ReactiveReference.d.mts.map +1 -1
- package/build/relations/ReactiveReference.js.map +1 -1
- package/build/relations/ReadOnlyCollection.d.cts +4 -5
- package/build/relations/ReadOnlyCollection.d.cts.map +1 -1
- package/build/relations/ReadOnlyCollection.d.mts +4 -5
- package/build/relations/ReadOnlyCollection.d.mts.map +1 -1
- package/build/relations/RecursiveCollection.cjs.map +1 -1
- package/build/relations/RecursiveCollection.d.cts +10 -10
- package/build/relations/RecursiveCollection.d.cts.map +1 -1
- package/build/relations/RecursiveCollection.d.mts +10 -10
- package/build/relations/RecursiveCollection.d.mts.map +1 -1
- package/build/relations/RecursiveCollection.js.map +1 -1
- package/build/relations/RecursiveCycleError.d.cts +2 -2
- package/build/relations/RecursiveCycleError.d.cts.map +1 -1
- package/build/relations/RecursiveCycleError.d.mts +2 -2
- package/build/relations/RecursiveCycleError.d.mts.map +1 -1
- package/build/relations/Reference.d.cts +5 -5
- package/build/relations/Reference.d.cts.map +1 -1
- package/build/relations/Reference.d.mts +5 -5
- package/build/relations/Reference.d.mts.map +1 -1
- package/build/relations/ReferenceSymbols.d.cts +1 -2
- package/build/relations/ReferenceSymbols.d.cts.map +1 -1
- package/build/relations/ReferenceSymbols.d.mts +1 -2
- package/build/relations/ReferenceSymbols.d.mts.map +1 -1
- package/build/relations/Relation.d.cts +3 -3
- package/build/relations/Relation.d.cts.map +1 -1
- package/build/relations/Relation.d.mts +3 -3
- package/build/relations/Relation.d.mts.map +1 -1
- package/build/relations/RelationSymbols.d.cts +2 -3
- package/build/relations/RelationSymbols.d.cts.map +1 -1
- package/build/relations/RelationSymbols.d.mts +2 -3
- package/build/relations/RelationSymbols.d.mts.map +1 -1
- package/build/relations/hasAsyncMethod.cjs.map +1 -1
- package/build/relations/hasAsyncMethod.d.cts +6 -6
- package/build/relations/hasAsyncMethod.d.cts.map +1 -1
- package/build/relations/hasAsyncMethod.d.mts +6 -6
- package/build/relations/hasAsyncMethod.d.mts.map +1 -1
- package/build/relations/hasAsyncMethod.js.map +1 -1
- package/build/relations/hasManyDerived.d.cts +2 -2
- package/build/relations/hasManyDerived.d.cts.map +1 -1
- package/build/relations/hasManyDerived.d.mts +2 -2
- package/build/relations/hasManyDerived.d.mts.map +1 -1
- package/build/relations/hasManyThrough.d.cts +1 -2
- package/build/relations/hasManyThrough.d.cts.map +1 -1
- package/build/relations/hasManyThrough.d.mts +1 -2
- package/build/relations/hasManyThrough.d.mts.map +1 -1
- package/build/relations/hasOneDerived.d.cts +1 -2
- package/build/relations/hasOneDerived.d.cts.map +1 -1
- package/build/relations/hasOneDerived.d.mts +1 -2
- package/build/relations/hasOneDerived.d.mts.map +1 -1
- package/build/relations/hasOneThrough.d.cts +1 -2
- package/build/relations/hasOneThrough.d.cts.map +1 -1
- package/build/relations/hasOneThrough.d.mts +1 -2
- package/build/relations/hasOneThrough.d.mts.map +1 -1
- package/build/relations/hasProperty.cjs.map +1 -1
- package/build/relations/hasProperty.d.cts +8 -8
- package/build/relations/hasProperty.d.cts.map +1 -1
- package/build/relations/hasProperty.d.mts +8 -8
- package/build/relations/hasProperty.d.mts.map +1 -1
- package/build/relations/hasProperty.js.map +1 -1
- package/build/relations/isCascadeDelete.d.cts +1 -2
- package/build/relations/isCascadeDelete.d.cts.map +1 -1
- package/build/relations/isCascadeDelete.d.mts +1 -2
- package/build/relations/isCascadeDelete.d.mts.map +1 -1
- package/build/resurrection.d.cts +3 -4
- package/build/resurrection.d.cts.map +1 -1
- package/build/resurrection.d.mts +3 -4
- package/build/resurrection.d.mts.map +1 -1
- package/build/rules.d.cts +20 -20
- package/build/rules.d.cts.map +1 -1
- package/build/rules.d.mts +20 -20
- package/build/rules.d.mts.map +1 -1
- package/build/runtimeConfig.d.cts +4 -5
- package/build/runtimeConfig.d.cts.map +1 -1
- package/build/runtimeConfig.d.mts +4 -5
- package/build/runtimeConfig.d.mts.map +1 -1
- package/build/serde/TypeInfo.d.cts +3 -4
- package/build/serde/TypeInfo.d.cts.map +1 -1
- package/build/serde/TypeInfo.d.mts +3 -4
- package/build/serde/TypeInfo.d.mts.map +1 -1
- package/build/serde/columns.d.cts +2 -3
- package/build/serde/columns.d.cts.map +1 -1
- package/build/serde/columns.d.mts +2 -3
- package/build/serde/columns.d.mts.map +1 -1
- package/build/serde/fieldSerde.d.cts +9 -9
- package/build/serde/fieldSerde.d.cts.map +1 -1
- package/build/serde/fieldSerde.d.mts +9 -9
- package/build/serde/fieldSerde.d.mts.map +1 -1
- package/build/serde/serde.d.cts +18 -19
- package/build/serde/serde.d.cts.map +1 -1
- package/build/serde/serde.d.mts +18 -19
- package/build/serde/serde.d.mts.map +1 -1
- package/build/serde/temporal.d.cts +5 -5
- package/build/serde/temporal.d.cts.map +1 -1
- package/build/serde/temporal.d.mts +5 -5
- package/build/serde/temporal.d.mts.map +1 -1
- package/build/serde/temporalMappers.d.cts +4 -5
- package/build/serde/temporalMappers.d.cts.map +1 -1
- package/build/serde/temporalMappers.d.mts +4 -5
- package/build/serde/temporalMappers.d.mts.map +1 -1
- package/build/transitions.d.cts +17 -18
- package/build/transitions.d.cts.map +1 -1
- package/build/transitions.d.mts +17 -18
- package/build/transitions.d.mts.map +1 -1
- package/build/trusted.d.cts +2 -3
- package/build/trusted.d.cts.map +1 -1
- package/build/trusted.d.mts +2 -3
- package/build/trusted.d.mts.map +1 -1
- package/build/typeMap.d.cts +17 -17
- package/build/typeMap.d.cts.map +1 -1
- package/build/typeMap.d.mts +17 -17
- package/build/typeMap.d.mts.map +1 -1
- package/build/upsert.d.cts +4 -4
- package/build/upsert.d.cts.map +1 -1
- package/build/upsert.d.mts +4 -4
- package/build/upsert.d.mts.map +1 -1
- package/build/utils.d.cts +27 -28
- package/build/utils.d.cts.map +1 -1
- package/build/utils.d.mts +27 -28
- package/build/utils.d.mts.map +1 -1
- package/package.json +4 -4
package/build/transitions.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ import { Entity } from "./Entity.mjs";
|
|
|
8
8
|
*
|
|
9
9
|
* Omitting `from` or `to` matches any state. Guards never run on creation.
|
|
10
10
|
*/
|
|
11
|
-
interface GuardTransitionMatch<V> {
|
|
11
|
+
export interface GuardTransitionMatch<V> {
|
|
12
12
|
from?: V | readonly V[];
|
|
13
13
|
to?: V | readonly V[];
|
|
14
14
|
}
|
|
@@ -17,7 +17,7 @@ interface GuardTransitionMatch<V> {
|
|
|
17
17
|
*
|
|
18
18
|
* Creating an entity with a matching `to` state also matches, unless `from` is set or `onCreate` is `false`.
|
|
19
19
|
*/
|
|
20
|
-
interface OnTransitionMatch<V> extends GuardTransitionMatch<V> {
|
|
20
|
+
export interface OnTransitionMatch<V> extends GuardTransitionMatch<V> {
|
|
21
21
|
/**
|
|
22
22
|
* Whether `addTransitionReaction` fires when an entity is created with a matching `to` state, defaults to `true`.
|
|
23
23
|
*
|
|
@@ -29,44 +29,44 @@ interface OnTransitionMatch<V> extends GuardTransitionMatch<V> {
|
|
|
29
29
|
phase?: "flush" | "commit";
|
|
30
30
|
}
|
|
31
31
|
/** Maps each state to the states it may transition to, i.e. `{ Draft: ["Open"], Open: ["Closed"] }`. */
|
|
32
|
-
type TransitionTable<V extends PropertyKey> = Partial<Record<V, readonly V[]>>;
|
|
32
|
+
export type TransitionTable<V extends PropertyKey> = Partial<Record<V, readonly V[]>>;
|
|
33
33
|
/**
|
|
34
34
|
* The transition a guard or reaction is handling, i.e. `{ from: "DRAFT", to: "OPEN" }`.
|
|
35
35
|
*
|
|
36
36
|
* Guards and callbacks run during reaction passes, after the assignment, so the entity may already be in a
|
|
37
37
|
* later state. This tells them which transition they're handling. `from` is `undefined` for creation.
|
|
38
38
|
*/
|
|
39
|
-
interface Transition<V> {
|
|
39
|
+
export interface Transition<V> {
|
|
40
40
|
from: V | undefined;
|
|
41
41
|
to: V;
|
|
42
42
|
}
|
|
43
43
|
/** The "from" state of a just-created entity, because `undefined` can be a real field value. */
|
|
44
|
-
declare const created: unique symbol;
|
|
44
|
+
export declare const created: unique symbol;
|
|
45
45
|
/** A single recorded transition of a field, with `from` as `created` for creation. */
|
|
46
|
-
interface TransitionStep {
|
|
46
|
+
export interface TransitionStep {
|
|
47
47
|
from: unknown;
|
|
48
48
|
to: unknown;
|
|
49
49
|
}
|
|
50
50
|
/** An `addTransitionRule` as registered in config, with its `match` still using accessors. */
|
|
51
|
-
interface TransitionGuardConfig<T extends Entity = Entity> {
|
|
51
|
+
export interface TransitionGuardConfig<T extends Entity = Entity> {
|
|
52
52
|
match: GuardTransitionMatch<string>;
|
|
53
53
|
run(entity: T, step: TransitionStep): MaybePromise<ValidationRuleResult>;
|
|
54
54
|
}
|
|
55
55
|
/** An `addTransitionReaction` as registered in config, with its `match` still using accessors. */
|
|
56
|
-
interface TransitionCallbackConfig<T extends Entity = Entity, C = unknown> {
|
|
56
|
+
export interface TransitionCallbackConfig<T extends Entity = Entity, C = unknown> {
|
|
57
57
|
name: string;
|
|
58
58
|
match: OnTransitionMatch<string>;
|
|
59
59
|
run(entity: T, ctx: C, step: TransitionStep): MaybePromise<unknown>;
|
|
60
60
|
}
|
|
61
61
|
/** One field's `setTransitions`, `addTransitionRule`, and `addTransitionReaction` config on a single entity type. */
|
|
62
|
-
interface FieldTransitionsConfig<T extends Entity = Entity, C = unknown> {
|
|
62
|
+
export interface FieldTransitionsConfig<T extends Entity = Entity, C = unknown> {
|
|
63
63
|
/** The `transitions` table, if any; subtypes add their own tables on their own configs. */
|
|
64
64
|
table?: TransitionTable<string>;
|
|
65
65
|
guards: TransitionGuardConfig<T>[];
|
|
66
66
|
callbacks: TransitionCallbackConfig<T, C>[];
|
|
67
67
|
}
|
|
68
68
|
/** A `match` with accessors converted to codes, so it can be compared to recorded steps. */
|
|
69
|
-
interface TransitionMatcher {
|
|
69
|
+
export interface TransitionMatcher {
|
|
70
70
|
/** The allowed previous states, or `undefined` for any state. */
|
|
71
71
|
from: readonly unknown[] | undefined;
|
|
72
72
|
/** The allowed new states, or `undefined` for any state. */
|
|
@@ -75,36 +75,35 @@ interface TransitionMatcher {
|
|
|
75
75
|
onCreate: boolean;
|
|
76
76
|
}
|
|
77
77
|
/** A guard with its `match` converted to codes. */
|
|
78
|
-
interface TransitionGuard {
|
|
78
|
+
export interface TransitionGuard {
|
|
79
79
|
matcher: TransitionMatcher;
|
|
80
80
|
run(entity: Entity, step: TransitionStep): MaybePromise<ValidationRuleResult>;
|
|
81
81
|
}
|
|
82
82
|
/** A callback with its `match` converted to codes, dispatched only after its transition's guards pass. */
|
|
83
|
-
interface TransitionCallback {
|
|
83
|
+
export interface TransitionCallback {
|
|
84
84
|
name: string;
|
|
85
85
|
phase: "flush" | "commit";
|
|
86
86
|
matcher: TransitionMatcher;
|
|
87
87
|
run(entity: Entity, ctx: unknown, step: TransitionStep): MaybePromise<unknown>;
|
|
88
88
|
}
|
|
89
89
|
/** One field's transition config from an entity type and its base types, with accessors converted to codes. */
|
|
90
|
-
interface FieldTransitions {
|
|
90
|
+
export interface FieldTransitions {
|
|
91
91
|
/** Each table maps a `from` code to its allowed `to` codes; every table must allow a change. */
|
|
92
92
|
tables: ReadonlyMap<unknown, readonly unknown[]>[];
|
|
93
93
|
guards: TransitionGuard[];
|
|
94
94
|
callbacks: TransitionCallback[];
|
|
95
95
|
}
|
|
96
96
|
/** Converts an internal step to the `Transition` that guards and reactions receive. */
|
|
97
|
-
declare function toTransition(step: TransitionStep): Transition<any>;
|
|
97
|
+
export declare function toTransition(step: TransitionStep): Transition<any>;
|
|
98
98
|
/**
|
|
99
99
|
* Merges the transition config of `meta` and its base types by field, converting accessors to codes.
|
|
100
100
|
*
|
|
101
101
|
* This runs after boot, because the config is written before the enum metadata exists.
|
|
102
102
|
*/
|
|
103
|
-
declare function buildFieldTransitions(meta: EntityMetadata): Map<string, FieldTransitions>;
|
|
103
|
+
export declare function buildFieldTransitions(meta: EntityMetadata): Map<string, FieldTransitions>;
|
|
104
104
|
/** Returns whether `step` matches `matcher`'s `from`, `to`, and `onCreate` settings. */
|
|
105
|
-
declare function matchesTransition(matcher: TransitionMatcher, step: TransitionStep): boolean;
|
|
105
|
+
export declare function matchesTransition(matcher: TransitionMatcher, step: TransitionStep): boolean;
|
|
106
106
|
/** Uses the enum's display name in error messages when there is one, i.e. `Approved` instead of `APPROVED`. */
|
|
107
|
-
declare function describeValue(meta: EntityMetadata, fieldName: string, value: unknown): string;
|
|
107
|
+
export declare function describeValue(meta: EntityMetadata, fieldName: string, value: unknown): string;
|
|
108
108
|
//#endregion
|
|
109
|
-
export { FieldTransitions, FieldTransitionsConfig, GuardTransitionMatch, OnTransitionMatch, Transition, TransitionCallback, TransitionCallbackConfig, TransitionGuard, TransitionGuardConfig, TransitionMatcher, TransitionStep, TransitionTable, buildFieldTransitions, created, describeValue, matchesTransition, toTransition };
|
|
110
109
|
//# sourceMappingURL=transitions.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transitions.d.mts","names":[],"sources":["../src/transitions.ts"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"transitions.d.mts","names":[],"sources":["../src/transitions.ts"],"mappings":";;;;;;;;;;iBAUiB,qBAAqB;EACpC,OAAO,aAAa;EACpB,KAAK,aAAa;;;;;;;iBAQH,kBAAkB,WAAW,qBAAqB;;;;;;;EAOjE;;EAEA;;;YAIU,gBAAgB,UAAU,eAAe,QAAQ,OAAO,YAAY;;;;;;;iBAQ/D,WAAW;EAC1B,MAAM;EACN,IAAI;;;qBAIO;;iBAGI;EACf;EACA;;;iBAIe,sBAAsB,UAAU,SAAS;EACxD,OAAO;EACP,IAAI,QAAQ,GAAG,MAAM,iBAAiB,aAAa;;;iBAIpC,yBAAyB,UAAU,SAAS,QAAQ;EACnE;EACA,OAAO;EACP,IAAI,QAAQ,GAAG,KAAK,GAAG,MAAM,iBAAiB;;;iBAI/B,uBAAuB,UAAU,SAAS,QAAQ;;EAEjE,QAAQ;EACR,QAAQ,sBAAsB;EAC9B,WAAW,yBAAyB,GAAG;;;iBAIxB;;EAEf;;EAEA;;EAEA;;;iBAIe;EACf,SAAS;EACT,IAAI,QAAQ,QAAQ,MAAM,iBAAiB,aAAa;;;iBAIzC;EACf;EACA;EACA,SAAS;EACT,IAAI,QAAQ,QAAQ,cAAc,MAAM,iBAAiB;;;iBAI1C;;EAEf,QAAQ;EACR,QAAQ;EACR,WAAW;;;wBAIG,aAAa,MAAM,iBAAiB;;;;;;wBASpC,sBAAsB,MAAM,iBAAiB,YAAY;;wBAoBzD,kBAAkB,SAAS,mBAAmB,MAAM;;wBAUpD,cAAc,MAAM,gBAAgB,mBAAmB"}
|
package/build/trusted.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
//#region src/trusted.d.ts
|
|
2
2
|
/** Returns true if we're inside a trusted context, i.e. hooks, reactions, validations, or defaults. */
|
|
3
|
-
declare function isInTrustedContext(): boolean;
|
|
3
|
+
export declare function isInTrustedContext(): boolean;
|
|
4
4
|
/** Runs the given function within a trusted context. */
|
|
5
|
-
declare function runInTrustedContext<T>(fn: () => T): T;
|
|
5
|
+
export declare function runInTrustedContext<T>(fn: () => T): T;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { isInTrustedContext, runInTrustedContext };
|
|
8
7
|
//# sourceMappingURL=trusted.d.cts.map
|
package/build/trusted.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trusted.d.cts","names":[],"sources":["../src/trusted.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"trusted.d.cts","names":[],"sources":["../src/trusted.ts"],"mappings":";;wBAKgB;;wBAKA,oBAAoB,GAAG,UAAU,IAAI"}
|
package/build/trusted.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
//#region src/trusted.d.ts
|
|
2
2
|
/** Returns true if we're inside a trusted context, i.e. hooks, reactions, validations, or defaults. */
|
|
3
|
-
declare function isInTrustedContext(): boolean;
|
|
3
|
+
export declare function isInTrustedContext(): boolean;
|
|
4
4
|
/** Runs the given function within a trusted context. */
|
|
5
|
-
declare function runInTrustedContext<T>(fn: () => T): T;
|
|
5
|
+
export declare function runInTrustedContext<T>(fn: () => T): T;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { isInTrustedContext, runInTrustedContext };
|
|
8
7
|
//# sourceMappingURL=trusted.d.mts.map
|
package/build/trusted.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trusted.d.mts","names":[],"sources":["../src/trusted.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"trusted.d.mts","names":[],"sources":["../src/trusted.ts"],"mappings":";;wBAKgB;;wBAKA,oBAAoB,GAAG,UAAU,IAAI"}
|
package/build/typeMap.d.cts
CHANGED
|
@@ -18,7 +18,7 @@ import { Entity } from "./Entity.cjs";
|
|
|
18
18
|
*
|
|
19
19
|
* Inspired by Tanstack Router, which uses a similar `declare module` approach.
|
|
20
20
|
*/
|
|
21
|
-
interface TypeMap {}
|
|
21
|
+
export interface TypeMap {}
|
|
22
22
|
/**
|
|
23
23
|
* Returns a key like `"Author"` or `"SmallPublisher"` for looking up types in the `TypeMap`.
|
|
24
24
|
*
|
|
@@ -35,7 +35,7 @@ type TypeMapKey<T> = T extends {
|
|
|
35
35
|
};
|
|
36
36
|
} ? K : never;
|
|
37
37
|
/** The literal type name of an entity, i.e. `"Author"` or `"SmallPublisher"`. */
|
|
38
|
-
type TypeNameOf<T> = TypeMapKey<T>;
|
|
38
|
+
export type TypeNameOf<T> = TypeMapKey<T>;
|
|
39
39
|
/**
|
|
40
40
|
* The literal type name of an entity's root type, i.e. `"Publisher"` for both `Publisher` and
|
|
41
41
|
* `SmallPublisher`.
|
|
@@ -48,41 +48,41 @@ type TypeNameOf<T> = TypeMapKey<T>;
|
|
|
48
48
|
* untracked key `string`, not `never`: `never` means "source-less" and also broke the comparability of
|
|
49
49
|
* `Alias<T>` with `Alias<Entity>`.
|
|
50
50
|
*/
|
|
51
|
-
type RootTypeNameOf<T> = T extends {
|
|
51
|
+
export type RootTypeNameOf<T> = T extends {
|
|
52
52
|
__type: {
|
|
53
53
|
0: infer K extends string;
|
|
54
54
|
};
|
|
55
55
|
} ? K : string;
|
|
56
56
|
/** A helper type to look up `U` in the `TypeMap` for a given entity type `T`. */
|
|
57
|
-
type TypeMapEntry<T, U extends string> = TypeMapKey<T> extends (infer K) ? K extends keyof TypeMap ? U extends keyof TypeMap[K] ? TypeMap[K][U] : unknown : unknown : unknown;
|
|
57
|
+
export type TypeMapEntry<T, U extends string> = TypeMapKey<T> extends (infer K) ? K extends keyof TypeMap ? U extends keyof TypeMap[K] ? TypeMap[K][U] : unknown : unknown : unknown;
|
|
58
58
|
/** Return the `FooOpts` type for the given `Foo` entity. */
|
|
59
|
-
type OptsOf<T> = TypeMapEntry<T, "optsType">;
|
|
59
|
+
export type OptsOf<T> = TypeMapEntry<T, "optsType">;
|
|
60
60
|
/** Return the `FooFields` type for the given `Foo` entity. */
|
|
61
|
-
type FieldsOf<T> = TypeMapEntry<T, "fieldsType">;
|
|
61
|
+
export type FieldsOf<T> = TypeMapEntry<T, "fieldsType">;
|
|
62
62
|
/** Return the physical `FooColumns` type for the given `Foo` entity. */
|
|
63
|
-
type ColumnsOf<T> = TypeMapEntry<T, "columnsType">;
|
|
63
|
+
export type ColumnsOf<T> = TypeMapEntry<T, "columnsType">;
|
|
64
64
|
/** Returns the inheritance strategy, or never for non-inherited entities. */
|
|
65
|
-
type InheritanceTypeOf<T> = TypeMapEntry<T, "inheritanceType">;
|
|
66
|
-
type OptIdsOf<T> = TypeMapEntry<T, "optIdsType">;
|
|
65
|
+
export type InheritanceTypeOf<T> = TypeMapEntry<T, "inheritanceType">;
|
|
66
|
+
export type OptIdsOf<T> = TypeMapEntry<T, "optIdsType">;
|
|
67
67
|
/** Pulls the entity query type out of a given entity type T. */
|
|
68
|
-
type FilterOf<T> = TypeMapEntry<T, "filterType">;
|
|
68
|
+
export type FilterOf<T> = TypeMapEntry<T, "filterType">;
|
|
69
69
|
/** Pulls the entity GraphQL query type out of a given entity type T. */
|
|
70
|
-
type GraphQLFilterOf<T> = TypeMapEntry<T, "gqlFilterType">;
|
|
70
|
+
export type GraphQLFilterOf<T> = TypeMapEntry<T, "gqlFilterType">;
|
|
71
71
|
/** Pulls the entity order type out of a given entity type T. */
|
|
72
|
-
type OrderOf<T> = TypeMapEntry<T, "orderType">;
|
|
72
|
+
export type OrderOf<T> = TypeMapEntry<T, "orderType">;
|
|
73
73
|
/** Returns the factory "extras" type, like `withDerivedField`. */
|
|
74
|
-
type FactoryExtrasOf<T> = TypeMapEntry<T, "factoryExtrasType">;
|
|
74
|
+
export type FactoryExtrasOf<T> = TypeMapEntry<T, "factoryExtrasType">;
|
|
75
75
|
/**
|
|
76
76
|
* Returns the opts of the entity's `newEntity` factory method, as exists in the actual file.
|
|
77
77
|
*
|
|
78
78
|
* This is because `FactoryOpts` is a set of defaults, but the user can customize it if they want.
|
|
79
79
|
*/
|
|
80
|
-
type ActualFactoryOpts<T> = TypeMapEntry<T, "factoryOptsType">;
|
|
80
|
+
export type ActualFactoryOpts<T> = TypeMapEntry<T, "factoryOptsType">;
|
|
81
81
|
/** Return the `Foo` type for a given `Foo` entity constructor. */
|
|
82
|
-
type EntityOf<C> = C extends (new (em: EntityManager, opts: any) => infer T) ? T : never;
|
|
82
|
+
export type EntityOf<C> = C extends (new (em: EntityManager, opts: any) => infer T) ? T : never;
|
|
83
83
|
type RelationsKeysOf<T> = { [K in keyof OptsOf<T>]: OptsOf<T>[K] extends Entity[] | undefined ? K : never; }[keyof OptsOf<T>];
|
|
84
84
|
/** Return the Relation keys from `FooOpt` type, given a `Foo` entity */
|
|
85
|
-
type RelationsOf<T extends Entity> = { [K in RelationsKeysOf<T>]: NonNullable<OptsOf<T>[K]>; };
|
|
85
|
+
export type RelationsOf<T extends Entity> = { [K in RelationsKeysOf<T>]: NonNullable<OptsOf<T>[K]>; };
|
|
86
86
|
//#endregion
|
|
87
|
-
export {
|
|
87
|
+
export {};
|
|
88
88
|
//# sourceMappingURL=typeMap.d.cts.map
|
package/build/typeMap.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeMap.d.cts","names":[],"sources":["../src/typeMap.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"typeMap.d.cts","names":[],"sources":["../src/typeMap.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;iBAoBiB;;;;;;;KAQZ,WAAW,KAAK;EAAY;IAAU,SAAS;;IAAQ,IAAI;EAAY;IAAU,SAAS;;IAAQ;;YAG3F,WAAW,KAAK,WAAW;;;;;;;;;;;;;YAc3B,eAAe,KAAK;EAAY;IAAU,SAAS;;IAAuB;;YAG1E,aAAa,GAAG,oBAC1B,WAAW,kBAAiB,KACxB,gBAAgB,UACd,gBAAgB,QAAQ,KACtB,QAAQ,GAAG;;YAMT,OAAO,KAAK,aAAa;;YAGzB,SAAS,KAAK,aAAa;;YAG3B,UAAU,KAAK,aAAa;;YAG5B,kBAAkB,KAAK,aAAa;YAEpC,SAAS,KAAK,aAAa;;YAG3B,SAAS,KAAK,aAAa;;YAG3B,gBAAgB,KAAK,aAAa;;YAGlC,QAAQ,KAAK,aAAa;;YAG1B,gBAAgB,KAAK,aAAa;;;;;;YAOlC,kBAAkB,KAAK,aAAa;;YAGpC,SAAS,KAAK,gBAAe,IAAI,eAAe,oBAAoB,KAAI;KAE/E,gBAAgB,QAClB,WAAW,OAAO,KAAK,OAAO,GAAG,WAAW,uBAAuB,mBAC9D,OAAO;;YAGH,YAAY,UAAU,aAC/B,KAAK,gBAAgB,KAAK,YAAY,OAAO,GAAG"}
|
package/build/typeMap.d.mts
CHANGED
|
@@ -18,7 +18,7 @@ import { Entity } from "./Entity.mjs";
|
|
|
18
18
|
*
|
|
19
19
|
* Inspired by Tanstack Router, which uses a similar `declare module` approach.
|
|
20
20
|
*/
|
|
21
|
-
interface TypeMap {}
|
|
21
|
+
export interface TypeMap {}
|
|
22
22
|
/**
|
|
23
23
|
* Returns a key like `"Author"` or `"SmallPublisher"` for looking up types in the `TypeMap`.
|
|
24
24
|
*
|
|
@@ -35,7 +35,7 @@ type TypeMapKey<T> = T extends {
|
|
|
35
35
|
};
|
|
36
36
|
} ? K : never;
|
|
37
37
|
/** The literal type name of an entity, i.e. `"Author"` or `"SmallPublisher"`. */
|
|
38
|
-
type TypeNameOf<T> = TypeMapKey<T>;
|
|
38
|
+
export type TypeNameOf<T> = TypeMapKey<T>;
|
|
39
39
|
/**
|
|
40
40
|
* The literal type name of an entity's root type, i.e. `"Publisher"` for both `Publisher` and
|
|
41
41
|
* `SmallPublisher`.
|
|
@@ -48,41 +48,41 @@ type TypeNameOf<T> = TypeMapKey<T>;
|
|
|
48
48
|
* untracked key `string`, not `never`: `never` means "source-less" and also broke the comparability of
|
|
49
49
|
* `Alias<T>` with `Alias<Entity>`.
|
|
50
50
|
*/
|
|
51
|
-
type RootTypeNameOf<T> = T extends {
|
|
51
|
+
export type RootTypeNameOf<T> = T extends {
|
|
52
52
|
__type: {
|
|
53
53
|
0: infer K extends string;
|
|
54
54
|
};
|
|
55
55
|
} ? K : string;
|
|
56
56
|
/** A helper type to look up `U` in the `TypeMap` for a given entity type `T`. */
|
|
57
|
-
type TypeMapEntry<T, U extends string> = TypeMapKey<T> extends (infer K) ? K extends keyof TypeMap ? U extends keyof TypeMap[K] ? TypeMap[K][U] : unknown : unknown : unknown;
|
|
57
|
+
export type TypeMapEntry<T, U extends string> = TypeMapKey<T> extends (infer K) ? K extends keyof TypeMap ? U extends keyof TypeMap[K] ? TypeMap[K][U] : unknown : unknown : unknown;
|
|
58
58
|
/** Return the `FooOpts` type for the given `Foo` entity. */
|
|
59
|
-
type OptsOf<T> = TypeMapEntry<T, "optsType">;
|
|
59
|
+
export type OptsOf<T> = TypeMapEntry<T, "optsType">;
|
|
60
60
|
/** Return the `FooFields` type for the given `Foo` entity. */
|
|
61
|
-
type FieldsOf<T> = TypeMapEntry<T, "fieldsType">;
|
|
61
|
+
export type FieldsOf<T> = TypeMapEntry<T, "fieldsType">;
|
|
62
62
|
/** Return the physical `FooColumns` type for the given `Foo` entity. */
|
|
63
|
-
type ColumnsOf<T> = TypeMapEntry<T, "columnsType">;
|
|
63
|
+
export type ColumnsOf<T> = TypeMapEntry<T, "columnsType">;
|
|
64
64
|
/** Returns the inheritance strategy, or never for non-inherited entities. */
|
|
65
|
-
type InheritanceTypeOf<T> = TypeMapEntry<T, "inheritanceType">;
|
|
66
|
-
type OptIdsOf<T> = TypeMapEntry<T, "optIdsType">;
|
|
65
|
+
export type InheritanceTypeOf<T> = TypeMapEntry<T, "inheritanceType">;
|
|
66
|
+
export type OptIdsOf<T> = TypeMapEntry<T, "optIdsType">;
|
|
67
67
|
/** Pulls the entity query type out of a given entity type T. */
|
|
68
|
-
type FilterOf<T> = TypeMapEntry<T, "filterType">;
|
|
68
|
+
export type FilterOf<T> = TypeMapEntry<T, "filterType">;
|
|
69
69
|
/** Pulls the entity GraphQL query type out of a given entity type T. */
|
|
70
|
-
type GraphQLFilterOf<T> = TypeMapEntry<T, "gqlFilterType">;
|
|
70
|
+
export type GraphQLFilterOf<T> = TypeMapEntry<T, "gqlFilterType">;
|
|
71
71
|
/** Pulls the entity order type out of a given entity type T. */
|
|
72
|
-
type OrderOf<T> = TypeMapEntry<T, "orderType">;
|
|
72
|
+
export type OrderOf<T> = TypeMapEntry<T, "orderType">;
|
|
73
73
|
/** Returns the factory "extras" type, like `withDerivedField`. */
|
|
74
|
-
type FactoryExtrasOf<T> = TypeMapEntry<T, "factoryExtrasType">;
|
|
74
|
+
export type FactoryExtrasOf<T> = TypeMapEntry<T, "factoryExtrasType">;
|
|
75
75
|
/**
|
|
76
76
|
* Returns the opts of the entity's `newEntity` factory method, as exists in the actual file.
|
|
77
77
|
*
|
|
78
78
|
* This is because `FactoryOpts` is a set of defaults, but the user can customize it if they want.
|
|
79
79
|
*/
|
|
80
|
-
type ActualFactoryOpts<T> = TypeMapEntry<T, "factoryOptsType">;
|
|
80
|
+
export type ActualFactoryOpts<T> = TypeMapEntry<T, "factoryOptsType">;
|
|
81
81
|
/** Return the `Foo` type for a given `Foo` entity constructor. */
|
|
82
|
-
type EntityOf<C> = C extends (new (em: EntityManager, opts: any) => infer T) ? T : never;
|
|
82
|
+
export type EntityOf<C> = C extends (new (em: EntityManager, opts: any) => infer T) ? T : never;
|
|
83
83
|
type RelationsKeysOf<T> = { [K in keyof OptsOf<T>]: OptsOf<T>[K] extends Entity[] | undefined ? K : never; }[keyof OptsOf<T>];
|
|
84
84
|
/** Return the Relation keys from `FooOpt` type, given a `Foo` entity */
|
|
85
|
-
type RelationsOf<T extends Entity> = { [K in RelationsKeysOf<T>]: NonNullable<OptsOf<T>[K]>; };
|
|
85
|
+
export type RelationsOf<T extends Entity> = { [K in RelationsKeysOf<T>]: NonNullable<OptsOf<T>[K]>; };
|
|
86
86
|
//#endregion
|
|
87
|
-
export {
|
|
87
|
+
export {};
|
|
88
88
|
//# sourceMappingURL=typeMap.d.mts.map
|
package/build/typeMap.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeMap.d.mts","names":[],"sources":["../src/typeMap.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"typeMap.d.mts","names":[],"sources":["../src/typeMap.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;iBAoBiB;;;;;;;KAQZ,WAAW,KAAK;EAAY;IAAU,SAAS;;IAAQ,IAAI;EAAY;IAAU,SAAS;;IAAQ;;YAG3F,WAAW,KAAK,WAAW;;;;;;;;;;;;;YAc3B,eAAe,KAAK;EAAY;IAAU,SAAS;;IAAuB;;YAG1E,aAAa,GAAG,oBAC1B,WAAW,kBAAiB,KACxB,gBAAgB,UACd,gBAAgB,QAAQ,KACtB,QAAQ,GAAG;;YAMT,OAAO,KAAK,aAAa;;YAGzB,SAAS,KAAK,aAAa;;YAG3B,UAAU,KAAK,aAAa;;YAG5B,kBAAkB,KAAK,aAAa;YAEpC,SAAS,KAAK,aAAa;;YAG3B,SAAS,KAAK,aAAa;;YAG3B,gBAAgB,KAAK,aAAa;;YAGlC,QAAQ,KAAK,aAAa;;YAG1B,gBAAgB,KAAK,aAAa;;;;;;YAOlC,kBAAkB,KAAK,aAAa;;YAGpC,SAAS,KAAK,gBAAe,IAAI,eAAe,oBAAoB,KAAI;KAE/E,gBAAgB,QAClB,WAAW,OAAO,KAAK,OAAO,GAAG,WAAW,uBAAuB,mBAC9D,OAAO;;YAGH,YAAY,UAAU,aAC/B,KAAK,gBAAgB,KAAK,YAAY,OAAO,GAAG"}
|
package/build/upsert.d.cts
CHANGED
|
@@ -12,7 +12,7 @@ import { Entity } from "./Entity.cjs";
|
|
|
12
12
|
* any combination of 1) ids to existing entities, 2) entities directly, 3) null/undefined
|
|
13
13
|
* with the appropriate partial-update behavior, or 4) partials.
|
|
14
14
|
*/
|
|
15
|
-
type DeepPartialOrNull<T extends Entity> = {
|
|
15
|
+
export type DeepPartialOrNull<T extends Entity> = {
|
|
16
16
|
id?: IdOf<T> | null;
|
|
17
17
|
} & AllowRelationsToBeIdsOrEntitiesOrPartials<PartialOrNull<OptsOf<T> & OptIdsOf<T>>> & OptIdsOf<T>;
|
|
18
18
|
/** Flags that allow `upsert` to delete or remove entities. */
|
|
@@ -32,11 +32,11 @@ type AllowRelationsToBeIdsOrEntitiesOrPartials<T> = { [P in keyof T]: T[P] exten
|
|
|
32
32
|
* The difference between this and `Entity.setPartial` is that we accept `DeepPartialOrNull`
|
|
33
33
|
* updates, similar to `createOrUpdateUnsafe`, instead of just a flat/shallow list of opts.
|
|
34
34
|
*/
|
|
35
|
-
declare function updatePartial<T extends Entity>(entity: T, input: DeepPartialOrNull<T>): Promise<void>;
|
|
35
|
+
export declare function updatePartial<T extends Entity>(entity: T, input: DeepPartialOrNull<T>): Promise<void>;
|
|
36
36
|
/**
|
|
37
37
|
* A utility function to create-or-update/upsert entities coming from a partial-update style API.
|
|
38
38
|
*/
|
|
39
|
-
declare function upsert<T extends Entity>(em: EntityManager<any, any, any>, constructor: MaybeAbstractEntityConstructor<T>, input: DeepPartialOrNull<T>): Promise<T>;
|
|
39
|
+
export declare function upsert<T extends Entity>(em: EntityManager<any, any, any>, constructor: MaybeAbstractEntityConstructor<T>, input: DeepPartialOrNull<T>): Promise<T>;
|
|
40
40
|
//#endregion
|
|
41
|
-
export {
|
|
41
|
+
export {};
|
|
42
42
|
//# sourceMappingURL=upsert.d.cts.map
|
package/build/upsert.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upsert.d.cts","names":[],"sources":["../src/upsert.ts"],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"upsert.d.cts","names":[],"sources":["../src/upsert.ts"],"mappings":";;;;;;;;;;;;;;YA+BY,kBAAkB,UAAU;EAAY,KAAK,KAAK;IAAc,0CAC1E,cAAc,OAAO,KAAK,SAAS,OAEnC,SAAS;;KAGN;EACH;EACA;EACA;;;KAIG;EACH;;KAGG,0CAA0C,QAC5C,WAAW,IAAI,EAAE,WAAW,sBAAsB,KAC/C,UAAU,YAAY,KACpB,UAAU,SACR,MAAM,KAAK,kBAAkB,KAAK,mBAAmB,KAAK,aAC1D,EAAE,KACJ,UAAU,SACR,KAAK,kBAAkB,KAAK,cAAc,KAAK,YAC/C,EAAE,KACN,EAAE;;;;;;;wBASc,cAAc,UAAU,QAAQ,QAAQ,GAAG,OAAO,kBAAkB,KAAK;;;;wBA8MzE,OAAO,UAAU,QACrC,IAAI,8BACJ,aAAa,+BAA+B,IAC5C,OAAO,kBAAkB,KACxB,QAAQ"}
|
package/build/upsert.d.mts
CHANGED
|
@@ -12,7 +12,7 @@ import { Entity } from "./Entity.mjs";
|
|
|
12
12
|
* any combination of 1) ids to existing entities, 2) entities directly, 3) null/undefined
|
|
13
13
|
* with the appropriate partial-update behavior, or 4) partials.
|
|
14
14
|
*/
|
|
15
|
-
type DeepPartialOrNull<T extends Entity> = {
|
|
15
|
+
export type DeepPartialOrNull<T extends Entity> = {
|
|
16
16
|
id?: IdOf<T> | null;
|
|
17
17
|
} & AllowRelationsToBeIdsOrEntitiesOrPartials<PartialOrNull<OptsOf<T> & OptIdsOf<T>>> & OptIdsOf<T>;
|
|
18
18
|
/** Flags that allow `upsert` to delete or remove entities. */
|
|
@@ -32,11 +32,11 @@ type AllowRelationsToBeIdsOrEntitiesOrPartials<T> = { [P in keyof T]: T[P] exten
|
|
|
32
32
|
* The difference between this and `Entity.setPartial` is that we accept `DeepPartialOrNull`
|
|
33
33
|
* updates, similar to `createOrUpdateUnsafe`, instead of just a flat/shallow list of opts.
|
|
34
34
|
*/
|
|
35
|
-
declare function updatePartial<T extends Entity>(entity: T, input: DeepPartialOrNull<T>): Promise<void>;
|
|
35
|
+
export declare function updatePartial<T extends Entity>(entity: T, input: DeepPartialOrNull<T>): Promise<void>;
|
|
36
36
|
/**
|
|
37
37
|
* A utility function to create-or-update/upsert entities coming from a partial-update style API.
|
|
38
38
|
*/
|
|
39
|
-
declare function upsert<T extends Entity>(em: EntityManager<any, any, any>, constructor: MaybeAbstractEntityConstructor<T>, input: DeepPartialOrNull<T>): Promise<T>;
|
|
39
|
+
export declare function upsert<T extends Entity>(em: EntityManager<any, any, any>, constructor: MaybeAbstractEntityConstructor<T>, input: DeepPartialOrNull<T>): Promise<T>;
|
|
40
40
|
//#endregion
|
|
41
|
-
export {
|
|
41
|
+
export {};
|
|
42
42
|
//# sourceMappingURL=upsert.d.mts.map
|
package/build/upsert.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upsert.d.mts","names":[],"sources":["../src/upsert.ts"],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"upsert.d.mts","names":[],"sources":["../src/upsert.ts"],"mappings":";;;;;;;;;;;;;;YA+BY,kBAAkB,UAAU;EAAY,KAAK,KAAK;IAAc,0CAC1E,cAAc,OAAO,KAAK,SAAS,OAEnC,SAAS;;KAGN;EACH;EACA;EACA;;;KAIG;EACH;;KAGG,0CAA0C,QAC5C,WAAW,IAAI,EAAE,WAAW,sBAAsB,KAC/C,UAAU,YAAY,KACpB,UAAU,SACR,MAAM,KAAK,kBAAkB,KAAK,mBAAmB,KAAK,aAC1D,EAAE,KACJ,UAAU,SACR,KAAK,kBAAkB,KAAK,cAAc,KAAK,YAC/C,EAAE,KACN,EAAE;;;;;;;wBASc,cAAc,UAAU,QAAQ,QAAQ,GAAG,OAAO,kBAAkB,KAAK;;;;wBA8MzE,OAAO,UAAU,QACrC,IAAI,8BACJ,aAAa,+BAA+B,IAC5C,OAAO,kBAAkB,KACxB,QAAQ"}
|
package/build/utils.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { OrderBy } from "./queries/find/EntityFilter.cjs";
|
|
|
2
2
|
import { New } from "./loading/loadHints.cjs";
|
|
3
3
|
import { Entity } from "./Entity.cjs";
|
|
4
4
|
//#region src/utils.d.ts
|
|
5
|
-
type MaybePromise<T> = T | Promise<T>;
|
|
5
|
+
export type MaybePromise<T> = T | Promise<T>;
|
|
6
6
|
/**
|
|
7
7
|
* Given a `MaybePromise` of T, invoke `callback` against `T` either immediately or via `then`.
|
|
8
8
|
*
|
|
@@ -15,34 +15,34 @@ type MaybePromise<T> = T | Promise<T>;
|
|
|
15
15
|
*
|
|
16
16
|
* But saves an `await` if `maybePromise` is not actually a promise.
|
|
17
17
|
*/
|
|
18
|
-
declare function maybePromiseThen<T, U>(promiseOrObj: MaybePromise<T>, callback: (obj: T) => U): MaybePromise<U>;
|
|
19
|
-
declare function failIfAnyRejected<T>(results: PromiseSettledResult<T>[]): T[];
|
|
20
|
-
declare function getOrSet<T extends Record<keyof unknown, unknown>>(record: T, key: keyof T, defaultValue: T[keyof T] | (() => T[keyof T])): T[keyof T];
|
|
18
|
+
export declare function maybePromiseThen<T, U>(promiseOrObj: MaybePromise<T>, callback: (obj: T) => U): MaybePromise<U>;
|
|
19
|
+
export declare function failIfAnyRejected<T>(results: PromiseSettledResult<T>[]): T[];
|
|
20
|
+
export declare function getOrSet<T extends Record<keyof unknown, unknown>>(record: T, key: keyof T, defaultValue: T[keyof T] | (() => T[keyof T])): T[keyof T];
|
|
21
21
|
/** Defines a getter that replaces itself with its computed value on first access. */
|
|
22
|
-
declare function defineLazyGetter<T extends object, K extends keyof T>(obj: T, key: K, build: () => T[K]): void;
|
|
22
|
+
export declare function defineLazyGetter<T extends object, K extends keyof T>(obj: T, key: K, build: () => T[K]): void;
|
|
23
23
|
/**
|
|
24
24
|
* A utility to ensure a Promise-returning method actually returns a promise and doesn't
|
|
25
25
|
* early exit. Using `async function` guarantees these semantics, but sometimes we avoid
|
|
26
26
|
* `async` as a likely-premature optimization to avoid the overhead.
|
|
27
27
|
*/
|
|
28
|
-
declare function tryResolve<T>(fn: () => T): Promise<T>;
|
|
28
|
+
export declare function tryResolve<T>(fn: () => T): Promise<T>;
|
|
29
29
|
/** Returns whether `obj` has at least one key, without allocating a keys array. */
|
|
30
|
-
declare function hasAnyKey(obj: Record<any, any> | undefined): boolean;
|
|
31
|
-
declare function fail(message?: string): never;
|
|
32
|
-
declare function remove<T>(array: T[], t: T): void;
|
|
33
|
-
declare function maybeRemove<T>(array: T[] | undefined, t: T): void;
|
|
34
|
-
declare function maybeAdd<T>(array: T[], t: T): void;
|
|
35
|
-
declare function clear<T>(array: T[]): void;
|
|
30
|
+
export declare function hasAnyKey(obj: Record<any, any> | undefined): boolean;
|
|
31
|
+
export declare function fail(message?: string): never;
|
|
32
|
+
export declare function remove<T>(array: T[], t: T): void;
|
|
33
|
+
export declare function maybeRemove<T>(array: T[] | undefined, t: T): void;
|
|
34
|
+
export declare function maybeAdd<T>(array: T[], t: T): void;
|
|
35
|
+
export declare function clear<T>(array: T[]): void;
|
|
36
36
|
/** Returns 0 inclusive to n exclusive. */
|
|
37
|
-
declare function zeroTo(n: number): number[];
|
|
38
|
-
declare function groupBy<T, Y = T, K = string>(list: readonly T[], fn: (x: T) => K, valueFn?: (x: T) => Y): Map<K, Y[]>;
|
|
39
|
-
declare function indexBy<T, Y = T, K = string>(list: T[], fn: (x: T) => K, valueFn?: (x: T) => Y): Map<K, Y>;
|
|
40
|
-
declare function batched<T>(list: Array<T>, n: number): T[][];
|
|
41
|
-
declare function partition<T>(array: ReadonlyArray<T>, f: (el: T) => boolean): [T[], T[]];
|
|
42
|
-
declare function toArray<T>(maybeArray: T | T[] | undefined | null): T[];
|
|
43
|
-
type NullOrDefinedOr<T> = T | null | undefined;
|
|
44
|
-
declare function assertNever(x: never): never;
|
|
45
|
-
declare function abbreviation(tableName: string): string;
|
|
37
|
+
export declare function zeroTo(n: number): number[];
|
|
38
|
+
export declare function groupBy<T, Y = T, K = string>(list: readonly T[], fn: (x: T) => K, valueFn?: (x: T) => Y): Map<K, Y[]>;
|
|
39
|
+
export declare function indexBy<T, Y = T, K = string>(list: T[], fn: (x: T) => K, valueFn?: (x: T) => Y): Map<K, Y>;
|
|
40
|
+
export declare function batched<T>(list: Array<T>, n: number): T[][];
|
|
41
|
+
export declare function partition<T>(array: ReadonlyArray<T>, f: (el: T) => boolean): [T[], T[]];
|
|
42
|
+
export declare function toArray<T>(maybeArray: T | T[] | undefined | null): T[];
|
|
43
|
+
export type NullOrDefinedOr<T> = T | null | undefined;
|
|
44
|
+
export declare function assertNever(x: never): never;
|
|
45
|
+
export declare function abbreviation(tableName: string): string;
|
|
46
46
|
/**
|
|
47
47
|
* Utility method for casting `entity` to a `New` entity.
|
|
48
48
|
*
|
|
@@ -52,14 +52,13 @@ declare function abbreviation(tableName: string): string;
|
|
|
52
52
|
*
|
|
53
53
|
* Granted, we could do a runtime check that all relations are loaded.
|
|
54
54
|
*/
|
|
55
|
-
declare function asNew<T extends Entity>(entity: T): New<T>;
|
|
56
|
-
declare function compareValues(av: any, bv: any, direction: OrderBy): number;
|
|
55
|
+
export declare function asNew<T extends Entity>(entity: T): New<T>;
|
|
56
|
+
export declare function compareValues(av: any, bv: any, direction: OrderBy): number;
|
|
57
57
|
/** A ~naive deep merge that requires already-normalized hints and will mutate `source`. */
|
|
58
|
-
declare function mergeNormalizedHints(target: any, source: any): void;
|
|
59
|
-
declare function cleanStringValue(value: unknown): string | undefined;
|
|
58
|
+
export declare function mergeNormalizedHints(target: any, source: any): void;
|
|
59
|
+
export declare function cleanStringValue(value: unknown): string | undefined;
|
|
60
60
|
/** Strips new lines/indentation from our `UPDATE` string; doesn't do any actual SQL param escaping/etc. */
|
|
61
|
-
declare function cleanSql(sql: string): string;
|
|
62
|
-
declare function flatAndUnique<T extends unknown>(list: (T | T[] | undefined)[]): Set<T>;
|
|
61
|
+
export declare function cleanSql(sql: string): string;
|
|
62
|
+
export declare function flatAndUnique<T extends unknown>(list: (T | T[] | undefined)[]): Set<T>;
|
|
63
63
|
//#endregion
|
|
64
|
-
export { MaybePromise, NullOrDefinedOr, abbreviation, asNew, assertNever, batched, cleanSql, cleanStringValue, clear, compareValues, defineLazyGetter, fail, failIfAnyRejected, flatAndUnique, getOrSet, groupBy, hasAnyKey, indexBy, maybeAdd, maybePromiseThen, maybeRemove, mergeNormalizedHints, partition, remove, toArray, tryResolve, zeroTo };
|
|
65
64
|
//# sourceMappingURL=utils.d.cts.map
|
package/build/utils.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.cts","names":[],"sources":["../src/utils.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"utils.d.cts","names":[],"sources":["../src/utils.ts"],"mappings":";;;;YAMY,aAAa,KAAK,IAAI,QAAQ;;;;;;;;;;;;;wBAc1B,iBAAiB,GAAG,GAAG,cAAc,aAAa,IAAI,WAAW,KAAK,MAAM,IAAI,aAAa;wBAI7F,kBAAkB,GAAG,SAAS,qBAAqB,OAAO;wBAS1D,SAAS,UAAU,gCACjC,QAAQ,GACR,WAAW,GACX,cAAc,QAAQ,YAAY,QAAQ,MACzC,QAAQ;;wBAQK,iBAAiB,kBAAkB,gBAAgB,GAAG,KAAK,GAAG,KAAK,GAAG,aAAa,EAAE;;;;;;wBAgBrF,WAAW,GAAG,UAAU,IAAI,QAAQ;;wBASpC,UAAU,KAAK;wBAKf,KAAK;wBAIL,OAAO,GAAG,OAAO,KAAK,GAAG;wBAOzB,YAAY,GAAG,OAAO,iBAAiB,GAAG;wBAI1C,SAAS,GAAG,OAAO,KAAK,GAAG;wBAM3B,MAAM,GAAG,OAAO;;wBAKhB,OAAO;wBAIP,QAAQ,GAAG,IAAI,GAAG,YAAY,eAAe,KAAK,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,IAAI,IAAI,GAAG;wBAYlG,QAAQ,GAAG,IAAI,GAAG,YAAY,MAAM,KAAK,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,IAAI,IAAI,GAAG;wBASzF,QAAQ,GAAG,MAAM,MAAM,IAAI,YAAY;wBAQvC,UAAU,GAAG,OAAO,cAAc,IAAI,IAAI,IAAI,iBAAiB,KAAK;wBAcpE,QAAQ,GAAG,YAAY,IAAI,yBAAyB;YAKxD,gBAAgB,KAAK;wBAEjB,YAAY;wBAIZ,aAAa;;;;;;;;;;wBAgBb,MAAM,UAAU,QAAQ,QAAQ,IAAI,IAAI;wBAIxC,cAAc,SAAS,SAAS,WAAW;;wBAkC3C,qBAAqB,aAAa;wBAclC,iBAAiB;;wBAUjB,SAAS;wBAKT,cAAc,mBAAmB,OAAO,IAAI,qBAAqB,IAAI"}
|
package/build/utils.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { OrderBy } from "./queries/find/EntityFilter.mjs";
|
|
|
2
2
|
import { New } from "./loading/loadHints.mjs";
|
|
3
3
|
import { Entity } from "./Entity.mjs";
|
|
4
4
|
//#region src/utils.d.ts
|
|
5
|
-
type MaybePromise<T> = T | Promise<T>;
|
|
5
|
+
export type MaybePromise<T> = T | Promise<T>;
|
|
6
6
|
/**
|
|
7
7
|
* Given a `MaybePromise` of T, invoke `callback` against `T` either immediately or via `then`.
|
|
8
8
|
*
|
|
@@ -15,34 +15,34 @@ type MaybePromise<T> = T | Promise<T>;
|
|
|
15
15
|
*
|
|
16
16
|
* But saves an `await` if `maybePromise` is not actually a promise.
|
|
17
17
|
*/
|
|
18
|
-
declare function maybePromiseThen<T, U>(promiseOrObj: MaybePromise<T>, callback: (obj: T) => U): MaybePromise<U>;
|
|
19
|
-
declare function failIfAnyRejected<T>(results: PromiseSettledResult<T>[]): T[];
|
|
20
|
-
declare function getOrSet<T extends Record<keyof unknown, unknown>>(record: T, key: keyof T, defaultValue: T[keyof T] | (() => T[keyof T])): T[keyof T];
|
|
18
|
+
export declare function maybePromiseThen<T, U>(promiseOrObj: MaybePromise<T>, callback: (obj: T) => U): MaybePromise<U>;
|
|
19
|
+
export declare function failIfAnyRejected<T>(results: PromiseSettledResult<T>[]): T[];
|
|
20
|
+
export declare function getOrSet<T extends Record<keyof unknown, unknown>>(record: T, key: keyof T, defaultValue: T[keyof T] | (() => T[keyof T])): T[keyof T];
|
|
21
21
|
/** Defines a getter that replaces itself with its computed value on first access. */
|
|
22
|
-
declare function defineLazyGetter<T extends object, K extends keyof T>(obj: T, key: K, build: () => T[K]): void;
|
|
22
|
+
export declare function defineLazyGetter<T extends object, K extends keyof T>(obj: T, key: K, build: () => T[K]): void;
|
|
23
23
|
/**
|
|
24
24
|
* A utility to ensure a Promise-returning method actually returns a promise and doesn't
|
|
25
25
|
* early exit. Using `async function` guarantees these semantics, but sometimes we avoid
|
|
26
26
|
* `async` as a likely-premature optimization to avoid the overhead.
|
|
27
27
|
*/
|
|
28
|
-
declare function tryResolve<T>(fn: () => T): Promise<T>;
|
|
28
|
+
export declare function tryResolve<T>(fn: () => T): Promise<T>;
|
|
29
29
|
/** Returns whether `obj` has at least one key, without allocating a keys array. */
|
|
30
|
-
declare function hasAnyKey(obj: Record<any, any> | undefined): boolean;
|
|
31
|
-
declare function fail(message?: string): never;
|
|
32
|
-
declare function remove<T>(array: T[], t: T): void;
|
|
33
|
-
declare function maybeRemove<T>(array: T[] | undefined, t: T): void;
|
|
34
|
-
declare function maybeAdd<T>(array: T[], t: T): void;
|
|
35
|
-
declare function clear<T>(array: T[]): void;
|
|
30
|
+
export declare function hasAnyKey(obj: Record<any, any> | undefined): boolean;
|
|
31
|
+
export declare function fail(message?: string): never;
|
|
32
|
+
export declare function remove<T>(array: T[], t: T): void;
|
|
33
|
+
export declare function maybeRemove<T>(array: T[] | undefined, t: T): void;
|
|
34
|
+
export declare function maybeAdd<T>(array: T[], t: T): void;
|
|
35
|
+
export declare function clear<T>(array: T[]): void;
|
|
36
36
|
/** Returns 0 inclusive to n exclusive. */
|
|
37
|
-
declare function zeroTo(n: number): number[];
|
|
38
|
-
declare function groupBy<T, Y = T, K = string>(list: readonly T[], fn: (x: T) => K, valueFn?: (x: T) => Y): Map<K, Y[]>;
|
|
39
|
-
declare function indexBy<T, Y = T, K = string>(list: T[], fn: (x: T) => K, valueFn?: (x: T) => Y): Map<K, Y>;
|
|
40
|
-
declare function batched<T>(list: Array<T>, n: number): T[][];
|
|
41
|
-
declare function partition<T>(array: ReadonlyArray<T>, f: (el: T) => boolean): [T[], T[]];
|
|
42
|
-
declare function toArray<T>(maybeArray: T | T[] | undefined | null): T[];
|
|
43
|
-
type NullOrDefinedOr<T> = T | null | undefined;
|
|
44
|
-
declare function assertNever(x: never): never;
|
|
45
|
-
declare function abbreviation(tableName: string): string;
|
|
37
|
+
export declare function zeroTo(n: number): number[];
|
|
38
|
+
export declare function groupBy<T, Y = T, K = string>(list: readonly T[], fn: (x: T) => K, valueFn?: (x: T) => Y): Map<K, Y[]>;
|
|
39
|
+
export declare function indexBy<T, Y = T, K = string>(list: T[], fn: (x: T) => K, valueFn?: (x: T) => Y): Map<K, Y>;
|
|
40
|
+
export declare function batched<T>(list: Array<T>, n: number): T[][];
|
|
41
|
+
export declare function partition<T>(array: ReadonlyArray<T>, f: (el: T) => boolean): [T[], T[]];
|
|
42
|
+
export declare function toArray<T>(maybeArray: T | T[] | undefined | null): T[];
|
|
43
|
+
export type NullOrDefinedOr<T> = T | null | undefined;
|
|
44
|
+
export declare function assertNever(x: never): never;
|
|
45
|
+
export declare function abbreviation(tableName: string): string;
|
|
46
46
|
/**
|
|
47
47
|
* Utility method for casting `entity` to a `New` entity.
|
|
48
48
|
*
|
|
@@ -52,14 +52,13 @@ declare function abbreviation(tableName: string): string;
|
|
|
52
52
|
*
|
|
53
53
|
* Granted, we could do a runtime check that all relations are loaded.
|
|
54
54
|
*/
|
|
55
|
-
declare function asNew<T extends Entity>(entity: T): New<T>;
|
|
56
|
-
declare function compareValues(av: any, bv: any, direction: OrderBy): number;
|
|
55
|
+
export declare function asNew<T extends Entity>(entity: T): New<T>;
|
|
56
|
+
export declare function compareValues(av: any, bv: any, direction: OrderBy): number;
|
|
57
57
|
/** A ~naive deep merge that requires already-normalized hints and will mutate `source`. */
|
|
58
|
-
declare function mergeNormalizedHints(target: any, source: any): void;
|
|
59
|
-
declare function cleanStringValue(value: unknown): string | undefined;
|
|
58
|
+
export declare function mergeNormalizedHints(target: any, source: any): void;
|
|
59
|
+
export declare function cleanStringValue(value: unknown): string | undefined;
|
|
60
60
|
/** Strips new lines/indentation from our `UPDATE` string; doesn't do any actual SQL param escaping/etc. */
|
|
61
|
-
declare function cleanSql(sql: string): string;
|
|
62
|
-
declare function flatAndUnique<T extends unknown>(list: (T | T[] | undefined)[]): Set<T>;
|
|
61
|
+
export declare function cleanSql(sql: string): string;
|
|
62
|
+
export declare function flatAndUnique<T extends unknown>(list: (T | T[] | undefined)[]): Set<T>;
|
|
63
63
|
//#endregion
|
|
64
|
-
export { MaybePromise, NullOrDefinedOr, abbreviation, asNew, assertNever, batched, cleanSql, cleanStringValue, clear, compareValues, defineLazyGetter, fail, failIfAnyRejected, flatAndUnique, getOrSet, groupBy, hasAnyKey, indexBy, maybeAdd, maybePromiseThen, maybeRemove, mergeNormalizedHints, partition, remove, toArray, tryResolve, zeroTo };
|
|
65
64
|
//# sourceMappingURL=utils.d.mts.map
|
package/build/utils.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.mts","names":[],"sources":["../src/utils.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"utils.d.mts","names":[],"sources":["../src/utils.ts"],"mappings":";;;;YAMY,aAAa,KAAK,IAAI,QAAQ;;;;;;;;;;;;;wBAc1B,iBAAiB,GAAG,GAAG,cAAc,aAAa,IAAI,WAAW,KAAK,MAAM,IAAI,aAAa;wBAI7F,kBAAkB,GAAG,SAAS,qBAAqB,OAAO;wBAS1D,SAAS,UAAU,gCACjC,QAAQ,GACR,WAAW,GACX,cAAc,QAAQ,YAAY,QAAQ,MACzC,QAAQ;;wBAQK,iBAAiB,kBAAkB,gBAAgB,GAAG,KAAK,GAAG,KAAK,GAAG,aAAa,EAAE;;;;;;wBAgBrF,WAAW,GAAG,UAAU,IAAI,QAAQ;;wBASpC,UAAU,KAAK;wBAKf,KAAK;wBAIL,OAAO,GAAG,OAAO,KAAK,GAAG;wBAOzB,YAAY,GAAG,OAAO,iBAAiB,GAAG;wBAI1C,SAAS,GAAG,OAAO,KAAK,GAAG;wBAM3B,MAAM,GAAG,OAAO;;wBAKhB,OAAO;wBAIP,QAAQ,GAAG,IAAI,GAAG,YAAY,eAAe,KAAK,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,IAAI,IAAI,GAAG;wBAYlG,QAAQ,GAAG,IAAI,GAAG,YAAY,MAAM,KAAK,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,IAAI,IAAI,GAAG;wBASzF,QAAQ,GAAG,MAAM,MAAM,IAAI,YAAY;wBAQvC,UAAU,GAAG,OAAO,cAAc,IAAI,IAAI,IAAI,iBAAiB,KAAK;wBAcpE,QAAQ,GAAG,YAAY,IAAI,yBAAyB;YAKxD,gBAAgB,KAAK;wBAEjB,YAAY;wBAIZ,aAAa;;;;;;;;;;wBAgBb,MAAM,UAAU,QAAQ,QAAQ,IAAI,IAAI;wBAIxC,cAAc,SAAS,SAAS,WAAW;;wBAkC3C,qBAAqB,aAAa;wBAclC,iBAAiB;;wBAUjB,SAAS;wBAKT,cAAc,mBAAmB,OAAO,IAAI,qBAAqB,IAAI"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "joist-core",
|
|
3
|
-
"version": "2.4.0-next.
|
|
3
|
+
"version": "2.4.0-next.39",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"build"
|
|
43
43
|
],
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"joist-utils": "2.4.0-next.
|
|
45
|
+
"joist-utils": "2.4.0-next.39"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"ansis": "^4.4.0",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"temporal-spec": "^1.0.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@swc/core": "
|
|
53
|
+
"@swc/core": "1.16.18",
|
|
54
54
|
"@swc/jest": "^0.2.39",
|
|
55
55
|
"@types/jest": "^30.0.0",
|
|
56
|
-
"@types/node": "^26.
|
|
56
|
+
"@types/node": "^26.6.5",
|
|
57
57
|
"jest": "30.4.2",
|
|
58
58
|
"temporal-polyfill": "^1.0.5",
|
|
59
59
|
"tsconfig-paths": "^4.2.0",
|