Skip to content

Commit

Permalink
Updating and cleaning up some Rust deps.
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatz committed Jan 26, 2025
1 parent dc37883 commit 31e8421
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 49 deletions.
26 changes: 12 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion trailbase-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mimalloc = { version = "^0.1.41", default-features = false }
serde = { version = "^1.0.203", features = ["derive"] }
serde_json = "^1.0.117"
tokio = { version = "^1.38.0", features=["macros", "rt-multi-thread", "fs", "signal"] }
tracing-subscriber = "0.3.18"
tracing-subscriber = { version = "0.3.18", default-features = false }
utoipa = { version = "5.0.0-beta.0", features = ["axum_extras"], optional = true }
utoipa-swagger-ui = { version = "9.0.0", features = ["axum"], optional = true }
uuid = { version = "^1.8.0", features = ["v4", "serde"] }
22 changes: 10 additions & 12 deletions trailbase-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ axum-extra = { version = "^0.10.0", default-features = false, features = ["proto
base64 = { version = "0.22.1", default-features = false }
bytes = { version = "1.8.0", features = ["serde"] }
chrono = "^0.4.38"
cookie = "0.18.1"
ed25519-dalek = { version = "2.1.1", features = ["pkcs8", "pem", "rand_core"] }
env_logger = "^0.11.3"
fallible-iterator = "0.3.0"
form_urlencoded = "1.2.1"
futures = "0.3.30"
Expand All @@ -47,12 +45,12 @@ jsonwebtoken = { version = "^9.3.0", default-features = false, features = ["use_
lazy_static = "1.4.0"
lettre = { version = "^0.11.7", default-features = false, features = ["tokio1-rustls-tls", "sendmail-transport", "smtp-transport", "builder"] }
log = "^0.4.21"
minijinja = "2.1.2"
minijinja = { version = "2.1.2", default-features = false }
oauth2 = { version = "5.0.0-alpha.4", default-features = false, features = ["reqwest", "rustls-tls"] }
object_store = { version = "0.11.0", default-features = false, features = ["aws"] }
parking_lot = "0.12.3"
prost = "^0.13.4"
prost-reflect = { version = "^0.14.3", features = ["derive", "text-format"] }
parking_lot = { version = "0.12.3", default-features = false }
prost = { version = "^0.13.4", default-features = false }
prost-reflect = { version = "^0.14.3", default-features = false, features = ["derive", "text-format"] }
rand = "0.8.5"
trailbase-refinery-core = { workspace = true }
trailbase-refinery-macros = { workspace = true }
Expand All @@ -69,18 +67,17 @@ sha2 = "0.10.8"
sqlformat = "0.3.1"
sqlite3-parser = "0.14.0"
thiserror = "2.0.1"
thread_local = "1.1.8"
tokio = { version = "^1.38.0", features = ["macros", "rt-multi-thread", "fs", "signal", "time"] }
tower-cookies = "0.11.0"
tower-http = { version = "^0.6.0", features = ["cors", "trace", "fs", "limit"] }
tower-service = "0.3.3"
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
tower-http = { version = "^0.6.0", default-features = false, features = ["cors", "trace", "fs", "limit"] }
tower-service = { version = "0.3.3", default-features = false }
tracing = { version = "0.1.40", default-features = false }
tracing-subscriber = { version = "0.3.18" }
trailbase-sqlite = { workspace = true }
ts-rs = { version = "10", features = ["uuid-impl", "serde-json-impl"] }
url = "^2.4.1"
utoipa = { version = "5.0.0-beta.0", features = ["axum_extras"] }
uuid = { version = "^1.8.0", features = ["v4", "serde"] }
uuid = { version = "1.7.0", default-features = false, features = ["std", "v7"] }
validator = { version = "0.20.0", default-features = false }
pin-project-lite = "0.2.16"

Expand All @@ -94,6 +91,7 @@ prost-reflect-build = "0.14.0"
anyhow = "^1.0.86"
axum-test = "17.0.1"
criterion = { version = "0.5", features = ["html_reports", "async_tokio"] }
env_logger = "^0.11.3"
trailbase-extension = { workspace = true }
quoted_printable = "0.5.1"
schemars = "0.8.21"
Expand Down
6 changes: 4 additions & 2 deletions trailbase-core/src/auth/util.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
use axum::http::request::Parts;
use base64::prelude::*;
use chrono::Duration;
use cookie::SameSite;
use lazy_static::lazy_static;
use sha2::{Digest, Sha256};
use tower_cookies::{Cookie, Cookies};
use tower_cookies::{
cookie::{self, SameSite},
Cookie, Cookies,
};
use trailbase_sqlite::params;

use crate::auth::user::{DbUser, User};
Expand Down
2 changes: 1 addition & 1 deletion trailbase-core/src/records/json_to_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ mod tests {

let metadata = TableMetadata::new(table.clone(), &[table]);

let id: [u8; 16] = uuid::Uuid::new_v4().as_bytes().clone();
let id: [u8; 16] = uuid::Uuid::now_v7().as_bytes().clone();
let blob: Vec<u8> = [0; 128].to_vec();
let text = "some text :)";
let num = 5;
Expand Down
6 changes: 3 additions & 3 deletions trailbase-core/src/table_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ mod tests {
insert(
"col1",
serde_json::to_value(FileUpload::new(
uuid::Uuid::new_v4(),
uuid::Uuid::now_v7(),
Some("filename".to_string()),
None,
None
Expand Down Expand Up @@ -947,7 +947,7 @@ mod tests {
assert!(insert(
"col3",
json!({
"id": uuid::Uuid::new_v4().to_string(),
"id": uuid::Uuid::now_v7().to_string(),
// Missing mime-type.
})
)
Expand All @@ -959,7 +959,7 @@ mod tests {
assert!(insert(
"col3",
json!({
"id": uuid::Uuid::new_v4().to_string(),
"id": uuid::Uuid::now_v7().to_string(),
"mime_type": "image/png"
})
)
Expand Down
2 changes: 1 addition & 1 deletion trailbase-core/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use axum::extract::{Json, State};
use axum::http::StatusCode;
use axum_test::multipart::MultipartForm;
use axum_test::TestServer;
use cookie::Cookie;
use std::rc::Rc;
use tower_cookies::Cookie;
use tracing_subscriber::prelude::*;
use trailbase_sqlite::params;

Expand Down
15 changes: 3 additions & 12 deletions trailbase-extension/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ readme = "../README.md"
crate-type=["cdylib", "rlib"]

[dependencies]
argon2 = "0.5.3"
base64 = "0.22.1"
argon2 = { version = "^0.5.3", default-features = false, features = ["alloc", "password-hash"] }
base64 = { version = "0.22.1", default-features = false }
jsonschema = { version = "0.28.0", default-features = false }
lru = { version = "0.12.3", default-features = false }
maxminddb = "0.24.0"
Expand All @@ -23,13 +23,4 @@ regex = "1.11.0"
rusqlite = { workspace = true }
serde_json = "1.0.121"
uuid = { version = "1.7.0", default-features = false, features = ["std", "v7"] }
validator = "0.20.0"

[dev-dependencies]
uuid = { version = "1.7.0", default-features = false, features = ["std", "v4", "v7"] }

[profile.release]
strip = "debuginfo"
opt-level = "s"
panic = "unwind"
lto = true
validator = { version = "0.20.0", default-features = false }
3 changes: 1 addition & 2 deletions trailbase-extension/src/uuid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,10 @@ mod tests {
}

{
let uuidv4 = Uuid::new_v4();
assert!(conn
.execute(
"INSERT INTO test (uuid, uuid_v7) VALUES (NULL, $1)",
params!(uuidv4.into_bytes().to_vec())
params!(Vec::<u8>::from([0, 0, 1, 2, 3, 4, 5, 6]))
)
.is_err());
}
Expand Down
2 changes: 1 addition & 1 deletion trailbase-sqlite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ sqlite-vec = "0.1.6"
thiserror = "2.0.1"
tokio = { version = "^1.38.0", features = ["macros", "rt-multi-thread", "fs", "sync"] }
trailbase-extension = { workspace = true }
uuid = { version = "^1.8.0", features = ["v4", "serde"] }
uuid = { version = "1.7.0", default-features = false, features = ["std", "v4"] }

[dev-dependencies]

0 comments on commit 31e8421

Please sign in to comment.