diff --git a/compatibility-suite/Cargo.toml b/compatibility-suite/Cargo.toml index f487bbc92..d9efbefe0 100644 --- a/compatibility-suite/Cargo.toml +++ b/compatibility-suite/Cargo.toml @@ -13,10 +13,10 @@ futures = "0.3.29" itertools = "0.12.1" lazy_static = "1.4.0" maplit = "1.0.2" -pact_models = { version = "~1.2.2" } -pact_matching = { version = "1.2.5", path = "../rust/pact_matching" } +pact_models = { version = "~1.2.4" } +pact_matching = { version = "1.2.6", path = "../rust/pact_matching" } pact_mock_server = { version = "1.2.9" } -pact_verifier = { version = "1.2.3", path = "../rust/pact_verifier" } +pact_verifier = { version = "1.2.4", path = "../rust/pact_verifier" } pact_consumer = { version = "1.2.3", path = "../rust/pact_consumer" } pretty_assertions = "1.4.0" regex = "1.10.2" diff --git a/rust/Cargo.lock b/rust/Cargo.lock index caf6c1a5f..0a8381790 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -4,18 +4,18 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aes" @@ -63,9 +63,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338" dependencies = [ "anstyle", "anstyle-parse", @@ -78,43 +78,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" [[package]] name = "arbitrary" @@ -137,9 +137,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.12" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" +checksum = "0cb8f1d480b0ea3783ab015936d2a55c87e219676f0c0b7dec61494043f21857" dependencies = [ "flate2", "futures-core", @@ -150,9 +150,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -161,24 +161,24 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] @@ -200,9 +200,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "automod" @@ -210,16 +210,16 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edf3ee19dbc0a46d740f6f0926bde8c50f02bdbc7b536842da28f6ac56513a8b" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] name = "axum" -version = "0.7.5" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" dependencies = [ "async-trait", "axum-core", @@ -237,16 +237,16 @@ dependencies = [ "rustversion", "serde", "sync_wrapper 1.0.1", - "tower", + "tower 0.5.1", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", "bytes", @@ -257,24 +257,24 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", "tower-layer", "tower-service", ] [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets", ] [[package]] @@ -330,9 +330,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" dependencies = [ "serde", ] @@ -360,12 +360,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.7" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -397,7 +398,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -471,18 +472,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.11" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35723e6a11662c2afb578bcf0b88bf6ea8e21282a953428f240574fcc3a2b5b3" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.11" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eb96cbfa7cfa35017b7cd548c75b14c3118c98b423041d70562665e07fb0fa" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -498,9 +499,9 @@ checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "console" @@ -517,9 +518,9 @@ dependencies = [ [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "content_inspector" @@ -542,15 +543,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -632,10 +633,10 @@ checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.86", - "quote 1.0.36", + "proc-macro2 1.0.89", + "quote 1.0.37", "strsim 0.11.1", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -645,8 +646,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] @@ -671,8 +672,8 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2c35ab6e03642397cdda1dd58abbc05d418aef8e36297f336d5aba060fe8df" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", + "proc-macro2 1.0.89", + "quote 1.0.37", "syn 1.0.109", ] @@ -682,9 +683,9 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] @@ -716,16 +717,16 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] name = "dunce" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "either" @@ -741,9 +742,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -808,20 +809,20 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] @@ -832,9 +833,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", "miniz_oxide", @@ -867,9 +868,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -882,9 +883,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -892,15 +893,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -909,32 +910,32 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-timer" @@ -944,9 +945,9 @@ checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -992,9 +993,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -1023,7 +1024,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.2.6", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -1032,9 +1033,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", "bytes", @@ -1042,7 +1043,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.2.6", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -1067,9 +1068,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" [[package]] name = "hashers" @@ -1183,9 +1184,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -1211,9 +1212,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", @@ -1235,14 +1236,14 @@ dependencies = [ [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.5", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "httparse", @@ -1262,7 +1263,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.31", "log", "rustls 0.21.12", "rustls-native-certs 0.6.3", @@ -1272,17 +1273,17 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", "log", - "rustls 0.23.12", - "rustls-native-certs 0.7.1", + "rustls 0.23.15", + "rustls-native-certs 0.8.0", "rustls-pki-types", "tokio", "tokio-rustls 0.26.0", @@ -1296,7 +1297,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" dependencies = [ - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", "pin-project-lite", "tokio", @@ -1305,29 +1306,28 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper 1.4.1", + "hyper 1.5.0", "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1375,20 +1375,38 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", "serde", ] [[package]] name = "indextree" -version = "4.6.1" +version = "4.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6f7e29c1619ec492f411b021ac9f30649d5f522ca6f287f2467ee48c8dfe10" +checksum = "91f3e68a01402c3404bfb739079f38858325bc7ad775b07922278a8a415b1a3f" +dependencies = [ + "indextree-macros", +] + +[[package]] +name = "indextree-macros" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "477e2e7ec7379407656293ff74902caea786a1dda427ca1f84b923c4fdeb7659" +dependencies = [ + "either", + "itertools 0.13.0", + "proc-macro2 1.0.89", + "quote 1.0.37", + "strum", + "syn 2.0.85", + "thiserror", +] [[package]] name = "indicatif" @@ -1405,9 +1423,9 @@ dependencies = [ [[package]] name = "infer" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb33622da908807a06f9513c19b3c1ad50fab3e4137d82a78107d502075aa199" +checksum = "bc150e5ce2330295b8616ce0e3f53250e53af31759a9dbedad1621ba29151847" dependencies = [ "cfb", ] @@ -1432,9 +1450,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is_terminal_polyfill" @@ -1451,15 +1469,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -1486,9 +1495,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1542,9 +1551,20 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.155" +version = "0.2.161" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" + +[[package]] +name = "libredox" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.6.0", + "libc", + "redox_syscall", +] [[package]] name = "linux-raw-sys" @@ -1591,10 +1611,10 @@ checksum = "dc487311295e0002e452025d6b580b77bb17286de87b57138f3b5db711cded68" dependencies = [ "beef", "fnv", - "proc-macro2 1.0.86", - "quote 1.0.36", + "proc-macro2 1.0.89", + "quote 1.0.37", "regex-syntax 0.6.29", - "syn 2.0.72", + "syn 2.0.85", ] [[package]] @@ -1673,18 +1693,18 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi 0.3.9", "libc", @@ -1771,8 +1791,8 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16d0d3f2a488592e5368ebbe996e7f1d44aa13156efad201f5b4d84e150eaa93" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", + "proc-macro2 1.0.89", + "quote 1.0.37", "syn 1.0.109", ] @@ -1783,8 +1803,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc7c92f190c97f79b4a332f5e81dcf68c8420af2045c936c9be0bc9de6f63b5" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.86", - "quote 1.0.36", + "proc-macro2 1.0.89", + "quote 1.0.37", "syn 1.0.109", ] @@ -1888,18 +1908,18 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.36.2" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "onig" @@ -1940,12 +1960,12 @@ dependencies = [ [[package]] name = "os_pipe" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d73ba8daf8fac13b0501d1abeddcfe21ba7401ada61a819144b6c2a4f32209" +checksum = "5ffd2b0a5634335b135d5728d84c5e0fd726954b87111f7506a61c502280d982" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1956,9 +1976,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pact-plugin-driver" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "337cfac055cf94b9679170821a6ab0e474ec88b129897921ad770467028bfea5" +checksum = "d522f37b56bea8d219fde70740a7cfe1c6c5f2f81ad03cab49121da6bf0d2477" dependencies = [ "anyhow", "async-trait", @@ -1998,7 +2018,7 @@ dependencies = [ [[package]] name = "pact_consumer" -version = "1.3.1" +version = "1.3.2" dependencies = [ "anyhow", "async-trait", @@ -2011,7 +2031,7 @@ dependencies = [ "maplit", "pact-plugin-driver", "pact_matching 2.0.0-beta.0", - "pact_mock_server 2.0.0", + "pact_mock_server 2.0.2", "pact_models", "pretty_assertions", "quickcheck", @@ -2034,7 +2054,7 @@ dependencies = [ [[package]] name = "pact_ffi" -version = "0.4.23" +version = "0.4.24" dependencies = [ "ansi_term", "anyhow", @@ -2047,7 +2067,7 @@ dependencies = [ "expectest", "futures", "home", - "itertools 0.12.1", + "itertools 0.13.0", "lazy_static", "libc", "log", @@ -2057,7 +2077,7 @@ dependencies = [ "os_info", "pact-plugin-driver", "pact_matching 2.0.0-beta.0", - "pact_mock_server 1.2.9", + "pact_mock_server 1.2.10", "pact_models", "pact_verifier", "panic-message", @@ -2068,7 +2088,7 @@ dependencies = [ "regex", "regex-syntax 0.6.29", "reqwest", - "rstest 0.19.0", + "rstest 0.22.0", "serde", "serde_json", "sxd-document", @@ -2087,9 +2107,9 @@ dependencies = [ [[package]] name = "pact_matching" -version = "1.2.5" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e6d54874f6eed13c7a81c3dbe0cb9141d8326aa4a410826805be57ce6d0dc4a" +checksum = "223202db5fabc6732db4e6623608144a0040644825408a1526803dfba350b74f" dependencies = [ "ansi_term", "anyhow", @@ -2101,7 +2121,7 @@ dependencies = [ "hex", "http 1.1.0", "infer", - "itertools 0.12.1", + "itertools 0.13.0", "lazy_static", "lenient_semver", "maplit", @@ -2143,7 +2163,7 @@ dependencies = [ "hex", "http 1.1.0", "infer", - "itertools 0.12.1", + "itertools 0.13.0", "lazy_static", "lenient_semver", "maplit", @@ -2159,7 +2179,7 @@ dependencies = [ "quickcheck", "rand", "reqwest", - "rstest 0.19.0", + "rstest 0.22.0", "semver", "serde", "serde_json", @@ -2176,20 +2196,20 @@ dependencies = [ [[package]] name = "pact_mock_server" -version = "1.2.9" +version = "1.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "392cbfdaa5a60b8edc1f53ae2cad06afce6a32a4f1667c53f4f2e342ed765539" +checksum = "c5174092ffb815793abdbf8ade73f2d4aad4e4e21c247ee2f28ec783487eed3a" dependencies = [ "anyhow", "bytes", "futures", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-rustls 0.24.2", "itertools 0.13.0", "lazy_static", "maplit", "pact-plugin-driver", - "pact_matching 1.2.5", + "pact_matching 1.2.7", "pact_models", "rustls 0.21.12", "rustls-pemfile 1.0.4", @@ -2206,27 +2226,27 @@ dependencies = [ [[package]] name = "pact_mock_server" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57011d5e96c0b2206ee618ed96671a46df19f2cd13bbf46648ffde3a3776b2ec" +checksum = "9edf52ddfc8b2d6c9a38066b66a7775e69b93aaaf6def1b23efa04cdd3d25554" dependencies = [ "anyhow", "bytes", "futures", "http-body-util", - "hyper 1.4.1", - "hyper-rustls 0.27.2", + "hyper 1.5.0", + "hyper-rustls 0.27.3", "hyper-util", "itertools 0.13.0", "lazy_static", "maplit", "pact-plugin-driver", - "pact_matching 1.2.5", + "pact_matching 1.2.7", "pact_models", "rcgen", - "rustls 0.23.12", - "rustls-pemfile 2.1.2", - "rustls-webpki 0.102.6", + "rustls 0.23.15", + "rustls-pemfile 2.2.0", + "rustls-webpki 0.102.8", "serde", "serde_json", "thiserror", @@ -2240,7 +2260,7 @@ dependencies = [ [[package]] name = "pact_models" -version = "1.2.3" +version = "1.2.5" dependencies = [ "anyhow", "ariadne", @@ -2286,7 +2306,7 @@ dependencies = [ [[package]] name = "pact_verifier" -version = "1.2.4" +version = "1.2.5" dependencies = [ "ansi_term", "anyhow", @@ -2328,11 +2348,11 @@ dependencies = [ [[package]] name = "pact_verifier_cli" -version = "1.1.4" +version = "1.1.5" dependencies = [ "ansi_term", "anyhow", - "clap 4.5.11", + "clap 4.5.20", "env_logger 0.11.5", "expectest", "junit-report", @@ -2343,7 +2363,7 @@ dependencies = [ "pact_verifier", "regex", "reqwest", - "rstest 0.21.0", + "rstest 0.22.0", "serde_json", "strip-ansi-escapes", "time", @@ -2379,9 +2399,9 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.3", + "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -2432,7 +2452,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.2.6", + "indexmap 2.6.0", ] [[package]] @@ -2475,29 +2495,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -2507,15 +2527,15 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "powerfmt" @@ -2525,37 +2545,40 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "pretty_assertions" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ "diff", - "yansi 0.5.1", + "yansi 1.0.1", ] [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ - "proc-macro2 1.0.86", - "syn 2.0.72", + "proc-macro2 1.0.89", + "syn 2.0.85", ] [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit", ] [[package]] @@ -2569,18 +2592,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] [[package]] name = "prost" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" dependencies = [ "bytes", "prost-derive", @@ -2588,9 +2611,9 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb182580f71dd070f88d01ce3de9f4da5021db7115d2e1c3605a754153b77c1" +checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" dependencies = [ "bytes", "heck", @@ -2603,28 +2626,28 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.72", + "syn 2.0.85", "tempfile", ] [[package]] name = "prost-derive" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ "anyhow", "itertools 0.13.0", - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] name = "prost-types" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" +checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" dependencies = [ "prost", ] @@ -2651,16 +2674,17 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.2" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ceeeeabace7857413798eb1ffa1e9c905a9946a57d81fb69b4b71c4d8eb3ad" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" dependencies = [ "bytes", "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.12", + "rustls 0.23.15", + "socket2", "thiserror", "tokio", "tracing", @@ -2668,15 +2692,15 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.3" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddf517c03a109db8100448a4be38d498df8a210a99fe0e1b9eaf39e78c640efe" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" dependencies = [ "bytes", "rand", "ring", "rustc-hash", - "rustls 0.23.12", + "rustls 0.23.15", "slab", "thiserror", "tinyvec", @@ -2685,14 +2709,15 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" +checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" dependencies = [ "libc", "once_cell", "socket2", - "windows-sys 0.52.0", + "tracing", + "windows-sys 0.59.0", ] [[package]] @@ -2706,11 +2731,11 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ - "proc-macro2 1.0.86", + "proc-macro2 1.0.89", ] [[package]] @@ -2788,32 +2813,23 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.5" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -2827,13 +2843,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -2844,9 +2860,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "relative-path" @@ -2856,9 +2872,9 @@ checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" -version = "0.12.5" +version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" dependencies = [ "async-compression", "base64 0.22.1", @@ -2869,8 +2885,8 @@ dependencies = [ "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", - "hyper-rustls 0.27.2", + "hyper 1.5.0", + "hyper-rustls 0.27.3", "hyper-util", "ipnet", "js-sys", @@ -2880,9 +2896,9 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.12", - "rustls-native-certs 0.7.1", - "rustls-pemfile 2.1.2", + "rustls 0.23.15", + "rustls-native-certs 0.8.0", + "rustls-pemfile 2.2.0", "rustls-pki-types", "serde", "serde_json", @@ -2897,7 +2913,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "winreg", + "windows-registry", ] [[package]] @@ -2929,13 +2945,13 @@ dependencies = [ [[package]] name = "rstest" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afd55a67069d6e434a95161415f5beeada95a01c7b815508a82dcb0e1593682" +checksum = "7b423f0e62bdd61734b67cd21ff50871dfaeb9cc74f869dcd6af974fbcb19936" dependencies = [ "futures", "futures-timer", - "rstest_macros 0.21.0", + "rstest_macros 0.22.0", "rustc_version", ] @@ -2947,30 +2963,30 @@ checksum = "04a9df72cc1f67020b0d63ad9bfe4a323e459ea7eb68e03bd9824db49f9a4c25" dependencies = [ "cfg-if", "glob", - "proc-macro2 1.0.86", - "quote 1.0.36", + "proc-macro2 1.0.89", + "quote 1.0.37", "regex", "relative-path", "rustc_version", - "syn 2.0.72", + "syn 2.0.85", "unicode-ident", ] [[package]] name = "rstest_macros" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4165dfae59a39dd41d8dec720d3cbfbc71f69744efb480a3920f5d4e0cc6798d" +checksum = "c5e1711e7d14f74b12a58411c542185ef7fb7f2e7f8ee6e2940a883628522b42" dependencies = [ "cfg-if", "glob", "proc-macro-crate", - "proc-macro2 1.0.86", - "quote 1.0.36", + "proc-macro2 1.0.89", + "quote 1.0.37", "regex", "relative-path", "rustc_version", - "syn 2.0.72", + "syn 2.0.85", "unicode-ident", ] @@ -2982,24 +2998,24 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" -version = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -3022,15 +3038,15 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" dependencies = [ "log", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.6", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -3049,12 +3065,12 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" +checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" dependencies = [ "openssl-probe", - "rustls-pemfile 2.1.2", + "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", "security-framework", @@ -3071,19 +3087,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" @@ -3097,9 +3112,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.6" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -3108,9 +3123,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -3129,11 +3144,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3167,9 +3182,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -3183,29 +3198,29 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.204" +version = "1.0.213" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.213" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] name = "serde_json" -version = "1.0.121" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ab380d7d9f22ef3f21ad3e6c1ebe8e4fc7a2000ccba2e4d71fc96f15b2cb609" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", "memchr", @@ -3215,9 +3230,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -3236,15 +3251,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.9.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.6", + "indexmap 2.6.0", "serde", "serde_derive", "serde_json", @@ -3254,14 +3269,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.9.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" dependencies = [ "darling", - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] @@ -3345,9 +3360,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "snapbox" -version = "0.6.16" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "027c936207f85d10d015e21faf5c676c7e08c453ed371adf55c0874c443ca77a" +checksum = "7ba434818a8a9b1b106404288d6bd75a94348aae8fc9a518b211b609a36a54bc" dependencies = [ "anstream", "anstyle", @@ -3362,7 +3377,7 @@ dependencies = [ "tempfile", "wait-timeout", "walkdir", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3423,6 +3438,28 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck", + "proc-macro2 1.0.89", + "quote 1.0.37", + "rustversion", + "syn 2.0.85", +] + [[package]] name = "subtle" version = "2.6.1" @@ -3456,19 +3493,19 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", + "proc-macro2 1.0.89", + "quote 1.0.37", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.72" +version = "2.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", + "proc-macro2 1.0.89", + "quote 1.0.37", "unicode-ident", ] @@ -3483,6 +3520,9 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "sysinfo" @@ -3501,9 +3541,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020" dependencies = [ "filetime", "libc", @@ -3512,14 +3552,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3549,9 +3590,9 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] @@ -3565,22 +3606,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] @@ -3641,9 +3682,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.2" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", "bytes", @@ -3663,9 +3704,9 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] @@ -3684,16 +3725,16 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.12", + "rustls 0.23.15", "rustls-pki-types", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -3715,9 +3756,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -3728,65 +3769,54 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81967dd0dd2c1ab0bc3468bd7caecc32b8a4aa47d0c8c695d8c2b2108168d62c" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.17", + "toml_edit", ] [[package]] name = "toml_datetime" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8fb9f64314842840f1d940ac544da178732128f1c78c21772e876579e0da1db" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.2.6", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9f8729f5aea9562aac1cc0441f5d6de3cff1ee0c5d67293eeca5eb36ee7c16" -dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.16", + "winnow", ] [[package]] name = "tonic" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38659f4a91aba8598d27821589f5db7dddd94601e7a01b1e485a50e5484c7401" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" dependencies = [ "async-stream", "async-trait", "axum", "base64 0.22.1", "bytes", - "h2 0.4.5", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-timeout", "hyper-util", "percent-encoding", @@ -3795,7 +3825,7 @@ dependencies = [ "socket2", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -3803,15 +3833,16 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568392c5a2bd0020723e3f387891176aabafe36fd9fcd074ad309dfa0c8eb964" +checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" dependencies = [ "prettyplease", - "proc-macro2 1.0.86", + "proc-macro2 1.0.89", "prost-build", - "quote 1.0.36", - "syn 2.0.72", + "prost-types", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] @@ -3834,17 +3865,31 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -3864,9 +3909,9 @@ version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] @@ -3910,12 +3955,11 @@ dependencies = [ [[package]] name = "tree_magic_mini" -version = "3.1.5" +version = "3.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469a727cac55b41448315cc10427c069c618ac59bb6a4480283fcd811749bdc2" +checksum = "aac5e8971f245c3389a5a76e648bfc80803ae066a1243a75db0064d7c1129d63" dependencies = [ "fnv", - "home", "memchr", "nom", "once_cell", @@ -3936,10 +3980,11 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "trycmd" -version = "0.15.6" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e8673f1dc45acdff8e25a06cc62f8e529563e8acd84237ce83d5a28e2befa12" +checksum = "288c25d9be00f5ac52a3b3ff7720248c223096534ec34e870188f1bc93f2465c" dependencies = [ + "anstream", "automod", "glob", "humantime", @@ -3948,7 +3993,7 @@ dependencies = [ "serde", "shlex", "snapbox", - "toml_edit 0.22.17", + "toml_edit", ] [[package]] @@ -3965,39 +4010,36 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-xid" @@ -4036,9 +4078,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", ] @@ -4077,8 +4119,8 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e369bee1b05d510a7b4ed645f5faa90619e05437111783ea5848f28d97d3c2e" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", + "proc-macro2 1.0.89", + "quote 1.0.37", ] [[package]] @@ -4117,34 +4159,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -4154,38 +4197,38 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ - "quote 1.0.36", + "quote 1.0.37", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-streams" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" dependencies = [ "futures-util", "js-sys", @@ -4196,9 +4239,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -4206,9 +4249,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.3" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" dependencies = [ "rustls-pki-types", ] @@ -4231,11 +4274,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4251,7 +4294,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ "windows-core", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -4260,16 +4303,37 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] -name = "windows-sys" -version = "0.48.0" +name = "windows-registry" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ - "windows-targets 0.48.5", + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", ] [[package]] @@ -4278,22 +4342,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -4302,46 +4360,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -4354,48 +4394,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -4404,32 +4420,13 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.40" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] -[[package]] -name = "winnow" -version = "0.6.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b480ae9340fc261e6be3e95a1ba86d54ae3f9171132a73ce8d4bbaf68339507c" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "xattr" version = "1.3.1" @@ -4462,6 +4459,27 @@ dependencies = [ "time", ] +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", +] + [[package]] name = "zeroize" version = "1.8.1" @@ -4477,16 +4495,16 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "proc-macro2 1.0.89", + "quote 1.0.37", + "syn 2.0.85", ] [[package]] name = "zip" -version = "2.1.5" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b895748a3ebcb69b9d38dcfdf21760859a4b0d0b0015277640c2ef4c69640e6f" +checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" dependencies = [ "aes", "arbitrary", @@ -4498,7 +4516,7 @@ dependencies = [ "displaydoc", "flate2", "hmac", - "indexmap 2.2.6", + "indexmap 2.6.0", "lzma-rs", "memchr", "pbkdf2", @@ -4536,18 +4554,18 @@ dependencies = [ [[package]] name = "zstd-safe" -version = "7.2.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa556e971e7b568dc775c136fc9de8c779b1c2fc3a63defaafadffdbd3181afa" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.12+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 7148c8528..e8843e54b 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -15,7 +15,7 @@ onig = { git = "https://github.com/rust-onig/rust-onig", default-features = fals # version across all crates (i.e. mock server crate). pact_matching = { version = "~2.0.0-beta", path = "./pact_matching" } # Issue 389 - Pull change into other crates -pact_models = { version = "~1.2.2", path = "./pact_models" } +pact_models = { version = "~1.2.4", path = "./pact_models" } [profile.release] strip = true diff --git a/rust/pact_consumer/CHANGELOG.md b/rust/pact_consumer/CHANGELOG.md index 28fe5cb6b..c569d637b 100644 --- a/rust/pact_consumer/CHANGELOG.md +++ b/rust/pact_consumer/CHANGELOG.md @@ -1,5 +1,16 @@ To generate the log, run `git log --pretty='* %h - %s (%an, %ad)' TAGNAME..HEAD .` replacing TAGNAME and HEAD as appropriate. +# 1.3.1 - Bugfix Release + +* 941e4455 - fix(pact_consumer): Plugin config needs to be stored for both the request and response part of HTTP interactions (Ronald Holshausen, Tue Aug 27 15:35:16 2024 +1000) +* dae427a7 - chore: Upgrade pact_mock_server to 2.0.1 (Ronald Holshausen, Tue Aug 27 15:23:18 2024 +1000) +* dc441709 - chore: Upgrade pact_matching to 1.2.7 (Ronald Holshausen, Tue Aug 27 14:57:12 2024 +1000) +* 978677cc - chore: Upgrade pact_matching to 1.2.6 (Ronald Holshausen, Tue Aug 13 15:27:49 2024 +1000) +* 9a7eef75 - chore: Upgrade pact_models to 1.2.4 (Ronald Holshausen, Tue Aug 13 11:51:06 2024 +1000) +* bcf4db6d - chore: Upgrade pact_models to 1.2.3 (Ronald Holshausen, Tue Aug 6 11:06:22 2024 +1000) +* 00efcb56 - chore: Update readme (Ronald Holshausen, Mon Jul 29 11:01:32 2024 +1000) +* c91bb0ca - bump version to 1.3.1 (Ronald Holshausen, Mon Jul 29 10:27:31 2024 +1000) + # 1.3.0 - Update to 2.0 Pact mock server * d46af23e - feat(pact-consumer): Give each mock server 2 worker threads (Ronald Holshausen, Mon Jul 29 10:03:38 2024 +1000) diff --git a/rust/pact_consumer/Cargo.toml b/rust/pact_consumer/Cargo.toml index 7e81f7048..55b1ca81a 100644 --- a/rust/pact_consumer/Cargo.toml +++ b/rust/pact_consumer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pact_consumer" -version = "1.3.1" +version = "1.3.2" authors = ["Ronald Holshausen ", "Eric Kidd "] edition = "2021" description = "Pact-Rust module that provides support for writing consumer pact tests" @@ -24,20 +24,20 @@ colour = ["dep:yansi"] [dependencies] anyhow = "1.0.86" -async-trait = "0.1.81" -bytes = "1.6.1" +async-trait = "0.1.82" +bytes = "1.7.1" futures = "0.3.30" itertools = "0.13.0" lazy_static = "1.5.0" maplit = "1.0.2" pact_matching = { version = "~2.0.0-beta", path = "../pact_matching", default-features = false } -pact_mock_server = { version = "~2.0.0", default-features = false } -pact_models = { version = "~1.2.2", default-features = false } -pact-plugin-driver = { version = "~0.7.0", optional = true, default-features = false } -regex = "1.10.5" -serde_json = "1.0.120" -termsize = "0.1.8" -tokio = { version = "1.38.0", features = ["full"] } +pact_mock_server = { version = "~2.0.2", default-features = false } +pact_models = { version = "~1.2.4", default-features = false } +pact-plugin-driver = { version = "~0.7.1", optional = true, default-features = false } +regex = "1.10.6" +serde_json = "1.0.127" +termsize = "0.1.9" +tokio = { version = "1.40.0", features = ["full"] } tracing = "0.1.40" tracing-core = "0.1.32" url = "2.5.2" @@ -46,10 +46,10 @@ yansi = { version = "1.0.1", optional = true } [dev-dependencies] quickcheck = "1.0.3" -env_logger = "0.11.3" +env_logger = "0.11.5" expectest = "0.12.0" -reqwest = { version = "0.12.5", default-features = false, features = ["rustls-tls-native-roots", "blocking", "json"] } -serde = { version = "1.0.204", features = ["derive"] } +reqwest = { version = "0.12.7", default-features = false, features = ["rustls-tls-native-roots", "blocking", "json"] } +serde = { version = "1.0.209", features = ["derive"] } rand = "0.8.5" tokio-test = "0.4.4" test-log = { version = "0.2.16", features = ["trace"] } diff --git a/rust/pact_consumer/src/builders/interaction_builder.rs b/rust/pact_consumer/src/builders/interaction_builder.rs index 926e0b0f5..9d990d389 100644 --- a/rust/pact_consumer/src/builders/interaction_builder.rs +++ b/rust/pact_consumer/src/builders/interaction_builder.rs @@ -1,11 +1,12 @@ use std::collections::HashMap; use maplit::hashmap; +use serde_json::{json, Value}; +use tracing::debug; +use pact_models::json_utils::json_deep_merge; use pact_models::provider_states::ProviderState; use pact_models::sync_interaction::RequestResponseInteraction; use pact_models::v4::synch_http::SynchronousHttp; -use serde_json::{json, Value}; -use tracing::debug; use super::request_builder::RequestBuilder; use super::response_builder::ResponseBuilder; @@ -162,13 +163,23 @@ impl InteractionBuilder { let request_config = self.request.plugin_config(); if !request_config.is_empty() { for (key, value) in request_config { - config.insert(key.clone(), value.interaction_configuration.clone()); + config.insert(key, value.interaction_configuration); } } let response_config = self.response.plugin_config(); if !response_config.is_empty() { for (key, value) in response_config { - config.insert(key.clone(), value.interaction_configuration.clone()); + let value_config = value.interaction_configuration.clone(); + config.entry(key) + .and_modify(|entry| { + for (k, v) in value_config { + entry + .entry(k) + .and_modify(|e| *e = json_deep_merge(e, &v)) + .or_insert(v); + } + }) + .or_insert(value.interaction_configuration); } } } @@ -195,3 +206,57 @@ impl InteractionBuilder { config } } + +#[cfg(all(test, feature = "plugins"))] +mod plugin_tests { + use expectest::prelude::*; + use maplit::hashmap; + use pact_plugin_driver::content::PluginConfiguration; + use serde_json::json; + + use crate::builders::InteractionBuilder; + + #[test] + fn plugin_config_merges_config_from_request_and_response_parts() { + let mut builder = InteractionBuilder::new("test", ""); + builder.request.plugin_config = hashmap!{ + "plugin1".to_string() => PluginConfiguration { + interaction_configuration: hashmap!{ + "other".to_string() => json!(100), + "request".to_string() => json!({ + "descriptorKey": "d58838959e37498cddf51805bedf4dca", + "message": ".area_calculator.ShapeMessage" + }) + }, + pact_configuration: Default::default() + } + }; + builder.response.plugin_config = hashmap!{ + "plugin1".to_string() => PluginConfiguration { + interaction_configuration: hashmap!{ + "other".to_string() => json!(200), + "response".to_string() => json!({ + "descriptorKey": "d58838959e37498cddf51805bedf4dca", + "message": ".area_calculator.AreaResponse" + }) + }, + pact_configuration: Default::default() + } + }; + + let config = builder.plugin_config(); + expect!(config).to(be_equal_to(hashmap!{ + "plugin1".to_string() => hashmap!{ + "other".to_string() => json!(200), + "request".to_string() => json!({ + "descriptorKey": "d58838959e37498cddf51805bedf4dca", + "message": ".area_calculator.ShapeMessage" + }), + "response".to_string() => json!({ + "descriptorKey": "d58838959e37498cddf51805bedf4dca", + "message": ".area_calculator.AreaResponse" + }) + } + })); + } +} diff --git a/rust/pact_consumer/src/builders/request_builder.rs b/rust/pact_consumer/src/builders/request_builder.rs index d6b4e05ec..c9385db49 100644 --- a/rust/pact_consumer/src/builders/request_builder.rs +++ b/rust/pact_consumer/src/builders/request_builder.rs @@ -36,7 +36,7 @@ struct PluginConfiguration {} #[derive(Clone, Debug)] pub struct RequestBuilder { request: HttpRequest, - #[allow(dead_code)] plugin_config: HashMap, + #[allow(dead_code)] pub(crate) plugin_config: HashMap, interaction_markup: InteractionMarkup } @@ -208,7 +208,18 @@ impl RequestBuilder { request.generators.add_generators(generators.clone()); } if !contents.plugin_config.is_empty() { - self.plugin_config.insert(matcher.plugin_name(), contents.plugin_config.clone()); + let plugin_config = PluginConfiguration { + interaction_configuration: hashmap!{ + "request".to_string() => Value::Object( + contents.plugin_config.interaction_configuration + .iter() + .map(|(k, v)| (k.clone(), v.clone())) + .collect() + ) + }, + pact_configuration: contents.plugin_config.pact_configuration.clone(), + }; + self.plugin_config.insert(matcher.plugin_name(), plugin_config); } self.interaction_markup = InteractionMarkup { markup: contents.interaction_markup.clone(), diff --git a/rust/pact_consumer/src/builders/response_builder.rs b/rust/pact_consumer/src/builders/response_builder.rs index e11b9b913..bd462a857 100644 --- a/rust/pact_consumer/src/builders/response_builder.rs +++ b/rust/pact_consumer/src/builders/response_builder.rs @@ -25,7 +25,7 @@ struct PluginConfiguration {} #[derive(Clone, Debug)] pub struct ResponseBuilder { response: HttpResponse, - #[allow(dead_code)] plugin_config: HashMap, + #[allow(dead_code)] pub(crate) plugin_config: HashMap, interaction_markup: InteractionMarkup } @@ -138,7 +138,18 @@ impl ResponseBuilder { response.generators.add_generators(generators.clone()); } if !contents.plugin_config.is_empty() { - self.plugin_config.insert(matcher.plugin_name(), contents.plugin_config.clone()); + let plugin_config = PluginConfiguration { + interaction_configuration: hashmap!{ + "response".to_string() => Value::Object( + contents.plugin_config.interaction_configuration + .iter() + .map(|(k, v)| (k.clone(), v.clone())) + .collect() + ) + }, + pact_configuration: contents.plugin_config.pact_configuration.clone(), + }; + self.plugin_config.insert(matcher.plugin_name(), plugin_config); } self.interaction_markup = InteractionMarkup { markup: contents.interaction_markup.clone(), diff --git a/rust/pact_ffi/CHANGELOG.md b/rust/pact_ffi/CHANGELOG.md index 3466b6b0e..3b71f5c77 100644 --- a/rust/pact_ffi/CHANGELOG.md +++ b/rust/pact_ffi/CHANGELOG.md @@ -1,5 +1,20 @@ To generate the log, run `git log --pretty='* %h - %s (%an, %ad)' TAGNAME..HEAD .` replacing TAGNAME and HEAD as appropriate. +# 0.4.23 - Bugfix Release + +* 3cb09550 - chore(pact_ffi): Update dependencies (Ronald Holshausen, Wed Sep 4 11:09:27 2024 +1000) +* c1a00dd8 - chore: Upgrade pact-plugin-driver to 0.7.1 (Ronald Holshausen, Tue Sep 3 15:47:22 2024 +1000) +* eb687a55 - fix(ffi): annotate body in raw body branch (JP-Ellis, Fri Aug 30 13:01:02 2024 +1000) +* dc441709 - chore: Upgrade pact_matching to 1.2.7 (Ronald Holshausen, Tue Aug 27 14:57:12 2024 +1000) +* fa02c30b - chore: Upgrade pact_verifier to 1.2.4 (Ronald Holshausen, Tue Aug 13 15:42:48 2024 +1000) +* 978677cc - chore: Upgrade pact_matching to 1.2.6 (Ronald Holshausen, Tue Aug 13 15:27:49 2024 +1000) +* f50454ff - chore: Upgrade test dependencies (Ronald Holshausen, Tue Aug 13 11:54:59 2024 +1000) +* 9a7eef75 - chore: Upgrade pact_models to 1.2.4 (Ronald Holshausen, Tue Aug 13 11:51:06 2024 +1000) +* bcf4db6d - chore: Upgrade pact_models to 1.2.3 (Ronald Holshausen, Tue Aug 6 11:06:22 2024 +1000) +* 4d7295a4 - feat: allow non-object matchers for array-contains (M. J. W-H. Campman, Sat Aug 3 13:49:18 2024 -0400) +* 033a50ab - feat: Update the matching rule expression parser to support values from provider states (Ronald Holshausen, Fri Aug 2 10:06:52 2024 +1000) +* fd1ba0c3 - bump version to 0.4.23 (Ronald Holshausen, Thu Jul 18 15:51:48 2024 +1000) + # 0.4.22 - Bugfix Release * 4257ed1e - chore: Upgrade pact_verifier to 1.2.3 (Ronald Holshausen, Wed Jul 17 15:19:58 2024 +1000) diff --git a/rust/pact_ffi/Cargo.toml b/rust/pact_ffi/Cargo.toml index d70abca4b..894da29d7 100644 --- a/rust/pact_ffi/Cargo.toml +++ b/rust/pact_ffi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pact_ffi" -version = "0.4.23" +version = "0.4.24" authors = ["Ronald Holshausen ", "Matt Fellows ", "Andrew Lilley Brinker ", "Caleb Stepanian "] edition = "2021" description = "Pact interface for foreign languages." @@ -15,56 +15,56 @@ exclude = [ [dependencies] ansi_term = "0.12.1" -anyhow = "1.0.75" -bytes = "1.5.0" -chrono = "0.4.31" +anyhow = "1.0.86" +bytes = "1.7.1" +chrono = "0.4.38" chrono-tz = "0.9.0" clap = "2.34.0" -either = "1.9.0" -env_logger = "0.11.3" -futures = "0.3.29" -itertools = "0.12.0" -lazy_static = "1.4.0" -libc = "0.2.151" -log = "0.4.20" +either = "1.13.0" +env_logger = "0.11.5" +futures = "0.3.30" +itertools = "0.13.0" +lazy_static = "1.5.0" +libc = "0.2.158" +log = "0.4.22" maplit = "1.0.2" multipart = { version = "0.18.0", default-features = false, features = ["client", "mock"] } onig = { version = "6.4.0", default-features = false } pact_matching = { version = "~2.0.0-beta", path = "../pact_matching" } -pact_mock_server = { version = "~1.2.9" } -pact_models = { version = "~1.2.2" } -pact-plugin-driver = { version = "~0.7.0" } -pact_verifier = { version = "~1.2.3", path = "../pact_verifier" } +pact_mock_server = { version = "~1.2.10" } +pact_models = { version = "~1.2.4" } +pact-plugin-driver = { version = "~0.7.1" } +pact_verifier = { version = "~1.2.4", path = "../pact_verifier" } panic-message = "0.3.0" rand = "0.8.5" rand_regex = "0.15.1" -regex = "1.10.2" +regex = "1.10.6" regex-syntax = "0.6.29" -serde = { version = "1.0.193", features = ["derive"] } -serde_json = "1.0.108" +serde = { version = "1.0.209", features = ["derive"] } +serde_json = "1.0.127" sxd-document = "0.3.2" -thiserror = "1.0.51" -tokio = { version = "1.35.1", features = ["full"] } +thiserror = "1.0.63" +tokio = { version = "1.40.0", features = ["full"] } tokio-rustls = "0.24.1" tracing = "0.1.40" # This needs to be the same version across all the libs (i.e. plugin driver) tracing-core = "0.1.32" # This needs to be the same version across all the pact libs (i.e. plugin driver) tracing-log = "0.2.0" tracing-subscriber = { version = "0.3.18", features = ["env-filter", "tracing-log"] } -uuid = { version = "1.6.1", features = ["v4"] } -zeroize = "1.7.0" +uuid = { version = "1.10.0", features = ["v4"] } +zeroize = "1.8.1" [dev-dependencies] expectest = "0.12.0" -reqwest = { version = "0.12.4", default-features = false, features = ["rustls-tls-native-roots", "blocking", "json"] } +reqwest = { version = "0.12.7", default-features = false, features = ["rustls-tls-native-roots", "blocking", "json"] } quickcheck = "1.0.3" -test-log = "0.2.14" -tempfile = "3.8.1" +test-log = "0.2.16" +tempfile = "3.12.0" home = "0.5.9" pretty_assertions = "1.4.0" -rstest = "0.19.0" +rstest = "0.22.0" [lib] crate-type = ["cdylib", "staticlib", "rlib"] [build-dependencies] -os_info = { version = "3.7.0", default-features = false } +os_info = { version = "3.8.2", default-features = false } diff --git a/rust/pact_ffi/README.md b/rust/pact_ffi/README.md index 153f34f2c..3cfedb14b 100644 --- a/rust/pact_ffi/README.md +++ b/rust/pact_ffi/README.md @@ -86,3 +86,22 @@ $ cmake --build . You can read about the architecture and design choices of this crate in [ARCHITECTURE.md](https://github.com/pact-foundation/pact-reference/blob/master/rust/pact_ffi/ARCHITECTURE.md). + +## Compatibility + +
Supported Platforms + +| OS | Architecture | Supported | Pact FFI Version | +| ------- | ------------ | --------- | ---------------- | +| OSX | x86_64 | ✅ | All | +| Linux | x86_64 | ✅ | All | +| Windows | x86_64 | ✅ | All | +| OSX | arm64 | ✅ | [>=0.0.1](https://github.com/pact-foundation/pact-reference/releases/tag/libpact_ffi-v0.4.14) | +| Linux | arm64 | ✅ | [>=0.3.6](https://github.com/pact-foundation/pact-reference/releases/tag/libpact_ffi-v0.3.6) | | +| Windows | arm64 | ✅ | [>=0.4.14](https://github.com/pact-foundation/pact-reference/releases/tag/libpact_ffi-v0.4.14) | +| Alpine | x86_64 | ✅ | static - [>=0.2.4](https://github.com/pact-foundation/pact-reference/releases/tag/libpact_ffi-v0.2.4)| +| Alpine | arm64 | ✅ | static - [>=0.4.15](https://github.com/pact-foundation/pact-reference/releases/tag/libpact_ffi-v0.4.15)| +| Alpine | x86_64 | ✅ | dynamic - [>=0.4.17](https://github.com/pact-foundation/pact-reference/releases/tag/libpact_ffi-v0.4.17)| +| Alpine | arm64 | ✅ | dynamic - [>=0.4.17](https://github.com/pact-foundation/pact-reference/releases/tag/libpact_ffi-v0.4.17)| + +
diff --git a/rust/pact_ffi/src/log/ffi.rs b/rust/pact_ffi/src/log/ffi.rs index 3bd3bbfe2..5f1bb40a3 100644 --- a/rust/pact_ffi/src/log/ffi.rs +++ b/rust/pact_ffi/src/log/ffi.rs @@ -8,9 +8,8 @@ use std::str::from_utf8; use libc::{c_char, c_int}; use log::{error, LevelFilter as LogLevelFilter}; -use pact_matching::logging::fetch_buffer_contents; - use crate::error::set_error_msg; +use crate::log::inmem_buffer::fetch_buffer_contents; use crate::log::level_filter::LevelFilter; use crate::log::logger::{add_sink, apply_logger, init_logger}; use crate::log::sink::Sink; diff --git a/rust/pact_ffi/src/log/inmem_buffer.rs b/rust/pact_ffi/src/log/inmem_buffer.rs index aa97c01d1..4df8ab0cb 100644 --- a/rust/pact_ffi/src/log/inmem_buffer.rs +++ b/rust/pact_ffi/src/log/inmem_buffer.rs @@ -1,10 +1,13 @@ //! In-memory buffer for logging output. +use std::collections::HashMap; use std::io; use std::io::Write; -use tracing_subscriber::fmt::MakeWriter; +use std::sync::Mutex; -use pact_matching::logging::write_to_log_buffer; +use bytes::{BufMut, Bytes, BytesMut}; +use lazy_static::lazy_static; +use tracing_subscriber::fmt::MakeWriter; /// In-memory buffer for logging output. Sends output to global static `LOG_BUFFER` in the pact_matching /// crate. If there is a task local ID found, will accumulate against that ID, otherwise will @@ -31,3 +34,42 @@ impl <'a> MakeWriter<'a> for InMemBuffer { *self } } + +lazy_static! { + /// Memory buffer for the buffer logger. This is needed here because there is no + /// way to get the logger sync from the Dispatch struct. The buffer will be emptied + /// when the contents is fetched via an FFI call. + /// + /// Accumulates the log entries against a task local ID. If the ID is not set, accumulates against + /// the "global" ID. + /// cbindgen:ignore + static ref LOG_BUFFER: Mutex> = Mutex::new(HashMap::new()); +} + +// TODO: This needs to be moved from pact_matching, but at the moment the mock server crate +// relies on it +// task_local! { +// /// Log ID to accumulate logs against +// #[allow(missing_docs)] +// pub static LOG_ID: String; +// } + +/// Fetches the contents from the id scoped in-memory buffer and empties the buffer. +pub fn fetch_buffer_contents(id: &str) -> Bytes { + let mut inner = LOG_BUFFER.lock().unwrap(); + let buffer = inner.entry(id.to_string()) + .or_insert_with(|| BytesMut::with_capacity(256)); + buffer.split().freeze() +} + +/// Writes the provided bytes to the task local ID scoped in-memory buffer. If there is no +/// task local ID set, will write to the "global" buffer. +pub fn write_to_log_buffer(buf: &[u8]) { + let id = pact_matching::logging::LOG_ID + .try_with(|id| id.clone()) + .unwrap_or_else(|_| "global".into()); + let mut inner = LOG_BUFFER.lock().unwrap(); + let buffer = inner.entry(id) + .or_insert_with(|| BytesMut::with_capacity(256)); + buffer.put(buf); +} diff --git a/rust/pact_ffi/src/log/mod.rs b/rust/pact_ffi/src/log/mod.rs index b61b19983..b5df13c5b 100644 --- a/rust/pact_ffi/src/log/mod.rs +++ b/rust/pact_ffi/src/log/mod.rs @@ -17,3 +17,7 @@ pub use crate::log::ffi::{ pactffi_log_to_file, pactffi_log_to_buffer }; +pub use crate::log::inmem_buffer::{ + fetch_buffer_contents, + write_to_log_buffer +}; diff --git a/rust/pact_ffi/src/mock_server/bodies.rs b/rust/pact_ffi/src/mock_server/bodies.rs index 98fd86db2..71f806644 100644 --- a/rust/pact_ffi/src/mock_server/bodies.rs +++ b/rust/pact_ffi/src/mock_server/bodies.rs @@ -8,7 +8,7 @@ use either::Either; use lazy_static::lazy_static; use regex::Regex; use serde_json::{Map, Value}; -use tracing::{debug, error, trace, warn}; +use tracing::{debug, error, trace}; use pact_models::bodies::OptionalBody; use pact_models::content_types::ContentTypeHint; @@ -113,9 +113,11 @@ fn process_matcher( Value::Object(map) => { process_object(map, &mut category, &mut generators, DocPath::root(), false) } + Value::Array(arr) => { + process_array(arr, &mut category, &mut generators, DocPath::root(), false, false) + } _ => { - warn!("arrayContains: JSON for variant {} is not correctly formed: {}", index, variant); - Value::Null + variant.clone() } }; json_values.push(value); @@ -423,16 +425,19 @@ fn format_multipart_error(e: std::io::Error) -> String { #[cfg(test)] mod test { - use expectest::prelude::*; + use std::collections::HashMap; + +use expectest::prelude::*; use maplit::hashmap; - use pretty_assertions::assert_eq; + use pact_models::prelude::Category; +use pretty_assertions::assert_eq; use rstest::rstest; use serde_json::json; use pact_models::{generators, HttpStatus, matchingrules_list}; use pact_models::content_types::ContentType; use pact_models::generators::{Generator, Generators}; - use pact_models::matchingrules::{MatchingRule, MatchingRuleCategory}; + use pact_models::matchingrules::{MatchingRule, MatchingRuleCategory, RuleList}; use pact_models::matchingrules::expressions::{MatchingRuleDefinition, ValueType}; use pact_models::path_exp::DocPath; @@ -860,6 +865,12 @@ mod test { #[case(json!({ "pact:matcher:type": "content-type", "value": "text/plain" }), vec![MatchingRule::ContentType("text/plain".to_string())])] #[case(json!({ "pact:matcher:type": "arrayContains", "variants": [] }), vec![MatchingRule::ArrayContains(vec![])])] #[case(json!({ "pact:matcher:type": "array-contains", "variants": [] }), vec![MatchingRule::ArrayContains(vec![])])] + #[case(json!({ "pact:matcher:type": "array-contains", "variants": ["Thing1", "Thing2"] }), vec![ + MatchingRule::ArrayContains(vec![ + (0, MatchingRuleCategory{name: Category::BODY, rules: HashMap::from([ (DocPath::empty(), RuleList::equality()) ]) }, std::collections::HashMap::default()), + (0, MatchingRuleCategory{name: Category::BODY, rules: HashMap::from([ (DocPath::empty(), RuleList::equality()) ]) }, std::collections::HashMap::default()) + ]) + ])] #[case(json!({ "pact:matcher:type": "values" }), vec![MatchingRule::Values])] #[case(json!({ "pact:matcher:type": "statusCode" }), vec![MatchingRule::StatusCode(HttpStatus::Success)])] #[case(json!({ "pact:matcher:type": "statusCode" }), vec![MatchingRule::StatusCode(HttpStatus::StatusCodes(vec![200]))])] diff --git a/rust/pact_ffi/src/mock_server/handles.rs b/rust/pact_ffi/src/mock_server/handles.rs index 6f261e230..3453b59ca 100644 --- a/rust/pact_ffi/src/mock_server/handles.rs +++ b/rust/pact_ffi/src/mock_server/handles.rs @@ -1730,7 +1730,11 @@ fn process_body( _ => { // We either have no content type, or an unsupported content type. trace!("Raw body"); - OptionalBody::from(body) + if body.is_empty() { + OptionalBody::Empty + } else { + OptionalBody::Present(Bytes::from(body.to_owned()), content_type, None) + } } } } @@ -2519,7 +2523,8 @@ ffi_fn!{ /// /// # Safety /// - /// The comments parameter must be a valid pointer to a NULL terminated UTF-8, + /// The key parameter must be a valid pointer to a NULL terminated UTF-8. + /// The value parameter must be a valid pointer to a NULL terminated UTF-8, /// or NULL if the comment is to be cleared. fn pactffi_set_comment(interaction: InteractionHandle, key: *const c_char, value: *const c_char) -> bool { let key = match convert_cstr("key", key) { @@ -2574,8 +2579,7 @@ ffi_fn!{ /// /// # Safety /// - /// The comments parameter must be a valid pointer to a NULL terminated UTF-8, - /// or NULL if the comment is to be cleared. + /// The comment parameter must be a valid pointer to a NULL terminated UTF-8. fn pactffi_add_text_comment(interaction: InteractionHandle, comment: *const c_char) -> bool { let comment = match convert_cstr("comment", comment) { Some(comment) => comment, @@ -4305,5 +4309,41 @@ mod tests { "$.id" => Generator::RandomInt(0, 1000) } }); + } + + /// See https://github.com/pact-foundation/pact-php/pull/626 + /// and https://github.com/pact-foundation/pact-reference/pull/461 + #[test] + fn annotate_raw_body_branch() { + let pact_handle = PactHandle::new("Consumer", "Provider"); + let description = CString::new("Generator Test").unwrap(); + let i_handle = pactffi_new_interaction(pact_handle, description.as_ptr()); + + let body = CString::new("a=1&b=2&c=3").unwrap(); + let content_type = CString::new("application/x-www-form-urlencoded").unwrap(); + let result = pactffi_with_body( + i_handle, + InteractionPart::Request, + content_type.as_ptr(), + body.as_ptr(), + ); + assert!(result); + + let interaction = i_handle + .with_interaction(&|_, _, inner| inner.as_v4_http().unwrap()) + .unwrap(); + + assert_eq!( + interaction + .request + .headers + .expect("no headers found") + .get("Content-Type"), + Some(&vec!["application/x-www-form-urlencoded".to_string()]) + ); + assert_eq!( + interaction.request.body.value(), + Some(Bytes::from("a=1&b=2&c=3")) + ) } } diff --git a/rust/pact_ffi/src/mock_server/mod.rs b/rust/pact_ffi/src/mock_server/mod.rs index 5377bb1be..2fd59b57f 100644 --- a/rust/pact_ffi/src/mock_server/mod.rs +++ b/rust/pact_ffi/src/mock_server/mod.rs @@ -63,7 +63,6 @@ use tokio_rustls::rustls::ServerConfig; use tracing::{error, warn}; use uuid::Uuid; -use pact_matching::logging::fetch_buffer_contents; use pact_matching::metrics::{MetricEvent, send_metrics}; use pact_mock_server::{MANAGER, mock_server_mismatches, MockServerError, tls::TlsConfigBuilder, WritePactFileErr}; use pact_mock_server::mock_server::MockServerConfig; @@ -72,6 +71,7 @@ use pact_models::generators::GeneratorCategory; use pact_models::matchingrules::{Category, MatchingRuleCategory}; use crate::{convert_cstr, ffi_fn, safe_str}; +use crate::log::fetch_buffer_contents; use crate::mock_server::handles::{PactHandle, path_from_dir}; use crate::string::optional_str; diff --git a/rust/pact_ffi/src/models/expressions.rs b/rust/pact_ffi/src/models/expressions.rs index dd4b245bb..7b2be195b 100644 --- a/rust/pact_ffi/src/models/expressions.rs +++ b/rust/pact_ffi/src/models/expressions.rs @@ -635,7 +635,7 @@ mod tests { let error = pactffi_matcher_definition_error(result); let string = unsafe { CString::from_raw(error as *mut c_char) }; - expect!(string.to_string_lossy()).to(be_equal_to("expected a primitive value")); + expect!(string.to_string_lossy().contains("expected a primitive value")).to(be_true()); let value = pactffi_matcher_definition_value(result); expect!(value.is_null()).to(be_true()); @@ -647,7 +647,7 @@ mod tests { expect!(value_type).to(be_equal_to(ExpressionValueType::Unknown)); let definition = unsafe { Box::from_raw(result as *mut MatchingRuleDefinitionResult) }; - expect!(definition.result.left()).to(be_some().value("expected a primitive value")); + expect!(definition.result.left().unwrap().contains("expected a primitive value")).to(be_true()); } #[test_log::test] diff --git a/rust/pact_ffi/src/verifier/handle.rs b/rust/pact_ffi/src/verifier/handle.rs index a6679c1d1..8b3dca3cb 100644 --- a/rust/pact_ffi/src/verifier/handle.rs +++ b/rust/pact_ffi/src/verifier/handle.rs @@ -5,7 +5,7 @@ use std::sync::Arc; use itertools::Itertools; use serde_json::Value; use tracing::{debug, error}; - +use pact_matching::logging::LOG_ID; use pact_models::prelude::HttpAuth; use pact_verifier::{ConsumerVersionSelector, FilterInfo, NullRequestFilterExecutor, PactSource, ProviderInfo, ProviderTransport, PublishOptions, VerificationOptions, verify_provider_async}; use pact_verifier::callback_executors::HttpRequestProviderStateExecutor; @@ -286,7 +286,7 @@ impl VerifierHandle { let (calling_app_name, calling_app_version) = self.calling_app.clone().unwrap_or_else(|| { ("pact_ffi".to_string(), env!("CARGO_PKG_VERSION").to_string()) }); - match RUNTIME.block_on(async { + match RUNTIME.block_on(LOG_ID.scope(format!("verify:{}", self.provider.name), async { verify_provider_async( self.provider.clone(), self.sources.clone(), @@ -301,7 +301,7 @@ impl VerifierHandle { app_version: calling_app_version.clone() }) ).await - }) { + })) { Ok(result) => { self.verifier_output = result.clone(); if result.result { 0 } else { 1 } diff --git a/rust/pact_ffi/src/verifier/mod.rs b/rust/pact_ffi/src/verifier/mod.rs index dd2834e87..38ed1fa87 100644 --- a/rust/pact_ffi/src/verifier/mod.rs +++ b/rust/pact_ffi/src/verifier/mod.rs @@ -16,10 +16,10 @@ use pact_models::prelude::HttpAuth; use regex::Regex; use serde::{Deserialize, Serialize}; -use pact_matching::logging::fetch_buffer_contents; use pact_verifier::selectors::{consumer_tags_to_selectors, json_to_selectors}; use crate::{as_mut, as_ref, ffi_fn, RUNTIME, safe_str}; +use crate::log::fetch_buffer_contents; use crate::ptr; use crate::util::string::{if_null, optional_str}; diff --git a/rust/pact_ffi/src/verifier/verifier.rs b/rust/pact_ffi/src/verifier/verifier.rs index a20951cb3..527cc2643 100644 --- a/rust/pact_ffi/src/verifier/verifier.rs +++ b/rust/pact_ffi/src/verifier/verifier.rs @@ -13,7 +13,7 @@ use pact_models::PactSpecification; use tracing::{debug, error, warn}; use tracing_core::LevelFilter; use tracing_subscriber::FmtSubscriber; - +use pact_matching::logging::LOG_ID; use pact_verifier::*; use pact_verifier::callback_executors::HttpRequestProviderStateExecutor; use pact_verifier::metrics::VerificationMetrics; @@ -247,7 +247,7 @@ async fn handle_matches(matches: &clap::ArgMatches<'_>) -> Result<(), i32> { debug!("Pact source to verify = {}", s); }; - verify_provider_async( + LOG_ID.scope(format!("verify:{}", provider.name), verify_provider_async( provider, source, filter, @@ -260,7 +260,7 @@ async fn handle_matches(matches: &clap::ArgMatches<'_>) -> Result<(), i32> { app_name: "unknown".to_string(), app_version: "unknown".to_string() }) - ).await + )).await .map_err(|err| { error!("Verification failed with error: {}", err); 2 diff --git a/rust/pact_matching/CHANGELOG.md b/rust/pact_matching/CHANGELOG.md index 2165aed50..8c95f8787 100644 --- a/rust/pact_matching/CHANGELOG.md +++ b/rust/pact_matching/CHANGELOG.md @@ -1,5 +1,19 @@ To generate the log, run `git log --pretty='* %h - %s (%an, %ad)' TAGNAME..HEAD .` replacing TAGNAME and HEAD as appropriate. +# 1.2.7 - Bugfix Release + +* e6f8ae46 - fix(plugins): Plugin config needs to have seperate values for HTTP request and response parts (Ronald Holshausen, Tue Aug 27 14:32:37 2024 +1000) +* 9f6a8c35 - bump version to 1.2.7 (Ronald Holshausen, Tue Aug 13 15:21:05 2024 +1000) + +# 1.2.6 - Maintenance Release + +* ab836e18 - chore(pact_matching): Update dependencies (Ronald Holshausen, Tue Aug 13 15:01:16 2024 +1000) +* f50454ff - chore: Upgrade test dependencies (Ronald Holshausen, Tue Aug 13 11:54:59 2024 +1000) +* 9a7eef75 - chore: Upgrade pact_models to 1.2.4 (Ronald Holshausen, Tue Aug 13 11:51:06 2024 +1000) +* 05c27197 - chore(pact_matching): Update trace level instrumentation (Ronald Holshausen, Tue Aug 13 11:14:40 2024 +1000) +* bcf4db6d - chore: Upgrade pact_models to 1.2.3 (Ronald Holshausen, Tue Aug 6 11:06:22 2024 +1000) +* c6df3fcc - bump version to 1.2.6 (Ronald Holshausen, Wed Jul 17 11:56:14 2024 +1000) + # 1.2.5 - Bugfix Release * fd9ff70a - chore: Upgrade pact_models to 1.2.2 (Ronald Holshausen, Wed Jul 17 11:15:34 2024 +1000) diff --git a/rust/pact_matching/Cargo.toml b/rust/pact_matching/Cargo.toml index 280f50c60..82c6e611e 100644 --- a/rust/pact_matching/Cargo.toml +++ b/rust/pact_matching/Cargo.toml @@ -31,8 +31,8 @@ difference = "2.0.0" futures = "0.3.30" hex = "0.4.3" http = "1.1.0" -infer = "0.15.0" -itertools = "0.12.1" +infer = "0.16.0" +itertools = "0.13.0" lazy_static = "1.4.0" lenient_semver = "0.4.2" maplit = "1.0.2" @@ -41,8 +41,8 @@ mime = "0.3.17" multer = { version = "3.0.0", features = ["all"], optional = true } nom = "7.1.3" onig = { version = "6.4.0", default-features = false } -pact_models = { version = "~1.2.2", default-features = false } -pact-plugin-driver = { version = "~0.7.0", optional = true, default-features = false } +pact_models = { version = "~1.2.4", default-features = false } +pact-plugin-driver = { version = "~0.7.1", optional = true, default-features = false } rand = "0.8.5" reqwest = { version = "0.12.3", default-features = false, features = ["rustls-tls-native-roots", "json"] } semver = "1.0.22" @@ -65,4 +65,4 @@ test-log = { version = "0.2.15", features = ["trace"] } tracing-subscriber = { version = "0.3.18", features = ["env-filter", "tracing-log", "fmt"] } ntest = "0.9.0" pretty_assertions = "1.4.0" -rstest = "0.19.0" +rstest = "0.22.0" diff --git a/rust/pact_matching/src/lib.rs b/rust/pact_matching/src/lib.rs index b2cca8e0c..4e99fa226 100644 --- a/rust/pact_matching/src/lib.rs +++ b/rust/pact_matching/src/lib.rs @@ -31,7 +31,7 @@ //! //! V3 specification matching is supported for both JSON and XML bodies, headers, query strings and request paths. //! -//! To understand the basic rules of matching, see [Matching Gotchas](https://github.com/realestate-com-au/pact/wiki/Matching-gotchas). +//! To understand the basic rules of matching, see [Matching Gotchas](https://docs.pact.io/getting_started/matching/gotchas). //! For example test cases for matching, see the [Pact Specification Project, version 3](https://github.com/bethesque/pact-specification/tree/version-3). //! //! By default, Pact will use string equality matching following Postel's Law. This means @@ -367,6 +367,11 @@ use bytes::Bytes; use itertools::{Either, Itertools}; use lazy_static::*; use maplit::{hashmap, hashset}; +#[cfg(feature = "plugins")] use pact_plugin_driver::catalogue_manager::find_content_matcher; +#[cfg(feature = "plugins")] use pact_plugin_driver::plugin_models::PluginInteractionConfig; +use serde_json::{json, Value}; +#[allow(unused_imports)] use tracing::{debug, error, info, instrument, trace, warn}; + use pact_models::bodies::OptionalBody; use pact_models::content_types::ContentType; use pact_models::generators::{apply_generators, GenerateValue, GeneratorCategory, GeneratorTestMode, VariantMatcher}; @@ -380,18 +385,14 @@ use pact_models::path_exp::DocPath; use pact_models::v4::http_parts::{HttpRequest, HttpResponse}; use pact_models::v4::message_parts::MessageContents; use pact_models::v4::sync_message::SynchronousMessage; -#[cfg(feature = "plugins")] use pact_plugin_driver::catalogue_manager::find_content_matcher; -#[cfg(feature = "plugins")] use pact_plugin_driver::plugin_models::PluginInteractionConfig; -use serde::__private::from_utf8_lossy; -use serde_json::{json, Value}; -#[allow(unused_imports)] use tracing::{debug, error, info, instrument, trace, warn}; -use crate::generators::DefaultVariantMatcher; use crate::generators::bodies::generators_process_body; +use crate::generators::DefaultVariantMatcher; use crate::headers::{match_header_value, match_headers}; #[cfg(feature = "plugins")] use crate::json::match_json; use crate::matchers::*; use crate::matchingrules::DisplayForMismatch; +#[cfg(feature = "plugins")] use crate::plugin_support::{InteractionPart, setup_plugin_config}; use crate::query::match_query_maps; /// Simple macro to convert a string slice to a `String` struct. @@ -416,6 +417,7 @@ pub mod binary_utils; pub mod headers; pub mod query; pub mod form_urlencoded; +#[cfg(feature = "plugins")] mod plugin_support; #[cfg(not(feature = "plugins"))] #[derive(Clone, Debug, PartialEq)] @@ -860,8 +862,8 @@ impl From for CommonMismatch { }, Mismatch::BodyMismatch { path, expected, actual, mismatch } => CommonMismatch { path: path.clone(), - expected: from_utf8_lossy(expected.unwrap_or_default().as_ref()).to_string(), - actual: from_utf8_lossy(actual.unwrap_or_default().as_ref()).to_string(), + expected: String::from_utf8_lossy(expected.unwrap_or_default().as_ref()).to_string(), + actual: String::from_utf8_lossy(actual.unwrap_or_default().as_ref()).to_string(), description: mismatch.clone() }, Mismatch::MetadataMismatch { key, expected, actual, mismatch } => CommonMismatch { @@ -1466,6 +1468,7 @@ fn group_by(items: I, f: F) -> HashMap> m } +#[instrument(level = "trace", ret, skip(expected, actual))] pub(crate) async fn compare_bodies( content_type: &ContentType, expected: &(dyn HttpPart + Send + Sync), @@ -1474,6 +1477,8 @@ pub(crate) async fn compare_bodies( ) -> BodyMatchResult { let mut mismatches = vec![]; + trace!(?content_type, "Comparing bodies"); + #[cfg(feature = "plugins")] { match find_content_matcher(content_type) { @@ -1580,6 +1585,7 @@ fn compare_bodies_core( mismatches } +#[instrument(level = "trace", ret, skip(expected, actual))] async fn match_body_content( content_type: &ContentType, expected: &(dyn HttpPart + Send + Sync), @@ -1671,7 +1677,7 @@ pub async fn match_request<'a>( #[allow(unused_mut, unused_assignments)] let mut plugin_data = hashmap!{}; #[cfg(feature = "plugins")] { - plugin_data = setup_plugin_config(pact, interaction); + plugin_data = setup_plugin_config(pact, interaction, InteractionPart::Request); }; trace!("plugin_data = {:?}", plugin_data); @@ -1742,7 +1748,7 @@ pub async fn match_response<'a>( #[allow(unused_mut, unused_assignments)] let mut plugin_data = hashmap!{}; #[cfg(feature = "plugins")] { - plugin_data = setup_plugin_config(pact, interaction); + plugin_data = setup_plugin_config(pact, interaction, InteractionPart::Response); }; trace!("plugin_data = {:?}", plugin_data); @@ -1775,26 +1781,8 @@ pub async fn match_response<'a>( mismatches } -#[cfg(feature = "plugins")] -fn setup_plugin_config<'a>( - pact: &Box, - interaction: &Box -) -> HashMap { - pact.plugin_data().iter().map(|data| { - let interaction_config = if let Some(v4_interaction) = interaction.as_v4() { - v4_interaction.plugin_config().get(&data.name).cloned().unwrap_or_default() - } else { - hashmap! {} - }; - (data.name.clone(), PluginInteractionConfig { - pact_configuration: data.configuration.clone(), - interaction_configuration: interaction_config - }) - }).collect() -} - /// Matches the actual message contents to the expected one. This takes into account the content type of each. -#[allow(unused_variables)] +#[instrument(level = "trace")] pub async fn match_message_contents( expected: &MessageContents, actual: &MessageContents, @@ -1836,6 +1824,7 @@ pub async fn match_message_contents( } /// Matches the actual message metadata to the expected one. +#[instrument(level = "trace")] pub fn match_message_metadata( expected: &MessageContents, actual: &MessageContents, @@ -1913,7 +1902,7 @@ pub async fn match_message<'a>( #[allow(unused_mut, unused_assignments)] let mut plugin_data = hashmap!{}; #[cfg(feature = "plugins")] { - plugin_data = setup_plugin_config(pact, expected); + plugin_data = setup_plugin_config(pact, expected, InteractionPart::None); }; let body_context = if expected.is_v4() { @@ -1972,7 +1961,7 @@ pub async fn match_sync_message_request<'a>( #[allow(unused_mut, unused_assignments)] let mut plugin_data = hashmap!{}; #[cfg(feature = "plugins")] { - plugin_data = setup_plugin_config(pact, &expected.boxed()); + plugin_data = setup_plugin_config(pact, &expected.boxed(), InteractionPart::None); }; let body_context = CoreMatchingContext { @@ -2030,7 +2019,7 @@ pub async fn match_sync_message_response<'a>( #[allow(unused_mut, unused_assignments)] let mut plugin_data = hashmap!{}; #[cfg(feature = "plugins")] { - plugin_data = setup_plugin_config(pact, &expected.boxed()); + plugin_data = setup_plugin_config(pact, &expected.boxed(), InteractionPart::None); }; for (expected_response, actual_response) in expected_responses.iter().zip(actual_responses) { let matching_rules = &expected_response.matching_rules; diff --git a/rust/pact_matching/src/logging.rs b/rust/pact_matching/src/logging.rs index afc37ee33..eb0e6f690 100644 --- a/rust/pact_matching/src/logging.rs +++ b/rust/pact_matching/src/logging.rs @@ -17,16 +17,19 @@ lazy_static! { /// Accumulates the log entries against a task local ID. If the ID is not set, accumulates against /// the "global" ID. /// cbindgen:ignore + #[deprecated(note = "Do not use this, it has been moved to the FFI crate")] static ref LOG_BUFFER: Mutex> = Mutex::new(HashMap::new()); } task_local! { /// Log ID to accumulate logs against #[allow(missing_docs)] + #[deprecated(note = "This must be moved to the FFI crate")] pub static LOG_ID: String; } /// Fetches the contents from the id scoped in-memory buffer and empties the buffer. +#[deprecated(note = "Do not use this function, it has been moved to the FFI crate")] pub fn fetch_buffer_contents(id: &str) -> Bytes { let mut inner = LOG_BUFFER.lock().unwrap(); let buffer = inner.entry(id.to_string()) @@ -36,6 +39,7 @@ pub fn fetch_buffer_contents(id: &str) -> Bytes { /// Writes the provided bytes to the task local ID scoped in-memory buffer. If there is no /// task local ID set, will write to the "global" buffer. +#[deprecated(note = "Do not use this function, it has been moved to the FFI crate")] pub fn write_to_log_buffer(buf: &[u8]) { let id = LOG_ID.try_with(|id| id.clone()).unwrap_or_else(|_| "global".into()); let mut inner = LOG_BUFFER.lock().unwrap(); diff --git a/rust/pact_matching/src/plugin_support.rs b/rust/pact_matching/src/plugin_support.rs new file mode 100644 index 000000000..d5f21a9e8 --- /dev/null +++ b/rust/pact_matching/src/plugin_support.rs @@ -0,0 +1,291 @@ +//! Support functions for dealing with content from plugins + +use std::collections::HashMap; +use std::panic::RefUnwindSafe; + +use maplit::hashmap; +use pact_plugin_driver::plugin_models::PluginInteractionConfig; +use serde_json::Map; + +use pact_models::interaction::Interaction; +use pact_models::pact::Pact; + +/// Which part of the interaction should the config be extracted +#[derive(Clone, Copy, Debug, Default)] +pub(crate) enum InteractionPart { + /// No part, use the whole config + #[default] None, + /// Request part under the "request" key + Request, + /// Response part under the "response" key + Response +} + +pub(crate) fn setup_plugin_config<'a>( + pact: &Box, + interaction: &Box, + part: InteractionPart +) -> HashMap { + pact.plugin_data().iter().map(|data| { + let interaction_config = if let Some(v4_interaction) = interaction.as_v4() { + if let Some(config) = v4_interaction.plugin_config().get(&data.name) { + // In some cases, depending on how the interaction is setup, the plugin configuration + // could be stored under a request or response key. + match part { + InteractionPart::None => config.clone(), + InteractionPart::Request => if let Some(request_config) = config.get("request") { + request_config + .as_object() + .cloned() + .unwrap_or_else(|| Map::new()) + .iter() + .map(|(k, v)| (k.clone(), v.clone())) + .collect() + } else { + config.clone() + } + InteractionPart::Response => if let Some(response_config) = config.get("response") { + response_config + .as_object() + .cloned() + .unwrap_or_else(|| Map::new()) + .iter() + .map(|(k, v)| (k.clone(), v.clone())) + .collect() + } else { + config.clone() + } + } + } else { + hashmap!{} + } + } else { + hashmap!{} + }; + (data.name.clone(), PluginInteractionConfig { + pact_configuration: data.configuration.clone(), + interaction_configuration: interaction_config + }) + }).collect() +} + +#[cfg(test)] +mod tests { + use expectest::prelude::*; + use maplit::hashmap; + use pact_plugin_driver::plugin_models::PluginInteractionConfig; + use serde_json::json; + use pact_models::interaction::Interaction; + use pact_models::pact::Pact; + use pact_models::plugins::PluginData; + use pact_models::v4::interaction::V4Interaction; + use pact_models::v4::pact::V4Pact; + use pact_models::v4::synch_http::SynchronousHttp; + + use crate::plugin_support::{InteractionPart, setup_plugin_config}; + + #[test] + fn setup_plugin_config_extracts_plugin_data_from_the_pact_object_for_the_interaction() { + let plugin1 = PluginData { + name: "plugin1".to_string(), + version: "1".to_string(), + configuration: hashmap!{ + "a".to_string() => json!(100) + } + }; + let plugin2 = PluginData { + name: "plugin2".to_string(), + version: "2".to_string(), + configuration: hashmap!{ + "b".to_string() => json!(200) + } + }; + let interaction1 = SynchronousHttp { + plugin_config: hashmap!{ + "plugin1".to_string() => hashmap!{ + "ia".to_string() => json!(1000) + } + }, + .. SynchronousHttp::default() + }; + let interaction2 = SynchronousHttp { + plugin_config: hashmap!{ + "plugin2".to_string() => hashmap!{ + "ib".to_string() => json!(2000) + } + }, + .. SynchronousHttp::default() + }; + let pact = V4Pact { + interactions: vec![interaction1.boxed_v4(), interaction2.boxed_v4()], + plugin_data: vec![plugin1, plugin2], + .. V4Pact::default() + }; + + let result = setup_plugin_config(&pact.boxed(), &interaction1.boxed(), InteractionPart::None); + expect!(result).to(be_equal_to(hashmap!{ + "plugin1".to_string() => PluginInteractionConfig { + pact_configuration: hashmap!{ + "a".to_string() => json!(100) + }, + interaction_configuration: hashmap!{ + "ia".to_string() => json!(1000) + } + }, + "plugin2".to_string() => PluginInteractionConfig { + pact_configuration: hashmap!{ + "b".to_string() => json!(200) + }, + interaction_configuration: hashmap!{} + } + })); + + let result = setup_plugin_config(&pact.boxed(), &interaction2.boxed(), InteractionPart::None); + expect!(result).to(be_equal_to(hashmap!{ + "plugin1".to_string() => PluginInteractionConfig { + pact_configuration: hashmap!{ + "a".to_string() => json!(100) + }, + interaction_configuration: hashmap!{} + }, + "plugin2".to_string() => PluginInteractionConfig { + pact_configuration: hashmap!{ + "b".to_string() => json!(200) + }, + interaction_configuration: hashmap!{ + "ib".to_string() => json!(2000) + } + } + })); + + let result = setup_plugin_config(&pact.boxed(), &interaction1.boxed(), InteractionPart::Request); + expect!(result).to(be_equal_to(hashmap!{ + "plugin1".to_string() => PluginInteractionConfig { + pact_configuration: hashmap!{ + "a".to_string() => json!(100) + }, + interaction_configuration: hashmap!{ + "ia".to_string() => json!(1000) + } + }, + "plugin2".to_string() => PluginInteractionConfig { + pact_configuration: hashmap!{ + "b".to_string() => json!(200) + }, + interaction_configuration: hashmap!{} + } + })); + } + + #[test] + fn setup_plugin_config_extracts_plugin_data_from_the_request_part_for_the_interaction() { + let plugin1 = PluginData { + name: "plugin1".to_string(), + version: "1".to_string(), + configuration: hashmap!{ + "a".to_string() => json!(100) + } + }; + let interaction1 = SynchronousHttp { + plugin_config: hashmap!{ + "plugin1".to_string() => hashmap!{ + "ia".to_string() => json!(1000), + "request".to_string() => json!({ + "req": "req_value" + }), + "response".to_string() => json!({ + "res": "res_value" + }) + } + }, + .. SynchronousHttp::default() + }; + let pact = V4Pact { + interactions: vec![interaction1.boxed_v4()], + plugin_data: vec![plugin1], + .. V4Pact::default() + }; + + let result = setup_plugin_config(&pact.boxed(), &interaction1.boxed(), InteractionPart::None); + expect!(result).to(be_equal_to(hashmap!{ + "plugin1".to_string() => PluginInteractionConfig { + pact_configuration: hashmap!{ + "a".to_string() => json!(100) + }, + interaction_configuration: hashmap!{ + "ia".to_string() => json!(1000), + "request".to_string() => json!({"req": "req_value"}), + "response".to_string() => json!({"res": "res_value"}) + } + } + })); + + let result = setup_plugin_config(&pact.boxed(), &interaction1.boxed(), InteractionPart::Request); + expect!(result).to(be_equal_to(hashmap!{ + "plugin1".to_string() => PluginInteractionConfig { + pact_configuration: hashmap!{ + "a".to_string() => json!(100) + }, + interaction_configuration: hashmap!{ + "req".to_string() => json!("req_value") + } + } + })); + } + + #[test] + fn setup_plugin_config_extracts_plugin_data_from_the_response_part_for_the_interaction() { + let plugin1 = PluginData { + name: "plugin1".to_string(), + version: "1".to_string(), + configuration: hashmap!{ + "a".to_string() => json!(100) + } + }; + let interaction1 = SynchronousHttp { + plugin_config: hashmap!{ + "plugin1".to_string() => hashmap!{ + "ia".to_string() => json!(1000), + "request".to_string() => json!({ + "req": "req_value" + }), + "response".to_string() => json!({ + "res": "res_value" + }) + } + }, + .. SynchronousHttp::default() + }; + let pact = V4Pact { + interactions: vec![interaction1.boxed_v4()], + plugin_data: vec![plugin1], + .. V4Pact::default() + }; + + let result = setup_plugin_config(&pact.boxed(), &interaction1.boxed(), InteractionPart::None); + expect!(result).to(be_equal_to(hashmap!{ + "plugin1".to_string() => PluginInteractionConfig { + pact_configuration: hashmap!{ + "a".to_string() => json!(100) + }, + interaction_configuration: hashmap!{ + "ia".to_string() => json!(1000), + "request".to_string() => json!({"req": "req_value"}), + "response".to_string() => json!({"res": "res_value"}) + } + } + })); + + let result = setup_plugin_config(&pact.boxed(), &interaction1.boxed(), InteractionPart::Response); + expect!(result).to(be_equal_to(hashmap!{ + "plugin1".to_string() => PluginInteractionConfig { + pact_configuration: hashmap!{ + "a".to_string() => json!(100) + }, + interaction_configuration: hashmap!{ + "res".to_string() => json!("res_value") + } + } + })); + } +} diff --git a/rust/pact_models/CHANGELOG.md b/rust/pact_models/CHANGELOG.md index 21c12bd84..dc6dc5313 100644 --- a/rust/pact_models/CHANGELOG.md +++ b/rust/pact_models/CHANGELOG.md @@ -1,5 +1,19 @@ To generate the log, run `git log --pretty='* %h - %s (%an, %ad)' TAGNAME..HEAD .` replacing TAGNAME and HEAD as appropriate. +# 1.2.4 - Bugfix Release + +* 50fc022c - fix(pact_models): Provider state values may be passed in under a "providerState" key (Ronald Holshausen, Thu Aug 8 11:53:23 2024 +1000) +* 8387b9e1 - fix(pact_models): ProviderStateGenerator name was not correct (Ronald Holshausen, Tue Aug 6 11:49:19 2024 +1000) +* 42911cfd - bump version to 1.2.4 (Ronald Holshausen, Tue Aug 6 10:54:23 2024 +1000) + +# 1.2.3 - Support for provider state injected values in plugins + +* 033a50ab - feat: Update the matching rule expression parser to support values from provider states (Ronald Holshausen, Fri Aug 2 10:06:52 2024 +1000) +* 2ca9a9ae - chore(pact_models): Improve the matching rule expression parser error messages (Ronald Holshausen, Thu Aug 1 16:07:31 2024 +1000) +* 77814aef - fix(pact_models): fix: when writing pact specs in V2 format, header matchers must be pluralised #449 (Ronald Holshausen, Wed Jul 31 15:08:00 2024 +1000) +* 3c96c31b - chore: Upgrade pact_mock_server to 1.2.9 (Ronald Holshausen, Wed Jul 17 14:54:40 2024 +1000) +* 57f05775 - bump version to 1.2.3 (Ronald Holshausen, Wed Jul 17 11:10:27 2024 +1000) + # 1.2.2 - Maintenance Release * 2e2580f6 - feat(pact_consumer): Improve the mock server error output (Ronald Holshausen, Wed Jul 10 15:23:48 2024 +1000) diff --git a/rust/pact_models/Cargo.toml b/rust/pact_models/Cargo.toml index c613c41e4..d9441928a 100644 --- a/rust/pact_models/Cargo.toml +++ b/rust/pact_models/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pact_models" -version = "1.2.3" +version = "1.2.5" authors = ["Ronald Holshausen "] edition = "2021" description = "Pact-Rust support library that provides the core models for dealing with Pact files" diff --git a/rust/pact_models/src/generators/mod.rs b/rust/pact_models/src/generators/mod.rs index 897f4e4a6..bd68b1913 100644 --- a/rust/pact_models/src/generators/mod.rs +++ b/rust/pact_models/src/generators/mod.rs @@ -19,6 +19,7 @@ use rand::prelude::*; #[cfg(target_family = "wasm")] use regex::{Captures, Regex}; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; +use serde_json::Value::Object; use tracing::{debug, instrument, trace, warn}; use uuid::Uuid; @@ -252,7 +253,7 @@ impl Generator { Generator::Time(_, _) => "Time", Generator::DateTime(_, _) => "DateTime", Generator::RandomBoolean => "RandomBoolean", - Generator::ProviderStateGenerator(_, _) => "ProviderStateGenerator", + Generator::ProviderStateGenerator(_, _) => "ProviderState", Generator::MockServerURL(_, _) => "MockServerURL", Generator::ArrayContains(_) => "ArrayContains", }.to_string() @@ -825,11 +826,21 @@ impl GenerateValue for Generator { ) -> anyhow::Result { match self { &Generator::RandomInt(min, max) => Ok(rand::thread_rng().gen_range(min as u16..(max as u16).saturating_add(1))), - &Generator::ProviderStateGenerator(ref exp, ref dt) => - match generate_value_from_context(exp, context, dt) { + &Generator::ProviderStateGenerator(ref exp, ref dt) => { + // Provider state values may come under a "providerState" key + let provider_state_config = if let Some(Object(psc)) = context.get("providerState") { + psc + .iter() + .map(|(k, v)| (k.as_str(), v.clone())) + .collect() + } else { + context.clone() + }; + match generate_value_from_context(exp, &provider_state_config, dt) { Ok(val) => u16::try_from(val), Err(err) => Err(err) - }, + } + } _ => Err(anyhow!("Could not generate a u16 value from {} using {:?}", value, self)) } } @@ -973,8 +984,18 @@ impl GenerateValue for Generator { } } Generator::RandomBoolean => Ok(format!("{}", rnd.gen::())), - Generator::ProviderStateGenerator(ref exp, ref dt) => - generate_value_from_context(exp, context, dt).map(|val| val.to_string()), + Generator::ProviderStateGenerator(ref exp, ref dt) => { + // Provider state values may come under a "providerState" key + let provider_state_config = if let Some(Object(psc)) = context.get("providerState") { + psc + .iter() + .map(|(k, v)| (k.as_str(), v.clone())) + .collect() + } else { + context.clone() + }; + generate_value_from_context(exp, &provider_state_config, dt).map(|val| val.to_string()) + } Generator::MockServerURL(example, regex) => if let Some(mock_server_details) = context.get("mockServer") { debug!("Generating URL from Mock Server details"); match mock_server_details.as_object() { @@ -1140,11 +1161,21 @@ impl GenerateValue for Generator { } }, Generator::RandomBoolean => Ok(json!(rand::thread_rng().gen::())), - Generator::ProviderStateGenerator(ref exp, ref dt) => - match generate_value_from_context(exp, context, dt) { + Generator::ProviderStateGenerator(ref exp, ref dt) => { + // Provider state values may come under a "providerState" key + let provider_state_config = if let Some(Object(psc)) = context.get("providerState") { + psc + .iter() + .map(|(k, v)| (k.as_str(), v.clone())) + .collect() + } else { + context.clone() + }; + match generate_value_from_context(exp, &provider_state_config, dt) { Ok(val) => val.as_json(), Err(err) => Err(err) - }, + } + } Generator::MockServerURL(example, regex) => { debug!("context = {:?}", context); if let Some(mock_server_details) = context.get("mockServer") { @@ -2425,7 +2456,7 @@ mod tests2 { use serde_json::{json, Value}; use crate::expression_parser::DataType; - use crate::generators::generate_value_from_context; + use crate::generators::{generate_value_from_context, Generator}; #[rstest] // expression, value, data_type, expected @@ -2456,4 +2487,22 @@ mod tests2 { let result_value = result.unwrap(); expect!(result_value.as_json().unwrap()).to(be_equal_to(expected)); } + + #[rstest] + #[case(Generator::RandomInt(0, 1), "RandomInt")] + #[case(Generator::Uuid(None), "Uuid")] + #[case(Generator::RandomDecimal(0), "RandomDecimal")] + #[case(Generator::RandomHexadecimal(0), "RandomHexadecimal")] + #[case(Generator::RandomString(0), "RandomString")] + #[case(Generator::Regex("".to_string()), "Regex")] + #[case(Generator::Date(None, None), "Date")] + #[case(Generator::Time(None, None), "Time")] + #[case(Generator::DateTime(None, None), "DateTime")] + #[case(Generator::RandomBoolean, "RandomBoolean")] + #[case(Generator::ProviderStateGenerator("".to_string(), None), "ProviderState")] + #[case(Generator::MockServerURL("".to_string(), "".to_string()), "MockServerURL")] + #[case(Generator::ArrayContains(vec![]), "ArrayContains")] + fn generator_name_test(#[case] generator: Generator, #[case] name: &str) { + expect!(generator.name()).to(be_equal_to(name)); + } } diff --git a/rust/pact_models/src/matchingrules/expressions.rs b/rust/pact_models/src/matchingrules/expressions.rs index df0092429..80f39cc66 100644 --- a/rust/pact_models/src/matchingrules/expressions.rs +++ b/rust/pact_models/src/matchingrules/expressions.rs @@ -117,9 +117,11 @@ use bytes::{BufMut, BytesMut}; use itertools::Either; use logos::{Lexer, Logos, Span}; use semver::Version; -use tracing::{trace, warn}; +use tracing::{instrument, trace, warn}; +use crate::expression_parser::DataType; use crate::generators::Generator; +use crate::generators::Generator::ProviderStateGenerator; use crate::matchingrules::MatchingRule; use crate::matchingrules::MatchingRule::{MaxType, MinType, NotEmpty}; @@ -169,6 +171,19 @@ impl ValueType { } } +impl Into for ValueType { + fn into(self) -> DataType { + match self { + ValueType::Unknown => DataType::RAW, + ValueType::String => DataType::STRING, + ValueType::Number => DataType::DECIMAL, + ValueType::Integer => DataType::INTEGER, + ValueType::Decimal => DataType::DECIMAL, + ValueType::Boolean => DataType::BOOLEAN + } + } +} + /// Reference to another attribute that defines the structure of the matching rule #[derive(Clone, Debug, PartialEq, Eq)] pub struct MatchingReference { @@ -288,6 +303,7 @@ enum MatcherDefinitionToken { /// * `matching(type,'Name')` - type matcher /// * `matching(number,100)` - number matcher /// * `matching(datetime, 'yyyy-MM-dd','2000-01-01')` - datetime matcher with format string +#[instrument(level = "debug", ret)] pub fn parse_matcher_def(v: &str) -> anyhow::Result { if v.is_empty() { Err(anyhow!("Expected a matching rule definition, but got an empty string")) @@ -370,12 +386,12 @@ fn matching_definition_exp(lex: &mut Lexer, v: &str) -> }) } } else if token == &MatcherDefinitionToken::NotEmpty { - let (value, value_type) = parse_not_empty(lex, v)?; + let (value, value_type, generator) = parse_not_empty(lex, v)?; Ok(MatchingRuleDefinition { value, value_type, rules: vec![Either::Left(NotEmpty)], - generator: None + generator }) } else if token == &MatcherDefinitionToken::EachKey { let definition = parse_each_key(lex, v)?; @@ -516,11 +532,14 @@ fn parse_each_key(lex: &mut Lexer, v: &str) -> anyhow::R } // LEFT_BRACKET primitiveValue RIGHT_BRACKET -fn parse_not_empty(lex: &mut Lexer, v: &str) -> anyhow::Result<(String, ValueType)> { - let next = lex.next().ok_or_else(|| anyhow!("expected '('"))?; +fn parse_not_empty( + lex: &mut Lexer, + v: &str +) -> anyhow::Result<(String, ValueType, Option)> { + let next = lex.next().ok_or_else(|| end_of_expression(v, "'('"))?; if let Ok(MatcherDefinitionToken::LeftBracket) = next { - let result = parse_primitive_value(lex, v)?; - let next = lex.next().ok_or_else(|| anyhow!("expected ')'"))?; + let result = parse_primitive_value(lex, v, false)?; + let next = lex.next().ok_or_else(|| end_of_expression(v, "')'"))?; if let Ok(MatcherDefinitionToken::RightBracket) = next { Ok(result) } else { @@ -533,17 +552,17 @@ fn parse_not_empty(lex: &mut Lexer, v: &str) -> anyhow:: // LEFT_BRACKET matchingRule RIGHT_BRACKET fn parse_matching(lex: &mut Lexer, v: &str) -> anyhow::Result<(String, ValueType, Option, Option, Option)> { - let next = lex.next().ok_or_else(|| anyhow!("expected '('"))?; + let next = lex.next().ok_or_else(|| end_of_expression(v, "'('"))?; if let Ok(MatcherDefinitionToken::LeftBracket) = next { let result = parse_matching_rule(lex, v)?; - let next = lex.next().ok_or_else(|| anyhow!("expected ')'"))?; + let next = lex.next().ok_or_else(|| end_of_expression(v, "')'"))?; if let Ok(MatcherDefinitionToken::RightBracket) = next { Ok(result) } else { - Err(anyhow!("expected closing bracket, got '{}'", lex.slice())) + Err(anyhow!(error_message(lex, v, "Expected a closing bracket", "Expected a closing bracket before this")?)) } } else { - Err(anyhow!("expected '(', got '{}'", lex.remainder())) + Err(anyhow!(error_message(lex, v, "Expected an opening bracket", "Expected an opening bracket before this")?)) } } @@ -643,10 +662,13 @@ fn parse_semver(lex: &mut Lexer, v: &str) -> anyhow::Res } // COMMA v=primitiveValue { $value = $v.value; $type = $v.type; } ) -fn parse_equality(lex: &mut Lexer, v: &str) -> anyhow::Result<(String, ValueType, Option, Option, Option)> { +fn parse_equality( + lex: &mut Lexer, + v: &str +) -> anyhow::Result<(String, ValueType, Option, Option, Option)> { parse_comma(lex, v)?; - let (value, value_type) = parse_primitive_value(lex, v)?; - Ok((value, value_type, Some(MatchingRule::Equality), None, None)) + let (value, value_type, generator) = parse_primitive_value(lex, v, false)?; + Ok((value, value_type, Some(MatchingRule::Equality), generator, None)) } // COMMA r=string COMMA s=string { $rule = new RegexMatcher($r.contents); $value = $s.contents; $type = ValueType.String; } @@ -659,37 +681,64 @@ fn parse_regex(lex: &mut Lexer, v: &str) -> anyhow::Resu } // COMMA v=primitiveValue { $value = $v.value; $type = $v.type; } ) -fn parse_type(lex: &mut Lexer, v: &str) -> anyhow::Result<(String, ValueType, Option, Option, Option)> { +fn parse_type( + lex: &mut Lexer, + v: &str +) -> anyhow::Result<(String, ValueType, Option, Option, Option)> { parse_comma(lex, v)?; - let (value, value_type) = parse_primitive_value(lex, v)?; - Ok((value, value_type, Some(MatchingRule::Type), None, None)) + let (value, value_type, generator) = parse_primitive_value(lex, v, false)?; + Ok((value, value_type, Some(MatchingRule::Type), generator, None)) } -// COMMA format=string COMMA s=string { $value = $s.contents; $type = ValueType.String; } +// COMMA format=string COMMA s=(string | 'fromProviderState' fromProviderState) fn parse_datetime(lex: &mut Lexer, v: &str) -> anyhow::Result<(String, ValueType, Option, Option, Option)> { parse_comma(lex, v)?; let format = parse_string(lex, v)?; parse_comma(lex, v)?; - let value = parse_string(lex, v)?; - Ok((value, ValueType::String, Some(MatchingRule::Timestamp(format.clone())), Some(Generator::DateTime(Some(format), None)), None)) + + let remainder = lex.remainder().trim_start(); + let (value, value_type, generator) = if remainder.starts_with("fromProviderState") { + lex.next(); + from_provider_state(lex, v)? + } else { + (parse_string(lex, v)?, ValueType::String, Some(Generator::DateTime(Some(format.clone()), None))) + }; + + Ok((value, value_type, Some(MatchingRule::Timestamp(format.clone())), generator, None)) } -// COMMA format=string COMMA s=string { $value = $s.contents; $type = ValueType.String; } +// COMMA format=string COMMA s=(string | 'fromProviderState' fromProviderState) fn parse_date(lex: &mut Lexer, v: &str) -> anyhow::Result<(String, ValueType, Option, Option, Option)> { parse_comma(lex, v)?; let format = parse_string(lex, v)?; parse_comma(lex, v)?; - let value = parse_string(lex, v)?; - Ok((value, ValueType::String, Some(MatchingRule::Date(format.clone())), Some(Generator::Date(Some(format), None)), None)) + + let remainder = lex.remainder().trim_start(); + let (value, value_type, generator) = if remainder.starts_with("fromProviderState") { + lex.next(); + from_provider_state(lex, v)? + } else { + (parse_string(lex, v)?, ValueType::String, Some(Generator::Date(Some(format.clone()), None))) + }; + + Ok((value, value_type, Some(MatchingRule::Date(format.clone())), generator, None)) } -// COMMA format=string COMMA s=string { $value = $s.contents; $type = ValueType.String; } +// COMMA format=string COMMA s=(string | 'fromProviderState' fromProviderState) fn parse_time(lex: &mut Lexer, v: &str) -> anyhow::Result<(String, ValueType, Option, Option, Option)> { parse_comma(lex, v)?; let format = parse_string(lex, v)?; parse_comma(lex, v)?; - let value = parse_string(lex, v)?; - Ok((value, ValueType::String, Some(MatchingRule::Time(format.clone())), Some(Generator::Time(Some(format), None)), None)) + + let remainder = lex.remainder().trim_start(); + let (value, value_type, generator) = if remainder.starts_with("fromProviderState") { + lex.next(); + from_provider_state(lex, v)? + } else { + (parse_string(lex, v)?, ValueType::String, Some(Generator::Time(Some(format.clone()), None))) + }; + + Ok((value, value_type, Some(MatchingRule::Time(format.clone())), generator, None)) } // COMMA s=string { $rule = new IncludeMatcher($s.contents); $value = $s.contents; $type = ValueType.String; } @@ -713,28 +762,31 @@ fn parse_content_type(lex: &mut Lexer, v: &str) -> anyho // | v=DECIMAL_LITERAL { $value = $v.getText(); $type = ValueType.Decimal; } // | v=INTEGER_LITERAL { $value = $v.getText(); $type = ValueType.Integer; } // | v=BOOLEAN_LITERAL { $value = $v.getText(); $type = ValueType.Boolean; } -// ; -// string returns [ String contents ] : -// STRING_LITERAL { +// | STRING_LITERAL { // String contents = $STRING_LITERAL.getText(); // $contents = contents.substring(1, contents.length() - 1); // } // | 'null' +// | 'fromProviderState' fromProviderState // ; -fn parse_primitive_value(lex: &mut Lexer, _v: &str) -> anyhow::Result<(String, ValueType)> { - let next = lex.next().ok_or_else(|| anyhow!("expected a primitive value"))?; +fn parse_primitive_value( + lex: &mut Lexer, + v: &str, + already_called: bool +) -> anyhow::Result<(String, ValueType, Option)> { + let next = lex.next().ok_or_else(|| end_of_expression(v, "expected a primitive value"))?; match next { - Ok(MatcherDefinitionToken::String) => Ok((lex.slice().trim_matches('\'').to_string(), ValueType::String)), - Ok(MatcherDefinitionToken::Null) => Ok((String::new(), ValueType::String)), + Ok(MatcherDefinitionToken::String) => Ok((lex.slice().trim_matches('\'').to_string(), ValueType::String, None)), + Ok(MatcherDefinitionToken::Null) => Ok((String::new(), ValueType::String, None)), Ok(MatcherDefinitionToken::Int(_)) => { // Logos is returning an INT token when a Decimal should match. We need to now parse the // remaining pattern if it is a decimal if lex.remainder().starts_with('.') { let int_part = lex.slice(); - let _ = lex.next().ok_or_else(|| anyhow!("expected a number"))?; - Ok((format!("{}{}", int_part, lex.slice()), ValueType::Decimal)) + let _ = lex.next().ok_or_else(|| end_of_expression(v, "expected a number"))?; + Ok((format!("{}{}", int_part, lex.slice()), ValueType::Decimal, None)) } else { - Ok((lex.slice().to_string(), ValueType::Integer)) + Ok((lex.slice().to_string(), ValueType::Integer, None)) } }, Ok(MatcherDefinitionToken::Num(_)) => { @@ -742,23 +794,26 @@ fn parse_primitive_value(lex: &mut Lexer, _v: &str) -> a // remaining pattern if it is a decimal if lex.remainder().starts_with('.') { let int_part = lex.slice(); - let _ = lex.next().ok_or_else(|| anyhow!("expected a number"))?; - Ok((format!("{}{}", int_part, lex.slice()), ValueType::Decimal)) + let _ = lex.next().ok_or_else(|| end_of_expression(v, "expected a number"))?; + Ok((format!("{}{}", int_part, lex.slice()), ValueType::Decimal, None)) } else { - Ok((lex.slice().to_string(), ValueType::Integer)) + Ok((lex.slice().to_string(), ValueType::Integer, None)) } }, - Ok(MatcherDefinitionToken::Decimal) => Ok((lex.slice().to_string(), ValueType::Decimal)), - Ok(MatcherDefinitionToken::Boolean) => Ok((lex.slice().to_string(), ValueType::Boolean)), - _ => Err(anyhow!("expected a primitive value, got '{}'", lex.slice())) + Ok(MatcherDefinitionToken::Decimal) => Ok((lex.slice().to_string(), ValueType::Decimal, None)), + Ok(MatcherDefinitionToken::Boolean) => Ok((lex.slice().to_string(), ValueType::Boolean, None)), + Ok(MatcherDefinitionToken::Id) if lex.slice() == "fromProviderState" && !already_called => { + from_provider_state(lex, v) + }, + _ => Err(anyhow!(error_message(lex, v, "Expected a primitive value", "Expected a primitive value here")?)) } } -// COMMA val=( DECIMAL_LITERAL | INTEGER_LITERAL ) { $value = $val.getText(); $type = ValueType.Number; } +// COMMA val=( DECIMAL_LITERAL | INTEGER_LITERAL | 'fromProviderState' fromProviderState) #[allow(clippy::if_same_then_else)] fn parse_number(lex: &mut Lexer, v: &str) -> anyhow::Result<(String, ValueType, Option, Option, Option)> { parse_comma(lex, v)?; - let next = lex.next().ok_or_else(|| anyhow!("expected a number"))?; + let next = lex.next().ok_or_else(|| end_of_expression(v, "expected a number"))?; if let Ok(MatcherDefinitionToken::Decimal) = next { Ok((lex.slice().to_string(), ValueType::Number, Some(MatchingRule::Number), None, None)) } else if let Ok(MatcherDefinitionToken::Int(_) | MatcherDefinitionToken::Num(_)) = next { @@ -766,24 +821,38 @@ fn parse_number(lex: &mut Lexer, v: &str) -> anyhow::Res // remaining pattern if it is a decimal if lex.remainder().starts_with('.') { let int_part = lex.slice(); - let _ = lex.next().ok_or_else(|| anyhow!("expected a number"))?; + let _ = lex.next().ok_or_else(|| end_of_expression(v, "expected a number"))?; Ok((format!("{}{}", int_part, lex.slice()), ValueType::Number, Some(MatchingRule::Number), None, None)) } else { Ok((lex.slice().to_string(), ValueType::Number, Some(MatchingRule::Number), None, None)) } + } else if let Ok(MatcherDefinitionToken::Id) = next { + if lex.slice() == "fromProviderState" { + let (value, value_type, generator) = from_provider_state(lex, v)?; + Ok((value, value_type, Some(MatchingRule::Number), generator, None)) + } else { + Err(anyhow!(error_message(lex, v, "Expected a number", "Expected a number here")?)) + } } else { - Err(anyhow!("expected a number, got '{}'", lex.slice())) + Err(anyhow!(error_message(lex, v, "Expected a number", "Expected a number here")?)) } } // COMMA val=INTEGER_LITERAL { $value = $val.getText(); $type = ValueType.Integer; } fn parse_integer(lex: &mut Lexer, v: &str) -> anyhow::Result<(String, ValueType, Option, Option, Option)> { parse_comma(lex, v)?; - let next = lex.next().ok_or_else(|| anyhow!("expected an integer"))?; + let next = lex.next().ok_or_else(|| end_of_expression(v, "expected an integer"))?; if let Ok(MatcherDefinitionToken::Int(_) | MatcherDefinitionToken::Num(_)) = next { Ok((lex.slice().to_string(), ValueType::Integer, Some(MatchingRule::Integer), None, None)) + } else if let Ok(MatcherDefinitionToken::Id) = next { + if lex.slice() == "fromProviderState" { + let (value, value_type, generator) = from_provider_state(lex, v)?; + Ok((value, value_type, Some(MatchingRule::Integer), generator, None)) + } else { + Err(anyhow!(error_message(lex, v, "Expected an integer", "Expected an integer here")?)) + } } else { - Err(anyhow!("expected an integer, got '{}'", lex.slice())) + Err(anyhow!(error_message(lex, v, "Expected an integer", "Expected an integer here")?)) } } @@ -791,32 +860,39 @@ fn parse_integer(lex: &mut Lexer, v: &str) -> anyhow::Re #[allow(clippy::if_same_then_else)] fn parse_decimal(lex: &mut Lexer, v: &str) -> anyhow::Result<(String, ValueType, Option, Option, Option)> { parse_comma(lex, v)?; - let next = lex.next().ok_or_else(|| anyhow!("expected a decimal number"))?; + let next = lex.next().ok_or_else(|| end_of_expression(v, "expected a decimal number"))?; if let Ok(MatcherDefinitionToken::Int(_) | MatcherDefinitionToken::Num(_)) = next { // Logos is returning an INT token when a Decimal should match. We need to now parse the // remaining pattern if it is a decimal if lex.remainder().starts_with('.') { let int_part = lex.slice(); - let _ = lex.next().ok_or_else(|| anyhow!("expected a number"))?; + let _ = lex.next().ok_or_else(|| end_of_expression(v, "expected a number"))?; Ok((format!("{}{}", int_part, lex.slice()), ValueType::Decimal, Some(MatchingRule::Decimal), None, None)) } else { Ok((lex.slice().to_string(), ValueType::Decimal, Some(MatchingRule::Decimal), None, None)) } } else if let Ok(MatcherDefinitionToken::Decimal) = next { Ok((lex.slice().to_string(), ValueType::Decimal, Some(MatchingRule::Decimal), None, None)) + } else if let Ok(MatcherDefinitionToken::Id) = next { + if lex.slice() == "fromProviderState" { + let (value, value_type, generator) = from_provider_state(lex, v)?; + Ok((value, value_type, Some(MatchingRule::Number), generator, None)) + } else { + Err(anyhow!(error_message(lex, v, "Expected a decimal number", "Expected a decimal number here")?)) + } } else { - Err(anyhow!("expected a decimal number, got '{}'", lex.slice())) + Err(anyhow!(error_message(lex, v, "Expected a decimal number", "Expected a decimal number here")?)) } } // COMMA BOOLEAN_LITERAL { $rule = BooleanMatcher.INSTANCE; $value = $BOOLEAN_LITERAL.getText(); $type = ValueType.Boolean; } fn parse_boolean(lex: &mut Lexer, v: &str) -> anyhow::Result<(String, ValueType, Option, Option, Option)> { parse_comma(lex, v)?; - let next = lex.next().ok_or_else(|| anyhow!("expected a boolean"))?; + let next = lex.next().ok_or_else(|| end_of_expression(v, "expected a boolean"))?; if let Ok(MatcherDefinitionToken::Boolean) = next { Ok((lex.slice().to_string(), ValueType::Boolean, Some(MatchingRule::Boolean), None, None)) } else { - Err(anyhow!("expected a boolean, got '{}'", lex.slice())) + Err(anyhow!(error_message(lex, v, "Expected a boolean", "Expected a boolean here")?)) } } @@ -980,6 +1056,24 @@ fn parse_length_param(lex: &mut Lexer, v: &str) -> anyho } } +// '(' exp=STRING_LITERAL COMMA v=primitiveValue ')' +fn from_provider_state(lex: &mut Lexer, v: &str) -> anyhow::Result<(String, ValueType, Option)> { + let next = lex.next().ok_or_else(|| end_of_expression(v, "'('"))?; + if let Ok(MatcherDefinitionToken::LeftBracket) = next { + let expression = parse_string(lex, v)?; + parse_comma(lex, v)?; + let (value, val_type, _) = parse_primitive_value(lex, v, true)?; + let next = lex.next().ok_or_else(|| end_of_expression(v, "')'"))?; + if let Ok(MatcherDefinitionToken::RightBracket) = next { + Ok((value, val_type, Some(ProviderStateGenerator(expression, Some(val_type.into()))))) + } else { + Err(anyhow!(error_message(lex, v, "Expected a closing bracket", "Expected a closing bracket before this")?)) + } + } else { + Err(anyhow!(error_message(lex, v, "Expected an opening bracket", "Expected an opening bracket before this")?)) + } +} + #[cfg(test)] mod test { use expectest::prelude::*; @@ -1006,12 +1100,15 @@ mod test { #[test] fn parse_type_matcher() { - expect!(super::parse_matcher_def("matching(type,'Name')").unwrap()).to( + expect!(parse_matcher_def("matching(type,'Name')").unwrap()).to( be_equal_to(MatchingRuleDefinition::new("Name".to_string(), ValueType::String, MatchingRule::Type, None))); - expect!(super::parse_matcher_def("matching( type, 'Name' )").unwrap()).to( + expect!(parse_matcher_def("matching( type, 'Name' )").unwrap()).to( be_equal_to(MatchingRuleDefinition::new("Name".to_string(), ValueType::String, MatchingRule::Type, None))); - expect!(super::parse_matcher_def("matching(type,123.4)").unwrap()).to( + expect!(parse_matcher_def("matching(type,123.4)").unwrap()).to( be_equal_to(MatchingRuleDefinition::new("123.4".to_string(), ValueType::Decimal, MatchingRule::Type, None))); + expect!(parse_matcher_def("matching(type, fromProviderState('exp', 3))").unwrap()).to( + be_equal_to(MatchingRuleDefinition::new("3".to_string(), ValueType::Integer, MatchingRule::Type, + Some(ProviderStateGenerator("exp".to_string(), Some(DataType::INTEGER)))))); } #[test] @@ -1026,6 +1123,9 @@ mod test { be_equal_to(MatchingRuleDefinition::new("100".to_string(), ValueType::Decimal, MatchingRule::Decimal, None))); expect!(super::parse_matcher_def("matching(decimal,100.22)").unwrap()).to( be_equal_to(MatchingRuleDefinition::new("100.22".to_string(), ValueType::Decimal, MatchingRule::Decimal, None))); + expect!(parse_matcher_def("matching(number, fromProviderState('exp', 3))").unwrap()).to( + be_equal_to(MatchingRuleDefinition::new("3".to_string(), ValueType::Integer, MatchingRule::Number, + Some(ProviderStateGenerator("exp".to_string(), Some(DataType::INTEGER)))))); } #[test] @@ -1045,6 +1145,11 @@ mod test { ValueType::String, MatchingRule::Time("HH:mm:ss".to_string()), Some(Time(Some("HH:mm:ss".to_string()), None))))); + expect!(super::parse_matcher_def("matching(datetime, 'yyyy-MM-dd', fromProviderState('exp', '2000-01-01'))").unwrap()).to( + be_equal_to(MatchingRuleDefinition::new("2000-01-01".to_string(), + ValueType::String, + MatchingRule::Timestamp("yyyy-MM-dd".to_string()), + Some(ProviderStateGenerator("exp".to_string(), Some(DataType::STRING)))))); } #[test] @@ -1086,6 +1191,9 @@ mod test { ValueType::Decimal, MatchingRule::Equality, None))); + expect!(parse_matcher_def("matching(equalTo, fromProviderState('exp', 3))").unwrap()).to( + be_equal_to(MatchingRuleDefinition::new("3".to_string(), ValueType::Integer, MatchingRule::Equality, + Some(ProviderStateGenerator("exp".to_string(), Some(DataType::INTEGER)))))); } #[test] @@ -1109,6 +1217,9 @@ mod test { ValueType::Integer, MatchingRule::NotEmpty, None))); + expect!(parse_matcher_def("notEmpty(fromProviderState('exp', 3))").unwrap()).to( + be_equal_to(MatchingRuleDefinition::new("3".to_string(), ValueType::Integer, MatchingRule::NotEmpty, + Some(ProviderStateGenerator("exp".to_string(), Some(DataType::INTEGER)))))); } #[test] diff --git a/rust/pact_models/src/matchingrules/mod.rs b/rust/pact_models/src/matchingrules/mod.rs index e8d48a1f8..606766dfb 100644 --- a/rust/pact_models/src/matchingrules/mod.rs +++ b/rust/pact_models/src/matchingrules/mod.rs @@ -699,6 +699,15 @@ pub enum Category { METADATA } +impl Category { + pub(crate) fn v2_form(&self) -> String { + match self { + Category::HEADER => "headers".to_string(), + _ => self.to_string() + } + } +} + impl FromStr for Category { type Err = String; @@ -880,12 +889,12 @@ impl MatchingRuleCategory { } Category::HEADER | Category::QUERY => for (k, v) in &self.rules { let mut path = DocPath::root(); - path.push_field(self.name.to_string()); + path.push_field(self.name.v2_form()); path.push_path(k); map.insert(path.to_string(), v.to_v2_json()); } _ => for (k, v) in &self.rules { - map.insert(format!("$.{}.{}", self.name, k), v.to_v2_json()); + map.insert(format!("$.{}.{}", self.name.v2_form(), k), v.to_v2_json()); } }; @@ -1251,7 +1260,12 @@ impl MatchingRules { map.insert(name.to_string(), rules.to_v3_json()); } _ => { - map.insert(name.to_string(), sub_category.to_v3_json()); + let value = sub_category.to_v3_json(); + if let Some(values) = value.as_object() { + if !values.is_empty() { + map.insert(name.to_string(), value); + } + } } } map @@ -1749,15 +1763,32 @@ mod tests { })); } + #[test] + fn loads_v2_header_matching_rules_with_correct_pluralisation() { + let matching_rules_json = Value::from_str(r#"{"matchingRules": { + "$.headers.HEADERY": {"match": "include", "value": "ValueA"} + }}"#).unwrap(); + + let matching_rules = matchers_from_json(&matching_rules_json, &None).unwrap(); + + expect!(matching_rules.rules.iter()).to_not(be_empty()); + expect!(matching_rules.categories()).to(be_equal_to(hashset!{ Category::HEADER })); + expect!(matching_rules.rules_for_category("header")).to(be_some().value(MatchingRuleCategory { + name: "header".into(), + rules: hashmap!{ DocPath::new_unwrap("HEADERY") => RuleList { rules: vec![ + MatchingRule::Include("ValueA".to_string()) ], rule_logic: RuleLogic::And, cascaded: false } } + })); + } + #[test] fn load_from_v2_map_supports_headers_and_query_parameters_in_encoded_format() { let matching_rules_json = json!({ "$.query.Q1": { "match": "regex", "regex": "1" }, "$.query.x-test": { "match": "regex", "regex": "2" }, "$.query['x-test-2']": { "match": "regex", "regex": "3" }, - "$.header.HEADERY": { "match": "regex", "regex": "4" }, - "$.header.x-test": { "match": "regex", "regex": "5" }, - "$.header['x-test-2']": { "match": "regex", "regex": "6" } + "$.headers.HEADERY": { "match": "regex", "regex": "4" }, + "$.headers.x-test": { "match": "regex", "regex": "5" }, + "$.headers['x-test-2']": { "match": "regex", "regex": "6" } }); let matching_rules_map = matching_rules_json.as_object().unwrap(); @@ -1896,15 +1927,16 @@ mod tests { "header" => { "item1" => [ MatchingRule::Regex("5".to_string()) ], "$['principal_identifier[account_id]']" => [ MatchingRule::Regex("\\w+".to_string()) ] - } + }, + "metadata" => {} }; } it "generates V2 matcher format" { pretty_assertions::assert_eq!(matchers.to_v2_json().to_string(), "{\"$.body.a.b\":{\"match\":\"type\"},\ - \"$.header.item1\":{\"match\":\"regex\",\"regex\":\"5\"},\ - \"$.header['principal_identifier[account_id]']\":{\"match\":\"regex\",\"regex\":\"\\\\w+\"},\ + \"$.headers.item1\":{\"match\":\"regex\",\"regex\":\"5\"},\ + \"$.headers['principal_identifier[account_id]']\":{\"match\":\"regex\",\"regex\":\"\\\\w+\"},\ \"$.path\":{\"match\":\"regex\",\"regex\":\"/path/\\\\d+\"},\ \"$.query.a\":{\"match\":\"regex\",\"regex\":\"\\\\w+\"},\ \"$.query['principal_identifier[account_id]']\":{\"match\":\"regex\",\"regex\":\"\\\\w+\"}\ @@ -2390,10 +2422,10 @@ mod tests { let json = matchers_to_json(&matching_rules, &PactSpecification::V2); assert_eq!(json, json!({ - "$.header.A": { + "$.headers.A": { "match": "type" }, - "$.header['se-token']": { + "$.headers['se-token']": { "match": "type" }, "$.query.A": { diff --git a/rust/pact_verifier/CHANGELOG.md b/rust/pact_verifier/CHANGELOG.md index 232ce639e..333ba20ef 100644 --- a/rust/pact_verifier/CHANGELOG.md +++ b/rust/pact_verifier/CHANGELOG.md @@ -1,5 +1,17 @@ To generate the log, run `git log --pretty='* %h - %s (%an, %ad)' TAGNAME..HEAD .` replacing TAGNAME and HEAD as appropriate. +# 1.2.4 - Bugfix Release + +* 978677cc - chore: Upgrade pact_matching to 1.2.6 (Ronald Holshausen, Tue Aug 13 15:27:49 2024 +1000) +* 9a7eef75 - chore: Upgrade pact_models to 1.2.4 (Ronald Holshausen, Tue Aug 13 11:51:06 2024 +1000) +* ae7d2a9c - fix(pact_verifier): Plugin feature was not enabled in the verifier (Ronald Holshausen, Tue Aug 13 11:13:51 2024 +1000) +* 80b7bb58 - fix(pact_verifier): Provider state values should be passed to any plugins under a providerState key (Ronald Holshausen, Wed Aug 7 16:06:54 2024 +1000) +* bcf4db6d - chore: Upgrade pact_models to 1.2.3 (Ronald Holshausen, Tue Aug 6 11:06:22 2024 +1000) +* 111a18cd - Feat(pact_consumer): Upgrade pact_mock_server to the new 2.0.0 version (Ronald Holshausen, Thu Jul 18 17:12:55 2024 +1000) +* 56c953b4 - chore: Upgrade pact_consumer to 1.2.3 (Ronald Holshausen, Wed Jul 17 15:28:49 2024 +1000) +* 25fd9c56 - chore: Update release script (Ronald Holshausen, Wed Jul 17 15:12:37 2024 +1000) +* c8d297f2 - bump version to 1.2.4 (Ronald Holshausen, Wed Jul 17 15:12:16 2024 +1000) + # 1.2.3 - Bugfix Release * bb9fc1be - chore: Upgrade pact_matching to 1.2.5 (Ronald Holshausen, Wed Jul 17 14:34:04 2024 +1000) diff --git a/rust/pact_verifier/Cargo.toml b/rust/pact_verifier/Cargo.toml index f1a78062d..d566503d5 100644 --- a/rust/pact_verifier/Cargo.toml +++ b/rust/pact_verifier/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pact_verifier" -version = "1.2.4" +version = "1.2.5" authors = ["Ronald Holshausen "] edition = "2021" description = "Pact-Rust support library that implements provider verification functions" @@ -18,7 +18,7 @@ exclude = [ default = ["datetime", "xml", "plugins", "multipart"] datetime = ["pact_models/datetime", "pact-plugin-driver?/datetime", "pact_matching/datetime"] # Support for date/time matchers and expressions xml = ["pact_models/xml", "pact-plugin-driver?/xml", "pact_matching/xml"] # support for matching XML documents -plugins = ["dep:pact-plugin-driver"] +plugins = ["dep:pact-plugin-driver", "pact_matching/plugins"] multipart = ["pact_matching/multipart"] # suport for MIME multipart bodies [dependencies] @@ -36,8 +36,8 @@ lazy_static = "1.4.0" maplit = "1.0.2" mime = "0.3.17" pact_matching = { version = "~2.0.0-beta", path = "../pact_matching", default-features = false } -pact_models = { version = "~1.2.2", default-features = false } -pact-plugin-driver = { version = "~0.7.0", optional = true, default-features = false } +pact_models = { version = "~1.2.4", default-features = false } +pact-plugin-driver = { version = "~0.7.1", optional = true, default-features = false } regex = "1.10.4" reqwest = { version = "0.12.3", default-features = false, features = ["rustls-tls-native-roots", "blocking", "json"] } serde = "1.0.197" diff --git a/rust/pact_verifier/src/lib.rs b/rust/pact_verifier/src/lib.rs index ec32a63c7..85360fd0b 100644 --- a/rust/pact_verifier/src/lib.rs +++ b/rust/pact_verifier/src/lib.rs @@ -38,7 +38,7 @@ use pact_models::v4::interaction::V4Interaction; #[cfg(feature = "plugins")] use pact_plugin_driver::verification::{InteractionVerificationData, InteractionVerificationDetails}; use regex::Regex; use reqwest::Client; -use serde_json::Value; +use serde_json::{Map, Value}; #[cfg(feature = "plugins")] use serde_json::json; use tracing::{debug, debug_span, error, info, Instrument, instrument, trace, warn}; @@ -518,9 +518,11 @@ async fn verify_interaction_using_transport<'a, F: RequestFilterExecutor>( context.insert("port".to_string(), json!(port)); } + let mut psc = Map::new(); for (k, v) in config { - context.insert(k.to_string(), v.clone()); + psc.insert(k.to_string(), v.clone()); } + context.insert("providerState".to_string(), Value::Object(psc)); // Get plugin to prepare the request data let v4_interaction = interaction.as_v4().unwrap(); diff --git a/rust/pact_verifier_cli/CHANGELOG.md b/rust/pact_verifier_cli/CHANGELOG.md index a0c0c286e..8d908aa1e 100644 --- a/rust/pact_verifier_cli/CHANGELOG.md +++ b/rust/pact_verifier_cli/CHANGELOG.md @@ -1,5 +1,24 @@ To generate the log, run `git log --pretty='* %h - %s (%an, %ad)' TAGNAME..HEAD .` replacing TAGNAME and HEAD as appropriate. +# 1.1.4 - Bugfix Release + +* fa02c30b - chore: Upgrade pact_verifier to 1.2.4 (Ronald Holshausen, Tue Aug 13 15:42:48 2024 +1000) +* f50454ff - chore: Upgrade test dependencies (Ronald Holshausen, Tue Aug 13 11:54:59 2024 +1000) +* 9a7eef75 - chore: Upgrade pact_models to 1.2.4 (Ronald Holshausen, Tue Aug 13 11:51:06 2024 +1000) +* bcf4db6d - chore: Upgrade pact_models to 1.2.3 (Ronald Holshausen, Tue Aug 6 11:06:22 2024 +1000) +* 4257ed1e - chore: Upgrade pact_verifier to 1.2.3 (Ronald Holshausen, Wed Jul 17 15:19:58 2024 +1000) +* fd9ff70a - chore: Upgrade pact_models to 1.2.2 (Ronald Holshausen, Wed Jul 17 11:15:34 2024 +1000) +* 5ba47b96 - docs(pact_verifier_cli): Update README with returning values from provider state callbacks #441 (Ronald Holshausen, Thu Jul 11 15:52:55 2024 +1000) +* f03cd0d3 - feat(pact_verifier_cli): Parse consumer version selector JSON when evaluating CLI args so errors are reported earlier (Ronald Holshausen, Wed Jul 10 12:13:11 2024 +1000) +* de31b4ea - fix(pact_verifier_cli): Allow transport base-paths to be defined from the CLI #418 (Ronald Holshausen, Mon Jul 8 17:19:37 2024 +1000) +* a5ba0cb8 - doc(pact_verifier_cli): Update Rust docs from README content #418 (Ronald Holshausen, Mon Jul 8 16:37:48 2024 +1000) +* a830e491 - doc(pact_verifier_cli): Fix grammar #418 (Ronald Holshausen, Mon Jul 8 16:27:57 2024 +1000) +* 8cc4c148 - doc(pact_verifier_cli): Update docs for verifying mixed V4 Pacts #418 (Ronald Holshausen, Mon Jul 8 16:26:00 2024 +1000) +* bab814c8 - doc(pact_verifier_cli): Fix grammar #418 (Ronald Holshausen, Mon Jul 8 15:43:21 2024 +1000) +* fbb7825d - doc(pact_verifier_cli): Add some emphasis to example values #418 (Ronald Holshausen, Mon Jul 8 15:41:25 2024 +1000) +* 4775fdfd - doc(pact_verifier_cli): Update the CLI docs to explain the provider state calls #418 (Ronald Holshausen, Mon Jul 8 15:25:23 2024 +1000) +* 37bc38f1 - bump version to 1.1.4 (Ronald Holshausen, Fri Jun 14 11:51:24 2024 +1000) + # 1.1.3 - Feature + Bugfix release * dad482f5 - chore: Upgrade pact_verifier to 1.2.2 (Ronald Holshausen, Fri Jun 14 11:21:54 2024 +1000) diff --git a/rust/pact_verifier_cli/Cargo.toml b/rust/pact_verifier_cli/Cargo.toml index f6b6d4b77..e4315778f 100644 --- a/rust/pact_verifier_cli/Cargo.toml +++ b/rust/pact_verifier_cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pact_verifier_cli" -version = "1.1.4" +version = "1.1.5" authors = ["Ronald Holshausen "] edition = "2021" description = "Standalone pact verifier for provider pact verification" @@ -30,8 +30,8 @@ junit-report = { version = "0.8.3", optional = true } lazy_static = "1.5.0" log = "0.4.20" maplit = "1.0.2" -pact_models = { version = "~1.2.2", default-features = false } -pact_verifier = { version = "~1.2.3", path = "../pact_verifier", default-features = false } +pact_models = { version = "~1.2.4", default-features = false } +pact_verifier = { version = "~1.2.4", path = "../pact_verifier", default-features = false } regex = "1.10.2" reqwest = { version = "0.12.4", default-features = false, features = ["rustls-tls-native-roots", "blocking", "json"] } serde_json = "1.0.108" @@ -45,5 +45,5 @@ tracing-subscriber = { version = "0.3.18", features = ["env-filter", "tracing-lo [dev-dependencies] expectest = "0.12.0" -rstest = "0.21.0" +rstest = "0.22.0" trycmd = "0.15.0"