diff --git a/Cargo.lock b/Cargo.lock index f7b7320d..77353b16 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -406,6 +406,23 @@ dependencies = [ "serde", ] +[[package]] +name = "cargo-ngyn" +version = "0.0.1" +dependencies = [ + "anyhow", + "clap", + "console", + "exitcode", + "serde", + "serde_derive", + "serde_json", + "serde_yaml", + "tracing", + "tracing-subscriber", + "tracing-tree", +] + [[package]] name = "cc" version = "1.0.104" @@ -1491,23 +1508,6 @@ dependencies = [ "ngyn_shared 0.4.4", ] -[[package]] -name = "ngyn-cli" -version = "0.0.1" -dependencies = [ - "anyhow", - "clap", - "console", - "exitcode", - "serde", - "serde_derive", - "serde_json", - "serde_yaml", - "tracing", - "tracing-subscriber", - "tracing-tree", -] - [[package]] name = "ngyn-hyper" version = "0.1.0" diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index bbd00ef7..c4861876 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "ngyn-cli" +name = "cargo-ngyn" version = "0.0.1" edition = "2021" description = "Modular backend framework for web applications" diff --git a/crates/cli/src/bin/cmd/default.rs b/crates/cli/src/bin/cmd/default.rs index f9fef021..cfa8652e 100644 --- a/crates/cli/src/bin/cmd/default.rs +++ b/crates/cli/src/bin/cmd/default.rs @@ -36,11 +36,11 @@ pub fn command() -> Command<'static> { ) } -pub fn run(matches: &ArgMatches) -> Result { +pub fn run(matches: &ArgMatches) -> Result { info!("default cmd {:?}", matches.get_one::("reporter")); - println!("going to run {}", ngyn_cli::CMD); - ngyn_cli::run(); - Ok(ngyn_cli::CmdExit { + println!("going to run {}", cargo_ngyn::CMD); + cargo_ngyn::run(); + Ok(cargo_ngyn::CmdExit { code: exitcode::OK, message: None, }) diff --git a/crates/cli/src/bin/cmd/mod.rs b/crates/cli/src/bin/cmd/mod.rs index aa76f04a..580f4c2b 100644 --- a/crates/cli/src/bin/cmd/mod.rs +++ b/crates/cli/src/bin/cmd/mod.rs @@ -3,9 +3,9 @@ pub mod validate; use std::process::exit; use anyhow::Result; +use cargo_ngyn::CmdExit; use clap::ArgMatches; use console::{style, Style}; -use ngyn_cli::CmdExit; use tracing::debug; use tracing::metadata::LevelFilter; use tracing_subscriber::prelude::__tracing_subscriber_SubscriberExt; diff --git a/crates/cli/src/bin/cmd/validate.rs b/crates/cli/src/bin/cmd/validate.rs index 80e202d9..7b4cfa53 100644 --- a/crates/cli/src/bin/cmd/validate.rs +++ b/crates/cli/src/bin/cmd/validate.rs @@ -18,8 +18,8 @@ pub fn command() -> Command<'static> { ) } -pub fn run(_matches: &ArgMatches, _subcommand_matches: &ArgMatches) -> Result { - Ok(ngyn_cli::CmdExit { +pub fn run(_matches: &ArgMatches, _subcommand_matches: &ArgMatches) -> Result { + Ok(cargo_ngyn::CmdExit { code: exitcode::OK, message: None, })