@archznn/xavva 2.2.1 β 2.2.2
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 +209 -2
- package/package.json +1 -1
- package/src/commands/DepsCommand.ts +2 -1
package/README.md
CHANGED
|
@@ -1,3 +1,210 @@
|
|
|
1
|
-
# XAVVA CLI
|
|
1
|
+
# XAVVA CLI π
|
|
2
|
+
|
|
3
|
+
> Ultra-fast development toolkit for Java Enterprise (Tomcat) on Windows
|
|
4
|
+
|
|
5
|
+
[](https://github.com/leorsousa05/Xavva)
|
|
6
|
+
[](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
|
+
|
|
2
48
|
# Update safe dependencies (non-breaking)
|
|
3
|
-
xavva deps --update-safe
|
|
49
|
+
xavva deps --update-safe
|
|
50
|
+
|
|
51
|
+
# Check for security vulnerabilities
|
|
52
|
+
xavva audit
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## π Commands
|
|
58
|
+
|
|
59
|
+
### Core Development
|
|
60
|
+
|
|
61
|
+
| Command | Description |
|
|
62
|
+
| -------------- | ------------------------------------------------------ |
|
|
63
|
+
| `xavva dev` | Full development mode (build + deploy + watch + debug) |
|
|
64
|
+
| `xavva deploy` | Build and deploy application to Tomcat |
|
|
65
|
+
| `xavva build` | Compile project only |
|
|
66
|
+
| `xavva start` | Start Tomcat server only |
|
|
67
|
+
|
|
68
|
+
### Code Execution
|
|
69
|
+
|
|
70
|
+
| Command | Description |
|
|
71
|
+
| --------------------- | --------------------------------------------- |
|
|
72
|
+
| `xavva run <class>` | Execute a Java class with automatic classpath |
|
|
73
|
+
| `xavva debug <class>` | Debug a Java class (port 5005) |
|
|
74
|
+
|
|
75
|
+
### Analysis & Monitoring
|
|
76
|
+
|
|
77
|
+
| Command | Description |
|
|
78
|
+
| ---------------- | --------------------------------------------------------- |
|
|
79
|
+
| `xavva logs` | Stream and analyze Tomcat logs in real-time |
|
|
80
|
+
| `xavva deps` | **Analyze dependencies** β detect conflicts, find updates |
|
|
81
|
+
| `xavva audit` | Security audit of JAR files via OSV.dev |
|
|
82
|
+
| `xavva doctor` | Diagnose environment issues (JAVA_HOME, DCEVM) |
|
|
83
|
+
| `xavva profiles` | List available Maven/Gradle profiles |
|
|
84
|
+
| `xavva docs` | Generate endpoint documentation |
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## π Dependency Analysis
|
|
89
|
+
|
|
90
|
+
The `xavva deps` command provides comprehensive dependency analysis:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Basic analysis
|
|
94
|
+
xavva deps
|
|
95
|
+
|
|
96
|
+
# With verbose output for debugging
|
|
97
|
+
xavva deps --verbose
|
|
98
|
+
|
|
99
|
+
# Update safe dependencies only (non-breaking)
|
|
100
|
+
xavva deps --update-safe
|
|
101
|
+
|
|
102
|
+
# Show fix suggestions for conflicts
|
|
103
|
+
xavva deps --fix
|
|
104
|
+
|
|
105
|
+
# Export report as JSON
|
|
106
|
+
xavva deps --output report.json
|
|
107
|
+
|
|
108
|
+
# Fail on critical conflicts (useful in CI/CD)
|
|
109
|
+
xavva deps --strict
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### What it detects:
|
|
113
|
+
|
|
114
|
+
- β οΈ **Version Conflicts** β Same dependency with different versions
|
|
115
|
+
- β¬οΈ **Available Updates** β Newer versions in Maven Central
|
|
116
|
+
- π΄ **Major Updates** β Breaking changes that need attention
|
|
117
|
+
- π **Statistics** β Direct vs transitive dependencies
|
|
118
|
+
|
|
119
|
+
### Sample output:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
123
|
+
π DEPENDENCY ANALYSIS
|
|
124
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
125
|
+
|
|
126
|
+
Statistics:
|
|
127
|
+
Total: 183 dependencies
|
|
128
|
+
Direct: 45 | Transitivas: 138
|
|
129
|
+
|
|
130
|
+
β οΈ VERSION CONFLICTS (2)
|
|
131
|
+
β com.fasterxml.jackson.core:jackson-databind
|
|
132
|
+
Versions: 2.13.0, 2.12.6
|
|
133
|
+
|
|
134
|
+
β¬οΈ UPDATES AVAILABLE (5)
|
|
135
|
+
β org.postgresql:postgresql
|
|
136
|
+
42.2.5 β 42.7.1
|
|
137
|
+
|
|
138
|
+
β οΈ MAJOR UPDATES (1)
|
|
139
|
+
! org.springframework.boot:spring-boot-starter
|
|
140
|
+
2.5.0 β 3.1.0
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## βοΈ Configuration
|
|
146
|
+
|
|
147
|
+
Create `xavva.json` in your project root:
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"project": {
|
|
152
|
+
"appName": "my-application",
|
|
153
|
+
"buildTool": "maven",
|
|
154
|
+
"profile": "dev",
|
|
155
|
+
"tui": false
|
|
156
|
+
},
|
|
157
|
+
"tomcat": {
|
|
158
|
+
"path": "C:/apache-tomcat",
|
|
159
|
+
"port": 8080
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### CLI Options
|
|
165
|
+
|
|
166
|
+
| Option | Description |
|
|
167
|
+
| ---------------------- | ------------------------------- |
|
|
168
|
+
| `-p, --path <path>` | Tomcat installation path |
|
|
169
|
+
| `-t, --tool <tool>` | Build tool: `maven` or `gradle` |
|
|
170
|
+
| `-n, --name <name>` | Application name (WAR context) |
|
|
171
|
+
| `--port <port>` | Tomcat port (default: 8080) |
|
|
172
|
+
| `-P, --profile <prof>` | Maven/Gradle profile |
|
|
173
|
+
| `-e, --encoding <enc>` | Source encoding (utf8, cp1252) |
|
|
174
|
+
| `-w, --watch` | Enable file watching |
|
|
175
|
+
| `--tui` | Interactive dashboard mode |
|
|
176
|
+
| `-d, --debug` | Enable JPDA debugger |
|
|
177
|
+
| `-c, --clean` | Clean logs before start |
|
|
178
|
+
| `-s, --no-build` | Skip initial build |
|
|
179
|
+
| `-V, --verbose` | Detailed output |
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## ποΈ Architecture
|
|
184
|
+
|
|
185
|
+
Xavva uses a modular service-oriented architecture:
|
|
186
|
+
|
|
187
|
+
- **DashboardService** β TUI management and interactivity
|
|
188
|
+
- **LogAnalyzer** β Intelligent log processing
|
|
189
|
+
- **DependencyAnalyzerService** β Dependency conflict detection
|
|
190
|
+
- **ProjectService** β Project structure discovery
|
|
191
|
+
- **BuildService** β Maven/Gradle integration
|
|
192
|
+
- **TomcatService** β Server lifecycle management
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## π€ Contributing
|
|
197
|
+
|
|
198
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## π License
|
|
203
|
+
|
|
204
|
+
MIT License β see [LICENSE](LICENSE) for details.
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
<p align="center">
|
|
209
|
+
<sub>Built with β€οΈ for Java developers who miss modern tooling</sub>
|
|
210
|
+
</p>
|
package/package.json
CHANGED
|
@@ -142,7 +142,8 @@ export class DepsCommand implements Command {
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
Logger.newline();
|
|
145
|
-
Logger.log(`${Logger.C.warning}β οΈ Execute '
|
|
145
|
+
Logger.log(`${Logger.C.warning}β οΈ Execute 'xavva build' para compilar e aplicar as mudanΓ§as${Logger.C.reset}`);
|
|
146
|
+
Logger.log(`${Logger.C.cyan}π‘ Dica:${Logger.C.reset} Execute 'xavva audit' para verificar vulnerabilidades nas novas versΓ΅es`);
|
|
146
147
|
} else {
|
|
147
148
|
Logger.warn("Nenhuma dependΓͺncia foi atualizada");
|
|
148
149
|
}
|