opencode-sonarqube 1.5.0 → 1.5.1

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -15
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -19449,24 +19449,22 @@ async function runScanner(config3, state, options, directory) {
19449
19449
  const exitCode = await proc.exited;
19450
19450
  const output = stdout + (stderr ? `
19451
19451
  ${stderr}` : "");
19452
+ const taskId = extractTaskId(output);
19452
19453
  if (exitCode === 0) {
19453
- const taskId = extractTaskId(output);
19454
19454
  logger4.info("Scanner completed successfully", { taskId });
19455
- return {
19456
- success: true,
19457
- output,
19458
- exitCode,
19459
- taskId
19460
- };
19461
- } else {
19462
- logger4.error(`Scanner failed with exit code ${exitCode}`);
19463
- return {
19464
- success: false,
19465
- output,
19466
- error: `Scanner exited with code ${exitCode}`,
19467
- exitCode
19468
- };
19455
+ return { success: true, output, exitCode, taskId };
19456
+ }
19457
+ if (taskId) {
19458
+ logger4.warn(`Scanner exited with code ${exitCode} but analysis was uploaded`, { taskId });
19459
+ return { success: true, output, exitCode, taskId };
19469
19460
  }
19461
+ logger4.error(`Scanner failed with exit code ${exitCode}`);
19462
+ return {
19463
+ success: false,
19464
+ output,
19465
+ error: `Scanner exited with code ${exitCode}`,
19466
+ exitCode
19467
+ };
19470
19468
  } catch (error45) {
19471
19469
  const errorMessage = error45 instanceof Error ? error45.message : String(error45);
19472
19470
  logger4.error(`Scanner execution failed: ${errorMessage}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-sonarqube",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "OpenCode Plugin for SonarQube integration - Enterprise-level code quality from the start",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",