chore: update dependencies (#15)

* build(deps): bump actions/cache from 4 to 5

Bump the actions-deps group.

* build(deps): bump cargo-deps group (anyhow, chrono, clap, uuid, tempfile)

- anyhow 1.0.101 → 1.0.102
- chrono 0.4.43 → 0.4.44
- clap 4.5.57 → 4.5.60
- uuid 1.20.0 → 1.21.0
- tempfile 3.24.0 → 3.25.0

* build(deps): bump sqlx from 0.7.4 to 0.8.6

* build(deps): bump rand from 0.8.5 to 0.9.2

Migrate API changes:
- Replace OsRng.fill_bytes() with rand::rng().fill_bytes()
- Replace rand::thread_rng() with rand::rng()

* build(deps): bump thiserror from 1.0.69 to 2.0.18
This commit is contained in:
Jon Seager 2026-03-05 11:03:12 +00:00
parent 937ee4c5f2
commit edffb1679d
No known key found for this signature in database
6 changed files with 306 additions and 207 deletions

View file

@ -25,7 +25,7 @@ jobs:
restore-prefixes-first-match: nix-${{ runner.os }}-
- name: Cache Cargo artifacts
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index/

View file

@ -25,7 +25,7 @@ jobs:
restore-prefixes-first-match: nix-${{ runner.os }}-
- name: Cache Cargo artifacts
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index/
@ -63,7 +63,7 @@ jobs:
restore-prefixes-first-match: nix-${{ runner.os }}-
- name: Cache Cargo artifacts
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index/

493
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -18,9 +18,9 @@ open = "5"
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "gzip"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
rand = "0.8"
rand = "0.9"
sha2 = "0.10"
sqlx = { version = "0.7", default-features = false, features = [
sqlx = { version = "0.8", default-features = false, features = [
"runtime-tokio",
"tls-rustls",
"macros",
@ -28,7 +28,7 @@ sqlx = { version = "0.7", default-features = false, features = [
"sqlite",
"migrate",
] }
thiserror = "1.0"
thiserror = "2.0"
tokio = { version = "1.38", features = ["rt-multi-thread", "macros", "signal"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json", "fmt"] }

View file

@ -178,6 +178,6 @@ fn build_stat_cards(cs: CachedStats) -> Vec<StatCard> {
label: "Top Roaster",
},
];
cards.shuffle(&mut rand::thread_rng());
cards.shuffle(&mut rand::rng());
cards
}

View file

@ -1,13 +1,13 @@
use anyhow::Result;
use base64::{Engine as _, engine::general_purpose};
use rand::{RngCore, rngs::OsRng};
use rand::RngCore;
use sha2::{Digest, Sha256};
/// Generates a cryptographically secure random token
/// Returns a base64-encoded token string
pub fn generate_token() -> Result<String> {
let mut token_bytes = [0u8; 32];
OsRng.fill_bytes(&mut token_bytes);
rand::rng().fill_bytes(&mut token_bytes);
Ok(general_purpose::STANDARD.encode(token_bytes))
}
@ -22,7 +22,7 @@ pub fn hash_token(token: &str) -> String {
/// Generates a session token for cookie-based authentication
pub fn generate_session_token() -> String {
let mut token_bytes = [0u8; 32];
OsRng.fill_bytes(&mut token_bytes);
rand::rng().fill_bytes(&mut token_bytes);
general_purpose::URL_SAFE_NO_PAD.encode(token_bytes)
}