@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.
- package/dist/index.cjs.js +45 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +46 -3
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +47 -3
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +46 -1
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.standalone.js +46 -0
- package/dist/index.standalone.js.map +1 -1
- package/dist/internal.d.ts +22 -0
- package/dist/node-esm/index.node.esm.js +46 -3
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/api.standalone.d.ts +1 -0
- package/dist/node-esm/src/internal/index.d.ts +38 -0
- package/dist/private.d.ts +5 -0
- package/dist/public.d.ts +1 -0
- package/dist/src/api.standalone.d.ts +1 -0
- package/dist/src/internal/index.d.ts +38 -0
- package/package.json +1 -1
package/dist/internal.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ import { AppCheckTokenListener } from '@firebase/app-check-interop-types';
|
|
|
9
9
|
import { AppCheckTokenResult } from '@firebase/app-check-interop-types';
|
|
10
10
|
import { EmulatorMockTokenOptions } from '@firebase/util';
|
|
11
11
|
import { FirebaseApp } from '@firebase/app';
|
|
12
|
+
import { FirebaseApp as FirebaseApp_2 } from '@firebase/app-types';
|
|
13
|
+
import { FirebaseAppCheckInternal } from '@firebase/app-check-interop-types';
|
|
14
|
+
import { FirebaseAuthInternal } from '@firebase/auth-interop-types';
|
|
12
15
|
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
|
|
13
16
|
import { FirebaseAuthTokenData } from '@firebase/app-types/private';
|
|
14
17
|
import { _FirebaseService } from '@firebase/app';
|
|
@@ -764,6 +767,25 @@ declare abstract class Index {
|
|
|
764
767
|
abstract toString(): string;
|
|
765
768
|
}
|
|
766
769
|
|
|
770
|
+
/**
|
|
771
|
+
* Used by console to create a database based on the app,
|
|
772
|
+
* passed database URL and a custom auth implementation.
|
|
773
|
+
* @internal
|
|
774
|
+
* @param app - A valid FirebaseApp-like object
|
|
775
|
+
* @param url - A valid Firebase databaseURL
|
|
776
|
+
* @param version - custom version e.g. firebase-admin version
|
|
777
|
+
* @param customAppCheckImpl - custom app check implementation
|
|
778
|
+
* @param customAuthImpl - custom auth implementation
|
|
779
|
+
*/
|
|
780
|
+
export declare function _initStandalone({ app, url, version, customAuthImpl, customAppCheckImpl, nodeAdmin }: {
|
|
781
|
+
app: FirebaseApp_2;
|
|
782
|
+
url: string;
|
|
783
|
+
version: string;
|
|
784
|
+
customAuthImpl: FirebaseAuthInternal;
|
|
785
|
+
customAppCheckImpl?: FirebaseAppCheckInternal;
|
|
786
|
+
nodeAdmin?: boolean;
|
|
787
|
+
}): Database;
|
|
788
|
+
|
|
767
789
|
/**
|
|
768
790
|
* Represents a child snapshot of a `Reference` that is being iterated over. The key will never be undefined.
|
|
769
791
|
*/
|
|
@@ -2,7 +2,7 @@ import Websocket from 'faye-websocket';
|
|
|
2
2
|
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';
|
|
3
3
|
import { Logger, LogLevel } from '@firebase/logger';
|
|
4
4
|
import { _getProvider, getApp, SDK_VERSION as SDK_VERSION$1, _registerComponent, registerVersion } from '@firebase/app';
|
|
5
|
-
import { Component } from '@firebase/component';
|
|
5
|
+
import { Component, ComponentContainer, Provider } from '@firebase/component';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
@@ -1251,7 +1251,7 @@ WebSocketConnection.responsesRequiredToBeHealthy = 2;
|
|
|
1251
1251
|
WebSocketConnection.healthyTimeout = 30000;
|
|
1252
1252
|
|
|
1253
1253
|
const name = "@firebase/database";
|
|
1254
|
-
const version = "1.0.
|
|
1254
|
+
const version = "1.0.1-20230718222737";
|
|
1255
1255
|
|
|
1256
1256
|
/**
|
|
1257
1257
|
* @license
|
|
@@ -13936,6 +13936,49 @@ const forceRestClient = function (forceRestClient) {
|
|
|
13936
13936
|
repoManagerForceRestClient(forceRestClient);
|
|
13937
13937
|
};
|
|
13938
13938
|
|
|
13939
|
+
/**
|
|
13940
|
+
* @license
|
|
13941
|
+
* Copyright 2023 Google LLC
|
|
13942
|
+
*
|
|
13943
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13944
|
+
* you may not use this file except in compliance with the License.
|
|
13945
|
+
* You may obtain a copy of the License at
|
|
13946
|
+
*
|
|
13947
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13948
|
+
*
|
|
13949
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13950
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13951
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13952
|
+
* See the License for the specific language governing permissions and
|
|
13953
|
+
* limitations under the License.
|
|
13954
|
+
*/
|
|
13955
|
+
/**
|
|
13956
|
+
* Used by console to create a database based on the app,
|
|
13957
|
+
* passed database URL and a custom auth implementation.
|
|
13958
|
+
* @internal
|
|
13959
|
+
* @param app - A valid FirebaseApp-like object
|
|
13960
|
+
* @param url - A valid Firebase databaseURL
|
|
13961
|
+
* @param version - custom version e.g. firebase-admin version
|
|
13962
|
+
* @param customAppCheckImpl - custom app check implementation
|
|
13963
|
+
* @param customAuthImpl - custom auth implementation
|
|
13964
|
+
*/
|
|
13965
|
+
function _initStandalone({ app, url, version, customAuthImpl, customAppCheckImpl, nodeAdmin = false }) {
|
|
13966
|
+
setSDKVersion(version);
|
|
13967
|
+
/**
|
|
13968
|
+
* ComponentContainer('database-standalone') is just a placeholder that doesn't perform
|
|
13969
|
+
* any actual function.
|
|
13970
|
+
*/
|
|
13971
|
+
const componentContainer = new ComponentContainer('database-standalone');
|
|
13972
|
+
const authProvider = new Provider('auth-internal', componentContainer);
|
|
13973
|
+
let appCheckProvider;
|
|
13974
|
+
if (customAppCheckImpl) {
|
|
13975
|
+
appCheckProvider = new Provider('app-check-internal', componentContainer);
|
|
13976
|
+
appCheckProvider.setComponent(new Component('app-check-internal', () => customAppCheckImpl, "PRIVATE" /* ComponentType.PRIVATE */));
|
|
13977
|
+
}
|
|
13978
|
+
authProvider.setComponent(new Component('auth-internal', () => customAuthImpl, "PRIVATE" /* ComponentType.PRIVATE */));
|
|
13979
|
+
return repoManagerDatabaseFromApp(app, authProvider, appCheckProvider, url, nodeAdmin);
|
|
13980
|
+
}
|
|
13981
|
+
|
|
13939
13982
|
/**
|
|
13940
13983
|
* @license
|
|
13941
13984
|
* Copyright 2021 Google LLC
|
|
@@ -13955,5 +13998,5 @@ const forceRestClient = function (forceRestClient) {
|
|
|
13955
13998
|
setWebSocketImpl(Websocket.Client);
|
|
13956
13999
|
registerDatabase('node');
|
|
13957
14000
|
|
|
13958
|
-
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 };
|
|
14001
|
+
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 };
|
|
13959
14002
|
//# sourceMappingURL=index.node.esm.js.map
|