@firebase/firestore 3.8.1 → 3.8.2-20230201003102
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/CHANGELOG.md +13 -0
- package/dist/firestore/src/local/remote_document_cache.d.ts +5 -5
- package/dist/firestore/test/unit/local/test_remote_document_cache.d.ts +3 -3
- package/dist/index.cjs.js +20635 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.esm2017.js +29 -27
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +140 -138
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +22 -12
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +22 -12
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +29 -27
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +3 -3
- package/dist/lite/firestore/src/local/remote_document_cache.d.ts +5 -5
- package/dist/lite/firestore/test/unit/local/test_remote_document_cache.d.ts +3 -3
- package/dist/lite/index.browser.esm2017.js +2 -2
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +2 -2
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.cjs.js +6954 -0
- package/dist/lite/index.cjs.js.map +1 -0
- package/dist/lite/index.node.cjs.js +2 -2
- package/dist/lite/index.node.mjs +2 -2
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +2 -2
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/packages/firestore/src/local/remote_document_cache.d.ts +5 -5
- package/dist/lite/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +3 -3
- package/dist/packages/firestore/src/local/remote_document_cache.d.ts +5 -5
- package/dist/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +3 -3
- package/dist/private.d.ts +3 -3
- package/package.json +17 -9
package/dist/index.rn.js
CHANGED
|
@@ -70,7 +70,7 @@ v.MOCK_USER = new v("mock-user");
|
|
|
70
70
|
* See the License for the specific language governing permissions and
|
|
71
71
|
* limitations under the License.
|
|
72
72
|
*/
|
|
73
|
-
let V = "9.
|
|
73
|
+
let V = "9.17.0-20230201003102";
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* @license
|
|
@@ -9571,15 +9571,17 @@ function ao(t, e) {
|
|
|
9571
9571
|
for (;o; ) n(o, null), o = r.hasNext() ? r.getNext() : null;
|
|
9572
9572
|
}));
|
|
9573
9573
|
}
|
|
9574
|
-
|
|
9575
|
-
const
|
|
9576
|
-
return mo(t).W(IDBKeyRange.bound(
|
|
9577
|
-
let
|
|
9578
|
-
for (const
|
|
9579
|
-
const t = this.jn(at.fromSegments(
|
|
9580
|
-
e
|
|
9574
|
+
getDocumentsMatchingQuery(t, e, n, s) {
|
|
9575
|
+
const i = e.path, r = [ i.popLast().toArray(), i.lastSegment(), tr(n.readTime), n.documentKey.path.isEmpty() ? "" : n.documentKey.path.lastSegment() ], o = [ i.popLast().toArray(), i.lastSegment(), [ Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER ], "" ];
|
|
9576
|
+
return mo(t).W(IDBKeyRange.bound(r, o, !0)).next((t => {
|
|
9577
|
+
let n = ws();
|
|
9578
|
+
for (const i of t) {
|
|
9579
|
+
const t = this.jn(at.fromSegments(i.prefixPath.concat(i.collectionGroup, i.documentId)), i);
|
|
9580
|
+
t.isFoundDocument() && (bn(e, t) || s.has(t.key)) && (
|
|
9581
|
+
// Either the document matches the given query, or it is mutated.
|
|
9582
|
+
n = n.insert(t.key, t));
|
|
9581
9583
|
}
|
|
9582
|
-
return
|
|
9584
|
+
return n;
|
|
9583
9585
|
}));
|
|
9584
9586
|
}
|
|
9585
9587
|
getAllFromCollectionGroup(t, e, n, s) {
|
|
@@ -10027,21 +10029,21 @@ class Io {
|
|
|
10027
10029
|
getDocumentsMatchingCollectionQuery(t, e, n) {
|
|
10028
10030
|
// Query the remote documents and overlay mutations.
|
|
10029
10031
|
let s;
|
|
10030
|
-
return this.
|
|
10031
|
-
this.
|
|
10032
|
+
return this.documentOverlayCache.getOverlaysForCollection(t, e.path, n.largestBatchId).next((i => (s = i,
|
|
10033
|
+
this.remoteDocumentCache.getDocumentsMatchingQuery(t, e, n, s)))).next((t => {
|
|
10032
10034
|
// As documents might match the query because of their overlay we need to
|
|
10033
10035
|
// include documents for all overlays in the initial document set.
|
|
10034
|
-
|
|
10035
|
-
const
|
|
10036
|
-
null ===
|
|
10036
|
+
s.forEach(((e, n) => {
|
|
10037
|
+
const s = n.getKey();
|
|
10038
|
+
null === t.get(s) && (t = t.insert(s, en.newInvalidDocument(s)));
|
|
10037
10039
|
}));
|
|
10038
10040
|
// Apply the overlays and match against the query.
|
|
10039
10041
|
let n = gs();
|
|
10040
|
-
return
|
|
10041
|
-
const r =
|
|
10042
|
+
return t.forEach(((t, i) => {
|
|
10043
|
+
const r = s.get(t);
|
|
10042
10044
|
void 0 !== r && Xn(r.mutation, i, Xe.empty(), st.now()),
|
|
10043
10045
|
// Finally, insert the documents that still match the query
|
|
10044
|
-
bn(e, i) && (n = n.insert(
|
|
10046
|
+
bn(e, i) && (n = n.insert(t, i));
|
|
10045
10047
|
})), n;
|
|
10046
10048
|
}));
|
|
10047
10049
|
}
|
|
@@ -10502,17 +10504,17 @@ class vo {
|
|
|
10502
10504
|
n = n.insert(t, e ? e.document.mutableCopy() : en.newInvalidDocument(t));
|
|
10503
10505
|
})), Rt.resolve(n);
|
|
10504
10506
|
}
|
|
10505
|
-
|
|
10506
|
-
let
|
|
10507
|
+
getDocumentsMatchingQuery(t, e, n, s) {
|
|
10508
|
+
let i = ws();
|
|
10507
10509
|
// Documents are ordered by key, so we can use a prefix scan to narrow down
|
|
10508
10510
|
// the documents we need to match the query against.
|
|
10509
|
-
const
|
|
10510
|
-
for (;
|
|
10511
|
-
const {key: t, value: {document:
|
|
10512
|
-
if (!
|
|
10513
|
-
t.path.length >
|
|
10511
|
+
const r = e.path, o = new at(r.child("")), u = this.docs.getIteratorFrom(o);
|
|
10512
|
+
for (;u.hasNext(); ) {
|
|
10513
|
+
const {key: t, value: {document: o}} = u.getNext();
|
|
10514
|
+
if (!r.isPrefixOf(t.path)) break;
|
|
10515
|
+
t.path.length > r.length + 1 || (It(yt(o), n) <= 0 || (s.has(o.key) || bn(e, o)) && (i = i.insert(o.key, o.mutableCopy())));
|
|
10514
10516
|
}
|
|
10515
|
-
return Rt.resolve(
|
|
10517
|
+
return Rt.resolve(i);
|
|
10516
10518
|
}
|
|
10517
10519
|
getAllFromCollectionGroup(t, e, n, s) {
|
|
10518
10520
|
// This method should only be called from the IndexBackfiller if persistence
|
|
@@ -20556,9 +20558,9 @@ function df(t, e) {
|
|
|
20556
20558
|
return s = Object.assign({
|
|
20557
20559
|
useFetchStreams: e
|
|
20558
20560
|
}, s), r._setSettings(s), r;
|
|
20559
|
-
}), "PUBLIC").setMultipleInstances(!0)), s(P, "3.8.
|
|
20561
|
+
}), "PUBLIC").setMultipleInstances(!0)), s(P, "3.8.2-20230201003102", t),
|
|
20560
20562
|
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
|
20561
|
-
s(P, "3.8.
|
|
20563
|
+
s(P, "3.8.2-20230201003102", "esm2017");
|
|
20562
20564
|
}("rn", /* useFetchStreams= */ !1);
|
|
20563
20565
|
|
|
20564
20566
|
export { Vl as AbstractUserDataWriter, Ca as AggregateField, xa as AggregateQuerySnapshot, Eh as Bytes, rh as CACHE_SIZE_UNLIMITED, Ea as CollectionReference, Ia as DocumentReference, xl as DocumentSnapshot, Ah as FieldPath, bh as FieldValue, oh as Firestore, q as FirestoreError, Ph as GeoPoint, ih as LoadBundleTask, Ta as Query, cl as QueryCompositeFilterConstraint, il as QueryConstraint, Nl as QueryDocumentSnapshot, pl as QueryEndAtConstraint, ol as QueryFieldFilterConstraint, dl as QueryLimitConstraint, ll as QueryOrderByConstraint, kl as QuerySnapshot, ml as QueryStartAtConstraint, Cl as SnapshotMetadata, st as Timestamp, sf as Transaction, ef as WriteBatch, $t as _DatabaseId, at as _DocumentKey, Y as _EmptyAppCheckTokenProvider, G as _EmptyAuthCredentialsProvider, ct as _FieldPath, _a as _cast, $ as _debugAssert, jt as _isBase64Available, k as _logWarn, ha as _validateIsNotUsedTogether, Wl as addDoc, Xl as aggregateQuerySnapshotEqual, hl as and, af as arrayRemove, cf as arrayUnion, _h as clearIndexedDbPersistence, Aa as collection, Ra as collectionGroup, pa as connectFirestoreEmulator, jl as deleteDoc, of as deleteField, gh as disableNetwork, ba as doc, Rh as documentId, lh as enableIndexedDbPersistence, fh as enableMultiTabIndexedDbPersistence, mh as enableNetwork, Tl as endAt, Il as endBefore, ah as ensureFirestoreConfigured, Jl as executeWrite, Zl as getCountFromServer, Fl as getDoc, Bl as getDocFromCache, Ll as getDocFromServer, ql as getDocs, Ul as getDocsFromCache, Kl as getDocsFromServer, ch as getFirestore, hf as increment, uh as initializeFirestore, _l as limit, wl as limitToLast, ph as loadBundle, Ih as namedQuery, zl as onSnapshot, Hl as onSnapshotsInSync, al as or, fl as orderBy, rl as query, va as queryEqual, Pa as refEqual, rf as runTransaction, uf as serverTimestamp, Gl as setDoc, ff as setIndexConfiguration, C as setLogLevel, Ml as snapshotEqual, yl as startAfter, gl as startAt, yh as terminate, Ql as updateDoc, wh as waitForPendingWrites, ul as where, lf as writeBatch };
|