@contember/binding 2.0.0-alpha.6 → 2.0.0-alpha.8
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/api-extractor.json +3 -0
- package/dist/development/index.cjs +49 -49
- package/dist/development/index.js +49 -49
- package/dist/development/src/BindingError.cjs.map +1 -0
- package/dist/development/src/BindingError.js.map +1 -0
- package/dist/development/src/accessorTree/NormalizedPersistedData.cjs.map +1 -0
- package/dist/development/src/accessorTree/NormalizedPersistedData.js.map +1 -0
- package/dist/development/src/accessorTree/RuntimeId.cjs +61 -0
- package/dist/development/src/accessorTree/RuntimeId.cjs.map +1 -0
- package/dist/development/src/accessorTree/RuntimeId.js +61 -0
- package/dist/development/src/accessorTree/RuntimeId.js.map +1 -0
- package/dist/development/src/accessors/EntityAccessor.cjs.map +1 -0
- package/dist/development/src/accessors/EntityAccessor.js.map +1 -0
- package/dist/development/src/accessors/EntityListAccessor.cjs.map +1 -0
- package/dist/development/src/accessors/EntityListAccessor.js.map +1 -0
- package/dist/development/src/accessors/ErrorAccessor.cjs.map +1 -0
- package/dist/development/src/accessors/ErrorAccessor.js.map +1 -0
- package/dist/development/src/accessors/FieldAccessor.cjs.map +1 -0
- package/dist/development/src/accessors/FieldAccessor.js.map +1 -0
- package/dist/development/src/accessors/TreeRootAccessor.cjs.map +1 -0
- package/dist/development/src/accessors/TreeRootAccessor.js.map +1 -0
- package/dist/development/src/bindingTypes.cjs.map +1 -0
- package/dist/development/src/bindingTypes.js.map +1 -0
- package/dist/development/src/core/AccessorErrorManager.cjs +204 -0
- package/dist/development/src/core/AccessorErrorManager.cjs.map +1 -0
- package/dist/development/src/core/AccessorErrorManager.js +204 -0
- package/dist/development/src/core/AccessorErrorManager.js.map +1 -0
- package/dist/development/src/core/Config.cjs +29 -0
- package/dist/development/src/core/Config.cjs.map +1 -0
- package/dist/development/src/core/Config.js +29 -0
- package/dist/development/src/core/Config.js.map +1 -0
- package/dist/development/src/core/DataBinding.cjs +348 -0
- package/dist/development/src/core/DataBinding.cjs.map +1 -0
- package/dist/development/src/core/DataBinding.js +348 -0
- package/dist/development/src/core/DataBinding.js.map +1 -0
- package/dist/development/src/core/DirtinessTracker.cjs +26 -0
- package/dist/development/src/core/DirtinessTracker.cjs.map +1 -0
- package/dist/development/src/core/DirtinessTracker.js +26 -0
- package/dist/development/src/core/DirtinessTracker.js.map +1 -0
- package/dist/development/src/core/ErrorsPreprocessor.cjs +180 -0
- package/dist/development/src/core/ErrorsPreprocessor.cjs.map +1 -0
- package/dist/development/src/core/ErrorsPreprocessor.js +180 -0
- package/dist/development/src/core/ErrorsPreprocessor.js.map +1 -0
- package/dist/development/src/core/EventManager.cjs +434 -0
- package/dist/development/src/core/EventManager.cjs.map +1 -0
- package/dist/development/src/core/EventManager.js +434 -0
- package/dist/development/src/core/EventManager.js.map +1 -0
- package/dist/development/src/core/MarkerComparator.cjs.map +1 -0
- package/dist/development/src/core/MarkerComparator.js.map +1 -0
- package/dist/development/src/core/MarkerMerger.cjs +256 -0
- package/dist/development/src/core/MarkerMerger.cjs.map +1 -0
- package/dist/development/src/core/MarkerMerger.js +256 -0
- package/dist/development/src/core/MarkerMerger.js.map +1 -0
- package/dist/development/src/core/MutationGenerator.cjs +662 -0
- package/dist/development/src/core/MutationGenerator.cjs.map +1 -0
- package/dist/development/src/core/MutationGenerator.js +662 -0
- package/dist/development/src/core/MutationGenerator.js.map +1 -0
- package/dist/development/src/core/QueryGenerator.cjs.map +1 -0
- package/dist/development/src/core/QueryGenerator.js.map +1 -0
- package/dist/development/src/core/RealmKeyGenerator.cjs +42 -0
- package/dist/development/src/core/RealmKeyGenerator.cjs.map +1 -0
- package/dist/development/src/core/RealmKeyGenerator.js +42 -0
- package/dist/development/src/core/RealmKeyGenerator.js.map +1 -0
- package/dist/development/src/core/RequestResponseNormalizer.cjs.map +1 -0
- package/dist/development/src/core/RequestResponseNormalizer.js.map +1 -0
- package/dist/development/src/core/StateInitializer.cjs +387 -0
- package/dist/development/src/core/StateInitializer.cjs.map +1 -0
- package/dist/development/src/core/StateInitializer.js +387 -0
- package/dist/development/src/core/StateInitializer.js.map +1 -0
- package/dist/development/src/core/TreeAugmenter.cjs.map +1 -0
- package/dist/development/src/core/TreeAugmenter.js.map +1 -0
- package/dist/development/src/core/TreeFilterGenerator.cjs +82 -0
- package/dist/development/src/core/TreeFilterGenerator.cjs.map +1 -0
- package/dist/development/src/core/TreeFilterGenerator.js +82 -0
- package/dist/development/src/core/TreeFilterGenerator.js.map +1 -0
- package/dist/development/src/core/TreeParameterMerger.cjs.map +1 -0
- package/dist/development/src/core/TreeParameterMerger.js.map +1 -0
- package/dist/development/src/core/TreeStore.cjs +176 -0
- package/dist/development/src/core/TreeStore.cjs.map +1 -0
- package/dist/development/src/core/TreeStore.js +176 -0
- package/dist/development/src/core/TreeStore.js.map +1 -0
- package/dist/development/src/core/VariableInputTransformer.cjs.map +1 -0
- package/dist/development/src/core/VariableInputTransformer.js.map +1 -0
- package/dist/development/src/core/exceptions/ErrorLocator.cjs +59 -0
- package/dist/development/src/core/exceptions/ErrorLocator.cjs.map +1 -0
- package/dist/development/src/core/exceptions/ErrorLocator.js +59 -0
- package/dist/development/src/core/exceptions/ErrorLocator.js.map +1 -0
- package/dist/development/src/core/exceptions/LocalizedBindingError.cjs.map +1 -0
- package/dist/development/src/core/exceptions/LocalizedBindingError.js.map +1 -0
- package/dist/development/src/core/exceptions/MarkerSugarer.cjs.map +1 -0
- package/dist/development/src/core/exceptions/MarkerSugarer.js.map +1 -0
- package/dist/development/src/core/exceptions/TreeParameterSugarer.cjs.map +1 -0
- package/dist/development/src/core/exceptions/TreeParameterSugarer.js.map +1 -0
- package/dist/development/src/core/factories/createBatchUpdatesOptions.cjs.map +1 -0
- package/dist/development/src/core/factories/createBatchUpdatesOptions.js.map +1 -0
- package/dist/development/src/core/operations/EntityOperations.cjs +232 -0
- package/dist/development/src/core/operations/EntityOperations.cjs.map +1 -0
- package/dist/development/src/core/operations/EntityOperations.js +232 -0
- package/dist/development/src/core/operations/EntityOperations.js.map +1 -0
- package/dist/development/src/core/operations/FieldOperations.cjs.map +1 -0
- package/dist/development/src/core/operations/FieldOperations.js.map +1 -0
- package/dist/development/src/core/operations/ListOperations.cjs +159 -0
- package/dist/development/src/core/operations/ListOperations.cjs.map +1 -0
- package/dist/development/src/core/operations/ListOperations.js +159 -0
- package/dist/development/src/core/operations/ListOperations.js.map +1 -0
- package/dist/development/src/core/operations/OperationsHelpers.cjs.map +1 -0
- package/dist/development/src/core/operations/OperationsHelpers.js.map +1 -0
- package/dist/development/src/core/requestAliases/MutationAlias.cjs.map +1 -0
- package/dist/development/src/core/requestAliases/MutationAlias.js.map +1 -0
- package/dist/development/src/core/schema/Schema.cjs.map +1 -0
- package/dist/development/src/core/schema/Schema.js.map +1 -0
- package/dist/development/src/core/schema/SchemaLoader.cjs +25 -0
- package/dist/development/src/core/schema/SchemaLoader.cjs.map +1 -0
- package/dist/development/src/core/schema/SchemaLoader.js +25 -0
- package/dist/development/src/core/schema/SchemaLoader.js.map +1 -0
- package/dist/development/src/core/schema/SchemaPreprocessor.cjs.map +1 -0
- package/dist/development/src/core/schema/SchemaPreprocessor.js.map +1 -0
- package/dist/development/src/core/state/StateIterator.cjs.map +1 -0
- package/dist/development/src/core/state/StateIterator.js.map +1 -0
- package/dist/development/src/core/state/getEntityMarker.cjs.map +1 -0
- package/dist/development/src/core/state/getEntityMarker.js.map +1 -0
- package/dist/development/src/core/utils/createQueryBuilder.cjs.map +1 -0
- package/dist/development/src/core/utils/createQueryBuilder.js.map +1 -0
- package/dist/development/src/core/utils/getCombinedSignal.cjs.map +1 -0
- package/dist/development/src/core/utils/getCombinedSignal.js.map +1 -0
- package/dist/development/src/dao/Environment.cjs.map +1 -0
- package/dist/development/src/dao/Environment.js.map +1 -0
- package/dist/development/src/dao/TreeNodeEnvironmentFactory.cjs.map +1 -0
- package/dist/development/src/dao/TreeNodeEnvironmentFactory.js.map +1 -0
- package/dist/development/src/dao/VariableFieldValue.cjs.map +1 -0
- package/dist/development/src/dao/VariableFieldValue.js.map +1 -0
- package/dist/development/src/fieldHelpers/helpers/FieldHelper.cjs +14 -0
- package/dist/development/src/fieldHelpers/helpers/FieldHelper.cjs.map +1 -0
- package/dist/development/src/fieldHelpers/helpers/FieldHelper.js +14 -0
- package/dist/development/src/fieldHelpers/helpers/FieldHelper.js.map +1 -0
- package/dist/development/src/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +1 -0
- package/dist/development/src/fieldHelpers/helpers/TemporalFieldHelper.js.map +1 -0
- package/dist/development/src/fieldHelpers/helpers/UuidFieldHelper.cjs.map +1 -0
- package/dist/development/src/fieldHelpers/helpers/UuidFieldHelper.js.map +1 -0
- package/dist/development/src/markers/EntityFieldMarkersContainer.cjs.map +1 -0
- package/dist/development/src/markers/EntityFieldMarkersContainer.js.map +1 -0
- package/dist/development/src/markers/EntityFieldsWithHoistablesMarker.cjs.map +1 -0
- package/dist/development/src/markers/EntityFieldsWithHoistablesMarker.js.map +1 -0
- package/dist/development/src/markers/EntityListSubTreeMarker.cjs +20 -0
- package/dist/development/src/markers/EntityListSubTreeMarker.cjs.map +1 -0
- package/dist/development/src/markers/EntityListSubTreeMarker.js +20 -0
- package/dist/development/src/markers/EntityListSubTreeMarker.js.map +1 -0
- package/dist/development/src/markers/EntitySubTreeMarker.cjs +20 -0
- package/dist/development/src/markers/EntitySubTreeMarker.cjs.map +1 -0
- package/dist/development/src/markers/EntitySubTreeMarker.js +20 -0
- package/dist/development/src/markers/EntitySubTreeMarker.js.map +1 -0
- package/dist/development/src/markers/FieldMarker.cjs +17 -0
- package/dist/development/src/markers/FieldMarker.cjs.map +1 -0
- package/dist/development/src/markers/FieldMarker.js +17 -0
- package/dist/development/src/markers/FieldMarker.js.map +1 -0
- package/dist/development/src/markers/HasManyRelationMarker.cjs +26 -0
- package/dist/development/src/markers/HasManyRelationMarker.cjs.map +1 -0
- package/dist/development/src/markers/HasManyRelationMarker.js +26 -0
- package/dist/development/src/markers/HasManyRelationMarker.js.map +1 -0
- package/dist/development/src/markers/HasOneRelationMarker.cjs +20 -0
- package/dist/development/src/markers/HasOneRelationMarker.cjs.map +1 -0
- package/dist/development/src/markers/HasOneRelationMarker.js +20 -0
- package/dist/development/src/markers/HasOneRelationMarker.js.map +1 -0
- package/dist/development/src/markers/MarkerTreeRoot.cjs.map +1 -0
- package/dist/development/src/markers/MarkerTreeRoot.js.map +1 -0
- package/dist/development/src/markers/ParentEntityMarker.cjs.map +1 -0
- package/dist/development/src/markers/ParentEntityMarker.js.map +1 -0
- package/dist/development/src/markers/PlaceholderGenerator.cjs.map +1 -0
- package/dist/development/src/markers/PlaceholderGenerator.js.map +1 -0
- package/dist/development/src/markers/PlaceholderParametersGenerator.cjs.map +1 -0
- package/dist/development/src/markers/PlaceholderParametersGenerator.js.map +1 -0
- package/dist/development/src/queryLanguage/CacheStore.cjs +44 -0
- package/dist/development/src/queryLanguage/CacheStore.cjs.map +1 -0
- package/dist/development/src/queryLanguage/CacheStore.js +44 -0
- package/dist/development/src/queryLanguage/CacheStore.js.map +1 -0
- package/dist/development/src/queryLanguage/MarkerFactory.cjs.map +1 -0
- package/dist/development/src/queryLanguage/MarkerFactory.js.map +1 -0
- package/dist/development/src/queryLanguage/Parser.cjs +724 -0
- package/dist/development/src/queryLanguage/Parser.cjs.map +1 -0
- package/dist/development/src/queryLanguage/Parser.js +724 -0
- package/dist/development/src/queryLanguage/Parser.js.map +1 -0
- package/dist/development/src/queryLanguage/QueryLanguage.cjs +543 -0
- package/dist/development/src/queryLanguage/QueryLanguage.cjs.map +1 -0
- package/dist/development/src/queryLanguage/QueryLanguage.js +543 -0
- package/dist/development/src/queryLanguage/QueryLanguage.js.map +1 -0
- package/dist/development/src/queryLanguage/QueryLanguageError.cjs.map +1 -0
- package/dist/development/src/queryLanguage/QueryLanguageError.js.map +1 -0
- package/dist/development/src/queryLanguage/tokenList.cjs +151 -0
- package/dist/development/src/queryLanguage/tokenList.cjs.map +1 -0
- package/dist/development/src/queryLanguage/tokenList.js +152 -0
- package/dist/development/src/queryLanguage/tokenList.js.map +1 -0
- package/dist/development/src/structures/BijectiveIndexedMap.cjs +117 -0
- package/dist/development/src/structures/BijectiveIndexedMap.cjs.map +1 -0
- package/dist/development/src/structures/BijectiveIndexedMap.js +117 -0
- package/dist/development/src/structures/BijectiveIndexedMap.js.map +1 -0
- package/dist/development/src/structures/LRUCache.cjs +32 -0
- package/dist/development/src/structures/LRUCache.cjs.map +1 -0
- package/dist/development/src/structures/LRUCache.js +32 -0
- package/dist/development/src/structures/LRUCache.js.map +1 -0
- package/dist/development/src/structures/WeakIdCache.cjs +30 -0
- package/dist/development/src/structures/WeakIdCache.cjs.map +1 -0
- package/dist/development/src/structures/WeakIdCache.js +30 -0
- package/dist/development/src/structures/WeakIdCache.js.map +1 -0
- package/dist/development/src/treeParameterHelpers/wrapFilterInHasOnes.cjs.map +1 -0
- package/dist/development/src/treeParameterHelpers/wrapFilterInHasOnes.js.map +1 -0
- package/dist/development/src/treeParameters/EntityCreationParameters.cjs.map +1 -0
- package/dist/development/src/treeParameters/EntityCreationParameters.js.map +1 -0
- package/dist/development/src/treeParameters/EntityListPreferences.cjs.map +1 -0
- package/dist/development/src/treeParameters/EntityListPreferences.js.map +1 -0
- package/dist/development/src/treeParameters/EventListenersStore.cjs.map +1 -0
- package/dist/development/src/treeParameters/EventListenersStore.js.map +1 -0
- package/dist/development/src/treeParameters/LeafField.cjs.map +1 -0
- package/dist/development/src/treeParameters/LeafField.js.map +1 -0
- package/dist/development/src/treeParameters/QualifiedEntityParameters.cjs.map +1 -0
- package/dist/development/src/treeParameters/QualifiedEntityParameters.js.map +1 -0
- package/dist/development/src/treeParameters/Relation.cjs.map +1 -0
- package/dist/development/src/treeParameters/Relation.js.map +1 -0
- package/dist/development/src/utils/Hashing.cjs.map +1 -0
- package/dist/development/src/utils/Hashing.js.map +1 -0
- package/dist/development/src/utils/TreeNodeUtils.cjs.map +1 -0
- package/dist/development/src/utils/TreeNodeUtils.js.map +1 -0
- package/dist/development/src/utils/assert.cjs +10 -0
- package/dist/development/src/utils/assert.cjs.map +1 -0
- package/dist/development/src/utils/assert.js +10 -0
- package/dist/development/src/utils/assert.js.map +1 -0
- package/dist/development/src/utils/assertNever.cjs.map +1 -0
- package/dist/development/src/utils/assertNever.js.map +1 -0
- package/dist/development/src/utils/generateEnumerabilityPreventingEntropy.cjs.map +1 -0
- package/dist/development/src/utils/generateEnumerabilityPreventingEntropy.js.map +1 -0
- package/dist/development/src/utils/isEmptyObject.cjs.map +1 -0
- package/dist/development/src/utils/isEmptyObject.js.map +1 -0
- package/dist/development/src/utils/ucfirst.cjs.map +1 -0
- package/dist/development/src/utils/ucfirst.js.map +1 -0
- package/dist/production/index.cjs +49 -49
- package/dist/production/index.js +49 -49
- package/dist/production/src/BindingError.cjs.map +1 -0
- package/dist/production/src/BindingError.js.map +1 -0
- package/dist/production/src/accessorTree/NormalizedPersistedData.cjs.map +1 -0
- package/dist/production/src/accessorTree/NormalizedPersistedData.js.map +1 -0
- package/dist/production/src/accessorTree/RuntimeId.cjs +61 -0
- package/dist/production/src/accessorTree/RuntimeId.cjs.map +1 -0
- package/dist/production/src/accessorTree/RuntimeId.js +61 -0
- package/dist/production/src/accessorTree/RuntimeId.js.map +1 -0
- package/dist/production/src/accessors/EntityAccessor.cjs.map +1 -0
- package/dist/production/src/accessors/EntityAccessor.js.map +1 -0
- package/dist/production/src/accessors/EntityListAccessor.cjs.map +1 -0
- package/dist/production/src/accessors/EntityListAccessor.js.map +1 -0
- package/dist/production/src/accessors/ErrorAccessor.cjs.map +1 -0
- package/dist/production/src/accessors/ErrorAccessor.js.map +1 -0
- package/dist/production/src/accessors/FieldAccessor.cjs.map +1 -0
- package/dist/production/src/accessors/FieldAccessor.js.map +1 -0
- package/dist/production/src/accessors/TreeRootAccessor.cjs.map +1 -0
- package/dist/production/src/accessors/TreeRootAccessor.js.map +1 -0
- package/dist/production/src/bindingTypes.cjs.map +1 -0
- package/dist/production/src/bindingTypes.js.map +1 -0
- package/dist/production/src/core/AccessorErrorManager.cjs +204 -0
- package/dist/production/src/core/AccessorErrorManager.cjs.map +1 -0
- package/dist/production/src/core/AccessorErrorManager.js +204 -0
- package/dist/production/src/core/AccessorErrorManager.js.map +1 -0
- package/dist/production/src/core/Config.cjs +29 -0
- package/dist/production/src/core/Config.cjs.map +1 -0
- package/dist/production/src/core/Config.js +29 -0
- package/dist/production/src/core/Config.js.map +1 -0
- package/dist/production/src/core/DataBinding.cjs +348 -0
- package/dist/production/src/core/DataBinding.cjs.map +1 -0
- package/dist/production/src/core/DataBinding.js +348 -0
- package/dist/production/src/core/DataBinding.js.map +1 -0
- package/dist/production/src/core/DirtinessTracker.cjs +26 -0
- package/dist/production/src/core/DirtinessTracker.cjs.map +1 -0
- package/dist/production/src/core/DirtinessTracker.js +26 -0
- package/dist/production/src/core/DirtinessTracker.js.map +1 -0
- package/dist/production/src/core/ErrorsPreprocessor.cjs +180 -0
- package/dist/production/src/core/ErrorsPreprocessor.cjs.map +1 -0
- package/dist/production/src/core/ErrorsPreprocessor.js +180 -0
- package/dist/production/src/core/ErrorsPreprocessor.js.map +1 -0
- package/dist/production/src/core/EventManager.cjs +408 -0
- package/dist/production/src/core/EventManager.cjs.map +1 -0
- package/dist/production/src/core/EventManager.js +408 -0
- package/dist/production/src/core/EventManager.js.map +1 -0
- package/dist/production/src/core/MarkerComparator.cjs.map +1 -0
- package/dist/production/src/core/MarkerComparator.js.map +1 -0
- package/dist/production/src/core/MarkerMerger.cjs +256 -0
- package/dist/production/src/core/MarkerMerger.cjs.map +1 -0
- package/dist/production/src/core/MarkerMerger.js +256 -0
- package/dist/production/src/core/MarkerMerger.js.map +1 -0
- package/dist/production/src/core/MutationGenerator.cjs +662 -0
- package/dist/production/src/core/MutationGenerator.cjs.map +1 -0
- package/dist/production/src/core/MutationGenerator.js +662 -0
- package/dist/production/src/core/MutationGenerator.js.map +1 -0
- package/dist/production/src/core/QueryGenerator.cjs.map +1 -0
- package/dist/production/src/core/QueryGenerator.js.map +1 -0
- package/dist/production/src/core/RealmKeyGenerator.cjs +42 -0
- package/dist/production/src/core/RealmKeyGenerator.cjs.map +1 -0
- package/dist/production/src/core/RealmKeyGenerator.js +42 -0
- package/dist/production/src/core/RealmKeyGenerator.js.map +1 -0
- package/dist/production/src/core/RequestResponseNormalizer.cjs.map +1 -0
- package/dist/production/src/core/RequestResponseNormalizer.js.map +1 -0
- package/dist/production/src/core/StateInitializer.cjs +387 -0
- package/dist/production/src/core/StateInitializer.cjs.map +1 -0
- package/dist/production/src/core/StateInitializer.js +387 -0
- package/dist/production/src/core/StateInitializer.js.map +1 -0
- package/dist/production/src/core/TreeAugmenter.cjs.map +1 -0
- package/dist/production/src/core/TreeAugmenter.js.map +1 -0
- package/dist/production/src/core/TreeFilterGenerator.cjs +82 -0
- package/dist/production/src/core/TreeFilterGenerator.cjs.map +1 -0
- package/dist/production/src/core/TreeFilterGenerator.js +82 -0
- package/dist/production/src/core/TreeFilterGenerator.js.map +1 -0
- package/dist/production/src/core/TreeParameterMerger.cjs.map +1 -0
- package/dist/production/src/core/TreeParameterMerger.js.map +1 -0
- package/dist/production/src/core/TreeStore.cjs +176 -0
- package/dist/production/src/core/TreeStore.cjs.map +1 -0
- package/dist/production/src/core/TreeStore.js +176 -0
- package/dist/production/src/core/TreeStore.js.map +1 -0
- package/dist/production/src/core/VariableInputTransformer.cjs.map +1 -0
- package/dist/production/src/core/VariableInputTransformer.js.map +1 -0
- package/dist/production/src/core/exceptions/ErrorLocator.cjs +59 -0
- package/dist/production/src/core/exceptions/ErrorLocator.cjs.map +1 -0
- package/dist/production/src/core/exceptions/ErrorLocator.js +59 -0
- package/dist/production/src/core/exceptions/ErrorLocator.js.map +1 -0
- package/dist/production/src/core/exceptions/LocalizedBindingError.cjs.map +1 -0
- package/dist/production/src/core/exceptions/LocalizedBindingError.js.map +1 -0
- package/dist/production/src/core/exceptions/MarkerSugarer.cjs.map +1 -0
- package/dist/production/src/core/exceptions/MarkerSugarer.js.map +1 -0
- package/dist/production/src/core/exceptions/TreeParameterSugarer.cjs.map +1 -0
- package/dist/production/src/core/exceptions/TreeParameterSugarer.js.map +1 -0
- package/dist/production/src/core/factories/createBatchUpdatesOptions.cjs.map +1 -0
- package/dist/production/src/core/factories/createBatchUpdatesOptions.js.map +1 -0
- package/dist/production/src/core/operations/EntityOperations.cjs +232 -0
- package/dist/production/src/core/operations/EntityOperations.cjs.map +1 -0
- package/dist/production/src/core/operations/EntityOperations.js +232 -0
- package/dist/production/src/core/operations/EntityOperations.js.map +1 -0
- package/dist/production/src/core/operations/FieldOperations.cjs +77 -0
- package/dist/production/src/core/operations/FieldOperations.cjs.map +1 -0
- package/dist/production/src/core/operations/FieldOperations.js +77 -0
- package/dist/production/src/core/operations/FieldOperations.js.map +1 -0
- package/dist/production/src/core/operations/ListOperations.cjs +159 -0
- package/dist/production/src/core/operations/ListOperations.cjs.map +1 -0
- package/dist/production/src/core/operations/ListOperations.js +159 -0
- package/dist/production/src/core/operations/ListOperations.js.map +1 -0
- package/dist/production/src/core/operations/OperationsHelpers.cjs.map +1 -0
- package/dist/production/src/core/operations/OperationsHelpers.js.map +1 -0
- package/dist/production/src/core/requestAliases/MutationAlias.cjs.map +1 -0
- package/dist/production/src/core/requestAliases/MutationAlias.js.map +1 -0
- package/dist/production/src/core/schema/Schema.cjs.map +1 -0
- package/dist/production/src/core/schema/Schema.js.map +1 -0
- package/dist/production/src/core/schema/SchemaLoader.cjs +25 -0
- package/dist/production/src/core/schema/SchemaLoader.cjs.map +1 -0
- package/dist/production/src/core/schema/SchemaLoader.js +25 -0
- package/dist/production/src/core/schema/SchemaLoader.js.map +1 -0
- package/dist/production/src/core/schema/SchemaPreprocessor.cjs.map +1 -0
- package/dist/production/src/core/schema/SchemaPreprocessor.js.map +1 -0
- package/dist/production/src/core/state/StateIterator.cjs.map +1 -0
- package/dist/production/src/core/state/StateIterator.js.map +1 -0
- package/dist/production/src/core/state/getEntityMarker.cjs.map +1 -0
- package/dist/production/src/core/state/getEntityMarker.js.map +1 -0
- package/dist/production/src/core/utils/createQueryBuilder.cjs.map +1 -0
- package/dist/production/src/core/utils/createQueryBuilder.js.map +1 -0
- package/dist/production/src/core/utils/getCombinedSignal.cjs.map +1 -0
- package/dist/production/src/core/utils/getCombinedSignal.js.map +1 -0
- package/dist/production/src/dao/Environment.cjs.map +1 -0
- package/dist/production/src/dao/Environment.js.map +1 -0
- package/dist/production/src/dao/TreeNodeEnvironmentFactory.cjs.map +1 -0
- package/dist/production/src/dao/TreeNodeEnvironmentFactory.js.map +1 -0
- package/dist/production/src/dao/VariableFieldValue.cjs.map +1 -0
- package/dist/production/src/dao/VariableFieldValue.js.map +1 -0
- package/dist/production/src/fieldHelpers/helpers/FieldHelper.cjs +14 -0
- package/dist/production/src/fieldHelpers/helpers/FieldHelper.cjs.map +1 -0
- package/dist/production/src/fieldHelpers/helpers/FieldHelper.js +14 -0
- package/dist/production/src/fieldHelpers/helpers/FieldHelper.js.map +1 -0
- package/dist/production/src/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +1 -0
- package/dist/production/src/fieldHelpers/helpers/TemporalFieldHelper.js.map +1 -0
- package/dist/production/src/fieldHelpers/helpers/UuidFieldHelper.cjs.map +1 -0
- package/dist/production/src/fieldHelpers/helpers/UuidFieldHelper.js.map +1 -0
- package/dist/production/src/markers/EntityFieldMarkersContainer.cjs.map +1 -0
- package/dist/production/src/markers/EntityFieldMarkersContainer.js.map +1 -0
- package/dist/production/src/markers/EntityFieldsWithHoistablesMarker.cjs.map +1 -0
- package/dist/production/src/markers/EntityFieldsWithHoistablesMarker.js.map +1 -0
- package/dist/production/src/markers/EntityListSubTreeMarker.cjs +20 -0
- package/dist/production/src/markers/EntityListSubTreeMarker.cjs.map +1 -0
- package/dist/production/src/markers/EntityListSubTreeMarker.js +20 -0
- package/dist/production/src/markers/EntityListSubTreeMarker.js.map +1 -0
- package/dist/production/src/markers/EntitySubTreeMarker.cjs +20 -0
- package/dist/production/src/markers/EntitySubTreeMarker.cjs.map +1 -0
- package/dist/production/src/markers/EntitySubTreeMarker.js +20 -0
- package/dist/production/src/markers/EntitySubTreeMarker.js.map +1 -0
- package/dist/production/src/markers/FieldMarker.cjs +17 -0
- package/dist/production/src/markers/FieldMarker.cjs.map +1 -0
- package/dist/production/src/markers/FieldMarker.js +17 -0
- package/dist/production/src/markers/FieldMarker.js.map +1 -0
- package/dist/production/src/markers/HasManyRelationMarker.cjs +20 -0
- package/dist/production/src/markers/HasManyRelationMarker.cjs.map +1 -0
- package/dist/production/src/markers/HasManyRelationMarker.js +20 -0
- package/dist/production/src/markers/HasManyRelationMarker.js.map +1 -0
- package/dist/production/src/markers/HasOneRelationMarker.cjs +20 -0
- package/dist/production/src/markers/HasOneRelationMarker.cjs.map +1 -0
- package/dist/production/src/markers/HasOneRelationMarker.js +20 -0
- package/dist/production/src/markers/HasOneRelationMarker.js.map +1 -0
- package/dist/production/src/markers/MarkerTreeRoot.cjs.map +1 -0
- package/dist/production/src/markers/MarkerTreeRoot.js.map +1 -0
- package/dist/production/src/markers/ParentEntityMarker.cjs.map +1 -0
- package/dist/production/src/markers/ParentEntityMarker.js.map +1 -0
- package/dist/production/src/markers/PlaceholderGenerator.cjs.map +1 -0
- package/dist/production/src/markers/PlaceholderGenerator.js.map +1 -0
- package/dist/production/src/markers/PlaceholderParametersGenerator.cjs.map +1 -0
- package/dist/production/src/markers/PlaceholderParametersGenerator.js.map +1 -0
- package/dist/production/src/queryLanguage/CacheStore.cjs +44 -0
- package/dist/production/src/queryLanguage/CacheStore.cjs.map +1 -0
- package/dist/production/src/queryLanguage/CacheStore.js +44 -0
- package/dist/production/src/queryLanguage/CacheStore.js.map +1 -0
- package/dist/production/src/queryLanguage/MarkerFactory.cjs.map +1 -0
- package/dist/production/src/queryLanguage/MarkerFactory.js.map +1 -0
- package/dist/production/src/queryLanguage/Parser.cjs +721 -0
- package/dist/production/src/queryLanguage/Parser.cjs.map +1 -0
- package/dist/production/src/queryLanguage/Parser.js +721 -0
- package/dist/production/src/queryLanguage/Parser.js.map +1 -0
- package/dist/production/src/queryLanguage/QueryLanguage.cjs +540 -0
- package/dist/production/src/queryLanguage/QueryLanguage.cjs.map +1 -0
- package/dist/production/src/queryLanguage/QueryLanguage.js +540 -0
- package/dist/production/src/queryLanguage/QueryLanguage.js.map +1 -0
- package/dist/production/src/queryLanguage/QueryLanguageError.cjs.map +1 -0
- package/dist/production/src/queryLanguage/QueryLanguageError.js.map +1 -0
- package/dist/production/src/queryLanguage/tokenList.cjs +151 -0
- package/dist/production/src/queryLanguage/tokenList.cjs.map +1 -0
- package/dist/production/src/queryLanguage/tokenList.js +152 -0
- package/dist/production/src/queryLanguage/tokenList.js.map +1 -0
- package/dist/production/src/structures/BijectiveIndexedMap.cjs +117 -0
- package/dist/production/src/structures/BijectiveIndexedMap.cjs.map +1 -0
- package/dist/production/src/structures/BijectiveIndexedMap.js +117 -0
- package/dist/production/src/structures/BijectiveIndexedMap.js.map +1 -0
- package/dist/production/src/structures/LRUCache.cjs +32 -0
- package/dist/production/src/structures/LRUCache.cjs.map +1 -0
- package/dist/production/src/structures/LRUCache.js +32 -0
- package/dist/production/src/structures/LRUCache.js.map +1 -0
- package/dist/production/src/structures/WeakIdCache.cjs +30 -0
- package/dist/production/src/structures/WeakIdCache.cjs.map +1 -0
- package/dist/production/src/structures/WeakIdCache.js +30 -0
- package/dist/production/src/structures/WeakIdCache.js.map +1 -0
- package/dist/production/src/treeParameterHelpers/wrapFilterInHasOnes.cjs.map +1 -0
- package/dist/production/src/treeParameterHelpers/wrapFilterInHasOnes.js.map +1 -0
- package/dist/production/src/treeParameters/EntityCreationParameters.cjs.map +1 -0
- package/dist/production/src/treeParameters/EntityCreationParameters.js.map +1 -0
- package/dist/production/src/treeParameters/EntityListPreferences.cjs.map +1 -0
- package/dist/production/src/treeParameters/EntityListPreferences.js.map +1 -0
- package/dist/production/src/treeParameters/EventListenersStore.cjs.map +1 -0
- package/dist/production/src/treeParameters/EventListenersStore.js.map +1 -0
- package/dist/production/src/treeParameters/LeafField.cjs.map +1 -0
- package/dist/production/src/treeParameters/LeafField.js.map +1 -0
- package/dist/production/src/treeParameters/QualifiedEntityParameters.cjs.map +1 -0
- package/dist/production/src/treeParameters/QualifiedEntityParameters.js.map +1 -0
- package/dist/production/src/treeParameters/Relation.cjs.map +1 -0
- package/dist/production/src/treeParameters/Relation.js.map +1 -0
- package/dist/production/src/utils/Hashing.cjs.map +1 -0
- package/dist/production/src/utils/Hashing.js.map +1 -0
- package/dist/production/src/utils/TreeNodeUtils.cjs.map +1 -0
- package/dist/production/src/utils/TreeNodeUtils.js.map +1 -0
- package/dist/production/src/utils/assert.cjs +10 -0
- package/dist/production/src/utils/assert.cjs.map +1 -0
- package/dist/production/src/utils/assert.js +10 -0
- package/dist/production/src/utils/assert.js.map +1 -0
- package/dist/production/src/utils/assertNever.cjs.map +1 -0
- package/dist/production/src/utils/assertNever.js.map +1 -0
- package/dist/production/src/utils/generateEnumerabilityPreventingEntropy.cjs.map +1 -0
- package/dist/production/src/utils/generateEnumerabilityPreventingEntropy.js.map +1 -0
- package/dist/production/src/utils/isEmptyObject.cjs.map +1 -0
- package/dist/production/src/utils/isEmptyObject.js.map +1 -0
- package/dist/production/src/utils/ucfirst.cjs.map +1 -0
- package/dist/production/src/utils/ucfirst.js.map +1 -0
- package/dist/types/accessorTree/RuntimeId.d.ts.map +1 -1
- package/dist/types/accessors/EntityAccessor.d.ts.map +1 -1
- package/dist/types/accessors/EntityListAccessor.d.ts.map +1 -1
- package/dist/types/core/AccessorErrorManager.d.ts.map +1 -1
- package/dist/types/core/DataBinding.d.ts.map +1 -1
- package/dist/types/core/EventManager.d.ts.map +1 -1
- package/dist/types/core/MarkerMerger.d.ts.map +1 -1
- package/dist/types/core/MutationGenerator.d.ts.map +1 -1
- package/dist/types/core/TreeStore.d.ts.map +1 -1
- package/dist/types/core/state/EntityListState.d.ts.map +1 -1
- package/dist/types/core/utils/getCombinedSignal.d.ts.map +1 -1
- package/dist/types/dao/Environment.d.ts +1 -1
- package/dist/types/dao/Environment.d.ts.map +1 -1
- package/dist/types/fieldHelpers/helpers/TemporalFieldHelper.d.ts.map +1 -1
- package/dist/types/fieldHelpers/helpers/UuidFieldHelper.d.ts.map +1 -1
- package/dist/types/markers/FieldMarker.d.ts.map +1 -1
- package/dist/types/queryLanguage/QueryLanguage.d.ts +5 -4
- package/dist/types/queryLanguage/QueryLanguage.d.ts.map +1 -1
- package/dist/types/queryLanguage/tokenList.d.ts +1 -0
- package/dist/types/queryLanguage/tokenList.d.ts.map +1 -1
- package/dist/types/treeParameters/EntityListEventListeners.d.ts.map +1 -1
- package/dist/types/treeParameters/EventListenersStore.d.ts.map +1 -1
- package/dist/types/treeParameters/HasManyRelation.d.ts.map +1 -1
- package/dist/types/treeParameters/HasOneRelation.d.ts.map +1 -1
- package/dist/types/treeParameters/QualifiedEntityList.d.ts.map +1 -1
- package/dist/types/treeParameters/QualifiedSingleEntity.d.ts.map +1 -1
- package/dist/types/treeParameters/RelativeEntityList.d.ts.map +1 -1
- package/dist/types/treeParameters/SingleEntityEventListeners.d.ts.map +1 -1
- package/dist/types/treeParameters/UnconstrainedQualifiedEntityList.d.ts.map +1 -1
- package/dist/types/treeParameters/UnconstrainedQualifiedSingleEntity.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -13
- package/src/accessorTree/QueryRequestResponse.ts +1 -1
- package/src/accessors/EntityAccessor.ts +1 -1
- package/src/accessors/EntityListAccessor.ts +1 -1
- package/src/core/AccessorErrorManager.ts +1 -0
- package/src/core/DataBinding.ts +8 -4
- package/src/core/EventManager.ts +6 -6
- package/src/core/MarkerMerger.ts +8 -2
- package/src/core/MutationGenerator.ts +8 -8
- package/src/core/RequestResponseNormalizer.ts +1 -1
- package/src/core/TreeStore.ts +6 -6
- package/src/core/operations/EntityOperations.ts +1 -1
- package/src/core/operations/FieldOperations.ts +2 -2
- package/src/core/operations/ListOperations.ts +1 -1
- package/src/core/state/EntityListState.ts +6 -6
- package/src/queryLanguage/Parser.ts +2 -2
- package/src/queryLanguage/QueryLanguage.ts +54 -25
- package/src/queryLanguage/tokenList.ts +2 -0
- package/src/treeParameters/EntityListEventListeners.ts +2 -2
- package/src/treeParameters/HasManyRelation.ts +3 -3
- package/src/treeParameters/HasOneRelation.ts +2 -2
- package/src/treeParameters/QualifiedEntityList.ts +7 -7
- package/src/treeParameters/QualifiedSingleEntity.ts +9 -9
- package/src/treeParameters/RelativeEntityList.ts +2 -2
- package/src/treeParameters/SingleEntityEventListeners.ts +3 -3
- package/src/treeParameters/UnconstrainedQualifiedEntityList.ts +6 -6
- package/src/treeParameters/UnconstrainedQualifiedSingleEntity.ts +4 -4
- package/src/tsconfig.json +4 -1
- package/src/typings/react-fix.d.ts +1 -1
- package/tests/cases/unit/queryLanguage/filter.spec.tsx +100 -0
- package/tests/cases/unit/queryLanguage/general.spec.tsx +59 -0
- package/tests/cases/unit/queryLanguage/orderBy.spec.tsx +48 -0
- package/tests/cases/unit/queryLanguage/qualifiedEntityList.spec.tsx +30 -0
- package/tests/cases/unit/queryLanguage/qualifiedFieldList.spec.tsx +29 -0
- package/tests/cases/unit/queryLanguage/relativeEntityList.spec.tsx +49 -0
- package/tests/cases/unit/queryLanguage/singleRelativeField.spec.tsx +132 -0
- package/tests/cases/unit/queryLanguage/taggedMap.spec.tsx +41 -0
- package/tests/tsconfig.json +10 -0
- package/tsconfig.json +8 -0
- package/tsdoc.json +6 -0
- package/vitest.config.ts +3 -0
- package/dist/development/BindingError.cjs.map +0 -1
- package/dist/development/BindingError.js.map +0 -1
- package/dist/development/accessorTree/NormalizedPersistedData.cjs.map +0 -1
- package/dist/development/accessorTree/NormalizedPersistedData.js.map +0 -1
- package/dist/development/accessorTree/RuntimeId.cjs +0 -64
- package/dist/development/accessorTree/RuntimeId.cjs.map +0 -1
- package/dist/development/accessorTree/RuntimeId.js +0 -64
- package/dist/development/accessorTree/RuntimeId.js.map +0 -1
- package/dist/development/accessors/EntityAccessor.cjs.map +0 -1
- package/dist/development/accessors/EntityAccessor.js.map +0 -1
- package/dist/development/accessors/EntityListAccessor.cjs.map +0 -1
- package/dist/development/accessors/EntityListAccessor.js.map +0 -1
- package/dist/development/accessors/ErrorAccessor.cjs.map +0 -1
- package/dist/development/accessors/ErrorAccessor.js.map +0 -1
- package/dist/development/accessors/FieldAccessor.cjs.map +0 -1
- package/dist/development/accessors/FieldAccessor.js.map +0 -1
- package/dist/development/accessors/TreeRootAccessor.cjs.map +0 -1
- package/dist/development/accessors/TreeRootAccessor.js.map +0 -1
- package/dist/development/bindingTypes.cjs.map +0 -1
- package/dist/development/bindingTypes.js.map +0 -1
- package/dist/development/core/AccessorErrorManager.cjs +0 -207
- package/dist/development/core/AccessorErrorManager.cjs.map +0 -1
- package/dist/development/core/AccessorErrorManager.js +0 -207
- package/dist/development/core/AccessorErrorManager.js.map +0 -1
- package/dist/development/core/Config.cjs +0 -32
- package/dist/development/core/Config.cjs.map +0 -1
- package/dist/development/core/Config.js +0 -32
- package/dist/development/core/Config.js.map +0 -1
- package/dist/development/core/DataBinding.cjs +0 -353
- package/dist/development/core/DataBinding.cjs.map +0 -1
- package/dist/development/core/DataBinding.js +0 -353
- package/dist/development/core/DataBinding.js.map +0 -1
- package/dist/development/core/DirtinessTracker.cjs +0 -29
- package/dist/development/core/DirtinessTracker.cjs.map +0 -1
- package/dist/development/core/DirtinessTracker.js +0 -29
- package/dist/development/core/DirtinessTracker.js.map +0 -1
- package/dist/development/core/ErrorsPreprocessor.cjs +0 -181
- package/dist/development/core/ErrorsPreprocessor.cjs.map +0 -1
- package/dist/development/core/ErrorsPreprocessor.js +0 -181
- package/dist/development/core/ErrorsPreprocessor.js.map +0 -1
- package/dist/development/core/EventManager.cjs +0 -440
- package/dist/development/core/EventManager.cjs.map +0 -1
- package/dist/development/core/EventManager.js +0 -440
- package/dist/development/core/EventManager.js.map +0 -1
- package/dist/development/core/MarkerComparator.cjs.map +0 -1
- package/dist/development/core/MarkerComparator.js.map +0 -1
- package/dist/development/core/MarkerMerger.cjs +0 -252
- package/dist/development/core/MarkerMerger.cjs.map +0 -1
- package/dist/development/core/MarkerMerger.js +0 -252
- package/dist/development/core/MarkerMerger.js.map +0 -1
- package/dist/development/core/MutationGenerator.cjs +0 -665
- package/dist/development/core/MutationGenerator.cjs.map +0 -1
- package/dist/development/core/MutationGenerator.js +0 -665
- package/dist/development/core/MutationGenerator.js.map +0 -1
- package/dist/development/core/QueryGenerator.cjs.map +0 -1
- package/dist/development/core/QueryGenerator.js.map +0 -1
- package/dist/development/core/RealmKeyGenerator.cjs +0 -47
- package/dist/development/core/RealmKeyGenerator.cjs.map +0 -1
- package/dist/development/core/RealmKeyGenerator.js +0 -47
- package/dist/development/core/RealmKeyGenerator.js.map +0 -1
- package/dist/development/core/RequestResponseNormalizer.cjs.map +0 -1
- package/dist/development/core/RequestResponseNormalizer.js.map +0 -1
- package/dist/development/core/StateInitializer.cjs +0 -390
- package/dist/development/core/StateInitializer.cjs.map +0 -1
- package/dist/development/core/StateInitializer.js +0 -390
- package/dist/development/core/StateInitializer.js.map +0 -1
- package/dist/development/core/TreeAugmenter.cjs.map +0 -1
- package/dist/development/core/TreeAugmenter.js.map +0 -1
- package/dist/development/core/TreeFilterGenerator.cjs +0 -83
- package/dist/development/core/TreeFilterGenerator.cjs.map +0 -1
- package/dist/development/core/TreeFilterGenerator.js +0 -83
- package/dist/development/core/TreeFilterGenerator.js.map +0 -1
- package/dist/development/core/TreeParameterMerger.cjs.map +0 -1
- package/dist/development/core/TreeParameterMerger.js.map +0 -1
- package/dist/development/core/TreeStore.cjs +0 -182
- package/dist/development/core/TreeStore.cjs.map +0 -1
- package/dist/development/core/TreeStore.js +0 -182
- package/dist/development/core/TreeStore.js.map +0 -1
- package/dist/development/core/VariableInputTransformer.cjs.map +0 -1
- package/dist/development/core/VariableInputTransformer.js.map +0 -1
- package/dist/development/core/exceptions/ErrorLocator.cjs +0 -62
- package/dist/development/core/exceptions/ErrorLocator.cjs.map +0 -1
- package/dist/development/core/exceptions/ErrorLocator.js +0 -62
- package/dist/development/core/exceptions/ErrorLocator.js.map +0 -1
- package/dist/development/core/exceptions/LocalizedBindingError.cjs.map +0 -1
- package/dist/development/core/exceptions/LocalizedBindingError.js.map +0 -1
- package/dist/development/core/exceptions/MarkerSugarer.cjs.map +0 -1
- package/dist/development/core/exceptions/MarkerSugarer.js.map +0 -1
- package/dist/development/core/exceptions/TreeParameterSugarer.cjs.map +0 -1
- package/dist/development/core/exceptions/TreeParameterSugarer.js.map +0 -1
- package/dist/development/core/factories/createBatchUpdatesOptions.cjs.map +0 -1
- package/dist/development/core/factories/createBatchUpdatesOptions.js.map +0 -1
- package/dist/development/core/operations/EntityOperations.cjs +0 -233
- package/dist/development/core/operations/EntityOperations.cjs.map +0 -1
- package/dist/development/core/operations/EntityOperations.js +0 -233
- package/dist/development/core/operations/EntityOperations.js.map +0 -1
- package/dist/development/core/operations/FieldOperations.cjs.map +0 -1
- package/dist/development/core/operations/FieldOperations.js.map +0 -1
- package/dist/development/core/operations/ListOperations.cjs +0 -159
- package/dist/development/core/operations/ListOperations.cjs.map +0 -1
- package/dist/development/core/operations/ListOperations.js +0 -159
- package/dist/development/core/operations/ListOperations.js.map +0 -1
- package/dist/development/core/operations/OperationsHelpers.cjs.map +0 -1
- package/dist/development/core/operations/OperationsHelpers.js.map +0 -1
- package/dist/development/core/requestAliases/MutationAlias.cjs.map +0 -1
- package/dist/development/core/requestAliases/MutationAlias.js.map +0 -1
- package/dist/development/core/schema/Schema.cjs.map +0 -1
- package/dist/development/core/schema/Schema.js.map +0 -1
- package/dist/development/core/schema/SchemaLoader.cjs +0 -28
- package/dist/development/core/schema/SchemaLoader.cjs.map +0 -1
- package/dist/development/core/schema/SchemaLoader.js +0 -28
- package/dist/development/core/schema/SchemaLoader.js.map +0 -1
- package/dist/development/core/schema/SchemaPreprocessor.cjs.map +0 -1
- package/dist/development/core/schema/SchemaPreprocessor.js.map +0 -1
- package/dist/development/core/state/StateIterator.cjs.map +0 -1
- package/dist/development/core/state/StateIterator.js.map +0 -1
- package/dist/development/core/state/getEntityMarker.cjs.map +0 -1
- package/dist/development/core/state/getEntityMarker.js.map +0 -1
- package/dist/development/core/utils/createQueryBuilder.cjs.map +0 -1
- package/dist/development/core/utils/createQueryBuilder.js.map +0 -1
- package/dist/development/core/utils/getCombinedSignal.cjs.map +0 -1
- package/dist/development/core/utils/getCombinedSignal.js.map +0 -1
- package/dist/development/dao/Environment.cjs.map +0 -1
- package/dist/development/dao/Environment.js.map +0 -1
- package/dist/development/dao/TreeNodeEnvironmentFactory.cjs.map +0 -1
- package/dist/development/dao/TreeNodeEnvironmentFactory.js.map +0 -1
- package/dist/development/dao/VariableFieldValue.cjs.map +0 -1
- package/dist/development/dao/VariableFieldValue.js.map +0 -1
- package/dist/development/fieldHelpers/helpers/FieldHelper.cjs +0 -17
- package/dist/development/fieldHelpers/helpers/FieldHelper.cjs.map +0 -1
- package/dist/development/fieldHelpers/helpers/FieldHelper.js +0 -17
- package/dist/development/fieldHelpers/helpers/FieldHelper.js.map +0 -1
- package/dist/development/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +0 -1
- package/dist/development/fieldHelpers/helpers/TemporalFieldHelper.js.map +0 -1
- package/dist/development/fieldHelpers/helpers/UuidFieldHelper.cjs.map +0 -1
- package/dist/development/fieldHelpers/helpers/UuidFieldHelper.js.map +0 -1
- package/dist/development/markers/EntityFieldMarkersContainer.cjs.map +0 -1
- package/dist/development/markers/EntityFieldMarkersContainer.js.map +0 -1
- package/dist/development/markers/EntityFieldsWithHoistablesMarker.cjs.map +0 -1
- package/dist/development/markers/EntityFieldsWithHoistablesMarker.js.map +0 -1
- package/dist/development/markers/EntityListSubTreeMarker.cjs +0 -23
- package/dist/development/markers/EntityListSubTreeMarker.cjs.map +0 -1
- package/dist/development/markers/EntityListSubTreeMarker.js +0 -23
- package/dist/development/markers/EntityListSubTreeMarker.js.map +0 -1
- package/dist/development/markers/EntitySubTreeMarker.cjs +0 -23
- package/dist/development/markers/EntitySubTreeMarker.cjs.map +0 -1
- package/dist/development/markers/EntitySubTreeMarker.js +0 -23
- package/dist/development/markers/EntitySubTreeMarker.js.map +0 -1
- package/dist/development/markers/FieldMarker.cjs +0 -20
- package/dist/development/markers/FieldMarker.cjs.map +0 -1
- package/dist/development/markers/FieldMarker.js +0 -20
- package/dist/development/markers/FieldMarker.js.map +0 -1
- package/dist/development/markers/HasManyRelationMarker.cjs +0 -29
- package/dist/development/markers/HasManyRelationMarker.cjs.map +0 -1
- package/dist/development/markers/HasManyRelationMarker.js +0 -29
- package/dist/development/markers/HasManyRelationMarker.js.map +0 -1
- package/dist/development/markers/HasOneRelationMarker.cjs +0 -23
- package/dist/development/markers/HasOneRelationMarker.cjs.map +0 -1
- package/dist/development/markers/HasOneRelationMarker.js +0 -23
- package/dist/development/markers/HasOneRelationMarker.js.map +0 -1
- package/dist/development/markers/MarkerTreeRoot.cjs.map +0 -1
- package/dist/development/markers/MarkerTreeRoot.js.map +0 -1
- package/dist/development/markers/ParentEntityMarker.cjs.map +0 -1
- package/dist/development/markers/ParentEntityMarker.js.map +0 -1
- package/dist/development/markers/PlaceholderGenerator.cjs.map +0 -1
- package/dist/development/markers/PlaceholderGenerator.js.map +0 -1
- package/dist/development/markers/PlaceholderParametersGenerator.cjs.map +0 -1
- package/dist/development/markers/PlaceholderParametersGenerator.js.map +0 -1
- package/dist/development/queryLanguage/CacheStore.cjs +0 -47
- package/dist/development/queryLanguage/CacheStore.cjs.map +0 -1
- package/dist/development/queryLanguage/CacheStore.js +0 -47
- package/dist/development/queryLanguage/CacheStore.js.map +0 -1
- package/dist/development/queryLanguage/MarkerFactory.cjs.map +0 -1
- package/dist/development/queryLanguage/MarkerFactory.js.map +0 -1
- package/dist/development/queryLanguage/Parser.cjs +0 -728
- package/dist/development/queryLanguage/Parser.cjs.map +0 -1
- package/dist/development/queryLanguage/Parser.js +0 -728
- package/dist/development/queryLanguage/Parser.js.map +0 -1
- package/dist/development/queryLanguage/QueryLanguage.cjs +0 -520
- package/dist/development/queryLanguage/QueryLanguage.cjs.map +0 -1
- package/dist/development/queryLanguage/QueryLanguage.js +0 -520
- package/dist/development/queryLanguage/QueryLanguage.js.map +0 -1
- package/dist/development/queryLanguage/QueryLanguageError.cjs.map +0 -1
- package/dist/development/queryLanguage/QueryLanguageError.js.map +0 -1
- package/dist/development/queryLanguage/tokenList.cjs +0 -150
- package/dist/development/queryLanguage/tokenList.cjs.map +0 -1
- package/dist/development/queryLanguage/tokenList.js +0 -151
- package/dist/development/queryLanguage/tokenList.js.map +0 -1
- package/dist/development/structures/BijectiveIndexedMap.cjs +0 -120
- package/dist/development/structures/BijectiveIndexedMap.cjs.map +0 -1
- package/dist/development/structures/BijectiveIndexedMap.js +0 -120
- package/dist/development/structures/BijectiveIndexedMap.js.map +0 -1
- package/dist/development/structures/LRUCache.cjs +0 -35
- package/dist/development/structures/LRUCache.cjs.map +0 -1
- package/dist/development/structures/LRUCache.js +0 -35
- package/dist/development/structures/LRUCache.js.map +0 -1
- package/dist/development/structures/WeakIdCache.cjs +0 -33
- package/dist/development/structures/WeakIdCache.cjs.map +0 -1
- package/dist/development/structures/WeakIdCache.js +0 -33
- package/dist/development/structures/WeakIdCache.js.map +0 -1
- package/dist/development/treeParameterHelpers/wrapFilterInHasOnes.cjs.map +0 -1
- package/dist/development/treeParameterHelpers/wrapFilterInHasOnes.js.map +0 -1
- package/dist/development/treeParameters/EntityCreationParameters.cjs.map +0 -1
- package/dist/development/treeParameters/EntityCreationParameters.js.map +0 -1
- package/dist/development/treeParameters/EntityListPreferences.cjs.map +0 -1
- package/dist/development/treeParameters/EntityListPreferences.js.map +0 -1
- package/dist/development/treeParameters/EventListenersStore.cjs.map +0 -1
- package/dist/development/treeParameters/EventListenersStore.js.map +0 -1
- package/dist/development/treeParameters/LeafField.cjs.map +0 -1
- package/dist/development/treeParameters/LeafField.js.map +0 -1
- package/dist/development/treeParameters/QualifiedEntityParameters.cjs.map +0 -1
- package/dist/development/treeParameters/QualifiedEntityParameters.js.map +0 -1
- package/dist/development/treeParameters/Relation.cjs.map +0 -1
- package/dist/development/treeParameters/Relation.js.map +0 -1
- package/dist/development/utils/Hashing.cjs.map +0 -1
- package/dist/development/utils/Hashing.js.map +0 -1
- package/dist/development/utils/TreeNodeUtils.cjs.map +0 -1
- package/dist/development/utils/TreeNodeUtils.js.map +0 -1
- package/dist/development/utils/assert.cjs +0 -11
- package/dist/development/utils/assert.cjs.map +0 -1
- package/dist/development/utils/assert.js +0 -11
- package/dist/development/utils/assert.js.map +0 -1
- package/dist/development/utils/assertNever.cjs.map +0 -1
- package/dist/development/utils/assertNever.js.map +0 -1
- package/dist/development/utils/generateEnumerabilityPreventingEntropy.cjs.map +0 -1
- package/dist/development/utils/generateEnumerabilityPreventingEntropy.js.map +0 -1
- package/dist/development/utils/isEmptyObject.cjs.map +0 -1
- package/dist/development/utils/isEmptyObject.js.map +0 -1
- package/dist/development/utils/ucfirst.cjs.map +0 -1
- package/dist/development/utils/ucfirst.js.map +0 -1
- package/dist/production/BindingError.cjs.map +0 -1
- package/dist/production/BindingError.js.map +0 -1
- package/dist/production/accessorTree/NormalizedPersistedData.cjs.map +0 -1
- package/dist/production/accessorTree/NormalizedPersistedData.js.map +0 -1
- package/dist/production/accessorTree/RuntimeId.cjs +0 -64
- package/dist/production/accessorTree/RuntimeId.cjs.map +0 -1
- package/dist/production/accessorTree/RuntimeId.js +0 -64
- package/dist/production/accessorTree/RuntimeId.js.map +0 -1
- package/dist/production/accessors/EntityAccessor.cjs.map +0 -1
- package/dist/production/accessors/EntityAccessor.js.map +0 -1
- package/dist/production/accessors/EntityListAccessor.cjs.map +0 -1
- package/dist/production/accessors/EntityListAccessor.js.map +0 -1
- package/dist/production/accessors/ErrorAccessor.cjs.map +0 -1
- package/dist/production/accessors/ErrorAccessor.js.map +0 -1
- package/dist/production/accessors/FieldAccessor.cjs.map +0 -1
- package/dist/production/accessors/FieldAccessor.js.map +0 -1
- package/dist/production/accessors/TreeRootAccessor.cjs.map +0 -1
- package/dist/production/accessors/TreeRootAccessor.js.map +0 -1
- package/dist/production/bindingTypes.cjs.map +0 -1
- package/dist/production/bindingTypes.js.map +0 -1
- package/dist/production/core/AccessorErrorManager.cjs +0 -207
- package/dist/production/core/AccessorErrorManager.cjs.map +0 -1
- package/dist/production/core/AccessorErrorManager.js +0 -207
- package/dist/production/core/AccessorErrorManager.js.map +0 -1
- package/dist/production/core/Config.cjs +0 -32
- package/dist/production/core/Config.cjs.map +0 -1
- package/dist/production/core/Config.js +0 -32
- package/dist/production/core/Config.js.map +0 -1
- package/dist/production/core/DataBinding.cjs +0 -353
- package/dist/production/core/DataBinding.cjs.map +0 -1
- package/dist/production/core/DataBinding.js +0 -353
- package/dist/production/core/DataBinding.js.map +0 -1
- package/dist/production/core/DirtinessTracker.cjs +0 -29
- package/dist/production/core/DirtinessTracker.cjs.map +0 -1
- package/dist/production/core/DirtinessTracker.js +0 -29
- package/dist/production/core/DirtinessTracker.js.map +0 -1
- package/dist/production/core/ErrorsPreprocessor.cjs +0 -181
- package/dist/production/core/ErrorsPreprocessor.cjs.map +0 -1
- package/dist/production/core/ErrorsPreprocessor.js +0 -181
- package/dist/production/core/ErrorsPreprocessor.js.map +0 -1
- package/dist/production/core/EventManager.cjs +0 -414
- package/dist/production/core/EventManager.cjs.map +0 -1
- package/dist/production/core/EventManager.js +0 -414
- package/dist/production/core/EventManager.js.map +0 -1
- package/dist/production/core/MarkerComparator.cjs.map +0 -1
- package/dist/production/core/MarkerComparator.js.map +0 -1
- package/dist/production/core/MarkerMerger.cjs +0 -252
- package/dist/production/core/MarkerMerger.cjs.map +0 -1
- package/dist/production/core/MarkerMerger.js +0 -252
- package/dist/production/core/MarkerMerger.js.map +0 -1
- package/dist/production/core/MutationGenerator.cjs +0 -665
- package/dist/production/core/MutationGenerator.cjs.map +0 -1
- package/dist/production/core/MutationGenerator.js +0 -665
- package/dist/production/core/MutationGenerator.js.map +0 -1
- package/dist/production/core/QueryGenerator.cjs.map +0 -1
- package/dist/production/core/QueryGenerator.js.map +0 -1
- package/dist/production/core/RealmKeyGenerator.cjs +0 -47
- package/dist/production/core/RealmKeyGenerator.cjs.map +0 -1
- package/dist/production/core/RealmKeyGenerator.js +0 -47
- package/dist/production/core/RealmKeyGenerator.js.map +0 -1
- package/dist/production/core/RequestResponseNormalizer.cjs.map +0 -1
- package/dist/production/core/RequestResponseNormalizer.js.map +0 -1
- package/dist/production/core/StateInitializer.cjs +0 -390
- package/dist/production/core/StateInitializer.cjs.map +0 -1
- package/dist/production/core/StateInitializer.js +0 -390
- package/dist/production/core/StateInitializer.js.map +0 -1
- package/dist/production/core/TreeAugmenter.cjs.map +0 -1
- package/dist/production/core/TreeAugmenter.js.map +0 -1
- package/dist/production/core/TreeFilterGenerator.cjs +0 -83
- package/dist/production/core/TreeFilterGenerator.cjs.map +0 -1
- package/dist/production/core/TreeFilterGenerator.js +0 -83
- package/dist/production/core/TreeFilterGenerator.js.map +0 -1
- package/dist/production/core/TreeParameterMerger.cjs.map +0 -1
- package/dist/production/core/TreeParameterMerger.js.map +0 -1
- package/dist/production/core/TreeStore.cjs +0 -182
- package/dist/production/core/TreeStore.cjs.map +0 -1
- package/dist/production/core/TreeStore.js +0 -182
- package/dist/production/core/TreeStore.js.map +0 -1
- package/dist/production/core/VariableInputTransformer.cjs.map +0 -1
- package/dist/production/core/VariableInputTransformer.js.map +0 -1
- package/dist/production/core/exceptions/ErrorLocator.cjs +0 -62
- package/dist/production/core/exceptions/ErrorLocator.cjs.map +0 -1
- package/dist/production/core/exceptions/ErrorLocator.js +0 -62
- package/dist/production/core/exceptions/ErrorLocator.js.map +0 -1
- package/dist/production/core/exceptions/LocalizedBindingError.cjs.map +0 -1
- package/dist/production/core/exceptions/LocalizedBindingError.js.map +0 -1
- package/dist/production/core/exceptions/MarkerSugarer.cjs.map +0 -1
- package/dist/production/core/exceptions/MarkerSugarer.js.map +0 -1
- package/dist/production/core/exceptions/TreeParameterSugarer.cjs.map +0 -1
- package/dist/production/core/exceptions/TreeParameterSugarer.js.map +0 -1
- package/dist/production/core/factories/createBatchUpdatesOptions.cjs.map +0 -1
- package/dist/production/core/factories/createBatchUpdatesOptions.js.map +0 -1
- package/dist/production/core/operations/EntityOperations.cjs +0 -233
- package/dist/production/core/operations/EntityOperations.cjs.map +0 -1
- package/dist/production/core/operations/EntityOperations.js +0 -233
- package/dist/production/core/operations/EntityOperations.js.map +0 -1
- package/dist/production/core/operations/FieldOperations.cjs +0 -76
- package/dist/production/core/operations/FieldOperations.cjs.map +0 -1
- package/dist/production/core/operations/FieldOperations.js +0 -76
- package/dist/production/core/operations/FieldOperations.js.map +0 -1
- package/dist/production/core/operations/ListOperations.cjs +0 -159
- package/dist/production/core/operations/ListOperations.cjs.map +0 -1
- package/dist/production/core/operations/ListOperations.js +0 -159
- package/dist/production/core/operations/ListOperations.js.map +0 -1
- package/dist/production/core/operations/OperationsHelpers.cjs.map +0 -1
- package/dist/production/core/operations/OperationsHelpers.js.map +0 -1
- package/dist/production/core/requestAliases/MutationAlias.cjs.map +0 -1
- package/dist/production/core/requestAliases/MutationAlias.js.map +0 -1
- package/dist/production/core/schema/Schema.cjs.map +0 -1
- package/dist/production/core/schema/Schema.js.map +0 -1
- package/dist/production/core/schema/SchemaLoader.cjs +0 -28
- package/dist/production/core/schema/SchemaLoader.cjs.map +0 -1
- package/dist/production/core/schema/SchemaLoader.js +0 -28
- package/dist/production/core/schema/SchemaLoader.js.map +0 -1
- package/dist/production/core/schema/SchemaPreprocessor.cjs.map +0 -1
- package/dist/production/core/schema/SchemaPreprocessor.js.map +0 -1
- package/dist/production/core/state/StateIterator.cjs.map +0 -1
- package/dist/production/core/state/StateIterator.js.map +0 -1
- package/dist/production/core/state/getEntityMarker.cjs.map +0 -1
- package/dist/production/core/state/getEntityMarker.js.map +0 -1
- package/dist/production/core/utils/createQueryBuilder.cjs.map +0 -1
- package/dist/production/core/utils/createQueryBuilder.js.map +0 -1
- package/dist/production/core/utils/getCombinedSignal.cjs.map +0 -1
- package/dist/production/core/utils/getCombinedSignal.js.map +0 -1
- package/dist/production/dao/Environment.cjs.map +0 -1
- package/dist/production/dao/Environment.js.map +0 -1
- package/dist/production/dao/TreeNodeEnvironmentFactory.cjs.map +0 -1
- package/dist/production/dao/TreeNodeEnvironmentFactory.js.map +0 -1
- package/dist/production/dao/VariableFieldValue.cjs.map +0 -1
- package/dist/production/dao/VariableFieldValue.js.map +0 -1
- package/dist/production/fieldHelpers/helpers/FieldHelper.cjs +0 -17
- package/dist/production/fieldHelpers/helpers/FieldHelper.cjs.map +0 -1
- package/dist/production/fieldHelpers/helpers/FieldHelper.js +0 -17
- package/dist/production/fieldHelpers/helpers/FieldHelper.js.map +0 -1
- package/dist/production/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +0 -1
- package/dist/production/fieldHelpers/helpers/TemporalFieldHelper.js.map +0 -1
- package/dist/production/fieldHelpers/helpers/UuidFieldHelper.cjs.map +0 -1
- package/dist/production/fieldHelpers/helpers/UuidFieldHelper.js.map +0 -1
- package/dist/production/markers/EntityFieldMarkersContainer.cjs.map +0 -1
- package/dist/production/markers/EntityFieldMarkersContainer.js.map +0 -1
- package/dist/production/markers/EntityFieldsWithHoistablesMarker.cjs.map +0 -1
- package/dist/production/markers/EntityFieldsWithHoistablesMarker.js.map +0 -1
- package/dist/production/markers/EntityListSubTreeMarker.cjs +0 -23
- package/dist/production/markers/EntityListSubTreeMarker.cjs.map +0 -1
- package/dist/production/markers/EntityListSubTreeMarker.js +0 -23
- package/dist/production/markers/EntityListSubTreeMarker.js.map +0 -1
- package/dist/production/markers/EntitySubTreeMarker.cjs +0 -23
- package/dist/production/markers/EntitySubTreeMarker.cjs.map +0 -1
- package/dist/production/markers/EntitySubTreeMarker.js +0 -23
- package/dist/production/markers/EntitySubTreeMarker.js.map +0 -1
- package/dist/production/markers/FieldMarker.cjs +0 -20
- package/dist/production/markers/FieldMarker.cjs.map +0 -1
- package/dist/production/markers/FieldMarker.js +0 -20
- package/dist/production/markers/FieldMarker.js.map +0 -1
- package/dist/production/markers/HasManyRelationMarker.cjs +0 -23
- package/dist/production/markers/HasManyRelationMarker.cjs.map +0 -1
- package/dist/production/markers/HasManyRelationMarker.js +0 -23
- package/dist/production/markers/HasManyRelationMarker.js.map +0 -1
- package/dist/production/markers/HasOneRelationMarker.cjs +0 -23
- package/dist/production/markers/HasOneRelationMarker.cjs.map +0 -1
- package/dist/production/markers/HasOneRelationMarker.js +0 -23
- package/dist/production/markers/HasOneRelationMarker.js.map +0 -1
- package/dist/production/markers/MarkerTreeRoot.cjs.map +0 -1
- package/dist/production/markers/MarkerTreeRoot.js.map +0 -1
- package/dist/production/markers/ParentEntityMarker.cjs.map +0 -1
- package/dist/production/markers/ParentEntityMarker.js.map +0 -1
- package/dist/production/markers/PlaceholderGenerator.cjs.map +0 -1
- package/dist/production/markers/PlaceholderGenerator.js.map +0 -1
- package/dist/production/markers/PlaceholderParametersGenerator.cjs.map +0 -1
- package/dist/production/markers/PlaceholderParametersGenerator.js.map +0 -1
- package/dist/production/queryLanguage/CacheStore.cjs +0 -47
- package/dist/production/queryLanguage/CacheStore.cjs.map +0 -1
- package/dist/production/queryLanguage/CacheStore.js +0 -47
- package/dist/production/queryLanguage/CacheStore.js.map +0 -1
- package/dist/production/queryLanguage/MarkerFactory.cjs.map +0 -1
- package/dist/production/queryLanguage/MarkerFactory.js.map +0 -1
- package/dist/production/queryLanguage/Parser.cjs +0 -725
- package/dist/production/queryLanguage/Parser.cjs.map +0 -1
- package/dist/production/queryLanguage/Parser.js +0 -725
- package/dist/production/queryLanguage/Parser.js.map +0 -1
- package/dist/production/queryLanguage/QueryLanguage.cjs +0 -517
- package/dist/production/queryLanguage/QueryLanguage.cjs.map +0 -1
- package/dist/production/queryLanguage/QueryLanguage.js +0 -517
- package/dist/production/queryLanguage/QueryLanguage.js.map +0 -1
- package/dist/production/queryLanguage/QueryLanguageError.cjs.map +0 -1
- package/dist/production/queryLanguage/QueryLanguageError.js.map +0 -1
- package/dist/production/queryLanguage/tokenList.cjs +0 -150
- package/dist/production/queryLanguage/tokenList.cjs.map +0 -1
- package/dist/production/queryLanguage/tokenList.js +0 -151
- package/dist/production/queryLanguage/tokenList.js.map +0 -1
- package/dist/production/structures/BijectiveIndexedMap.cjs +0 -120
- package/dist/production/structures/BijectiveIndexedMap.cjs.map +0 -1
- package/dist/production/structures/BijectiveIndexedMap.js +0 -120
- package/dist/production/structures/BijectiveIndexedMap.js.map +0 -1
- package/dist/production/structures/LRUCache.cjs +0 -35
- package/dist/production/structures/LRUCache.cjs.map +0 -1
- package/dist/production/structures/LRUCache.js +0 -35
- package/dist/production/structures/LRUCache.js.map +0 -1
- package/dist/production/structures/WeakIdCache.cjs +0 -33
- package/dist/production/structures/WeakIdCache.cjs.map +0 -1
- package/dist/production/structures/WeakIdCache.js +0 -33
- package/dist/production/structures/WeakIdCache.js.map +0 -1
- package/dist/production/treeParameterHelpers/wrapFilterInHasOnes.cjs.map +0 -1
- package/dist/production/treeParameterHelpers/wrapFilterInHasOnes.js.map +0 -1
- package/dist/production/treeParameters/EntityCreationParameters.cjs.map +0 -1
- package/dist/production/treeParameters/EntityCreationParameters.js.map +0 -1
- package/dist/production/treeParameters/EntityListPreferences.cjs.map +0 -1
- package/dist/production/treeParameters/EntityListPreferences.js.map +0 -1
- package/dist/production/treeParameters/EventListenersStore.cjs.map +0 -1
- package/dist/production/treeParameters/EventListenersStore.js.map +0 -1
- package/dist/production/treeParameters/LeafField.cjs.map +0 -1
- package/dist/production/treeParameters/LeafField.js.map +0 -1
- package/dist/production/treeParameters/QualifiedEntityParameters.cjs.map +0 -1
- package/dist/production/treeParameters/QualifiedEntityParameters.js.map +0 -1
- package/dist/production/treeParameters/Relation.cjs.map +0 -1
- package/dist/production/treeParameters/Relation.js.map +0 -1
- package/dist/production/utils/Hashing.cjs.map +0 -1
- package/dist/production/utils/Hashing.js.map +0 -1
- package/dist/production/utils/TreeNodeUtils.cjs.map +0 -1
- package/dist/production/utils/TreeNodeUtils.js.map +0 -1
- package/dist/production/utils/assert.cjs +0 -11
- package/dist/production/utils/assert.cjs.map +0 -1
- package/dist/production/utils/assert.js +0 -11
- package/dist/production/utils/assert.js.map +0 -1
- package/dist/production/utils/assertNever.cjs.map +0 -1
- package/dist/production/utils/assertNever.js.map +0 -1
- package/dist/production/utils/generateEnumerabilityPreventingEntropy.cjs.map +0 -1
- package/dist/production/utils/generateEnumerabilityPreventingEntropy.js.map +0 -1
- package/dist/production/utils/isEmptyObject.cjs.map +0 -1
- package/dist/production/utils/isEmptyObject.js.map +0 -1
- package/dist/production/utils/ucfirst.cjs.map +0 -1
- package/dist/production/utils/ucfirst.js.map +0 -1
- /package/dist/development/{BindingError.cjs → src/BindingError.cjs} +0 -0
- /package/dist/development/{BindingError.js → src/BindingError.js} +0 -0
- /package/dist/development/{accessorTree → src/accessorTree}/NormalizedPersistedData.cjs +0 -0
- /package/dist/development/{accessorTree → src/accessorTree}/NormalizedPersistedData.js +0 -0
- /package/dist/development/{accessors → src/accessors}/EntityAccessor.cjs +0 -0
- /package/dist/development/{accessors → src/accessors}/EntityAccessor.js +0 -0
- /package/dist/development/{accessors → src/accessors}/EntityListAccessor.cjs +0 -0
- /package/dist/development/{accessors → src/accessors}/EntityListAccessor.js +0 -0
- /package/dist/development/{accessors → src/accessors}/ErrorAccessor.cjs +0 -0
- /package/dist/development/{accessors → src/accessors}/ErrorAccessor.js +0 -0
- /package/dist/development/{accessors → src/accessors}/FieldAccessor.cjs +0 -0
- /package/dist/development/{accessors → src/accessors}/FieldAccessor.js +0 -0
- /package/dist/development/{accessors → src/accessors}/TreeRootAccessor.cjs +0 -0
- /package/dist/development/{accessors → src/accessors}/TreeRootAccessor.js +0 -0
- /package/dist/development/{bindingTypes.cjs → src/bindingTypes.cjs} +0 -0
- /package/dist/development/{bindingTypes.js → src/bindingTypes.js} +0 -0
- /package/dist/development/{core → src/core}/MarkerComparator.cjs +0 -0
- /package/dist/development/{core → src/core}/MarkerComparator.js +0 -0
- /package/dist/development/{core → src/core}/QueryGenerator.cjs +0 -0
- /package/dist/development/{core → src/core}/QueryGenerator.js +0 -0
- /package/dist/development/{core → src/core}/RequestResponseNormalizer.cjs +0 -0
- /package/dist/development/{core → src/core}/RequestResponseNormalizer.js +0 -0
- /package/dist/development/{core → src/core}/TreeAugmenter.cjs +0 -0
- /package/dist/development/{core → src/core}/TreeAugmenter.js +0 -0
- /package/dist/development/{core → src/core}/TreeParameterMerger.cjs +0 -0
- /package/dist/development/{core → src/core}/TreeParameterMerger.js +0 -0
- /package/dist/development/{core → src/core}/VariableInputTransformer.cjs +0 -0
- /package/dist/development/{core → src/core}/VariableInputTransformer.js +0 -0
- /package/dist/development/{core → src/core}/exceptions/LocalizedBindingError.cjs +0 -0
- /package/dist/development/{core → src/core}/exceptions/LocalizedBindingError.js +0 -0
- /package/dist/development/{core → src/core}/exceptions/MarkerSugarer.cjs +0 -0
- /package/dist/development/{core → src/core}/exceptions/MarkerSugarer.js +0 -0
- /package/dist/development/{core → src/core}/exceptions/TreeParameterSugarer.cjs +0 -0
- /package/dist/development/{core → src/core}/exceptions/TreeParameterSugarer.js +0 -0
- /package/dist/development/{core → src/core}/factories/createBatchUpdatesOptions.cjs +0 -0
- /package/dist/development/{core → src/core}/factories/createBatchUpdatesOptions.js +0 -0
- /package/dist/development/{core → src/core}/operations/FieldOperations.cjs +0 -0
- /package/dist/development/{core → src/core}/operations/FieldOperations.js +0 -0
- /package/dist/development/{core → src/core}/operations/OperationsHelpers.cjs +0 -0
- /package/dist/development/{core → src/core}/operations/OperationsHelpers.js +0 -0
- /package/dist/development/{core → src/core}/requestAliases/MutationAlias.cjs +0 -0
- /package/dist/development/{core → src/core}/requestAliases/MutationAlias.js +0 -0
- /package/dist/development/{core → src/core}/schema/Schema.cjs +0 -0
- /package/dist/development/{core → src/core}/schema/Schema.js +0 -0
- /package/dist/development/{core → src/core}/schema/SchemaPreprocessor.cjs +0 -0
- /package/dist/development/{core → src/core}/schema/SchemaPreprocessor.js +0 -0
- /package/dist/development/{core → src/core}/state/StateIterator.cjs +0 -0
- /package/dist/development/{core → src/core}/state/StateIterator.js +0 -0
- /package/dist/development/{core → src/core}/state/getEntityMarker.cjs +0 -0
- /package/dist/development/{core → src/core}/state/getEntityMarker.js +0 -0
- /package/dist/development/{core → src/core}/utils/createQueryBuilder.cjs +0 -0
- /package/dist/development/{core → src/core}/utils/createQueryBuilder.js +0 -0
- /package/dist/development/{core → src/core}/utils/getCombinedSignal.cjs +0 -0
- /package/dist/development/{core → src/core}/utils/getCombinedSignal.js +0 -0
- /package/dist/development/{dao → src/dao}/Environment.cjs +0 -0
- /package/dist/development/{dao → src/dao}/Environment.js +0 -0
- /package/dist/development/{dao → src/dao}/TreeNodeEnvironmentFactory.cjs +0 -0
- /package/dist/development/{dao → src/dao}/TreeNodeEnvironmentFactory.js +0 -0
- /package/dist/development/{dao → src/dao}/VariableFieldValue.cjs +0 -0
- /package/dist/development/{dao → src/dao}/VariableFieldValue.js +0 -0
- /package/dist/development/{fieldHelpers → src/fieldHelpers}/helpers/TemporalFieldHelper.cjs +0 -0
- /package/dist/development/{fieldHelpers → src/fieldHelpers}/helpers/TemporalFieldHelper.js +0 -0
- /package/dist/development/{fieldHelpers → src/fieldHelpers}/helpers/UuidFieldHelper.cjs +0 -0
- /package/dist/development/{fieldHelpers → src/fieldHelpers}/helpers/UuidFieldHelper.js +0 -0
- /package/dist/development/{markers → src/markers}/EntityFieldMarkersContainer.cjs +0 -0
- /package/dist/development/{markers → src/markers}/EntityFieldMarkersContainer.js +0 -0
- /package/dist/development/{markers → src/markers}/EntityFieldsWithHoistablesMarker.cjs +0 -0
- /package/dist/development/{markers → src/markers}/EntityFieldsWithHoistablesMarker.js +0 -0
- /package/dist/development/{markers → src/markers}/MarkerTreeRoot.cjs +0 -0
- /package/dist/development/{markers → src/markers}/MarkerTreeRoot.js +0 -0
- /package/dist/development/{markers → src/markers}/ParentEntityMarker.cjs +0 -0
- /package/dist/development/{markers → src/markers}/ParentEntityMarker.js +0 -0
- /package/dist/development/{markers → src/markers}/PlaceholderGenerator.cjs +0 -0
- /package/dist/development/{markers → src/markers}/PlaceholderGenerator.js +0 -0
- /package/dist/development/{markers → src/markers}/PlaceholderParametersGenerator.cjs +0 -0
- /package/dist/development/{markers → src/markers}/PlaceholderParametersGenerator.js +0 -0
- /package/dist/development/{queryLanguage → src/queryLanguage}/MarkerFactory.cjs +0 -0
- /package/dist/development/{queryLanguage → src/queryLanguage}/MarkerFactory.js +0 -0
- /package/dist/development/{queryLanguage → src/queryLanguage}/QueryLanguageError.cjs +0 -0
- /package/dist/development/{queryLanguage → src/queryLanguage}/QueryLanguageError.js +0 -0
- /package/dist/development/{treeParameterHelpers → src/treeParameterHelpers}/wrapFilterInHasOnes.cjs +0 -0
- /package/dist/development/{treeParameterHelpers → src/treeParameterHelpers}/wrapFilterInHasOnes.js +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/EntityCreationParameters.cjs +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/EntityCreationParameters.js +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/EntityListPreferences.cjs +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/EntityListPreferences.js +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/EventListenersStore.cjs +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/EventListenersStore.js +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/LeafField.cjs +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/LeafField.js +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/QualifiedEntityParameters.cjs +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/QualifiedEntityParameters.js +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/Relation.cjs +0 -0
- /package/dist/development/{treeParameters → src/treeParameters}/Relation.js +0 -0
- /package/dist/development/{utils → src/utils}/Hashing.cjs +0 -0
- /package/dist/development/{utils → src/utils}/Hashing.js +0 -0
- /package/dist/development/{utils → src/utils}/TreeNodeUtils.cjs +0 -0
- /package/dist/development/{utils → src/utils}/TreeNodeUtils.js +0 -0
- /package/dist/development/{utils → src/utils}/assertNever.cjs +0 -0
- /package/dist/development/{utils → src/utils}/assertNever.js +0 -0
- /package/dist/development/{utils → src/utils}/generateEnumerabilityPreventingEntropy.cjs +0 -0
- /package/dist/development/{utils → src/utils}/generateEnumerabilityPreventingEntropy.js +0 -0
- /package/dist/development/{utils → src/utils}/isEmptyObject.cjs +0 -0
- /package/dist/development/{utils → src/utils}/isEmptyObject.js +0 -0
- /package/dist/development/{utils → src/utils}/ucfirst.cjs +0 -0
- /package/dist/development/{utils → src/utils}/ucfirst.js +0 -0
- /package/dist/production/{BindingError.cjs → src/BindingError.cjs} +0 -0
- /package/dist/production/{BindingError.js → src/BindingError.js} +0 -0
- /package/dist/production/{accessorTree → src/accessorTree}/NormalizedPersistedData.cjs +0 -0
- /package/dist/production/{accessorTree → src/accessorTree}/NormalizedPersistedData.js +0 -0
- /package/dist/production/{accessors → src/accessors}/EntityAccessor.cjs +0 -0
- /package/dist/production/{accessors → src/accessors}/EntityAccessor.js +0 -0
- /package/dist/production/{accessors → src/accessors}/EntityListAccessor.cjs +0 -0
- /package/dist/production/{accessors → src/accessors}/EntityListAccessor.js +0 -0
- /package/dist/production/{accessors → src/accessors}/ErrorAccessor.cjs +0 -0
- /package/dist/production/{accessors → src/accessors}/ErrorAccessor.js +0 -0
- /package/dist/production/{accessors → src/accessors}/FieldAccessor.cjs +0 -0
- /package/dist/production/{accessors → src/accessors}/FieldAccessor.js +0 -0
- /package/dist/production/{accessors → src/accessors}/TreeRootAccessor.cjs +0 -0
- /package/dist/production/{accessors → src/accessors}/TreeRootAccessor.js +0 -0
- /package/dist/production/{bindingTypes.cjs → src/bindingTypes.cjs} +0 -0
- /package/dist/production/{bindingTypes.js → src/bindingTypes.js} +0 -0
- /package/dist/production/{core → src/core}/MarkerComparator.cjs +0 -0
- /package/dist/production/{core → src/core}/MarkerComparator.js +0 -0
- /package/dist/production/{core → src/core}/QueryGenerator.cjs +0 -0
- /package/dist/production/{core → src/core}/QueryGenerator.js +0 -0
- /package/dist/production/{core → src/core}/RequestResponseNormalizer.cjs +0 -0
- /package/dist/production/{core → src/core}/RequestResponseNormalizer.js +0 -0
- /package/dist/production/{core → src/core}/TreeAugmenter.cjs +0 -0
- /package/dist/production/{core → src/core}/TreeAugmenter.js +0 -0
- /package/dist/production/{core → src/core}/TreeParameterMerger.cjs +0 -0
- /package/dist/production/{core → src/core}/TreeParameterMerger.js +0 -0
- /package/dist/production/{core → src/core}/VariableInputTransformer.cjs +0 -0
- /package/dist/production/{core → src/core}/VariableInputTransformer.js +0 -0
- /package/dist/production/{core → src/core}/exceptions/LocalizedBindingError.cjs +0 -0
- /package/dist/production/{core → src/core}/exceptions/LocalizedBindingError.js +0 -0
- /package/dist/production/{core → src/core}/exceptions/MarkerSugarer.cjs +0 -0
- /package/dist/production/{core → src/core}/exceptions/MarkerSugarer.js +0 -0
- /package/dist/production/{core → src/core}/exceptions/TreeParameterSugarer.cjs +0 -0
- /package/dist/production/{core → src/core}/exceptions/TreeParameterSugarer.js +0 -0
- /package/dist/production/{core → src/core}/factories/createBatchUpdatesOptions.cjs +0 -0
- /package/dist/production/{core → src/core}/factories/createBatchUpdatesOptions.js +0 -0
- /package/dist/production/{core → src/core}/operations/OperationsHelpers.cjs +0 -0
- /package/dist/production/{core → src/core}/operations/OperationsHelpers.js +0 -0
- /package/dist/production/{core → src/core}/requestAliases/MutationAlias.cjs +0 -0
- /package/dist/production/{core → src/core}/requestAliases/MutationAlias.js +0 -0
- /package/dist/production/{core → src/core}/schema/Schema.cjs +0 -0
- /package/dist/production/{core → src/core}/schema/Schema.js +0 -0
- /package/dist/production/{core → src/core}/schema/SchemaPreprocessor.cjs +0 -0
- /package/dist/production/{core → src/core}/schema/SchemaPreprocessor.js +0 -0
- /package/dist/production/{core → src/core}/state/StateIterator.cjs +0 -0
- /package/dist/production/{core → src/core}/state/StateIterator.js +0 -0
- /package/dist/production/{core → src/core}/state/getEntityMarker.cjs +0 -0
- /package/dist/production/{core → src/core}/state/getEntityMarker.js +0 -0
- /package/dist/production/{core → src/core}/utils/createQueryBuilder.cjs +0 -0
- /package/dist/production/{core → src/core}/utils/createQueryBuilder.js +0 -0
- /package/dist/production/{core → src/core}/utils/getCombinedSignal.cjs +0 -0
- /package/dist/production/{core → src/core}/utils/getCombinedSignal.js +0 -0
- /package/dist/production/{dao → src/dao}/Environment.cjs +0 -0
- /package/dist/production/{dao → src/dao}/Environment.js +0 -0
- /package/dist/production/{dao → src/dao}/TreeNodeEnvironmentFactory.cjs +0 -0
- /package/dist/production/{dao → src/dao}/TreeNodeEnvironmentFactory.js +0 -0
- /package/dist/production/{dao → src/dao}/VariableFieldValue.cjs +0 -0
- /package/dist/production/{dao → src/dao}/VariableFieldValue.js +0 -0
- /package/dist/production/{fieldHelpers → src/fieldHelpers}/helpers/TemporalFieldHelper.cjs +0 -0
- /package/dist/production/{fieldHelpers → src/fieldHelpers}/helpers/TemporalFieldHelper.js +0 -0
- /package/dist/production/{fieldHelpers → src/fieldHelpers}/helpers/UuidFieldHelper.cjs +0 -0
- /package/dist/production/{fieldHelpers → src/fieldHelpers}/helpers/UuidFieldHelper.js +0 -0
- /package/dist/production/{markers → src/markers}/EntityFieldMarkersContainer.cjs +0 -0
- /package/dist/production/{markers → src/markers}/EntityFieldMarkersContainer.js +0 -0
- /package/dist/production/{markers → src/markers}/EntityFieldsWithHoistablesMarker.cjs +0 -0
- /package/dist/production/{markers → src/markers}/EntityFieldsWithHoistablesMarker.js +0 -0
- /package/dist/production/{markers → src/markers}/MarkerTreeRoot.cjs +0 -0
- /package/dist/production/{markers → src/markers}/MarkerTreeRoot.js +0 -0
- /package/dist/production/{markers → src/markers}/ParentEntityMarker.cjs +0 -0
- /package/dist/production/{markers → src/markers}/ParentEntityMarker.js +0 -0
- /package/dist/production/{markers → src/markers}/PlaceholderGenerator.cjs +0 -0
- /package/dist/production/{markers → src/markers}/PlaceholderGenerator.js +0 -0
- /package/dist/production/{markers → src/markers}/PlaceholderParametersGenerator.cjs +0 -0
- /package/dist/production/{markers → src/markers}/PlaceholderParametersGenerator.js +0 -0
- /package/dist/production/{queryLanguage → src/queryLanguage}/MarkerFactory.cjs +0 -0
- /package/dist/production/{queryLanguage → src/queryLanguage}/MarkerFactory.js +0 -0
- /package/dist/production/{queryLanguage → src/queryLanguage}/QueryLanguageError.cjs +0 -0
- /package/dist/production/{queryLanguage → src/queryLanguage}/QueryLanguageError.js +0 -0
- /package/dist/production/{treeParameterHelpers → src/treeParameterHelpers}/wrapFilterInHasOnes.cjs +0 -0
- /package/dist/production/{treeParameterHelpers → src/treeParameterHelpers}/wrapFilterInHasOnes.js +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/EntityCreationParameters.cjs +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/EntityCreationParameters.js +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/EntityListPreferences.cjs +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/EntityListPreferences.js +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/EventListenersStore.cjs +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/EventListenersStore.js +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/LeafField.cjs +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/LeafField.js +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/QualifiedEntityParameters.cjs +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/QualifiedEntityParameters.js +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/Relation.cjs +0 -0
- /package/dist/production/{treeParameters → src/treeParameters}/Relation.js +0 -0
- /package/dist/production/{utils → src/utils}/Hashing.cjs +0 -0
- /package/dist/production/{utils → src/utils}/Hashing.js +0 -0
- /package/dist/production/{utils → src/utils}/TreeNodeUtils.cjs +0 -0
- /package/dist/production/{utils → src/utils}/TreeNodeUtils.js +0 -0
- /package/dist/production/{utils → src/utils}/assertNever.cjs +0 -0
- /package/dist/production/{utils → src/utils}/assertNever.js +0 -0
- /package/dist/production/{utils → src/utils}/generateEnumerabilityPreventingEntropy.cjs +0 -0
- /package/dist/production/{utils → src/utils}/generateEnumerabilityPreventingEntropy.js +0 -0
- /package/dist/production/{utils → src/utils}/isEmptyObject.cjs +0 -0
- /package/dist/production/{utils → src/utils}/isEmptyObject.js +0 -0
- /package/dist/production/{utils → src/utils}/ucfirst.cjs +0 -0
- /package/dist/production/{utils → src/utils}/ucfirst.js +0 -0
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { StateIterator } from "./state/StateIterator.js";
|
|
2
|
-
import { ServerId } from "../accessorTree/RuntimeId.js";
|
|
3
|
-
import { HasOneRelationMarker } from "../markers/HasOneRelationMarker.js";
|
|
4
|
-
import { HasManyRelationMarker } from "../markers/HasManyRelationMarker.js";
|
|
5
|
-
import { assertNever } from "../utils/assertNever.js";
|
|
6
|
-
class TreeFilterGenerator {
|
|
7
|
-
constructor(treeStore) {
|
|
8
|
-
this.treeStore = treeStore;
|
|
9
|
-
}
|
|
10
|
-
generateTreeFilter() {
|
|
11
|
-
const filters = [];
|
|
12
|
-
for (const [placeholderName, state] of StateIterator.eachRootState(this.treeStore)) {
|
|
13
|
-
const blueprint = state.blueprint;
|
|
14
|
-
if (blueprint.parent || blueprint.marker.parameters.expectedMutation === "none") {
|
|
15
|
-
continue;
|
|
16
|
-
}
|
|
17
|
-
const marker = blueprint.marker;
|
|
18
|
-
filters.push(this.generateSubTreeFilter(marker, this.treeStore.subTreePersistedData.get(placeholderName)));
|
|
19
|
-
}
|
|
20
|
-
return filters.flat();
|
|
21
|
-
}
|
|
22
|
-
generateSubTreeFilter(subTree, persistedData) {
|
|
23
|
-
const filters = [];
|
|
24
|
-
if (persistedData === void 0) {
|
|
25
|
-
return filters;
|
|
26
|
-
}
|
|
27
|
-
if (persistedData instanceof ServerId) {
|
|
28
|
-
const filter = this.generateTopLevelEntityFilter(
|
|
29
|
-
persistedData.value,
|
|
30
|
-
subTree.parameters.entityName,
|
|
31
|
-
subTree.fields
|
|
32
|
-
);
|
|
33
|
-
filter && filters.push(filter);
|
|
34
|
-
} else {
|
|
35
|
-
for (const id of persistedData) {
|
|
36
|
-
const filter = this.generateTopLevelEntityFilter(id, subTree.parameters.entityName, subTree.fields);
|
|
37
|
-
filter && filters.push(filter);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return filters;
|
|
41
|
-
}
|
|
42
|
-
generateTopLevelEntityFilter(id, entityName, fields) {
|
|
43
|
-
return {
|
|
44
|
-
entity: entityName,
|
|
45
|
-
id,
|
|
46
|
-
relations: this.generateEntityRelations(fields)
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
generateEntityRelations(markers) {
|
|
50
|
-
const rawFilter = this.populateRawRelationFilters(markers);
|
|
51
|
-
return this.normalizeRawRelationFilters(rawFilter);
|
|
52
|
-
}
|
|
53
|
-
normalizeRawRelationFilters(raw) {
|
|
54
|
-
return Array.from(raw, ([fieldName, relations]) => ({
|
|
55
|
-
name: fieldName,
|
|
56
|
-
relations: this.normalizeRawRelationFilters(relations)
|
|
57
|
-
}));
|
|
58
|
-
}
|
|
59
|
-
populateRawRelationFilters(markers, relations = /* @__PURE__ */ new Map()) {
|
|
60
|
-
for (const [, marker] of markers.markers) {
|
|
61
|
-
if (!(marker instanceof HasOneRelationMarker) && !(marker instanceof HasManyRelationMarker)) {
|
|
62
|
-
continue;
|
|
63
|
-
}
|
|
64
|
-
if (marker.parameters.expectedMutation === "none" || marker.parameters.expectedMutation === "connectOrDisconnect") {
|
|
65
|
-
continue;
|
|
66
|
-
} else if (marker.parameters.expectedMutation === "anyMutation" || marker.parameters.expectedMutation === "createOrDelete")
|
|
67
|
-
;
|
|
68
|
-
else {
|
|
69
|
-
return assertNever(marker.parameters.expectedMutation);
|
|
70
|
-
}
|
|
71
|
-
let existingRelation = relations.get(marker.parameters.field);
|
|
72
|
-
if (existingRelation === void 0) {
|
|
73
|
-
relations.set(marker.parameters.field, existingRelation = /* @__PURE__ */ new Map());
|
|
74
|
-
}
|
|
75
|
-
this.populateRawRelationFilters(marker.fields, existingRelation);
|
|
76
|
-
}
|
|
77
|
-
return relations;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
export {
|
|
81
|
-
TreeFilterGenerator
|
|
82
|
-
};
|
|
83
|
-
//# sourceMappingURL=TreeFilterGenerator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TreeFilterGenerator.js","sources":["../../../src/core/TreeFilterGenerator.ts"],"sourcesContent":["import type { RelationFilter, TreeFilter } from '@contember/client'\nimport { EntityListPersistedData, ServerId } from '../accessorTree'\nimport {\n\tEntityFieldMarkersContainer,\n\tEntityListSubTreeMarker,\n\tEntitySubTreeMarker,\n\tHasManyRelationMarker,\n\tHasOneRelationMarker,\n} from '../markers'\nimport type { EntityId, EntityName } from '../treeParameters'\nimport { assertNever } from '../utils'\nimport { StateIterator } from './state'\nimport type { TreeStore } from './TreeStore'\n\ntype RawRelationFilters = Map<string, RawRelationFilters>\n\nexport class TreeFilterGenerator {\n\tpublic constructor(private readonly treeStore: TreeStore) {}\n\n\tpublic generateTreeFilter(): TreeFilter[] {\n\t\tconst filters: TreeFilter[][] = []\n\n\t\tfor (const [placeholderName, state] of StateIterator.eachRootState(this.treeStore)) {\n\t\t\tconst blueprint = state.blueprint\n\n\t\t\tif (blueprint.parent || blueprint.marker.parameters.expectedMutation === 'none') {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst marker = blueprint.marker\n\t\t\tfilters.push(this.generateSubTreeFilter(marker, this.treeStore.subTreePersistedData.get(placeholderName)))\n\t\t}\n\t\treturn filters.flat()\n\t}\n\n\tprivate generateSubTreeFilter(\n\t\tsubTree: EntitySubTreeMarker | EntityListSubTreeMarker,\n\t\tpersistedData: ServerId | EntityListPersistedData | undefined,\n\t): TreeFilter[] {\n\t\tconst filters: TreeFilter[] = []\n\n\t\tif (persistedData === undefined) {\n\t\t\treturn filters // Do nothing\n\t\t}\n\n\t\tif (persistedData instanceof ServerId) {\n\t\t\tconst filter = this.generateTopLevelEntityFilter(\n\t\t\t\tpersistedData.value,\n\t\t\t\tsubTree.parameters.entityName,\n\t\t\t\tsubTree.fields,\n\t\t\t)\n\t\t\tfilter && filters.push(filter)\n\t\t} else {\n\t\t\tfor (const id of persistedData) {\n\t\t\t\tconst filter = this.generateTopLevelEntityFilter(id, subTree.parameters.entityName, subTree.fields)\n\t\t\t\tfilter && filters.push(filter)\n\t\t\t}\n\t\t}\n\n\t\treturn filters\n\t}\n\n\tprivate generateTopLevelEntityFilter(\n\t\tid: EntityId,\n\t\tentityName: EntityName,\n\t\tfields: EntityFieldMarkersContainer,\n\t): TreeFilter | undefined {\n\t\treturn {\n\t\t\tentity: entityName,\n\t\t\tid: id,\n\t\t\trelations: this.generateEntityRelations(fields),\n\t\t}\n\t}\n\n\tprivate generateEntityRelations(markers: EntityFieldMarkersContainer): RelationFilter[] {\n\t\tconst rawFilter = this.populateRawRelationFilters(markers)\n\t\treturn this.normalizeRawRelationFilters(rawFilter)\n\t}\n\n\tprivate normalizeRawRelationFilters(raw: RawRelationFilters): RelationFilter[] {\n\t\treturn Array.from(raw, ([fieldName, relations]) => ({\n\t\t\tname: fieldName,\n\t\t\trelations: this.normalizeRawRelationFilters(relations),\n\t\t}))\n\t}\n\n\tprivate populateRawRelationFilters(\n\t\tmarkers: EntityFieldMarkersContainer,\n\t\trelations: RawRelationFilters = new Map(),\n\t): RawRelationFilters {\n\t\tfor (const [, marker] of markers.markers) {\n\t\t\tif (!(marker instanceof HasOneRelationMarker) && !(marker instanceof HasManyRelationMarker)) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif (\n\t\t\t\tmarker.parameters.expectedMutation === 'none' ||\n\t\t\t\tmarker.parameters.expectedMutation === 'connectOrDisconnect'\n\t\t\t) {\n\t\t\t\tcontinue\n\t\t\t} else if (\n\t\t\t\tmarker.parameters.expectedMutation === 'anyMutation' ||\n\t\t\t\tmarker.parameters.expectedMutation === 'createOrDelete'\n\t\t\t) {\n\t\t\t} else {\n\t\t\t\treturn assertNever(marker.parameters.expectedMutation)\n\t\t\t}\n\t\t\tlet existingRelation = relations.get(marker.parameters.field)\n\n\t\t\tif (existingRelation === undefined) {\n\t\t\t\trelations.set(marker.parameters.field, (existingRelation = new Map()))\n\t\t\t}\n\t\t\tthis.populateRawRelationFilters(marker.fields, existingRelation)\n\t\t}\n\n\t\treturn relations\n\t}\n}\n"],"names":[],"mappings":";;;;;AAgBO,MAAM,oBAAoB;AAAA,EACzB,YAA6B,WAAsB;AAAtB,SAAA,YAAA;AAAA,EAAuB;AAAA,EAEpD,qBAAmC;AACzC,UAAM,UAA0B,CAAA;AAErB,eAAA,CAAC,iBAAiB,KAAK,KAAK,cAAc,cAAc,KAAK,SAAS,GAAG;AACnF,YAAM,YAAY,MAAM;AAExB,UAAI,UAAU,UAAU,UAAU,OAAO,WAAW,qBAAqB,QAAQ;AAChF;AAAA,MACD;AACA,YAAM,SAAS,UAAU;AACjB,cAAA,KAAK,KAAK,sBAAsB,QAAQ,KAAK,UAAU,qBAAqB,IAAI,eAAe,CAAC,CAAC;AAAA,IAC1G;AACA,WAAO,QAAQ;EAChB;AAAA,EAEQ,sBACP,SACA,eACe;AACf,UAAM,UAAwB,CAAA;AAE9B,QAAI,kBAAkB,QAAW;AACzB,aAAA;AAAA,IACR;AAEA,QAAI,yBAAyB,UAAU;AACtC,YAAM,SAAS,KAAK;AAAA,QACnB,cAAc;AAAA,QACd,QAAQ,WAAW;AAAA,QACnB,QAAQ;AAAA,MAAA;AAEC,gBAAA,QAAQ,KAAK,MAAM;AAAA,IAAA,OACvB;AACN,iBAAW,MAAM,eAAe;AACzB,cAAA,SAAS,KAAK,6BAA6B,IAAI,QAAQ,WAA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":["import { GraphQlBuilder, Writable } from '@contember/client'\nimport { BindingError } from '../BindingError'\nimport type {\n\tAlias,\n\tEntityCreationParameters,\n\tEntityEventListenerStore,\n\tEntityListEventListenerStore,\n\tExpectedQualifiedEntityMutation,\n\tExpectedRelationMutation,\n\tHasManyRelation,\n\tHasOneRelation,\n\tParentEntityParameters,\n\tQualifiedEntityList,\n\tQualifiedSingleEntity,\n\tSetOnCreate,\n\tUnconstrainedQualifiedEntityList,\n\tUnconstrainedQualifiedSingleEntity,\n\tUniqueWhere,\n} from '../treeParameters'\n\nexport class TreeParameterMerger {\n\tpublic static mergeHasOneRelationsWithSamePlaceholders(\n\t\toriginal: HasOneRelation,\n\t\tfresh: HasOneRelation,\n\t): HasOneRelation {\n\t\treturn {\n\t\t\t// Encoded within the placeholder\n\t\t\tfield: original.field,\n\t\t\tfilter: original.filter,\n\t\t\treducedBy: original.reducedBy,\n\n\t\t\t// Not encoded within the placeholder\n\t\t\texpectedMutation: this.mergeExpectedRelationMutation(original.expectedMutation, fresh.expectedMutation),\n\t\t\tsetOnCreate: this.mergeSetOnCreate(original.setOnCreate, fresh.setOnCreate),\n\t\t\tisNonbearing: original.isNonbearing && fresh.isNonbearing,\n\t\t\t// forceCreation: original.forceCreation || fresh.forceCreation,\n\t\t\teventListeners: this.mergeSingleEntityEventListeners(original.eventListeners, fresh.eventListeners),\n\t\t}\n\t}\n\n\tpublic static mergeHasManyRelationsWithSamePlaceholders(\n\t\toriginal: HasManyRelation,\n\t\tfresh: HasManyRelation,\n\t): HasManyRelation {\n\t\tif (original.initialEntityCount !== fresh.initialEntityCount) {\n\t\t\tthrow new BindingError(\n\t\t\t\t`Detected hasMany relations on the same field '${original.field}' with different preferred initial ` +\n\t\t\t\t\t`entity counts: '${original.initialEntityCount}' and '${fresh.initialEntityCount}' respectively.`,\n\t\t\t)\n\t\t}\n\t\treturn {\n\t\t\t// Encoded within the placeholder\n\t\t\tfield: original.field,\n\t\t\tfilter: original.filter,\n\t\t\torderBy: original.orderBy,\n\t\t\toffset: original.offset,\n\t\t\tlimit: original.limit,\n\n\t\t\t// Not encoded within the placeholder\n\t\t\texpectedMutation: this.mergeExpectedRelationMutation(original.expectedMutation, fresh.expectedMutation),\n\t\t\tsetOnCreate: this.mergeSetOnCreate(original.setOnCreate, fresh.setOnCreate),\n\t\t\t// forceCreation: original.forceCreation || fresh.forceCreation,\n\t\t\tisNonbearing: original.isNonbearing && fresh.isNonbearing,\n\t\t\tinitialEntityCount: original.initialEntityCount, // Handled above\n\t\t\tchildEventListeners: this.mergeSingleEntityEventListeners(\n\t\t\t\toriginal.childEventListeners,\n\t\t\t\tfresh.childEventListeners,\n\t\t\t),\n\t\t\teventListeners: this.mergeEntityListEventListeners(original.eventListeners, fresh.eventListeners),\n\t\t}\n\t}\n\n\tpublic static mergeEntitySubTreeParametersWithSamePlaceholders(\n\t\toriginal: QualifiedSingleEntity | UnconstrainedQualifiedSingleEntity,\n\t\tfresh: QualifiedSingleEntity | UnconstrainedQualifiedSingleEntity,\n\t): QualifiedSingleEntity | UnconstrainedQualifiedSingleEntity {\n\t\tif (original.isCreating) {\n\t\t\tif (!fresh.isCreating) {\n\t\t\t\tthrow new BindingError()\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t// Encoded within the placeholder\n\t\t\t\tisCreating: original.isCreating,\n\t\t\t\tisUnpersisted: original.isUnpersisted && fresh.isUnpersisted,\n\t\t\t\tentityName: original.entityName,\n\n\t\t\t\t// Not encoded within the placeholder\n\t\t\t\talias: this.mergeSubTreeAliases(original.alias, fresh.alias),\n\t\t\t\tsetOnCreate: this.mergeSetOnCreate(original.setOnCreate, fresh.setOnCreate),\n\t\t\t\t// forceCreation: original.value.forceCreation || fresh.value.forceCreation,\n\t\t\t\texpectedMutation: this.mergeExpectedQualifiedEntityMutation(original.expectedMutation, fresh.expectedMutation),\n\t\t\t\tisNonbearing: original.isNonbearing && fresh.isNonbearing,\n\t\t\t\thasOneRelationPath: original.hasOneRelationPath, // TODO this is completely wrong.\n\t\t\t\teventListeners: this.mergeSingleEntityEventListeners(original.eventListeners, fresh.eventListeners),\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\t// Encoded within the placeholder\n\t\t\tisCreating: original.isCreating,\n\t\t\twhere: original.where,\n\t\t\tentityName: original.entityName,\n\t\t\tfilter: original.filter,\n\n\t\t\t// Not encoded within the placeholder\n\t\t\talias: this.mergeSubTreeAliases(original.alias, fresh.alias),\n\t\t\tsetOnCreate: this.mergeSetOnCreate(original.setOnCreate, fresh.setOnCreate),\n\t\t\t// forceCreation: original.value.forceCreation || fresh.value.forceCreation,\n\t\t\texpectedMutation: this.mergeExpectedQualifiedEntityMutation(original.expectedMutation, fresh.expectedMutation),\n\t\t\tisNonbearing: original.isNonbearing && fresh.isNonbearing,\n\t\t\thasOneRelationPath: original.hasOneRelationPath, // TODO this is completely wrong.\n\t\t\teventListeners: this.mergeSingleEntityEventListeners(original.eventListeners, fresh.eventListeners),\n\t\t}\n\t}\n\n\tpublic static mergeEntityListSubTreeParametersWithSamePlaceholders(\n\t\toriginal: QualifiedEntityList | UnconstrainedQualifiedEntityList,\n\t\tfresh: QualifiedEntityList | UnconstrainedQualifiedEntityList,\n\t): QualifiedEntityList | UnconstrainedQualifiedEntityList {\n\t\tif (original.initialEntityCount !== fresh.initialEntityCount) {\n\t\t\tthrow new BindingError(\n\t\t\t\t`Detected sub trees of the same entity '${original.entityName}' with different preferred initial ` +\n\t\t\t\t\t`entity counts: '${original.initialEntityCount}' and '${fresh.initialEntityCount}' respectively.`,\n\t\t\t)\n\t\t}\n\n\t\tif (original.isCreating) {\n\t\t\tif (!fresh.isCreating) {\n\t\t\t\tthrow new BindingError()\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t// Encoded within the placeholder\n\t\t\t\tisCreating: original.isCreating,\n\t\t\t\tisUnpersisted: original.isUnpersisted && fresh.isUnpersisted,\n\t\t\t\tentityName: original.entityName,\n\n\t\t\t\t// Not encoded within the placeholder\n\t\t\t\talias: this.mergeSubTreeAliases(original.alias, fresh.alias),\n\t\t\t\tsetOnCreate: this.mergeSetOnCreate(original.setOnCreate, fresh.setOnCreate),\n\t\t\t\t// forceCreation: original.value.forceCreation || fresh.value.forceCreation,\n\t\t\t\texpectedMutation: this.mergeExpectedQualifiedEntityMutation(original.expectedMutation, fresh.expectedMutation),\n\t\t\t\tisNonbearing: original.isNonbearing && fresh.isNonbearing,\n\t\t\t\thasOneRelationPath: original.hasOneRelationPath, // TODO this is completely wrong.\n\t\t\t\tchildEventListeners: this.mergeSingleEntityEventListeners(\n\t\t\t\t\toriginal.childEventListeners,\n\t\t\t\t\tfresh.childEventListeners,\n\t\t\t\t),\n\t\t\t\teventListeners: this.mergeEntityListEventListeners(original.eventListeners, fresh.eventListeners),\n\t\t\t\tinitialEntityCount: original.initialEntityCount, // Handled above\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\t// Encoded within the placeholder\n\t\t\tisCreating: original.isCreating,\n\t\t\tentityName: original.entityName,\n\t\t\tfilter: original.filter,\n\t\t\torderBy: original.orderBy,\n\t\t\toffset: original.offset,\n\t\t\tlimit: original.limit,\n\n\t\t\t// Not encoded within the placeholder\n\t\t\talias: this.mergeSubTreeAliases(original.alias, fresh.alias),\n\t\t\tsetOnCreate: this.mergeSetOnCreate(original.setOnCreate, fresh.setOnCreate),\n\t\t\t// forceCreation: original.value.forceCreation || fresh.value.forceCreation,\n\t\t\texpectedMutation: this.mergeExpectedQualifiedEntityMutation(original.expectedMutation, fresh.expectedMutation),\n\t\t\tisNonbearing: original.isNonbearing && fresh.isNonbearing,\n\t\t\thasOneRelationPath: original.hasOneRelationPath, // TODO this is completely wrong.\n\t\t\tchildEventListeners: this.mergeSingleEntityEventListeners(\n\t\t\t\toriginal.childEventListeners,\n\t\t\t\tfresh.childEventListeners,\n\t\t\t),\n\t\t\teventListeners: this.mergeEntityListEventListeners(original.eventListeners, fresh.eventListeners),\n\t\t\tinitialEntityCount: original.initialEntityCount, // Handled above\n\t\t}\n\t}\n\n\tpublic static mergeEntityCreationParameters(\n\t\toriginal: EntityCreationParameters,\n\t\tfresh: EntityCreationParameters,\n\t): EntityCreationParameters {\n\t\treturn {\n\t\t\t// forceCreation: original.forceCreation || fresh.forceCreation,\n\t\t\tisNonbearing: original.isNonbearing && fresh.isNonbearing,\n\t\t\tsetOnCreate: this.mergeSetOnCreate(original.setOnCreate, fresh.setOnCreate),\n\t\t}\n\t}\n\n\tpublic static mergeSetOnCreate(original: SetOnCreate, fresh: SetOnCreate): SetOnCreate {\n\t\tif (original === undefined && fresh === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\tif (original === undefined) {\n\t\t\treturn fresh\n\t\t}\n\t\tif (fresh === undefined) {\n\t\t\treturn original\n\t\t}\n\t\tconst originalCopy: Writable<UniqueWhere> = { ...original }\n\n\t\tfor (const field in fresh) {\n\t\t\tif (field in originalCopy) {\n\t\t\t\tconst fromOriginal = originalCopy[field]\n\t\t\t\tconst fromFresh = fresh[field]\n\n\t\t\t\tif (fromOriginal instanceof GraphQlBuilder.GraphQlLiteral) {\n\t\t\t\t\tif (fromFresh instanceof GraphQlBuilder.GraphQlLiteral) {\n\t\t\t\t\t\tif (fromOriginal.value === fromFresh.value) {\n\t\t\t\t\t\t\t// Good, do nothing.\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new BindingError() // TODO msg\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new BindingError() // TODO msg\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (typeof fromOriginal === 'object') {\n\t\t\t\t\tif (fromFresh instanceof GraphQlBuilder.GraphQlLiteral) {\n\t\t\t\t\t\tthrow new BindingError() // TODO msg\n\t\t\t\t\t} else if (typeof fromFresh === 'object') {\n\t\t\t\t\t\tconst merged = this.mergeSetOnCreate(fromOriginal, fromFresh)\n\t\t\t\t\t\tif (merged !== undefined) {\n\t\t\t\t\t\t\toriginalCopy[field] = merged\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new BindingError() // TODO msg\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (typeof fromFresh === 'string' || typeof fromFresh === 'number') {\n\t\t\t\t\tif (fromOriginal === fromFresh) {\n\t\t\t\t\t\t// Good, do nothing.\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new BindingError() // TODO msg\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new BindingError() // TODO msg\n\t\t\t} else {\n\t\t\t\toriginalCopy[field] = fresh[field]\n\t\t\t}\n\t\t}\n\n\t\treturn originalCopy\n\t}\n\n\tprivate static mergeSets<T>(original: Set<T>, fresh: Set<T>): Set<T> {\n\t\tconst combinedSet = new Set(original)\n\t\tfor (const item of fresh) {\n\t\t\tcombinedSet.add(item)\n\t\t}\n\t\treturn combinedSet\n\t}\n\n\tpublic static mergeParentEntityParameters(\n\t\toriginal: ParentEntityParameters | undefined,\n\t\tfresh: ParentEntityParameters | undefined,\n\t): ParentEntityParameters | undefined {\n\t\tif (original === fresh) {\n\t\t\treturn original\n\t\t}\n\t\tif (original === undefined) {\n\t\t\treturn fresh\n\t\t}\n\t\tif (fresh === undefined) {\n\t\t\treturn original\n\t\t}\n\t\treturn {\n\t\t\teventListeners: TreeParameterMerger.mergeSingleEntityEventListeners(\n\t\t\t\toriginal.eventListeners,\n\t\t\t\tfresh.eventListeners,\n\t\t\t),\n\t\t}\n\t}\n\n\tpublic static mergeInParentEntity<\n\t\tOriginal extends Record<Key, EntityEventListenerStore | undefined>,\n\t\tKey extends keyof Original,\n\t>(original: Original, key: Key, parentEntity: ParentEntityParameters | undefined): Original {\n\t\tif (!parentEntity) {\n\t\t\treturn original\n\t\t}\n\n\t\treturn {\n\t\t\t...original,\n\t\t\t[key]: TreeParameterMerger.mergeSingleEntityEventListeners(original[key], parentEntity.eventListeners),\n\t\t}\n\t}\n\n\tpublic static mergeSingleEntityEventListeners(\n\t\toriginal: EntityEventListenerStore | undefined,\n\t\tfresh: EntityEventListenerStore | undefined,\n\t): EntityEventListenerStore | undefined {\n\t\tif (original === undefined) {\n\t\t\tif (fresh === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\treturn this.cloneSingleEntityEventListeners(fresh)\n\t\t}\n\n\t\tif (fresh === undefined) {\n\t\t\treturn this.cloneSingleEntityEventListeners(original)\n\t\t}\n\n\t\tconst store = this.cloneSingleEntityEventListeners(original)\n\t\tstore.append(fresh)\n\t\treturn store\n\t}\n\n\tpublic static mergeEntityListEventListeners(\n\t\toriginal: EntityListEventListenerStore | undefined,\n\t\tfresh: EntityListEventListenerStore | undefined,\n\t): EntityListEventListenerStore | undefined {\n\t\tif (original === undefined) {\n\t\t\tif (fresh === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\treturn this.cloneEntityListEventListeners(fresh)\n\t\t}\n\n\t\tif (fresh === undefined) {\n\t\t\treturn this.cloneEntityListEventListeners(original)\n\t\t}\n\n\t\tconst store = this.cloneEntityListEventListeners(original)\n\t\tstore.append(fresh)\n\t\treturn store\n\t}\n\n\tpublic static cloneSingleEntityEventListeners(store: EntityEventListenerStore): EntityEventListenerStore {\n\t\t// TODO is intentional, that second clone is deep?\n\t\treturn store.clone()\n\t}\n\n\tpublic static cloneEntityListEventListeners(store: EntityListEventListenerStore): EntityListEventListenerStore {\n\t\treturn store.cloneDeep()\n\t}\n\n\tprivate static mergeExpectedRelationMutation(\n\t\toriginal: ExpectedRelationMutation,\n\t\tfresh: ExpectedRelationMutation,\n\t): ExpectedRelationMutation {\n\t\tif (original === fresh) {\n\t\t\treturn original\n\t\t}\n\t\tif (original === 'none') {\n\t\t\treturn fresh\n\t\t}\n\t\tif (fresh === 'none') {\n\t\t\treturn original\n\t\t}\n\t\treturn 'anyMutation'\n\t}\n\n\tprivate static mergeExpectedQualifiedEntityMutation(\n\t\toriginal: ExpectedQualifiedEntityMutation,\n\t\tfresh: ExpectedQualifiedEntityMutation,\n\t): ExpectedQualifiedEntityMutation {\n\t\tif (original === fresh) {\n\t\t\treturn original\n\t\t}\n\t\tif (original === 'none') {\n\t\t\treturn fresh\n\t\t}\n\t\tif (fresh === 'none') {\n\t\t\treturn original\n\t\t}\n\t\treturn 'anyMutation'\n\t}\n\n\tprivate static mergeSubTreeAliases(\n\t\toriginal: Set<Alias> | undefined,\n\t\tfresh: Set<Alias> | undefined,\n\t): Set<Alias> | undefined {\n\t\tif (original === undefined) {\n\t\t\treturn fresh\n\t\t}\n\t\tif (fresh === undefined) {\n\t\t\treturn original\n\t\t}\n\t\treturn this.mergeSets(original, fresh)\n\t}\n}\n"],"names":["BindingError","GraphQlBuilder"],"mappings":";;;;AAoBO,MAAM,oBAAoB;AAAA,EAChC,OAAc,yCACb,UACA,OACiB;AACV,WAAA;AAAA;AAAA,MAEN,OAAO,SAAS;AAAA,MAChB,QAAQ,SAAS;AAAA,MACjB,WAAW,SAAS;AAAA;AAAA,MAGpB,kBAAkB,KAAK,8BAA8B,SAAS,kBAAkB,MAAM,gBAAgB;AAAA,MACtG,aAAa,KAAK,iBAAiB,SAAS,aAAa,MAAM,WAAW;AAAA,MAC1E,cAAc,SAAS,gBAAgB,MAAM;AAAA;AAAA,MAE7C,gBAAgB,KAAK,gCAAgC,SAAS,gBAAgB,MAAM,cAAc;AAAA,IAAA;AAAA,EAEpG;AAAA,EAEA,OAAc,0CACb,UACA,OACkB;AACd,QAAA,SAAS,uBAAuB,MAAM,oBAAoB;AAC7D,YAAM,IAAIA,aAAA;AAAA,QACT,iDAAiD,SAAS,KAAK,sDAC3C,SAAS,kBAAkB,UAAU,MAAM,kBAAkB;AAAA,MAAA;AAAA,IAEnF;AACO,WAAA;AAAA;AAAA,MAEN,OAAO,SAAS;AAAA,MAChB,QAAQ,SAAS;AAAA,MACjB,SAAS,SAAS;AAAA,MAClB,QAAQ,SAAS;AAAA,MACjB,OA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I,UAAU,QAAW;AACjB,aAAA;AAAA,IACR;AACO,WAAA,KAAK,UAAU,UAAU,KAAK;AAAA,EACtC;AACD;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TreeParameterMerger.js","sources":["../../../src/core/TreeParameterMerger.ts"],"sourcesContent":["import { GraphQlBuilder, Writable } from '@contember/client'\nimport { BindingError } from '../BindingError'\nimport type {\n\tAlias,\n\tEntityCreationParameters,\n\tEntityEventListenerStore,\n\tEntityListEventListenerStore,\n\tExpectedQualifiedEntityMutation,\n\tExpectedRelationMutation,\n\tHasManyRelation,\n\tHasOneRelation,\n\tParentEntityParameters,\n\tQualifiedEntityList,\n\tQualifiedSingleEntity,\n\tSetOnCreate,\n\tUnconstrainedQualifiedEntityList,\n\tUnconstrainedQualifiedSingleEntity,\n\tUniqueWhere,\n} from '../treeParameters'\n\nexport class TreeParameterMerger {\n\tpublic static mergeHasOneRelationsWithSamePlaceholders(\n\t\toriginal: HasOneRelation,\n\t\tfresh: HasOneRelation,\n\t): HasOneRelation {\n\t\treturn {\n\t\t\t// Encoded within the placeholder\n\t\t\tfield: original.field,\n\t\t\tfilter: original.filter,\n\t\t\treducedBy: original.reducedBy,\n\n\t\t\t// Not encoded within the placeholder\n\t\t\texpectedMutation: this.mergeExpectedRelationMutation(original.expectedMutation, fresh.expectedMutation),\n\t\t\tsetOnCreate: this.mergeSetOnCreate(original.setOnCreate, fresh.setOnCreate),\n\t\t\tisNonbearing: original.isNonbearing && fresh.isNonbearing,\n\t\t\t// forceCreation: original.forceCreation || fresh.forceCreation,\n\t\t\teventListeners: this.mergeSingleEntityEventListeners(original.eventListeners, fresh.eventListeners),\n\t\t}\n\t}\n\n\tpublic static mergeHasManyRelationsWithSamePlaceholders(\n\t\toriginal: HasManyRelation,\n\t\tfresh: HasManyRelation,\n\t): HasManyRelation {\n\t\tif (original.initialEntityCount !== fresh.initialEntityCount) {\n\t\t\tthrow new BindingError(\n\t\t\t\t`Detected hasMany relations on the same field '${original.field}' with different preferred initial ` +\n\t\t\t\t\t`entity counts: '${original.initialEntityCount}' and '${fresh.initialEntityCount}' respectively.`,\n\t\t\t)\n\t\t}\n\t\treturn {\n\t\t\t// Encoded within the placeholder\n\t\t\tfield: original.field,\n\t\t\tfilter: original.filter,\n\t\t\torderBy: original.orderBy,\n\t\t\toffset: original.offset,\n\t\t\tlimit: original.limit,\n\n\t\t\t// Not encoded within the placeholder\n\t\t\texpectedMutation: this.mergeExpectedRelationMutation(original.expectedMutation, fresh.expectedMutation),\n\t\t\tsetOnCreate: this.mergeSetOnCreate(original.setOnCreate, fresh.setOnCreate),\n\t\t\t// forceCreation: original.forceCreation || fresh.forceCreation,\n\t\t\tisNonbearing: original.isNonbearing && fresh.isNonbearing,\n\t\t\tinitialEntityCount: original.initialEntityCount, // Handled above\n\t\t\tchildEventListeners: this.mergeSingleEntityEventListeners(\n\t\t\t\toriginal.childEventListeners,\n\t\t\t\tfresh.childEventListeners,\n\t\t\t),\n\t\t\teventListeners: this.mergeEntityListEventListeners(original.eventListeners, fresh.eventListeners),\n\t\t}\n\t}\n\n\tpublic static mergeEntitySubTreeParametersWithSamePlaceholders(\n\t\toriginal: QualifiedSingleEntity | UnconstrainedQualifiedSingleEntity,\n\t\tfresh: QualifiedSingleEntity | UnconstrainedQualifiedSingleEntity,\n\t): QualifiedSingleEntity | UnconstrainedQualifiedSingleEntity {\n\t\tif (original.isCreating) {\n\t\t\tif (!fresh.isCreating) {\n\t\t\t\tthrow new BindingError()\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t// Encoded within the placeholder\n\t\t\t\tisCreating: original.isCreating,\n\t\t\t\tisUnpersisted: original.isUnpersisted && fresh.isUnpersisted,\n\t\t\t\tentityName: original.entityName,\n\n\t\t\t\t// Not encoded within the placeholder\n\t\t\t\talias: this.mergeSubTreeAliases(original.alias, fresh.alias),\n\t\t\t\tsetOnCreate: this.mergeSetOnCreate(original.setOnCreate, fresh.setOnCreate),\n\t\t\t\t// forceCreation: original.value.forceCreation || fresh.value.forceCreation,\n\t\t\t\texpectedMutation: this.mergeExpectedQualifiedEntityMutation(original.expectedMutation, fresh.expectedMutation),\n\t\t\t\tisNonbearing: original.isNonbearing && fresh.isNonbearing,\n\t\t\t\thasOneRelationPath: original.hasOneRelationPath, // TODO this is completely wrong.\n\t\t\t\teventListeners: this.mergeSingleEntityEventListeners(original.eventListeners, fresh.eventListeners),\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\t// Encoded within the placeholder\n\t\t\tisCreating: original.isCreating,\n\t\t\twhere: original.where,\n\t\t\tentityName: original.entityName,\n\t\t\tfilter: original.filter,\n\n\t\t\t// Not encoded within the placeholder\n\t\t\talias: this.mergeSubTreeAliases(original.alias, fresh.alias),\n\t\t\tsetOnCreate: this.mergeSetOnCreate(original.setOnCreate, fresh.setOnCreate),\n\t\t\t// forceCreation: original.value.forceCreation || fresh.value.forceCreation,\n\t\t\texpectedMutation: this.mergeExpectedQualifiedEntityMutation(original.expectedMutation, fresh.expectedMutation),\n\t\t\tisNonbearing: original.isNonbearing && fresh.isNonbearing,\n\t\t\thasOneRelationPath: original.hasOneRelationPath, // TODO this is completely wrong.\n\t\t\teventListeners: this.mergeSingleEntityEventListeners(original.eventListeners, fresh.eventListeners),\n\t\t}\n\t}\n\n\tpublic static mergeEntityListSubTreeParametersWithSamePlaceholders(\n\t\toriginal: QualifiedEntityList | UnconstrainedQualifiedEntityList,\n\t\tfresh: QualifiedEntityList | UnconstrainedQualifiedEntityList,\n\t): QualifiedEntityList | UnconstrainedQualifiedEntityList {\n\t\tif (original.initialEntityCount !== fresh.initialEntityCount) {\n\t\t\tthrow new BindingError(\n\t\t\t\t`Detected sub trees of the same entity '${original.entityName}' with different preferred initial ` +\n\t\t\t\t\t`entity counts: '${original.initialEntityCount}' and '${fresh.initialEntityCount}' respectively.`,\n\t\t\t)\n\t\t}\n\n\t\tif (original.isCreating) {\n\t\t\tif (!fresh.isCreating) {\n\t\t\t\tthrow new BindingError()\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t// Encoded within the placeholder\n\t\t\t\tisCreating: original.isCreating,\n\t\t\t\tisUnpersisted: original.isUnpersisted && fresh.isUnpersisted,\n\t\t\t\tentityName: original.entityName,\n\n\t\t\t\t// Not encoded within the placeholder\n\t\t\t\talias: this.mergeSubTreeAliases(original.alias, fresh.alias),\n\t\t\t\tsetOnCreate: this.mergeSetOnCreate(original.setOnCreate, fresh.setOnCreate),\n\t\t\t\t// forceCreation: original.value.forceCreation || fresh.value.forceCreation,\n\t\t\t\texpectedMutation: this.mergeExpectedQualifiedEntityMutation(original.expectedMutation, fresh.expectedMutation),\n\t\t\t\tisNonbearing: original.isNonbearing && fresh.isNonbearing,\n\t\t\t\thasOneRelationPath: original.hasOneRelationPath, // TODO this is completely wrong.\n\t\t\t\tchildEventListeners: this.mergeSingleEntityEventListeners(\n\t\t\t\t\toriginal.childEventListeners,\n\t\t\t\t\tfresh.childEventListeners,\n\t\t\t\t),\n\t\t\t\teventListeners: this.mergeEntityListEventListeners(original.eventListeners, fresh.eventListeners),\n\t\t\t\tinitialEntityCount: original.initialEntityCount, // Handled above\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\t// Encoded within the placeholder\n\t\t\tisCreating: original.isCreating,\n\t\t\tentityName: original.entityName,\n\t\t\tfilter: original.filter,\n\t\t\torderBy: original.orderBy,\n\t\t\toffset: original.offset,\n\t\t\tlimit: original.limit,\n\n\t\t\t// Not encoded within the placeholder\n\t\t\talias: this.mergeSubTreeAliases(original.alias, fresh.alias),\n\t\t\tsetOnCreate: this.mergeSetOnCreate(original.setOnCreate, fresh.setOnCreate),\n\t\t\t// forceCreation: original.value.forceCreation || fresh.value.forceCreation,\n\t\t\texpectedMutation: this.mergeExpectedQualifiedEntityMutation(original.expectedMutation, fresh.expectedMutation),\n\t\t\tisNonbearing: original.isNonbearing && fresh.isNonbearing,\n\t\t\thasOneRelationPath: original.hasOneRelationPath, // TODO this is completely wrong.\n\t\t\tchildEventListeners: this.mergeSingleEntityEventListeners(\n\t\t\t\toriginal.childEventListeners,\n\t\t\t\tfresh.childEventListeners,\n\t\t\t),\n\t\t\teventListeners: this.mergeEntityListEventListeners(original.eventListeners, fresh.eventListeners),\n\t\t\tinitialEntityCount: original.initialEntityCount, // Handled above\n\t\t}\n\t}\n\n\tpublic static mergeEntityCreationParameters(\n\t\toriginal: EntityCreationParameters,\n\t\tfresh: EntityCreationParameters,\n\t): EntityCreationParameters {\n\t\treturn {\n\t\t\t// forceCreation: original.forceCreation || fresh.forceCreation,\n\t\t\tisNonbearing: original.isNonbearing && fresh.isNonbearing,\n\t\t\tsetOnCreate: this.mergeSetOnCreate(original.setOnCreate, fresh.setOnCreate),\n\t\t}\n\t}\n\n\tpublic static mergeSetOnCreate(original: SetOnCreate, fresh: SetOnCreate): SetOnCreate {\n\t\tif (original === undefined && fresh === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\tif (original === undefined) {\n\t\t\treturn fresh\n\t\t}\n\t\tif (fresh === undefined) {\n\t\t\treturn original\n\t\t}\n\t\tconst originalCopy: Writable<UniqueWhere> = { ...original }\n\n\t\tfor (const field in fresh) {\n\t\t\tif (field in originalCopy) {\n\t\t\t\tconst fromOriginal = originalCopy[field]\n\t\t\t\tconst fromFresh = fresh[field]\n\n\t\t\t\tif (fromOriginal instanceof GraphQlBuilder.GraphQlLiteral) {\n\t\t\t\t\tif (fromFresh instanceof GraphQlBuilder.GraphQlLiteral) {\n\t\t\t\t\t\tif (fromOriginal.value === fromFresh.value) {\n\t\t\t\t\t\t\t// Good, do nothing.\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new BindingError() // TODO msg\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new BindingError() // TODO msg\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (typeof fromOriginal === 'object') {\n\t\t\t\t\tif (fromFresh instanceof GraphQlBuilder.GraphQlLiteral) {\n\t\t\t\t\t\tthrow new BindingError() // TODO msg\n\t\t\t\t\t} else if (typeof fromFresh === 'object') {\n\t\t\t\t\t\tconst merged = this.mergeSetOnCreate(fromOriginal, fromFresh)\n\t\t\t\t\t\tif (merged !== undefined) {\n\t\t\t\t\t\t\toriginalCopy[field] = merged\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new BindingError() // TODO msg\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (typeof fromFresh === 'string' || typeof fromFresh === 'number') {\n\t\t\t\t\tif (fromOriginal === fromFresh) {\n\t\t\t\t\t\t// Good, do nothing.\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new BindingError() // TODO msg\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new BindingError() // TODO msg\n\t\t\t} else {\n\t\t\t\toriginalCopy[field] = fresh[field]\n\t\t\t}\n\t\t}\n\n\t\treturn originalCopy\n\t}\n\n\tprivate static mergeSets<T>(original: Set<T>, fresh: Set<T>): Set<T> {\n\t\tconst combinedSet = new Set(original)\n\t\tfor (const item of fresh) {\n\t\t\tcombinedSet.add(item)\n\t\t}\n\t\treturn combinedSet\n\t}\n\n\tpublic static mergeParentEntityParameters(\n\t\toriginal: ParentEntityParameters | undefined,\n\t\tfresh: ParentEntityParameters | undefined,\n\t): ParentEntityParameters | undefined {\n\t\tif (original === fresh) {\n\t\t\treturn original\n\t\t}\n\t\tif (original === undefined) {\n\t\t\treturn fresh\n\t\t}\n\t\tif (fresh === undefined) {\n\t\t\treturn original\n\t\t}\n\t\treturn {\n\t\t\teventListeners: TreeParameterMerger.mergeSingleEntityEventListeners(\n\t\t\t\toriginal.eventListeners,\n\t\t\t\tfresh.eventListeners,\n\t\t\t),\n\t\t}\n\t}\n\n\tpublic static mergeInParentEntity<\n\t\tOriginal extends Record<Key, EntityEventListenerStore | undefined>,\n\t\tKey extends keyof Original,\n\t>(original: Original, key: Key, parentEntity: ParentEntityParameters | undefined): Original {\n\t\tif (!parentEntity) {\n\t\t\treturn original\n\t\t}\n\n\t\treturn {\n\t\t\t...original,\n\t\t\t[key]: TreeParameterMerger.mergeSingleEntityEventListeners(original[key], parentEntity.eventListeners),\n\t\t}\n\t}\n\n\tpublic static mergeSingleEntityEventListeners(\n\t\toriginal: EntityEventListenerStore | undefined,\n\t\tfresh: EntityEventListenerStore | undefined,\n\t): EntityEventListenerStore | undefined {\n\t\tif (original === undefined) {\n\t\t\tif (fresh === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\treturn this.cloneSingleEntityEventListeners(fresh)\n\t\t}\n\n\t\tif (fresh === undefined) {\n\t\t\treturn this.cloneSingleEntityEventListeners(original)\n\t\t}\n\n\t\tconst store = this.cloneSingleEntityEventListeners(original)\n\t\tstore.append(fresh)\n\t\treturn store\n\t}\n\n\tpublic static mergeEntityListEventListeners(\n\t\toriginal: EntityListEventListenerStore | undefined,\n\t\tfresh: EntityListEventListenerStore | undefined,\n\t): EntityListEventListenerStore | undefined {\n\t\tif (original === undefined) {\n\t\t\tif (fresh === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\treturn this.cloneEntityListEventListeners(fresh)\n\t\t}\n\n\t\tif (fresh === undefined) {\n\t\t\treturn this.cloneEntityListEventListeners(original)\n\t\t}\n\n\t\tconst store = this.cloneEntityListEventListeners(original)\n\t\tstore.append(fresh)\n\t\treturn store\n\t}\n\n\tpublic static cloneSingleEntityEventListeners(store: EntityEventListenerStore): EntityEventListenerStore {\n\t\t// TODO is intentional, that second clone is deep?\n\t\treturn store.clone()\n\t}\n\n\tpublic static cloneEntityListEventListeners(store: EntityListEventListenerStore): EntityListEventListenerStore {\n\t\treturn store.cloneDeep()\n\t}\n\n\tprivate static mergeExpectedRelationMutation(\n\t\toriginal: ExpectedRelationMutation,\n\t\tfresh: ExpectedRelationMutation,\n\t): ExpectedRelationMutation {\n\t\tif (original === fresh) {\n\t\t\treturn original\n\t\t}\n\t\tif (original === 'none') {\n\t\t\treturn fresh\n\t\t}\n\t\tif (fresh === 'none') {\n\t\t\treturn original\n\t\t}\n\t\treturn 'anyMutation'\n\t}\n\n\tprivate static mergeExpectedQualifiedEntityMutation(\n\t\toriginal: ExpectedQualifiedEntityMutation,\n\t\tfresh: ExpectedQualifiedEntityMutation,\n\t): ExpectedQualifiedEntityMutation {\n\t\tif (original === fresh) {\n\t\t\treturn original\n\t\t}\n\t\tif (original === 'none') {\n\t\t\treturn fresh\n\t\t}\n\t\tif (fresh === 'none') {\n\t\t\treturn original\n\t\t}\n\t\treturn 'anyMutation'\n\t}\n\n\tprivate static mergeSubTreeAliases(\n\t\toriginal: Set<Alias> | undefined,\n\t\tfresh: Set<Alias> | undefined,\n\t): Set<Alias> | undefined {\n\t\tif (original === undefined) {\n\t\t\treturn fresh\n\t\t}\n\t\tif (fresh === undefined) {\n\t\t\treturn original\n\t\t}\n\t\treturn this.mergeSets(original, fresh)\n\t}\n}\n"],"names":[],"mappings":";;AAoBO,MAAM,oBAAoB;AAAA,EAChC,OAAc,yCACb,UACA,OACiB;AACV,WAAA;AAAA;AAAA,MAEN,OAAO,SAAS;AAAA,MAChB,QAAQ,SAAS;AAAA,MACjB,WAAW,SAAS;AAAA;AAAA,MAGpB,kBAAkB,KAAK,8BAA8B,SAAS,kBAAkB,MAAM,gBAAgB;AAAA,MACtG,aAAa,KAAK,iBAAiB,SAAS,aAAa,MAAM,WAAW;AAAA,MAC1E,cAAc,SAAS,gBAAgB,MAAM;AAAA;AAAA,MAE7C,gBAAgB,KAAK,gCAAgC,SAAS,gBAAgB,MAAM,cAAc;AAAA,IAAA;AAAA,EAEpG;AAAA,EAEA,OAAc,0CACb,UACA,OACkB;AACd,QAAA,SAAS,uBAAuB,MAAM,oBAAoB;AAC7D,YAAM,IAAI;AAAA,QACT,iDAAiD,SAAS,KAAK,sDAC3C,SAAS,kBAAkB,UAAU,MA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A,EACR;AAAA,EAEA,OAAe,oBACd,UACA,OACyB;AACzB,QAAI,aAAa,QAAW;AACpB,aAAA;AAAA,IACR;AACA,QAAI,UAAU,QAAW;AACjB,aAAA;AAAA,IACR;AACO,WAAA,KAAK,UAAU,UAAU,KAAK;AAAA,EACtC;AACD;"}
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
-
var __publicField = (obj, key, value) => {
|
|
5
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6
|
-
return value;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
9
|
-
const BindingError = require("../BindingError.cjs");
|
|
10
|
-
const MarkerComparator = require("./MarkerComparator.cjs");
|
|
11
|
-
const RequestResponseNormalizer = require("./RequestResponseNormalizer.cjs");
|
|
12
|
-
const NormalizedPersistedData = require("../accessorTree/NormalizedPersistedData.cjs");
|
|
13
|
-
const PlaceholderGenerator = require("../markers/PlaceholderGenerator.cjs");
|
|
14
|
-
const QueryLanguage = require("../queryLanguage/QueryLanguage.cjs");
|
|
15
|
-
const assertNever = require("../utils/assertNever.cjs");
|
|
16
|
-
const emptyEntityIdSet = /* @__PURE__ */ new Set();
|
|
17
|
-
class TreeStore {
|
|
18
|
-
constructor(_schema) {
|
|
19
|
-
__publicField(this, "entityStore", /* @__PURE__ */ new Map());
|
|
20
|
-
__publicField(this, "entityRealmStore", /* @__PURE__ */ new Map());
|
|
21
|
-
// This is tricky. We allow placeholder name duplicates, only the (TreeRootId, PlaceholderName) tuple is unique.
|
|
22
|
-
// This is useful when the tree is extended to contain a sub-tree with the same placeholder.
|
|
23
|
-
__publicField(this, "markerTrees", /* @__PURE__ */ new Map());
|
|
24
|
-
__publicField(this, "subTreeStatesByRoot", /* @__PURE__ */ new Map());
|
|
25
|
-
__publicField(this, "persistedData", new NormalizedPersistedData.NormalizedPersistedData(/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()));
|
|
26
|
-
this._schema = _schema;
|
|
27
|
-
}
|
|
28
|
-
mergeInQueryResponse(response, markerTree) {
|
|
29
|
-
RequestResponseNormalizer.RequestResponseNormalizer.mergeInQueryResponse(this.persistedData, response, markerTree);
|
|
30
|
-
}
|
|
31
|
-
mergeInMutationResponse(response, operations) {
|
|
32
|
-
RequestResponseNormalizer.RequestResponseNormalizer.mergeInMutationResponse(this.persistedData, response, operations);
|
|
33
|
-
}
|
|
34
|
-
get persistedEntityData() {
|
|
35
|
-
return this.persistedData.persistedEntityDataStore;
|
|
36
|
-
}
|
|
37
|
-
get subTreePersistedData() {
|
|
38
|
-
return this.persistedData.subTreeDataStore;
|
|
39
|
-
}
|
|
40
|
-
get schema() {
|
|
41
|
-
return this._schema;
|
|
42
|
-
}
|
|
43
|
-
getPathBackToParent(entityRealm) {
|
|
44
|
-
const blueprint = entityRealm.blueprint;
|
|
45
|
-
if (blueprint.parent === void 0) {
|
|
46
|
-
return void 0;
|
|
47
|
-
}
|
|
48
|
-
let parentEntityName;
|
|
49
|
-
let relationFromParent;
|
|
50
|
-
let parent;
|
|
51
|
-
if (blueprint.type === "hasOne") {
|
|
52
|
-
parentEntityName = blueprint.parent.entity.entityName;
|
|
53
|
-
relationFromParent = blueprint.marker.parameters.field;
|
|
54
|
-
parent = blueprint.parent;
|
|
55
|
-
} else if (blueprint.type === "listEntity") {
|
|
56
|
-
const grandparentBlueprint = blueprint.parent.blueprint;
|
|
57
|
-
if (grandparentBlueprint.parent === void 0) {
|
|
58
|
-
return void 0;
|
|
59
|
-
}
|
|
60
|
-
parentEntityName = grandparentBlueprint.parent.entity.entityName;
|
|
61
|
-
relationFromParent = grandparentBlueprint.marker.parameters.field;
|
|
62
|
-
parent = grandparentBlueprint.parent;
|
|
63
|
-
} else {
|
|
64
|
-
return assertNever.assertNever();
|
|
65
|
-
}
|
|
66
|
-
const relationSchema = this.schema.getEntityRelation(parentEntityName, relationFromParent);
|
|
67
|
-
const fieldBack = (relationSchema.ownedBy || relationSchema.inversedBy) ?? null;
|
|
68
|
-
if (fieldBack === null) {
|
|
69
|
-
return void 0;
|
|
70
|
-
}
|
|
71
|
-
return {
|
|
72
|
-
parent,
|
|
73
|
-
fieldBackToParent: fieldBack
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
getSubTreeState(mode, treeRootId, aliasOrParameters, environment) {
|
|
77
|
-
const markerRoot = this.markerTrees.get(treeRootId);
|
|
78
|
-
const subTreeStates = this.subTreeStatesByRoot.get(treeRootId);
|
|
79
|
-
if (subTreeStates === void 0 || markerRoot === void 0) {
|
|
80
|
-
if (treeRootId) {
|
|
81
|
-
throw new BindingError.BindingError(
|
|
82
|
-
`Invalid tree id '${treeRootId}'. Make sure you use the one supplied by the correct extendTree call.`
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
throw new BindingError.BindingError(`Failed to retrieve a sub tree.`);
|
|
86
|
-
}
|
|
87
|
-
let placeholderName;
|
|
88
|
-
if (typeof aliasOrParameters === "string") {
|
|
89
|
-
const placeholderByAlias = markerRoot.placeholdersByAliases.get(aliasOrParameters);
|
|
90
|
-
if (placeholderByAlias === void 0) {
|
|
91
|
-
throw new BindingError.BindingError(`Undefined sub-tree alias '${aliasOrParameters}'.`);
|
|
92
|
-
}
|
|
93
|
-
placeholderName = placeholderByAlias;
|
|
94
|
-
} else if (mode === "entityList") {
|
|
95
|
-
placeholderName = PlaceholderGenerator.PlaceholderGenerator.getEntityListSubTreePlaceholder(
|
|
96
|
-
aliasOrParameters.isCreating ? QueryLanguage.QueryLanguage.desugarUnconstrainedQualifiedEntityList(
|
|
97
|
-
aliasOrParameters,
|
|
98
|
-
environment
|
|
99
|
-
) : QueryLanguage.QueryLanguage.desugarQualifiedEntityList(aliasOrParameters, environment),
|
|
100
|
-
environment
|
|
101
|
-
);
|
|
102
|
-
} else if (mode === "entity") {
|
|
103
|
-
placeholderName = PlaceholderGenerator.PlaceholderGenerator.getEntitySubTreePlaceholder(
|
|
104
|
-
aliasOrParameters.isCreating ? QueryLanguage.QueryLanguage.desugarUnconstrainedQualifiedSingleEntity(
|
|
105
|
-
aliasOrParameters,
|
|
106
|
-
environment
|
|
107
|
-
) : QueryLanguage.QueryLanguage.desugarQualifiedSingleEntity(aliasOrParameters, environment),
|
|
108
|
-
environment
|
|
109
|
-
);
|
|
110
|
-
} else {
|
|
111
|
-
throw new BindingError.BindingError();
|
|
112
|
-
}
|
|
113
|
-
const subTreeState = subTreeStates.get(placeholderName);
|
|
114
|
-
if (subTreeState === void 0) {
|
|
115
|
-
throw new BindingError.BindingError(`Trying to retrieve a non-existent sub-tree '${placeholderName}'.`);
|
|
116
|
-
}
|
|
117
|
-
return subTreeState;
|
|
118
|
-
}
|
|
119
|
-
getEntityListPersistedIds(state) {
|
|
120
|
-
const blueprint = state.blueprint;
|
|
121
|
-
if (blueprint.parent) {
|
|
122
|
-
const entityData = this.persistedEntityData.get(blueprint.parent.entity.id.uniqueValue);
|
|
123
|
-
return entityData?.get(blueprint.marker.placeholderName) ?? emptyEntityIdSet;
|
|
124
|
-
} else {
|
|
125
|
-
return this.subTreePersistedData.get(blueprint.marker.placeholderName) ?? emptyEntityIdSet;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
disposeOfRealm(realmToDisposeOf) {
|
|
129
|
-
this.entityRealmStore.delete(realmToDisposeOf.realmKey);
|
|
130
|
-
realmToDisposeOf.entity.realms.delete(realmToDisposeOf.realmKey);
|
|
131
|
-
if (realmToDisposeOf.type === "entityRealm") {
|
|
132
|
-
realmToDisposeOf.blueprint.parent?.childrenWithPendingUpdates?.delete(realmToDisposeOf);
|
|
133
|
-
for (const child of realmToDisposeOf.children.values()) {
|
|
134
|
-
switch (child.type) {
|
|
135
|
-
case "field":
|
|
136
|
-
continue;
|
|
137
|
-
case "entityRealm":
|
|
138
|
-
case "entityRealmStub": {
|
|
139
|
-
this.disposeOfRealm(child);
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
case "entityList": {
|
|
143
|
-
for (const listChild of child.children.values()) {
|
|
144
|
-
this.disposeOfRealm(listChild);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
const entity = realmToDisposeOf.entity;
|
|
151
|
-
if (entity.realms.size === 0) {
|
|
152
|
-
this.disposeOfEntity(entity);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
disposeOfEntity(entity) {
|
|
156
|
-
for (const realm of entity.realms.values()) {
|
|
157
|
-
this.disposeOfRealm(realm);
|
|
158
|
-
}
|
|
159
|
-
this.entityStore.delete(entity.id.uniqueValue);
|
|
160
|
-
this.persistedEntityData.delete(entity.id.uniqueValue);
|
|
161
|
-
}
|
|
162
|
-
effectivelyHasTreeRoot(candidateRoot) {
|
|
163
|
-
candidateRoots:
|
|
164
|
-
for (const candidateSubTree of candidateRoot.subTrees.values()) {
|
|
165
|
-
if (candidateSubTree.parameters.isCreating) {
|
|
166
|
-
continue;
|
|
167
|
-
}
|
|
168
|
-
for (const root of this.markerTrees.values()) {
|
|
169
|
-
for (const alreadyPresentSubTree of root.subTrees.values()) {
|
|
170
|
-
const isSubset = MarkerComparator.MarkerComparator.isSubTreeSubsetOf(candidateSubTree, alreadyPresentSubTree);
|
|
171
|
-
if (isSubset) {
|
|
172
|
-
continue candidateRoots;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
return false;
|
|
177
|
-
}
|
|
178
|
-
return true;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
exports.TreeStore = TreeStore;
|
|
182
|
-
//# sourceMappingURL=TreeStore.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TreeStore.cjs","sources":["../../../src/core/TreeStore.ts"],"sourcesContent":["import {\n\tNormalizedPersistedData,\n\tPersistedEntityDataStore,\n\tReceivedDataTree,\n\tSubTreeDataStore,\n\tUniqueEntityId,\n} from '../accessorTree'\nimport { BindingError } from '../BindingError'\nimport type { Environment } from '../dao'\nimport { MarkerTreeRoot, PlaceholderGenerator } from '../markers'\nimport { QueryLanguage } from '../queryLanguage'\nimport type {\n\tAlias,\n\tEntityId,\n\tEntityName,\n\tEntityRealmKey,\n\tFieldName,\n\tPlaceholderName,\n\tSugaredQualifiedEntityList,\n\tSugaredQualifiedSingleEntity,\n\tSugaredUnconstrainedQualifiedEntityList,\n\tSugaredUnconstrainedQualifiedSingleEntity,\n\tTreeRootId,\n} from '../treeParameters'\nimport { assertNever } from '../utils'\nimport { MarkerComparator } from './MarkerComparator'\nimport { RequestResponseNormalizer } from './RequestResponseNormalizer'\nimport type { Schema } from './schema'\nimport type { EntityListState, EntityRealmState, EntityRealmStateStub, EntityState, RootStateNode } from './state'\nimport { SubMutationOperation } from './MutationGenerator'\n\nconst emptyEntityIdSet: ReadonlySet<EntityId> = new Set()\n\nexport class TreeStore {\n\tpublic readonly entityStore: Map<UniqueEntityId, EntityState> = new Map()\n\tpublic readonly entityRealmStore: Map<EntityRealmKey, EntityRealmState | EntityRealmStateStub> = new Map()\n\n\t// This is tricky. We allow placeholder name duplicates, only the (TreeRootId, PlaceholderName) tuple is unique.\n\t// This is useful when the tree is extended to contain a sub-tree with the same placeholder.\n\tpublic readonly markerTrees: Map<TreeRootId | undefined, MarkerTreeRoot> = new Map()\n\tpublic readonly subTreeStatesByRoot: Map<TreeRootId | undefined, Map<PlaceholderName, RootStateNode>> = new Map()\n\n\tpublic readonly persistedData: NormalizedPersistedData = new NormalizedPersistedData(new Map(), new Map())\n\n\tpublic constructor(\n\t\tprivate readonly _schema: Schema,\n\t) {}\n\n\tpublic mergeInQueryResponse(response: ReceivedDataTree, markerTree: MarkerTreeRoot): void {\n\t\tRequestResponseNormalizer.mergeInQueryResponse(this.persistedData, response, markerTree)\n\t}\n\n\tpublic mergeInMutationResponse(response: ReceivedDataTree, operations: SubMutationOperation[]): void {\n\t\tRequestResponseNormalizer.mergeInMutationResponse(this.persistedData, response, operations)\n\t}\n\n\tpublic get persistedEntityData(): PersistedEntityDataStore {\n\t\treturn this.persistedData.persistedEntityDataStore\n\t}\n\n\tpublic get subTreePersistedData(): SubTreeDataStore {\n\t\treturn this.persistedData.subTreeDataStore\n\t}\n\n\tpublic get schema(): Schema {\n\t\treturn this._schema\n\t}\n\n\tpublic getPathBackToParent(entityRealm: EntityRealmState | EntityRealmStateStub):\n\t\t| {\n\t\t\t\tfieldBackToParent: FieldName\n\t\t\t\tparent: EntityRealmState\n\t\t }\n\t\t| undefined {\n\t\tconst blueprint = entityRealm.blueprint\n\t\tif (blueprint.parent === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\tlet parentEntityName: EntityName\n\t\tlet relationFromParent: FieldName\n\t\tlet parent: EntityRealmState\n\n\t\tif (blueprint.type === 'hasOne') {\n\t\t\tparentEntityName = blueprint.parent.entity.entityName\n\t\t\trelationFromParent = blueprint.marker.parameters.field\n\t\t\tparent = blueprint.parent\n\t\t} else if (blueprint.type === 'listEntity') {\n\t\t\tconst grandparentBlueprint = blueprint.parent.blueprint\n\n\t\t\tif (grandparentBlueprint.parent === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\tparentEntityName = grandparentBlueprint.parent.entity.entityName\n\t\t\trelationFromParent = grandparentBlueprint.marker.parameters.field\n\t\t\tparent = grandparentBlueprint.parent\n\t\t} else {\n\t\t\treturn assertNever(blueprint)\n\t\t}\n\n\t\tconst relationSchema = this.schema.getEntityRelation(parentEntityName, relationFromParent)\n\t\tconst fieldBack = (relationSchema.ownedBy || relationSchema.inversedBy) ?? null\n\n\t\t// console.log(parentEntityName, relationFromParent, entityRealm.entity.entityName, fieldBack)\n\t\tif (fieldBack === null) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn {\n\t\t\tparent,\n\t\t\tfieldBackToParent: fieldBack,\n\t\t}\n\t}\n\n\tpublic getSubTreeState(\n\t\tmode: 'entity',\n\t\ttreeRootId: TreeRootId | undefined,\n\t\taliasOrParameters: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t\tenvironment: Environment,\n\t): EntityRealmState\n\tpublic getSubTreeState(\n\t\tmode: 'entityList',\n\t\ttreeRootId: TreeRootId | undefined,\n\t\taliasOrParameters: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t\tenvironment: Environment,\n\t): EntityListState\n\tpublic getSubTreeState(\n\t\tmode: 'entity' | 'entityList',\n\t\ttreeRootId: TreeRootId | undefined,\n\t\taliasOrParameters:\n\t\t\t| Alias\n\t\t\t| SugaredQualifiedSingleEntity\n\t\t\t| SugaredUnconstrainedQualifiedSingleEntity\n\t\t\t| SugaredQualifiedEntityList\n\t\t\t| SugaredUnconstrainedQualifiedEntityList,\n\t\tenvironment: Environment,\n\t): RootStateNode {\n\t\tconst markerRoot = this.markerTrees.get(treeRootId)\n\t\tconst subTreeStates = this.subTreeStatesByRoot.get(treeRootId)\n\n\t\tif (subTreeStates === undefined || markerRoot === undefined) {\n\t\t\tif (treeRootId) {\n\t\t\t\tthrow new BindingError(\n\t\t\t\t\t`Invalid tree id '${treeRootId}'. Make sure you use the one supplied by the correct extendTree call.`,\n\t\t\t\t)\n\t\t\t}\n\t\t\tthrow new BindingError(`Failed to retrieve a sub tree.`)\n\t\t}\n\n\t\tlet placeholderName: string\n\n\t\tif (typeof aliasOrParameters === 'string') {\n\t\t\tconst placeholderByAlias = markerRoot.placeholdersByAliases.get(aliasOrParameters)\n\n\t\t\tif (placeholderByAlias === undefined) {\n\t\t\t\tthrow new BindingError(`Undefined sub-tree alias '${aliasOrParameters}'.`)\n\t\t\t}\n\t\t\tplaceholderName = placeholderByAlias\n\t\t} else if (mode === 'entityList') {\n\t\t\tplaceholderName = PlaceholderGenerator.getEntityListSubTreePlaceholder(\n\t\t\t\taliasOrParameters.isCreating\n\t\t\t\t\t? QueryLanguage.desugarUnconstrainedQualifiedEntityList(\n\t\t\t\t\t\t\taliasOrParameters as SugaredUnconstrainedQualifiedEntityList,\n\t\t\t\t\t\t\tenvironment,\n\t\t\t\t\t )\n\t\t\t\t\t: QueryLanguage.desugarQualifiedEntityList(aliasOrParameters as SugaredQualifiedEntityList, environment),\n\t\t\t\tenvironment,\n\t\t\t)\n\t\t} else if (mode === 'entity') {\n\t\t\tplaceholderName = PlaceholderGenerator.getEntitySubTreePlaceholder(\n\t\t\t\taliasOrParameters.isCreating\n\t\t\t\t\t? QueryLanguage.desugarUnconstrainedQualifiedSingleEntity(\n\t\t\t\t\t\t\taliasOrParameters as SugaredUnconstrainedQualifiedSingleEntity,\n\t\t\t\t\t\t\tenvironment,\n\t\t\t\t\t )\n\t\t\t\t\t: QueryLanguage.desugarQualifiedSingleEntity(aliasOrParameters as SugaredQualifiedSingleEntity, environment),\n\t\t\t\tenvironment,\n\t\t\t)\n\t\t} else {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tconst subTreeState = subTreeStates.get(placeholderName)\n\n\t\tif (subTreeState === undefined) {\n\t\t\tthrow new BindingError(`Trying to retrieve a non-existent sub-tree '${placeholderName}'.`)\n\t\t}\n\t\treturn subTreeState\n\t}\n\n\tpublic getEntityListPersistedIds(state: EntityListState): ReadonlySet<EntityId> {\n\t\tconst blueprint = state.blueprint\n\n\t\tif (blueprint.parent) {\n\t\t\tconst entityData = this.persistedEntityData.get(blueprint.parent.entity.id.uniqueValue)\n\t\t\treturn (entityData?.get(blueprint.marker.placeholderName) as Set<string> | undefined) ?? emptyEntityIdSet\n\t\t} else {\n\t\t\treturn (this.subTreePersistedData.get(blueprint.marker.placeholderName) as Set<string>) ?? emptyEntityIdSet\n\t\t}\n\t}\n\n\tpublic disposeOfRealm(realmToDisposeOf: EntityRealmState | EntityRealmStateStub) {\n\t\tthis.entityRealmStore.delete(realmToDisposeOf.realmKey)\n\t\trealmToDisposeOf.entity.realms.delete(realmToDisposeOf.realmKey)\n\n\t\tif (realmToDisposeOf.type === 'entityRealm') {\n\t\t\trealmToDisposeOf.blueprint.parent?.childrenWithPendingUpdates?.delete(realmToDisposeOf)\n\n\t\t\tfor (const child of realmToDisposeOf.children.values()) {\n\t\t\t\tswitch (child.type) {\n\t\t\t\t\tcase 'field':\n\t\t\t\t\t\tcontinue\n\t\t\t\t\tcase 'entityRealm':\n\t\t\t\t\tcase 'entityRealmStub': {\n\t\t\t\t\t\tthis.disposeOfRealm(child)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase 'entityList': {\n\t\t\t\t\t\tfor (const listChild of child.children.values()) {\n\t\t\t\t\t\t\tthis.disposeOfRealm(listChild)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst entity = realmToDisposeOf.entity\n\t\tif (entity.realms.size === 0) {\n\t\t\tthis.disposeOfEntity(entity)\n\t\t}\n\t}\n\n\tpublic disposeOfEntity(entity: EntityState) {\n\t\tfor (const realm of entity.realms.values()) {\n\t\t\tthis.disposeOfRealm(realm)\n\t\t}\n\t\tthis.entityStore.delete(entity.id.uniqueValue)\n\t\tthis.persistedEntityData.delete(entity.id.uniqueValue)\n\t}\n\n\tpublic effectivelyHasTreeRoot(candidateRoot: MarkerTreeRoot): boolean {\n\t\tcandidateRoots: for (const candidateSubTree of candidateRoot.subTrees.values()) {\n\t\t\tif (candidateSubTree.parameters.isCreating) {\n\t\t\t\t// This, by definition, won't trigger a query.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor (const root of this.markerTrees.values()) {\n\t\t\t\tfor (const alreadyPresentSubTree of root.subTrees.values()) {\n\t\t\t\t\tconst isSubset = MarkerComparator.isSubTreeSubsetOf(candidateSubTree, alreadyPresentSubTree)\n\t\t\t\t\tif (isSubset) {\n\t\t\t\t\t\tcontinue candidateRoots\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\t}\n}\n"],"names":["NormalizedPersistedData","RequestResponseNormalizer","assertNever","BindingError","PlaceholderGenerator","QueryLanguage","MarkerComparator"],"mappings":";;;;;;;;;;;;;;;AA+BA,MAAM,uCAA8C;AAE7C,MAAM,UAAU;AAAA,EAWf,YACW,SAChB;AAZc,2DAAoD;AACpD,gEAAqF;AAIrF;AAAA;AAAA,2DAA+D;AAC/D,mEAA4F;AAE5F,yCAAyC,IAAIA,wBAAAA,wBAAwB,oBAAI,OAAO,oBAAI,KAAK;AAGvF,SAAA,UAAA;AAAA,EACf;AAAA,EAEI,qBAAqB,UAA4B,YAAkC;AACzFC,8BAAA,0BAA0B,qBAAqB,KAAK,eAAe,UAAU,UAAU;AAAA,EACxF;AAAA,EAEO,wBAAwB,UAA4B,YAA0C;AACpGA,8BAAA,0BAA0B,wBAAwB,KAAK,eAAe,UAAU,UAAU;AAAA,EAC3F;AAAA,EAEA,IAAW,sBAAgD;AAC1D,WAAO,KAAK,cAAc;AAAA,EAC3B;AAAA,EAEA,IAAW,uBAAyC;AACnD,WAAO,KAAK,cAAc;AAAA,EAC3B;AAAA,EAEA,IAAW,SAAiB;AAC3B,WAAO,KAAK;AAAA,EACb;AAAA,EAEO,oBAAoB,aAKd;AACZ,UAAM,YAAY,YAAY;AAC1B,QAAA,UAAU,WAAW,QAAW;AAC5B,aAAA;AAAA,IACR;AACI,QAAA;AACA,QAAA;AACA,QAAA;AAEA,QAAA,UAAU,SAAS,UAAU;AACb,yBAAA,UAAU,OAAO,OAAO;AACtB,2BAAA,UAAU,OAAO,WAAW;AACjD,eAAS,UAAU;AAAA,IAAA,WACT,UAAU,SAAS,cAAc;AACrC,YAAA,uBAAuB,UAAU,OAAO;AAE1C,UAAA,qBAAqB,WAAW,QAAW;AACvC,eAAA;AAAA,MACR;AACmB,yBAAA,qBAAqB,OAAO,OAAO;AACjC,2BAAA,qBAAqB,OAAO,WAA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,SAAK,YAAY,OAAO,OAAO,GAAG,WAAW;AAC7C,SAAK,oBAAoB,OAAO,OAAO,GAAG,WAAW;AAAA,EACtD;AAAA,EAEO,uBAAuB,eAAwC;AACrE;AAAgB,iBAAW,oBAAoB,cAAc,SAAS,OAAA,GAAU;AAC3E,YAAA,iBAAiB,WAAW,YAAY;AAE3C;AAAA,QACD;AACA,mBAAW,QAAQ,KAAK,YAAY,OAAA,GAAU;AAC7C,qBAAW,yBAAyB,KAAK,SAAS,OAAA,GAAU;AAC3D,kBAAM,WAAWG,iBAAA,iBAAiB,kBAAkB,kBAAkB,qBAAqB;AAC3F,gBAAI,UAAU;AACJ,uBAAA;AAAA,YACV;AAAA,UACD;AAAA,QACD;AACO,eAAA;AAAA,MACR;AACO,WAAA;AAAA,EACR;AACD;;"}
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import { BindingError } from "../BindingError.js";
|
|
8
|
-
import { MarkerComparator } from "./MarkerComparator.js";
|
|
9
|
-
import { RequestResponseNormalizer } from "./RequestResponseNormalizer.js";
|
|
10
|
-
import { NormalizedPersistedData } from "../accessorTree/NormalizedPersistedData.js";
|
|
11
|
-
import { PlaceholderGenerator } from "../markers/PlaceholderGenerator.js";
|
|
12
|
-
import { QueryLanguage } from "../queryLanguage/QueryLanguage.js";
|
|
13
|
-
import { assertNever } from "../utils/assertNever.js";
|
|
14
|
-
const emptyEntityIdSet = /* @__PURE__ */ new Set();
|
|
15
|
-
class TreeStore {
|
|
16
|
-
constructor(_schema) {
|
|
17
|
-
__publicField(this, "entityStore", /* @__PURE__ */ new Map());
|
|
18
|
-
__publicField(this, "entityRealmStore", /* @__PURE__ */ new Map());
|
|
19
|
-
// This is tricky. We allow placeholder name duplicates, only the (TreeRootId, PlaceholderName) tuple is unique.
|
|
20
|
-
// This is useful when the tree is extended to contain a sub-tree with the same placeholder.
|
|
21
|
-
__publicField(this, "markerTrees", /* @__PURE__ */ new Map());
|
|
22
|
-
__publicField(this, "subTreeStatesByRoot", /* @__PURE__ */ new Map());
|
|
23
|
-
__publicField(this, "persistedData", new NormalizedPersistedData(/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()));
|
|
24
|
-
this._schema = _schema;
|
|
25
|
-
}
|
|
26
|
-
mergeInQueryResponse(response, markerTree) {
|
|
27
|
-
RequestResponseNormalizer.mergeInQueryResponse(this.persistedData, response, markerTree);
|
|
28
|
-
}
|
|
29
|
-
mergeInMutationResponse(response, operations) {
|
|
30
|
-
RequestResponseNormalizer.mergeInMutationResponse(this.persistedData, response, operations);
|
|
31
|
-
}
|
|
32
|
-
get persistedEntityData() {
|
|
33
|
-
return this.persistedData.persistedEntityDataStore;
|
|
34
|
-
}
|
|
35
|
-
get subTreePersistedData() {
|
|
36
|
-
return this.persistedData.subTreeDataStore;
|
|
37
|
-
}
|
|
38
|
-
get schema() {
|
|
39
|
-
return this._schema;
|
|
40
|
-
}
|
|
41
|
-
getPathBackToParent(entityRealm) {
|
|
42
|
-
const blueprint = entityRealm.blueprint;
|
|
43
|
-
if (blueprint.parent === void 0) {
|
|
44
|
-
return void 0;
|
|
45
|
-
}
|
|
46
|
-
let parentEntityName;
|
|
47
|
-
let relationFromParent;
|
|
48
|
-
let parent;
|
|
49
|
-
if (blueprint.type === "hasOne") {
|
|
50
|
-
parentEntityName = blueprint.parent.entity.entityName;
|
|
51
|
-
relationFromParent = blueprint.marker.parameters.field;
|
|
52
|
-
parent = blueprint.parent;
|
|
53
|
-
} else if (blueprint.type === "listEntity") {
|
|
54
|
-
const grandparentBlueprint = blueprint.parent.blueprint;
|
|
55
|
-
if (grandparentBlueprint.parent === void 0) {
|
|
56
|
-
return void 0;
|
|
57
|
-
}
|
|
58
|
-
parentEntityName = grandparentBlueprint.parent.entity.entityName;
|
|
59
|
-
relationFromParent = grandparentBlueprint.marker.parameters.field;
|
|
60
|
-
parent = grandparentBlueprint.parent;
|
|
61
|
-
} else {
|
|
62
|
-
return assertNever();
|
|
63
|
-
}
|
|
64
|
-
const relationSchema = this.schema.getEntityRelation(parentEntityName, relationFromParent);
|
|
65
|
-
const fieldBack = (relationSchema.ownedBy || relationSchema.inversedBy) ?? null;
|
|
66
|
-
if (fieldBack === null) {
|
|
67
|
-
return void 0;
|
|
68
|
-
}
|
|
69
|
-
return {
|
|
70
|
-
parent,
|
|
71
|
-
fieldBackToParent: fieldBack
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
getSubTreeState(mode, treeRootId, aliasOrParameters, environment) {
|
|
75
|
-
const markerRoot = this.markerTrees.get(treeRootId);
|
|
76
|
-
const subTreeStates = this.subTreeStatesByRoot.get(treeRootId);
|
|
77
|
-
if (subTreeStates === void 0 || markerRoot === void 0) {
|
|
78
|
-
if (treeRootId) {
|
|
79
|
-
throw new BindingError(
|
|
80
|
-
`Invalid tree id '${treeRootId}'. Make sure you use the one supplied by the correct extendTree call.`
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
throw new BindingError(`Failed to retrieve a sub tree.`);
|
|
84
|
-
}
|
|
85
|
-
let placeholderName;
|
|
86
|
-
if (typeof aliasOrParameters === "string") {
|
|
87
|
-
const placeholderByAlias = markerRoot.placeholdersByAliases.get(aliasOrParameters);
|
|
88
|
-
if (placeholderByAlias === void 0) {
|
|
89
|
-
throw new BindingError(`Undefined sub-tree alias '${aliasOrParameters}'.`);
|
|
90
|
-
}
|
|
91
|
-
placeholderName = placeholderByAlias;
|
|
92
|
-
} else if (mode === "entityList") {
|
|
93
|
-
placeholderName = PlaceholderGenerator.getEntityListSubTreePlaceholder(
|
|
94
|
-
aliasOrParameters.isCreating ? QueryLanguage.desugarUnconstrainedQualifiedEntityList(
|
|
95
|
-
aliasOrParameters,
|
|
96
|
-
environment
|
|
97
|
-
) : QueryLanguage.desugarQualifiedEntityList(aliasOrParameters, environment),
|
|
98
|
-
environment
|
|
99
|
-
);
|
|
100
|
-
} else if (mode === "entity") {
|
|
101
|
-
placeholderName = PlaceholderGenerator.getEntitySubTreePlaceholder(
|
|
102
|
-
aliasOrParameters.isCreating ? QueryLanguage.desugarUnconstrainedQualifiedSingleEntity(
|
|
103
|
-
aliasOrParameters,
|
|
104
|
-
environment
|
|
105
|
-
) : QueryLanguage.desugarQualifiedSingleEntity(aliasOrParameters, environment),
|
|
106
|
-
environment
|
|
107
|
-
);
|
|
108
|
-
} else {
|
|
109
|
-
throw new BindingError();
|
|
110
|
-
}
|
|
111
|
-
const subTreeState = subTreeStates.get(placeholderName);
|
|
112
|
-
if (subTreeState === void 0) {
|
|
113
|
-
throw new BindingError(`Trying to retrieve a non-existent sub-tree '${placeholderName}'.`);
|
|
114
|
-
}
|
|
115
|
-
return subTreeState;
|
|
116
|
-
}
|
|
117
|
-
getEntityListPersistedIds(state) {
|
|
118
|
-
const blueprint = state.blueprint;
|
|
119
|
-
if (blueprint.parent) {
|
|
120
|
-
const entityData = this.persistedEntityData.get(blueprint.parent.entity.id.uniqueValue);
|
|
121
|
-
return entityData?.get(blueprint.marker.placeholderName) ?? emptyEntityIdSet;
|
|
122
|
-
} else {
|
|
123
|
-
return this.subTreePersistedData.get(blueprint.marker.placeholderName) ?? emptyEntityIdSet;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
disposeOfRealm(realmToDisposeOf) {
|
|
127
|
-
this.entityRealmStore.delete(realmToDisposeOf.realmKey);
|
|
128
|
-
realmToDisposeOf.entity.realms.delete(realmToDisposeOf.realmKey);
|
|
129
|
-
if (realmToDisposeOf.type === "entityRealm") {
|
|
130
|
-
realmToDisposeOf.blueprint.parent?.childrenWithPendingUpdates?.delete(realmToDisposeOf);
|
|
131
|
-
for (const child of realmToDisposeOf.children.values()) {
|
|
132
|
-
switch (child.type) {
|
|
133
|
-
case "field":
|
|
134
|
-
continue;
|
|
135
|
-
case "entityRealm":
|
|
136
|
-
case "entityRealmStub": {
|
|
137
|
-
this.disposeOfRealm(child);
|
|
138
|
-
break;
|
|
139
|
-
}
|
|
140
|
-
case "entityList": {
|
|
141
|
-
for (const listChild of child.children.values()) {
|
|
142
|
-
this.disposeOfRealm(listChild);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
const entity = realmToDisposeOf.entity;
|
|
149
|
-
if (entity.realms.size === 0) {
|
|
150
|
-
this.disposeOfEntity(entity);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
disposeOfEntity(entity) {
|
|
154
|
-
for (const realm of entity.realms.values()) {
|
|
155
|
-
this.disposeOfRealm(realm);
|
|
156
|
-
}
|
|
157
|
-
this.entityStore.delete(entity.id.uniqueValue);
|
|
158
|
-
this.persistedEntityData.delete(entity.id.uniqueValue);
|
|
159
|
-
}
|
|
160
|
-
effectivelyHasTreeRoot(candidateRoot) {
|
|
161
|
-
candidateRoots:
|
|
162
|
-
for (const candidateSubTree of candidateRoot.subTrees.values()) {
|
|
163
|
-
if (candidateSubTree.parameters.isCreating) {
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
for (const root of this.markerTrees.values()) {
|
|
167
|
-
for (const alreadyPresentSubTree of root.subTrees.values()) {
|
|
168
|
-
const isSubset = MarkerComparator.isSubTreeSubsetOf(candidateSubTree, alreadyPresentSubTree);
|
|
169
|
-
if (isSubset) {
|
|
170
|
-
continue candidateRoots;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
return false;
|
|
175
|
-
}
|
|
176
|
-
return true;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
export {
|
|
180
|
-
TreeStore
|
|
181
|
-
};
|
|
182
|
-
//# sourceMappingURL=TreeStore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TreeStore.js","sources":["../../../src/core/TreeStore.ts"],"sourcesContent":["import {\n\tNormalizedPersistedData,\n\tPersistedEntityDataStore,\n\tReceivedDataTree,\n\tSubTreeDataStore,\n\tUniqueEntityId,\n} from '../accessorTree'\nimport { BindingError } from '../BindingError'\nimport type { Environment } from '../dao'\nimport { MarkerTreeRoot, PlaceholderGenerator } from '../markers'\nimport { QueryLanguage } from '../queryLanguage'\nimport type {\n\tAlias,\n\tEntityId,\n\tEntityName,\n\tEntityRealmKey,\n\tFieldName,\n\tPlaceholderName,\n\tSugaredQualifiedEntityList,\n\tSugaredQualifiedSingleEntity,\n\tSugaredUnconstrainedQualifiedEntityList,\n\tSugaredUnconstrainedQualifiedSingleEntity,\n\tTreeRootId,\n} from '../treeParameters'\nimport { assertNever } from '../utils'\nimport { MarkerComparator } from './MarkerComparator'\nimport { RequestResponseNormalizer } from './RequestResponseNormalizer'\nimport type { Schema } from './schema'\nimport type { EntityListState, EntityRealmState, EntityRealmStateStub, EntityState, RootStateNode } from './state'\nimport { SubMutationOperation } from './MutationGenerator'\n\nconst emptyEntityIdSet: ReadonlySet<EntityId> = new Set()\n\nexport class TreeStore {\n\tpublic readonly entityStore: Map<UniqueEntityId, EntityState> = new Map()\n\tpublic readonly entityRealmStore: Map<EntityRealmKey, EntityRealmState | EntityRealmStateStub> = new Map()\n\n\t// This is tricky. We allow placeholder name duplicates, only the (TreeRootId, PlaceholderName) tuple is unique.\n\t// This is useful when the tree is extended to contain a sub-tree with the same placeholder.\n\tpublic readonly markerTrees: Map<TreeRootId | undefined, MarkerTreeRoot> = new Map()\n\tpublic readonly subTreeStatesByRoot: Map<TreeRootId | undefined, Map<PlaceholderName, RootStateNode>> = new Map()\n\n\tpublic readonly persistedData: NormalizedPersistedData = new NormalizedPersistedData(new Map(), new Map())\n\n\tpublic constructor(\n\t\tprivate readonly _schema: Schema,\n\t) {}\n\n\tpublic mergeInQueryResponse(response: ReceivedDataTree, markerTree: MarkerTreeRoot): void {\n\t\tRequestResponseNormalizer.mergeInQueryResponse(this.persistedData, response, markerTree)\n\t}\n\n\tpublic mergeInMutationResponse(response: ReceivedDataTree, operations: SubMutationOperation[]): void {\n\t\tRequestResponseNormalizer.mergeInMutationResponse(this.persistedData, response, operations)\n\t}\n\n\tpublic get persistedEntityData(): PersistedEntityDataStore {\n\t\treturn this.persistedData.persistedEntityDataStore\n\t}\n\n\tpublic get subTreePersistedData(): SubTreeDataStore {\n\t\treturn this.persistedData.subTreeDataStore\n\t}\n\n\tpublic get schema(): Schema {\n\t\treturn this._schema\n\t}\n\n\tpublic getPathBackToParent(entityRealm: EntityRealmState | EntityRealmStateStub):\n\t\t| {\n\t\t\t\tfieldBackToParent: FieldName\n\t\t\t\tparent: EntityRealmState\n\t\t }\n\t\t| undefined {\n\t\tconst blueprint = entityRealm.blueprint\n\t\tif (blueprint.parent === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\tlet parentEntityName: EntityName\n\t\tlet relationFromParent: FieldName\n\t\tlet parent: EntityRealmState\n\n\t\tif (blueprint.type === 'hasOne') {\n\t\t\tparentEntityName = blueprint.parent.entity.entityName\n\t\t\trelationFromParent = blueprint.marker.parameters.field\n\t\t\tparent = blueprint.parent\n\t\t} else if (blueprint.type === 'listEntity') {\n\t\t\tconst grandparentBlueprint = blueprint.parent.blueprint\n\n\t\t\tif (grandparentBlueprint.parent === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\tparentEntityName = grandparentBlueprint.parent.entity.entityName\n\t\t\trelationFromParent = grandparentBlueprint.marker.parameters.field\n\t\t\tparent = grandparentBlueprint.parent\n\t\t} else {\n\t\t\treturn assertNever(blueprint)\n\t\t}\n\n\t\tconst relationSchema = this.schema.getEntityRelation(parentEntityName, relationFromParent)\n\t\tconst fieldBack = (relationSchema.ownedBy || relationSchema.inversedBy) ?? null\n\n\t\t// console.log(parentEntityName, relationFromParent, entityRealm.entity.entityName, fieldBack)\n\t\tif (fieldBack === null) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn {\n\t\t\tparent,\n\t\t\tfieldBackToParent: fieldBack,\n\t\t}\n\t}\n\n\tpublic getSubTreeState(\n\t\tmode: 'entity',\n\t\ttreeRootId: TreeRootId | undefined,\n\t\taliasOrParameters: Alias | SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t\tenvironment: Environment,\n\t): EntityRealmState\n\tpublic getSubTreeState(\n\t\tmode: 'entityList',\n\t\ttreeRootId: TreeRootId | undefined,\n\t\taliasOrParameters: Alias | SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t\tenvironment: Environment,\n\t): EntityListState\n\tpublic getSubTreeState(\n\t\tmode: 'entity' | 'entityList',\n\t\ttreeRootId: TreeRootId | undefined,\n\t\taliasOrParameters:\n\t\t\t| Alias\n\t\t\t| SugaredQualifiedSingleEntity\n\t\t\t| SugaredUnconstrainedQualifiedSingleEntity\n\t\t\t| SugaredQualifiedEntityList\n\t\t\t| SugaredUnconstrainedQualifiedEntityList,\n\t\tenvironment: Environment,\n\t): RootStateNode {\n\t\tconst markerRoot = this.markerTrees.get(treeRootId)\n\t\tconst subTreeStates = this.subTreeStatesByRoot.get(treeRootId)\n\n\t\tif (subTreeStates === undefined || markerRoot === undefined) {\n\t\t\tif (treeRootId) {\n\t\t\t\tthrow new BindingError(\n\t\t\t\t\t`Invalid tree id '${treeRootId}'. Make sure you use the one supplied by the correct extendTree call.`,\n\t\t\t\t)\n\t\t\t}\n\t\t\tthrow new BindingError(`Failed to retrieve a sub tree.`)\n\t\t}\n\n\t\tlet placeholderName: string\n\n\t\tif (typeof aliasOrParameters === 'string') {\n\t\t\tconst placeholderByAlias = markerRoot.placeholdersByAliases.get(aliasOrParameters)\n\n\t\t\tif (placeholderByAlias === undefined) {\n\t\t\t\tthrow new BindingError(`Undefined sub-tree alias '${aliasOrParameters}'.`)\n\t\t\t}\n\t\t\tplaceholderName = placeholderByAlias\n\t\t} else if (mode === 'entityList') {\n\t\t\tplaceholderName = PlaceholderGenerator.getEntityListSubTreePlaceholder(\n\t\t\t\taliasOrParameters.isCreating\n\t\t\t\t\t? QueryLanguage.desugarUnconstrainedQualifiedEntityList(\n\t\t\t\t\t\t\taliasOrParameters as SugaredUnconstrainedQualifiedEntityList,\n\t\t\t\t\t\t\tenvironment,\n\t\t\t\t\t )\n\t\t\t\t\t: QueryLanguage.desugarQualifiedEntityList(aliasOrParameters as SugaredQualifiedEntityList, environment),\n\t\t\t\tenvironment,\n\t\t\t)\n\t\t} else if (mode === 'entity') {\n\t\t\tplaceholderName = PlaceholderGenerator.getEntitySubTreePlaceholder(\n\t\t\t\taliasOrParameters.isCreating\n\t\t\t\t\t? QueryLanguage.desugarUnconstrainedQualifiedSingleEntity(\n\t\t\t\t\t\t\taliasOrParameters as SugaredUnconstrainedQualifiedSingleEntity,\n\t\t\t\t\t\t\tenvironment,\n\t\t\t\t\t )\n\t\t\t\t\t: QueryLanguage.desugarQualifiedSingleEntity(aliasOrParameters as SugaredQualifiedSingleEntity, environment),\n\t\t\t\tenvironment,\n\t\t\t)\n\t\t} else {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\tconst subTreeState = subTreeStates.get(placeholderName)\n\n\t\tif (subTreeState === undefined) {\n\t\t\tthrow new BindingError(`Trying to retrieve a non-existent sub-tree '${placeholderName}'.`)\n\t\t}\n\t\treturn subTreeState\n\t}\n\n\tpublic getEntityListPersistedIds(state: EntityListState): ReadonlySet<EntityId> {\n\t\tconst blueprint = state.blueprint\n\n\t\tif (blueprint.parent) {\n\t\t\tconst entityData = this.persistedEntityData.get(blueprint.parent.entity.id.uniqueValue)\n\t\t\treturn (entityData?.get(blueprint.marker.placeholderName) as Set<string> | undefined) ?? emptyEntityIdSet\n\t\t} else {\n\t\t\treturn (this.subTreePersistedData.get(blueprint.marker.placeholderName) as Set<string>) ?? emptyEntityIdSet\n\t\t}\n\t}\n\n\tpublic disposeOfRealm(realmToDisposeOf: EntityRealmState | EntityRealmStateStub) {\n\t\tthis.entityRealmStore.delete(realmToDisposeOf.realmKey)\n\t\trealmToDisposeOf.entity.realms.delete(realmToDisposeOf.realmKey)\n\n\t\tif (realmToDisposeOf.type === 'entityRealm') {\n\t\t\trealmToDisposeOf.blueprint.parent?.childrenWithPendingUpdates?.delete(realmToDisposeOf)\n\n\t\t\tfor (const child of realmToDisposeOf.children.values()) {\n\t\t\t\tswitch (child.type) {\n\t\t\t\t\tcase 'field':\n\t\t\t\t\t\tcontinue\n\t\t\t\t\tcase 'entityRealm':\n\t\t\t\t\tcase 'entityRealmStub': {\n\t\t\t\t\t\tthis.disposeOfRealm(child)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase 'entityList': {\n\t\t\t\t\t\tfor (const listChild of child.children.values()) {\n\t\t\t\t\t\t\tthis.disposeOfRealm(listChild)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst entity = realmToDisposeOf.entity\n\t\tif (entity.realms.size === 0) {\n\t\t\tthis.disposeOfEntity(entity)\n\t\t}\n\t}\n\n\tpublic disposeOfEntity(entity: EntityState) {\n\t\tfor (const realm of entity.realms.values()) {\n\t\t\tthis.disposeOfRealm(realm)\n\t\t}\n\t\tthis.entityStore.delete(entity.id.uniqueValue)\n\t\tthis.persistedEntityData.delete(entity.id.uniqueValue)\n\t}\n\n\tpublic effectivelyHasTreeRoot(candidateRoot: MarkerTreeRoot): boolean {\n\t\tcandidateRoots: for (const candidateSubTree of candidateRoot.subTrees.values()) {\n\t\t\tif (candidateSubTree.parameters.isCreating) {\n\t\t\t\t// This, by definition, won't trigger a query.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfor (const root of this.markerTrees.values()) {\n\t\t\t\tfor (const alreadyPresentSubTree of root.subTrees.values()) {\n\t\t\t\t\tconst isSubset = MarkerComparator.isSubTreeSubsetOf(cand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,EACtD;AAAA,EAEO,uBAAuB,eAAwC;AACrE;AAAgB,iBAAW,oBAAoB,cAAc,SAAS,OAAA,GAAU;AAC3E,YAAA,iBAAiB,WAAW,YAAY;AAE3C;AAAA,QACD;AACA,mBAAW,QAAQ,KAAK,YAAY,OAAA,GAAU;AAC7C,qBAAW,yBAAyB,KAAK,SAAS,OAAA,GAAU;AAC3D,kBAAM,WAAW,iBAAiB,kBAAkB,kBAAkB,qBAAqB;AAC3F,gBAAI,UAAU;AACJ,uBAAA;AAAA,YACV;AAAA,UACD;AAAA,QACD;AACO,eAAA;AAAA,MACR;AACO,WAAA;AAAA,EACR;AACD;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VariableInputTransformer.cjs","sources":["../../../src/core/VariableInputTransformer.ts"],"sourcesContent":["import { BindingError } from '../BindingError'\nimport { Environment, VariableFieldValue } from '../dao'\nimport type { FieldValue, OptionallyVariableFieldValue } from '../treeParameters'\n\nexport class VariableInputTransformer {\n\tpublic static transformValue(value: OptionallyVariableFieldValue, environment: Environment): FieldValue {\n\t\tif (value instanceof VariableFieldValue) {\n\t\t\treturn VariableInputTransformer.transformVariableFieldValue(value, environment)\n\t\t}\n\t\treturn value\n\t}\n\n\tpublic static transformVariableFieldValue(variableFieldValue: VariableFieldValue, environment: Environment): FieldValue {\n\t\tconst value = environment.getVariableOrElse(variableFieldValue.variableName, undefined)\n\t\t\t?? environment.getParameterOrElse(variableFieldValue.variableName, undefined)\n\n\t\tif (value === undefined) {\n\t\t\tthrow new BindingError(`Variable '${variableFieldValue.variableName}' not found.`)\n\t\t}\n\n\t\tif (typeof value !== 'string' && typeof value !== 'boolean' && typeof value !== 'number' && value !== null) {\n\t\t\tthrow new BindingError(`The value of the '${variableFieldValue.variableName}' must be a scalar or null, not '${typeof value}'.`)\n\t\t}\n\t\treturn value\n\t}\n}\n"],"names":["VariableFieldValue","BindingError"],"mappings":";;;;AAIO,MAAM,yBAAyB;AAAA,EACrC,OAAc,eAAe,OAAqC,aAAsC;AACvG,QAAI,iBAAiBA,mBAAAA,oBAAoB;AACjC,aAAA,yBAAyB,4BAA4B,OAAO,WAAW;AAAA,IAC/E;AACO,WAAA;AAAA,EACR;AAAA,EAEA,OAAc,4BAA4B,oBAAwC,aAAsC;AACjH,UAAA,QAAQ,YAAY,kBAAkB,mBAAmB,cAAc,MAAS,KAClF,YAAY,mBAAmB,mBAAmB,cAAc,MAAS;AAE7E,QAAI,UAAU,QAAW;AACxB,YAAM,IAAIC,aAAA,aAAa,aAAa,mBAAmB,YAAY,cAAc;AAAA,IAClF;AAEI,QAAA,OAAO,UAAU,YAAY,OAAO,UAAU,aAAa,OAAO,UAAU,YAAY,UAAU,MAAM;AACrG,YAAA,IAAIA,aAAAA,aAAa,qBAAqB,mBAAmB,YAAY,oCAAoC,OAAO,KAAK,IAAI;AAAA,IAChI;AACO,WAAA;AAAA,EACR;AACD;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VariableInputTransformer.js","sources":["../../../src/core/VariableInputTransformer.ts"],"sourcesContent":["import { BindingError } from '../BindingError'\nimport { Environment, VariableFieldValue } from '../dao'\nimport type { FieldValue, OptionallyVariableFieldValue } from '../treeParameters'\n\nexport class VariableInputTransformer {\n\tpublic static transformValue(value: OptionallyVariableFieldValue, environment: Environment): FieldValue {\n\t\tif (value instanceof VariableFieldValue) {\n\t\t\treturn VariableInputTransformer.transformVariableFieldValue(value, environment)\n\t\t}\n\t\treturn value\n\t}\n\n\tpublic static transformVariableFieldValue(variableFieldValue: VariableFieldValue, environment: Environment): FieldValue {\n\t\tconst value = environment.getVariableOrElse(variableFieldValue.variableName, undefined)\n\t\t\t?? environment.getParameterOrElse(variableFieldValue.variableName, undefined)\n\n\t\tif (value === undefined) {\n\t\t\tthrow new BindingError(`Variable '${variableFieldValue.variableName}' not found.`)\n\t\t}\n\n\t\tif (typeof value !== 'string' && typeof value !== 'boolean' && typeof value !== 'number' && value !== null) {\n\t\t\tthrow new BindingError(`The value of the '${variableFieldValue.variableName}' must be a scalar or null, not '${typeof value}'.`)\n\t\t}\n\t\treturn value\n\t}\n}\n"],"names":[],"mappings":";;AAIO,MAAM,yBAAyB;AAAA,EACrC,OAAc,eAAe,OAAqC,aAAsC;AACvG,QAAI,iBAAiB,oBAAoB;AACjC,aAAA,yBAAyB,4BAA4B,OAAO,WAAW;AAAA,IAC/E;AACO,WAAA;AAAA,EACR;AAAA,EAEA,OAAc,4BAA4B,oBAAwC,aAAsC;AACjH,UAAA,QAAQ,YAAY,kBAAkB,mBAAmB,cAAc,MAAS,KAClF,YAAY,mBAAmB,mBAAmB,cAAc,MAAS;AAE7E,QAAI,UAAU,QAAW;AACxB,YAAM,IAAI,aAAa,aAAa,mBAAmB,YAAY,cAAc;AAAA,IAClF;AAEI,QAAA,OAAO,UAAU,YAAY,OAAO,UAAU,aAAa,OAAO,UAAU,YAAY,UAAU,MAAM;AACrG,YAAA,IAAI,aAAa,qBAAqB,mBAAmB,YAAY,oCAAoC,OAAO,KAAK,IAAI;AAAA,IAChI;AACO,WAAA;AAAA,EACR;AACD;"}
|