@quatrain/cloudwrapper-firebase 1.1.20 → 1.1.22

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.
Files changed (2) hide show
  1. package/README.md +28 -8
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,24 +1,44 @@
1
1
  # @quatrain/cloudwrapper-firebase
2
2
 
3
- This package provides a Cloud Wrapper adapter for Firebase Functions. It allows you to invoke serverless functions in a consistent way across different BaaS providers.
3
+ The Firebase ecosystem wrapper for `@quatrain/cloudwrapper`.
4
4
 
5
- ## Features
5
+ ## Introduction
6
6
 
7
- - Invokes Firebase Functions (2nd gen).
8
- - Consistent interface provided by `@quatrain/cloudwrapper`.
9
- - Uses the Firebase Admin SDK for secure, server-to-server calls.
7
+ This package aggregates the initialization of:
8
+ - `@quatrain/backend-firestore`
9
+ - `@quatrain/storage-firebase`
10
+ - `@quatrain/auth-firebase`
11
+ - `@quatrain/messaging-firebase`
12
+
13
+ It ensures that the `firebase-admin` SDK is initialized exactly once, avoiding conflicts and simplifying your app's startup sequence.
10
14
 
11
15
  ## Installation
12
16
 
13
17
  ```bash
14
18
  npm install @quatrain/cloudwrapper-firebase firebase-admin
19
+ # or
20
+ yarn add @quatrain/cloudwrapper-firebase firebase-admin
15
21
  ```
16
22
 
17
- ## Usage
23
+ ## Configuration
24
+
25
+ Provide the standard Firebase Admin service account configuration.
18
26
 
19
27
  ```typescript
20
28
  import { CloudWrapper } from '@quatrain/cloudwrapper'
21
- import { FirebaseCloudWrapperAdapter } from '@quatrain/cloudwrapper-firebase'
29
+ import { FirebaseWrapper } from '@quatrain/cloudwrapper-firebase'
30
+
31
+ const firebaseEnv = new FirebaseWrapper({
32
+ config: {
33
+ projectId: process.env.FIREBASE_PROJECT_ID,
34
+ clientEmail: process.env.FIREBASE_CLIENT_EMAIL,
35
+ privateKey: process.env.FIREBASE_PRIVATE_KEY
36
+ }
37
+ })
22
38
 
23
- // Setup and use the adapter with the CloudWrapper singleton.
39
+ CloudWrapper.addAdapter('firebase', firebaseEnv, true)
24
40
  ```
41
+
42
+ ## License
43
+
44
+ AGPL-3.0-only
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quatrain/cloudwrapper-firebase",
3
- "version": "1.1.20",
3
+ "version": "1.1.22",
4
4
  "license": "AGPL-3.0-only",
5
5
  "description": "Cloud Wrapper adapter for Firebase",
6
6
  "main": "dist/index.js",
@@ -14,12 +14,12 @@
14
14
  ],
15
15
  "author": "Quatrain Développement SAS <developers@quatrain.com>",
16
16
  "peerDependencies": {
17
- "@quatrain/core": "^1.1.47"
17
+ "@quatrain/core": "^1.1.48"
18
18
  },
19
19
  "dependencies": {
20
- "@quatrain/backend": "^1.1.33",
21
- "@quatrain/cloudwrapper": "^1.1.22",
22
- "@quatrain/core": "^1.1.47",
20
+ "@quatrain/backend": "^1.1.34",
21
+ "@quatrain/cloudwrapper": "^1.1.24",
22
+ "@quatrain/core": "^1.1.48",
23
23
  "firebase-admin": "^13.4.0",
24
24
  "firebase-functions": "^6.4.0"
25
25
  },