core-maugli 1.2.61 → 1.2.62
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 +1 -1
- package/scripts/check-version.js +23 -3
- package/src/i18n/ru.json +1 -1
package/package.json
CHANGED
package/scripts/check-version.js
CHANGED
|
@@ -38,20 +38,35 @@ async function getMaugliConfig() {
|
|
|
38
38
|
try {
|
|
39
39
|
const configPath = path.join(process.cwd(), 'src/config/maugli.config.ts');
|
|
40
40
|
if (!fs.existsSync(configPath)) {
|
|
41
|
+
console.log(colorize('⚠️ maugli.config.ts not found at src/config/maugli.config.ts', 'yellow'));
|
|
41
42
|
return null;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
// Простое чтение конфига через регулярные выражения
|
|
45
46
|
const configContent = fs.readFileSync(configPath, 'utf8');
|
|
46
|
-
|
|
47
|
+
console.log(colorize('🔍 Reading maugli.config.ts...', 'cyan'));
|
|
48
|
+
|
|
49
|
+
// Ищем forceUpdate в automation секции
|
|
50
|
+
const automationMatch = configContent.match(/automation\s*:\s*{([^}]+)}/s);
|
|
51
|
+
if (!automationMatch) {
|
|
52
|
+
console.log(colorize('⚠️ automation section not found in config', 'yellow'));
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const automationSection = automationMatch[1];
|
|
57
|
+
const forceUpdateMatch = automationSection.match(/forceUpdate\s*:\s*(true|false)/);
|
|
58
|
+
|
|
59
|
+
const forceUpdate = forceUpdateMatch ? forceUpdateMatch[1] === 'true' : false;
|
|
60
|
+
|
|
61
|
+
console.log(colorize(`📋 Config found - forceUpdate: ${forceUpdate}`, 'cyan'));
|
|
47
62
|
|
|
48
63
|
return {
|
|
49
64
|
automation: {
|
|
50
|
-
forceUpdate:
|
|
65
|
+
forceUpdate: forceUpdate
|
|
51
66
|
}
|
|
52
67
|
};
|
|
53
68
|
} catch (error) {
|
|
54
|
-
console.warn(colorize('⚠️ Could not read maugli.config.ts', 'yellow'));
|
|
69
|
+
console.warn(colorize('⚠️ Could not read maugli.config.ts: ' + error.message, 'yellow'));
|
|
55
70
|
return null;
|
|
56
71
|
}
|
|
57
72
|
}
|
|
@@ -257,6 +272,11 @@ async function main() {
|
|
|
257
272
|
// Check forceUpdate setting from maugli.config.ts
|
|
258
273
|
const forceUpdate = maugliConfig?.automation?.forceUpdate || false;
|
|
259
274
|
|
|
275
|
+
console.log(colorize(`\n🔧 Configuration check:`, 'cyan'));
|
|
276
|
+
console.log(colorize(` • maugli.config.ts found: ${maugliConfig ? 'Yes' : 'No'}`, 'white'));
|
|
277
|
+
console.log(colorize(` • forceUpdate setting: ${forceUpdate}`, 'white'));
|
|
278
|
+
console.log(colorize(` • CI/CD detected: ${isCI}`, 'white'));
|
|
279
|
+
|
|
260
280
|
if (isCI) {
|
|
261
281
|
console.log(colorize('\n🤖 CI/CD environment detected. Updating automatically...', 'cyan'));
|
|
262
282
|
const success = await performUpdate();
|