una-nuxt-module 2.1.21 → 2.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.
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "una-nuxt-module",
3
- "version": "2.1.21",
3
+ "version": "2.1.22",
4
4
  "configKey": "unaxt",
5
5
  "compatibility": {
6
6
  "nuxt": ">=4.0.0"
package/dist/module.mjs CHANGED
@@ -198,7 +198,7 @@ function addTemplates() {
198
198
  }
199
199
 
200
200
  const name = "una-nuxt-module";
201
- const version = "2.1.21";
201
+ const version = "2.1.22";
202
202
 
203
203
  const module = defineNuxtModule({
204
204
  meta: {
@@ -1,7 +1,7 @@
1
1
  import { defineNuxtRouteMiddleware, useNuxtApp } from "#app";
2
2
  import { useAuthorization } from "../composables/useAuthorization.js";
3
3
  import { useAuthStore } from "../stores/auth.js";
4
- import capitalizeFirstLetter from "../utils/capitalizeFirstLetter.js";
4
+ import { upperFirst } from "scule";
5
5
  export default defineNuxtRouteMiddleware(async (to, from) => {
6
6
  if (!import.meta.client) {
7
7
  return;
@@ -21,9 +21,9 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
21
21
  if (authResponse?.email) {
22
22
  const [name, lastName] = authResponse.email.split(".");
23
23
  return {
24
- name: capitalizeFirstLetter(name),
25
- lastName: capitalizeFirstLetter(lastName),
26
- fullName: capitalizeFirstLetter(name) + " " + capitalizeFirstLetter(lastName)
24
+ name: upperFirst(name),
25
+ lastName: upperFirst(lastName),
26
+ fullName: upperFirst(name) + " " + upperFirst(lastName)
27
27
  };
28
28
  }
29
29
  };
@@ -5,11 +5,20 @@ import {
5
5
  } from "@asgardeo/auth-spa";
6
6
  import { useAuthorization } from "../composables/useAuthorization.js";
7
7
  import { useAuthStore } from "../stores/auth.js";
8
- import capitalizeFirstLetter from "../utils/capitalizeFirstLetter.js";
8
+ import { upperFirst } from "scule";
9
9
  export default defineNuxtPlugin((nuxtApp) => {
10
10
  const auth = AsgardeoSPAClient.getInstance();
11
11
  const runtimeConfig = useRuntimeConfig();
12
- const config = runtimeConfig.public.unaNuxtModule.sso;
12
+ const ssoConfig = runtimeConfig.public.unaNuxtModule.sso;
13
+ const config = {
14
+ baseUrl: ssoConfig.baseUrl,
15
+ clientID: ssoConfig.clientId,
16
+ clientSecret: ssoConfig.clientSecret,
17
+ scope: ssoConfig.scope?.split("|") || [],
18
+ signInRedirectURL: ssoConfig.signInRedirectUrl,
19
+ signOutRedirectURL: ssoConfig.signOutRedirectUrl,
20
+ validateIDToken: ssoConfig.validateIdToken
21
+ };
13
22
  auth?.initialize(config);
14
23
  auth?.signIn();
15
24
  auth?.on(Hooks.SignIn, async (response) => {
@@ -19,9 +28,9 @@ export default defineNuxtPlugin((nuxtApp) => {
19
28
  if (response?.email) {
20
29
  const [name, lastName] = response.email.split(".");
21
30
  return {
22
- name: capitalizeFirstLetter(name),
23
- lastName: capitalizeFirstLetter(lastName),
24
- fullName: capitalizeFirstLetter(name) + " " + capitalizeFirstLetter(lastName)
31
+ name: upperFirst(name),
32
+ lastName: upperFirst(lastName),
33
+ fullName: upperFirst(name) + " " + upperFirst(lastName)
25
34
  };
26
35
  }
27
36
  };
@@ -19,15 +19,15 @@ export interface IUnaNuxtModuleOptions {
19
19
  /**
20
20
  * URL de redirección después de iniciar sesión.
21
21
  */
22
- signInRedirectURL: string;
22
+ signInRedirectUrl: string;
23
23
  /**
24
24
  * URL de redirección después de cerrar sesión.
25
25
  */
26
- signOutRedirectURL: string;
26
+ signOutRedirectUrl: string;
27
27
  /**
28
28
  * ID del cliente para la autenticación (OAuth Client Key del Service Provider).
29
29
  */
30
- clientID: string;
30
+ clientId: string;
31
31
  /**
32
32
  * OAuth Client Secret del Service Provider)
33
33
  */
@@ -39,11 +39,11 @@ export interface IUnaNuxtModuleOptions {
39
39
  /**
40
40
  * Lista de permisos o alcances solicitados.
41
41
  */
42
- scope: String[];
42
+ scope: string;
43
43
  /**
44
44
  * Indica si se debe validar el IDToken.
45
45
  */
46
- validateIDToken?: boolean;
46
+ validateIdToken?: boolean;
47
47
  };
48
48
  /**
49
49
  * Configuración de las APIs utilizadas por el módulo.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "una-nuxt-module",
3
- "version": "2.1.21",
3
+ "version": "2.1.22",
4
4
  "description": "Módulo Nuxt para desarrollo CGI",
5
5
  "repository": {
6
6
  "type": "git",
@@ -62,7 +62,7 @@
62
62
  "@nuxt/icon": "2.0.0",
63
63
  "@nuxt/image": "^1.11.0",
64
64
  "@nuxt/kit": "^4.1.1",
65
- "@nuxtjs/i18n": "9.5.5",
65
+ "@nuxtjs/i18n": "10.0.6",
66
66
  "@tailwindcss/vite": "^4.1.13",
67
67
  "@tanstack/vue-table": "^8.21.3",
68
68
  "@vee-validate/zod": "^4.15.1",
@@ -74,6 +74,7 @@
74
74
  "lucide-vue-next": "^0.542.0",
75
75
  "pinia": "^2.2.0",
76
76
  "reka-ui": "^2.5.0",
77
+ "scule": "^1.3.0",
77
78
  "tailwind-merge": "^3.3.1",
78
79
  "tailwindcss": "^4.1.13",
79
80
  "tw-animate-css": "^1.3.8",
@@ -89,16 +90,16 @@
89
90
  "@nuxt/module-builder": "^1.0.2",
90
91
  "@nuxt/schema": "^4.1.1",
91
92
  "@nuxt/test-utils": "^3.19.2",
93
+ "@nuxtjs/color-mode": "^3.5.2",
94
+ "@pinia/nuxt": "^0.5.2",
92
95
  "@types/node": "latest",
93
96
  "changelogen": "^0.6.2",
94
97
  "eslint": "^9.34.0",
95
98
  "nuxt": "^4.1.1",
99
+ "shadcn-nuxt": "2.2.0",
96
100
  "typescript": "~5.9.2",
97
101
  "vitest": "^3.2.4",
98
- "vue-tsc": "^3.0.6",
99
- "@nuxtjs/color-mode": "^3.5.2",
100
- "@pinia/nuxt": "^0.5.2",
101
- "shadcn-nuxt": "2.2.0"
102
+ "vue-tsc": "^3.0.6"
102
103
  },
103
104
  "directories": {
104
105
  "test": "test"