@contember/binding 2.0.0-alpha.2 → 2.0.0-alpha.21
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 +13 -116
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +3 -106
- package/dist/development/index.js.map +1 -1
- package/dist/production/index.cjs +13 -116
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.js +3 -106
- package/dist/production/index.js.map +1 -1
- package/dist/types/index.d.ts +3 -11
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -21
- package/src/index.ts +3 -14
- package/src/tsconfig.json +7 -2
- 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 +0 -10
- package/dist/development/BindingError.cjs.map +0 -1
- package/dist/development/BindingError.js +0 -10
- package/dist/development/BindingError.js.map +0 -1
- package/dist/development/accessorTree/NormalizedPersistedData.cjs +0 -10
- package/dist/development/accessorTree/NormalizedPersistedData.cjs.map +0 -1
- package/dist/development/accessorTree/NormalizedPersistedData.js +0 -10
- 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 +0 -179
- package/dist/development/accessors/EntityAccessor.cjs.map +0 -1
- package/dist/development/accessors/EntityAccessor.js +0 -179
- package/dist/development/accessors/EntityAccessor.js.map +0 -1
- package/dist/development/accessors/EntityListAccessor.cjs +0 -108
- package/dist/development/accessors/EntityListAccessor.cjs.map +0 -1
- package/dist/development/accessors/EntityListAccessor.js +0 -108
- package/dist/development/accessors/EntityListAccessor.js.map +0 -1
- package/dist/development/accessors/ErrorAccessor.cjs +0 -16
- package/dist/development/accessors/ErrorAccessor.cjs.map +0 -1
- package/dist/development/accessors/ErrorAccessor.js +0 -16
- package/dist/development/accessors/ErrorAccessor.js.map +0 -1
- package/dist/development/accessors/FieldAccessor.cjs +0 -62
- package/dist/development/accessors/FieldAccessor.cjs.map +0 -1
- package/dist/development/accessors/FieldAccessor.js +0 -62
- package/dist/development/accessors/FieldAccessor.js.map +0 -1
- package/dist/development/accessors/TreeRootAccessor.cjs +0 -14
- package/dist/development/accessors/TreeRootAccessor.cjs.map +0 -1
- package/dist/development/accessors/TreeRootAccessor.js +0 -14
- package/dist/development/accessors/TreeRootAccessor.js.map +0 -1
- package/dist/development/bindingTypes.cjs +0 -9
- package/dist/development/bindingTypes.cjs.map +0 -1
- package/dist/development/bindingTypes.js +0 -9
- 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 +0 -79
- package/dist/development/core/MarkerComparator.cjs.map +0 -1
- package/dist/development/core/MarkerComparator.js +0 -79
- 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 +0 -113
- package/dist/development/core/QueryGenerator.cjs.map +0 -1
- package/dist/development/core/QueryGenerator.js +0 -113
- 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 +0 -125
- package/dist/development/core/RequestResponseNormalizer.cjs.map +0 -1
- package/dist/development/core/RequestResponseNormalizer.js +0 -125
- 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 +0 -213
- package/dist/development/core/TreeAugmenter.cjs.map +0 -1
- package/dist/development/core/TreeAugmenter.js +0 -213
- 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 +0 -304
- package/dist/development/core/TreeParameterMerger.cjs.map +0 -1
- package/dist/development/core/TreeParameterMerger.js +0 -304
- 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 +0 -24
- package/dist/development/core/VariableInputTransformer.cjs.map +0 -1
- package/dist/development/core/VariableInputTransformer.js +0 -24
- 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 +0 -14
- package/dist/development/core/exceptions/LocalizedBindingError.cjs.map +0 -1
- package/dist/development/core/exceptions/LocalizedBindingError.js +0 -14
- package/dist/development/core/exceptions/LocalizedBindingError.js.map +0 -1
- package/dist/development/core/exceptions/MarkerSugarer.cjs +0 -56
- package/dist/development/core/exceptions/MarkerSugarer.cjs.map +0 -1
- package/dist/development/core/exceptions/MarkerSugarer.js +0 -56
- package/dist/development/core/exceptions/MarkerSugarer.js.map +0 -1
- package/dist/development/core/exceptions/TreeParameterSugarer.cjs +0 -33
- package/dist/development/core/exceptions/TreeParameterSugarer.cjs.map +0 -1
- package/dist/development/core/exceptions/TreeParameterSugarer.js +0 -33
- package/dist/development/core/exceptions/TreeParameterSugarer.js.map +0 -1
- package/dist/development/core/factories/createBatchUpdatesOptions.cjs +0 -20
- package/dist/development/core/factories/createBatchUpdatesOptions.cjs.map +0 -1
- package/dist/development/core/factories/createBatchUpdatesOptions.js +0 -20
- package/dist/development/core/factories/createBatchUpdatesOptions.js.map +0 -1
- package/dist/development/core/operations/EntityOperations.cjs +0 -230
- package/dist/development/core/operations/EntityOperations.cjs.map +0 -1
- package/dist/development/core/operations/EntityOperations.js +0 -230
- package/dist/development/core/operations/EntityOperations.js.map +0 -1
- package/dist/development/core/operations/FieldOperations.cjs +0 -96
- package/dist/development/core/operations/FieldOperations.cjs.map +0 -1
- package/dist/development/core/operations/FieldOperations.js +0 -96
- package/dist/development/core/operations/FieldOperations.js.map +0 -1
- package/dist/development/core/operations/ListOperations.cjs +0 -159
- package/dist/development/core/operations/ListOperations.cjs.map +0 -1
- package/dist/development/core/operations/ListOperations.js +0 -159
- package/dist/development/core/operations/ListOperations.js.map +0 -1
- package/dist/development/core/operations/OperationsHelpers.cjs +0 -85
- package/dist/development/core/operations/OperationsHelpers.cjs.map +0 -1
- package/dist/development/core/operations/OperationsHelpers.js +0 -85
- package/dist/development/core/operations/OperationsHelpers.js.map +0 -1
- package/dist/development/core/requestAliases/MutationAlias.cjs +0 -14
- package/dist/development/core/requestAliases/MutationAlias.cjs.map +0 -1
- package/dist/development/core/requestAliases/MutationAlias.js +0 -14
- package/dist/development/core/requestAliases/MutationAlias.js.map +0 -1
- package/dist/development/core/schema/Schema.cjs +0 -39
- package/dist/development/core/schema/Schema.cjs.map +0 -1
- package/dist/development/core/schema/Schema.js +0 -39
- 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 +0 -38
- package/dist/development/core/schema/SchemaPreprocessor.cjs.map +0 -1
- package/dist/development/core/schema/SchemaPreprocessor.js +0 -38
- package/dist/development/core/schema/SchemaPreprocessor.js.map +0 -1
- package/dist/development/core/state/StateIterator.cjs +0 -100
- package/dist/development/core/state/StateIterator.cjs.map +0 -1
- package/dist/development/core/state/StateIterator.js +0 -100
- package/dist/development/core/state/StateIterator.js.map +0 -1
- package/dist/development/core/state/getEntityMarker.cjs +0 -5
- package/dist/development/core/state/getEntityMarker.cjs.map +0 -1
- package/dist/development/core/state/getEntityMarker.js +0 -5
- package/dist/development/core/state/getEntityMarker.js.map +0 -1
- package/dist/development/core/utils/createQueryBuilder.cjs +0 -32
- package/dist/development/core/utils/createQueryBuilder.cjs.map +0 -1
- package/dist/development/core/utils/createQueryBuilder.js +0 -32
- package/dist/development/core/utils/createQueryBuilder.js.map +0 -1
- package/dist/development/core/utils/getCombinedSignal.cjs +0 -33
- package/dist/development/core/utils/getCombinedSignal.cjs.map +0 -1
- package/dist/development/core/utils/getCombinedSignal.js +0 -33
- package/dist/development/core/utils/getCombinedSignal.js.map +0 -1
- package/dist/development/dao/Environment.cjs +0 -213
- package/dist/development/dao/Environment.cjs.map +0 -1
- package/dist/development/dao/Environment.js +0 -213
- package/dist/development/dao/Environment.js.map +0 -1
- package/dist/development/dao/TreeNodeEnvironmentFactory.cjs +0 -89
- package/dist/development/dao/TreeNodeEnvironmentFactory.cjs.map +0 -1
- package/dist/development/dao/TreeNodeEnvironmentFactory.js +0 -89
- package/dist/development/dao/TreeNodeEnvironmentFactory.js.map +0 -1
- package/dist/development/dao/VariableFieldValue.cjs +0 -9
- package/dist/development/dao/VariableFieldValue.cjs.map +0 -1
- package/dist/development/dao/VariableFieldValue.js +0 -9
- 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 +0 -18
- package/dist/development/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +0 -1
- package/dist/development/fieldHelpers/helpers/TemporalFieldHelper.js +0 -18
- package/dist/development/fieldHelpers/helpers/TemporalFieldHelper.js.map +0 -1
- package/dist/development/fieldHelpers/helpers/UuidFieldHelper.cjs +0 -16
- package/dist/development/fieldHelpers/helpers/UuidFieldHelper.cjs.map +0 -1
- package/dist/development/fieldHelpers/helpers/UuidFieldHelper.js +0 -16
- package/dist/development/fieldHelpers/helpers/UuidFieldHelper.js.map +0 -1
- package/dist/development/markers/EntityFieldMarkersContainer.cjs +0 -41
- package/dist/development/markers/EntityFieldMarkersContainer.cjs.map +0 -1
- package/dist/development/markers/EntityFieldMarkersContainer.js +0 -41
- package/dist/development/markers/EntityFieldMarkersContainer.js.map +0 -1
- package/dist/development/markers/EntityFieldsWithHoistablesMarker.cjs +0 -11
- package/dist/development/markers/EntityFieldsWithHoistablesMarker.cjs.map +0 -1
- package/dist/development/markers/EntityFieldsWithHoistablesMarker.js +0 -11
- 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 +0 -10
- package/dist/development/markers/MarkerTreeRoot.cjs.map +0 -1
- package/dist/development/markers/MarkerTreeRoot.js +0 -10
- package/dist/development/markers/MarkerTreeRoot.js.map +0 -1
- package/dist/development/markers/ParentEntityMarker.cjs +0 -10
- package/dist/development/markers/ParentEntityMarker.cjs.map +0 -1
- package/dist/development/markers/ParentEntityMarker.js +0 -10
- package/dist/development/markers/ParentEntityMarker.js.map +0 -1
- package/dist/development/markers/PlaceholderGenerator.cjs +0 -23
- package/dist/development/markers/PlaceholderGenerator.cjs.map +0 -1
- package/dist/development/markers/PlaceholderGenerator.js +0 -23
- package/dist/development/markers/PlaceholderGenerator.js.map +0 -1
- package/dist/development/markers/PlaceholderParametersGenerator.cjs +0 -62
- package/dist/development/markers/PlaceholderParametersGenerator.cjs.map +0 -1
- package/dist/development/markers/PlaceholderParametersGenerator.js +0 -62
- 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 +0 -200
- package/dist/development/queryLanguage/MarkerFactory.cjs.map +0 -1
- package/dist/development/queryLanguage/MarkerFactory.js +0 -200
- 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 +0 -6
- package/dist/development/queryLanguage/QueryLanguageError.cjs.map +0 -1
- package/dist/development/queryLanguage/QueryLanguageError.js +0 -6
- 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 +0 -22
- package/dist/development/treeParameterHelpers/wrapFilterInHasOnes.cjs.map +0 -1
- package/dist/development/treeParameterHelpers/wrapFilterInHasOnes.js +0 -22
- package/dist/development/treeParameterHelpers/wrapFilterInHasOnes.js.map +0 -1
- package/dist/development/treeParameters/EntityCreationParameters.cjs +0 -8
- package/dist/development/treeParameters/EntityCreationParameters.cjs.map +0 -1
- package/dist/development/treeParameters/EntityCreationParameters.js +0 -8
- package/dist/development/treeParameters/EntityCreationParameters.js.map +0 -1
- package/dist/development/treeParameters/EntityListPreferences.cjs +0 -7
- package/dist/development/treeParameters/EntityListPreferences.cjs.map +0 -1
- package/dist/development/treeParameters/EntityListPreferences.js +0 -7
- package/dist/development/treeParameters/EntityListPreferences.js.map +0 -1
- package/dist/development/treeParameters/EventListenersStore.cjs +0 -70
- package/dist/development/treeParameters/EventListenersStore.cjs.map +0 -1
- package/dist/development/treeParameters/EventListenersStore.js +0 -70
- package/dist/development/treeParameters/EventListenersStore.js.map +0 -1
- package/dist/development/treeParameters/LeafField.cjs +0 -7
- package/dist/development/treeParameters/LeafField.cjs.map +0 -1
- package/dist/development/treeParameters/LeafField.js +0 -7
- package/dist/development/treeParameters/LeafField.js.map +0 -1
- package/dist/development/treeParameters/QualifiedEntityParameters.cjs +0 -7
- package/dist/development/treeParameters/QualifiedEntityParameters.cjs.map +0 -1
- package/dist/development/treeParameters/QualifiedEntityParameters.js +0 -7
- package/dist/development/treeParameters/QualifiedEntityParameters.js.map +0 -1
- package/dist/development/treeParameters/Relation.cjs +0 -7
- package/dist/development/treeParameters/Relation.cjs.map +0 -1
- package/dist/development/treeParameters/Relation.js +0 -7
- package/dist/development/treeParameters/Relation.js.map +0 -1
- package/dist/development/utils/Hashing.cjs +0 -22
- package/dist/development/utils/Hashing.cjs.map +0 -1
- package/dist/development/utils/Hashing.js +0 -22
- package/dist/development/utils/Hashing.js.map +0 -1
- package/dist/development/utils/TreeNodeUtils.cjs +0 -77
- package/dist/development/utils/TreeNodeUtils.cjs.map +0 -1
- package/dist/development/utils/TreeNodeUtils.js +0 -77
- 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 +0 -10
- package/dist/development/utils/assertNever.cjs.map +0 -1
- package/dist/development/utils/assertNever.js +0 -10
- package/dist/development/utils/assertNever.js.map +0 -1
- package/dist/development/utils/generateEnumerabilityPreventingEntropy.cjs +0 -7
- package/dist/development/utils/generateEnumerabilityPreventingEntropy.cjs.map +0 -1
- package/dist/development/utils/generateEnumerabilityPreventingEntropy.js +0 -7
- package/dist/development/utils/generateEnumerabilityPreventingEntropy.js.map +0 -1
- package/dist/development/utils/isEmptyObject.cjs +0 -12
- package/dist/development/utils/isEmptyObject.cjs.map +0 -1
- package/dist/development/utils/isEmptyObject.js +0 -12
- package/dist/development/utils/isEmptyObject.js.map +0 -1
- package/dist/development/utils/ucfirst.cjs +0 -5
- package/dist/development/utils/ucfirst.cjs.map +0 -1
- package/dist/development/utils/ucfirst.js +0 -5
- package/dist/development/utils/ucfirst.js.map +0 -1
- package/dist/production/BindingError.cjs +0 -10
- package/dist/production/BindingError.cjs.map +0 -1
- package/dist/production/BindingError.js +0 -10
- package/dist/production/BindingError.js.map +0 -1
- package/dist/production/accessorTree/NormalizedPersistedData.cjs +0 -10
- package/dist/production/accessorTree/NormalizedPersistedData.cjs.map +0 -1
- package/dist/production/accessorTree/NormalizedPersistedData.js +0 -10
- 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 +0 -179
- package/dist/production/accessors/EntityAccessor.cjs.map +0 -1
- package/dist/production/accessors/EntityAccessor.js +0 -179
- package/dist/production/accessors/EntityAccessor.js.map +0 -1
- package/dist/production/accessors/EntityListAccessor.cjs +0 -108
- package/dist/production/accessors/EntityListAccessor.cjs.map +0 -1
- package/dist/production/accessors/EntityListAccessor.js +0 -108
- package/dist/production/accessors/EntityListAccessor.js.map +0 -1
- package/dist/production/accessors/ErrorAccessor.cjs +0 -16
- package/dist/production/accessors/ErrorAccessor.cjs.map +0 -1
- package/dist/production/accessors/ErrorAccessor.js +0 -16
- package/dist/production/accessors/ErrorAccessor.js.map +0 -1
- package/dist/production/accessors/FieldAccessor.cjs +0 -62
- package/dist/production/accessors/FieldAccessor.cjs.map +0 -1
- package/dist/production/accessors/FieldAccessor.js +0 -62
- package/dist/production/accessors/FieldAccessor.js.map +0 -1
- package/dist/production/accessors/TreeRootAccessor.cjs +0 -14
- package/dist/production/accessors/TreeRootAccessor.cjs.map +0 -1
- package/dist/production/accessors/TreeRootAccessor.js +0 -14
- package/dist/production/accessors/TreeRootAccessor.js.map +0 -1
- package/dist/production/bindingTypes.cjs +0 -9
- package/dist/production/bindingTypes.cjs.map +0 -1
- package/dist/production/bindingTypes.js +0 -9
- 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 +0 -79
- package/dist/production/core/MarkerComparator.cjs.map +0 -1
- package/dist/production/core/MarkerComparator.js +0 -79
- 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 +0 -113
- package/dist/production/core/QueryGenerator.cjs.map +0 -1
- package/dist/production/core/QueryGenerator.js +0 -113
- 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 +0 -125
- package/dist/production/core/RequestResponseNormalizer.cjs.map +0 -1
- package/dist/production/core/RequestResponseNormalizer.js +0 -125
- 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 +0 -213
- package/dist/production/core/TreeAugmenter.cjs.map +0 -1
- package/dist/production/core/TreeAugmenter.js +0 -213
- 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 +0 -304
- package/dist/production/core/TreeParameterMerger.cjs.map +0 -1
- package/dist/production/core/TreeParameterMerger.js +0 -304
- 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 +0 -24
- package/dist/production/core/VariableInputTransformer.cjs.map +0 -1
- package/dist/production/core/VariableInputTransformer.js +0 -24
- 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 +0 -14
- package/dist/production/core/exceptions/LocalizedBindingError.cjs.map +0 -1
- package/dist/production/core/exceptions/LocalizedBindingError.js +0 -14
- package/dist/production/core/exceptions/LocalizedBindingError.js.map +0 -1
- package/dist/production/core/exceptions/MarkerSugarer.cjs +0 -56
- package/dist/production/core/exceptions/MarkerSugarer.cjs.map +0 -1
- package/dist/production/core/exceptions/MarkerSugarer.js +0 -56
- package/dist/production/core/exceptions/MarkerSugarer.js.map +0 -1
- package/dist/production/core/exceptions/TreeParameterSugarer.cjs +0 -33
- package/dist/production/core/exceptions/TreeParameterSugarer.cjs.map +0 -1
- package/dist/production/core/exceptions/TreeParameterSugarer.js +0 -33
- package/dist/production/core/exceptions/TreeParameterSugarer.js.map +0 -1
- package/dist/production/core/factories/createBatchUpdatesOptions.cjs +0 -20
- package/dist/production/core/factories/createBatchUpdatesOptions.cjs.map +0 -1
- package/dist/production/core/factories/createBatchUpdatesOptions.js +0 -20
- package/dist/production/core/factories/createBatchUpdatesOptions.js.map +0 -1
- package/dist/production/core/operations/EntityOperations.cjs +0 -230
- package/dist/production/core/operations/EntityOperations.cjs.map +0 -1
- package/dist/production/core/operations/EntityOperations.js +0 -230
- package/dist/production/core/operations/EntityOperations.js.map +0 -1
- package/dist/production/core/operations/FieldOperations.cjs +0 -76
- package/dist/production/core/operations/FieldOperations.cjs.map +0 -1
- package/dist/production/core/operations/FieldOperations.js +0 -76
- package/dist/production/core/operations/FieldOperations.js.map +0 -1
- package/dist/production/core/operations/ListOperations.cjs +0 -159
- package/dist/production/core/operations/ListOperations.cjs.map +0 -1
- package/dist/production/core/operations/ListOperations.js +0 -159
- package/dist/production/core/operations/ListOperations.js.map +0 -1
- package/dist/production/core/operations/OperationsHelpers.cjs +0 -85
- package/dist/production/core/operations/OperationsHelpers.cjs.map +0 -1
- package/dist/production/core/operations/OperationsHelpers.js +0 -85
- package/dist/production/core/operations/OperationsHelpers.js.map +0 -1
- package/dist/production/core/requestAliases/MutationAlias.cjs +0 -14
- package/dist/production/core/requestAliases/MutationAlias.cjs.map +0 -1
- package/dist/production/core/requestAliases/MutationAlias.js +0 -14
- package/dist/production/core/requestAliases/MutationAlias.js.map +0 -1
- package/dist/production/core/schema/Schema.cjs +0 -39
- package/dist/production/core/schema/Schema.cjs.map +0 -1
- package/dist/production/core/schema/Schema.js +0 -39
- 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 +0 -38
- package/dist/production/core/schema/SchemaPreprocessor.cjs.map +0 -1
- package/dist/production/core/schema/SchemaPreprocessor.js +0 -38
- package/dist/production/core/schema/SchemaPreprocessor.js.map +0 -1
- package/dist/production/core/state/StateIterator.cjs +0 -100
- package/dist/production/core/state/StateIterator.cjs.map +0 -1
- package/dist/production/core/state/StateIterator.js +0 -100
- package/dist/production/core/state/StateIterator.js.map +0 -1
- package/dist/production/core/state/getEntityMarker.cjs +0 -5
- package/dist/production/core/state/getEntityMarker.cjs.map +0 -1
- package/dist/production/core/state/getEntityMarker.js +0 -5
- package/dist/production/core/state/getEntityMarker.js.map +0 -1
- package/dist/production/core/utils/createQueryBuilder.cjs +0 -32
- package/dist/production/core/utils/createQueryBuilder.cjs.map +0 -1
- package/dist/production/core/utils/createQueryBuilder.js +0 -32
- package/dist/production/core/utils/createQueryBuilder.js.map +0 -1
- package/dist/production/core/utils/getCombinedSignal.cjs +0 -33
- package/dist/production/core/utils/getCombinedSignal.cjs.map +0 -1
- package/dist/production/core/utils/getCombinedSignal.js +0 -33
- package/dist/production/core/utils/getCombinedSignal.js.map +0 -1
- package/dist/production/dao/Environment.cjs +0 -213
- package/dist/production/dao/Environment.cjs.map +0 -1
- package/dist/production/dao/Environment.js +0 -213
- package/dist/production/dao/Environment.js.map +0 -1
- package/dist/production/dao/TreeNodeEnvironmentFactory.cjs +0 -89
- package/dist/production/dao/TreeNodeEnvironmentFactory.cjs.map +0 -1
- package/dist/production/dao/TreeNodeEnvironmentFactory.js +0 -89
- package/dist/production/dao/TreeNodeEnvironmentFactory.js.map +0 -1
- package/dist/production/dao/VariableFieldValue.cjs +0 -9
- package/dist/production/dao/VariableFieldValue.cjs.map +0 -1
- package/dist/production/dao/VariableFieldValue.js +0 -9
- 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 +0 -18
- package/dist/production/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +0 -1
- package/dist/production/fieldHelpers/helpers/TemporalFieldHelper.js +0 -18
- package/dist/production/fieldHelpers/helpers/TemporalFieldHelper.js.map +0 -1
- package/dist/production/fieldHelpers/helpers/UuidFieldHelper.cjs +0 -16
- package/dist/production/fieldHelpers/helpers/UuidFieldHelper.cjs.map +0 -1
- package/dist/production/fieldHelpers/helpers/UuidFieldHelper.js +0 -16
- package/dist/production/fieldHelpers/helpers/UuidFieldHelper.js.map +0 -1
- package/dist/production/markers/EntityFieldMarkersContainer.cjs +0 -41
- package/dist/production/markers/EntityFieldMarkersContainer.cjs.map +0 -1
- package/dist/production/markers/EntityFieldMarkersContainer.js +0 -41
- package/dist/production/markers/EntityFieldMarkersContainer.js.map +0 -1
- package/dist/production/markers/EntityFieldsWithHoistablesMarker.cjs +0 -11
- package/dist/production/markers/EntityFieldsWithHoistablesMarker.cjs.map +0 -1
- package/dist/production/markers/EntityFieldsWithHoistablesMarker.js +0 -11
- 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 +0 -10
- package/dist/production/markers/MarkerTreeRoot.cjs.map +0 -1
- package/dist/production/markers/MarkerTreeRoot.js +0 -10
- package/dist/production/markers/MarkerTreeRoot.js.map +0 -1
- package/dist/production/markers/ParentEntityMarker.cjs +0 -10
- package/dist/production/markers/ParentEntityMarker.cjs.map +0 -1
- package/dist/production/markers/ParentEntityMarker.js +0 -10
- package/dist/production/markers/ParentEntityMarker.js.map +0 -1
- package/dist/production/markers/PlaceholderGenerator.cjs +0 -23
- package/dist/production/markers/PlaceholderGenerator.cjs.map +0 -1
- package/dist/production/markers/PlaceholderGenerator.js +0 -23
- package/dist/production/markers/PlaceholderGenerator.js.map +0 -1
- package/dist/production/markers/PlaceholderParametersGenerator.cjs +0 -62
- package/dist/production/markers/PlaceholderParametersGenerator.cjs.map +0 -1
- package/dist/production/markers/PlaceholderParametersGenerator.js +0 -62
- 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 +0 -200
- package/dist/production/queryLanguage/MarkerFactory.cjs.map +0 -1
- package/dist/production/queryLanguage/MarkerFactory.js +0 -200
- 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 +0 -6
- package/dist/production/queryLanguage/QueryLanguageError.cjs.map +0 -1
- package/dist/production/queryLanguage/QueryLanguageError.js +0 -6
- 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 +0 -22
- package/dist/production/treeParameterHelpers/wrapFilterInHasOnes.cjs.map +0 -1
- package/dist/production/treeParameterHelpers/wrapFilterInHasOnes.js +0 -22
- package/dist/production/treeParameterHelpers/wrapFilterInHasOnes.js.map +0 -1
- package/dist/production/treeParameters/EntityCreationParameters.cjs +0 -8
- package/dist/production/treeParameters/EntityCreationParameters.cjs.map +0 -1
- package/dist/production/treeParameters/EntityCreationParameters.js +0 -8
- package/dist/production/treeParameters/EntityCreationParameters.js.map +0 -1
- package/dist/production/treeParameters/EntityListPreferences.cjs +0 -7
- package/dist/production/treeParameters/EntityListPreferences.cjs.map +0 -1
- package/dist/production/treeParameters/EntityListPreferences.js +0 -7
- package/dist/production/treeParameters/EntityListPreferences.js.map +0 -1
- package/dist/production/treeParameters/EventListenersStore.cjs +0 -70
- package/dist/production/treeParameters/EventListenersStore.cjs.map +0 -1
- package/dist/production/treeParameters/EventListenersStore.js +0 -70
- package/dist/production/treeParameters/EventListenersStore.js.map +0 -1
- package/dist/production/treeParameters/LeafField.cjs +0 -7
- package/dist/production/treeParameters/LeafField.cjs.map +0 -1
- package/dist/production/treeParameters/LeafField.js +0 -7
- package/dist/production/treeParameters/LeafField.js.map +0 -1
- package/dist/production/treeParameters/QualifiedEntityParameters.cjs +0 -7
- package/dist/production/treeParameters/QualifiedEntityParameters.cjs.map +0 -1
- package/dist/production/treeParameters/QualifiedEntityParameters.js +0 -7
- package/dist/production/treeParameters/QualifiedEntityParameters.js.map +0 -1
- package/dist/production/treeParameters/Relation.cjs +0 -7
- package/dist/production/treeParameters/Relation.cjs.map +0 -1
- package/dist/production/treeParameters/Relation.js +0 -7
- package/dist/production/treeParameters/Relation.js.map +0 -1
- package/dist/production/utils/Hashing.cjs +0 -22
- package/dist/production/utils/Hashing.cjs.map +0 -1
- package/dist/production/utils/Hashing.js +0 -22
- package/dist/production/utils/Hashing.js.map +0 -1
- package/dist/production/utils/TreeNodeUtils.cjs +0 -77
- package/dist/production/utils/TreeNodeUtils.cjs.map +0 -1
- package/dist/production/utils/TreeNodeUtils.js +0 -77
- 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 +0 -10
- package/dist/production/utils/assertNever.cjs.map +0 -1
- package/dist/production/utils/assertNever.js +0 -10
- package/dist/production/utils/assertNever.js.map +0 -1
- package/dist/production/utils/generateEnumerabilityPreventingEntropy.cjs +0 -7
- package/dist/production/utils/generateEnumerabilityPreventingEntropy.cjs.map +0 -1
- package/dist/production/utils/generateEnumerabilityPreventingEntropy.js +0 -7
- package/dist/production/utils/generateEnumerabilityPreventingEntropy.js.map +0 -1
- package/dist/production/utils/isEmptyObject.cjs +0 -12
- package/dist/production/utils/isEmptyObject.cjs.map +0 -1
- package/dist/production/utils/isEmptyObject.js +0 -12
- package/dist/production/utils/isEmptyObject.js.map +0 -1
- package/dist/production/utils/ucfirst.cjs +0 -5
- package/dist/production/utils/ucfirst.cjs.map +0 -1
- package/dist/production/utils/ucfirst.js +0 -5
- package/dist/production/utils/ucfirst.js.map +0 -1
- package/dist/types/BindingError.d.ts +0 -4
- package/dist/types/BindingError.d.ts.map +0 -1
- package/dist/types/accessorTree/NormalizedPersistedData.d.ts +0 -13
- package/dist/types/accessorTree/NormalizedPersistedData.d.ts.map +0 -1
- package/dist/types/accessorTree/PersistResult.d.ts +0 -23
- package/dist/types/accessorTree/PersistResult.d.ts.map +0 -1
- package/dist/types/accessorTree/QueryRequestResponse.d.ts +0 -20
- package/dist/types/accessorTree/QueryRequestResponse.d.ts.map +0 -1
- package/dist/types/accessorTree/RuntimeId.d.ts +0 -35
- package/dist/types/accessorTree/RuntimeId.d.ts.map +0 -1
- package/dist/types/accessorTree/index.d.ts +0 -5
- package/dist/types/accessorTree/index.d.ts.map +0 -1
- package/dist/types/accessors/AsyncBatchUpdatesOptions.d.ts +0 -8
- package/dist/types/accessors/AsyncBatchUpdatesOptions.d.ts.map +0 -1
- package/dist/types/accessors/BatchUpdatesOptions.d.ts +0 -9
- package/dist/types/accessors/BatchUpdatesOptions.d.ts.map +0 -1
- package/dist/types/accessors/BindingConfig.d.ts +0 -6
- package/dist/types/accessors/BindingConfig.d.ts.map +0 -1
- package/dist/types/accessors/BindingOperations.d.ts +0 -12
- package/dist/types/accessors/BindingOperations.d.ts.map +0 -1
- package/dist/types/accessors/EntityAccessor.d.ts +0 -95
- package/dist/types/accessors/EntityAccessor.d.ts.map +0 -1
- package/dist/types/accessors/EntityListAccessor.d.ts +0 -88
- package/dist/types/accessors/EntityListAccessor.d.ts.map +0 -1
- package/dist/types/accessors/ErrorAccessor.d.ts +0 -29
- package/dist/types/accessors/ErrorAccessor.d.ts.map +0 -1
- package/dist/types/accessors/Errorable.d.ts +0 -5
- package/dist/types/accessors/Errorable.d.ts.map +0 -1
- package/dist/types/accessors/ExtendTree.d.ts +0 -8
- package/dist/types/accessors/ExtendTree.d.ts.map +0 -1
- package/dist/types/accessors/FieldAccessor.d.ts +0 -57
- package/dist/types/accessors/FieldAccessor.d.ts.map +0 -1
- package/dist/types/accessors/GetEntityByKey.d.ts +0 -3
- package/dist/types/accessors/GetEntityByKey.d.ts.map +0 -1
- package/dist/types/accessors/GetEntityListSubTree.d.ts +0 -5
- package/dist/types/accessors/GetEntityListSubTree.d.ts.map +0 -1
- package/dist/types/accessors/GetEntitySubTree.d.ts +0 -5
- package/dist/types/accessors/GetEntitySubTree.d.ts.map +0 -1
- package/dist/types/accessors/Persist.d.ts +0 -10
- package/dist/types/accessors/Persist.d.ts.map +0 -1
- package/dist/types/accessors/PersistErrorOptions.d.ts +0 -8
- package/dist/types/accessors/PersistErrorOptions.d.ts.map +0 -1
- package/dist/types/accessors/PersistSuccessOptions.d.ts +0 -5
- package/dist/types/accessors/PersistSuccessOptions.d.ts.map +0 -1
- package/dist/types/accessors/TreeRootAccessor.d.ts +0 -11
- package/dist/types/accessors/TreeRootAccessor.d.ts.map +0 -1
- package/dist/types/accessors/index.d.ts +0 -18
- package/dist/types/accessors/index.d.ts.map +0 -1
- package/dist/types/bindingTypes.d.ts +0 -4
- package/dist/types/bindingTypes.d.ts.map +0 -1
- package/dist/types/core/AccessorErrorManager.d.ts +0 -25
- package/dist/types/core/AccessorErrorManager.d.ts.map +0 -1
- package/dist/types/core/Config.d.ts +0 -9
- package/dist/types/core/Config.d.ts.map +0 -1
- package/dist/types/core/DataBinding.d.ts +0 -50
- package/dist/types/core/DataBinding.d.ts.map +0 -1
- package/dist/types/core/DirtinessTracker.d.ts +0 -9
- package/dist/types/core/DirtinessTracker.d.ts.map +0 -1
- package/dist/types/core/ErrorsPreprocessor.d.ts +0 -35
- package/dist/types/core/ErrorsPreprocessor.d.ts.map +0 -1
- package/dist/types/core/EventManager.d.ts +0 -57
- package/dist/types/core/EventManager.d.ts.map +0 -1
- package/dist/types/core/MarkerComparator.d.ts +0 -8
- package/dist/types/core/MarkerComparator.d.ts.map +0 -1
- package/dist/types/core/MarkerMerger.d.ts +0 -22
- package/dist/types/core/MarkerMerger.d.ts.map +0 -1
- package/dist/types/core/MutationGenerator.d.ts +0 -46
- package/dist/types/core/MutationGenerator.d.ts.map +0 -1
- package/dist/types/core/QueryGenerator.d.ts +0 -12
- package/dist/types/core/QueryGenerator.d.ts.map +0 -1
- package/dist/types/core/RealmKeyGenerator.d.ts +0 -11
- package/dist/types/core/RealmKeyGenerator.d.ts.map +0 -1
- package/dist/types/core/RequestResponseNormalizer.d.ts +0 -10
- package/dist/types/core/RequestResponseNormalizer.d.ts.map +0 -1
- package/dist/types/core/StateInitializer.d.ts +0 -34
- package/dist/types/core/StateInitializer.d.ts.map +0 -1
- package/dist/types/core/TreeAugmenter.d.ts +0 -22
- package/dist/types/core/TreeAugmenter.d.ts.map +0 -1
- package/dist/types/core/TreeFilterGenerator.d.ts +0 -13
- package/dist/types/core/TreeFilterGenerator.d.ts.map +0 -1
- package/dist/types/core/TreeParameterMerger.d.ts +0 -20
- package/dist/types/core/TreeParameterMerger.d.ts.map +0 -1
- package/dist/types/core/TreeStore.d.ts +0 -32
- package/dist/types/core/TreeStore.d.ts.map +0 -1
- package/dist/types/core/UpdateMetadata.d.ts +0 -4
- package/dist/types/core/UpdateMetadata.d.ts.map +0 -1
- package/dist/types/core/VariableInputTransformer.d.ts +0 -7
- package/dist/types/core/VariableInputTransformer.d.ts.map +0 -1
- package/dist/types/core/exceptions/ErrorLocator.d.ts +0 -8
- package/dist/types/core/exceptions/ErrorLocator.d.ts.map +0 -1
- package/dist/types/core/exceptions/LocalizedBindingError.d.ts +0 -9
- package/dist/types/core/exceptions/LocalizedBindingError.d.ts.map +0 -1
- package/dist/types/core/exceptions/MarkerSugarer.d.ts +0 -10
- package/dist/types/core/exceptions/MarkerSugarer.d.ts.map +0 -1
- package/dist/types/core/exceptions/RawMarkerPath.d.ts +0 -3
- package/dist/types/core/exceptions/RawMarkerPath.d.ts.map +0 -1
- package/dist/types/core/exceptions/TreeParameterSugarer.d.ts +0 -11
- package/dist/types/core/exceptions/TreeParameterSugarer.d.ts.map +0 -1
- package/dist/types/core/exceptions/index.d.ts +0 -6
- package/dist/types/core/exceptions/index.d.ts.map +0 -1
- package/dist/types/core/factories/createBatchUpdatesOptions.d.ts +0 -5
- package/dist/types/core/factories/createBatchUpdatesOptions.d.ts.map +0 -1
- package/dist/types/core/factories/index.d.ts +0 -2
- package/dist/types/core/factories/index.d.ts.map +0 -1
- package/dist/types/core/index.d.ts +0 -14
- package/dist/types/core/index.d.ts.map +0 -1
- package/dist/types/core/operations/EntityOperations.d.ts +0 -26
- package/dist/types/core/operations/EntityOperations.d.ts.map +0 -1
- package/dist/types/core/operations/FieldOperations.d.ts +0 -22
- package/dist/types/core/operations/FieldOperations.d.ts.map +0 -1
- package/dist/types/core/operations/ListOperations.d.ts +0 -33
- package/dist/types/core/operations/ListOperations.d.ts.map +0 -1
- package/dist/types/core/operations/OperationsHelpers.d.ts +0 -14
- package/dist/types/core/operations/OperationsHelpers.d.ts.map +0 -1
- package/dist/types/core/operations/index.d.ts +0 -4
- package/dist/types/core/operations/index.d.ts.map +0 -1
- package/dist/types/core/requestAliases/MutationAlias.d.ts +0 -6
- package/dist/types/core/requestAliases/MutationAlias.d.ts.map +0 -1
- package/dist/types/core/requestAliases/index.d.ts +0 -2
- package/dist/types/core/requestAliases/index.d.ts.map +0 -1
- package/dist/types/core/schema/RawSchema.d.ts +0 -7
- package/dist/types/core/schema/RawSchema.d.ts.map +0 -1
- package/dist/types/core/schema/RawSchemaEntity.d.ts +0 -13
- package/dist/types/core/schema/RawSchemaEntity.d.ts.map +0 -1
- package/dist/types/core/schema/RawSchemaEnum.d.ts +0 -6
- package/dist/types/core/schema/RawSchemaEnum.d.ts.map +0 -1
- package/dist/types/core/schema/Schema.d.ts +0 -21
- package/dist/types/core/schema/Schema.d.ts.map +0 -1
- package/dist/types/core/schema/SchemaColumn.d.ts +0 -12
- package/dist/types/core/schema/SchemaColumn.d.ts.map +0 -1
- package/dist/types/core/schema/SchemaColumnType.d.ts +0 -3
- package/dist/types/core/schema/SchemaColumnType.d.ts.map +0 -1
- package/dist/types/core/schema/SchemaEntities.d.ts +0 -4
- package/dist/types/core/schema/SchemaEntities.d.ts.map +0 -1
- package/dist/types/core/schema/SchemaEntity.d.ts +0 -10
- package/dist/types/core/schema/SchemaEntity.d.ts.map +0 -1
- package/dist/types/core/schema/SchemaEnums.d.ts +0 -4
- package/dist/types/core/schema/SchemaEnums.d.ts.map +0 -1
- package/dist/types/core/schema/SchemaField.d.ts +0 -4
- package/dist/types/core/schema/SchemaField.d.ts.map +0 -1
- package/dist/types/core/schema/SchemaFields.d.ts +0 -4
- package/dist/types/core/schema/SchemaFields.d.ts.map +0 -1
- package/dist/types/core/schema/SchemaLoader.d.ts +0 -8
- package/dist/types/core/schema/SchemaLoader.d.ts.map +0 -1
- package/dist/types/core/schema/SchemaPreprocessor.d.ts +0 -9
- package/dist/types/core/schema/SchemaPreprocessor.d.ts.map +0 -1
- package/dist/types/core/schema/SchemaRelation.d.ts +0 -24
- package/dist/types/core/schema/SchemaRelation.d.ts.map +0 -1
- package/dist/types/core/schema/SchemaRelationOrderBy.d.ts +0 -5
- package/dist/types/core/schema/SchemaRelationOrderBy.d.ts.map +0 -1
- package/dist/types/core/schema/SchemaStore.d.ts +0 -7
- package/dist/types/core/schema/SchemaStore.d.ts.map +0 -1
- package/dist/types/core/schema/SchemaUniqueConstraint.d.ts +0 -5
- package/dist/types/core/schema/SchemaUniqueConstraint.d.ts.map +0 -1
- package/dist/types/core/schema/index.d.ts +0 -16
- package/dist/types/core/schema/index.d.ts.map +0 -1
- package/dist/types/core/state/EntityListState.d.ts +0 -29
- package/dist/types/core/state/EntityListState.d.ts.map +0 -1
- package/dist/types/core/state/EntityRealmState.d.ts +0 -44
- package/dist/types/core/state/EntityRealmState.d.ts.map +0 -1
- package/dist/types/core/state/EntityState.d.ts +0 -12
- package/dist/types/core/state/EntityState.d.ts.map +0 -1
- package/dist/types/core/state/FieldState.d.ts +0 -19
- package/dist/types/core/state/FieldState.d.ts.map +0 -1
- package/dist/types/core/state/StateIterator.d.ts +0 -14
- package/dist/types/core/state/StateIterator.d.ts.map +0 -1
- package/dist/types/core/state/StateNode.d.ts +0 -8
- package/dist/types/core/state/StateNode.d.ts.map +0 -1
- package/dist/types/core/state/getEntityMarker.d.ts +0 -3
- package/dist/types/core/state/getEntityMarker.d.ts.map +0 -1
- package/dist/types/core/state/index.d.ts +0 -8
- package/dist/types/core/state/index.d.ts.map +0 -1
- package/dist/types/core/utils/createQueryBuilder.d.ts +0 -4
- package/dist/types/core/utils/createQueryBuilder.d.ts.map +0 -1
- package/dist/types/core/utils/getCombinedSignal.d.ts +0 -2
- package/dist/types/core/utils/getCombinedSignal.d.ts.map +0 -1
- package/dist/types/core/utils/index.d.ts +0 -2
- package/dist/types/core/utils/index.d.ts.map +0 -1
- package/dist/types/dao/Environment.d.ts +0 -107
- package/dist/types/dao/Environment.d.ts.map +0 -1
- package/dist/types/dao/TreeNodeEnvironmentFactory.d.ts +0 -15
- package/dist/types/dao/TreeNodeEnvironmentFactory.d.ts.map +0 -1
- package/dist/types/dao/VariableFieldValue.d.ts +0 -5
- package/dist/types/dao/VariableFieldValue.d.ts.map +0 -1
- package/dist/types/dao/index.d.ts +0 -4
- package/dist/types/dao/index.d.ts.map +0 -1
- package/dist/types/fieldHelpers/helpers/FieldHelper.d.ts +0 -7
- package/dist/types/fieldHelpers/helpers/FieldHelper.d.ts.map +0 -1
- package/dist/types/fieldHelpers/helpers/TemporalFieldHelper.d.ts +0 -10
- package/dist/types/fieldHelpers/helpers/TemporalFieldHelper.d.ts.map +0 -1
- package/dist/types/fieldHelpers/helpers/UuidFieldHelper.d.ts +0 -10
- package/dist/types/fieldHelpers/helpers/UuidFieldHelper.d.ts.map +0 -1
- package/dist/types/fieldHelpers/helpers/index.d.ts +0 -3
- package/dist/types/fieldHelpers/helpers/index.d.ts.map +0 -1
- package/dist/types/fieldHelpers/index.d.ts +0 -2
- package/dist/types/fieldHelpers/index.d.ts.map +0 -1
- package/dist/types/markers/EntityFieldMarkers.d.ts +0 -7
- package/dist/types/markers/EntityFieldMarkers.d.ts.map +0 -1
- package/dist/types/markers/EntityFieldMarkersContainer.d.ts +0 -13
- package/dist/types/markers/EntityFieldMarkersContainer.d.ts.map +0 -1
- package/dist/types/markers/EntityFieldPlaceholders.d.ts +0 -3
- package/dist/types/markers/EntityFieldPlaceholders.d.ts.map +0 -1
- package/dist/types/markers/EntityFieldsWithHoistablesMarker.d.ts +0 -10
- package/dist/types/markers/EntityFieldsWithHoistablesMarker.d.ts.map +0 -1
- package/dist/types/markers/EntityListSubTreeMarker.d.ts +0 -12
- package/dist/types/markers/EntityListSubTreeMarker.d.ts.map +0 -1
- package/dist/types/markers/EntitySubTreeMarker.d.ts +0 -12
- package/dist/types/markers/EntitySubTreeMarker.d.ts.map +0 -1
- package/dist/types/markers/FieldMarker.d.ts +0 -14
- package/dist/types/markers/FieldMarker.d.ts.map +0 -1
- package/dist/types/markers/HasManyRelationMarker.d.ts +0 -12
- package/dist/types/markers/HasManyRelationMarker.d.ts.map +0 -1
- package/dist/types/markers/HasOneRelationMarker.d.ts +0 -12
- package/dist/types/markers/HasOneRelationMarker.d.ts.map +0 -1
- package/dist/types/markers/MarkerTreeRoot.d.ts +0 -8
- package/dist/types/markers/MarkerTreeRoot.d.ts.map +0 -1
- package/dist/types/markers/MeaningfulMarker.d.ts +0 -7
- package/dist/types/markers/MeaningfulMarker.d.ts.map +0 -1
- package/dist/types/markers/ParentEntityMarker.d.ts +0 -8
- package/dist/types/markers/ParentEntityMarker.d.ts.map +0 -1
- package/dist/types/markers/PlaceholderGenerator.d.ts +0 -10
- package/dist/types/markers/PlaceholderGenerator.d.ts.map +0 -1
- package/dist/types/markers/PlaceholderParametersGenerator.d.ts +0 -9
- package/dist/types/markers/PlaceholderParametersGenerator.d.ts.map +0 -1
- package/dist/types/markers/SubTreeMarkers.d.ts +0 -5
- package/dist/types/markers/SubTreeMarkers.d.ts.map +0 -1
- package/dist/types/markers/index.d.ts +0 -15
- package/dist/types/markers/index.d.ts.map +0 -1
- package/dist/types/queryLanguage/CacheStore.d.ts +0 -9
- package/dist/types/queryLanguage/CacheStore.d.ts.map +0 -1
- package/dist/types/queryLanguage/MarkerFactory.d.ts +0 -21
- package/dist/types/queryLanguage/MarkerFactory.d.ts.map +0 -1
- package/dist/types/queryLanguage/Parser.d.ts +0 -83
- package/dist/types/queryLanguage/Parser.d.ts.map +0 -1
- package/dist/types/queryLanguage/ParserResults.d.ts +0 -63
- package/dist/types/queryLanguage/ParserResults.d.ts.map +0 -1
- package/dist/types/queryLanguage/QueryLanguage.d.ts +0 -43
- package/dist/types/queryLanguage/QueryLanguage.d.ts.map +0 -1
- package/dist/types/queryLanguage/QueryLanguageError.d.ts +0 -3
- package/dist/types/queryLanguage/QueryLanguageError.d.ts.map +0 -1
- package/dist/types/queryLanguage/index.d.ts +0 -6
- package/dist/types/queryLanguage/index.d.ts.map +0 -1
- package/dist/types/queryLanguage/tokenList.d.ts +0 -35
- package/dist/types/queryLanguage/tokenList.d.ts.map +0 -1
- package/dist/types/structures/BijectiveIndexedMap.d.ts +0 -24
- package/dist/types/structures/BijectiveIndexedMap.d.ts.map +0 -1
- package/dist/types/structures/LRUCache.d.ts +0 -9
- package/dist/types/structures/LRUCache.d.ts.map +0 -1
- package/dist/types/structures/WeakIdCache.d.ts +0 -9
- package/dist/types/structures/WeakIdCache.d.ts.map +0 -1
- package/dist/types/structures/index.d.ts +0 -4
- package/dist/types/structures/index.d.ts.map +0 -1
- package/dist/types/treeParameterHelpers/index.d.ts +0 -2
- package/dist/types/treeParameterHelpers/index.d.ts.map +0 -1
- package/dist/types/treeParameterHelpers/wrapFilterInHasOnes.d.ts +0 -3
- package/dist/types/treeParameterHelpers/wrapFilterInHasOnes.d.ts.map +0 -1
- package/dist/types/treeParameters/AnyField.d.ts +0 -8
- package/dist/types/treeParameters/AnyField.d.ts.map +0 -1
- package/dist/types/treeParameters/EntityCreationParameters.d.ts +0 -13
- package/dist/types/treeParameters/EntityCreationParameters.d.ts.map +0 -1
- package/dist/types/treeParameters/EntityListEventListeners.d.ts +0 -15
- package/dist/types/treeParameters/EntityListEventListeners.d.ts.map +0 -1
- package/dist/types/treeParameters/EntityListParameters.d.ts +0 -17
- package/dist/types/treeParameters/EntityListParameters.d.ts.map +0 -1
- package/dist/types/treeParameters/EntityListPreferences.d.ts +0 -8
- package/dist/types/treeParameters/EntityListPreferences.d.ts.map +0 -1
- package/dist/types/treeParameters/EventListenersStore.d.ts +0 -33
- package/dist/types/treeParameters/EventListenersStore.d.ts.map +0 -1
- package/dist/types/treeParameters/FieldEventListeners.d.ts +0 -16
- package/dist/types/treeParameters/FieldEventListeners.d.ts.map +0 -1
- package/dist/types/treeParameters/HasManyRelation.d.ts +0 -10
- package/dist/types/treeParameters/HasManyRelation.d.ts.map +0 -1
- package/dist/types/treeParameters/HasOneRelation.d.ts +0 -13
- package/dist/types/treeParameters/HasOneRelation.d.ts.map +0 -1
- package/dist/types/treeParameters/LeafField.d.ts +0 -14
- package/dist/types/treeParameters/LeafField.d.ts.map +0 -1
- package/dist/types/treeParameters/ParentEntityParameters.d.ts +0 -8
- package/dist/types/treeParameters/ParentEntityParameters.d.ts.map +0 -1
- package/dist/types/treeParameters/QualifiedEntityList.d.ts +0 -19
- package/dist/types/treeParameters/QualifiedEntityList.d.ts.map +0 -1
- package/dist/types/treeParameters/QualifiedEntityParameters.d.ts +0 -17
- package/dist/types/treeParameters/QualifiedEntityParameters.d.ts.map +0 -1
- package/dist/types/treeParameters/QualifiedFieldList.d.ts +0 -16
- package/dist/types/treeParameters/QualifiedFieldList.d.ts.map +0 -1
- package/dist/types/treeParameters/QualifiedSingleEntity.d.ts +0 -20
- package/dist/types/treeParameters/QualifiedSingleEntity.d.ts.map +0 -1
- package/dist/types/treeParameters/QualifiedSingleEntityParameters.d.ts +0 -8
- package/dist/types/treeParameters/QualifiedSingleEntityParameters.d.ts.map +0 -1
- package/dist/types/treeParameters/Relation.d.ts +0 -15
- package/dist/types/treeParameters/Relation.d.ts.map +0 -1
- package/dist/types/treeParameters/RelativeEntityList.d.ts +0 -19
- package/dist/types/treeParameters/RelativeEntityList.d.ts.map +0 -1
- package/dist/types/treeParameters/RelativeSingleEntity.d.ts +0 -13
- package/dist/types/treeParameters/RelativeSingleEntity.d.ts.map +0 -1
- package/dist/types/treeParameters/RelativeSingleField.d.ts +0 -15
- package/dist/types/treeParameters/RelativeSingleField.d.ts.map +0 -1
- package/dist/types/treeParameters/SetOnCreate.d.ts +0 -4
- package/dist/types/treeParameters/SetOnCreate.d.ts.map +0 -1
- package/dist/types/treeParameters/SingleEntityEventListeners.d.ts +0 -16
- package/dist/types/treeParameters/SingleEntityEventListeners.d.ts.map +0 -1
- package/dist/types/treeParameters/SingleEntityParameters.d.ts +0 -8
- package/dist/types/treeParameters/SingleEntityParameters.d.ts.map +0 -1
- package/dist/types/treeParameters/UnconstrainedQualifiedEntityList.d.ts +0 -21
- package/dist/types/treeParameters/UnconstrainedQualifiedEntityList.d.ts.map +0 -1
- package/dist/types/treeParameters/UnconstrainedQualifiedSingleEntity.d.ts +0 -20
- package/dist/types/treeParameters/UnconstrainedQualifiedSingleEntity.d.ts.map +0 -1
- package/dist/types/treeParameters/index.d.ts +0 -27
- package/dist/types/treeParameters/index.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/Alias.d.ts +0 -2
- package/dist/types/treeParameters/primitives/Alias.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/EntityId.d.ts +0 -2
- package/dist/types/treeParameters/primitives/EntityId.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/EntityName.d.ts +0 -2
- package/dist/types/treeParameters/primitives/EntityName.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/EntityRealmKey.d.ts +0 -2
- package/dist/types/treeParameters/primitives/EntityRealmKey.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/ExpectedEntityCount.d.ts +0 -2
- package/dist/types/treeParameters/primitives/ExpectedEntityCount.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/ExpectedQualifiedEntityMutation.d.ts +0 -2
- package/dist/types/treeParameters/primitives/ExpectedQualifiedEntityMutation.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/ExpectedRelationMutation.d.ts +0 -2
- package/dist/types/treeParameters/primitives/ExpectedRelationMutation.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/FieldName.d.ts +0 -2
- package/dist/types/treeParameters/primitives/FieldName.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/FieldValue.d.ts +0 -5
- package/dist/types/treeParameters/primitives/FieldValue.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/Filter.d.ts +0 -4
- package/dist/types/treeParameters/primitives/Filter.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/Json.d.ts +0 -7
- package/dist/types/treeParameters/primitives/Json.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/Limit.d.ts +0 -2
- package/dist/types/treeParameters/primitives/Limit.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/Offset.d.ts +0 -2
- package/dist/types/treeParameters/primitives/Offset.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/OrderBy.d.ts +0 -4
- package/dist/types/treeParameters/primitives/OrderBy.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/PlaceholderName.d.ts +0 -2
- package/dist/types/treeParameters/primitives/PlaceholderName.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/RemovalType.d.ts +0 -2
- package/dist/types/treeParameters/primitives/RemovalType.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/Scalar.d.ts +0 -2
- package/dist/types/treeParameters/primitives/Scalar.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/TreeRootId.d.ts +0 -2
- package/dist/types/treeParameters/primitives/TreeRootId.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/UniqueWhere.d.ts +0 -4
- package/dist/types/treeParameters/primitives/UniqueWhere.d.ts.map +0 -1
- package/dist/types/treeParameters/primitives/index.d.ts +0 -20
- package/dist/types/treeParameters/primitives/index.d.ts.map +0 -1
- package/dist/types/utils/Hashing.d.ts +0 -5
- package/dist/types/utils/Hashing.d.ts.map +0 -1
- package/dist/types/utils/TreeNodeUtils.d.ts +0 -13
- package/dist/types/utils/TreeNodeUtils.d.ts.map +0 -1
- package/dist/types/utils/assert.d.ts +0 -2
- package/dist/types/utils/assert.d.ts.map +0 -1
- package/dist/types/utils/assertNever.d.ts +0 -2
- package/dist/types/utils/assertNever.d.ts.map +0 -1
- package/dist/types/utils/generateEnumerabilityPreventingEntropy.d.ts +0 -2
- package/dist/types/utils/generateEnumerabilityPreventingEntropy.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts +0 -7
- package/dist/types/utils/index.d.ts.map +0 -1
- package/dist/types/utils/isEmptyObject.d.ts +0 -2
- package/dist/types/utils/isEmptyObject.d.ts.map +0 -1
- package/dist/types/utils/ucfirst.d.ts +0 -2
- package/dist/types/utils/ucfirst.d.ts.map +0 -1
- package/src/BindingError.ts +0 -5
- package/src/accessorTree/NormalizedPersistedData.ts +0 -23
- package/src/accessorTree/PersistResult.ts +0 -28
- package/src/accessorTree/QueryRequestResponse.ts +0 -23
- package/src/accessorTree/RuntimeId.ts +0 -70
- package/src/accessorTree/index.ts +0 -4
- package/src/accessors/AsyncBatchUpdatesOptions.ts +0 -8
- package/src/accessors/BatchUpdatesOptions.ts +0 -9
- package/src/accessors/BindingConfig.ts +0 -5
- package/src/accessors/BindingOperations.ts +0 -15
- package/src/accessors/EntityAccessor.ts +0 -299
- package/src/accessors/EntityListAccessor.ts +0 -183
- package/src/accessors/ErrorAccessor.ts +0 -43
- package/src/accessors/Errorable.ts +0 -5
- package/src/accessors/ExtendTree.ts +0 -9
- package/src/accessors/FieldAccessor.ts +0 -107
- package/src/accessors/GetEntityByKey.ts +0 -3
- package/src/accessors/GetEntityListSubTree.ts +0 -14
- package/src/accessors/GetEntitySubTree.ts +0 -14
- package/src/accessors/Persist.ts +0 -11
- package/src/accessors/PersistErrorOptions.ts +0 -10
- package/src/accessors/PersistSuccessOptions.ts +0 -5
- package/src/accessors/TreeRootAccessor.ts +0 -14
- package/src/accessors/index.ts +0 -17
- package/src/bindingTypes.ts +0 -3
- package/src/core/AccessorErrorManager.ts +0 -242
- package/src/core/Config.ts +0 -27
- package/src/core/DataBinding.ts +0 -430
- package/src/core/DirtinessTracker.ts +0 -21
- package/src/core/ErrorsPreprocessor.ts +0 -239
- package/src/core/EventManager.ts +0 -589
- package/src/core/MarkerComparator.ts +0 -102
- package/src/core/MarkerMerger.ts +0 -296
- package/src/core/MutationGenerator.ts +0 -823
- package/src/core/QueryGenerator.ts +0 -127
- package/src/core/RealmKeyGenerator.ts +0 -54
- package/src/core/RequestResponseNormalizer.ts +0 -161
- package/src/core/StateInitializer.ts +0 -558
- package/src/core/TreeAugmenter.ts +0 -266
- package/src/core/TreeFilterGenerator.ts +0 -116
- package/src/core/TreeParameterMerger.ts +0 -382
- package/src/core/TreeStore.ts +0 -256
- package/src/core/UpdateMetadata.ts +0 -3
- package/src/core/VariableInputTransformer.ts +0 -26
- package/src/core/exceptions/ErrorLocator.ts +0 -58
- package/src/core/exceptions/LocalizedBindingError.ts +0 -20
- package/src/core/exceptions/MarkerSugarer.ts +0 -61
- package/src/core/exceptions/RawMarkerPath.ts +0 -3
- package/src/core/exceptions/TreeParameterSugarer.ts +0 -41
- package/src/core/exceptions/index.ts +0 -5
- package/src/core/factories/createBatchUpdatesOptions.ts +0 -38
- package/src/core/factories/index.ts +0 -1
- package/src/core/index.ts +0 -13
- package/src/core/operations/EntityOperations.ts +0 -306
- package/src/core/operations/FieldOperations.ts +0 -127
- package/src/core/operations/ListOperations.ts +0 -208
- package/src/core/operations/OperationsHelpers.ts +0 -150
- package/src/core/operations/index.ts +0 -3
- package/src/core/requestAliases/MutationAlias.ts +0 -13
- package/src/core/requestAliases/index.ts +0 -1
- package/src/core/schema/RawSchema.ts +0 -7
- package/src/core/schema/RawSchemaEntity.ts +0 -12
- package/src/core/schema/RawSchemaEnum.ts +0 -6
- package/src/core/schema/Schema.ts +0 -50
- package/src/core/schema/SchemaColumn.ts +0 -15
- package/src/core/schema/SchemaColumnType.ts +0 -3
- package/src/core/schema/SchemaEntities.ts +0 -4
- package/src/core/schema/SchemaEntity.ts +0 -10
- package/src/core/schema/SchemaEnums.ts +0 -3
- package/src/core/schema/SchemaField.ts +0 -4
- package/src/core/schema/SchemaFields.ts +0 -4
- package/src/core/schema/SchemaLoader.ts +0 -64
- package/src/core/schema/SchemaPreprocessor.ts +0 -51
- package/src/core/schema/SchemaRelation.ts +0 -29
- package/src/core/schema/SchemaRelationOrderBy.ts +0 -4
- package/src/core/schema/SchemaStore.ts +0 -8
- package/src/core/schema/SchemaUniqueConstraint.ts +0 -5
- package/src/core/schema/index.ts +0 -15
- package/src/core/state/EntityListState.ts +0 -39
- package/src/core/state/EntityRealmState.ts +0 -63
- package/src/core/state/EntityState.ts +0 -12
- package/src/core/state/FieldState.ts +0 -20
- package/src/core/state/StateIterator.ts +0 -121
- package/src/core/state/StateNode.ts +0 -8
- package/src/core/state/getEntityMarker.ts +0 -4
- package/src/core/state/index.ts +0 -7
- package/src/core/utils/createQueryBuilder.ts +0 -31
- package/src/core/utils/getCombinedSignal.ts +0 -36
- package/src/core/utils/index.ts +0 -1
- package/src/dao/Environment.ts +0 -342
- package/src/dao/TreeNodeEnvironmentFactory.ts +0 -137
- package/src/dao/VariableFieldValue.ts +0 -3
- package/src/dao/index.ts +0 -3
- package/src/fieldHelpers/helpers/FieldHelper.ts +0 -10
- package/src/fieldHelpers/helpers/TemporalFieldHelper.ts +0 -21
- package/src/fieldHelpers/helpers/UuidFieldHelper.ts +0 -18
- package/src/fieldHelpers/helpers/index.ts +0 -2
- package/src/fieldHelpers/index.ts +0 -1
- package/src/markers/EntityFieldMarkers.ts +0 -7
- package/src/markers/EntityFieldMarkersContainer.ts +0 -45
- package/src/markers/EntityFieldPlaceholders.ts +0 -3
- package/src/markers/EntityFieldsWithHoistablesMarker.ts +0 -11
- package/src/markers/EntityListSubTreeMarker.ts +0 -20
- package/src/markers/EntitySubTreeMarker.ts +0 -20
- package/src/markers/FieldMarker.ts +0 -19
- package/src/markers/HasManyRelationMarker.ts +0 -27
- package/src/markers/HasOneRelationMarker.ts +0 -21
- package/src/markers/MarkerTreeRoot.ts +0 -9
- package/src/markers/MeaningfulMarker.ts +0 -12
- package/src/markers/ParentEntityMarker.ts +0 -9
- package/src/markers/PlaceholderGenerator.ts +0 -40
- package/src/markers/PlaceholderParametersGenerator.ts +0 -79
- package/src/markers/SubTreeMarkers.ts +0 -5
- package/src/markers/index.ts +0 -14
- package/src/queryLanguage/CacheStore.ts +0 -57
- package/src/queryLanguage/MarkerFactory.ts +0 -300
- package/src/queryLanguage/Parser.ts +0 -911
- package/src/queryLanguage/ParserResults.ts +0 -81
- package/src/queryLanguage/QueryLanguage.ts +0 -733
- package/src/queryLanguage/QueryLanguageError.ts +0 -1
- package/src/queryLanguage/index.ts +0 -5
- package/src/queryLanguage/tokenList.ts +0 -175
- package/src/structures/BijectiveIndexedMap.ts +0 -139
- package/src/structures/LRUCache.ts +0 -29
- package/src/structures/WeakIdCache.ts +0 -25
- package/src/structures/index.ts +0 -3
- package/src/treeParameterHelpers/index.ts +0 -1
- package/src/treeParameterHelpers/wrapFilterInHasOnes.ts +0 -21
- package/src/treeParameters/AnyField.ts +0 -9
- package/src/treeParameters/EntityCreationParameters.ts +0 -34
- package/src/treeParameters/EntityListEventListeners.ts +0 -20
- package/src/treeParameters/EntityListParameters.ts +0 -19
- package/src/treeParameters/EntityListPreferences.ts +0 -11
- package/src/treeParameters/EventListenersStore.ts +0 -82
- package/src/treeParameters/FieldEventListeners.ts +0 -32
- package/src/treeParameters/HasManyRelation.ts +0 -18
- package/src/treeParameters/HasOneRelation.ts +0 -21
- package/src/treeParameters/LeafField.ts +0 -20
- package/src/treeParameters/ParentEntityParameters.ts +0 -10
- package/src/treeParameters/QualifiedEntityList.ts +0 -43
- package/src/treeParameters/QualifiedEntityParameters.ts +0 -20
- package/src/treeParameters/QualifiedFieldList.ts +0 -43
- package/src/treeParameters/QualifiedSingleEntity.ts +0 -46
- package/src/treeParameters/QualifiedSingleEntityParameters.ts +0 -9
- package/src/treeParameters/Relation.ts +0 -17
- package/src/treeParameters/RelativeEntityList.ts +0 -25
- package/src/treeParameters/RelativeSingleEntity.ts +0 -16
- package/src/treeParameters/RelativeSingleField.ts +0 -27
- package/src/treeParameters/SetOnCreate.ts +0 -6
- package/src/treeParameters/SingleEntityEventListeners.ts +0 -24
- package/src/treeParameters/SingleEntityParameters.ts +0 -9
- package/src/treeParameters/UnconstrainedQualifiedEntityList.ts +0 -39
- package/src/treeParameters/UnconstrainedQualifiedSingleEntity.ts +0 -39
- package/src/treeParameters/index.ts +0 -27
- package/src/treeParameters/primitives/Alias.ts +0 -1
- package/src/treeParameters/primitives/EntityId.ts +0 -2
- package/src/treeParameters/primitives/EntityName.ts +0 -4
- package/src/treeParameters/primitives/EntityRealmKey.ts +0 -2
- package/src/treeParameters/primitives/ExpectedEntityCount.ts +0 -1
- package/src/treeParameters/primitives/ExpectedQualifiedEntityMutation.ts +0 -1
- package/src/treeParameters/primitives/ExpectedRelationMutation.ts +0 -1
- package/src/treeParameters/primitives/FieldName.ts +0 -7
- package/src/treeParameters/primitives/FieldValue.ts +0 -6
- package/src/treeParameters/primitives/Filter.ts +0 -7
- package/src/treeParameters/primitives/Json.ts +0 -7
- package/src/treeParameters/primitives/Limit.ts +0 -1
- package/src/treeParameters/primitives/Offset.ts +0 -1
- package/src/treeParameters/primitives/OrderBy.ts +0 -6
- package/src/treeParameters/primitives/PlaceholderName.ts +0 -4
- package/src/treeParameters/primitives/RemovalType.ts +0 -1
- package/src/treeParameters/primitives/Scalar.ts +0 -1
- package/src/treeParameters/primitives/TreeRootId.ts +0 -1
- package/src/treeParameters/primitives/UniqueWhere.ts +0 -7
- package/src/treeParameters/primitives/index.ts +0 -19
- package/src/typings/react-fix.d.ts +0 -12
- package/src/utils/Hashing.ts +0 -20
- package/src/utils/TreeNodeUtils.ts +0 -92
- package/src/utils/assert.ts +0 -7
- package/src/utils/assertNever.ts +0 -10
- package/src/utils/generateEnumerabilityPreventingEntropy.ts +0 -3
- package/src/utils/index.ts +0 -6
- package/src/utils/isEmptyObject.ts +0 -9
- package/src/utils/ucfirst.ts +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getCombinedSignal.cjs","sources":["../../../../src/core/utils/getCombinedSignal.ts"],"sourcesContent":["// Returns a signal that aborts when all present signals are aborted.\nexport const getCombinedSignal = (components: Iterable<AbortSignal | undefined>): AbortSignal => {\n\tlet abortedCount = 0\n\tlet signalCount = 0\n\n\tconst controller = new AbortController()\n\tconst refresh = () => {\n\t\tif (signalCount === 0) {\n\t\t\treturn\n\t\t}\n\t\tif (abortedCount >= signalCount) {\n\t\t\tcontroller.abort()\n\t\t}\n\t}\n\n\tfor (const component of components) {\n\t\tif (!component) {\n\t\t\tcontinue\n\t\t}\n\n\t\tsignalCount++\n\n\t\tif (component.aborted) {\n\t\t\tabortedCount++\n\t\t} else {\n\t\t\tcomponent.addEventListener('abort', () => {\n\t\t\t\tabortedCount++\n\t\t\t\trefresh()\n\t\t\t})\n\t\t}\n\t}\n\n\trefresh()\n\n\treturn controller.signal\n}\n"],"names":[],"mappings":";;AACa,MAAA,oBAAoB,CAAC,eAA+D;AAChG,MAAI,eAAe;AACnB,MAAI,cAAc;AAEZ,QAAA,aAAa,IAAI;AACvB,QAAM,UAAU,MAAM;AACrB,QAAI,gBAAgB,GAAG;AACtB;AAAA,IACD;AACA,QAAI,gBAAgB,aAAa;AAChC,iBAAW,MAAM;AAAA,IAClB;AAAA,EAAA;AAGD,aAAW,aAAa,YAAY;AACnC,QAAI,CAAC,WAAW;AACf;AAAA,IACD;AAEA;AAEA,QAAI,UAAU,SAAS;AACtB;AAAA,IAAA,OACM;AACI,gBAAA,iBAAiB,SAAS,MAAM;AACzC;AACQ;MAAA,CACR;AAAA,IACF;AAAA,EACD;AAEQ;AAER,SAAO,WAAW;AACnB;;"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
const getCombinedSignal = (components) => {
|
|
2
|
-
let abortedCount = 0;
|
|
3
|
-
let signalCount = 0;
|
|
4
|
-
const controller = new AbortController();
|
|
5
|
-
const refresh = () => {
|
|
6
|
-
if (signalCount === 0) {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
if (abortedCount >= signalCount) {
|
|
10
|
-
controller.abort();
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
for (const component of components) {
|
|
14
|
-
if (!component) {
|
|
15
|
-
continue;
|
|
16
|
-
}
|
|
17
|
-
signalCount++;
|
|
18
|
-
if (component.aborted) {
|
|
19
|
-
abortedCount++;
|
|
20
|
-
} else {
|
|
21
|
-
component.addEventListener("abort", () => {
|
|
22
|
-
abortedCount++;
|
|
23
|
-
refresh();
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
refresh();
|
|
28
|
-
return controller.signal;
|
|
29
|
-
};
|
|
30
|
-
export {
|
|
31
|
-
getCombinedSignal
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=getCombinedSignal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getCombinedSignal.js","sources":["../../../../src/core/utils/getCombinedSignal.ts"],"sourcesContent":["// Returns a signal that aborts when all present signals are aborted.\nexport const getCombinedSignal = (components: Iterable<AbortSignal | undefined>): AbortSignal => {\n\tlet abortedCount = 0\n\tlet signalCount = 0\n\n\tconst controller = new AbortController()\n\tconst refresh = () => {\n\t\tif (signalCount === 0) {\n\t\t\treturn\n\t\t}\n\t\tif (abortedCount >= signalCount) {\n\t\t\tcontroller.abort()\n\t\t}\n\t}\n\n\tfor (const component of components) {\n\t\tif (!component) {\n\t\t\tcontinue\n\t\t}\n\n\t\tsignalCount++\n\n\t\tif (component.aborted) {\n\t\t\tabortedCount++\n\t\t} else {\n\t\t\tcomponent.addEventListener('abort', () => {\n\t\t\t\tabortedCount++\n\t\t\t\trefresh()\n\t\t\t})\n\t\t}\n\t}\n\n\trefresh()\n\n\treturn controller.signal\n}\n"],"names":[],"mappings":"AACa,MAAA,oBAAoB,CAAC,eAA+D;AAChG,MAAI,eAAe;AACnB,MAAI,cAAc;AAEZ,QAAA,aAAa,IAAI;AACvB,QAAM,UAAU,MAAM;AACrB,QAAI,gBAAgB,GAAG;AACtB;AAAA,IACD;AACA,QAAI,gBAAgB,aAAa;AAChC,iBAAW,MAAM;AAAA,IAClB;AAAA,EAAA;AAGD,aAAW,aAAa,YAAY;AACnC,QAAI,CAAC,WAAW;AACf;AAAA,IACD;AAEA;AAEA,QAAI,UAAU,SAAS;AACtB;AAAA,IAAA,OACM;AACI,gBAAA,iBAAiB,SAAS,MAAM;AACzC;AACQ;MAAA,CACR;AAAA,IACF;AAAA,EACD;AAEQ;AAER,SAAO,WAAW;AACnB;"}
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const BindingError = require("../BindingError.cjs");
|
|
4
|
-
const equal = require("fast-deep-equal/es6/index.js");
|
|
5
|
-
class Environment {
|
|
6
|
-
constructor(options) {
|
|
7
|
-
this.options = options;
|
|
8
|
-
}
|
|
9
|
-
static create() {
|
|
10
|
-
return new Environment({
|
|
11
|
-
dimensions: {},
|
|
12
|
-
variables: {},
|
|
13
|
-
parameters: {},
|
|
14
|
-
extensions: /* @__PURE__ */ new Map()
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
getSubTree() {
|
|
18
|
-
for (let env = this; env.options.node; env = env.getParent()) {
|
|
19
|
-
const node = env.options.node;
|
|
20
|
-
if (node.type === "subtree-entity" || node.type === "subtree-entity-list") {
|
|
21
|
-
return node;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
throw new BindingError.BindingError("Not in a SubTree");
|
|
25
|
-
}
|
|
26
|
-
getSubTreeNode() {
|
|
27
|
-
if (!this.options.node) {
|
|
28
|
-
throw new BindingError.BindingError();
|
|
29
|
-
}
|
|
30
|
-
return this.options.node;
|
|
31
|
-
}
|
|
32
|
-
withSubTree(SubTree) {
|
|
33
|
-
const { parent, ...options } = this.options;
|
|
34
|
-
return new Environment({
|
|
35
|
-
...options,
|
|
36
|
-
node: SubTree
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
withSubTreeChild(node) {
|
|
40
|
-
if (!this.options.node) {
|
|
41
|
-
throw new BindingError.BindingError(`Cannot call withSubTreeChild without previous call of withSubTree`);
|
|
42
|
-
}
|
|
43
|
-
if (this.options.node.entity.fields.get(node.field.name) !== node.field) {
|
|
44
|
-
throw new BindingError.BindingError();
|
|
45
|
-
}
|
|
46
|
-
return new Environment({
|
|
47
|
-
...this.options,
|
|
48
|
-
node,
|
|
49
|
-
parent: this
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
hasVariable(key) {
|
|
53
|
-
return key in this.options.variables;
|
|
54
|
-
}
|
|
55
|
-
getVariable(key) {
|
|
56
|
-
if (!(key in this.options.variables)) {
|
|
57
|
-
throw new BindingError.BindingError(`Variable ${key} not found`);
|
|
58
|
-
}
|
|
59
|
-
return this.options.variables[key];
|
|
60
|
-
}
|
|
61
|
-
getVariableOrElse(key, fallback) {
|
|
62
|
-
return this.options.variables[key] ?? fallback;
|
|
63
|
-
}
|
|
64
|
-
/** @deprecated use getVariable or getParameter */
|
|
65
|
-
getValue(key) {
|
|
66
|
-
console.warn("Environment.getValue() is deprecated, use Environment.getVariable() or Environment.getParameter() instead.");
|
|
67
|
-
return this.getVariableOrElse(key, void 0) ?? this.getParameterOrElse(key, void 0);
|
|
68
|
-
}
|
|
69
|
-
/** @deprecated use getVariableOrElse or getParameterOrElse */
|
|
70
|
-
getValueOrElse(key, fallback) {
|
|
71
|
-
console.warn("Environment.getValueOrElse() is deprecated, use Environment.getVariableOrElse() or Environment.getParameterOrElse() instead.");
|
|
72
|
-
return this.getVariableOrElse(key, void 0) ?? this.getParameterOrElse(key, fallback);
|
|
73
|
-
}
|
|
74
|
-
/** @deprecated */
|
|
75
|
-
hasName(key) {
|
|
76
|
-
console.warn("Environment.hasName() is deprecated, use Environment.hasVariable() or Environment.hasParameter() instead.");
|
|
77
|
-
return key in this.options.variables || key in this.options.parameters;
|
|
78
|
-
}
|
|
79
|
-
withVariables(variables) {
|
|
80
|
-
if (variables === void 0) {
|
|
81
|
-
return this;
|
|
82
|
-
}
|
|
83
|
-
const newVariables = { ...this.options.variables };
|
|
84
|
-
for (const [newName, newValue] of Object.entries(variables)) {
|
|
85
|
-
if (newName === "labelMiddleware") {
|
|
86
|
-
throw new BindingError.BindingError("You cannot pass labelMiddleware to withVariables method. Use withLabelMiddleware instead.");
|
|
87
|
-
}
|
|
88
|
-
const resolvedValue = typeof newValue === "function" ? newValue(this) : newValue;
|
|
89
|
-
if (resolvedValue === void 0) {
|
|
90
|
-
delete newVariables[newName];
|
|
91
|
-
} else {
|
|
92
|
-
newVariables[newName] = resolvedValue;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
return new Environment({
|
|
96
|
-
...this.options,
|
|
97
|
-
variables: newVariables,
|
|
98
|
-
parent: this
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
getAllVariables() {
|
|
102
|
-
return this.options.variables;
|
|
103
|
-
}
|
|
104
|
-
hasParameter(key) {
|
|
105
|
-
return key in this.options.parameters;
|
|
106
|
-
}
|
|
107
|
-
getParameter(key) {
|
|
108
|
-
if (!(key in this.options.parameters)) {
|
|
109
|
-
throw new BindingError.BindingError(`Parameter ${key} not found`);
|
|
110
|
-
}
|
|
111
|
-
return this.options.parameters[key];
|
|
112
|
-
}
|
|
113
|
-
getParameterOrElse(key, fallback) {
|
|
114
|
-
return this.options.parameters[key] ?? fallback;
|
|
115
|
-
}
|
|
116
|
-
getAllParameters() {
|
|
117
|
-
return this.options.parameters;
|
|
118
|
-
}
|
|
119
|
-
withParameters(parameters) {
|
|
120
|
-
return new Environment({ ...this.options, parameters });
|
|
121
|
-
}
|
|
122
|
-
hasDimension(dimensionName) {
|
|
123
|
-
return dimensionName in this.options.dimensions;
|
|
124
|
-
}
|
|
125
|
-
getDimension(dimensionName) {
|
|
126
|
-
if (!(dimensionName in this.options.dimensions)) {
|
|
127
|
-
throw new BindingError.BindingError(`Dimension ${dimensionName} does not exist.`);
|
|
128
|
-
}
|
|
129
|
-
return this.options.dimensions[dimensionName];
|
|
130
|
-
}
|
|
131
|
-
getDimensionOrElse(dimensionName, fallback) {
|
|
132
|
-
return this.options.dimensions[dimensionName] ?? fallback;
|
|
133
|
-
}
|
|
134
|
-
getAllDimensions() {
|
|
135
|
-
return this.options.dimensions;
|
|
136
|
-
}
|
|
137
|
-
withDimensions(dimensions) {
|
|
138
|
-
const newDimensions = {
|
|
139
|
-
...this.options.dimensions,
|
|
140
|
-
...dimensions
|
|
141
|
-
};
|
|
142
|
-
if (equal(newDimensions, this.options.dimensions)) {
|
|
143
|
-
return this;
|
|
144
|
-
}
|
|
145
|
-
return new Environment({ ...this.options, dimensions: newDimensions });
|
|
146
|
-
}
|
|
147
|
-
getSchema() {
|
|
148
|
-
if (!this.options.schema) {
|
|
149
|
-
throw new BindingError.BindingError("Schema is not set");
|
|
150
|
-
}
|
|
151
|
-
return this.options.schema;
|
|
152
|
-
}
|
|
153
|
-
withSchema(schema) {
|
|
154
|
-
return new Environment({ ...this.options, schema });
|
|
155
|
-
}
|
|
156
|
-
getParent() {
|
|
157
|
-
if (!this.options.parent) {
|
|
158
|
-
throw new BindingError.BindingError("There is no parent environment");
|
|
159
|
-
}
|
|
160
|
-
return this.options.parent;
|
|
161
|
-
}
|
|
162
|
-
withExtension(extension, state) {
|
|
163
|
-
return new Environment({
|
|
164
|
-
...this.options,
|
|
165
|
-
extensions: new Map([...this.options.extensions, [extension, state]])
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
getExtension(extension) {
|
|
169
|
-
const state = this.options.extensions.get(extension);
|
|
170
|
-
return extension.create(state, this);
|
|
171
|
-
}
|
|
172
|
-
merge(other) {
|
|
173
|
-
if (other === this) {
|
|
174
|
-
return this;
|
|
175
|
-
}
|
|
176
|
-
if (!equal(this.options.node, other.options.node)) {
|
|
177
|
-
throw new BindingError.BindingError(`Cannot merge two environments with different tree position.`);
|
|
178
|
-
}
|
|
179
|
-
if (this.options.parameters !== other.options.parameters) {
|
|
180
|
-
throw new BindingError.BindingError(`Cannot merge two environments with different parameters.`);
|
|
181
|
-
}
|
|
182
|
-
if (this.options.dimensions !== other.options.dimensions) {
|
|
183
|
-
throw new BindingError.BindingError(`Cannot merge two environments with different dimensions.`);
|
|
184
|
-
}
|
|
185
|
-
if (this.options.extensions !== other.options.extensions) {
|
|
186
|
-
throw new BindingError.BindingError(`Cannot merge two environments with different extensions.`);
|
|
187
|
-
}
|
|
188
|
-
if (equal(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {
|
|
189
|
-
return this;
|
|
190
|
-
}
|
|
191
|
-
for (const key in other.options.variables) {
|
|
192
|
-
if (key in this.options.variables && !equal(this.options.variables[key], other.options.variables[key])) {
|
|
193
|
-
throw new BindingError.BindingError(`Cannot merge two environments with different value of variable ${key}:
|
|
194
|
-
` + JSON.stringify(this.options.variables[key]) + "\n" + JSON.stringify(other.options.variables[key]));
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
return new Environment({
|
|
198
|
-
...this.options,
|
|
199
|
-
parent: this.options.parent && other.options.parent ? this.options.parent.merge(other.options.parent) : void 0,
|
|
200
|
-
variables: { ...this.options.variables, ...other.options.variables }
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
((Environment2) => {
|
|
205
|
-
Environment2.createExtension = (create, otherMethods) => {
|
|
206
|
-
return {
|
|
207
|
-
create,
|
|
208
|
-
...otherMethods
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
})(Environment || (Environment = {}));
|
|
212
|
-
exports.Environment = Environment;
|
|
213
|
-
//# sourceMappingURL=Environment.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Environment.cjs","sources":["../../../src/dao/Environment.ts"],"sourcesContent":["import { BindingError } from '../BindingError'\nimport type { Filter } from '../treeParameters'\nimport equal from 'fast-deep-equal/es6/index.js'\nimport { Schema, SchemaColumn, SchemaEntity, SchemaRelation } from '../core/schema'\nimport { GraphQlLiteral } from '@contember/client'\n\nclass Environment<Node extends Environment.AnyNode | undefined = Environment.AnyNode | undefined> {\n\tprivate constructor(\n\t\tprivate readonly options: Environment.Options<Node>,\n\t) {\n\t}\n\n\tpublic static create() {\n\t\treturn new Environment({\n\t\t\tdimensions: {},\n\t\t\tvariables: {},\n\t\t\tparameters: {},\n\t\t\textensions: new Map(),\n\t\t})\n\t}\n\n\tpublic getSubTree(): Environment.SubTreeNode {\n\t\tfor (let env: Environment = this; env.options.node; env = env.getParent()) {\n\t\t\tconst node = env.options.node\n\t\t\tif (node.type === 'subtree-entity' || node.type === 'subtree-entity-list') {\n\t\t\t\treturn node\n\t\t\t}\n\t\t}\n\t\tthrow new BindingError('Not in a SubTree')\n\t}\n\n\tpublic getSubTreeNode(): Node & Environment.AnyNode {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn this.options.node\n\t}\n\n\tpublic withSubTree<Node extends Environment.SubTreeNode>(SubTree: Node): Environment<Node> {\n\t\tconst { parent, ...options } = this.options\n\t\treturn new Environment({\n\t\t\t...options,\n\t\t\tnode: SubTree,\n\t\t})\n\t}\n\n\tpublic withSubTreeChild<Node extends Environment.InnerNode>(node: Node): Environment<Node> {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError(`Cannot call withSubTreeChild without previous call of withSubTree`)\n\t\t}\n\t\tif (this.options.node.entity.fields.get(node.field.name) !== node.field) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tnode,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\n\tpublic hasVariable(key: string): boolean {\n\t\treturn key in this.options.variables\n\t}\n\n\tpublic getVariable<V extends Environment.Value = Environment.Value>(key: string): V {\n\t\tif (!(key in this.options.variables)) {\n\t\t\tthrow new BindingError(`Variable ${key} not found`)\n\t\t}\n\t\treturn this.options.variables[key] as V\n\t}\n\n\tpublic getVariableOrElse<F, V extends Environment.Value = Environment.Value>(key: string, fallback: F): V | F {\n\t\treturn (this.options.variables[key] as V) ?? fallback\n\t}\n\n\t/** @deprecated use getVariable or getParameter */\n\tpublic getValue<V extends Environment.Value = Environment.Value>(key: string): V {\n\t\tconsole.warn('Environment.getValue() is deprecated, use Environment.getVariable() or Environment.getParameter() instead.')\n\t\treturn this.getVariableOrElse(key, undefined) ?? this.getParameterOrElse(key, undefined) as V\n\t}\n\n\t/** @deprecated use getVariableOrElse or getParameterOrElse */\n\tpublic getValueOrElse<F, V extends Environment.Value = Environment.Value>(key: string, fallback: F): V | F {\n\t\tconsole.warn('Environment.getValueOrElse() is deprecated, use Environment.getVariableOrElse() or Environment.getParameterOrElse() instead.')\n\t\treturn this.getVariableOrElse(key, undefined) ?? this.getParameterOrElse(key, fallback) as any\n\t}\n\n\t/** @deprecated */\n\tpublic hasName(key: string): boolean {\n\t\tconsole.warn('Environment.hasName() is deprecated, use Environment.hasVariable() or Environment.hasParameter() instead.')\n\t\treturn key in this.options.variables || key in this.options.parameters\n\t}\n\n\tpublic withVariables(variables: Environment.ValuesMapWithFactory | undefined): Environment {\n\t\tif (variables === undefined) {\n\t\t\treturn this\n\t\t}\n\t\tconst newVariables = { ...this.options.variables }\n\t\tfor (const [newName, newValue] of Object.entries(variables)) {\n\t\t\tif (newName === 'labelMiddleware') {\n\t\t\t\tthrow new BindingError('You cannot pass labelMiddleware to withVariables method. Use withLabelMiddleware instead.')\n\t\t\t}\n\t\t\tconst resolvedValue = typeof newValue === 'function' ? newValue(this) : newValue\n\t\t\tif (resolvedValue === undefined) {\n\t\t\t\tdelete newVariables[newName]\n\t\t\t} else {\n\t\t\t\tnewVariables[newName] = resolvedValue\n\t\t\t}\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tvariables: newVariables,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic getAllVariables() {\n\t\treturn this.options.variables\n\t}\n\n\tpublic hasParameter(key: string): boolean {\n\t\treturn key in this.options.parameters\n\t}\n\n\tpublic getParameter<F>(key: string): string | number {\n\t\tif (!(key in this.options.parameters)) {\n\t\t\tthrow new BindingError(`Parameter ${key} not found`)\n\t\t}\n\t\treturn this.options.parameters[key] as string | number\n\t}\n\n\tpublic getParameterOrElse<F>(key: string, fallback: F): string | number | F {\n\t\treturn this.options.parameters[key] ?? fallback\n\t}\n\n\tpublic getAllParameters() {\n\t\treturn this.options.parameters\n\t}\n\n\tpublic withParameters(parameters: Environment.Parameters): Environment {\n\t\treturn new Environment({ ...this.options, parameters })\n\t}\n\n\tpublic hasDimension(dimensionName: string): boolean {\n\t\treturn dimensionName in this.options.dimensions\n\t}\n\n\tpublic getDimension<F>(dimensionName: string): string[] {\n\t\tif (!(dimensionName in this.options.dimensions)) {\n\t\t\tthrow new BindingError(`Dimension ${dimensionName} does not exist.`)\n\t\t}\n\t\treturn this.options.dimensions[dimensionName]\n\t}\n\n\tpublic getDimensionOrElse<F>(dimensionName: string, fallback: F): string[] | F {\n\t\treturn this.options.dimensions[dimensionName] ?? fallback\n\t}\n\n\tpublic getAllDimensions(): Environment.SelectedDimensions {\n\t\treturn this.options.dimensions\n\t}\n\n\tpublic withDimensions(dimensions: Environment.SelectedDimensions): Environment {\n\t\tconst newDimensions = {\n\t\t\t...this.options.dimensions,\n\t\t\t...dimensions,\n\t\t}\n\t\tif (equal(newDimensions, this.options.dimensions)) {\n\t\t\treturn this\n\t\t}\n\t\treturn new Environment({ ...this.options, dimensions: newDimensions })\n\t}\n\n\tpublic getSchema(): Schema {\n\t\tif (!this.options.schema) {\n\t\t\tthrow new BindingError('Schema is not set')\n\t\t}\n\t\treturn this.options.schema\n\t}\n\n\tpublic withSchema(schema: Schema): Environment {\n\t\treturn new Environment({ ...this.options, schema })\n\t}\n\n\tpublic getParent(): Environment {\n\t\tif (!this.options.parent) {\n\t\t\tthrow new BindingError('There is no parent environment')\n\t\t}\n\t\treturn this.options.parent\n\t}\n\n\tpublic withExtension<S, R>(extension: Environment.Extension<S, R>, state: S): Environment {\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\textensions: new Map([...this.options.extensions, [extension, state] as [Environment.Extension<unknown, unknown>, unknown]]),\n\t\t})\n\t}\n\n\tpublic getExtension<S, R>(extension: Environment.Extension<S, R>): R {\n\t\tconst state = this.options.extensions.get(extension as Environment.Extension<unknown, unknown>)\n\t\treturn extension.create(state as S, this)\n\t}\n\n\tpublic merge(other: Environment): Environment {\n\t\tif (other === this) {\n\t\t\treturn this\n\t\t}\n\t\tif (!equal(this.options.node, other.options.node)) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different tree position.`)\n\t\t}\n\t\tif (this.options.parameters !== other.options.parameters) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different parameters.`)\n\t\t}\n\t\tif (this.options.dimensions !== other.options.dimensions) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different dimensions.`)\n\t\t}\n\t\tif (this.options.extensions !== other.options.extensions) {\n\t\t\t// todo: deep compare?\n\t\t\tthrow new BindingError(`Cannot merge two environments with different extensions.`)\n\t\t}\n\n\t\tif (equal(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {\n\t\t\treturn this\n\t\t}\n\t\tfor (const key in other.options.variables) {\n\t\t\tif (key in this.options.variables && !equal(this.options.variables[key], other.options.variables[key])) {\n\t\t\t\tthrow new BindingError(`Cannot merge two environments with different value of variable ${key}:\\n`\n\t\t\t\t\t+ JSON.stringify(this.options.variables[key]) + '\\n'\n\t\t\t\t\t+ JSON.stringify(other.options.variables[key]))\n\t\t\t}\n\t\t}\n\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tparent: this.options.parent && other.options.parent ? this.options.parent.merge(other.options.parent) : undefined,\n\t\t\tvariables: { ...this.options.variables, ...other.options.variables },\n\t\t})\n\t}\n}\n\nnamespace Environment {\n\texport type Name = string\n\n\texport type ReactElementLike = {\n\t\ttype: any\n\t\tprops: any\n\t}\n\n\texport type Value = string | number | boolean | undefined | GraphQlLiteral | Filter | ReactElementLike\n\n\texport type ResolvedValue = Value\n\n\texport interface Options<Node extends AnyNode | undefined> {\n\t\tnode?: Node\n\t\tschema?: Schema\n\t\tdimensions: SelectedDimensions\n\t\tparameters: Parameters\n\t\tvariables: CustomVariables\n\t\tparent?: Environment\n\t\textensions: Map<Extension<unknown, unknown>, unknown>\n\t}\n\n\texport type SubTreeNode =\n\t\t| SubTreeEntityNode\n\t\t| SubTreeEntityListNode\n\n\texport type InnerNode =\n\t\t| EntityNode\n\t\t| EntityListNode\n\t\t| ColumnNode\n\n\texport type AnyNode =\n\t\t| SubTreeNode\n\t\t| InnerNode\n\n\texport interface SubTreeEntityNode {\n\t\ttype: 'subtree-entity'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero' | 'one' | 'zero-or-one'\n\t\tfilter: Filter\n\t}\n\n\texport interface SubTreeEntityListNode {\n\t\ttype: 'subtree-entity-list'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero-to-many' | 'zero'\n\t\tfilter: Filter\n\t}\n\n\texport interface EntityNode {\n\t\ttype: 'entity'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface EntityListNode {\n\t\ttype: 'entity-list'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface ColumnNode {\n\t\ttype: 'column'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaColumn\n\t}\n\n\texport interface SelectedDimensions {\n\t\t[key: string]: string[]\n\t}\n\n\texport type Parameters = {\n\t\t[K in string]?: string | number\n\t}\n\n\texport interface CustomVariables {\n\t\t[key: string]: Value\n\t}\n\n\texport interface ValuesMapWithFactory {\n\t\t[key: string]:\n\t\t\t| ((environment: Environment) => Value)\n\t\t\t| Value\n\t}\n\n\texport type Extension<State, Result> = {\n\t\tcreate: (state: State | undefined, environment: Environment) => Result\n\t}\n\n\texport const createExtension = <S, R>(create: Extension<S, R>['create'], otherMethods?: Omit<Extension<S, R>, 'create'>): Extension<S, R> => {\n\t\treturn {\n\t\t\tcreate,\n\t\t\t...otherMethods,\n\t\t}\n\t}\n\n\t/** @deprecated */\n\texport type DeltaFactory = ValuesMapWithFactory\n}\n\nexport { Environment }\n"],"names":["BindingError","Environment"],"mappings":";;;;AAMA,MAAM,YAA4F;AAAA,EACzF,YACU,SAChB;AADgB,SAAA,UAAA;AAAA,EAElB;AAAA,EAEA,OAAc,SAAS;AACtB,WAAO,IAAI,YAAY;AAAA,MACtB,YAAY,CAAC;AAAA,MACb,WAAW,CAAC;AAAA,MACZ,YAAY,CAAC;AAAA,MACb,gCAAgB,IAAI;AAAA,IAAA,CACpB;AAAA,EACF;AAAA,EAEO,aAAsC;AACnC,aAAA,MAAmB,MAAM,IAAI,QAAQ,MAAM,MAAM,IAAI,aAAa;AACpE,YAAA,OAAO,IAAI,QAAQ;AACzB,UAAI,KAAK,SAAS,oBAAoB,KAAK,SAAS,uBAAuB;AACnE,eAAA;AAAA,MACR;AAAA,IACD;AACM,UAAA,IAAIA,aAAAA,aAAa,kBAAkB;AAAA,EAC1C;AAAA,EAEO,iBAA6C;AAC/C,QAAA,CAAC,KAAK,QAAQ,MAAM;AACvB,YAAM,IAAIA,aAAa,aAAA;AAAA,IACxB;AAC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W,GAAG,MAAM,QAAQ,UAAU;AAAA,IAAA,CACnE;AAAA,EACF;AACD;AAAA,CAEA,CAAUC,iBAAV;AAyFcA,eAAA,kBAAkB,CAAO,QAAmC,iBAAoE;AACrI,WAAA;AAAA,MACN;AAAA,MACA,GAAG;AAAA,IAAA;AAAA,EACJ;AACD,GA9FS,gBAAA,cAAA,CAAA,EAAA;;"}
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { BindingError } from "../BindingError.js";
|
|
2
|
-
import equal from "fast-deep-equal/es6/index.js";
|
|
3
|
-
class Environment {
|
|
4
|
-
constructor(options) {
|
|
5
|
-
this.options = options;
|
|
6
|
-
}
|
|
7
|
-
static create() {
|
|
8
|
-
return new Environment({
|
|
9
|
-
dimensions: {},
|
|
10
|
-
variables: {},
|
|
11
|
-
parameters: {},
|
|
12
|
-
extensions: /* @__PURE__ */ new Map()
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
getSubTree() {
|
|
16
|
-
for (let env = this; env.options.node; env = env.getParent()) {
|
|
17
|
-
const node = env.options.node;
|
|
18
|
-
if (node.type === "subtree-entity" || node.type === "subtree-entity-list") {
|
|
19
|
-
return node;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
throw new BindingError("Not in a SubTree");
|
|
23
|
-
}
|
|
24
|
-
getSubTreeNode() {
|
|
25
|
-
if (!this.options.node) {
|
|
26
|
-
throw new BindingError();
|
|
27
|
-
}
|
|
28
|
-
return this.options.node;
|
|
29
|
-
}
|
|
30
|
-
withSubTree(SubTree) {
|
|
31
|
-
const { parent, ...options } = this.options;
|
|
32
|
-
return new Environment({
|
|
33
|
-
...options,
|
|
34
|
-
node: SubTree
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
withSubTreeChild(node) {
|
|
38
|
-
if (!this.options.node) {
|
|
39
|
-
throw new BindingError(`Cannot call withSubTreeChild without previous call of withSubTree`);
|
|
40
|
-
}
|
|
41
|
-
if (this.options.node.entity.fields.get(node.field.name) !== node.field) {
|
|
42
|
-
throw new BindingError();
|
|
43
|
-
}
|
|
44
|
-
return new Environment({
|
|
45
|
-
...this.options,
|
|
46
|
-
node,
|
|
47
|
-
parent: this
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
hasVariable(key) {
|
|
51
|
-
return key in this.options.variables;
|
|
52
|
-
}
|
|
53
|
-
getVariable(key) {
|
|
54
|
-
if (!(key in this.options.variables)) {
|
|
55
|
-
throw new BindingError(`Variable ${key} not found`);
|
|
56
|
-
}
|
|
57
|
-
return this.options.variables[key];
|
|
58
|
-
}
|
|
59
|
-
getVariableOrElse(key, fallback) {
|
|
60
|
-
return this.options.variables[key] ?? fallback;
|
|
61
|
-
}
|
|
62
|
-
/** @deprecated use getVariable or getParameter */
|
|
63
|
-
getValue(key) {
|
|
64
|
-
console.warn("Environment.getValue() is deprecated, use Environment.getVariable() or Environment.getParameter() instead.");
|
|
65
|
-
return this.getVariableOrElse(key, void 0) ?? this.getParameterOrElse(key, void 0);
|
|
66
|
-
}
|
|
67
|
-
/** @deprecated use getVariableOrElse or getParameterOrElse */
|
|
68
|
-
getValueOrElse(key, fallback) {
|
|
69
|
-
console.warn("Environment.getValueOrElse() is deprecated, use Environment.getVariableOrElse() or Environment.getParameterOrElse() instead.");
|
|
70
|
-
return this.getVariableOrElse(key, void 0) ?? this.getParameterOrElse(key, fallback);
|
|
71
|
-
}
|
|
72
|
-
/** @deprecated */
|
|
73
|
-
hasName(key) {
|
|
74
|
-
console.warn("Environment.hasName() is deprecated, use Environment.hasVariable() or Environment.hasParameter() instead.");
|
|
75
|
-
return key in this.options.variables || key in this.options.parameters;
|
|
76
|
-
}
|
|
77
|
-
withVariables(variables) {
|
|
78
|
-
if (variables === void 0) {
|
|
79
|
-
return this;
|
|
80
|
-
}
|
|
81
|
-
const newVariables = { ...this.options.variables };
|
|
82
|
-
for (const [newName, newValue] of Object.entries(variables)) {
|
|
83
|
-
if (newName === "labelMiddleware") {
|
|
84
|
-
throw new BindingError("You cannot pass labelMiddleware to withVariables method. Use withLabelMiddleware instead.");
|
|
85
|
-
}
|
|
86
|
-
const resolvedValue = typeof newValue === "function" ? newValue(this) : newValue;
|
|
87
|
-
if (resolvedValue === void 0) {
|
|
88
|
-
delete newVariables[newName];
|
|
89
|
-
} else {
|
|
90
|
-
newVariables[newName] = resolvedValue;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return new Environment({
|
|
94
|
-
...this.options,
|
|
95
|
-
variables: newVariables,
|
|
96
|
-
parent: this
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
getAllVariables() {
|
|
100
|
-
return this.options.variables;
|
|
101
|
-
}
|
|
102
|
-
hasParameter(key) {
|
|
103
|
-
return key in this.options.parameters;
|
|
104
|
-
}
|
|
105
|
-
getParameter(key) {
|
|
106
|
-
if (!(key in this.options.parameters)) {
|
|
107
|
-
throw new BindingError(`Parameter ${key} not found`);
|
|
108
|
-
}
|
|
109
|
-
return this.options.parameters[key];
|
|
110
|
-
}
|
|
111
|
-
getParameterOrElse(key, fallback) {
|
|
112
|
-
return this.options.parameters[key] ?? fallback;
|
|
113
|
-
}
|
|
114
|
-
getAllParameters() {
|
|
115
|
-
return this.options.parameters;
|
|
116
|
-
}
|
|
117
|
-
withParameters(parameters) {
|
|
118
|
-
return new Environment({ ...this.options, parameters });
|
|
119
|
-
}
|
|
120
|
-
hasDimension(dimensionName) {
|
|
121
|
-
return dimensionName in this.options.dimensions;
|
|
122
|
-
}
|
|
123
|
-
getDimension(dimensionName) {
|
|
124
|
-
if (!(dimensionName in this.options.dimensions)) {
|
|
125
|
-
throw new BindingError(`Dimension ${dimensionName} does not exist.`);
|
|
126
|
-
}
|
|
127
|
-
return this.options.dimensions[dimensionName];
|
|
128
|
-
}
|
|
129
|
-
getDimensionOrElse(dimensionName, fallback) {
|
|
130
|
-
return this.options.dimensions[dimensionName] ?? fallback;
|
|
131
|
-
}
|
|
132
|
-
getAllDimensions() {
|
|
133
|
-
return this.options.dimensions;
|
|
134
|
-
}
|
|
135
|
-
withDimensions(dimensions) {
|
|
136
|
-
const newDimensions = {
|
|
137
|
-
...this.options.dimensions,
|
|
138
|
-
...dimensions
|
|
139
|
-
};
|
|
140
|
-
if (equal(newDimensions, this.options.dimensions)) {
|
|
141
|
-
return this;
|
|
142
|
-
}
|
|
143
|
-
return new Environment({ ...this.options, dimensions: newDimensions });
|
|
144
|
-
}
|
|
145
|
-
getSchema() {
|
|
146
|
-
if (!this.options.schema) {
|
|
147
|
-
throw new BindingError("Schema is not set");
|
|
148
|
-
}
|
|
149
|
-
return this.options.schema;
|
|
150
|
-
}
|
|
151
|
-
withSchema(schema) {
|
|
152
|
-
return new Environment({ ...this.options, schema });
|
|
153
|
-
}
|
|
154
|
-
getParent() {
|
|
155
|
-
if (!this.options.parent) {
|
|
156
|
-
throw new BindingError("There is no parent environment");
|
|
157
|
-
}
|
|
158
|
-
return this.options.parent;
|
|
159
|
-
}
|
|
160
|
-
withExtension(extension, state) {
|
|
161
|
-
return new Environment({
|
|
162
|
-
...this.options,
|
|
163
|
-
extensions: new Map([...this.options.extensions, [extension, state]])
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
getExtension(extension) {
|
|
167
|
-
const state = this.options.extensions.get(extension);
|
|
168
|
-
return extension.create(state, this);
|
|
169
|
-
}
|
|
170
|
-
merge(other) {
|
|
171
|
-
if (other === this) {
|
|
172
|
-
return this;
|
|
173
|
-
}
|
|
174
|
-
if (!equal(this.options.node, other.options.node)) {
|
|
175
|
-
throw new BindingError(`Cannot merge two environments with different tree position.`);
|
|
176
|
-
}
|
|
177
|
-
if (this.options.parameters !== other.options.parameters) {
|
|
178
|
-
throw new BindingError(`Cannot merge two environments with different parameters.`);
|
|
179
|
-
}
|
|
180
|
-
if (this.options.dimensions !== other.options.dimensions) {
|
|
181
|
-
throw new BindingError(`Cannot merge two environments with different dimensions.`);
|
|
182
|
-
}
|
|
183
|
-
if (this.options.extensions !== other.options.extensions) {
|
|
184
|
-
throw new BindingError(`Cannot merge two environments with different extensions.`);
|
|
185
|
-
}
|
|
186
|
-
if (equal(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {
|
|
187
|
-
return this;
|
|
188
|
-
}
|
|
189
|
-
for (const key in other.options.variables) {
|
|
190
|
-
if (key in this.options.variables && !equal(this.options.variables[key], other.options.variables[key])) {
|
|
191
|
-
throw new BindingError(`Cannot merge two environments with different value of variable ${key}:
|
|
192
|
-
` + JSON.stringify(this.options.variables[key]) + "\n" + JSON.stringify(other.options.variables[key]));
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
return new Environment({
|
|
196
|
-
...this.options,
|
|
197
|
-
parent: this.options.parent && other.options.parent ? this.options.parent.merge(other.options.parent) : void 0,
|
|
198
|
-
variables: { ...this.options.variables, ...other.options.variables }
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
((Environment2) => {
|
|
203
|
-
Environment2.createExtension = (create, otherMethods) => {
|
|
204
|
-
return {
|
|
205
|
-
create,
|
|
206
|
-
...otherMethods
|
|
207
|
-
};
|
|
208
|
-
};
|
|
209
|
-
})(Environment || (Environment = {}));
|
|
210
|
-
export {
|
|
211
|
-
Environment
|
|
212
|
-
};
|
|
213
|
-
//# sourceMappingURL=Environment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Environment.js","sources":["../../../src/dao/Environment.ts"],"sourcesContent":["import { BindingError } from '../BindingError'\nimport type { Filter } from '../treeParameters'\nimport equal from 'fast-deep-equal/es6/index.js'\nimport { Schema, SchemaColumn, SchemaEntity, SchemaRelation } from '../core/schema'\nimport { GraphQlLiteral } from '@contember/client'\n\nclass Environment<Node extends Environment.AnyNode | undefined = Environment.AnyNode | undefined> {\n\tprivate constructor(\n\t\tprivate readonly options: Environment.Options<Node>,\n\t) {\n\t}\n\n\tpublic static create() {\n\t\treturn new Environment({\n\t\t\tdimensions: {},\n\t\t\tvariables: {},\n\t\t\tparameters: {},\n\t\t\textensions: new Map(),\n\t\t})\n\t}\n\n\tpublic getSubTree(): Environment.SubTreeNode {\n\t\tfor (let env: Environment = this; env.options.node; env = env.getParent()) {\n\t\t\tconst node = env.options.node\n\t\t\tif (node.type === 'subtree-entity' || node.type === 'subtree-entity-list') {\n\t\t\t\treturn node\n\t\t\t}\n\t\t}\n\t\tthrow new BindingError('Not in a SubTree')\n\t}\n\n\tpublic getSubTreeNode(): Node & Environment.AnyNode {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn this.options.node\n\t}\n\n\tpublic withSubTree<Node extends Environment.SubTreeNode>(SubTree: Node): Environment<Node> {\n\t\tconst { parent, ...options } = this.options\n\t\treturn new Environment({\n\t\t\t...options,\n\t\t\tnode: SubTree,\n\t\t})\n\t}\n\n\tpublic withSubTreeChild<Node extends Environment.InnerNode>(node: Node): Environment<Node> {\n\t\tif (!this.options.node) {\n\t\t\tthrow new BindingError(`Cannot call withSubTreeChild without previous call of withSubTree`)\n\t\t}\n\t\tif (this.options.node.entity.fields.get(node.field.name) !== node.field) {\n\t\t\tthrow new BindingError()\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tnode,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\n\tpublic hasVariable(key: string): boolean {\n\t\treturn key in this.options.variables\n\t}\n\n\tpublic getVariable<V extends Environment.Value = Environment.Value>(key: string): V {\n\t\tif (!(key in this.options.variables)) {\n\t\t\tthrow new BindingError(`Variable ${key} not found`)\n\t\t}\n\t\treturn this.options.variables[key] as V\n\t}\n\n\tpublic getVariableOrElse<F, V extends Environment.Value = Environment.Value>(key: string, fallback: F): V | F {\n\t\treturn (this.options.variables[key] as V) ?? fallback\n\t}\n\n\t/** @deprecated use getVariable or getParameter */\n\tpublic getValue<V extends Environment.Value = Environment.Value>(key: string): V {\n\t\tconsole.warn('Environment.getValue() is deprecated, use Environment.getVariable() or Environment.getParameter() instead.')\n\t\treturn this.getVariableOrElse(key, undefined) ?? this.getParameterOrElse(key, undefined) as V\n\t}\n\n\t/** @deprecated use getVariableOrElse or getParameterOrElse */\n\tpublic getValueOrElse<F, V extends Environment.Value = Environment.Value>(key: string, fallback: F): V | F {\n\t\tconsole.warn('Environment.getValueOrElse() is deprecated, use Environment.getVariableOrElse() or Environment.getParameterOrElse() instead.')\n\t\treturn this.getVariableOrElse(key, undefined) ?? this.getParameterOrElse(key, fallback) as any\n\t}\n\n\t/** @deprecated */\n\tpublic hasName(key: string): boolean {\n\t\tconsole.warn('Environment.hasName() is deprecated, use Environment.hasVariable() or Environment.hasParameter() instead.')\n\t\treturn key in this.options.variables || key in this.options.parameters\n\t}\n\n\tpublic withVariables(variables: Environment.ValuesMapWithFactory | undefined): Environment {\n\t\tif (variables === undefined) {\n\t\t\treturn this\n\t\t}\n\t\tconst newVariables = { ...this.options.variables }\n\t\tfor (const [newName, newValue] of Object.entries(variables)) {\n\t\t\tif (newName === 'labelMiddleware') {\n\t\t\t\tthrow new BindingError('You cannot pass labelMiddleware to withVariables method. Use withLabelMiddleware instead.')\n\t\t\t}\n\t\t\tconst resolvedValue = typeof newValue === 'function' ? newValue(this) : newValue\n\t\t\tif (resolvedValue === undefined) {\n\t\t\t\tdelete newVariables[newName]\n\t\t\t} else {\n\t\t\t\tnewVariables[newName] = resolvedValue\n\t\t\t}\n\t\t}\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tvariables: newVariables,\n\t\t\tparent: this,\n\t\t})\n\t}\n\n\tpublic getAllVariables() {\n\t\treturn this.options.variables\n\t}\n\n\tpublic hasParameter(key: string): boolean {\n\t\treturn key in this.options.parameters\n\t}\n\n\tpublic getParameter<F>(key: string): string | number {\n\t\tif (!(key in this.options.parameters)) {\n\t\t\tthrow new BindingError(`Parameter ${key} not found`)\n\t\t}\n\t\treturn this.options.parameters[key] as string | number\n\t}\n\n\tpublic getParameterOrElse<F>(key: string, fallback: F): string | number | F {\n\t\treturn this.options.parameters[key] ?? fallback\n\t}\n\n\tpublic getAllParameters() {\n\t\treturn this.options.parameters\n\t}\n\n\tpublic withParameters(parameters: Environment.Parameters): Environment {\n\t\treturn new Environment({ ...this.options, parameters })\n\t}\n\n\tpublic hasDimension(dimensionName: string): boolean {\n\t\treturn dimensionName in this.options.dimensions\n\t}\n\n\tpublic getDimension<F>(dimensionName: string): string[] {\n\t\tif (!(dimensionName in this.options.dimensions)) {\n\t\t\tthrow new BindingError(`Dimension ${dimensionName} does not exist.`)\n\t\t}\n\t\treturn this.options.dimensions[dimensionName]\n\t}\n\n\tpublic getDimensionOrElse<F>(dimensionName: string, fallback: F): string[] | F {\n\t\treturn this.options.dimensions[dimensionName] ?? fallback\n\t}\n\n\tpublic getAllDimensions(): Environment.SelectedDimensions {\n\t\treturn this.options.dimensions\n\t}\n\n\tpublic withDimensions(dimensions: Environment.SelectedDimensions): Environment {\n\t\tconst newDimensions = {\n\t\t\t...this.options.dimensions,\n\t\t\t...dimensions,\n\t\t}\n\t\tif (equal(newDimensions, this.options.dimensions)) {\n\t\t\treturn this\n\t\t}\n\t\treturn new Environment({ ...this.options, dimensions: newDimensions })\n\t}\n\n\tpublic getSchema(): Schema {\n\t\tif (!this.options.schema) {\n\t\t\tthrow new BindingError('Schema is not set')\n\t\t}\n\t\treturn this.options.schema\n\t}\n\n\tpublic withSchema(schema: Schema): Environment {\n\t\treturn new Environment({ ...this.options, schema })\n\t}\n\n\tpublic getParent(): Environment {\n\t\tif (!this.options.parent) {\n\t\t\tthrow new BindingError('There is no parent environment')\n\t\t}\n\t\treturn this.options.parent\n\t}\n\n\tpublic withExtension<S, R>(extension: Environment.Extension<S, R>, state: S): Environment {\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\textensions: new Map([...this.options.extensions, [extension, state] as [Environment.Extension<unknown, unknown>, unknown]]),\n\t\t})\n\t}\n\n\tpublic getExtension<S, R>(extension: Environment.Extension<S, R>): R {\n\t\tconst state = this.options.extensions.get(extension as Environment.Extension<unknown, unknown>)\n\t\treturn extension.create(state as S, this)\n\t}\n\n\tpublic merge(other: Environment): Environment {\n\t\tif (other === this) {\n\t\t\treturn this\n\t\t}\n\t\tif (!equal(this.options.node, other.options.node)) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different tree position.`)\n\t\t}\n\t\tif (this.options.parameters !== other.options.parameters) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different parameters.`)\n\t\t}\n\t\tif (this.options.dimensions !== other.options.dimensions) {\n\t\t\tthrow new BindingError(`Cannot merge two environments with different dimensions.`)\n\t\t}\n\t\tif (this.options.extensions !== other.options.extensions) {\n\t\t\t// todo: deep compare?\n\t\t\tthrow new BindingError(`Cannot merge two environments with different extensions.`)\n\t\t}\n\n\t\tif (equal(this.options.variables, other.options.variables) && this.options.parent === other.options.parent) {\n\t\t\treturn this\n\t\t}\n\t\tfor (const key in other.options.variables) {\n\t\t\tif (key in this.options.variables && !equal(this.options.variables[key], other.options.variables[key])) {\n\t\t\t\tthrow new BindingError(`Cannot merge two environments with different value of variable ${key}:\\n`\n\t\t\t\t\t+ JSON.stringify(this.options.variables[key]) + '\\n'\n\t\t\t\t\t+ JSON.stringify(other.options.variables[key]))\n\t\t\t}\n\t\t}\n\n\t\treturn new Environment({\n\t\t\t...this.options,\n\t\t\tparent: this.options.parent && other.options.parent ? this.options.parent.merge(other.options.parent) : undefined,\n\t\t\tvariables: { ...this.options.variables, ...other.options.variables },\n\t\t})\n\t}\n}\n\nnamespace Environment {\n\texport type Name = string\n\n\texport type ReactElementLike = {\n\t\ttype: any\n\t\tprops: any\n\t}\n\n\texport type Value = string | number | boolean | undefined | GraphQlLiteral | Filter | ReactElementLike\n\n\texport type ResolvedValue = Value\n\n\texport interface Options<Node extends AnyNode | undefined> {\n\t\tnode?: Node\n\t\tschema?: Schema\n\t\tdimensions: SelectedDimensions\n\t\tparameters: Parameters\n\t\tvariables: CustomVariables\n\t\tparent?: Environment\n\t\textensions: Map<Extension<unknown, unknown>, unknown>\n\t}\n\n\texport type SubTreeNode =\n\t\t| SubTreeEntityNode\n\t\t| SubTreeEntityListNode\n\n\texport type InnerNode =\n\t\t| EntityNode\n\t\t| EntityListNode\n\t\t| ColumnNode\n\n\texport type AnyNode =\n\t\t| SubTreeNode\n\t\t| InnerNode\n\n\texport interface SubTreeEntityNode {\n\t\ttype: 'subtree-entity'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero' | 'one' | 'zero-or-one'\n\t\tfilter: Filter\n\t}\n\n\texport interface SubTreeEntityListNode {\n\t\ttype: 'subtree-entity-list'\n\t\tentity: SchemaEntity\n\t\texpectedCardinality: 'zero-to-many' | 'zero'\n\t\tfilter: Filter\n\t}\n\n\texport interface EntityNode {\n\t\ttype: 'entity'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface EntityListNode {\n\t\ttype: 'entity-list'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaRelation\n\t}\n\n\texport interface ColumnNode {\n\t\ttype: 'column'\n\t\tentity: SchemaEntity\n\t\tfield: SchemaColumn\n\t}\n\n\texport interface SelectedDimensions {\n\t\t[key: string]: string[]\n\t}\n\n\texport type Parameters = {\n\t\t[K in string]?: string | number\n\t}\n\n\texport interface CustomVariables {\n\t\t[key: string]: Value\n\t}\n\n\texport interface ValuesMapWithFactory {\n\t\t[key: string]:\n\t\t\t| ((environment: Environment) => Value)\n\t\t\t| Value\n\t}\n\n\texport type Extension<State, Result> = {\n\t\tcreate: (state: State | undefined, environment: Environment) => Result\n\t}\n\n\texport const createExtension = <S, R>(create: Extension<S, R>['create'], otherMethods?: Omit<Extension<S, R>, 'create'>): Extension<S, R> => {\n\t\treturn {\n\t\t\tcreate,\n\t\t\t...otherMethods,\n\t\t}\n\t}\n\n\t/** @deprecated */\n\texport type DeltaFactory = ValuesMapWithFactory\n}\n\nexport { Environment }\n"],"names":["Environment"],"mappings":";;AAMA,MAAM,YAA4F;AAAA,EACzF,YACU,SAChB;AADgB,SAAA,UAAA;AAAA,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AK,QAAQ,UAAU,GAAG,GAAG,MAAM,QAAQ,UAAU,GAAG,CAAC,GAAG;AACjG,cAAA,IAAI,aAAa,kEAAkE,GAAG;AAAA,IACzF,KAAK,UAAU,KAAK,QAAQ,UAAU,GAAG,CAAC,IAAI,OAC9C,KAAK,UAAU,MAAM,QAAQ,UAAU,GAAG,CAAC,CAAC;AAAA,MAChD;AAAA,IACD;AAEA,WAAO,IAAI,YAAY;AAAA,MACtB,GAAG,KAAK;AAAA,MACR,QAAQ,KAAK,QAAQ,UAAU,MAAM,QAAQ,SAAS,KAAK,QAAQ,OAAO,MAAM,MAAM,QAAQ,MAAM,IAAI;AAAA,MACxG,WAAW,EAAE,GAAG,KAAK,QAAQ,WAAW,GAAG,MAAM,QAAQ,UAAU;AAAA,IAAA,CACnE;AAAA,EACF;AACD;AAAA,CAEA,CAAUA,iBAAV;AAyFcA,eAAA,kBAAkB,CAAO,QAAmC,iBAAoE;AACrI,WAAA;AAAA,MACN;AAAA,MACA,GAAG;AAAA,IAAA;AAAA,EACJ;AACD,GA9FS,gBAAA,cAAA,CAAA,EAAA;"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const client = require("@contember/client");
|
|
4
|
-
const TreeNodeUtils = require("../utils/TreeNodeUtils.cjs");
|
|
5
|
-
const QueryLanguage = require("../queryLanguage/QueryLanguage.cjs");
|
|
6
|
-
class TreeNodeEnvironmentFactory {
|
|
7
|
-
static createEnvironmentForEntityListSubtree(environment, sugaredEntityList) {
|
|
8
|
-
let entityList;
|
|
9
|
-
let rootWhere;
|
|
10
|
-
let expectedCardinality;
|
|
11
|
-
if (sugaredEntityList.isCreating) {
|
|
12
|
-
entityList = QueryLanguage.QueryLanguage.desugarUnconstrainedQualifiedEntityList(sugaredEntityList, environment);
|
|
13
|
-
rootWhere = {};
|
|
14
|
-
expectedCardinality = "zero";
|
|
15
|
-
} else {
|
|
16
|
-
entityList = QueryLanguage.QueryLanguage.desugarQualifiedEntityList(sugaredEntityList, environment);
|
|
17
|
-
rootWhere = entityList.filter ?? {};
|
|
18
|
-
expectedCardinality = "zero-to-many";
|
|
19
|
-
}
|
|
20
|
-
const entitySchema = TreeNodeUtils.TreeNodeUtils.resolveEntity(environment.getSchema(), entityList.entityName, "entity list");
|
|
21
|
-
return environment.withSubTree({
|
|
22
|
-
type: "subtree-entity-list",
|
|
23
|
-
entity: entitySchema,
|
|
24
|
-
expectedCardinality,
|
|
25
|
-
filter: rootWhere
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
static createEnvironmentForEntitySubtree(environment, sugaredEntityList) {
|
|
29
|
-
let entity;
|
|
30
|
-
let rootWhere;
|
|
31
|
-
let expectedCardinality;
|
|
32
|
-
if (sugaredEntityList.isCreating) {
|
|
33
|
-
rootWhere = {};
|
|
34
|
-
expectedCardinality = "zero";
|
|
35
|
-
entity = QueryLanguage.QueryLanguage.desugarUnconstrainedQualifiedSingleEntity(sugaredEntityList, environment);
|
|
36
|
-
} else {
|
|
37
|
-
entity = QueryLanguage.QueryLanguage.desugarQualifiedSingleEntity(sugaredEntityList, environment, { missingSetOnCreate: "fill" });
|
|
38
|
-
rootWhere = client.whereToFilter(entity.where);
|
|
39
|
-
expectedCardinality = entity.setOnCreate ? "zero-or-one" : "one";
|
|
40
|
-
}
|
|
41
|
-
const entitySchema = TreeNodeUtils.TreeNodeUtils.resolveEntity(environment.getSchema(), entity.entityName, "entity");
|
|
42
|
-
return environment.withSubTree({
|
|
43
|
-
type: "subtree-entity",
|
|
44
|
-
entity: entitySchema,
|
|
45
|
-
expectedCardinality,
|
|
46
|
-
filter: rootWhere
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
static createEnvironmentForEntityList(environment, sugaredRelativeEntityList) {
|
|
50
|
-
const relativeEntityList = QueryLanguage.QueryLanguage.desugarRelativeEntityList(sugaredRelativeEntityList, environment);
|
|
51
|
-
const hasOneEnvironment = this.traverseHasOnePath(environment, relativeEntityList.hasOneRelationPath);
|
|
52
|
-
const hasManyField = relativeEntityList.hasManyRelation.field;
|
|
53
|
-
const field = TreeNodeUtils.TreeNodeUtils.resolveHasManyRelation(hasOneEnvironment, hasManyField);
|
|
54
|
-
const targetEntity = environment.getSchema().getEntity(field.targetEntity);
|
|
55
|
-
return hasOneEnvironment.withSubTreeChild({
|
|
56
|
-
type: "entity-list",
|
|
57
|
-
field,
|
|
58
|
-
entity: targetEntity
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
static createEnvironmentForEntity(environment, sugaredRelativeSingleEntity) {
|
|
62
|
-
const relativeSingleEntity = QueryLanguage.QueryLanguage.desugarRelativeSingleEntity(sugaredRelativeSingleEntity, environment);
|
|
63
|
-
return this.traverseHasOnePath(environment, relativeSingleEntity.hasOneRelationPath);
|
|
64
|
-
}
|
|
65
|
-
static createEnvironmentForField(environment, sugaredRelativeSingleField) {
|
|
66
|
-
const relativeSingleField = QueryLanguage.QueryLanguage.desugarRelativeSingleField(sugaredRelativeSingleField, environment);
|
|
67
|
-
const hasOneEnvironment = this.traverseHasOnePath(environment, relativeSingleField.hasOneRelationPath);
|
|
68
|
-
const field = TreeNodeUtils.TreeNodeUtils.resolveColumn(hasOneEnvironment, relativeSingleField.field);
|
|
69
|
-
return hasOneEnvironment.withSubTreeChild({
|
|
70
|
-
type: "column",
|
|
71
|
-
entity: environment.getSubTreeNode().entity,
|
|
72
|
-
field
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
static traverseHasOnePath(environment, hasOneRelationPath) {
|
|
76
|
-
for (const pathItem of hasOneRelationPath) {
|
|
77
|
-
const field = TreeNodeUtils.TreeNodeUtils.resolveHasOneRelation(environment, pathItem.field, !!pathItem.reducedBy);
|
|
78
|
-
const targetEntity = environment.getSchema().getEntity(field.targetEntity);
|
|
79
|
-
environment = environment.withSubTreeChild({
|
|
80
|
-
type: "entity",
|
|
81
|
-
field,
|
|
82
|
-
entity: targetEntity
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
return environment;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
exports.TreeNodeEnvironmentFactory = TreeNodeEnvironmentFactory;
|
|
89
|
-
//# sourceMappingURL=TreeNodeEnvironmentFactory.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TreeNodeEnvironmentFactory.cjs","sources":["../../../src/dao/TreeNodeEnvironmentFactory.ts"],"sourcesContent":["import { Environment } from './Environment'\nimport {\n\tHasOneRelation,\n\tSugaredQualifiedEntityList,\n\tSugaredQualifiedSingleEntity,\n\tSugaredRelativeEntityList,\n\tSugaredRelativeSingleEntity,\n\tSugaredRelativeSingleField,\n\tSugaredUnconstrainedQualifiedEntityList,\n\tSugaredUnconstrainedQualifiedSingleEntity,\n} from '../treeParameters'\nimport { QueryLanguage } from '../queryLanguage'\nimport { whereToFilter } from '@contember/client'\nimport { TreeNodeUtils } from '../utils/TreeNodeUtils'\n\nexport class TreeNodeEnvironmentFactory {\n\n\tpublic static createEnvironmentForEntityListSubtree(\n\t\tenvironment: Environment,\n\t\tsugaredEntityList: SugaredQualifiedEntityList | SugaredUnconstrainedQualifiedEntityList,\n\t): Environment {\n\t\tlet entityList\n\t\tlet rootWhere\n\t\tlet expectedCardinality: Environment.SubTreeNode['expectedCardinality']\n\n\t\tif (sugaredEntityList.isCreating) {\n\t\t\tentityList = QueryLanguage.desugarUnconstrainedQualifiedEntityList(sugaredEntityList, environment)\n\t\t\trootWhere = {} as const\n\t\t\texpectedCardinality = 'zero'\n\n\t\t} else {\n\t\t\tentityList = QueryLanguage.desugarQualifiedEntityList(sugaredEntityList, environment)\n\t\t\trootWhere = entityList.filter ?? {}\n\t\t\texpectedCardinality = 'zero-to-many'\n\t\t}\n\n\t\tconst entitySchema = TreeNodeUtils.resolveEntity(environment.getSchema(), entityList.entityName, 'entity list')\n\n\t\treturn environment.withSubTree({\n\t\t\ttype: 'subtree-entity-list',\n\t\t\tentity: entitySchema,\n\t\t\texpectedCardinality,\n\t\t\tfilter: rootWhere,\n\t\t})\n\t}\n\n\tpublic static createEnvironmentForEntitySubtree(\n\t\tenvironment: Environment,\n\t\tsugaredEntityList: SugaredQualifiedSingleEntity | SugaredUnconstrainedQualifiedSingleEntity,\n\t): Environment {\n\t\tlet entity\n\t\tlet rootWhere\n\t\tlet expectedCardinality: Environment.SubTreeNode['expectedCardinality']\n\n\t\tif (sugaredEntityList.isCreating) {\n\t\t\trootWhere = { } as const\n\t\t\texpectedCardinality = 'zero'\n\t\t\tentity = QueryLanguage.desugarUnconstrainedQualifiedSingleEntity(sugaredEntityList, environment)\n\n\t\t} else {\n\t\t\tentity = QueryLanguage.desugarQualifiedSingleEntity(sugaredEntityList, environment, { missingSetOnCreate: 'fill' })\n\t\t\trootWhere = whereToFilter(entity.where)\n\t\t\texpectedCardinality = entity.setOnCreate ? 'zero-or-one' : 'one'\n\t\t}\n\n\t\tconst entitySchema = TreeNodeUtils.resolveEntity(environment.getSchema(), entity.entityName, 'entity')\n\n\t\treturn environment.withSubTree({\n\t\t\ttype: 'subtree-entity',\n\t\t\tentity: entitySchema,\n\t\t\texpectedCardinality: expectedCardinality,\n\t\t\tfilter: rootWhere,\n\t\t})\n\t}\n\n\tpublic static createEnvironmentForEntityList(\n\t\tenvironment: Environment,\n\t\tsugaredRelativeEntityList: SugaredRelativeEntityList,\n\t): Environment {\n\t\tconst relativeEntityList = QueryLanguage.desugarRelativeEntityList(sugaredRelativeEntityList, environment)\n\t\tconst hasOneEnvironment = this.traverseHasOnePath(environment, relativeEntityList.hasOneRelationPath)\n\t\tconst hasManyField = relativeEntityList.hasManyRelation.field\n\n\t\tconst field = TreeNodeUtils.resolveHasManyRelation(hasOneEnvironment, hasManyField)\n\n\t\tconst targetEntity = environment.getSchema().getEntity(field.targetEntity)\n\n\t\treturn hasOneEnvironment.withSubTreeChild({\n\t\t\ttype: 'entity-list',\n\t\t\tfield,\n\t\t\tentity: targetEntity,\n\t\t})\n\t}\n\n\tpublic static createEnvironmentForEntity(\n\t\tenvironment: Environment,\n\t\tsugaredRelativeSingleEntity: SugaredRelativeSingleEntity,\n\t) {\n\t\tconst relativeSingleEntity = QueryLanguage.desugarRelativeSingleEntity(sugaredRelativeSingleEntity, environment)\n\n\t\treturn this.traverseHasOnePath(environment, relativeSingleEntity.hasOneRelationPath)\n\t}\n\n\tpublic static createEnvironmentForField(\n\t\tenvironment: Environment,\n\t\tsugaredRelativeSingleField: SugaredRelativeSingleField,\n\t) {\n\t\tconst relativeSingleField = QueryLanguage.desugarRelativeSingleField(sugaredRelativeSingleField, environment)\n\t\tconst hasOneEnvironment = this.traverseHasOnePath(environment, relativeSingleField.hasOneRelationPath)\n\n\t\tconst field = TreeNodeUtils.resolveColumn(hasOneEnvironment, relativeSingleField.field)\n\n\t\treturn hasOneEnvironment.withSubTreeChild({\n\t\t\ttype: 'column',\n\t\t\tentity: environment.getSubTreeNode().entity,\n\t\t\tfield,\n\t\t})\n\t}\n\n\tprivate static traverseHasOnePath(\n\t\tenvironment: Environment,\n\t\thasOneRelationPath: HasOneRelation[],\n\t): Environment {\n\t\tfor (const pathItem of hasOneRelationPath) {\n\t\t\tconst field = TreeNodeUtils.resolveHasOneRelation(environment, pathItem.field, !!pathItem.reducedBy)\n\t\t\tconst targetEntity = environment.getSchema().getEntity(field.targetEntity)\n\n\t\t\tenvironment = environment.withSubTreeChild({\n\t\t\t\ttype: 'entity',\n\t\t\t\tfield,\n\t\t\t\tentity: targetEntity,\n\t\t\t})\n\t\t}\n\t\treturn environment\n\t}\n\n}\n"],"names":["QueryLanguage","TreeNodeUtils","whereToFilter"],"mappings":";;;;;AAeO,MAAM,2BAA2B;AAAA,EAEvC,OAAc,sCACb,aACA,mBACc;AACV,QAAA;AACA,QAAA;AACA,QAAA;AAEJ,QAAI,kBAAkB,YAAY;AACpB,mBAAAA,cAAAA,cAAc,wCAAwC,mBAAmB,WAAW;AACjG,kBAAY,CA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