@open-xamu-co/firebase-nuxt 1.1.1-next.1 → 1.1.1-next.2
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
Firebase nuxt
|
|
2
2
|
|
|
3
|
+
## [1.1.1-next.2](https://github.com/xamu-co/firebase-nuxt/compare/v1.1.1-next.1...v1.1.1-next.2) (2026-01-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* handle get app errors on get firebase helper ([3e6f7f1](https://github.com/xamu-co/firebase-nuxt/commit/3e6f7f1c35bc2b23595d6e5ce01755b8da9a8efc))
|
|
9
|
+
|
|
3
10
|
## [1.1.1-next.1](https://github.com/xamu-co/firebase-nuxt/compare/v1.1.0...v1.1.1-next.1) (2026-01-10)
|
|
4
11
|
|
|
5
12
|
|
package/README.md
CHANGED
|
@@ -36,8 +36,6 @@ yarn build
|
|
|
36
36
|
|
|
37
37
|
## Extras
|
|
38
38
|
|
|
39
|
-
Due to an [issue with volar](https://github.com/vuejs/language-tools/issues/5018#issuecomment-2495098549), typescript version is fixed at @5.6.3
|
|
40
|
-
|
|
41
39
|
Firebase requires 2 keys, the private one from recaptcha, and the site key from recaptcha enterprise. The former one is passed from the config file.
|
|
42
40
|
|
|
43
41
|
For app check create the key from Recaptcha v3 console instead of enterprise to avoid issues with legacy keys validation. The debug token allows bypassing the validation on dev environments
|
package/dist/module.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type AppOptions } from "firebase-admin/app";
|
|
1
|
+
import { type App, type AppOptions } from "firebase-admin/app";
|
|
2
2
|
export declare function getFirebase(at?: string, appOptions?: AppOptions): {
|
|
3
|
-
firebaseApp:
|
|
3
|
+
firebaseApp: App;
|
|
4
4
|
firebaseFirestore: FirebaseFirestore.Firestore;
|
|
5
5
|
firebaseAuth: import("firebase-admin/auth").Auth;
|
|
6
6
|
firebaseStorage: import("firebase-admin/storage").Storage;
|
|
@@ -5,7 +5,12 @@ import { getStorage } from "firebase-admin/storage";
|
|
|
5
5
|
export function getFirebase(at = "Unknown", appOptions) {
|
|
6
6
|
if (import.meta.client) throw new Error("This function is only available in server context");
|
|
7
7
|
try {
|
|
8
|
-
|
|
8
|
+
let firebaseApp;
|
|
9
|
+
try {
|
|
10
|
+
firebaseApp = getApps().length ? getApp() : initializeApp(appOptions);
|
|
11
|
+
} catch (err) {
|
|
12
|
+
firebaseApp = initializeApp(appOptions);
|
|
13
|
+
}
|
|
9
14
|
const firebaseFirestore = getFirestore(firebaseApp);
|
|
10
15
|
const firebaseAuth = getAuth(firebaseApp);
|
|
11
16
|
const firebaseStorage = getStorage();
|