@firebase/database 1.0.0 → 1.0.1-20230718222737

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.
@@ -1,10 +1,10 @@
1
1
  import { _getProvider, getApp, SDK_VERSION as SDK_VERSION$1, _registerComponent, registerVersion } from '@firebase/app';
2
- import { Component } from '@firebase/component';
2
+ import { Component, ComponentContainer, Provider } from '@firebase/component';
3
3
  import { stringify, jsonEval, contains, assert, isNodeSdk, stringToByteArray, Sha1, base64, deepCopy, base64Encode, isMobileCordova, stringLength, Deferred, safeGet, isAdmin, isValidFormat, isEmpty, isReactNative, assertionError, map, querystring, errorPrefix, getModularInstance, getDefaultEmulatorHostnameAndPort, createMockUserToken } from '@firebase/util';
4
4
  import { Logger, LogLevel } from '@firebase/logger';
5
5
 
6
6
  const name = "@firebase/database";
7
- const version = "1.0.0";
7
+ const version = "1.0.1-20230718222737";
8
8
 
9
9
  /**
10
10
  * @license
@@ -13932,6 +13932,49 @@ const forceRestClient = function (forceRestClient) {
13932
13932
  repoManagerForceRestClient(forceRestClient);
13933
13933
  };
13934
13934
 
13935
+ /**
13936
+ * @license
13937
+ * Copyright 2023 Google LLC
13938
+ *
13939
+ * Licensed under the Apache License, Version 2.0 (the "License");
13940
+ * you may not use this file except in compliance with the License.
13941
+ * You may obtain a copy of the License at
13942
+ *
13943
+ * http://www.apache.org/licenses/LICENSE-2.0
13944
+ *
13945
+ * Unless required by applicable law or agreed to in writing, software
13946
+ * distributed under the License is distributed on an "AS IS" BASIS,
13947
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13948
+ * See the License for the specific language governing permissions and
13949
+ * limitations under the License.
13950
+ */
13951
+ /**
13952
+ * Used by console to create a database based on the app,
13953
+ * passed database URL and a custom auth implementation.
13954
+ * @internal
13955
+ * @param app - A valid FirebaseApp-like object
13956
+ * @param url - A valid Firebase databaseURL
13957
+ * @param version - custom version e.g. firebase-admin version
13958
+ * @param customAppCheckImpl - custom app check implementation
13959
+ * @param customAuthImpl - custom auth implementation
13960
+ */
13961
+ function _initStandalone({ app, url, version, customAuthImpl, customAppCheckImpl, nodeAdmin = false }) {
13962
+ setSDKVersion(version);
13963
+ /**
13964
+ * ComponentContainer('database-standalone') is just a placeholder that doesn't perform
13965
+ * any actual function.
13966
+ */
13967
+ const componentContainer = new ComponentContainer('database-standalone');
13968
+ const authProvider = new Provider('auth-internal', componentContainer);
13969
+ let appCheckProvider;
13970
+ if (customAppCheckImpl) {
13971
+ appCheckProvider = new Provider('app-check-internal', componentContainer);
13972
+ appCheckProvider.setComponent(new Component('app-check-internal', () => customAppCheckImpl, "PRIVATE" /* ComponentType.PRIVATE */));
13973
+ }
13974
+ authProvider.setComponent(new Component('auth-internal', () => customAuthImpl, "PRIVATE" /* ComponentType.PRIVATE */));
13975
+ return repoManagerDatabaseFromApp(app, authProvider, appCheckProvider, url, nodeAdmin);
13976
+ }
13977
+
13935
13978
  /**
13936
13979
  * Firebase Realtime Database
13937
13980
  *
@@ -13939,5 +13982,5 @@ const forceRestClient = function (forceRestClient) {
13939
13982
  */
13940
13983
  registerDatabase();
13941
13984
 
13942
- export { DataSnapshot, Database, OnDisconnect, QueryConstraint, TransactionResult, QueryImpl as _QueryImpl, QueryParams as _QueryParams, ReferenceImpl as _ReferenceImpl, forceRestClient as _TEST_ACCESS_forceRestClient, hijackHash as _TEST_ACCESS_hijackHash, repoManagerDatabaseFromApp as _repoManagerDatabaseFromApp, setSDKVersion as _setSDKVersion, validatePathString as _validatePathString, validateWritablePath as _validateWritablePath, child, connectDatabaseEmulator, enableLogging, endAt, endBefore, equalTo, forceLongPolling, forceWebSockets, get, getDatabase, goOffline, goOnline, increment, limitToFirst, limitToLast, off, onChildAdded, onChildChanged, onChildMoved, onChildRemoved, onDisconnect, onValue, orderByChild, orderByKey, orderByPriority, orderByValue, push, query, ref, refFromURL, remove, runTransaction, serverTimestamp, set, setPriority, setWithPriority, startAfter, startAt, update };
13985
+ export { DataSnapshot, Database, OnDisconnect, QueryConstraint, TransactionResult, QueryImpl as _QueryImpl, QueryParams as _QueryParams, ReferenceImpl as _ReferenceImpl, forceRestClient as _TEST_ACCESS_forceRestClient, hijackHash as _TEST_ACCESS_hijackHash, _initStandalone, repoManagerDatabaseFromApp as _repoManagerDatabaseFromApp, setSDKVersion as _setSDKVersion, validatePathString as _validatePathString, validateWritablePath as _validateWritablePath, child, connectDatabaseEmulator, enableLogging, endAt, endBefore, equalTo, forceLongPolling, forceWebSockets, get, getDatabase, goOffline, goOnline, increment, limitToFirst, limitToLast, off, onChildAdded, onChildChanged, onChildMoved, onChildRemoved, onDisconnect, onValue, orderByChild, orderByKey, orderByPriority, orderByValue, push, query, ref, refFromURL, remove, runTransaction, serverTimestamp, set, setPriority, setWithPriority, startAfter, startAt, update };
13943
13986
  //# sourceMappingURL=index.esm2017.js.map