diff --git a/CHANGELOG.md b/CHANGELOG.md index ec6d1842..7976b569 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [[0.11.5]](https://github.com/thoth-pub/thoth/releases/tag/v0.11.5) - 2023-09-05 +### Security + - Upgrade `actix-web` to v4.4.0 + - Upgrade `tempfile` to v3.8.0 + +### Changed + - Upgrade `diesel` to v2.1.1 + - Upgrade `diesel-derive-enum` to v2.1.0 + - Upgrade `diesel-derive-newtype` to v2.1.0 + - Upgrade `diesel_migrations` to v2.1.0 + - Upgrade `rand` to v0.8.5 + - Upgrade `juniper` to v0.15.11 + - Upgrade `strum` to v0.25.0 + - Upgrade `paperclip` to v0.8.1 + - Upgrade `graphql_client` to v0.13.0 + - Upgrade `reqwest-middleware` to v0.2.3 + - Upgrade `reqwest-retry` to v0.2.3 + - Upgrade `actix-identity` to v0.5.2 and added `actix-session` v0.7.2 + - Upgrade `dialoguer` to v0.10.4 + - Upgrade `futures` to v0.3.28 + - Upgrade `regex` to v1.9.5 + - Upgrade `jsonwebtoken` to v8.3.0 + - Upgrade `csv` to v1.2.2 + - Upgrade `xml-rs` to v0.8.17 + - Upgrade `log` to v0.4.20 + - Upgrade `clap` to v4.4.2 + - Short version of host command is now `-H` instead of `-h` in CLI + ## [[0.11.4]](https://github.com/thoth-pub/thoth/releases/tag/v0.11.4) - 2023-08-28 ### Security - Upgrade `rustls-webpki` to v0.100.2 diff --git a/Cargo.lock b/Cargo.lock index b6f8e789..3a5f42d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57a7559404a7f3573127aab53c08ce37a6c6a315c374a31070f3c91cd1b4a7fe" dependencies = [ - "bitflags", + "bitflags 1.2.1", "bytes", "futures-core", "futures-sink", @@ -16,7 +16,7 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", - "tokio-util 0.7.0", + "tokio-util", ] [[package]] @@ -36,9 +36,9 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0070905b2c4a98d184c4e81025253cb192aa8a73827553f38e9410801ceb35bb" +checksum = "a92ef85799cba03f76e4f7c10f533e66d87c9a7e7055f3391f09000ad8351bc9" dependencies = [ "actix-codec", "actix-rt", @@ -46,7 +46,7 @@ dependencies = [ "actix-utils", "ahash", "base64 0.21.0", - "bitflags", + "bitflags 2.4.0", "brotli", "bytes", "bytestring", @@ -58,7 +58,7 @@ dependencies = [ "http", "httparse", "httpdate", - "itoa 1.0.1", + "itoa", "language-tags", "local-channel", "mime", @@ -68,24 +68,25 @@ dependencies = [ "sha1", "smallvec", "tokio", - "tokio-util 0.7.0", + "tokio-util", "tracing", "zstd 0.12.3+zstd.1.5.2", ] [[package]] name = "actix-identity" -version = "0.4.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "171fe3ed055b2dd50c61967911d253d47e76e1d4308acfbf99fc7affe5ec42aa" +checksum = "1224c9f9593dc27c9077b233ce04adedc1d7febcfc35ee9f53ea3c24df180bec" dependencies = [ "actix-service", + "actix-session", "actix-utils", "actix-web", - "futures-util", + "anyhow", + "futures-core", "serde", - "serde_json", - "time 0.3.7", + "tracing", ] [[package]] @@ -94,7 +95,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" dependencies = [ - "quote 1.0.26", + "quote", "syn 1.0.107", ] @@ -136,7 +137,7 @@ dependencies = [ "log", "mio", "num_cpus", - "socket2", + "socket2 0.4.4", "tokio", ] @@ -151,6 +152,23 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "actix-session" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43da8b818ae1f11049a4d218975345fe8e56ce5a5f92c11f972abcff5ff80e87" +dependencies = [ + "actix-service", + "actix-utils", + "actix-web", + "anyhow", + "async-trait", + "derive_more", + "serde", + "serde_json", + "tracing", +] + [[package]] name = "actix-utils" version = "3.0.0" @@ -163,9 +181,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464e0fddc668ede5f26ec1f9557a8d44eda948732f40c6b0ad79126930eb775f" +checksum = "0e4a5b5e29603ca8c94a77c65cf874718ceb60292c5a5c3e5f4ace041af462b9" dependencies = [ "actix-codec", "actix-http", @@ -185,8 +203,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "http", - "itoa 1.0.1", + "itoa", "language-tags", "log", "mime", @@ -197,38 +214,32 @@ dependencies = [ "serde_json", "serde_urlencoded", "smallvec", - "socket2", + "socket2 0.5.3", "time 0.3.7", "url", ] [[package]] name = "actix-web-codegen" -version = "4.1.0" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa9362663c8643d67b2d5eafba49e4cb2c8a053a29ed00a0bea121f17c76b13" +checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5" dependencies = [ "actix-router", - "proc-macro2 1.0.53", - "quote 1.0.26", - "syn 1.0.107", + "proc-macro2", + "quote", + "syn 2.0.31", ] [[package]] name = "addr2line" -version = "0.13.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" - [[package]] name = "adler" version = "1.0.2" @@ -272,20 +283,21 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "getrandom 0.2.2", + "cfg-if 1.0.0", + "getrandom 0.2.10", "once_cell", "version_check", ] [[package]] name = "aho-corasick" -version = "0.7.18" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" dependencies = [ "memchr", ] @@ -320,27 +332,17 @@ dependencies = [ "libc", ] -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - [[package]] name = "anstream" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] @@ -370,9 +372,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -439,8 +441,8 @@ version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -463,14 +465,15 @@ checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" [[package]] name = "backtrace" -version = "0.3.50" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", - "cfg-if 0.1.10", + "cc", + "cfg-if 1.0.0", "libc", - "miniz_oxide 0.4.2", + "miniz_oxide 0.7.1", "object", "rustc-demangle", ] @@ -526,6 +529,12 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +[[package]] +name = "bitflags" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" + [[package]] name = "blake2-rfc" version = "0.2.18" @@ -589,18 +598,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "bstr" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a40b47ad93e1a5404e6c18dec46b628214fee441c70f4ab5d6942142cc268a3d" -dependencies = [ - "lazy_static", - "memchr", - "regex-automata", - "serde", -] - [[package]] name = "bumpalo" version = "3.12.0" @@ -759,53 +756,36 @@ dependencies = [ [[package]] name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "ansi_term", - "atty", - "bitflags", - "strsim 0.8.0", - "textwrap", - "unicode-width", - "vec_map", -] - -[[package]] -name = "clap" -version = "4.3.4" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80672091db20273a15cf9fdd4e47ed43b5091ec9841bf4c6145c9dfbbcae09ed" +checksum = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.4" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1458a1df40e1e2afebb7ab60ce55c1fa8f431146205aa5f4887e0b111c27636" +checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" dependencies = [ "anstream", "anstyle", - "bitflags", "clap_lex", - "strsim 0.10.0", + "strsim", ] [[package]] name = "clap_derive" -version = "4.3.2" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ "heck", - "proc-macro2 1.0.53", - "quote 1.0.26", - "syn 2.0.8", + "proc-macro2", + "quote", + "syn 2.0.31", ] [[package]] @@ -852,22 +832,6 @@ dependencies = [ "unreachable", ] -[[package]] -name = "console" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a50aab2529019abfabfa93f1e6c41ef392f91fbf179b347a7e96abb524884a08" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "regex", - "terminal_size", - "unicode-width", - "winapi", - "winapi-util", -] - [[package]] name = "console" version = "0.15.5" @@ -976,13 +940,12 @@ dependencies = [ [[package]] name = "csv" -version = "1.1.6" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" +checksum = "626ae34994d3d8d668f4269922248239db4ae42d538b14c398b74a52208e8086" dependencies = [ - "bstr", "csv-core", - "itoa 0.4.5", + "itoa", "ryu", "serde", ] @@ -1026,8 +989,8 @@ dependencies = [ "cc", "codespan-reporting", "once_cell", - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "scratch", "syn 1.0.107", ] @@ -1044,8 +1007,8 @@ version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34fa7e395dc1c001083c7eed28c8f0f0b5a225610f3b6284675f444af6fab86b" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -1056,8 +1019,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cc7b9cef1e351660e5443924e4f43ab25fbbed3e9a5f052df3677deb4d6b320" dependencies = [ "convert_case", - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -1067,46 +1030,34 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "532b4c15dccee12c7044f1fcad956e98410860b22231e44a3b827464797ca7bf" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", ] [[package]] name = "dialoguer" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f807b2943dc90f9747497d9d65d7e92472149be0b88bf4ce1201b4ac979c26" -dependencies = [ - "console 0.13.0", - "lazy_static", - "tempfile", - "zeroize 0.9.3", -] - -[[package]] -name = "dialoguer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af3c796f3b0b408d9fd581611b47fa850821fcb84aa640b83a3c1a5be2d691f2" +checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" dependencies = [ - "console 0.15.5", + "console", "shell-words", "tempfile", - "zeroize 1.5.7", + "zeroize", ] [[package]] name = "diesel" -version = "2.0.2" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68c186a7418a2aac330bb76cde82f16c36b03a66fb91db32d20214311f9f6545" +checksum = "d98235fdc2f355d330a8244184ab6b4b33c28679c0b4158f63138e51d6cf7e88" dependencies = [ - "bitflags", + "bitflags 2.4.0", "byteorder", "chrono", "diesel_derives", - "itoa 1.0.1", + "itoa", "pq-sys", "r2d2", "serde_json", @@ -1115,50 +1066,59 @@ dependencies = [ [[package]] name = "diesel-derive-enum" -version = "2.0.0-rc.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f28fc9f5bf184ebc58ad9105dede024981e2303fe878a0fe16557f3a979064a" +checksum = "81c5131a2895ef64741dad1d483f358c2a229a3a2d1b256778cdc5e146db64d4" dependencies = [ "heck", - "proc-macro2 1.0.53", - "quote 1.0.26", - "syn 1.0.107", + "proc-macro2", + "quote", + "syn 2.0.31", ] [[package]] name = "diesel-derive-newtype" -version = "2.0.0-rc.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd577654b63c049f4eecd2ce1187740a050166372673f6b09c351c53b575c34a" +checksum = "c7267437d5b12df60ae29bd97f8d120f1c3a6272d6f213551afa56bbb2ecfbb7" dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.14.9", + "proc-macro2", + "quote", + "syn 2.0.31", ] [[package]] name = "diesel_derives" -version = "2.0.2" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad74fdcf086be3d4fdd142f67937678fe60ed431c3b2f08599e7687269410c4" +checksum = "e054665eaf6d97d1e7125512bb2d35d07c73ac86cc6920174cb42d1ab697a554" dependencies = [ - "proc-macro-error", - "proc-macro2 1.0.53", - "quote 1.0.26", - "syn 1.0.107", + "diesel_table_macro_syntax", + "proc-macro2", + "quote", + "syn 2.0.31", ] [[package]] name = "diesel_migrations" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9ae22beef5e9d6fab9225ddb073c1c6c1a7a6ded5019d5da11d1e5c5adc34e2" +checksum = "6036b3f0120c5961381b570ee20a02432d7e2d27ea60de9578799cf9156914ac" dependencies = [ "diesel", "migrations_internals", "migrations_macros", ] +[[package]] +name = "diesel_table_macro_syntax" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" +dependencies = [ + "syn 2.0.31", +] + [[package]] name = "digest" version = "0.10.3" @@ -1252,6 +1212,12 @@ dependencies = [ "libc", ] +[[package]] +name = "fastrand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + [[package]] name = "filetime" version = "0.2.14" @@ -1323,9 +1289,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -1338,9 +1304,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -1348,9 +1314,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-enum" @@ -1359,15 +1325,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3422d14de7903a52e9dbc10ae05a7e14445ec61890100e098754e120b2bd7b1e" dependencies = [ "derive_utils", - "quote 1.0.26", + "quote", "syn 1.0.107", ] [[package]] name = "futures-executor" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -1376,38 +1342,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.26", - "syn 1.0.107", + "proc-macro2", + "quote", + "syn 2.0.31", ] [[package]] name = "futures-sink" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -1433,25 +1399,25 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.14" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] name = "getrandom" -version = "0.2.2" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if 1.0.0", "js-sys", "libc", - "wasi 0.10.0+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] @@ -1467,9 +1433,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.22.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "glob" @@ -1650,9 +1616,9 @@ dependencies = [ [[package]] name = "graphql_client" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa61bb9dc6d373a8b465a5da17b62809483e8527a34b0e9034dc0915b09e160a" +checksum = "09cdf7b487d864c2939b23902291a5041bc4a84418268f25fda1c8d4e15ad8fa" dependencies = [ "graphql_query_derive", "serde", @@ -1661,16 +1627,16 @@ dependencies = [ [[package]] name = "graphql_client_codegen" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e55df64cc702c4ad6647f8df13a799ad11688a3781fadf5045f7ba12733fa9b" +checksum = "a40f793251171991c4eb75bd84bc640afa8b68ff6907bc89d3b712a22f700506" dependencies = [ "graphql-introspection-query", "graphql-parser 0.4.0", "heck", "lazy_static", - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "serde", "serde_json", "syn 1.0.107", @@ -1678,20 +1644,20 @@ dependencies = [ [[package]] name = "graphql_query_derive" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52fc9cde811f44b15ec0692b31e56a3067f6f431c5ace712f286e47c1dacc98" +checksum = "00bda454f3d313f909298f626115092d348bc231025699f557b27e248475f48c" dependencies = [ "graphql_client_codegen", - "proc-macro2 1.0.53", + "proc-macro2", "syn 1.0.107", ] [[package]] name = "h2" -version = "0.3.11" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9f1f717ddc7b2ba36df7e871fd88db79326551d3d6f1fc406fbfd28b582ff8e" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -1702,7 +1668,7 @@ dependencies = [ "indexmap", "slab", "tokio", - "tokio-util 0.6.9", + "tokio-util", "tracing", ] @@ -1714,9 +1680,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" @@ -1765,7 +1731,7 @@ checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa 1.0.1", + "itoa", ] [[package]] @@ -1827,9 +1793,9 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.1", + "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.4", "tokio", "tower-service", "tracing", @@ -1895,6 +1861,18 @@ dependencies = [ "serde", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "io-lifetimes" version = "1.0.5" @@ -1919,7 +1897,7 @@ checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", - "rustix", + "rustix 0.37.3", "windows-sys 0.48.0", ] @@ -1952,12 +1930,6 @@ dependencies = [ "either", ] -[[package]] -name = "itoa" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" - [[package]] name = "itoa" version = "1.0.1" @@ -1984,11 +1956,11 @@ dependencies = [ [[package]] name = "jsonwebtoken" -version = "8.2.0" +version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f4f04699947111ec1733e71778d763555737579e44b85844cae8e1940a1828" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ - "base64 0.13.0", + "base64 0.21.0", "pem", "ring", "serde", @@ -1998,9 +1970,9 @@ dependencies = [ [[package]] name = "juniper" -version = "0.15.10" +version = "0.15.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f478f229a8ab52ff242f3250c8b3b8fe0a59b5b934f9706b7bdbc980991a7b6" +checksum = "52adf17d43d0b526eed31fac15d9312941c5c2558ffbfb105811690b96d6e2f1" dependencies = [ "async-trait", "bson", @@ -2025,8 +1997,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aee97671061ad50301ba077d054d295e01d31a1868fbd07902db651f987e71db" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -2044,9 +2016,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "link-cplusplus" @@ -2069,6 +2041,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +[[package]] +name = "linux-raw-sys" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" + [[package]] name = "local-channel" version = "0.1.2" @@ -2098,12 +2076,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "marc" @@ -2122,29 +2097,29 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "memchr" -version = "2.4.1" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "migrations_internals" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c493c09323068c01e54c685f7da41a9ccf9219735c3766fbfd6099806ea08fbc" +checksum = "0f23f71580015254b020e856feac3df5878c2c7a8812297edd6c0a485ac9dada" dependencies = [ "serde", - "toml 0.5.11", + "toml 0.7.4", ] [[package]] name = "migrations_macros" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a8ff27a350511de30cdabb77147501c36ef02e0451d957abea2f30caffb2b58" +checksum = "cce3325ac70e67bbab5bd837a31cae01f1a6db64e0e744a33cb03a543469ef08" dependencies = [ "migrations_internals", - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", ] [[package]] @@ -2165,21 +2140,20 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.4.2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c60c0dfe32c10b43a144bad8fc83538c52f58302c92300ea7ec7bf7b38d5a7b9" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" dependencies = [ - "adler 0.2.3", - "autocfg", + "adler", ] [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ - "adler 1.0.2", + "adler", ] [[package]] @@ -2269,9 +2243,12 @@ dependencies = [ [[package]] name = "object" -version = "0.20.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" +checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" +dependencies = [ + "memchr", +] [[package]] name = "once_cell" @@ -2291,7 +2268,7 @@ version = "0.10.56" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" dependencies = [ - "bitflags", + "bitflags 1.2.1", "cfg-if 1.0.0", "foreign-types", "libc", @@ -2306,8 +2283,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -2340,9 +2317,9 @@ dependencies = [ [[package]] name = "paperclip" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "461c6d9997c512648e9cfd41575a3e0d3f46a1ec3c8214a32dd91b729487b1dc" +checksum = "28494885202a294fbdc5373689bfc6a7c1ba1fd9282da7d257c4f5c0f36e6507" dependencies = [ "anyhow", "itertools", @@ -2361,9 +2338,9 @@ dependencies = [ [[package]] name = "paperclip-actix" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8e2adab1a71766521af58973719fb66bd7b92e6ce8a3acf1e83c7acc0e78e17" +checksum = "2f18195a2ed73948ba5222622d5304d869fb6ffd7729131e04ad8e47e4fc11bf" dependencies = [ "actix-service", "actix-web", @@ -2377,9 +2354,9 @@ dependencies = [ [[package]] name = "paperclip-core" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53eecc65b19fa7884e3e6939e54ba5104ec179894728bca6f6cee67adfa145e" +checksum = "afd7633cf02474b3369a0b3bb11b4c979677bfff44affd3ef3867f6d53ac069b" dependencies = [ "actix-web", "mime", @@ -2396,22 +2373,33 @@ dependencies = [ [[package]] name = "paperclip-macros" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0e23a129dc95a45661cbbfac1b8f865094131da7937738a343d00f47d87fada" +checksum = "ce6e25ce2c5362c8d48dc89e0f9ca076d507f7c1eabd04f0d593cdf5addff90c" dependencies = [ "heck", "http", "lazy_static", "mime", "proc-macro-error", - "proc-macro2 1.0.53", - "quote 1.0.26", - "strum", - "strum_macros", + "proc-macro2", + "quote", + "strum 0.24.1", + "strum_macros 0.24.0", "syn 1.0.107", ] +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + [[package]] name = "parking_lot" version = "0.12.1" @@ -2419,7 +2407,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core", + "parking_lot_core 0.9.1", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", ] [[package]] @@ -2516,8 +2518,8 @@ checksum = "92aacdc5f16768709a569e913f7451034034178b05bdc8acda226659a3dccc66" dependencies = [ "phf_generator", "phf_shared", - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -2532,9 +2534,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.8" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2582,8 +2584,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", "version_check", ] @@ -2594,45 +2596,27 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "version_check", ] [[package]] name = "proc-macro2" -version = "0.4.30" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "proc-macro2" -version = "1.0.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "0.6.13" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ - "proc-macro2 0.4.30", -] - -[[package]] -name = "quote" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" -dependencies = [ - "proc-macro2 1.0.53", + "proc-macro2", ] [[package]] @@ -2642,7 +2626,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" dependencies = [ "log", - "parking_lot", + "parking_lot 0.12.1", "scheduled-thread-pool", ] @@ -2652,7 +2636,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom 0.1.14", + "getrandom 0.1.16", "libc", "rand_chacha 0.2.1", "rand_core 0.5.1", @@ -2696,7 +2680,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom 0.1.14", + "getrandom 0.1.16", ] [[package]] @@ -2705,7 +2689,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.2", + "getrandom 0.2.10", ] [[package]] @@ -2719,17 +2703,20 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.1.56" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.2.1", +] [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.2.1", ] [[package]] @@ -2738,45 +2725,39 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.2", + "getrandom 0.2.10", "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "regex" -version = "1.6.0" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ "aho-corasick", "memchr", + "regex-automata", "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.1.9" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ - "byteorder", + "aho-corasick", + "memchr", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "reqwest" @@ -2818,9 +2799,9 @@ dependencies = [ [[package]] name = "reqwest-middleware" -version = "0.2.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1c03e9011a8c59716ad13115550469e081e2e9892656b0ba6a47c907921894" +checksum = "ff44108c7925d082f2861e683a88618b68235ad9cdc60d64d9d1188efc951cdb" dependencies = [ "anyhow", "async-trait", @@ -2833,22 +2814,25 @@ dependencies = [ [[package]] name = "reqwest-retry" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db161043fcfae3bdf30768bb1fa833853cd55ddf2411b1acb03e0c72bf86a9ea" +checksum = "5c6a11c05102e5bec712c0619b8c7b7eda8b21a558a0bd981ceee15c38df8be4" dependencies = [ "anyhow", "async-trait", "chrono", "futures", + "getrandom 0.2.10", "http", "hyper", + "parking_lot 0.11.2", "reqwest", "reqwest-middleware", "retry-policies", "task-local-extensions", "tokio", "tracing", + "wasm-timer", ] [[package]] @@ -2904,14 +2888,27 @@ version = "0.37.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62b24138615de35e32031d041a09032ef3487a616d901ca4db224e7d557efae2" dependencies = [ - "bitflags", + "bitflags 1.2.1", "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.8", "windows-sys 0.45.0", ] +[[package]] +name = "rustix" +version = "0.38.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0c3dde1fc030af041adc40e79c0e7fbcf431dd24870053d187d7c66e4b87453" +dependencies = [ + "bitflags 2.4.0", + "errno", + "libc", + "linux-raw-sys 0.4.5", + "windows-sys 0.48.0", +] + [[package]] name = "rustls" version = "0.21.6" @@ -2981,7 +2978,7 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" dependencies = [ - "parking_lot", + "parking_lot 0.12.1", ] [[package]] @@ -3024,7 +3021,7 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23a2ac85147a3a11d77ecf1bc7166ec0b92febfa4461c37944e180f319ece467" dependencies = [ - "bitflags", + "bitflags 1.2.1", "core-foundation", "core-foundation-sys", "libc", @@ -3070,9 +3067,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.158" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] @@ -3091,13 +3088,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.158" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.26", - "syn 2.0.8", + "proc-macro2", + "quote", + "syn 2.0.31", ] [[package]] @@ -3116,7 +3113,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" dependencies = [ "indexmap", - "itoa 1.0.1", + "itoa", "ryu", "serde", ] @@ -3137,7 +3134,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.1", + "itoa", "ryu", "serde", ] @@ -3149,7 +3146,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fb06d4b6cdaef0e0c51fa881acb721bed3c924cfaa71d9c94a3b771dfdf6567" dependencies = [ "indexmap", - "itoa 1.0.1", + "itoa", "ryu", "serde", "unsafe-libyaml", @@ -3225,11 +3222,13 @@ checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" [[package]] name = "smartstring" -version = "0.2.10" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e714dff2b33f2321fdcd475b71cec79781a692d846f37f415fb395a1d2bcd48e" +checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" dependencies = [ + "autocfg", "static_assertions", + "version_check", ] [[package]] @@ -3242,6 +3241,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "spin" version = "0.5.2" @@ -3254,12 +3263,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - [[package]] name = "strsim" version = "0.10.0" @@ -3271,8 +3274,14 @@ name = "strum" version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" + +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" dependencies = [ - "strum_macros", + "strum_macros 0.25.2", ] [[package]] @@ -3282,28 +3291,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6878079b17446e4d3eba6192bb0a2950d5b14f0ed8424b852310e5a94345d0ef" dependencies = [ "heck", - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "rustversion", "syn 1.0.107", ] [[package]] -name = "subtle" -version = "2.4.1" +name = "strum_macros" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.31", +] [[package]] -name = "syn" -version = "0.14.9" +name = "subtle" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid", -] +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" @@ -3311,19 +3322,19 @@ version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.8" +version = "2.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc02725fd69ab9f26eab07fad303e2497fad6fb9eba4f96c4d1687bdf704ad9" +checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "unicode-ident", ] @@ -3340,25 +3351,24 @@ dependencies = [ [[package]] name = "task-local-extensions" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4167afbec18ae012de40f8cf1b9bf48420abb390678c34821caa07d924941cc4" +checksum = "ba323866e5d033818e3240feeb9f7db2c4296674e4d9e16b97b7bf8f490434e8" dependencies = [ - "tokio", + "pin-utils", ] [[package]] name = "tempfile" -version = "3.1.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ - "cfg-if 0.1.10", - "libc", - "rand 0.7.3", - "redox_syscall 0.1.56", - "remove_dir_all", - "winapi", + "cfg-if 1.0.0", + "fastrand", + "redox_syscall 0.3.5", + "rustix 0.38.11", + "windows-sys 0.48.0", ] [[package]] @@ -3370,25 +3380,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "terminal_size" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ca8ced750734db02076f44132d802af0b33b09942331f4459dde8636fd2406" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - [[package]] name = "thiserror" version = "1.0.31" @@ -3404,18 +3395,18 @@ version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", ] [[package]] name = "thoth" -version = "0.11.4" +version = "0.11.5" dependencies = [ "cargo-husky", - "clap 2.34.0", - "dialoguer 0.7.1", + "clap", + "dialoguer", "dotenv", "thoth-api", "thoth-api-server", @@ -3426,7 +3417,7 @@ dependencies = [ [[package]] name = "thoth-api" -version = "0.11.4" +version = "0.11.5" dependencies = [ "actix-web", "argon2rs", @@ -3443,22 +3434,23 @@ dependencies = [ "juniper", "lazy_static", "phf", - "rand 0.7.3", + "rand 0.8.5", "regex", "serde", "serde_derive", "serde_json", - "strum", + "strum 0.25.0", "thoth-errors", "uuid", ] [[package]] name = "thoth-api-server" -version = "0.11.4" +version = "0.11.5" dependencies = [ "actix-cors", "actix-identity", + "actix-session", "actix-web", "env_logger", "juniper", @@ -3470,11 +3462,11 @@ dependencies = [ [[package]] name = "thoth-app" -version = "0.11.4" +version = "0.11.5" dependencies = [ "anyhow", "chrono", - "getrandom 0.2.2", + "getrandom 0.2.10", "gloo-storage", "gloo-timers", "log", @@ -3499,7 +3491,7 @@ dependencies = [ [[package]] name = "thoth-app-server" -version = "0.11.4" +version = "0.11.5" dependencies = [ "actix-cors", "actix-web", @@ -3508,7 +3500,7 @@ dependencies = [ [[package]] name = "thoth-client" -version = "0.11.4" +version = "0.11.5" dependencies = [ "chrono", "graphql_client", @@ -3524,7 +3516,7 @@ dependencies = [ [[package]] name = "thoth-errors" -version = "0.11.4" +version = "0.11.5" dependencies = [ "actix-web", "csv", @@ -3544,7 +3536,7 @@ dependencies = [ [[package]] name = "thoth-export-server" -version = "0.11.4" +version = "0.11.5" dependencies = [ "actix-cors", "actix-web", @@ -3584,7 +3576,7 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "004cbc98f30fa233c61a38bc77e96a9106e65c88f2d3bef182ae952027e5753d" dependencies = [ - "itoa 1.0.1", + "itoa", "libc", "num_threads", "time-macros", @@ -3598,20 +3590,19 @@ checksum = "25eb0ca3468fc0acc11828786797f6ef9aa1555e4a211a60d64cc8e4d1be47d6" [[package]] name = "tokio" -version = "1.19.2" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51a52ed6686dd62c320f9b89299e9dfb46f730c7a48e635c19f21d116cb1439" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ + "backtrace", "bytes", "libc", - "memchr", "mio", - "once_cell", - "parking_lot", + "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", - "socket2", - "winapi", + "socket2 0.5.3", + "windows-sys 0.48.0", ] [[package]] @@ -3626,30 +3617,16 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.0" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64910e1b9c1901aaf5375561e35b9c057d95ff41a44ede043a03e09279eabaf1" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", "futures-sink", - "log", "pin-project-lite", "tokio", + "tracing", ] [[package]] @@ -3720,8 +3697,8 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -3791,12 +3768,6 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - [[package]] name = "universal-hash" version = "0.4.0" @@ -3870,7 +3841,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.2", + "getrandom 0.2.10", "serde", ] @@ -3880,17 +3851,11 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" -[[package]] -name = "vec_map" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" - [[package]] name = "version_check" -version = "0.9.1" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "void" @@ -3958,8 +3923,8 @@ dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", "wasm-bindgen-shared", ] @@ -3982,7 +3947,7 @@ version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5" dependencies = [ - "quote 1.0.26", + "quote", "wasm-bindgen-macro-support", ] @@ -3992,8 +3957,8 @@ version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -4027,27 +3992,42 @@ dependencies = [ "binary-install", "cargo_metadata", "chrono", - "clap 4.3.4", - "console 0.15.5", - "dialoguer 0.10.3", + "clap", + "console", + "dialoguer", "env_logger", "glob", "human-panic", "log", - "parking_lot", + "parking_lot 0.12.1", "semver 1.0.16", "serde", "serde_derive", "serde_ignored", "serde_json", "siphasher", - "strsim 0.10.0", + "strsim", "toml 0.7.4", "ureq", "walkdir", "which", ] +[[package]] +name = "wasm-timer" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" +dependencies = [ + "futures", + "js-sys", + "parking_lot 0.11.2", + "pin-utils", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "web-sys" version = "0.3.57" @@ -4329,9 +4309,9 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.4" +version = "0.8.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" +checksum = "1eee6bf5926be7cf998d7381a9a23d833fd493f6a8034658a9505a4dc4b20444" [[package]] name = "xmlparser" @@ -4413,8 +4393,8 @@ checksum = "d6e23bfe3dc3933fbe9592d149c9985f3047d08c637a884b9344c21e56e092ef" dependencies = [ "boolinator", "lazy_static", - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -4427,8 +4407,8 @@ dependencies = [ "boolinator", "lazy_static", "proc-macro-error", - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -4458,8 +4438,8 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39049d193b52eaad4ffc80916bf08806d142c90b5edcebd527644de438a7e19a" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -4478,12 +4458,6 @@ dependencies = [ "yew 0.18.0", ] -[[package]] -name = "zeroize" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45af6a010d13e4cf5b54c94ba5a2b2eba5596b9e46bf5875612d332a1f2b3f86" - [[package]] name = "zeroize" version = "1.5.7" diff --git a/Cargo.toml b/Cargo.toml index 07284b80..7f6d1eed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth" -version = "0.11.4" +version = "0.11.5" authors = ["Javier Arias ", "Ross Higman "] edition = "2018" license = "Apache-2.0" @@ -16,13 +16,13 @@ maintenance = { status = "actively-developed" } members = ["thoth-api", "thoth-api-server", "thoth-app", "thoth-app-server", "thoth-client", "thoth-errors", "thoth-export-server"] [dependencies] -thoth-api = { version = "0.11.4", path = "thoth-api", features = ["backend"] } -thoth-api-server = { version = "0.11.4", path = "thoth-api-server" } -thoth-app-server = { version = "0.11.4", path = "thoth-app-server" } -thoth-errors = { version = "0.11.4", path = "thoth-errors" } -thoth-export-server = { version = "0.11.4", path = "thoth-export-server" } -clap = "2.34.0" -dialoguer = "0.7.1" +thoth-api = { version = "0.11.5", path = "thoth-api", features = ["backend"] } +thoth-api-server = { version = "0.11.5", path = "thoth-api-server" } +thoth-app-server = { version = "0.11.5", path = "thoth-app-server" } +thoth-errors = { version = "0.11.5", path = "thoth-errors" } +thoth-export-server = { version = "0.11.5", path = "thoth-export-server" } +clap = { version = "4.4.2", features = ["cargo", "env"] } +dialoguer = { version = "0.10.4", features = ["password"] } dotenv = "0.15.0" [dev-dependencies] diff --git a/diesel.toml b/diesel.toml index 53e9b003..752265c1 100644 --- a/diesel.toml +++ b/diesel.toml @@ -3,8 +3,9 @@ [print_schema] file = "src/schema.rs" -import_types = [ +custom_type_derives = [ "diesel::sql_types::*", + "diesel::query_builder::QueryId", "crate::model::contribution::Contribution_type", "crate::model::work::Work_type", "crate::model::work::Work_status", diff --git a/src/bin/thoth.rs b/src/bin/thoth.rs index 5a0976b4..1595db5d 100644 --- a/src/bin/thoth.rs +++ b/src/bin/thoth.rs @@ -1,4 +1,4 @@ -use clap::{crate_authors, crate_version, value_t, App, AppSettings, Arg}; +use clap::{crate_authors, crate_version, value_parser, Arg, Command}; use dialoguer::{console::Term, theme::ColorfulTheme, Input, MultiSelect, Password, Select}; use dotenv::dotenv; use std::env; @@ -10,128 +10,133 @@ use thoth::app_server; use thoth::export_server; use thoth_errors::ThothResult; -fn host_argument(env_value: &'static str) -> Arg<'static, 'static> { - Arg::with_name("host") - .short("h") +fn host_argument(env_value: &'static str) -> Arg { + Arg::new("host") + .short('H') .long("host") .value_name("HOST") .env(env_value) .default_value("0.0.0.0") .help("host to bind") - .takes_value(true) + .num_args(1) } -fn port_argument(default_value: &'static str, env_value: &'static str) -> Arg<'static, 'static> { - Arg::with_name("port") - .short("p") +fn port_argument(default_value: &'static str, env_value: &'static str) -> Arg { + Arg::new("port") + .short('p') .long("port") .value_name("PORT") .env(env_value) .default_value(default_value) .help("Port to bind") - .takes_value(true) + .num_args(1) } -fn domain_argument() -> Arg<'static, 'static> { - Arg::with_name("domain") - .short("d") +fn domain_argument() -> Arg { + Arg::new("domain") + .short('d') .long("domain") .value_name("THOTH_DOMAIN") .env("THOTH_DOMAIN") .default_value("localhost") .help("Authentication cookie domain") - .takes_value(true) + .num_args(1) } -fn key_argument() -> Arg<'static, 'static> { - Arg::with_name("key") - .short("k") +fn key_argument() -> Arg { + Arg::new("key") + .short('k') .long("secret-key") .value_name("SECRET") .env("SECRET_KEY") .help("Authentication cookie secret key") - .takes_value(true) + .num_args(1) } -fn session_argument() -> Arg<'static, 'static> { - Arg::with_name("duration") - .short("s") +fn session_argument() -> Arg { + Arg::new("duration") + .short('s') .long("session-length") .value_name("DURATION") .env("SESSION_DURATION_SECONDS") .default_value("3600") .help("Authentication cookie session duration (seconds)") - .takes_value(true) + .num_args(1) + .value_parser(value_parser!(i64)) } -fn gql_url_argument() -> Arg<'static, 'static> { - Arg::with_name("gql-url") - .short("u") +fn gql_url_argument() -> Arg { + Arg::new("gql-url") + .short('u') .long("gql-url") .value_name("THOTH_GRAPHQL_API") .env("THOTH_GRAPHQL_API") .default_value("http://localhost:8000") .help("Thoth GraphQL's, public facing, root URL.") - .takes_value(true) + .num_args(1) } -fn gql_endpoint_argument() -> Arg<'static, 'static> { - Arg::with_name("gql-endpoint") - .short("g") +fn gql_endpoint_argument() -> Arg { + Arg::new("gql-endpoint") + .short('g') .long("gql-endpoint") .value_name("THOTH_GRAPHQL_ENDPOINT") .env("THOTH_GRAPHQL_ENDPOINT") .default_value("http://localhost:8000/graphql") .help("Thoth GraphQL's endpoint") - .takes_value(true) + .num_args(1) } -fn export_url_argument() -> Arg<'static, 'static> { - Arg::with_name("export-url") - .short("u") +fn export_url_argument() -> Arg { + Arg::new("export-url") + .short('u') .long("export-url") .value_name("THOTH_EXPORT_API") .env("THOTH_EXPORT_API") .default_value("http://localhost:8181") .help("Thoth Export API's, public facing, root URL.") - .takes_value(true) + .num_args(1) } -fn threads_argument(env_value: &'static str) -> Arg<'static, 'static> { - Arg::with_name("threads") - .short("t") +fn threads_argument(env_value: &'static str) -> Arg { + Arg::new("threads") + .short('t') .long("threads") .value_name("THREADS") .env(env_value) .default_value("5") .help("Number of HTTP workers to start") - .takes_value(true) + .num_args(1) + .value_parser(value_parser!(usize)) } -fn keep_alive_argument(env_value: &'static str) -> Arg<'static, 'static> { - Arg::with_name("keep-alive") - .short("K") +fn keep_alive_argument(env_value: &'static str) -> Arg { + Arg::new("keep-alive") + .short('K') .long("keep-alive") .value_name("THREADS") .env(env_value) .default_value("5") .help("Number of seconds to wait for subsequent requests") - .takes_value(true) + .num_args(1) + .value_parser(value_parser!(u64)) } -fn thoth_commands() -> App<'static, 'static> { - App::new(env!("CARGO_PKG_NAME")) +fn thoth_commands() -> Command { + Command::new(env!("CARGO_PKG_NAME")) .version(crate_version!()) .author(crate_authors!("\n")) .about(env!("CARGO_PKG_DESCRIPTION")) - .setting(AppSettings::SubcommandRequiredElseHelp) - .subcommand(App::new("migrate").about("Run the database migrations")) + .subcommand_required(true) + .arg_required_else_help(true) + .subcommand(Command::new("migrate").about("Run the database migrations")) .subcommand( - App::new("start") + Command::new("start") .about("Start an instance of Thoth API or GUI") - .setting(AppSettings::SubcommandRequiredElseHelp) + .subcommand_required(true) + .arg_required_else_help(true) .subcommand( - App::new("graphql-api") + Command::new("graphql-api") .about("Start the thoth GraphQL API server") .arg(host_argument("GRAPHQL_API_HOST")) .arg(port_argument("8000", "GRAPHQL_API_PORT")) @@ -143,7 +148,7 @@ fn thoth_commands() -> App<'static, 'static> { .arg(session_argument()), ) .subcommand( - App::new("app") + Command::new("app") .about("Start the thoth client GUI") .arg(host_argument("APP_HOST")) .arg(port_argument("8080", "APP_PORT")) @@ -151,7 +156,7 @@ fn thoth_commands() -> App<'static, 'static> { .arg(keep_alive_argument("APP_KEEP_ALIVE")), ) .subcommand( - App::new("export-api") + Command::new("export-api") .about("Start the thoth metadata export API") .arg(host_argument("EXPORT_API_HOST")) .arg(port_argument("8181", "EXPORT_API_PORT")) @@ -162,7 +167,7 @@ fn thoth_commands() -> App<'static, 'static> { ), ) .subcommand( - App::new("init") + Command::new("init") .about("Run the database migrations and start the thoth API server") .arg(host_argument("GRAPHQL_API_HOST")) .arg(port_argument("8000", "GRAPHQL_API_PORT")) @@ -174,11 +179,12 @@ fn thoth_commands() -> App<'static, 'static> { .arg(session_argument()), ) .subcommand( - App::new("account") + Command::new("account") .about("Manage user accounts") - .setting(AppSettings::SubcommandRequiredElseHelp) - .subcommand(App::new("register").about("Create a new user account")) - .subcommand(App::new("password").about("Reset a password")), + .subcommand_required(true) + .arg_required_else_help(true) + .subcommand(Command::new("register").about("Create a new user account")) + .subcommand(Command::new("password").about("Reset a password")), ) } @@ -187,16 +193,16 @@ fn main() -> ThothResult<()> { dotenv().ok(); match thoth_commands().get_matches().subcommand() { - ("start", Some(start_matches)) => match start_matches.subcommand() { - ("graphql-api", Some(api_matches)) => { - let host = api_matches.value_of("host").unwrap().to_owned(); - let port = api_matches.value_of("port").unwrap().to_owned(); - let threads = value_t!(api_matches.value_of("threads"), usize).unwrap(); - let keep_alive = value_t!(api_matches.value_of("keep-alive"), u64).unwrap(); - let url = api_matches.value_of("gql-url").unwrap().to_owned(); - let domain = api_matches.value_of("domain").unwrap().to_owned(); - let secret_str = api_matches.value_of("key").unwrap().to_owned(); - let session_duration = value_t!(api_matches.value_of("duration"), i64).unwrap(); + Some(("start", start_matches)) => match start_matches.subcommand() { + Some(("graphql-api", api_matches)) => { + let host = api_matches.get_one::("host").unwrap().to_owned(); + let port = api_matches.get_one::("port").unwrap().to_owned(); + let threads = *api_matches.get_one::("threads").unwrap(); + let keep_alive = *api_matches.get_one::("keep-alive").unwrap(); + let url = api_matches.get_one::("gql-url").unwrap().to_owned(); + let domain = api_matches.get_one::("domain").unwrap().to_owned(); + let secret_str = api_matches.get_one::("key").unwrap().to_owned(); + let session_duration = *api_matches.get_one::("duration").unwrap(); api_server( host, port, @@ -209,35 +215,44 @@ fn main() -> ThothResult<()> { ) .map_err(|e| e.into()) } - ("app", Some(client_matches)) => { - let host = client_matches.value_of("host").unwrap().to_owned(); - let port = client_matches.value_of("port").unwrap().to_owned(); - let threads = value_t!(client_matches.value_of("threads"), usize).unwrap(); - let keep_alive = value_t!(client_matches.value_of("keep-alive"), u64).unwrap(); + Some(("app", client_matches)) => { + let host = client_matches.get_one::("host").unwrap().to_owned(); + let port = client_matches.get_one::("port").unwrap().to_owned(); + let threads = *client_matches.get_one::("threads").unwrap(); + let keep_alive = *client_matches.get_one::("keep-alive").unwrap(); app_server(host, port, threads, keep_alive).map_err(|e| e.into()) } - ("export-api", Some(client_matches)) => { - let host = client_matches.value_of("host").unwrap().to_owned(); - let port = client_matches.value_of("port").unwrap().to_owned(); - let threads = value_t!(client_matches.value_of("threads"), usize).unwrap(); - let keep_alive = value_t!(client_matches.value_of("keep-alive"), u64).unwrap(); - let url = client_matches.value_of("export-url").unwrap().to_owned(); - let gql_endpoint = client_matches.value_of("gql-endpoint").unwrap().to_owned(); + Some(("export-api", client_matches)) => { + let host = client_matches.get_one::("host").unwrap().to_owned(); + let port = client_matches.get_one::("port").unwrap().to_owned(); + let threads = *client_matches.get_one::("threads").unwrap(); + let keep_alive = *client_matches.get_one::("keep-alive").unwrap(); + let url = client_matches + .get_one::("export-url") + .unwrap() + .to_owned(); + let gql_endpoint = client_matches + .get_one::("gql-endpoint") + .unwrap() + .to_owned(); export_server(host, port, threads, keep_alive, url, gql_endpoint) .map_err(|e| e.into()) } _ => unreachable!(), }, - ("migrate", Some(_)) => run_migrations(), - ("init", Some(init_matches)) => { - let host = init_matches.value_of("host").unwrap().to_owned(); - let port = init_matches.value_of("port").unwrap().to_owned(); - let threads = value_t!(init_matches.value_of("threads"), usize).unwrap(); - let keep_alive = value_t!(init_matches.value_of("keep-alive"), u64).unwrap(); - let url = init_matches.value_of("gql-url").unwrap().to_owned(); - let domain = init_matches.value_of("domain").unwrap().to_owned(); - let secret_str = init_matches.value_of("key").unwrap().to_owned(); - let session_duration = value_t!(init_matches.value_of("duration"), i64).unwrap(); + Some(("migrate", _)) => run_migrations(), + Some(("init", init_matches)) => { + let host = init_matches.get_one::("host").unwrap().to_owned(); + let port = init_matches.get_one::("port").unwrap().to_owned(); + let threads = *init_matches.get_one::("threads").unwrap(); + let keep_alive = *init_matches.get_one::("keep-alive").unwrap(); + let url = init_matches + .get_one::("gql-url") + .unwrap() + .to_owned(); + let domain = init_matches.get_one::("domain").unwrap().to_owned(); + let secret_str = init_matches.get_one::("key").unwrap().to_owned(); + let session_duration = *init_matches.get_one::("duration").unwrap(); run_migrations()?; api_server( host, @@ -251,17 +266,17 @@ fn main() -> ThothResult<()> { ) .map_err(|e| e.into()) } - ("account", Some(account_matches)) => match account_matches.subcommand() { - ("register", Some(_)) => { + Some(("account", account_matches)) => match account_matches.subcommand() { + Some(("register", _)) => { let pool = establish_connection(); - let name: String = Input::new() + let name = Input::new() .with_prompt("Enter given name") .interact_on(&Term::stdout())?; - let surname: String = Input::new() + let surname = Input::new() .with_prompt("Enter family name") .interact_on(&Term::stdout())?; - let email: String = Input::new() + let email = Input::new() .with_prompt("Enter email address") .interact_on(&Term::stdout())?; let password = Password::new() @@ -309,7 +324,7 @@ fn main() -> ThothResult<()> { }; register(account_data, linked_publishers, &pool).map(|_| ()) } - ("password", Some(_)) => { + Some(("password", _)) => { let pool = establish_connection(); let all_emails = all_emails(&pool).expect("No user accounts present in database."); let email_selection = Select::with_theme(&ColorfulTheme::default()) @@ -330,3 +345,8 @@ fn main() -> ThothResult<()> { _ => unreachable!(), } } + +#[test] +fn test_cli() { + thoth_commands().debug_assert(); +} diff --git a/thoth-api-server/Cargo.toml b/thoth-api-server/Cargo.toml index 01ee8ce4..1b4ccdea 100644 --- a/thoth-api-server/Cargo.toml +++ b/thoth-api-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-api-server" -version = "0.11.4" +version = "0.11.5" authors = ["Javier Arias ", "Ross Higman "] edition = "2018" license = "Apache-2.0" @@ -9,12 +9,13 @@ repository = "https://github.com/thoth-pub/thoth" readme = "README.md" [dependencies] -thoth-api = { version = "0.11.4", path = "../thoth-api", features = ["backend"] } -thoth-errors = { version = "0.11.4", path = "../thoth-errors" } -actix-web = "4.3.0" +thoth-api = { version = "0.11.5", path = "../thoth-api", features = ["backend"] } +thoth-errors = { version = "0.11.5", path = "../thoth-errors" } +actix-web = "4.4.0" actix-cors = "0.6.4" -actix-identity = "0.4.0" +actix-identity = "0.5.2" +actix-session = { version = "0.7.2", features = ["cookie-session"] } env_logger = "0.10.0" -juniper = "0.15.10" -serde = { version = "1.0.115", features = ["derive"] } +juniper = "0.15.11" +serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/thoth-api-server/src/lib.rs b/thoth-api-server/src/lib.rs index b1abf1cf..1c1f72df 100644 --- a/thoth-api-server/src/lib.rs +++ b/thoth-api-server/src/lib.rs @@ -4,10 +4,13 @@ use std::time::Duration; use std::{io, sync::Arc}; use actix_cors::Cors; -use actix_identity::{CookieIdentityPolicy, Identity, IdentityService}; +use actix_identity::{Identity, IdentityMiddleware}; +use actix_session::config::PersistentSession; +use actix_session::{storage::CookieSessionStore, SessionMiddleware}; use actix_web::{ - error, get, http::header, middleware::Logger, post, web, web::Data, App, Error, HttpResponse, - HttpServer, Result, + cookie::time::Duration as CookieDuration, cookie::Key, error, get, http::header, + middleware::Logger, post, web::Data, web::Json, web::ServiceConfig, App, Error, HttpMessage, + HttpRequest, HttpResponse, HttpServer, Result, }; use juniper::http::GraphQLRequest; use serde::Serialize; @@ -61,12 +64,12 @@ impl Default for ApiConfig { } #[get("/")] -async fn index(config: web::Data) -> HttpResponse { +async fn index(config: Data) -> HttpResponse { HttpResponse::Ok().json(config.into_inner()) } #[get("/graphiql")] -async fn graphiql_interface(config: web::Data) -> HttpResponse { +async fn graphiql_interface(config: Data) -> HttpResponse { let html = graphiql_source(&config.public_url); HttpResponse::Ok() .content_type("text/html; charset=utf-8") @@ -74,7 +77,7 @@ async fn graphiql_interface(config: web::Data) -> HttpResponse { } #[get("/graphql")] -async fn graphql_index(config: web::Data) -> HttpResponse { +async fn graphql_index(config: Data) -> HttpResponse { HttpResponse::MethodNotAllowed().json(format!( "GraphQL API must be queried making a POST request to {}", config.public_url @@ -83,10 +86,10 @@ async fn graphql_index(config: web::Data) -> HttpResponse { #[post("/graphql")] async fn graphql( - st: web::Data>, - pool: web::Data, + st: Data>, + pool: Data, token: DecodedToken, - data: web::Json, + data: Json, ) -> Result { let ctx = Context::new(pool.into_inner(), token); let result = data.execute(&st, &ctx).await; @@ -98,9 +101,9 @@ async fn graphql( #[post("/account/login")] async fn login_credentials( - payload: web::Json, - id: Identity, - pool: web::Data, + request: HttpRequest, + payload: Json, + pool: Data, ) -> Result { let r = payload.into_inner(); @@ -110,7 +113,8 @@ async fn login_credentials( let details = get_account_details(&account.email, &pool).unwrap(); let user_string = serde_json::to_string(&details) .map_err(|_| ThothError::InternalError("Serder error".into()))?; - id.remember(user_string); + Identity::login(&request.extensions(), user_string) + .map_err(|_| ThothError::InternalError("Failed to store session cookie".into()))?; Ok(HttpResponse::Ok().json(details)) }) .map_err(error::ErrorUnauthorized) @@ -118,12 +122,14 @@ async fn login_credentials( #[post("/account/token/renew")] async fn login_session( + request: HttpRequest, token: DecodedToken, - id: Identity, - pool: web::Data, + identity: Option, + pool: Data, ) -> Result { - let email = match id.identity() { - Some(id) => { + let email = match identity { + Some(session) => { + let id = session.id().map_err(|_| ThothError::Unauthorised)?; let details: AccountDetails = serde_json::from_str(&id).map_err(|_| ThothError::Unauthorised)?; details.email @@ -141,7 +147,8 @@ async fn login_session( let details = get_account_details(&account.email, &pool).unwrap(); let user_string = serde_json::to_string(&details) .map_err(|_| ThothError::InternalError("Serder error".into()))?; - id.remember(user_string); + Identity::login(&request.extensions(), user_string) + .map_err(|_| ThothError::InternalError("Failed to store session cookie".into()))?; Ok(HttpResponse::Ok().json(details)) }) .map_err(error::ErrorUnauthorized) @@ -150,11 +157,12 @@ async fn login_session( #[get("/account")] async fn account_details( token: DecodedToken, - id: Identity, - pool: web::Data, + identity: Option, + pool: Data, ) -> Result { - let email = match id.identity() { - Some(id) => { + let email = match identity { + Some(session) => { + let id = session.id().map_err(|_| ThothError::Unauthorised)?; let details: AccountDetails = serde_json::from_str(&id).map_err(|_| ThothError::Unauthorised)?; details.email @@ -171,9 +179,9 @@ async fn account_details( .map_err(error::ErrorUnauthorized) } -fn config(cfg: &mut web::ServiceConfig) { +fn config(cfg: &mut ServiceConfig) { let pool = establish_connection(); - let schema = std::sync::Arc::new(create_schema()); + let schema = Arc::new(create_schema()); cfg.app_data(Data::new(schema.clone())); cfg.app_data(Data::new(pool)); @@ -203,13 +211,22 @@ pub async fn start_server( HttpServer::new(move || { App::new() .wrap(Logger::new(LOG_FORMAT)) - .wrap(IdentityService::new( - CookieIdentityPolicy::new(secret_str.as_bytes()) - .name("auth") - .path("/") - .domain(&domain) - .max_age_secs(session_duration), - )) + .wrap(IdentityMiddleware::default()) + .wrap( + SessionMiddleware::builder( + CookieSessionStore::default(), + Key::from(secret_str.as_bytes()), + ) + .cookie_name("auth".to_string()) + .cookie_path("/".to_string()) + .cookie_domain(Some(domain.clone())) + .cookie_secure(domain.clone().ne("localhost")) // Authentication requires https unless running on localhost + .session_lifecycle( + PersistentSession::default() + .session_ttl(CookieDuration::seconds(session_duration)), + ) + .build(), + ) .wrap( Cors::default() .allowed_methods(vec!["GET", "POST", "OPTIONS"]) diff --git a/thoth-api/Cargo.toml b/thoth-api/Cargo.toml index efea55d3..f258d1e0 100644 --- a/thoth-api/Cargo.toml +++ b/thoth-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-api" -version = "0.11.4" +version = "0.11.5" authors = ["Javier Arias ", "Ross Higman "] edition = "2018" license = "Apache-2.0" @@ -16,27 +16,27 @@ maintenance = { status = "actively-developed" } backend = ["diesel", "diesel-derive-enum", "diesel_migrations", "futures", "actix-web"] [dependencies] -thoth-errors = { version = "0.11.4", path = "../thoth-errors" } -actix-web = { version = "4.3.0", optional = true } +thoth-errors = { version = "0.11.5", path = "../thoth-errors" } +actix-web = { version = "4.4.0", optional = true } argon2rs = "0.2.5" isbn2 = "0.4.0" chrono = { version = "0.4.26", features = ["serde"] } -diesel = { version = "2.0.2", features = ["postgres", "uuid", "chrono", "r2d2", "64-column-tables", "serde_json"], optional = true } -diesel-derive-enum = { version = "2.0.0-rc.0", features = ["postgres"], optional = true } -diesel-derive-newtype = "2.0.0-rc.0" -diesel_migrations = { version = "2.0.0", features = ["postgres"], optional = true } +diesel = { version = "2.1.1", features = ["postgres", "uuid", "chrono", "r2d2", "64-column-tables", "serde_json"], optional = true } +diesel-derive-enum = { version = "2.1.0", features = ["postgres"], optional = true } +diesel-derive-newtype = "2.1.0" +diesel_migrations = { version = "2.1.0", features = ["postgres"], optional = true } dotenv = "0.15.0" -futures = { version = "0.3.5", optional = true } -jsonwebtoken = "8.2.0" -juniper = "0.15.10" +futures = { version = "0.3.28", optional = true } +jsonwebtoken = "8.3.0" +juniper = "0.15.11" lazy_static = "1.4.0" phf = { version = "0.11", features = ["macros"] } -rand = "0.7.3" -regex = "1.6.0" -serde = { version = "1.0.115", features = ["derive"] } +rand = "0.8.5" +regex = "1.9.5" +serde = { version = "1.0", features = ["derive"] } serde_derive = "1.0" serde_json = "1.0" -strum = { version = "0.24.1", features = ["derive"] } +strum = { version = "0.25.0", features = ["derive"] } uuid = { version = "0.8.2", features = ["serde", "v4"] } [dev-dependencies] diff --git a/thoth-api/src/account/util.rs b/thoth-api/src/account/util.rs index ddf257e7..95e1c33b 100644 --- a/thoth-api/src/account/util.rs +++ b/thoth-api/src/account/util.rs @@ -12,7 +12,7 @@ pub fn make_salt() -> String { let password: String = (0..PASSWORD_LEN) .map(|_| { - let idx = rng.gen_range(0, CHARSET.len()); + let idx = rng.gen_range(0..CHARSET.len()); CHARSET[idx] as char }) .collect(); diff --git a/thoth-api/src/model/contribution/mod.rs b/thoth-api/src/model/contribution/mod.rs index d8fe4aae..ae6c87be 100644 --- a/thoth-api/src/model/contribution/mod.rs +++ b/thoth-api/src/model/contribution/mod.rs @@ -15,7 +15,7 @@ use crate::schema::contribution_history; feature = "backend", derive(DbEnum, juniper::GraphQLEnum), graphql(description = "Role describing the type of contribution to the work"), - DieselTypePath = "crate::schema::sql_types::ContributionType" + ExistingTypePath = "crate::schema::sql_types::ContributionType" )] #[derive( Debug, Clone, Default, Copy, PartialEq, Eq, Deserialize, Serialize, EnumString, Display, diff --git a/thoth-api/src/model/institution/mod.rs b/thoth-api/src/model/institution/mod.rs index 3b05c03f..d5c5cdcf 100644 --- a/thoth-api/src/model/institution/mod.rs +++ b/thoth-api/src/model/institution/mod.rs @@ -78,7 +78,7 @@ pub struct PatchInstitution { #[cfg_attr( feature = "backend", derive(DbEnum, juniper::GraphQLEnum), - DieselTypePath = "crate::schema::sql_types::CountryCode" + ExistingTypePath = "crate::schema::sql_types::CountryCode" )] #[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, EnumString, Display)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] diff --git a/thoth-api/src/model/language/mod.rs b/thoth-api/src/model/language/mod.rs index c116ee19..7532fa9e 100644 --- a/thoth-api/src/model/language/mod.rs +++ b/thoth-api/src/model/language/mod.rs @@ -12,7 +12,7 @@ use crate::schema::language_history; #[cfg_attr( feature = "backend", derive(DbEnum, juniper::GraphQLEnum), - DieselTypePath = "crate::schema::sql_types::LanguageRelation" + ExistingTypePath = "crate::schema::sql_types::LanguageRelation" )] #[derive(Debug, Clone, Default, PartialEq, Eq, Deserialize, Serialize, EnumString, Display)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] @@ -82,7 +82,7 @@ pub struct PatchLanguage { #[cfg_attr( feature = "backend", derive(DbEnum, juniper::GraphQLEnum), - DieselTypePath = "crate::schema::sql_types::LanguageCode" + ExistingTypePath = "crate::schema::sql_types::LanguageCode" )] #[derive(Debug, Clone, Default, PartialEq, Eq, Deserialize, Serialize, EnumString, Display)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] diff --git a/thoth-api/src/model/location/mod.rs b/thoth-api/src/model/location/mod.rs index ce529955..4b41d7be 100644 --- a/thoth-api/src/model/location/mod.rs +++ b/thoth-api/src/model/location/mod.rs @@ -13,7 +13,7 @@ use crate::schema::location_history; #[cfg_attr( feature = "backend", derive(DbEnum, juniper::GraphQLEnum), - DieselTypePath = "crate::schema::sql_types::LocationPlatform" + ExistingTypePath = "crate::schema::sql_types::LocationPlatform" )] #[derive(Debug, Clone, Default, PartialEq, Eq, Deserialize, Serialize, EnumString, Display)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] diff --git a/thoth-api/src/model/price/mod.rs b/thoth-api/src/model/price/mod.rs index bf7818b8..10024dff 100644 --- a/thoth-api/src/model/price/mod.rs +++ b/thoth-api/src/model/price/mod.rs @@ -61,7 +61,7 @@ pub struct PatchPrice { #[cfg_attr( feature = "backend", derive(DbEnum, juniper::GraphQLEnum), - DieselTypePath = "crate::schema::sql_types::CurrencyCode" + ExistingTypePath = "crate::schema::sql_types::CurrencyCode" )] #[derive(Debug, Clone, Default, PartialEq, Eq, Deserialize, Serialize, EnumString, Display)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] diff --git a/thoth-api/src/model/publication/mod.rs b/thoth-api/src/model/publication/mod.rs index 04dd5e52..f987e683 100644 --- a/thoth-api/src/model/publication/mod.rs +++ b/thoth-api/src/model/publication/mod.rs @@ -18,7 +18,7 @@ use crate::schema::publication_history; #[cfg_attr( feature = "backend", derive(DbEnum, juniper::GraphQLEnum), - DieselTypePath = "crate::schema::sql_types::PublicationType" + ExistingTypePath = "crate::schema::sql_types::PublicationType" )] #[derive(Debug, Clone, Default, PartialEq, Eq, Deserialize, Serialize, EnumString, Display)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] diff --git a/thoth-api/src/model/series/mod.rs b/thoth-api/src/model/series/mod.rs index ab2cd0c5..7c8d91e0 100644 --- a/thoth-api/src/model/series/mod.rs +++ b/thoth-api/src/model/series/mod.rs @@ -15,7 +15,7 @@ use crate::schema::series_history; #[cfg_attr( feature = "backend", derive(DbEnum, juniper::GraphQLEnum), - DieselTypePath = "crate::schema::sql_types::SeriesType" + ExistingTypePath = "crate::schema::sql_types::SeriesType" )] #[derive(Debug, Clone, Default, PartialEq, Eq, Deserialize, Serialize, EnumString, Display)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] diff --git a/thoth-api/src/model/subject/mod.rs b/thoth-api/src/model/subject/mod.rs index 8b3417bd..8ef1f68b 100644 --- a/thoth-api/src/model/subject/mod.rs +++ b/thoth-api/src/model/subject/mod.rs @@ -16,7 +16,7 @@ use thoth_errors::ThothResult; #[cfg_attr( feature = "backend", derive(DbEnum, juniper::GraphQLEnum), - DieselTypePath = "crate::schema::sql_types::SubjectType" + ExistingTypePath = "crate::schema::sql_types::SubjectType" )] #[derive( Debug, diff --git a/thoth-api/src/model/work/mod.rs b/thoth-api/src/model/work/mod.rs index 1d154bc4..2fc57d54 100644 --- a/thoth-api/src/model/work/mod.rs +++ b/thoth-api/src/model/work/mod.rs @@ -25,7 +25,7 @@ use crate::schema::work_history; #[cfg_attr( feature = "backend", derive(DbEnum, juniper::GraphQLEnum), - DieselTypePath = "crate::schema::sql_types::WorkType" + ExistingTypePath = "crate::schema::sql_types::WorkType" )] #[derive(Debug, Clone, Default, PartialEq, Eq, Deserialize, Serialize, EnumString, Display)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] @@ -47,7 +47,7 @@ pub enum WorkType { #[cfg_attr( feature = "backend", derive(DbEnum, juniper::GraphQLEnum), - DieselTypePath = "crate::schema::sql_types::WorkStatus" + ExistingTypePath = "crate::schema::sql_types::WorkStatus" )] #[derive(Debug, Clone, Default, PartialEq, Eq, Deserialize, Serialize, EnumString, Display)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] diff --git a/thoth-api/src/model/work_relation/mod.rs b/thoth-api/src/model/work_relation/mod.rs index 1632873a..ee9539d3 100644 --- a/thoth-api/src/model/work_relation/mod.rs +++ b/thoth-api/src/model/work_relation/mod.rs @@ -14,7 +14,7 @@ use crate::schema::work_relation_history; #[cfg_attr( feature = "backend", derive(DbEnum, juniper::GraphQLEnum), - DieselTypePath = "crate::schema::sql_types::RelationType" + ExistingTypePath = "crate::schema::sql_types::RelationType" )] #[derive( Debug, Clone, Default, Copy, PartialEq, Eq, Deserialize, Serialize, EnumString, Display, diff --git a/thoth-api/src/schema.rs b/thoth-api/src/schema.rs index aae27b97..cada1078 100644 --- a/thoth-api/src/schema.rs +++ b/thoth-api/src/schema.rs @@ -1,49 +1,49 @@ pub mod sql_types { - #[derive(diesel::sql_types::SqlType)] + #[derive(diesel::sql_types::SqlType, diesel::query_builder::QueryId)] #[diesel(postgres_type(name = "contribution_type"))] pub struct ContributionType; - #[derive(diesel::sql_types::SqlType)] + #[derive(diesel::sql_types::SqlType, diesel::query_builder::QueryId)] #[diesel(postgres_type(name = "country_code"))] pub struct CountryCode; - #[derive(diesel::sql_types::SqlType)] + #[derive(diesel::sql_types::SqlType, diesel::query_builder::QueryId)] #[diesel(postgres_type(name = "language_relation"))] pub struct LanguageRelation; - #[derive(diesel::sql_types::SqlType)] + #[derive(diesel::sql_types::SqlType, diesel::query_builder::QueryId)] #[diesel(postgres_type(name = "language_code"))] pub struct LanguageCode; - #[derive(diesel::sql_types::SqlType)] + #[derive(diesel::sql_types::SqlType, diesel::query_builder::QueryId)] #[diesel(postgres_type(name = "location_platform"))] pub struct LocationPlatform; - #[derive(diesel::sql_types::SqlType)] + #[derive(diesel::sql_types::SqlType, diesel::query_builder::QueryId)] #[diesel(postgres_type(name = "currency_code"))] pub struct CurrencyCode; - #[derive(diesel::sql_types::SqlType)] + #[derive(diesel::sql_types::SqlType, diesel::query_builder::QueryId)] #[diesel(postgres_type(name = "publication_type"))] pub struct PublicationType; - #[derive(diesel::sql_types::SqlType)] + #[derive(diesel::sql_types::SqlType, diesel::query_builder::QueryId)] #[diesel(postgres_type(name = "series_type"))] pub struct SeriesType; - #[derive(diesel::sql_types::SqlType)] + #[derive(diesel::sql_types::SqlType, diesel::query_builder::QueryId)] #[diesel(postgres_type(name = "subject_type"))] pub struct SubjectType; - #[derive(diesel::sql_types::SqlType)] + #[derive(diesel::sql_types::SqlType, diesel::query_builder::QueryId)] #[diesel(postgres_type(name = "work_type"))] pub struct WorkType; - #[derive(diesel::sql_types::SqlType)] + #[derive(diesel::sql_types::SqlType, diesel::query_builder::QueryId)] #[diesel(postgres_type(name = "work_status"))] pub struct WorkStatus; - #[derive(diesel::sql_types::SqlType)] + #[derive(diesel::sql_types::SqlType, diesel::query_builder::QueryId)] #[diesel(postgres_type(name = "relation_type"))] pub struct RelationType; } diff --git a/thoth-app-server/Cargo.toml b/thoth-app-server/Cargo.toml index 5bc496eb..4a87f80f 100644 --- a/thoth-app-server/Cargo.toml +++ b/thoth-app-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-app-server" -version = "0.11.4" +version = "0.11.5" authors = ["Javier Arias ", "Ross Higman "] edition = "2018" license = "Apache-2.0" @@ -9,6 +9,6 @@ repository = "https://github.com/thoth-pub/thoth" readme = "README.md" [dependencies] -actix-web = "4.3.0" +actix-web = "4.4.0" actix-cors = "0.6.4" env_logger ="0.10.0" diff --git a/thoth-app/Cargo.toml b/thoth-app/Cargo.toml index 642e5dc7..576a11ec 100644 --- a/thoth-app/Cargo.toml +++ b/thoth-app/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-app" -version = "0.11.4" +version = "0.11.5" authors = ["Javier Arias ", "Ross Higman "] edition = "2018" license = "Apache-2.0" @@ -23,7 +23,7 @@ anyhow = "1.0.32" chrono = { version = "0.4.26", features = ["serde"] } gloo-storage = "0.2.1" gloo-timers = "0.2.4" -log = "0.4.11" +log = "0.4.20" thiserror = "1.0.20" yew = "0.19.3" yew-agent = "0.1.0" @@ -34,12 +34,12 @@ wasm-logger = "0.2.0" web-sys = { version = "0.3.57", features = ["HtmlInputElement", "HtmlSelectElement", "HtmlTextAreaElement"] } reqwest = { version = "0.11", features = ["json"] } semver = "0.11.0" -serde = { version = "1.0.115", features = ["derive"] } +serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" url = "2.1.1" uuid = { version = "0.8.2", features = ["serde", "v4"] } # `getrandom` is a dependency of `uuid`, we need to explicitly import and include the `js` feature to enable wasm # https://docs.rs/getrandom/latest/getrandom/#webassembly-support getrandom = { version = "0.2", features = ["js"] } -thoth-api = { version = "0.11.4", path = "../thoth-api" } -thoth-errors = { version = "0.11.4", path = "../thoth-errors" } +thoth-api = { version = "0.11.5", path = "../thoth-api" } +thoth-errors = { version = "0.11.5", path = "../thoth-errors" } diff --git a/thoth-app/manifest.json b/thoth-app/manifest.json index f1a44073..14629b2c 100644 --- a/thoth-app/manifest.json +++ b/thoth-app/manifest.json @@ -9,7 +9,7 @@ "start_url": "/?homescreen=1", "background_color": "#ffffff", "theme_color": "#ffdd57", - "version": "0.11.4", + "version": "0.11.5", "icons": [ { "src": "\/android-icon-36x36.png", diff --git a/thoth-client/Cargo.toml b/thoth-client/Cargo.toml index 22dfae9c..3bb1af07 100644 --- a/thoth-client/Cargo.toml +++ b/thoth-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-client" -version = "0.11.4" +version = "0.11.5" authors = ["Javier Arias ", "Ross Higman "] edition = "2018" license = "Apache-2.0" @@ -9,13 +9,13 @@ repository = "https://github.com/thoth-pub/thoth" readme = "README.md" [dependencies] -thoth-api = {version = "0.11.4", path = "../thoth-api" } -thoth-errors = {version = "0.11.4", path = "../thoth-errors" } -graphql_client = "0.12.0" +thoth-api = {version = "0.11.5", path = "../thoth-api" } +thoth-errors = {version = "0.11.5", path = "../thoth-errors" } +graphql_client = "0.13.0" chrono = { version = "0.4.26", features = ["serde"] } reqwest = { version = "0.11", features = ["json"] } -reqwest-middleware = "0.2.0" -reqwest-retry = "0.2.1" +reqwest-middleware = "0.2.3" +reqwest-retry = "0.2.3" serde = "1.0" serde_json = "1.0" uuid = { version = "0.8.2", features = ["serde"] } diff --git a/thoth-errors/Cargo.toml b/thoth-errors/Cargo.toml index a1d50718..1e83650e 100644 --- a/thoth-errors/Cargo.toml +++ b/thoth-errors/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-errors" -version = "0.11.4" +version = "0.11.5" authors = ["Javier Arias ", "Ross Higman "] edition = "2018" license = "Apache-2.0" @@ -17,11 +17,11 @@ uuid = { package = "uuid", version = "0.8.2", features = ["serde", "v4"] } yewtil = { version = "0.4.0", features = ["fetch"] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -actix-web = "4.3.0" -diesel = "2.0.2" -csv = "1.1.6" -juniper = "0.15.10" +actix-web = "4.4.0" +diesel = "2.1.1" +csv = "1.2.2" +juniper = "0.15.11" marc = { version = "3.1.0", features = ["xml"] } phf = { version = "0.11", features = ["macros"] } -reqwest-middleware = "0.2.0" -xml-rs = "0.8.0" +reqwest-middleware = "0.2.3" +xml-rs = "0.8.17" diff --git a/thoth-export-server/Cargo.toml b/thoth-export-server/Cargo.toml index 10c266e4..fe1af3a8 100644 --- a/thoth-export-server/Cargo.toml +++ b/thoth-export-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-export-server" -version = "0.11.4" +version = "0.11.5" authors = ["Javier Arias ", "Ross Higman "] edition = "2018" license = "Apache-2.0" @@ -9,24 +9,24 @@ repository = "https://github.com/thoth-pub/thoth" readme = "README.md" [dependencies] -thoth-api = { version = "0.11.4", path = "../thoth-api" } -thoth-errors = { version = "0.11.4", path = "../thoth-errors" } -thoth-client = { version = "0.11.4", path = "../thoth-client" } -actix-web = "4.3.0" +thoth-api = { version = "0.11.5", path = "../thoth-api" } +thoth-errors = { version = "0.11.5", path = "../thoth-errors" } +thoth-client = { version = "0.11.5", path = "../thoth-client" } +actix-web = "4.4.0" actix-cors = "0.6.4" cc_license = "0.1.0" chrono = { version = "0.4.26", features = ["serde"] } -csv = "1.1.6" +csv = "1.2.2" env_logger = "0.10.0" -futures = "0.3.26" +futures = "0.3.28" lazy_static = "1.4.0" -log = "0.4.14" +log = "0.4.20" marc = { version = "3.1.0", features = ["xml"] } -paperclip = { version = "0.8.0", features = ["actix-base", "actix4", "uuid0", "v2"] } -serde = { version = "1.0.115", features = ["derive"] } +paperclip = { version = "0.8.1", features = ["actix-base", "actix4", "uuid0", "v2"] } +serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" uuid = { version = "0.8.2", features = ["serde"] } -xml-rs = "0.8.0" +xml-rs = "0.8.17" [dev-dependencies] -regex = "1.6.0" +regex = "1.9.5"