@ufira/vibma 0.2.1 → 0.2.2

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/mcp.js CHANGED
@@ -25,6 +25,7 @@ import WebSocket from "ws";
25
25
  import { v4 as uuidv4 } from "uuid";
26
26
  import { readFileSync } from "fs";
27
27
  import { join, basename } from "path";
28
+ import { fileURLToPath } from "url";
28
29
 
29
30
  // src/tools/document.ts
30
31
  import { z } from "zod";
@@ -1866,7 +1867,7 @@ function registerAllTools(server2, sendCommand) {
1866
1867
  // src/mcp.ts
1867
1868
  var VIBMA_VERSION = "0.0.0";
1868
1869
  try {
1869
- const start = typeof __dirname !== "undefined" ? __dirname : process.cwd();
1870
+ const start = typeof import.meta?.url !== "undefined" ? join(fileURLToPath(import.meta.url), "..") : typeof __dirname !== "undefined" ? __dirname : process.cwd();
1870
1871
  for (let dir = start; dir !== "/"; dir = join(dir, "..")) {
1871
1872
  try {
1872
1873
  const pkg = JSON.parse(readFileSync(join(dir, "package.json"), "utf8"));