@justmpm/ai-tool 0.7.4 → 0.7.5
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.
|
@@ -3429,12 +3429,30 @@ function indexProject(cwd) {
|
|
|
3429
3429
|
functionFiles.forEach((f) => debugFunctions(` - ${f}`));
|
|
3430
3430
|
}
|
|
3431
3431
|
const project = createProject2(cwd);
|
|
3432
|
+
let addedCount = 0;
|
|
3433
|
+
let errorCount = 0;
|
|
3432
3434
|
for (const file of allFiles) {
|
|
3433
3435
|
try {
|
|
3434
3436
|
project.addSourceFileAtPath(resolve(cwd, file));
|
|
3437
|
+
addedCount++;
|
|
3435
3438
|
} catch {
|
|
3439
|
+
errorCount++;
|
|
3440
|
+
if (DEBUG && file.includes("functions/src/")) {
|
|
3441
|
+
debugLog(`[indexer] Erro ao adicionar: ${file}`);
|
|
3442
|
+
}
|
|
3436
3443
|
}
|
|
3437
3444
|
}
|
|
3445
|
+
debugLog(`[indexer] Total de arquivos encontrados: ${allFiles.length}`);
|
|
3446
|
+
debugLog(`[indexer] Arquivos adicionados ao projeto: ${addedCount}`);
|
|
3447
|
+
debugLog(`[indexer] Arquivos com erro: ${errorCount}`);
|
|
3448
|
+
debugLog(`[indexer] SourceFiles no projeto: ${project.getSourceFiles().length}`);
|
|
3449
|
+
const functionsInProject = project.getSourceFiles().filter(
|
|
3450
|
+
(sf) => sf.getFilePath().includes("functions/src/")
|
|
3451
|
+
);
|
|
3452
|
+
debugFunctions(`[indexer] Arquivos functions/src/ no projeto: ${functionsInProject.length}`);
|
|
3453
|
+
functionsInProject.forEach((sf) => {
|
|
3454
|
+
debugFunctions(` - ${sf.getFilePath()}`);
|
|
3455
|
+
});
|
|
3438
3456
|
const files = {};
|
|
3439
3457
|
const symbolsByName = {};
|
|
3440
3458
|
let symbolCount = 0;
|
|
@@ -3687,16 +3705,25 @@ function indexProject(cwd) {
|
|
|
3687
3705
|
}
|
|
3688
3706
|
function createProject2(cwd) {
|
|
3689
3707
|
try {
|
|
3690
|
-
|
|
3708
|
+
const project = new Project2({
|
|
3691
3709
|
tsConfigFilePath: `${cwd}/tsconfig.json`,
|
|
3692
3710
|
skipAddingFilesFromTsConfig: true
|
|
3693
3711
|
});
|
|
3712
|
+
debugLog(`Projeto ts-morph criado com tsconfig: ${cwd}/tsconfig.json`);
|
|
3713
|
+
return project;
|
|
3694
3714
|
} catch {
|
|
3715
|
+
debugLog(`Falha ao ler tsconfig, criando projeto b\xE1sico`);
|
|
3695
3716
|
return new Project2({
|
|
3696
3717
|
skipAddingFilesFromTsConfig: true,
|
|
3697
3718
|
compilerOptions: {
|
|
3698
3719
|
allowJs: true,
|
|
3699
|
-
checkJs: false
|
|
3720
|
+
checkJs: false,
|
|
3721
|
+
target: 2,
|
|
3722
|
+
// ES2020
|
|
3723
|
+
module: 200,
|
|
3724
|
+
// ESNext
|
|
3725
|
+
moduleResolution: 100
|
|
3726
|
+
// Bundler
|
|
3700
3727
|
}
|
|
3701
3728
|
});
|
|
3702
3729
|
}
|
package/dist/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
impact,
|
|
14
14
|
map,
|
|
15
15
|
suggest
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IZ2UC65O.js";
|
|
17
17
|
|
|
18
18
|
// src/cli.ts
|
|
19
19
|
import { resolve } from "path";
|
|
@@ -108,7 +108,7 @@ async function main() {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
if (flags.mcp) {
|
|
111
|
-
const { startMcpServer } = await import("./server-
|
|
111
|
+
const { startMcpServer } = await import("./server-H7ZERMME.js");
|
|
112
112
|
await startMcpServer();
|
|
113
113
|
return;
|
|
114
114
|
}
|
package/dist/index.js
CHANGED
package/package.json
CHANGED