@firebase/firestore 3.4.10 → 3.4.11-canary.b60cf76e1

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/firestore/src/platform/node/grpc_connection.d.ts +1 -1
  3. package/dist/firestore/src/remote/connection.d.ts +1 -1
  4. package/dist/firestore/src/remote/rest_connection.d.ts +1 -1
  5. package/dist/index.esm2017.js +16 -14
  6. package/dist/index.esm2017.js.map +1 -1
  7. package/dist/index.esm5.js +28 -22
  8. package/dist/index.esm5.js.map +1 -1
  9. package/dist/index.node.cjs.js +25 -13
  10. package/dist/index.node.cjs.js.map +1 -1
  11. package/dist/index.node.mjs +25 -13
  12. package/dist/index.node.mjs.map +1 -1
  13. package/dist/index.rn.js +16 -14
  14. package/dist/index.rn.js.map +1 -1
  15. package/dist/lite/firestore/src/platform/node/grpc_connection.d.ts +1 -1
  16. package/dist/lite/firestore/src/remote/connection.d.ts +1 -1
  17. package/dist/lite/firestore/src/remote/rest_connection.d.ts +1 -1
  18. package/dist/lite/index.browser.esm2017.js +6 -6
  19. package/dist/lite/index.browser.esm2017.js.map +1 -1
  20. package/dist/lite/index.browser.esm5.js +11 -11
  21. package/dist/lite/index.browser.esm5.js.map +1 -1
  22. package/dist/lite/index.node.cjs.js +6 -6
  23. package/dist/lite/index.node.cjs.js.map +1 -1
  24. package/dist/lite/index.node.mjs +6 -6
  25. package/dist/lite/index.node.mjs.map +1 -1
  26. package/dist/lite/index.rn.esm2017.js +6 -6
  27. package/dist/lite/index.rn.esm2017.js.map +1 -1
  28. package/dist/lite/packages/firestore/src/platform/node/grpc_connection.d.ts +1 -1
  29. package/dist/lite/packages/firestore/src/remote/connection.d.ts +1 -1
  30. package/dist/lite/packages/firestore/src/remote/rest_connection.d.ts +1 -1
  31. package/dist/packages/firestore/src/platform/node/grpc_connection.d.ts +1 -1
  32. package/dist/packages/firestore/src/remote/connection.d.ts +1 -1
  33. package/dist/packages/firestore/src/remote/rest_connection.d.ts +1 -1
  34. package/package.json +9 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @firebase/firestore
2
2
 
3
+ ## 3.4.11
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`efe2000fc`](https://github.com/firebase/firebase-js-sdk/commit/efe2000fc499e2c85c4e5e0fef6741ff3bad2eb0)]:
8
+ - @firebase/util@1.6.2
9
+ - @firebase/component@0.5.16
10
+
3
11
  ## 3.4.10
4
12
 
5
13
  ### Patch Changes
@@ -29,6 +29,6 @@ export declare class GrpcConnection implements Connection {
29
29
  constructor(protos: grpc.GrpcObject, databaseInfo: DatabaseInfo);
30
30
  private ensureActiveStub;
31
31
  invokeRPC<Req, Resp>(rpcName: string, path: string, request: Req, authToken: Token | null, appCheckToken: Token | null): Promise<Resp>;
32
- invokeStreamingRPC<Req, Resp>(rpcName: string, path: string, request: Req, authToken: Token | null, appCheckToken: Token | null): Promise<Resp[]>;
32
+ invokeStreamingRPC<Req, Resp>(rpcName: string, path: string, request: Req, authToken: Token | null, appCheckToken: Token | null, expectedResponseCount?: number): Promise<Resp[]>;
33
33
  openStream<Req, Resp>(rpcName: string, authToken: Token | null, appCheckToken: Token | null): Stream<Req, Resp>;
34
34
  }
@@ -54,7 +54,7 @@ export interface Connection {
54
54
  * @returns a Promise containing an array with the JSON object encodings of the
55
55
  * responses
56
56
  */
57
- invokeStreamingRPC<Req, Resp>(rpcName: string, path: string, request: Req, authToken: Token | null, appCheckToken: Token | null): Promise<Resp[]>;
57
+ invokeStreamingRPC<Req, Resp>(rpcName: string, path: string, request: Req, authToken: Token | null, appCheckToken: Token | null, expectedResponseCount?: number): Promise<Resp[]>;
58
58
  /**
59
59
  * Opens a stream to the given stream RPC endpoint. Returns a stream which
60
60
  * will try to open itself.
@@ -29,7 +29,7 @@ export declare abstract class RestConnection implements Connection {
29
29
  private readonly databaseRoot;
30
30
  constructor(databaseInfo: DatabaseInfo);
31
31
  invokeRPC<Req, Resp>(rpcName: string, path: string, req: Req, authToken: Token | null, appCheckToken: Token | null): Promise<Resp>;
32
- invokeStreamingRPC<Req, Resp>(rpcName: string, path: string, request: Req, authToken: Token | null, appCheckToken: Token | null): Promise<Resp[]>;
32
+ invokeStreamingRPC<Req, Resp>(rpcName: string, path: string, request: Req, authToken: Token | null, appCheckToken: Token | null, expectedResponseCount?: number): Promise<Resp[]>;
33
33
  abstract openStream<Req, Resp>(rpcName: string, authToken: Token | null, appCheckToken: Token | null): Stream<Req, Resp>;
34
34
  /**
35
35
  * Modifies the headers for a request, adding any authorization token if
@@ -66,7 +66,7 @@ C.MOCK_USER = new C("mock-user");
66
66
  * See the License for the specific language governing permissions and
67
67
  * limitations under the License.
68
68
  */
69
- let x = "9.8.3";
69
+ let x = "9.8.4-canary.b60cf76e1";
70
70
 
71
71
  /**
72
72
  * @license
@@ -1707,14 +1707,14 @@ class vt {
1707
1707
  // caller.
1708
1708
  await e.A, r;
1709
1709
  } catch (t) {
1710
+ const e = t, n = "FirebaseError" !== e.name && r < 3;
1710
1711
  // TODO(schmidt-sebastian): We could probably be smarter about this and
1711
1712
  // not retry exceptions that are likely unrecoverable (such as quota
1712
1713
  // exceeded errors).
1713
1714
  // Note: We cannot use an instanceof check for FirestoreException, since the
1714
1715
  // exception is wrapped in a generic error by our async/await handling.
1715
- const e = "FirebaseError" !== t.name && r < 3;
1716
- if (M("SimpleDb", "Transaction failed with error:", t.message, "Retrying:", e),
1717
- this.close(), !e) return Promise.reject(t);
1716
+ if (M("SimpleDb", "Transaction failed with error:", e.message, "Retrying:", n),
1717
+ this.close(), !n) return Promise.reject(e);
1718
1718
  }
1719
1719
  }
1720
1720
  }
@@ -12431,7 +12431,7 @@ class {
12431
12431
  e;
12432
12432
  }));
12433
12433
  }
12434
- ao(t, e, n, s, i) {
12434
+ ao(t, e, n, s, i, r) {
12435
12435
  // The REST API automatically aggregates all of the streamed results, so we
12436
12436
  // can just use the normal invoke() method.
12437
12437
  return this.ro(t, e, n, s, i);
@@ -13178,8 +13178,8 @@ class uu extends class {} {
13178
13178
  this.appCheckCredentials.invalidateToken()), t) : new Q(G.UNKNOWN, t.toString());
13179
13179
  }));
13180
13180
  }
13181
- /** Invokes the provided RPC with streamed results with auth and AppCheck tokens. */ ao(t, e, n) {
13182
- return this.tu(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((([s, i]) => this.bo.ao(t, e, n, s, i))).catch((t => {
13181
+ /** Invokes the provided RPC with streamed results with auth and AppCheck tokens. */ ao(t, e, n, s) {
13182
+ return this.tu(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((([i, r]) => this.bo.ao(t, e, n, i, r, s))).catch((t => {
13183
13183
  throw "FirebaseError" === t.name ? (t.code === G.UNAUTHENTICATED && (this.authCredentials.invalidateToken(),
13184
13184
  this.appCheckCredentials.invalidateToken()), t) : new Q(G.UNKNOWN, t.toString());
13185
13185
  }));
@@ -15812,7 +15812,7 @@ class jc {
15812
15812
  const e = await async function(t, e) {
15813
15813
  const n = K(t), s = Ls(n.wt) + "/documents", i = {
15814
15814
  documents: e.map((t => Ms(n.wt, t)))
15815
- }, r = await n.ao("BatchGetDocuments", s, i), o = new Map;
15815
+ }, r = await n.ao("BatchGetDocuments", s, i, e.length), o = new Map;
15816
15816
  r.forEach((t => {
15817
15817
  const e = Gs(n.wt, t);
15818
15818
  o.set(e.key.toString(), e);
@@ -17229,6 +17229,7 @@ function Ua(t) {
17229
17229
  try {
17230
17230
  await Hc(t, n), await Jc(t, e), s.resolve();
17231
17231
  } catch (t) {
17232
+ const e = t;
17232
17233
  if (!
17233
17234
  /**
17234
17235
  * Decides whether the provided error allows us to gracefully disable
@@ -17274,9 +17275,9 @@ function Ua(t) {
17274
17275
  * @param firestore - The {@link Firestore} instance to clear persistence for.
17275
17276
  * @returns A `Promise` that is resolved when the persistent storage is
17276
17277
  * cleared. Otherwise, the promise is rejected with an error.
17277
- */ (t)) throw t;
17278
- console.warn("Error enabling offline persistence. Falling back to persistence disabled: " + t),
17279
- s.reject(t);
17278
+ */ (e)) throw e;
17279
+ console.warn("Error enabling offline persistence. Falling back to persistence disabled: " + e),
17280
+ s.reject(e);
17280
17281
  }
17281
17282
  })).then((() => s.promise));
17282
17283
  }
@@ -19571,10 +19572,11 @@ function Al(t, e) {
19571
19572
  */ function kl(t, e) {
19572
19573
  La(t = Ia(t, Fa));
19573
19574
  const n = "string" == typeof e ? function(t) {
19575
+ var e;
19574
19576
  try {
19575
19577
  return JSON.parse(t);
19576
19578
  } catch (t) {
19577
- throw new Q(G.INVALID_ARGUMENT, "Failed to parse JSON:" + t.message);
19579
+ throw new Q(G.INVALID_ARGUMENT, "Failed to parse JSON:" + (null === (e = t) || void 0 === e ? void 0 : e.message));
19578
19580
  }
19579
19581
  }(e) : e, s = [];
19580
19582
  // PORTING NOTE: We don't return an error if the user has not enabled
@@ -19608,9 +19610,9 @@ function Ol(t, e) {
19608
19610
  return n = Object.assign({
19609
19611
  useFetchStreams: e
19610
19612
  }, n), i._setSettings(n), i;
19611
- }), "PUBLIC")), registerVersion(D, "3.4.10", t),
19613
+ }), "PUBLIC")), registerVersion(D, "3.4.11-canary.b60cf76e1", t),
19612
19614
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
19613
- registerVersion(D, "3.4.10", "esm2017");
19615
+ registerVersion(D, "3.4.11-canary.b60cf76e1", "esm2017");
19614
19616
  }();
19615
19617
 
19616
19618
  export { ol as AbstractUserDataWriter, eh as Bytes, Ma as CACHE_SIZE_UNLIMITED, va as CollectionReference, ba as DocumentReference, kh as DocumentSnapshot, Za as FieldPath, nh as FieldValue, Fa as Firestore, Q as FirestoreError, sh as GeoPoint, Oa as LoadBundleTask, Pa as Query, Lh as QueryConstraint, Oh as QueryDocumentSnapshot, Mh as QuerySnapshot, Nh as SnapshotMetadata, ut as Timestamp, Pl as Transaction, al as WriteBatch, re as _DatabaseId, dt as _DocumentKey, et as _EmptyAppCheckTokenProvider, z as _EmptyAuthCredentialsProvider, ft as _FieldPath, Ia as _cast, q as _debugAssert, Ht as _isBase64Available, $ as _logWarn, kl as _setIndexConfiguration, ma as _validateIsNotUsedTogether, Tl as addDoc, Cl as arrayRemove, Dl as arrayUnion, Qa as clearIndexedDbPersistence, Va as collection, Sa as collectionGroup, Ra as connectFirestoreEmulator, Il as deleteDoc, Vl as deleteField, za as disableNetwork, Da as doc, th as documentId, qa as enableIndexedDbPersistence, Ka as enableMultiTabIndexedDbPersistence, Wa as enableNetwork, tl as endAt, Zh as endBefore, La as ensureFirestoreConfigured, Rl as executeWrite, ll as getDoc, dl as getDocFromCache, _l as getDocFromServer, wl as getDocs, ml as getDocsFromCache, gl as getDocsFromServer, Ba as getFirestore, xl as increment, $a as initializeFirestore, Wh as limit, zh as limitToLast, Ja as loadBundle, Ya as namedQuery, El as onSnapshot, Al as onSnapshotsInSync, Qh as orderBy, Uh as query, xa as queryEqual, Ca as refEqual, vl as runTransaction, Sl as serverTimestamp, yl as setDoc, O as setLogLevel, $h as snapshotEqual, Yh as startAfter, Jh as startAt, Ha as terminate, pl as updateDoc, ja as waitForPendingWrites, Kh as where, Nl as writeBatch };