diff options
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | Registry.toml | 2 | ||||
| -rw-r--r-- | build.rs | 2 | ||||
| -rw-r--r-- | src/bin/jvn.rs | 4 | ||||
| -rw-r--r-- | src/cmd.rs (renamed from src/subcmd.rs) | 2 | ||||
| -rw-r--r-- | src/cmd/cmd_system.rs (renamed from src/subcmd/cmd.rs) | 4 | ||||
| -rw-r--r-- | src/cmd/cmds.rs (renamed from src/subcmd/cmds.rs) | 0 | ||||
| -rw-r--r-- | src/cmd/cmds/status.rs (renamed from src/subcmd/cmds/status.rs) | 10 | ||||
| -rw-r--r-- | src/cmd/cmds/template.rs (renamed from src/subcmd/cmds/template.rs) | 0 | ||||
| -rw-r--r-- | src/cmd/errors.rs (renamed from src/subcmd/errors.rs) | 0 | ||||
| -rw-r--r-- | src/cmd/processer.rs (renamed from src/subcmd/processer.rs) | 8 | ||||
| -rw-r--r-- | src/cmd/renderer.rs (renamed from src/subcmd/renderer.rs) | 2 | ||||
| -rw-r--r-- | src/lib.rs | 2 | ||||
| -rw-r--r-- | templates/_registry.rs.template | 6 |
14 files changed, 22 insertions, 22 deletions
@@ -23,4 +23,4 @@ # Generated from templates /src/data/compile_info.rs /setup/windows/setup_jv_cli.iss -/src/subcmd/cmds/_registry.rs +/src/cmd/cmds/_registry.rs diff --git a/Registry.toml b/Registry.toml index be1fab9..48c1d3d 100644 --- a/Registry.toml +++ b/Registry.toml @@ -1,3 +1,3 @@ [status] node = "status" -type = "subcmd::cmds::status::JVStatusCommand" +type = "cmd::cmds::status::JVStatusCommand" @@ -8,7 +8,7 @@ const COMPILE_INFO_RS_TEMPLATE: &str = "./templates/compile_info.rs"; const SETUP_JV_CLI_ISS: &str = "./setup/windows/setup_jv_cli.iss"; const SETUP_JV_CLI_ISS_TEMPLATE: &str = "./templates/setup_jv_cli.iss"; -const REGISTRY_RS: &str = "./src/subcmd/cmds/_registry.rs"; +const REGISTRY_RS: &str = "./src/cmd/cmds/_registry.rs"; const REGISTRY_RS_TEMPLATE: &str = "./templates/_registry.rs.template"; const REGISTRY_TOML: &str = "./Registry.toml"; diff --git a/src/bin/jvn.rs b/src/bin/jvn.rs index 86e3421..79a034b 100644 --- a/src/bin/jvn.rs +++ b/src/bin/jvn.rs @@ -1,7 +1,7 @@ -use just_enough_vcs_cli::subcmd::cmd::JVCommandContext; +use just_enough_vcs_cli::cmd::cmd_system::JVCommandContext; use just_enough_vcs_cli::utils::display::md; use just_enough_vcs_cli::{ - subcmd::{errors::CmdProcessError, processer::jv_cmd_process}, + cmd::{errors::CmdProcessError, processer::jv_cmd_process}, utils::env::current_locales, }; use rust_i18n::{set_locale, t}; diff --git a/src/subcmd.rs b/src/cmd.rs index 8c2f733..5bab2c1 100644 --- a/src/subcmd.rs +++ b/src/cmd.rs @@ -1,4 +1,4 @@ -pub mod cmd; +pub mod cmd_system; pub mod cmds; pub mod errors; pub mod processer; diff --git a/src/subcmd/cmd.rs b/src/cmd/cmd_system.rs index 10ad893..3edd5cc 100644 --- a/src/subcmd/cmd.rs +++ b/src/cmd/cmd_system.rs @@ -1,11 +1,11 @@ use serde::Serialize; use crate::{ - r_println, - subcmd::{ + cmd::{ errors::{CmdExecuteError, CmdPrepareError, CmdProcessError}, renderer::{JVRenderResult, JVResultRenderer}, }, + r_println, }; use std::future::Future; diff --git a/src/subcmd/cmds.rs b/src/cmd/cmds.rs index e06480c..e06480c 100644 --- a/src/subcmd/cmds.rs +++ b/src/cmd/cmds.rs diff --git a/src/subcmd/cmds/status.rs b/src/cmd/cmds/status.rs index 2b92df6..bbc78e8 100644 --- a/src/subcmd/cmds/status.rs +++ b/src/cmd/cmds/status.rs @@ -1,8 +1,8 @@ use clap::Parser; use serde::Serialize; -use crate::subcmd::{ - cmd::{JVCommand, JVCommandContext}, +use crate::cmd::{ + cmd_system::{JVCommand, JVCommandContext}, errors::{CmdExecuteError, CmdPrepareError, CmdRenderError}, renderer::{JVRenderResult, JVResultRenderer}, }; @@ -21,10 +21,10 @@ impl JVCommand<JVStatusArgument, JVStatusInput, JVStatusOutput, JVStatusRenderer for JVStatusCommand { async fn prepare( - args: JVStatusArgument, - ctx: JVCommandContext, + _args: JVStatusArgument, + _ctx: JVCommandContext, ) -> Result<JVStatusInput, CmdPrepareError> { - todo!() + Ok(JVStatusInput) } async fn exec(args: JVStatusInput) -> Result<JVStatusOutput, CmdExecuteError> { diff --git a/src/subcmd/cmds/template.rs b/src/cmd/cmds/template.rs index 8874121..8874121 100644 --- a/src/subcmd/cmds/template.rs +++ b/src/cmd/cmds/template.rs diff --git a/src/subcmd/errors.rs b/src/cmd/errors.rs index e1cf835..e1cf835 100644 --- a/src/subcmd/errors.rs +++ b/src/cmd/errors.rs diff --git a/src/subcmd/processer.rs b/src/cmd/processer.rs index 5849c62..bc84b7d 100644 --- a/src/subcmd/processer.rs +++ b/src/cmd/processer.rs @@ -1,7 +1,7 @@ -use crate::subcmd::cmd::JVCommandContext; -use crate::subcmd::cmds::_registry::{jv_cmd_nodes, jv_cmd_process_node}; -use crate::subcmd::errors::CmdProcessError; -use crate::subcmd::renderer::JVRenderResult; +use crate::cmd::cmd_system::JVCommandContext; +use crate::cmd::cmds::_registry::{jv_cmd_nodes, jv_cmd_process_node}; +use crate::cmd::errors::CmdProcessError; +use crate::cmd::renderer::JVRenderResult; pub async fn jv_cmd_process( args: Vec<String>, diff --git a/src/subcmd/renderer.rs b/src/cmd/renderer.rs index 99a67f1..eefa0f6 100644 --- a/src/subcmd/renderer.rs +++ b/src/cmd/renderer.rs @@ -2,7 +2,7 @@ use std::fmt::{Display, Formatter}; use serde::Serialize; -use crate::subcmd::errors::CmdRenderError; +use crate::cmd::errors::CmdRenderError; pub trait JVResultRenderer<Data> where @@ -8,4 +8,4 @@ pub mod data; pub mod output; /// Command -pub mod subcmd; +pub mod cmd; diff --git a/templates/_registry.rs.template b/templates/_registry.rs.template index 0c6d0d5..fd6f779 100644 --- a/templates/_registry.rs.template +++ b/templates/_registry.rs.template @@ -1,13 +1,13 @@ // Auto generated by build.rs -use crate::subcmd::cmd::{JVCommand, JVCommandContext}; -use crate::subcmd::errors::CmdProcessError; +use crate::cmd::cmd_system::{JVCommand, JVCommandContext}; +use crate::cmd::errors::CmdProcessError; <<LINE>> /// Input parameters, execute a command node pub async fn jv_cmd_process_node( node: &str, args: Vec<String>, ctx: JVCommandContext -) -> Result<crate::subcmd::renderer::JVRenderResult, crate::subcmd::errors::CmdProcessError> { +) -> Result<crate::cmd::renderer::JVRenderResult, crate::cmd::errors::CmdProcessError> { match node { // PROCESS // -- TEMPLATE START -- |
