@firebase/firestore 4.7.8 → 4.7.9
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/firestore/src/global_index.d.ts +9 -2
- package/dist/firestore/src/lite-api/database.d.ts +4 -0
- package/dist/firestore/src/lite-api/settings.d.ts +4 -0
- package/dist/firestore/src/lite-api/vector_value.d.ts +2 -2
- package/dist/firestore/test/integration/util/settings.d.ts +1 -0
- package/dist/index.cjs.js +108 -98
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.esm2017.js +109 -99
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.node.cjs.js +17 -5
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +18 -6
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +44 -34
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +9 -2
- package/dist/lite/firestore/src/lite-api/database.d.ts +4 -0
- package/dist/lite/firestore/src/lite-api/settings.d.ts +4 -0
- package/dist/lite/firestore/src/lite-api/vector_value.d.ts +2 -2
- package/dist/lite/firestore/test/integration/util/settings.d.ts +1 -0
- package/dist/lite/index.browser.esm2017.js +23 -13
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.cjs.js +23 -13
- package/dist/lite/index.cjs.js.map +1 -1
- package/dist/lite/index.d.ts +2 -2
- package/dist/lite/index.node.cjs.js +17 -5
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +18 -6
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +43 -33
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +9 -2
- package/dist/lite/private.d.ts +6 -2
- package/dist/private.d.ts +6 -2
- package/package.json +6 -6
package/dist/lite/index.cjs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { _registerComponent, registerVersion, _isFirebaseServerApp, _getProvider, getApp, _removeServiceInstance, SDK_VERSION } from '@firebase/app';
|
|
2
2
|
import { Component } from '@firebase/component';
|
|
3
3
|
import { Logger, LogLevel } from '@firebase/logger';
|
|
4
|
-
import { FirebaseError, getDefaultEmulatorHostnameAndPort, createMockUserToken, getModularInstance
|
|
4
|
+
import { FirebaseError, getDefaultEmulatorHostnameAndPort, deepEqual, createMockUserToken, getModularInstance } from '@firebase/util';
|
|
5
5
|
import { Integer } from '@firebase/webchannel-wrapper/bloom-blob';
|
|
6
6
|
|
|
7
|
-
const E = "4.7.
|
|
7
|
+
const E = "4.7.9";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
@@ -65,7 +65,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
65
65
|
* See the License for the specific language governing permissions and
|
|
66
66
|
* limitations under the License.
|
|
67
67
|
*/
|
|
68
|
-
let m = "11.
|
|
68
|
+
let m = "11.4.0";
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
@@ -4278,7 +4278,7 @@ class Firestore {
|
|
|
4278
4278
|
* Whether it's a Firestore or Firestore Lite instance.
|
|
4279
4279
|
*/
|
|
4280
4280
|
this.type = "firestore-lite", this._persistenceKey = "(lite)", this._settings = new FirestoreSettingsImpl({}),
|
|
4281
|
-
this._settingsFrozen = !1,
|
|
4281
|
+
this._settingsFrozen = !1, this._emulatorOptions = {},
|
|
4282
4282
|
// A task that is assigned when the terminate() is invoked and resolved when
|
|
4283
4283
|
// all components have shut down. Otherwise, Firestore is not terminated,
|
|
4284
4284
|
// which can mean either the FirestoreClient is in the process of starting,
|
|
@@ -4300,7 +4300,8 @@ class Firestore {
|
|
|
4300
4300
|
}
|
|
4301
4301
|
_setSettings(t) {
|
|
4302
4302
|
if (this._settingsFrozen) throw new FirestoreError(v, "Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");
|
|
4303
|
-
this._settings = new FirestoreSettingsImpl(t),
|
|
4303
|
+
this._settings = new FirestoreSettingsImpl(t), this._emulatorOptions = t.emulatorOptions || {},
|
|
4304
|
+
void 0 !== t.credentials && (this._authCredentials = function __PRIVATE_makeAuthCredentialsProvider(t) {
|
|
4304
4305
|
if (!t) return new __PRIVATE_EmptyAuthCredentialsProvider;
|
|
4305
4306
|
switch (t.type) {
|
|
4306
4307
|
case "firstParty":
|
|
@@ -4317,6 +4318,9 @@ class Firestore {
|
|
|
4317
4318
|
_getSettings() {
|
|
4318
4319
|
return this._settings;
|
|
4319
4320
|
}
|
|
4321
|
+
_getEmulatorOptions() {
|
|
4322
|
+
return this._emulatorOptions;
|
|
4323
|
+
}
|
|
4320
4324
|
_freezeSettings() {
|
|
4321
4325
|
return this._settingsFrozen = !0, this._settings;
|
|
4322
4326
|
}
|
|
@@ -4388,12 +4392,18 @@ function getFirestore(t, r) {
|
|
|
4388
4392
|
* Security Rules.
|
|
4389
4393
|
*/ function connectFirestoreEmulator(t, e, r, n = {}) {
|
|
4390
4394
|
var i;
|
|
4391
|
-
const s = (t = __PRIVATE_cast(t, Firestore))._getSettings(), o =
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4395
|
+
const s = (t = __PRIVATE_cast(t, Firestore))._getSettings(), o = Object.assign(Object.assign({}, s), {
|
|
4396
|
+
emulatorOptions: t._getEmulatorOptions()
|
|
4397
|
+
}), a = `${e}:${r}`;
|
|
4398
|
+
s.host !== nt && s.host !== a && __PRIVATE_logWarn("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.");
|
|
4399
|
+
const u = Object.assign(Object.assign({}, s), {
|
|
4400
|
+
host: a,
|
|
4401
|
+
ssl: !1,
|
|
4402
|
+
emulatorOptions: n
|
|
4403
|
+
});
|
|
4404
|
+
// No-op if the new configuration matches the current configuration. This supports SSR
|
|
4405
|
+
// enviornments which might call `connectFirestoreEmulator` multiple times as a standard practice.
|
|
4406
|
+
if (!deepEqual(u, o) && (t._setSettings(u), n.mockUserToken)) {
|
|
4397
4407
|
let e, r;
|
|
4398
4408
|
if ("string" == typeof n.mockUserToken) e = n.mockUserToken, r = User.MOCK_USER; else {
|
|
4399
4409
|
// Let createMockUserToken validate first (catches common mistakes like
|
|
@@ -4949,7 +4959,7 @@ function doc(t, e, ...r) {
|
|
|
4949
4959
|
*/
|
|
4950
4960
|
/**
|
|
4951
4961
|
* Represents a vector type in Firestore documents.
|
|
4952
|
-
* Create an instance with {@link
|
|
4962
|
+
* Create an instance with <code>{@link vector}</code>.
|
|
4953
4963
|
*
|
|
4954
4964
|
* @class VectorValue
|
|
4955
4965
|
*/
|
|
@@ -4968,7 +4978,7 @@ class VectorValue {
|
|
|
4968
4978
|
return this._values.map((t => t));
|
|
4969
4979
|
}
|
|
4970
4980
|
/**
|
|
4971
|
-
* Returns `true` if the two VectorValue
|
|
4981
|
+
* Returns `true` if the two `VectorValue` values have the same raw number arrays, returns `false` otherwise.
|
|
4972
4982
|
*/ isEqual(t) {
|
|
4973
4983
|
return function __PRIVATE_isPrimitiveArrayEqual(t, e) {
|
|
4974
4984
|
if (t.length !== e.length) return !1;
|