opencode-sonarqube 0.1.12 → 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.
- package/dist/index.js +23 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -20161,21 +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
|
}
|
|
20178
|
+
try {
|
|
20179
|
+
const pluginUrl = import.meta.url;
|
|
20180
|
+
debugLog.info("resolveValidDirectory: import.meta.url", { pluginUrl });
|
|
20181
|
+
const pluginPath = pluginUrl.replace("file://", "");
|
|
20182
|
+
const pathParts = pluginPath.split("/");
|
|
20183
|
+
const nodeModulesIndex = pathParts.findIndex((p) => p === "node_modules");
|
|
20184
|
+
debugLog.info("resolveValidDirectory: pathParts", { pathParts: pathParts.join(","), nodeModulesIndex });
|
|
20185
|
+
if (nodeModulesIndex > 0) {
|
|
20186
|
+
const projectPath = pathParts.slice(0, nodeModulesIndex).join("/");
|
|
20187
|
+
debugLog.info("resolveValidDirectory: extracted projectPath", { projectPath });
|
|
20188
|
+
if (projectPath && projectPath !== "/" && projectPath.length > 1) {
|
|
20189
|
+
return projectPath;
|
|
20190
|
+
}
|
|
20191
|
+
}
|
|
20192
|
+
} catch (e) {
|
|
20193
|
+
debugLog.error("resolveValidDirectory: import.meta.url failed", { error: String(e) });
|
|
20194
|
+
}
|
|
20174
20195
|
const homeDir = process.env["HOME"] || "/Users";
|
|
20196
|
+
debugLog.info("resolveValidDirectory: using fallback home", { homeDir });
|
|
20175
20197
|
return homeDir;
|
|
20176
20198
|
};
|
|
20177
20199
|
const effectiveDirectory = resolveValidDirectory();
|
|
20178
|
-
debugLog.info("Resolved directory", { original: directory, effective: effectiveDirectory });
|
|
20200
|
+
debugLog.info("Resolved directory FINAL", { original: directory, effective: effectiveDirectory });
|
|
20179
20201
|
await client.app.log({
|
|
20180
20202
|
body: {
|
|
20181
20203
|
service: "opencode-sonarqube",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-sonarqube",
|
|
3
|
-
"version": "0.1.
|
|
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.
|
|
41
|
+
"opencode-sonarqube": "0.1.13",
|
|
42
42
|
"zod": "^3.24.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|