@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.esm2017.js
CHANGED
|
@@ -66,7 +66,7 @@ P.MOCK_USER = new P("mock-user");
|
|
|
66
66
|
* See the License for the specific language governing permissions and
|
|
67
67
|
* limitations under the License.
|
|
68
68
|
*/
|
|
69
|
-
let v = "9.
|
|
69
|
+
let v = "9.17.0-20230201003102";
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* @license
|
|
@@ -9554,15 +9554,17 @@ function uo(t, e) {
|
|
|
9554
9554
|
for (;o; ) n(o, null), o = r.hasNext() ? r.getNext() : null;
|
|
9555
9555
|
}));
|
|
9556
9556
|
}
|
|
9557
|
-
|
|
9558
|
-
const
|
|
9559
|
-
return _o(t).W(IDBKeyRange.bound(
|
|
9560
|
-
let
|
|
9561
|
-
for (const
|
|
9562
|
-
const t = this.jn(ct.fromSegments(
|
|
9563
|
-
e
|
|
9557
|
+
getDocumentsMatchingQuery(t, e, n, s) {
|
|
9558
|
+
const i = e.path, r = [ i.popLast().toArray(), i.lastSegment(), Xi(n.readTime), n.documentKey.path.isEmpty() ? "" : n.documentKey.path.lastSegment() ], o = [ i.popLast().toArray(), i.lastSegment(), [ Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER ], "" ];
|
|
9559
|
+
return _o(t).W(IDBKeyRange.bound(r, o, !0)).next((t => {
|
|
9560
|
+
let n = ds();
|
|
9561
|
+
for (const i of t) {
|
|
9562
|
+
const t = this.jn(ct.fromSegments(i.prefixPath.concat(i.collectionGroup, i.documentId)), i);
|
|
9563
|
+
t.isFoundDocument() && (An(e, t) || s.has(t.key)) && (
|
|
9564
|
+
// Either the document matches the given query, or it is mutated.
|
|
9565
|
+
n = n.insert(t.key, t));
|
|
9564
9566
|
}
|
|
9565
|
-
return
|
|
9567
|
+
return n;
|
|
9566
9568
|
}));
|
|
9567
9569
|
}
|
|
9568
9570
|
getAllFromCollectionGroup(t, e, n, s) {
|
|
@@ -10010,21 +10012,21 @@ class yo {
|
|
|
10010
10012
|
getDocumentsMatchingCollectionQuery(t, e, n) {
|
|
10011
10013
|
// Query the remote documents and overlay mutations.
|
|
10012
10014
|
let s;
|
|
10013
|
-
return this.
|
|
10014
|
-
this.
|
|
10015
|
+
return this.documentOverlayCache.getOverlaysForCollection(t, e.path, n.largestBatchId).next((i => (s = i,
|
|
10016
|
+
this.remoteDocumentCache.getDocumentsMatchingQuery(t, e, n, s)))).next((t => {
|
|
10015
10017
|
// As documents might match the query because of their overlay we need to
|
|
10016
10018
|
// include documents for all overlays in the initial document set.
|
|
10017
|
-
|
|
10018
|
-
const
|
|
10019
|
-
null ===
|
|
10019
|
+
s.forEach(((e, n) => {
|
|
10020
|
+
const s = n.getKey();
|
|
10021
|
+
null === t.get(s) && (t = t.insert(s, Ze.newInvalidDocument(s)));
|
|
10020
10022
|
}));
|
|
10021
10023
|
// Apply the overlays and match against the query.
|
|
10022
10024
|
let n = ws();
|
|
10023
|
-
return
|
|
10024
|
-
const r =
|
|
10025
|
+
return t.forEach(((t, i) => {
|
|
10026
|
+
const r = s.get(t);
|
|
10025
10027
|
void 0 !== r && Jn(r.mutation, i, Je.empty(), nt.now()),
|
|
10026
10028
|
// Finally, insert the documents that still match the query
|
|
10027
|
-
An(e, i) && (n = n.insert(
|
|
10029
|
+
An(e, i) && (n = n.insert(t, i));
|
|
10028
10030
|
})), n;
|
|
10029
10031
|
}));
|
|
10030
10032
|
}
|
|
@@ -10485,17 +10487,17 @@ class bo {
|
|
|
10485
10487
|
n = n.insert(t, e ? e.document.mutableCopy() : Ze.newInvalidDocument(t));
|
|
10486
10488
|
})), At.resolve(n);
|
|
10487
10489
|
}
|
|
10488
|
-
|
|
10489
|
-
let
|
|
10490
|
+
getDocumentsMatchingQuery(t, e, n, s) {
|
|
10491
|
+
let i = ds();
|
|
10490
10492
|
// Documents are ordered by key, so we can use a prefix scan to narrow down
|
|
10491
10493
|
// the documents we need to match the query against.
|
|
10492
|
-
const
|
|
10493
|
-
for (;
|
|
10494
|
-
const {key: t, value: {document:
|
|
10495
|
-
if (!
|
|
10496
|
-
t.path.length >
|
|
10494
|
+
const r = e.path, o = new ct(r.child("")), u = this.docs.getIteratorFrom(o);
|
|
10495
|
+
for (;u.hasNext(); ) {
|
|
10496
|
+
const {key: t, value: {document: o}} = u.getNext();
|
|
10497
|
+
if (!r.isPrefixOf(t.path)) break;
|
|
10498
|
+
t.path.length > r.length + 1 || (pt(gt(o), n) <= 0 || (s.has(o.key) || An(e, o)) && (i = i.insert(o.key, o.mutableCopy())));
|
|
10497
10499
|
}
|
|
10498
|
-
return At.resolve(
|
|
10500
|
+
return At.resolve(i);
|
|
10499
10501
|
}
|
|
10500
10502
|
getAllFromCollectionGroup(t, e, n, s) {
|
|
10501
10503
|
// This method should only be called from the IndexBackfiller if persistence
|
|
@@ -20528,9 +20530,9 @@ function lf(t, e) {
|
|
|
20528
20530
|
return s = Object.assign({
|
|
20529
20531
|
useFetchStreams: e
|
|
20530
20532
|
}, s), r._setSettings(s), r;
|
|
20531
|
-
}), "PUBLIC").setMultipleInstances(!0)), registerVersion(b, "3.8.
|
|
20533
|
+
}), "PUBLIC").setMultipleInstances(!0)), registerVersion(b, "3.8.2-20230201003102", t),
|
|
20532
20534
|
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
|
20533
|
-
registerVersion(b, "3.8.
|
|
20535
|
+
registerVersion(b, "3.8.2-20230201003102", "esm2017");
|
|
20534
20536
|
}();
|
|
20535
20537
|
|
|
20536
20538
|
export { Pl as AbstractUserDataWriter, Sa as AggregateField, Da as AggregateQuerySnapshot, Ih as Bytes, sh as CACHE_SIZE_UNLIMITED, Ia as CollectionReference, ya as DocumentReference, Dl as DocumentSnapshot, Th as FieldPath, Ah as FieldValue, ih as Firestore, L as FirestoreError, Rh as GeoPoint, nh as LoadBundleTask, pa as Query, ol as QueryCompositeFilterConstraint, nl as QueryConstraint, Cl as QueryDocumentSnapshot, gl as QueryEndAtConstraint, il as QueryFieldFilterConstraint, ll as QueryLimitConstraint, al as QueryOrderByConstraint, xl as QuerySnapshot, _l as QueryStartAtConstraint, Sl as SnapshotMetadata, nt as Timestamp, ef as Transaction, Zl as WriteBatch, Ft as _DatabaseId, ct as _DocumentKey, J as _EmptyAppCheckTokenProvider, K as _EmptyAuthCredentialsProvider, ut as _FieldPath, fa as _cast, F as _debugAssert, Gt as _isBase64Available, N as _logWarn, ca as _validateIsNotUsedTogether, Ql as addDoc, Jl as aggregateQuerySnapshotEqual, cl as and, uf as arrayRemove, of as arrayUnion, fh as clearIndexedDbPersistence, Ta as collection, Ea as collectionGroup, ga as connectFirestoreEmulator, Gl as deleteDoc, sf as deleteField, wh as disableNetwork, Aa as doc, Eh as documentId, ah as enableIndexedDbPersistence, hh as enableMultiTabIndexedDbPersistence, _h as enableNetwork, pl as endAt, yl as endBefore, uh as ensureFirestoreConfigured, zl as executeWrite, Yl as getCountFromServer, Ol as getDoc, Fl as getDocFromCache, $l as getDocFromServer, Bl as getDocs, Ll as getDocsFromCache, ql as getDocsFromServer, oh as getFirestore, cf as increment, rh as initializeFirestore, fl as limit, dl as limitToLast, gh as loadBundle, yh as namedQuery, jl as onSnapshot, Wl as onSnapshotsInSync, ul as or, hl as orderBy, sl as query, ba as queryEqual, Ra as refEqual, nf as runTransaction, rf as serverTimestamp, Ul as setDoc, hf as setIndexConfiguration, D as setLogLevel, kl as snapshotEqual, ml as startAfter, wl as startAt, mh as terminate, Kl as updateDoc, dh as waitForPendingWrites, rl as where, af as writeBatch };
|