@firebase/firestore 3.2.1-canary.dbd54f7c9 → 3.3.0
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 +15 -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 +1084 -1084
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +55 -55
- 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 +69 -69
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +109 -109
- package/package.json +11 -9
|
@@ -6,7 +6,7 @@ import { Component as c } from "@firebase/component";
|
|
|
6
6
|
|
|
7
7
|
import { Logger as f, LogLevel as l } from "@firebase/logger";
|
|
8
8
|
|
|
9
|
-
import { getModularInstance as h, createMockUserToken as
|
|
9
|
+
import { getModularInstance as h, createMockUserToken as p } from "@firebase/util";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @license
|
|
@@ -27,7 +27,7 @@ import { getModularInstance as h, createMockUserToken as d } from "@firebase/uti
|
|
|
27
27
|
/**
|
|
28
28
|
* Simple wrapper around a nullable UID. Mostly exists to make code more
|
|
29
29
|
* readable.
|
|
30
|
-
*/ var
|
|
30
|
+
*/ var d = /** @class */ function() {
|
|
31
31
|
function t(t) {
|
|
32
32
|
this.uid = t;
|
|
33
33
|
}
|
|
@@ -45,11 +45,11 @@ import { getModularInstance as h, createMockUserToken as d } from "@firebase/uti
|
|
|
45
45
|
}, t;
|
|
46
46
|
}();
|
|
47
47
|
|
|
48
|
-
/** A user with a null UID. */
|
|
48
|
+
/** A user with a null UID. */ d.UNAUTHENTICATED = new d(null),
|
|
49
49
|
// TODO(mikelehen): Look into getting a proper uid-equivalent for
|
|
50
50
|
// non-FirebaseAuth providers.
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
d.GOOGLE_CREDENTIALS = new d("google-credentials-uid"), d.FIRST_PARTY = new d("first-party-uid"),
|
|
52
|
+
d.MOCK_USER = new d("mock-user");
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* @license
|
|
@@ -67,7 +67,7 @@ p.MOCK_USER = new p("mock-user");
|
|
|
67
67
|
* See the License for the specific language governing permissions and
|
|
68
68
|
* limitations under the License.
|
|
69
69
|
*/
|
|
70
|
-
var m = "9.
|
|
70
|
+
var m = "9.4.0", y = new f("@firebase/firestore");
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* @license
|
|
@@ -264,7 +264,7 @@ e) {
|
|
|
264
264
|
}, t.prototype.invalidateToken = function() {}, t.prototype.start = function(t, e) {
|
|
265
265
|
// Fire with initial user.
|
|
266
266
|
t.enqueueRetryable((function() {
|
|
267
|
-
return e(
|
|
267
|
+
return e(d.UNAUTHENTICATED);
|
|
268
268
|
}));
|
|
269
269
|
}, t.prototype.shutdown = function() {}, t;
|
|
270
270
|
}(), G = /** @class */ function() {
|
|
@@ -299,13 +299,13 @@ e) {
|
|
|
299
299
|
return t.prototype.getToken = function() {
|
|
300
300
|
var t = this;
|
|
301
301
|
return this.auth ? this.auth.getToken().then((function(e) {
|
|
302
|
-
return e ? (T("string" == typeof e.accessToken), new C(e.accessToken, new
|
|
302
|
+
return e ? (T("string" == typeof e.accessToken), new C(e.accessToken, new d(t.auth.getUid()))) : null;
|
|
303
303
|
})) : Promise.resolve(null);
|
|
304
304
|
}, t.prototype.invalidateToken = function() {}, t.prototype.start = function(t, e) {},
|
|
305
305
|
t.prototype.shutdown = function() {}, t;
|
|
306
306
|
}(), z = /** @class */ function() {
|
|
307
307
|
function t(t, e, n) {
|
|
308
|
-
this.t = t, this.i = e, this.o = n, this.type = "FirstParty", this.user =
|
|
308
|
+
this.t = t, this.i = e, this.o = n, this.type = "FirstParty", this.user = d.FIRST_PARTY;
|
|
309
309
|
}
|
|
310
310
|
return Object.defineProperty(t.prototype, "authHeaders", {
|
|
311
311
|
get: function() {
|
|
@@ -328,7 +328,7 @@ e) {
|
|
|
328
328
|
}, t.prototype.start = function(t, e) {
|
|
329
329
|
// Fire with initial uid.
|
|
330
330
|
t.enqueueRetryable((function() {
|
|
331
|
-
return e(
|
|
331
|
+
return e(d.FIRST_PARTY);
|
|
332
332
|
}));
|
|
333
333
|
}, t.prototype.shutdown = function() {}, t.prototype.invalidateToken = function() {},
|
|
334
334
|
t;
|
|
@@ -937,7 +937,7 @@ var ht = /** @class */ function(r) {
|
|
|
937
937
|
* Generates `nBytes` of random bytes.
|
|
938
938
|
*
|
|
939
939
|
* If `nBytes < 0` , an error will be thrown.
|
|
940
|
-
*/ function
|
|
940
|
+
*/ function pt(t) {
|
|
941
941
|
// Polyfills for IE and WebWorker by using `self` and `msCrypto` when `crypto` is not available.
|
|
942
942
|
var e =
|
|
943
943
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -963,14 +963,14 @@ var ht = /** @class */ function(r) {
|
|
|
963
963
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
964
964
|
* See the License for the specific language governing permissions and
|
|
965
965
|
* limitations under the License.
|
|
966
|
-
*/ var
|
|
966
|
+
*/ var dt = /** @class */ function() {
|
|
967
967
|
function t() {}
|
|
968
968
|
return t.A = function() {
|
|
969
969
|
for (
|
|
970
970
|
// Alphanumeric characters
|
|
971
971
|
var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", e = Math.floor(256 / t.length) * t.length, n = ""
|
|
972
972
|
// The largest byte value that is a multiple of `char.length`.
|
|
973
|
-
; n.length < 20; ) for (var r =
|
|
973
|
+
; n.length < 20; ) for (var r = pt(40), i = 0; i < r.length; ++i)
|
|
974
974
|
// Only accept values that are [0, maxMultiple), this ensures they can
|
|
975
975
|
// be evenly mapped to indices of `chars` via a modulo operation.
|
|
976
976
|
n.length < 20 && r[i] < e && (n += t.charAt(r[i] % t.length));
|
|
@@ -2221,12 +2221,12 @@ function le(t, e) {
|
|
|
2221
2221
|
// Make sure that the structural type of `TransformOperation` is unique.
|
|
2222
2222
|
// See https://github.com/microsoft/TypeScript/issues/5451
|
|
2223
2223
|
this._ = void 0;
|
|
2224
|
-
},
|
|
2224
|
+
}, pe = /** @class */ function(e) {
|
|
2225
2225
|
function n() {
|
|
2226
2226
|
return null !== e && e.apply(this, arguments) || this;
|
|
2227
2227
|
}
|
|
2228
2228
|
return t(n, e), n;
|
|
2229
|
-
}(he),
|
|
2229
|
+
}(he), de = /** @class */ function(e) {
|
|
2230
2230
|
function n(t) {
|
|
2231
2231
|
var n = this;
|
|
2232
2232
|
return (n = e.call(this) || this).elements = t, n;
|
|
@@ -2626,11 +2626,11 @@ function He(t, r) {
|
|
|
2626
2626
|
return e.fieldTransforms.length > 0 && (n.updateTransforms = e.fieldTransforms.map((function(t) {
|
|
2627
2627
|
return function(t, e) {
|
|
2628
2628
|
var n = e.transform;
|
|
2629
|
-
if (n instanceof
|
|
2629
|
+
if (n instanceof pe) return {
|
|
2630
2630
|
fieldPath: e.field.canonicalString(),
|
|
2631
2631
|
setToServerValue: "REQUEST_TIME"
|
|
2632
2632
|
};
|
|
2633
|
-
if (n instanceof
|
|
2633
|
+
if (n instanceof de) return {
|
|
2634
2634
|
fieldPath: e.field.canonicalString(),
|
|
2635
2635
|
appendMissingElements: {
|
|
2636
2636
|
values: n.elements
|
|
@@ -3042,13 +3042,13 @@ function We(t, r) {
|
|
|
3042
3042
|
ssl: !1
|
|
3043
3043
|
})), r.mockUserToken) {
|
|
3044
3044
|
var a, s;
|
|
3045
|
-
if ("string" == typeof r.mockUserToken) a = r.mockUserToken, s =
|
|
3045
|
+
if ("string" == typeof r.mockUserToken) a = r.mockUserToken, s = d.MOCK_USER; else {
|
|
3046
3046
|
// Let createMockUserToken validate first (catches common mistakes like
|
|
3047
3047
|
// invalid field "uid" and missing field "sub" / "user_id".)
|
|
3048
|
-
a =
|
|
3048
|
+
a = p(r.mockUserToken, null === (i = t._app) || void 0 === i ? void 0 : i.options.projectId);
|
|
3049
3049
|
var u = r.mockUserToken.sub || r.mockUserToken.user_id;
|
|
3050
3050
|
if (!u) throw new x(V, "mockUserToken must contain 'sub' or 'user_id' field!");
|
|
3051
|
-
s = new
|
|
3051
|
+
s = new d(u);
|
|
3052
3052
|
}
|
|
3053
3053
|
t._credentials = new G(new C(a, s));
|
|
3054
3054
|
}
|
|
@@ -3263,7 +3263,7 @@ function cn(t, e) {
|
|
|
3263
3263
|
if (t = h(t),
|
|
3264
3264
|
// We allow omission of 'pathString' but explicitly prohibit passing in both
|
|
3265
3265
|
// 'undefined' and 'null'.
|
|
3266
|
-
1 === arguments.length && (e =
|
|
3266
|
+
1 === arguments.length && (e = dt.A()), tt("doc", "path", e), t instanceof Je) {
|
|
3267
3267
|
var o = X.fromString.apply(X, r([ e ], n));
|
|
3268
3268
|
return et(o), new rn(t,
|
|
3269
3269
|
/* converter= */ null, new Z(o));
|
|
@@ -3357,7 +3357,7 @@ var hn = /** @class */ function() {
|
|
|
3357
3357
|
/**
|
|
3358
3358
|
* Returns a special sentinel `FieldPath` to refer to the ID of a document.
|
|
3359
3359
|
* It can be used in queries to sort or filter by the document ID.
|
|
3360
|
-
*/ function
|
|
3360
|
+
*/ function pn() {
|
|
3361
3361
|
return new hn("__name__");
|
|
3362
3362
|
}
|
|
3363
3363
|
|
|
@@ -3379,7 +3379,7 @@ var hn = /** @class */ function() {
|
|
|
3379
3379
|
*/
|
|
3380
3380
|
/**
|
|
3381
3381
|
* An immutable object representing an array of bytes.
|
|
3382
|
-
*/ var
|
|
3382
|
+
*/ var dn = /** @class */ function() {
|
|
3383
3383
|
/** @hideconstructor */
|
|
3384
3384
|
function t(t) {
|
|
3385
3385
|
this._byteString = t;
|
|
@@ -3592,16 +3592,16 @@ function(t) {
|
|
|
3592
3592
|
}),
|
|
3593
3593
|
/** Returns a new context with the specified settings overwritten. */ t.prototype.tt = function(e) {
|
|
3594
3594
|
return new t(Object.assign(Object.assign({}, this.settings), e), this.databaseId, this.S, this.ignoreUndefinedProperties, this.fieldTransforms, this.fieldMask);
|
|
3595
|
-
}, t.prototype.
|
|
3595
|
+
}, t.prototype.et = function(t) {
|
|
3596
3596
|
var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.tt({
|
|
3597
3597
|
path: n,
|
|
3598
|
-
|
|
3598
|
+
nt: !1
|
|
3599
3599
|
});
|
|
3600
3600
|
return r.rt(t), r;
|
|
3601
3601
|
}, t.prototype.st = function(t) {
|
|
3602
3602
|
var e, n = null === (e = this.path) || void 0 === e ? void 0 : e.child(t), r = this.tt({
|
|
3603
3603
|
path: n,
|
|
3604
|
-
|
|
3604
|
+
nt: !1
|
|
3605
3605
|
});
|
|
3606
3606
|
return r.Z(), r;
|
|
3607
3607
|
}, t.prototype.it = function(t) {
|
|
@@ -3609,7 +3609,7 @@ function(t) {
|
|
|
3609
3609
|
// undefined.
|
|
3610
3610
|
return this.tt({
|
|
3611
3611
|
path: void 0,
|
|
3612
|
-
|
|
3612
|
+
nt: !0
|
|
3613
3613
|
});
|
|
3614
3614
|
}, t.prototype.ot = function(t) {
|
|
3615
3615
|
return Cn(t, this.settings.methodName, this.settings.ut || !1, this.path, this.settings.ct);
|
|
@@ -3639,7 +3639,7 @@ function(t) {
|
|
|
3639
3639
|
methodName: e,
|
|
3640
3640
|
ct: n,
|
|
3641
3641
|
path: J.emptyPath(),
|
|
3642
|
-
|
|
3642
|
+
nt: !1,
|
|
3643
3643
|
ut: r
|
|
3644
3644
|
}, this.databaseId, this.S, this.ignoreUndefinedProperties);
|
|
3645
3645
|
}, t;
|
|
@@ -3660,9 +3660,9 @@ function(t) {
|
|
|
3660
3660
|
var s, u, c = jn(r, a);
|
|
3661
3661
|
if (o.merge) s = new _t(a.fieldMask), u = a.fieldTransforms; else if (o.mergeFields) {
|
|
3662
3662
|
for (var f = [], l = 0, h = o.mergeFields; l < h.length; l++) {
|
|
3663
|
-
var
|
|
3664
|
-
if (!a.contains(
|
|
3665
|
-
Mn(f,
|
|
3663
|
+
var p = Un(e, h[l], n);
|
|
3664
|
+
if (!a.contains(p)) throw new x(V, "Field '" + p + "' is specified in your field mask but missing from your input data.");
|
|
3665
|
+
Mn(f, p) || f.push(p);
|
|
3666
3666
|
}
|
|
3667
3667
|
s = new _t(f), u = a.fieldTransforms.filter((function(t) {
|
|
3668
3668
|
return s.covers(t.field);
|
|
@@ -3705,7 +3705,7 @@ var In = /** @class */ function(e) {
|
|
|
3705
3705
|
X: 3 /* Argument */ ,
|
|
3706
3706
|
ct: e.settings.ct,
|
|
3707
3707
|
methodName: t._methodName,
|
|
3708
|
-
|
|
3708
|
+
nt: n
|
|
3709
3709
|
}, e.databaseId, e.S, e.ignoreUndefinedProperties);
|
|
3710
3710
|
}
|
|
3711
3711
|
|
|
@@ -3714,7 +3714,7 @@ var Vn = /** @class */ function(e) {
|
|
|
3714
3714
|
return null !== e && e.apply(this, arguments) || this;
|
|
3715
3715
|
}
|
|
3716
3716
|
return t(n, e), n.prototype._toFieldTransform = function(t) {
|
|
3717
|
-
return new ve(t.path, new
|
|
3717
|
+
return new ve(t.path, new pe);
|
|
3718
3718
|
}, n.prototype.isEqual = function(t) {
|
|
3719
3719
|
return t instanceof n;
|
|
3720
3720
|
}, n;
|
|
@@ -3727,7 +3727,7 @@ var Vn = /** @class */ function(e) {
|
|
|
3727
3727
|
var e = An(this, t,
|
|
3728
3728
|
/*array=*/ !0), n = this.ht.map((function(t) {
|
|
3729
3729
|
return qn(t, e);
|
|
3730
|
-
})), r = new
|
|
3730
|
+
})), r = new de(n);
|
|
3731
3731
|
return new ve(t.path, r);
|
|
3732
3732
|
}, n.prototype.isEqual = function(t) {
|
|
3733
3733
|
// TODO(mrschmidt): Implement isEquals
|
|
@@ -3789,17 +3789,17 @@ var Vn = /** @class */ function(e) {
|
|
|
3789
3789
|
for (var c = 0; c < o.length; c += 2) s.push(Un(e, o[c])), u.push(o[c + 1]);
|
|
3790
3790
|
// We iterate in reverse order to pick the last value for a field if the
|
|
3791
3791
|
// user specified the field multiple times.
|
|
3792
|
-
for (var f = [], l = Ct.empty(),
|
|
3793
|
-
var
|
|
3792
|
+
for (var f = [], l = Ct.empty(), p = s.length - 1; p >= 0; --p) if (!Mn(f, s[p])) {
|
|
3793
|
+
var d = s[p], m = u[p];
|
|
3794
3794
|
// For Compat types, we have to "extract" the underlying types before
|
|
3795
3795
|
// performing validation.
|
|
3796
3796
|
m = h(m);
|
|
3797
|
-
var y = a.st(
|
|
3797
|
+
var y = a.st(d);
|
|
3798
3798
|
if (m instanceof In)
|
|
3799
3799
|
// Add it to the field mask, but don't add anything to updateData.
|
|
3800
|
-
f.push(
|
|
3800
|
+
f.push(d); else {
|
|
3801
3801
|
var v = qn(m, y);
|
|
3802
|
-
null != v && (f.push(
|
|
3802
|
+
null != v && (f.push(d), l.set(d, v));
|
|
3803
3803
|
}
|
|
3804
3804
|
}
|
|
3805
3805
|
var g = new _t(f);
|
|
@@ -3861,7 +3861,7 @@ var Vn = /** @class */ function(e) {
|
|
|
3861
3861
|
// the set of values to be included for the IN query) that may directly
|
|
3862
3862
|
// contain additional arrays (each representing an individual field
|
|
3863
3863
|
// value), so we disable this validation.
|
|
3864
|
-
if (e.settings.
|
|
3864
|
+
if (e.settings.nt && 4 /* ArrayArgument */ !== e.X) throw e.ot("Nested arrays are not supported");
|
|
3865
3865
|
return function(t, e) {
|
|
3866
3866
|
for (var n = [], r = 0, i = 0, o = t; i < o.length; i++) {
|
|
3867
3867
|
var a = qn(o[i], e.it(r));
|
|
@@ -3911,7 +3911,7 @@ var Vn = /** @class */ function(e) {
|
|
|
3911
3911
|
longitude: t.longitude
|
|
3912
3912
|
}
|
|
3913
3913
|
};
|
|
3914
|
-
if (t instanceof
|
|
3914
|
+
if (t instanceof dn) return {
|
|
3915
3915
|
bytesValue: De(e.S, t._byteString)
|
|
3916
3916
|
};
|
|
3917
3917
|
if (t instanceof rn) {
|
|
@@ -3934,7 +3934,7 @@ function jn(t, e) {
|
|
|
3934
3934
|
// If we encounter an empty object, we explicitly add it to the update
|
|
3935
3935
|
// mask to ensure that the server creates a map entry.
|
|
3936
3936
|
e.path && e.path.length > 0 && e.fieldMask.push(e.path) : bt(t, (function(t, r) {
|
|
3937
|
-
var i = qn(r, e.
|
|
3937
|
+
var i = qn(r, e.et(t));
|
|
3938
3938
|
null != i && (n[t] = i);
|
|
3939
3939
|
})), {
|
|
3940
3940
|
mapValue: {
|
|
@@ -3944,7 +3944,7 @@ function jn(t, e) {
|
|
|
3944
3944
|
}
|
|
3945
3945
|
|
|
3946
3946
|
function Ln(t) {
|
|
3947
|
-
return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof vt || t instanceof yn || t instanceof
|
|
3947
|
+
return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof vt || t instanceof yn || t instanceof dn || t instanceof rn || t instanceof mn);
|
|
3948
3948
|
}
|
|
3949
3949
|
|
|
3950
3950
|
function Rn(t, e, n) {
|
|
@@ -4561,20 +4561,20 @@ function hr(t, e, n) {
|
|
|
4561
4561
|
* because we want to provide the user with a more specific error message if
|
|
4562
4562
|
* their `set()` or fails due to invalid data originating from a `toFirestore()`
|
|
4563
4563
|
* call.
|
|
4564
|
-
*/ function
|
|
4564
|
+
*/ function pr(t, e, n) {
|
|
4565
4565
|
// Cast to `any` in order to satisfy the union type constraint on
|
|
4566
4566
|
// toFirestore().
|
|
4567
4567
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4568
4568
|
return t ? n && (n.merge || n.mergeFields) ? t.toFirestore(e, n) : t.toFirestore(e) : e;
|
|
4569
4569
|
}
|
|
4570
4570
|
|
|
4571
|
-
var
|
|
4571
|
+
var dr = /** @class */ function(e) {
|
|
4572
4572
|
function n(t) {
|
|
4573
4573
|
var n = this;
|
|
4574
4574
|
return (n = e.call(this) || this).firestore = t, n;
|
|
4575
4575
|
}
|
|
4576
4576
|
return t(n, e), n.prototype.convertBytes = function(t) {
|
|
4577
|
-
return new
|
|
4577
|
+
return new dn(t);
|
|
4578
4578
|
}, n.prototype.convertReference = function(t) {
|
|
4579
4579
|
var e = this.convertDocumentKey(t, this.firestore._databaseId);
|
|
4580
4580
|
return new rn(this.firestore, /* converter= */ null, e);
|
|
@@ -4670,7 +4670,7 @@ var pr = /** @class */ function(e) {
|
|
|
4670
4670
|
* @returns A Promise resolved with a `DocumentSnapshot` containing the current
|
|
4671
4671
|
* document contents.
|
|
4672
4672
|
*/ function mr(t) {
|
|
4673
|
-
var e = Xe((t = it(t, rn)).firestore), n = new
|
|
4673
|
+
var e = Xe((t = it(t, rn)).firestore), n = new dr(t.firestore);
|
|
4674
4674
|
return Ke(e, [ t._key ]).then((function(e) {
|
|
4675
4675
|
T(1 === e.length);
|
|
4676
4676
|
var r = e[0];
|
|
@@ -4693,7 +4693,7 @@ var pr = /** @class */ function(e) {
|
|
|
4693
4693
|
!function(t) {
|
|
4694
4694
|
if (oe(t) && 0 === t.explicitOrderBy.length) throw new x(L, "limitToLast() queries require specifying at least one orderBy() clause");
|
|
4695
4695
|
}((t = it(t, on))._query);
|
|
4696
|
-
var e = Xe(t.firestore), n = new
|
|
4696
|
+
var e = Xe(t.firestore), n = new dr(t.firestore);
|
|
4697
4697
|
return We(e, t._query).then((function(e) {
|
|
4698
4698
|
var r = e.map((function(e) {
|
|
4699
4699
|
return new Qn(t.firestore, n, e.key, e, t.converter);
|
|
@@ -4707,7 +4707,7 @@ var pr = /** @class */ function(e) {
|
|
|
4707
4707
|
}
|
|
4708
4708
|
|
|
4709
4709
|
function vr(t, e, n) {
|
|
4710
|
-
var r =
|
|
4710
|
+
var r = pr((t = it(t, rn)).converter, e, n), i = En(Tn(t.firestore), "setDoc", t._key, r, null !== t.converter, n);
|
|
4711
4711
|
return He(Xe(t.firestore), [ i.toMutation(t._key, ge.none()) ]);
|
|
4712
4712
|
}
|
|
4713
4713
|
|
|
@@ -4749,7 +4749,7 @@ function gr(t, e, n) {
|
|
|
4749
4749
|
* @returns A `Promise` resolved with a `DocumentReference` pointing to the
|
|
4750
4750
|
* newly created document after it has been written to the backend.
|
|
4751
4751
|
*/ function br(t, e) {
|
|
4752
|
-
var n = cn(t = it(t, an)), r =
|
|
4752
|
+
var n = cn(t = it(t, an)), r = pr(t.converter, e), i = En(Tn(t.firestore), "addDoc", n._key, r, null !== n.converter, {});
|
|
4753
4753
|
return He(Xe(t.firestore), [ i.toMutation(n._key, ge.exists(!1)) ]).then((function() {
|
|
4754
4754
|
return n;
|
|
4755
4755
|
}));
|
|
@@ -4873,7 +4873,7 @@ function gr(t, e, n) {
|
|
|
4873
4873
|
}
|
|
4874
4874
|
return t.prototype.set = function(t, e, n) {
|
|
4875
4875
|
this._verifyNotCommitted();
|
|
4876
|
-
var r = Vr(t, this._firestore), i =
|
|
4876
|
+
var r = Vr(t, this._firestore), i = pr(r.converter, e, n), o = En(this._dataReader, "WriteBatch.set", r._key, i, null !== r.converter, n);
|
|
4877
4877
|
return this._mutations.push(o.toMutation(r._key, ge.none())), this;
|
|
4878
4878
|
}, t.prototype.update = function(t, e, n) {
|
|
4879
4879
|
for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
|
|
@@ -5540,7 +5540,7 @@ function Vr(t, e) {
|
|
|
5540
5540
|
*/;
|
|
5541
5541
|
}
|
|
5542
5542
|
return t.prototype.get = function(t) {
|
|
5543
|
-
var e = this, n = Vr(t, this._firestore), r = new
|
|
5543
|
+
var e = this, n = Vr(t, this._firestore), r = new dr(this._firestore);
|
|
5544
5544
|
return this._transaction.lookup([ n._key ]).then((function(t) {
|
|
5545
5545
|
if (!t || 1 !== t.length) return S();
|
|
5546
5546
|
var i = t[0];
|
|
@@ -5549,7 +5549,7 @@ function Vr(t, e) {
|
|
|
5549
5549
|
throw S();
|
|
5550
5550
|
}));
|
|
5551
5551
|
}, t.prototype.set = function(t, e, n) {
|
|
5552
|
-
var r = Vr(t, this._firestore), i =
|
|
5552
|
+
var r = Vr(t, this._firestore), i = pr(r.converter, e, n), o = En(this._dataReader, "Transaction.set", r._key, i, null !== r.converter, n);
|
|
5553
5553
|
return this._transaction.set(r._key, o), this;
|
|
5554
5554
|
}, t.prototype.update = function(t, e, n) {
|
|
5555
5555
|
for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
|
|
@@ -5624,7 +5624,7 @@ m = i + "_lite", o(new c("firestore/lite", (function(t, e) {
|
|
|
5624
5624
|
return n && i._setSettings(n), i;
|
|
5625
5625
|
}), "PUBLIC" /* PUBLIC */)),
|
|
5626
5626
|
// RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
|
|
5627
|
-
a("firestore-lite", "3.
|
|
5627
|
+
a("firestore-lite", "3.3.0", ""), a("firestore-lite", "3.3.0", "esm5");
|
|
5628
5628
|
|
|
5629
|
-
export {
|
|
5629
|
+
export { dn as Bytes, an as CollectionReference, rn as DocumentReference, Gn as DocumentSnapshot, hn as FieldPath, mn as FieldValue, Je as Firestore, x as FirestoreError, yn as GeoPoint, on as Query, Wn as QueryConstraint, Qn as QueryDocumentSnapshot, zn as QuerySnapshot, vt as Timestamp, qr as Transaction, Ar as WriteBatch, br as addDoc, Er as arrayRemove, Tr as arrayUnion, sn as collection, un as collectionGroup, en as connectFirestoreEmulator, wr as deleteDoc, _r as deleteField, cn as doc, pn as documentId, ur as endAt, sr as endBefore, mr as getDoc, yr as getDocs, tn as getFirestore, Ir as increment, Ze as initializeFirestore, er as limit, nr as limitToLast, Zn as orderBy, Yn as query, ln as queryEqual, fn as refEqual, jr as runTransaction, Sr as serverTimestamp, vr as setDoc, v as setLogLevel, Hn as snapshotEqual, or as startAfter, ir as startAt, nn as terminate, gr as updateDoc, $n as where, Dr as writeBatch };
|
|
5630
5630
|
//# sourceMappingURL=index.browser.esm5.js.map
|