Unify dependencies
This commit is contained in:
parent
c8730485d0
commit
7047a309d4
544
Cargo.lock
generated
544
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -10,6 +10,7 @@
|
||||
|
||||
[workspace]
|
||||
members = [
|
||||
"./shared/common",
|
||||
"./jirs-cli",
|
||||
"./jirs-server",
|
||||
"./shared/jirs-config",
|
||||
|
@ -13,12 +13,10 @@ name = "amazon_actor"
|
||||
path = "./src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
serde = "*"
|
||||
|
||||
common = { path = "../../shared/common" }
|
||||
actix = { version = "0.10.0" }
|
||||
actix-service = { version = "*" }
|
||||
actix-rt = "1"
|
||||
actix-web-actors = "*"
|
||||
|
||||
serde = { version = "*" }
|
||||
|
||||
bytes = { version = "0.5.6" }
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
extern crate common;
|
||||
use rusoto_s3::{PutObjectRequest, S3Client, S3};
|
||||
|
||||
#[derive(Debug)]
|
||||
|
@ -13,13 +13,13 @@ name = "database_actor"
|
||||
path = "./src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
common = { path = "../../shared/common" }
|
||||
actix = { version = "0.10.0" }
|
||||
|
||||
serde = "*"
|
||||
bincode = "*"
|
||||
toml = { version = "*" }
|
||||
|
||||
actix = { version = "0.10.0" }
|
||||
actix-web = { version = "*" }
|
||||
|
||||
futures = { version = "0.3.8" }
|
||||
openssl-sys = { version = "*", features = ["vendored"] }
|
||||
libc = { version = "0.2.0", default-features = false }
|
||||
@ -58,5 +58,5 @@ features = ["backend"]
|
||||
path = "../../derive/derive_db_execute"
|
||||
|
||||
[dependencies.diesel]
|
||||
version = "1.4.5"
|
||||
version = "*"
|
||||
features = ["unstable", "postgres", "numeric", "extras", "uuidv07"]
|
||||
|
@ -13,6 +13,7 @@ name = "filesystem_actor"
|
||||
path = "./src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
common = { path = "../../shared/common" }
|
||||
actix = { version = "0.10.0" }
|
||||
|
||||
futures = { version = "0.3.8" }
|
||||
|
@ -13,12 +13,14 @@ name = "highlight_actor"
|
||||
path = "./src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
common = { path = "../../shared/common" }
|
||||
actix = { version = "0.10.0" }
|
||||
|
||||
serde = "*"
|
||||
bincode = "*"
|
||||
toml = { version = "*" }
|
||||
|
||||
simsearch = { version = "0.2" }
|
||||
actix = { version = "0.10.0" }
|
||||
|
||||
flate2 = { version = "*" }
|
||||
syntect = { version = "*" }
|
||||
|
@ -13,6 +13,7 @@ name = "mail_actor"
|
||||
path = "./src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
common = { path = "../../shared/common" }
|
||||
actix = { version = "0.10.0" }
|
||||
|
||||
serde = "*"
|
||||
|
@ -18,16 +18,13 @@ aws-s3 = ["amazon-actor"]
|
||||
default = ["local-storage", "aws-s3"]
|
||||
|
||||
[dependencies]
|
||||
common = { path = "../../shared/common" }
|
||||
actix = { version = "0.10.0" }
|
||||
|
||||
serde = "*"
|
||||
bincode = "*"
|
||||
toml = { version = "*" }
|
||||
|
||||
actix = { version = "0.10.0" }
|
||||
actix-web = { version = "*" }
|
||||
actix-cors = { version = "*" }
|
||||
actix-service = { version = "*" }
|
||||
actix-rt = "1"
|
||||
actix-web-actors = "*"
|
||||
actix-multipart = "*"
|
||||
|
||||
bytes = { version = "0.5.6" }
|
||||
|
@ -5,6 +5,7 @@ use actix_multipart::{Field, Multipart};
|
||||
use actix_web::http::header::ContentDisposition;
|
||||
use actix_web::web::Data;
|
||||
use actix_web::{post, web, Error, HttpResponse};
|
||||
use common::*;
|
||||
use database_actor::authorize_user::AuthorizeUser;
|
||||
use database_actor::user_projects::CurrentUserProject;
|
||||
use database_actor::users::UpdateAvatarUrl;
|
||||
|
@ -1,4 +1,5 @@
|
||||
use actix_web::HttpResponse;
|
||||
use common::*;
|
||||
use jirs_data::msg::WsError;
|
||||
use jirs_data::ErrorResponse;
|
||||
|
||||
|
@ -3,6 +3,7 @@ use actix_multipart::Field;
|
||||
use actix_web::http::header::ContentDisposition;
|
||||
use actix_web::web::Data;
|
||||
use actix_web::Error;
|
||||
use common::*;
|
||||
use futures::StreamExt;
|
||||
use jirs_data::UserId;
|
||||
use tokio::sync::broadcast::{Receiver, Sender};
|
||||
|
@ -4,6 +4,7 @@ extern crate log;
|
||||
use actix::Addr;
|
||||
use actix_web::web::Data;
|
||||
use actix_web::{HttpRequest, HttpResponse};
|
||||
use common::*;
|
||||
use database_actor::authorize_user::AuthorizeUser;
|
||||
use database_actor::DbExecutor;
|
||||
pub use errors::*;
|
||||
|
@ -1,11 +1,13 @@
|
||||
use actix_web::http::header::{self};
|
||||
use actix_web::http::HeaderMap;
|
||||
use common::*;
|
||||
|
||||
pub fn token_from_headers(
|
||||
headers: &HeaderMap,
|
||||
) -> std::result::Result<uuid::Uuid, crate::errors::ServiceError> {
|
||||
headers
|
||||
.get(header::AUTHORIZATION).ok_or(crate::errors::ServiceError::Unauthorized)
|
||||
.get(header::AUTHORIZATION)
|
||||
.ok_or(crate::errors::ServiceError::Unauthorized)
|
||||
.map(|h| h.to_str().unwrap_or_default())
|
||||
.and_then(|s| parse_bearer(s))
|
||||
}
|
||||
|
@ -13,13 +13,12 @@ name = "websocket_actor"
|
||||
path = "./src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
serde = "*"
|
||||
bincode = "*"
|
||||
toml = { version = "*" }
|
||||
|
||||
common = { path = "../../shared/common" }
|
||||
actix = { version = "0.10.0" }
|
||||
actix-web = { version = "*" }
|
||||
actix-web-actors = "*"
|
||||
|
||||
serde = { version = "*" }
|
||||
bincode = { version = "*" }
|
||||
toml = { version = "*" }
|
||||
|
||||
futures = { version = "0.3.8" }
|
||||
openssl-sys = { version = "*", features = ["vendored"] }
|
||||
|
@ -5,6 +5,7 @@ use actix::{Actor, ActorContext, Addr, AsyncContext, Handler, Recipient, StreamH
|
||||
use actix_web::web::{self, Data};
|
||||
use actix_web::{get, Error, HttpRequest, HttpResponse};
|
||||
use actix_web_actors::ws;
|
||||
use common::{actix_web, actix_web_actors};
|
||||
use database_actor::projects::LoadCurrentProject;
|
||||
use database_actor::user_projects::CurrentUserProject;
|
||||
use database_actor::DbExecutor;
|
||||
|
@ -16,8 +16,8 @@ use crate::components::styled_textarea::StyledTextarea;
|
||||
use crate::modals::epic_field;
|
||||
use crate::modals::issues_create::{Model as AddIssueModal, Type};
|
||||
use crate::model::Model;
|
||||
use crate::{FieldId, Msg};
|
||||
use crate::shared::validate::Validator;
|
||||
use crate::{FieldId, Msg};
|
||||
|
||||
pub fn view(model: &Model, modal: &AddIssueModal) -> Node<Msg> {
|
||||
let issue_type = modal
|
||||
|
@ -18,12 +18,8 @@ local-storage = ["filesystem-actor"]
|
||||
default = ["local-storage"]
|
||||
|
||||
[dependencies]
|
||||
common = { path = "../shared/common" }
|
||||
actix = { version = "0.10.0" }
|
||||
actix-web = { version = "*" }
|
||||
actix-cors = { version = "*" }
|
||||
actix-service = { version = "*" }
|
||||
actix-rt = "1"
|
||||
actix-web-actors = "*"
|
||||
|
||||
dotenv = { version = "*" }
|
||||
|
||||
@ -42,12 +38,12 @@ bitflags = { version = "1.0" }
|
||||
|
||||
serde = { version = "*", features = ["derive"] }
|
||||
serde_json = { version = ">=0.8.0, <2.0" }
|
||||
toml = "0.5.6"
|
||||
bincode = "1.2.1"
|
||||
toml = { version = "0.5.6" }
|
||||
bincode = { version = "1.2.1" }
|
||||
|
||||
log = "0.4"
|
||||
pretty_env_logger = "0.4"
|
||||
env_logger = "0.7"
|
||||
log = { version = "0.4" }
|
||||
pretty_env_logger = { version = "0.4" }
|
||||
env_logger = { version = "0.7" }
|
||||
|
||||
async-trait = { version = "*" }
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
use actix_web::HttpResponse;
|
||||
use common::*;
|
||||
use jirs_data::msg::WsError;
|
||||
use jirs_data::ErrorResponse;
|
||||
|
||||
|
@ -1,8 +1,11 @@
|
||||
#![feature(async_closure)]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
extern crate common;
|
||||
|
||||
use actix::Actor;
|
||||
use actix_web::{App, HttpServer};
|
||||
use common::*;
|
||||
|
||||
pub mod errors;
|
||||
|
||||
|
23
shared/common/Cargo.toml
Normal file
23
shared/common/Cargo.toml
Normal file
@ -0,0 +1,23 @@
|
||||
[package]
|
||||
name = "common"
|
||||
version = "0.1.0"
|
||||
authors = ["Adrian Wozniak <adrian.wozniak@ita-prog.pl>"]
|
||||
edition = "2018"
|
||||
description = "JIRS (Simplified JIRA in Rust) Actix server"
|
||||
repository = "https://gitlab.com/adrian.wozniak/jirs"
|
||||
license = "MPL-2.0"
|
||||
|
||||
[dependencies]
|
||||
actix = { version = "0.10.0" }
|
||||
|
||||
actix-web = { version = "*" }
|
||||
actix-cors = { version = "*" }
|
||||
actix-service = { version = "*" }
|
||||
actix-rt = { version = "1" }
|
||||
actix-web-actors = { version = "*" }
|
||||
actix_derive = { version = "*" }
|
||||
|
||||
serde = { version = "*" }
|
||||
serde_derive = { version = "*" }
|
||||
|
||||
reexport-proc-macro = { version = "*" }
|
7
shared/common/src/lib.rs
Normal file
7
shared/common/src/lib.rs
Normal file
@ -0,0 +1,7 @@
|
||||
#[macro_use]
|
||||
extern crate reexport_proc_macro;
|
||||
|
||||
pub use {actix_cors, actix_rt, actix_service, actix_web, actix_web_actors, serde};
|
||||
|
||||
reexport_proc_macro!(actix_derive);
|
||||
reexport_proc_macro!(serde_derive);
|
@ -28,7 +28,7 @@ optional = true
|
||||
|
||||
[dependencies.diesel]
|
||||
optional = true
|
||||
version = "1.4.5"
|
||||
version = "*"
|
||||
features = ["unstable", "postgres", "numeric", "extras", "uuidv07"]
|
||||
|
||||
[dependencies.derive_enum_iter]
|
||||
|
Loading…
Reference in New Issue
Block a user