ctxo-mcp 0.6.1 → 0.6.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.
|
@@ -1211,6 +1211,16 @@ import { existsSync as existsSync3, readdirSync } from "fs";
|
|
|
1211
1211
|
import { join as join4 } from "path";
|
|
1212
1212
|
var log = createLogger("ctxo:roslyn");
|
|
1213
1213
|
var IGNORE_DIRS = /* @__PURE__ */ new Set(["bin", "obj", "node_modules", ".git", ".ctxo", "packages"]);
|
|
1214
|
+
function findPackageRoot(startDir) {
|
|
1215
|
+
let dir = startDir;
|
|
1216
|
+
for (let i = 0; i < 10; i++) {
|
|
1217
|
+
if (existsSync3(join4(dir, "package.json"))) return dir;
|
|
1218
|
+
const parent = join4(dir, "..");
|
|
1219
|
+
if (parent === dir) break;
|
|
1220
|
+
dir = parent;
|
|
1221
|
+
}
|
|
1222
|
+
return null;
|
|
1223
|
+
}
|
|
1214
1224
|
function detectDotnetSdk() {
|
|
1215
1225
|
try {
|
|
1216
1226
|
const version = execFileSync("dotnet", ["--version"], { encoding: "utf-8", timeout: 1e4 }).trim();
|
|
@@ -1260,15 +1270,16 @@ function findFiles(dir, ext, maxDepth, currentDepth = 0) {
|
|
|
1260
1270
|
return results;
|
|
1261
1271
|
}
|
|
1262
1272
|
function findCtxoRoslynProject() {
|
|
1273
|
+
const pkgRoot = findPackageRoot(import.meta.dirname);
|
|
1263
1274
|
const candidates = [
|
|
1275
|
+
...pkgRoot ? [join4(pkgRoot, "tools/ctxo-roslyn")] : [],
|
|
1276
|
+
// package root (npx, global, local dev)
|
|
1277
|
+
join4(import.meta.dirname, "../tools/ctxo-roslyn"),
|
|
1278
|
+
// dist/ -> tools/ (tsup bundled)
|
|
1264
1279
|
join4(import.meta.dirname, "../../../../tools/ctxo-roslyn"),
|
|
1265
|
-
//
|
|
1266
|
-
join4(import.meta.dirname, "../../../tools/ctxo-roslyn"),
|
|
1267
|
-
// built dist (dist/adapters/language/roslyn -> tools/)
|
|
1280
|
+
// src/adapters/language/roslyn -> tools/ (dev unbundled)
|
|
1268
1281
|
join4(process.cwd(), "node_modules/ctxo-mcp/tools/ctxo-roslyn"),
|
|
1269
1282
|
// npm install in project
|
|
1270
|
-
join4(process.cwd(), "node_modules/ctxo/tools/ctxo-roslyn"),
|
|
1271
|
-
// alt package name
|
|
1272
1283
|
join4(process.cwd(), "tools/ctxo-roslyn")
|
|
1273
1284
|
// local repo root
|
|
1274
1285
|
];
|
|
@@ -3382,4 +3393,4 @@ Usage:
|
|
|
3382
3393
|
export {
|
|
3383
3394
|
CliRouter
|
|
3384
3395
|
};
|
|
3385
|
-
//# sourceMappingURL=cli-router-
|
|
3396
|
+
//# sourceMappingURL=cli-router-LW4YTNHW.js.map
|