@archznn/xavva 2.1.0 → 2.2.1

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.
package/README.md CHANGED
@@ -1,204 +1,3 @@
1
- # XAVVA CLI 🚀
2
-
3
- > Ultra-fast development toolkit for Java Enterprise (Tomcat) on Windows
4
-
5
- [![Version](https://img.shields.io/badge/version-2.0.3-blue.svg)](https://github.com/leorsousa05/Xavva)
6
- [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
7
-
8
- Xavva is a high-performance CLI built with **Bun** that transforms the Java/Tomcat development experience. It brings modern development workflows (like Node.js/Vite) to the Java Enterprise ecosystem with hot-reload, smart logging, and automated deployment.
9
-
10
- ---
11
-
12
- ## ✨ Features
13
-
14
- - ⚡ **Hot Reload** — Incremental compilation and class injection without server restart
15
- - 📊 **Interactive Dashboard** — Real-time TUI with system metrics and shortcuts
16
- - 🧠 **Smart Log Analyzer** — Stack trace folding and root cause highlighting
17
- - 🔒 **Security Audit** — Automated vulnerability scanning via OSV.dev
18
- - 📦 **Dependency Analysis** — Detect conflicts and outdated dependencies
19
- - 🎯 **Maven & Gradle** — Native support for both build tools
20
- - 🔧 **Auto-Healing** — Automatic diagnosis and repair of common issues
21
-
22
- ---
23
-
24
- ## 📦 Installation
25
-
26
- ```powershell
27
- # Via NPM
28
- npm install -g @archznn/xavva
29
-
30
- # Or run directly with Bun
31
- bunx @archznn/xavva dev
32
- ```
33
-
34
- ---
35
-
36
- ## 🚀 Quick Start
37
-
38
- ```bash
39
- # Start development mode with dashboard
40
- xavva dev --tui
41
-
42
- # Deploy to Tomcat
43
- xavva deploy
44
-
45
- # Analyze dependencies for issues
46
- xavva deps
47
-
48
- # Check for security vulnerabilities
49
- xavva audit
50
- ```
51
-
52
- ---
53
-
54
- ## 📖 Commands
55
-
56
- ### Core Development
57
-
58
- | Command | Description |
59
- |---------|-------------|
60
- | `xavva dev` | Full development mode (build + deploy + watch + debug) |
61
- | `xavva deploy` | Build and deploy application to Tomcat |
62
- | `xavva build` | Compile project only |
63
- | `xavva start` | Start Tomcat server only |
64
-
65
- ### Code Execution
66
-
67
- | Command | Description |
68
- |---------|-------------|
69
- | `xavva run <class>` | Execute a Java class with automatic classpath |
70
- | `xavva debug <class>` | Debug a Java class (port 5005) |
71
-
72
- ### Analysis & Monitoring
73
-
74
- | Command | Description |
75
- |---------|-------------|
76
- | `xavva logs` | Stream and analyze Tomcat logs in real-time |
77
- | `xavva deps` | **Analyze dependencies** — detect conflicts, find updates |
78
- | `xavva audit` | Security audit of JAR files via OSV.dev |
79
- | `xavva doctor` | Diagnose environment issues (JAVA_HOME, DCEVM) |
80
- | `xavva profiles` | List available Maven/Gradle profiles |
81
- | `xavva docs` | Generate endpoint documentation |
82
-
83
- ---
84
-
85
- ## 🔍 Dependency Analysis
86
-
87
- The `xavva deps` command provides comprehensive dependency analysis:
88
-
89
- ```bash
90
- # Basic analysis
91
- xavva deps
92
-
93
- # With verbose output for debugging
94
- xavva deps --verbose
95
-
96
- # Show fix suggestions for conflicts
97
- xavva deps --fix
98
-
99
- # Export report as JSON
100
- xavva deps --output report.json
101
-
102
- # Fail on critical conflicts (useful in CI/CD)
103
- xavva deps --strict
104
- ```
105
-
106
- ### What it detects:
107
-
108
- - ⚠️ **Version Conflicts** — Same dependency with different versions
109
- - ⬆️ **Available Updates** — Newer versions in Maven Central
110
- - 🔴 **Major Updates** — Breaking changes that need attention
111
- - 📊 **Statistics** — Direct vs transitive dependencies
112
-
113
- ### Sample output:
114
-
115
- ```
116
- ══════════════════════════════════════════════════════════
117
- 📊 DEPENDENCY ANALYSIS
118
- ══════════════════════════════════════════════════════════
119
-
120
- Statistics:
121
- Total: 183 dependencies
122
- Direct: 45 | Transitive: 138
123
-
124
- ⚠️ VERSION CONFLICTS (2)
125
- ✖ com.fasterxml.jackson.core:jackson-databind
126
- Versions: 2.13.0, 2.12.6
127
-
128
- ⬆️ UPDATES AVAILABLE (5)
129
- ↑ org.postgresql:postgresql
130
- 42.2.5 → 42.7.1
131
-
132
- ⚠️ MAJOR UPDATES (1)
133
- ! org.springframework.boot:spring-boot-starter
134
- 2.5.0 → 3.1.0
135
- ```
136
-
137
- ---
138
-
139
- ## ⚙️ Configuration
140
-
141
- Create `xavva.json` in your project root:
142
-
143
- ```json
144
- {
145
- "project": {
146
- "appName": "my-application",
147
- "buildTool": "maven",
148
- "profile": "dev",
149
- "tui": false
150
- },
151
- "tomcat": {
152
- "path": "C:/apache-tomcat",
153
- "port": 8080
154
- }
155
- }
156
- ```
157
-
158
- ### CLI Options
159
-
160
- | Option | Description |
161
- |--------|-------------|
162
- | `-p, --path <path>` | Tomcat installation path |
163
- | `-t, --tool <tool>` | Build tool: `maven` or `gradle` |
164
- | `-n, --name <name>` | Application name (WAR context) |
165
- | `--port <port>` | Tomcat port (default: 8080) |
166
- | `-P, --profile <prof>` | Maven/Gradle profile |
167
- | `-e, --encoding <enc>` | Source encoding (utf8, cp1252) |
168
- | `-w, --watch` | Enable file watching |
169
- | `--tui` | Interactive dashboard mode |
170
- | `-d, --debug` | Enable JPDA debugger |
171
- | `-c, --clean` | Clean logs before start |
172
- | `-s, --no-build` | Skip initial build |
173
- | `-V, --verbose` | Detailed output |
174
-
175
- ---
176
-
177
- ## 🏗️ Architecture
178
-
179
- Xavva uses a modular service-oriented architecture:
180
-
181
- - **DashboardService** — TUI management and interactivity
182
- - **LogAnalyzer** — Intelligent log processing
183
- - **DependencyAnalyzerService** — Dependency conflict detection
184
- - **ProjectService** — Project structure discovery
185
- - **BuildService** — Maven/Gradle integration
186
- - **TomcatService** — Server lifecycle management
187
-
188
- ---
189
-
190
- ## 🤝 Contributing
191
-
192
- Contributions are welcome! Please feel free to submit a Pull Request.
193
-
194
- ---
195
-
196
- ## 📄 License
197
-
198
- MIT License — see [LICENSE](LICENSE) for details.
199
-
200
- ---
201
-
202
- <p align="center">
203
- <sub>Built with ❤️ for Java developers who miss modern tooling</sub>
204
- </p>
1
+ # XAVVA CLI 🚀> Ultra-fast development toolkit for Java Enterprise (Tomcat) on Windows[![Version](https://img.shields.io/badge/version-2.2.1-blue.svg)](https://github.com/leorsousa05/Xavva)[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)Xavva is a high-performance CLI built with **Bun** that transforms the Java/Tomcat development experience. It brings modern development workflows (like Node.js/Vite) to the Java Enterprise ecosystem with hot-reload, smart logging, and automated deployment.---## ✨ Features- ⚡ **Hot Reload** — Incremental compilation and class injection without server restart- 📊 **Interactive Dashboard** — Real-time TUI with system metrics and shortcuts- 🧠 **Smart Log Analyzer** — Stack trace folding and root cause highlighting- 🔒 **Security Audit** — Automated vulnerability scanning via OSV.dev- 📦 **Dependency Analysis** — Detect conflicts and outdated dependencies- 🎯 **Maven & Gradle** — Native support for both build tools- 🔧 **Auto-Healing** — Automatic diagnosis and repair of common issues---## 📦 Installation```powershell# Via NPMnpm install -g @archznn/xavva# Or run directly with Bunbunx @archznn/xavva dev```---## 🚀 Quick Start```bash# Start development mode with dashboardxavva dev --tui# Deploy to Tomcatxavva deploy# Analyze dependencies for issuesxavva deps
2
+ # Update safe dependencies (non-breaking)
3
+ xavva deps --update-safe# Check for security vulnerabilitiesxavva audit```---## 📖 Commands### Core Development| Command | Description ||---------|-------------|| `xavva dev` | Full development mode (build + deploy + watch + debug) || `xavva deploy` | Build and deploy application to Tomcat || `xavva build` | Compile project only || `xavva start` | Start Tomcat server only |### Code Execution| Command | Description ||---------|-------------|| `xavva run <class>` | Execute a Java class with automatic classpath || `xavva debug <class>` | Debug a Java class (port 5005) |### Analysis & Monitoring| Command | Description ||---------|-------------|| `xavva logs` | Stream and analyze Tomcat logs in real-time || `xavva deps` | **Analyze dependencies** — detect conflicts, find updates || `xavva audit` | Security audit of JAR files via OSV.dev || `xavva doctor` | Diagnose environment issues (JAVA_HOME, DCEVM) || `xavva profiles` | List available Maven/Gradle profiles || `xavva docs` | Generate endpoint documentation |---## 🔍 Dependency AnalysisThe `xavva deps` command provides comprehensive dependency analysis:```bash# Basic analysisxavva deps# With verbose output for debuggingxavva deps --verbose# Show fix suggestions for conflictsxavva deps --fix# Export report as JSONxavva deps --output report.json# Fail on critical conflicts (useful in CI/CD)xavva deps --strict```### What it detects:- ⚠️ **Version Conflicts** — Same dependency with different versions- ⬆️ **Available Updates** — Newer versions in Maven Central- 🔴 **Major Updates** — Breaking changes that need attention- 📊 **Statistics** — Direct vs transitive dependencies### Sample output:```══════════════════════════════════════════════════════════📊 DEPENDENCY ANALYSIS══════════════════════════════════════════════════════════Statistics: Total: 183 dependencies Direct: 45 | Transitive: 138⚠️ VERSION CONFLICTS (2) ✖ com.fasterxml.jackson.core:jackson-databind Versions: 2.13.0, 2.12.6⬆️ UPDATES AVAILABLE (5) ↑ org.postgresql:postgresql 42.2.5 → 42.7.1⚠️ MAJOR UPDATES (1) ! org.springframework.boot:spring-boot-starter 2.5.0 → 3.1.0```---## ⚙️ ConfigurationCreate `xavva.json` in your project root:```json{ "project": { "appName": "my-application", "buildTool": "maven", "profile": "dev", "tui": false }, "tomcat": { "path": "C:/apache-tomcat", "port": 8080 }}```### CLI Options| Option | Description ||--------|-------------|| `-p, --path <path>` | Tomcat installation path || `-t, --tool <tool>` | Build tool: `maven` or `gradle` || `-n, --name <name>` | Application name (WAR context) || `--port <port>` | Tomcat port (default: 8080) || `-P, --profile <prof>` | Maven/Gradle profile || `-e, --encoding <enc>` | Source encoding (utf8, cp1252) || `-w, --watch` | Enable file watching || `--tui` | Interactive dashboard mode || `-d, --debug` | Enable JPDA debugger || `-c, --clean` | Clean logs before start || `-s, --no-build` | Skip initial build || `-V, --verbose` | Detailed output |---## 🏗️ ArchitectureXavva uses a modular service-oriented architecture:- **DashboardService** — TUI management and interactivity- **LogAnalyzer** — Intelligent log processing- **DependencyAnalyzerService** — Dependency conflict detection- **ProjectService** — Project structure discovery- **BuildService** — Maven/Gradle integration- **TomcatService** — Server lifecycle management---## 🤝 ContributingContributions are welcome! Please feel free to submit a Pull Request.---## 📄 LicenseMIT License — see [LICENSE](LICENSE) for details.---<p align="center"> <sub>Built with ❤️ for Java developers who miss modern tooling</sub></p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archznn/xavva",
3
- "version": "2.1.0",
3
+ "version": "2.2.1",
4
4
  "description": "Ultra-fast CLI tool for Java/Tomcat development on Windows with Hot-Reload and Zero Config.",
5
5
  "module": "src/index.ts",
6
6
  "type": "module",
@@ -20,7 +20,7 @@ export class DeployCommand implements Command {
20
20
  if (!incremental) {
21
21
  this.logConfiguration(config, isWatching);
22
22
  } else {
23
- Logger.watcher("Change detected", "change");
23
+ Logger.watch("Change detected");
24
24
  }
25
25
 
26
26
  try {
@@ -31,16 +31,16 @@ export class DeployCommand implements Command {
31
31
  await tomcat.clearWebapps();
32
32
 
33
33
  if (!config.project.skipBuild) {
34
- Logger.watcher("Building project", "start");
34
+ Logger.build("compiling...");
35
35
  await builder.runBuild(incremental);
36
36
  }
37
37
 
38
38
  if (!config.project.skipBuild) {
39
- Logger.build("Full project build and environment ready");
39
+ Logger.build("completed");
40
40
  }
41
41
  } else {
42
42
  if (!config.project.skipBuild) {
43
- Logger.watcher("Incremental compilation", "start");
43
+ Logger.build("incremental compile...");
44
44
  await builder.runBuild(incremental);
45
45
  }
46
46
  }
@@ -50,13 +50,13 @@ export class DeployCommand implements Command {
50
50
  const actualContextPath = contextPath || actualAppFolder || "";
51
51
  const actualAppUrl = `http://localhost:${config.tomcat.port}/${actualContextPath}`;
52
52
  await BrowserService.reload(actualAppUrl);
53
- Logger.watcher("Redeploy completed", "success");
53
+ Logger.success("redeploy completed");
54
54
  return;
55
55
  }
56
56
 
57
- Logger.build("Webapps cleaned");
57
+ Logger.server("cleaning webapps...");
58
58
  const artifactInfo = await builder.deployToWebapps();
59
- Logger.build("Artifacts generated");
59
+ Logger.server("artifacts ready");
60
60
 
61
61
  const finalContextPath = contextPath || artifactInfo.finalName.replace(".war", "");
62
62
  const appWebappPath = path.join(config.tomcat.path, "webapps", finalContextPath);
@@ -65,7 +65,7 @@ export class DeployCommand implements Command {
65
65
  // Se é um diretório (exploded), sincronizamos o conteúdo total para a pasta do webapps
66
66
  if (!fs.existsSync(appWebappPath)) fs.mkdirSync(appWebappPath, { recursive: true });
67
67
  await builder.syncExploded(artifactInfo.path, appWebappPath);
68
- Logger.build("Exploded directory synced to webapps");
68
+ Logger.server("synced exploded directory");
69
69
  } else {
70
70
  if (!fs.existsSync(appWebappPath)) fs.mkdirSync(appWebappPath, { recursive: true });
71
71
 
@@ -75,7 +75,7 @@ export class DeployCommand implements Command {
75
75
  if (!webappStat || artifactStat.mtimeMs > webappStat.mtimeMs) {
76
76
  try {
77
77
  Bun.spawnSync(["jar", "xf", artifactInfo.path], { cwd: appWebappPath });
78
- Logger.build("Artifacts deployed");
78
+ Logger.server("extracted WAR");
79
79
  } catch (e) {
80
80
  const extractCmd = `Expand-Archive -Path $env:ARTIFACT_PATH -DestinationPath $env:DEST_PATH -Force`;
81
81
  Bun.spawnSync(["powershell", "-command", extractCmd], {
@@ -85,10 +85,10 @@ export class DeployCommand implements Command {
85
85
  DEST_PATH: appWebappPath
86
86
  }
87
87
  });
88
- Logger.build("Artifacts deployed (legacy mode)");
88
+ Logger.server("extracted WAR (legacy)");
89
89
  }
90
90
  } else {
91
- Logger.build("Webapp already up to date, skipping extraction");
91
+ Logger.server("webapp up to date");
92
92
  }
93
93
  }
94
94
 
@@ -110,10 +110,11 @@ export class DeployCommand implements Command {
110
110
  }
111
111
 
112
112
  private logConfiguration(config: AppConfig, isWatching: boolean) {
113
- Logger.config("Runtime", config.project.buildTool.toUpperCase());
114
- if (config.project.profile) Logger.config("Profile", config.project.profile.toUpperCase());
115
- Logger.config("Watch Mode", isWatching ? "ON" : "OFF");
116
- Logger.config("Debug", config.project.debug ? `ON (Port ${config.project.debugPort})` : "OFF");
113
+ Logger.section("Configuration");
114
+ Logger.config("runtime", config.project.buildTool.toLowerCase());
115
+ if (config.project.profile) Logger.config("profile", config.project.profile);
116
+ Logger.config("watch", isWatching);
117
+ Logger.config("debug", config.project.debug ? `port ${config.project.debugPort}` : false);
117
118
 
118
119
  let javaBin = "java";
119
120
  if (process.env.JAVA_HOME) {
@@ -126,9 +127,9 @@ export class DeployCommand implements Command {
126
127
  const hasDcevm = ["dcevm", "jetbrains", "trava", "jbr"].some(v => output.includes(v));
127
128
 
128
129
  if (!hasDcevm && isWatching) {
129
- Logger.config("Hot Reload", "Standard (No structural changes)");
130
+ Logger.config("hotswap", "standard");
130
131
  } else if (hasDcevm) {
131
- Logger.config("Hot Reload", "Advanced (DCEVM Active)");
132
+ Logger.config("hotswap", "dcevm");
132
133
  }
133
134
 
134
135
  const srcPath = path.join(process.cwd(), "src");
@@ -136,9 +137,10 @@ export class DeployCommand implements Command {
136
137
  const contextPath = (config.project.appName || "").replace(".war", "");
137
138
  const endpoints = EndpointService.scan(srcPath, contextPath);
138
139
  if (endpoints.length > 0) {
139
- Logger.config("Endpoints", endpoints.length);
140
+ Logger.config("endpoints", endpoints.length);
140
141
  }
141
142
  }
143
+ Logger.endSection();
142
144
  }
143
145
 
144
146
  private injectContextConfiguration(appPath: string) {
@@ -171,9 +173,12 @@ export class DeployCommand implements Command {
171
173
  const response = await fetch(url);
172
174
  if (response.status < 500) {
173
175
  const memory = await tomcat.getMemoryUsage();
174
- Logger.health(url, "success");
175
- Logger.health(`Status ${response.status}`, "success");
176
- Logger.health(`Memory ${memory}`, "success");
176
+ Logger.divider();
177
+ Logger.ready("Server ready");
178
+ Logger.url("Local", url);
179
+ Logger.info("Status", `${response.status}`);
180
+ Logger.info("Memory", memory);
181
+ Logger.done();
177
182
 
178
183
  if (!config.project.quiet) {
179
184
  this.showEndpointMap(config.tomcat.port, context);
@@ -185,32 +190,32 @@ export class DeployCommand implements Command {
185
190
  BrowserService.open(url);
186
191
  }
187
192
  } else {
188
- Logger.health(`App returned status ${response.status}`, "warn");
193
+ Logger.warn(`App returned status ${response.status}`);
189
194
  }
190
195
  } catch (e) {
191
- Logger.health(`Could not connect to ${url}`, "error");
196
+ Logger.error(`Could not connect to ${url}`);
192
197
  }
193
198
  }
194
199
 
195
200
  private showEndpointMap(port: number, context: string) {
196
201
  const endpoints = EndpointService.scan(path.join(process.cwd(), "src"), context);
197
202
  if (endpoints.length > 0) {
198
- Logger.newline();
199
- Logger.log(`${Logger.C.cyan}◈ ENDPOINT MAP:${Logger.C.reset}`);
203
+ Logger.section("Endpoints");
200
204
 
201
205
  const apis = endpoints.filter(e => e.className !== "JSP");
202
206
  const jsps = endpoints.filter(e => e.className === "JSP");
203
207
 
204
208
  if (apis.length > 0) {
205
209
  const uniqueApiUrls = [...new Set(apis.map(e => `http://localhost:${port}${e.fullPath}`))];
206
- uniqueApiUrls.forEach(url => Logger.log(`${Logger.C.dim}➜ ${Logger.C.reset}${url}`));
210
+ uniqueApiUrls.forEach(url => Logger.info("", url));
207
211
  }
208
212
 
209
213
  if (jsps.length > 0) {
210
- Logger.log(`${Logger.C.dim}--- JSPs ---${Logger.C.reset}`);
214
+ Logger.info("JSPs", "");
211
215
  const uniqueJspUrls = [...new Set(jsps.map(e => `http://localhost:${port}${e.fullPath}`))];
212
- uniqueJspUrls.forEach(url => Logger.log(`${Logger.C.dim}📄 ${Logger.C.reset}${url}`));
216
+ uniqueJspUrls.forEach(url => Logger.info("", ` ${url}`));
213
217
  }
218
+ Logger.endSection();
214
219
  }
215
220
  }
216
221
 
@@ -50,6 +50,10 @@ export class DepsCommand implements Command {
50
50
  console.log(report);
51
51
 
52
52
  // Ações adicionais baseadas em flags
53
+ if (args?.["update-safe"] || args?.["updateSafe"]) {
54
+ await this.performUpdateSafe(analyzer, result, config.project.buildTool);
55
+ }
56
+
53
57
  if (args?.["fix"]) {
54
58
  await this.suggestFixes(result, config.project.buildTool);
55
59
  }
@@ -103,6 +107,62 @@ export class DepsCommand implements Command {
103
107
  }
104
108
  }
105
109
 
110
+ private async performUpdateSafe(
111
+ analyzer: DependencyAnalyzerService,
112
+ result: DependencyAnalysisResult,
113
+ buildTool: string
114
+ ): Promise<void> {
115
+ const safeUpdates = result.updates.filter(u => !u.isMajor);
116
+
117
+ if (safeUpdates.length === 0) {
118
+ Logger.info("", "Nenhuma atualização segura disponível");
119
+ return;
120
+ }
121
+
122
+ Logger.newline();
123
+ Logger.section("Atualizando Dependências (Safe Mode)");
124
+ Logger.info("Atualizações a aplicar", String(safeUpdates.length));
125
+
126
+ const spinner = Logger.spinner("Atualizando arquivos de configuração...");
127
+
128
+ try {
129
+ const updateResult = await analyzer.updateSafe(safeUpdates);
130
+ spinner();
131
+
132
+ if (updateResult.updated > 0) {
133
+ Logger.success(`${updateResult.updated} dependências atualizadas`);
134
+ Logger.info("", `Backup criado: ${buildTool === "maven" ? "pom.xml.backup" : "build.gradle.backup"}`);
135
+
136
+ // Listar o que foi atualizado
137
+ for (const update of safeUpdates.slice(0, 5)) {
138
+ Logger.log(` ${Logger.C.success}↑${Logger.C.reset} ${update.groupId}:${update.artifactId} ${update.currentVersion} → ${Logger.C.success}${update.latestVersion}${Logger.C.reset}`);
139
+ }
140
+ if (safeUpdates.length > 5) {
141
+ Logger.log(` ${Logger.C.dim}... e mais ${safeUpdates.length - 5}${Logger.C.reset}`);
142
+ }
143
+
144
+ Logger.newline();
145
+ Logger.log(`${Logger.C.warning}⚠️ Execute 'mvn compile' ou 'gradle build' para aplicar as mudanças${Logger.C.reset}`);
146
+ } else {
147
+ Logger.warn("Nenhuma dependência foi atualizada");
148
+ }
149
+
150
+ if (updateResult.skipped > 0) {
151
+ Logger.info("Dependências ignoradas", `${updateResult.skipped} (definidas via propriedades)`);
152
+ }
153
+
154
+ if (updateResult.errors.length > 0) {
155
+ for (const error of updateResult.errors) {
156
+ Logger.warn(error);
157
+ }
158
+ }
159
+ } catch (error) {
160
+ spinner(false);
161
+ const message = error instanceof Error ? error.message : String(error);
162
+ Logger.error(`Falha na atualização: ${message}`);
163
+ }
164
+ }
165
+
106
166
  private exportReport(
107
167
  result: DependencyAnalysisResult,
108
168
  outputPath: string
@@ -63,6 +63,9 @@ export class HelpCommand implements Command {
63
63
  ${this.c("dim", "# Analyze dependencies for conflicts")}
64
64
  xavva deps --verbose
65
65
 
66
+ ${this.c("dim", "# Update safe dependencies (non-breaking only)")}
67
+ xavva deps --update-safe
68
+
66
69
  ${this.c("dim", "# Security audit with auto-fix suggestions")}
67
70
  xavva audit --fix
68
71
 
@@ -162,6 +162,7 @@ export class BuildService {
162
162
  const decoder = new TextDecoder();
163
163
  let errorCount = 0;
164
164
  const maxErrors = 15;
165
+ const buildTool = this.projectConfig.buildTool as 'maven' | 'gradle';
165
166
 
166
167
  while (true) {
167
168
  const { done, value } = await reader.read();
@@ -174,20 +175,27 @@ export class BuildService {
174
175
  const cleanLine = line.trim();
175
176
  if (!cleanLine) continue;
176
177
 
177
- if (cleanLine.includes("[ERROR]")) {
178
+ if (cleanLine.includes("[ERROR]") || cleanLine.includes("error:")) {
178
179
  errorCount++;
179
180
  if (errorCount > maxErrors && !this.projectConfig.verbose) {
180
181
  if (errorCount === maxErrors + 1) {
181
- Logger.warn("... e mais erros ocultos. Use -V para ver todos.");
182
+ Logger.warn("... and more errors hidden. Use -V to see all.");
182
183
  }
183
184
  continue;
184
185
  }
185
186
  }
186
187
 
187
188
  if (!this.projectConfig.verbose) {
188
- // Lógica de sumarização omitida para brevidade
189
+ // Modo não-verbose: usa sumarização existente
190
+ const formatted = Logger.formatBuildLog(cleanLine, buildTool);
191
+ if (formatted) console.log(formatted);
189
192
  } else {
190
- process.stdout.write(line + "\n");
193
+ // Modo verbose: formata mas mantém estrutura
194
+ const formatted = Logger.formatBuildLog(cleanLine, buildTool);
195
+ if (formatted) {
196
+ console.log(formatted);
197
+ }
198
+ // Silencia linhas que são noise puro
191
199
  }
192
200
  }
193
201
  }