refactor(commands): separate commands and its core into two folders (#32)

- I think it would be better if one for commands only, one for the spec
handling core logic so people won't be confused by the core logic inside
the commands folder (cleaner I guess)
- Regen docs
This commit is contained in:
VERSE
2026-07-05 11:27:30 +07:00
committed by GitHub
parent 6b98455957
commit ebde9ba68f
536 changed files with 2241 additions and 2241 deletions
+3 -3
View File
@@ -1,14 +1,14 @@
package jvm
import (
"github.com/versenilvis/iris/commands/core"
"github.com/versenilvis/iris/spec"
)
func init() {
core.Register(&core.Spec{
spec.Register(&spec.Spec{
Name: "clojure",
Description: "An alias to refer to its function or a qualified function",
Options: []core.Option{
Options: []spec.Option{
{Name: "-A", Description: "Use concatenated aliases to modify classpath"},
{Name: "-X", Description: "Invoke tool by name or via aliases ala -X"},
{Name: "-M", Description: "Use concatenated aliases to modify classpath or supply main opts"},
+4 -4
View File
@@ -1,14 +1,14 @@
package jvm
import (
"github.com/versenilvis/iris/commands/core"
"github.com/versenilvis/iris/spec"
)
func init() {
core.Register(&core.Spec{
spec.Register(&spec.Spec{
Name: "dart",
Description: "The Dart file containing the main function",
Subcommands: []core.Subcommand{
Subcommands: []spec.Subcommand{
{Name: "analyze", Description: "Analyze Dart code in a directory"},
{Name: "directory", Description: "Dart project directory to analyze"},
{Name: "compile", Description: "Compile Dart to various formats"},
@@ -60,7 +60,7 @@ func init() {
{Name: "non-nullable", Description: "Non-nullable by default. (no-op - on by default)"},
{Name: "triple-shift", Description: "Triple-shift operator"},
},
Options: []core.Option{
Options: []spec.Option{
{Name: "--offline", Description: "Use cached packages instead of accessing the network"},
{Name: "--no-offline", Description: "Do not use cached packages instead of accessing the network"},
{Name: "-n", Description: "Report what dependencies would change but don't change any"},
+4 -4
View File
@@ -1,14 +1,14 @@
package jvm
import (
"github.com/versenilvis/iris/commands/core"
"github.com/versenilvis/iris/spec"
)
func init() {
core.Register(&core.Spec{
spec.Register(&spec.Spec{
Name: "flutter",
Description: "Available emulators",
Subcommands: []core.Subcommand{
Subcommands: []spec.Subcommand{
{Name: "analyze", Description: "Analyze the project's Dart code"},
{Name: "assemble", Description: "Assemble and build Flutter resources"},
{Name: "attach", Description: "Attach to a running app"},
@@ -55,7 +55,7 @@ func init() {
{Name: "file path", Description: "A file path for a symbolized stack trace to be written to"},
{Name: "test", Description: "Run Flutter unit tests for the current project"},
},
Options: []core.Option{
Options: []spec.Option{
{Name: "-h", Description: "Print this usage information"},
{Name: "-v", Description: "Target device id or name (prefixes allowed)"},
{Name: "--version", Description: "Reports the version of this tool"},
+4 -4
View File
@@ -1,14 +1,14 @@
package jvm
import (
"github.com/versenilvis/iris/commands/core"
"github.com/versenilvis/iris/spec"
)
func init() {
core.Register(&core.Spec{
spec.Register(&spec.Spec{
Name: "fvm",
Description: "Print this usage information",
Subcommands: []core.Subcommand{
Subcommands: []spec.Subcommand{
{Name: "config", Description: "Set configuration for FVM"},
{Name: "path", Description: "Path to the Flutter versions cache"},
{Name: "dart", Description: "Proxies Dart commands"},
@@ -28,7 +28,7 @@ func init() {
{Name: "spawn", Description: "Spawn a Flutter SDK version command"},
{Name: "use", Description: "Sets a Flutter SDK version to be used in a project"},
},
Options: []core.Option{
Options: []spec.Option{
{Name: "-h", Description: "Print this usage information"},
{Name: "--verbose", Description: "Print verbose output"},
{Name: "--version", Description: "Current FVM version"},
+4 -4
View File
@@ -1,14 +1,14 @@
package jvm
import (
"github.com/versenilvis/iris/commands/core"
"github.com/versenilvis/iris/spec"
)
func init() {
core.Register(&core.Spec{
spec.Register(&spec.Spec{
Name: "gradle",
Description: "Log all warnings",
Subcommands: []core.Subcommand{
Subcommands: []spec.Subcommand{
{Name: "build", Description: "Compute all outputs"},
{Name: "run", Description: "Run applications"},
{Name: "check", Description: "Run all checks"},
@@ -21,7 +21,7 @@ func init() {
{Name: "init", Description: "Create new Gradle builds, with new or existing projects"},
{Name: "test", Description: "Run a test task"},
},
Options: []core.Option{
Options: []spec.Option{
{Name: "-?", Description: "Shows a help message with all available CLI options"},
{Name: "-v", Description: "Prints Gradle, Groovy, Ant, JVM, and operating system version information"},
{Name: "-S", Description: "Print out the full (very verbose) stacktrace for any exceptions"},
+4 -4
View File
@@ -1,14 +1,14 @@
package jvm
import (
"github.com/versenilvis/iris/commands/core"
"github.com/versenilvis/iris/spec"
)
func init() {
core.Register(&core.Spec{
spec.Register(&spec.Spec{
Name: "jenv",
Description: "Executable file",
Subcommands: []core.Subcommand{
Subcommands: []spec.Subcommand{
{Name: "commands", Description: "List all available JEnv commands"},
{Name: "help", Description: "Parses and displays help contents from a command's source file"},
{Name: "info", Description: "Show information about which command will be executed"},
@@ -39,7 +39,7 @@ func init() {
{Name: "versions", Description: "Lists all Java versions found in `$JENV_ROOT/versions/*'"},
{Name: "whence", Description: "List all Java versions that contain the given executable"},
},
Options: []core.Option{
Options: []spec.Option{
{Name: "--usage", Description: "Show information about which command will be executed"},
{Name: "--unset", Description: "Remove local jEnv settings"},
{Name: "--short", Description: "Show only files without path"},
+3 -3
View File
@@ -1,14 +1,14 @@
package jvm
import (
"github.com/versenilvis/iris/commands/core"
"github.com/versenilvis/iris/spec"
)
func init() {
core.Register(&core.Spec{
spec.Register(&spec.Spec{
Name: "jmeter",
Description: "Apache JMeter - 100% Java Load Testing Tool",
Options: []core.Option{
Options: []spec.Option{
{Name: "-v", Description: "Print the JMeter version information and exit"},
{Name: "-h", Description: "Print usage information and exit"},
{Name: "-p", Description: "The jmeter property file to use"},
+10 -10
View File
@@ -1,15 +1,15 @@
package jvm
import (
"github.com/versenilvis/iris/commands/core"
"github.com/versenilvis/iris/spec"
)
func init() {
core.Register(&core.Spec{
spec.Register(&spec.Spec{
Name: "javac",
Description: "Java compiler",
Generator: core.FileGenerator(".java"),
Options: []core.Option{
Generator: spec.FileGenerator(".java"),
Options: []spec.Option{
{Name: "-d", Description: "output directory"},
{Name: "-cp", Description: "class path"},
{Name: "-classpath", Description: "class path (long form)"},
@@ -24,11 +24,11 @@ func init() {
},
})
core.Register(&core.Spec{
spec.Register(&spec.Spec{
Name: "java",
Description: "Java runtime",
Generator: core.FileGenerator(".jar", ".class"),
Options: []core.Option{
Generator: spec.FileGenerator(".jar", ".class"),
Options: []spec.Option{
{Name: "-jar", Description: "run jar file"},
{Name: "-cp", Description: "class path"},
{Name: "-Xmx", Description: "max heap size (e.g. -Xmx512m)"},
@@ -41,11 +41,11 @@ func init() {
},
})
core.Register(&core.Spec{
spec.Register(&spec.Spec{
Name: "kotlinc",
Description: "Kotlin compiler",
Generator: core.FileGenerator(".kt", ".kts"),
Options: []core.Option{
Generator: spec.FileGenerator(".kt", ".kts"),
Options: []spec.Option{
{Name: "-d", Description: "output dir or jar"},
{Name: "-cp", Description: "class path"},
{Name: "-include-runtime", Description: "include runtime in jar"},
+3 -3
View File
@@ -1,14 +1,14 @@
package jvm
import (
"github.com/versenilvis/iris/commands/core"
"github.com/versenilvis/iris/spec"
)
func init() {
core.Register(&core.Spec{
spec.Register(&spec.Spec{
Name: "kdoctor",
Description: "Report a version of KDoctor",
Options: []core.Option{
Options: []spec.Option{
{Name: "--version", Description: "Report a version of KDoctor"},
{Name: "--verbose", Description: "Report an extended information"},
{Name: "--all", Description: "Run extra diagnostics"},
+3 -3
View File
@@ -1,14 +1,14 @@
package jvm
import (
"github.com/versenilvis/iris/commands/core"
"github.com/versenilvis/iris/spec"
)
func init() {
core.Register(&core.Spec{
spec.Register(&spec.Spec{
Name: "keytool",
Description: "Show help message",
Options: []core.Option{
Options: []spec.Option{
{Name: "-h", Description: "Show help message"},
{Name: "-v", Description: "Verbose output"},
{Name: "-alias", Description: "Alias name of the entry to process"},
+3 -3
View File
@@ -1,14 +1,14 @@
package jvm
import (
"github.com/versenilvis/iris/commands/core"
"github.com/versenilvis/iris/spec"
)
func init() {
core.Register(&core.Spec{
spec.Register(&spec.Spec{
Name: "mvn",
Description: "Maven - a Java based project management and comprehension tool",
Options: []core.Option{
Options: []spec.Option{
{Name: "--also-make", Description: "Also build projects required by project list"},
{Name: "--also-make-dependents", Description: "Also build projects that depend on projects in the project list"},
{Name: "--batch-mode", Description: "Run in non-interactive (batch)"},
+4 -4
View File
@@ -1,14 +1,14 @@
package jvm
import (
"github.com/versenilvis/iris/commands/core"
"github.com/versenilvis/iris/spec"
)
func init() {
core.Register(&core.Spec{
spec.Register(&spec.Spec{
Name: "spring",
Description: "Initialize a new project using Spring Initializr",
Subcommands: []core.Subcommand{
Subcommands: []spec.Subcommand{
{Name: "init", Description: "Initialize a new project using Spring Initializr"},
{Name: "gradle-build", Description: "Generate a Gradle build file"},
{Name: "gradle-project", Description: "Generate a Gradle based project archive using the Groovy DSL"},
@@ -19,7 +19,7 @@ func init() {
{Name: "shell", Description: "Start a nested shell"},
{Name: "help", Description: "Show help for other commands"},
},
Options: []core.Option{
Options: []spec.Option{
{Name: "-a", Description: "Project coordinates"},
{Name: "-b", Description: "Spring Boot version"},
{Name: "--build", Description: "Build system to use"},