@codacy/codacy-mcp 0.6.15 → 0.6.16

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.
@@ -82,9 +82,13 @@ export class MacCodacyCli extends CodacyCli {
82
82
  async initialize() {
83
83
  // Check if the configuration files exist
84
84
  const configFilePath = path.join(this.rootPath, CODACY_FOLDER_NAME, 'codacy.yaml');
85
+ const cliConfigFilePath = path.join(this.rootPath, CODACY_FOLDER_NAME, 'cli-config.yaml');
85
86
  const toolsFolderPath = path.join(this.rootPath, CODACY_FOLDER_NAME, 'tools-configs');
86
- let needsInitialization = !fs.existsSync(configFilePath) || !fs.existsSync(toolsFolderPath);
87
- if (!needsInitialization) {
87
+ const initFilesOk = fs.existsSync(configFilePath) &&
88
+ fs.existsSync(cliConfigFilePath) &&
89
+ fs.existsSync(toolsFolderPath);
90
+ let needsInitialization = !initFilesOk;
91
+ if (initFilesOk) {
88
92
  // Check if the mode matches the current properties
89
93
  const cliConfig = fs.readFileSync(path.join(this.rootPath, CODACY_FOLDER_NAME, 'cli-config.yaml'), 'utf-8');
90
94
  if ((cliConfig === 'mode: local' && this.repository) ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/codacy-mcp",
3
- "version": "0.6.15",
3
+ "version": "0.6.16",
4
4
  "description": "Codacy MCP server",
5
5
  "license": "MIT",
6
6
  "author": "Codacy",