@open-xamu-co/firebase-nuxt 1.1.1-next.2 → 1.1.1-next.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.
- package/CHANGELOG.md +7 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +16 -7
- package/dist/runtime/components/ValueID.d.vue.ts +1 -1
- package/dist/runtime/components/ValueID.vue +1 -1
- package/dist/runtime/components/ValueID.vue.d.ts +1 -1
- package/dist/runtime/components/ValueLocation.d.vue.ts +1 -1
- package/dist/runtime/components/ValueLocation.vue +1 -1
- package/dist/runtime/components/ValueLocation.vue.d.ts +1 -1
- package/dist/runtime/composables/firestore/auth.js +1 -2
- package/dist/runtime/composables/store/session.d.ts +3 -3
- package/dist/runtime/composables/store/session.js +2 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
Firebase nuxt
|
|
2
2
|
|
|
3
|
+
## [1.1.1-next.3](https://github.com/xamu-co/firebase-nuxt/compare/v1.1.1-next.2...v1.1.1-next.3) (2026-01-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* restore optimization excludes ([e7c0337](https://github.com/xamu-co/firebase-nuxt/commit/e7c0337b2b4c539b833615e592ab26fe907287e9))
|
|
9
|
+
|
|
3
10
|
## [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
11
|
|
|
5
12
|
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -11,6 +11,14 @@ const module$1 = defineNuxtModule({
|
|
|
11
11
|
async setup(moduleOptions, nuxt) {
|
|
12
12
|
const { resolve } = createResolver(import.meta.url);
|
|
13
13
|
const runtimePath = resolve("./runtime");
|
|
14
|
+
const firebaseDeps = [
|
|
15
|
+
"firebase",
|
|
16
|
+
"firebase/app",
|
|
17
|
+
"firebase/auth",
|
|
18
|
+
"firebase/app-check",
|
|
19
|
+
"firebase/firestore",
|
|
20
|
+
"firebase/analytics"
|
|
21
|
+
];
|
|
14
22
|
nuxt.options.devtools.enabled = debugNuxt;
|
|
15
23
|
nuxt.options.devtools.timeline = { enabled: debugNuxt };
|
|
16
24
|
nuxt.options.experimental.asyncContext = true;
|
|
@@ -20,6 +28,7 @@ const module$1 = defineNuxtModule({
|
|
|
20
28
|
...nuxt.options.vite.optimizeDeps,
|
|
21
29
|
exclude: [
|
|
22
30
|
...nuxt.options.vite.optimizeDeps?.exclude || [],
|
|
31
|
+
...firebaseDeps,
|
|
23
32
|
// Server imports
|
|
24
33
|
"nitropack/runtime"
|
|
25
34
|
]
|
|
@@ -28,12 +37,8 @@ const module$1 = defineNuxtModule({
|
|
|
28
37
|
...nuxt.options.vite.resolve,
|
|
29
38
|
dedupe: [
|
|
30
39
|
...nuxt.options.vite.resolve?.dedupe || [],
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"firebase/auth",
|
|
34
|
-
"firebase/app-check",
|
|
35
|
-
"firebase/firestore",
|
|
36
|
-
"firebase/analytics",
|
|
40
|
+
...firebaseDeps,
|
|
41
|
+
// Pinia store
|
|
37
42
|
"pinia"
|
|
38
43
|
]
|
|
39
44
|
};
|
|
@@ -108,7 +113,11 @@ const module$1 = defineNuxtModule({
|
|
|
108
113
|
const runtimePath = resolve("./runtime");
|
|
109
114
|
return {
|
|
110
115
|
"nuxt-csurf": {
|
|
111
|
-
version: ">=1.6.5"
|
|
116
|
+
version: ">=1.6.5",
|
|
117
|
+
defaults: {
|
|
118
|
+
addCsrfTokenToEventCtx: true
|
|
119
|
+
// Run server side
|
|
120
|
+
}
|
|
112
121
|
},
|
|
113
122
|
"@open-xamu-co/ui-nuxt": {
|
|
114
123
|
version: ">=4.0.0-next.4",
|
|
@@ -8,9 +8,8 @@ import {
|
|
|
8
8
|
} from "firebase/auth";
|
|
9
9
|
import { FirebaseError } from "firebase/app";
|
|
10
10
|
import { ref } from "vue";
|
|
11
|
-
import { useRouter, useRoute } from "vue-router";
|
|
12
11
|
import { useSwal } from "@open-xamu-co/ui-common-helpers";
|
|
13
|
-
import { useAppLogger, useNuxtApp } from "#imports";
|
|
12
|
+
import { useAppLogger, useNuxtApp, useRouter, useRoute } from "#imports";
|
|
14
13
|
export function useGoogleAuth(defaultRdrPath = "/") {
|
|
15
14
|
const { $clientAuth } = useNuxtApp();
|
|
16
15
|
const Swal = useSwal();
|
|
@@ -18,7 +18,7 @@ export declare const useSessionStore: import("pinia").StoreDefinition<"session",
|
|
|
18
18
|
setUser: ({ createdAt, updatedAt, ...userData }: User, token: string) => void;
|
|
19
19
|
unsetSession: (expiredToken?: boolean) => void;
|
|
20
20
|
logout: (clientAuth?: Auth) => Promise<void>;
|
|
21
|
-
remove: (clientAuth?: Auth) => Promise<void>;
|
|
21
|
+
remove: (navigateTo: (...args: any[]) => any, clientAuth?: Auth) => Promise<void>;
|
|
22
22
|
}, "user" | "token" | "expiredToken">, Pick<{
|
|
23
23
|
token: import("#app").CookieRef<string | null>;
|
|
24
24
|
expiredToken: import("#app").CookieRef<boolean>;
|
|
@@ -27,7 +27,7 @@ export declare const useSessionStore: import("pinia").StoreDefinition<"session",
|
|
|
27
27
|
setUser: ({ createdAt, updatedAt, ...userData }: User, token: string) => void;
|
|
28
28
|
unsetSession: (expiredToken?: boolean) => void;
|
|
29
29
|
logout: (clientAuth?: Auth) => Promise<void>;
|
|
30
|
-
remove: (clientAuth?: Auth) => Promise<void>;
|
|
30
|
+
remove: (navigateTo: (...args: any[]) => any, clientAuth?: Auth) => Promise<void>;
|
|
31
31
|
}, "path">, Pick<{
|
|
32
32
|
token: import("#app").CookieRef<string | null>;
|
|
33
33
|
expiredToken: import("#app").CookieRef<boolean>;
|
|
@@ -36,6 +36,6 @@ export declare const useSessionStore: import("pinia").StoreDefinition<"session",
|
|
|
36
36
|
setUser: ({ createdAt, updatedAt, ...userData }: User, token: string) => void;
|
|
37
37
|
unsetSession: (expiredToken?: boolean) => void;
|
|
38
38
|
logout: (clientAuth?: Auth) => Promise<void>;
|
|
39
|
-
remove: (clientAuth?: Auth) => Promise<void>;
|
|
39
|
+
remove: (navigateTo: (...args: any[]) => any, clientAuth?: Auth) => Promise<void>;
|
|
40
40
|
}, "remove" | "setUser" | "unsetSession" | "logout">>;
|
|
41
41
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { deleteUser } from "firebase/auth";
|
|
2
2
|
import { defineStore, skipHydrate } from "pinia";
|
|
3
3
|
import { computed } from "vue";
|
|
4
|
-
import { useRouter } from "vue-router";
|
|
5
4
|
import { getDocumentId } from "../../client/utils/resolver.js";
|
|
6
5
|
import { useCookie, useRuntimeConfig, useSwal } from "#imports";
|
|
7
6
|
const cookieOptionsDefaults = {
|
|
@@ -58,9 +57,8 @@ export const useSessionStore = defineStore("session", () => {
|
|
|
58
57
|
window.location.href = "/";
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
|
-
async function remove(clientAuth) {
|
|
60
|
+
async function remove(navigateTo, clientAuth) {
|
|
62
61
|
if (import.meta.server) return;
|
|
63
|
-
const router = useRouter();
|
|
64
62
|
const Swal = useSwal();
|
|
65
63
|
const { value } = await Swal.firePrevent({
|
|
66
64
|
title: "Eliminar cuenta",
|
|
@@ -70,7 +68,7 @@ export const useSessionStore = defineStore("session", () => {
|
|
|
70
68
|
const user2 = clientAuth?.currentUser;
|
|
71
69
|
if (user2 && value) {
|
|
72
70
|
await deleteUser(user2);
|
|
73
|
-
|
|
71
|
+
navigateTo("/");
|
|
74
72
|
}
|
|
75
73
|
}
|
|
76
74
|
return {
|