@expo/entity 0.43.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/AuthorizationResultBasedEntityMutator.d.ts +87 -2
- package/build/AuthorizationResultBasedEntityMutator.js +122 -8
- package/build/AuthorizationResultBasedEntityMutator.js.map +1 -1
- package/build/EntityLoaderUtils.d.ts +15 -3
- package/build/EntityLoaderUtils.js +25 -10
- package/build/EntityLoaderUtils.js.map +1 -1
- package/build/EntityQueryContext.d.ts +53 -7
- package/build/EntityQueryContext.js +65 -10
- package/build/EntityQueryContext.js.map +1 -1
- package/build/EntityQueryContextProvider.d.ts +5 -1
- package/build/EntityQueryContextProvider.js +11 -4
- package/build/EntityQueryContextProvider.js.map +1 -1
- package/build/IEntityGenericCacher.d.ts +2 -2
- package/build/internal/CompositeFieldHolder.d.ts +13 -0
- package/build/internal/CompositeFieldHolder.js +7 -0
- package/build/internal/CompositeFieldHolder.js.map +1 -1
- package/build/internal/CompositeFieldValueMap.d.ts +3 -0
- package/build/internal/CompositeFieldValueMap.js +3 -0
- package/build/internal/CompositeFieldValueMap.js.map +1 -1
- package/build/internal/EntityDataManager.d.ts +22 -3
- package/build/internal/EntityDataManager.js +99 -11
- package/build/internal/EntityDataManager.js.map +1 -1
- package/build/internal/EntityFieldTransformationUtils.d.ts +20 -0
- package/build/internal/EntityFieldTransformationUtils.js +15 -0
- package/build/internal/EntityFieldTransformationUtils.js.map +1 -1
- package/build/internal/EntityLoadInterfaces.d.ts +8 -0
- package/build/internal/EntityLoadInterfaces.js +2 -0
- package/build/internal/EntityLoadInterfaces.js.map +1 -1
- package/build/internal/EntityTableDataCoordinator.d.ts +2 -0
- package/build/internal/EntityTableDataCoordinator.js +2 -0
- package/build/internal/EntityTableDataCoordinator.js.map +1 -1
- package/build/internal/ReadThroughEntityCache.d.ts +8 -0
- package/build/internal/ReadThroughEntityCache.js +5 -0
- package/build/internal/ReadThroughEntityCache.js.map +1 -1
- package/build/internal/SingleFieldHolder.d.ts +7 -0
- package/build/internal/SingleFieldHolder.js +7 -0
- package/build/internal/SingleFieldHolder.js.map +1 -1
- package/build/metrics/EntityMetricsUtils.d.ts +4 -3
- package/build/metrics/EntityMetricsUtils.js +6 -3
- package/build/metrics/EntityMetricsUtils.js.map +1 -1
- package/build/metrics/IEntityMetricsAdapter.d.ts +21 -0
- package/build/metrics/IEntityMetricsAdapter.js.map +1 -1
- package/package.json +13 -13
- package/src/AuthorizationResultBasedEntityMutator.ts +133 -15
- package/src/EntityLoaderUtils.ts +43 -12
- package/src/EntityQueryContext.ts +68 -13
- package/src/EntityQueryContextProvider.ts +20 -3
- package/src/IEntityGenericCacher.ts +2 -2
- package/src/__tests__/AuthorizationResultBasedEntityLoader-test.ts +98 -0
- package/src/__tests__/EntityQueryContext-test.ts +141 -26
- package/src/internal/CompositeFieldHolder.ts +15 -0
- package/src/internal/CompositeFieldValueMap.ts +3 -0
- package/src/internal/EntityDataManager.ts +170 -10
- package/src/internal/EntityFieldTransformationUtils.ts +20 -0
- package/src/internal/EntityLoadInterfaces.ts +8 -0
- package/src/internal/EntityTableDataCoordinator.ts +2 -0
- package/src/internal/ReadThroughEntityCache.ts +8 -0
- package/src/internal/SingleFieldHolder.ts +7 -0
- package/src/internal/__tests__/EntityDataManager-test.ts +708 -186
- package/src/metrics/EntityMetricsUtils.ts +7 -0
- package/src/metrics/IEntityMetricsAdapter.ts +27 -0
- package/src/utils/__testfixtures__/StubDatabaseAdapter.ts +13 -1
|
@@ -5,12 +5,18 @@ import IEntityCacheAdapter from '../IEntityCacheAdapter';
|
|
|
5
5
|
import { IEntityLoadKey, IEntityLoadValue } from './EntityLoadInterfaces';
|
|
6
6
|
import { filterMap } from '../utils/collections/maps';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
8
11
|
export enum CacheStatus {
|
|
9
12
|
HIT,
|
|
10
13
|
MISS,
|
|
11
14
|
NEGATIVE,
|
|
12
15
|
}
|
|
13
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
14
20
|
export type CacheLoadResult<TFields extends Record<string, any>> =
|
|
15
21
|
| {
|
|
16
22
|
status: CacheStatus.HIT;
|
|
@@ -26,6 +32,8 @@ export type CacheLoadResult<TFields extends Record<string, any>> =
|
|
|
26
32
|
/**
|
|
27
33
|
* A read-through entity cache is responsible for coordinating EntityDatabaseAdapter and
|
|
28
34
|
* EntityCacheAdapter within the EntityDataManager.
|
|
35
|
+
*
|
|
36
|
+
* @internal
|
|
29
37
|
*/
|
|
30
38
|
export default class ReadThroughEntityCache<
|
|
31
39
|
TFields extends Record<string, any>,
|
|
@@ -11,6 +11,8 @@ import {
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* A load key that represents a single field (fieldName) on an entity.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
14
16
|
*/
|
|
15
17
|
export class SingleFieldHolder<
|
|
16
18
|
TFields extends Record<string, any>,
|
|
@@ -97,6 +99,8 @@ export class SingleFieldHolder<
|
|
|
97
99
|
|
|
98
100
|
/**
|
|
99
101
|
* A load value for a SingleFieldHolder.
|
|
102
|
+
*
|
|
103
|
+
* @internal
|
|
100
104
|
*/
|
|
101
105
|
export class SingleFieldValueHolder<TFields extends Record<string, any>, N extends keyof TFields>
|
|
102
106
|
implements IEntityLoadValue<NonNullable<TFields[N]>>
|
|
@@ -118,6 +122,9 @@ export class SingleFieldValueHolder<TFields extends Record<string, any>, N exten
|
|
|
118
122
|
}
|
|
119
123
|
}
|
|
120
124
|
|
|
125
|
+
/**
|
|
126
|
+
* @internal
|
|
127
|
+
*/
|
|
121
128
|
export class SingleFieldValueHolderMap<
|
|
122
129
|
TFields extends Record<string, any>,
|
|
123
130
|
N extends keyof TFields,
|