Move build/dev/generate/publish under plugin command

This commit is contained in:
Gregory Schier
2026-02-22 08:39:38 -08:00
parent 51959bf3f3
commit 5acd8f661f
3 changed files with 34 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
use crate::cli::{GenerateArgs, PluginPathArg};
use crate::cli::{GenerateArgs, PluginArgs, PluginCommands, PluginPathArg};
use crate::ui;
use keyring::Entry;
use rand::Rng;
@@ -57,6 +57,15 @@ pub async fn run_build(args: PluginPathArg) -> i32 {
}
}
pub async fn run(args: PluginArgs) -> i32 {
match args.command {
PluginCommands::Build(args) => run_build(args).await,
PluginCommands::Dev(args) => run_dev(args).await,
PluginCommands::Generate(args) => run_generate(args).await,
PluginCommands::Publish(args) => run_publish(args).await,
}
}
pub async fn run_dev(args: PluginPathArg) -> i32 {
match dev(args).await {
Ok(()) => 0,