@the-magic-tower/fixhive-opencode-plugin 0.1.8 → 0.1.10
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 +11 -18
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
-
});
|
|
1
|
+
// src/plugin/index.ts
|
|
2
|
+
import { tool as tool2 } from "@opencode-ai/plugin";
|
|
3
|
+
import { existsSync as existsSync2, readFileSync } from "fs";
|
|
4
|
+
import { join } from "path";
|
|
7
5
|
|
|
8
6
|
// src/core/privacy-filter.ts
|
|
9
7
|
var DEFAULT_FILTER_RULES = [
|
|
@@ -1700,7 +1698,6 @@ Use \`fixhive_mark_resolved\` when errors are fixed to contribute solutions.
|
|
|
1700
1698
|
};
|
|
1701
1699
|
};
|
|
1702
1700
|
function createOfflineTools(localStore, _privacyFilter, context) {
|
|
1703
|
-
const { tool: tool2 } = __require("@opencode-ai/plugin");
|
|
1704
1701
|
return {
|
|
1705
1702
|
fixhive_list: tool2({
|
|
1706
1703
|
description: "List errors detected in the current session.",
|
|
@@ -1761,8 +1758,6 @@ function loadConfig() {
|
|
|
1761
1758
|
};
|
|
1762
1759
|
}
|
|
1763
1760
|
function detectLanguage(directory) {
|
|
1764
|
-
const fs = __require("fs");
|
|
1765
|
-
const path = __require("path");
|
|
1766
1761
|
const indicators = [
|
|
1767
1762
|
["package.json", "typescript"],
|
|
1768
1763
|
["tsconfig.json", "typescript"],
|
|
@@ -1776,19 +1771,17 @@ function detectLanguage(directory) {
|
|
|
1776
1771
|
["composer.json", "php"]
|
|
1777
1772
|
];
|
|
1778
1773
|
for (const [file, lang] of indicators) {
|
|
1779
|
-
if (
|
|
1774
|
+
if (existsSync2(join(directory, file))) {
|
|
1780
1775
|
return lang;
|
|
1781
1776
|
}
|
|
1782
1777
|
}
|
|
1783
1778
|
return void 0;
|
|
1784
1779
|
}
|
|
1785
1780
|
function detectFramework(directory) {
|
|
1786
|
-
const
|
|
1787
|
-
|
|
1788
|
-
const pkgPath = path.join(directory, "package.json");
|
|
1789
|
-
if (fs.existsSync(pkgPath)) {
|
|
1781
|
+
const pkgPath = join(directory, "package.json");
|
|
1782
|
+
if (existsSync2(pkgPath)) {
|
|
1790
1783
|
try {
|
|
1791
|
-
const pkg = JSON.parse(
|
|
1784
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
1792
1785
|
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
1793
1786
|
if (deps["next"]) return "nextjs";
|
|
1794
1787
|
if (deps["react"]) return "react";
|
|
@@ -1800,10 +1793,10 @@ function detectFramework(directory) {
|
|
|
1800
1793
|
} catch {
|
|
1801
1794
|
}
|
|
1802
1795
|
}
|
|
1803
|
-
const reqPath =
|
|
1804
|
-
if (
|
|
1796
|
+
const reqPath = join(directory, "requirements.txt");
|
|
1797
|
+
if (existsSync2(reqPath)) {
|
|
1805
1798
|
try {
|
|
1806
|
-
const content =
|
|
1799
|
+
const content = readFileSync(reqPath, "utf-8");
|
|
1807
1800
|
if (content.includes("django")) return "django";
|
|
1808
1801
|
if (content.includes("flask")) return "flask";
|
|
1809
1802
|
if (content.includes("fastapi")) return "fastapi";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@the-magic-tower/fixhive-opencode-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "Community-based error knowledge sharing for OpenCode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "tsup src/index.ts --format esm --dts --clean",
|
|
18
|
+
"build": "tsup src/index.ts --format esm --dts --clean --external @supabase/supabase-js --external better-sqlite3 --external openai --external uuid",
|
|
19
19
|
"build:dts": "tsup src/index.ts --format esm --dts --clean",
|
|
20
20
|
"dev": "tsup src/index.ts --format esm --watch",
|
|
21
21
|
"typecheck": "tsc --noEmit",
|
|
@@ -45,23 +45,23 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@supabase/supabase-js": "^2.45.0",
|
|
48
|
-
"better-sqlite3": "^
|
|
49
|
-
"openai": "^
|
|
50
|
-
"uuid": "^
|
|
48
|
+
"better-sqlite3": "^12.5.0",
|
|
49
|
+
"openai": "^6.16.0",
|
|
50
|
+
"uuid": "^13.0.0",
|
|
51
51
|
"zod": "^3.25.76"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@opencode-ai/plugin": "^1.1.1",
|
|
55
55
|
"@types/better-sqlite3": "^7.6.11",
|
|
56
|
-
"@types/node": "^
|
|
56
|
+
"@types/node": "^25.0.3",
|
|
57
57
|
"@types/uuid": "^10.0.0",
|
|
58
58
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
59
59
|
"@typescript-eslint/parser": "^8.0.0",
|
|
60
|
-
"@vitest/coverage-v8": "^
|
|
60
|
+
"@vitest/coverage-v8": "^4.0.16",
|
|
61
61
|
"eslint": "^9.0.0",
|
|
62
62
|
"tsup": "^8.2.0",
|
|
63
63
|
"typescript": "^5.5.0",
|
|
64
|
-
"vitest": "^
|
|
64
|
+
"vitest": "^4.0.16"
|
|
65
65
|
},
|
|
66
66
|
"engines": {
|
|
67
67
|
"node": ">=20.0.0"
|