From aca8b408755f9041da9ee083c625de2a8d8c6785 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Thu, 22 Jan 2026 08:32:29 +0800 Subject: Refactor CLI command processing with new architecture --- templates/_registry.rs.template | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 templates/_registry.rs.template (limited to 'templates') diff --git a/templates/_registry.rs.template b/templates/_registry.rs.template new file mode 100644 index 0000000..0c6d0d5 --- /dev/null +++ b/templates/_registry.rs.template @@ -0,0 +1,25 @@ +// Auto generated by build.rs +use crate::subcmd::cmd::{JVCommand, JVCommandContext}; +use crate::subcmd::errors::CmdProcessError; +<> +/// Input parameters, execute a command node +pub async fn jv_cmd_process_node( + node: &str, + args: Vec, + ctx: JVCommandContext +) -> Result { + match node { +// PROCESS +// -- TEMPLATE START -- + // Command `<>` + "<>" => return crate::<>::process(args, ctx).await, +// -- TEMPLATE END -- + _ => {} + } + return Err(CmdProcessError::NoNodeFound(node.to_string())); +} +<> +/// Get all command nodes +pub fn jv_cmd_nodes() -> Vec { + vec!<> +} -- cgit