@firebase/firestore 4.4.0-canary.537d39982 → 4.4.0-canary.6ea51fbfa
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/dist/firestore/src/core/firestore_client.d.ts +1 -1
- package/dist/firestore/src/global_index.d.ts +1 -1
- package/dist/firestore/src/local/indexeddb_index_manager.d.ts +1 -2
- package/dist/firestore/src/local/local_serializer.d.ts +1 -2
- package/dist/index.cjs.js +20 -20
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +20 -20
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +41 -52
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +16 -19
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +16 -19
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +20 -20
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/lite/firestore/src/core/firestore_client.d.ts +1 -1
- package/dist/lite/firestore/src/local/indexeddb_index_manager.d.ts +1 -2
- package/dist/lite/firestore/src/local/local_serializer.d.ts +1 -2
- package/dist/lite/index.browser.esm2017.js +2 -2
- package/dist/lite/index.browser.esm5.js +2 -2
- package/dist/lite/index.cjs.js +2 -2
- package/dist/lite/index.node.cjs.js +2 -2
- package/dist/lite/index.node.mjs +2 -2
- package/dist/lite/index.rn.esm2017.js +2 -2
- package/dist/lite/packages/firestore/src/core/firestore_client.d.ts +1 -1
- package/dist/lite/packages/firestore/src/local/indexeddb_index_manager.d.ts +1 -2
- package/dist/lite/packages/firestore/src/local/local_serializer.d.ts +1 -2
- package/dist/packages/firestore/dist/index.esm2017.d.ts +0 -1
- package/dist/packages/firestore/src/core/firestore_client.d.ts +1 -1
- package/dist/packages/firestore/src/local/indexeddb_index_manager.d.ts +1 -2
- package/dist/packages/firestore/src/local/local_serializer.d.ts +1 -2
- package/dist/private.d.ts +1 -1
- package/package.json +9 -9
package/dist/index.esm2017.js
CHANGED
|
@@ -66,7 +66,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
66
66
|
* See the License for the specific language governing permissions and
|
|
67
67
|
* limitations under the License.
|
|
68
68
|
*/
|
|
69
|
-
let S = "10.7.1-canary.
|
|
69
|
+
let S = "10.7.1-canary.6ea51fbfa";
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* @license
|
|
@@ -2030,12 +2030,12 @@ class __PRIVATE_IndexBackfillerScheduler {
|
|
|
2030
2030
|
return null !== this.task;
|
|
2031
2031
|
}
|
|
2032
2032
|
ee(e) {
|
|
2033
|
-
__PRIVATE_logDebug("
|
|
2033
|
+
__PRIVATE_logDebug("IndexBackfiller", `Scheduled in ${e}ms`), this.task = this.asyncQueue.enqueueAfterDelay("index_backfill" /* TimerId.IndexBackfill */ , e, (async () => {
|
|
2034
2034
|
this.task = null;
|
|
2035
2035
|
try {
|
|
2036
|
-
__PRIVATE_logDebug("
|
|
2036
|
+
__PRIVATE_logDebug("IndexBackfiller", `Documents written: ${await this.X.te()}`);
|
|
2037
2037
|
} catch (e) {
|
|
2038
|
-
__PRIVATE_isIndexedDbTransactionError(e) ? __PRIVATE_logDebug("
|
|
2038
|
+
__PRIVATE_isIndexedDbTransactionError(e) ? __PRIVATE_logDebug("IndexBackfiller", "Ignoring IndexedDB error during index backfill: ", e) : await __PRIVATE_ignoreIfPrimaryLeaseLoss(e);
|
|
2039
2039
|
}
|
|
2040
2040
|
await this.ee(6e4);
|
|
2041
2041
|
}));
|
|
@@ -2061,7 +2061,7 @@ class __PRIVATE_IndexBackfillerScheduler {
|
|
|
2061
2061
|
const n = new Set;
|
|
2062
2062
|
let r = t, i = !0;
|
|
2063
2063
|
return PersistencePromise.doWhile((() => !0 === i && r > 0), (() => this.localStore.indexManager.getNextCollectionGroupToUpdate(e).next((t => {
|
|
2064
|
-
if (null !== t && !n.has(t)) return __PRIVATE_logDebug("
|
|
2064
|
+
if (null !== t && !n.has(t)) return __PRIVATE_logDebug("IndexBackfiller", `Processing collection: ${t}`),
|
|
2065
2065
|
this.re(e, t, r).next((e => {
|
|
2066
2066
|
r -= e, n.add(t);
|
|
2067
2067
|
}));
|
|
@@ -2074,7 +2074,7 @@ class __PRIVATE_IndexBackfillerScheduler {
|
|
|
2074
2074
|
// Use the earliest offset of all field indexes to query the local cache.
|
|
2075
2075
|
return this.localStore.indexManager.getMinOffsetFromCollectionGroup(e, t).next((r => this.localStore.localDocuments.getNextDocuments(e, t, r, n).next((n => {
|
|
2076
2076
|
const i = n.changes;
|
|
2077
|
-
return this.localStore.indexManager.updateIndexEntries(e, i).next((() => this.ie(r, n))).next((n => (__PRIVATE_logDebug("
|
|
2077
|
+
return this.localStore.indexManager.updateIndexEntries(e, i).next((() => this.ie(r, n))).next((n => (__PRIVATE_logDebug("IndexBackfiller", `Updating offset: ${n}`),
|
|
2078
2078
|
this.localStore.indexManager.updateCollectionGroup(e, t, n)))).next((() => i.size));
|
|
2079
2079
|
}))));
|
|
2080
2080
|
}
|
|
@@ -7373,7 +7373,7 @@ function __PRIVATE_toDbDocumentOverlayKey(e, t) {
|
|
|
7373
7373
|
function __PRIVATE_toDbIndexState(e, t, n, r) {
|
|
7374
7374
|
return {
|
|
7375
7375
|
indexId: e,
|
|
7376
|
-
uid: t
|
|
7376
|
+
uid: t,
|
|
7377
7377
|
sequenceNumber: n,
|
|
7378
7378
|
readTime: __PRIVATE_toDbTimestamp(r.readTime),
|
|
7379
7379
|
documentKey: __PRIVATE_encodeResourcePath(r.documentKey.path),
|
|
@@ -8378,7 +8378,7 @@ function __PRIVATE_applyDistributionFieldAndCompositeFilters(e, t) {
|
|
|
8378
8378
|
*/
|
|
8379
8379
|
class __PRIVATE_IndexedDbIndexManager {
|
|
8380
8380
|
constructor(e, t) {
|
|
8381
|
-
this.
|
|
8381
|
+
this.databaseId = t,
|
|
8382
8382
|
/**
|
|
8383
8383
|
* An in-memory copy of the index entries we've already written since the SDK
|
|
8384
8384
|
* launched. Used to avoid re-writing the same entry repeatedly.
|
|
@@ -8448,7 +8448,7 @@ class __PRIVATE_IndexedDbIndexManager {
|
|
|
8448
8448
|
if (t.indexState) {
|
|
8449
8449
|
const n = __PRIVATE_indexStateStore(e);
|
|
8450
8450
|
return i.next((e => {
|
|
8451
|
-
n.put(__PRIVATE_toDbIndexState(e, this.
|
|
8451
|
+
n.put(__PRIVATE_toDbIndexState(e, this.uid, t.indexState.sequenceNumber, t.indexState.offset));
|
|
8452
8452
|
}));
|
|
8453
8453
|
}
|
|
8454
8454
|
return i.next();
|
|
@@ -8730,7 +8730,7 @@ class __PRIVATE_IndexedDbIndexManager {
|
|
|
8730
8730
|
}
|
|
8731
8731
|
updateCollectionGroup(e, t, n) {
|
|
8732
8732
|
const r = __PRIVATE_indexConfigurationStore(e), i = __PRIVATE_indexStateStore(e);
|
|
8733
|
-
return this.gn(e).next((e => r.W("collectionGroupIndex", IDBKeyRange.bound(t, t)).next((t => PersistencePromise.forEach(t, (t => i.put(__PRIVATE_toDbIndexState(t.indexId, this.
|
|
8733
|
+
return this.gn(e).next((e => r.W("collectionGroupIndex", IDBKeyRange.bound(t, t)).next((t => PersistencePromise.forEach(t, (t => i.put(__PRIVATE_toDbIndexState(t.indexId, this.uid, e, n))))))));
|
|
8734
8734
|
}
|
|
8735
8735
|
updateIndexEntries(e, t) {
|
|
8736
8736
|
// Porting Note: `getFieldIndexes()` on Web does not cache index lookups as
|
|
@@ -16744,8 +16744,9 @@ class MemoryOfflineComponentProvider {
|
|
|
16744
16744
|
return new __PRIVATE_MemorySharedClientState;
|
|
16745
16745
|
}
|
|
16746
16746
|
async terminate() {
|
|
16747
|
-
|
|
16748
|
-
|
|
16747
|
+
var e, t;
|
|
16748
|
+
null === (e = this.gcScheduler) || void 0 === e || e.stop(), null === (t = this.indexBackfillerScheduler) || void 0 === t || t.stop(),
|
|
16749
|
+
this.sharedClientState.shutdown(), await this.persistence.shutdown();
|
|
16749
16750
|
}
|
|
16750
16751
|
}
|
|
16751
16752
|
|
|
@@ -16879,6 +16880,7 @@ class __PRIVATE_LruGcMemoryOfflineComponentProvider extends MemoryOfflineCompone
|
|
|
16879
16880
|
}(this.localStore, this.remoteStore, this.eventManager, this.sharedClientState, e.initialUser, e.maxConcurrentLimboResolutions, t);
|
|
16880
16881
|
}
|
|
16881
16882
|
async terminate() {
|
|
16883
|
+
var e;
|
|
16882
16884
|
await async function __PRIVATE_remoteStoreShutdown(e) {
|
|
16883
16885
|
const t = __PRIVATE_debugCast(e);
|
|
16884
16886
|
__PRIVATE_logDebug("RemoteStore", "RemoteStore shutting down."), t.v_.add(5 /* OfflineCause.Shutdown */),
|
|
@@ -16886,7 +16888,7 @@ class __PRIVATE_LruGcMemoryOfflineComponentProvider extends MemoryOfflineCompone
|
|
|
16886
16888
|
// Set the OnlineState to Unknown (rather than Offline) to avoid potentially
|
|
16887
16889
|
// triggering spurious listener events with cached data, etc.
|
|
16888
16890
|
t.x_.set("Unknown" /* OnlineState.Unknown */);
|
|
16889
|
-
}(this.remoteStore), this.datastore
|
|
16891
|
+
}(this.remoteStore), null === (e = this.datastore) || void 0 === e || e.terminate();
|
|
16890
16892
|
}
|
|
16891
16893
|
}
|
|
16892
16894
|
|
|
@@ -17376,7 +17378,7 @@ class FirestoreClient {
|
|
|
17376
17378
|
})), this.appCheckCredentials.start(n, (e => (__PRIVATE_logDebug("FirestoreClient", "Received new app check token=", e),
|
|
17377
17379
|
this.appCheckCredentialListener(e, this.user))));
|
|
17378
17380
|
}
|
|
17379
|
-
|
|
17381
|
+
get configuration() {
|
|
17380
17382
|
return {
|
|
17381
17383
|
asyncQueue: this.asyncQueue,
|
|
17382
17384
|
databaseInfo: this.databaseInfo,
|
|
@@ -17419,7 +17421,7 @@ class FirestoreClient {
|
|
|
17419
17421
|
|
|
17420
17422
|
async function __PRIVATE_setOfflineComponentProvider(e, t) {
|
|
17421
17423
|
e.asyncQueue.verifyOperationInProgress(), __PRIVATE_logDebug("FirestoreClient", "Initializing OfflineComponentProvider");
|
|
17422
|
-
const n =
|
|
17424
|
+
const n = e.configuration;
|
|
17423
17425
|
await t.initialize(n);
|
|
17424
17426
|
let r = n.initialUser;
|
|
17425
17427
|
e.setCredentialChangeListener((async e => {
|
|
@@ -17433,9 +17435,7 @@ async function __PRIVATE_setOfflineComponentProvider(e, t) {
|
|
|
17433
17435
|
async function __PRIVATE_setOnlineComponentProvider(e, t) {
|
|
17434
17436
|
e.asyncQueue.verifyOperationInProgress();
|
|
17435
17437
|
const n = await __PRIVATE_ensureOfflineComponents(e);
|
|
17436
|
-
__PRIVATE_logDebug("FirestoreClient", "Initializing OnlineComponentProvider")
|
|
17437
|
-
const r = await e.getConfiguration();
|
|
17438
|
-
await t.initialize(n, r),
|
|
17438
|
+
__PRIVATE_logDebug("FirestoreClient", "Initializing OnlineComponentProvider"), await t.initialize(n, e.configuration),
|
|
17439
17439
|
// The CredentialChangeListener of the online component provider takes
|
|
17440
17440
|
// precedence over the offline component provider.
|
|
17441
17441
|
e.setCredentialChangeListener((e => __PRIVATE_remoteStoreHandleCredentialChange(t.remoteStore, e))),
|
|
@@ -21815,9 +21815,9 @@ let Se = null;
|
|
|
21815
21815
|
return r = Object.assign({
|
|
21816
21816
|
useFetchStreams: t
|
|
21817
21817
|
}, r), s._setSettings(r), s;
|
|
21818
|
-
}), "PUBLIC").setMultipleInstances(!0)), registerVersion(w, "4.4.0-canary.
|
|
21818
|
+
}), "PUBLIC").setMultipleInstances(!0)), registerVersion(w, "4.4.0-canary.6ea51fbfa", e),
|
|
21819
21819
|
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
|
21820
|
-
registerVersion(w, "4.4.0-canary.
|
|
21820
|
+
registerVersion(w, "4.4.0-canary.6ea51fbfa", "esm2017");
|
|
21821
21821
|
}();
|
|
21822
21822
|
|
|
21823
21823
|
export { AbstractUserDataWriter, AggregateField, AggregateQuerySnapshot, Bytes, fe as CACHE_SIZE_UNLIMITED, CollectionReference, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Firestore, FirestoreError, GeoPoint, LoadBundleTask, PersistentCacheIndexManager, Query, QueryCompositeFilterConstraint, QueryConstraint, QueryDocumentSnapshot, QueryEndAtConstraint, QueryFieldFilterConstraint, QueryLimitConstraint, QueryOrderByConstraint, QuerySnapshot, QueryStartAtConstraint, SnapshotMetadata, Timestamp, Transaction, WriteBatch, __PRIVATE_AutoId as _AutoId, ByteString as _ByteString, DatabaseId as _DatabaseId, DocumentKey as _DocumentKey, __PRIVATE_EmptyAppCheckTokenProvider as _EmptyAppCheckTokenProvider, __PRIVATE_EmptyAuthCredentialsProvider as _EmptyAuthCredentialsProvider, FieldPath$1 as _FieldPath, TestingHooks as _TestingHooks, __PRIVATE_cast as _cast, __PRIVATE_debugAssert as _debugAssert, __PRIVATE_isBase64Available as _isBase64Available, __PRIVATE_logWarn as _logWarn, __PRIVATE_validateIsNotUsedTogether as _validateIsNotUsedTogether, addDoc, aggregateFieldEqual, aggregateQuerySnapshotEqual, and, arrayRemove, arrayUnion, average, clearIndexedDbPersistence, collection, collectionGroup, connectFirestoreEmulator, count, deleteAllPersistentCacheIndexes, deleteDoc, deleteField, disableNetwork, disablePersistentCacheIndexAutoCreation, doc, documentId, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, enableNetwork, enablePersistentCacheIndexAutoCreation, endAt, endBefore, ensureFirestoreConfigured, executeWrite, getAggregateFromServer, getCountFromServer, getDoc, getDocFromCache, getDocFromServer, getDocs, getDocsFromCache, getDocsFromServer, getFirestore, getPersistentCacheIndexManager, increment, initializeFirestore, limit, limitToLast, loadBundle, memoryEagerGarbageCollector, memoryLocalCache, memoryLruGarbageCollector, namedQuery, onSnapshot, onSnapshotsInSync, or, orderBy, persistentLocalCache, persistentMultipleTabManager, persistentSingleTabManager, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setIndexConfiguration, setLogLevel, snapshotEqual, startAfter, startAt, sum, terminate, updateDoc, waitForPendingWrites, where, writeBatch };
|