mirror of
https://github.com/LukeMathWalker/zero-to-production.git
synced 2024-12-18 14:06:37 +00:00
Update outdated dependencies
This commit is contained in:
parent
b5616e9d26
commit
c3e0da643e
6 changed files with 62 additions and 35 deletions
69
Cargo.lock
generated
69
Cargo.lock
generated
|
@ -145,9 +145,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "actix-session"
|
name = "actix-session"
|
||||||
version = "0.6.2"
|
version = "0.7.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0c9138a66462f1e65da829f9c0de81b44a96dfe193a4f19bfea32ee2be312368"
|
checksum = "43da8b818ae1f11049a4d218975345fe8e56ce5a5f92c11f972abcff5ff80e87"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-service",
|
"actix-service",
|
||||||
"actix-utils",
|
"actix-utils",
|
||||||
|
@ -159,7 +159,6 @@ dependencies = [
|
||||||
"redis",
|
"redis",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"time",
|
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -244,9 +243,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "actix-web-lab"
|
name = "actix-web-lab"
|
||||||
version = "0.16.9"
|
version = "0.18.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b8e25a9040595caff3abdf449185bcb846bd5da0001d916212bf370e9f146009"
|
checksum = "55b7ac6309cfb46949171c49f7bc81d021310205a39bf0b0d0465e80a4857e3c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-files",
|
"actix-files",
|
||||||
"actix-http",
|
"actix-http",
|
||||||
|
@ -255,37 +254,37 @@ dependencies = [
|
||||||
"actix-utils",
|
"actix-utils",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
"actix-web-lab-derive",
|
"actix-web-lab-derive",
|
||||||
"ahash 0.7.6",
|
"ahash 0.8.3",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"bytes",
|
"bytes",
|
||||||
"bytestring",
|
"bytestring",
|
||||||
"csv",
|
"csv",
|
||||||
"derive_more",
|
"derive_more",
|
||||||
"digest",
|
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"generic-array",
|
|
||||||
"hmac",
|
|
||||||
"http",
|
"http",
|
||||||
|
"impl-more",
|
||||||
|
"itertools",
|
||||||
"local-channel",
|
"local-channel",
|
||||||
|
"mediatype",
|
||||||
"mime",
|
"mime",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"regex",
|
"regex",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_cbor_2",
|
||||||
"serde_html_form",
|
"serde_html_form",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"subtle",
|
|
||||||
"tokio",
|
"tokio",
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "actix-web-lab-derive"
|
name = "actix-web-lab-derive"
|
||||||
version = "0.16.0"
|
version = "0.18.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a44a15d9ddb31a4f41decd22f743a154e519fb326120e8133ef9ea6283335ad2"
|
checksum = "e4419acd7924ac473ccd00a6efea324dd382b0b7ae31b8e06cd2c58d4d7afae6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -1200,6 +1199,12 @@ dependencies = [
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "half"
|
||||||
|
version = "1.8.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hashbrown"
|
name = "hashbrown"
|
||||||
version = "0.12.3"
|
version = "0.12.3"
|
||||||
|
@ -1403,6 +1408,12 @@ dependencies = [
|
||||||
"unicode-normalization",
|
"unicode-normalization",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "impl-more"
|
||||||
|
version = "0.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d14c422088773284a62e155b3e2f700a52cd3731dabe2cffd914e13f71b6bd4e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indexmap"
|
name = "indexmap"
|
||||||
version = "1.9.2"
|
version = "1.9.2"
|
||||||
|
@ -1511,9 +1522,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "linkify"
|
name = "linkify"
|
||||||
version = "0.8.1"
|
version = "0.9.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "28d9967eb7d0bc31c39c6f52e8fce42991c0cd1f7a2078326f0b7a399a584c8d"
|
checksum = "96dd5884008358112bc66093362197c7248ece00d46624e2cf71e50029f8cff5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"memchr",
|
"memchr",
|
||||||
]
|
]
|
||||||
|
@ -1579,6 +1590,12 @@ dependencies = [
|
||||||
"digest",
|
"digest",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "mediatype"
|
||||||
|
version = "0.19.13"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "fea6e62614ab2fc0faa58bb15102a0382d368f896a9fa4776592589ab55c4de7"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memchr"
|
name = "memchr"
|
||||||
version = "2.5.0"
|
version = "2.5.0"
|
||||||
|
@ -2282,15 +2299,25 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde-aux"
|
name = "serde-aux"
|
||||||
version = "3.1.0"
|
version = "4.1.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d0a77223b653fa95f3f9864f3eb25b93e4ed170687eb42d85b6b98af21d5e1de"
|
checksum = "c599b3fd89a75e0c18d6d2be693ddb12cccaf771db4ff9e39097104808a014c0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_cbor_2"
|
||||||
|
version = "0.12.0-dev"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b46d75f449e01f1eddbe9b00f432d616fbbd899b809c837d0fbc380496a0dd55"
|
||||||
|
dependencies = [
|
||||||
|
"half",
|
||||||
|
"serde",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.152"
|
version = "1.0.152"
|
||||||
|
@ -2749,9 +2776,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-actix-web"
|
name = "tracing-actix-web"
|
||||||
version = "0.6.2"
|
version = "0.7.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d725b8fa6ef307b3f4856913523337de45c47cc79271bafd7acfb39559e3a2da"
|
checksum = "4082e4d81173e0b7ad3cfb71e9eaef0dd0cbb7b139fdb56394f488a3b0760b23"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-web",
|
"actix-web",
|
||||||
"pin-project",
|
"pin-project",
|
||||||
|
@ -2927,9 +2954,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "validator"
|
name = "validator"
|
||||||
version = "0.15.0"
|
version = "0.16.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f07b0a1390e01c0fc35ebb26b28ced33c9a3808f7f9fbe94d3cc01e233bfeed5"
|
checksum = "32ad5bf234c7d3ad1042e5252b7eddb2c4669ee23f32c7dd0e9b7705f07ef591"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"idna 0.2.3",
|
"idna 0.2.3",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
|
@ -3253,7 +3280,7 @@ dependencies = [
|
||||||
"actix-web-lab",
|
"actix-web-lab",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"argon2",
|
"argon2",
|
||||||
"base64 0.13.1",
|
"base64 0.21.0",
|
||||||
"chrono",
|
"chrono",
|
||||||
"claims",
|
"claims",
|
||||||
"config",
|
"config",
|
||||||
|
|
14
Cargo.toml
14
Cargo.toml
|
@ -27,19 +27,19 @@ tracing-subscriber = { version = "0.3", features = ["registry", "env-filter"] }
|
||||||
tracing-bunyan-formatter = "0.3"
|
tracing-bunyan-formatter = "0.3"
|
||||||
tracing-log = "0.1.1"
|
tracing-log = "0.1.1"
|
||||||
thiserror = "1.0.24"
|
thiserror = "1.0.24"
|
||||||
serde-aux = "3"
|
serde-aux = "4"
|
||||||
unicode-segmentation = "1.7.1"
|
unicode-segmentation = "1.7.1"
|
||||||
rand = { version = "0.8", features=["std_rng"] }
|
rand = { version = "0.8", features=["std_rng"] }
|
||||||
anyhow = "1.0.40"
|
anyhow = "1.0.40"
|
||||||
base64 = "0.13.0"
|
base64 = "0.21.0"
|
||||||
argon2 = { version = "0.4", features = ["std"] }
|
argon2 = { version = "0.4", features = ["std"] }
|
||||||
validator = "0.15.0"
|
validator = "0.16"
|
||||||
tracing-actix-web = "0.6"
|
tracing-actix-web = "0.7"
|
||||||
secrecy = { version = "0.8", features = ["serde"] }
|
secrecy = { version = "0.8", features = ["serde"] }
|
||||||
actix-web-flash-messages = { version = "0.4", features = ["cookies"] }
|
actix-web-flash-messages = { version = "0.4", features = ["cookies"] }
|
||||||
actix-session = { version = "0.6", features = ["redis-rs-tls-session"] }
|
actix-session = { version = "0.7", features = ["redis-rs-tls-session"] }
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
actix-web-lab = "0.16"
|
actix-web-lab = "0.18"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
once_cell = "1.7.2"
|
once_cell = "1.7.2"
|
||||||
|
@ -49,5 +49,5 @@ quickcheck_macros = "0.9.1"
|
||||||
fake = "~2.3.0"
|
fake = "~2.3.0"
|
||||||
wiremock = "0.5"
|
wiremock = "0.5"
|
||||||
serde_json = "1.0.61"
|
serde_json = "1.0.61"
|
||||||
linkify = "0.8.0"
|
|
||||||
serde_urlencoded = "0.7.1"
|
serde_urlencoded = "0.7.1"
|
||||||
|
linkify = "0.9"
|
|
@ -15,6 +15,6 @@ docker run \
|
||||||
-p "6379:6379" \
|
-p "6379:6379" \
|
||||||
-d \
|
-d \
|
||||||
--name "redis_$(date '+%s')" \
|
--name "redis_$(date '+%s')" \
|
||||||
redis:6
|
redis:7
|
||||||
|
|
||||||
>&2 echo "Redis is ready to go!"
|
>&2 echo "Redis is ready to go!"
|
|
@ -102,7 +102,7 @@ pub fn get_configuration() -> Result<Settings, config::ConfigError> {
|
||||||
configuration_directory.join("base.yaml"),
|
configuration_directory.join("base.yaml"),
|
||||||
))
|
))
|
||||||
.add_source(config::File::from(
|
.add_source(config::File::from(
|
||||||
configuration_directory.join(&environment_filename),
|
configuration_directory.join(environment_filename),
|
||||||
))
|
))
|
||||||
// Add in settings from environment variables (with a prefix of APP and '__' as separator)
|
// Add in settings from environment variables (with a prefix of APP and '__' as separator)
|
||||||
// E.g. `APP_APPLICATION__PORT=5001 would set `Settings.application.port`
|
// E.g. `APP_APPLICATION__PORT=5001 would set `Settings.application.port`
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use actix_session::Session;
|
use actix_session::{Session, SessionGetError, SessionInsertError};
|
||||||
use actix_session::SessionExt;
|
use actix_session::SessionExt;
|
||||||
use actix_web::dev::Payload;
|
use actix_web::dev::Payload;
|
||||||
use actix_web::{FromRequest, HttpRequest};
|
use actix_web::{FromRequest, HttpRequest};
|
||||||
|
@ -14,11 +14,11 @@ impl TypedSession {
|
||||||
self.0.renew();
|
self.0.renew();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn insert_user_id(&self, user_id: Uuid) -> Result<(), serde_json::Error> {
|
pub fn insert_user_id(&self, user_id: Uuid) -> Result<(), SessionInsertError> {
|
||||||
self.0.insert(Self::USER_ID_KEY, user_id)
|
self.0.insert(Self::USER_ID_KEY, user_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_user_id(&self) -> Result<Option<Uuid>, serde_json::Error> {
|
pub fn get_user_id(&self) -> Result<Option<Uuid>, SessionGetError> {
|
||||||
self.0.get(Self::USER_ID_KEY)
|
self.0.get(Self::USER_ID_KEY)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ impl Application {
|
||||||
"{}:{}",
|
"{}:{}",
|
||||||
configuration.application.host, configuration.application.port
|
configuration.application.host, configuration.application.port
|
||||||
);
|
);
|
||||||
let listener = TcpListener::bind(&address)?;
|
let listener = TcpListener::bind(address)?;
|
||||||
let port = listener.local_addr().unwrap().port();
|
let port = listener.local_addr().unwrap().port();
|
||||||
let server = run(
|
let server = run(
|
||||||
listener,
|
listener,
|
||||||
|
|
Loading…
Reference in a new issue