@the-magic-tower/fixhive-opencode-plugin 0.1.9 → 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.
Files changed (2) hide show
  1. package/dist/index.js +11 -18
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1,9 +1,7 @@
1
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
- }) : x)(function(x) {
4
- if (typeof require !== "undefined") return require.apply(this, arguments);
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 (fs.existsSync(path.join(directory, file))) {
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 fs = __require("fs");
1787
- const path = __require("path");
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(fs.readFileSync(pkgPath, "utf-8"));
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 = path.join(directory, "requirements.txt");
1804
- if (fs.existsSync(reqPath)) {
1796
+ const reqPath = join(directory, "requirements.txt");
1797
+ if (existsSync2(reqPath)) {
1805
1798
  try {
1806
- const content = fs.readFileSync(reqPath, "utf-8");
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.9",
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",
@@ -46,7 +46,7 @@
46
46
  "dependencies": {
47
47
  "@supabase/supabase-js": "^2.45.0",
48
48
  "better-sqlite3": "^12.5.0",
49
- "openai": "^4.60.0",
49
+ "openai": "^6.16.0",
50
50
  "uuid": "^13.0.0",
51
51
  "zod": "^3.25.76"
52
52
  },
@@ -57,11 +57,11 @@
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": "^2.1.9",
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": "^2.0.0"
64
+ "vitest": "^4.0.16"
65
65
  },
66
66
  "engines": {
67
67
  "node": ">=20.0.0"