@contember/binding 1.3.0-rc.3 → 2.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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.map +1 -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.map +1 -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/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.map +0 -1
- 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.map +0 -1
- 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/ListOperations.cjs +0 -0
- /package/dist/development/{core → src/core}/operations/ListOperations.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/ListOperations.cjs +0 -0
- /package/dist/production/{core → src/core}/operations/ListOperations.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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorsPreprocessor.cjs","sources":["../../../src/core/ErrorsPreprocessor.ts"],"sourcesContent":["import type { ErrorAccessor } from '../accessors'\nimport type { EntityId, FieldName, PlaceholderName } from '../treeParameters'\nimport { assertNever } from '../utils'\nimport { MutationAlias } from './requestAliases'\nimport { SubMutationOperation } from './MutationGenerator'\nimport { DataBindingTransactionResult } from './DataBinding'\nimport { MutationError, MutationResult, ValidationError } from '@contember/client'\n\nclass ErrorsPreprocessor {\n\tpublic constructor(\n\t\tprivate readonly requestResponse: DataBindingTransactionResult,\n\t\tprivate readonly operations: SubMutationOperation[],\n\t) {}\n\n\tpublic preprocess(): ErrorsPreprocessor.ErrorTreeRoot {\n\t\tconst treeRoot: ErrorsPreprocessor.ErrorTreeRoot = new Map()\n\n\t\tif (this.requestResponse === undefined) {\n\t\t\treturn treeRoot\n\t\t}\n\n\t\tfor (const operation of this.operations) {\n\t\t\tconst mutationResponse = this.requestResponse.data[operation.alias]\n\t\t\tconst processedResponse = this.processMutationResponse(mutationResponse)\n\n\t\t\tif (processedResponse === undefined) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst { subTreeType, subTreePlaceholder, id } = operation\n\n\t\t\tif (subTreeType === 'single') {\n\t\t\t\tif (treeRoot.has(subTreePlaceholder)) {\n\t\t\t\t\treturn this.rejectCorruptData()\n\t\t\t\t}\n\t\t\t\ttreeRoot.set(subTreePlaceholder, processedResponse)\n\t\t\t} else if (subTreeType === 'list') {\n\t\t\t\tconst child = treeRoot.get(subTreePlaceholder)\n\n\t\t\t\tif (child === undefined) {\n\t\t\t\t\ttreeRoot.set(subTreePlaceholder, {\n\t\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\t\tchildren: new Map([[id, processedResponse]]),\n\t\t\t\t\t\tvalidation: [],\n\t\t\t\t\t\texecution: [],\n\t\t\t\t\t})\n\t\t\t\t} else if (child.nodeType === 'iNode') {\n\t\t\t\t\tchild.children.set(id, processedResponse)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn assertNever(subTreeType)\n\t\t\t}\n\n\t\t}\n\t\treturn treeRoot\n\t}\n\n\tprivate processMutationResponse(mutationResponse: MutationResult): ErrorsPreprocessor.ErrorNode | undefined {\n\t\tif (mutationResponse.ok && mutationResponse.validation?.valid && mutationResponse.errors.length === 0) {\n\t\t\treturn undefined\n\t\t}\n\t\tif (mutationResponse.validation?.errors.length) {\n\t\t\treturn this.getErrorNode(mutationResponse.validation?.errors)\n\t\t}\n\t\tif (mutationResponse.errors.length) {\n\t\t\treturn this.getErrorNode(mutationResponse.errors)\n\t\t}\n\t\treturn undefined\n\t}\n\n\tprivate getErrorNode(errors: ValidationError[] | MutationError[]): ErrorsPreprocessor.ErrorNode {\n\t\tconst [head, ...tail] = errors\n\n\t\tlet rootNode = this.getRootNode(head)\n\n\t\terrorLoop: for (const error of tail) {\n\t\t\tlet currentNode = rootNode\n\n\t\t\tconst path = 'paths' in error ? (error.paths[0] ?? []) : error.path\n\n\t\t\tfor (let i = 0, pathLength = path.length; i < pathLength; i++) {\n\t\t\t\tconst pathNode = path[i]\n\n\t\t\t\tif (currentNode.nodeType === 'leaf') {\n\t\t\t\t\t(currentNode as any as ErrorsPreprocessor.ErrorINode).nodeType = 'iNode'\n\t\t\t\t\t;(currentNode as any as ErrorsPreprocessor.ErrorINode).children = new Map()\n\t\t\t\t}\n\n\t\t\t\tif ('field' in pathNode) {\n\t\t\t\t\tif (currentNode.nodeType === 'iNode') {\n\t\t\t\t\t\tlet alias = pathNode.field\n\t\t\t\t\t\tlet nextIndex = i + 1\n\t\t\t\t\t\tif (nextIndex in path) {\n\t\t\t\t\t\t\tconst nextPathNode = path[nextIndex]\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t'index' in nextPathNode &&\n\t\t\t\t\t\t\t\ttypeof nextPathNode.alias === 'string' &&\n\t\t\t\t\t\t\t\tnextPathNode.alias.startsWith(pathNode.field)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// We're dealing with a reduced hasMany relation.\n\t\t\t\t\t\t\t\ti++\n\t\t\t\t\t\t\t\tnextIndex++\n\t\t\t\t\t\t\t\talias = nextPathNode.alias\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!currentNode.children.has(alias)) {\n\t\t\t\t\t\t\tcurrentNode.children.set(alias, this.getRootNode(error, nextIndex))\n\t\t\t\t\t\t\tif (nextIndex <= path.length) {\n\t\t\t\t\t\t\t\t// This path has been handled by getRootNode\n\t\t\t\t\t\t\t\tcontinue errorLoop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentNode = currentNode.children.get(alias)!\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rejectCorruptData()\n\t\t\t\t\t}\n\t\t\t\t} else if ('index' in path) {\n\t\t\t\t\tif (currentNode.nodeType === 'iNode') {\n\t\t\t\t\t\tconst alias = pathNode.alias\n\n\t\t\t\t\t\tif (alias === null) {\n\t\t\t\t\t\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t\t\t\t\t\t`Corrupt data: undefined alias for node with index ${pathNode.index}.`,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst entityId = MutationAlias.decodeEntityId(alias)\n\n\t\t\t\t\t\tif (!currentNode.children.has(entityId)) {\n\t\t\t\t\t\t\tcurrentNode.children.set(entityId, this.getRootNode(error, i + 1))\n\t\t\t\t\t\t\tif (i + 1 <= path.length) {\n\t\t\t\t\t\t\t\t// This path has been handled by getRootNode\n\t\t\t\t\t\t\t\tcontinue errorLoop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentNode = currentNode.children.get(entityId)!\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rejectCorruptData()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.isExecutionError(error)) {\n\t\t\t\tcurrentNode.execution.push({ type: 'execution', code: error.type, developerMessage: error.message })\n\t\t\t} else {\n\t\t\t\tcurrentNode.validation.push(this.createValidationError(error.message.text))\n\t\t\t}\n\t\t}\n\n\t\treturn rootNode\n\t}\n\n\tprivate getRootNode(error: ValidationError | MutationError, startIndex: number = 0): ErrorsPreprocessor.ErrorNode {\n\t\tlet rootNode: ErrorsPreprocessor.ErrorNode = {\n\t\t\tvalidation: this.isExecutionError(error) ? [] : [this.createValidationError(error.message.text)],\n\t\t\texecution: this.isExecutionError(error) ? [{ type: 'execution', code: error.type, developerMessage: error.message }] : [],\n\t\t\tnodeType: 'leaf',\n\t\t}\n\t\tconst path = 'paths' in error ? (error.paths[0] ?? []) : error.path\n\t\tfor (let i = path.length - 1; i >= startIndex; i--) {\n\t\t\tconst pathNode = path[i]\n\t\t\tif ('field' in pathNode) {\n\t\t\t\trootNode = {\n\t\t\t\t\tvalidation: [],\n\t\t\t\t\texecution: [],\n\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\tchildren: new Map([[pathNode.field, rootNode]]),\n\t\t\t\t}\n\t\t\t} else if ('index' in pathNode) {\n\t\t\t\tconst alias = pathNode.alias\n\n\t\t\t\tif (alias === null) {\n\t\t\t\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t\t\t\t`Corrupt data: undefined alias for node with index ${pathNode.index}.`,\n\t\t\t\t\t)\n\t\t\t\t}\n\n\t\t\t\trootNode = {\n\t\t\t\t\tvalidation: [],\n\t\t\t\t\texecution: [],\n\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\tchildren: new Map([[MutationAlias.decodeEntityId(alias), rootNode]]),\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tassertNever(pathNode)\n\t\t\t}\n\t\t}\n\n\t\treturn rootNode\n\t}\n\n\tprivate createValidationError(message: string): ErrorAccessor.ValidationError {\n\t\tif (message === 'Field is required') {\n\t\t\t// TODO this is just awful. Validation errors currently don't have error codes which makes it more difficult\n\t\t\t// \tto translate the error messages. This is the most common such error, and so we just make up a code\n\t\t\t// \tin order to facilitate error handling further downstream.\n\t\t\treturn {\n\t\t\t\ttype: 'validation',\n\t\t\t\tcode: 'fieldRequired',\n\t\t\t\tmessage,\n\t\t\t}\n\t\t}\n\t\treturn { type: 'validation', message, code: undefined }\n\t}\n\n\tprivate isExecutionError(error: ValidationError | MutationError): error is MutationError {\n\t\treturn 'type' in error\n\t}\n\n\tprivate rejectCorruptData(): never {\n\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t'Received corrupted data: a node cannot be simultaneously field-indexed and path-indexed.',\n\t\t)\n\t}\n}\n\nnamespace ErrorsPreprocessor {\n\texport interface BaseErrorNode {\n\t\tvalidation: ErrorAccessor.ValidationError[]\n\t\texecution: ErrorAccessor.ExecutionError[]\n\t}\n\n\texport interface LeafErrorNode extends BaseErrorNode {\n\t\tnodeType: 'leaf'\n\t}\n\n\texport interface ErrorINode extends BaseErrorNode {\n\t\tnodeType: 'iNode'\n\t\tchildren: Map<FieldName | EntityId, ErrorNode>\n\t}\n\n\texport type ErrorNode = ErrorINode | LeafErrorNode\n\n\texport type ErrorTreeRoot = Map<PlaceholderName, ErrorNode>\n\n\texport class ErrorsPreprocessorError extends Error {}\n}\n\nexport { ErrorsPreprocessor }\n"],"names":["assertNever","MutationAlias","ErrorsPreprocessor"],"mappings":"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"}
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import { MutationAlias } from "./requestAliases/MutationAlias.js";
|
|
2
|
-
import { assertNever } from "../utils/assertNever.js";
|
|
3
|
-
class ErrorsPreprocessor {
|
|
4
|
-
constructor(requestResponse, operations) {
|
|
5
|
-
this.requestResponse = requestResponse;
|
|
6
|
-
this.operations = operations;
|
|
7
|
-
}
|
|
8
|
-
preprocess() {
|
|
9
|
-
const treeRoot = /* @__PURE__ */ new Map();
|
|
10
|
-
if (this.requestResponse === void 0) {
|
|
11
|
-
return treeRoot;
|
|
12
|
-
}
|
|
13
|
-
for (const operation of this.operations) {
|
|
14
|
-
const mutationResponse = this.requestResponse.data[operation.alias];
|
|
15
|
-
const processedResponse = this.processMutationResponse(mutationResponse);
|
|
16
|
-
if (processedResponse === void 0) {
|
|
17
|
-
continue;
|
|
18
|
-
}
|
|
19
|
-
const { subTreeType, subTreePlaceholder, id } = operation;
|
|
20
|
-
if (subTreeType === "single") {
|
|
21
|
-
if (treeRoot.has(subTreePlaceholder)) {
|
|
22
|
-
return this.rejectCorruptData();
|
|
23
|
-
}
|
|
24
|
-
treeRoot.set(subTreePlaceholder, processedResponse);
|
|
25
|
-
} else if (subTreeType === "list") {
|
|
26
|
-
const child = treeRoot.get(subTreePlaceholder);
|
|
27
|
-
if (child === void 0) {
|
|
28
|
-
treeRoot.set(subTreePlaceholder, {
|
|
29
|
-
nodeType: "iNode",
|
|
30
|
-
children: /* @__PURE__ */ new Map([[id, processedResponse]]),
|
|
31
|
-
validation: [],
|
|
32
|
-
execution: []
|
|
33
|
-
});
|
|
34
|
-
} else if (child.nodeType === "iNode") {
|
|
35
|
-
child.children.set(id, processedResponse);
|
|
36
|
-
}
|
|
37
|
-
} else {
|
|
38
|
-
return assertNever();
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return treeRoot;
|
|
42
|
-
}
|
|
43
|
-
processMutationResponse(mutationResponse) {
|
|
44
|
-
if (mutationResponse.ok && mutationResponse.validation?.valid && mutationResponse.errors.length === 0) {
|
|
45
|
-
return void 0;
|
|
46
|
-
}
|
|
47
|
-
if (mutationResponse.validation?.errors.length) {
|
|
48
|
-
return this.getErrorNode(mutationResponse.validation?.errors);
|
|
49
|
-
}
|
|
50
|
-
if (mutationResponse.errors.length) {
|
|
51
|
-
return this.getErrorNode(mutationResponse.errors);
|
|
52
|
-
}
|
|
53
|
-
return void 0;
|
|
54
|
-
}
|
|
55
|
-
getErrorNode(errors) {
|
|
56
|
-
const [head, ...tail] = errors;
|
|
57
|
-
let rootNode = this.getRootNode(head);
|
|
58
|
-
errorLoop:
|
|
59
|
-
for (const error of tail) {
|
|
60
|
-
let currentNode = rootNode;
|
|
61
|
-
const path = "paths" in error ? error.paths[0] ?? [] : error.path;
|
|
62
|
-
for (let i = 0, pathLength = path.length; i < pathLength; i++) {
|
|
63
|
-
const pathNode = path[i];
|
|
64
|
-
if (currentNode.nodeType === "leaf") {
|
|
65
|
-
currentNode.nodeType = "iNode";
|
|
66
|
-
currentNode.children = /* @__PURE__ */ new Map();
|
|
67
|
-
}
|
|
68
|
-
if ("field" in pathNode) {
|
|
69
|
-
if (currentNode.nodeType === "iNode") {
|
|
70
|
-
let alias = pathNode.field;
|
|
71
|
-
let nextIndex = i + 1;
|
|
72
|
-
if (nextIndex in path) {
|
|
73
|
-
const nextPathNode = path[nextIndex];
|
|
74
|
-
if ("index" in nextPathNode && typeof nextPathNode.alias === "string" && nextPathNode.alias.startsWith(pathNode.field)) {
|
|
75
|
-
i++;
|
|
76
|
-
nextIndex++;
|
|
77
|
-
alias = nextPathNode.alias;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
if (!currentNode.children.has(alias)) {
|
|
81
|
-
currentNode.children.set(alias, this.getRootNode(error, nextIndex));
|
|
82
|
-
if (nextIndex <= path.length) {
|
|
83
|
-
continue errorLoop;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
currentNode = currentNode.children.get(alias);
|
|
87
|
-
} else {
|
|
88
|
-
this.rejectCorruptData();
|
|
89
|
-
}
|
|
90
|
-
} else if ("index" in path) {
|
|
91
|
-
if (currentNode.nodeType === "iNode") {
|
|
92
|
-
const alias = pathNode.alias;
|
|
93
|
-
if (alias === null) {
|
|
94
|
-
throw new ErrorsPreprocessor.ErrorsPreprocessorError(
|
|
95
|
-
`Corrupt data: undefined alias for node with index ${pathNode.index}.`
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
const entityId = MutationAlias.decodeEntityId(alias);
|
|
99
|
-
if (!currentNode.children.has(entityId)) {
|
|
100
|
-
currentNode.children.set(entityId, this.getRootNode(error, i + 1));
|
|
101
|
-
if (i + 1 <= path.length) {
|
|
102
|
-
continue errorLoop;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
currentNode = currentNode.children.get(entityId);
|
|
106
|
-
} else {
|
|
107
|
-
this.rejectCorruptData();
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
if (this.isExecutionError(error)) {
|
|
112
|
-
currentNode.execution.push({ type: "execution", code: error.type, developerMessage: error.message });
|
|
113
|
-
} else {
|
|
114
|
-
currentNode.validation.push(this.createValidationError(error.message.text));
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return rootNode;
|
|
118
|
-
}
|
|
119
|
-
getRootNode(error, startIndex = 0) {
|
|
120
|
-
let rootNode = {
|
|
121
|
-
validation: this.isExecutionError(error) ? [] : [this.createValidationError(error.message.text)],
|
|
122
|
-
execution: this.isExecutionError(error) ? [{ type: "execution", code: error.type, developerMessage: error.message }] : [],
|
|
123
|
-
nodeType: "leaf"
|
|
124
|
-
};
|
|
125
|
-
const path = "paths" in error ? error.paths[0] ?? [] : error.path;
|
|
126
|
-
for (let i = path.length - 1; i >= startIndex; i--) {
|
|
127
|
-
const pathNode = path[i];
|
|
128
|
-
if ("field" in pathNode) {
|
|
129
|
-
rootNode = {
|
|
130
|
-
validation: [],
|
|
131
|
-
execution: [],
|
|
132
|
-
nodeType: "iNode",
|
|
133
|
-
children: /* @__PURE__ */ new Map([[pathNode.field, rootNode]])
|
|
134
|
-
};
|
|
135
|
-
} else if ("index" in pathNode) {
|
|
136
|
-
const alias = pathNode.alias;
|
|
137
|
-
if (alias === null) {
|
|
138
|
-
throw new ErrorsPreprocessor.ErrorsPreprocessorError(
|
|
139
|
-
`Corrupt data: undefined alias for node with index ${pathNode.index}.`
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
rootNode = {
|
|
143
|
-
validation: [],
|
|
144
|
-
execution: [],
|
|
145
|
-
nodeType: "iNode",
|
|
146
|
-
children: /* @__PURE__ */ new Map([[MutationAlias.decodeEntityId(alias), rootNode]])
|
|
147
|
-
};
|
|
148
|
-
} else {
|
|
149
|
-
assertNever();
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
return rootNode;
|
|
153
|
-
}
|
|
154
|
-
createValidationError(message) {
|
|
155
|
-
if (message === "Field is required") {
|
|
156
|
-
return {
|
|
157
|
-
type: "validation",
|
|
158
|
-
code: "fieldRequired",
|
|
159
|
-
message
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
return { type: "validation", message, code: void 0 };
|
|
163
|
-
}
|
|
164
|
-
isExecutionError(error) {
|
|
165
|
-
return "type" in error;
|
|
166
|
-
}
|
|
167
|
-
rejectCorruptData() {
|
|
168
|
-
throw new ErrorsPreprocessor.ErrorsPreprocessorError(
|
|
169
|
-
"Received corrupted data: a node cannot be simultaneously field-indexed and path-indexed."
|
|
170
|
-
);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
((ErrorsPreprocessor2) => {
|
|
174
|
-
class ErrorsPreprocessorError extends Error {
|
|
175
|
-
}
|
|
176
|
-
ErrorsPreprocessor2.ErrorsPreprocessorError = ErrorsPreprocessorError;
|
|
177
|
-
})(ErrorsPreprocessor || (ErrorsPreprocessor = {}));
|
|
178
|
-
export {
|
|
179
|
-
ErrorsPreprocessor
|
|
180
|
-
};
|
|
181
|
-
//# sourceMappingURL=ErrorsPreprocessor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorsPreprocessor.js","sources":["../../../src/core/ErrorsPreprocessor.ts"],"sourcesContent":["import type { ErrorAccessor } from '../accessors'\nimport type { EntityId, FieldName, PlaceholderName } from '../treeParameters'\nimport { assertNever } from '../utils'\nimport { MutationAlias } from './requestAliases'\nimport { SubMutationOperation } from './MutationGenerator'\nimport { DataBindingTransactionResult } from './DataBinding'\nimport { MutationError, MutationResult, ValidationError } from '@contember/client'\n\nclass ErrorsPreprocessor {\n\tpublic constructor(\n\t\tprivate readonly requestResponse: DataBindingTransactionResult,\n\t\tprivate readonly operations: SubMutationOperation[],\n\t) {}\n\n\tpublic preprocess(): ErrorsPreprocessor.ErrorTreeRoot {\n\t\tconst treeRoot: ErrorsPreprocessor.ErrorTreeRoot = new Map()\n\n\t\tif (this.requestResponse === undefined) {\n\t\t\treturn treeRoot\n\t\t}\n\n\t\tfor (const operation of this.operations) {\n\t\t\tconst mutationResponse = this.requestResponse.data[operation.alias]\n\t\t\tconst processedResponse = this.processMutationResponse(mutationResponse)\n\n\t\t\tif (processedResponse === undefined) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst { subTreeType, subTreePlaceholder, id } = operation\n\n\t\t\tif (subTreeType === 'single') {\n\t\t\t\tif (treeRoot.has(subTreePlaceholder)) {\n\t\t\t\t\treturn this.rejectCorruptData()\n\t\t\t\t}\n\t\t\t\ttreeRoot.set(subTreePlaceholder, processedResponse)\n\t\t\t} else if (subTreeType === 'list') {\n\t\t\t\tconst child = treeRoot.get(subTreePlaceholder)\n\n\t\t\t\tif (child === undefined) {\n\t\t\t\t\ttreeRoot.set(subTreePlaceholder, {\n\t\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\t\tchildren: new Map([[id, processedResponse]]),\n\t\t\t\t\t\tvalidation: [],\n\t\t\t\t\t\texecution: [],\n\t\t\t\t\t})\n\t\t\t\t} else if (child.nodeType === 'iNode') {\n\t\t\t\t\tchild.children.set(id, processedResponse)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn assertNever(subTreeType)\n\t\t\t}\n\n\t\t}\n\t\treturn treeRoot\n\t}\n\n\tprivate processMutationResponse(mutationResponse: MutationResult): ErrorsPreprocessor.ErrorNode | undefined {\n\t\tif (mutationResponse.ok && mutationResponse.validation?.valid && mutationResponse.errors.length === 0) {\n\t\t\treturn undefined\n\t\t}\n\t\tif (mutationResponse.validation?.errors.length) {\n\t\t\treturn this.getErrorNode(mutationResponse.validation?.errors)\n\t\t}\n\t\tif (mutationResponse.errors.length) {\n\t\t\treturn this.getErrorNode(mutationResponse.errors)\n\t\t}\n\t\treturn undefined\n\t}\n\n\tprivate getErrorNode(errors: ValidationError[] | MutationError[]): ErrorsPreprocessor.ErrorNode {\n\t\tconst [head, ...tail] = errors\n\n\t\tlet rootNode = this.getRootNode(head)\n\n\t\terrorLoop: for (const error of tail) {\n\t\t\tlet currentNode = rootNode\n\n\t\t\tconst path = 'paths' in error ? (error.paths[0] ?? []) : error.path\n\n\t\t\tfor (let i = 0, pathLength = path.length; i < pathLength; i++) {\n\t\t\t\tconst pathNode = path[i]\n\n\t\t\t\tif (currentNode.nodeType === 'leaf') {\n\t\t\t\t\t(currentNode as any as ErrorsPreprocessor.ErrorINode).nodeType = 'iNode'\n\t\t\t\t\t;(currentNode as any as ErrorsPreprocessor.ErrorINode).children = new Map()\n\t\t\t\t}\n\n\t\t\t\tif ('field' in pathNode) {\n\t\t\t\t\tif (currentNode.nodeType === 'iNode') {\n\t\t\t\t\t\tlet alias = pathNode.field\n\t\t\t\t\t\tlet nextIndex = i + 1\n\t\t\t\t\t\tif (nextIndex in path) {\n\t\t\t\t\t\t\tconst nextPathNode = path[nextIndex]\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t'index' in nextPathNode &&\n\t\t\t\t\t\t\t\ttypeof nextPathNode.alias === 'string' &&\n\t\t\t\t\t\t\t\tnextPathNode.alias.startsWith(pathNode.field)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// We're dealing with a reduced hasMany relation.\n\t\t\t\t\t\t\t\ti++\n\t\t\t\t\t\t\t\tnextIndex++\n\t\t\t\t\t\t\t\talias = nextPathNode.alias\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!currentNode.children.has(alias)) {\n\t\t\t\t\t\t\tcurrentNode.children.set(alias, this.getRootNode(error, nextIndex))\n\t\t\t\t\t\t\tif (nextIndex <= path.length) {\n\t\t\t\t\t\t\t\t// This path has been handled by getRootNode\n\t\t\t\t\t\t\t\tcontinue errorLoop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentNode = currentNode.children.get(alias)!\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rejectCorruptData()\n\t\t\t\t\t}\n\t\t\t\t} else if ('index' in path) {\n\t\t\t\t\tif (currentNode.nodeType === 'iNode') {\n\t\t\t\t\t\tconst alias = pathNode.alias\n\n\t\t\t\t\t\tif (alias === null) {\n\t\t\t\t\t\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t\t\t\t\t\t`Corrupt data: undefined alias for node with index ${pathNode.index}.`,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst entityId = MutationAlias.decodeEntityId(alias)\n\n\t\t\t\t\t\tif (!currentNode.children.has(entityId)) {\n\t\t\t\t\t\t\tcurrentNode.children.set(entityId, this.getRootNode(error, i + 1))\n\t\t\t\t\t\t\tif (i + 1 <= path.length) {\n\t\t\t\t\t\t\t\t// This path has been handled by getRootNode\n\t\t\t\t\t\t\t\tcontinue errorLoop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentNode = currentNode.children.get(entityId)!\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rejectCorruptData()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.isExecutionError(error)) {\n\t\t\t\tcurrentNode.execution.push({ type: 'execution', code: error.type, developerMessage: error.message })\n\t\t\t} else {\n\t\t\t\tcurrentNode.validation.push(this.createValidationError(error.message.text))\n\t\t\t}\n\t\t}\n\n\t\treturn rootNode\n\t}\n\n\tprivate getRootNode(error: ValidationError | MutationError, startIndex: number = 0): ErrorsPreprocessor.ErrorNode {\n\t\tlet rootNode: ErrorsPreprocessor.ErrorNode = {\n\t\t\tvalidation: this.isExecutionError(error) ? [] : [this.createValidationError(error.message.text)],\n\t\t\texecution: this.isExecutionError(error) ? [{ type: 'execution', code: error.type, developerMessage: error.message }] : [],\n\t\t\tnodeType: 'leaf',\n\t\t}\n\t\tconst path = 'paths' in error ? (error.paths[0] ?? []) : error.path\n\t\tfor (let i = path.length - 1; i >= startIndex; i--) {\n\t\t\tconst pathNode = path[i]\n\t\t\tif ('field' in pathNode) {\n\t\t\t\trootNode = {\n\t\t\t\t\tvalidation: [],\n\t\t\t\t\texecution: [],\n\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\tchildren: new Map([[pathNode.field, rootNode]]),\n\t\t\t\t}\n\t\t\t} else if ('index' in pathNode) {\n\t\t\t\tconst alias = pathNode.alias\n\n\t\t\t\tif (alias === null) {\n\t\t\t\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t\t\t\t`Corrupt data: undefined alias for node with index ${pathNode.index}.`,\n\t\t\t\t\t)\n\t\t\t\t}\n\n\t\t\t\trootNode = {\n\t\t\t\t\tvalidation: [],\n\t\t\t\t\texecution: [],\n\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\tchildren: new Map([[MutationAlias.decodeEntityId(alias), rootNode]]),\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tassertNever(pathNode)\n\t\t\t}\n\t\t}\n\n\t\treturn rootNode\n\t}\n\n\tprivate createValidationError(message: string): ErrorAccessor.ValidationError {\n\t\tif (message === 'Field is required') {\n\t\t\t// TODO this is just awful. Validation errors currently don't have error codes which makes it more difficult\n\t\t\t// \tto translate the error messages. This is the most common such error, and so we just make up a code\n\t\t\t// \tin order to facilitate error handling further downstream.\n\t\t\treturn {\n\t\t\t\ttype: 'validation',\n\t\t\t\tcode: 'fieldRequired',\n\t\t\t\tmessage,\n\t\t\t}\n\t\t}\n\t\treturn { type: 'validation', message, code: undefined }\n\t}\n\n\tprivate isExecutionError(error: ValidationError | MutationError): error is MutationError {\n\t\treturn 'type' in error\n\t}\n\n\tprivate rejectCorruptData(): never {\n\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t'Received corrupted data: a node cannot be simultaneously field-indexed and path-indexed.',\n\t\t)\n\t}\n}\n\nnamespace ErrorsPreprocessor {\n\texport interface BaseErrorNode {\n\t\tvalidation: ErrorAccessor.ValidationError[]\n\t\texecution: ErrorAccessor.ExecutionError[]\n\t}\n\n\texport interface LeafErrorNode extends BaseErrorNode {\n\t\tnodeType: 'leaf'\n\t}\n\n\texport interface ErrorINode extends BaseErrorNode {\n\t\tnodeType: 'iNode'\n\t\tchildren: Map<FieldName | EntityId, ErrorNode>\n\t}\n\n\texport type ErrorNode = ErrorINode | LeafErrorNode\n\n\texport type ErrorTreeRoot = Map<PlaceholderName, ErrorNode>\n\n\texport class ErrorsPreprocessorError extends Error {}\n}\n\nexport { ErrorsPreprocessor }\n"],"names":["ErrorsPreprocessor"],"mappings":"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"}
|
|
@@ -1,440 +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 getEntityMarker = require("./state/getEntityMarker.cjs");
|
|
11
|
-
const StateIterator = require("./state/StateIterator.cjs");
|
|
12
|
-
const assertNever = require("../utils/assertNever.cjs");
|
|
13
|
-
class EventManager {
|
|
14
|
-
constructor(asyncBatchUpdatesOptions, batchUpdatesOptions, config, dirtinessTracker, onUpdate, treeStore, batchedUpdates) {
|
|
15
|
-
__publicField(this, "transactionDepth", 0);
|
|
16
|
-
__publicField(this, "isFrozenWhileUpdating", false);
|
|
17
|
-
// This should ideally not exists as it should be synonymous to `this.ongoingPersistOperation !== undefined`
|
|
18
|
-
// but it makes persist-related promise juggling significantly more straightforward.
|
|
19
|
-
__publicField(this, "isMutating", false);
|
|
20
|
-
__publicField(this, "ongoingPersistOperation");
|
|
21
|
-
__publicField(this, "previousMetadata");
|
|
22
|
-
__publicField(this, "newlyInitializedWithListeners", /* @__PURE__ */ new Set());
|
|
23
|
-
__publicField(this, "pendingWithBeforeUpdate", /* @__PURE__ */ new Set());
|
|
24
|
-
__publicField(this, "rootsWithPendingUpdates", /* @__PURE__ */ new Set());
|
|
25
|
-
this.asyncBatchUpdatesOptions = asyncBatchUpdatesOptions;
|
|
26
|
-
this.batchUpdatesOptions = batchUpdatesOptions;
|
|
27
|
-
this.config = config;
|
|
28
|
-
this.dirtinessTracker = dirtinessTracker;
|
|
29
|
-
this.onUpdate = onUpdate;
|
|
30
|
-
this.treeStore = treeStore;
|
|
31
|
-
this.batchedUpdates = batchedUpdates;
|
|
32
|
-
}
|
|
33
|
-
async persistOperation(operation) {
|
|
34
|
-
if (this.transactionDepth > 0) {
|
|
35
|
-
throw new BindingError.BindingError(`Cannot trigger a persist whilst batching updates!`);
|
|
36
|
-
}
|
|
37
|
-
const ongoingOperation = this.ongoingPersistOperation;
|
|
38
|
-
if (ongoingOperation !== void 0) {
|
|
39
|
-
return await ongoingOperation;
|
|
40
|
-
}
|
|
41
|
-
return await (this.ongoingPersistOperation = new Promise(async (resolve, reject) => {
|
|
42
|
-
this.isMutating = true;
|
|
43
|
-
this.flushUpdates();
|
|
44
|
-
try {
|
|
45
|
-
resolve(await this.asyncOperation(operation));
|
|
46
|
-
} catch (e) {
|
|
47
|
-
console.error("PersistError", e);
|
|
48
|
-
reject(e);
|
|
49
|
-
} finally {
|
|
50
|
-
this.ongoingPersistOperation = void 0;
|
|
51
|
-
this.isMutating = false;
|
|
52
|
-
this.flushUpdates();
|
|
53
|
-
}
|
|
54
|
-
}));
|
|
55
|
-
}
|
|
56
|
-
syncTransaction(transaction) {
|
|
57
|
-
try {
|
|
58
|
-
this.transactionDepth++;
|
|
59
|
-
return transaction();
|
|
60
|
-
} finally {
|
|
61
|
-
this.transactionDepth--;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
syncOperation(operation) {
|
|
65
|
-
const result = this.syncTransaction(operation);
|
|
66
|
-
this.flushUpdates();
|
|
67
|
-
return result;
|
|
68
|
-
}
|
|
69
|
-
async asyncTransaction(transaction) {
|
|
70
|
-
try {
|
|
71
|
-
this.transactionDepth++;
|
|
72
|
-
return await transaction();
|
|
73
|
-
} finally {
|
|
74
|
-
this.transactionDepth--;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
async asyncOperation(operation) {
|
|
78
|
-
const result = await this.asyncTransaction(operation);
|
|
79
|
-
this.flushUpdates();
|
|
80
|
-
return result;
|
|
81
|
-
}
|
|
82
|
-
flushUpdates() {
|
|
83
|
-
if (this.transactionDepth > 0) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
if (this.isFrozenWhileUpdating) {
|
|
87
|
-
throw new BindingError.BindingError(
|
|
88
|
-
`Trying to perform an update while the whole accessor tree is already updating. This is most likely caused by updating the accessor tree while rendering or from within the 'update' event handler, which is a no-op. If you wish to mutate the tree in reaction to other changes, use the 'beforeUpdate' event.`
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
const newMetadata = this.getNewUpdateMetadata();
|
|
92
|
-
if (!this.shouldFlushUpdates(newMetadata)) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
this.batchedUpdates(() => {
|
|
96
|
-
this.isFrozenWhileUpdating = true;
|
|
97
|
-
this.triggerBeforeFlushEvents();
|
|
98
|
-
this.onUpdate(newMetadata);
|
|
99
|
-
this.flushPendingAccessorUpdates(Array.from(this.rootsWithPendingUpdates));
|
|
100
|
-
this.rootsWithPendingUpdates.clear();
|
|
101
|
-
this.isFrozenWhileUpdating = false;
|
|
102
|
-
this.previousMetadata = newMetadata;
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
getNewUpdateMetadata() {
|
|
106
|
-
return {
|
|
107
|
-
isMutating: this.isMutating
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
shouldFlushUpdates(newMetadata) {
|
|
111
|
-
if (this.transactionDepth > 0) {
|
|
112
|
-
return false;
|
|
113
|
-
}
|
|
114
|
-
if (this.previousMetadata === void 0) {
|
|
115
|
-
return true;
|
|
116
|
-
}
|
|
117
|
-
if (this.rootsWithPendingUpdates.size) {
|
|
118
|
-
return true;
|
|
119
|
-
}
|
|
120
|
-
for (const key in newMetadata) {
|
|
121
|
-
const fromPrevious = this.previousMetadata[key];
|
|
122
|
-
const fromNew = newMetadata[key];
|
|
123
|
-
if (!Object.is(fromPrevious, fromNew)) {
|
|
124
|
-
return true;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return false;
|
|
128
|
-
}
|
|
129
|
-
registerNewlyInitialized(newlyInitialized) {
|
|
130
|
-
const initializeListeners = this.getEventListeners(newlyInitialized, { type: "initialize" });
|
|
131
|
-
if (initializeListeners === void 0) {
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
this.newlyInitializedWithListeners.add(newlyInitialized);
|
|
135
|
-
if (this.transactionDepth === 0) {
|
|
136
|
-
this.triggerOnInitialize();
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
registerUpdatedConnection(parentState, placeholderName) {
|
|
140
|
-
if (parentState.fieldsWithPendingConnectionUpdates === void 0) {
|
|
141
|
-
parentState.fieldsWithPendingConnectionUpdates = /* @__PURE__ */ new Set();
|
|
142
|
-
}
|
|
143
|
-
const marker = getEntityMarker.getEntityMarker(parentState);
|
|
144
|
-
placeholders:
|
|
145
|
-
for (const [fieldName, placeholdersByField] of marker.fields.placeholders) {
|
|
146
|
-
if (typeof placeholdersByField === "string") {
|
|
147
|
-
if (placeholdersByField === placeholderName) {
|
|
148
|
-
parentState.fieldsWithPendingConnectionUpdates.add(fieldName);
|
|
149
|
-
}
|
|
150
|
-
} else {
|
|
151
|
-
for (const placeholderByFieldName of placeholdersByField) {
|
|
152
|
-
if (placeholderByFieldName === placeholderName) {
|
|
153
|
-
parentState.fieldsWithPendingConnectionUpdates.add(fieldName);
|
|
154
|
-
continue placeholders;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
registerJustUpdated(justUpdated, changesDelta) {
|
|
161
|
-
const beforeUpdateListeners = this.getEventListeners(justUpdated, { type: "beforeUpdate" });
|
|
162
|
-
if (beforeUpdateListeners !== void 0) {
|
|
163
|
-
this.pendingWithBeforeUpdate.add(justUpdated);
|
|
164
|
-
}
|
|
165
|
-
justUpdated.accessor = void 0;
|
|
166
|
-
switch (justUpdated.type) {
|
|
167
|
-
case "entityRealm":
|
|
168
|
-
case "entityList": {
|
|
169
|
-
justUpdated.unpersistedChangesCount += changesDelta;
|
|
170
|
-
{
|
|
171
|
-
if (justUpdated.unpersistedChangesCount < 0) {
|
|
172
|
-
console.error(
|
|
173
|
-
`We have *JUST* reached a completely invalid state. From now on, anything can (and likely will) go wrong. This is definitely a bug. Please try to report whatever led to this situation.`
|
|
174
|
-
);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
const parent = justUpdated.blueprint.parent;
|
|
178
|
-
if (parent === void 0) {
|
|
179
|
-
this.rootsWithPendingUpdates.add(justUpdated);
|
|
180
|
-
if (!(justUpdated.blueprint.type === "subTree" && justUpdated.blueprint.marker.parameters.isCreating && justUpdated.blueprint.marker.parameters.isUnpersisted)) {
|
|
181
|
-
this.dirtinessTracker.increaseBy(changesDelta);
|
|
182
|
-
}
|
|
183
|
-
} else {
|
|
184
|
-
if (!parent.childrenWithPendingUpdates) {
|
|
185
|
-
parent.childrenWithPendingUpdates = /* @__PURE__ */ new Set();
|
|
186
|
-
}
|
|
187
|
-
parent.childrenWithPendingUpdates.add(justUpdated);
|
|
188
|
-
this.registerJustUpdated(parent, changesDelta);
|
|
189
|
-
}
|
|
190
|
-
break;
|
|
191
|
-
}
|
|
192
|
-
case "field": {
|
|
193
|
-
const parent = justUpdated.parent;
|
|
194
|
-
if (!parent.childrenWithPendingUpdates) {
|
|
195
|
-
parent.childrenWithPendingUpdates = /* @__PURE__ */ new Set();
|
|
196
|
-
}
|
|
197
|
-
parent.childrenWithPendingUpdates.add(justUpdated);
|
|
198
|
-
this.registerJustUpdated(justUpdated.parent, changesDelta);
|
|
199
|
-
break;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
flushPendingAccessorUpdates(rootStates) {
|
|
204
|
-
const agenda = rootStates;
|
|
205
|
-
for (const state of agenda) {
|
|
206
|
-
const updateListeners = state.type === "field" ? this.getEventDispatchers(state, { type: "update" }, [state.getAccessor()]) : state.type === "entityRealm" ? this.getEventDispatchers(state, { type: "update" }, [state.getAccessor()]) : this.getEventDispatchers(state, { type: "update" }, [state.getAccessor()]);
|
|
207
|
-
if (updateListeners !== void 0) {
|
|
208
|
-
for (const handler of updateListeners) {
|
|
209
|
-
handler();
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
if (state.type === "entityRealm" && state.fieldsWithPendingConnectionUpdates) {
|
|
213
|
-
for (const updatedField of state.fieldsWithPendingConnectionUpdates) {
|
|
214
|
-
const listeners = this.getEventListeners(state, { type: "connectionUpdate", key: updatedField });
|
|
215
|
-
if (!listeners) {
|
|
216
|
-
continue;
|
|
217
|
-
}
|
|
218
|
-
for (const listener of listeners) {
|
|
219
|
-
listener(state.getAccessor());
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
switch (state.type) {
|
|
224
|
-
case "entityRealm":
|
|
225
|
-
case "entityList": {
|
|
226
|
-
if (state.childrenWithPendingUpdates !== void 0) {
|
|
227
|
-
for (const childState of state.childrenWithPendingUpdates) {
|
|
228
|
-
agenda.push(childState);
|
|
229
|
-
}
|
|
230
|
-
state.childrenWithPendingUpdates.clear();
|
|
231
|
-
}
|
|
232
|
-
break;
|
|
233
|
-
}
|
|
234
|
-
case "field":
|
|
235
|
-
break;
|
|
236
|
-
default:
|
|
237
|
-
assertNever.assertNever();
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
async triggerAsyncMutatingEvent(eventType, options) {
|
|
242
|
-
await this.asyncTransaction(async () => {
|
|
243
|
-
const callbackQueue = [];
|
|
244
|
-
for (const [, subTreeState] of StateIterator.StateIterator.eachRootState(this.treeStore)) {
|
|
245
|
-
for (const iNode of StateIterator.StateIterator.depthFirstINodes(subTreeState)) {
|
|
246
|
-
const listeners = this.getEventListeners(iNode, { type: eventType }) ?? [];
|
|
247
|
-
for (const listener of listeners) {
|
|
248
|
-
callbackQueue.push([iNode, listener]);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
for (let waterfallDepth = 0; waterfallDepth < this.config.getValue(`${eventType}SettleLimit`); waterfallDepth++) {
|
|
253
|
-
const promiseReturns = [];
|
|
254
|
-
const correspondingStates = [];
|
|
255
|
-
if (callbackQueue.length === 0) {
|
|
256
|
-
break;
|
|
257
|
-
}
|
|
258
|
-
for (const [state, callback] of callbackQueue) {
|
|
259
|
-
correspondingStates.push(state);
|
|
260
|
-
const changesCountBefore2 = this.dirtinessTracker.getTotalTouchCount();
|
|
261
|
-
let validateChanges = false;
|
|
262
|
-
try {
|
|
263
|
-
const result = callback(state.getAccessor, options);
|
|
264
|
-
if (result instanceof Promise) {
|
|
265
|
-
validateChanges = true;
|
|
266
|
-
promiseReturns.push(result);
|
|
267
|
-
} else {
|
|
268
|
-
promiseReturns.push(Promise.resolve(result));
|
|
269
|
-
}
|
|
270
|
-
} catch (e) {
|
|
271
|
-
promiseReturns.push(Promise.reject(e));
|
|
272
|
-
}
|
|
273
|
-
if (validateChanges) {
|
|
274
|
-
this.validateWithoutChanges(changesCountBefore2, eventType);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
const changesCountBefore = this.dirtinessTracker.getTotalTouchCount();
|
|
278
|
-
const newCallbacks = await Promise.allSettled(promiseReturns);
|
|
279
|
-
this.validateWithoutChanges(changesCountBefore, eventType);
|
|
280
|
-
callbackQueue.length = 0;
|
|
281
|
-
for (const newlyInitialized of this.newlyInitializedWithListeners) {
|
|
282
|
-
if (newlyInitialized.type === "field") {
|
|
283
|
-
continue;
|
|
284
|
-
}
|
|
285
|
-
const beforePersistHandlers = this.getEventListeners(newlyInitialized, { type: eventType });
|
|
286
|
-
if (beforePersistHandlers) {
|
|
287
|
-
for (const listener of beforePersistHandlers) {
|
|
288
|
-
callbackQueue.push([newlyInitialized, listener]);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
this.triggerBeforeFlushEvents();
|
|
293
|
-
this.handleRejections(eventType, newCallbacks);
|
|
294
|
-
for (let i = 0; i < newCallbacks.length; i++) {
|
|
295
|
-
const result = newCallbacks[i];
|
|
296
|
-
const correspondingState = correspondingStates[i];
|
|
297
|
-
if (result.status === "fulfilled") {
|
|
298
|
-
if (typeof result.value === "function") {
|
|
299
|
-
callbackQueue.push([correspondingState, result.value]);
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
{
|
|
305
|
-
if (callbackQueue.length) {
|
|
306
|
-
throw new BindingError.BindingError(
|
|
307
|
-
`Exceeded the ${eventType} settle limit. Your code likely contains a deadlock. If that's not the case, raise the settle limit from DataBindingProvider.`
|
|
308
|
-
);
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
triggerBeforeFlushEvents() {
|
|
314
|
-
this.syncTransaction(() => {
|
|
315
|
-
const settleLimit = this.config.getValue("beforeUpdateSettleLimit");
|
|
316
|
-
for (let attemptNumber = 0; attemptNumber < settleLimit; attemptNumber++) {
|
|
317
|
-
if (!this.pendingWithBeforeUpdate.size) {
|
|
318
|
-
this.triggerOnInitialize();
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
|
-
const withBeforeUpdate = this.pendingWithBeforeUpdate;
|
|
322
|
-
this.pendingWithBeforeUpdate = /* @__PURE__ */ new Set();
|
|
323
|
-
for (const state of withBeforeUpdate) {
|
|
324
|
-
const listeners = this.getEventListeners(state, { type: "beforeUpdate" });
|
|
325
|
-
if (listeners === void 0) {
|
|
326
|
-
continue;
|
|
327
|
-
}
|
|
328
|
-
switch (state.type) {
|
|
329
|
-
case "field":
|
|
330
|
-
for (const listener of listeners) {
|
|
331
|
-
listener(state.getAccessor());
|
|
332
|
-
}
|
|
333
|
-
break;
|
|
334
|
-
case "entityRealm":
|
|
335
|
-
case "entityList":
|
|
336
|
-
for (const listener of listeners) {
|
|
337
|
-
state.getAccessor().batchUpdates(listener);
|
|
338
|
-
}
|
|
339
|
-
break;
|
|
340
|
-
default:
|
|
341
|
-
return assertNever.assertNever();
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
this.triggerOnInitialize();
|
|
345
|
-
}
|
|
346
|
-
throw new BindingError.BindingError(
|
|
347
|
-
`Maximum stabilization limit of updates caused by 'beforeUpdate' exceeded. This likely means there is an infinite feedback loop in your code.`
|
|
348
|
-
);
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
triggerOnInitialize() {
|
|
352
|
-
this.syncTransaction(() => {
|
|
353
|
-
for (const state of this.newlyInitializedWithListeners) {
|
|
354
|
-
const listeners = state.type === "field" ? this.getEventDispatchers(state, { type: "initialize" }, [state.getAccessor, this.batchUpdatesOptions]) : state.type === "entityRealm" ? this.getEventDispatchers(state, { type: "initialize" }, [state.getAccessor, this.batchUpdatesOptions]) : this.getEventDispatchers(state, { type: "initialize" }, [state.getAccessor, this.batchUpdatesOptions]);
|
|
355
|
-
if (listeners) {
|
|
356
|
-
for (const listener of listeners) {
|
|
357
|
-
listener();
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
if (state.type === "entityRealm") {
|
|
361
|
-
state.entity.hasIdSetInStone = true;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
this.newlyInitializedWithListeners.clear();
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
|
-
async triggerOnPersistError(options) {
|
|
368
|
-
await this.asyncTransaction(async () => {
|
|
369
|
-
const handlerPromises = [];
|
|
370
|
-
for (const [, subTreeState] of StateIterator.StateIterator.eachRootState(this.treeStore)) {
|
|
371
|
-
for (const iNode of StateIterator.StateIterator.depthFirstINodes(subTreeState)) {
|
|
372
|
-
const dispatchers = iNode.type === "entityRealm" ? this.getEventDispatchers(iNode, { type: "persistError" }, [iNode.getAccessor, options]) : this.getEventDispatchers(iNode, { type: "persistError" }, [iNode.getAccessor, options]);
|
|
373
|
-
if (dispatchers === void 0) {
|
|
374
|
-
continue;
|
|
375
|
-
}
|
|
376
|
-
for (const listener of dispatchers ?? []) {
|
|
377
|
-
try {
|
|
378
|
-
const result = listener();
|
|
379
|
-
if (result instanceof Promise) {
|
|
380
|
-
handlerPromises.push(result);
|
|
381
|
-
} else {
|
|
382
|
-
handlerPromises.push(Promise.resolve(result));
|
|
383
|
-
}
|
|
384
|
-
} catch (e) {
|
|
385
|
-
handlerPromises.push(Promise.reject(e));
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
const handlerResults = await Promise.allSettled(handlerPromises);
|
|
391
|
-
this.handleRejections("persistError", handlerResults);
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
async triggerOnBeforePersist() {
|
|
395
|
-
return this.triggerAsyncMutatingEvent("beforePersist", this.asyncBatchUpdatesOptions);
|
|
396
|
-
}
|
|
397
|
-
async triggerOnPersistSuccess(options) {
|
|
398
|
-
return this.triggerAsyncMutatingEvent("persistSuccess", options);
|
|
399
|
-
}
|
|
400
|
-
getEventListeners(state, event) {
|
|
401
|
-
if (!state.eventListeners) {
|
|
402
|
-
return void 0;
|
|
403
|
-
}
|
|
404
|
-
return state.eventListeners.get(event);
|
|
405
|
-
}
|
|
406
|
-
getEventDispatchers(state, event, listenerArgs) {
|
|
407
|
-
const eventListeners = this.getEventListeners(state, event);
|
|
408
|
-
if (eventListeners === void 0) {
|
|
409
|
-
return void 0;
|
|
410
|
-
}
|
|
411
|
-
return Array.from(eventListeners.values(), (listener) => {
|
|
412
|
-
return () => listener(...listenerArgs);
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
handleRejections(handler, promises) {
|
|
416
|
-
const rejections = promises.filter((it) => it.status === "rejected");
|
|
417
|
-
if (rejections.length === 0) {
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
rejections.forEach((it) => console.error(it.reason));
|
|
421
|
-
{
|
|
422
|
-
throw new BindingError.BindingError(
|
|
423
|
-
`A ${handler} handler returned a promise that rejected. This is a no-op that will fail silently in production.`
|
|
424
|
-
);
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
validateWithoutChanges(initialCount, eventType) {
|
|
428
|
-
const changesCountAfter = this.dirtinessTracker.getTotalTouchCount();
|
|
429
|
-
{
|
|
430
|
-
if (initialCount !== changesCountAfter) {
|
|
431
|
-
throw new BindingError.BindingError(
|
|
432
|
-
`A ${eventType} event handler cannot be asynchronous and alter the accessor tree at the same time. To achieve this, prepare your data asynchronously but only touch the tree from a returned callback.`
|
|
433
|
-
);
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
__publicField(EventManager, "NO_CHANGES_DIFFERENCE", 0);
|
|
439
|
-
exports.EventManager = EventManager;
|
|
440
|
-
//# sourceMappingURL=EventManager.cjs.map
|