opencode-sonarqube 1.2.24 → 1.2.26

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 +9 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -19465,6 +19465,7 @@ function createHooks(getConfig, getDirectory) {
19465
19465
 
19466
19466
  // src/tools/sonarqube.ts
19467
19467
  init_zod();
19468
+ import { mkdir } from "node:fs/promises";
19468
19469
  var logger7 = new Logger("sonarqube-tool");
19469
19470
  var SonarQubeToolArgsSchema = exports_external2.object({
19470
19471
  action: exports_external2.enum(["analyze", "issues", "newissues", "status", "init", "setup", "validate", "hotspots", "duplications", "rule", "history", "profile", "branches", "metrics", "worstfiles"]).describe("Action to perform: analyze (run scanner), issues (all issues), newissues (only new code issues), status (quality gate), init/setup (initialize), validate (enterprise check), hotspots (security review), duplications (code duplicates), rule (explain rule), history (past analyses), profile (quality profile), branches (branch status), metrics (detailed metrics), worstfiles (files with most issues)"),
@@ -19572,9 +19573,11 @@ async function handleSetup(config2, directory, force = false) {
19572
19573
 
19573
19574
  ${result.message}`;
19574
19575
  }
19575
- const configPath = `${directory}/.sonarqube/config.json`;
19576
+ const sonarqubeDir = `${directory}/.sonarqube`;
19577
+ const configPath = `${sonarqubeDir}/config.json`;
19576
19578
  const configExists = await Bun.file(configPath).exists();
19577
19579
  if (!configExists) {
19580
+ await mkdir(sonarqubeDir, { recursive: true });
19578
19581
  const defaultConfig = {
19579
19582
  level: config2.level || "enterprise",
19580
19583
  autoAnalyze: true,
@@ -20086,7 +20089,7 @@ function getSeveritiesFromLevel(level) {
20086
20089
  }
20087
20090
 
20088
20091
  // src/index.ts
20089
- import { readFileSync, writeFileSync } from "node:fs";
20092
+ import { readFileSync, writeFileSync, appendFileSync } from "node:fs";
20090
20093
 
20091
20094
  // src/cli.ts
20092
20095
  var CLI_HELP = `
@@ -20306,7 +20309,10 @@ function shouldIgnoreFile2(filePath) {
20306
20309
  return IGNORED_FILE_PATTERNS2.some((pattern) => pattern.test(filePath));
20307
20310
  }
20308
20311
  var SonarQubePlugin = async ({ client, directory, worktree }) => {
20309
- const safeLog = (_msg) => {};
20312
+ const safeLog = (msg) => {
20313
+ appendFileSync("/tmp/sonarqube-plugin-debug.log", `${new Date().toISOString()} ${msg}
20314
+ `);
20315
+ };
20310
20316
  const pluginImportUrl = import.meta.url;
20311
20317
  const resolveDirectoryFromImportUrl = () => {
20312
20318
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-sonarqube",
3
- "version": "1.2.24",
3
+ "version": "1.2.26",
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",