una-nuxt-module 3.0.40 → 3.0.42

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/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "una-nuxt-module",
3
- "version": "3.0.40",
3
+ "version": "3.0.42",
4
4
  "configKey": "unaxt",
5
5
  "compatibility": {
6
6
  "nuxt": ">=4.0.0"
package/dist/module.mjs CHANGED
@@ -167,7 +167,7 @@ function addTemplates() {
167
167
  }
168
168
 
169
169
  const name = "una-nuxt-module";
170
- const version = "3.0.40";
170
+ const version = "3.0.42";
171
171
  const description = "Módulo Nuxt para desarrollo.";
172
172
  const repository = {
173
173
  type: "git",
@@ -234,13 +234,13 @@ const scripts = {
234
234
  const dependencies = {
235
235
  "@asgardeo/auth-spa": "3.5.2",
236
236
  "@internationalized/date": "3.12.4",
237
- "@lucide/vue": "1.61.0",
237
+ "@lucide/vue": "1.62.0",
238
238
  "@nuxt/a11y": "1.0.0-alpha.1",
239
- "@nuxt/fonts": "1.1.0",
239
+ "@nuxt/fonts": "1.2.0",
240
240
  "@nuxt/hints": "1.1.5",
241
- "@nuxt/icon": "2.5.1",
241
+ "@nuxt/icon": "2.6.1",
242
242
  "@nuxt/image": "2.2.0",
243
- "@nuxt/kit": "4.6.2",
243
+ "@nuxt/kit": "4.6.3",
244
244
  "@nuxtjs/i18n": "10.6.0",
245
245
  "@pinia/nuxt": "1.0.3",
246
246
  "@tailwindcss/vite": "4.3.3",
@@ -254,7 +254,7 @@ const dependencies = {
254
254
  colorette: "2.0.20",
255
255
  defu: "6.1.7",
256
256
  "embla-carousel-vue": "8.6.0",
257
- "nuxt-security": "2.6.0",
257
+ "nuxt-security": "2.7.0",
258
258
  pinia: "4.1.0",
259
259
  "reka-ui": "2.9.9",
260
260
  scule: "1.3.0",
@@ -271,17 +271,17 @@ const devDependencies = {
271
271
  "@nuxt/devtools": "3.4.4",
272
272
  "@nuxt/eslint-config": "1.17.0",
273
273
  "@nuxt/module-builder": "1.0.3",
274
- "@nuxt/schema": "4.6.2",
274
+ "@nuxt/schema": "4.6.3",
275
275
  "@nuxt/test-utils": "4.3.4",
276
- "@nuxtjs/color-mode": "4.0.1",
276
+ "@nuxtjs/color-mode": "4.1.0",
277
277
  "@types/node": "latest",
278
- "@typescript-eslint/parser": "8.72.0",
278
+ "@typescript-eslint/parser": "8.72.1",
279
279
  changelogen: "0.6.2",
280
280
  eslint: "10.13.00",
281
281
  "eslint-plugin-security": "4.2.0",
282
282
  husky: "9.1.7",
283
283
  "lint-staged": "17.6.0",
284
- nuxt: "4.6.2",
284
+ nuxt: "4.6.3",
285
285
  prettier: "3.9.10",
286
286
  "prettier-plugin-tailwindcss": "0.8.1",
287
287
  "shadcn-nuxt": "2.8.2",
@@ -572,7 +572,7 @@ const module$1 = defineNuxtModule({
572
572
  addPlugin({
573
573
  name: "api-fetch",
574
574
  src: resolve(
575
- `./runtime/repository-pattern/plugins/${options.auth?.enabled ? "api-fetch" : "api-public-fetch"}`
575
+ `./runtime/repository-pattern/plugins/${options.auth?.enabled ? "api-fetch-auth" : "api-fetch"}`
576
576
  ),
577
577
  mode: "client"
578
578
  });
@@ -2,10 +2,12 @@ import { type $Fetch } from '#app';
2
2
  declare const _default: import("#app").Plugin<{
3
3
  api: {
4
4
  fetch: $Fetch<unknown, "">;
5
+ publicFetch: $Fetch<unknown, "">;
5
6
  };
6
7
  }> & import("#app").ObjectPlugin<{
7
8
  api: {
8
9
  fetch: $Fetch<unknown, "">;
10
+ publicFetch: $Fetch<unknown, "">;
9
11
  };
10
12
  }>;
11
13
  export default _default;
@@ -0,0 +1,30 @@
1
+ import { defineNuxtPlugin, useNuxtApp } from "#app";
2
+ import { useAuthStore } from "#imports";
3
+ export default defineNuxtPlugin((nuxtApp) => {
4
+ const fetch = $fetch.create({
5
+ baseURL: nuxtApp.$config.public.apiBaseUrl,
6
+ onRequest({ options }) {
7
+ const { $pinia } = useNuxtApp();
8
+ const authStore = useAuthStore($pinia);
9
+ if (!authStore.isAuthenticated) {
10
+ return;
11
+ }
12
+ options.headers.set("Authorization", `Bearer ${authStore.token}`);
13
+ },
14
+ async onResponseError({ response }) {
15
+ if (response?.status === 401) {
16
+ const { $pinia } = useNuxtApp();
17
+ const authStore = useAuthStore($pinia);
18
+ await authStore.logout();
19
+ }
20
+ }
21
+ });
22
+ const publicFetch = $fetch.create({
23
+ baseURL: nuxtApp.$config.public.apiBaseUrl
24
+ });
25
+ return {
26
+ provide: {
27
+ api: { fetch, publicFetch }
28
+ }
29
+ };
30
+ });
@@ -1,23 +1,7 @@
1
- import { defineNuxtPlugin, useNuxtApp } from "#app";
2
- import { useAuthStore } from "#imports";
1
+ import { defineNuxtPlugin } from "#app";
3
2
  export default defineNuxtPlugin((nuxtApp) => {
4
3
  const fetch = $fetch.create({
5
- baseURL: nuxtApp.$config.public.apiBaseUrl,
6
- onRequest({ options }) {
7
- const { $pinia } = useNuxtApp();
8
- const authStore = useAuthStore($pinia);
9
- if (!authStore.isAuthenticated) {
10
- return;
11
- }
12
- options.headers.set("Authorization", `Bearer ${authStore.token}`);
13
- },
14
- async onResponseError({ response }) {
15
- if (response?.status === 401) {
16
- const { $pinia } = useNuxtApp();
17
- const authStore = useAuthStore($pinia);
18
- await authStore.logout();
19
- }
20
- }
4
+ baseURL: nuxtApp.$config.public.apiBaseUrl
21
5
  });
22
6
  return {
23
7
  provide: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "una-nuxt-module",
3
- "version": "3.0.40",
3
+ "version": "3.0.42",
4
4
  "description": "Módulo Nuxt para desarrollo.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -67,13 +67,13 @@
67
67
  "dependencies": {
68
68
  "@asgardeo/auth-spa": "3.5.2",
69
69
  "@internationalized/date": "3.12.4",
70
- "@lucide/vue": "1.61.0",
70
+ "@lucide/vue": "1.62.0",
71
71
  "@nuxt/a11y": "1.0.0-alpha.1",
72
- "@nuxt/fonts": "1.1.0",
72
+ "@nuxt/fonts": "1.2.0",
73
73
  "@nuxt/hints": "1.1.5",
74
- "@nuxt/icon": "2.5.1",
74
+ "@nuxt/icon": "2.6.1",
75
75
  "@nuxt/image": "2.2.0",
76
- "@nuxt/kit": "4.6.2",
76
+ "@nuxt/kit": "4.6.3",
77
77
  "@nuxtjs/i18n": "10.6.0",
78
78
  "@pinia/nuxt": "1.0.3",
79
79
  "@tailwindcss/vite": "4.3.3",
@@ -87,7 +87,7 @@
87
87
  "colorette": "2.0.20",
88
88
  "defu": "6.1.7",
89
89
  "embla-carousel-vue": "8.6.0",
90
- "nuxt-security": "2.6.0",
90
+ "nuxt-security": "2.7.0",
91
91
  "pinia": "4.1.0",
92
92
  "reka-ui": "2.9.9",
93
93
  "scule": "1.3.0",
@@ -104,17 +104,17 @@
104
104
  "@nuxt/devtools": "3.4.4",
105
105
  "@nuxt/eslint-config": "1.17.0",
106
106
  "@nuxt/module-builder": "1.0.3",
107
- "@nuxt/schema": "4.6.2",
107
+ "@nuxt/schema": "4.6.3",
108
108
  "@nuxt/test-utils": "4.3.4",
109
- "@nuxtjs/color-mode": "4.0.1",
109
+ "@nuxtjs/color-mode": "4.1.0",
110
110
  "@types/node": "latest",
111
- "@typescript-eslint/parser": "8.72.0",
111
+ "@typescript-eslint/parser": "8.72.1",
112
112
  "changelogen": "0.6.2",
113
113
  "eslint": "10.13.00",
114
114
  "eslint-plugin-security": "4.2.0",
115
115
  "husky": "9.1.7",
116
116
  "lint-staged": "17.6.0",
117
- "nuxt": "4.6.2",
117
+ "nuxt": "4.6.3",
118
118
  "prettier": "3.9.10",
119
119
  "prettier-plugin-tailwindcss": "0.8.1",
120
120
  "shadcn-nuxt": "2.8.2",
@@ -1,11 +0,0 @@
1
- import { defineNuxtPlugin } from "#app";
2
- export default defineNuxtPlugin((nuxtApp) => {
3
- const fetch = $fetch.create({
4
- baseURL: nuxtApp.$config.public.apiBaseUrl
5
- });
6
- return {
7
- provide: {
8
- api: { fetch }
9
- }
10
- };
11
- });