@zuvia-software-solutions/code-mapper 2.3.11 → 2.3.12
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.
|
@@ -294,16 +294,32 @@ export class TsgoService {
|
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
findTsgoBinary() {
|
|
297
|
-
|
|
297
|
+
const pkgName = `@typescript/native-preview-${process.platform}-${process.arch}`;
|
|
298
|
+
// 1. Try resolving from the global install (code-mapper's own node_modules)
|
|
298
299
|
try {
|
|
299
|
-
const pkgName = `@typescript/native-preview-${process.platform}-${process.arch}`;
|
|
300
300
|
const pkgJsonPath = esmRequire.resolve(`${pkgName}/package.json`);
|
|
301
301
|
const exe = path.join(path.dirname(pkgJsonPath), 'lib', 'tsgo');
|
|
302
302
|
if (fs.existsSync(exe))
|
|
303
303
|
return exe;
|
|
304
304
|
}
|
|
305
305
|
catch { }
|
|
306
|
-
// Try
|
|
306
|
+
// 2. Try resolving from the PROJECT's node_modules (where devDependencies live)
|
|
307
|
+
try {
|
|
308
|
+
const projectRequire = createRequire(path.join(this.projectRoot, 'node_modules', '.package-lock.json'));
|
|
309
|
+
const pkgJsonPath = projectRequire.resolve(`${pkgName}/package.json`);
|
|
310
|
+
const exe = path.join(path.dirname(pkgJsonPath), 'lib', 'tsgo');
|
|
311
|
+
if (fs.existsSync(exe))
|
|
312
|
+
return exe;
|
|
313
|
+
}
|
|
314
|
+
catch { }
|
|
315
|
+
// 3. Try direct path in project's node_modules
|
|
316
|
+
try {
|
|
317
|
+
const exe = path.join(this.projectRoot, 'node_modules', pkgName, 'lib', 'tsgo');
|
|
318
|
+
if (fs.existsSync(exe))
|
|
319
|
+
return exe;
|
|
320
|
+
}
|
|
321
|
+
catch { }
|
|
322
|
+
// 4. Try which/where (on PATH)
|
|
307
323
|
try {
|
|
308
324
|
const cmd = process.platform === 'win32' ? 'where' : 'which';
|
|
309
325
|
const result = execFileSync(cmd, ['tsgo'], { encoding: 'utf-8', timeout: 3000 }).trim();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuvia-software-solutions/code-mapper",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.12",
|
|
4
4
|
"description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.",
|
|
5
5
|
"author": "Abhigyan Patwari",
|
|
6
6
|
"license": "PolyForm-Noncommercial-1.0.0",
|