@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.
@@ -608,7 +608,7 @@ var isWindowsStoreApp = function () {
608
608
  return typeof Windows === 'object' && typeof Windows.UI === 'object';
609
609
  };
610
610
  /**
611
- * Converts a server error code to a Javascript Error
611
+ * Converts a server error code to a JavaScript Error
612
612
  */
613
613
  function errorForServerCode(code, query) {
614
614
  var reason = 'Unknown Error';
@@ -637,7 +637,7 @@ var INTEGER_REGEXP_ = new RegExp('^-?(0*)\\d{1,10}$');
637
637
  */
638
638
  var INTEGER_32_MIN = -2147483648;
639
639
  /**
640
- * For use in kyes, the maximum possible 32-bit integer.
640
+ * For use in keys, the maximum possible 32-bit integer.
641
641
  */
642
642
  var INTEGER_32_MAX = 2147483647;
643
643
  /**
@@ -1300,7 +1300,7 @@ var WebSocketConnection = /** @class */ (function () {
1300
1300
  }());
1301
1301
 
1302
1302
  var name = "@firebase/database";
1303
- var version = "1.0.6-canary.fd8bd4b02";
1303
+ var version = "1.0.6-dataconnect-preview.d986d4bf2";
1304
1304
 
1305
1305
  /**
1306
1306
  * @license
@@ -1338,7 +1338,7 @@ var AppCheckTokenProvider = /** @class */ (function () {
1338
1338
  // Support delayed initialization of FirebaseAppCheck. This allows our
1339
1339
  // customers to initialize the RTDB SDK before initializing Firebase
1340
1340
  // AppCheck and ensures that all requests are authenticated if a token
1341
- // becomes available before the timoeout below expires.
1341
+ // becomes available before the timeout below expires.
1342
1342
  setTimeout(function () {
1343
1343
  if (_this.appCheck) {
1344
1344
  _this.getToken(forceRefresh).then(resolve, reject);
@@ -1400,7 +1400,7 @@ var FirebaseAuthTokenProvider = /** @class */ (function () {
1400
1400
  // Support delayed initialization of FirebaseAuth. This allows our
1401
1401
  // customers to initialize the RTDB SDK before initializing Firebase
1402
1402
  // Auth and ensures that all requests are authenticated if a token
1403
- // becomes available before the timoeout below expires.
1403
+ // becomes available before the timeout below expires.
1404
1404
  setTimeout(function () {
1405
1405
  if (_this.auth_) {
1406
1406
  _this.getToken(forceRefresh).then(resolve, reject);
@@ -1894,7 +1894,7 @@ var BrowserPollConnection = /** @class */ (function () {
1894
1894
  *********************************************************************************************/
1895
1895
  var FirebaseIFrameScriptHolder = /** @class */ (function () {
1896
1896
  /**
1897
- * @param commandCB - The callback to be called when control commands are recevied from the server.
1897
+ * @param commandCB - The callback to be called when control commands are received from the server.
1898
1898
  * @param onMessageCB - The callback to be triggered when responses arrive from the server.
1899
1899
  * @param onDisconnect - The callback to be triggered when this tag holder is closed
1900
1900
  * @param urlFn - A function that provides the URL of the endpoint to send data to.
@@ -1939,8 +1939,6 @@ var FirebaseIFrameScriptHolder = /** @class */ (function () {
1939
1939
  var iframeContents = '<html><body>' + script + '</body></html>';
1940
1940
  try {
1941
1941
  this.myIFrame.doc.open();
1942
- // TODO: Do not use document.write, since it can lead to XSS. Instead, use the safevalues
1943
- // library to sanitize the HTML in the iframeContents.
1944
1942
  this.myIFrame.doc.write(iframeContents);
1945
1943
  this.myIFrame.doc.close();
1946
1944
  }
@@ -2166,10 +2164,6 @@ var FirebaseIFrameScriptHolder = /** @class */ (function () {
2166
2164
  var newScript_1 = _this.myIFrame.doc.createElement('script');
2167
2165
  newScript_1.type = 'text/javascript';
2168
2166
  newScript_1.async = true;
2169
- // TODO: We cannot assign an arbitrary URL to a script attached to the DOM, since it is
2170
- // at risk of XSS. We should use the safevalues library to create a safeScriptEl, and
2171
- // assign a sanitized trustedResourceURL to it. Since the URL must be a template string
2172
- // literal, this could require some heavy refactoring.
2173
2167
  newScript_1.src = url;
2174
2168
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2175
2169
  newScript_1.onload = newScript_1.onreadystatechange =
@@ -10660,7 +10654,7 @@ function treeHasChildren(tree) {
10660
10654
  return tree.node.childCount > 0;
10661
10655
  }
10662
10656
  /**
10663
- * @returns Whethe rthe tree is empty (no value or children).
10657
+ * @returns Whether the tree is empty (no value or children).
10664
10658
  */
10665
10659
  function treeIsEmpty(tree) {
10666
10660
  return treeGetValue(tree) === undefined && !treeHasChildren(tree);
@@ -13071,7 +13065,7 @@ function push(parent, value) {
13071
13065
  // then() and catch() methods and is used as the return value of push(). The
13072
13066
  // second remains a regular Reference and is used as the fulfilled value of
13073
13067
  // the first ThennableReference.
13074
- var thennablePushRef = child(parent, name);
13068
+ var thenablePushRef = child(parent, name);
13075
13069
  var pushRef = child(parent, name);
13076
13070
  var promise;
13077
13071
  if (value != null) {
@@ -13080,9 +13074,9 @@ function push(parent, value) {
13080
13074
  else {
13081
13075
  promise = Promise.resolve(pushRef);
13082
13076
  }
13083
- thennablePushRef.then = promise.then.bind(promise);
13084
- thennablePushRef.catch = promise.then.bind(promise, undefined);
13085
- return thennablePushRef;
13077
+ thenablePushRef.then = promise.then.bind(promise);
13078
+ thenablePushRef.catch = promise.then.bind(promise, undefined);
13079
+ return thenablePushRef;
13086
13080
  }
13087
13081
  /**
13088
13082
  * Removes the data at this Database location.
@@ -14114,10 +14108,9 @@ function forceLongPolling() {
14114
14108
  BrowserPollConnection.forceAllow();
14115
14109
  }
14116
14110
  /**
14117
- * Returns the instance of the Realtime Database SDK that is associated
14118
- * with the provided {@link @firebase/app#FirebaseApp}. Initializes a new instance with
14119
- * with default settings if no instance exists or if the existing instance uses
14120
- * a custom database URL.
14111
+ * Returns the instance of the Realtime Database SDK that is associated with the provided
14112
+ * {@link @firebase/app#FirebaseApp}. Initializes a new instance with default settings if
14113
+ * no instance exists or if the existing instance uses a custom database URL.
14121
14114
  *
14122
14115
  * @param app - The {@link @firebase/app#FirebaseApp} instance that the returned Realtime
14123
14116
  * Database instance is associated with.