Update deps

This commit is contained in:
asonix 2020-09-07 16:51:02 -05:00
parent e80ded92f5
commit 1f065385a0
26 changed files with 52 additions and 71 deletions

34
Cargo.lock generated
View file

@ -1,19 +1,10 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "activitystreams-ext"
version = "0.1.0"
source = "git+https://git.asonix.dog/asonix/activitystreams-ext?branch=main#9acc466c7cb550ada31b669a1c47ea088f1c8471"
dependencies = [
"activitystreams-new",
"serde 1.0.115",
"serde_json",
]
[[package]]
name = "activitystreams-new"
version = "0.1.0"
source = "git+https://git.asonix.dog/asonix/activitystreams-sketch?branch=main#857d5167dfa13054dd0d21d3d54f8147eea0d546"
name = "activitystreams"
version = "0.7.0-alpha.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "261b423734cca2a170d7a76936f1f0f9e6c6fc297d36cfc5ea6aa15f9017f996"
dependencies = [
"chrono",
"mime",
@ -23,6 +14,17 @@ dependencies = [
"url",
]
[[package]]
name = "activitystreams-ext"
version = "0.1.0-alpha.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb8e19a0810cc25df3535061a08b7d8f8a734d309ea4411c57a9767e4a2ffa0e"
dependencies = [
"activitystreams",
"serde 1.0.115",
"serde_json",
]
[[package]]
name = "actix-codec"
version = "0.2.0"
@ -1172,9 +1174,9 @@ dependencies = [
[[package]]
name = "http-signature-normalization-actix"
version = "0.4.0-alpha.2"
version = "0.4.0-alpha.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "131fc982391a6b37847888b568cbe0e9cd302f1b0015f4f6f4a50234bebd049c"
checksum = "b44149de8286e9a07aeb72f4dee198530c0fb95df77f36b11138a748788f5603"
dependencies = [
"actix-http",
"actix-web",
@ -1948,8 +1950,8 @@ checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8"
name = "relay"
version = "0.1.0"
dependencies = [
"activitystreams",
"activitystreams-ext",
"activitystreams-new",
"actix-rt",
"actix-web",
"actix-webfinger",

View file

@ -17,8 +17,8 @@ anyhow = "1.0"
actix-rt = "1.1.1"
actix-web = { version = "3.0.0-beta.1", features = ["rustls"] }
actix-webfinger = "0.3.0-alpha.6"
activitystreams-new = { git = "https://git.asonix.dog/asonix/activitystreams-sketch", branch = "main" }
activitystreams-ext = { git = "https://git.asonix.dog/asonix/activitystreams-ext", branch = "main" }
activitystreams = "0.7.0-alpha.4"
activitystreams-ext = "0.1.0-alpha.2"
ammonia = "3.1.0"
async-mutex = "1.0.1"
async-trait = "0.1.24"
@ -31,7 +31,7 @@ deadpool-postgres = "0.5.5"
dotenv = "0.15.0"
env_logger = "0.7.1"
futures = "0.3.4"
http-signature-normalization-actix = { version = "0.4.0-alpha.1", default-features = false, features = ["sha-2"] }
http-signature-normalization-actix = { version = "0.4.0-alpha.3", default-features = false, features = ["sha-2"] }
log = "0.4"
lru = "0.6.0"
mime = "0.3.16"

View file

@ -1,5 +1,5 @@
use activitystreams_ext::{Ext1, UnparsedExtension};
use activitystreams_new::{
use activitystreams::{
activity::ActorAndObject,
actor::{Actor, ApActor},
unparsed::UnparsedMutExt,

View file

@ -1,5 +1,5 @@
use crate::{data::ActorCache, error::MyError, middleware::MyVerify, requests::Requests};
use activitystreams_new::{uri, url::Url};
use activitystreams::{uri, url::Url};
use config::Environment;
use http_signature_normalization_actix::prelude::{VerifyDigest, VerifySignature};
use sha2::{Digest, Sha256};

View file

@ -1,5 +1,5 @@
use crate::{apub::AcceptedActors, db::Db, error::MyError, requests::Requests};
use activitystreams_new::{prelude::*, uri, url::Url};
use activitystreams::{prelude::*, uri, url::Url};
use log::error;
use std::{collections::HashSet, sync::Arc, time::Duration};
use tokio::sync::RwLock;

View file

@ -1,5 +1,5 @@
use crate::{db::Db, error::MyError};
use activitystreams_new::url::Url;
use activitystreams::url::Url;
use async_mutex::Mutex;
use bytes::Bytes;
use futures::join;

View file

@ -1,5 +1,5 @@
use crate::{db::Db, error::MyError};
use activitystreams_new::{uri, url::Url};
use activitystreams::{uri, url::Url};
use log::{debug, error};
use std::{
collections::{HashMap, HashSet},

View file

@ -5,7 +5,7 @@ use crate::{
error::MyError,
requests::Requests,
};
use activitystreams_new::url::Url;
use activitystreams::url::Url;
use actix_rt::{
spawn,
time::{interval_at, Instant},

View file

@ -1,5 +1,5 @@
use crate::error::MyError;
use activitystreams_new::url::Url;
use activitystreams::url::Url;
use deadpool_postgres::{Manager, Pool};
use log::{info, warn};
use rsa::RSAPrivateKey;

View file

@ -1,4 +1,4 @@
use activitystreams_new::{error::DomainError, url::ParseError};
use activitystreams::{error::DomainError, url::ParseError};
use actix_web::{
error::{BlockingError, ResponseError},
http::StatusCode,

View file

@ -7,7 +7,7 @@ use crate::{
DeliverMany, JobState,
},
};
use activitystreams_new::{activity::Announce as AsAnnounce, url::Url};
use activitystreams::{activity::Announce as AsAnnounce, url::Url};
use background_jobs::ActixJob;
use std::{future::Future, pin::Pin};

View file

@ -5,7 +5,7 @@ use crate::{
error::MyError,
jobs::{apub::prepare_activity, Deliver, JobState},
};
use activitystreams_new::{
use activitystreams::{
activity::{Accept as AsAccept, Follow as AsFollow},
prelude::*,
url::Url,

View file

@ -4,7 +4,7 @@ use crate::{
error::MyError,
jobs::{apub::get_inboxes, DeliverMany, JobState},
};
use activitystreams_new::prelude::*;
use activitystreams::prelude::*;
use background_jobs::ActixJob;
use std::{future::Future, pin::Pin};

View file

@ -3,7 +3,7 @@ use crate::{
data::{Actor, State},
error::MyError,
};
use activitystreams_new::{
use activitystreams::{
activity::{Follow as AsFollow, Undo as AsUndo},
context,
prelude::*,

View file

@ -1,5 +1,5 @@
use crate::{error::MyError, jobs::JobState};
use activitystreams_new::url::Url;
use activitystreams::url::Url;
use anyhow::Error;
use background_jobs::{ActixJob, Backoff};
use std::{future::Future, pin::Pin};

View file

@ -2,7 +2,7 @@ use crate::{
error::MyError,
jobs::{Deliver, JobState},
};
use activitystreams_new::url::Url;
use activitystreams::url::Url;
use anyhow::Error;
use background_jobs::ActixJob;
use futures::future::{ready, Ready};

View file

@ -2,7 +2,7 @@ use crate::{
config::UrlKind,
jobs::{cache_media::CacheMedia, JobState},
};
use activitystreams_new::url::Url;
use activitystreams::url::Url;
use anyhow::Error;
use background_jobs::ActixJob;
use futures::join;

View file

@ -1,5 +1,5 @@
use crate::jobs::JobState;
use activitystreams_new::url::Url;
use activitystreams::url::Url;
use anyhow::Error;
use background_jobs::ActixJob;
use std::{future::Future, pin::Pin};

View file

@ -1,5 +1,5 @@
use crate::{data::ActorCache, error::MyError, requests::Requests};
use activitystreams_new::uri;
use activitystreams::uri;
use actix_web::web;
use http_signature_normalization_actix::{prelude::*, verify::DeprecatedAlgorithm};
use log::error;

View file

@ -3,7 +3,7 @@ use crate::{
db::listen,
jobs::{JobServer, QueryInstance, QueryNodeinfo},
};
use activitystreams_new::url::Url;
use activitystreams::url::Url;
use actix_rt::{spawn, time::delay_for};
use futures::stream::{poll_fn, StreamExt};
use log::{debug, error, warn};

View file

@ -1,5 +1,5 @@
use crate::error::MyError;
use activitystreams_new::url::Url;
use activitystreams::url::Url;
use actix_web::{client::Client, http::header::Date};
use bytes::Bytes;
use http_signature_normalization_actix::prelude::*;
@ -37,7 +37,7 @@ impl Requests {
key_id,
user_agent,
private_key,
config: Config::default().dont_use_created_field(),
config: Config::default().dont_use_created_field().set_host_header(),
}
}
@ -77,15 +77,8 @@ impl Requests {
let signer = self.signer();
let client: Client = self.client.borrow().clone();
let req = client.get(url);
let host = req
.get_uri()
.host()
.ok_or(MyError::Host(url.to_string()))?
.to_string();
debug!("Host: {}", host);
let res = req
.header("Host", host)
let res = client
.get(url)
.header("Accept", accept)
.set(Date(SystemTime::now().into()))
.signature(
@ -130,15 +123,8 @@ impl Requests {
let signer = self.signer();
let client: Client = self.client.borrow().clone();
let req = client.get(url);
let host = req
.get_uri()
.host()
.ok_or(MyError::Host(url.to_string()))?
.to_string();
debug!("Host: {}", host);
let res = req
.header("Host", host)
let res = client
.get(url)
.header("Accept", "*/*")
.set(Date(SystemTime::now().into()))
.signature(
@ -198,15 +184,8 @@ impl Requests {
let item_string = serde_json::to_string(item)?;
let client: Client = self.client.borrow().clone();
let req = client.post(inbox.as_str());
let host = req
.get_uri()
.host()
.ok_or(MyError::Host(inbox.to_string()))?
.to_string();
debug!("Host: {}", host);
let res = req
.header("Host", host)
let res = client
.post(inbox.as_str())
.header("Accept", "application/activity+json")
.header("Content-Type", "application/activity+json")
.set(Date(SystemTime::now().into()))

View file

@ -6,7 +6,7 @@ use crate::{
routes::ok,
};
use activitystreams_ext::Ext1;
use activitystreams_new::{
use activitystreams::{
actor::{ApActor, Application, Endpoints},
context,
prelude::*,

View file

@ -8,7 +8,7 @@ use crate::{
requests::Requests,
routes::accepted,
};
use activitystreams_new::{
use activitystreams::{
activity, base::AnyBase, prelude::*, primitives::OneOrMany, public, url::Url,
};
use actix_web::{web, HttpResponse};

View file

@ -1,5 +1,5 @@
@use crate::data::Contact;
@use activitystreams_new::url::Url;
@use activitystreams::url::Url;
@(contact: &Contact, base: &Url)

View file

@ -1,5 +1,5 @@
@use crate::data::Info;
@use activitystreams_new::url::Url;
@use activitystreams::url::Url;
@(info: &Info, base: &Url)

View file

@ -1,5 +1,5 @@
@use crate::{data::{Contact, Instance}, templates::admin};
@use activitystreams_new::url::Url;
@use activitystreams::url::Url;
@(instance: &Instance, software: Option<&str>, contact: Option<&Contact>, base: &Url)