@quvel-kit/core 1.3.2 → 1.3.4
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/composables/useQueryMessageHandler.js +1 -1
- package/dist/config/i18n.d.ts.map +1 -1
- package/dist/config/i18n.js +4 -12
- package/dist/services/WebSocketService.d.ts.map +1 -1
- package/dist/services/WebSocketService.js +3 -2
- package/dist/types/theme.types.d.ts.map +1 -1
- package/dist/types/theme.types.js +2 -4
- package/dist/utils/assets.d.ts.map +1 -1
- package/dist/utils/assets.js +2 -1
- package/dist/utils/config.d.ts +1 -1
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +13 -15
- package/dist/utils/env.d.ts +2 -1
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/env.js +1 -8
- package/dist/utils/headers.d.ts.map +1 -1
- package/dist/utils/headers.js +2 -1
- package/dist/utils/logging.js +2 -2
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ export function useQueryMessageHandler(options = {}) {
|
|
|
31
31
|
try {
|
|
32
32
|
const normalized = normalize(decodeURIComponent(rawMessage));
|
|
33
33
|
const translationKey = i18nPrefix + normalized;
|
|
34
|
-
// Only show notification if translation exists
|
|
34
|
+
// Only show notification if the translation exists
|
|
35
35
|
if (!i18n.te(translationKey)) {
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/config/i18n.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/config/i18n.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,EAAE,CAQjE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAE3D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAE7D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,CAGzE"}
|
package/dist/config/i18n.js
CHANGED
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Centralized i18n configuration that reads from AppConfig
|
|
5
5
|
*/
|
|
6
|
+
import { getEnv } from '../utils/env.js';
|
|
6
7
|
/**
|
|
7
8
|
* Get supported locales
|
|
8
9
|
*/
|
|
9
10
|
export function getSupportedLocales(_config) {
|
|
10
|
-
const
|
|
11
|
-
? import.meta.env
|
|
12
|
-
: (typeof process !== 'undefined' ? process.env : {});
|
|
13
|
-
const locales = env.VITE_ALLOWED_LOCALES;
|
|
11
|
+
const locales = getEnv('VITE_ALLOWED_LOCALES');
|
|
14
12
|
if (locales && typeof locales === 'string') {
|
|
15
13
|
return locales.split(',').map((l) => l.trim()).filter(Boolean);
|
|
16
14
|
}
|
|
@@ -20,19 +18,13 @@ export function getSupportedLocales(_config) {
|
|
|
20
18
|
* Get the default locale from config or use default
|
|
21
19
|
*/
|
|
22
20
|
export function getDefaultLocale(config) {
|
|
23
|
-
|
|
24
|
-
? import.meta.env
|
|
25
|
-
: (typeof process !== 'undefined' ? process.env : {});
|
|
26
|
-
return config?.app?.locale || config?.app?.fallback_locale || env.VITE_LOCALE || 'en-US';
|
|
21
|
+
return config?.app?.locale || config?.app?.fallback_locale || getEnv('VITE_LOCALE', 'en-US');
|
|
27
22
|
}
|
|
28
23
|
/**
|
|
29
24
|
* Get the locale cookie key
|
|
30
25
|
*/
|
|
31
26
|
export function getLocaleCookieKey(config) {
|
|
32
|
-
|
|
33
|
-
? import.meta.env
|
|
34
|
-
: (typeof process !== 'undefined' ? process.env : {});
|
|
35
|
-
return config?.i18nCookie || env.VITE_I18N_COOKIE || 'user-locale';
|
|
27
|
+
return config?.i18nCookie || getEnv('VITE_I18N_COOKIE', 'user-locale');
|
|
36
28
|
}
|
|
37
29
|
/**
|
|
38
30
|
* Validate if a locale is supported
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebSocketService.d.ts","sourceRoot":"","sources":["../../src/services/WebSocketService.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"WebSocketService.d.ts","sourceRoot":"","sources":["../../src/services/WebSocketService.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAG7C;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,OAAQ,YAAW,eAAe;;IAEtE,OAAO,CAAC,GAAG,CAAc;IACzB,OAAO,CAAC,iBAAiB,CAA8B;IACvD,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA0C;gBAEpD,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,WAAW,GAAG,IAAI;IAI9D;;OAEG;IACH,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,CAEhC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,gBAAgB,GAAG,IAAI;IASjD;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAwDxB;;OAEG;IACG,SAAS,CAAC,CAAC,GAAG,OAAO,EACzB,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,QAAQ,GAAG,oBAAoB,CAAA;KAAE,GACvE,OAAO,CAAC,iBAAiB,CAAC;IACvB,SAAS,CAAC,CAAC,GAAG,OAAO,EACzB,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,SAAS,GAAG,qBAAqB,CAAA;KAAE,GACzE,OAAO,CAAC,kBAAkB,CAAC;IACxB,SAAS,CAAC,CAAC,GAAG,OAAO,EACzB,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,GAClD,OAAO,CAAC,mBAAmB,CAAC;IACzB,SAAS,CAAC,CAAC,GAAG,OAAO,EACzB,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,WAAW,CAAA;KAAE,GACnD,OAAO,CAAC,oBAAoB,CAAC;IAuEhC;;OAEG;IACH,UAAU,IAAI,IAAI;CAMnB"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Service for managing Laravel Echo WebSocket connections with Pusher
|
|
5
5
|
*/
|
|
6
6
|
import { Service } from './Service.js';
|
|
7
|
+
import { getEnv } from '../utils/env.js';
|
|
7
8
|
/**
|
|
8
9
|
* WebSocket Service for Laravel Echo connections
|
|
9
10
|
*
|
|
@@ -32,8 +33,8 @@ export class WebSocketService extends Service {
|
|
|
32
33
|
register({ api, config }) {
|
|
33
34
|
this.api = api;
|
|
34
35
|
const broadcasting = config?.broadcasting?.pusher;
|
|
35
|
-
this.apiKey = broadcasting?.key ??
|
|
36
|
-
this.cluster = broadcasting?.options?.cluster ??
|
|
36
|
+
this.apiKey = broadcasting?.key ?? getEnv('VITE_PUSHER_APP_KEY', '');
|
|
37
|
+
this.cluster = broadcasting?.options?.cluster ?? getEnv('VITE_PUSHER_APP_CLUSTER', '');
|
|
37
38
|
}
|
|
38
39
|
/**
|
|
39
40
|
* Connect to WebSocket server
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.types.d.ts","sourceRoot":"","sources":["../../src/types/theme.types.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"theme.types.d.ts","sourceRoot":"","sources":["../../src/types/theme.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWH,eAAO,MAAM,iBAAiB,QAAuB,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,YAAY,4BAA6B,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Theme Types and Constants
|
|
3
3
|
*/
|
|
4
|
+
import { getEnv } from '../utils/env.js';
|
|
4
5
|
/**
|
|
5
6
|
* Get the theme cookie name from env or use default
|
|
6
7
|
*/
|
|
7
8
|
function getThemeCookieName() {
|
|
8
|
-
|
|
9
|
-
? import.meta.env
|
|
10
|
-
: (typeof process !== 'undefined' ? process.env : {});
|
|
11
|
-
return env.VITE_THEME_COOKIE || 'user-theme';
|
|
9
|
+
return getEnv('VITE_THEME_COOKIE', 'user-theme');
|
|
12
10
|
}
|
|
13
11
|
export const THEME_COOKIE_NAME = getThemeCookieName();
|
|
14
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/utils/assets.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/utils/assets.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGtF;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAuBpD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAO7D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,cAAc,GACrB,eAAe,GAAG,gBAAgB,GAAG,IAAI,CAkD3C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,iBAAiB,GAAG,IAAI,CAgD/E;AA2BD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAiEpD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,CA0GA"}
|
package/dist/utils/assets.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Helper functions for dynamically loading CSS and JS assets
|
|
5
5
|
* Support both client-side and SSR asset injection
|
|
6
6
|
*/
|
|
7
|
+
import { getEnv } from './env.js';
|
|
7
8
|
/**
|
|
8
9
|
* Validates if a URL is safe to load as an asset
|
|
9
10
|
* Prevents loading from potentially malicious sources
|
|
@@ -16,7 +17,7 @@ export function isValidAssetUrl(url) {
|
|
|
16
17
|
}
|
|
17
18
|
const parsedUrl = new URL(url);
|
|
18
19
|
// Only allow HTTPS in production
|
|
19
|
-
if (
|
|
20
|
+
if (getEnv('MODE') === 'production' && parsedUrl.protocol !== 'https:') {
|
|
20
21
|
return false;
|
|
21
22
|
}
|
|
22
23
|
// Allow HTTP/HTTPS
|
package/dist/utils/config.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { QSsrContext } from '@quasar/app-vite';
|
|
|
5
5
|
import type { AppConfig } from '../types/app.types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Create app config from environment variables
|
|
8
|
-
* Works in both client
|
|
8
|
+
* Works in both client and server (SSR) contexts
|
|
9
9
|
*/
|
|
10
10
|
export declare function createConfigFromEnv(): AppConfig;
|
|
11
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,SAAS,CAsB/C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,UAAU,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAUvE"}
|
package/dist/utils/config.js
CHANGED
|
@@ -1,32 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Config utility functions
|
|
3
3
|
*/
|
|
4
|
+
import { getEnv } from './env.js';
|
|
4
5
|
/**
|
|
5
6
|
* Create app config from environment variables
|
|
6
|
-
* Works in both client
|
|
7
|
+
* Works in both client and server (SSR) contexts
|
|
7
8
|
*/
|
|
8
9
|
export function createConfigFromEnv() {
|
|
9
|
-
const env = (typeof import.meta !== 'undefined' && import.meta.env)
|
|
10
|
-
? import.meta.env
|
|
11
|
-
: (typeof process !== 'undefined' ? process.env : {});
|
|
12
10
|
const config = {
|
|
13
11
|
app: {
|
|
14
|
-
name:
|
|
15
|
-
url:
|
|
16
|
-
env:
|
|
17
|
-
debug:
|
|
18
|
-
timezone:
|
|
19
|
-
locale:
|
|
20
|
-
fallback_locale:
|
|
12
|
+
name: getEnv('VITE_APP_NAME', 'Quasar App'),
|
|
13
|
+
url: getEnv('VITE_API_URL', ''),
|
|
14
|
+
env: getEnv('VITE_APP_ENV'),
|
|
15
|
+
debug: getEnv('VITE_DEBUG') === 'true' ? true : undefined,
|
|
16
|
+
timezone: getEnv('VITE_TIMEZONE'),
|
|
17
|
+
locale: getEnv('VITE_LOCALE'),
|
|
18
|
+
fallback_locale: getEnv('VITE_FALLBACK_LOCALE'),
|
|
21
19
|
},
|
|
22
20
|
frontend: {
|
|
23
|
-
url:
|
|
24
|
-
custom_scheme:
|
|
21
|
+
url: getEnv('VITE_APP_URL', ''),
|
|
22
|
+
custom_scheme: getEnv('VITE_CUSTOM_SCHEME'),
|
|
25
23
|
},
|
|
26
24
|
session: {
|
|
27
|
-
xsrf_cookie:
|
|
25
|
+
xsrf_cookie: getEnv('XSRF_COOKIE_NAME'),
|
|
28
26
|
},
|
|
29
|
-
i18nCookie:
|
|
27
|
+
i18nCookie: getEnv('VITE_I18N_COOKIE'),
|
|
30
28
|
};
|
|
31
29
|
return config;
|
|
32
30
|
}
|
package/dist/utils/env.d.ts
CHANGED
|
@@ -13,5 +13,6 @@
|
|
|
13
13
|
* @param cast - Optional cast function to convert the value
|
|
14
14
|
* @returns The environment variable value or default
|
|
15
15
|
*/
|
|
16
|
-
export declare function getEnv<T = string>(key: string, defaultValue
|
|
16
|
+
export declare function getEnv<T = string>(key: string, defaultValue: T, cast?: (value: string) => T): T;
|
|
17
|
+
export declare function getEnv<T = string>(key: string, defaultValue?: undefined, cast?: (value: string) => T): T | undefined;
|
|
17
18
|
//# sourceMappingURL=env.d.ts.map
|
package/dist/utils/env.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/utils/env.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/utils/env.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;GAOG;AAGH,wBAAgB,MAAM,CAAC,CAAC,GAAG,MAAM,EAC/B,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,CAAC,EACf,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,CAAC,GAC1B,CAAC,CAAC;AAGL,wBAAgB,MAAM,CAAC,CAAC,GAAG,MAAM,EAC/B,GAAG,EAAE,MAAM,EACX,YAAY,CAAC,EAAE,SAAS,EACxB,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,CAAC,GAC1B,CAAC,GAAG,SAAS,CAAC"}
|
package/dist/utils/env.js
CHANGED
|
@@ -5,14 +5,7 @@
|
|
|
5
5
|
* - Browser (Vite): Uses import.meta.env (only VITE_* vars exposed)
|
|
6
6
|
* - SSR (Node.js): Uses process.env
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
* Get environment variable value in an isomorphic way
|
|
10
|
-
*
|
|
11
|
-
* @param key - Environment variable name
|
|
12
|
-
* @param defaultValue - Optional default value
|
|
13
|
-
* @param cast - Optional cast function to convert the value
|
|
14
|
-
* @returns The environment variable value or default
|
|
15
|
-
*/
|
|
8
|
+
// Implementation
|
|
16
9
|
export function getEnv(key, defaultValue, cast) {
|
|
17
10
|
let value;
|
|
18
11
|
if (typeof import.meta !== 'undefined' && import.meta.env) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../src/utils/headers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../src/utils/headers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAcvD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAElE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAE3D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAE5D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAE1D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAE5D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAE5D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAE7D"}
|
package/dist/utils/headers.js
CHANGED
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
* Centralized header name management matching backend configuration.
|
|
5
5
|
* All header names are configurable via AppConfig or environment variables.
|
|
6
6
|
*/
|
|
7
|
+
import { getEnv } from './env.js';
|
|
7
8
|
/**
|
|
8
9
|
* Get the configured header name or default
|
|
9
10
|
*/
|
|
10
11
|
function getHeaderName(configValue, envKey, defaultValue) {
|
|
11
|
-
return configValue ||
|
|
12
|
+
return configValue || getEnv(envKey, defaultValue);
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Get the Accept-Language header name
|
package/dist/utils/logging.js
CHANGED
|
@@ -6,12 +6,12 @@ import { getEnv } from './env.js';
|
|
|
6
6
|
* Create a logger instance based on configuration
|
|
7
7
|
*/
|
|
8
8
|
export function createLogger(config) {
|
|
9
|
-
const loggerType = getEnv('VITE_LOGGER', LoggerTypeEnum.NULL)
|
|
9
|
+
const loggerType = getEnv('VITE_LOGGER', LoggerTypeEnum.NULL);
|
|
10
10
|
const logLevel = getLogLevel();
|
|
11
11
|
const traceInfo = config?.trace ?? {
|
|
12
12
|
id: '',
|
|
13
13
|
timestamp: new Date().toISOString(),
|
|
14
|
-
environment: getEnv('MODE', 'development')
|
|
14
|
+
environment: getEnv('MODE', 'development'),
|
|
15
15
|
tenant: null,
|
|
16
16
|
runtime: 'client',
|
|
17
17
|
};
|