@archznn/xavva 3.1.1 → 3.1.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 +1 -1
- package/package.json +1 -1
- package/src/commands/HelpCommand.ts +56 -194
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Ultra-fast development toolkit for Java Enterprise (Tomcat) on Windows, Linux & macOS
|
|
4
4
|
|
|
5
|
-
[](https://github.com/leorsousa05/Xavva)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
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.
|
package/package.json
CHANGED
|
@@ -4,202 +4,63 @@ import pkg from "../../package.json";
|
|
|
4
4
|
|
|
5
5
|
export class HelpCommand implements Command {
|
|
6
6
|
async execute(_config: AppConfig, _args?: CLIArguments): Promise<void> {
|
|
7
|
-
const
|
|
7
|
+
const v = pkg.version;
|
|
8
|
+
const c = this.c;
|
|
8
9
|
|
|
9
10
|
console.log(`
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
${this.c("cyan", "-q, --quiet")} Minimal output
|
|
64
|
-
${this.c("cyan", "-V, --verbose")} Detailed output
|
|
65
|
-
${this.c("cyan", "--debug-level")} <lvl> Debug level: error|warn|info|verbose|trace|silly
|
|
66
|
-
${this.c("cyan", "-h, --help")} Show this help
|
|
67
|
-
${this.c("cyan", "-v, --version")} Show version
|
|
68
|
-
|
|
69
|
-
${this.c("yellow", "BUILD OPTIONS")} ${this.c("dim", "(for deploy, dev, build)")}
|
|
70
|
-
${this.c("cyan", "-W, --war")} Generate .war file instead of exploded directory
|
|
71
|
-
${this.c("cyan", "--cache")} Use build cache (skip if no changes)
|
|
72
|
-
|
|
73
|
-
${this.c("yellow", "TOMCAT OPTIONS")} ${this.c("dim", "(for embedded Tomcat)")}
|
|
74
|
-
${this.c("cyan", "--tomcat-version")} <v> Tomcat version to install (default: 10.1.52)
|
|
75
|
-
${this.c("cyan", "-y, --yes")} Auto-install without confirmation
|
|
76
|
-
|
|
77
|
-
${this.c("yellow", "DEPS OPTIONS")} ${this.c("dim", "(for xavva deps)")}
|
|
78
|
-
${this.c("cyan", "--update-safe")} Update only non-breaking dependencies
|
|
79
|
-
${this.c("cyan", "--fix")} Show fix suggestions for conflicts
|
|
80
|
-
${this.c("cyan", "--strict")} Fail on critical conflicts (for CI/CD)
|
|
81
|
-
${this.c("cyan", "-o, --output")} <file> Export report as JSON
|
|
82
|
-
|
|
83
|
-
${this.c("yellow", "ENCODING OPTIONS")} ${this.c("dim", "(for xavva encoding)")}
|
|
84
|
-
${this.c("cyan", "--from")} <encoding> Source encoding (auto-detect if not specified)
|
|
85
|
-
${this.c("cyan", "--to")} <encoding> Target encoding (default: from xavva.json or UTF-8)
|
|
86
|
-
${this.c("cyan", "--backup")} Create backup before conversion
|
|
87
|
-
${this.c("cyan", "--dry-run")} Simulate without modifying files
|
|
88
|
-
${this.c("cyan", "--src")} <path> Source directory (default: src/)
|
|
89
|
-
|
|
90
|
-
${this.c("yellow", "EXAMPLES")}
|
|
91
|
-
${this.c("dim", "# Development with hot reload and dashboard")}
|
|
92
|
-
xavva dev --tui --watch
|
|
93
|
-
|
|
94
|
-
${this.c("dim", "# Deploy to specific Tomcat installation")}
|
|
95
|
-
xavva deploy -p /opt/tomcat --port 8081
|
|
96
|
-
|
|
97
|
-
${this.c("dim", "# Build and deploy as .war file")}
|
|
98
|
-
xavva deploy --war
|
|
99
|
-
|
|
100
|
-
${this.c("dim", "# Run a class with debugging")}
|
|
101
|
-
xavva debug com.example.MyClass
|
|
102
|
-
|
|
103
|
-
${this.c("dim", "# Use embedded Tomcat (auto-install)")}
|
|
104
|
-
xavva dev --yes
|
|
105
|
-
xavva dev --tomcat-version 9.0.115
|
|
106
|
-
|
|
107
|
-
${this.c("dim", "# Analyze and update dependencies")}
|
|
108
|
-
xavva deps --verbose
|
|
109
|
-
xavva deps --update-safe
|
|
110
|
-
|
|
111
|
-
${this.c("dim", "# Security audit with auto-fix")}
|
|
112
|
-
xavva audit --fix
|
|
113
|
-
|
|
114
|
-
${this.c("dim", "# Manage embedded Tomcat")}
|
|
115
|
-
xavva tomcat list # List available versions
|
|
116
|
-
xavva tomcat installed # List installed versions
|
|
117
|
-
xavva tomcat install 9.0.115 # Install specific version
|
|
118
|
-
xavva tomcat use 9.0.115 # Switch to version for this project
|
|
119
|
-
xavva tomcat status
|
|
120
|
-
xavva tomcat uninstall 9.0.115
|
|
121
|
-
|
|
122
|
-
${this.c("dim", "# Convert file encoding")}
|
|
123
|
-
xavva encoding detect src/main/java/MinhaClasse.java
|
|
124
|
-
xavva encoding convert --from utf-8 --to cp1252 src/main/java/
|
|
125
|
-
xavva encoding convert --to cp1252 --backup src/main/java/MinhaClasse.java
|
|
126
|
-
xavva encoding fix src/main/java/MinhaClasse.java # Fix mojibake
|
|
127
|
-
xavva encoding list # List all file encodings
|
|
128
|
-
|
|
129
|
-
${this.c("dim", "# Initialize new project")}
|
|
130
|
-
xavva init # Interactive wizard
|
|
131
|
-
|
|
132
|
-
${this.c("dim", "# Manage configuration")}
|
|
133
|
-
xavva config # View current config
|
|
134
|
-
xavva config --interactive # Edit config interactively
|
|
135
|
-
|
|
136
|
-
${this.c("dim", "# Command history")}
|
|
137
|
-
xavva history # Show recent commands
|
|
138
|
-
xavva history --clear # Clear history
|
|
139
|
-
xavva redo # Repeat last command
|
|
140
|
-
|
|
141
|
-
${this.c("dim", "# Health check")}
|
|
142
|
-
xavva health # Check environment health
|
|
143
|
-
|
|
144
|
-
${this.c("dim", "# Shell completions")}
|
|
145
|
-
xavva completion bash # Generate bash completions
|
|
146
|
-
xavva completion zsh # Generate zsh completions
|
|
147
|
-
eval "$(xavva completion bash)" # Enable in current shell
|
|
148
|
-
|
|
149
|
-
${this.c("dim", "# Changelog")}
|
|
150
|
-
xavva changelog generate # Generate CHANGELOG.md
|
|
151
|
-
xavva changelog check # Validate conventional commits
|
|
152
|
-
xavva changelog preview # Preview without saving
|
|
153
|
-
|
|
154
|
-
${this.c("dim", "# Debug levels")}
|
|
155
|
-
xavva deploy --debug-level verbose # Verbose logging
|
|
156
|
-
xavva deploy --debug-level trace # Trace all operations
|
|
157
|
-
xavva deploy --debug-level silly # Everything including config
|
|
158
|
-
|
|
159
|
-
${this.c("dim", "# Multi-environment")}
|
|
160
|
-
xavva deploy --env staging # Deploy to staging environment
|
|
161
|
-
xavva dev --env dev # Use dev environment config
|
|
162
|
-
|
|
163
|
-
${this.c("dim", "# Test runner")}
|
|
164
|
-
xavva test # Run all tests
|
|
165
|
-
xavva test --watch # Watch mode
|
|
166
|
-
xavva test --coverage # Generate coverage report
|
|
167
|
-
xavva test UserServiceTest # Run specific test class
|
|
168
|
-
|
|
169
|
-
${this.c("dim", "# Database migrations")}
|
|
170
|
-
xavva db status # Show migration status
|
|
171
|
-
xavva db migrate # Run pending migrations
|
|
172
|
-
xavva db reset --force # Reset database (drops all!)
|
|
173
|
-
xavva db seed # Populate with test data
|
|
174
|
-
|
|
175
|
-
${this.c("dim", "# HTTP Client")}
|
|
176
|
-
xavva http GET /api/users # Test endpoint
|
|
177
|
-
xavva http POST /api/users --body '{"name":"John"}'
|
|
178
|
-
xavva http GET /api/users --param page=1 --param size=10
|
|
179
|
-
|
|
180
|
-
${this.c("dim", "# Docker")}
|
|
181
|
-
xavva docker init # Generate Dockerfile & compose
|
|
182
|
-
xavva docker build # Build image
|
|
183
|
-
xavva docker up # Start with docker-compose
|
|
184
|
-
xavva docker run # Run dev container
|
|
185
|
-
|
|
186
|
-
${this.c("yellow", "CONFIGURATION")}
|
|
187
|
-
Settings are loaded from ${this.c("cyan", "xavva.json")} in the project root:
|
|
188
|
-
|
|
189
|
-
${this.c("dim", `{
|
|
190
|
-
"project": {
|
|
191
|
-
"appName": "my-app",
|
|
192
|
-
"buildTool": "maven",
|
|
193
|
-
"tui": true
|
|
194
|
-
},
|
|
195
|
-
"tomcat": {
|
|
196
|
-
"path": "C:/apache-tomcat",
|
|
197
|
-
"port": 8080
|
|
198
|
-
}
|
|
199
|
-
}`)}
|
|
200
|
-
|
|
201
|
-
${this.c("gray", "────────────────────────────────────────────────────────────")}
|
|
202
|
-
${this.c("gray", "Docs: github.com/leorsousa05/Xavva | License: MIT")}
|
|
11
|
+
${c("cyan", "◆")} ${c("bold", "XAVVA")} ${c("dim", `v${v}`)} ${c("gray", "— Java/Tomcat Dev CLI")}
|
|
12
|
+
|
|
13
|
+
${c("yellow", "USAGE")}
|
|
14
|
+
xavva <command> [options]
|
|
15
|
+
|
|
16
|
+
${c("yellow", "CORE COMMANDS")}
|
|
17
|
+
${c("green", "dev")} Start dev mode (build + deploy + watch + hot reload)
|
|
18
|
+
${c("green", "deploy")} Build and deploy to Tomcat
|
|
19
|
+
${c("green", "build")} Compile project
|
|
20
|
+
${c("green", "start")} Start Tomcat server
|
|
21
|
+
${c("green", "run")} Run a Java class
|
|
22
|
+
${c("green", "logs")} Stream Tomcat logs
|
|
23
|
+
|
|
24
|
+
${c("yellow", "ANALYSIS")}
|
|
25
|
+
${c("cyan", "deps")} Analyze dependencies (conflicts, updates)
|
|
26
|
+
${c("cyan", "audit")} Security vulnerability scan
|
|
27
|
+
${c("cyan", "doctor")} Diagnose environment issues
|
|
28
|
+
${c("cyan", "health")} Check environment health
|
|
29
|
+
${c("cyan", "profiles")} List Maven/Gradle profiles
|
|
30
|
+
|
|
31
|
+
${c("yellow", "UTILITIES")}
|
|
32
|
+
${c("magenta", "init")} Initialize project (wizard)
|
|
33
|
+
${c("magenta", "config")} View/edit configuration
|
|
34
|
+
${c("magenta", "encoding")} Convert file encodings
|
|
35
|
+
${c("magenta", "tomcat")} Manage embedded Tomcat
|
|
36
|
+
${c("magenta", "history")} Command history
|
|
37
|
+
${c("magenta", "redo")} Repeat last command
|
|
38
|
+
${c("magenta", "completion")} Shell completions
|
|
39
|
+
|
|
40
|
+
${c("yellow", "NEW v3.1")}
|
|
41
|
+
${c("brightMagenta", "test")} Run JUnit/TestNG tests (--watch, --coverage)
|
|
42
|
+
${c("brightMagenta", "db")} Database migrations (Flyway/Liquibase)
|
|
43
|
+
${c("brightMagenta", "http")} HTTP client for API testing
|
|
44
|
+
${c("brightMagenta", "docker")} Docker integration
|
|
45
|
+
|
|
46
|
+
${c("yellow", "GLOBAL OPTIONS")}
|
|
47
|
+
-p, --path <path> Tomcat path --port <n> Port (8080)
|
|
48
|
+
-t, --tool <tool> maven|gradle -P, --profile <p> Build profile
|
|
49
|
+
-n, --name <name> App name -e, --encoding <enc> UTF-8|cp1252
|
|
50
|
+
-w, --watch Watch mode --tui Dashboard
|
|
51
|
+
-d, --debug JPDA debugger -c, --clean Clean build
|
|
52
|
+
-W, --war Build .war --env <name> Environment
|
|
53
|
+
-h, --help Show help -v, --version Version
|
|
54
|
+
|
|
55
|
+
${c("yellow", "EXAMPLES")}
|
|
56
|
+
xavva dev --tui --watch # Dev mode with dashboard
|
|
57
|
+
xavva deploy --war --port 8081 # Build WAR for port 8081
|
|
58
|
+
xavva test --watch # Test watch mode
|
|
59
|
+
xavva deps --update-safe # Update dependencies
|
|
60
|
+
xavva docker init && xavva docker up # Docker setup
|
|
61
|
+
|
|
62
|
+
${c("gray", "Run 'xavva <command> --help' for detailed options")}
|
|
63
|
+
${c("gray", "Docs: github.com/leorsousa05/Xavva")}
|
|
203
64
|
`);
|
|
204
65
|
}
|
|
205
66
|
|
|
@@ -214,6 +75,7 @@ export class HelpCommand implements Command {
|
|
|
214
75
|
yellow: "\x1b[33m",
|
|
215
76
|
blue: "\x1b[34m",
|
|
216
77
|
cyan: "\x1b[36m",
|
|
78
|
+
brightMagenta: "\x1b[95m",
|
|
217
79
|
};
|
|
218
80
|
return `${colors[color] || ""}${text}\x1b[0m`;
|
|
219
81
|
}
|