@nx-ddd/common 20.69.4 → 20.74.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,11 @@
1
- import admin from 'firebase-admin';
1
+ import { getAuth } from 'firebase-admin/auth';
2
+ import { getFirestore } from 'firebase-admin/firestore';
2
3
  import { FIREBASE_ADMIN } from '@nx-ddd/common/infrastructure/externals/firebase-admin/token';
3
4
 
4
5
  function provideFirebaseAdmin() {
5
6
  return {
6
7
  provide: FIREBASE_ADMIN,
7
- useValue: admin,
8
+ useValue: { auth: () => getAuth(), firestore: () => getFirestore() },
8
9
  };
9
10
  }
10
11
 
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@nx-ddd/common",
3
- "version": "20.69.4",
3
+ "version": "20.74.3",
4
4
  "license": "MIT",
5
5
  "peerDependencies": {
6
- "@nx-ddd/core": "20.69.4"
6
+ "@nx-ddd/core": "20.74.3"
7
7
  },
8
8
  "dependencies": {
9
9
  "tslib": "^2.3.0"
@@ -1,10 +1,13 @@
1
+ import * as firebase_admin_auth from 'firebase-admin/auth';
1
2
  import * as _angular_core from '@angular/core';
2
- import * as _nx_ddd_common_infrastructure_externals_firebase_admin_token from '@nx-ddd/common/infrastructure/externals/firebase-admin/token';
3
- import admin from 'firebase-admin';
3
+ import { FirebaseAdmin } from '@nx-ddd/common/infrastructure/externals/firebase-admin/token';
4
4
 
5
5
  declare function provideFirebaseAdmin(): {
6
- provide: _angular_core.InjectionToken<_nx_ddd_common_infrastructure_externals_firebase_admin_token.FirebaseAdmin>;
7
- useValue: typeof admin;
6
+ provide: _angular_core.InjectionToken<FirebaseAdmin>;
7
+ useValue: {
8
+ auth: () => firebase_admin_auth.Auth;
9
+ firestore: () => FirebaseFirestore.Firestore;
10
+ };
8
11
  };
9
12
 
10
13
  export { provideFirebaseAdmin };
@@ -1,10 +1,10 @@
1
1
  import { InjectionToken } from '@angular/core';
2
- import admin from 'firebase-admin';
2
+ import { Auth } from 'firebase-admin/auth';
3
+ import { Firestore } from 'firebase-admin/firestore';
3
4
 
4
5
  interface FirebaseAdmin {
5
- auth(): admin.auth.Auth;
6
- firestore(): admin.firestore.Firestore;
7
- settings(): admin.firestore.Settings;
6
+ auth(): Auth;
7
+ firestore(): Firestore;
8
8
  }
9
9
  declare const FIREBASE_ADMIN: InjectionToken<FirebaseAdmin>;
10
10