@mundogamernetwork/shared-ui 1.1.42 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mundogamernetwork/shared-ui",
3
- "version": "1.1.42",
3
+ "version": "1.1.43",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
@@ -100,10 +100,17 @@ export function getHttpService(): AxiosInstance {
100
100
  return _httpService;
101
101
  }
102
102
 
103
- const httpService = new Proxy({} as AxiosInstance, {
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;