opencode-sonarqube 0.1.13 → 0.1.14

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 +14 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -20161,32 +20161,43 @@ function shouldIgnoreFile2(filePath) {
20161
20161
  var SonarQubePlugin = async ({ client, directory, worktree }) => {
20162
20162
  debugLog.info("=== PLUGIN START ===", { directory, worktree, cwd: process.cwd() });
20163
20163
  const resolveValidDirectory = () => {
20164
+ debugLog.info("resolveValidDirectory: starting", { worktree, directory, cwd: process.cwd() });
20164
20165
  if (worktree && worktree !== "/" && worktree.length > 1) {
20166
+ debugLog.info("resolveValidDirectory: using worktree", { worktree });
20165
20167
  return worktree;
20166
20168
  }
20167
20169
  if (directory && directory !== "/" && directory.length > 1) {
20170
+ debugLog.info("resolveValidDirectory: using directory", { directory });
20168
20171
  return directory;
20169
20172
  }
20170
20173
  const cwd = process.cwd();
20171
20174
  if (cwd && cwd !== "/" && cwd.length > 1) {
20175
+ debugLog.info("resolveValidDirectory: using cwd", { cwd });
20172
20176
  return cwd;
20173
20177
  }
20174
20178
  try {
20175
- const pluginPath = import.meta.url.replace("file://", "");
20179
+ const pluginUrl = import.meta.url;
20180
+ debugLog.info("resolveValidDirectory: import.meta.url", { pluginUrl });
20181
+ const pluginPath = pluginUrl.replace("file://", "");
20176
20182
  const pathParts = pluginPath.split("/");
20177
20183
  const nodeModulesIndex = pathParts.findIndex((p) => p === "node_modules");
20184
+ debugLog.info("resolveValidDirectory: pathParts", { pathParts: pathParts.join(","), nodeModulesIndex });
20178
20185
  if (nodeModulesIndex > 0) {
20179
20186
  const projectPath = pathParts.slice(0, nodeModulesIndex).join("/");
20187
+ debugLog.info("resolveValidDirectory: extracted projectPath", { projectPath });
20180
20188
  if (projectPath && projectPath !== "/" && projectPath.length > 1) {
20181
20189
  return projectPath;
20182
20190
  }
20183
20191
  }
20184
- } catch {}
20192
+ } catch (e) {
20193
+ debugLog.error("resolveValidDirectory: import.meta.url failed", { error: String(e) });
20194
+ }
20185
20195
  const homeDir = process.env["HOME"] || "/Users";
20196
+ debugLog.info("resolveValidDirectory: using fallback home", { homeDir });
20186
20197
  return homeDir;
20187
20198
  };
20188
20199
  const effectiveDirectory = resolveValidDirectory();
20189
- debugLog.info("Resolved directory", { original: directory, effective: effectiveDirectory });
20200
+ debugLog.info("Resolved directory FINAL", { original: directory, effective: effectiveDirectory });
20190
20201
  await client.app.log({
20191
20202
  body: {
20192
20203
  service: "opencode-sonarqube",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-sonarqube",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
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",
@@ -38,7 +38,7 @@
38
38
  "homepage": "https://github.com/mguttmann/opencode-sonarqube#readme",
39
39
  "dependencies": {
40
40
  "@opencode-ai/plugin": "^1.1.34",
41
- "opencode-sonarqube": "0.1.12",
41
+ "opencode-sonarqube": "0.1.13",
42
42
  "zod": "^3.24.0"
43
43
  },
44
44
  "devDependencies": {