@justmpm/ai-tool 0.7.8 → 0.7.9

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.
@@ -4615,6 +4615,9 @@ Ou edite manualmente o arquivo existente.
4615
4615
  }
4616
4616
  };
4617
4617
  writeConfig(cwd, newConfig);
4618
+ const unmappedCount = allFiles.filter(
4619
+ (f) => detectFileAreas(f, newConfig).length === 0
4620
+ ).length;
4618
4621
  const sortedAreas = [...areaCounts.entries()].sort((a, b) => b[1].size - a[1].size);
4619
4622
  let out = `
4620
4623
  \u2705 Arquivo criado: .analyze/areas.config.json
@@ -4636,9 +4639,6 @@ Ou edite manualmente o arquivo existente.
4636
4639
  out += ` ... e mais ${sortedAreas.length - 15}
4637
4640
  `;
4638
4641
  }
4639
- const unmappedCount = allFiles.filter(
4640
- (f) => detectFileAreas(f, currentConfig).length === 0
4641
- ).length;
4642
4642
  if (unmappedCount > 0) {
4643
4643
  out += `
4644
4644
  \u26A0\uFE0F ${unmappedCount} arquivos sem \xE1rea definida
@@ -4655,13 +4655,46 @@ Ou edite manualmente o arquivo existente.
4655
4655
  }
4656
4656
  }
4657
4657
  out += `
4658
- \u{1F4A1} Edite o arquivo para:
4659
- - Renomear \xE1reas (campo "name")
4660
- - Adicionar descri\xE7\xF5es (campo "description")
4661
- - Ajustar padr\xF5es (campo "patterns")
4662
- - Adicionar/remover \xE1reas
4663
- - Definir descri\xE7\xF5es espec\xEDficas de arquivos (campo "descriptions")
4664
- `;
4658
+ \u{1F4A1} Boas pr\xE1ticas:
4659
+ - Ideal: 5-15 \xE1reas (muitas \xE1reas \xE9 dif\xEDcil de navegar)
4660
+ - Use patterns para pastas, keywords para arquivos espalhados
4661
+ - Se uma \xE1rea tem <3 arquivos, considere mesclar com outra
4662
+ - Se tem >50 arquivos, considere dividir em sub-\xE1reas
4663
+
4664
+ \u{1F4DD} Como customizar:
4665
+ 1. Renomear \xE1reas: altere o campo "name"
4666
+ 2. Ajustar padr\xF5es: edite "patterns" (glob) ou "keywords"
4667
+ 3. Adicionar descri\xE7\xF5es: campo "description" explica o dom\xEDnio
4668
+ 4. Descri\xE7\xF5es de arquivos: use "descriptions" para documentos espec\xEDficos
4669
+
4670
+ \u{1F4A1} Exemplo de customiza\xE7\xE3o:
4671
+
4672
+ Antes (nome gen\xE9rico detectado):
4673
+ "user-profile": { "name": "User Profile", ... }
4674
+
4675
+ Depois (renomeado para dom\xEDnio de neg\xF3cio):
4676
+ "meu-perfil": { "name": "Meu Perfil", "description": "Edi\xE7\xE3o de perfil do usu\xE1rio" }
4677
+
4678
+ \u2699\uFE0F Quando usar autoDetect: false
4679
+ - Quando quer controle total das \xE1reas
4680
+ - Quando a detec\xE7\xE3o autom\xE1tica est\xE1 muito imprecisa
4681
+ - Quando o projeto tem dom\xEDnios muito espec\xEDficos
4682
+
4683
+ \u{1F4A1} Casos especiais:
4684
+ - Arquivos compartilhados: adicione a m\xFAltiplas \xE1reas
4685
+ - Utils globais: crie \xE1rea 'shared' ou use 'ignore'
4686
+ - Monorepo: use 'patterns' com caminhos relativos \xE0 raiz
4687
+
4688
+ \u{1F527} Manuten\xE7\xE3o:
4689
+ - Atualize o config ao criar/mover arquivos
4690
+ - Use 'ai-tool areas' para verificar arquivos sem \xE1rea
4691
+ - Use 'ai-tool area <nome>' para ver o que foi detectado
4692
+
4693
+ \u{1F4CB} Pr\xF3ximos passos:
4694
+ \u2192 Execute 'ai-tool areas' para ver o resultado
4695
+ \u2192 Use 'ai-tool area <nome>' para validar uma \xE1rea espec\xEDfica
4696
+ \u2192 Execute 'ai-tool map' para ver o resumo atualizado
4697
+ `;
4665
4698
  return out.trim();
4666
4699
  } catch (error) {
4667
4700
  const message = error instanceof Error ? error.message : String(error);
@@ -4733,7 +4766,9 @@ function getAllCodeFiles5(dir, files = [], baseDir = dir) {
4733
4766
  const ext = extname6(entry).toLowerCase();
4734
4767
  if (CODE_EXTENSIONS6.has(ext)) {
4735
4768
  const relativePath = fullPath.slice(baseDir.length + 1).replace(/\\/g, "/");
4736
- files.push(relativePath);
4769
+ if (relativePath && !relativePath.startsWith("..")) {
4770
+ files.push(relativePath);
4771
+ }
4737
4772
  }
4738
4773
  }
4739
4774
  } catch {
package/dist/cli.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  impact,
14
14
  map,
15
15
  suggest
16
- } from "./chunk-DUFJBSFC.js";
16
+ } from "./chunk-PUA5CWMJ.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-TQLA6OF6.js");
111
+ const { startMcpServer } = await import("./server-GII6BLXS.js");
112
112
  await startMcpServer();
113
113
  return;
114
114
  }
package/dist/index.js CHANGED
@@ -47,7 +47,7 @@ import {
47
47
  setFileDescription,
48
48
  suggest,
49
49
  writeConfig
50
- } from "./chunk-DUFJBSFC.js";
50
+ } from "./chunk-PUA5CWMJ.js";
51
51
  export {
52
52
  AREA_DESCRIPTIONS,
53
53
  AREA_NAMES,
@@ -11,7 +11,7 @@ import {
11
11
  impact,
12
12
  map,
13
13
  suggest
14
- } from "./chunk-DUFJBSFC.js";
14
+ } from "./chunk-PUA5CWMJ.js";
15
15
 
16
16
  // src/mcp/server.ts
17
17
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justmpm/ai-tool",
3
- "version": "0.7.8",
3
+ "version": "0.7.9",
4
4
  "description": "Ferramenta de análise de dependências e impacto para projetos TypeScript/JavaScript. Usa Skott + Knip internamente.",
5
5
  "keywords": [
6
6
  "dependency-analysis",