@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/index.node.mjs
CHANGED
|
@@ -2,14 +2,14 @@ import { _getProvider, getApp, _removeServiceInstance, _registerComponent, regis
|
|
|
2
2
|
import { Component } from '@firebase/component';
|
|
3
3
|
import { Logger, LogLevel } from '@firebase/logger';
|
|
4
4
|
import { inspect, TextEncoder, TextDecoder } from 'util';
|
|
5
|
-
import { FirebaseError, createMockUserToken, getModularInstance,
|
|
5
|
+
import { FirebaseError, deepEqual, createMockUserToken, getModularInstance, getDefaultEmulatorHostnameAndPort, isIndexedDBAvailable, getUA, isSafari } from '@firebase/util';
|
|
6
6
|
import { randomBytes as randomBytes$1 } from 'crypto';
|
|
7
7
|
import { Integer, Md5 } from '@firebase/webchannel-wrapper/bloom-blob';
|
|
8
8
|
import * as grpc from '@grpc/grpc-js';
|
|
9
9
|
import * as protoLoader from '@grpc/proto-loader';
|
|
10
10
|
|
|
11
11
|
const name = "@firebase/firestore";
|
|
12
|
-
const version$1 = "4.7.
|
|
12
|
+
const version$1 = "4.7.9";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
@@ -62,7 +62,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
62
62
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
63
63
|
User.MOCK_USER = new User('mock-user');
|
|
64
64
|
|
|
65
|
-
const version = "11.
|
|
65
|
+
const version = "11.4.0";
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* @license
|
|
@@ -27814,6 +27814,7 @@ class Firestore$1 {
|
|
|
27814
27814
|
this._persistenceKey = '(lite)';
|
|
27815
27815
|
this._settings = new FirestoreSettingsImpl({});
|
|
27816
27816
|
this._settingsFrozen = false;
|
|
27817
|
+
this._emulatorOptions = {};
|
|
27817
27818
|
// A task that is assigned when the terminate() is invoked and resolved when
|
|
27818
27819
|
// all components have shut down. Otherwise, Firestore is not terminated,
|
|
27819
27820
|
// which can mean either the FirestoreClient is in the process of starting,
|
|
@@ -27844,6 +27845,7 @@ class Firestore$1 {
|
|
|
27844
27845
|
'methods on a Firestore object.');
|
|
27845
27846
|
}
|
|
27846
27847
|
this._settings = new FirestoreSettingsImpl(settings);
|
|
27848
|
+
this._emulatorOptions = settings.emulatorOptions || {};
|
|
27847
27849
|
if (settings.credentials !== undefined) {
|
|
27848
27850
|
this._authCredentials = makeAuthCredentialsProvider(settings.credentials);
|
|
27849
27851
|
}
|
|
@@ -27851,6 +27853,9 @@ class Firestore$1 {
|
|
|
27851
27853
|
_getSettings() {
|
|
27852
27854
|
return this._settings;
|
|
27853
27855
|
}
|
|
27856
|
+
_getEmulatorOptions() {
|
|
27857
|
+
return this._emulatorOptions;
|
|
27858
|
+
}
|
|
27854
27859
|
_freezeSettings() {
|
|
27855
27860
|
this._settingsFrozen = true;
|
|
27856
27861
|
return this._settings;
|
|
@@ -27911,12 +27916,19 @@ function connectFirestoreEmulator(firestore, host, port, options = {}) {
|
|
|
27911
27916
|
var _a;
|
|
27912
27917
|
firestore = cast(firestore, Firestore$1);
|
|
27913
27918
|
const settings = firestore._getSettings();
|
|
27919
|
+
const existingConfig = Object.assign(Object.assign({}, settings), { emulatorOptions: firestore._getEmulatorOptions() });
|
|
27914
27920
|
const newHostSetting = `${host}:${port}`;
|
|
27915
27921
|
if (settings.host !== DEFAULT_HOST && settings.host !== newHostSetting) {
|
|
27916
27922
|
logWarn('Host has been set in both settings() and connectFirestoreEmulator(), emulator host ' +
|
|
27917
27923
|
'will be used.');
|
|
27918
27924
|
}
|
|
27919
|
-
|
|
27925
|
+
const newConfig = Object.assign(Object.assign({}, settings), { host: newHostSetting, ssl: false, emulatorOptions: options });
|
|
27926
|
+
// No-op if the new configuration matches the current configuration. This supports SSR
|
|
27927
|
+
// enviornments which might call `connectFirestoreEmulator` multiple times as a standard practice.
|
|
27928
|
+
if (deepEqual(newConfig, existingConfig)) {
|
|
27929
|
+
return;
|
|
27930
|
+
}
|
|
27931
|
+
firestore._setSettings(newConfig);
|
|
27920
27932
|
if (options.mockUserToken) {
|
|
27921
27933
|
let token;
|
|
27922
27934
|
let user;
|
|
@@ -29299,7 +29311,7 @@ class GeoPoint {
|
|
|
29299
29311
|
*/
|
|
29300
29312
|
/**
|
|
29301
29313
|
* Represents a vector type in Firestore documents.
|
|
29302
|
-
* Create an instance with {@link
|
|
29314
|
+
* Create an instance with <code>{@link vector}</code>.
|
|
29303
29315
|
*
|
|
29304
29316
|
* @class VectorValue
|
|
29305
29317
|
*/
|
|
@@ -29319,7 +29331,7 @@ class VectorValue {
|
|
|
29319
29331
|
return this._values.map(n => n);
|
|
29320
29332
|
}
|
|
29321
29333
|
/**
|
|
29322
|
-
* Returns `true` if the two VectorValue
|
|
29334
|
+
* Returns `true` if the two `VectorValue` values have the same raw number arrays, returns `false` otherwise.
|
|
29323
29335
|
*/
|
|
29324
29336
|
isEqual(other) {
|
|
29325
29337
|
return isPrimitiveArrayEqual(this._values, other._values);
|