@firebase/firestore 3.7.2 → 3.7.3-20221109210852
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 +18 -15
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +18 -15
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +4 -3
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +4 -3
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +18 -15
- package/dist/index.rn.js.map +1 -1
- package/dist/lite/index.browser.esm2017.js +62 -56
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +111 -105
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.node.cjs.js +10 -3
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +10 -3
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +64 -58
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +9 -9
- package/package.json +1 -1
|
@@ -63,7 +63,7 @@ d.MOCK_USER = new d("mock-user");
|
|
|
63
63
|
* See the License for the specific language governing permissions and
|
|
64
64
|
* limitations under the License.
|
|
65
65
|
*/
|
|
66
|
-
let w = "9.
|
|
66
|
+
let w = "9.14.0-20221109210852";
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* @license
|
|
@@ -218,7 +218,7 @@ e) {
|
|
|
218
218
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
219
219
|
* See the License for the specific language governing permissions and
|
|
220
220
|
* limitations under the License.
|
|
221
|
-
*/ const T = "ok", A = "cancelled", R = "unknown", P = "invalid-argument", V = "deadline-exceeded", N = "not-found",
|
|
221
|
+
*/ const T = "ok", A = "cancelled", R = "unknown", P = "invalid-argument", V = "deadline-exceeded", N = "not-found", $ = "already-exists", D = "permission-denied", x = "unauthenticated", F = "resource-exhausted", S = "failed-precondition", q = "aborted", O = "out-of-range", k = "unimplemented", C = "internal", L = "unavailable", M = "data-loss";
|
|
222
222
|
|
|
223
223
|
/** An error returned by a Firestore operation. */ class U extends FirebaseError {
|
|
224
224
|
/** @hideconstructor */
|
|
@@ -921,7 +921,7 @@ function mt(t) {
|
|
|
921
921
|
|
|
922
922
|
case 403:
|
|
923
923
|
// Forbidden
|
|
924
|
-
return
|
|
924
|
+
return D;
|
|
925
925
|
|
|
926
926
|
case 404:
|
|
927
927
|
// Not Found
|
|
@@ -1056,19 +1056,25 @@ class {
|
|
|
1056
1056
|
throw new Error("Not supported by FetchConnection");
|
|
1057
1057
|
}
|
|
1058
1058
|
async R(t, e, n, r) {
|
|
1059
|
-
|
|
1060
|
-
|
|
1059
|
+
var s;
|
|
1060
|
+
const i = JSON.stringify(r);
|
|
1061
|
+
let o;
|
|
1061
1062
|
try {
|
|
1062
|
-
|
|
1063
|
+
o = await this.V(e, {
|
|
1063
1064
|
method: "POST",
|
|
1064
1065
|
headers: n,
|
|
1065
|
-
body:
|
|
1066
|
+
body: i
|
|
1066
1067
|
});
|
|
1067
1068
|
} catch (t) {
|
|
1068
1069
|
throw new U(mt(t.status), "Request failed with error: " + t.statusText);
|
|
1069
1070
|
}
|
|
1070
|
-
if (!
|
|
1071
|
-
|
|
1071
|
+
if (!o.ok) {
|
|
1072
|
+
let t = await o.json();
|
|
1073
|
+
Array.isArray(t) && (t = t[0]);
|
|
1074
|
+
const e = null === (s = null == t ? void 0 : t.error) || void 0 === s ? void 0 : s.message;
|
|
1075
|
+
throw new U(mt(o.status), `Request failed with error: ${null != e ? e : o.statusText}`);
|
|
1076
|
+
}
|
|
1077
|
+
return o.json();
|
|
1072
1078
|
}
|
|
1073
1079
|
}
|
|
1074
1080
|
|
|
@@ -1137,7 +1143,7 @@ function yt(t) {
|
|
|
1137
1143
|
* See the License for the specific language governing permissions and
|
|
1138
1144
|
* limitations under the License.
|
|
1139
1145
|
*/ class _t {
|
|
1140
|
-
static
|
|
1146
|
+
static $() {
|
|
1141
1147
|
// Alphanumeric characters
|
|
1142
1148
|
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", e = Math.floor(256 / t.length) * t.length;
|
|
1143
1149
|
// The largest byte value that is a multiple of `char.length`.
|
|
@@ -1859,7 +1865,7 @@ class Nt {
|
|
|
1859
1865
|
* foo.bar - Overwrites only the field bar of the object foo.
|
|
1860
1866
|
* If foo is not an object, foo is replaced with an object
|
|
1861
1867
|
* containing foo
|
|
1862
|
-
*/ class
|
|
1868
|
+
*/ class $t {
|
|
1863
1869
|
constructor(t) {
|
|
1864
1870
|
this.fields = t,
|
|
1865
1871
|
// TODO(dimond): validation of FieldMask
|
|
@@ -1867,7 +1873,7 @@ class Nt {
|
|
|
1867
1873
|
t.sort(nt.comparator);
|
|
1868
1874
|
}
|
|
1869
1875
|
static empty() {
|
|
1870
|
-
return new
|
|
1876
|
+
return new $t([]);
|
|
1871
1877
|
}
|
|
1872
1878
|
/**
|
|
1873
1879
|
* Returns a new FieldMask object that is the result of adding all the given
|
|
@@ -1876,7 +1882,7 @@ class Nt {
|
|
|
1876
1882
|
let e = new Vt(nt.comparator);
|
|
1877
1883
|
for (const t of this.fields) e = e.add(t);
|
|
1878
1884
|
for (const n of t) e = e.add(n);
|
|
1879
|
-
return new
|
|
1885
|
+
return new $t(e.toArray());
|
|
1880
1886
|
}
|
|
1881
1887
|
/**
|
|
1882
1888
|
* Verifies that `fieldPath` is included by at least one field in this field
|
|
@@ -1934,13 +1940,13 @@ class Nt {
|
|
|
1934
1940
|
* before being sent as a proto.
|
|
1935
1941
|
* @internal
|
|
1936
1942
|
*/
|
|
1937
|
-
class
|
|
1943
|
+
class Dt {
|
|
1938
1944
|
constructor(t) {
|
|
1939
1945
|
this.binaryString = t;
|
|
1940
1946
|
}
|
|
1941
1947
|
static fromBase64String(t) {
|
|
1942
1948
|
const e = atob(t);
|
|
1943
|
-
return new
|
|
1949
|
+
return new Dt(e);
|
|
1944
1950
|
}
|
|
1945
1951
|
static fromUint8Array(t) {
|
|
1946
1952
|
// TODO(indexing); Remove the copy of the byte string here as this method
|
|
@@ -1957,7 +1963,7 @@ class $t {
|
|
|
1957
1963
|
/**
|
|
1958
1964
|
* Helper function to convert a binary string to an Uint8Array.
|
|
1959
1965
|
*/ (t);
|
|
1960
|
-
return new
|
|
1966
|
+
return new Dt(e);
|
|
1961
1967
|
}
|
|
1962
1968
|
[Symbol.iterator]() {
|
|
1963
1969
|
let t = 0;
|
|
@@ -2012,7 +2018,7 @@ class $t {
|
|
|
2012
2018
|
}
|
|
2013
2019
|
}
|
|
2014
2020
|
|
|
2015
|
-
|
|
2021
|
+
Dt.EMPTY_BYTE_STRING = new Dt("");
|
|
2016
2022
|
|
|
2017
2023
|
const xt = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
2018
2024
|
|
|
@@ -2056,7 +2062,7 @@ const xt = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
|
2056
2062
|
}
|
|
2057
2063
|
|
|
2058
2064
|
/** Converts the possible Proto types for Blobs into a ByteString. */ function qt(t) {
|
|
2059
|
-
return "string" == typeof t ?
|
|
2065
|
+
return "string" == typeof t ? Dt.fromBase64String(t) : Dt.fromUint8Array(t);
|
|
2060
2066
|
}
|
|
2061
2067
|
|
|
2062
2068
|
/**
|
|
@@ -2606,7 +2612,7 @@ class Jt {
|
|
|
2606
2612
|
class Zt {
|
|
2607
2613
|
constructor(t, e = null, n = [], r = [], s = null, i = null, o = null) {
|
|
2608
2614
|
this.path = t, this.collectionGroup = e, this.orderBy = n, this.filters = r, this.limit = s,
|
|
2609
|
-
this.startAt = i, this.endAt = o, this
|
|
2615
|
+
this.startAt = i, this.endAt = o, this.D = null;
|
|
2610
2616
|
}
|
|
2611
2617
|
}
|
|
2612
2618
|
|
|
@@ -3099,7 +3105,7 @@ function be(t, e) {
|
|
|
3099
3105
|
/**
|
|
3100
3106
|
* A mutation that creates or replaces the document at the given key with the
|
|
3101
3107
|
* object value contents.
|
|
3102
|
-
*/ class
|
|
3108
|
+
*/ class $e extends Ne {
|
|
3103
3109
|
constructor(t, e, n, r = []) {
|
|
3104
3110
|
super(), this.key = t, this.value = e, this.precondition = n, this.fieldTransforms = r,
|
|
3105
3111
|
this.type = 0 /* Set */;
|
|
@@ -3121,7 +3127,7 @@ function be(t, e) {
|
|
|
3121
3127
|
* is deleted.
|
|
3122
3128
|
* * When a field is not in the mask but is in the values, the values map is
|
|
3123
3129
|
* ignored.
|
|
3124
|
-
*/ class
|
|
3130
|
+
*/ class De extends Ne {
|
|
3125
3131
|
constructor(t, e, n, r, s = []) {
|
|
3126
3132
|
super(), this.key = t, this.data = e, this.fieldMask = n, this.precondition = r,
|
|
3127
3133
|
this.fieldTransforms = s, this.type = 1 /* Patch */;
|
|
@@ -3307,11 +3313,11 @@ function We(t, e) {
|
|
|
3307
3313
|
|
|
3308
3314
|
function Ke(t, e) {
|
|
3309
3315
|
let n;
|
|
3310
|
-
if (e instanceof
|
|
3316
|
+
if (e instanceof $e) n = {
|
|
3311
3317
|
update: Ge(t, e.key, e.value)
|
|
3312
3318
|
}; else if (e instanceof xe) n = {
|
|
3313
3319
|
delete: je(t, e.key)
|
|
3314
|
-
}; else if (e instanceof
|
|
3320
|
+
}; else if (e instanceof De) n = {
|
|
3315
3321
|
update: Ge(t, e.key, e.data),
|
|
3316
3322
|
updateMask: Ze(e.fieldMask)
|
|
3317
3323
|
}; else {
|
|
@@ -4199,7 +4205,7 @@ function An(t, e, ...n) {
|
|
|
4199
4205
|
if (t = getModularInstance(t),
|
|
4200
4206
|
// We allow omission of 'pathString' but explicitly prohibit passing in both
|
|
4201
4207
|
// 'undefined' and 'null'.
|
|
4202
|
-
1 === arguments.length && (e = _t
|
|
4208
|
+
1 === arguments.length && (e = _t.$()), st("doc", "path", e), t instanceof fn) {
|
|
4203
4209
|
const r = tt.fromString(e, ...n);
|
|
4204
4210
|
return it(r), new vn(t,
|
|
4205
4211
|
/* converter= */ null, new rt(r));
|
|
@@ -4264,7 +4270,7 @@ function An(t, e, ...n) {
|
|
|
4264
4270
|
* @param base64 - The Base64 string used to create the `Bytes` object.
|
|
4265
4271
|
*/ static fromBase64String(t) {
|
|
4266
4272
|
try {
|
|
4267
|
-
return new Vn(
|
|
4273
|
+
return new Vn(Dt.fromBase64String(t));
|
|
4268
4274
|
} catch (t) {
|
|
4269
4275
|
throw new U(P, "Failed to construct data from Base64 string: " + t);
|
|
4270
4276
|
}
|
|
@@ -4274,7 +4280,7 @@ function An(t, e, ...n) {
|
|
|
4274
4280
|
*
|
|
4275
4281
|
* @param array - The Uint8Array used to create the `Bytes` object.
|
|
4276
4282
|
*/ static fromUint8Array(t) {
|
|
4277
|
-
return new Vn(
|
|
4283
|
+
return new Vn(Dt.fromUint8Array(t));
|
|
4278
4284
|
}
|
|
4279
4285
|
/**
|
|
4280
4286
|
* Returns the underlying bytes as a Base64-encoded string.
|
|
@@ -4354,7 +4360,7 @@ function An(t, e, ...n) {
|
|
|
4354
4360
|
/**
|
|
4355
4361
|
* Returns a special sentinel `FieldPath` to refer to the ID of a document.
|
|
4356
4362
|
* It can be used in queries to sort or filter by the document ID.
|
|
4357
|
-
*/ function
|
|
4363
|
+
*/ function $n() {
|
|
4358
4364
|
return new Nn("__name__");
|
|
4359
4365
|
}
|
|
4360
4366
|
|
|
@@ -4377,7 +4383,7 @@ function An(t, e, ...n) {
|
|
|
4377
4383
|
/**
|
|
4378
4384
|
* Sentinel values that can be used when writing document fields with `set()`
|
|
4379
4385
|
* or `update()`.
|
|
4380
|
-
*/ class
|
|
4386
|
+
*/ class Dn {
|
|
4381
4387
|
/**
|
|
4382
4388
|
* @param _methodName - The public API endpoint that returns this class.
|
|
4383
4389
|
* @hideconstructor
|
|
@@ -4475,7 +4481,7 @@ function An(t, e, ...n) {
|
|
|
4475
4481
|
this.data = t, this.fieldMask = e, this.fieldTransforms = n;
|
|
4476
4482
|
}
|
|
4477
4483
|
toMutation(t, e) {
|
|
4478
|
-
return null !== this.fieldMask ? new
|
|
4484
|
+
return null !== this.fieldMask ? new De(t, this.data, this.fieldMask, e, this.fieldTransforms) : new $e(t, this.data, e, this.fieldTransforms);
|
|
4479
4485
|
}
|
|
4480
4486
|
}
|
|
4481
4487
|
|
|
@@ -4486,7 +4492,7 @@ function An(t, e, ...n) {
|
|
|
4486
4492
|
this.data = t, this.fieldMask = e, this.fieldTransforms = n;
|
|
4487
4493
|
}
|
|
4488
4494
|
toMutation(t, e) {
|
|
4489
|
-
return new
|
|
4495
|
+
return new De(t, this.data, this.fieldMask, e, this.fieldTransforms);
|
|
4490
4496
|
}
|
|
4491
4497
|
}
|
|
4492
4498
|
|
|
@@ -4612,19 +4618,19 @@ function Ln(t) {
|
|
|
4612
4618
|
Zn("Data must be an object, but it was:", o, r);
|
|
4613
4619
|
const u = Jn(r, o);
|
|
4614
4620
|
let c, a;
|
|
4615
|
-
if (i.merge) c = new
|
|
4621
|
+
if (i.merge) c = new $t(o.fieldMask), a = o.fieldTransforms; else if (i.mergeFields) {
|
|
4616
4622
|
const t = [];
|
|
4617
4623
|
for (const r of i.mergeFields) {
|
|
4618
4624
|
const s = tr(e, r, n);
|
|
4619
4625
|
if (!o.contains(s)) throw new U(P, `Field '${s}' is specified in your field mask but missing from your input data.`);
|
|
4620
4626
|
sr(t, s) || t.push(s);
|
|
4621
4627
|
}
|
|
4622
|
-
c = new
|
|
4628
|
+
c = new $t(t), a = o.fieldTransforms.filter((t => c.covers(t.field)));
|
|
4623
4629
|
} else c = null, a = o.fieldTransforms;
|
|
4624
4630
|
return new Sn(new Jt(u), c, a);
|
|
4625
4631
|
}
|
|
4626
4632
|
|
|
4627
|
-
class Un extends
|
|
4633
|
+
class Un extends Dn {
|
|
4628
4634
|
_toFieldTransform(t) {
|
|
4629
4635
|
if (2 /* MergeSet */ !== t.rt) throw 1 /* Update */ === t.rt ? t.ht(`${this._methodName}() can only appear at the top level of your update data`) : t.ht(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);
|
|
4630
4636
|
// No transform to add for a delete, but we need to add it to our
|
|
@@ -4660,7 +4666,7 @@ class Un extends $n {
|
|
|
4660
4666
|
}, e.databaseId, e.L, e.ignoreUndefinedProperties);
|
|
4661
4667
|
}
|
|
4662
4668
|
|
|
4663
|
-
class Bn extends
|
|
4669
|
+
class Bn extends Dn {
|
|
4664
4670
|
_toFieldTransform(t) {
|
|
4665
4671
|
return new Pe(t.path, new Ie);
|
|
4666
4672
|
}
|
|
@@ -4669,7 +4675,7 @@ class Bn extends $n {
|
|
|
4669
4675
|
}
|
|
4670
4676
|
}
|
|
4671
4677
|
|
|
4672
|
-
class Qn extends
|
|
4678
|
+
class Qn extends Dn {
|
|
4673
4679
|
constructor(t, e) {
|
|
4674
4680
|
super(t), this.wt = e;
|
|
4675
4681
|
}
|
|
@@ -4684,7 +4690,7 @@ class Qn extends $n {
|
|
|
4684
4690
|
}
|
|
4685
4691
|
}
|
|
4686
4692
|
|
|
4687
|
-
class zn extends
|
|
4693
|
+
class zn extends Dn {
|
|
4688
4694
|
constructor(t, e) {
|
|
4689
4695
|
super(t), this.wt = e;
|
|
4690
4696
|
}
|
|
@@ -4699,7 +4705,7 @@ class zn extends $n {
|
|
|
4699
4705
|
}
|
|
4700
4706
|
}
|
|
4701
4707
|
|
|
4702
|
-
class Gn extends
|
|
4708
|
+
class Gn extends Dn {
|
|
4703
4709
|
constructor(t, e) {
|
|
4704
4710
|
super(t), this.yt = e;
|
|
4705
4711
|
}
|
|
@@ -4730,7 +4736,7 @@ class Gn extends $n {
|
|
|
4730
4736
|
null != t && (i.push(u), o.set(u, t));
|
|
4731
4737
|
}
|
|
4732
4738
|
}));
|
|
4733
|
-
const u = new
|
|
4739
|
+
const u = new $t(i);
|
|
4734
4740
|
return new qn(o, u, s.fieldTransforms);
|
|
4735
4741
|
}
|
|
4736
4742
|
|
|
@@ -4755,7 +4761,7 @@ class Gn extends $n {
|
|
|
4755
4761
|
null != t && (a.push(e), h.set(e, t));
|
|
4756
4762
|
}
|
|
4757
4763
|
}
|
|
4758
|
-
const f = new
|
|
4764
|
+
const f = new $t(a);
|
|
4759
4765
|
return new qn(h, f, o.fieldTransforms);
|
|
4760
4766
|
}
|
|
4761
4767
|
|
|
@@ -4782,7 +4788,7 @@ class Gn extends $n {
|
|
|
4782
4788
|
// Unwrap the API type from the Compat SDK. This will return the API type
|
|
4783
4789
|
// from firestore-exp.
|
|
4784
4790
|
t = getModularInstance(t))) return Zn("Unsupported field value:", e, t), Jn(t, e);
|
|
4785
|
-
if (t instanceof
|
|
4791
|
+
if (t instanceof Dn)
|
|
4786
4792
|
// FieldValues usually parse into transforms (except deleteField())
|
|
4787
4793
|
// in which case we do not want to include this field in our parsed data
|
|
4788
4794
|
// (as doing so will overwrite the field directly prior to the transform
|
|
@@ -4911,7 +4917,7 @@ function Jn(t, e) {
|
|
|
4911
4917
|
}
|
|
4912
4918
|
|
|
4913
4919
|
function Xn(t) {
|
|
4914
|
-
return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof bt || t instanceof xn || t instanceof Vn || t instanceof vn || t instanceof
|
|
4920
|
+
return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof bt || t instanceof xn || t instanceof Vn || t instanceof vn || t instanceof Dn);
|
|
4915
4921
|
}
|
|
4916
4922
|
|
|
4917
4923
|
function Zn(t, e, n) {
|
|
@@ -5522,7 +5528,7 @@ function Nr(t, e, n) {
|
|
|
5522
5528
|
r;
|
|
5523
5529
|
}
|
|
5524
5530
|
|
|
5525
|
-
class
|
|
5531
|
+
class $r extends class {
|
|
5526
5532
|
convertValue(t, e = "none") {
|
|
5527
5533
|
switch (Mt(t)) {
|
|
5528
5534
|
case 0 /* NullValue */ :
|
|
@@ -5625,8 +5631,8 @@ class Dr extends class {
|
|
|
5625
5631
|
* @param reference - The reference of the document to fetch.
|
|
5626
5632
|
* @returns A Promise resolved with a `DocumentSnapshot` containing the current
|
|
5627
5633
|
* document contents.
|
|
5628
|
-
*/ function
|
|
5629
|
-
const e = hn((t = ct(t, vn)).firestore), n = new
|
|
5634
|
+
*/ function Dr(t) {
|
|
5635
|
+
const e = hn((t = ct(t, vn)).firestore), n = new $r(t.firestore);
|
|
5630
5636
|
return on(e, [ t._key ]).then((e => {
|
|
5631
5637
|
E(1 === e.length);
|
|
5632
5638
|
const r = e[0];
|
|
@@ -5649,7 +5655,7 @@ class Dr extends class {
|
|
|
5649
5655
|
!function(t) {
|
|
5650
5656
|
if ("L" /* Last */ === t.limitType && 0 === t.explicitOrderBy.length) throw new U(k, "limitToLast() queries require specifying at least one orderBy() clause");
|
|
5651
5657
|
}((t = ct(t, bn))._query);
|
|
5652
|
-
const e = hn(t.firestore), n = new
|
|
5658
|
+
const e = hn(t.firestore), n = new $r(t.firestore);
|
|
5653
5659
|
return un(e, t._query).then((e => {
|
|
5654
5660
|
const r = e.map((e => new or(t.firestore, n, e.key, e, t.converter)));
|
|
5655
5661
|
return "L" /* Last */ === t._query.limitType &&
|
|
@@ -5738,7 +5744,7 @@ function Sr(t, e, n, ...r) {
|
|
|
5738
5744
|
* retrieved from `snapshot.data().count`, where `snapshot` is the
|
|
5739
5745
|
* `AggregateQuerySnapshot` to which the returned Promise resolves.
|
|
5740
5746
|
*/ function kr(t) {
|
|
5741
|
-
const e = ct(t.firestore, fn), n = hn(e), r = new
|
|
5747
|
+
const e = ct(t.firestore, fn), n = hn(e), r = new $r(e);
|
|
5742
5748
|
return new gn(t, n, r).run();
|
|
5743
5749
|
}
|
|
5744
5750
|
|
|
@@ -6112,10 +6118,10 @@ class Yr {
|
|
|
6112
6118
|
this.asyncQueue.enqueueAndForget((() => t.commit().then((() => {
|
|
6113
6119
|
this.deferred.resolve(e);
|
|
6114
6120
|
})).catch((t => {
|
|
6115
|
-
this
|
|
6121
|
+
this.$t(t);
|
|
6116
6122
|
}))));
|
|
6117
6123
|
})).catch((t => {
|
|
6118
|
-
this
|
|
6124
|
+
this.$t(t);
|
|
6119
6125
|
}));
|
|
6120
6126
|
}));
|
|
6121
6127
|
}
|
|
@@ -6129,16 +6135,16 @@ class Yr {
|
|
|
6129
6135
|
return this.deferred.reject(t), null;
|
|
6130
6136
|
}
|
|
6131
6137
|
}
|
|
6132
|
-
|
|
6133
|
-
this.Rt > 0 && this
|
|
6138
|
+
$t(t) {
|
|
6139
|
+
this.Rt > 0 && this.Dt(t) ? (this.Rt -= 1, this.asyncQueue.enqueueAndForget((() => (this.Vt(),
|
|
6134
6140
|
Promise.resolve())))) : this.deferred.reject(t);
|
|
6135
6141
|
}
|
|
6136
|
-
|
|
6142
|
+
Dt(t) {
|
|
6137
6143
|
if ("FirebaseError" === t.name) {
|
|
6138
6144
|
// In transactions, the backend will fail outdated reads with FAILED_PRECONDITION and
|
|
6139
6145
|
// non-matching document versions with ABORTED. These errors should be retried.
|
|
6140
6146
|
const e = t.code;
|
|
6141
|
-
return "aborted" === e || "failed-precondition" === e || !
|
|
6147
|
+
return "aborted" === e || "failed-precondition" === e || "already-exists" === e || !
|
|
6142
6148
|
/**
|
|
6143
6149
|
* Determines whether an error code represents a permanent error when received
|
|
6144
6150
|
* in response to a non-write operation.
|
|
@@ -6163,8 +6169,8 @@ class Yr {
|
|
|
6163
6169
|
|
|
6164
6170
|
case P:
|
|
6165
6171
|
case N:
|
|
6166
|
-
case D:
|
|
6167
6172
|
case $:
|
|
6173
|
+
case D:
|
|
6168
6174
|
case S:
|
|
6169
6175
|
// Aborted might be retried in some scenarios, but that is dependant on
|
|
6170
6176
|
// the context and should handled individually by the calling code.
|
|
@@ -6550,7 +6556,7 @@ class Zr {
|
|
|
6550
6556
|
* @param documentRef - A reference to the document to be read.
|
|
6551
6557
|
* @returns A `DocumentSnapshot` with the read data.
|
|
6552
6558
|
*/ get(t) {
|
|
6553
|
-
const e = zr(t, this._firestore), n = new
|
|
6559
|
+
const e = zr(t, this._firestore), n = new $r(this._firestore);
|
|
6554
6560
|
return this._transaction.lookup([ e._key ]).then((t => {
|
|
6555
6561
|
if (!t || 1 !== t.length) return b();
|
|
6556
6562
|
const r = t[0];
|
|
@@ -6642,7 +6648,7 @@ class Zr {
|
|
|
6642
6648
|
return n && s._setSettings(n), s;
|
|
6643
6649
|
}), "PUBLIC").setMultipleInstances(!0)),
|
|
6644
6650
|
// RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
|
|
6645
|
-
registerVersion("firestore-lite", "3.7.
|
|
6651
|
+
registerVersion("firestore-lite", "3.7.3-20221109210852", ""), registerVersion("firestore-lite", "3.7.3-20221109210852", "esm2017");
|
|
6646
6652
|
|
|
6647
|
-
export { yn as AggregateField, _n as AggregateQuerySnapshot, Vn as Bytes, En as CollectionReference, vn as DocumentReference, ir as DocumentSnapshot, Nn as FieldPath,
|
|
6653
|
+
export { yn as AggregateField, _n as AggregateQuerySnapshot, Vn as Bytes, En as CollectionReference, vn as DocumentReference, ir as DocumentSnapshot, Nn as FieldPath, Dn as FieldValue, fn as Firestore, U as FirestoreError, xn as GeoPoint, bn as Query, hr as QueryConstraint, or as QueryDocumentSnapshot, ur as QuerySnapshot, bt as Timestamp, Zr as Transaction, Qr as WriteBatch, Or as addDoc, Cr as aggregateQuerySnapshotEqual, jr as arrayRemove, Ur as arrayUnion, In as collection, Tn as collectionGroup, mn as connectFirestoreEmulator, qr as deleteDoc, Lr as deleteField, An as doc, $n as documentId, Tr as endAt, Ir as endBefore, kr as getCount, Dr as getDoc, xr as getDocs, wn as getFirestore, Br as increment, dn as initializeFirestore, yr as limit, _r as limitToLast, mr as orderBy, lr as query, Pn as queryEqual, Rn as refEqual, ts as runTransaction, Mr as serverTimestamp, Fr as setDoc, p as setLogLevel, cr as snapshotEqual, br as startAfter, vr as startAt, pn as terminate, Sr as updateDoc, dr as where, Gr as writeBatch };
|
|
6648
6654
|
//# sourceMappingURL=index.browser.esm2017.js.map
|