@firebase/database 1.0.6 → 1.0.7-canary.b4c5ef3c3
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/index.cjs.js +14 -15
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +14 -15
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +14 -15
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +14 -15
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.standalone.js +10 -10
- package/dist/index.standalone.js.map +1 -1
- package/dist/internal.d.ts +4 -5
- package/dist/node-esm/index.node.esm.js +14 -15
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/api/Database.d.ts +3 -4
- package/dist/node-esm/src/core/WriteTree.d.ts +1 -1
- package/dist/node-esm/src/core/util/Tree.d.ts +1 -1
- package/dist/node-esm/src/core/util/util.d.ts +2 -2
- package/dist/node-esm/src/realtime/BrowserPollConnection.d.ts +1 -1
- package/dist/private.d.ts +4 -5
- package/dist/public.d.ts +3 -4
- package/dist/src/api/Database.d.ts +3 -4
- package/dist/src/core/WriteTree.d.ts +1 -1
- package/dist/src/core/util/Tree.d.ts +1 -1
- package/dist/src/core/util/util.d.ts +2 -2
- package/dist/src/realtime/BrowserPollConnection.d.ts +1 -1
- package/package.json +7 -7
package/dist/index.esm5.js
CHANGED
|
@@ -5,7 +5,7 @@ import { stringify, jsonEval, contains, assert, isNodeSdk, stringToByteArray, Sh
|
|
|
5
5
|
import { Logger, LogLevel } from '@firebase/logger';
|
|
6
6
|
|
|
7
7
|
var name = "@firebase/database";
|
|
8
|
-
var version = "1.0.
|
|
8
|
+
var version = "1.0.7-canary.b4c5ef3c3";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @license
|
|
@@ -598,7 +598,7 @@ var isWindowsStoreApp = function () {
|
|
|
598
598
|
return typeof Windows === 'object' && typeof Windows.UI === 'object';
|
|
599
599
|
};
|
|
600
600
|
/**
|
|
601
|
-
* Converts a server error code to a
|
|
601
|
+
* Converts a server error code to a JavaScript Error
|
|
602
602
|
*/
|
|
603
603
|
function errorForServerCode(code, query) {
|
|
604
604
|
var reason = 'Unknown Error';
|
|
@@ -627,7 +627,7 @@ var INTEGER_REGEXP_ = new RegExp('^-?(0*)\\d{1,10}$');
|
|
|
627
627
|
*/
|
|
628
628
|
var INTEGER_32_MIN = -2147483648;
|
|
629
629
|
/**
|
|
630
|
-
* For use in
|
|
630
|
+
* For use in keys, the maximum possible 32-bit integer.
|
|
631
631
|
*/
|
|
632
632
|
var INTEGER_32_MAX = 2147483647;
|
|
633
633
|
/**
|
|
@@ -754,7 +754,7 @@ var AppCheckTokenProvider = /** @class */ (function () {
|
|
|
754
754
|
// Support delayed initialization of FirebaseAppCheck. This allows our
|
|
755
755
|
// customers to initialize the RTDB SDK before initializing Firebase
|
|
756
756
|
// AppCheck and ensures that all requests are authenticated if a token
|
|
757
|
-
// becomes available before the
|
|
757
|
+
// becomes available before the timeout below expires.
|
|
758
758
|
setTimeout(function () {
|
|
759
759
|
if (_this.appCheck) {
|
|
760
760
|
_this.getToken(forceRefresh).then(resolve, reject);
|
|
@@ -816,7 +816,7 @@ var FirebaseAuthTokenProvider = /** @class */ (function () {
|
|
|
816
816
|
// Support delayed initialization of FirebaseAuth. This allows our
|
|
817
817
|
// customers to initialize the RTDB SDK before initializing Firebase
|
|
818
818
|
// Auth and ensures that all requests are authenticated if a token
|
|
819
|
-
// becomes available before the
|
|
819
|
+
// becomes available before the timeout below expires.
|
|
820
820
|
setTimeout(function () {
|
|
821
821
|
if (_this.auth_) {
|
|
822
822
|
_this.getToken(forceRefresh).then(resolve, reject);
|
|
@@ -1531,7 +1531,7 @@ var BrowserPollConnection = /** @class */ (function () {
|
|
|
1531
1531
|
*********************************************************************************************/
|
|
1532
1532
|
var FirebaseIFrameScriptHolder = /** @class */ (function () {
|
|
1533
1533
|
/**
|
|
1534
|
-
* @param commandCB - The callback to be called when control commands are
|
|
1534
|
+
* @param commandCB - The callback to be called when control commands are received from the server.
|
|
1535
1535
|
* @param onMessageCB - The callback to be triggered when responses arrive from the server.
|
|
1536
1536
|
* @param onDisconnect - The callback to be triggered when this tag holder is closed
|
|
1537
1537
|
* @param urlFn - A function that provides the URL of the endpoint to send data to.
|
|
@@ -10642,7 +10642,7 @@ function treeHasChildren(tree) {
|
|
|
10642
10642
|
return tree.node.childCount > 0;
|
|
10643
10643
|
}
|
|
10644
10644
|
/**
|
|
10645
|
-
* @returns
|
|
10645
|
+
* @returns Whether the tree is empty (no value or children).
|
|
10646
10646
|
*/
|
|
10647
10647
|
function treeIsEmpty(tree) {
|
|
10648
10648
|
return treeGetValue(tree) === undefined && !treeHasChildren(tree);
|
|
@@ -13053,7 +13053,7 @@ function push(parent, value) {
|
|
|
13053
13053
|
// then() and catch() methods and is used as the return value of push(). The
|
|
13054
13054
|
// second remains a regular Reference and is used as the fulfilled value of
|
|
13055
13055
|
// the first ThennableReference.
|
|
13056
|
-
var
|
|
13056
|
+
var thenablePushRef = child(parent, name);
|
|
13057
13057
|
var pushRef = child(parent, name);
|
|
13058
13058
|
var promise;
|
|
13059
13059
|
if (value != null) {
|
|
@@ -13062,9 +13062,9 @@ function push(parent, value) {
|
|
|
13062
13062
|
else {
|
|
13063
13063
|
promise = Promise.resolve(pushRef);
|
|
13064
13064
|
}
|
|
13065
|
-
|
|
13066
|
-
|
|
13067
|
-
return
|
|
13065
|
+
thenablePushRef.then = promise.then.bind(promise);
|
|
13066
|
+
thenablePushRef.catch = promise.then.bind(promise, undefined);
|
|
13067
|
+
return thenablePushRef;
|
|
13068
13068
|
}
|
|
13069
13069
|
/**
|
|
13070
13070
|
* Removes the data at this Database location.
|
|
@@ -14096,10 +14096,9 @@ function forceLongPolling() {
|
|
|
14096
14096
|
BrowserPollConnection.forceAllow();
|
|
14097
14097
|
}
|
|
14098
14098
|
/**
|
|
14099
|
-
* Returns the instance of the Realtime Database SDK that is associated
|
|
14100
|
-
*
|
|
14101
|
-
*
|
|
14102
|
-
* a custom database URL.
|
|
14099
|
+
* Returns the instance of the Realtime Database SDK that is associated with the provided
|
|
14100
|
+
* {@link @firebase/app#FirebaseApp}. Initializes a new instance with default settings if
|
|
14101
|
+
* no instance exists or if the existing instance uses a custom database URL.
|
|
14103
14102
|
*
|
|
14104
14103
|
* @param app - The {@link @firebase/app#FirebaseApp} instance that the returned Realtime
|
|
14105
14104
|
* Database instance is associated with.
|