Update PatchMon version to 1.2.7

- Updated agent script version to 1.2.7
- Updated all package.json files to version 1.2.7
- Updated backend version references
- Updated setup script version references
- Fixed agent file path issues in API endpoints
- Fixed linting issues (Node.js imports, unused variables, accessibility)
- Created comprehensive version update guide in patchmon-admin/READMEs/
This commit is contained in:
Muhammad Ibrahim
2025-09-29 20:42:14 +01:00
parent 49c02a54dc
commit b49ea6b197
20 changed files with 1197 additions and 1238 deletions

View File

@@ -72,9 +72,11 @@ async function syncEnvironmentToSettings(currentSettings) {
if (currentValue !== convertedValue) {
updates[settingsField] = convertedValue;
hasChanges = true;
console.log(
`Environment variable ${envVar} (${envValue}) differs from settings ${settingsField} (${currentValue}), updating...`,
);
if (process.env.ENABLE_LOGGING === "true") {
console.log(
`Environment variable ${envVar} (${envValue}) differs from settings ${settingsField} (${currentValue}), updating...`,
);
}
}
}
}
@@ -89,7 +91,9 @@ async function syncEnvironmentToSettings(currentSettings) {
if (currentSettings.server_url !== constructedServerUrl) {
updates.server_url = constructedServerUrl;
hasChanges = true;
console.log(`Updating server_url to: ${constructedServerUrl}`);
if (process.env.ENABLE_LOGGING === "true") {
console.log(`Updating server_url to: ${constructedServerUrl}`);
}
}
// Update settings if there are changes
@@ -101,9 +105,11 @@ async function syncEnvironmentToSettings(currentSettings) {
updated_at: new Date(),
},
});
console.log(
`Synced ${Object.keys(updates).length} environment variables to settings`,
);
if (process.env.ENABLE_LOGGING === "true") {
console.log(
`Synced ${Object.keys(updates).length} environment variables to settings`,
);
}
return updatedSettings;
}