diff --git a/Cargo.lock b/Cargo.lock index 4fa7427..0ad360f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -644,6 +644,18 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "comfy-table" +version = "7.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" +dependencies = [ + "crossterm 0.27.0", + "strum", + "strum_macros", + "unicode-width", +] + [[package]] name = "const-oid" version = "0.9.5" @@ -738,6 +750,19 @@ dependencies = [ "winapi", ] +[[package]] +name = "crossterm" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" +dependencies = [ + "bitflags 2.4.1", + "crossterm_winapi", + "libc", + "parking_lot", + "winapi", +] + [[package]] name = "crossterm_winapi" version = "0.9.1" @@ -2039,7 +2064,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c2a1e77b5cd714b04247ad912b7c8fe9a1fe1d58425048249def91bcf690e4c" dependencies = [ - "crossterm", + "crossterm 0.25.0", "qrcode", ] @@ -2317,6 +2342,12 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + [[package]] name = "ryu" version = "1.0.15" @@ -2611,6 +2642,25 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" + +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.38", +] + [[package]] name = "subtle" version = "2.5.0" @@ -2671,9 +2721,10 @@ dependencies = [ [[package]] name = "tfcli" -version = "0.2.0" +version = "0.2.1" dependencies = [ "clap", + "comfy-table", "dirs", "ipnet", "qr2term", @@ -3038,6 +3089,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-width" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" + [[package]] name = "unsafe-libyaml" version = "0.2.9" diff --git a/tfcli/Cargo.toml b/tfcli/Cargo.toml index 8fcf1ce..e968add 100644 --- a/tfcli/Cargo.toml +++ b/tfcli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tfcli" -version = "0.2.1" +version = "0.3.0" edition = "2021" description = "Command-line client for managing trifid-api" license = "GPL-3.0-or-later" diff --git a/tfcli/src/main.rs b/tfcli/src/main.rs index af2e9c7..64009e5 100644 --- a/tfcli/src/main.rs +++ b/tfcli/src/main.rs @@ -10,12 +10,6 @@ use crate::host::host_main; use crate::network::network_main; use crate::org::org_main; use crate::role::role_main; -use clap::{Parser, Subcommand}; -use ipnet::Ipv4Net; -use std::error::Error; -use std::fs; -use std::net::{Ipv4Addr, SocketAddrV4}; -use url::Url; pub mod account; pub mod api; diff --git a/tfcli/src/network.rs b/tfcli/src/network.rs index 831e2d3..b1d8d7a 100644 --- a/tfcli/src/network.rs +++ b/tfcli/src/network.rs @@ -1,6 +1,3 @@ -use crate::api::APIErrorResponse; -use crate::NetworkCommands; -use serde::Deserialize; use std::error::Error; use std::fs; use comfy_table::modifiers::UTF8_ROUND_CORNERS; diff --git a/tfcli/src/role.rs b/tfcli/src/role.rs index 15d26ec..214ed70 100644 --- a/tfcli/src/role.rs +++ b/tfcli/src/role.rs @@ -1,6 +1,3 @@ -use crate::api::APIErrorResponse; -use crate::RoleCommands; -use serde::{Deserialize, Serialize}; use std::error::Error; use std::fs; use comfy_table::modifiers::UTF8_ROUND_CORNERS;