File tree 1 file changed +11
-2
lines changed 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 15
15
*/
16
16
17
17
import firebase from '@firebase/app' ;
18
+ import { CONSTANTS , isNodeSdk } from '@firebase/util' ;
18
19
import { FirebaseApp , FirebaseNamespace } from '@firebase/app-types' ;
19
20
import { _FirebaseNamespace } from '@firebase/app-types/private' ;
20
21
import { Database } from './src/api/Database' ;
@@ -24,7 +25,6 @@ import { enableLogging } from './src/core/util/util';
24
25
import { RepoManager } from './src/core/RepoManager' ;
25
26
import * as INTERNAL from './src/api/internal' ;
26
27
import * as TEST_ACCESS from './src/api/test_access' ;
27
- import { isNodeSdk } from '@firebase/util' ;
28
28
import './src/nodePatches' ;
29
29
import * as types from '@firebase/database-types' ;
30
30
@@ -38,7 +38,16 @@ import * as types from '@firebase/database-types';
38
38
39
39
const ServerValue = Database . ServerValue ;
40
40
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
+
42
51
return {
43
52
instance : RepoManager . getInstance ( ) . databaseFromApp ( app , url ) ,
44
53
namespace : {
You can’t perform that action at this time.
0 commit comments