@firebase/database-compat 1.0.6-canary.f58d48cd4 → 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.
@@ -28,7 +28,7 @@ export declare function createTestApp(): import("@firebase/app-compat").Firebase
28
28
  export declare function getRootNode(i?: number, ref?: string): any;
29
29
  /**
30
30
  * Create multiple refs to the same top level
31
- * push key - each on it's own Firebase.Context.
31
+ * push key - each on its own Firebase.Context.
32
32
  */
33
33
  export declare function getRandomNode(numNodes?: any): Reference | Reference[];
34
34
  export declare function getQueryValue(query: Query): Promise<unknown>;
@@ -5,7 +5,7 @@ import { errorPrefix, validateArgCount, validateCallback, validateContextObject,
5
5
  import { Logger } from '@firebase/logger';
6
6
 
7
7
  const name = "@firebase/database-compat";
8
- const version = "1.0.6-canary.f58d48cd4";
8
+ const version = "1.0.6-dataconnect-preview.d986d4bf2";
9
9
 
10
10
  /**
11
11
  * @license
@@ -6,7 +6,7 @@ import { __extends } from 'tslib';
6
6
  import { Logger } from '@firebase/logger';
7
7
 
8
8
  var name = "@firebase/database-compat";
9
- var version = "1.0.6-canary.f58d48cd4";
9
+ var version = "1.0.6-dataconnect-preview.d986d4bf2";
10
10
 
11
11
  /**
12
12
  * @license
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
12
12
  var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
13
13
 
14
14
  var name = "@firebase/database-compat";
15
- var version = "1.0.6-canary.f58d48cd4";
15
+ var version = "1.0.6-dataconnect-preview.d986d4bf2";
16
16
 
17
17
  /**
18
18
  * @license
@@ -3954,7 +3954,7 @@ var isWindowsStoreApp = function () {
3954
3954
  return typeof Windows === 'object' && typeof Windows.UI === 'object';
3955
3955
  };
3956
3956
  /**
3957
- * Converts a server error code to a Javascript Error
3957
+ * Converts a server error code to a JavaScript Error
3958
3958
  */
3959
3959
  function errorForServerCode(code, query) {
3960
3960
  var reason = 'Unknown Error';
@@ -3983,7 +3983,7 @@ var INTEGER_REGEXP_ = new RegExp('^-?(0*)\\d{1,10}$');
3983
3983
  */
3984
3984
  var INTEGER_32_MIN = -2147483648;
3985
3985
  /**
3986
- * For use in kyes, the maximum possible 32-bit integer.
3986
+ * For use in keys, the maximum possible 32-bit integer.
3987
3987
  */
3988
3988
  var INTEGER_32_MAX = 2147483647;
3989
3989
  /**
@@ -4681,7 +4681,7 @@ var AppCheckTokenProvider = /** @class */ (function () {
4681
4681
  // Support delayed initialization of FirebaseAppCheck. This allows our
4682
4682
  // customers to initialize the RTDB SDK before initializing Firebase
4683
4683
  // AppCheck and ensures that all requests are authenticated if a token
4684
- // becomes available before the timoeout below expires.
4684
+ // becomes available before the timeout below expires.
4685
4685
  setTimeout(function () {
4686
4686
  if (_this.appCheck) {
4687
4687
  _this.getToken(forceRefresh).then(resolve, reject);
@@ -4743,7 +4743,7 @@ var FirebaseAuthTokenProvider = /** @class */ (function () {
4743
4743
  // Support delayed initialization of FirebaseAuth. This allows our
4744
4744
  // customers to initialize the RTDB SDK before initializing Firebase
4745
4745
  // Auth and ensures that all requests are authenticated if a token
4746
- // becomes available before the timoeout below expires.
4746
+ // becomes available before the timeout below expires.
4747
4747
  setTimeout(function () {
4748
4748
  if (_this.auth_) {
4749
4749
  _this.getToken(forceRefresh).then(resolve, reject);
@@ -5237,7 +5237,7 @@ var BrowserPollConnection = /** @class */ (function () {
5237
5237
  *********************************************************************************************/
5238
5238
  var FirebaseIFrameScriptHolder = /** @class */ (function () {
5239
5239
  /**
5240
- * @param commandCB - The callback to be called when control commands are recevied from the server.
5240
+ * @param commandCB - The callback to be called when control commands are received from the server.
5241
5241
  * @param onMessageCB - The callback to be triggered when responses arrive from the server.
5242
5242
  * @param onDisconnect - The callback to be triggered when this tag holder is closed
5243
5243
  * @param urlFn - A function that provides the URL of the endpoint to send data to.
@@ -5282,8 +5282,6 @@ var FirebaseIFrameScriptHolder = /** @class */ (function () {
5282
5282
  var iframeContents = '<html><body>' + script + '</body></html>';
5283
5283
  try {
5284
5284
  this.myIFrame.doc.open();
5285
- // TODO: Do not use document.write, since it can lead to XSS. Instead, use the safevalues
5286
- // library to sanitize the HTML in the iframeContents.
5287
5285
  this.myIFrame.doc.write(iframeContents);
5288
5286
  this.myIFrame.doc.close();
5289
5287
  }
@@ -5509,10 +5507,6 @@ var FirebaseIFrameScriptHolder = /** @class */ (function () {
5509
5507
  var newScript_1 = _this.myIFrame.doc.createElement('script');
5510
5508
  newScript_1.type = 'text/javascript';
5511
5509
  newScript_1.async = true;
5512
- // TODO: We cannot assign an arbitrary URL to a script attached to the DOM, since it is
5513
- // at risk of XSS. We should use the safevalues library to create a safeScriptEl, and
5514
- // assign a sanitized trustedResourceURL to it. Since the URL must be a template string
5515
- // literal, this could require some heavy refactoring.
5516
5510
  newScript_1.src = url;
5517
5511
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5518
5512
  newScript_1.onload = newScript_1.onreadystatechange =
@@ -14003,7 +13997,7 @@ function treeHasChildren(tree) {
14003
13997
  return tree.node.childCount > 0;
14004
13998
  }
14005
13999
  /**
14006
- * @returns Whethe rthe tree is empty (no value or children).
14000
+ * @returns Whether the tree is empty (no value or children).
14007
14001
  */
14008
14002
  function treeIsEmpty(tree) {
14009
14003
  return treeGetValue(tree) === undefined && !treeHasChildren(tree);
@@ -16414,7 +16408,7 @@ function push(parent, value) {
16414
16408
  // then() and catch() methods and is used as the return value of push(). The
16415
16409
  // second remains a regular Reference and is used as the fulfilled value of
16416
16410
  // the first ThennableReference.
16417
- var thennablePushRef = child(parent, name);
16411
+ var thenablePushRef = child(parent, name);
16418
16412
  var pushRef = child(parent, name);
16419
16413
  var promise;
16420
16414
  if (value != null) {
@@ -16423,9 +16417,9 @@ function push(parent, value) {
16423
16417
  else {
16424
16418
  promise = Promise.resolve(pushRef);
16425
16419
  }
16426
- thennablePushRef.then = promise.then.bind(promise);
16427
- thennablePushRef.catch = promise.then.bind(promise, undefined);
16428
- return thennablePushRef;
16420
+ thenablePushRef.then = promise.then.bind(promise);
16421
+ thenablePushRef.catch = promise.then.bind(promise, undefined);
16422
+ return thenablePushRef;
16429
16423
  }
16430
16424
  /**
16431
16425
  * Removes the data at this Database location.