chore: update deps across repo

This commit is contained in:
dr-frmr 2024-04-22 22:50:46 +09:00
parent b699f3fe9e
commit 064d6bb45a
No known key found for this signature in database
8 changed files with 872 additions and 594 deletions

1401
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -37,27 +37,26 @@ alloy-sol-types = "0.6.2"
alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "6f8ebb4" }
anyhow = "1.0.71"
async-trait = "0.1.71"
base64 = "0.13"
base64 = "0.22.0"
bincode = "1.3.3"
blake3 = "1.4.1"
bytes = "1.4.0"
cap-std = "2.0.0"
chacha20poly1305 = "0.10.1"
chrono = "0.4.31"
clap = { version = "4.4", features = ["derive"] }
crossterm = { version = "0.26.1", features = ["event-stream", "bracketed-paste"] }
crossterm = { version = "0.27.0", features = ["event-stream", "bracketed-paste"] }
curve25519-dalek = "^4.1.2"
dashmap = "5.5.3"
digest = "0.10"
elliptic-curve = { version = "0.13.8", features = ["ecdh"] }
flate2 = "1.0"
futures = "0.3"
generic-array = "0.14"
generic-array = "1.0.0"
getrandom = "0.2.10"
hex = "0.4.3"
hkdf = "0.12.3"
hmac = "0.12"
http = "0.2.9"
http = "1.1.0"
jwt = "0.16"
lib = { path = "../lib" }
lazy_static = "1.4.0"
@ -67,12 +66,12 @@ num-traits = "0.2"
open = "5.0.0"
public-ip = "0.2.2"
rand = "0.8.4"
reqwest = "0.11.18"
ring = "0.16.20"
reqwest = "0.12.4"
ring = "0.17.8"
rmp-serde = "1.1.2"
rocksdb = { version = "0.21.0", features = ["multi-threaded-cf"] }
rocksdb = { version = "0.22.0", features = ["multi-threaded-cf"] }
route-recognizer = "0.3.1"
rusqlite = { version = "0.30.0", features = ["bundled"] }
rusqlite = { version = "0.31.0", features = ["bundled"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_urlencoded = "0.7"
@ -81,12 +80,11 @@ snow = { version = "0.9.3", features = ["ring-resolver"] }
static_dir = "0.2.0"
thiserror = "1.0"
tokio = { version = "1.28", features = ["fs", "macros", "rt-multi-thread", "signal", "sync"] }
tokio-stream = "0.1.14"
tokio-tungstenite = "0.20.1"
tokio-tungstenite = "0.21.0"
url = "2.4.1"
uuid = { version = "1.1.2", features = ["serde", "v4"] }
warp = "0.3.5"
wasi-common = "19.0.1"
wasmtime = "19.0.1"
wasmtime-wasi = "19.0.1"
zip = "0.6"
zip = "1.1.1"

View File

@ -20,7 +20,7 @@ sha3 = "0.10.8"
url = "2.4.1"
urlencoding = "2.1.0"
wit-bindgen = "0.24.0"
zip = { version = "0.6.6", default-features = false }
zip = { version = "1.1.1", default-features = false }
[lib]
crate-type = ["cdylib"]

View File

@ -8,7 +8,7 @@ simulation-mode = []
[dependencies]
anyhow = "1.0"
base64 = "0.13"
base64 = "0.22.0"
bincode = "1.3.3"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib", tag = "v0.6.1" }
pleco = "0.5"

View File

@ -2,6 +2,7 @@ use crate::http::server_types::*;
use crate::http::utils::*;
use crate::{keygen, register};
use anyhow::Result;
use base64::{engine::general_purpose::STANDARD as base64_standard, Engine};
use dashmap::DashMap;
use futures::{SinkExt, StreamExt};
use http::uri::Authority;
@ -343,14 +344,14 @@ async fn login_handler(
};
let mut response = warp::reply::with_status(
warp::reply::json(&base64::encode(encoded_keyfile.to_vec())),
warp::reply::json(&base64_standard.encode(encoded_keyfile.to_vec())),
StatusCode::OK,
)
.into_response();
match HeaderValue::from_str(&format!("kinode-auth_{}={};", our.as_ref(), &token)) {
Ok(v) => {
response.headers_mut().append(http::header::SET_COOKIE, v);
response.headers_mut().append("set-cookie", v);
Ok(response)
}
Err(_) => Ok(warp::reply::with_status(
@ -372,7 +373,7 @@ async fn ws_handler(
ws_connection: Ws,
socket_addr: Option<SocketAddr>,
path: warp::path::FullPath,
host: Option<Authority>,
host: Option<warp::host::Authority>,
headers: warp::http::HeaderMap,
our: Arc<String>,
jwt_secret_bytes: Arc<Vec<u8>>,
@ -468,7 +469,7 @@ async fn ws_handler(
async fn http_handler(
method: warp::http::Method,
socket_addr: Option<SocketAddr>,
host: Option<Authority>,
host: Option<warp::host::Authority>,
path: warp::path::FullPath,
query_params: HashMap<String, String>,
headers: warp::http::HeaderMap,
@ -529,7 +530,7 @@ async fn http_handler(
"Location",
format!(
"http://{}/login",
host.unwrap_or(Authority::from_static("localhost"))
host.unwrap_or(warp::host::Authority::from_static("localhost"))
),
)
.body(vec![])
@ -619,7 +620,7 @@ async fn http_handler(
method: method.to_string(),
url: format!(
"http://{}{}",
host.unwrap_or(Authority::from_static("localhost")),
host.unwrap_or(warp::host::Authority::from_static("localhost")),
original_path
),
bound_path: bound_path.path.clone(),
@ -735,7 +736,7 @@ async fn handle_rpc_message(
let blob: Option<LazyLoadBlob> = match rpc_message.data {
None => None,
Some(b64_bytes) => match base64::decode(b64_bytes) {
Some(b64_bytes) => match base64_standard.decode(b64_bytes) {
Ok(bytes) => Some(LazyLoadBlob {
mime: rpc_message.mime,
bytes,
@ -1069,7 +1070,7 @@ async fn handle_app_message(
if path == "/rpc:distro:sys/message" {
let blob = km.lazy_load_blob.map(|p| LazyLoadBlob {
mime: p.mime,
bytes: base64::encode(p.bytes).into_bytes(),
bytes: base64_standard.encode(p.bytes).into_bytes(),
});
let mut default_headers = HashMap::new();

View File

@ -9,6 +9,7 @@ use alloy_signer::Signature;
use alloy_sol_macro::sol;
use alloy_sol_types::{SolCall, SolValue};
use alloy_transport_ws::WsConnect;
use base64::{engine::general_purpose::STANDARD as base64_standard, Engine};
use hmac::Hmac;
use jwt::SignWithKey;
use lib::types::core::*;
@ -366,7 +367,9 @@ async fn handle_keyfile_vet(
// additional checks?
let encoded_keyfile = match payload.keyfile.is_empty() {
true => keyfile.ok_or(warp::reject())?,
false => base64::decode(payload.keyfile).map_err(|_| warp::reject())?,
false => base64_standard
.decode(payload.keyfile)
.map_err(|_| warp::reject())?,
};
let decoded_keyfile = keygen::decode_keyfile(&encoded_keyfile, &payload.password_hash)
@ -543,7 +546,7 @@ async fn handle_import_keyfile(
provider: Arc<Provider<PubSubFrontend>>,
) -> Result<impl Reply, Rejection> {
// if keyfile was not present in node and is present from user upload
let encoded_keyfile = match base64::decode(info.keyfile.clone()) {
let encoded_keyfile = match base64_standard.decode(info.keyfile.clone()) {
Ok(k) => k,
Err(_) => {
return Ok(warp::reply::with_status(
@ -762,7 +765,7 @@ async fn success_response(
decoded_keyfile: Keyfile,
encoded_keyfile: Vec<u8>,
) -> Result<warp::reply::Response, Rejection> {
let encoded_keyfile_str = base64::encode(&encoded_keyfile);
let encoded_keyfile_str = base64_standard.encode(&encoded_keyfile);
let token = match generate_jwt(&decoded_keyfile.jwt_secret_bytes, &our.name) {
Some(token) => token,
None => {

View File

@ -1,4 +1,5 @@
use anyhow::Result;
use base64::{engine::general_purpose::STANDARD as base64_standard, Engine};
use dashmap::DashMap;
use rusqlite::Connection;
use std::collections::{HashMap, HashSet, VecDeque};
@ -201,7 +202,9 @@ async fn handle_request(
serde_json::Number::from_f64(real).unwrap(),
),
SqlValue::Text(text) => serde_json::Value::String(text),
SqlValue::Blob(blob) => serde_json::Value::String(base64::encode(blob)), // or another representation if you prefer
SqlValue::Blob(blob) => {
serde_json::Value::String(base64_standard.encode(blob))
} // or another representation if you prefer
_ => serde_json::Value::Null,
};
map.insert(column_name.clone(), value_json);
@ -511,7 +514,7 @@ fn json_to_sqlite(value: &serde_json::Value) -> Result<SqlValue, SqliteError> {
}
}
serde_json::Value::String(s) => {
match base64::decode(s) {
match base64_standard.decode(s) {
Ok(decoded_bytes) => {
// convert to SQLite Blob if it's a valid base64 string
Ok(SqlValue::Blob(decoded_bytes))

View File

@ -13,15 +13,15 @@ license = "Apache-2.0"
[build-dependencies]
anyhow = "1.0.71"
kit = { git = "https://github.com/kinode-dao/kit", rev = "659f59e" }
reqwest = { version = "0.11.22", features = ["blocking"] }
reqwest = { version = "0.12.4", features = ["blocking"] }
tokio = "1.28"
[dependencies]
alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "6f8ebb4" }
lazy_static = "1.4.0"
rand = "0.8.4"
ring = "0.16.20"
rusqlite = { version = "0.30.0", features = ["bundled"] }
ring = "0.17.8"
rusqlite = { version = "0.31.0", features = ["bundled"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"