una-nuxt-module 1.0.12 → 1.0.13

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": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "configKey": "unaNuxtModule",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
package/dist/module.mjs CHANGED
@@ -2,7 +2,7 @@ import { createResolver, defineNuxtModule, useLogger, extendPages, addLayout, ad
2
2
  import { defu } from 'defu';
3
3
 
4
4
  const name = "una-nuxt-module";
5
- const version = "1.0.12";
5
+ const version = "1.0.13";
6
6
 
7
7
  function resolve(path) {
8
8
  const resolver = createResolver(import.meta.url);
@@ -5,15 +5,18 @@ import {
5
5
  useAsyncData,
6
6
  useAuthStore,
7
7
  useI18n,
8
+ useNuxtApp,
8
9
  useRuntimeConfig
9
10
  } from "#imports";
10
11
  import getCurrentPath from "../utils/getCurrentPath.js";
11
12
  export const useAuthorization = () => {
12
13
  const currentResource = ref(getCurrentPath());
13
14
  const isPageUnprotected = (page) => {
14
- const runtimeConfig = useRuntimeConfig();
15
- return runtimeConfig.public.unaNuxtModule.navigation.unprotectedPages.includes(
16
- page
15
+ const nuxtApp = useNuxtApp();
16
+ return nuxtApp.runWithContext(
17
+ () => useRuntimeConfig().public.unaNuxtModule.navigation.unprotectedPages.includes(
18
+ page
19
+ )
17
20
  );
18
21
  };
19
22
  const hasAccess = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "una-nuxt-module",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Módulo Nuxt para desarrollo CGI",
5
5
  "repository": {
6
6
  "type": "git",