Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ license = "WTFPL"
publish = false

[dependencies]
borsh = "1.5.5"
borsh = "1.5.6"
clap = { version = "4.5.32", features = ["derive", "cargo"] }
lazy_static = "1.4.0"
lazy_static = "1.5.0"
serde = { version = "1.0.219", features = ["derive"] }
serde_yaml = "0.9.34"
solana-clap-utils = "2.2.3"
Expand All @@ -17,11 +17,11 @@ solana-client = "2.2.3"
solana-logger = "2.3.1"
solana-remote-wallet = { version = "2.2.3", optional = true }
solana-sdk = "2.2.1"
tokio = { version = "1.44.0", features = ["full"] }
tokio = { version = "1.44.1", features = ["full"] }
thiserror = "2.0.12"
ssh2 = "0.9.5"
tabular = "0.2.0"
prettytable-rs = "0.10"
prettytable-rs = "0.10.0"
ratatui = "0.29.0"
crossterm = "0.28.1"
chrono = "0.4.40"
Expand All @@ -38,11 +38,12 @@ webpki = "0.22.4"
[dev-dependencies]
assert_cmd = "2.0.16"
predicates = "3.1.3"
tempfile = "3.18.0"
tempfile = "3.19.1"
serial_test = "3.2.0"
mockito = "1.7.0"
criterion = "0.5.1"


[features]
default = []
remote-wallet = ["solana-remote-wallet"]
Expand Down
23 changes: 10 additions & 13 deletions src/clparse.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use {
clap::{arg, command, value_parser, Arg, ArgAction, Command},
solana_clap_utils::input_validators::{is_url_or_moniker, is_valid_signer},
};
use clap::{command, Arg, ArgAction, Command};

/// Construct the cli input model and parse command line
pub fn parse_command_line() -> clap::ArgMatches {
Expand All @@ -17,15 +14,15 @@ pub fn parse_command_line() -> clap::ArgMatches {
.help("Configuration file to use")
.global(true);
if let Some(ref config_file) = *solana_cli_config::CONFIG_FILE {
arg = arg.default_value(config_file);
arg = arg.default_value(config_file.as_str());
}
arg
})
.arg(
Arg::new("keypair")
.long("keypair")
.value_name("KEYPAIR")
.value_parser(is_valid_signer)
// No longer needs validator in clap v4
.global(true)
.help("Filepath or URL to a keypair [default: client keypair]"),
)
Expand All @@ -50,7 +47,7 @@ pub fn parse_command_line() -> clap::ArgMatches {
.long("url")
.value_name("URL")
.global(true)
.value_parser(is_url_or_moniker)
// No longer needs validator in clap v4
.help("JSON RPC URL for the cluster [default: value from configuration file]"),
)
.arg(
Expand All @@ -63,15 +60,15 @@ pub fn parse_command_line() -> clap::ArgMatches {
Arg::new("node-type")
.long("node-type")
.value_name("TYPE")
.value_parser(["validator", "rpc"])
.value_parser(clap::builder::PossibleValuesParser::new(["validator", "rpc"]))
.default_value("validator")
.help("Type of node to install (validator or RPC)"),
)
.arg(
Arg::new("network")
.long("network")
.value_name("NETWORK")
.value_parser(["mainnet", "testnet", "devnet"])
.value_parser(clap::builder::PossibleValuesParser::new(["mainnet", "testnet", "devnet"]))
.default_value("mainnet")
.help("Network to deploy on")
)
Expand Down Expand Up @@ -152,23 +149,23 @@ pub fn parse_command_line() -> clap::ArgMatches {
Arg::new("type")
.long("type")
.value_name("NODE_TYPE")
.value_parser(["validator", "rpc", "all"])
.value_parser(clap::builder::PossibleValuesParser::new(["validator", "rpc", "all"]))
.default_value("all")
.help("Filter nodes by type")
)
.arg(
Arg::new("network")
.long("network")
.value_name("NETWORK")
.value_parser(["mainnet", "testnet", "devnet", "all"])
.value_parser(clap::builder::PossibleValuesParser::new(["mainnet", "testnet", "devnet", "all"]))
.default_value("all")
.help("Filter nodes by network")
)
.arg(
Arg::new("status")
.long("status")
.value_name("STATUS")
.value_parser(["running", "stopped", "error", "unknown", "all"])
.value_parser(clap::builder::PossibleValuesParser::new(["running", "stopped", "error", "unknown", "all"]))
.default_value("all")
.help("Filter nodes by status")
)
Expand Down Expand Up @@ -381,7 +378,7 @@ pub fn parse_command_line() -> clap::ArgMatches {
Arg::new("client-type")
.long("client-type")
.value_name("TYPE")
.value_parser(["standard", "jito", "agave"])
.value_parser(clap::builder::PossibleValuesParser::new(["standard", "jito", "agave"]))
.default_value("standard")
.help("Solana client type (standard, jito, agave)")
)
Expand Down
Loading
Loading