@mundogamernetwork/shared-ui 1.1.41 → 1.1.43
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/package.json
CHANGED
|
@@ -4,6 +4,8 @@ import { useRoute, useRouter } from "vue-router";
|
|
|
4
4
|
// Explicit import: relying on Nuxt auto-import for this layer-shipped store
|
|
5
5
|
// fails in some fronts' SSR builds ("useMagazineStore is not defined" -> 500).
|
|
6
6
|
import { useMagazineStore } from "../../../stores/magazine";
|
|
7
|
+
import { useInstitutionalStore } from "../../../stores/institutional";
|
|
8
|
+
import { useAuthStore } from "../../../stores/auth";
|
|
7
9
|
|
|
8
10
|
useSeoMeta({
|
|
9
11
|
title: "MGN Magazine",
|
|
@@ -7,6 +7,8 @@ import { getMagazinePageHotspots } from "../../../utils/magazineHotspots";
|
|
|
7
7
|
// Nuxt auto-import for it fails in some consuming fronts' SSR builds (the new
|
|
8
8
|
// store isn't always registered), throwing "useMagazineStore is not defined".
|
|
9
9
|
import { useMagazineStore } from "../../../stores/magazine";
|
|
10
|
+
import { useInstitutionalStore } from "../../../stores/institutional";
|
|
11
|
+
import { useAuthStore } from "../../../stores/auth";
|
|
10
12
|
|
|
11
13
|
useSeoMeta({
|
|
12
14
|
title: "MGN Magazine",
|
package/pages/magazine/index.vue
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { ref, onMounted } from "vue";
|
|
3
3
|
import { storeToRefs } from "pinia";
|
|
4
|
+
// Explicit store imports: relying on Nuxt auto-import for these layer-shipped
|
|
5
|
+
// stores fails in some consuming fronts' builds (undefined store -> "_s" crash).
|
|
6
|
+
import { useInstitutionalStore } from "../../stores/institutional";
|
|
7
|
+
import { useAuthStore } from "../../stores/auth";
|
|
4
8
|
|
|
5
9
|
const locale = useNuxtApp().$i18n.locale;
|
|
6
10
|
|
package/services/httpService.ts
CHANGED
|
@@ -100,10 +100,17 @@ export function getHttpService(): AxiosInstance {
|
|
|
100
100
|
return _httpService;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
// The target must be a function so the Proxy is callable: callers use BOTH
|
|
104
|
+
// httpService(config) (axios instance invoked as a function) and
|
|
105
|
+
// httpService.get(...). A Proxy over {} only supports property access, so
|
|
106
|
+
// httpService(config) threw "httpService is not a function".
|
|
107
|
+
const httpService = new Proxy(function () {} as unknown as AxiosInstance, {
|
|
104
108
|
get(_target, prop) {
|
|
105
109
|
return (getHttpService() as any)[prop];
|
|
106
110
|
},
|
|
111
|
+
apply(_target, _thisArg, args: any[]) {
|
|
112
|
+
return (getHttpService() as any)(...args);
|
|
113
|
+
},
|
|
107
114
|
});
|
|
108
115
|
|
|
109
116
|
export default httpService;
|