From 4bb1be918e0d5be3ef22ea9bd8a4a810a8a3235a Mon Sep 17 00:00:00 2001 From: Augustus Mayo Date: Thu, 13 Mar 2025 15:58:53 -0500 Subject: [PATCH 1/4] Initial basic support for includes --- Cargo.lock | 723 +++++++++--------- Cargo.toml | 4 +- rfd-data/src/content/asciidoc.rs | 161 +++- rfd-github/src/ext.rs | 7 + rfd-github/src/lib.rs | 21 +- rfd-processor/src/content/mod.rs | 25 +- rfd-processor/src/rfd.rs | 5 + .../src/updater/copy_images_to_storage.rs | 2 +- rfd-processor/src/updater/mod.rs | 3 + rfd-processor/src/updater/process_includes.rs | 67 ++ 10 files changed, 603 insertions(+), 415 deletions(-) create mode 100644 rfd-processor/src/updater/process_includes.rs diff --git a/Cargo.lock b/Cargo.lock index aa0b0bd9..24d81b23 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,18 +17,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.3" @@ -111,9 +99,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.95" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" [[package]] name = "arraydeque" @@ -169,9 +157,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.85" +version = "0.1.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" +checksum = "d556ec1359574147ec0c4fc5eb525f3f23263a592b1a9c07e0a75b427de55c97" dependencies = [ "proc-macro2", "quote", @@ -225,9 +213,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "bb97d56060ee67d285efb8001fec9d2a4c710c32efd2e14b5cbb5ba71930fc2d" [[package]] name = "bb8" @@ -249,9 +237,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" dependencies = [ "serde", ] @@ -279,9 +267,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" dependencies = [ "serde", ] @@ -297,9 +285,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.10" +version = "1.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" +checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" dependencies = [ "shlex", ] @@ -318,9 +306,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.39" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" +checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" dependencies = [ "android-tzdata", "iana-time-zone", @@ -328,14 +316,14 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.6", + "windows-link", ] [[package]] name = "clap" -version = "4.5.27" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796" +checksum = "6088f3ae8c3608d19260cd7445411865a485688711b78b5be70d78cd96136f83" dependencies = [ "clap_builder", "clap_derive", @@ -343,9 +331,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.27" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7" +checksum = "22a7ef7f676155edfb82daa97f99441f3ebf4a58d5e32f295a56259f1b6facc8" dependencies = [ "anstream", "anstyle", @@ -355,9 +343,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.24" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" +checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" dependencies = [ "heck", "proc-macro2", @@ -379,9 +367,9 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "config" -version = "0.15.7" +version = "0.15.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e26695492a475c4a091cfda61446d5ba01aac2e1dfbcd27a12fdd11aa2e32596" +checksum = "595aae20e65c3be792d05818e8c63025294ac3cb7e200f11459063a352a6ef80" dependencies = [ "async-trait", "convert_case", @@ -580,11 +568,11 @@ dependencies = [ [[package]] name = "diesel" -version = "2.2.7" +version = "2.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04001f23ba8843dc315804fa324000376084dfb1c30794ff68dd279e6e5696d5" +checksum = "470eb10efc8646313634c99bb1593f402a6434cbd86e266770c6e39219adb86a" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "byteorder", "chrono", "diesel_derives", @@ -597,9 +585,9 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.2.3" +version = "2.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f2c3de51e2ba6bf2a648285696137aaf0f5f487bcbea93972fe8a364e131a4" +checksum = "a93958254b70bea63b4187ff73d10180599d9d8d177071b7f91e6da4e0c0ad55" dependencies = [ "diesel_table_macro_syntax", "dsl_auto_type", @@ -745,11 +733,11 @@ dependencies = [ "form_urlencoded", "futures", "hostname 0.4.0", - "http 1.2.0", + "http 1.3.1", "http-body-util", "hyper 1.6.0", "hyper-util", - "indexmap 2.7.1", + "indexmap 2.8.0", "multer", "openapiv3", "paste", @@ -769,7 +757,7 @@ dependencies = [ "slog-bunyan", "slog-json", "slog-term", - "thiserror 2.0.11", + "thiserror 2.0.12", "tokio", "tokio-rustls 0.25.0", "toml", @@ -785,7 +773,7 @@ dependencies = [ "async-trait", "base64 0.22.1", "dropshot", - "http 1.2.0", + "http 1.3.1", "tracing", ] @@ -810,13 +798,13 @@ dependencies = [ "dropshot", "hex", "hmac", - "http 1.2.0", + "http 1.3.1", "hyper 1.6.0", "schemars", "serde", "serde_json", "sha2", - "thiserror 2.0.11", + "thiserror 2.0.12", "tracing", ] @@ -851,15 +839,15 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.17" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" [[package]] name = "either" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" dependencies = [ "serde", ] @@ -875,9 +863,9 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" @@ -1060,7 +1048,7 @@ checksum = "7530ee92a7e9247c3294ae1b84ea98474dbc27563c49a14d3938e816499bf38f" dependencies = [ "base64 0.22.1", "chrono", - "http 1.2.0", + "http 1.3.1", "http-body-util", "hyper 1.6.0", "hyper-util", @@ -1147,7 +1135,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.7.1", + "indexmap 2.8.0", "slab", "tokio", "tokio-util", @@ -1156,17 +1144,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" +checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" dependencies = [ "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http 1.2.0", - "indexmap 2.7.1", + "http 1.3.1", + "indexmap 2.8.0", "slab", "tokio", "tokio-util", @@ -1184,9 +1172,6 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", -] [[package]] name = "hashbrown" @@ -1201,11 +1186,11 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.2", ] [[package]] @@ -1216,9 +1201,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" +checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e" [[package]] name = "hex" @@ -1279,9 +1264,9 @@ dependencies = [ [[package]] name = "http" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ "bytes", "fnv", @@ -1306,27 +1291,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.2.0", + "http 1.3.1", ] [[package]] name = "http-body-util" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", - "futures-util", - "http 1.2.0", + "futures-core", + "http 1.3.1", "http-body 1.0.1", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "httpdate" @@ -1367,8 +1352,8 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.7", - "http 1.2.0", + "h2 0.4.8", + "http 1.3.1", "http-body 1.0.1", "httparse", "httpdate", @@ -1400,14 +1385,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", - "http 1.2.0", + "http 1.3.1", "hyper 1.6.0", "hyper-util", - "rustls 0.23.22", + "rustls 0.23.23", "rustls-native-certs", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.1", + "tokio-rustls 0.26.2", "tower-service", "webpki-roots 0.26.8", ] @@ -1421,7 +1406,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "hyper 1.6.0", "pin-project-lite", @@ -1612,9 +1597,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" +checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" dependencies = [ "equivalent", "hashbrown 0.15.2", @@ -1641,9 +1626,9 @@ checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "is-terminal" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19b23d53f35ce9f56aebc7d1bb4e6ac1e9c0db7ac85c8d1760c04379edced37" +checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ "hermit-abi", "libc", @@ -1658,9 +1643,9 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "iso8601" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924e5d73ea28f59011fec52a0d12185d496a9b075d360657aed2a5707f701153" +checksum = "c5c177cff824ab21a6f41079a4c401241c4e8be14f316c4c6b07d5fca351c98d" dependencies = [ "nom", ] @@ -1676,9 +1661,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "js-sys" @@ -1703,28 +1688,14 @@ dependencies = [ [[package]] name = "jsonwebtoken" -version = "8.3.0" +version = "9.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +checksum = "5a87cc7a48537badeae96744432de36f4be2b4a34a05a5ef32e9dd8a1c169dde" dependencies = [ - "base64 0.21.7", - "pem 1.1.1", - "ring 0.16.20", - "serde", - "serde_json", - "simple_asn1", -] - -[[package]] -name = "jsonwebtoken" -version = "9.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" -dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "js-sys", - "pem 3.0.4", - "ring 0.17.8", + "pem", + "ring", "serde", "serde_json", "simple_asn1", @@ -1736,14 +1707,14 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin 0.9.8", + "spin", ] [[package]] name = "libc" -version = "0.2.169" +version = "0.2.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" [[package]] name = "libm" @@ -1757,21 +1728,21 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "libc", ] [[package]] name = "linux-raw-sys" -version = "0.4.15" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" +checksum = "6db9c683daf087dc577b7506e9695b3d556a9f3849903fa28186283afd6809e9" [[package]] name = "litemap" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" [[package]] name = "lock_api" @@ -1785,9 +1756,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.25" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" dependencies = [ "serde", ] @@ -1848,11 +1819,11 @@ dependencies = [ "futures", "futures-io", "iso8601", - "jsonwebtoken 9.3.0", + "jsonwebtoken", "log", "meilisearch-index-setting-macro", "pin-project-lite", - "reqwest 0.12.12", + "reqwest 0.12.14", "serde", "serde_json", "thiserror 1.0.69", @@ -1906,17 +1877,11 @@ dependencies = [ "unicase", ] -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" +checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" dependencies = [ "adler2", ] @@ -1967,11 +1932,11 @@ dependencies = [ "bytes", "encoding_rs", "futures-util", - "http 1.2.0", + "http 1.3.1", "httparse", "memchr", "mime", - "spin 0.9.8", + "spin", "version_check", ] @@ -1997,12 +1962,11 @@ dependencies = [ [[package]] name = "nom" -version = "7.1.3" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" dependencies = [ "memchr", - "minimal-lexical", ] [[package]] @@ -2118,28 +2082,28 @@ dependencies = [ [[package]] name = "octorust" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b68b0e407b85431ea87ee51b3d977c2490bb0601a8c251bc4c9ce567350334" +checksum = "2c488b641cf652f023d371f6d472191bf3b3fd8075a11f274e95d4fe6e5e3878" dependencies = [ "async-recursion", "async-trait", "bytes", "chrono", "dirs 3.0.2", - "http 1.2.0", - "jsonwebtoken 8.3.0", + "http 1.3.1", + "jsonwebtoken", "log", "mime", "parse_link_header", - "pem 1.1.1", + "pem", "percent-encoding", - "reqwest 0.12.12", + "reqwest 0.12.14", "reqwest-conditional-middleware", "reqwest-middleware", "reqwest-retry", "reqwest-tracing", - "ring 0.16.20", + "ring", "schemars", "serde", "serde_json", @@ -2152,9 +2116,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.2" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "cde51589ab56b20a6f686b2c68f7a0bd6add753d697abf720d63f8db3ab7b1ad" [[package]] name = "openapiv3" @@ -2162,7 +2126,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc02deea53ffe807708244e5914f6b099ad7015a207ee24317c22112e17d9c5c" dependencies = [ - "indexmap 2.7.1", + "indexmap 2.8.0", "serde", "serde_json", ] @@ -2197,9 +2161,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "owo-colors" -version = "4.1.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb37767f6569cd834a413442455e0f066d0d522de8630436e2a1761d9726ba56" +checksum = "1036865bb9422d3300cf723f657c2851d0e9ab12567854b1f4eba3d77decf564" [[package]] name = "parking_lot" @@ -2244,7 +2208,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.8", + "redox_syscall 0.5.10", "smallvec", "windows-targets 0.52.6", ] @@ -2293,18 +2257,9 @@ checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "pem" -version = "1.1.1" +version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - -[[package]] -name = "pem" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +checksum = "38af38e8470ac9dee3ce1bae1af9c1671fffc44ddfd8bd1d0a3445bf349a8ef3" dependencies = [ "base64 0.22.1", "serde", @@ -2332,7 +2287,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror 2.0.11", + "thiserror 2.0.12", "ucd-trie", ] @@ -2411,9 +2366,9 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ "zerocopy", ] @@ -2456,9 +2411,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" dependencies = [ "unicode-ident", ] @@ -2466,7 +2421,7 @@ dependencies = [ [[package]] name = "progenitor" version = "0.9.1" -source = "git+https://github.com/oxidecomputer/progenitor#8d130e72db63c46438e6ea56add88381b2d979ba" +source = "git+https://github.com/oxidecomputer/progenitor#87b0f450f30b764982075e6d7f666e292bbe526c" dependencies = [ "progenitor-client", "progenitor-impl", @@ -2476,12 +2431,12 @@ dependencies = [ [[package]] name = "progenitor-client" version = "0.9.1" -source = "git+https://github.com/oxidecomputer/progenitor#8d130e72db63c46438e6ea56add88381b2d979ba" +source = "git+https://github.com/oxidecomputer/progenitor#87b0f450f30b764982075e6d7f666e292bbe526c" dependencies = [ "bytes", "futures-core", "percent-encoding", - "reqwest 0.12.12", + "reqwest 0.12.14", "serde", "serde_json", "serde_urlencoded", @@ -2490,11 +2445,11 @@ dependencies = [ [[package]] name = "progenitor-impl" version = "0.9.1" -source = "git+https://github.com/oxidecomputer/progenitor#8d130e72db63c46438e6ea56add88381b2d979ba" +source = "git+https://github.com/oxidecomputer/progenitor#87b0f450f30b764982075e6d7f666e292bbe526c" dependencies = [ "heck", - "http 1.2.0", - "indexmap 2.7.1", + "http 1.3.1", + "indexmap 2.8.0", "openapiv3", "proc-macro2", "quote", @@ -2503,7 +2458,7 @@ dependencies = [ "serde", "serde_json", "syn", - "thiserror 2.0.11", + "thiserror 2.0.12", "typify", "unicode-ident", ] @@ -2511,7 +2466,7 @@ dependencies = [ [[package]] name = "progenitor-macro" version = "0.9.1" -source = "git+https://github.com/oxidecomputer/progenitor#8d130e72db63c46438e6ea56add88381b2d979ba" +source = "git+https://github.com/oxidecomputer/progenitor#87b0f450f30b764982075e6d7f666e292bbe526c" dependencies = [ "openapiv3", "proc-macro2", @@ -2536,9 +2491,9 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.22", + "rustls 0.23.23", "socket2", - "thiserror 2.0.11", + "thiserror 2.0.12", "tokio", "tracing", ] @@ -2552,12 +2507,12 @@ dependencies = [ "bytes", "getrandom 0.2.15", "rand", - "ring 0.17.8", + "ring", "rustc-hash", - "rustls 0.23.22", + "rustls 0.23.23", "rustls-pki-types", "slab", - "thiserror 2.0.11", + "thiserror 2.0.12", "tinyvec", "tracing", "web-time", @@ -2565,9 +2520,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" +checksum = "e46f3055866785f6b92bc6164b76be02ca8f2eb4b002c0354b28cf4c119e5944" dependencies = [ "cfg_aliases", "libc", @@ -2579,9 +2534,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] @@ -2638,11 +2593,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.8" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", ] [[package]] @@ -2664,7 +2619,7 @@ checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" dependencies = [ "getrandom 0.2.15", "libredox", - "thiserror 2.0.11", + "thiserror 2.0.12", ] [[package]] @@ -2764,16 +2719,16 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.12" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" +checksum = "989e327e510263980e231de548a33e63d34962d29ae61b467389a1a09627a254" dependencies = [ "base64 0.22.1", "bytes", "futures-core", "futures-util", - "h2 0.4.7", - "http 1.2.0", + "h2 0.4.8", + "http 1.3.1", "http-body 1.0.1", "http-body-util", "hyper 1.6.0", @@ -2788,7 +2743,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.22", + "rustls 0.23.23", "rustls-pemfile 2.2.0", "rustls-pki-types", "serde", @@ -2796,7 +2751,7 @@ dependencies = [ "serde_urlencoded", "sync_wrapper 1.0.2", "tokio", - "tokio-rustls 0.26.1", + "tokio-rustls 0.26.2", "tokio-util", "tower", "tower-service", @@ -2816,21 +2771,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f67ad7fdf5c0a015763fcd164bee294b13fb7b6f89f1b55961d40f00c3e32d6b" dependencies = [ "async-trait", - "http 1.2.0", - "reqwest 0.12.12", + "http 1.3.1", + "reqwest 0.12.14", "reqwest-middleware", ] [[package]] name = "reqwest-middleware" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1ccd3b55e711f91a9885a2fa6fbbb2e39db1776420b062efc058c6410f7e5e3" +checksum = "64e8975513bd9a7a43aad01030e79b3498e05db14e9d945df6483e8cf9b8c4c4" dependencies = [ "anyhow", "async-trait", - "http 1.2.0", - "reqwest 0.12.12", + "http 1.3.1", + "reqwest 0.12.14", "serde", "thiserror 1.0.69", "tower-service", @@ -2846,10 +2801,10 @@ dependencies = [ "async-trait", "futures", "getrandom 0.2.15", - "http 1.2.0", + "http 1.3.1", "hyper 1.6.0", "parking_lot 0.11.2", - "reqwest 0.12.12", + "reqwest 0.12.14", "reqwest-middleware", "retry-policies", "thiserror 1.0.69", @@ -2860,16 +2815,16 @@ dependencies = [ [[package]] name = "reqwest-tracing" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73e6153390585f6961341b50e5a1931d6be6dee4292283635903c26ef9d980d2" +checksum = "d9c88a8d9cfe3319b5adc10f3ffc3db75c7346837a1f857f8269f6361f3b2744" dependencies = [ "anyhow", "async-trait", "getrandom 0.2.15", - "http 1.2.0", + "http 1.3.1", "matchit", - "reqwest 0.12.12", + "reqwest 0.12.14", "reqwest-middleware", "tracing", ] @@ -2901,9 +2856,9 @@ dependencies = [ "dropshot-authorization-header 0.1.0", "dropshot-verified-body", "hex", - "http 1.2.0", + "http 1.3.1", "hyper 1.6.0", - "jsonwebtoken 9.3.0", + "jsonwebtoken", "meilisearch-sdk", "mockall", "newtype-uuid", @@ -2913,14 +2868,14 @@ dependencies = [ "rand", "rand_core", "regex", - "reqwest 0.12.12", + "reqwest 0.12.14", "reqwest-middleware", "reqwest-retry", "reqwest-tracing", "rfd-data", "rfd-github", "rfd-model", - "ring 0.17.8", + "ring", "rsa", "schemars", "secrecy", @@ -2932,7 +2887,7 @@ dependencies = [ "slog", "slog-async", "tap", - "thiserror 2.0.11", + "thiserror 2.0.12", "tokio", "toml", "trace-request", @@ -2958,11 +2913,11 @@ dependencies = [ "dirs 6.0.0", "futures", "itertools", - "jsonwebtoken 9.3.0", + "jsonwebtoken", "oauth2", "owo-colors", "progenitor-client", - "reqwest 0.12.12", + "reqwest 0.12.14", "rfd-sdk", "schemars", "serde", @@ -2981,7 +2936,7 @@ dependencies = [ "rfd-model", "schemars", "serde", - "thiserror 2.0.11", + "thiserror 2.0.12", "tracing", ] @@ -2992,12 +2947,12 @@ dependencies = [ "async-trait", "base64 0.22.1", "chrono", - "http 1.2.0", + "http 1.3.1", "octorust", "regex", "rfd-data", "rfd-model", - "thiserror 2.0.11", + "thiserror 2.0.12", "tracing", ] @@ -3026,7 +2981,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "thiserror 2.0.11", + "thiserror 2.0.12", "tokio", "tracing", "uuid", @@ -3047,7 +3002,7 @@ dependencies = [ "google-storage1", "hex", "hmac", - "http 1.2.0", + "http 1.3.1", "md-5", "meilisearch-sdk", "mime_guess", @@ -3055,7 +3010,7 @@ dependencies = [ "octorust", "parse-rfd", "regex", - "reqwest 0.12.12", + "reqwest 0.12.14", "reqwest-middleware", "reqwest-retry", "reqwest-tracing", @@ -3065,7 +3020,7 @@ dependencies = [ "rsa", "serde", "tap", - "thiserror 2.0.11", + "thiserror 2.0.12", "tokio", "tracing", "tracing-appender", @@ -3081,7 +3036,7 @@ version = "0.1.0" dependencies = [ "chrono", "progenitor-client", - "reqwest 0.12.12", + "reqwest 0.12.14", "schemars", "serde", "serde_json", @@ -3090,31 +3045,15 @@ dependencies = [ [[package]] name = "ring" -version = "0.16.20" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", "getrandom 0.2.15", "libc", - "spin 0.9.8", - "untrusted 0.9.0", + "untrusted", "windows-sys 0.52.0", ] @@ -3125,16 +3064,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64 0.21.7", - "bitflags 2.8.0", + "bitflags 2.9.0", "serde", "serde_derive", ] [[package]] name = "rsa" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519" +checksum = "78928ac1ed176a5ca1d17e578a1825f3d81ca54cf41053a592584b020cfd691b" dependencies = [ "const-oid", "digest", @@ -3170,9 +3109,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustc_version" @@ -3198,11 +3137,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.44" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +checksum = "f7178faa4b75a30e269c71e61c353ce2748cf3d76f0c44c393f4e60abf49b825" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "errno", "libc", "linux-raw-sys", @@ -3216,7 +3155,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", - "ring 0.17.8", + "ring", "rustls-webpki 0.101.7", "sct", ] @@ -3228,7 +3167,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" dependencies = [ "log", - "ring 0.17.8", + "ring", "rustls-pki-types", "rustls-webpki 0.102.8", "subtle", @@ -3237,12 +3176,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.22" +version = "0.23.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb9263ab4eb695e42321db096e3b8fbd715a59b154d5c88d82db2175b681ba7" +checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" dependencies = [ "once_cell", - "ring 0.17.8", + "ring", "rustls-pki-types", "rustls-webpki 0.102.8", "subtle", @@ -3294,8 +3233,8 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", + "ring", + "untrusted", ] [[package]] @@ -3304,22 +3243,22 @@ version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ - "ring 0.17.8", + "ring", "rustls-pki-types", - "untrusted 0.9.0", + "untrusted", ] [[package]] name = "rustversion" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" +checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" [[package]] name = "ryu" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "same-file" @@ -3350,9 +3289,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.21" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" dependencies = [ "bytes", "chrono", @@ -3366,9 +3305,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.21" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" dependencies = [ "proc-macro2", "quote", @@ -3388,8 +3327,8 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", + "ring", + "untrusted", ] [[package]] @@ -3414,7 +3353,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "core-foundation 0.10.0", "core-foundation-sys", "libc", @@ -3433,27 +3372,27 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.217" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.217" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", @@ -3473,9 +3412,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.138" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "itoa", "memchr", @@ -3485,9 +3424,9 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" +checksum = "59fab13f937fa393d08645bf3a84bdfe86e296747b506ada67bb15f10f218b2a" dependencies = [ "itoa", "serde", @@ -3536,7 +3475,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.7.1", + "indexmap 2.8.0", "serde", "serde_derive", "serde_json", @@ -3562,7 +3501,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.7.1", + "indexmap 2.8.0", "itoa", "ryu", "serde", @@ -3639,7 +3578,7 @@ checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" dependencies = [ "num-bigint", "num-traits", - "thiserror 2.0.11", + "thiserror 2.0.12", "time", ] @@ -3709,9 +3648,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" [[package]] name = "socket2" @@ -3723,12 +3662,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - [[package]] name = "spin" version = "0.9.8" @@ -3788,9 +3721,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.96" +version = "2.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" dependencies = [ "proc-macro2", "quote", @@ -3867,9 +3800,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.16.0" +version = "3.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" +checksum = "2c317e0a526ee6120d8dabad239c8dadca62b24b6f168914bbbc8e2fb1f0e567" dependencies = [ "cfg-if", "fastrand", @@ -3907,11 +3840,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" dependencies = [ - "thiserror-impl 2.0.11", + "thiserror-impl 2.0.12", ] [[package]] @@ -3927,9 +3860,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", @@ -3948,9 +3881,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.37" +version = "0.3.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" +checksum = "dad298b01a40a23aac4580b67e3dbedb7cc8402f3592d7f49469de2ea4aecdd8" dependencies = [ "deranged", "itoa", @@ -3965,15 +3898,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "765c97a5b985b7c11d7bc27fa927dc4fe6af3a6dfb021d28deb60d3bf51e76ef" [[package]] name = "time-macros" -version = "0.2.19" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" +checksum = "e8093bc3e81c3bc5f7879de09619d06c9a5a5e45ca44dfeeb7225bae38005c5c" dependencies = [ "num-conv", "time-core", @@ -4000,9 +3933,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" +checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" dependencies = [ "tinyvec_macros", ] @@ -4015,9 +3948,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.43.0" +version = "1.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" +checksum = "9975ea0f48b5aa3972bf2d888c238182458437cc2a19374b81b25cdf1023fb3a" dependencies = [ "backtrace", "bytes", @@ -4065,11 +3998,11 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" +checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ - "rustls 0.23.22", + "rustls 0.23.23", "tokio", ] @@ -4088,9 +4021,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" dependencies = [ "serde", "serde_spanned", @@ -4109,11 +4042,11 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.23" +version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02a8b472d1a3d7c18e2d61a489aee3453fd9031c33e4f55bd533f4a7adca1bee" +checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ - "indexmap 2.7.1", + "indexmap 2.8.0", "serde", "serde_spanned", "toml_datetime", @@ -4165,7 +4098,7 @@ name = "trace-request" version = "0.1.0" dependencies = [ "dropshot", - "http 1.2.0", + "http 1.3.1", "proc-macro2", "quote", "syn", @@ -4281,15 +4214,14 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "typify" version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e03ba3643450cfd95a1aca2e1938fef63c1c1994489337998aff4ad771f21ef8" +source = "git+https://github.com/oxidecomputer/typify#747a5401a7665bc83d35824470663673d01a9fdf" dependencies = [ "typify-impl", "typify-macro", @@ -4298,8 +4230,7 @@ dependencies = [ [[package]] name = "typify-impl" version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bce48219a2f3154aaa2c56cbf027728b24a3c8fe0a47ed6399781de2b3f3eeaf" +source = "git+https://github.com/oxidecomputer/typify#747a5401a7665bc83d35824470663673d01a9fdf" dependencies = [ "heck", "log", @@ -4311,15 +4242,14 @@ dependencies = [ "serde", "serde_json", "syn", - "thiserror 2.0.11", + "thiserror 2.0.12", "unicode-ident", ] [[package]] name = "typify-macro" version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b5780d745920ed73c5b7447496a9b5c42ed2681a9b70859377aec423ecf02b" +source = "git+https://github.com/oxidecomputer/typify#747a5401a7665bc83d35824470663673d01a9fdf" dependencies = [ "proc-macro2", "quote", @@ -4346,9 +4276,9 @@ checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-segmentation" @@ -4368,12 +4298,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "untrusted" version = "0.9.0" @@ -4412,11 +4336,12 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.12.1" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3758f5e68192bb96cc8f9b7e2c2cfdabb435499a28499a42f8f984092adad4b" +checksum = "e0f540e3240398cce6128b64ba83fdbdd86129c16a3aa1a3a252efd66eb3d587" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.3.1", + "js-sys", "serde", "wasm-bindgen", ] @@ -4436,16 +4361,16 @@ dependencies = [ "dropshot-authorization-header 0.1.0 (git+https://github.com/oxidecomputer/v-api)", "google-cloudkms1", "hex", - "http 1.2.0", + "http 1.3.1", "http-body-util", "hyper 1.6.0", - "jsonwebtoken 9.3.0", + "jsonwebtoken", "newtype-uuid", "oauth2", "partial-struct", "rand", "rand_core", - "reqwest 0.12.12", + "reqwest 0.12.14", "rsa", "schemars", "secrecy", @@ -4454,7 +4379,7 @@ dependencies = [ "serde_urlencoded", "sha2", "tap", - "thiserror 2.0.11", + "thiserror 2.0.12", "tokio", "toml", "tracing", @@ -4500,7 +4425,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "thiserror 2.0.11", + "thiserror 2.0.12", "tracing", "uuid", ] @@ -4722,7 +4647,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] @@ -4750,34 +4675,39 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-link" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" + [[package]] name = "windows-registry" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ "windows-result", "windows-strings", - "windows-targets 0.52.6", + "windows-targets 0.53.0", ] [[package]] name = "windows-result" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +checksum = "06374efe858fab7e4f881500e6e86ec8bc28f9462c47e5a9941a0142ad86b189" dependencies = [ - "windows-targets 0.52.6", + "windows-link", ] [[package]] name = "windows-strings" -version = "0.1.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" dependencies = [ - "windows-result", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -4831,13 +4761,29 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "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", ] +[[package]] +name = "windows-targets" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -4850,6 +4796,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -4862,6 +4814,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -4874,12 +4832,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -4892,6 +4862,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -4904,6 +4880,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -4916,6 +4898,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -4928,11 +4916,17 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winnow" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e49d2d35d3fad69b39b94139037ecfb4f359f08958b9c11e7315ce770462419" +checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" dependencies = [ "memchr", ] @@ -4953,7 +4947,7 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", ] [[package]] @@ -4985,9 +4979,9 @@ dependencies = [ [[package]] name = "yaml-rust2" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a1a1c0bc9823338a3bdf8c61f994f23ac004c6fa32c08cd152984499b445e8d" +checksum = "232bdb534d65520716bef0bbb205ff8f2db72d807b19c0bc3020853b92a0cd4b" dependencies = [ "arraydeque", "encoding_rs", @@ -5039,14 +5033,14 @@ dependencies = [ "async-trait", "base64 0.22.1", "futures", - "http 1.2.0", + "http 1.3.1", "http-body-util", "hyper 1.6.0", "hyper-rustls 0.27.5", "hyper-util", "log", "percent-encoding", - "rustls 0.23.22", + "rustls 0.23.23", "rustls-pemfile 2.2.0", "seahash", "serde", @@ -5058,19 +5052,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.35" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6" dependencies = [ - "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.35" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154" dependencies = [ "proc-macro2", "quote", @@ -5079,18 +5072,18 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 163f86ee..798b23a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,7 @@ hmac = "0.12.1" http = "1.2.0" hyper = "1.6.0" itertools = "0.13.0" -jsonwebtoken = "9.3.0" +jsonwebtoken = "9" meilisearch-sdk = "0.27.1" md-5 = "0.10.6" mime_guess = "2.0.5" @@ -47,7 +47,7 @@ mockall = "0.13.1" newline-converter = "0.3.0" newtype-uuid = { version = "1.2.1", features = ["schemars08", "serde", "v4"] } oauth2 = { version = "4.4.2", default-features = false, features = ["rustls-tls"] } -octorust = "0.9.0" +octorust = "0.10.0" owo-colors = "4.1.0" partial-struct = { git = "https://github.com/oxidecomputer/partial-struct" } progenitor = { git = "https://github.com/oxidecomputer/progenitor" } diff --git a/rfd-data/src/content/asciidoc.rs b/rfd-data/src/content/asciidoc.rs index 89779429..e01ba30e 100644 --- a/rfd-data/src/content/asciidoc.rs +++ b/rfd-data/src/content/asciidoc.rs @@ -157,6 +157,39 @@ impl<'a> RfdAsciidoc<'a> { fn body(content: &str) -> Option<&str> { Self::title_pattern().splitn(content, 2).nth(1) } + + fn include_pattern() -> Regex { + Regex::new(r"(?m)^include::(.*)\[\]$").unwrap() + } + + pub fn includes(&'a self) -> Vec> { + Self::include_pattern() + .captures_iter(&self.resolved) + .map(|capture| { + let extracted = capture.extract::<1>(); + AsciidocInclude { + file: extracted.1[0], + replacement: extracted.0, + } + }) + .collect::>() + } +} + +#[derive(Debug, PartialEq)] +pub struct AsciidocInclude<'a> { + file: &'a str, + replacement: &'a str, +} + +impl<'a> AsciidocInclude<'a> { + pub fn name(&self) -> &str { + self.file + } + + pub fn perform_replacement(&self, body: &str, new_content: &str) -> String { + body.replace(self.replacement, new_content) + } } impl<'a> RfdDocument for RfdAsciidoc<'a> { @@ -197,36 +230,6 @@ impl<'a> RfdDocument for RfdAsciidoc<'a> { fn get_authors(&self) -> Option<&str> { Self::attr("authors", &self.resolved) - // // If an authors attribute is defined anywhere in the document, then it is the first choice - // // for the authors value - // if let Some(attr) = Self::attr("authors", &self.resolved) { - // Some(attr) - // } else { - // self.body().and_then(|body| { - // body.lines().nth(0).and_then(|first_line| { - // // If {authors} is found, instead search the header for an authors attribute - // if first_line == "{authors}" { - // Self::attr("authors", &self.resolved) - // } else { - // // Given that we are in a fallback case we need to be slightly picky on what - // // lines we allow. We require that the line at least include a *@*.* word to - // // try and filter out lines that are not actually author lines - // let author_fallback_pattern = - // Regex::new(r"^.*?([\S]+@[\S]+.[\S]+).*?$").unwrap(); - // let fallback_matches = author_fallback_pattern.is_match(first_line); - - // if fallback_matches { - // Some(first_line) - // } else { - // // If none of our attempts have found an author, we drop back to the - // // attribute lookup. Eventually all of this logic should be removed and only - // // the attribute version should be supported - // Self::attr("authors", &self.resolved) - // } - // } - // }) - // }) - // } } fn get_labels(&self) -> Option<&str> { @@ -970,4 +973,102 @@ This is the new body"#; rfd.update_body(&new_content).unwrap(); assert_eq!(expected, rfd.raw()); } + + #[test] + fn test_find_includes() { + let contents = r#":reproducible: +:showtitle: +:toc: left +:numbered: +:icons: font +:state: prediscussion +:revremark: State: {state} +:docdatetime: 2019-01-04 19:26:06 UTC +:localdatetime: 2019-01-04 19:26:06 UTC +:labels: label1, label2 + += RFD 123 Place +FirstName LastName + +include::sub_doc1.adoc[] +This is the new body + +include::sub_doc2.adoc[]"#; + let rfd = RfdAsciidoc::new(Cow::Borrowed(contents)).unwrap(); + let includes = rfd.includes(); + + let expected = vec![ + AsciidocInclude { + file: "sub_doc1.adoc", + replacement: "include::sub_doc1.adoc[]", + }, + AsciidocInclude { + file: "sub_doc2.adoc", + replacement: "include::sub_doc2.adoc[]", + }, + ]; + assert_eq!(expected, includes); + } + + #[test] + fn test_replace_include() { + let original = r#":reproducible: +:showtitle: +:toc: left +:numbered: +:icons: font +:state: prediscussion +:revremark: State: {state} +:docdatetime: 2019-01-04 19:26:06 UTC +:localdatetime: 2019-01-04 19:26:06 UTC +:labels: label1, label2 + += RFD 123 Place +FirstName LastName + +include::sub_doc1.adoc[] +This is the new body + +include::sub_doc1.adoc[] + +include::sub_doc2.adoc[]"#; + let include = AsciidocInclude { + file: "sub_doc1.adoc", + replacement: "include::sub_doc1.adoc[]", + }; + + let replacement_content = "Line 1 +Line 2 +Line 3"; + + let expected = r#":reproducible: +:showtitle: +:toc: left +:numbered: +:icons: font +:state: prediscussion +:revremark: State: {state} +:docdatetime: 2019-01-04 19:26:06 UTC +:localdatetime: 2019-01-04 19:26:06 UTC +:labels: label1, label2 + += RFD 123 Place +FirstName LastName + +Line 1 +Line 2 +Line 3 +This is the new body + +Line 1 +Line 2 +Line 3 + +include::sub_doc2.adoc[]"#; + + assert_eq!( + expected, + include.perform_replacement(original, replacement_content) + ); + } } diff --git a/rfd-github/src/ext.rs b/rfd-github/src/ext.rs index 82cadcc2..5611c36f 100644 --- a/rfd-github/src/ext.rs +++ b/rfd-github/src/ext.rs @@ -54,6 +54,7 @@ impl ReposExt for Repos { pub trait ContentFileExt { fn is_empty(&self) -> bool; fn decode(&self) -> Result, DecodeError>; + fn to_text(&self) -> Option; } impl ContentFileExt for ContentFile { @@ -66,6 +67,12 @@ impl ContentFileExt for ContentFile { .decode(self.content.replace('\n', "")) .map(|data| data.trim().to_vec()) } + + fn to_text(&self) -> Option { + self.decode() + .ok() + .and_then(|content| String::from_utf8(content).ok()) + } } trait SliceExt { diff --git a/rfd-github/src/lib.rs b/rfd-github/src/lib.rs index 076f17e3..973252e0 100644 --- a/rfd-github/src/lib.rs +++ b/rfd-github/src/lib.rs @@ -541,18 +541,25 @@ impl GitHubRfdLocation { }) } - /// Get a list of images that are store in this branch - pub async fn get_images( + /// Download the supporting documents that are within this RFD location + pub async fn download_supporting_documents( &self, client: &Client, rfd_number: &RfdNumber, ) -> Result, GitHubError> { let dir = rfd_number.repo_path(); - Self::get_images_internal(client, &self.owner, &self.repo, &self.commit, dir).await + Self::download_supporting_documents_internal( + client, + &self.owner, + &self.repo, + &self.commit, + dir, + ) + .await } #[instrument(skip(client, dir))] - fn get_images_internal<'a>( + fn download_supporting_documents_internal<'a>( client: &'a Client, owner: &'a String, repo: &'a String, @@ -575,8 +582,10 @@ impl GitHubRfdLocation { tracing::info!(file.path, file.type_, "Processing git entry"); if file.type_ == "dir" { - let images = - Self::get_images_internal(client, owner, repo, ref_, file.path).await?; + let images = Self::download_supporting_documents_internal( + client, owner, repo, ref_, file.path, + ) + .await?; for image in images { files.push(image) diff --git a/rfd-processor/src/content/mod.rs b/rfd-processor/src/content/mod.rs index 1d26d334..5d3caa19 100644 --- a/rfd-processor/src/content/mod.rs +++ b/rfd-processor/src/content/mod.rs @@ -48,7 +48,7 @@ pub enum RenderableRfdError { #[derive(Debug, Clone)] pub struct RenderableRfd<'a> { - content: RfdContent<'a>, + pub content: RfdContent<'a>, render_id: Uuid, } @@ -110,7 +110,8 @@ impl<'a> RenderableRfd<'a> { ) -> Result { match &self.content { RfdContent::Asciidoc(adoc) => { - self.download_images(client, number, branch).await?; + self.download_supporting_documents(client, number, branch) + .await?; let pdf = RenderedPdf::render(adoc, self.tmp_path()?).await?; @@ -127,9 +128,9 @@ impl<'a> RenderableRfd<'a> { } /// Downloads images that are stored on the provided GitHub branch for the given RFD number. - /// These are stored locally so in a tmp directory for use by asciidoctor + /// These are stored locally in a tmp directory for use by asciidoctor #[instrument(skip(self, client), fields(storage_path = ?self.tmp_path()))] - async fn download_images( + async fn download_supporting_documents( &self, client: &Client, number: &RfdNumber, @@ -138,20 +139,22 @@ impl<'a> RenderableRfd<'a> { let dir = number.repo_path(); let storage_path = self.tmp_path()?; - let images = location.get_images(client, number).await?; + let documents = location + .download_supporting_documents(client, number) + .await?; - for image in images { - let image_path = storage_path.join( - image + for document in documents { + let document_path = storage_path.join( + document .path .replace(dir.trim_start_matches('/'), "") .trim_start_matches('/'), ); - let path = PathBuf::from(image_path); - write_file(&path, &decode_base64(&image.content)?).await?; + let path = PathBuf::from(document_path); + write_file(&path, &decode_base64(&document.content)?).await?; - tracing::info!(?path, "Wrote embedded image",); + tracing::info!(?path, "Wrote supporting document",); } Ok(()) diff --git a/rfd-processor/src/rfd.rs b/rfd-processor/src/rfd.rs index 0465e78f..5bf31843 100644 --- a/rfd-processor/src/rfd.rs +++ b/rfd-processor/src/rfd.rs @@ -124,6 +124,11 @@ impl PersistedRfd { }) } + pub fn set_content(&mut self, format: ContentFormat, content: &str) { + self.revision.content = content.to_string(); + self.revision.content_format = format; + } + pub fn update_discussion(&mut self, new_discussion_url: impl ToString) -> Result<(), RfdError> { let new_discussion_url = new_discussion_url.to_string(); diff --git a/rfd-processor/src/updater/copy_images_to_storage.rs b/rfd-processor/src/updater/copy_images_to_storage.rs index 58070045..ee72a669 100644 --- a/rfd-processor/src/updater/copy_images_to_storage.rs +++ b/rfd-processor/src/updater/copy_images_to_storage.rs @@ -29,7 +29,7 @@ impl RfdUpdateAction for CopyImagesToStorage { let images = update .location - .get_images(&ctx.github.client, &update.number) + .download_supporting_documents(&ctx.github.client, &update.number) .await .map_err(|err| RfdUpdateActionErr::Continue(Box::new(err)))?; diff --git a/rfd-processor/src/updater/mod.rs b/rfd-processor/src/updater/mod.rs index 78531f2d..8267a8ce 100644 --- a/rfd-processor/src/updater/mod.rs +++ b/rfd-processor/src/updater/mod.rs @@ -5,6 +5,7 @@ use async_trait::async_trait; use newtype_uuid::TypedUuid; use octorust::types::{LabelsData, PullRequestData, PullRequestSimple}; +use process_includes::ProcessIncludes; use rfd_data::content::RfdDocument; use rfd_github::{GitHubError, GitHubRfdUpdate}; use rfd_model::RfdId; @@ -31,6 +32,7 @@ mod copy_images_to_storage; mod create_pull_request; mod ensure_default_state; mod ensure_pr_state; +mod process_includes; mod update_discussion_url; mod update_pdfs; mod update_pull_request; @@ -86,6 +88,7 @@ impl TryFrom<&str> for BoxedAction { "CreatePullRequest" => Ok(Box::new(CreatePullRequest)), "UpdatePullRequest" => Ok(Box::new(UpdatePullRequest)), "UpdateDiscussionUrl" => Ok(Box::new(UpdateDiscussionUrl)), + "ProcessIncludes" => Ok(Box::new(ProcessIncludes)), "EnsureRfdWithPullRequestIsInValidState" => { Ok(Box::new(EnsureRfdWithPullRequestIsInValidState)) } diff --git a/rfd-processor/src/updater/process_includes.rs b/rfd-processor/src/updater/process_includes.rs new file mode 100644 index 00000000..9c7888d2 --- /dev/null +++ b/rfd-processor/src/updater/process_includes.rs @@ -0,0 +1,67 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +use async_trait::async_trait; +use rfd_data::content::{RfdContent, RfdDocument}; +use rfd_github::ext::ContentFileExt; +use rfd_model::schema_ext::ContentFormat; +use tracing::instrument; + +use crate::rfd::PersistedRfd; + +use super::{ + RfdUpdateAction, RfdUpdateActionContext, RfdUpdateActionErr, RfdUpdateActionResponse, + RfdUpdateMode, +}; + +#[derive(Debug)] +pub struct ProcessIncludes; + +#[async_trait] +impl RfdUpdateAction for ProcessIncludes { + #[instrument(skip(self, ctx, new), err(Debug))] + async fn run( + &self, + ctx: &mut RfdUpdateActionContext, + new: &mut PersistedRfd, + _mode: RfdUpdateMode, + ) -> Result { + let RfdUpdateActionContext { ctx, update, .. } = ctx; + + let documents = update + .location + .download_supporting_documents(&ctx.github.client, &update.number) + .await + .map_err(|err| RfdUpdateActionErr::Continue(Box::new(err)))?; + + let content = new + .content() + .map_err(|err| RfdUpdateActionErr::Continue(Box::new(err)))?; + let (format, new_content) = match &content.content { + RfdContent::Asciidoc(adoc) => { + let mut raw = adoc.raw().to_string(); + let includes = adoc.includes(); + for include in includes { + if let Some(document) = documents + .iter() + .find(|document| document.name == include.name()) + { + if let Some(content) = document.to_text() { + raw = include.perform_replacement(&raw, &content); + } else { + tracing::warn!(?include, "Non UTF-8 files can not be included") + } + } + } + (ContentFormat::Asciidoc, raw) + } + RfdContent::Markdown(_) => (ContentFormat::Markdown, content.raw().to_string()), + }; + new.set_content(format, &new_content); + + Ok(RfdUpdateActionResponse { + requires_source_commit: false, + }) + } +} From 151d89a9c2d07691a8386cb0c91d36b20b1edddc Mon Sep 17 00:00:00 2001 From: Augustus Mayo Date: Thu, 13 Mar 2025 16:26:20 -0500 Subject: [PATCH 2/4] Use path instead of name --- rfd-processor/src/updater/process_includes.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/rfd-processor/src/updater/process_includes.rs b/rfd-processor/src/updater/process_includes.rs index 9c7888d2..a164c4da 100644 --- a/rfd-processor/src/updater/process_includes.rs +++ b/rfd-processor/src/updater/process_includes.rs @@ -43,10 +43,13 @@ impl RfdUpdateAction for ProcessIncludes { let mut raw = adoc.raw().to_string(); let includes = adoc.includes(); for include in includes { - if let Some(document) = documents - .iter() - .find(|document| document.name == include.name()) - { + if let Some(document) = documents.iter().find(|document| { + document + .path + .trim_start_matches('/') + .trim_start_matches(&ctx.github.repository.path) + == include.name() + }) { if let Some(content) = document.to_text() { raw = include.perform_replacement(&raw, &content); } else { From 20dc33584fe0c85f647e31395e63cac1820eefde Mon Sep 17 00:00:00 2001 From: Augustus Mayo Date: Fri, 14 Mar 2025 16:04:36 -0500 Subject: [PATCH 3/4] Fix path trimming. Mark RFD as needs update on content update --- rfd-data/src/content/asciidoc.rs | 1 + rfd-github/src/lib.rs | 2 +- rfd-processor/src/rfd.rs | 2 ++ rfd-processor/src/updater/process_includes.rs | 18 +++++++++++++++--- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/rfd-data/src/content/asciidoc.rs b/rfd-data/src/content/asciidoc.rs index e01ba30e..7354957c 100644 --- a/rfd-data/src/content/asciidoc.rs +++ b/rfd-data/src/content/asciidoc.rs @@ -188,6 +188,7 @@ impl<'a> AsciidocInclude<'a> { } pub fn perform_replacement(&self, body: &str, new_content: &str) -> String { + tracing::trace!(self.replacement, "Replacing include"); body.replace(self.replacement, new_content) } } diff --git a/rfd-github/src/lib.rs b/rfd-github/src/lib.rs index 973252e0..4cbdb114 100644 --- a/rfd-github/src/lib.rs +++ b/rfd-github/src/lib.rs @@ -590,7 +590,7 @@ impl GitHubRfdLocation { for image in images { files.push(image) } - } else if is_image(&file.name) { + } else { let file = client .repos() .get_content_blob(owner, repo, ref_.0.as_str(), &file.path) diff --git a/rfd-processor/src/rfd.rs b/rfd-processor/src/rfd.rs index 5bf31843..95b17f3e 100644 --- a/rfd-processor/src/rfd.rs +++ b/rfd-processor/src/rfd.rs @@ -127,6 +127,8 @@ impl PersistedRfd { pub fn set_content(&mut self, format: ContentFormat, content: &str) { self.revision.content = content.to_string(); self.revision.content_format = format; + + *self.needs_update.lock().unwrap() = true; } pub fn update_discussion(&mut self, new_discussion_url: impl ToString) -> Result<(), RfdError> { diff --git a/rfd-processor/src/updater/process_includes.rs b/rfd-processor/src/updater/process_includes.rs index a164c4da..7571b4c9 100644 --- a/rfd-processor/src/updater/process_includes.rs +++ b/rfd-processor/src/updater/process_includes.rs @@ -27,6 +27,7 @@ impl RfdUpdateAction for ProcessIncludes { new: &mut PersistedRfd, _mode: RfdUpdateMode, ) -> Result { + tracing::info!("Processing inculdes"); let RfdUpdateActionContext { ctx, update, .. } = ctx; let documents = update @@ -35,6 +36,8 @@ impl RfdUpdateAction for ProcessIncludes { .await .map_err(|err| RfdUpdateActionErr::Continue(Box::new(err)))?; + tracing::trace!(?documents, "Retrieved supporting documents from GitHub"); + let content = new .content() .map_err(|err| RfdUpdateActionErr::Continue(Box::new(err)))?; @@ -43,14 +46,21 @@ impl RfdUpdateAction for ProcessIncludes { let mut raw = adoc.raw().to_string(); let includes = adoc.includes(); for include in includes { + tracing::info!(?include, "Handle include"); + if let Some(document) = documents.iter().find(|document| { - document + let trimmed_path = document .path - .trim_start_matches('/') .trim_start_matches(&ctx.github.repository.path) - == include.name() + .trim_start_matches('/') + .trim_start_matches(&update.number.as_number_string()) + .trim_start_matches('/'); + + tracing::debug!(path = ?document.path, ?trimmed_path, name = include.name(), "Test include name against path"); + trimmed_path == include.name() }) { if let Some(content) = document.to_text() { + tracing::info!(name = include.name(), file = document.name, "Found include match. Replacing contents"); raw = include.perform_replacement(&raw, &content); } else { tracing::warn!(?include, "Non UTF-8 files can not be included") @@ -61,6 +71,8 @@ impl RfdUpdateAction for ProcessIncludes { } RfdContent::Markdown(_) => (ContentFormat::Markdown, content.raw().to_string()), }; + + tracing::trace!("Processed all includes"); new.set_content(format, &new_content); Ok(RfdUpdateActionResponse { From 388549a4be8644e0457ff7e2218d49687db9c104 Mon Sep 17 00:00:00 2001 From: Augustus Mayo Date: Fri, 14 Mar 2025 16:19:03 -0500 Subject: [PATCH 4/4] Only do include processing when there is at least one include --- rfd-processor/src/updater/process_includes.rs | 55 ++++++++++--------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/rfd-processor/src/updater/process_includes.rs b/rfd-processor/src/updater/process_includes.rs index 7571b4c9..01cadd0d 100644 --- a/rfd-processor/src/updater/process_includes.rs +++ b/rfd-processor/src/updater/process_includes.rs @@ -30,14 +30,6 @@ impl RfdUpdateAction for ProcessIncludes { tracing::info!("Processing inculdes"); let RfdUpdateActionContext { ctx, update, .. } = ctx; - let documents = update - .location - .download_supporting_documents(&ctx.github.client, &update.number) - .await - .map_err(|err| RfdUpdateActionErr::Continue(Box::new(err)))?; - - tracing::trace!(?documents, "Retrieved supporting documents from GitHub"); - let content = new .content() .map_err(|err| RfdUpdateActionErr::Continue(Box::new(err)))?; @@ -45,28 +37,41 @@ impl RfdUpdateAction for ProcessIncludes { RfdContent::Asciidoc(adoc) => { let mut raw = adoc.raw().to_string(); let includes = adoc.includes(); - for include in includes { - tracing::info!(?include, "Handle include"); - if let Some(document) = documents.iter().find(|document| { - let trimmed_path = document - .path - .trim_start_matches(&ctx.github.repository.path) - .trim_start_matches('/') - .trim_start_matches(&update.number.as_number_string()) - .trim_start_matches('/'); + // Ensure that we only do the work of downloading supporting documents if there + // are include macros to process + if includes.len() > 0 { + let documents = update + .location + .download_supporting_documents(&ctx.github.client, &update.number) + .await + .map_err(|err| RfdUpdateActionErr::Continue(Box::new(err)))?; - tracing::debug!(path = ?document.path, ?trimmed_path, name = include.name(), "Test include name against path"); - trimmed_path == include.name() - }) { - if let Some(content) = document.to_text() { - tracing::info!(name = include.name(), file = document.name, "Found include match. Replacing contents"); - raw = include.perform_replacement(&raw, &content); - } else { - tracing::warn!(?include, "Non UTF-8 files can not be included") + tracing::trace!(?documents, "Retrieved supporting documents from GitHub"); + for include in includes { + tracing::info!(?include, "Handle include"); + + if let Some(document) = documents.iter().find(|document| { + let trimmed_path = document + .path + .trim_start_matches(&ctx.github.repository.path) + .trim_start_matches('/') + .trim_start_matches(&update.number.as_number_string()) + .trim_start_matches('/'); + + tracing::debug!(path = ?document.path, ?trimmed_path, name = include.name(), "Test include name against path"); + trimmed_path == include.name() + }) { + if let Some(content) = document.to_text() { + tracing::info!(name = include.name(), file = document.name, "Found include match. Replacing contents"); + raw = include.perform_replacement(&raw, &content); + } else { + tracing::warn!(?include, "Non UTF-8 files can not be included") + } } } } + (ContentFormat::Asciidoc, raw) } RfdContent::Markdown(_) => (ContentFormat::Markdown, content.raw().to_string()),