File tree 9 files changed +24
-47
lines changed
9 files changed +24
-47
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @firebase/auth " : patch
3
+ " @firebase/database " : patch
4
+ " @firebase/firestore " : patch
5
+ " @firebase/functions " : patch
6
+ " @firebase/storage " : patch
7
+ ---
8
+
9
+ Revert "Fixed scroll behavior (#9043 )"
Original file line number Diff line number Diff line change @@ -18,12 +18,7 @@ import { Auth } from '../../model/public_types';
18
18
import { AuthErrorCode } from '../errors' ;
19
19
import { _assert } from '../util/assert' ;
20
20
import { _castAuth } from './auth_impl' ;
21
- import {
22
- deepEqual ,
23
- isCloudWorkstation ,
24
- pingServer ,
25
- updateEmulatorBanner
26
- } from '@firebase/util' ;
21
+ import { deepEqual , isCloudWorkstation , pingServer } from '@firebase/util' ;
27
22
28
23
/**
29
24
* Changes the {@link Auth} instance to communicate with the Firebase Auth Emulator, instead of production
@@ -102,12 +97,13 @@ export function connectAuthEmulator(
102
97
authInternal . emulatorConfig = emulatorConfig ;
103
98
authInternal . settings . appVerificationDisabledForTesting = true ;
104
99
100
+ if ( ! disableWarnings ) {
101
+ emitEmulatorWarning ( ) ;
102
+ }
103
+
104
+ // Workaround to get cookies in Firebase Studio
105
105
if ( isCloudWorkstation ( host ) ) {
106
- updateEmulatorBanner ( 'Auth' , true ) ;
107
- // Workaround to get cookies in Firebase Studio
108
106
void pingServer ( `${ protocol } //${ host } ${ portStr } ` ) ;
109
- } else if ( ! disableWarnings ) {
110
- emitEmulatorWarning ( ) ;
111
107
}
112
108
}
113
109
Original file line number Diff line number Diff line change @@ -30,11 +30,7 @@ import { browserSessionPersistence } from './persistence/session_storage';
30
30
import { indexedDBLocalPersistence } from './persistence/indexed_db' ;
31
31
import { browserPopupRedirectResolver } from './popup_redirect' ;
32
32
import { Auth , User } from '../model/public_types' ;
33
- import {
34
- getDefaultEmulatorHost ,
35
- getExperimentalSetting ,
36
- updateEmulatorBanner
37
- } from '@firebase/util' ;
33
+ import { getDefaultEmulatorHost , getExperimentalSetting } from '@firebase/util' ;
38
34
import { _setExternalJSProvider } from './load_js' ;
39
35
import { _createError } from '../core/util/assert' ;
40
36
import { AuthErrorCode } from '../core/errors' ;
@@ -114,8 +110,6 @@ export function getAuth(app: FirebaseApp = getApp()): Auth {
114
110
const authEmulatorHost = getDefaultEmulatorHost ( 'auth' ) ;
115
111
if ( authEmulatorHost ) {
116
112
connectAuthEmulator ( auth , `http://${ authEmulatorHost } ` ) ;
117
- } else {
118
- updateEmulatorBanner ( 'Auth' , false ) ;
119
113
}
120
114
121
115
return auth ;
Original file line number Diff line number Diff line change @@ -31,8 +31,7 @@ import {
31
31
EmulatorMockTokenOptions ,
32
32
getDefaultEmulatorHostnameAndPort ,
33
33
isCloudWorkstation ,
34
- pingServer ,
35
- updateEmulatorBanner
34
+ pingServer
36
35
} from '@firebase/util' ;
37
36
38
37
import { AppCheckTokenProvider } from '../core/AppCheckTokenProvider' ;
@@ -258,10 +257,6 @@ export class Database implements _FirebaseService {
258
257
this . app . options [ 'databaseAuthVariableOverride' ]
259
258
) ;
260
259
this . _instanceStarted = true ;
261
- updateEmulatorBanner (
262
- 'Database' ,
263
- this . _repo . repoInfo_ . emulatorOptions !== null
264
- ) ;
265
260
}
266
261
return this . _repoInternal ;
267
262
}
@@ -398,7 +393,6 @@ export function connectDatabaseEmulator(
398
393
// Workaround to get cookies in Firebase Studio
399
394
if ( isCloudWorkstation ( host ) ) {
400
395
void pingServer ( host ) ;
401
- updateEmulatorBanner ( 'Database' , true ) ;
402
396
}
403
397
404
398
// Modify the repo to apply emulator settings
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ import {
28
28
EmulatorMockTokenOptions ,
29
29
getDefaultEmulatorHostnameAndPort ,
30
30
isCloudWorkstation ,
31
- updateEmulatorBanner ,
32
31
pingServer
33
32
} from '@firebase/util' ;
34
33
@@ -143,7 +142,6 @@ export class Firestore implements FirestoreService {
143
142
144
143
_freezeSettings ( ) : FirestoreSettingsImpl {
145
144
this . _settingsFrozen = true ;
146
- updateEmulatorBanner ( 'Firestore' , this . _settings . isUsingEmulator ) ;
147
145
return this . _settings ;
148
146
}
149
147
@@ -336,7 +334,9 @@ export function connectFirestoreEmulator(
336
334
emulatorOptions : firestore . _getEmulatorOptions ( )
337
335
} ;
338
336
const newHostSetting = `${ host } :${ port } ` ;
339
-
337
+ if ( useSsl ) {
338
+ void pingServer ( `https://${ newHostSetting } ` ) ;
339
+ }
340
340
if ( settings . host !== DEFAULT_HOST && settings . host !== newHostSetting ) {
341
341
logWarn (
342
342
'Host has been set in both settings() and connectFirestoreEmulator(), emulator host ' +
@@ -357,11 +357,6 @@ export function connectFirestoreEmulator(
357
357
358
358
firestore . _setSettings ( newConfig ) ;
359
359
360
- if ( useSsl ) {
361
- void pingServer ( `https://${ newHostSetting } ` ) ;
362
- updateEmulatorBanner ( 'Firestore' , true ) ;
363
- }
364
-
365
360
if ( options . mockUserToken ) {
366
361
let token : string ;
367
362
let user : User ;
Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ import {
29
29
} from './service' ;
30
30
import {
31
31
getModularInstance ,
32
- getDefaultEmulatorHostnameAndPort ,
33
- updateEmulatorBanner
32
+ getDefaultEmulatorHostnameAndPort
34
33
} from '@firebase/util' ;
35
34
36
35
export { FunctionsError } from './error' ;
@@ -48,7 +47,6 @@ export function getFunctions(
48
47
app : FirebaseApp = getApp ( ) ,
49
48
regionOrCustomDomain : string = DEFAULT_REGION
50
49
) : Functions {
51
- updateEmulatorBanner ( 'Functions' , false ) ;
52
50
// Dependencies
53
51
const functionsProvider : Provider < 'functions' > = _getProvider (
54
52
getModularInstance ( app ) ,
Original file line number Diff line number Diff line change @@ -30,11 +30,7 @@ import { Provider } from '@firebase/component';
30
30
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types' ;
31
31
import { MessagingInternalComponentName } from '@firebase/messaging-interop-types' ;
32
32
import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types' ;
33
- import {
34
- isCloudWorkstation ,
35
- pingServer ,
36
- updateEmulatorBanner
37
- } from '@firebase/util' ;
33
+ import { isCloudWorkstation , pingServer } from '@firebase/util' ;
38
34
39
35
export const DEFAULT_REGION = 'us-central1' ;
40
36
@@ -186,7 +182,6 @@ export function connectFunctionsEmulator(
186
182
// Workaround to get cookies in Firebase Studio
187
183
if ( useSsl ) {
188
184
void pingServer ( functionsInstance . emulatorOrigin ) ;
189
- updateEmulatorBanner ( 'Functions' , true ) ;
190
185
}
191
186
}
192
187
Original file line number Diff line number Diff line change @@ -53,8 +53,7 @@ import { STORAGE_TYPE } from './constants';
53
53
import {
54
54
EmulatorMockTokenOptions ,
55
55
getModularInstance ,
56
- getDefaultEmulatorHostnameAndPort ,
57
- updateEmulatorBanner
56
+ getDefaultEmulatorHostnameAndPort
58
57
} from '@firebase/util' ;
59
58
import { StringFormat } from './implementation/string' ;
60
59
@@ -333,7 +332,6 @@ export function getStorage(
333
332
bucketUrl ?: string
334
333
) : FirebaseStorage {
335
334
app = getModularInstance ( app ) ;
336
- updateEmulatorBanner ( 'Storage' , false ) ;
337
335
const storageProvider : Provider < 'storage' > = _getProvider ( app , STORAGE_TYPE ) ;
338
336
const storageInstance = storageProvider . getImmediate ( {
339
337
identifier : bucketUrl
Original file line number Diff line number Diff line change @@ -46,8 +46,7 @@ import {
46
46
createMockUserToken ,
47
47
EmulatorMockTokenOptions ,
48
48
isCloudWorkstation ,
49
- pingServer ,
50
- updateEmulatorBanner
49
+ pingServer
51
50
} from '@firebase/util' ;
52
51
import { Connection , ConnectionType } from './implementation/connection' ;
53
52
@@ -151,7 +150,6 @@ export function connectStorageEmulator(
151
150
// Workaround to get cookies in Firebase Studio
152
151
if ( useSsl ) {
153
152
void pingServer ( `https://${ storage . host } ` ) ;
154
- updateEmulatorBanner ( 'Storage' , true ) ;
155
153
}
156
154
storage . _isUsingEmulator = true ;
157
155
storage . _protocol = useSsl ? 'https' : 'http' ;
You can’t perform that action at this time.
0 commit comments