@firebase/database 1.0.6-canary.fd8bd4b02 → 1.0.6-dataconnect-preview.d986d4bf2
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 -21
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +14 -21
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +14 -21
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +14 -21
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.standalone.js +10 -16
- package/dist/index.standalone.js.map +1 -1
- package/dist/internal.d.ts +4 -5
- package/dist/node-esm/index.node.esm.js +14 -21
- 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 -8
package/dist/index.standalone.js
CHANGED
|
@@ -607,7 +607,7 @@ var isWindowsStoreApp = function () {
|
|
|
607
607
|
return typeof Windows === 'object' && typeof Windows.UI === 'object';
|
|
608
608
|
};
|
|
609
609
|
/**
|
|
610
|
-
* Converts a server error code to a
|
|
610
|
+
* Converts a server error code to a JavaScript Error
|
|
611
611
|
*/
|
|
612
612
|
function errorForServerCode(code, query) {
|
|
613
613
|
var reason = 'Unknown Error';
|
|
@@ -636,7 +636,7 @@ var INTEGER_REGEXP_ = new RegExp('^-?(0*)\\d{1,10}$');
|
|
|
636
636
|
*/
|
|
637
637
|
var INTEGER_32_MIN = -2147483648;
|
|
638
638
|
/**
|
|
639
|
-
* For use in
|
|
639
|
+
* For use in keys, the maximum possible 32-bit integer.
|
|
640
640
|
*/
|
|
641
641
|
var INTEGER_32_MAX = 2147483647;
|
|
642
642
|
/**
|
|
@@ -1334,7 +1334,7 @@ var AppCheckTokenProvider = /** @class */ (function () {
|
|
|
1334
1334
|
// Support delayed initialization of FirebaseAppCheck. This allows our
|
|
1335
1335
|
// customers to initialize the RTDB SDK before initializing Firebase
|
|
1336
1336
|
// AppCheck and ensures that all requests are authenticated if a token
|
|
1337
|
-
// becomes available before the
|
|
1337
|
+
// becomes available before the timeout below expires.
|
|
1338
1338
|
setTimeout(function () {
|
|
1339
1339
|
if (_this.appCheck) {
|
|
1340
1340
|
_this.getToken(forceRefresh).then(resolve, reject);
|
|
@@ -1396,7 +1396,7 @@ var FirebaseAuthTokenProvider = /** @class */ (function () {
|
|
|
1396
1396
|
// Support delayed initialization of FirebaseAuth. This allows our
|
|
1397
1397
|
// customers to initialize the RTDB SDK before initializing Firebase
|
|
1398
1398
|
// Auth and ensures that all requests are authenticated if a token
|
|
1399
|
-
// becomes available before the
|
|
1399
|
+
// becomes available before the timeout below expires.
|
|
1400
1400
|
setTimeout(function () {
|
|
1401
1401
|
if (_this.auth_) {
|
|
1402
1402
|
_this.getToken(forceRefresh).then(resolve, reject);
|
|
@@ -1890,7 +1890,7 @@ var BrowserPollConnection = /** @class */ (function () {
|
|
|
1890
1890
|
*********************************************************************************************/
|
|
1891
1891
|
var FirebaseIFrameScriptHolder = /** @class */ (function () {
|
|
1892
1892
|
/**
|
|
1893
|
-
* @param commandCB - The callback to be called when control commands are
|
|
1893
|
+
* @param commandCB - The callback to be called when control commands are received from the server.
|
|
1894
1894
|
* @param onMessageCB - The callback to be triggered when responses arrive from the server.
|
|
1895
1895
|
* @param onDisconnect - The callback to be triggered when this tag holder is closed
|
|
1896
1896
|
* @param urlFn - A function that provides the URL of the endpoint to send data to.
|
|
@@ -1935,8 +1935,6 @@ var FirebaseIFrameScriptHolder = /** @class */ (function () {
|
|
|
1935
1935
|
var iframeContents = '<html><body>' + script + '</body></html>';
|
|
1936
1936
|
try {
|
|
1937
1937
|
this.myIFrame.doc.open();
|
|
1938
|
-
// TODO: Do not use document.write, since it can lead to XSS. Instead, use the safevalues
|
|
1939
|
-
// library to sanitize the HTML in the iframeContents.
|
|
1940
1938
|
this.myIFrame.doc.write(iframeContents);
|
|
1941
1939
|
this.myIFrame.doc.close();
|
|
1942
1940
|
}
|
|
@@ -2162,10 +2160,6 @@ var FirebaseIFrameScriptHolder = /** @class */ (function () {
|
|
|
2162
2160
|
var newScript_1 = _this.myIFrame.doc.createElement('script');
|
|
2163
2161
|
newScript_1.type = 'text/javascript';
|
|
2164
2162
|
newScript_1.async = true;
|
|
2165
|
-
// TODO: We cannot assign an arbitrary URL to a script attached to the DOM, since it is
|
|
2166
|
-
// at risk of XSS. We should use the safevalues library to create a safeScriptEl, and
|
|
2167
|
-
// assign a sanitized trustedResourceURL to it. Since the URL must be a template string
|
|
2168
|
-
// literal, this could require some heavy refactoring.
|
|
2169
2163
|
newScript_1.src = url;
|
|
2170
2164
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2171
2165
|
newScript_1.onload = newScript_1.onreadystatechange =
|
|
@@ -10656,7 +10650,7 @@ function treeHasChildren(tree) {
|
|
|
10656
10650
|
return tree.node.childCount > 0;
|
|
10657
10651
|
}
|
|
10658
10652
|
/**
|
|
10659
|
-
* @returns
|
|
10653
|
+
* @returns Whether the tree is empty (no value or children).
|
|
10660
10654
|
*/
|
|
10661
10655
|
function treeIsEmpty(tree) {
|
|
10662
10656
|
return treeGetValue(tree) === undefined && !treeHasChildren(tree);
|
|
@@ -13067,7 +13061,7 @@ function push(parent, value) {
|
|
|
13067
13061
|
// then() and catch() methods and is used as the return value of push(). The
|
|
13068
13062
|
// second remains a regular Reference and is used as the fulfilled value of
|
|
13069
13063
|
// the first ThennableReference.
|
|
13070
|
-
var
|
|
13064
|
+
var thenablePushRef = child(parent, name);
|
|
13071
13065
|
var pushRef = child(parent, name);
|
|
13072
13066
|
var promise;
|
|
13073
13067
|
if (value != null) {
|
|
@@ -13076,9 +13070,9 @@ function push(parent, value) {
|
|
|
13076
13070
|
else {
|
|
13077
13071
|
promise = Promise.resolve(pushRef);
|
|
13078
13072
|
}
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
return
|
|
13073
|
+
thenablePushRef.then = promise.then.bind(promise);
|
|
13074
|
+
thenablePushRef.catch = promise.then.bind(promise, undefined);
|
|
13075
|
+
return thenablePushRef;
|
|
13082
13076
|
}
|
|
13083
13077
|
/**
|
|
13084
13078
|
* Removes the data at this Database location.
|