Skip to content
Merged
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
1,107 changes: 762 additions & 345 deletions Cargo.lock

Large diffs are not rendered by default.

33 changes: 18 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,36 @@ license = "BSD-3-Clause"
anyhow = "1.0"
async-stream = "0.3.6"
async-trait = "0.1.89"
chrono = { version = "0.4.43", features = [
chrono = { version = "0.4.44", features = [
"std",
"clock",
"serde",
], default-features = false } # for timestamps
console = "0.16.2" # colour stderr logging
console = "0.16.3" # colour stderr logging
futures = { version = "0.3.32", features = ["executor"] }
googletest = "0.14.2"
hyper = "1.8.1"
hyper = "1.9.0"
jsonwebtoken = { version = "10.3", features = ["aws_lc_rs"] }
log = { version = "0.4.29", features = ["std", "serde"] }
parking_lot = "0.12.5"
rand = "0.9.2"
reqwest = { version = "0.12.24", default-features = false, features = ["json"] }
rand = "0.10.1"
reqwest = { version = "0.13.2", default-features = false, features = [
"json",
"form",
"query",
] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_with = "3.16"
tokio = "1.48"
toml = "0.9.10"
serde_with = "3.18"
tokio = "1.52"
toml = "1.1.2"
url = { version = "2.5", features = ["serde"] }

# dev & test dependencies
http = "1.4"
mockall = "0.14.0"
test-case = "3.3"
uuid = { version = "1.19", features = ["v4"] }
uuid = { version = "1.23", features = ["v4"] }
wiremock = "0.6.5"

[workspace.lints.clippy]
Expand Down Expand Up @@ -64,9 +68,9 @@ anyhow.workspace = true
async-stream.workspace = true
async-trait.workspace = true
chrono.workspace = true
clap = { version = "4.5", features = ["wrap_help", "string"] }
clap_complete = "4.5"
clap_complete_nushell = "4.5"
clap = { version = "4.6", features = ["wrap_help", "string"] }
clap_complete = "4.6"
clap_complete_nushell = "4.6"
colored_json = "5.0.0"
console.workspace = true
dialoguer = { version = "0.12.0", features = ["fuzzy-select"] }
Expand Down Expand Up @@ -112,11 +116,10 @@ uuid.workspace = true
wiremock.workspace = true

[features]
default = ["rustls-native-certs"]
default = ["rustls"]
all_logs = ["lib/all_logs"]
ci = ["test_helpers/ci"]
rustls-native-certs = ["reqwest/rustls-tls-native-roots"]
rustls = ["reqwest/rustls-tls"]
rustls = ["reqwest/rustls"]

[lints]
workspace = true
12 changes: 11 additions & 1 deletion about.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
accepted = ["MIT", "Apache-2.0", "ISC", "BSD-2-Clause", "Unicode-3.0"]
accepted = [
"MIT",
"Apache-2.0",
"ISC",
"BSD-2-Clause",
"Unicode-3.0",
"BSD-3-Clause",
]
workarounds = ["ring", "chrono", "rustls"]

[async-trait.clarify]
Expand Down Expand Up @@ -122,3 +129,6 @@ checksum = "845022e0c1db1abb41a6ba4cd3c4b674ec290f3359d9d3c78ae558d4c0ed9308"

[rustls-webpki]
accepted = ["BSD-3-Clause", "ISC", "NOASSERTION"]

[webpki-root-certs]
accepted = ["CDLA-Permissive-2.0"]
8 changes: 7 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ allow-wildcard-paths = true
highlight = "all"
# Certain crates/versions that will be skipped when doing duplicate detection.
skip = [
{ name = "untrusted", version = "0.7.1" }, # old version used by aws-lc-rs, used by jsonwebtoken
{ name = "cpufeatures", version = "0.2.17" }, # older line is still required by crypto deps outside rand 0.10
{ name = "getrandom", version = "0.3.4" }, # old line still required by jobserver/cc and rand 0.9
{ name = "r-efi", version = "5.3.0" }, # pulled in by getrandom 0.3 on wasi targets
{ name = "thiserror", version = "1.0.69" }, # rustls-platform-verifier still brings in thiserror 1.x via jni
{ name = "thiserror-impl", version = "1.0.69" }, # proc-macro pair for the retained thiserror 1.x line
{ name = "untrusted", version = "0.7.1" }, # old version used by aws-lc-rs, used by jsonwebtoken
{ name = "wit-bindgen", version = "0.51.0" }, # duplicated via mixed wasi support crates in transitive deps
]
# Crate dependency trees that will be skipped when doing duplicate detection.
skip-tree = [
Expand Down
2 changes: 1 addition & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ rand.workspace = true
reqwest.workspace = true
serde.workspace = true
serde_json.workspace = true
strum = { version = "0.27.2", features = ["derive"] }
strum = { version = "0.28.0", features = ["derive"] }
thiserror = "2.0"
tokio = { workspace = true, features = ["fs"] }
zeroize = { version = "1.8", features = ["zeroize_derive"] }
Expand Down
4 changes: 2 additions & 2 deletions lib/src/mcu/auth/oauth2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use async_trait::async_trait;
use chrono::{DateTime, Utc};
use jsonwebtoken::Header;
use log::debug;
use rand::{Rng, TryRngCore};
use rand::{rngs::SysRng, RngExt};
use serde::ser::SerializeStruct;
use tokio::sync::Mutex;

Expand Down Expand Up @@ -89,7 +89,7 @@ impl<'callback> OAuth2<'callback> {
}

fn generate_token_id() -> String {
let mut rng = rand::rngs::OsRng.unwrap_err(); // Panic on OS-level RNG failure
let mut rng = rand::rand_core::UnwrapErr(SysRng); // Panic on OS-level RNG failure
let bytes: [u8; 18] = rng.random();
hex::encode(bytes)
}
Expand Down
7 changes: 1 addition & 6 deletions lib/src/mcu/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,7 @@ impl<'de> Visitor<'de> for FilteringItemVisitor {
#[must_use]
pub fn cache_exists(cache_dir: &Path) -> bool {
debug!("Checking for schema cache in {cache_dir:?}");
if cache_dir.exists()
&& cache_dir
.read_dir()
.map(|mut i| i.next().is_some())
.unwrap_or(false)
{
if cache_dir.exists() && cache_dir.read_dir().is_ok_and(|mut i| i.next().is_some()) {
debug!("Detected existing schema cache");
true
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/util/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl SimpleLogger {
format!("Log file changed - subsequent logs will be written to: {path:?}")
},
);
log.write_all(format!("{timestamp} --- {message}\n",).as_bytes())
log.write_all(format!("{timestamp} --- {message}\n").as_bytes())
.expect("writing to log file failed");
}
config.log_file = match log_file {
Expand Down
2 changes: 1 addition & 1 deletion src/argparse/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl Cache {
if cache_matches.get_flag("clear") {
info!("Clearing cache...");
clear_cache(cache_dir)
.map_err(|err| error::UserFriendly::new(format!("error clearing cache: {err}",)))?;
.map_err(|err| error::UserFriendly::new(format!("error clearing cache: {err}")))?;

info!("Cache cleared.");
eprintln!("Cache cleared.");
Expand Down
4 changes: 2 additions & 2 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ fn generate_patch_field_arg<'a>(name: &'a str, field: &'a Field) -> Option<clap:
pub fn create_get_filters(endpoint: &Endpoint, args: &ArgMatches) -> HashMap<String, String> {
endpoint
.fields
.iter()
.flat_map(|(name, _field)| {
.keys()
.flat_map(|name| {
get_filter_args(
name.as_str(),
endpoint.filtering.get(name).unwrap_or(&Vec::new()),
Expand Down
4 changes: 1 addition & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ fn api_request_from_matches(
Ok((mcu::Api::Command(mcu::CommandApi::Conference), sub_m))
}
Some(("platform", sub_m)) => Ok((mcu::Api::Command(mcu::CommandApi::Platform), sub_m)),
o => Err(error::UserFriendly::new(
format!("Unrecognised API {o:?}!",),
)),
o => Err(error::UserFriendly::new(format!("Unrecognised API {o:?}!"))),
},
Some(("history", sub_m)) => Ok((mcu::Api::History, sub_m)),
o => Err(error::UserFriendly::new(format!("unrecognised API {o:?}!"))),
Expand Down
5 changes: 1 addition & 4 deletions test_helpers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ uuid.workspace = true
zeroize = "1.8"

[dev-dependencies]
reqwest = { workspace = true, features = [
"blocking",
"rustls-tls-native-roots",
] }
reqwest = { workspace = true, features = ["blocking", "rustls"] }
test-case.workspace = true

[features]
Expand Down
Loading