mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-25 08:37:29 +01:00
Update dependencies (#753)
This commit is contained in:
parent
1e51ea9423
commit
409a6651f5
10 changed files with 24 additions and 25 deletions
|
@ -51,7 +51,7 @@ base64 = { optional = true, version = "0.13" }
|
||||||
headers = { optional = true, version = "0.3" }
|
headers = { optional = true, version = "0.3" }
|
||||||
multer = { optional = true, version = "2.0.0" }
|
multer = { optional = true, version = "2.0.0" }
|
||||||
serde_json = { version = "1.0", optional = true, features = ["raw_value"] }
|
serde_json = { version = "1.0", optional = true, features = ["raw_value"] }
|
||||||
sha-1 = { optional = true, version = "0.9.6" }
|
sha-1 = { optional = true, version = "0.10" }
|
||||||
tokio-tungstenite = { optional = true, version = "0.16" }
|
tokio-tungstenite = { optional = true, version = "0.16" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
14
deny.toml
14
deny.toml
|
@ -35,13 +35,17 @@ license-files = [
|
||||||
[bans]
|
[bans]
|
||||||
multiple-versions = "deny"
|
multiple-versions = "deny"
|
||||||
highlight = "all"
|
highlight = "all"
|
||||||
skip-tree = []
|
skip-tree = [
|
||||||
|
# these crates are only used in examples
|
||||||
|
{ name = "sqlx" },
|
||||||
|
{ name = "async-graphql" },
|
||||||
|
{ name = "axum-server" },
|
||||||
|
# remove when tungstenite has had a new release
|
||||||
|
# https://github.com/snapview/tungstenite-rs/issues/262
|
||||||
|
{ name = "tungstenite" },
|
||||||
|
]
|
||||||
skip = [
|
skip = [
|
||||||
# rustls uses old version (dev dep)
|
|
||||||
{ name = "spin", version = "=0.5.2" },
|
{ name = "spin", version = "=0.5.2" },
|
||||||
{ name = "webpki", version = "=0.21.4" },
|
|
||||||
# pulled in by hyper, http, and serde_urlencoded
|
|
||||||
{ name = "itoa", version = "=0.4.8" },
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[sources]
|
[sources]
|
||||||
|
|
|
@ -8,6 +8,6 @@ publish = false
|
||||||
axum = { path = "../../axum" }
|
axum = { path = "../../axum" }
|
||||||
tokio = { version = "1.0", features = ["full"] }
|
tokio = { version = "1.0", features = ["full"] }
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
tracing-subscriber = { version="0.3", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||||
async-graphql = "2.9.9"
|
async-graphql = "3.0"
|
||||||
slab = "0.4.3"
|
slab = "0.4.3"
|
||||||
|
|
|
@ -181,7 +181,7 @@ async fn query_characters(
|
||||||
|
|
||||||
if let Some(after) = after {
|
if let Some(after) = after {
|
||||||
if after >= characters.len() {
|
if after >= characters.len() {
|
||||||
return Ok(Connection::new(false, false));
|
return Ok::<_, async_graphql::Error>(Connection::new(false, false));
|
||||||
}
|
}
|
||||||
start = after + 1;
|
start = after + 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,5 +12,5 @@ tracing-subscriber = { version="0.3", features = ["env-filter"] }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
headers = "0.3"
|
headers = "0.3"
|
||||||
jsonwebtoken = "7"
|
jsonwebtoken = "8.0"
|
||||||
once_cell = "1.8"
|
once_cell = "1.8"
|
||||||
|
|
|
@ -154,17 +154,16 @@ impl IntoResponse for AuthError {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
|
||||||
struct Keys {
|
struct Keys {
|
||||||
encoding: EncodingKey,
|
encoding: EncodingKey,
|
||||||
decoding: DecodingKey<'static>,
|
decoding: DecodingKey,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Keys {
|
impl Keys {
|
||||||
fn new(secret: &[u8]) -> Self {
|
fn new(secret: &[u8]) -> Self {
|
||||||
Self {
|
Self {
|
||||||
encoding: EncodingKey::from_secret(secret),
|
encoding: EncodingKey::from_secret(secret),
|
||||||
decoding: DecodingKey::from_secret(secret).into_static(),
|
decoding: DecodingKey::from_secret(secret),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ publish = false
|
||||||
axum = { path = "../../axum" }
|
axum = { path = "../../axum" }
|
||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
hyper = { version = "0.14", features = ["full"] }
|
hyper = { version = "0.14", features = ["full"] }
|
||||||
rustls-pemfile = "0.2"
|
rustls-pemfile = "0.3"
|
||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
||||||
tokio-rustls = "0.23"
|
tokio-rustls = "0.23"
|
||||||
tower = { version = "0.4", features = ["make"] }
|
tower = { version = "0.4", features = ["make"] }
|
||||||
|
|
|
@ -7,8 +7,8 @@ publish = false
|
||||||
[dependencies]
|
[dependencies]
|
||||||
axum = { path = "../../axum" }
|
axum = { path = "../../axum" }
|
||||||
axum-extra = { path = "../../axum-extra" }
|
axum-extra = { path = "../../axum-extra" }
|
||||||
metrics = "0.17"
|
metrics = "0.18"
|
||||||
metrics-exporter-prometheus = "0.7"
|
metrics-exporter-prometheus = "0.8"
|
||||||
tokio = { version = "1.0", features = ["full"] }
|
tokio = { version = "1.0", features = ["full"] }
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||||
|
|
|
@ -56,18 +56,14 @@ fn setup_metrics_recorder() -> PrometheusHandle {
|
||||||
0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0,
|
0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0,
|
||||||
];
|
];
|
||||||
|
|
||||||
let recorder = PrometheusBuilder::new()
|
PrometheusBuilder::new()
|
||||||
.set_buckets_for_metric(
|
.set_buckets_for_metric(
|
||||||
Matcher::Full("http_requests_duration_seconds".to_string()),
|
Matcher::Full("http_requests_duration_seconds".to_string()),
|
||||||
EXPONENTIAL_SECONDS,
|
EXPONENTIAL_SECONDS,
|
||||||
)
|
)
|
||||||
.build();
|
.unwrap()
|
||||||
|
.install_recorder()
|
||||||
let recorder_handle = recorder.handle();
|
.unwrap()
|
||||||
|
|
||||||
metrics::set_boxed_recorder(Box::new(recorder)).unwrap();
|
|
||||||
|
|
||||||
recorder_handle
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn track_metrics<B>(req: Request<B>, next: Next<B>) -> impl IntoResponse {
|
async fn track_metrics<B>(req: Request<B>, next: Next<B>) -> impl IntoResponse {
|
||||||
|
|
|
@ -9,4 +9,4 @@ axum = { path = "../../axum" }
|
||||||
tokio = { version = "1.0", features = ["full"] }
|
tokio = { version = "1.0", features = ["full"] }
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
tracing-subscriber = { version="0.3", features = ["env-filter"] }
|
tracing-subscriber = { version="0.3", features = ["env-filter"] }
|
||||||
askama = "0.10"
|
askama = "0.11"
|
||||||
|
|
Loading…
Reference in a new issue