@codacy/codacy-mcp 0.6.9 → 0.6.10

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.
@@ -93,21 +93,17 @@ export class MacCodacyCli extends CodacyCli {
93
93
  }
94
94
  }
95
95
  if (needsInitialization) {
96
- const apiToken = this._accountToken
97
- ? { 'api-token': this._accountToken }
98
- : {};
99
- // Repository params are required for the "api-token" flag to work; it only works all together
100
- const repositoryAccess = this.repository && this.provider && this.organization
96
+ const initParams = (this._accountToken && this.repository && this.provider && this.organization
101
97
  ? {
102
98
  provider: this.provider,
103
99
  organization: this.organization,
104
100
  repository: this.repository,
105
- ...apiToken,
101
+ 'api-token': this._accountToken,
106
102
  }
107
- : {};
103
+ : {});
108
104
  try {
109
105
  // initialize codacy-cli
110
- await this.execAsync(`${this.getCliCommand()} init`, { ...repositoryAccess });
106
+ await this.execAsync(`${this.getCliCommand()} init`, initParams);
111
107
  }
112
108
  catch (error) {
113
109
  throw new Error(`Failed to initialize CLI: ${error}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/codacy-mcp",
3
- "version": "0.6.9",
3
+ "version": "0.6.10",
4
4
  "description": "Codacy MCP server",
5
5
  "license": "MIT",
6
6
  "author": "Codacy",