Skip to content

Commit

Permalink
[FirebaseServerApp] add a new serverapp type for usage tracking. (#8094)
Browse files Browse the repository at this point in the history
Add a new serverapp string so that register version to track FirebaseServerApp usage.
  • Loading branch information
DellaBitta authored Mar 23, 2024
1 parent 9f74ac9 commit db24403
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/app/src/firebaseServerApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ import {
FirebaseServerAppSettings,
FirebaseOptions
} from './public-types';
import { deleteApp } from './api';
import { deleteApp, registerVersion } from './api';
import { ComponentContainer } from '@firebase/component';
import { FirebaseAppImpl } from './firebaseApp';
import { ERROR_FACTORY, AppError } from './errors';
import { name as packageName, version } from '../package.json';

export class FirebaseServerAppImpl
extends FirebaseAppImpl
Expand Down Expand Up @@ -77,6 +78,8 @@ export class FirebaseServerAppImpl
// will never trigger.
this._serverConfig.releaseOnDeref = undefined;
serverConfig.releaseOnDeref = undefined;

registerVersion(packageName, version, 'serverapp');
}

get refCount(): number {
Expand Down

0 comments on commit db24403

Please sign in to comment.