File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1515 */
1616
1717import firebase from '@firebase/app' ;
18+ import { CONSTANTS , isNodeSdk } from '@firebase/util' ;
1819import { FirebaseApp , FirebaseNamespace } from '@firebase/app-types' ;
1920import { _FirebaseNamespace } from '@firebase/app-types/private' ;
2021import { Database } from './src/api/Database' ;
@@ -24,7 +25,6 @@ import { enableLogging } from './src/core/util/util';
2425import { RepoManager } from './src/core/RepoManager' ;
2526import * as INTERNAL from './src/api/internal' ;
2627import * as TEST_ACCESS from './src/api/test_access' ;
27- import { isNodeSdk } from '@firebase/util' ;
2828import './src/nodePatches' ;
2929import * as types from '@firebase/database-types' ;
3030
@@ -38,7 +38,16 @@ import * as types from '@firebase/database-types';
3838
3939const ServerValue = Database . ServerValue ;
4040
41- export function initStandalone ( app , url ) {
41+ export function initStandalone ( app , url , version ?: string ) {
42+ /**
43+ * This should allow the firebase-admin package to provide a custom version
44+ * to the backend
45+ */
46+ CONSTANTS . NODE_ADMIN = true ;
47+ if ( version ) {
48+ firebase . SDK_VERSION = version ;
49+ }
50+
4251 return {
4352 instance : RepoManager . getInstance ( ) . databaseFromApp ( app , url ) ,
4453 namespace : {
You can’t perform that action at this time.
0 commit comments