ctxo-mcp 0.6.3 → 0.6.4
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.
|
@@ -1501,11 +1501,16 @@ var RoslynAdapter = class {
|
|
|
1501
1501
|
if (!this.isReady()) return null;
|
|
1502
1502
|
const result = await runBatchIndex(this.roslynProjectDir, this.solutionPath);
|
|
1503
1503
|
const solutionDir = dirname4(this.solutionPath);
|
|
1504
|
-
|
|
1504
|
+
const pathMap = /* @__PURE__ */ new Map();
|
|
1505
1505
|
for (const file of result.files) {
|
|
1506
1506
|
const absolutePath = resolve2(solutionDir, file.file);
|
|
1507
1507
|
const projectRelative = relative(this.rootDir, absolutePath).replace(/\\/g, "/");
|
|
1508
|
-
|
|
1508
|
+
pathMap.set(file.file, projectRelative);
|
|
1509
|
+
}
|
|
1510
|
+
this.cache.clear();
|
|
1511
|
+
for (const file of result.files) {
|
|
1512
|
+
const projectRelative = pathMap.get(file.file);
|
|
1513
|
+
const rewritten = rewriteAllPaths(file, projectRelative, pathMap);
|
|
1509
1514
|
this.cache.set(projectRelative, rewritten);
|
|
1510
1515
|
}
|
|
1511
1516
|
log3.info(`Roslyn batch index: ${result.totalFiles} files in ${result.elapsed}`);
|
|
@@ -1570,11 +1575,18 @@ var RoslynAdapter = class {
|
|
|
1570
1575
|
this.initialized = false;
|
|
1571
1576
|
}
|
|
1572
1577
|
};
|
|
1573
|
-
function
|
|
1574
|
-
const rewrite = (s) =>
|
|
1578
|
+
function rewriteAllPaths(file, newFilePath, pathMap) {
|
|
1579
|
+
const rewrite = (s) => {
|
|
1580
|
+
for (const [oldPath, newPath] of pathMap) {
|
|
1581
|
+
if (s.includes(oldPath)) {
|
|
1582
|
+
return s.replaceAll(oldPath, newPath);
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
return s;
|
|
1586
|
+
};
|
|
1575
1587
|
return {
|
|
1576
1588
|
...file,
|
|
1577
|
-
file:
|
|
1589
|
+
file: newFilePath,
|
|
1578
1590
|
symbols: file.symbols.map((s) => ({
|
|
1579
1591
|
...s,
|
|
1580
1592
|
symbolId: rewrite(s.symbolId)
|
|
@@ -3284,7 +3296,7 @@ var DoctorCommand = class {
|
|
|
3284
3296
|
this.ctxoRoot = join18(projectRoot, ".ctxo");
|
|
3285
3297
|
}
|
|
3286
3298
|
async run(options = {}) {
|
|
3287
|
-
const { getVersion: getVersion2 } = await import("./cli-router-
|
|
3299
|
+
const { getVersion: getVersion2 } = await import("./cli-router-JX7ZFVAW.js");
|
|
3288
3300
|
console.error(`ctxo v${getVersion2()} \u2014 health check
|
|
3289
3301
|
`);
|
|
3290
3302
|
const checks = [
|
|
@@ -3453,4 +3465,4 @@ export {
|
|
|
3453
3465
|
CliRouter,
|
|
3454
3466
|
getVersion
|
|
3455
3467
|
};
|
|
3456
|
-
//# sourceMappingURL=cli-router-
|
|
3468
|
+
//# sourceMappingURL=cli-router-JX7ZFVAW.js.map
|