@@ -26,15 +26,7 @@ import {
26
26
FirebaseService ,
27
27
FirebaseServiceNamespace
28
28
} from '@firebase/app-types/private' ;
29
- import {
30
- SDK_VERSION ,
31
- initializeApp ,
32
- registerVersion ,
33
- onLog ,
34
- setLogLevel ,
35
- _registerComponent ,
36
- _DEFAULT_ENTRY_NAME
37
- } from '@firebase/app-exp' ;
29
+ import * as modularAPIs from '@firebase/app-exp' ;
38
30
import { _FirebaseAppInternal } from '@firebase/app-types-exp' ;
39
31
import { Component , ComponentType } from '@firebase/component' ;
40
32
@@ -66,16 +58,17 @@ export function createFirebaseNamespaceCore(
66
58
initializeApp : initializeAppCompat ,
67
59
// @ts -ignore
68
60
app,
69
- registerVersion,
70
- setLogLevel,
71
- onLog,
61
+ registerVersion : modularAPIs . registerVersion ,
62
+ setLogLevel : modularAPIs . setLogLevel ,
63
+ onLog : modularAPIs . onLog ,
72
64
// @ts -ignore
73
65
apps : null ,
74
- SDK_VERSION ,
66
+ SDK_VERSION : modularAPIs . SDK_VERSION ,
75
67
INTERNAL : {
76
68
registerComponent : registerComponentCompat ,
77
69
removeApp,
78
- useAsService
70
+ useAsService,
71
+ modularAPIs
79
72
}
80
73
} ;
81
74
@@ -109,7 +102,7 @@ export function createFirebaseNamespaceCore(
109
102
* Get the App object for a given name (or DEFAULT).
110
103
*/
111
104
function app ( name ?: string ) : FirebaseApp {
112
- name = name || _DEFAULT_ENTRY_NAME ;
105
+ name = name || modularAPIs . _DEFAULT_ENTRY_NAME ;
113
106
if ( ! contains ( apps , name ) ) {
114
107
throw ERROR_FACTORY . create ( AppError . NO_APP , { appName : name } ) ;
115
108
}
@@ -126,7 +119,10 @@ export function createFirebaseNamespaceCore(
126
119
options : FirebaseOptions ,
127
120
rawConfig = { }
128
121
) : FirebaseApp {
129
- const app = initializeApp ( options , rawConfig ) as _FirebaseAppInternal ;
122
+ const app = modularAPIs . initializeApp (
123
+ options ,
124
+ rawConfig
125
+ ) as _FirebaseAppInternal ;
130
126
const appCompat = new firebaseAppImpl ( app , namespace as _FirebaseNamespace ) ;
131
127
apps [ app . name ] = appCompat ;
132
128
return appCompat ;
@@ -145,7 +141,7 @@ export function createFirebaseNamespaceCore(
145
141
) : FirebaseServiceNamespace < FirebaseService > | null {
146
142
const componentName = component . name ;
147
143
if (
148
- _registerComponent ( component ) &&
144
+ modularAPIs . _registerComponent ( component ) &&
149
145
component . type === ComponentType . PUBLIC
150
146
) {
151
147
// create service namespace for public components
0 commit comments