@firebase/firestore 3.7.2 → 3.7.3-20221109210852

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.rn.js CHANGED
@@ -70,7 +70,7 @@ v.MOCK_USER = new v("mock-user");
70
70
  * See the License for the specific language governing permissions and
71
71
  * limitations under the License.
72
72
  */
73
- let V = "9.13.0";
73
+ let V = "9.14.0-20221109210852";
74
74
 
75
75
  /**
76
76
  * @license
@@ -12537,11 +12537,12 @@ class {
12537
12537
  return new Promise(((i, r) => {
12538
12538
  const o = new g;
12539
12539
  o.setWithCredentials(!0), o.listenOnce(y.COMPLETE, (() => {
12540
+ var e;
12540
12541
  try {
12541
12542
  switch (o.getLastErrorCode()) {
12542
12543
  case p.NO_ERROR:
12543
- const e = o.getResponseJson();
12544
- x("Connection", "XHR received:", JSON.stringify(e)), i(e);
12544
+ const n = o.getResponseJson();
12545
+ x("Connection", "XHR received:", JSON.stringify(n)), i(n);
12545
12546
  break;
12546
12547
 
12547
12548
  case p.TIMEOUT:
@@ -12549,16 +12550,18 @@ class {
12549
12550
  break;
12550
12551
 
12551
12552
  case p.HTTP_ERROR:
12552
- const n = o.getStatus();
12553
- if (x("Connection", 'RPC "' + t + '" failed with status:', n, "response text:", o.getResponseText()),
12554
- n > 0) {
12555
- const t = o.getResponseJson().error;
12556
- if (t && t.status && t.message) {
12557
- const e = function(t) {
12553
+ const s = o.getStatus();
12554
+ if (x("Connection", 'RPC "' + t + '" failed with status:', s, "response text:", o.getResponseText()),
12555
+ s > 0) {
12556
+ let t = o.getResponseJson();
12557
+ Array.isArray(t) && (t = t[0]);
12558
+ const n = null === (e = t) || void 0 === e ? void 0 : e.error;
12559
+ if (n && n.status && n.message) {
12560
+ const t = function(t) {
12558
12561
  const e = t.toLowerCase().replace(/_/g, "-");
12559
12562
  return Object.values(L).indexOf(e) >= 0 ? e : L.UNKNOWN;
12560
- }(t.status);
12561
- r(new U(e, t.message));
12563
+ }(n.status);
12564
+ r(new U(t, n.message));
12562
12565
  } else r(new U(L.UNKNOWN, "Server responded with status " + o.getStatus()));
12563
12566
  } else
12564
12567
  // If we received an HTTP_ERROR but there's no status code,
@@ -16185,7 +16188,7 @@ class aa {
16185
16188
  this.observer.next && this.Rc(this.observer.next, t);
16186
16189
  }
16187
16190
  error(t) {
16188
- this.observer.error ? this.Rc(this.observer.error, t) : N("Uncaught Error in snapshot listener:", t);
16191
+ this.observer.error ? this.Rc(this.observer.error, t) : N("Uncaught Error in snapshot listener:", t.toString());
16189
16192
  }
16190
16193
  bc() {
16191
16194
  this.muted = !0;
@@ -16600,7 +16603,7 @@ class la {
16600
16603
  // In transactions, the backend will fail outdated reads with FAILED_PRECONDITION and
16601
16604
  // non-matching document versions with ABORTED. These errors should be retried.
16602
16605
  const e = t.code;
16603
- return "aborted" === e || "failed-precondition" === e || !es(e);
16606
+ return "aborted" === e || "failed-precondition" === e || "already-exists" === e || !es(e);
16604
16607
  }
16605
16608
  return !1;
16606
16609
  }
@@ -19984,9 +19987,9 @@ function Ll(t, e) {
19984
19987
  return s = Object.assign({
19985
19988
  useFetchStreams: e
19986
19989
  }, s), r._setSettings(s), r;
19987
- }), "PUBLIC").setMultipleInstances(!0)), s(P, "3.7.2", t),
19990
+ }), "PUBLIC").setMultipleInstances(!0)), s(P, "3.7.3-20221109210852", t),
19988
19991
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
19989
- s(P, "3.7.2", "esm2017");
19992
+ s(P, "3.7.3-20221109210852", "esm2017");
19990
19993
  }("rn", /* useFetchStreams= */ !1);
19991
19994
 
19992
19995
  export { nl as AbstractUserDataWriter, la as AggregateField, fa as AggregateQuerySnapshot, nh as Bytes, Ba as CACHE_SIZE_UNLIMITED, na as CollectionReference, ta as DocumentReference, ol as DocumentSnapshot, sh as FieldPath, rh as FieldValue, La as Firestore, U as FirestoreError, oh as GeoPoint, $a as LoadBundleTask, ea as Query, Fh as QueryConstraint, ul as QueryDocumentSnapshot, cl as QuerySnapshot, rl as SnapshotMetadata, st as Timestamp, Cl as Transaction, Sl as WriteBatch, ie as _DatabaseId, at as _DocumentKey, Y as _EmptyAppCheckTokenProvider, G as _EmptyAuthCredentialsProvider, ct as _FieldPath, zc as _cast, $ as _debugAssert, zt as _isBase64Available, k as _logWarn, Gc as _validateIsNotUsedTogether, Tl as addDoc, Pl as aggregateQuerySnapshotEqual, Ml as arrayRemove, Ol as arrayUnion, za as clearIndexedDbPersistence, sa as collection, ia as collectionGroup, Zc as connectFirestoreEmulator, Il as deleteDoc, Nl as deleteField, Ya as disableNetwork, ra as doc, ih as documentId, Qa as enableIndexedDbPersistence, ja as enableMultiTabIndexedDbPersistence, Ja as enableNetwork, Yh as endAt, Jh as endBefore, Ka as ensureFirestoreConfigured, Rl as executeWrite, vl as getCountFromServer, ll as getDoc, dl as getDocFromCache, _l as getDocFromServer, wl as getDocs, ml as getDocsFromCache, gl as getDocsFromServer, qa as getFirestore, Fl as increment, Ua as initializeFirestore, Gh as limit, Qh as limitToLast, Za as loadBundle, th as namedQuery, El as onSnapshot, Al as onSnapshotsInSync, qh as orderBy, $h as query, ua as queryEqual, oa as refEqual, xl as runTransaction, kl as serverTimestamp, yl as setDoc, Bl as setIndexConfiguration, C as setLogLevel, hl as snapshotEqual, zh as startAfter, Wh as startAt, Xa as terminate, pl as updateDoc, Ha as waitForPendingWrites, Lh as where, $l as writeBatch };