@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
|
@@ -66,7 +66,7 @@ w.MOCK_USER = new w("mock-user");
|
|
|
66
66
|
* See the License for the specific language governing permissions and
|
|
67
67
|
* limitations under the License.
|
|
68
68
|
*/
|
|
69
|
-
let m = "9.
|
|
69
|
+
let m = "9.14.0-20221109210852";
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* @license
|
|
@@ -200,7 +200,7 @@ function _(t, ...e) {
|
|
|
200
200
|
/**
|
|
201
201
|
* Casts `obj` to `T`. In non-production builds, verifies that `obj` is an
|
|
202
202
|
* instance of `T` before casting.
|
|
203
|
-
*/ function
|
|
203
|
+
*/ function A(t,
|
|
204
204
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
205
205
|
e) {
|
|
206
206
|
return t;
|
|
@@ -221,7 +221,7 @@ e) {
|
|
|
221
221
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
222
222
|
* See the License for the specific language governing permissions and
|
|
223
223
|
* limitations under the License.
|
|
224
|
-
*/ const
|
|
224
|
+
*/ const T = "ok", R = "cancelled", P = "unknown", V = "invalid-argument", N = "deadline-exceeded", $ = "not-found", D = "already-exists", x = "permission-denied", S = "unauthenticated", F = "resource-exhausted", q = "failed-precondition", O = "aborted", k = "out-of-range", C = "unimplemented", L = "internal", M = "unavailable", U = "data-loss";
|
|
225
225
|
|
|
226
226
|
/** An error returned by a Firestore operation. */ class j extends c {
|
|
227
227
|
/** @hideconstructor */
|
|
@@ -909,7 +909,7 @@ function pt(t) {
|
|
|
909
909
|
switch (t) {
|
|
910
910
|
case 200:
|
|
911
911
|
// OK
|
|
912
|
-
return
|
|
912
|
+
return T;
|
|
913
913
|
|
|
914
914
|
case 400:
|
|
915
915
|
// Bad Request
|
|
@@ -968,7 +968,7 @@ function pt(t) {
|
|
|
968
968
|
return N;
|
|
969
969
|
|
|
970
970
|
default:
|
|
971
|
-
return t >= 200 && t < 300 ?
|
|
971
|
+
return t >= 200 && t < 300 ? T : t >= 400 && t < 500 ? q : t >= 500 && t < 600 ? L : P;
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
974
|
|
|
@@ -1017,10 +1017,10 @@ class {
|
|
|
1017
1017
|
return !1;
|
|
1018
1018
|
}
|
|
1019
1019
|
I(t, e, n, r, s) {
|
|
1020
|
-
const i = this.
|
|
1020
|
+
const i = this.A(t, e);
|
|
1021
1021
|
g("RestConnection", "Sending: ", i, n);
|
|
1022
1022
|
const o = {};
|
|
1023
|
-
return this.
|
|
1023
|
+
return this.T(o, r, s), this.R(t, i, o, n).then((t => (g("RestConnection", "Received: ", t),
|
|
1024
1024
|
t)), (e => {
|
|
1025
1025
|
throw v("RestConnection", `${t} failed with error: `, e, "url: ", i, "request:", n),
|
|
1026
1026
|
e;
|
|
@@ -1034,7 +1034,7 @@ class {
|
|
|
1034
1034
|
/**
|
|
1035
1035
|
* Modifies the headers for a request, adding any authorization token if
|
|
1036
1036
|
* present and any additional headers for the request.
|
|
1037
|
-
*/
|
|
1037
|
+
*/ T(t, e, n) {
|
|
1038
1038
|
t["X-Goog-Api-Client"] = "gl-js/ fire/" + m,
|
|
1039
1039
|
// Content-Type: text/plain will avoid preflight requests which might
|
|
1040
1040
|
// mess with CORS and redirects by proxies. If we add custom headers
|
|
@@ -1043,7 +1043,7 @@ class {
|
|
|
1043
1043
|
t["Content-Type"] = "text/plain", this.databaseInfo.appId && (t["X-Firebase-GMPID"] = this.databaseInfo.appId),
|
|
1044
1044
|
e && e.headers.forEach(((e, n) => t[n] = e)), n && n.headers.forEach(((e, n) => t[n] = e));
|
|
1045
1045
|
}
|
|
1046
|
-
|
|
1046
|
+
A(t, e) {
|
|
1047
1047
|
const n = dt[t];
|
|
1048
1048
|
return `${this.p}/v1/${e}:${n}`;
|
|
1049
1049
|
}
|
|
@@ -1059,19 +1059,25 @@ class {
|
|
|
1059
1059
|
throw new Error("Not supported by FetchConnection");
|
|
1060
1060
|
}
|
|
1061
1061
|
async R(t, e, n, r) {
|
|
1062
|
-
|
|
1063
|
-
|
|
1062
|
+
var s;
|
|
1063
|
+
const i = JSON.stringify(r);
|
|
1064
|
+
let o;
|
|
1064
1065
|
try {
|
|
1065
|
-
|
|
1066
|
+
o = await this.V(e, {
|
|
1066
1067
|
method: "POST",
|
|
1067
1068
|
headers: n,
|
|
1068
|
-
body:
|
|
1069
|
+
body: i
|
|
1069
1070
|
});
|
|
1070
1071
|
} catch (t) {
|
|
1071
1072
|
throw new j(pt(t.status), "Request failed with error: " + t.statusText);
|
|
1072
1073
|
}
|
|
1073
|
-
if (!
|
|
1074
|
-
|
|
1074
|
+
if (!o.ok) {
|
|
1075
|
+
let t = await o.json();
|
|
1076
|
+
Array.isArray(t) && (t = t[0]);
|
|
1077
|
+
const e = null === (s = null == t ? void 0 : t.error) || void 0 === s ? void 0 : s.message;
|
|
1078
|
+
throw new j(pt(o.status), `Request failed with error: ${null != e ? e : o.statusText}`);
|
|
1079
|
+
}
|
|
1080
|
+
return o.json();
|
|
1075
1081
|
}
|
|
1076
1082
|
}
|
|
1077
1083
|
|
|
@@ -1371,13 +1377,13 @@ class Et {
|
|
|
1371
1377
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1372
1378
|
* See the License for the specific language governing permissions and
|
|
1373
1379
|
* limitations under the License.
|
|
1374
|
-
*/ function
|
|
1380
|
+
*/ function At(t) {
|
|
1375
1381
|
let e = 0;
|
|
1376
1382
|
for (const n in t) Object.prototype.hasOwnProperty.call(t, n) && e++;
|
|
1377
1383
|
return e;
|
|
1378
1384
|
}
|
|
1379
1385
|
|
|
1380
|
-
function
|
|
1386
|
+
function Tt(t, e) {
|
|
1381
1387
|
for (const n in t) Object.prototype.hasOwnProperty.call(t, n) && e(n, t[n]);
|
|
1382
1388
|
}
|
|
1383
1389
|
|
|
@@ -2238,7 +2244,7 @@ function jt(t) {
|
|
|
2238
2244
|
case 10 /* ObjectValue */ :
|
|
2239
2245
|
return function(t, e) {
|
|
2240
2246
|
const n = t.mapValue.fields || {}, r = e.mapValue.fields || {};
|
|
2241
|
-
if (
|
|
2247
|
+
if (At(n) !== At(r)) return !1;
|
|
2242
2248
|
for (const t in n) if (n.hasOwnProperty(t) && (void 0 === r[t] || !Bt(n[t], r[t]))) return !1;
|
|
2243
2249
|
return !0;
|
|
2244
2250
|
}
|
|
@@ -2382,7 +2388,7 @@ function Gt(t, e) {
|
|
|
2382
2388
|
fields: {}
|
|
2383
2389
|
}
|
|
2384
2390
|
};
|
|
2385
|
-
return
|
|
2391
|
+
return Tt(t.mapValue.fields, ((t, n) => e.mapValue.fields[t] = Xt(n))), e;
|
|
2386
2392
|
}
|
|
2387
2393
|
if (t.arrayValue) {
|
|
2388
2394
|
const e = {
|
|
@@ -2478,7 +2484,7 @@ class Zt {
|
|
|
2478
2484
|
* Modifies `fieldsMap` by adding, replacing or deleting the specified
|
|
2479
2485
|
* entries.
|
|
2480
2486
|
*/ applyChanges(t, e, n) {
|
|
2481
|
-
|
|
2487
|
+
Tt(e, ((e, n) => t[e] = n));
|
|
2482
2488
|
for (const e of n) delete t[e];
|
|
2483
2489
|
}
|
|
2484
2490
|
clone() {
|
|
@@ -2863,7 +2869,7 @@ function _e(t) {
|
|
|
2863
2869
|
* which can be different from the order by constraints the user provided (e.g.
|
|
2864
2870
|
* the SDK and backend always orders by `__name__`).
|
|
2865
2871
|
*/ function ve(t) {
|
|
2866
|
-
const e =
|
|
2872
|
+
const e = A(t);
|
|
2867
2873
|
if (null === e.O) {
|
|
2868
2874
|
e.O = [];
|
|
2869
2875
|
const t = ge(e), n = ye(e);
|
|
@@ -2888,7 +2894,7 @@ function _e(t) {
|
|
|
2888
2894
|
/**
|
|
2889
2895
|
* Converts this `Query` instance to it's corresponding `Target` representation.
|
|
2890
2896
|
*/ function be(t) {
|
|
2891
|
-
const e =
|
|
2897
|
+
const e = A(t);
|
|
2892
2898
|
if (!e.k) if ("F" /* First */ === e.limitType) e.k = ne(e.path, e.collectionGroup, ve(e), e.filters, e.limit, e.startAt, e.endAt); else {
|
|
2893
2899
|
// Flip the orderBy directions since we want the last results
|
|
2894
2900
|
const t = [];
|
|
@@ -2987,7 +2993,7 @@ function Ie(t, e) {
|
|
|
2987
2993
|
* See the License for the specific language governing permissions and
|
|
2988
2994
|
* limitations under the License.
|
|
2989
2995
|
*/
|
|
2990
|
-
/** Used to represent a field transform on a mutation. */ class
|
|
2996
|
+
/** Used to represent a field transform on a mutation. */ class Ae {
|
|
2991
2997
|
constructor() {
|
|
2992
2998
|
// Make sure that the structural type of `TransformOperation` is unique.
|
|
2993
2999
|
// See https://github.com/microsoft/TypeScript/issues/5451
|
|
@@ -2995,15 +3001,15 @@ function Ie(t, e) {
|
|
|
2995
3001
|
}
|
|
2996
3002
|
}
|
|
2997
3003
|
|
|
2998
|
-
/** Transforms a value into a server-generated timestamp. */ class
|
|
3004
|
+
/** Transforms a value into a server-generated timestamp. */ class Te extends Ae {}
|
|
2999
3005
|
|
|
3000
|
-
/** Transforms an array value via a union operation. */ class Re extends
|
|
3006
|
+
/** Transforms an array value via a union operation. */ class Re extends Ae {
|
|
3001
3007
|
constructor(t) {
|
|
3002
3008
|
super(), this.elements = t;
|
|
3003
3009
|
}
|
|
3004
3010
|
}
|
|
3005
3011
|
|
|
3006
|
-
/** Transforms an array value via a remove operation. */ class Pe extends
|
|
3012
|
+
/** Transforms an array value via a remove operation. */ class Pe extends Ae {
|
|
3007
3013
|
constructor(t) {
|
|
3008
3014
|
super(), this.elements = t;
|
|
3009
3015
|
}
|
|
@@ -3014,7 +3020,7 @@ function Ie(t, e) {
|
|
|
3014
3020
|
* transforms. Converts all field values to integers or doubles, but unlike the
|
|
3015
3021
|
* backend does not cap integer values at 2^63. Instead, JavaScript number
|
|
3016
3022
|
* arithmetic is used and precision loss can occur for values greater than 2^53.
|
|
3017
|
-
*/ class Ve extends
|
|
3023
|
+
*/ class Ve extends Ae {
|
|
3018
3024
|
constructor(t, e) {
|
|
3019
3025
|
super(), this.L = t, this.M = e;
|
|
3020
3026
|
}
|
|
@@ -3338,7 +3344,7 @@ function He(t, e) {
|
|
|
3338
3344
|
}
|
|
3339
3345
|
return e.fieldTransforms.length > 0 && (n.updateTransforms = e.fieldTransforms.map((t => function(t, e) {
|
|
3340
3346
|
const n = e.transform;
|
|
3341
|
-
if (n instanceof
|
|
3347
|
+
if (n instanceof Te) return {
|
|
3342
3348
|
fieldPath: e.field.canonicalString(),
|
|
3343
3349
|
setToServerValue: "REQUEST_TIME"
|
|
3344
3350
|
};
|
|
@@ -3656,14 +3662,14 @@ class on extends class {} {
|
|
|
3656
3662
|
// TODO(firestorexp): Make sure there is only one Datastore instance per
|
|
3657
3663
|
// firestore-exp client.
|
|
3658
3664
|
async function un(t, e) {
|
|
3659
|
-
const n =
|
|
3665
|
+
const n = A(t), r = Ge(n.L) + "/documents", s = {
|
|
3660
3666
|
writes: e.map((t => He(n.L, t)))
|
|
3661
3667
|
};
|
|
3662
3668
|
await n.I("Commit", r, s);
|
|
3663
3669
|
}
|
|
3664
3670
|
|
|
3665
3671
|
async function cn(t, e) {
|
|
3666
|
-
const n =
|
|
3672
|
+
const n = A(t), r = Ge(n.L) + "/documents", s = {
|
|
3667
3673
|
documents: e.map((t => Qe(n.L, t)))
|
|
3668
3674
|
}, i = await n.P("BatchGetDocuments", r, s, e.length), o = new Map;
|
|
3669
3675
|
i.forEach((t => {
|
|
@@ -3678,7 +3684,7 @@ async function cn(t, e) {
|
|
|
3678
3684
|
}
|
|
3679
3685
|
|
|
3680
3686
|
async function an(t, e) {
|
|
3681
|
-
const n =
|
|
3687
|
+
const n = A(t), r = Je(n.L, be(e));
|
|
3682
3688
|
return (await n.P("RunQuery", r.parent, {
|
|
3683
3689
|
structuredQuery: r.structuredQuery
|
|
3684
3690
|
})).filter((t => !!t.document)).map((t => function(t, e, n) {
|
|
@@ -3692,7 +3698,7 @@ async function an(t, e) {
|
|
|
3692
3698
|
}
|
|
3693
3699
|
|
|
3694
3700
|
async function hn(t, e) {
|
|
3695
|
-
const n =
|
|
3701
|
+
const n = A(t), r = function(t, e) {
|
|
3696
3702
|
const n = Je(t, e);
|
|
3697
3703
|
return {
|
|
3698
3704
|
structuredAggregationQuery: {
|
|
@@ -4114,7 +4120,7 @@ class _n {
|
|
|
4114
4120
|
/**
|
|
4115
4121
|
* The collection this `DocumentReference` belongs to.
|
|
4116
4122
|
*/ get parent() {
|
|
4117
|
-
return new
|
|
4123
|
+
return new An(this.firestore, this.converter, this._key.path.popLast());
|
|
4118
4124
|
}
|
|
4119
4125
|
withConverter(t) {
|
|
4120
4126
|
return new En(this.firestore, t, this._key);
|
|
@@ -4144,7 +4150,7 @@ class _n {
|
|
|
4144
4150
|
/**
|
|
4145
4151
|
* A `CollectionReference` object can be used for adding documents, getting
|
|
4146
4152
|
* document references, and querying for documents (using {@link query}).
|
|
4147
|
-
*/ class
|
|
4153
|
+
*/ class An extends In {
|
|
4148
4154
|
/** @hideconstructor */
|
|
4149
4155
|
constructor(t, e, n) {
|
|
4150
4156
|
super(t, e, new pe(n)), this._path = n,
|
|
@@ -4169,19 +4175,19 @@ class _n {
|
|
|
4169
4175
|
/* converter= */ null, new st(t));
|
|
4170
4176
|
}
|
|
4171
4177
|
withConverter(t) {
|
|
4172
|
-
return new
|
|
4178
|
+
return new An(this.firestore, t, this._path);
|
|
4173
4179
|
}
|
|
4174
4180
|
}
|
|
4175
4181
|
|
|
4176
|
-
function
|
|
4182
|
+
function Tn(t, e, ...n) {
|
|
4177
4183
|
if (t = f(t), it("collection", "path", e), t instanceof wn) {
|
|
4178
4184
|
const r = et.fromString(e, ...n);
|
|
4179
|
-
return ut(r), new
|
|
4185
|
+
return ut(r), new An(t, /* converter= */ null, r);
|
|
4180
4186
|
}
|
|
4181
4187
|
{
|
|
4182
|
-
if (!(t instanceof En || t instanceof
|
|
4188
|
+
if (!(t instanceof En || t instanceof An)) throw new j(V, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
|
|
4183
4189
|
const r = t._path.child(et.fromString(e, ...n));
|
|
4184
|
-
return ut(r), new
|
|
4190
|
+
return ut(r), new An(t.firestore,
|
|
4185
4191
|
/* converter= */ null, r);
|
|
4186
4192
|
}
|
|
4187
4193
|
}
|
|
@@ -4221,9 +4227,9 @@ function Pn(t, e, ...n) {
|
|
|
4221
4227
|
/* converter= */ null, new st(r));
|
|
4222
4228
|
}
|
|
4223
4229
|
{
|
|
4224
|
-
if (!(t instanceof En || t instanceof
|
|
4230
|
+
if (!(t instanceof En || t instanceof An)) throw new j(V, "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");
|
|
4225
4231
|
const r = t._path.child(et.fromString(e, ...n));
|
|
4226
|
-
return ot(r), new En(t.firestore, t instanceof
|
|
4232
|
+
return ot(r), new En(t.firestore, t instanceof An ? t.converter : null, new st(r));
|
|
4227
4233
|
}
|
|
4228
4234
|
}
|
|
4229
4235
|
|
|
@@ -4235,7 +4241,7 @@ function Pn(t, e, ...n) {
|
|
|
4235
4241
|
* @returns true if the references point to the same location in the same
|
|
4236
4242
|
* Firestore database.
|
|
4237
4243
|
*/ function Vn(t, e) {
|
|
4238
|
-
return t = f(t), e = f(e), (t instanceof En || t instanceof
|
|
4244
|
+
return t = f(t), e = f(e), (t instanceof En || t instanceof An) && (e instanceof En || e instanceof An) && (t.firestore === e.firestore && t.path === e.path && t.converter === e.converter);
|
|
4239
4245
|
}
|
|
4240
4246
|
|
|
4241
4247
|
/**
|
|
@@ -4678,7 +4684,7 @@ class Bn extends Sn {
|
|
|
4678
4684
|
|
|
4679
4685
|
class zn extends Sn {
|
|
4680
4686
|
_toFieldTransform(t) {
|
|
4681
|
-
return new Ne(t.path, new
|
|
4687
|
+
return new Ne(t.path, new Te);
|
|
4682
4688
|
}
|
|
4683
4689
|
isEqual(t) {
|
|
4684
4690
|
return t instanceof zn;
|
|
@@ -4733,7 +4739,7 @@ class Kn extends Sn {
|
|
|
4733
4739
|
const s = t.dt(1 /* Update */ , e, n);
|
|
4734
4740
|
er("Data must be an object, but it was:", s, r);
|
|
4735
4741
|
const i = [], o = Zt.empty();
|
|
4736
|
-
|
|
4742
|
+
Tt(r, ((t, r) => {
|
|
4737
4743
|
const u = sr(e, t, n);
|
|
4738
4744
|
// For Compat types, we have to "extract" the underlying types before
|
|
4739
4745
|
// performing validation.
|
|
@@ -4913,7 +4919,7 @@ function Zn(t, e) {
|
|
|
4913
4919
|
return !function(t) {
|
|
4914
4920
|
for (const e in t) if (Object.prototype.hasOwnProperty.call(t, e)) return !1;
|
|
4915
4921
|
return !0;
|
|
4916
|
-
}(t) ?
|
|
4922
|
+
}(t) ? Tt(t, ((t, r) => {
|
|
4917
4923
|
const s = Xn(r, e.it(t));
|
|
4918
4924
|
null != s && (n[t] = s);
|
|
4919
4925
|
})) :
|
|
@@ -5361,10 +5367,10 @@ class gr extends fr {
|
|
|
5361
5367
|
|
|
5362
5368
|
class br extends fr {
|
|
5363
5369
|
constructor(t, e, n) {
|
|
5364
|
-
super(), this.type = t, this.
|
|
5370
|
+
super(), this.type = t, this.At = e, this.Tt = n;
|
|
5365
5371
|
}
|
|
5366
5372
|
_apply(t) {
|
|
5367
|
-
const e = Pr(t, this.type, this.
|
|
5373
|
+
const e = Pr(t, this.type, this.At, this.Tt);
|
|
5368
5374
|
return new In(t.firestore, t.converter, function(t, e) {
|
|
5369
5375
|
return new pe(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);
|
|
5370
5376
|
}(t._query, e));
|
|
@@ -5381,25 +5387,25 @@ function Ir(...t) {
|
|
|
5381
5387
|
/*inclusive=*/ !1);
|
|
5382
5388
|
}
|
|
5383
5389
|
|
|
5384
|
-
class
|
|
5390
|
+
class Ar extends fr {
|
|
5385
5391
|
constructor(t, e, n) {
|
|
5386
|
-
super(), this.type = t, this.
|
|
5392
|
+
super(), this.type = t, this.At = e, this.Tt = n;
|
|
5387
5393
|
}
|
|
5388
5394
|
_apply(t) {
|
|
5389
|
-
const e = Pr(t, this.type, this.
|
|
5395
|
+
const e = Pr(t, this.type, this.At, this.Tt);
|
|
5390
5396
|
return new In(t.firestore, t.converter, function(t, e) {
|
|
5391
5397
|
return new pe(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);
|
|
5392
5398
|
}(t._query, e));
|
|
5393
5399
|
}
|
|
5394
5400
|
}
|
|
5395
5401
|
|
|
5396
|
-
function
|
|
5397
|
-
return new
|
|
5402
|
+
function Tr(...t) {
|
|
5403
|
+
return new Ar("endBefore", t,
|
|
5398
5404
|
/*inclusive=*/ !1);
|
|
5399
5405
|
}
|
|
5400
5406
|
|
|
5401
5407
|
function Rr(...t) {
|
|
5402
|
-
return new
|
|
5408
|
+
return new Ar("endAt", t, /*inclusive=*/ !0);
|
|
5403
5409
|
}
|
|
5404
5410
|
|
|
5405
5411
|
/** Helper function to create a bound from a document or fields */ function Pr(t, e, n, r) {
|
|
@@ -5580,7 +5586,7 @@ class xr extends class {
|
|
|
5580
5586
|
}
|
|
5581
5587
|
convertObject(t, e) {
|
|
5582
5588
|
const n = {};
|
|
5583
|
-
return
|
|
5589
|
+
return Tt(t.fields, ((t, r) => {
|
|
5584
5590
|
n[t] = this.convertValue(r, e);
|
|
5585
5591
|
})), n;
|
|
5586
5592
|
}
|
|
@@ -5720,7 +5726,7 @@ function Or(t, e, n, ...r) {
|
|
|
5720
5726
|
* @returns A `Promise` resolved with a `DocumentReference` pointing to the
|
|
5721
5727
|
* newly created document after it has been written to the backend.
|
|
5722
5728
|
*/ function Cr(t, e) {
|
|
5723
|
-
const n = Pn(t = at(t,
|
|
5729
|
+
const n = Pn(t = at(t, An)), r = Dr(t.converter, e), s = jn(Un(t.firestore), "addDoc", n._key, r, null !== n.converter, {});
|
|
5724
5730
|
return un(fn(t.firestore), [ s.toMutation(n._key, $e.exists(!1)) ]).then((() => n));
|
|
5725
5731
|
}
|
|
5726
5732
|
|
|
@@ -6154,7 +6160,7 @@ class Jr {
|
|
|
6154
6160
|
// In transactions, the backend will fail outdated reads with FAILED_PRECONDITION and
|
|
6155
6161
|
// non-matching document versions with ABORTED. These errors should be retried.
|
|
6156
6162
|
const e = t.code;
|
|
6157
|
-
return "aborted" === e || "failed-precondition" === e || !
|
|
6163
|
+
return "aborted" === e || "failed-precondition" === e || "already-exists" === e || !
|
|
6158
6164
|
/**
|
|
6159
6165
|
* Determines whether an error code represents a permanent error when received
|
|
6160
6166
|
* in response to a non-write operation.
|
|
@@ -6658,7 +6664,7 @@ class es {
|
|
|
6658
6664
|
return n && s._setSettings(n), s;
|
|
6659
6665
|
}), "PUBLIC").setMultipleInstances(!0)),
|
|
6660
6666
|
// RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
|
|
6661
|
-
r("firestore-lite", "3.7.
|
|
6667
|
+
r("firestore-lite", "3.7.3-20221109210852", "rn"), r("firestore-lite", "3.7.3-20221109210852", "esm2017");
|
|
6662
6668
|
|
|
6663
|
-
export { _n as AggregateField, vn as AggregateQuerySnapshot, $n as Bytes,
|
|
6669
|
+
export { _n as AggregateField, vn as AggregateQuerySnapshot, $n as Bytes, An as CollectionReference, En as DocumentReference, ur as DocumentSnapshot, Dn as FieldPath, Sn as FieldValue, wn as Firestore, j as FirestoreError, Fn as GeoPoint, In as Query, fr as QueryConstraint, cr as QueryDocumentSnapshot, ar as QuerySnapshot, Et as Timestamp, es as Transaction, Wr as WriteBatch, Cr as addDoc, Mr as aggregateQuerySnapshotEqual, Qr as arrayRemove, Br as arrayUnion, Tn as collection, Rn as collectionGroup, yn as connectFirestoreEmulator, kr as deleteDoc, Ur as deleteField, Pn as doc, xn as documentId, Rr as endAt, Tr as endBefore, Lr as getCount, Sr as getDoc, Fr as getDocs, pn as getFirestore, zr as increment, mn as initializeFirestore, _r as limit, vr as limitToLast, yr as orderBy, dr as query, Nn as queryEqual, Vn as refEqual, ns as runTransaction, jr as serverTimestamp, qr as setDoc, y as setLogLevel, hr as snapshotEqual, Ir as startAfter, Er as startAt, gn as terminate, Or as updateDoc, mr as where, Kr as writeBatch };
|
|
6664
6670
|
//# sourceMappingURL=index.rn.esm2017.js.map
|