From eb31cbbab989f234152add5a699c9dbad3809530 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Fri, 1 Sep 2023 10:49:40 +0100 Subject: [PATCH 01/35] Upgrade actix-web --- Cargo.lock | 172 ++++++++++++++++----------------- thoth-api-server/Cargo.toml | 2 +- thoth-app-server/Cargo.toml | 2 +- thoth-errors/Cargo.toml | 2 +- thoth-export-server/Cargo.toml | 2 +- 5 files changed, 89 insertions(+), 91 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b6f8e789..1ad26c71 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", @@ -68,7 +68,7 @@ dependencies = [ "sha1", "smallvec", "tokio", - "tokio-util 0.7.0", + "tokio-util", "tracing", "zstd 0.12.3+zstd.1.5.2", ] @@ -136,7 +136,7 @@ dependencies = [ "log", "mio", "num_cpus", - "socket2", + "socket2 0.4.4", "tokio", ] @@ -163,9 +163,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,7 +185,6 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "http", "itoa 1.0.1", "language-tags", "log", @@ -197,38 +196,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", + "syn 2.0.8", ] [[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,11 +265,12 @@ 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", ] @@ -463,14 +457,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 +521,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" @@ -765,7 +766,7 @@ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", - "bitflags", + "bitflags 1.2.1", "strsim 0.8.0", "textwrap", "unicode-width", @@ -791,7 +792,7 @@ checksum = "c1458a1df40e1e2afebb7ab60ce55c1fa8f431146205aa5f4887e0b111c27636" dependencies = [ "anstream", "anstyle", - "bitflags", + "bitflags 1.2.1", "clap_lex", "strsim 0.10.0", ] @@ -1102,7 +1103,7 @@ version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68c186a7418a2aac330bb76cde82f16c36b03a66fb91db32d20214311f9f6545" dependencies = [ - "bitflags", + "bitflags 1.2.1", "byteorder", "chrono", "diesel_derives", @@ -1444,14 +1445,14 @@ dependencies = [ [[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 +1468,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" @@ -1689,9 +1690,9 @@ dependencies = [ [[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 +1703,7 @@ dependencies = [ "indexmap", "slab", "tokio", - "tokio-util 0.6.9", + "tokio-util", "tracing", ] @@ -1829,7 +1830,7 @@ dependencies = [ "httpdate", "itoa 1.0.1", "pin-project-lite", - "socket2", + "socket2 0.4.4", "tokio", "tower-service", "tracing", @@ -2044,9 +2045,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" @@ -2165,21 +2166,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 +2269,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 +2294,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", @@ -2532,9 +2535,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" @@ -2705,7 +2708,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]] @@ -2729,7 +2732,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.2.1", ] [[package]] @@ -2738,7 +2741,7 @@ 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", ] @@ -2904,7 +2907,7 @@ 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", @@ -3024,7 +3027,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", @@ -3242,6 +3245,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" @@ -3474,7 +3487,7 @@ version = "0.11.4" dependencies = [ "anyhow", "chrono", - "getrandom 0.2.2", + "getrandom 0.2.10", "gloo-storage", "gloo-timers", "log", @@ -3598,20 +3611,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", "pin-project-lite", "signal-hook-registry", - "socket2", - "winapi", + "socket2 0.5.3", + "windows-sys 0.48.0", ] [[package]] @@ -3626,30 +3638,16 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.9" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", "futures-sink", - "log", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64910e1b9c1901aaf5375561e35b9c057d95ff41a44ede043a03e09279eabaf1" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log", "pin-project-lite", "tokio", + "tracing", ] [[package]] @@ -3870,7 +3868,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", ] @@ -3888,9 +3886,9 @@ 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" diff --git a/thoth-api-server/Cargo.toml b/thoth-api-server/Cargo.toml index 01ee8ce4..16e95da4 100644 --- a/thoth-api-server/Cargo.toml +++ b/thoth-api-server/Cargo.toml @@ -11,7 +11,7 @@ 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" +actix-web = "4.4.0" actix-cors = "0.6.4" actix-identity = "0.4.0" env_logger = "0.10.0" diff --git a/thoth-app-server/Cargo.toml b/thoth-app-server/Cargo.toml index 5bc496eb..4466faca 100644 --- a/thoth-app-server/Cargo.toml +++ b/thoth-app-server/Cargo.toml @@ -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-errors/Cargo.toml b/thoth-errors/Cargo.toml index a1d50718..8ce4f2ae 100644 --- a/thoth-errors/Cargo.toml +++ b/thoth-errors/Cargo.toml @@ -17,7 +17,7 @@ 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" +actix-web = "4.4.0" diesel = "2.0.2" csv = "1.1.6" juniper = "0.15.10" diff --git a/thoth-export-server/Cargo.toml b/thoth-export-server/Cargo.toml index 10c266e4..8183e044 100644 --- a/thoth-export-server/Cargo.toml +++ b/thoth-export-server/Cargo.toml @@ -12,7 +12,7 @@ readme = "README.md" 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" +actix-web = "4.4.0" actix-cors = "0.6.4" cc_license = "0.1.0" chrono = { version = "0.4.26", features = ["serde"] } From 68f6e2f5c724e5426fe7831fe8812801b3030651 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Fri, 1 Sep 2023 10:49:50 +0100 Subject: [PATCH 02/35] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec6d1842..106f4cc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Security + - Upgrade `actix-web` to v4.4.0 ## [[0.11.4]](https://github.com/thoth-pub/thoth/releases/tag/v0.11.4) - 2023-08-28 ### Security From 691f3bb5d0d66fb57aedd951bacae5e8d6663fad Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 07:53:02 +0100 Subject: [PATCH 03/35] Upgrade diesel --- Cargo.lock | 224 ++++++++++------------- diesel.toml | 3 +- thoth-api/Cargo.toml | 8 +- thoth-api/src/model/contribution/mod.rs | 2 +- thoth-api/src/model/institution/mod.rs | 2 +- thoth-api/src/model/language/mod.rs | 4 +- thoth-api/src/model/location/mod.rs | 2 +- thoth-api/src/model/price/mod.rs | 2 +- thoth-api/src/model/publication/mod.rs | 2 +- thoth-api/src/model/series/mod.rs | 2 +- thoth-api/src/model/subject/mod.rs | 2 +- thoth-api/src/model/work/mod.rs | 4 +- thoth-api/src/model/work_relation/mod.rs | 2 +- thoth-api/src/schema.rs | 24 +-- thoth-errors/Cargo.toml | 2 +- 15 files changed, 130 insertions(+), 155 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1ad26c71..13aec613 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -94,7 +94,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", ] @@ -208,9 +208,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5" dependencies = [ "actix-router", - "proc-macro2 1.0.53", - "quote 1.0.26", - "syn 2.0.8", + "proc-macro2", + "quote", + "syn 2.0.12", ] [[package]] @@ -433,8 +433,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", ] @@ -804,9 +804,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" dependencies = [ "heck", - "proc-macro2 1.0.53", - "quote 1.0.26", - "syn 2.0.8", + "proc-macro2", + "quote", + "syn 2.0.12", ] [[package]] @@ -1027,8 +1027,8 @@ dependencies = [ "cc", "codespan-reporting", "once_cell", - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "scratch", "syn 1.0.107", ] @@ -1045,8 +1045,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", ] @@ -1057,8 +1057,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", ] @@ -1068,8 +1068,8 @@ 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", ] @@ -1099,11 +1099,11 @@ dependencies = [ [[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 1.2.1", + "bitflags 2.4.0", "byteorder", "chrono", "diesel_derives", @@ -1116,50 +1116,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.12", ] [[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.12", ] [[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.12", ] [[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.12", +] + [[package]] name = "digest" version = "0.10.3" @@ -1360,7 +1369,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3422d14de7903a52e9dbc10ae05a7e14445ec61890100e098754e120b2bd7b1e" dependencies = [ "derive_utils", - "quote 1.0.26", + "quote", "syn 1.0.107", ] @@ -1387,8 +1396,8 @@ version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -1670,8 +1679,8 @@ dependencies = [ "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", @@ -1684,7 +1693,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d52fc9cde811f44b15ec0692b31e56a3067f6f431c5ace712f286e47c1dacc98" dependencies = [ "graphql_client_codegen", - "proc-macro2 1.0.53", + "proc-macro2", "syn 1.0.107", ] @@ -2026,8 +2035,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", ] @@ -2129,23 +2138,23 @@ checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" [[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]] @@ -2309,8 +2318,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", ] @@ -2408,8 +2417,8 @@ dependencies = [ "lazy_static", "mime", "proc-macro-error", - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "strum", "strum_macros", "syn 1.0.107", @@ -2519,8 +2528,8 @@ checksum = "92aacdc5f16768709a569e913f7451034034178b05bdc8acda226659a3dccc66" dependencies = [ "phf_generator", "phf_shared", - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -2585,8 +2594,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", ] @@ -2597,20 +2606,11 @@ 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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid", -] - [[package]] name = "proc-macro2" version = "1.0.53" @@ -2620,22 +2620,13 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -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]] @@ -3098,9 +3089,9 @@ version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.26", - "syn 2.0.8", + "proc-macro2", + "quote", + "syn 2.0.12", ] [[package]] @@ -3295,8 +3286,8 @@ 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", ] @@ -3307,36 +3298,25 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" -[[package]] -name = "syn" -version = "0.14.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid", -] - [[package]] name = "syn" 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.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc02725fd69ab9f26eab07fad303e2497fad6fb9eba4f96c4d1687bdf704ad9" +checksum = "79d9531f94112cfc3e4c8f5f02cb2b58f72c97b7efd85f70203cc6d8efda5927" dependencies = [ - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "unicode-ident", ] @@ -3417,8 +3397,8 @@ 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", ] @@ -3718,8 +3698,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", ] @@ -3789,12 +3769,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" @@ -3956,8 +3930,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", ] @@ -3980,7 +3954,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", ] @@ -3990,8 +3964,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", @@ -4411,8 +4385,8 @@ checksum = "d6e23bfe3dc3933fbe9592d149c9985f3047d08c637a884b9344c21e56e092ef" dependencies = [ "boolinator", "lazy_static", - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -4425,8 +4399,8 @@ dependencies = [ "boolinator", "lazy_static", "proc-macro-error", - "proc-macro2 1.0.53", - "quote 1.0.26", + "proc-macro2", + "quote", "syn 1.0.107", ] @@ -4456,8 +4430,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", ] 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/thoth-api/Cargo.toml b/thoth-api/Cargo.toml index efea55d3..43f36a4d 100644 --- a/thoth-api/Cargo.toml +++ b/thoth-api/Cargo.toml @@ -21,10 +21,10 @@ actix-web = { version = "4.3.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" 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-errors/Cargo.toml b/thoth-errors/Cargo.toml index 8ce4f2ae..448fe8ef 100644 --- a/thoth-errors/Cargo.toml +++ b/thoth-errors/Cargo.toml @@ -18,7 +18,7 @@ yewtil = { version = "0.4.0", features = ["fetch"] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] actix-web = "4.4.0" -diesel = "2.0.2" +diesel = "2.1.0" csv = "1.1.6" juniper = "0.15.10" marc = { version = "3.1.0", features = ["xml"] } From 787a3a790f33d0e48490b0e8c680e59037c2bd4b Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 07:54:22 +0100 Subject: [PATCH 04/35] Update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 106f4cc6..5bbb7212 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Security - Upgrade `actix-web` to v4.4.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 + ## [[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 From 93906aae79a7c4e92834bab653cdf46771825573 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 08:17:07 +0100 Subject: [PATCH 05/35] Upgrade rand --- Cargo.lock | 2 +- thoth-api/Cargo.toml | 2 +- thoth-api/src/account/util.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 13aec613..6b3969eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3436,7 +3436,7 @@ dependencies = [ "juniper", "lazy_static", "phf", - "rand 0.7.3", + "rand 0.8.5", "regex", "serde", "serde_derive", diff --git a/thoth-api/Cargo.toml b/thoth-api/Cargo.toml index 43f36a4d..96e219ae 100644 --- a/thoth-api/Cargo.toml +++ b/thoth-api/Cargo.toml @@ -31,7 +31,7 @@ jsonwebtoken = "8.2.0" juniper = "0.15.10" lazy_static = "1.4.0" phf = { version = "0.11", features = ["macros"] } -rand = "0.7.3" +rand = "0.8.5" regex = "1.6.0" serde = { version = "1.0.115", features = ["derive"] } serde_derive = "1.0" 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(); From b24938d769e3775641177c1dd0c47540695cfa16 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 08:17:37 +0100 Subject: [PATCH 06/35] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bbb7212..0ee9b1c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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 ## [[0.11.4]](https://github.com/thoth-pub/thoth/releases/tag/v0.11.4) - 2023-08-28 ### Security From 36d902b883f7c3937edb4033f9f081f4f5a5cbe1 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 08:19:15 +0100 Subject: [PATCH 07/35] Upgrade juniper --- Cargo.lock | 10 ++++++---- thoth-api/Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6b3969eb..fe23f388 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2008,9 +2008,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", @@ -3219,11 +3219,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]] diff --git a/thoth-api/Cargo.toml b/thoth-api/Cargo.toml index 96e219ae..e70f2d77 100644 --- a/thoth-api/Cargo.toml +++ b/thoth-api/Cargo.toml @@ -28,7 +28,7 @@ diesel_migrations = { version = "2.1.0", features = ["postgres"], optional = tru dotenv = "0.15.0" futures = { version = "0.3.5", optional = true } jsonwebtoken = "8.2.0" -juniper = "0.15.10" +juniper = "0.15.11" lazy_static = "1.4.0" phf = { version = "0.11", features = ["macros"] } rand = "0.8.5" From 695348d52224b3877a9c85b3ded5dd5745dc5e32 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 08:19:37 +0100 Subject: [PATCH 08/35] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ee9b1c6..6a3aa318 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.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 ## [[0.11.4]](https://github.com/thoth-pub/thoth/releases/tag/v0.11.4) - 2023-08-28 ### Security From 3ba3d2a3b9196fece479c24769865c81d65f98fe Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 08:54:07 +0100 Subject: [PATCH 09/35] Upgrade strum --- Cargo.lock | 31 +++++++++++++++++++++++++------ thoth-api/Cargo.toml | 2 +- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fe23f388..a1f153a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1724,9 +1724,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" @@ -2419,8 +2419,8 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.0", "syn 1.0.107", ] @@ -3277,8 +3277,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]] @@ -3294,6 +3300,19 @@ dependencies = [ "syn 1.0.107", ] +[[package]] +name = "strum_macros" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.12", +] + [[package]] name = "subtle" version = "2.4.1" @@ -3443,7 +3462,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "strum", + "strum 0.25.0", "thoth-errors", "uuid", ] diff --git a/thoth-api/Cargo.toml b/thoth-api/Cargo.toml index e70f2d77..adc36e3e 100644 --- a/thoth-api/Cargo.toml +++ b/thoth-api/Cargo.toml @@ -36,7 +36,7 @@ regex = "1.6.0" serde = { version = "1.0.115", 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] From 06f92e10a45cea1bf219a1153296d8663c704c9a Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 08:54:33 +0100 Subject: [PATCH 10/35] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a3aa318..5a889b96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.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 ## [[0.11.4]](https://github.com/thoth-pub/thoth/releases/tag/v0.11.4) - 2023-08-28 ### Security From 810572715187306e47073d6314a4052e6e187d97 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 09:00:19 +0100 Subject: [PATCH 11/35] Upgrade paperclip --- Cargo.lock | 16 ++++++++-------- thoth-export-server/Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a1f153a0..46e11ecc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2352,9 +2352,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", @@ -2373,9 +2373,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", @@ -2389,9 +2389,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", @@ -2408,9 +2408,9 @@ 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", diff --git a/thoth-export-server/Cargo.toml b/thoth-export-server/Cargo.toml index 8183e044..cc8f660c 100644 --- a/thoth-export-server/Cargo.toml +++ b/thoth-export-server/Cargo.toml @@ -22,7 +22,7 @@ futures = "0.3.26" lazy_static = "1.4.0" log = "0.4.14" marc = { version = "3.1.0", features = ["xml"] } -paperclip = { version = "0.8.0", features = ["actix-base", "actix4", "uuid0", "v2"] } +paperclip = { version = "0.8.1", features = ["actix-base", "actix4", "uuid0", "v2"] } serde = { version = "1.0.115", features = ["derive"] } serde_json = "1.0" uuid = { version = "0.8.2", features = ["serde"] } From 9283941ac356e83bb7f64088bbd7bf9bc2a27ffd Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 09:00:41 +0100 Subject: [PATCH 12/35] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a889b96..5ec6b696 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.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 ## [[0.11.4]](https://github.com/thoth-pub/thoth/releases/tag/v0.11.4) - 2023-08-28 ### Security From 47d2027bcb3a413240a549b2886c133b259083f1 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 09:25:58 +0100 Subject: [PATCH 13/35] Upgrade graphql_client --- Cargo.lock | 91 +++++++++++++++++++++++++++++++++-------- thoth-client/Cargo.toml | 6 +-- 2 files changed, 76 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 46e11ecc..557544ae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1660,9 +1660,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", @@ -1671,9 +1671,9 @@ 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", @@ -1688,9 +1688,9 @@ 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", @@ -1905,6 +1905,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" @@ -2424,6 +2436,17 @@ dependencies = [ "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" @@ -2431,7 +2454,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]] @@ -2636,7 +2673,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", ] @@ -2812,9 +2849,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", @@ -2827,22 +2864,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]] @@ -2975,7 +3015,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]] @@ -3354,11 +3394,11 @@ 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]] @@ -3620,7 +3660,7 @@ dependencies = [ "bytes", "libc", "mio", - "parking_lot", + "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", "socket2 0.5.3", @@ -4027,7 +4067,7 @@ dependencies = [ "glob", "human-panic", "log", - "parking_lot", + "parking_lot 0.12.1", "semver 1.0.16", "serde", "serde_derive", @@ -4041,6 +4081,21 @@ dependencies = [ "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" diff --git a/thoth-client/Cargo.toml b/thoth-client/Cargo.toml index 22dfae9c..39bceacd 100644 --- a/thoth-client/Cargo.toml +++ b/thoth-client/Cargo.toml @@ -11,11 +11,11 @@ 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" +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"] } From 8febb8d717c70342d8f0516d1e43d927d7bbf204 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 09:26:57 +0100 Subject: [PATCH 14/35] Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ec6b696..4e5eab9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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 ## [[0.11.4]](https://github.com/thoth-pub/thoth/releases/tag/v0.11.4) - 2023-08-28 ### Security From 53f115d991ed784e86f9c1aed25a00b103679cdc Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 11:44:29 +0100 Subject: [PATCH 15/35] Upgrade actix-identity --- Cargo.lock | 29 +++++++++++--- thoth-api-server/Cargo.toml | 3 +- thoth-api-server/src/lib.rs | 79 ++++++++++++++++++++++--------------- 3 files changed, 74 insertions(+), 37 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 557544ae..3b6ad3be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -75,17 +75,18 @@ dependencies = [ [[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]] @@ -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" @@ -3513,6 +3531,7 @@ version = "0.11.4" dependencies = [ "actix-cors", "actix-identity", + "actix-session", "actix-web", "env_logger", "juniper", diff --git a/thoth-api-server/Cargo.toml b/thoth-api-server/Cargo.toml index 16e95da4..8ac275fb 100644 --- a/thoth-api-server/Cargo.toml +++ b/thoth-api-server/Cargo.toml @@ -13,7 +13,8 @@ thoth-api = { version = "0.11.4", path = "../thoth-api", features = ["backend"] thoth-errors = { version = "0.11.4", 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"] } 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"]) From c71ceda09174c43218980a12a30ef1398d46d95b Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 11:46:01 +0100 Subject: [PATCH 16/35] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e5eab9e..ed47e26d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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 ## [[0.11.4]](https://github.com/thoth-pub/thoth/releases/tag/v0.11.4) - 2023-08-28 ### Security From 95f5467dd75e97f8c8a3f60ec6b8ccf5d4e0af8e Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 12:08:13 +0100 Subject: [PATCH 17/35] Upgrade clap --- Cargo.lock | 23 ++++++++--------------- Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3b6ad3be..26a2b579 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -873,9 +873,9 @@ dependencies = [ [[package]] name = "console" -version = "0.13.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a50aab2529019abfabfa93f1e6c41ef392f91fbf179b347a7e96abb524884a08" +checksum = "3993e6445baa160675931ec041a5e03ca84b9c6e32a056150d3aa2bdda0a1f45" dependencies = [ "encode_unicode", "lazy_static", @@ -884,7 +884,6 @@ dependencies = [ "terminal_size", "unicode-width", "winapi", - "winapi-util", ] [[package]] @@ -1093,14 +1092,14 @@ dependencies = [ [[package]] name = "dialoguer" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f807b2943dc90f9747497d9d65d7e92472149be0b88bf4ce1201b4ac979c26" +checksum = "c9dd058f8b65922819fabb4a41e7d1964e56344042c26efbccd465202c23fa0c" dependencies = [ - "console 0.13.0", + "console 0.14.1", "lazy_static", "tempfile", - "zeroize 0.9.3", + "zeroize", ] [[package]] @@ -1112,7 +1111,7 @@ dependencies = [ "console 0.15.5", "shell-words", "tempfile", - "zeroize 1.5.7", + "zeroize", ] [[package]] @@ -3487,7 +3486,7 @@ version = "0.11.4" dependencies = [ "cargo-husky", "clap 2.34.0", - "dialoguer 0.7.1", + "dialoguer 0.8.0", "dotenv", "thoth-api", "thoth-api-server", @@ -4545,12 +4544,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..77730278 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ 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" +dialoguer = "0.8.0" dotenv = "0.15.0" [dev-dependencies] From ccaaef7a5faf29884e8ebd3cdff98453ab61b9c6 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 12:21:32 +0100 Subject: [PATCH 18/35] Upgrade clap --- Cargo.lock | 37 ++++++------------------------------- Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 26a2b579..0c81a786 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -871,21 +871,6 @@ dependencies = [ "unreachable", ] -[[package]] -name = "console" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3993e6445baa160675931ec041a5e03ca84b9c6e32a056150d3aa2bdda0a1f45" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "regex", - "terminal_size", - "unicode-width", - "winapi", -] - [[package]] name = "console" version = "0.15.5" @@ -1092,11 +1077,11 @@ dependencies = [ [[package]] name = "dialoguer" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9dd058f8b65922819fabb4a41e7d1964e56344042c26efbccd465202c23fa0c" +checksum = "61579ada4ec0c6031cfac3f86fdba0d195a7ebeb5e36693bd53cb5999a25beeb" dependencies = [ - "console 0.14.1", + "console", "lazy_static", "tempfile", "zeroize", @@ -1108,7 +1093,7 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af3c796f3b0b408d9fd581611b47fa850821fcb84aa640b83a3c1a5be2d691f2" dependencies = [ - "console 0.15.5", + "console", "shell-words", "tempfile", "zeroize", @@ -3441,16 +3426,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" @@ -3486,7 +3461,7 @@ version = "0.11.4" dependencies = [ "cargo-husky", "clap 2.34.0", - "dialoguer 0.8.0", + "dialoguer 0.9.0", "dotenv", "thoth-api", "thoth-api-server", @@ -4079,7 +4054,7 @@ dependencies = [ "cargo_metadata", "chrono", "clap 4.3.4", - "console 0.15.5", + "console", "dialoguer 0.10.3", "env_logger", "glob", diff --git a/Cargo.toml b/Cargo.toml index 77730278..68a6212c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ 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.8.0" +dialoguer = { version = "0.9.0", features = ["password"] } dotenv = "0.15.0" [dev-dependencies] From 700a99124e159c163da0cbde30783d16c0203952 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 12:34:03 +0100 Subject: [PATCH 19/35] Upgrade clap --- Cargo.lock | 20 ++++---------------- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0c81a786..cd2c940b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1077,21 +1077,9 @@ dependencies = [ [[package]] name = "dialoguer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61579ada4ec0c6031cfac3f86fdba0d195a7ebeb5e36693bd53cb5999a25beeb" -dependencies = [ - "console", - "lazy_static", - "tempfile", - "zeroize", -] - -[[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", "shell-words", @@ -3461,7 +3449,7 @@ version = "0.11.4" dependencies = [ "cargo-husky", "clap 2.34.0", - "dialoguer 0.9.0", + "dialoguer", "dotenv", "thoth-api", "thoth-api-server", @@ -4055,7 +4043,7 @@ dependencies = [ "chrono", "clap 4.3.4", "console", - "dialoguer 0.10.3", + "dialoguer", "env_logger", "glob", "human-panic", diff --git a/Cargo.toml b/Cargo.toml index 68a6212c..2610618f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ 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 = { version = "0.9.0", features = ["password"] } +dialoguer = { version = "0.10.4", features = ["password"] } dotenv = "0.15.0" [dev-dependencies] From d6276118498d271b2798f0a81da20d029db5430a Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 13:31:40 +0100 Subject: [PATCH 20/35] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed47e26d..14adba81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.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 ## [[0.11.4]](https://github.com/thoth-pub/thoth/releases/tag/v0.11.4) - 2023-08-28 ### Security From 0ad2e32687219dc71cb228a6d28aed731111fa13 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 13:32:53 +0100 Subject: [PATCH 21/35] Update clap --- Cargo.lock | 64 +++++++++++++++++++++-------------------------- Cargo.toml | 2 +- src/bin/thoth.rs | 65 ++++++++++++++++++++++++++---------------------- 3 files changed, 64 insertions(+), 67 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cd2c940b..6aebb556 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -332,15 +332,6 @@ 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" @@ -778,17 +769,18 @@ dependencies = [ [[package]] name = "clap" -version = "2.34.0" +version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ - "ansi_term", "atty", "bitflags 1.2.1", - "strsim 0.8.0", + "clap_lex 0.2.4", + "indexmap", + "once_cell", + "strsim", + "termcolor", "textwrap", - "unicode-width", - "vec_map", ] [[package]] @@ -811,8 +803,8 @@ dependencies = [ "anstream", "anstyle", "bitflags 1.2.1", - "clap_lex", - "strsim 0.10.0", + "clap_lex 0.5.0", + "strsim", ] [[package]] @@ -827,6 +819,15 @@ dependencies = [ "syn 2.0.12", ] +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + [[package]] name = "clap_lex" version = "0.5.0" @@ -2343,6 +2344,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "os_str_bytes" +version = "6.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" + [[package]] name = "os_type" version = "2.2.0" @@ -3290,12 +3297,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" @@ -3416,12 +3417,9 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.11.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" @@ -3448,7 +3446,7 @@ name = "thoth" version = "0.11.4" dependencies = [ "cargo-husky", - "clap 2.34.0", + "clap 3.2.25", "dialoguer", "dotenv", "thoth-api", @@ -3894,12 +3892,6 @@ 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.4" @@ -4055,7 +4047,7 @@ dependencies = [ "serde_ignored", "serde_json", "siphasher", - "strsim 0.10.0", + "strsim", "toml 0.7.4", "ureq", "walkdir", diff --git a/Cargo.toml b/Cargo.toml index 2610618f..3f35f80f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ 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" +clap = { version = "3.0.0", features = ["cargo", "env"] } dialoguer = { version = "0.10.4", features = ["password"] } dotenv = "0.15.0" diff --git a/src/bin/thoth.rs b/src/bin/thoth.rs index 5a0976b4..61cbc3e1 100644 --- a/src/bin/thoth.rs +++ b/src/bin/thoth.rs @@ -10,9 +10,9 @@ use thoth::app_server; use thoth::export_server; use thoth_errors::ThothResult; -fn host_argument(env_value: &'static str) -> Arg<'static, 'static> { +fn host_argument(env_value: &'static str) -> Arg<'static> { Arg::with_name("host") - .short("h") + .short('H') .long("host") .value_name("HOST") .env(env_value) @@ -21,9 +21,9 @@ fn host_argument(env_value: &'static str) -> Arg<'static, 'static> { .takes_value(true) } -fn port_argument(default_value: &'static str, env_value: &'static str) -> Arg<'static, 'static> { +fn port_argument(default_value: &'static str, env_value: &'static str) -> Arg<'static> { Arg::with_name("port") - .short("p") + .short('p') .long("port") .value_name("PORT") .env(env_value) @@ -32,9 +32,9 @@ fn port_argument(default_value: &'static str, env_value: &'static str) -> Arg<'s .takes_value(true) } -fn domain_argument() -> Arg<'static, 'static> { +fn domain_argument() -> Arg<'static> { Arg::with_name("domain") - .short("d") + .short('d') .long("domain") .value_name("THOTH_DOMAIN") .env("THOTH_DOMAIN") @@ -43,9 +43,9 @@ fn domain_argument() -> Arg<'static, 'static> { .takes_value(true) } -fn key_argument() -> Arg<'static, 'static> { +fn key_argument() -> Arg<'static> { Arg::with_name("key") - .short("k") + .short('k') .long("secret-key") .value_name("SECRET") .env("SECRET_KEY") @@ -53,9 +53,9 @@ fn key_argument() -> Arg<'static, 'static> { .takes_value(true) } -fn session_argument() -> Arg<'static, 'static> { +fn session_argument() -> Arg<'static> { Arg::with_name("duration") - .short("s") + .short('s') .long("session-length") .value_name("DURATION") .env("SESSION_DURATION_SECONDS") @@ -64,9 +64,9 @@ fn session_argument() -> Arg<'static, 'static> { .takes_value(true) } -fn gql_url_argument() -> Arg<'static, 'static> { +fn gql_url_argument() -> Arg<'static> { Arg::with_name("gql-url") - .short("u") + .short('u') .long("gql-url") .value_name("THOTH_GRAPHQL_API") .env("THOTH_GRAPHQL_API") @@ -75,9 +75,9 @@ fn gql_url_argument() -> Arg<'static, 'static> { .takes_value(true) } -fn gql_endpoint_argument() -> Arg<'static, 'static> { +fn gql_endpoint_argument() -> Arg<'static> { Arg::with_name("gql-endpoint") - .short("g") + .short('g') .long("gql-endpoint") .value_name("THOTH_GRAPHQL_ENDPOINT") .env("THOTH_GRAPHQL_ENDPOINT") @@ -86,9 +86,9 @@ fn gql_endpoint_argument() -> Arg<'static, 'static> { .takes_value(true) } -fn export_url_argument() -> Arg<'static, 'static> { +fn export_url_argument() -> Arg<'static> { Arg::with_name("export-url") - .short("u") + .short('u') .long("export-url") .value_name("THOTH_EXPORT_API") .env("THOTH_EXPORT_API") @@ -97,9 +97,9 @@ fn export_url_argument() -> Arg<'static, 'static> { .takes_value(true) } -fn threads_argument(env_value: &'static str) -> Arg<'static, 'static> { +fn threads_argument(env_value: &'static str) -> Arg<'static> { Arg::with_name("threads") - .short("t") + .short('t') .long("threads") .value_name("THREADS") .env(env_value) @@ -108,9 +108,9 @@ fn threads_argument(env_value: &'static str) -> Arg<'static, 'static> { .takes_value(true) } -fn keep_alive_argument(env_value: &'static str) -> Arg<'static, 'static> { +fn keep_alive_argument(env_value: &'static str) -> Arg<'static> { Arg::with_name("keep-alive") - .short("K") + .short('K') .long("keep-alive") .value_name("THREADS") .env(env_value) @@ -119,7 +119,7 @@ fn keep_alive_argument(env_value: &'static str) -> Arg<'static, 'static> { .takes_value(true) } -fn thoth_commands() -> App<'static, 'static> { +fn thoth_commands() -> App<'static> { App::new(env!("CARGO_PKG_NAME")) .version(crate_version!()) .author(crate_authors!("\n")) @@ -187,8 +187,8 @@ fn main() -> ThothResult<()> { dotenv().ok(); match thoth_commands().get_matches().subcommand() { - ("start", Some(start_matches)) => match start_matches.subcommand() { - ("graphql-api", Some(api_matches)) => { + Some(("start", start_matches)) => match start_matches.subcommand() { + Some(("graphql-api", 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(); @@ -209,14 +209,14 @@ fn main() -> ThothResult<()> { ) .map_err(|e| e.into()) } - ("app", Some(client_matches)) => { + Some(("app", 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(); app_server(host, port, threads, keep_alive).map_err(|e| e.into()) } - ("export-api", Some(client_matches)) => { + Some(("export-api", 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(); @@ -228,8 +228,8 @@ fn main() -> ThothResult<()> { } _ => unreachable!(), }, - ("migrate", Some(_)) => run_migrations(), - ("init", Some(init_matches)) => { + Some(("migrate", _)) => run_migrations(), + Some(("init", 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(); @@ -251,8 +251,8 @@ 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() @@ -309,7 +309,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 +330,8 @@ fn main() -> ThothResult<()> { _ => unreachable!(), } } + +#[test] +fn verify_app() { + thoth_commands().debug_assert(); +} From 08884a1457eb68012744f0797511972abc9318ff Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Mon, 4 Sep 2023 13:35:04 +0100 Subject: [PATCH 22/35] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14adba81..0654078a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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 `clap` to v3.0.0 + - 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 From 531bca387a834de3f41f888fda6b728e4061e391 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 5 Sep 2023 08:49:31 +0100 Subject: [PATCH 23/35] Refactor deprecated methods --- src/bin/thoth.rs | 105 +++++++++++++++++++++++++++-------------------- 1 file changed, 60 insertions(+), 45 deletions(-) diff --git a/src/bin/thoth.rs b/src/bin/thoth.rs index 61cbc3e1..60a9ba5a 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; @@ -62,6 +62,7 @@ fn session_argument() -> Arg<'static> { .default_value("3600") .help("Authentication cookie session duration (seconds)") .takes_value(true) + .value_parser(value_parser!(i64)) } fn gql_url_argument() -> Arg<'static> { @@ -106,6 +107,7 @@ fn threads_argument(env_value: &'static str) -> Arg<'static> { .default_value("5") .help("Number of HTTP workers to start") .takes_value(true) + .value_parser(value_parser!(usize)) } fn keep_alive_argument(env_value: &'static str) -> Arg<'static> { @@ -117,21 +119,24 @@ fn keep_alive_argument(env_value: &'static str) -> Arg<'static> { .default_value("5") .help("Number of seconds to wait for subsequent requests") .takes_value(true) + .value_parser(value_parser!(u64)) } -fn thoth_commands() -> App<'static> { - App::new(env!("CARGO_PKG_NAME")) +fn thoth_commands() -> Command<'static> { + 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> { .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> { .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> { ), ) .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> { .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")), ) } @@ -189,14 +195,14 @@ fn main() -> ThothResult<()> { match thoth_commands().get_matches().subcommand() { Some(("start", start_matches)) => match start_matches.subcommand() { Some(("graphql-api", 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(); + 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, @@ -210,19 +216,25 @@ fn main() -> ThothResult<()> { .map_err(|e| e.into()) } Some(("app", 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 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()) } Some(("export-api", 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(); + 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()) } @@ -230,14 +242,17 @@ fn main() -> ThothResult<()> { }, Some(("migrate", _)) => run_migrations(), Some(("init", 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(); + 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, @@ -255,13 +270,13 @@ fn main() -> ThothResult<()> { 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() @@ -332,6 +347,6 @@ fn main() -> ThothResult<()> { } #[test] -fn verify_app() { +fn test_cli() { thoth_commands().debug_assert(); } From ef230b9a568436e6fae8e51bb8de3576266683c8 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 5 Sep 2023 09:54:43 +0100 Subject: [PATCH 24/35] Upgrade clap --- Cargo.lock | 44 ++++------------------------------ Cargo.toml | 2 +- src/bin/thoth.rs | 62 ++++++++++++++++++++++++------------------------ 3 files changed, 36 insertions(+), 72 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6aebb556..c1771a27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -767,22 +767,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "atty", - "bitflags 1.2.1", - "clap_lex 0.2.4", - "indexmap", - "once_cell", - "strsim", - "termcolor", - "textwrap", -] - [[package]] name = "clap" version = "4.3.4" @@ -803,7 +787,8 @@ dependencies = [ "anstream", "anstyle", "bitflags 1.2.1", - "clap_lex 0.5.0", + "clap_lex", + "once_cell", "strsim", ] @@ -819,15 +804,6 @@ dependencies = [ "syn 2.0.12", ] -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - [[package]] name = "clap_lex" version = "0.5.0" @@ -2344,12 +2320,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "os_str_bytes" -version = "6.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" - [[package]] name = "os_type" version = "2.2.0" @@ -3415,12 +3385,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "textwrap" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - [[package]] name = "thiserror" version = "1.0.31" @@ -3446,7 +3410,7 @@ name = "thoth" version = "0.11.4" dependencies = [ "cargo-husky", - "clap 3.2.25", + "clap", "dialoguer", "dotenv", "thoth-api", @@ -4033,7 +3997,7 @@ dependencies = [ "binary-install", "cargo_metadata", "chrono", - "clap 4.3.4", + "clap", "console", "dialoguer", "env_logger", diff --git a/Cargo.toml b/Cargo.toml index 3f35f80f..65d7a734 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ 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 = { version = "3.0.0", features = ["cargo", "env"] } +clap = { version = "4.0.0", features = ["cargo", "env"] } dialoguer = { version = "0.10.4", features = ["password"] } dotenv = "0.15.0" diff --git a/src/bin/thoth.rs b/src/bin/thoth.rs index 60a9ba5a..1595db5d 100644 --- a/src/bin/thoth.rs +++ b/src/bin/thoth.rs @@ -10,119 +10,119 @@ use thoth::app_server; use thoth::export_server; use thoth_errors::ThothResult; -fn host_argument(env_value: &'static str) -> Arg<'static> { - Arg::with_name("host") +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> { - Arg::with_name("port") +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> { - Arg::with_name("domain") +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> { - Arg::with_name("key") +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> { - Arg::with_name("duration") +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> { - Arg::with_name("gql-url") +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> { - Arg::with_name("gql-endpoint") +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> { - Arg::with_name("export-url") +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> { - Arg::with_name("threads") +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> { - Arg::with_name("keep-alive") +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() -> Command<'static> { +fn thoth_commands() -> Command { Command::new(env!("CARGO_PKG_NAME")) .version(crate_version!()) .author(crate_authors!("\n")) From 891a3b83a3a1e3084a085d7934a9c23753a90a96 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 5 Sep 2023 09:54:57 +0100 Subject: [PATCH 25/35] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0654078a..9b2be826 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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 `clap` to v3.0.0 + - Upgrade `clap` to v4.0.0 - 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 From bca89ae3c468bb9e06640c6e44a7cd628976b9b6 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 5 Sep 2023 10:23:31 +0100 Subject: [PATCH 26/35] Upgrade clap --- Cargo.lock | 24 ++++++++++-------------- Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c1771a27..1e6556ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -334,16 +334,15 @@ dependencies = [ [[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", ] @@ -373,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", @@ -769,34 +768,31 @@ dependencies = [ [[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 1.2.1", "clap_lex", - "once_cell", "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", diff --git a/Cargo.toml b/Cargo.toml index 65d7a734..f2104a8b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ 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 = { version = "4.0.0", features = ["cargo", "env"] } +clap = { version = "4.4.2", features = ["cargo", "env"] } dialoguer = { version = "0.10.4", features = ["password"] } dotenv = "0.15.0" From d1e4d378dd948795453376e89f5882ac27009aec Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 5 Sep 2023 10:24:06 +0100 Subject: [PATCH 27/35] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b2be826..222ab285 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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 `clap` to v4.0.0 + - 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 From 8c15e1ecab635163cb218bed249fbf8d143030fd Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 5 Sep 2023 11:05:57 +0100 Subject: [PATCH 28/35] Update dependencies --- Cargo.lock | 110 ++++++++++++++++++++---------------- thoth-api-server/Cargo.toml | 2 +- thoth-api/Cargo.toml | 10 ++-- thoth-app/Cargo.toml | 2 +- 4 files changed, 68 insertions(+), 56 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1e6556ce..25253570 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -228,7 +228,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.12", + "syn 2.0.31", ] [[package]] @@ -295,9 +295,9 @@ dependencies = [ [[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", ] @@ -606,7 +606,7 @@ checksum = "a40b47ad93e1a5404e6c18dec46b628214fee441c70f4ab5d6942142cc268a3d" dependencies = [ "lazy_static", "memchr", - "regex-automata", + "regex-automata 0.1.9", "serde", ] @@ -797,7 +797,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.12", + "syn 2.0.31", ] [[package]] @@ -1086,7 +1086,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.12", + "syn 2.0.31", ] [[package]] @@ -1097,7 +1097,7 @@ checksum = "c7267437d5b12df60ae29bd97f8d120f1c3a6272d6f213551afa56bbb2ecfbb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.12", + "syn 2.0.31", ] [[package]] @@ -1109,7 +1109,7 @@ dependencies = [ "diesel_table_macro_syntax", "proc-macro2", "quote", - "syn 2.0.12", + "syn 2.0.31", ] [[package]] @@ -1129,7 +1129,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" dependencies = [ - "syn 2.0.12", + "syn 2.0.31", ] [[package]] @@ -1296,9 +1296,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", @@ -1311,9 +1311,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", @@ -1321,9 +1321,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" @@ -1338,9 +1338,9 @@ dependencies = [ [[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", @@ -1349,38 +1349,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", "quote", - "syn 1.0.107", + "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", @@ -1969,11 +1969,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", @@ -2107,9 +2107,9 @@ 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" @@ -2613,18 +2613,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.53" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.26" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -2739,12 +2739,13 @@ dependencies = [ [[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 0.3.8", "regex-syntax", ] @@ -2757,11 +2758,22 @@ dependencies = [ "byteorder", ] +[[package]] +name = "regex-automata" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + [[package]] name = "regex-syntax" -version = "0.6.27" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "remove_dir_all" @@ -3067,9 +3079,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", ] @@ -3088,13 +3100,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", "quote", - "syn 2.0.12", + "syn 2.0.31", ] [[package]] @@ -3307,7 +3319,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.12", + "syn 2.0.31", ] [[package]] @@ -3329,9 +3341,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.12" +version = "2.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79d9531f94112cfc3e4c8f5f02cb2b58f72c97b7efd85f70203cc6d8efda5927" +checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" dependencies = [ "proc-macro2", "quote", diff --git a/thoth-api-server/Cargo.toml b/thoth-api-server/Cargo.toml index 8ac275fb..5f88fb15 100644 --- a/thoth-api-server/Cargo.toml +++ b/thoth-api-server/Cargo.toml @@ -17,5 +17,5 @@ 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"] } +serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/thoth-api/Cargo.toml b/thoth-api/Cargo.toml index adc36e3e..a57dfa8d 100644 --- a/thoth-api/Cargo.toml +++ b/thoth-api/Cargo.toml @@ -17,7 +17,7 @@ backend = ["diesel", "diesel-derive-enum", "diesel_migrations", "futures", "acti [dependencies] thoth-errors = { version = "0.11.4", path = "../thoth-errors" } -actix-web = { version = "4.3.0", optional = true } +actix-web = { version = "4.4.0", optional = true } argon2rs = "0.2.5" isbn2 = "0.4.0" chrono = { version = "0.4.26", features = ["serde"] } @@ -26,14 +26,14 @@ diesel-derive-enum = { version = "2.1.0", features = ["postgres"], optional = tr 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" +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.8.5" -regex = "1.6.0" -serde = { version = "1.0.115", features = ["derive"] } +regex = "1.9.5" +serde = { version = "1.0", features = ["derive"] } serde_derive = "1.0" serde_json = "1.0" strum = { version = "0.25.0", features = ["derive"] } diff --git a/thoth-app/Cargo.toml b/thoth-app/Cargo.toml index 642e5dc7..df5d2872 100644 --- a/thoth-app/Cargo.toml +++ b/thoth-app/Cargo.toml @@ -34,7 +34,7 @@ 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"] } From 6d8bdb46d330c3431499742c1e54cd64e830e213 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 5 Sep 2023 11:10:43 +0100 Subject: [PATCH 29/35] Update dependencies --- Cargo.lock | 65 +++++++++------------------------- thoth-api-server/Cargo.toml | 2 +- thoth-app/Cargo.toml | 2 +- thoth-errors/Cargo.toml | 10 +++--- thoth-export-server/Cargo.toml | 12 +++---- 5 files changed, 30 insertions(+), 61 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 25253570..be9c205e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -58,7 +58,7 @@ dependencies = [ "http", "httparse", "httpdate", - "itoa 1.0.1", + "itoa", "language-tags", "local-channel", "mime", @@ -203,7 +203,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "itoa 1.0.1", + "itoa", "language-tags", "log", "mime", @@ -598,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 0.1.9", - "serde", -] - [[package]] name = "bumpalo" version = "3.12.0" @@ -952,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", ] @@ -1070,7 +1057,7 @@ dependencies = [ "byteorder", "chrono", "diesel_derives", - "itoa 1.0.1", + "itoa", "pq-sys", "r2d2", "serde_json", @@ -1738,7 +1725,7 @@ checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa 1.0.1", + "itoa", ] [[package]] @@ -1800,7 +1787,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.1", + "itoa", "pin-project-lite", "socket2 0.4.4", "tokio", @@ -1937,12 +1924,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" @@ -2083,12 +2064,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" @@ -2745,19 +2723,10 @@ checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.8", + "regex-automata", "regex-syntax", ] -[[package]] -name = "regex-automata" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" -dependencies = [ - "byteorder", -] - [[package]] name = "regex-automata" version = "0.3.8" @@ -3125,7 +3094,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" dependencies = [ "indexmap", - "itoa 1.0.1", + "itoa", "ryu", "serde", ] @@ -3146,7 +3115,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.1", + "itoa", "ryu", "serde", ] @@ -3158,7 +3127,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fb06d4b6cdaef0e0c51fa881acb721bed3c924cfaa71d9c94a3b771dfdf6567" dependencies = [ "indexmap", - "itoa 1.0.1", + "itoa", "ryu", "serde", "unsafe-libyaml", @@ -3589,7 +3558,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", @@ -4322,9 +4291,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" diff --git a/thoth-api-server/Cargo.toml b/thoth-api-server/Cargo.toml index 5f88fb15..202179e5 100644 --- a/thoth-api-server/Cargo.toml +++ b/thoth-api-server/Cargo.toml @@ -16,6 +16,6 @@ actix-cors = "0.6.4" actix-identity = "0.5.2" actix-session = { version = "0.7.2", features = ["cookie-session"] } env_logger = "0.10.0" -juniper = "0.15.10" +juniper = "0.15.11" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/thoth-app/Cargo.toml b/thoth-app/Cargo.toml index df5d2872..93ff2d47 100644 --- a/thoth-app/Cargo.toml +++ b/thoth-app/Cargo.toml @@ -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" diff --git a/thoth-errors/Cargo.toml b/thoth-errors/Cargo.toml index 448fe8ef..08b5de71 100644 --- a/thoth-errors/Cargo.toml +++ b/thoth-errors/Cargo.toml @@ -18,10 +18,10 @@ yewtil = { version = "0.4.0", features = ["fetch"] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] actix-web = "4.4.0" -diesel = "2.1.0" -csv = "1.1.6" -juniper = "0.15.10" +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 cc8f660c..3a758a1c 100644 --- a/thoth-export-server/Cargo.toml +++ b/thoth-export-server/Cargo.toml @@ -16,17 +16,17 @@ 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.1", features = ["actix-base", "actix4", "uuid0", "v2"] } -serde = { version = "1.0.115", features = ["derive"] } +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" From 0a7d98884c11557bb2081fb4853f2b08060c3129 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 5 Sep 2023 11:10:52 +0100 Subject: [PATCH 30/35] Update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 222ab285..245ab234 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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 From 51469ad242400b8e41ded929f4d1676c9b289ef4 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 5 Sep 2023 11:12:48 +0100 Subject: [PATCH 31/35] Update getrandom --- Cargo.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index be9c205e..c9cb51be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1393,11 +1393,11 @@ 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", ] @@ -2624,7 +2624,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", @@ -2668,7 +2668,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]] From f6ad7b5b24d228e3aa6e6f494a003fc5bf333681 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 5 Sep 2023 11:26:30 +0100 Subject: [PATCH 32/35] Upgrade tempfile --- Cargo.lock | 64 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c9cb51be..6e35eddf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1212,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" @@ -1891,7 +1897,7 @@ checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", - "rustix", + "rustix 0.37.3", "windows-sys 0.48.0", ] @@ -2035,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" @@ -2691,15 +2703,18 @@ 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 1.2.1", ] @@ -2744,15 +2759,6 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - [[package]] name = "reqwest" version = "0.11.20" @@ -2886,10 +2892,23 @@ dependencies = [ "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" @@ -3341,16 +3360,15 @@ dependencies = [ [[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]] From 3ac99ed239f6252fb453c64a7997f9b06d0030af Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 5 Sep 2023 11:26:54 +0100 Subject: [PATCH 33/35] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 245ab234..bbe63d83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Security - Upgrade `actix-web` to v4.4.0 + - Upgrade `tempfile` to v3.8.0 ### Changed - Upgrade `diesel` to v2.1.1 From 709a80caed3a4c22a1ada0fa6701a2a0ef64d320 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 5 Sep 2023 13:00:03 +0100 Subject: [PATCH 34/35] Bump v0.11.5 --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 12 ++++++------ thoth-api-server/Cargo.toml | 6 +++--- thoth-api/Cargo.toml | 4 ++-- thoth-app-server/Cargo.toml | 2 +- thoth-app/Cargo.toml | 6 +++--- thoth-app/manifest.json | 2 +- thoth-client/Cargo.toml | 6 +++--- thoth-errors/Cargo.toml | 2 +- thoth-export-server/Cargo.toml | 8 ++++---- 10 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6e35eddf..3a5f42d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3402,7 +3402,7 @@ dependencies = [ [[package]] name = "thoth" -version = "0.11.4" +version = "0.11.5" dependencies = [ "cargo-husky", "clap", @@ -3417,7 +3417,7 @@ dependencies = [ [[package]] name = "thoth-api" -version = "0.11.4" +version = "0.11.5" dependencies = [ "actix-web", "argon2rs", @@ -3446,7 +3446,7 @@ dependencies = [ [[package]] name = "thoth-api-server" -version = "0.11.4" +version = "0.11.5" dependencies = [ "actix-cors", "actix-identity", @@ -3462,7 +3462,7 @@ dependencies = [ [[package]] name = "thoth-app" -version = "0.11.4" +version = "0.11.5" dependencies = [ "anyhow", "chrono", @@ -3491,7 +3491,7 @@ dependencies = [ [[package]] name = "thoth-app-server" -version = "0.11.4" +version = "0.11.5" dependencies = [ "actix-cors", "actix-web", @@ -3500,7 +3500,7 @@ dependencies = [ [[package]] name = "thoth-client" -version = "0.11.4" +version = "0.11.5" dependencies = [ "chrono", "graphql_client", @@ -3516,7 +3516,7 @@ dependencies = [ [[package]] name = "thoth-errors" -version = "0.11.4" +version = "0.11.5" dependencies = [ "actix-web", "csv", @@ -3536,7 +3536,7 @@ dependencies = [ [[package]] name = "thoth-export-server" -version = "0.11.4" +version = "0.11.5" dependencies = [ "actix-cors", "actix-web", diff --git a/Cargo.toml b/Cargo.toml index f2104a8b..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,11 +16,11 @@ 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" } +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" diff --git a/thoth-api-server/Cargo.toml b/thoth-api-server/Cargo.toml index 202179e5..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,8 +9,8 @@ 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" } +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.5.2" diff --git a/thoth-api/Cargo.toml b/thoth-api/Cargo.toml index a57dfa8d..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,7 +16,7 @@ maintenance = { status = "actively-developed" } backend = ["diesel", "diesel-derive-enum", "diesel_migrations", "futures", "actix-web"] [dependencies] -thoth-errors = { version = "0.11.4", path = "../thoth-errors" } +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" diff --git a/thoth-app-server/Cargo.toml b/thoth-app-server/Cargo.toml index 4466faca..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" diff --git a/thoth-app/Cargo.toml b/thoth-app/Cargo.toml index 93ff2d47..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" @@ -41,5 +41,5 @@ 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 39bceacd..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,8 +9,8 @@ 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-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"] } diff --git a/thoth-errors/Cargo.toml b/thoth-errors/Cargo.toml index 08b5de71..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" diff --git a/thoth-export-server/Cargo.toml b/thoth-export-server/Cargo.toml index 3a758a1c..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,9 +9,9 @@ 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" } +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" From e5d3c4099402be297a4b01275180d0ff4d082490 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 5 Sep 2023 13:00:33 +0100 Subject: [PATCH 35/35] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbe63d83..7976b569 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [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