opencode-sonarqube 0.1.13 → 0.1.15
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 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -20161,32 +20161,52 @@ 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
|
+
const log = (msg) => {
|
|
20165
|
+
try {
|
|
20166
|
+
appendFileSync("/tmp/sonarqube-plugin-debug.log", `${new Date().toISOString()} [RESOLVE] ${msg}
|
|
20167
|
+
`);
|
|
20168
|
+
} catch {}
|
|
20169
|
+
};
|
|
20170
|
+
log(`START worktree=${worktree} directory=${directory} cwd=${process.cwd()}`);
|
|
20164
20171
|
if (worktree && worktree !== "/" && worktree.length > 1) {
|
|
20172
|
+
log(`USING worktree=${worktree}`);
|
|
20165
20173
|
return worktree;
|
|
20166
20174
|
}
|
|
20167
20175
|
if (directory && directory !== "/" && directory.length > 1) {
|
|
20176
|
+
log(`USING directory=${directory}`);
|
|
20168
20177
|
return directory;
|
|
20169
20178
|
}
|
|
20170
20179
|
const cwd = process.cwd();
|
|
20171
20180
|
if (cwd && cwd !== "/" && cwd.length > 1) {
|
|
20181
|
+
log(`USING cwd=${cwd}`);
|
|
20172
20182
|
return cwd;
|
|
20173
20183
|
}
|
|
20174
20184
|
try {
|
|
20175
|
-
const
|
|
20185
|
+
const pluginUrl = import.meta.url;
|
|
20186
|
+
log(`import.meta.url=${pluginUrl}`);
|
|
20187
|
+
const pluginPath = pluginUrl.replace("file://", "");
|
|
20176
20188
|
const pathParts = pluginPath.split("/");
|
|
20177
20189
|
const nodeModulesIndex = pathParts.findIndex((p) => p === "node_modules");
|
|
20190
|
+
log(`pathParts nodeModulesIndex=${nodeModulesIndex}`);
|
|
20178
20191
|
if (nodeModulesIndex > 0) {
|
|
20179
20192
|
const projectPath = pathParts.slice(0, nodeModulesIndex).join("/");
|
|
20193
|
+
log(`extracted projectPath=${projectPath}`);
|
|
20180
20194
|
if (projectPath && projectPath !== "/" && projectPath.length > 1) {
|
|
20181
20195
|
return projectPath;
|
|
20182
20196
|
}
|
|
20183
20197
|
}
|
|
20184
|
-
} catch {
|
|
20198
|
+
} catch (e) {
|
|
20199
|
+
log(`import.meta.url FAILED: ${e}`);
|
|
20200
|
+
}
|
|
20185
20201
|
const homeDir = process.env["HOME"] || "/Users";
|
|
20202
|
+
log(`FALLBACK home=${homeDir}`);
|
|
20186
20203
|
return homeDir;
|
|
20187
20204
|
};
|
|
20188
20205
|
const effectiveDirectory = resolveValidDirectory();
|
|
20189
|
-
|
|
20206
|
+
try {
|
|
20207
|
+
appendFileSync("/tmp/sonarqube-plugin-debug.log", `${new Date().toISOString()} [RESOLVE] FINAL effective=${effectiveDirectory}
|
|
20208
|
+
`);
|
|
20209
|
+
} catch {}
|
|
20190
20210
|
await client.app.log({
|
|
20191
20211
|
body: {
|
|
20192
20212
|
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.15",
|
|
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.14",
|
|
42
42
|
"zod": "^3.24.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|