@sonar-autofix/core 0.0.1 → 0.0.3
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/index.js +2 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -23,6 +23,7 @@ class CoreOrchestrator {
|
|
|
23
23
|
constructor(config, deps = {}) {
|
|
24
24
|
this.config = config;
|
|
25
25
|
this.dryRun = config.dryRun || false;
|
|
26
|
+
this.restoreOnFail = config.restoreOnFail || false;
|
|
26
27
|
this.retryLimit = config.retry?.maxRetries || DEFAULT_RETRY_LIMIT;
|
|
27
28
|
this.maxIterations = config.retry?.maxIterations || DEFAULT_MAX_ITERATIONS;
|
|
28
29
|
this.cwd = config.cwd || process.cwd();
|
|
@@ -139,7 +140,7 @@ class CoreOrchestrator {
|
|
|
139
140
|
console.log(` ✓ ${filePath} fixed successfully`);
|
|
140
141
|
} else {
|
|
141
142
|
console.log(` ✗ ${filePath} could not be fixed — restoring original`);
|
|
142
|
-
if (!this.dryRun) {
|
|
143
|
+
if (!this.dryRun && this.restoreOnFail) {
|
|
143
144
|
await this.gitClient.restoreFile(filePath);
|
|
144
145
|
}
|
|
145
146
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonar-autofix/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Core orchestrator for the Sonar Autofix tool",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@sonar-autofix/sonar-client": "^0.0.1",
|
|
19
|
-
"@sonar-autofix/llm-client": "^0.0.
|
|
19
|
+
"@sonar-autofix/llm-client": "^0.0.2",
|
|
20
20
|
"@sonar-autofix/git-client": "^0.0.1"
|
|
21
21
|
}
|
|
22
22
|
}
|