@umituz/react-native-firebase 3.0.8 → 3.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-firebase",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.10",
|
|
4
4
|
"description": "Unified Firebase package for React Native apps - Auth and Firestore services using Firebase JS SDK (no native modules).",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
package/src/domains/firestore/infrastructure/config/initializers/FirebaseFirestoreInitializer.ts
CHANGED
|
@@ -68,11 +68,13 @@ const Platform = {
|
|
|
68
68
|
function createPersistentCacheConfig(config: Required<FirestoreCacheConfig>): FirestoreSettings {
|
|
69
69
|
try {
|
|
70
70
|
// Create persistent cache with IndexedDB
|
|
71
|
-
|
|
71
|
+
// Note: cacheSizeBytes is deprecated, must be specified in cache object
|
|
72
|
+
const cacheConfig = persistentLocalCache({
|
|
73
|
+
cacheSizeBytes: config.cacheSizeBytes,
|
|
74
|
+
});
|
|
72
75
|
|
|
73
76
|
return {
|
|
74
77
|
localCache: cacheConfig,
|
|
75
|
-
cacheSizeBytes: config.cacheSizeBytes,
|
|
76
78
|
};
|
|
77
79
|
} catch (error) {
|
|
78
80
|
// If persistent cache fails, fall back to memory cache
|
|
@@ -88,12 +90,13 @@ function createPersistentCacheConfig(config: Required<FirestoreCacheConfig>): Fi
|
|
|
88
90
|
* Uses memory cache for platforms without IndexedDB support
|
|
89
91
|
*/
|
|
90
92
|
function createMemoryCacheConfig(config: Required<FirestoreCacheConfig>): FirestoreSettings {
|
|
91
|
-
// Memory cache
|
|
92
|
-
const cacheConfig = memoryLocalCache(
|
|
93
|
+
// Memory cache with cacheSizeBytes specified in cache object
|
|
94
|
+
const cacheConfig = memoryLocalCache({
|
|
95
|
+
cacheSizeBytes: config.cacheSizeBytes,
|
|
96
|
+
});
|
|
93
97
|
|
|
94
98
|
return {
|
|
95
99
|
localCache: cacheConfig,
|
|
96
|
-
cacheSizeBytes: config.cacheSizeBytes,
|
|
97
100
|
};
|
|
98
101
|
}
|
|
99
102
|
|