@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.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ var util = require('@firebase/util');
|
|
|
8
8
|
var logger$1 = require('@firebase/logger');
|
|
9
9
|
|
|
10
10
|
const name = "@firebase/database";
|
|
11
|
-
const version = "1.0.
|
|
11
|
+
const version = "1.0.7-canary.b4c5ef3c3";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
@@ -575,7 +575,7 @@ const isWindowsStoreApp = function () {
|
|
|
575
575
|
return typeof Windows === 'object' && typeof Windows.UI === 'object';
|
|
576
576
|
};
|
|
577
577
|
/**
|
|
578
|
-
* Converts a server error code to a
|
|
578
|
+
* Converts a server error code to a JavaScript Error
|
|
579
579
|
*/
|
|
580
580
|
function errorForServerCode(code, query) {
|
|
581
581
|
let reason = 'Unknown Error';
|
|
@@ -604,7 +604,7 @@ const INTEGER_REGEXP_ = new RegExp('^-?(0*)\\d{1,10}$');
|
|
|
604
604
|
*/
|
|
605
605
|
const INTEGER_32_MIN = -2147483648;
|
|
606
606
|
/**
|
|
607
|
-
* For use in
|
|
607
|
+
* For use in keys, the maximum possible 32-bit integer.
|
|
608
608
|
*/
|
|
609
609
|
const INTEGER_32_MAX = 2147483647;
|
|
610
610
|
/**
|
|
@@ -729,7 +729,7 @@ class AppCheckTokenProvider {
|
|
|
729
729
|
// Support delayed initialization of FirebaseAppCheck. This allows our
|
|
730
730
|
// customers to initialize the RTDB SDK before initializing Firebase
|
|
731
731
|
// AppCheck and ensures that all requests are authenticated if a token
|
|
732
|
-
// becomes available before the
|
|
732
|
+
// becomes available before the timeout below expires.
|
|
733
733
|
setTimeout(() => {
|
|
734
734
|
if (this.appCheck) {
|
|
735
735
|
this.getToken(forceRefresh).then(resolve, reject);
|
|
@@ -788,7 +788,7 @@ class FirebaseAuthTokenProvider {
|
|
|
788
788
|
// Support delayed initialization of FirebaseAuth. This allows our
|
|
789
789
|
// customers to initialize the RTDB SDK before initializing Firebase
|
|
790
790
|
// Auth and ensures that all requests are authenticated if a token
|
|
791
|
-
// becomes available before the
|
|
791
|
+
// becomes available before the timeout below expires.
|
|
792
792
|
setTimeout(() => {
|
|
793
793
|
if (this.auth_) {
|
|
794
794
|
this.getToken(forceRefresh).then(resolve, reject);
|
|
@@ -1468,7 +1468,7 @@ class BrowserPollConnection {
|
|
|
1468
1468
|
*********************************************************************************************/
|
|
1469
1469
|
class FirebaseIFrameScriptHolder {
|
|
1470
1470
|
/**
|
|
1471
|
-
* @param commandCB - The callback to be called when control commands are
|
|
1471
|
+
* @param commandCB - The callback to be called when control commands are received from the server.
|
|
1472
1472
|
* @param onMessageCB - The callback to be triggered when responses arrive from the server.
|
|
1473
1473
|
* @param onDisconnect - The callback to be triggered when this tag holder is closed
|
|
1474
1474
|
* @param urlFn - A function that provides the URL of the endpoint to send data to.
|
|
@@ -10319,7 +10319,7 @@ function treeHasChildren(tree) {
|
|
|
10319
10319
|
return tree.node.childCount > 0;
|
|
10320
10320
|
}
|
|
10321
10321
|
/**
|
|
10322
|
-
* @returns
|
|
10322
|
+
* @returns Whether the tree is empty (no value or children).
|
|
10323
10323
|
*/
|
|
10324
10324
|
function treeIsEmpty(tree) {
|
|
10325
10325
|
return treeGetValue(tree) === undefined && !treeHasChildren(tree);
|
|
@@ -12647,7 +12647,7 @@ function push(parent, value) {
|
|
|
12647
12647
|
// then() and catch() methods and is used as the return value of push(). The
|
|
12648
12648
|
// second remains a regular Reference and is used as the fulfilled value of
|
|
12649
12649
|
// the first ThennableReference.
|
|
12650
|
-
const
|
|
12650
|
+
const thenablePushRef = child(parent, name);
|
|
12651
12651
|
const pushRef = child(parent, name);
|
|
12652
12652
|
let promise;
|
|
12653
12653
|
if (value != null) {
|
|
@@ -12656,9 +12656,9 @@ function push(parent, value) {
|
|
|
12656
12656
|
else {
|
|
12657
12657
|
promise = Promise.resolve(pushRef);
|
|
12658
12658
|
}
|
|
12659
|
-
|
|
12660
|
-
|
|
12661
|
-
return
|
|
12659
|
+
thenablePushRef.then = promise.then.bind(promise);
|
|
12660
|
+
thenablePushRef.catch = promise.then.bind(promise, undefined);
|
|
12661
|
+
return thenablePushRef;
|
|
12662
12662
|
}
|
|
12663
12663
|
/**
|
|
12664
12664
|
* Removes the data at this Database location.
|
|
@@ -13633,10 +13633,9 @@ function forceLongPolling() {
|
|
|
13633
13633
|
BrowserPollConnection.forceAllow();
|
|
13634
13634
|
}
|
|
13635
13635
|
/**
|
|
13636
|
-
* Returns the instance of the Realtime Database SDK that is associated
|
|
13637
|
-
*
|
|
13638
|
-
*
|
|
13639
|
-
* a custom database URL.
|
|
13636
|
+
* Returns the instance of the Realtime Database SDK that is associated with the provided
|
|
13637
|
+
* {@link @firebase/app#FirebaseApp}. Initializes a new instance with default settings if
|
|
13638
|
+
* no instance exists or if the existing instance uses a custom database URL.
|
|
13640
13639
|
*
|
|
13641
13640
|
* @param app - The {@link @firebase/app#FirebaseApp} instance that the returned Realtime
|
|
13642
13641
|
* Database instance is associated with.
|