@firebase/firestore 3.12.1 → 3.12.2-20230531163950

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 (40) hide show
  1. package/dist/firestore/src/api/cache_config.d.ts +4 -0
  2. package/dist/firestore/src/api/database.d.ts +2 -0
  3. package/dist/firestore/src/api/settings.d.ts +6 -0
  4. package/dist/index.cjs.js +22 -15
  5. package/dist/index.cjs.js.map +1 -1
  6. package/dist/index.d.ts +12 -0
  7. package/dist/index.esm2017.js +22 -15
  8. package/dist/index.esm2017.js.map +1 -1
  9. package/dist/index.esm5.js +21 -14
  10. package/dist/index.esm5.js.map +1 -1
  11. package/dist/index.node.cjs.js +20 -13
  12. package/dist/index.node.cjs.js.map +1 -1
  13. package/dist/index.node.mjs +20 -13
  14. package/dist/index.node.mjs.map +1 -1
  15. package/dist/index.rn.js +22 -15
  16. package/dist/index.rn.js.map +1 -1
  17. package/dist/internal.d.ts +12 -0
  18. package/dist/lite/firestore/src/api/cache_config.d.ts +4 -0
  19. package/dist/lite/firestore/src/api/database.d.ts +2 -0
  20. package/dist/lite/firestore/src/api/settings.d.ts +6 -0
  21. package/dist/lite/index.browser.esm2017.js +2 -2
  22. package/dist/lite/index.browser.esm2017.js.map +1 -1
  23. package/dist/lite/index.browser.esm5.js +2 -2
  24. package/dist/lite/index.browser.esm5.js.map +1 -1
  25. package/dist/lite/index.cjs.js +2 -2
  26. package/dist/lite/index.cjs.js.map +1 -1
  27. package/dist/lite/index.node.cjs.js +2 -2
  28. package/dist/lite/index.node.mjs +2 -2
  29. package/dist/lite/index.node.mjs.map +1 -1
  30. package/dist/lite/index.rn.esm2017.js +2 -2
  31. package/dist/lite/index.rn.esm2017.js.map +1 -1
  32. package/dist/lite/packages/firestore/src/api/cache_config.d.ts +4 -0
  33. package/dist/lite/packages/firestore/src/api/database.d.ts +2 -0
  34. package/dist/lite/packages/firestore/src/api/settings.d.ts +6 -0
  35. package/dist/packages/firestore/dist/index.esm2017.d.ts +4 -0
  36. package/dist/packages/firestore/src/api/cache_config.d.ts +4 -0
  37. package/dist/packages/firestore/src/api/database.d.ts +2 -0
  38. package/dist/packages/firestore/src/api/settings.d.ts +6 -0
  39. package/dist/private.d.ts +12 -0
  40. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -554,6 +554,8 @@ export { EmulatorMockTokenOptions };
554
554
  * * unimplemented: The browser is incompatible with the offline
555
555
  * persistence implementation.
556
556
  *
557
+ * Persistence cannot be used in a Node.js environment.
558
+ *
557
559
  * @param firestore - The {@link Firestore} instance to enable persistence for.
558
560
  * @param persistenceSettings - Optional settings object to configure
559
561
  * persistence.
@@ -914,6 +916,8 @@ export declare interface FirestoreSettings {
914
916
  * may be removed in a future release. If you find yourself using it to
915
917
  * work around a specific network reliability issue, please tell us about
916
918
  * it in https://github.com/firebase/firebase-js-sdk/issues/1674.
919
+ *
920
+ * This setting cannot be used in a Node.js environment.
917
921
  */
918
922
  experimentalForceLongPolling?: boolean;
919
923
  /**
@@ -927,6 +931,8 @@ export declare interface FirestoreSettings {
927
931
  * polling is now enabled by default. To disable it, set this setting to
928
932
  * `false`, and please open a GitHub issue to share the problems that
929
933
  * motivated you disabling long-polling auto-detection.
934
+ *
935
+ * This setting cannot be used in a Node.js environment.
930
936
  */
931
937
  experimentalAutoDetectLongPolling?: boolean;
932
938
  /**
@@ -1591,6 +1597,8 @@ export declare type PartialWithFieldValue<T> = Partial<T> | (T extends Primitive
1591
1597
  /**
1592
1598
  * Settings that can be passed to `enableIndexedDbPersistence()` to configure
1593
1599
  * Firestore persistence.
1600
+ *
1601
+ * Persistence cannot be used in a Node.js environment.
1594
1602
  */
1595
1603
  export declare interface PersistenceSettings {
1596
1604
  /**
@@ -1603,6 +1611,8 @@ export declare interface PersistenceSettings {
1603
1611
  }
1604
1612
  /**
1605
1613
  * An settings object to configure an `PersistentLocalCache` instance.
1614
+ *
1615
+ * Persistent cache cannot be used in a Node.js environment.
1606
1616
  */
1607
1617
  export declare interface PersistentCacheSettings {
1608
1618
  /**
@@ -1634,6 +1644,8 @@ export declare interface PersistentLocalCache {
1634
1644
  /**
1635
1645
  * Creates an instance of `PersistentLocalCache`. The instance can be set to
1636
1646
  * `FirestoreSettings.cache` to tell the SDK which cache layer to use.
1647
+ *
1648
+ * Persistent cache cannot be used in a Node.js environment.
1637
1649
  */
1638
1650
  export declare function persistentLocalCache(settings?: PersistentCacheSettings): PersistentLocalCache;
1639
1651
  /**
@@ -66,7 +66,7 @@ V.MOCK_USER = new V("mock-user");
66
66
  * See the License for the specific language governing permissions and
67
67
  * limitations under the License.
68
68
  */
69
- let S = "9.22.1";
69
+ let S = "9.22.2-20230531163950";
70
70
 
71
71
  /**
72
72
  * @license
@@ -7965,25 +7965,28 @@ function $r(t, e) {
7965
7965
  const e = ft(t);
7966
7966
  if (void 0 !== e && !this.en(e)) return !1;
7967
7967
  const n = dt(t);
7968
- let s = 0, i = 0;
7968
+ let s = new Set, i = 0, r = 0;
7969
7969
  // Process all equalities first. Equalities can appear out of order.
7970
- for (;s < n.length && this.en(n[s]); ++s) ;
7970
+ for (;i < n.length && this.en(n[i]); ++i) s = s.add(n[i].fieldPath.canonicalString());
7971
7971
  // If we already have processed all segments, all segments are used to serve
7972
7972
  // the equality filters and we do not need to map any segments to the
7973
7973
  // target's inequality and orderBy clauses.
7974
- if (s === n.length) return !0;
7975
- // If there is an inequality filter, the next segment must match both the
7976
- // filter and the first orderBy clause.
7977
- if (void 0 !== this.Ze) {
7978
- const t = n[s];
7979
- if (!this.nn(this.Ze, t) || !this.sn(this.Ye[i++], t)) return !1;
7980
- ++s;
7974
+ if (i === n.length) return !0;
7975
+ if (void 0 !== this.Ze) {
7976
+ // If there is an inequality filter and the field was not in one of the
7977
+ // equality filters above, the next segment must match both the filter
7978
+ // and the first orderBy clause.
7979
+ if (!s.has(this.Ze.field.canonicalString())) {
7980
+ const t = n[i];
7981
+ if (!this.nn(this.Ze, t) || !this.sn(this.Ye[r++], t)) return !1;
7982
+ }
7983
+ ++i;
7981
7984
  }
7982
7985
  // All remaining segments need to represent the prefix of the target's
7983
7986
  // orderBy.
7984
- for (;s < n.length; ++s) {
7985
- const t = n[s];
7986
- if (i >= this.Ye.length || !this.sn(this.Ye[i++], t)) return !1;
7987
+ for (;i < n.length; ++i) {
7988
+ const t = n[i];
7989
+ if (r >= this.Ye.length || !this.sn(this.Ye[r++], t)) return !1;
7987
7990
  }
7988
7991
  return !0;
7989
7992
  }
@@ -18405,6 +18408,8 @@ function Vh(t) {
18405
18408
  * * unimplemented: The browser is incompatible with the offline
18406
18409
  * persistence implementation.
18407
18410
  *
18411
+ * Persistence cannot be used in a Node.js environment.
18412
+ *
18408
18413
  * @param firestore - The {@link Firestore} instance to enable persistence for.
18409
18414
  * @param persistenceSettings - Optional settings object to configure
18410
18415
  * persistence.
@@ -20904,6 +20909,8 @@ class Sf {
20904
20909
  /**
20905
20910
  * Creates an instance of `PersistentLocalCache`. The instance can be set to
20906
20911
  * `FirestoreSettings.cache` to tell the SDK which cache layer to use.
20912
+ *
20913
+ * Persistent cache cannot be used in a Node.js environment.
20907
20914
  */ function Nf(t) {
20908
20915
  return new bf(t);
20909
20916
  }
@@ -21371,9 +21378,9 @@ function Jf(t, e) {
21371
21378
  return s = Object.assign({
21372
21379
  useFetchStreams: e
21373
21380
  }, s), r._setSettings(s), r;
21374
- }), "PUBLIC").setMultipleInstances(!0)), registerVersion(b, "3.12.1", t),
21381
+ }), "PUBLIC").setMultipleInstances(!0)), registerVersion(b, "3.12.2-20230531163950", t),
21375
21382
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
21376
- registerVersion(b, "3.12.1", "esm2017");
21383
+ registerVersion(b, "3.12.2-20230531163950", "esm2017");
21377
21384
  }();
21378
21385
 
21379
21386
  export { Wl as AbstractUserDataWriter, Lh as AggregateField, qh as AggregateQuerySnapshot, Uh as Bytes, Ah as CACHE_SIZE_UNLIMITED, wh as CollectionReference, fh as DocumentReference, sf as DocumentSnapshot, Kh as FieldPath, Qh as FieldValue, vh as Firestore, U as FirestoreError, jh as GeoPoint, Eh as LoadBundleTask, dh as Query, Vl as QueryCompositeFilterConstraint, vl as QueryConstraint, rf as QueryDocumentSnapshot, Bl as QueryEndAtConstraint, Pl as QueryFieldFilterConstraint, Nl as QueryLimitConstraint, Cl as QueryOrderByConstraint, of as QuerySnapshot, $l as QueryStartAtConstraint, nf as SnapshotMetadata, it as Timestamp, qf as Transaction, Bf as WriteBatch, Oe as _DatabaseId, ht as _DocumentKey, X as _EmptyAppCheckTokenProvider, Q as _EmptyAuthCredentialsProvider, at as _FieldPath, ci as _TestingHooks, uh as _cast, B as _debugAssert, be as _isBase64Available, M as _logWarn, sh as _validateIsNotUsedTogether, pf as addDoc, tf as aggregateFieldEqual, ef as aggregateQuerySnapshotEqual, Dl as and, jf as arrayRemove, Qf as arrayUnion, Xl as average, xh as clearIndexedDbPersistence, _h as collection, mh as collectionGroup, lh as connectFirestoreEmulator, Zl as count, yf as deleteDoc, Kf as deleteField, Mh as disableNetwork, gh as doc, Gh as documentId, Sh as enableIndexedDbPersistence, Dh as enableMultiTabIndexedDbPersistence, kh as enableNetwork, ql as endAt, Ll as endBefore, bh as ensureFirestoreConfigured, Ef as executeWrite, Rf as getAggregateFromServer, vf as getCountFromServer, af as getDoc, lf as getDocFromCache, ff as getDocFromServer, df as getDocs, wf as getDocsFromCache, _f as getDocsFromServer, Ph as getFirestore, zf as increment, Rh as initializeFirestore, kl as limit, Ml as limitToLast, Oh as loadBundle, Df as memoryEagerGarbageCollector, xf as memoryLocalCache, Cf as memoryLruGarbageCollector, Fh as namedQuery, If as onSnapshot, Tf as onSnapshotsInSync, Sl as or, xl as orderBy, Nf as persistentLocalCache, Of as persistentMultipleTabManager, $f as persistentSingleTabManager, Rl as query, ph as queryEqual, yh as refEqual, Uf as runTransaction, Gf as serverTimestamp, mf as setDoc, Hf as setIndexConfiguration, x as setLogLevel, cf as snapshotEqual, Fl as startAfter, Ol as startAt, Yl as sum, $h as terminate, gf as updateDoc, Nh as waitForPendingWrites, bl as where, Wf as writeBatch };