@firebase/firestore 3.4.2-canary.ff2f7d4c8 → 3.4.3-2022013201330
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 +8 -0
- package/dist/index.esm2017.js +3 -3
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +3 -3
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +2 -2
- package/dist/index.node.mjs +2 -2
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +3 -3
- package/dist/index.rn.js.map +1 -1
- 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 +42 -42
- package/dist/lite/index.browser.esm5.js.map +1 -1
- 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/package.json +9 -9
|
@@ -4,7 +4,7 @@ import { SDK_VERSION as i, _registerComponent as o, registerVersion as a, _getPr
|
|
|
4
4
|
|
|
5
5
|
import { Component as c } from "@firebase/component";
|
|
6
6
|
|
|
7
|
-
import { Logger as
|
|
7
|
+
import { Logger as l, LogLevel as f } from "@firebase/logger";
|
|
8
8
|
|
|
9
9
|
import { FirebaseError as h, getModularInstance as p, createMockUserToken as d } from "@firebase/util";
|
|
10
10
|
|
|
@@ -67,7 +67,7 @@ m.MOCK_USER = new m("mock-user");
|
|
|
67
67
|
* See the License for the specific language governing permissions and
|
|
68
68
|
* limitations under the License.
|
|
69
69
|
*/
|
|
70
|
-
var y = "9.6.
|
|
70
|
+
var y = "9.6.3-2022013201330", v = new l("@firebase/firestore");
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* @license
|
|
@@ -104,7 +104,7 @@ function g(t) {
|
|
|
104
104
|
|
|
105
105
|
function w(t) {
|
|
106
106
|
for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
|
|
107
|
-
if (v.logLevel <=
|
|
107
|
+
if (v.logLevel <= f.DEBUG) {
|
|
108
108
|
var i = e.map(T);
|
|
109
109
|
v.debug.apply(v, r([ "Firestore (" + y + "): " + t ], i));
|
|
110
110
|
}
|
|
@@ -112,7 +112,7 @@ function w(t) {
|
|
|
112
112
|
|
|
113
113
|
function b(t) {
|
|
114
114
|
for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
|
|
115
|
-
if (v.logLevel <=
|
|
115
|
+
if (v.logLevel <= f.ERROR) {
|
|
116
116
|
var i = e.map(T);
|
|
117
117
|
v.error.apply(v, r([ "Firestore (" + y + "): " + t ], i));
|
|
118
118
|
}
|
|
@@ -122,7 +122,7 @@ function b(t) {
|
|
|
122
122
|
* @internal
|
|
123
123
|
*/ function _(t) {
|
|
124
124
|
for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
|
|
125
|
-
if (v.logLevel <=
|
|
125
|
+
if (v.logLevel <= f.WARN) {
|
|
126
126
|
var i = e.map(T);
|
|
127
127
|
v.warn.apply(v, r([ "Firestore (" + y + "): " + t ], i));
|
|
128
128
|
}
|
|
@@ -647,7 +647,7 @@ function ut(t, e) {
|
|
|
647
647
|
return null == t;
|
|
648
648
|
}
|
|
649
649
|
|
|
650
|
-
/** Returns whether the value represents -0. */ function
|
|
650
|
+
/** Returns whether the value represents -0. */ function lt(t) {
|
|
651
651
|
// Detect if the value is -0.0. Based on polyfill from
|
|
652
652
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
653
653
|
return 0 === t && 1 / t == -1 / 0;
|
|
@@ -672,7 +672,7 @@ function ut(t, e) {
|
|
|
672
672
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
673
673
|
* See the License for the specific language governing permissions and
|
|
674
674
|
* limitations under the License.
|
|
675
|
-
*/ var
|
|
675
|
+
*/ var ft, ht, pt = {
|
|
676
676
|
BatchGetDocuments: "batchGet",
|
|
677
677
|
Commit: "commit",
|
|
678
678
|
RunQuery: "runQuery"
|
|
@@ -808,7 +808,7 @@ function dt(t) {
|
|
|
808
808
|
/**
|
|
809
809
|
* A Rest-based connection that relies on the native HTTP stack
|
|
810
810
|
* (e.g. `fetch` or a polyfill).
|
|
811
|
-
*/ (ht =
|
|
811
|
+
*/ (ht = ft || (ft = {}))[ht.OK = 0] = "OK", ht[ht.CANCELLED = 1] = "CANCELLED",
|
|
812
812
|
ht[ht.UNKNOWN = 2] = "UNKNOWN", ht[ht.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT",
|
|
813
813
|
ht[ht.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", ht[ht.NOT_FOUND = 5] = "NOT_FOUND",
|
|
814
814
|
ht[ht.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", ht[ht.PERMISSION_DENIED = 7] = "PERMISSION_DENIED",
|
|
@@ -1504,7 +1504,7 @@ var At = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
|
1504
1504
|
if ("integerValue" in t && "integerValue" in e) return Vt(t.integerValue) === Vt(e.integerValue);
|
|
1505
1505
|
if ("doubleValue" in t && "doubleValue" in e) {
|
|
1506
1506
|
var n = Vt(t.doubleValue), r = Vt(e.doubleValue);
|
|
1507
|
-
return n === r ?
|
|
1507
|
+
return n === r ? lt(n) === lt(r) : isNaN(n) && isNaN(r);
|
|
1508
1508
|
}
|
|
1509
1509
|
return !1;
|
|
1510
1510
|
}(t, e);
|
|
@@ -2099,7 +2099,7 @@ function ce(t) {
|
|
|
2099
2099
|
return t.explicitOrderBy.length > 0 ? t.explicitOrderBy[0].field : null;
|
|
2100
2100
|
}
|
|
2101
2101
|
|
|
2102
|
-
function
|
|
2102
|
+
function le(t) {
|
|
2103
2103
|
for (var e = 0, n = t.filters; e < n.length; e++) {
|
|
2104
2104
|
var r = n[e];
|
|
2105
2105
|
if (r.N()) return r.field;
|
|
@@ -2114,7 +2114,7 @@ function fe(t) {
|
|
|
2114
2114
|
/**
|
|
2115
2115
|
* Returns whether the query matches a collection group rather than a specific
|
|
2116
2116
|
* collection.
|
|
2117
|
-
*/ function
|
|
2117
|
+
*/ function fe(t) {
|
|
2118
2118
|
return null !== t.collectionGroup;
|
|
2119
2119
|
}
|
|
2120
2120
|
|
|
@@ -2126,7 +2126,7 @@ function fe(t) {
|
|
|
2126
2126
|
var e = I(t);
|
|
2127
2127
|
if (null === e.$) {
|
|
2128
2128
|
e.$ = [];
|
|
2129
|
-
var n =
|
|
2129
|
+
var n = le(e), r = ce(e);
|
|
2130
2130
|
if (null !== n && null === r)
|
|
2131
2131
|
// In order to implicitly add key ordering, we must also add the
|
|
2132
2132
|
// inequality filter field for it to be a valid query.
|
|
@@ -2193,7 +2193,7 @@ function fe(t) {
|
|
|
2193
2193
|
*/
|
|
2194
2194
|
function de(t, e) {
|
|
2195
2195
|
return function(t) {
|
|
2196
|
-
return "number" == typeof t && Number.isInteger(t) && !
|
|
2196
|
+
return "number" == typeof t && Number.isInteger(t) && !lt(t) && t <= Number.MAX_SAFE_INTEGER && t >= Number.MIN_SAFE_INTEGER;
|
|
2197
2197
|
}(e) ?
|
|
2198
2198
|
/**
|
|
2199
2199
|
* Returns an IntegerValue for `value`.
|
|
@@ -2215,7 +2215,7 @@ function de(t, e) {
|
|
|
2215
2215
|
};
|
|
2216
2216
|
}
|
|
2217
2217
|
return {
|
|
2218
|
-
doubleValue:
|
|
2218
|
+
doubleValue: lt(e) ? "-0" : e
|
|
2219
2219
|
};
|
|
2220
2220
|
}(t, e);
|
|
2221
2221
|
}
|
|
@@ -3243,7 +3243,7 @@ var sn = /** @class */ function() {
|
|
|
3243
3243
|
/**
|
|
3244
3244
|
* A `Query` refers to a query which you can read or listen to. You can also
|
|
3245
3245
|
* construct refined `Query` objects by adding filters and ordering.
|
|
3246
|
-
*/ function
|
|
3246
|
+
*/ function ln(t, e) {
|
|
3247
3247
|
for (var n = [], i = 2; i < arguments.length; i++) n[i - 2] = arguments[i];
|
|
3248
3248
|
if (t = p(t), rt("collection", "path", e), t instanceof en) {
|
|
3249
3249
|
var o = Z.fromString.apply(Z, r([ e ], n));
|
|
@@ -3267,7 +3267,7 @@ var sn = /** @class */ function() {
|
|
|
3267
3267
|
* collection or subcollection with this ID as the last segment of its path
|
|
3268
3268
|
* will be included. Cannot contain a slash.
|
|
3269
3269
|
* @returns The created `Query`.
|
|
3270
|
-
*/ function
|
|
3270
|
+
*/ function fn(t, e) {
|
|
3271
3271
|
if (t = st(t, en), rt("collectionGroup", "collection id", e), e.indexOf("/") >= 0) throw new U(V, "Invalid collection ID '" + e + "' passed to function collectionGroup(). Collection IDs must not contain '/'.");
|
|
3272
3272
|
return new un(t,
|
|
3273
3273
|
/* converter= */ null,
|
|
@@ -3681,12 +3681,12 @@ function(t) {
|
|
|
3681
3681
|
Un("Data must be an object, but it was:", a, r);
|
|
3682
3682
|
var s, u, c = Rn(r, a);
|
|
3683
3683
|
if (o.merge) s = new Et(a.fieldMask), u = a.fieldTransforms; else if (o.mergeFields) {
|
|
3684
|
-
for (var
|
|
3685
|
-
var p = xn(e, h[
|
|
3684
|
+
for (var l = [], f = 0, h = o.mergeFields; f < h.length; f++) {
|
|
3685
|
+
var p = xn(e, h[f], n);
|
|
3686
3686
|
if (!a.contains(p)) throw new U(V, "Field '" + p + "' is specified in your field mask but missing from your input data.");
|
|
3687
|
-
Qn(
|
|
3687
|
+
Qn(l, p) || l.push(p);
|
|
3688
3688
|
}
|
|
3689
|
-
s = new Et(
|
|
3689
|
+
s = new Et(l), u = a.fieldTransforms.filter((function(t) {
|
|
3690
3690
|
return s.covers(t.field);
|
|
3691
3691
|
}));
|
|
3692
3692
|
} else s = null, u = a.fieldTransforms;
|
|
@@ -3811,7 +3811,7 @@ var Nn = /** @class */ function(e) {
|
|
|
3811
3811
|
for (var c = 0; c < o.length; c += 2) s.push(xn(e, o[c])), u.push(o[c + 1]);
|
|
3812
3812
|
// We iterate in reverse order to pick the last value for a field if the
|
|
3813
3813
|
// user specified the field multiple times.
|
|
3814
|
-
for (var
|
|
3814
|
+
for (var l = [], f = zt.empty(), h = s.length - 1; h >= 0; --h) if (!Qn(l, s[h])) {
|
|
3815
3815
|
var d = s[h], m = u[h];
|
|
3816
3816
|
// For Compat types, we have to "extract" the underlying types before
|
|
3817
3817
|
// performing validation.
|
|
@@ -3819,13 +3819,13 @@ var Nn = /** @class */ function(e) {
|
|
|
3819
3819
|
var y = a.it(d);
|
|
3820
3820
|
if (m instanceof Vn)
|
|
3821
3821
|
// Add it to the field mask, but don't add anything to updateData.
|
|
3822
|
-
|
|
3822
|
+
l.push(d); else {
|
|
3823
3823
|
var v = Ln(m, y);
|
|
3824
|
-
null != v && (
|
|
3824
|
+
null != v && (l.push(d), f.set(d, v));
|
|
3825
3825
|
}
|
|
3826
3826
|
}
|
|
3827
|
-
var g = new Et(
|
|
3828
|
-
return new Tn(
|
|
3827
|
+
var g = new Et(l);
|
|
3828
|
+
return new Tn(f, g, a.fieldTransforms);
|
|
3829
3829
|
}
|
|
3830
3830
|
|
|
3831
3831
|
/**
|
|
@@ -4257,9 +4257,9 @@ var Zn = /** @class */ function(e) {
|
|
|
4257
4257
|
if ("array-contains" /* ARRAY_CONTAINS */ === o || "array-contains-any" /* ARRAY_CONTAINS_ANY */ === o) throw new U(V, "Invalid Query. You can't perform '" + o + "' queries on documentId().");
|
|
4258
4258
|
if ("in" /* IN */ === o || "not-in" /* NOT_IN */ === o) {
|
|
4259
4259
|
dr(a, o);
|
|
4260
|
-
for (var u = [], c = 0,
|
|
4261
|
-
var
|
|
4262
|
-
u.push(pr(r, t,
|
|
4260
|
+
for (var u = [], c = 0, l = a; c < l.length; c++) {
|
|
4261
|
+
var f = l[c];
|
|
4262
|
+
u.push(pr(r, t, f));
|
|
4263
4263
|
}
|
|
4264
4264
|
s = {
|
|
4265
4265
|
arrayValue: {
|
|
@@ -4273,7 +4273,7 @@ var Zn = /** @class */ function(e) {
|
|
|
4273
4273
|
var h = Wt.create(i, o, s);
|
|
4274
4274
|
return function(t, e) {
|
|
4275
4275
|
if (e.N()) {
|
|
4276
|
-
var n =
|
|
4276
|
+
var n = le(t);
|
|
4277
4277
|
if (null !== n && !n.isEqual(e.field)) throw new U(V, "Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '" + n.toString() + "' and '" + e.field.toString() + "'");
|
|
4278
4278
|
var r = ce(t);
|
|
4279
4279
|
null !== r && mr(t, e.field, r);
|
|
@@ -4358,7 +4358,7 @@ var er = /** @class */ function(e) {
|
|
|
4358
4358
|
return function(t, e) {
|
|
4359
4359
|
if (null === ce(t)) {
|
|
4360
4360
|
// This is the first order by. It must match any inequality.
|
|
4361
|
-
var n =
|
|
4361
|
+
var n = le(t);
|
|
4362
4362
|
null !== n && mr(t, n, e.field);
|
|
4363
4363
|
}
|
|
4364
4364
|
}(t, r), r;
|
|
@@ -4456,12 +4456,12 @@ var cr = /** @class */ function(e) {
|
|
|
4456
4456
|
}, n;
|
|
4457
4457
|
}(Xn);
|
|
4458
4458
|
|
|
4459
|
-
function
|
|
4459
|
+
function lr() {
|
|
4460
4460
|
for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
|
|
4461
4461
|
return new cr("endBefore", t, /*before=*/ !0);
|
|
4462
4462
|
}
|
|
4463
4463
|
|
|
4464
|
-
function
|
|
4464
|
+
function fr() {
|
|
4465
4465
|
for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
|
|
4466
4466
|
return new cr("endAt", t, /*before=*/ !1);
|
|
4467
4467
|
}
|
|
@@ -4482,8 +4482,8 @@ function lr() {
|
|
|
4482
4482
|
var c = r.data.field(u.field);
|
|
4483
4483
|
if (Nt(c)) throw new U(V, 'Invalid query. You are trying to start or end a query using a document for which the field "' + u.field + '" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');
|
|
4484
4484
|
if (null === c) {
|
|
4485
|
-
var
|
|
4486
|
-
throw new U(V, "Invalid query. You are trying to start or end a query using a document for which the field '" +
|
|
4485
|
+
var l = u.field.canonicalString();
|
|
4486
|
+
throw new U(V, "Invalid query. You are trying to start or end a query using a document for which the field '" + l + "' (used as the orderBy) does not exist.");
|
|
4487
4487
|
}
|
|
4488
4488
|
o.push(c);
|
|
4489
4489
|
}
|
|
@@ -4499,11 +4499,11 @@ function lr() {
|
|
|
4499
4499
|
var c = i[u];
|
|
4500
4500
|
if (a[u].field.isKeyField()) {
|
|
4501
4501
|
if ("string" != typeof c) throw new U(V, "Invalid query. Expected a string for document ID in " + r + "(), but got a " + typeof c);
|
|
4502
|
-
if (!
|
|
4503
|
-
var
|
|
4504
|
-
if (!nt.isDocumentKey(
|
|
4505
|
-
var
|
|
4506
|
-
s.push(Rt(e,
|
|
4502
|
+
if (!fe(t) && -1 !== c.indexOf("/")) throw new U(V, "Invalid query. When querying a collection and ordering by documentId(), the value passed to " + r + "() must be a plain document ID, but '" + c + "' contains a slash.");
|
|
4503
|
+
var l = t.path.child(Z.fromString(c));
|
|
4504
|
+
if (!nt.isDocumentKey(l)) throw new U(V, "Invalid query. When querying a collection group and ordering by documentId(), the value passed to " + r + "() must result in a valid document path, but '" + l + "' is not because it contains an odd number of segments.");
|
|
4505
|
+
var f = new nt(l);
|
|
4506
|
+
s.push(Rt(e, f));
|
|
4507
4507
|
} else {
|
|
4508
4508
|
var h = jn(n, r, c);
|
|
4509
4509
|
s.push(h);
|
|
@@ -4516,7 +4516,7 @@ function lr() {
|
|
|
4516
4516
|
function pr(t, e, n) {
|
|
4517
4517
|
if ("string" == typeof (n = p(n))) {
|
|
4518
4518
|
if ("" === n) throw new U(V, "Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");
|
|
4519
|
-
if (!
|
|
4519
|
+
if (!fe(e) && -1 !== n.indexOf("/")) throw new U(V, "Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '" + n + "' contains a '/' character.");
|
|
4520
4520
|
var r = e.path.child(Z.fromString(n));
|
|
4521
4521
|
if (!nt.isDocumentKey(r)) throw new U(V, "Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '" + r + "' is not because it has an odd number of segments (" + r.length + ").");
|
|
4522
4522
|
return Rt(t, new nt(r));
|
|
@@ -5647,7 +5647,7 @@ y = i + "_lite", o(new c("firestore/lite", (function(t, e) {
|
|
|
5647
5647
|
return n && i._setSettings(n), i;
|
|
5648
5648
|
}), "PUBLIC")),
|
|
5649
5649
|
// RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
|
|
5650
|
-
a("firestore-lite", "3.4.
|
|
5650
|
+
a("firestore-lite", "3.4.3-2022013201330", ""), a("firestore-lite", "3.4.3-2022013201330", "esm5");
|
|
5651
5651
|
|
|
5652
|
-
export { vn as Bytes, cn as CollectionReference, sn as DocumentReference, Kn as DocumentSnapshot, mn as FieldPath, gn as FieldValue, en as Firestore, U as FirestoreError, wn as GeoPoint, un as Query, Xn as QueryConstraint, Hn as QueryDocumentSnapshot, Wn as QuerySnapshot, bt as Timestamp, Lr as Transaction, Dr as WriteBatch, Sr as addDoc, kr as arrayRemove, Ar as arrayUnion,
|
|
5652
|
+
export { vn as Bytes, cn as CollectionReference, sn as DocumentReference, Kn as DocumentSnapshot, mn as FieldPath, gn as FieldValue, en as Firestore, U as FirestoreError, wn as GeoPoint, un as Query, Xn as QueryConstraint, Hn as QueryDocumentSnapshot, Wn as QuerySnapshot, bt as Timestamp, Lr as Transaction, Dr as WriteBatch, Sr as addDoc, kr as arrayRemove, Ar as arrayUnion, ln as collection, fn as collectionGroup, on as connectFirestoreEmulator, Tr as deleteDoc, Er as deleteField, hn as doc, yn as documentId, fr as endAt, lr as endBefore, gr as getDoc, wr as getDocs, rn as getFirestore, Vr as increment, nn as initializeFirestore, ir as limit, or as limitToLast, nr as orderBy, Jn as query, dn as queryEqual, pn as refEqual, Rr as runTransaction, Ir as serverTimestamp, br as setDoc, g as setLogLevel, Yn as snapshotEqual, ur as startAfter, sr as startAt, an as terminate, _r as updateDoc, tr as where, Pr as writeBatch };
|
|
5653
5653
|
//# sourceMappingURL=index.browser.esm5.js.map
|