nextemos 5.0.28 → 5.0.29
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.js +21 -2
- package/package.json +1 -1
|
@@ -46,8 +46,27 @@ class ConfigStore {
|
|
|
46
46
|
static initialize() {
|
|
47
47
|
if (!this.config) {
|
|
48
48
|
try {
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
let loadedConfig;
|
|
50
|
+
// Farklı config path'lerini dene
|
|
51
|
+
const configPaths = [
|
|
52
|
+
'/app/nextemos-config.json', // Production (Docker/K8s) path
|
|
53
|
+
'./nextemos-config.json', // Root path
|
|
54
|
+
'../nextemos-config.json', // One level up
|
|
55
|
+
'../../../../nextemos-config.json', // Development path
|
|
56
|
+
];
|
|
57
|
+
for (const path of configPaths) {
|
|
58
|
+
try {
|
|
59
|
+
loadedConfig = require(path);
|
|
60
|
+
console.log(`Config initialized successfully from: ${path}`);
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (!loadedConfig) {
|
|
68
|
+
throw new Error('No config file found in any location');
|
|
69
|
+
}
|
|
51
70
|
this.config = Object.assign(Object.assign({}, exports.defaultConfig), loadedConfig);
|
|
52
71
|
}
|
|
53
72
|
catch (error) {
|