nextemos 5.0.33 → 5.0.34
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/helpers/getConfigs.d.ts +2 -39
- package/dist/helpers/getConfigs.js +10 -38
- package/package.json +1 -1
|
@@ -36,42 +36,5 @@ export declare const defaultConfig: {
|
|
|
36
36
|
STOCK: string;
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
-
declare const
|
|
40
|
-
|
|
41
|
-
USE_API_URL: boolean;
|
|
42
|
-
CDN_URL: string;
|
|
43
|
-
CDN_PROVIDER: string;
|
|
44
|
-
VIDEO_CDN_URL: string;
|
|
45
|
-
THUMBOR_SOURCE: string;
|
|
46
|
-
DEFAULT_LANGUAGE: string;
|
|
47
|
-
FETCH_OPTIONS: {
|
|
48
|
-
LOG_LEVEL: string;
|
|
49
|
-
CACHE: string;
|
|
50
|
-
};
|
|
51
|
-
KEYCLOAK: {
|
|
52
|
-
URL: string;
|
|
53
|
-
REALM: string;
|
|
54
|
-
CLIENT_ID: string;
|
|
55
|
-
CLIENT_SECRET: string;
|
|
56
|
-
GRANT_TYPE: string;
|
|
57
|
-
};
|
|
58
|
-
K8S_NAMESPACE: string;
|
|
59
|
-
K8S_SERVICE_NAMES: {
|
|
60
|
-
ADDRESS: string;
|
|
61
|
-
BANNER: string;
|
|
62
|
-
BLOG: string;
|
|
63
|
-
CAMPAIGN: string;
|
|
64
|
-
ENVIRONMENT: string;
|
|
65
|
-
LOCALIZATION: string;
|
|
66
|
-
MEMBER: string;
|
|
67
|
-
NOTIFICATION: string;
|
|
68
|
-
ORDER_MANAGEMENT: string;
|
|
69
|
-
PAYMENT: string;
|
|
70
|
-
PREDICTION: string;
|
|
71
|
-
PRODUCT: string;
|
|
72
|
-
ROUTE: string;
|
|
73
|
-
SHOPPING_CART: string;
|
|
74
|
-
STOCK: string;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
export default NEXTEMOS_CONFIG;
|
|
39
|
+
declare const _default: typeof defaultConfig;
|
|
40
|
+
export default _default;
|
|
@@ -39,44 +39,16 @@ exports.defaultConfig = {
|
|
|
39
39
|
STOCK: "stock",
|
|
40
40
|
},
|
|
41
41
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
try {
|
|
49
|
-
const loadedConfig = require("../../../../nextemos-config.json");
|
|
50
|
-
console.log("nextemos-config.json Config initialized successfully");
|
|
51
|
-
this.config = Object.assign(Object.assign({}, exports.defaultConfig), loadedConfig);
|
|
52
|
-
}
|
|
53
|
-
catch (error) {
|
|
54
|
-
console.warn("nextemos-config.json Config could not be loaded, using defaults:", error);
|
|
55
|
-
this.config = exports.defaultConfig;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
static getInstance() {
|
|
60
|
-
if (!ConfigStore.instance) {
|
|
61
|
-
ConfigStore.instance = new ConfigStore();
|
|
62
|
-
this.initialize();
|
|
63
|
-
}
|
|
64
|
-
return ConfigStore.instance;
|
|
65
|
-
}
|
|
66
|
-
getConfig() {
|
|
67
|
-
return ConfigStore.config;
|
|
68
|
-
}
|
|
69
|
-
// Debug için config'i loglama metodu
|
|
70
|
-
logConfig() {
|
|
71
|
-
console.log("Current Config:", JSON.stringify(ConfigStore.config, null, 2));
|
|
72
|
-
}
|
|
42
|
+
// Try to read the config file synchronously at build time
|
|
43
|
+
let loadedConfig;
|
|
44
|
+
try {
|
|
45
|
+
// Using require to load the config file at build time
|
|
46
|
+
// require will resolve the path relative to the current file
|
|
47
|
+
loadedConfig = require("../../../../nextemos-config.json");
|
|
73
48
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
// Debug için config'i logla (development'ta)
|
|
77
|
-
if (process.env.NODE_ENV === "development") {
|
|
78
|
-
configStore.logConfig();
|
|
49
|
+
catch (error) {
|
|
50
|
+
loadedConfig = exports.defaultConfig;
|
|
79
51
|
}
|
|
80
|
-
//
|
|
81
|
-
const NEXTEMOS_CONFIG =
|
|
52
|
+
// Merge with default config to ensure all required fields exist
|
|
53
|
+
const NEXTEMOS_CONFIG = Object.assign(Object.assign({}, exports.defaultConfig), loadedConfig);
|
|
82
54
|
exports.default = NEXTEMOS_CONFIG;
|