opencode-sonarqube 0.1.0 → 0.1.2

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 +4 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20045,7 +20045,7 @@ var SonarQubePlugin = async ({ client, directory, worktree }) => {
20045
20045
  if (await needsBootstrap(getDirectory()))
20046
20046
  return;
20047
20047
  const state = await getProjectState(getDirectory());
20048
- if (!state)
20048
+ if (!state || !state.projectKey)
20049
20049
  return;
20050
20050
  const api2 = createSonarQubeAPI(config2, state);
20051
20051
  const [qgStatus, counts] = await Promise.all([
@@ -20167,7 +20167,7 @@ After fixing, I will re-run the analysis to verify.`;
20167
20167
  });
20168
20168
  if (config2.autoFix && lastAnalysisResult) {
20169
20169
  const state = await getProjectState(getDirectory());
20170
- if (state) {
20170
+ if (state && state.projectKey) {
20171
20171
  const api2 = createSonarQubeAPI(config2, state);
20172
20172
  const issues = await api2.issues.getFormattedIssues({
20173
20173
  projectKey: state.projectKey,
@@ -20238,7 +20238,7 @@ ${statusNote}`;
20238
20238
  }
20239
20239
  try {
20240
20240
  const state = await getProjectState(getDirectory());
20241
- if (!state)
20241
+ if (!state || !state.projectKey)
20242
20242
  return;
20243
20243
  const api2 = createSonarQubeAPI(config2, state);
20244
20244
  const counts = await api2.issues.getCounts(state.projectKey);
@@ -20391,7 +20391,7 @@ Git operation completed with changes. Consider running:
20391
20391
  }
20392
20392
  try {
20393
20393
  const state = await getProjectState(getDirectory());
20394
- if (!state) {
20394
+ if (!state || !state.projectKey) {
20395
20395
  return;
20396
20396
  }
20397
20397
  const api2 = createSonarQubeAPI(config2, state);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-sonarqube",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
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",