@firebase/database 0.13.6 → 0.13.7

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.
@@ -1298,7 +1298,7 @@ var WebSocketConnection = /** @class */ (function () {
1298
1298
  }());
1299
1299
 
1300
1300
  var name = "@firebase/database";
1301
- var version = "0.13.6";
1301
+ var version = "0.13.7";
1302
1302
 
1303
1303
  /**
1304
1304
  * @license
@@ -13988,22 +13988,6 @@ function query(query) {
13988
13988
  syncPointSetReferenceConstructor(ReferenceImpl);
13989
13989
  syncTreeSetReferenceConstructor(ReferenceImpl);
13990
13990
 
13991
- /**
13992
- * @license
13993
- * Copyright 2020 Google LLC
13994
- *
13995
- * Licensed under the Apache License, Version 2.0 (the "License");
13996
- * you may not use this file except in compliance with the License.
13997
- * You may obtain a copy of the License at
13998
- *
13999
- * http://www.apache.org/licenses/LICENSE-2.0
14000
- *
14001
- * Unless required by applicable law or agreed to in writing, software
14002
- * distributed under the License is distributed on an "AS IS" BASIS,
14003
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14004
- * See the License for the specific language governing permissions and
14005
- * limitations under the License.
14006
- */
14007
13991
  /**
14008
13992
  * This variable is also defined in the firebase Node.js Admin SDK. Before
14009
13993
  * modifying this definition, consult the definition in:
@@ -14197,9 +14181,15 @@ function forceLongPolling() {
14197
14181
  */
14198
14182
  function getDatabase(app$1, url) {
14199
14183
  if (app$1 === void 0) { app$1 = app.getApp(); }
14200
- return app._getProvider(app$1, 'database').getImmediate({
14184
+ var db = app._getProvider(app$1, 'database').getImmediate({
14201
14185
  identifier: url
14202
14186
  });
14187
+ var databaseEmulatorHost = util.getDefaultEmulatorHost('database');
14188
+ if (databaseEmulatorHost) {
14189
+ var _a = tslib.__read(databaseEmulatorHost.split(':'), 2), host = _a[0], port = _a[1];
14190
+ connectDatabaseEmulator(db, host, parseInt(port, 10));
14191
+ }
14192
+ return db;
14203
14193
  }
14204
14194
  /**
14205
14195
  * Modify the provided instance to communicate with the Realtime Database