@firebase/firestore 3.4.7-canary.7a4e65cef → 3.4.7-canary.e9e5f6b3c
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 +142 -142
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +61 -61
- 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/lite/index.browser.esm2017.js +73 -73
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +8 -8
- package/dist/lite/index.node.cjs.js +2 -2
- package/dist/lite/index.node.mjs +2 -2
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +2 -2
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +18 -18
- package/dist/packages/firestore/dist/index.esm2017.d.ts +8 -8
- package/package.json +9 -9
package/dist/index.esm5.js
CHANGED
|
@@ -70,7 +70,7 @@ L.MOCK_USER = new L("mock-user");
|
|
|
70
70
|
* See the License for the specific language governing permissions and
|
|
71
71
|
* limitations under the License.
|
|
72
72
|
*/
|
|
73
|
-
var P = "9.6.10-canary.
|
|
73
|
+
var P = "9.6.10-canary.e9e5f6b3c", O = new l("@firebase/firestore");
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* @license
|
|
@@ -5210,7 +5210,7 @@ function Kr(t) {
|
|
|
5210
5210
|
}), t.prototype.abort = function(t) {
|
|
5211
5211
|
t && this.At.reject(t), this.aborted || (U("SimpleDb", "Aborting transaction:", t ? t.message : "Client-initiated abort"),
|
|
5212
5212
|
this.aborted = !0, this.transaction.abort());
|
|
5213
|
-
}, t.prototype.
|
|
5213
|
+
}, t.prototype.bt = function() {
|
|
5214
5214
|
// If the browser supports V3 IndexedDB, we invoke commit() explicitly to
|
|
5215
5215
|
// speed up index DB processing if the event loop remains blocks.
|
|
5216
5216
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -5241,7 +5241,7 @@ function Kr(t) {
|
|
|
5241
5241
|
* objectstores.
|
|
5242
5242
|
*/
|
|
5243
5243
|
function t(e, n, r) {
|
|
5244
|
-
this.name = e, this.version = n, this.
|
|
5244
|
+
this.name = e, this.version = n, this.Pt = r,
|
|
5245
5245
|
// NOTE: According to https://bugs.webkit.org/show_bug.cgi?id=197050, the
|
|
5246
5246
|
// bug we're checking for should exist in iOS >= 12.2 and < 13, but for
|
|
5247
5247
|
// whatever reason it's much harder to hit after 12.2 so we only proactively
|
|
@@ -5323,7 +5323,7 @@ function Kr(t) {
|
|
|
5323
5323
|
}, i.onupgradeneeded = function(t) {
|
|
5324
5324
|
U("SimpleDb", 'Database "' + n.name + '" requires upgrade from version:', t.oldVersion);
|
|
5325
5325
|
var e = t.target.result;
|
|
5326
|
-
n.
|
|
5326
|
+
n.Pt.kt(e, i.transaction, t.oldVersion, n.version).next((function() {
|
|
5327
5327
|
U("SimpleDb", "Database upgrade to version " + n.version + " complete");
|
|
5328
5328
|
}));
|
|
5329
5329
|
};
|
|
@@ -5364,7 +5364,7 @@ function Kr(t) {
|
|
|
5364
5364
|
// fire), but still return the original transactionFnResult back to the
|
|
5365
5365
|
// caller.
|
|
5366
5366
|
return a.db = r.sent(), e = gi.open(a.db, t, n ? "readonly" : "readwrite", i), s = o(e).next((function(t) {
|
|
5367
|
-
return e.
|
|
5367
|
+
return e.bt(), t;
|
|
5368
5368
|
})).catch((function(t) {
|
|
5369
5369
|
// Abort the transaction if there was an error.
|
|
5370
5370
|
return e.abort(t), mi.reject(t);
|
|
@@ -6346,8 +6346,8 @@ var $i = /** @class */ function() {
|
|
|
6346
6346
|
* Writes the "infinity" byte sequence that sorts after all other byte
|
|
6347
6347
|
* sequences written in ascending order.
|
|
6348
6348
|
*/
|
|
6349
|
-
t.prototype.
|
|
6350
|
-
this.
|
|
6349
|
+
t.prototype.be = function() {
|
|
6350
|
+
this.Pe(255), this.Pe(255);
|
|
6351
6351
|
},
|
|
6352
6352
|
/**
|
|
6353
6353
|
* Writes the "infinity" byte sequence that sorts before all other byte
|
|
@@ -6391,16 +6391,16 @@ var $i = /** @class */ function() {
|
|
|
6391
6391
|
},
|
|
6392
6392
|
/** Writes a single byte ascending to the buffer. */ t.prototype._e = function(t) {
|
|
6393
6393
|
var e = 255 & t;
|
|
6394
|
-
0 === e ? (this.
|
|
6394
|
+
0 === e ? (this.Pe(0), this.Pe(255)) : 255 === e ? (this.Pe(255), this.Pe(0)) : this.Pe(e);
|
|
6395
6395
|
},
|
|
6396
6396
|
/** Writes a single byte descending to the buffer. */ t.prototype.ge = function(t) {
|
|
6397
6397
|
var e = 255 & t;
|
|
6398
6398
|
0 === e ? (this.ve(0), this.ve(255)) : 255 === e ? (this.ve(255), this.ve(0)) : this.ve(t);
|
|
6399
6399
|
}, t.prototype.we = function() {
|
|
6400
|
-
this.
|
|
6400
|
+
this.Pe(0), this.Pe(1);
|
|
6401
6401
|
}, t.prototype.ye = function() {
|
|
6402
6402
|
this.ve(0), this.ve(1);
|
|
6403
|
-
}, t.prototype.
|
|
6403
|
+
}, t.prototype.Pe = function(t) {
|
|
6404
6404
|
this.Ae(1), this.buffer[this.position++] = t;
|
|
6405
6405
|
}, t.prototype.ve = function(t) {
|
|
6406
6406
|
this.Ae(1), this.buffer[this.position++] = ~t;
|
|
@@ -6428,7 +6428,7 @@ var $i = /** @class */ function() {
|
|
|
6428
6428
|
}, t.prototype.se = function(t) {
|
|
6429
6429
|
this.De.Te(t);
|
|
6430
6430
|
}, t.prototype.ee = function() {
|
|
6431
|
-
this.De.
|
|
6431
|
+
this.De.be();
|
|
6432
6432
|
}, t;
|
|
6433
6433
|
}(), to = /** @class */ function() {
|
|
6434
6434
|
function t(t) {
|
|
@@ -7880,10 +7880,10 @@ function Do(t) {
|
|
|
7880
7880
|
function t(t) {
|
|
7881
7881
|
this.An = t, this.buffer = new jn(Co), this.Rn = 0;
|
|
7882
7882
|
}
|
|
7883
|
-
return t.prototype.
|
|
7883
|
+
return t.prototype.bn = function() {
|
|
7884
7884
|
return ++this.Rn;
|
|
7885
|
-
}, t.prototype.
|
|
7886
|
-
var e = [ t, this.
|
|
7885
|
+
}, t.prototype.Pn = function(t) {
|
|
7886
|
+
var e = [ t, this.bn() ];
|
|
7887
7887
|
if (this.buffer.size < this.An) this.buffer = this.buffer.add(e); else {
|
|
7888
7888
|
var n = this.buffer.last();
|
|
7889
7889
|
Co(e, n) < 0 && (this.buffer = this.buffer.delete(n).add(e));
|
|
@@ -7967,10 +7967,10 @@ function Do(t) {
|
|
|
7967
7967
|
if (0 === e) return mi.resolve(ut.A);
|
|
7968
7968
|
var r = new ko(e);
|
|
7969
7969
|
return this.Dn.forEachTarget(t, (function(t) {
|
|
7970
|
-
return r.
|
|
7970
|
+
return r.Pn(t.sequenceNumber);
|
|
7971
7971
|
})).next((function() {
|
|
7972
7972
|
return n.Dn.xn(t, (function(t) {
|
|
7973
|
-
return r.
|
|
7973
|
+
return r.Pn(t);
|
|
7974
7974
|
}));
|
|
7975
7975
|
})).next((function() {
|
|
7976
7976
|
return r.maxValue;
|
|
@@ -9009,7 +9009,7 @@ var Qo = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
9009
9009
|
})).next((function(n) {
|
|
9010
9010
|
return t.isPrimary && !n ? t.Rs(e).next((function() {
|
|
9011
9011
|
return !1;
|
|
9012
|
-
})) : !!n && t.
|
|
9012
|
+
})) : !!n && t.bs(e).next((function() {
|
|
9013
9013
|
return !0;
|
|
9014
9014
|
}));
|
|
9015
9015
|
}));
|
|
@@ -9029,7 +9029,7 @@ var Qo = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
9029
9029
|
}, t.prototype.Es = function(t) {
|
|
9030
9030
|
var e = this;
|
|
9031
9031
|
return Ho(t).get("owner").next((function(t) {
|
|
9032
|
-
return mi.resolve(e.
|
|
9032
|
+
return mi.resolve(e.Ps(t));
|
|
9033
9033
|
}));
|
|
9034
9034
|
}, t.prototype.Vs = function(t) {
|
|
9035
9035
|
return Yo(t).delete(this.clientId);
|
|
@@ -9092,7 +9092,7 @@ var Qo = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
9092
9092
|
}));
|
|
9093
9093
|
}));
|
|
9094
9094
|
},
|
|
9095
|
-
/** Checks whether `client` is the local client. */ t.prototype.
|
|
9095
|
+
/** Checks whether `client` is the local client. */ t.prototype.Ps = function(t) {
|
|
9096
9096
|
return !!t && t.ownerId === this.clientId;
|
|
9097
9097
|
},
|
|
9098
9098
|
/**
|
|
@@ -9115,8 +9115,8 @@ var Qo = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
9115
9115
|
// the foreground.
|
|
9116
9116
|
// - the `forceOwningTab` setting was passed in.
|
|
9117
9117
|
if (null !== n && e.Ss(n.leaseTimestampMs, 5e3) && !e.xs(n.ownerId)) {
|
|
9118
|
-
if (e.
|
|
9119
|
-
if (!e.
|
|
9118
|
+
if (e.Ps(n) && e.networkEnabled) return !0;
|
|
9119
|
+
if (!e.Ps(n)) {
|
|
9120
9120
|
if (!n.allowTabSynchronization)
|
|
9121
9121
|
// Fail the `canActAsPrimary` check if the current leaseholder has
|
|
9122
9122
|
// not opted into multi-tab synchronization. If this happens at
|
|
@@ -9238,7 +9238,7 @@ var Qo = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
9238
9238
|
})), new Y(H.FAILED_PRECONDITION, yi);
|
|
9239
9239
|
return n(o);
|
|
9240
9240
|
})).next((function(t) {
|
|
9241
|
-
return r.
|
|
9241
|
+
return r.bs(o).next((function() {
|
|
9242
9242
|
return t;
|
|
9243
9243
|
}));
|
|
9244
9244
|
})) : r.$s(o).next((function() {
|
|
@@ -9257,14 +9257,14 @@ var Qo = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
9257
9257
|
t.prototype.$s = function(t) {
|
|
9258
9258
|
var e = this;
|
|
9259
9259
|
return Ho(t).get("owner").next((function(t) {
|
|
9260
|
-
if (null !== t && e.Ss(t.leaseTimestampMs, 5e3) && !e.xs(t.ownerId) && !e.
|
|
9260
|
+
if (null !== t && e.Ss(t.leaseTimestampMs, 5e3) && !e.xs(t.ownerId) && !e.Ps(t) && !(e.Zn || e.allowTabSynchronization && t.allowTabSynchronization)) throw new Y(H.FAILED_PRECONDITION, Qo);
|
|
9261
9261
|
}));
|
|
9262
9262
|
},
|
|
9263
9263
|
/**
|
|
9264
9264
|
* Obtains or extends the new primary lease for the local client. This
|
|
9265
9265
|
* method does not verify that the client is eligible for this lease.
|
|
9266
9266
|
*/
|
|
9267
|
-
t.prototype.
|
|
9267
|
+
t.prototype.bs = function(t) {
|
|
9268
9268
|
var e = {
|
|
9269
9269
|
ownerId: this.clientId,
|
|
9270
9270
|
allowTabSynchronization: this.allowTabSynchronization,
|
|
@@ -9277,7 +9277,7 @@ var Qo = "Failed to obtain exclusive access to the persistence layer. To allow s
|
|
|
9277
9277
|
/** Checks the primary lease and removes it if we are the current primary. */ t.prototype.Rs = function(t) {
|
|
9278
9278
|
var e = this, n = Ho(t);
|
|
9279
9279
|
return n.get("owner").next((function(t) {
|
|
9280
|
-
return e.
|
|
9280
|
+
return e.Ps(t) ? (U("IndexedDbPersistence", "Releasing primary lease."), n.delete("owner")) : mi.resolve();
|
|
9281
9281
|
}));
|
|
9282
9282
|
},
|
|
9283
9283
|
/** Verifies that `updateTimeMs` is within `maxAgeMs`. */ t.prototype.Ss = function(t, e) {
|
|
@@ -10344,12 +10344,12 @@ function du(t, e, n) {
|
|
|
10344
10344
|
* Clears all references with a given ID. Calls removeRef() for each key
|
|
10345
10345
|
* removed.
|
|
10346
10346
|
*/
|
|
10347
|
-
t.prototype.
|
|
10347
|
+
t.prototype.bi = function(t) {
|
|
10348
10348
|
var e = this, n = new Pt(new gt([])), r = new wu(n, t), i = new wu(n, t + 1), o = [];
|
|
10349
10349
|
return this.Ii.forEachInRange([ r, i ], (function(t) {
|
|
10350
10350
|
e.Ai(t), o.push(t.key);
|
|
10351
10351
|
})), o;
|
|
10352
|
-
}, t.prototype.
|
|
10352
|
+
}, t.prototype.Pi = function() {
|
|
10353
10353
|
var t = this;
|
|
10354
10354
|
this.yi.forEach((function(e) {
|
|
10355
10355
|
return t.Ai(e);
|
|
@@ -10640,7 +10640,7 @@ function du(t, e, n) {
|
|
|
10640
10640
|
}, t.prototype.updateTargetData = function(t, e) {
|
|
10641
10641
|
return this.Tn(e), mi.resolve();
|
|
10642
10642
|
}, t.prototype.removeTargetData = function(t, e) {
|
|
10643
|
-
return this.Fi.delete(e.target), this.Bi.
|
|
10643
|
+
return this.Fi.delete(e.target), this.Bi.bi(e.targetId), this.targetCount -= 1,
|
|
10644
10644
|
mi.resolve();
|
|
10645
10645
|
}, t.prototype.removeTargets = function(t, e, n) {
|
|
10646
10646
|
var r = this, i = 0, o = [];
|
|
@@ -10664,7 +10664,7 @@ function du(t, e, n) {
|
|
|
10664
10664
|
i.push(r.markPotentiallyOrphaned(t, e));
|
|
10665
10665
|
})), mi.waitFor(i);
|
|
10666
10666
|
}, t.prototype.removeMatchingKeysForTargetId = function(t, e) {
|
|
10667
|
-
return this.Bi.
|
|
10667
|
+
return this.Bi.bi(e), mi.resolve();
|
|
10668
10668
|
}, t.prototype.getMatchingKeysForTargetId = function(t, e) {
|
|
10669
10669
|
var n = this.Bi.Vi(e);
|
|
10670
10670
|
return mi.resolve(n);
|
|
@@ -10766,7 +10766,7 @@ function du(t, e, n) {
|
|
|
10766
10766
|
return this.Hi.add(e.toString()), mi.resolve();
|
|
10767
10767
|
}, t.prototype.removeTarget = function(t, e) {
|
|
10768
10768
|
var n = this;
|
|
10769
|
-
this.ji.
|
|
10769
|
+
this.ji.bi(e.targetId).forEach((function(t) {
|
|
10770
10770
|
return n.Hi.add(t.toString());
|
|
10771
10771
|
}));
|
|
10772
10772
|
var r = this.persistence.getTargetCache();
|
|
@@ -11098,8 +11098,8 @@ var Cu = /** @class */ function() {
|
|
|
11098
11098
|
return r(this, (function(r) {
|
|
11099
11099
|
switch (r.label) {
|
|
11100
11100
|
case 0:
|
|
11101
|
-
return this.started ? null === i.key ? [ 3 /*break*/ , 7 ] : this.cr.test(i.key) ? null == i.newValue ? (t = this.
|
|
11102
|
-
[ 2 /*return*/ , this.
|
|
11101
|
+
return this.started ? null === i.key ? [ 3 /*break*/ , 7 ] : this.cr.test(i.key) ? null == i.newValue ? (t = this.br(i.key),
|
|
11102
|
+
[ 2 /*return*/ , this.Pr(t, null) ]) : (e = this.Vr(i.key, i.newValue)) ? [ 2 /*return*/ , this.Pr(e.clientId, e) ] : [ 3 /*break*/ , 7 ] : [ 3 /*break*/ , 1 ] : [ 3 /*break*/ , 8 ];
|
|
11103
11103
|
|
|
11104
11104
|
case 1:
|
|
11105
11105
|
return this.hr.test(i.key) ? null !== i.newValue && (n = this.vr(i.key, i.newValue)) ? [ 2 /*return*/ , this.Sr(n) ] : [ 3 /*break*/ , 7 ] : [ 3 /*break*/ , 2 ];
|
|
@@ -11174,7 +11174,7 @@ var Cu = /** @class */ function() {
|
|
|
11174
11174
|
* Parses a client state key in WebStorage. Returns null if the key does not
|
|
11175
11175
|
* match the expected key format.
|
|
11176
11176
|
*/
|
|
11177
|
-
t.prototype.
|
|
11177
|
+
t.prototype.br = function(t) {
|
|
11178
11178
|
var e = this.cr.exec(t);
|
|
11179
11179
|
return e ? e[1] : null;
|
|
11180
11180
|
},
|
|
@@ -11183,7 +11183,7 @@ var Cu = /** @class */ function() {
|
|
|
11183
11183
|
* be parsed.
|
|
11184
11184
|
*/
|
|
11185
11185
|
t.prototype.Vr = function(t, e) {
|
|
11186
|
-
var n = this.
|
|
11186
|
+
var n = this.br(t);
|
|
11187
11187
|
return Mu.Yi(n, e);
|
|
11188
11188
|
},
|
|
11189
11189
|
/**
|
|
@@ -11219,7 +11219,7 @@ var Cu = /** @class */ function() {
|
|
|
11219
11219
|
}));
|
|
11220
11220
|
}, t.prototype.Cr = function(t) {
|
|
11221
11221
|
return this.syncEngine.Or(t.targetId, t.state, t.error);
|
|
11222
|
-
}, t.prototype.
|
|
11222
|
+
}, t.prototype.Pr = function(t, e) {
|
|
11223
11223
|
var n = this, r = e ? this.ir.insert(t, e) : this.ir.remove(t), i = this.yr(this.ir), o = this.yr(r), u = [], s = [];
|
|
11224
11224
|
return o.forEach((function(t) {
|
|
11225
11225
|
i.has(t) || u.push(t);
|
|
@@ -11713,7 +11713,7 @@ function Ku() {
|
|
|
11713
11713
|
}, t;
|
|
11714
11714
|
}(), Qu = /** @class */ function() {
|
|
11715
11715
|
function t(t, e, n, r, i, o, u, s) {
|
|
11716
|
-
this.Yn = t, this.Ro = n, this.
|
|
11716
|
+
this.Yn = t, this.Ro = n, this.bo = r, this.Po = i, this.authCredentialsProvider = o,
|
|
11717
11717
|
this.appCheckCredentialsProvider = u, this.listener = s, this.state = 0 /* Initial */ ,
|
|
11718
11718
|
/**
|
|
11719
11719
|
* A close count that's incremented every time the stream is closed; used by
|
|
@@ -11896,7 +11896,7 @@ function Ku() {
|
|
|
11896
11896
|
var n = this, r = this.Uo(this.Vo);
|
|
11897
11897
|
this.stream = this.Go(t, e), this.stream.Hr((function() {
|
|
11898
11898
|
r((function() {
|
|
11899
|
-
return n.state = 2 /* Open */ , n.So = n.Yn.enqueueAfterDelay(n.
|
|
11899
|
+
return n.state = 2 /* Open */ , n.So = n.Yn.enqueueAfterDelay(n.bo, 1e4, (function() {
|
|
11900
11900
|
return n.xo() && (n.state = 3 /* Healthy */), Promise.resolve();
|
|
11901
11901
|
})), n.listener.Hr();
|
|
11902
11902
|
}));
|
|
@@ -11949,7 +11949,7 @@ function Ku() {
|
|
|
11949
11949
|
s;
|
|
11950
11950
|
}
|
|
11951
11951
|
return t(n, e), n.prototype.Go = function(t, e) {
|
|
11952
|
-
return this.
|
|
11952
|
+
return this.Po.lo("Listen", t, e);
|
|
11953
11953
|
}, n.prototype.onMessage = function(t) {
|
|
11954
11954
|
// A successful response means the stream is healthy
|
|
11955
11955
|
this.Do.reset();
|
|
@@ -12083,7 +12083,7 @@ function Ku() {
|
|
|
12083
12083
|
}, n.prototype.Lo = function() {
|
|
12084
12084
|
this.zo && this.Jo([]);
|
|
12085
12085
|
}, n.prototype.Go = function(t, e) {
|
|
12086
|
-
return this.
|
|
12086
|
+
return this.Po.lo("Write", t, e);
|
|
12087
12087
|
}, n.prototype.onMessage = function(t) {
|
|
12088
12088
|
if (
|
|
12089
12089
|
// Always capture the last stream token.
|
|
@@ -12137,7 +12137,7 @@ function Ku() {
|
|
|
12137
12137
|
function n(t, n, r, i) {
|
|
12138
12138
|
var o = this;
|
|
12139
12139
|
return (o = e.call(this) || this).authCredentials = t, o.appCheckCredentials = n,
|
|
12140
|
-
o.
|
|
12140
|
+
o.Po = r, o.M = i, o.tu = !1, o;
|
|
12141
12141
|
}
|
|
12142
12142
|
return t(n, e), n.prototype.eu = function() {
|
|
12143
12143
|
if (this.tu) throw new Y(H.FAILED_PRECONDITION, "The client has already been terminated.");
|
|
@@ -12146,7 +12146,7 @@ function Ku() {
|
|
|
12146
12146
|
var r = this;
|
|
12147
12147
|
return this.eu(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((function(i) {
|
|
12148
12148
|
var o = i[0], u = i[1];
|
|
12149
|
-
return r.
|
|
12149
|
+
return r.Po.oo(t, e, n, o, u);
|
|
12150
12150
|
})).catch((function(t) {
|
|
12151
12151
|
throw "FirebaseError" === t.name ? (t.code === H.UNAUTHENTICATED && (r.authCredentials.invalidateToken(),
|
|
12152
12152
|
r.appCheckCredentials.invalidateToken()), t) : new Y(H.UNKNOWN, t.toString());
|
|
@@ -12156,7 +12156,7 @@ function Ku() {
|
|
|
12156
12156
|
var r = this;
|
|
12157
12157
|
return this.eu(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((function(i) {
|
|
12158
12158
|
var o = i[0], u = i[1];
|
|
12159
|
-
return r.
|
|
12159
|
+
return r.Po.ho(t, e, n, o, u);
|
|
12160
12160
|
})).catch((function(t) {
|
|
12161
12161
|
throw "FirebaseError" === t.name ? (t.code === H.UNAUTHENTICATED && (r.authCredentials.invalidateToken(),
|
|
12162
12162
|
r.appCheckCredentials.invalidateToken()), t) : new Y(H.UNKNOWN, t.toString());
|
|
@@ -12920,7 +12920,7 @@ function bs(t, e) {
|
|
|
12920
12920
|
// Create stream (but note that it is not started yet).
|
|
12921
12921
|
t.gu = function(t, e, n) {
|
|
12922
12922
|
var r = W(t);
|
|
12923
|
-
return r.eu(), new Wu(e, r.
|
|
12923
|
+
return r.eu(), new Wu(e, r.Po, r.authCredentials, r.appCheckCredentials, r.M, n);
|
|
12924
12924
|
}(t.datastore, t.asyncQueue, {
|
|
12925
12925
|
Hr: as.bind(null, t),
|
|
12926
12926
|
Yr: cs.bind(null, t),
|
|
@@ -12960,7 +12960,7 @@ function Es(t) {
|
|
|
12960
12960
|
// Create stream (but note that it is not started yet).
|
|
12961
12961
|
t.yu = function(t, e, n) {
|
|
12962
12962
|
var r = W(t);
|
|
12963
|
-
return r.eu(), new Hu(e, r.
|
|
12963
|
+
return r.eu(), new Hu(e, r.Po, r.authCredentials, r.appCheckCredentials, r.M, n);
|
|
12964
12964
|
}(t.datastore, t.asyncQueue, {
|
|
12965
12965
|
Hr: vs.bind(null, t),
|
|
12966
12966
|
Yr: ws.bind(null, t),
|
|
@@ -13356,12 +13356,12 @@ function Ls(t) {
|
|
|
13356
13356
|
* It uses an Observer to dispatch events.
|
|
13357
13357
|
*/ var Ps = /** @class */ function() {
|
|
13358
13358
|
function t(t, e, n) {
|
|
13359
|
-
this.query = t, this.
|
|
13359
|
+
this.query = t, this.bu = e,
|
|
13360
13360
|
/**
|
|
13361
13361
|
* Initial snapshots (e.g. from cache) may not be propagated to the wrapped
|
|
13362
13362
|
* observer. This flag is set to true once we've actually raised an event.
|
|
13363
13363
|
*/
|
|
13364
|
-
this.
|
|
13364
|
+
this.Pu = !1, this.Vu = null, this.onlineState = "Unknown" /* Unknown */ , this.options = n || {}
|
|
13365
13365
|
/**
|
|
13366
13366
|
* Applies the new ViewSnapshot to this listener, raising a user-facing event
|
|
13367
13367
|
* if applicable (depending on what changed, whether the user has opted into
|
|
@@ -13381,15 +13381,15 @@ function Ls(t) {
|
|
|
13381
13381
|
/* excludesMetadataChanges= */ !0);
|
|
13382
13382
|
}
|
|
13383
13383
|
var o = !1;
|
|
13384
|
-
return this.
|
|
13384
|
+
return this.Pu ? this.vu(t) && (this.bu.next(t), o = !0) : this.Su(t, this.onlineState) && (this.Du(t),
|
|
13385
13385
|
o = !0), this.Vu = t, o;
|
|
13386
13386
|
}, t.prototype.onError = function(t) {
|
|
13387
|
-
this.
|
|
13387
|
+
this.bu.error(t);
|
|
13388
13388
|
},
|
|
13389
13389
|
/** Returns whether a snapshot was raised. */ t.prototype.Au = function(t) {
|
|
13390
13390
|
this.onlineState = t;
|
|
13391
13391
|
var e = !1;
|
|
13392
|
-
return this.Vu && !this.
|
|
13392
|
+
return this.Vu && !this.Pu && this.Su(this.Vu, t) && (this.Du(this.Vu), e = !0),
|
|
13393
13393
|
e;
|
|
13394
13394
|
}, t.prototype.Su = function(t, e) {
|
|
13395
13395
|
// Always raise the first event when we're synced
|
|
@@ -13413,8 +13413,8 @@ function Ls(t) {
|
|
|
13413
13413
|
// to get here if there were only metadata docChanges and they got
|
|
13414
13414
|
// stripped out.
|
|
13415
13415
|
}, t.prototype.Du = function(t) {
|
|
13416
|
-
t = As.fromInitialDocuments(t.query, t.docs, t.mutatedKeys, t.fromCache), this.
|
|
13417
|
-
this.
|
|
13416
|
+
t = As.fromInitialDocuments(t.query, t.docs, t.mutatedKeys, t.fromCache), this.Pu = !0,
|
|
13417
|
+
this.bu.next(t);
|
|
13418
13418
|
}, t;
|
|
13419
13419
|
}(), Os = /** @class */ function() {
|
|
13420
13420
|
function t(t,
|
|
@@ -14354,7 +14354,7 @@ function oa(t, e, n) {
|
|
|
14354
14354
|
var o = i[r];
|
|
14355
14355
|
t.ea.delete(o), n && t.ta.fa(o, n);
|
|
14356
14356
|
}
|
|
14357
|
-
t.na.delete(e), t.isPrimaryClient && t.oa.
|
|
14357
|
+
t.na.delete(e), t.isPrimaryClient && t.oa.bi(e).forEach((function(e) {
|
|
14358
14358
|
t.oa.containsKey(e) ||
|
|
14359
14359
|
// We removed the last reference for this key
|
|
14360
14360
|
ua(t, e);
|
|
@@ -14647,7 +14647,7 @@ function va(t, e) {
|
|
|
14647
14647
|
var e = W(t);
|
|
14648
14648
|
e.ra.forEach((function(t, n) {
|
|
14649
14649
|
es(e.remoteStore, n);
|
|
14650
|
-
})), e.oa.
|
|
14650
|
+
})), e.oa.Pi(), e.ra = new Map, e.ia = new Bn(Pt.comparator);
|
|
14651
14651
|
}(n), n.ha = !1, [ 4 /*yield*/ , Is(n.remoteStore, !1) ];
|
|
14652
14652
|
|
|
14653
14653
|
case 6:
|
|
@@ -15383,8 +15383,8 @@ function xa(t, e) {
|
|
|
15383
15383
|
|
|
15384
15384
|
case 1:
|
|
15385
15385
|
return null === (t = r.sent()) ? [ 2 /*return*/ , null ] : (e = this.Ea.decode(t),
|
|
15386
|
-
n = Number(e), isNaN(n) && this.
|
|
15387
|
-
[ 4 /*yield*/ , this.
|
|
15386
|
+
n = Number(e), isNaN(n) && this.ba("length string (" + e + ") is not valid number"),
|
|
15387
|
+
[ 4 /*yield*/ , this.Pa(n) ]);
|
|
15388
15388
|
|
|
15389
15389
|
case 2:
|
|
15390
15390
|
return i = r.sent(), [ 2 /*return*/ , new Os(JSON.parse(i), t.length + n) ];
|
|
@@ -15424,7 +15424,7 @@ function xa(t, e) {
|
|
|
15424
15424
|
return 0 === this.buffer.length ? [ 2 /*return*/ , null ] : (
|
|
15425
15425
|
// Broke out of the loop because underlying stream is closed, but still
|
|
15426
15426
|
// cannot find an open bracket.
|
|
15427
|
-
(t = this.Va()) < 0 && this.
|
|
15427
|
+
(t = this.Va()) < 0 && this.ba("Reached the end of bundle when a length string is expected."),
|
|
15428
15428
|
e = this.buffer.slice(0, t), [ 2 /*return*/ , (this.buffer = this.buffer.slice(t),
|
|
15429
15429
|
e) ]);
|
|
15430
15430
|
}
|
|
@@ -15437,7 +15437,7 @@ function xa(t, e) {
|
|
|
15437
15437
|
*
|
|
15438
15438
|
* Returns a string decoded from the read bytes.
|
|
15439
15439
|
*/
|
|
15440
|
-
t.prototype.
|
|
15440
|
+
t.prototype.Pa = function(t) {
|
|
15441
15441
|
return n(this, void 0, void 0, (function() {
|
|
15442
15442
|
var e;
|
|
15443
15443
|
return r(this, (function(n) {
|
|
@@ -15446,7 +15446,7 @@ function xa(t, e) {
|
|
|
15446
15446
|
return this.buffer.length < t ? [ 4 /*yield*/ , this.va() ] : [ 3 /*break*/ , 3 ];
|
|
15447
15447
|
|
|
15448
15448
|
case 1:
|
|
15449
|
-
n.sent() && this.
|
|
15449
|
+
n.sent() && this.ba("Reached the end of bundle when more is expected."), n.label = 2;
|
|
15450
15450
|
|
|
15451
15451
|
case 2:
|
|
15452
15452
|
return [ 3 /*break*/ , 0 ];
|
|
@@ -15458,7 +15458,7 @@ function xa(t, e) {
|
|
|
15458
15458
|
}
|
|
15459
15459
|
}));
|
|
15460
15460
|
}));
|
|
15461
|
-
}, t.prototype.
|
|
15461
|
+
}, t.prototype.ba = function(t) {
|
|
15462
15462
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
15463
15463
|
throw this.Ta.cancel(), new Error("Invalid bundle format: " + t);
|
|
15464
15464
|
},
|
|
@@ -19656,9 +19656,9 @@ function dh(t, e) {
|
|
|
19656
19656
|
return n = Object.assign({
|
|
19657
19657
|
useFetchStreams: rh
|
|
19658
19658
|
}, n), i._setSettings(n), i;
|
|
19659
|
-
}), "PUBLIC")), u(R, "3.4.7-canary.
|
|
19659
|
+
}), "PUBLIC")), u(R, "3.4.7-canary.e9e5f6b3c", void 0),
|
|
19660
19660
|
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
|
19661
|
-
u(R, "3.4.7-canary.
|
|
19661
|
+
u(R, "3.4.7-canary.e9e5f6b3c", "esm5");
|
|
19662
19662
|
|
|
19663
19663
|
export { Ol as AbstractUserDataWriter, Vc as Bytes, pc as CACHE_SIZE_UNLIMITED, oc as CollectionReference, rc as DocumentReference, fl as DocumentSnapshot, kc as FieldPath, Rc as FieldValue, yc as Firestore, Y as FirestoreError, Lc as GeoPoint, dc as LoadBundleTask, ic as Query, gl as QueryConstraint, dl as QueryDocumentSnapshot, pl as QuerySnapshot, hl as SnapshotMetadata, ft as Timestamp, ih as Transaction, Ul as WriteBatch, Mt as _DatabaseId, Pt as _DocumentKey, ot as _EmptyAppCheckTokenProvider, $ as _EmptyAuthCredentialsProvider, bt as _FieldPath, $a as _cast, Q as _debugAssert, Tt as _isBase64Available, K as _logWarn, fh as _setIndexConfiguration, Ha as _validateIsNotUsedTogether, $l as addDoc, ch as arrayRemove, ah as arrayUnion, Ec as clearIndexedDbPersistence, uc as collection, sc as collectionGroup, nc as connectFirestoreEmulator, Jl as deleteDoc, uh as deleteField, Dc as disableNetwork, ac as doc, Mc as documentId, bc as enableIndexedDbPersistence, Ic as enableMultiTabIndexedDbPersistence, _c as enableNetwork, Ml as endAt, kl as endBefore, gc as ensureFirestoreConfigured, eh as executeWrite, Kl as getDoc, jl as getDocFromCache, zl as getDocFromServer, Ql as getDocs, Wl as getDocsFromCache, Hl as getDocsFromServer, mc as getFirestore, lh as increment, vc as initializeFirestore, _l as limit, Dl as limitToLast, Ac as loadBundle, xc as namedQuery, Zl as onSnapshot, th as onSnapshotsInSync, El as orderBy, wl as query, lc as queryEqual, cc as refEqual, oh as runTransaction, sh as serverTimestamp, Yl as setDoc, q as setLogLevel, vl as snapshotEqual, xl as startAfter, Al as startAt, Nc as terminate, Xl as updateDoc, Sc as waitForPendingWrites, Il as where, hh as writeBatch };
|
|
19664
19664
|
//# sourceMappingURL=index.esm5.js.map
|
package/dist/index.node.cjs.js
CHANGED
|
@@ -33,7 +33,7 @@ var grpc__namespace = /*#__PURE__*/_interopNamespace(grpc);
|
|
|
33
33
|
var protoLoader__namespace = /*#__PURE__*/_interopNamespace(protoLoader);
|
|
34
34
|
|
|
35
35
|
const name = "@firebase/firestore";
|
|
36
|
-
const version$1 = "3.4.7-canary.
|
|
36
|
+
const version$1 = "3.4.7-canary.e9e5f6b3c";
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* @license
|
|
@@ -86,7 +86,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
86
86
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
87
87
|
User.MOCK_USER = new User('mock-user');
|
|
88
88
|
|
|
89
|
-
const version = "9.6.10-canary.
|
|
89
|
+
const version = "9.6.10-canary.e9e5f6b3c";
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
92
|
* @license
|
package/dist/index.node.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import * as grpc from '@grpc/grpc-js';
|
|
|
8
8
|
import * as protoLoader from '@grpc/proto-loader';
|
|
9
9
|
|
|
10
10
|
const name = "@firebase/firestore";
|
|
11
|
-
const version$1 = "3.4.7-canary.
|
|
11
|
+
const version$1 = "3.4.7-canary.e9e5f6b3c";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
@@ -61,7 +61,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
61
61
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
62
62
|
User.MOCK_USER = new User('mock-user');
|
|
63
63
|
|
|
64
|
-
const version = "9.6.10-canary.
|
|
64
|
+
const version = "9.6.10-canary.e9e5f6b3c";
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* @license
|