Skip to content

Commit 55b938b

Browse files
committed
format
1 parent 500168c commit 55b938b

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

common/api-review/app.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ export interface FirebaseOptions {
7474
// @public
7575
export interface FirebaseServerApp extends FirebaseApp {
7676
// (undocumented)
77-
installationsAuthToken?: string;
77+
readonly installationsAuthToken: string | null;
7878
// (undocumented)
79-
installationsId?: string;
79+
readonly installationsId: string | null;
8080
name: string;
8181
readonly settings: FirebaseServerAppSettings;
8282
}

packages/app/src/public-types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ export interface FirebaseServerApp extends FirebaseApp {
101101
*/
102102
readonly settings: FirebaseServerAppSettings;
103103

104-
readonly installationsId : string | null;
105-
readonly installationsAuthToken : string | null;
104+
readonly installationsId: string | null;
105+
readonly installationsAuthToken: string | null;
106106
}
107107

108108
/**
@@ -205,14 +205,14 @@ export interface FirebaseServerAppSettings
205205
*
206206
* If provided, the `FirebaseServerApp` will attempt to parse the Installations id
207207
* from the token.
208-
*
208+
*
209209
* If the token is deemed to be malformed then an error will be
210210
* thrown during the invocation of `initializeServerApp`.
211-
*
211+
*
212212
* If the the Installations Id and the provided `installationsAuthToken` are successfully parsed,
213213
* then they will be used by the Installations implementation when `getToken` and `getId` are
214214
* invoked.
215-
*
215+
*
216216
* Attempting to use Remote Config without providing an `installationsAuthToken` here will cause
217217
* Installations to throw errors when Remote Config attempts to query the Installations id and
218218
* authToken.

packages/installations/src/api/get-id.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ import { ERROR_FACTORY, ErrorCode } from '../util/errors';
3030
* @public
3131
*/
3232
export async function getId(installations: Installations): Promise<string> {
33-
if(_isFirebaseServerApp(installations.app)) {
34-
if(!installations.app.installationsId) {
33+
if (_isFirebaseServerApp(installations.app)) {
34+
if (!installations.app.installationsId) {
3535
throw ERROR_FACTORY.create(ErrorCode.SERVER_APP_MISSING_AUTH_TOKEN);
36-
}
36+
}
3737
return installations.app.installationsId;
3838
}
3939

packages/installations/src/api/get-token.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ export async function getToken(
3434
installations: Installations,
3535
forceRefresh = false
3636
): Promise<string> {
37-
if(_isFirebaseServerApp(installations.app)) {
38-
if(installations.app.installationsAuthToken === undefined) {
37+
if (_isFirebaseServerApp(installations.app)) {
38+
if (installations.app.installationsAuthToken === undefined) {
3939
throw ERROR_FACTORY.create(ErrorCode.SERVER_APP_MISSING_AUTH_TOKEN);
40-
}
40+
}
4141
return installations.app.installationsAuthToken;
4242
}
4343
const installationsImpl = installations as FirebaseInstallationsImpl;

packages/installations/src/util/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const ERROR_DESCRIPTION_MAP: { readonly [key in ErrorCode]: string } = {
3939
[ErrorCode.DELETE_PENDING_REGISTRATION]:
4040
"Can't delete installation while there is a pending registration request.",
4141
[ErrorCode.SERVER_APP_MISSING_AUTH_TOKEN]:
42-
"The instance of FirebaseServerApp was not initialized with a valid installationsAuthToken"
42+
'The instance of FirebaseServerApp was not initialized with a valid installationsAuthToken'
4343
};
4444

4545
interface ErrorParams {

0 commit comments

Comments
 (0)