@recapt/mcp 0.0.48 → 0.0.49
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 +7 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3793,16 +3793,21 @@ function detectArrayPaths(data) {
|
|
|
3793
3793
|
|
|
3794
3794
|
// src/tools/catalog/searchTools.ts
|
|
3795
3795
|
import { z as z36 } from "zod";
|
|
3796
|
-
import { readFileSync } from "fs";
|
|
3796
|
+
import { readFileSync, existsSync } from "fs";
|
|
3797
3797
|
import { fileURLToPath } from "url";
|
|
3798
3798
|
import { dirname, join } from "path";
|
|
3799
3799
|
var __filename2 = fileURLToPath(import.meta.url);
|
|
3800
3800
|
var __dirname2 = dirname(__filename2);
|
|
3801
3801
|
var _catalog2 = null;
|
|
3802
|
+
function resolveCatalogPath() {
|
|
3803
|
+
const localPath = join(__dirname2, "toolCatalog.json");
|
|
3804
|
+
if (existsSync(localPath)) return localPath;
|
|
3805
|
+
return join(__dirname2, "tools", "catalog", "toolCatalog.json");
|
|
3806
|
+
}
|
|
3802
3807
|
function loadCatalog2() {
|
|
3803
3808
|
if (_catalog2) return _catalog2;
|
|
3804
3809
|
try {
|
|
3805
|
-
const catalogPath =
|
|
3810
|
+
const catalogPath = resolveCatalogPath();
|
|
3806
3811
|
const raw = readFileSync(catalogPath, "utf-8");
|
|
3807
3812
|
_catalog2 = JSON.parse(raw);
|
|
3808
3813
|
return _catalog2;
|