mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-22 20:31:19 +00:00
Remove unused dependencies (#2795)
This commit is contained in:
parent
165b19e75c
commit
3a526b0b7d
11 changed files with 10 additions and 52 deletions
22
Cargo.lock
generated
22
Cargo.lock
generated
|
@ -959,9 +959,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cookie"
|
name = "cookie"
|
||||||
version = "0.16.1"
|
version = "0.16.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "344adc371239ef32293cb1c4fe519592fcf21206c79c02854320afcdf3ab4917"
|
checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"time 0.3.15",
|
"time 0.3.15",
|
||||||
|
@ -2392,7 +2392,6 @@ dependencies = [
|
||||||
"bcrypt",
|
"bcrypt",
|
||||||
"captcha",
|
"captcha",
|
||||||
"chrono",
|
"chrono",
|
||||||
"diesel",
|
|
||||||
"lemmy_api_common",
|
"lemmy_api_common",
|
||||||
"lemmy_db_schema",
|
"lemmy_db_schema",
|
||||||
"lemmy_db_views",
|
"lemmy_db_views",
|
||||||
|
@ -2400,7 +2399,6 @@ dependencies = [
|
||||||
"lemmy_db_views_moderator",
|
"lemmy_db_views_moderator",
|
||||||
"lemmy_utils",
|
"lemmy_utils",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
|
||||||
"serial_test",
|
"serial_test",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tracing",
|
"tracing",
|
||||||
|
@ -2415,9 +2413,7 @@ dependencies = [
|
||||||
"actix-web",
|
"actix-web",
|
||||||
"actix-ws",
|
"actix-ws",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"background-jobs",
|
|
||||||
"chrono",
|
"chrono",
|
||||||
"diesel",
|
|
||||||
"encoding",
|
"encoding",
|
||||||
"futures",
|
"futures",
|
||||||
"lemmy_db_schema",
|
"lemmy_db_schema",
|
||||||
|
@ -2425,7 +2421,6 @@ dependencies = [
|
||||||
"lemmy_db_views_actor",
|
"lemmy_db_views_actor",
|
||||||
"lemmy_db_views_moderator",
|
"lemmy_db_views_moderator",
|
||||||
"lemmy_utils",
|
"lemmy_utils",
|
||||||
"opentelemetry 0.17.0",
|
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"regex",
|
"regex",
|
||||||
|
@ -2436,9 +2431,7 @@ dependencies = [
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"strum",
|
"strum",
|
||||||
"strum_macros",
|
"strum_macros",
|
||||||
"tokio",
|
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-opentelemetry 0.17.4",
|
|
||||||
"url",
|
"url",
|
||||||
"uuid",
|
"uuid",
|
||||||
"webpage",
|
"webpage",
|
||||||
|
@ -2458,7 +2451,6 @@ dependencies = [
|
||||||
"lemmy_db_views_actor",
|
"lemmy_db_views_actor",
|
||||||
"lemmy_utils",
|
"lemmy_utils",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
|
||||||
"tracing",
|
"tracing",
|
||||||
"url",
|
"url",
|
||||||
"webmention",
|
"webmention",
|
||||||
|
@ -2497,7 +2489,6 @@ dependencies = [
|
||||||
"sha2",
|
"sha2",
|
||||||
"strum_macros",
|
"strum_macros",
|
||||||
"task-local-extensions",
|
"task-local-extensions",
|
||||||
"tokio",
|
|
||||||
"tracing",
|
"tracing",
|
||||||
"url",
|
"url",
|
||||||
"uuid",
|
"uuid",
|
||||||
|
@ -2517,7 +2508,6 @@ dependencies = [
|
||||||
"diesel-derive-newtype",
|
"diesel-derive-newtype",
|
||||||
"diesel_ltree",
|
"diesel_ltree",
|
||||||
"diesel_migrations",
|
"diesel_migrations",
|
||||||
"futures",
|
|
||||||
"lemmy_utils",
|
"lemmy_utils",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"regex",
|
"regex",
|
||||||
|
@ -2529,7 +2519,6 @@ dependencies = [
|
||||||
"strum_macros",
|
"strum_macros",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-error",
|
|
||||||
"typed-builder",
|
"typed-builder",
|
||||||
"url",
|
"url",
|
||||||
]
|
]
|
||||||
|
@ -2547,7 +2536,6 @@ dependencies = [
|
||||||
"tokio",
|
"tokio",
|
||||||
"tracing",
|
"tracing",
|
||||||
"typed-builder",
|
"typed-builder",
|
||||||
"url",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2579,7 +2567,6 @@ dependencies = [
|
||||||
"actix-web",
|
"actix-web",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
"diesel",
|
|
||||||
"futures",
|
"futures",
|
||||||
"lemmy_api_common",
|
"lemmy_api_common",
|
||||||
"lemmy_db_schema",
|
"lemmy_db_schema",
|
||||||
|
@ -2610,7 +2597,6 @@ dependencies = [
|
||||||
"console-subscriber",
|
"console-subscriber",
|
||||||
"diesel",
|
"diesel",
|
||||||
"diesel-async",
|
"diesel-async",
|
||||||
"diesel_migrations",
|
|
||||||
"doku",
|
"doku",
|
||||||
"futures",
|
"futures",
|
||||||
"lemmy_api",
|
"lemmy_api",
|
||||||
|
@ -2622,9 +2608,7 @@ dependencies = [
|
||||||
"lemmy_utils",
|
"lemmy_utils",
|
||||||
"opentelemetry 0.17.0",
|
"opentelemetry 0.17.0",
|
||||||
"opentelemetry-otlp 0.10.0",
|
"opentelemetry-otlp 0.10.0",
|
||||||
"parking_lot 0.12.1",
|
|
||||||
"pict-rs",
|
"pict-rs",
|
||||||
"rand 0.8.5",
|
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"reqwest-middleware",
|
"reqwest-middleware",
|
||||||
"reqwest-retry",
|
"reqwest-retry",
|
||||||
|
@ -2660,9 +2644,7 @@ dependencies = [
|
||||||
"lettre",
|
"lettre",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"openssl",
|
"openssl",
|
||||||
"parking_lot 0.12.1",
|
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"rand 0.8.5",
|
|
||||||
"regex",
|
"regex",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"reqwest-middleware",
|
"reqwest-middleware",
|
||||||
|
|
|
@ -76,7 +76,6 @@ reqwest-middleware = "0.2.0"
|
||||||
reqwest-tracing = "0.4.0"
|
reqwest-tracing = "0.4.0"
|
||||||
clokwerk = "0.3.5"
|
clokwerk = "0.3.5"
|
||||||
doku = { version = "0.20.0", features = ["url-2"] }
|
doku = { version = "0.20.0", features = ["url-2"] }
|
||||||
parking_lot = "0.12.1"
|
|
||||||
reqwest-retry = "0.2.0"
|
reqwest-retry = "0.2.0"
|
||||||
bcrypt = "0.13.0"
|
bcrypt = "0.13.0"
|
||||||
chrono = { version = "0.4.22", features = ["serde"], default-features = false }
|
chrono = { version = "0.4.22", features = ["serde"], default-features = false }
|
||||||
|
@ -117,7 +116,6 @@ lemmy_api_common = { workspace = true }
|
||||||
lemmy_routes = { workspace = true }
|
lemmy_routes = { workspace = true }
|
||||||
activitypub_federation = { workspace = true }
|
activitypub_federation = { workspace = true }
|
||||||
diesel = { workspace = true }
|
diesel = { workspace = true }
|
||||||
diesel_migrations = { workspace = true }
|
|
||||||
diesel-async = { workspace = true }
|
diesel-async = { workspace = true }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
actix-web = { workspace = true }
|
actix-web = { workspace = true }
|
||||||
|
@ -132,7 +130,6 @@ reqwest-middleware = { workspace = true }
|
||||||
reqwest-tracing = { workspace = true }
|
reqwest-tracing = { workspace = true }
|
||||||
clokwerk = { workspace = true }
|
clokwerk = { workspace = true }
|
||||||
doku = { workspace = true }
|
doku = { workspace = true }
|
||||||
parking_lot = { workspace = true }
|
|
||||||
reqwest-retry = { workspace = true }
|
reqwest-retry = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
futures = { workspace = true }
|
futures = { workspace = true }
|
||||||
|
@ -141,7 +138,6 @@ tracing-opentelemetry = { workspace = true, optional = true }
|
||||||
opentelemetry = { workspace = true, optional = true }
|
opentelemetry = { workspace = true, optional = true }
|
||||||
actix-web-actors = { version = "4.1.0", default-features = false }
|
actix-web-actors = { version = "4.1.0", default-features = false }
|
||||||
actix-rt = "2.6"
|
actix-rt = "2.6"
|
||||||
rand = { workspace = true }
|
|
||||||
console-subscriber = { version = "0.1.8", optional = true }
|
console-subscriber = { version = "0.1.8", optional = true }
|
||||||
opentelemetry-otlp = { version = "0.10.0", optional = true }
|
opentelemetry-otlp = { version = "0.10.0", optional = true }
|
||||||
pict-rs = { version = "0.4.0-beta.9", optional = true }
|
pict-rs = { version = "0.4.0-beta.9", optional = true }
|
||||||
|
|
|
@ -20,10 +20,8 @@ lemmy_db_views = { workspace = true, features = ["full"] }
|
||||||
lemmy_db_views_moderator = { workspace = true, features = ["full"] }
|
lemmy_db_views_moderator = { workspace = true, features = ["full"] }
|
||||||
lemmy_db_views_actor = { workspace = true, features = ["full"] }
|
lemmy_db_views_actor = { workspace = true, features = ["full"] }
|
||||||
lemmy_api_common = { workspace = true, features = ["full"] }
|
lemmy_api_common = { workspace = true, features = ["full"] }
|
||||||
diesel = { workspace = true }
|
|
||||||
bcrypt = { workspace = true }
|
bcrypt = { workspace = true }
|
||||||
chrono = { workspace = true }
|
chrono = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
actix-web = { workspace = true }
|
actix-web = { workspace = true }
|
||||||
base64 = { workspace = true }
|
base64 = { workspace = true }
|
||||||
|
|
|
@ -14,7 +14,7 @@ path = "src/lib.rs"
|
||||||
doctest = false
|
doctest = false
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
full = ["diesel", "tracing", "rosetta-i18n", "chrono", "actix-web", "lemmy_utils",
|
full = ["tracing", "rosetta-i18n", "chrono", "actix-web", "lemmy_utils",
|
||||||
"lemmy_db_views/full", "lemmy_db_views_actor/full", "lemmy_db_views_moderator/full",
|
"lemmy_db_views/full", "lemmy_db_views_actor/full", "lemmy_db_views_moderator/full",
|
||||||
"percent-encoding", "encoding", "reqwest-middleware", "webpage"]
|
"percent-encoding", "encoding", "reqwest-middleware", "webpage"]
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ serde = { workspace = true }
|
||||||
url = { workspace = true }
|
url = { workspace = true }
|
||||||
actix-web = { workspace = true, features = ["cookies"], optional = true }
|
actix-web = { workspace = true, features = ["cookies"], optional = true }
|
||||||
chrono = { workspace = true, optional = true }
|
chrono = { workspace = true, optional = true }
|
||||||
diesel = { workspace = true, optional = true }
|
|
||||||
tracing = { workspace = true, optional = true }
|
tracing = { workspace = true, optional = true }
|
||||||
reqwest-middleware = { workspace = true, optional = true }
|
reqwest-middleware = { workspace = true, optional = true }
|
||||||
regex = { workspace = true }
|
regex = { workspace = true }
|
||||||
|
@ -39,14 +38,10 @@ encoding = { version = "0.2.33", optional = true }
|
||||||
rand = { workspace = true }
|
rand = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
tokio = { workspace = true }
|
|
||||||
strum = { workspace = true }
|
strum = { workspace = true }
|
||||||
strum_macros = { workspace = true }
|
strum_macros = { workspace = true }
|
||||||
opentelemetry = { workspace = true }
|
|
||||||
tracing-opentelemetry = { workspace = true }
|
|
||||||
actix-ws = { workspace = true }
|
actix-ws = { workspace = true }
|
||||||
futures = { workspace = true }
|
futures = { workspace = true }
|
||||||
background-jobs = "0.13.0"
|
|
||||||
uuid = { workspace = true }
|
uuid = { workspace = true }
|
||||||
actix-rt = { workspace = true }
|
actix-rt = { workspace = true }
|
||||||
reqwest = { workspace = true }
|
reqwest = { workspace = true }
|
||||||
|
|
|
@ -16,7 +16,6 @@ lemmy_db_views_actor = { workspace = true, features = ["full"] }
|
||||||
lemmy_api_common = { workspace = true, features = ["full"] }
|
lemmy_api_common = { workspace = true, features = ["full"] }
|
||||||
activitypub_federation = { workspace = true }
|
activitypub_federation = { workspace = true }
|
||||||
bcrypt = { workspace = true }
|
bcrypt = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
actix-web = { workspace = true }
|
actix-web = { workspace = true }
|
||||||
tracing = { workspace = true }
|
tracing = { workspace = true }
|
||||||
|
|
|
@ -38,7 +38,6 @@ async-trait = { workspace = true }
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
reqwest = { workspace = true }
|
reqwest = { workspace = true }
|
||||||
once_cell = { workspace = true }
|
once_cell = { workspace = true }
|
||||||
tokio = { workspace = true }
|
|
||||||
html2md = "0.2.13"
|
html2md = "0.2.13"
|
||||||
serde_with = "1.14.0"
|
serde_with = "1.14.0"
|
||||||
http-signature-normalization-actix = { version = "0.6.1", default-features = false, features = ["server", "sha-2"] }
|
http-signature-normalization-actix = { version = "0.6.1", default-features = false, features = ["server", "sha-2"] }
|
||||||
|
|
|
@ -40,8 +40,6 @@ typed-builder = { workspace = true }
|
||||||
async-trait = { workspace = true }
|
async-trait = { workspace = true }
|
||||||
tokio = { workspace = true }
|
tokio = { workspace = true }
|
||||||
tracing = { workspace = true }
|
tracing = { workspace = true }
|
||||||
tracing-error = { workspace = true }
|
|
||||||
futures = { workspace = true }
|
|
||||||
deadpool = { version = "0.9.5", features = ["rt_tokio_1"], optional = true }
|
deadpool = { version = "0.9.5", features = ["rt_tokio_1"], optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
@ -22,7 +22,6 @@ diesel_ltree = { workspace = true, optional = true}
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
tracing = { workspace = true, optional = true }
|
tracing = { workspace = true, optional = true }
|
||||||
typed-builder = { workspace = true }
|
typed-builder = { workspace = true }
|
||||||
url = { workspace = true }
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
serial_test = { workspace = true }
|
serial_test = { workspace = true }
|
||||||
|
|
|
@ -18,7 +18,6 @@ lemmy_db_views_actor = { workspace = true }
|
||||||
lemmy_db_schema = { workspace = true }
|
lemmy_db_schema = { workspace = true }
|
||||||
lemmy_api_common = { workspace = true, features = ["full"] }
|
lemmy_api_common = { workspace = true, features = ["full"] }
|
||||||
activitypub_federation = { workspace = true }
|
activitypub_federation = { workspace = true }
|
||||||
diesel = { workspace = true }
|
|
||||||
actix-web = { workspace = true }
|
actix-web = { workspace = true }
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
chrono = { workspace = true }
|
chrono = { workspace = true }
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
use activitypub_federation::fetch::webfinger::{Webfinger, WebfingerLink};
|
use activitypub_federation::{
|
||||||
|
config::Data,
|
||||||
|
fetch::webfinger::{extract_webfinger_name, Webfinger, WebfingerLink},
|
||||||
|
};
|
||||||
use actix_web::{web, web::Query, HttpResponse};
|
use actix_web::{web, web::Query, HttpResponse};
|
||||||
use anyhow::Context;
|
|
||||||
use lemmy_api_common::context::LemmyContext;
|
use lemmy_api_common::context::LemmyContext;
|
||||||
use lemmy_db_schema::{
|
use lemmy_db_schema::{
|
||||||
source::{community::Community, person::Person},
|
source::{community::Community, person::Person},
|
||||||
traits::ApubActor,
|
traits::ApubActor,
|
||||||
};
|
};
|
||||||
use lemmy_utils::{error::LemmyError, location_info};
|
use lemmy_utils::error::LemmyError;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
@ -31,16 +33,9 @@ pub fn config(cfg: &mut web::ServiceConfig) {
|
||||||
/// https://radical.town/.well-known/webfinger?resource=acct:felix@radical.town
|
/// https://radical.town/.well-known/webfinger?resource=acct:felix@radical.town
|
||||||
async fn get_webfinger_response(
|
async fn get_webfinger_response(
|
||||||
info: Query<Params>,
|
info: Query<Params>,
|
||||||
context: web::Data<LemmyContext>,
|
context: Data<LemmyContext>,
|
||||||
) -> Result<HttpResponse, LemmyError> {
|
) -> Result<HttpResponse, LemmyError> {
|
||||||
let name = context
|
let name = extract_webfinger_name(&info.resource, &context)?;
|
||||||
.settings()
|
|
||||||
.webfinger_regex()
|
|
||||||
.captures(&info.resource)
|
|
||||||
.and_then(|c| c.get(1))
|
|
||||||
.context(location_info!())?
|
|
||||||
.as_str()
|
|
||||||
.to_string();
|
|
||||||
|
|
||||||
let name_ = name.clone();
|
let name_ = name.clone();
|
||||||
let user_id: Option<Url> = Person::read_from_name(context.pool(), &name_, false)
|
let user_id: Option<Url> = Person::read_from_name(context.pool(), &name_, false)
|
||||||
|
|
|
@ -19,7 +19,6 @@ chrono = { workspace = true }
|
||||||
tracing = { workspace = true }
|
tracing = { workspace = true }
|
||||||
tracing-error = { workspace = true }
|
tracing-error = { workspace = true }
|
||||||
itertools = { workspace = true }
|
itertools = { workspace = true }
|
||||||
rand = { workspace = true }
|
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
once_cell = { workspace = true }
|
once_cell = { workspace = true }
|
||||||
|
@ -35,7 +34,6 @@ http = { workspace = true }
|
||||||
doku = { workspace = true, features = ["url-2"] }
|
doku = { workspace = true, features = ["url-2"] }
|
||||||
uuid = { workspace = true, features = ["serde", "v4"] }
|
uuid = { workspace = true, features = ["serde", "v4"] }
|
||||||
rosetta-i18n = { workspace = true }
|
rosetta-i18n = { workspace = true }
|
||||||
parking_lot = { workspace = true }
|
|
||||||
typed-builder = { workspace = true }
|
typed-builder = { workspace = true }
|
||||||
percent-encoding = { workspace = true }
|
percent-encoding = { workspace = true }
|
||||||
tokio = { workspace = true }
|
tokio = { workspace = true }
|
||||||
|
|
Loading…
Reference in a new issue