@expo/entity-secondary-cache-local-memory 0.60.0 → 0.62.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/src/LocalMemorySecondaryEntityCache.d.ts +3 -2
- package/build/src/LocalMemorySecondaryEntityCache.js +4 -9
- package/build/src/index.d.ts +1 -1
- package/build/src/index.js +1 -18
- package/package.json +8 -7
- package/src/LocalMemorySecondaryEntityCache.ts +4 -5
- package/src/__tests__/LocalMemorySecondaryEntityCache-test.ts +10 -8
- package/src/index.ts +1 -1
- package/build/src/LocalMemorySecondaryEntityCache.js.map +0 -1
- package/build/src/index.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { EntityConfiguration
|
|
2
|
-
import {
|
|
1
|
+
import type { EntityConfiguration } from '@expo/entity';
|
|
2
|
+
import { GenericSecondaryEntityCache } from '@expo/entity';
|
|
3
|
+
import type { ILocalMemoryCache } from '@expo/entity-cache-adapter-local-memory';
|
|
3
4
|
/**
|
|
4
5
|
* A local memory GenericSecondaryEntityCache.
|
|
5
6
|
*
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.LocalMemorySecondaryEntityCache = void 0;
|
|
4
|
-
const entity_1 = require("@expo/entity");
|
|
5
|
-
const entity_cache_adapter_local_memory_1 = require("@expo/entity-cache-adapter-local-memory");
|
|
1
|
+
import { GenericSecondaryEntityCache } from '@expo/entity';
|
|
2
|
+
import { GenericLocalMemoryCacher } from '@expo/entity-cache-adapter-local-memory';
|
|
6
3
|
/**
|
|
7
4
|
* A local memory GenericSecondaryEntityCache.
|
|
8
5
|
*
|
|
@@ -10,10 +7,8 @@ const entity_cache_adapter_local_memory_1 = require("@expo/entity-cache-adapter-
|
|
|
10
7
|
*
|
|
11
8
|
* TLoadParams must be JSON stringifyable.
|
|
12
9
|
*/
|
|
13
|
-
class LocalMemorySecondaryEntityCache extends
|
|
10
|
+
export class LocalMemorySecondaryEntityCache extends GenericSecondaryEntityCache {
|
|
14
11
|
constructor(entityConfiguration, localMemoryCache) {
|
|
15
|
-
super(new
|
|
12
|
+
super(new GenericLocalMemoryCacher(entityConfiguration, localMemoryCache), (params) => JSON.stringify(params));
|
|
16
13
|
}
|
|
17
14
|
}
|
|
18
|
-
exports.LocalMemorySecondaryEntityCache = LocalMemorySecondaryEntityCache;
|
|
19
|
-
//# sourceMappingURL=LocalMemorySecondaryEntityCache.js.map
|
package/build/src/index.d.ts
CHANGED
package/build/src/index.js
CHANGED
|
@@ -1,23 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/* eslint-disable tsdoc/syntax */
|
|
3
2
|
/**
|
|
4
3
|
* @packageDocumentation
|
|
5
4
|
* @module @expo/entity-secondary-cache-local-memory
|
|
6
5
|
*/
|
|
7
|
-
|
|
8
|
-
if (k2 === undefined) k2 = k;
|
|
9
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
-
}
|
|
13
|
-
Object.defineProperty(o, k2, desc);
|
|
14
|
-
}) : (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
o[k2] = m[k];
|
|
17
|
-
}));
|
|
18
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
__exportStar(require("./LocalMemorySecondaryEntityCache"), exports);
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
6
|
+
export * from "./LocalMemorySecondaryEntityCache.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/entity-secondary-cache-local-memory",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.62.0",
|
|
4
4
|
"description": "Local memory secondary cache for @expo/entity",
|
|
5
5
|
"files": [
|
|
6
6
|
"build",
|
|
@@ -20,22 +20,23 @@
|
|
|
20
20
|
"integration": "yarn integration:all --rootDir $(pwd)"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": ">=
|
|
23
|
+
"node": ">=18"
|
|
24
24
|
},
|
|
25
25
|
"keywords": [
|
|
26
26
|
"entity"
|
|
27
27
|
],
|
|
28
28
|
"author": "Expo",
|
|
29
29
|
"license": "MIT",
|
|
30
|
+
"type": "module",
|
|
30
31
|
"dependencies": {
|
|
31
|
-
"@expo/entity": "^0.
|
|
32
|
-
"@expo/entity-cache-adapter-local-memory": "^0.
|
|
32
|
+
"@expo/entity": "^0.62.0",
|
|
33
|
+
"@expo/entity-cache-adapter-local-memory": "^0.62.0"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
36
|
+
"@expo/nullthrows": "2.1.0",
|
|
35
37
|
"@isaacs/ttlcache": "2.1.4",
|
|
36
|
-
"@jest/globals": "30.
|
|
37
|
-
"nullthrows": "1.1.1",
|
|
38
|
+
"@jest/globals": "30.3.0",
|
|
38
39
|
"typescript": "5.9.3"
|
|
39
40
|
},
|
|
40
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "4965cc238882982e6315beca48a68679ed45456b"
|
|
41
42
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { EntityConfiguration
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from '@expo/entity-cache-adapter-local-memory';
|
|
1
|
+
import type { EntityConfiguration } from '@expo/entity';
|
|
2
|
+
import { GenericSecondaryEntityCache } from '@expo/entity';
|
|
3
|
+
import type { ILocalMemoryCache } from '@expo/entity-cache-adapter-local-memory';
|
|
4
|
+
import { GenericLocalMemoryCacher } from '@expo/entity-cache-adapter-local-memory';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* A local memory GenericSecondaryEntityCache.
|
|
@@ -1,31 +1,33 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AuthorizationResultBasedEntityLoader,
|
|
3
|
+
EntityCompanionDefinition,
|
|
4
|
+
EntityConstructionUtils,
|
|
5
|
+
IEntityMetricsAdapter,
|
|
6
|
+
} from '@expo/entity';
|
|
1
7
|
import {
|
|
2
8
|
AlwaysAllowPrivacyPolicyRule,
|
|
3
|
-
AuthorizationResultBasedEntityLoader,
|
|
4
9
|
Entity,
|
|
5
|
-
EntityCompanionDefinition,
|
|
6
10
|
EntityCompanionProvider,
|
|
7
11
|
EntityConfiguration,
|
|
8
|
-
EntityConstructionUtils,
|
|
9
12
|
EntityPrivacyPolicy,
|
|
10
13
|
EntitySecondaryCacheLoader,
|
|
11
|
-
IEntityMetricsAdapter,
|
|
12
14
|
mapMapAsync,
|
|
13
15
|
NoOpEntityMetricsAdapter,
|
|
14
16
|
StringField,
|
|
15
17
|
UUIDField,
|
|
16
18
|
ViewerContext,
|
|
17
19
|
} from '@expo/entity';
|
|
18
|
-
import {
|
|
20
|
+
import type {
|
|
19
21
|
ILocalMemoryCache,
|
|
20
|
-
LocalMemoryCacheAdapterProvider,
|
|
21
22
|
LocalMemoryCacheValue,
|
|
22
23
|
} from '@expo/entity-cache-adapter-local-memory';
|
|
24
|
+
import { LocalMemoryCacheAdapterProvider } from '@expo/entity-cache-adapter-local-memory';
|
|
23
25
|
import { StubDatabaseAdapterProvider, StubQueryContextProvider } from '@expo/entity-testing-utils';
|
|
26
|
+
import nullthrows from '@expo/nullthrows';
|
|
24
27
|
import { TTLCache } from '@isaacs/ttlcache';
|
|
25
28
|
import { describe, expect, it } from '@jest/globals';
|
|
26
|
-
import nullthrows from 'nullthrows';
|
|
27
29
|
|
|
28
|
-
import { LocalMemorySecondaryEntityCache } from '../LocalMemorySecondaryEntityCache';
|
|
30
|
+
import { LocalMemorySecondaryEntityCache } from '../LocalMemorySecondaryEntityCache.ts';
|
|
29
31
|
|
|
30
32
|
export type LocalMemoryTestEntityFields = {
|
|
31
33
|
id: string;
|
package/src/index.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LocalMemorySecondaryEntityCache.js","sourceRoot":"","sources":["../../src/LocalMemorySecondaryEntityCache.ts"],"names":[],"mappings":";;;AAAA,yCAAgF;AAChF,+FAGiD;AAEjD;;;;;;GAMG;AACH,MAAa,+BAIX,SAAQ,oCAA2D;IACnE,YACE,mBAA2D,EAC3D,gBAA4C;QAE5C,KAAK,CAAC,IAAI,4DAAwB,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CACpF,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CACvB,CAAC;IACJ,CAAC;CACF;AAbD,0EAaC"}
|
package/build/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,iCAAiC;AACjC;;;GAGG;;;;;;;;;;;;;;;;AAEH,oEAAkD"}
|