@firebase/firestore 3.1.0-canary.addd8b151 → 3.1.0-canary.e456d00a7
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/dist/index.esm2017.js +2 -2
- package/dist/index.esm5.js +2 -2
- package/dist/index.node.cjs.esm2017.js +2 -2
- package/dist/index.node.cjs.js +2 -2
- package/dist/index.rn.js +2 -2
- package/dist/lite/index.browser.esm2017.js +2 -2
- package/dist/lite/index.browser.esm5.js +47 -47
- package/dist/lite/index.node.cjs.js +2 -2
- package/dist/lite/index.node.esm2017.js +2 -2
- package/dist/lite/index.rn.esm2017.js +69 -69
- package/package.json +9 -9
package/dist/index.esm2017.js
CHANGED
|
@@ -68,7 +68,7 @@ S.MOCK_USER = new S("mock-user");
|
|
|
68
68
|
* See the License for the specific language governing permissions and
|
|
69
69
|
* limitations under the License.
|
|
70
70
|
*/
|
|
71
|
-
let D = "9.1.
|
|
71
|
+
let D = "9.1.1-canary.e456d00a7";
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* @license
|
|
@@ -17773,7 +17773,7 @@ function yh(t, e) {
|
|
|
17773
17773
|
return e = Object.assign({
|
|
17774
17774
|
useFetchStreams: !0
|
|
17775
17775
|
}, e), s._setSettings(e), s;
|
|
17776
|
-
}), "PUBLIC" /* PUBLIC */)), s("@firebase/firestore", "3.1.0-canary.
|
|
17776
|
+
}), "PUBLIC" /* PUBLIC */)), s("@firebase/firestore", "3.1.0-canary.e456d00a7", Sh);
|
|
17777
17777
|
|
|
17778
17778
|
export { eh as AbstractUserDataWriter, Yc as Bytes, Nc as CACHE_SIZE_UNLIMITED, Ac as CollectionReference, Ec as DocumentReference, Du as DocumentSnapshot, Hc as FieldPath, Xc as FieldValue, xc as Firestore, K as FirestoreError, Zc as GeoPoint, Cc as LoadBundleTask, Ic as Query, Ou as QueryConstraint, Cu as QueryDocumentSnapshot, Nu as QuerySnapshot, Su as SnapshotMetadata, st as Timestamp, Eh as Transaction, ih as WriteBatch, uc as _DatabaseId, bt as _DocumentKey, W as _EmptyCredentialsProvider, lt as _FieldPath, mc as _cast, B as _debugAssert, dt as _isBase64Available, O as _logWarn, fc as _validateIsNotUsedTogether, mh as addDoc, Ph as arrayRemove, bh as arrayUnion, Uc as clearIndexedDbPersistence, Rc as collection, bc as collectionGroup, Tc as connectFirestoreEmulator, _h as deleteDoc, Ah as deleteField, jc as disableNetwork, Pc as doc, Jc as documentId, Mc as enableIndexedDbPersistence, Lc as enableMultiTabIndexedDbPersistence, Kc as enableNetwork, Ju as endAt, Hu as endBefore, Oc as ensureFirestoreConfigured, ph as executeWrite, oh as getDoc, ch as getDocFromCache, uh as getDocFromServer, hh as getDocs, lh as getDocsFromCache, fh as getDocsFromServer, $c as getFirestore, vh as increment, kc as initializeFirestore, Ku as limit, ju as limitToLast, Wc as loadBundle, Gc as namedQuery, gh as onSnapshot, yh as onSnapshotsInSync, Uu as orderBy, Fu as query, Vc as queryEqual, vc as refEqual, Ih as runTransaction, Rh as serverTimestamp, dh as setDoc, x as setLogLevel, ku as snapshotEqual, Gu as startAfter, Wu as startAt, Qc as terminate, wh as updateDoc, qc as waitForPendingWrites, Lu as where, Vh as writeBatch };
|
|
17779
17779
|
//# sourceMappingURL=index.esm2017.js.map
|
package/dist/index.esm5.js
CHANGED
|
@@ -69,7 +69,7 @@ R.MOCK_USER = new R("mock-user");
|
|
|
69
69
|
* See the License for the specific language governing permissions and
|
|
70
70
|
* limitations under the License.
|
|
71
71
|
*/
|
|
72
|
-
var O = "9.1.
|
|
72
|
+
var O = "9.1.1-canary.e456d00a7", P = new h("@firebase/firestore");
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* @license
|
|
@@ -18373,7 +18373,7 @@ O = i, o(new c("firestore", (function(t, e) {
|
|
|
18373
18373
|
return n = Object.assign({
|
|
18374
18374
|
useFetchStreams: !0
|
|
18375
18375
|
}, n), i._setSettings(n), i;
|
|
18376
|
-
}), "PUBLIC" /* PUBLIC */)), s("@firebase/firestore", "3.1.0-canary.
|
|
18376
|
+
}), "PUBLIC" /* PUBLIC */)), s("@firebase/firestore", "3.1.0-canary.e456d00a7", undefined);
|
|
18377
18377
|
|
|
18378
18378
|
export { Kc as AbstractUserDataWriter, Vu as Bytes, wu as CACHE_SIZE_UNLIMITED, hu as CollectionReference, uu as DocumentReference, mc as DocumentSnapshot, Fu as FieldPath, qu as FieldValue, bu as Firestore, H as FirestoreError, Uu as GeoPoint, gu as LoadBundleTask, cu as Query, Ec as QueryConstraint, gc as QueryDocumentSnapshot, wc as QuerySnapshot, vc as SnapshotMetadata, at as Timestamp, uh as Transaction, Gc as WriteBatch, Ja as _DatabaseId, kt as _DocumentKey, J as _EmptyCredentialsProvider, yt as _FieldPath, ru as _cast, z as _debugAssert, mt as _isBase64Available, U as _logWarn, Za as _validateIsNotUsedTogether, rh as addDoc, dh as arrayRemove, lh as arrayUnion, Au as clearIndexedDbPersistence, fu as collection, lu as collectionGroup, au as connectFirestoreEmulator, nh as deleteDoc, hh as deleteField, xu as disableNetwork, du as doc, Mu as documentId, Nu as enableIndexedDbPersistence, _u as enableMultiTabIndexedDbPersistence, Cu as enableNetwork, Mc as endAt, Fc as endBefore, Eu as ensureFirestoreConfigured, sh as executeWrite, Hc as getDoc, Yc as getDocFromCache, Jc as getDocFromServer, Xc as getDocs, $c as getDocsFromCache, Zc as getDocsFromServer, Tu as getFirestore, ph as increment, Iu as initializeFirestore, Cc as limit, xc as limitToLast, Ru as loadBundle, Ou as namedQuery, ih as onSnapshot, oh as onSnapshotsInSync, Ac as orderBy, Sc as query, yu as queryEqual, pu as refEqual, ch as runTransaction, fh as serverTimestamp, th as setDoc, M as setLogLevel, Ic as snapshotEqual, Oc as startAfter, Rc as startAt, Lu as terminate, eh as updateDoc, ku as waitForPendingWrites, _c as where, yh as writeBatch };
|
|
18379
18379
|
//# sourceMappingURL=index.esm5.js.map
|
|
@@ -10,7 +10,7 @@ import { resolve, join } from 'path';
|
|
|
10
10
|
import { loadSync } from '@grpc/proto-loader';
|
|
11
11
|
|
|
12
12
|
const name = "@firebase/firestore";
|
|
13
|
-
const version$1 = "3.1.0-canary.
|
|
13
|
+
const version$1 = "3.1.0-canary.e456d00a7";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @license
|
|
@@ -63,7 +63,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
63
63
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
64
64
|
User.MOCK_USER = new User('mock-user');
|
|
65
65
|
|
|
66
|
-
const version = "9.1.
|
|
66
|
+
const version = "9.1.1-canary.e456d00a7";
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* @license
|
package/dist/index.node.cjs.js
CHANGED
|
@@ -15,7 +15,7 @@ var path = require('path');
|
|
|
15
15
|
var protoLoader = require('@grpc/proto-loader');
|
|
16
16
|
|
|
17
17
|
var name = "@firebase/firestore";
|
|
18
|
-
var version$1 = "3.1.0-canary.
|
|
18
|
+
var version$1 = "3.1.0-canary.e456d00a7";
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
@@ -67,7 +67,7 @@ User.UNAUTHENTICATED = new User(null);
|
|
|
67
67
|
User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
68
68
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
69
69
|
User.MOCK_USER = new User('mock-user');
|
|
70
|
-
var version = "9.1.
|
|
70
|
+
var version = "9.1.1-canary.e456d00a7";
|
|
71
71
|
/**
|
|
72
72
|
* @license
|
|
73
73
|
* Copyright 2017 Google LLC
|
package/dist/index.rn.js
CHANGED
|
@@ -68,7 +68,7 @@ D.MOCK_USER = new D("mock-user");
|
|
|
68
68
|
* See the License for the specific language governing permissions and
|
|
69
69
|
* limitations under the License.
|
|
70
70
|
*/
|
|
71
|
-
let C = "9.1.
|
|
71
|
+
let C = "9.1.1-canary.e456d00a7";
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* @license
|
|
@@ -17797,7 +17797,7 @@ Ch = "rn", function(t) {
|
|
|
17797
17797
|
return e = Object.assign({
|
|
17798
17798
|
useFetchStreams: !0
|
|
17799
17799
|
}, e), s._setSettings(e), s;
|
|
17800
|
-
}), "PUBLIC" /* PUBLIC */)), s("@firebase/firestore", "3.1.0-canary.
|
|
17800
|
+
}), "PUBLIC" /* PUBLIC */)), s("@firebase/firestore", "3.1.0-canary.e456d00a7", Ch);
|
|
17801
17801
|
|
|
17802
17802
|
export { sh as AbstractUserDataWriter, Zc as Bytes, kc as CACHE_SIZE_UNLIMITED, bc as CollectionReference, Ac as DocumentReference, Nu as DocumentSnapshot, Yc as FieldPath, tu as FieldValue, $c as Firestore, j as FirestoreError, eu as GeoPoint, xc as LoadBundleTask, Rc as Query, Mu as QueryConstraint, xu as QueryDocumentSnapshot, ku as QuerySnapshot, Cu as SnapshotMetadata, it as Timestamp, Ah as Transaction, oh as WriteBatch, lc as _DatabaseId, vt as _DocumentKey, G as _EmptyCredentialsProvider, ft as _FieldPath, yc as _cast, U as _debugAssert, _t as _isBase64Available, F as _logWarn, wc as _validateIsNotUsedTogether, yh as addDoc, Vh as arrayRemove, vh as arrayUnion, Kc as clearIndexedDbPersistence, Pc as collection, vc as collectionGroup, Ic as connectFirestoreEmulator, gh as deleteDoc, bh as deleteField, Wc as disableNetwork, Vc as doc, Xc as documentId, Bc as enableIndexedDbPersistence, Uc as enableMultiTabIndexedDbPersistence, Qc as enableNetwork, Xu as endAt, Yu as endBefore, Mc as ensureFirestoreConfigured, Eh as executeWrite, ch as getDoc, hh as getDocFromCache, lh as getDocFromServer, fh as getDocs, dh as getDocsFromCache, wh as getDocsFromServer, Fc as getFirestore, Sh as increment, Oc as initializeFirestore, Qu as limit, Wu as limitToLast, zc as loadBundle, Hc as namedQuery, ph as onSnapshot, Th as onSnapshotsInSync, Ku as orderBy, Lu as query, Dc as queryEqual, Sc as refEqual, Rh as runTransaction, Ph as serverTimestamp, _h as setDoc, k as setLogLevel, Ou as snapshotEqual, Hu as startAfter, zu as startAt, Gc as terminate, mh as updateDoc, jc as waitForPendingWrites, Uu as where, Dh as writeBatch };
|
|
17803
17803
|
//# sourceMappingURL=index.rn.js.map
|
|
@@ -66,7 +66,7 @@ h.MOCK_USER = new h("mock-user");
|
|
|
66
66
|
* See the License for the specific language governing permissions and
|
|
67
67
|
* limitations under the License.
|
|
68
68
|
*/
|
|
69
|
-
let l = "9.1.
|
|
69
|
+
let l = "9.1.1-canary.e456d00a7";
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* @license
|
|
@@ -5912,7 +5912,7 @@ class Cr {
|
|
|
5912
5912
|
}(`${s}_lite`), e(new i("firestore/lite", ((t, {options: n}) => {
|
|
5913
5913
|
const e = t.getProvider("app").getImmediate(), r = new ee(e, new B(t.getProvider("auth-internal")));
|
|
5914
5914
|
return n && r._setSettings(n), r;
|
|
5915
|
-
}), "PUBLIC" /* PUBLIC */)), r("firestore-lite", "3.1.0-canary.
|
|
5915
|
+
}), "PUBLIC" /* PUBLIC */)), r("firestore-lite", "3.1.0-canary.e456d00a7", "node");
|
|
5916
5916
|
|
|
5917
5917
|
export { ye as Bytes, ae as CollectionReference, ue as DocumentReference, We as DocumentSnapshot, me as FieldPath, _e as FieldValue, ee as Firestore, L as FirestoreError, ge as GeoPoint, ce as Query, Je as QueryConstraint, Ge as QueryDocumentSnapshot, He as QuerySnapshot, pt as Timestamp, Cr as Transaction, Nr as WriteBatch, Ir as addDoc, Rr as arrayRemove, Pr as arrayUnion, he as collection, le as collectionGroup, ie as connectFirestoreEmulator, Er as deleteDoc, Tr as deleteField, fe as doc, pe as documentId, lr as endAt, hr as endBefore, _r as getDoc, gr as getDocs, se as getFirestore, Vr as increment, re as initializeFirestore, sr as limit, ir as limitToLast, er as orderBy, Ze as query, we as queryEqual, de as refEqual, Lr as runTransaction, Ar as serverTimestamp, br as setDoc, d as setLogLevel, Ye as snapshotEqual, cr as startAfter, ur as startAt, oe as terminate, vr as updateDoc, tr as where, $r as writeBatch };
|
|
5918
5918
|
//# sourceMappingURL=index.browser.esm2017.js.map
|
|
@@ -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.1.
|
|
70
|
+
var m = "9.1.1-canary.e456d00a7", 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;
|
|
@@ -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);
|
|
@@ -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);
|
|
@@ -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) {
|
|
@@ -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];
|
|
@@ -5622,7 +5622,7 @@ function jr(t, e) {
|
|
|
5622
5622
|
m = i + "_lite", o(new c("firestore/lite", (function(t, e) {
|
|
5623
5623
|
var n = e.options, r = t.getProvider("app").getImmediate(), i = new Je(r, new Q(t.getProvider("auth-internal")));
|
|
5624
5624
|
return n && i._setSettings(n), i;
|
|
5625
|
-
}), "PUBLIC" /* PUBLIC */)), a("firestore-lite", "3.1.0-canary.
|
|
5625
|
+
}), "PUBLIC" /* PUBLIC */)), a("firestore-lite", "3.1.0-canary.e456d00a7", "node");
|
|
5626
5626
|
|
|
5627
|
-
export {
|
|
5627
|
+
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 };
|
|
5628
5628
|
//# sourceMappingURL=index.browser.esm5.js.map
|
|
@@ -15,7 +15,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
15
15
|
|
|
16
16
|
var nodeFetch__default = /*#__PURE__*/_interopDefaultLegacy(nodeFetch);
|
|
17
17
|
|
|
18
|
-
var version$1 = "3.1.0-canary.
|
|
18
|
+
var version$1 = "3.1.0-canary.e456d00a7";
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
@@ -67,7 +67,7 @@ User.UNAUTHENTICATED = new User(null);
|
|
|
67
67
|
User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
68
68
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
69
69
|
User.MOCK_USER = new User('mock-user');
|
|
70
|
-
var version = "9.1.
|
|
70
|
+
var version = "9.1.1-canary.e456d00a7";
|
|
71
71
|
/**
|
|
72
72
|
* @license
|
|
73
73
|
* Copyright 2017 Google LLC
|
|
@@ -6,7 +6,7 @@ import { createMockUserToken, getModularInstance } from '@firebase/util';
|
|
|
6
6
|
import nodeFetch from 'node-fetch';
|
|
7
7
|
import { randomBytes as randomBytes$1 } from 'crypto';
|
|
8
8
|
|
|
9
|
-
const version$1 = "3.1.0-canary.
|
|
9
|
+
const version$1 = "3.1.0-canary.e456d00a7";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @license
|
|
@@ -59,7 +59,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
59
59
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
60
60
|
User.MOCK_USER = new User('mock-user');
|
|
61
61
|
|
|
62
|
-
const version = "9.1.
|
|
62
|
+
const version = "9.1.1-canary.e456d00a7";
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* @license
|
|
@@ -66,7 +66,7 @@ l.MOCK_USER = new l("mock-user");
|
|
|
66
66
|
* See the License for the specific language governing permissions and
|
|
67
67
|
* limitations under the License.
|
|
68
68
|
*/
|
|
69
|
-
let f = "9.1.
|
|
69
|
+
let f = "9.1.1-canary.e456d00a7";
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* @license
|
|
@@ -193,14 +193,14 @@ function p(t, ...n) {
|
|
|
193
193
|
* given message if it did.
|
|
194
194
|
*
|
|
195
195
|
* Messages are stripped in production builds.
|
|
196
|
-
*/ function
|
|
196
|
+
*/ function v(t, n) {
|
|
197
197
|
t || g();
|
|
198
198
|
}
|
|
199
199
|
|
|
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 b(t,
|
|
204
204
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
205
205
|
n) {
|
|
206
206
|
return t;
|
|
@@ -339,7 +339,7 @@ n) {
|
|
|
339
339
|
}));
|
|
340
340
|
}
|
|
341
341
|
getToken() {
|
|
342
|
-
return this.auth ? this.auth.getToken().then((t => t ? (
|
|
342
|
+
return this.auth ? this.auth.getToken().then((t => t ? (v("string" == typeof t.accessToken),
|
|
343
343
|
new k(t.accessToken, new l(this.auth.getUid()))) : null)) : Promise.resolve(null);
|
|
344
344
|
}
|
|
345
345
|
invalidateToken() {}
|
|
@@ -1346,7 +1346,7 @@ class yt {
|
|
|
1346
1346
|
return n;
|
|
1347
1347
|
}
|
|
1348
1348
|
|
|
1349
|
-
function
|
|
1349
|
+
function vt(t, n) {
|
|
1350
1350
|
for (const e in t) Object.prototype.hasOwnProperty.call(t, e) && n(e, t[e]);
|
|
1351
1351
|
}
|
|
1352
1352
|
|
|
@@ -1376,7 +1376,7 @@ function bt(t, n) {
|
|
|
1376
1376
|
* If foo is not an object, foo is replaced with an object
|
|
1377
1377
|
* containing foo
|
|
1378
1378
|
*/
|
|
1379
|
-
class
|
|
1379
|
+
class bt {
|
|
1380
1380
|
constructor(t) {
|
|
1381
1381
|
this.fields = t,
|
|
1382
1382
|
// TODO(dimond): validation of FieldMask
|
|
@@ -1527,13 +1527,13 @@ const Tt = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
|
1527
1527
|
// The json interface (for the browser) will return an iso timestamp string,
|
|
1528
1528
|
// while the proto js library (for node) will return a
|
|
1529
1529
|
// google.protobuf.Timestamp instance.
|
|
1530
|
-
if (
|
|
1530
|
+
if (v(!!t), "string" == typeof t) {
|
|
1531
1531
|
// The date string can have higher precision (nanos) than the Date class
|
|
1532
1532
|
// (millis), so we do some custom parsing here.
|
|
1533
1533
|
// Parse the nanos right out of the string.
|
|
1534
1534
|
let n = 0;
|
|
1535
1535
|
const e = Tt.exec(t);
|
|
1536
|
-
if (
|
|
1536
|
+
if (v(!!e), e[1]) {
|
|
1537
1537
|
// Pad the fraction out to 9 digits (nanos).
|
|
1538
1538
|
let t = e[1];
|
|
1539
1539
|
t = (t + "000000000").substr(0, 9), n = Number(t);
|
|
@@ -1831,7 +1831,7 @@ function Ot(t, n) {
|
|
|
1831
1831
|
fields: {}
|
|
1832
1832
|
}
|
|
1833
1833
|
};
|
|
1834
|
-
return
|
|
1834
|
+
return vt(t.mapValue.fields, ((t, e) => n.mapValue.fields[t] = kt(e))), n;
|
|
1835
1835
|
}
|
|
1836
1836
|
if (t.arrayValue) {
|
|
1837
1837
|
const n = {
|
|
@@ -1946,7 +1946,7 @@ function Ot(t, n) {
|
|
|
1946
1946
|
* Modifies `fieldsMap` by adding, replacing or deleting the specified
|
|
1947
1947
|
* entries.
|
|
1948
1948
|
*/ applyChanges(t, n, e) {
|
|
1949
|
-
|
|
1949
|
+
vt(n, ((n, e) => t[n] = e));
|
|
1950
1950
|
for (const n of e) delete t[n];
|
|
1951
1951
|
}
|
|
1952
1952
|
clone() {
|
|
@@ -2330,7 +2330,7 @@ function hn(t) {
|
|
|
2330
2330
|
* which can be different from the order by constraints the user provided (e.g.
|
|
2331
2331
|
* the SDK and backend always orders by `__name__`).
|
|
2332
2332
|
*/ function ln(t) {
|
|
2333
|
-
const n =
|
|
2333
|
+
const n = b(t);
|
|
2334
2334
|
if (null === n.D) {
|
|
2335
2335
|
n.D = [];
|
|
2336
2336
|
const t = an(n), e = cn(n);
|
|
@@ -2355,7 +2355,7 @@ function hn(t) {
|
|
|
2355
2355
|
/**
|
|
2356
2356
|
* Converts this `Query` instance to it's corresponding `Target` representation.
|
|
2357
2357
|
*/ function fn(t) {
|
|
2358
|
-
const n =
|
|
2358
|
+
const n = b(t);
|
|
2359
2359
|
if (!n.$) if ("F" /* First */ === n.limitType) n.$ = zt(n.path, n.collectionGroup, ln(n), n.filters, n.limit, n.startAt, n.endAt); else {
|
|
2360
2360
|
// Flip the orderBy directions since we want the last results
|
|
2361
2361
|
const t = [];
|
|
@@ -2503,7 +2503,7 @@ function wn(t, n) {
|
|
|
2503
2503
|
* See the License for the specific language governing permissions and
|
|
2504
2504
|
* limitations under the License.
|
|
2505
2505
|
*/
|
|
2506
|
-
/** A field path and the TransformOperation to perform upon it. */ class
|
|
2506
|
+
/** A field path and the TransformOperation to perform upon it. */ class vn {
|
|
2507
2507
|
constructor(t, n) {
|
|
2508
2508
|
this.field = t, this.transform = n;
|
|
2509
2509
|
}
|
|
@@ -2513,18 +2513,18 @@ function wn(t, n) {
|
|
|
2513
2513
|
* Encodes a precondition for a mutation. This follows the model that the
|
|
2514
2514
|
* backend accepts with the special case of an explicit "empty" precondition
|
|
2515
2515
|
* (meaning no precondition).
|
|
2516
|
-
*/ class
|
|
2516
|
+
*/ class bn {
|
|
2517
2517
|
constructor(t, n) {
|
|
2518
2518
|
this.updateTime = t, this.exists = n;
|
|
2519
2519
|
}
|
|
2520
2520
|
/** Creates a new empty Precondition. */ static none() {
|
|
2521
|
-
return new
|
|
2521
|
+
return new bn;
|
|
2522
2522
|
}
|
|
2523
2523
|
/** Creates a new Precondition with an exists flag. */ static exists(t) {
|
|
2524
|
-
return new
|
|
2524
|
+
return new bn(void 0, t);
|
|
2525
2525
|
}
|
|
2526
2526
|
/** Creates a new Precondition based on a version a document exists at. */ static updateTime(t) {
|
|
2527
|
-
return new
|
|
2527
|
+
return new bn(t);
|
|
2528
2528
|
}
|
|
2529
2529
|
/** Returns whether this Precondition is empty. */ get isNone() {
|
|
2530
2530
|
return void 0 === this.updateTime && void 0 === this.exists;
|
|
@@ -2718,7 +2718,7 @@ function Fn(t, n) {
|
|
|
2718
2718
|
}
|
|
2719
2719
|
|
|
2720
2720
|
function Sn(t) {
|
|
2721
|
-
return
|
|
2721
|
+
return v(!!t), _t.fromTimestamp(function(t) {
|
|
2722
2722
|
const n = At(t);
|
|
2723
2723
|
return new yt(n.seconds, n.nanos);
|
|
2724
2724
|
}(t));
|
|
@@ -2737,11 +2737,11 @@ function xn(t, n) {
|
|
|
2737
2737
|
function On(t, n) {
|
|
2738
2738
|
const e = function(t) {
|
|
2739
2739
|
const n = K.fromString(t);
|
|
2740
|
-
return
|
|
2740
|
+
return v(Hn(n)), n;
|
|
2741
2741
|
}(n);
|
|
2742
2742
|
if (e.get(1) !== t.databaseId.projectId) throw new U(A, "Tried to deserialize key from different project: " + e.get(1) + " vs " + t.databaseId.projectId);
|
|
2743
2743
|
if (e.get(3) !== t.databaseId.database) throw new U(A, "Tried to deserialize key from different database: " + e.get(3) + " vs " + t.databaseId.database);
|
|
2744
|
-
return new X((
|
|
2744
|
+
return new X((v((r = e).length > 4 && "documents" === r.get(4)), r.popFirst(5)));
|
|
2745
2745
|
var r;
|
|
2746
2746
|
/** Creates a Document proto from key and fields (but no create/update time) */}
|
|
2747
2747
|
|
|
@@ -2762,7 +2762,7 @@ function Un(t, n, e) {
|
|
|
2762
2762
|
|
|
2763
2763
|
function jn(t, n) {
|
|
2764
2764
|
return "found" in n ? function(t, n) {
|
|
2765
|
-
|
|
2765
|
+
v(!!n.found), n.found.name, n.found.updateTime;
|
|
2766
2766
|
const e = On(t, n.found.name), r = Sn(n.found.updateTime), s = new Mt({
|
|
2767
2767
|
mapValue: {
|
|
2768
2768
|
fields: n.found.fields
|
|
@@ -2770,7 +2770,7 @@ function jn(t, n) {
|
|
|
2770
2770
|
});
|
|
2771
2771
|
return Bt.newFoundDocument(e, r, s);
|
|
2772
2772
|
}(t, n) : "missing" in n ? function(t, n) {
|
|
2773
|
-
|
|
2773
|
+
v(!!n.missing), v(!!n.readTime);
|
|
2774
2774
|
const e = On(t, n.missing), r = Sn(n.readTime);
|
|
2775
2775
|
return Bt.newNoDocument(e, r);
|
|
2776
2776
|
}(t, n) : g();
|
|
@@ -3108,14 +3108,14 @@ class Jn extends class {} {
|
|
|
3108
3108
|
// TODO(firestorexp): Make sure there is only one Datastore instance per
|
|
3109
3109
|
// firestore-exp client.
|
|
3110
3110
|
async function Zn(t, n) {
|
|
3111
|
-
const e =
|
|
3111
|
+
const e = b(t), r = Ln(e.S) + "/documents", s = {
|
|
3112
3112
|
writes: n.map((t => kn(e.S, t)))
|
|
3113
3113
|
};
|
|
3114
3114
|
await e.l("Commit", r, s);
|
|
3115
3115
|
}
|
|
3116
3116
|
|
|
3117
3117
|
async function Xn(t, n) {
|
|
3118
|
-
const e =
|
|
3118
|
+
const e = b(t), r = Ln(e.S) + "/documents", s = {
|
|
3119
3119
|
documents: n.map((t => xn(e.S, t)))
|
|
3120
3120
|
}, i = await e.v("BatchGetDocuments", r, s), o = new Map;
|
|
3121
3121
|
i.forEach((t => {
|
|
@@ -3125,12 +3125,12 @@ async function Xn(t, n) {
|
|
|
3125
3125
|
const u = [];
|
|
3126
3126
|
return n.forEach((t => {
|
|
3127
3127
|
const n = o.get(t.toString());
|
|
3128
|
-
|
|
3128
|
+
v(!!n), u.push(n);
|
|
3129
3129
|
})), u;
|
|
3130
3130
|
}
|
|
3131
3131
|
|
|
3132
3132
|
async function te(t, n) {
|
|
3133
|
-
const e =
|
|
3133
|
+
const e = b(t), r = Mn(e.S, fn(n));
|
|
3134
3134
|
return (await e.v("RunQuery", r.parent, {
|
|
3135
3135
|
structuredQuery: r.structuredQuery
|
|
3136
3136
|
})).filter((t => !!t.document)).map((t => function(t, n, e) {
|
|
@@ -3297,7 +3297,7 @@ class re {
|
|
|
3297
3297
|
case "gapi":
|
|
3298
3298
|
const n = t.client;
|
|
3299
3299
|
// Make sure this really is a Gapi client.
|
|
3300
|
-
return
|
|
3300
|
+
return v(!("object" != typeof n || null === n || !n.auth || !n.auth.getAuthHeaderValueForFirstParty)),
|
|
3301
3301
|
new W(n, t.sessionIndex || "0", t.iamToken || null);
|
|
3302
3302
|
|
|
3303
3303
|
case "provider":
|
|
@@ -3758,7 +3758,7 @@ function we(t, n, ...e) {
|
|
|
3758
3758
|
/**
|
|
3759
3759
|
* Sentinel values that can be used when writing document fields with `set()`
|
|
3760
3760
|
* or `update()`.
|
|
3761
|
-
*/ class
|
|
3761
|
+
*/ class ve {
|
|
3762
3762
|
/**
|
|
3763
3763
|
* @param _methodName - The public API endpoint that returns this class.
|
|
3764
3764
|
* @hideconstructor
|
|
@@ -3790,7 +3790,7 @@ function we(t, n, ...e) {
|
|
|
3790
3790
|
*
|
|
3791
3791
|
* Latitude values are in the range of [-90, 90].
|
|
3792
3792
|
* Longitude values are in the range of [-180, 180].
|
|
3793
|
-
*/ class
|
|
3793
|
+
*/ class be {
|
|
3794
3794
|
/**
|
|
3795
3795
|
* Creates a new immutable `GeoPoint` object with the provided latitude and
|
|
3796
3796
|
* longitude values.
|
|
@@ -3993,19 +3993,19 @@ function Ve(t) {
|
|
|
3993
3993
|
Me("Data must be an object, but it was:", o, r);
|
|
3994
3994
|
const u = je(r, o);
|
|
3995
3995
|
let c, a;
|
|
3996
|
-
if (i.merge) c = new
|
|
3996
|
+
if (i.merge) c = new bt(o.fieldMask), a = o.fieldTransforms; else if (i.mergeFields) {
|
|
3997
3997
|
const t = [];
|
|
3998
3998
|
for (const r of i.mergeFields) {
|
|
3999
3999
|
const s = Be(n, r, e);
|
|
4000
4000
|
if (!o.contains(s)) throw new U(A, `Field '${s}' is specified in your field mask but missing from your input data.`);
|
|
4001
4001
|
Ge(t, s) || t.push(s);
|
|
4002
4002
|
}
|
|
4003
|
-
c = new
|
|
4003
|
+
c = new bt(t), a = o.fieldTransforms.filter((t => c.covers(t.field)));
|
|
4004
4004
|
} else c = null, a = o.fieldTransforms;
|
|
4005
4005
|
return new Ie(new Mt(u), c, a);
|
|
4006
4006
|
}
|
|
4007
4007
|
|
|
4008
|
-
class De extends
|
|
4008
|
+
class De extends ve {
|
|
4009
4009
|
_toFieldTransform(t) {
|
|
4010
4010
|
if (2 /* MergeSet */ !== t.X) throw 1 /* Update */ === t.X ? t.ot(`${this._methodName}() can only appear at the top level of your update data`) : t.ot(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);
|
|
4011
4011
|
// No transform to add for a delete, but we need to add it to our
|
|
@@ -4041,23 +4041,23 @@ class De extends be {
|
|
|
4041
4041
|
}, n.databaseId, n.S, n.ignoreUndefinedProperties);
|
|
4042
4042
|
}
|
|
4043
4043
|
|
|
4044
|
-
class Fe extends
|
|
4044
|
+
class Fe extends ve {
|
|
4045
4045
|
_toFieldTransform(t) {
|
|
4046
|
-
return new
|
|
4046
|
+
return new vn(t.path, new pn);
|
|
4047
4047
|
}
|
|
4048
4048
|
isEqual(t) {
|
|
4049
4049
|
return t instanceof Fe;
|
|
4050
4050
|
}
|
|
4051
4051
|
}
|
|
4052
4052
|
|
|
4053
|
-
class Se extends
|
|
4053
|
+
class Se extends ve {
|
|
4054
4054
|
constructor(t, n) {
|
|
4055
4055
|
super(t), this.ht = n;
|
|
4056
4056
|
}
|
|
4057
4057
|
_toFieldTransform(t) {
|
|
4058
4058
|
const n = $e(this, t,
|
|
4059
4059
|
/*array=*/ !0), e = this.ht.map((t => Ue(t, n))), r = new yn(e);
|
|
4060
|
-
return new
|
|
4060
|
+
return new vn(t.path, r);
|
|
4061
4061
|
}
|
|
4062
4062
|
isEqual(t) {
|
|
4063
4063
|
// TODO(mrschmidt): Implement isEquals
|
|
@@ -4065,14 +4065,14 @@ class Se extends be {
|
|
|
4065
4065
|
}
|
|
4066
4066
|
}
|
|
4067
4067
|
|
|
4068
|
-
class qe extends
|
|
4068
|
+
class qe extends ve {
|
|
4069
4069
|
constructor(t, n) {
|
|
4070
4070
|
super(t), this.ht = n;
|
|
4071
4071
|
}
|
|
4072
4072
|
_toFieldTransform(t) {
|
|
4073
4073
|
const n = $e(this, t,
|
|
4074
4074
|
/*array=*/ !0), e = this.ht.map((t => Ue(t, n))), r = new _n(e);
|
|
4075
|
-
return new
|
|
4075
|
+
return new vn(t.path, r);
|
|
4076
4076
|
}
|
|
4077
4077
|
isEqual(t) {
|
|
4078
4078
|
// TODO(mrschmidt): Implement isEquals
|
|
@@ -4080,13 +4080,13 @@ class qe extends be {
|
|
|
4080
4080
|
}
|
|
4081
4081
|
}
|
|
4082
4082
|
|
|
4083
|
-
class xe extends
|
|
4083
|
+
class xe extends ve {
|
|
4084
4084
|
constructor(t, n) {
|
|
4085
4085
|
super(t), this.lt = n;
|
|
4086
4086
|
}
|
|
4087
4087
|
_toFieldTransform(t) {
|
|
4088
4088
|
const n = new gn(t.S, wn(t.S, this.lt));
|
|
4089
|
-
return new
|
|
4089
|
+
return new vn(t.path, n);
|
|
4090
4090
|
}
|
|
4091
4091
|
isEqual(t) {
|
|
4092
4092
|
// TODO(mrschmidt): Implement isEquals
|
|
@@ -4098,7 +4098,7 @@ class xe extends be {
|
|
|
4098
4098
|
const s = t.at(1 /* Update */ , n, e);
|
|
4099
4099
|
Me("Data must be an object, but it was:", s, r);
|
|
4100
4100
|
const i = [], o = Mt.empty();
|
|
4101
|
-
|
|
4101
|
+
vt(r, ((t, r) => {
|
|
4102
4102
|
const u = ze(n, t, e);
|
|
4103
4103
|
// For Compat types, we have to "extract" the underlying types before
|
|
4104
4104
|
// performing validation.
|
|
@@ -4111,7 +4111,7 @@ class xe extends be {
|
|
|
4111
4111
|
null != t && (i.push(u), o.set(u, t));
|
|
4112
4112
|
}
|
|
4113
4113
|
}));
|
|
4114
|
-
const u = new
|
|
4114
|
+
const u = new bt(i);
|
|
4115
4115
|
return new Te(o, u, s.fieldTransforms);
|
|
4116
4116
|
}
|
|
4117
4117
|
|
|
@@ -4136,7 +4136,7 @@ class xe extends be {
|
|
|
4136
4136
|
null != t && (a.push(n), l.set(n, t));
|
|
4137
4137
|
}
|
|
4138
4138
|
}
|
|
4139
|
-
const f = new
|
|
4139
|
+
const f = new bt(a);
|
|
4140
4140
|
return new Te(l, f, o.fieldTransforms);
|
|
4141
4141
|
}
|
|
4142
4142
|
|
|
@@ -4163,7 +4163,7 @@ class xe extends be {
|
|
|
4163
4163
|
// Unwrap the API type from the Compat SDK. This will return the API type
|
|
4164
4164
|
// from firestore-exp.
|
|
4165
4165
|
t = h(t))) return Me("Unsupported field value:", n, t), je(t, n);
|
|
4166
|
-
if (t instanceof
|
|
4166
|
+
if (t instanceof ve)
|
|
4167
4167
|
// FieldValues usually parse into transforms (except FieldValue.delete())
|
|
4168
4168
|
// in which case we do not want to include this field in our parsed data
|
|
4169
4169
|
// (as doing so will overwrite the field directly prior to the transform
|
|
@@ -4246,7 +4246,7 @@ class xe extends be {
|
|
|
4246
4246
|
timestampValue: Dn(n.S, e)
|
|
4247
4247
|
};
|
|
4248
4248
|
}
|
|
4249
|
-
if (t instanceof
|
|
4249
|
+
if (t instanceof be) return {
|
|
4250
4250
|
geoPointValue: {
|
|
4251
4251
|
latitude: t.latitude,
|
|
4252
4252
|
longitude: t.longitude
|
|
@@ -4278,7 +4278,7 @@ function je(t, n) {
|
|
|
4278
4278
|
return !function(t) {
|
|
4279
4279
|
for (const n in t) if (Object.prototype.hasOwnProperty.call(t, n)) return !1;
|
|
4280
4280
|
return !0;
|
|
4281
|
-
}(t) ?
|
|
4281
|
+
}(t) ? vt(t, ((t, r) => {
|
|
4282
4282
|
const s = Ue(r, n.nt(t));
|
|
4283
4283
|
null != s && (e[t] = s);
|
|
4284
4284
|
})) :
|
|
@@ -4292,7 +4292,7 @@ function je(t, n) {
|
|
|
4292
4292
|
}
|
|
4293
4293
|
|
|
4294
4294
|
function ke(t) {
|
|
4295
|
-
return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof yt || t instanceof
|
|
4295
|
+
return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof yt || t instanceof be || t instanceof ge || t instanceof ae || t instanceof ve);
|
|
4296
4296
|
}
|
|
4297
4297
|
|
|
4298
4298
|
function Me(t, n, e) {
|
|
@@ -4726,10 +4726,10 @@ class ir extends Xe {
|
|
|
4726
4726
|
|
|
4727
4727
|
class cr extends Xe {
|
|
4728
4728
|
constructor(t, n, e) {
|
|
4729
|
-
super(), this.type = t, this.
|
|
4729
|
+
super(), this.type = t, this.vt = n, this.bt = e;
|
|
4730
4730
|
}
|
|
4731
4731
|
_apply(t) {
|
|
4732
|
-
const n = wr(t, this.type, this.
|
|
4732
|
+
const n = wr(t, this.type, this.vt, this.bt);
|
|
4733
4733
|
return new he(t.firestore, t.converter, function(t, n) {
|
|
4734
4734
|
return new on(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, n, t.endAt);
|
|
4735
4735
|
}(t._query, n));
|
|
@@ -4747,10 +4747,10 @@ function hr(...t) {
|
|
|
4747
4747
|
|
|
4748
4748
|
class lr extends Xe {
|
|
4749
4749
|
constructor(t, n, e) {
|
|
4750
|
-
super(), this.type = t, this.
|
|
4750
|
+
super(), this.type = t, this.vt = n, this.bt = e;
|
|
4751
4751
|
}
|
|
4752
4752
|
_apply(t) {
|
|
4753
|
-
const n = wr(t, this.type, this.
|
|
4753
|
+
const n = wr(t, this.type, this.vt, this.bt);
|
|
4754
4754
|
return new he(t.firestore, t.converter, function(t, n) {
|
|
4755
4755
|
return new on(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, n);
|
|
4756
4756
|
}(t._query, n));
|
|
@@ -4943,12 +4943,12 @@ class gr extends class {
|
|
|
4943
4943
|
}
|
|
4944
4944
|
convertObject(t, n) {
|
|
4945
4945
|
const e = {};
|
|
4946
|
-
return
|
|
4946
|
+
return vt(t.fields, ((t, r) => {
|
|
4947
4947
|
e[t] = this.convertValue(r, n);
|
|
4948
4948
|
})), e;
|
|
4949
4949
|
}
|
|
4950
4950
|
convertGeoPoint(t) {
|
|
4951
|
-
return new
|
|
4951
|
+
return new be(Pt(t.latitude), Pt(t.longitude));
|
|
4952
4952
|
}
|
|
4953
4953
|
convertArray(t, n) {
|
|
4954
4954
|
return (t.values || []).map((t => this.convertValue(t, n)));
|
|
@@ -4972,7 +4972,7 @@ class gr extends class {
|
|
|
4972
4972
|
}
|
|
4973
4973
|
convertDocumentKey(t, n) {
|
|
4974
4974
|
const e = K.fromString(t);
|
|
4975
|
-
|
|
4975
|
+
v(Hn(e));
|
|
4976
4976
|
const r = new H(e.get(1), e.get(3)), s = new X(e.popFirst(5));
|
|
4977
4977
|
return r.isEqual(n) ||
|
|
4978
4978
|
// TODO(b/64130202): Somehow support foreign references.
|
|
@@ -5004,10 +5004,10 @@ class gr extends class {
|
|
|
5004
5004
|
* @param reference - The reference of the document to fetch.
|
|
5005
5005
|
* @returns A Promise resolved with a `DocumentSnapshot` containing the current
|
|
5006
5006
|
* document contents.
|
|
5007
|
-
*/ function
|
|
5007
|
+
*/ function vr(t) {
|
|
5008
5008
|
const n = ee((t = st(t, ae)).firestore), e = new gr(t.firestore);
|
|
5009
5009
|
return Xn(n, [ t._key ]).then((n => {
|
|
5010
|
-
|
|
5010
|
+
v(1 === n.length);
|
|
5011
5011
|
const r = n[0];
|
|
5012
5012
|
return new He(t.firestore, e, t._key, r.isFoundDocument() ? r : null, t.converter);
|
|
5013
5013
|
}));
|
|
@@ -5024,7 +5024,7 @@ class gr extends class {
|
|
|
5024
5024
|
*
|
|
5025
5025
|
* @param query - The `Query` to execute.
|
|
5026
5026
|
* @returns A Promise that will be resolved with the results of the query.
|
|
5027
|
-
*/ function
|
|
5027
|
+
*/ function br(t) {
|
|
5028
5028
|
!function(t) {
|
|
5029
5029
|
if (un(t) && 0 === t.explicitOrderBy.length) throw new U(x, "limitToLast() queries require specifying at least one orderBy() clause");
|
|
5030
5030
|
}((t = st(t, he))._query);
|
|
@@ -5041,7 +5041,7 @@ class gr extends class {
|
|
|
5041
5041
|
|
|
5042
5042
|
function Er(t, n, e) {
|
|
5043
5043
|
const r = _r((t = st(t, ae)).converter, n, e), s = Ne(Ve(t.firestore), "setDoc", t._key, r, null !== t.converter, e);
|
|
5044
|
-
return Zn(ee(t.firestore), [ s.toMutation(t._key,
|
|
5044
|
+
return Zn(ee(t.firestore), [ s.toMutation(t._key, bn.none()) ]);
|
|
5045
5045
|
}
|
|
5046
5046
|
|
|
5047
5047
|
function Ir(t, n, e, ...r) {
|
|
@@ -5050,7 +5050,7 @@ function Ir(t, n, e, ...r) {
|
|
|
5050
5050
|
// performing validation.
|
|
5051
5051
|
let i;
|
|
5052
5052
|
i = "string" == typeof (n = h(n)) || n instanceof ye ? Ce(s, "updateDoc", t._key, n, e, r) : Oe(s, "updateDoc", t._key, n);
|
|
5053
|
-
return Zn(ee(t.firestore), [ i.toMutation(t._key,
|
|
5053
|
+
return Zn(ee(t.firestore), [ i.toMutation(t._key, bn.exists(!0)) ]);
|
|
5054
5054
|
}
|
|
5055
5055
|
|
|
5056
5056
|
/**
|
|
@@ -5065,7 +5065,7 @@ function Ir(t, n, e, ...r) {
|
|
|
5065
5065
|
* @returns A `Promise` resolved once the document has been successfully
|
|
5066
5066
|
* deleted from the backend.
|
|
5067
5067
|
*/ function Tr(t) {
|
|
5068
|
-
return Zn(ee((t = st(t, ae)).firestore), [ new An(t._key,
|
|
5068
|
+
return Zn(ee((t = st(t, ae)).firestore), [ new An(t._key, bn.none()) ]);
|
|
5069
5069
|
}
|
|
5070
5070
|
|
|
5071
5071
|
/**
|
|
@@ -5083,7 +5083,7 @@ function Ir(t, n, e, ...r) {
|
|
|
5083
5083
|
* newly created document after it has been written to the backend.
|
|
5084
5084
|
*/ function Ar(t, n) {
|
|
5085
5085
|
const e = we(t = st(t, le)), r = _r(t.converter, n), s = Ne(Ve(t.firestore), "addDoc", e._key, r, null !== e.converter, {});
|
|
5086
|
-
return Zn(ee(t.firestore), [ s.toMutation(e._key,
|
|
5086
|
+
return Zn(ee(t.firestore), [ s.toMutation(e._key, bn.exists(!1)) ]).then((() => e));
|
|
5087
5087
|
}
|
|
5088
5088
|
|
|
5089
5089
|
/**
|
|
@@ -5203,7 +5203,7 @@ function Ir(t, n, e, ...r) {
|
|
|
5203
5203
|
set(t, n, e) {
|
|
5204
5204
|
this._verifyNotCommitted();
|
|
5205
5205
|
const r = Fr(t, this._firestore), s = _r(r.converter, n, e), i = Ne(this._dataReader, "WriteBatch.set", r._key, s, null !== r.converter, e);
|
|
5206
|
-
return this._mutations.push(i.toMutation(r._key,
|
|
5206
|
+
return this._mutations.push(i.toMutation(r._key, bn.none())), this;
|
|
5207
5207
|
}
|
|
5208
5208
|
update(t, n, e, ...r) {
|
|
5209
5209
|
this._verifyNotCommitted();
|
|
@@ -5212,7 +5212,7 @@ function Ir(t, n, e, ...r) {
|
|
|
5212
5212
|
// performing validation.
|
|
5213
5213
|
let i;
|
|
5214
5214
|
return i = "string" == typeof (n = h(n)) || n instanceof ye ? Ce(this._dataReader, "WriteBatch.update", s._key, n, e, r) : Oe(this._dataReader, "WriteBatch.update", s._key, n),
|
|
5215
|
-
this._mutations.push(i.toMutation(s._key,
|
|
5215
|
+
this._mutations.push(i.toMutation(s._key, bn.exists(!0))), this;
|
|
5216
5216
|
}
|
|
5217
5217
|
/**
|
|
5218
5218
|
* Deletes the document referred to by the provided {@link DocumentReference}.
|
|
@@ -5222,7 +5222,7 @@ function Ir(t, n, e, ...r) {
|
|
|
5222
5222
|
*/ delete(t) {
|
|
5223
5223
|
this._verifyNotCommitted();
|
|
5224
5224
|
const n = Fr(t, this._firestore);
|
|
5225
|
-
return this._mutations = this._mutations.concat(new An(n._key,
|
|
5225
|
+
return this._mutations = this._mutations.concat(new An(n._key, bn.none())), this;
|
|
5226
5226
|
}
|
|
5227
5227
|
/**
|
|
5228
5228
|
* Commits all of the writes in this write batch as a single atomic unit.
|
|
@@ -5354,7 +5354,7 @@ function Fr(t, n) {
|
|
|
5354
5354
|
* as a precondition, or no precondition if it was not read.
|
|
5355
5355
|
*/ precondition(t) {
|
|
5356
5356
|
const n = this.readVersions.get(t.toString());
|
|
5357
|
-
return !this.writtenDocs.has(t.toString()) && n ?
|
|
5357
|
+
return !this.writtenDocs.has(t.toString()) && n ? bn.updateTime(n) : bn.none();
|
|
5358
5358
|
}
|
|
5359
5359
|
/**
|
|
5360
5360
|
* Returns the precondition for a document if the operation is an update.
|
|
@@ -5375,11 +5375,11 @@ function Fr(t, n) {
|
|
|
5375
5375
|
// transaction.
|
|
5376
5376
|
throw new U(A, "Can't update a document that doesn't exist.");
|
|
5377
5377
|
// Document exists, base precondition on document update time.
|
|
5378
|
-
return
|
|
5378
|
+
return bn.updateTime(n);
|
|
5379
5379
|
}
|
|
5380
5380
|
// Document was not read, so we just use the preconditions for a blind
|
|
5381
5381
|
// update.
|
|
5382
|
-
return
|
|
5382
|
+
return bn.exists(!0);
|
|
5383
5383
|
}
|
|
5384
5384
|
write(t) {
|
|
5385
5385
|
this.ensureCommitNotCalled(), this.mutations.push(t);
|
|
@@ -5925,7 +5925,7 @@ class Ur {
|
|
|
5925
5925
|
}(`${s}_lite`), e(new i("firestore/lite", ((t, {options: n}) => {
|
|
5926
5926
|
const e = t.getProvider("app").getImmediate(), r = new se(e, new Q(t.getProvider("auth-internal")));
|
|
5927
5927
|
return n && r._setSettings(n), r;
|
|
5928
|
-
}), "PUBLIC" /* PUBLIC */)), r("firestore-lite", "3.1.0-canary.
|
|
5928
|
+
}), "PUBLIC" /* PUBLIC */)), r("firestore-lite", "3.1.0-canary.e456d00a7", "node");
|
|
5929
5929
|
|
|
5930
|
-
export { ge as Bytes, le as CollectionReference, ae as DocumentReference, He as DocumentSnapshot, ye as FieldPath,
|
|
5930
|
+
export { ge as Bytes, le as CollectionReference, ae as DocumentReference, He as DocumentSnapshot, ye as FieldPath, ve as FieldValue, se as Firestore, U as FirestoreError, be as GeoPoint, he as Query, Xe as QueryConstraint, Ye as QueryDocumentSnapshot, Ke as QuerySnapshot, yt as Timestamp, Ur as Transaction, $r as WriteBatch, Ar as addDoc, Nr as arrayRemove, Vr as arrayUnion, fe as collection, de as collectionGroup, ue as connectFirestoreEmulator, Tr as deleteDoc, Pr as deleteField, we as doc, _e as documentId, dr as endAt, fr as endBefore, vr as getDoc, br as getDocs, oe as getFirestore, Dr as increment, ie as initializeFirestore, or as limit, ur as limitToLast, sr as orderBy, tr as query, pe as queryEqual, me as refEqual, jr as runTransaction, Rr as serverTimestamp, Er as setDoc, w as setLogLevel, Je as snapshotEqual, hr as startAfter, ar as startAt, ce as terminate, Ir as updateDoc, er as where, Sr as writeBatch };
|
|
5931
5931
|
//# sourceMappingURL=index.rn.esm2017.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/firestore",
|
|
3
|
-
"version": "3.1.0-canary.
|
|
3
|
+
"version": "3.1.0-canary.e456d00a7",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": "^8.13.0 || >=10.10.0"
|
|
6
6
|
},
|
|
@@ -69,22 +69,22 @@
|
|
|
69
69
|
"lite/package.json"
|
|
70
70
|
],
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@firebase/component": "0.5.7-canary.
|
|
73
|
-
"@firebase/logger": "0.3.0-canary.
|
|
74
|
-
"@firebase/util": "1.4.0-canary.
|
|
75
|
-
"@firebase/webchannel-wrapper": "0.6.0-canary.
|
|
72
|
+
"@firebase/component": "0.5.7-canary.e456d00a7",
|
|
73
|
+
"@firebase/logger": "0.3.0-canary.e456d00a7",
|
|
74
|
+
"@firebase/util": "1.4.0-canary.e456d00a7",
|
|
75
|
+
"@firebase/webchannel-wrapper": "0.6.0-canary.e456d00a7",
|
|
76
76
|
"@grpc/grpc-js": "^1.3.2",
|
|
77
77
|
"@grpc/proto-loader": "^0.6.0",
|
|
78
78
|
"node-fetch": "2.6.5",
|
|
79
79
|
"tslib": "^2.1.0"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
|
-
"@firebase/app": "0.7.
|
|
82
|
+
"@firebase/app": "0.7.2-canary.e456d00a7"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@firebase/app": "0.7.
|
|
86
|
-
"@firebase/app-compat": "0.1.
|
|
87
|
-
"@firebase/auth": "0.18.
|
|
85
|
+
"@firebase/app": "0.7.2-canary.e456d00a7",
|
|
86
|
+
"@firebase/app-compat": "0.1.3-canary.e456d00a7",
|
|
87
|
+
"@firebase/auth": "0.18.1-canary.e456d00a7",
|
|
88
88
|
"@rollup/plugin-alias": "3.1.5",
|
|
89
89
|
"@rollup/plugin-json": "4.1.0",
|
|
90
90
|
"@types/eslint": "7.28.0",
|