From 7ee710634b1b64730328fbf7151705d14aa92c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20DOUIN?= Date: Sat, 16 Mar 2024 22:20:19 +0100 Subject: [PATCH] bump deps, make global config option repeatable --- CHANGELOG.md | 6 +- Cargo.lock | 446 +++++++++++++++++++++---------------------- Cargo.toml | 33 ++-- src/cli.rs | 37 ++-- src/config/mod.rs | 82 +++++--- src/config/wizard.rs | 18 +- src/imap/wizard.rs | 48 ++--- src/main.rs | 11 +- src/smtp/wizard.rs | 48 ++--- src/ui/editor.rs | 4 +- 10 files changed, 374 insertions(+), 359 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 247a1c1..694496c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,9 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Made the global `--config|-c` option repeatable: the first option is considered the path to the main config, and successive options are considered partial overrides [#184]. - Changed the `envelope list` options (see `envelope list --help` for more details): - - the folder argument became a flag `--folder ` - - the query argument has been added at the end of the command to filter and sort results [#39] + - The folder argument became a flag `--folder `. + - The query argument has been added at the end of the command to filter and sort results [#39]. ### Fixed @@ -807,4 +808,5 @@ Few major concepts changed: [#95]: https://todo.sr.ht/~soywod/pimalaya/95 [#172]: https://todo.sr.ht/~soywod/pimalaya/172 [#173]: https://todo.sr.ht/~soywod/pimalaya/173 +[#184]: https://todo.sr.ht/~soywod/pimalaya/184 [#188]: https://todo.sr.ht/~soywod/pimalaya/188 diff --git a/Cargo.lock b/Cargo.lock index c883c04..5fabb49 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -58,9 +58,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.9" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d713b3834d76b85304d4d525563c1276e2e30dc97cc67bfb4585a4a29fc2c89f" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "getrandom", @@ -107,9 +107,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.12" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" dependencies = [ "anstyle", "anstyle-parse", @@ -155,9 +155,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.80" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "ariadne" @@ -186,7 +186,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" dependencies = [ "concurrent-queue", - "event-listener 5.1.0", + "event-listener 5.2.0", "event-listener-strategy 0.5.0", "futures-core", "pin-project-lite", @@ -240,9 +240,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" +checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" dependencies = [ "async-lock 3.3.0", "cfg-if", @@ -302,7 +302,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -311,7 +311,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" dependencies = [ - "async-io 2.3.1", + "async-io 2.3.2", "async-lock 2.8.0", "atomic-waker", "cfg-if", @@ -337,7 +337,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -493,18 +493,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" dependencies = [ "memchr", - "regex-automata 0.4.5", + "regex-automata 0.4.6", "serde", ] [[package]] name = "buffer-redux" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2886ea01509598caac116942abd33ab5a88fa32acdf7e4abfa0fc489ca520c9" +checksum = "4c9f8ddd22e0a12391d1e7ada69ec3b0da1914f1cec39c5cf977143c5b2854f5" dependencies = [ "memchr", - "safemem", ] [[package]] @@ -521,15 +520,9 @@ checksum = "b00b8763668c99f8d9101b8a0dd82106f58265464531a79b2cef0d9a30c17dd2" [[package]] name = "bumpalo" -version = "3.15.3" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b" - -[[package]] -name = "bytecount" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "byteorder" @@ -585,10 +578,11 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.87" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3286b845d0fccbdd15af433f61c5970e711987036cb468f437ff6badd70f4e24" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" dependencies = [ + "jobserver", "libc", ] @@ -619,9 +613,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.34" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" dependencies = [ "android-tzdata", "iana-time-zone", @@ -629,7 +623,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.3", + "windows-targets 0.52.4", ] [[package]] @@ -665,9 +659,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.1" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" +checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" dependencies = [ "clap_builder", "clap_derive", @@ -675,9 +669,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.1" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -696,14 +690,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.0" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" +checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -908,7 +902,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -1218,7 +1212,7 @@ dependencies = [ [[package]] name = "email-lib" version = "0.22.3" -source = "git+https://git.sr.ht/~soywod/pimalaya#636501d849b516a7ded6c6e427eca3ad22e76317" +source = "git+https://git.sr.ht/~soywod/pimalaya#5774d5ac5176eb79543bb3bb075bbd026866559f" dependencies = [ "advisory-lock", "anyhow", @@ -1269,11 +1263,10 @@ dependencies = [ [[package]] name = "email-macros" version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f24a09fd651027f8764f8a12c12358715cb9bab622ab3125ede3dd6ae047c95" +source = "git+https://git.sr.ht/~soywod/pimalaya#5774d5ac5176eb79543bb3bb075bbd026866559f" dependencies = [ "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -1306,10 +1299,10 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -1330,7 +1323,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -1401,9 +1394,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.1.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ad6fd685ce13acd6d9541a30f6db6567a7a24c9ffd4ba2955d29e3f22c8b27" +checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" dependencies = [ "concurrent-queue", "parking", @@ -1426,7 +1419,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" dependencies = [ - "event-listener 5.1.0", + "event-listener 5.2.0", "pin-project-lite", ] @@ -1619,7 +1612,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -1755,9 +1748,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ "bytes", "fnv", @@ -1788,6 +1781,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -1799,9 +1798,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "379dada1584ad501b383485dd706b8afb7a70fcbc7f4da7d780638a5a6124a60" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -1862,7 +1861,7 @@ dependencies = [ [[package]] name = "himalaya" -version = "1.0.0-beta.3" +version = "1.0.0-beta.4" dependencies = [ "anyhow", "ariadne", @@ -1890,6 +1889,7 @@ dependencies = [ "process-lib", "secret-lib", "serde", + "serde-toml-merge", "serde_json", "shellexpand-utils", "sled", @@ -1897,8 +1897,8 @@ dependencies = [ "termcolor", "terminal_size", "tokio", - "toml 0.7.8", - "toml_edit 0.19.15", + "toml", + "toml_edit 0.22.7", "unicode-width", "url", "uuid", @@ -1922,6 +1922,15 @@ dependencies = [ "digest", ] +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "hostname" version = "0.3.1" @@ -1935,9 +1944,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -2099,9 +2108,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.3" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ "equivalent", "hashbrown", @@ -2164,7 +2173,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.8", + "hermit-abi 0.3.9", "libc", "windows-sys 0.48.0", ] @@ -2194,10 +2203,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] -name = "js-sys" -version = "0.3.68" +name = "jobserver" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -2217,19 +2235,15 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1be8bc4c6b6e9d85ecdad090fcf342a9216f53d747a537cc05e3452fd650ca46" dependencies = [ - "byteorder", "lazy_static", "linux-keyutils", "secret-service", - "security-framework", - "windows-sys 0.52.0", ] [[package]] name = "keyring-lib" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3278575ee927d4155314ccd89982bc37face05d9db076f5e40342cba4dd6e4ab" +version = "0.4.0" +source = "git+https://git.sr.ht/~soywod/pimalaya#5774d5ac5176eb79543bb3bb075bbd026866559f" dependencies = [ "keyring", "log", @@ -2342,9 +2356,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lru-cache" @@ -2370,9 +2384,9 @@ dependencies = [ [[package]] name = "mail-auth" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224aa436a40caeef3bd3fa1b5b619b28b26d83fcc088c008536886f74ad27951" +checksum = "84725ed2de724f96bfe85cb4a0c06ac9a77fe612915675220525682ebdfdd7fa" dependencies = [ "ahash", "flate2", @@ -2383,7 +2397,7 @@ dependencies = [ "parking_lot 0.12.1", "quick-xml 0.31.0", "ring 0.17.8", - "rustls-pemfile 2.1.0", + "rustls-pemfile 2.1.1", "serde", "serde_json", "zip", @@ -2409,9 +2423,9 @@ dependencies = [ [[package]] name = "mail-send" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5982137dccf24ca038daa022eb0ea97a31e9739477445a787a8ef77e015ebb" +checksum = "735ca5a9c5b6acb5f9e7089ee7b96d10c54d4df91e9b47321ef6bb468f90483d" dependencies = [ "base64 0.21.7", "gethostname", @@ -2516,9 +2530,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", @@ -2528,14 +2542,12 @@ dependencies = [ [[package]] name = "mml-lib" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8ffcc68cd2f48395ee07fe85ec580154c6f8f22ff89972b4a1dd2452890d614" +version = "1.0.8" +source = "git+https://git.sr.ht/~soywod/pimalaya#5774d5ac5176eb79543bb3bb075bbd026866559f" dependencies = [ "async-recursion", "chumsky", "gpgme", - "keyring-lib", "log", "mail-builder", "mail-parser", @@ -2683,7 +2695,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -2734,7 +2746,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.8", + "hermit-abi 0.3.9", "libc", ] @@ -2747,8 +2759,7 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "oauth-lib" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1484d9864dbf6b55b3785380631a253fa0ff7f8e1bbb078bfd7effd11283d61" +source = "git+https://git.sr.ht/~soywod/pimalaya#5774d5ac5176eb79543bb3bb075bbd026866559f" dependencies = [ "log", "oauth2", @@ -2824,9 +2835,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl-probe" @@ -2899,11 +2910,11 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46bc2307dc3420554ae349230dac4969c66d7c2feead3a8cab05ea0c604daca6" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -3093,8 +3104,7 @@ dependencies = [ [[package]] name = "pgp-lib" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d61233a437ba3de6396593cb27fda4e48ba7c7415756caffe9f9d5d0d07378c" +source = "git+https://git.sr.ht/~soywod/pimalaya#5774d5ac5176eb79543bb3bb075bbd026866559f" dependencies = [ "async-recursion", "futures", @@ -3260,21 +3270,19 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] [[package]] name = "process-lib" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e83db4af201454004f9cdc5fb343031f6d84bddf8a0d41348bc9e82fab1f1ee" +version = "0.4.1" +source = "git+https://git.sr.ht/~soywod/pimalaya#5774d5ac5176eb79543bb3bb075bbd026866559f" dependencies = [ "log", - "once_cell", "serde", "thiserror", "tokio", @@ -3354,9 +3362,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" dependencies = [ "either", "rayon-core", @@ -3409,7 +3417,7 @@ checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.5", + "regex-automata 0.4.6", "regex-syntax 0.8.2", ] @@ -3426,9 +3434,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -3449,9 +3457,9 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.24" +version = "0.11.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +checksum = "78bf93c4af7a8bb7d879d51cebe797356ff10ae8516ace542b5182d9dcac10b2" dependencies = [ "base64 0.21.7", "bytes", @@ -3676,9 +3684,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c333bb734fcdedcea57de1602543590f545f127dc8b533324318fd492c5c70b" +checksum = "f48172685e6ff52a556baa527774f61fcaa884f59daf3375c62a3f1cd2549dab" dependencies = [ "base64 0.21.7", "rustls-pki-types", @@ -3686,9 +3694,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048a63e5b3ac996d78d402940b5fa47973d2d080c6c6fffa1d0f19c4445310b7" +checksum = "5ede67b28608b4c60685c7d54122d4400d90f62b40caee7700e700380a390fa8" [[package]] name = "rustls-webpki" @@ -3717,12 +3725,6 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - [[package]] name = "same-file" version = "1.0.6" @@ -3773,11 +3775,11 @@ dependencies = [ [[package]] name = "secret-lib" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af8fa450b77b5d8e0ac1cf7c741e912e54b568e8dcf888d80f5502c23899aeae" +version = "0.4.1" +source = "git+https://git.sr.ht/~soywod/pimalaya#5774d5ac5176eb79543bb3bb075bbd026866559f" dependencies = [ "keyring-lib", + "log", "process-lib", "serde", "thiserror", @@ -3840,6 +3842,15 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-toml-merge" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317213b881aea9bc19d7590b9cf467c58ad5f536f95b4d42129b5643f351d27f" +dependencies = [ + "toml", +] + [[package]] name = "serde-xml-rs" version = "0.6.0" @@ -3860,7 +3871,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -3876,9 +3887,9 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" dependencies = [ "itoa", "serde", @@ -3892,7 +3903,7 @@ checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -3968,8 +3979,7 @@ dependencies = [ [[package]] name = "shellexpand-utils" version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3789fb50c0dc67a1171515bc5709c30a8938ee210e19c02be1e8c1f6f881bc" +source = "git+https://git.sr.ht/~soywod/pimalaya#5774d5ac5176eb79543bb3bb075bbd026866559f" dependencies = [ "log", "shellexpand", @@ -4130,9 +4140,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.50" +version = "2.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" dependencies = [ "proc-macro2", "quote", @@ -4168,14 +4178,14 @@ dependencies = [ [[package]] name = "system-deps" -version = "6.2.0" +version = "6.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2d580ff6a20c55dfb86be5f9c238f67835d0e81cbdea8bf5680e0897320331" +checksum = "e8e9199467bcbc77c6a13cc6e32a6af21721ab8c96aa0261856c4fda5a4433f0" dependencies = [ "cfg-expr", - "heck", + "heck 0.4.1", "pkg-config", - "toml 0.8.10", + "toml", "version-compare", ] @@ -4197,9 +4207,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand 2.0.1", @@ -4228,22 +4238,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -4307,7 +4317,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -4347,26 +4357,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "af06656561d28735e9c1cd63dfd57132c8155426aa6af24f36a00a351f88c48e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.19.15", -] - -[[package]] -name = "toml" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.22.6", + "toml_edit 0.22.7", ] [[package]] @@ -4385,23 +4383,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap", - "serde", - "serde_spanned", "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.6" +version = "0.22.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" +checksum = "18769cd1cec395d70860ceb4d932812a0b4d06b1a4bb336745a4d21b9496e992" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.2", + "winnow 0.6.5", ] [[package]] @@ -4429,7 +4425,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -4443,13 +4439,13 @@ dependencies = [ [[package]] name = "tree_magic_mini" -version = "3.0.3" +version = "3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91adfd0607cacf6e4babdb870e9bec4037c1c4b151cfd279ccefc5e0c7feaa6d" +checksum = "77ee137597cdb361b55a4746983e4ac1b35ab6024396a419944ad473bb915265" dependencies = [ - "bytecount", "fnv", - "lazy_static", + "home", + "memchr", "nom", "once_cell", "petgraph", @@ -4590,9 +4586,9 @@ checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -4615,9 +4611,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -4625,24 +4621,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -4652,9 +4648,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4662,28 +4658,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -4766,7 +4762,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.3", + "windows-targets 0.52.4", ] [[package]] @@ -4784,7 +4780,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.3", + "windows-targets 0.52.4", ] [[package]] @@ -4804,17 +4800,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.3" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" dependencies = [ - "windows_aarch64_gnullvm 0.52.3", - "windows_aarch64_msvc 0.52.3", - "windows_i686_gnu 0.52.3", - "windows_i686_msvc 0.52.3", - "windows_x86_64_gnu 0.52.3", - "windows_x86_64_gnullvm 0.52.3", - "windows_x86_64_msvc 0.52.3", + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -4825,9 +4821,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.3" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" [[package]] name = "windows_aarch64_msvc" @@ -4837,9 +4833,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.3" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" [[package]] name = "windows_i686_gnu" @@ -4849,9 +4845,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.3" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" [[package]] name = "windows_i686_msvc" @@ -4861,9 +4857,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.3" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" [[package]] name = "windows_x86_64_gnu" @@ -4873,9 +4869,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.3" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" [[package]] name = "windows_x86_64_gnullvm" @@ -4885,9 +4881,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.3" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" [[package]] name = "windows_x86_64_msvc" @@ -4897,9 +4893,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.3" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" [[package]] name = "winnow" @@ -4912,9 +4908,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.2" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a4191c47f15cc3ec71fcb4913cb83d58def65dd3787610213c649283b5ce178" +checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" dependencies = [ "memchr", ] @@ -4974,15 +4970,15 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "z-base-32" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80a0d98613370af88e15bd2047702d7c78c8c6aba44403eb227c8ad706871f92" +checksum = "21bf7b4a78668416e1e8a332334e26fb2f377afe707f0c6feaf6ed5f9100133b" [[package]] name = "zbus" -version = "3.15.1" +version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5acecd3f8422f198b1a2f954bcc812fe89f3fa4281646f3da1da7925db80085d" +checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" dependencies = [ "async-broadcast", "async-executor", @@ -5022,9 +5018,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.15.1" +version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2207eb71efebda17221a579ca78b45c4c5f116f074eb745c3a172e688ccf89f5" +checksum = "7131497b0f887e8061b430c530240063d33bf9455fa34438f388a245da69e0a5" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5036,9 +5032,9 @@ dependencies = [ [[package]] name = "zbus_names" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" +checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d" dependencies = [ "serde", "static_assertions", @@ -5062,7 +5058,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -5082,7 +5078,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.52", ] [[package]] @@ -5136,9 +5132,9 @@ dependencies = [ [[package]] name = "zvariant" -version = "3.15.1" +version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5b4fcf3660d30fc33ae5cd97e2017b23a96e85afd7a1dd014534cd0bf34ba67" +checksum = "4eef2be88ba09b358d3b58aca6e41cd853631d44787f319a1383ca83424fb2db" dependencies = [ "byteorder", "enumflags2", @@ -5150,9 +5146,9 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "3.15.1" +version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0277758a8a0afc0e573e80ed5bfd9d9c2b48bd3108ffe09384f9f738c83f4a55" +checksum = "37c24dc0bed72f5f90d1f8bb5b07228cbf63b3c6e9f82d82559d4bae666e7ed9" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5163,9 +5159,9 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "1.1.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00bedb16a193cc12451873fee2a1bc6550225acece0e36f333e68326c73c8172" +checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 61027f8..947fc17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "himalaya" description = "CLI to manage emails" -version = "1.0.0-beta.3" +version = "1.0.0-beta.4" authors = ["soywod "] edition = "2021" license = "MIT" @@ -13,7 +13,7 @@ repository = "https://github.com/soywod/himalaya/" [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs", "--document-private-items"] [features] default = [ @@ -46,7 +46,6 @@ pgp-gpg = ["email-lib/pgp-gpg", "mml-lib/pgp-gpg", "pgp"] pgp-native = ["email-lib/pgp-native", "mml-lib/pgp-native", "pgp"] [dev-dependencies] -async-trait = "0.1" tempfile = "3.3" [dependencies] @@ -60,29 +59,30 @@ clap_mangen = "0.2" console = "0.15.2" dialoguer = "0.10.2" dirs = "4" -email-lib = { version = "=0.22.3", default-features = false } +email-lib = { version = "=0.22.3", default-features = false, features = ["derive"] } email_address = "0.2.4" env_logger = "0.8" erased-serde = "0.3" indicatif = "0.17" -keyring-lib = "=0.3.2" +keyring-lib = { version = "=0.4.0", features = ["derive"] } log = "0.4" mail-builder = "0.3" md5 = "0.7" -mml-lib = { version = "=1.0.7", default-features = false } +mml-lib = { version = "=1.0.8", default-features = false, features = ["derive"] } oauth-lib = "=0.1.0" once_cell = "1.16" -process-lib = "=0.3.1" -secret-lib = "=0.3.3" -serde = { version = "1.0", features = ["derive"] } +process-lib = { version = "=0.4.1", features = ["derive"] } +secret-lib = { version = "=0.4.1", features = ["derive"] } +serde = { version = "1", features = ["derive"] } +serde-toml-merge = "0.3" serde_json = "1" shellexpand-utils = "=0.2.0" sled = "=0.34.7" termcolor = "1" terminal_size = "0.1" tokio = { version = "1.23", default-features = false, features = ["macros", "rt-multi-thread"] } -toml = "0.7.4" -toml_edit = "0.19.8" +toml = "0.8" +toml_edit = "0.22" unicode-width = "0.1" url = "2.2" uuid = { version = "0.8", features = ["v4"] } @@ -91,5 +91,14 @@ uuid = { version = "0.8", features = ["v4"] } version = "0.1" [patch.crates-io] -email-lib = { git = "https://git.sr.ht/~soywod/pimalaya" } +# waiting for alpha 7 chumsky = { git = "https://github.com/zesterer/chumsky.git", rev = "6837537" } +email-lib = { git = "https://git.sr.ht/~soywod/pimalaya" } +email-macros = { git = "https://git.sr.ht/~soywod/pimalaya" } +keyring-lib = { git = "https://git.sr.ht/~soywod/pimalaya" } +mml-lib = { git = "https://git.sr.ht/~soywod/pimalaya" } +oauth-lib = { git = "https://git.sr.ht/~soywod/pimalaya" } +pgp-lib = { git = "https://git.sr.ht/~soywod/pimalaya" } +process-lib = { git = "https://git.sr.ht/~soywod/pimalaya" } +secret-lib = { git = "https://git.sr.ht/~soywod/pimalaya" } +shellexpand-utils = { git = "https://git.sr.ht/~soywod/pimalaya" } diff --git a/src/cli.rs b/src/cli.rs index 6dfc914..d957bf6 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -25,17 +25,19 @@ pub struct Cli { #[command(subcommand)] pub command: Option, - /// Override the default configuration file path + /// Override the default configuration file path. /// - /// The given path is shell-expanded then canonicalized (if - /// applicable). If the path does not point to a valid file, the - /// wizard will propose to assist you in the creation of the - /// configuration file. + /// The given paths are shell-expanded then canonicalized (if + /// applicable). If the first path does not point to a valid file, + /// the wizard will propose to assist you in the creation of the + /// configuration file. Other paths are merged with the first one, + /// which allows you to separate your public config from your + /// private(s) one(s). #[arg(short, long = "config", global = true)] #[arg(value_name = "PATH", value_parser = config::path_parser)] - pub config_path: Option, + pub config_paths: Vec, - /// Customize the output format + /// Customize the output format. /// /// The output format determine how to display commands output to /// the terminal. @@ -116,39 +118,34 @@ pub enum HimalayaCommand { } impl HimalayaCommand { - #[allow(unused)] - pub async fn execute( - self, - printer: &mut impl Printer, - config_path: Option<&PathBuf>, - ) -> Result<()> { + pub async fn execute(self, printer: &mut impl Printer, config_paths: &[PathBuf]) -> Result<()> { match self { Self::Account(cmd) => { - let config = TomlConfig::from_some_path_or_default(config_path).await?; + let config = TomlConfig::from_paths_or_default(config_paths).await?; cmd.execute(printer, &config).await } Self::Folder(cmd) => { - let config = TomlConfig::from_some_path_or_default(config_path).await?; + let config = TomlConfig::from_paths_or_default(config_paths).await?; cmd.execute(printer, &config).await } Self::Envelope(cmd) => { - let config = TomlConfig::from_some_path_or_default(config_path).await?; + let config = TomlConfig::from_paths_or_default(config_paths).await?; cmd.execute(printer, &config).await } Self::Flag(cmd) => { - let config = TomlConfig::from_some_path_or_default(config_path).await?; + let config = TomlConfig::from_paths_or_default(config_paths).await?; cmd.execute(printer, &config).await } Self::Message(cmd) => { - let config = TomlConfig::from_some_path_or_default(config_path).await?; + let config = TomlConfig::from_paths_or_default(config_paths).await?; cmd.execute(printer, &config).await } Self::Attachment(cmd) => { - let config = TomlConfig::from_some_path_or_default(config_path).await?; + let config = TomlConfig::from_paths_or_default(config_paths).await?; cmd.execute(printer, &config).await } Self::Template(cmd) => { - let config = TomlConfig::from_some_path_or_default(config_path).await?; + let config = TomlConfig::from_paths_or_default(config_paths).await?; cmd.execute(printer, &config).await } Self::Manual(cmd) => cmd.execute(printer).await, diff --git a/src/config/mod.rs b/src/config/mod.rs index 337e17e..cb5c7dd 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -1,21 +1,17 @@ pub mod wizard; -use anyhow::{anyhow, Context, Result}; +use anyhow::{anyhow, bail, Context, Result}; use dirs::{config_dir, home_dir}; use email::{ account::config::AccountConfig, config::Config, envelope::config::EnvelopeConfig, flag::config::FlagConfig, folder::config::FolderConfig, message::config::MessageConfig, }; - +use log::debug; use serde::{Deserialize, Serialize}; +use serde_toml_merge::merge; use shellexpand_utils::{canonicalize, expand}; -use std::{ - collections::HashMap, - fs, - path::{Path, PathBuf}, - sync::Arc, -}; -use toml; +use std::{collections::HashMap, fs, path::PathBuf, sync::Arc}; +use toml::{self, Value}; #[cfg(feature = "account-sync")] use crate::backend::BackendKind; @@ -34,14 +30,48 @@ pub struct TomlConfig { } impl TomlConfig { - /// Read and parse the TOML configuration at the given path. + /// Read and parse the TOML configuration at the given paths. /// - /// Returns an error if the configuration file cannot be read or - /// if its content cannot be parsed. - fn from_path(path: &Path) -> Result { - let content = - fs::read_to_string(path).context(format!("cannot read config file at {path:?}"))?; - toml::from_str(&content).context(format!("cannot parse config file at {path:?}")) + /// Returns an error if a configuration file cannot be read or if + /// a content cannot be parsed. + fn from_paths(paths: &[PathBuf]) -> Result { + match paths.len() { + 0 => { + // should never happen + bail!("cannot read config file from empty paths"); + } + 1 => { + let path = &paths[0]; + + let ref content = fs::read_to_string(path) + .context(format!("cannot read config file at {path:?}"))?; + + toml::from_str(content).context(format!("cannot parse config file at {path:?}")) + } + _ => { + let path = &paths[0]; + + let mut merged_content = fs::read_to_string(path) + .context(format!("cannot read config file at {path:?}"))? + .parse::()?; + + for path in &paths[1..] { + match fs::read_to_string(path) { + Ok(content) => { + merged_content = merge(merged_content, content.parse()?).unwrap(); + } + Err(err) => { + debug!("skipping subconfig file at {path:?}: {err}"); + continue; + } + } + } + + merged_content + .try_into() + .context(format!("cannot parse merged config file at {path:?}")) + } + } } /// Create and save a TOML configuration using the wizard. @@ -51,7 +81,7 @@ impl TomlConfig { /// program stops. /// /// NOTE: the wizard can only be used with interactive shells. - async fn from_wizard(path: PathBuf) -> Result { + async fn from_wizard(path: &PathBuf) -> Result { use dialoguer::Confirm; use std::process; @@ -75,8 +105,8 @@ impl TomlConfig { /// Read and parse the TOML configuration from default paths. pub async fn from_default_paths() -> Result { match Self::first_valid_default_path() { - Some(path) => Self::from_path(&path), - None => Self::from_wizard(Self::default_path()?).await, + Some(path) => Self::from_paths(&[path]), + None => Self::from_wizard(&Self::default_path()?).await, } } @@ -92,11 +122,11 @@ impl TomlConfig { /// If no path is given, then either read and parse the TOML /// configuration at the first valid default path, otherwise /// create it using the wizard. wizard. - pub async fn from_some_path_or_default(path: Option>) -> Result { - match path.map(Into::into) { - Some(ref path) if path.exists() => Self::from_path(path), - Some(path) => Self::from_wizard(path).await, - _ => Self::from_default_paths().await, + pub async fn from_paths_or_default(paths: &[PathBuf]) -> Result { + match paths.len() { + 0 => Self::from_default_paths().await, + _ if paths[0].exists() => Self::from_paths(paths), + _ => Self::from_wizard(&paths[0]).await, } } @@ -157,14 +187,14 @@ impl TomlConfig { if let Some(imap_config) = toml_account_config.imap.as_mut() { imap_config .auth - .replace_undefined_keyring_entries(&account_name); + .replace_undefined_keyring_entries(&account_name)?; } #[cfg(feature = "smtp")] if let Some(smtp_config) = toml_account_config.smtp.as_mut() { smtp_config .auth - .replace_undefined_keyring_entries(&account_name); + .replace_undefined_keyring_entries(&account_name)?; } Ok((account_name, toml_account_config)) diff --git a/src/config/wizard.rs b/src/config/wizard.rs index bb15227..ccee25b 100644 --- a/src/config/wizard.rs +++ b/src/config/wizard.rs @@ -2,7 +2,7 @@ use anyhow::Result; use dialoguer::{Confirm, Input, Select}; use shellexpand_utils::expand; use std::{fs, path::PathBuf, process}; -use toml_edit::{Document, Item}; +use toml_edit::{DocumentMut, Item}; use crate::{account, ui::THEME}; @@ -31,7 +31,7 @@ macro_rules! wizard_log { }; } -pub(crate) async fn configure(path: PathBuf) -> Result { +pub(crate) async fn configure(path: &PathBuf) -> Result { wizard_log!("Configuring your first account:"); let mut config = TomlConfig::default(); @@ -103,7 +103,7 @@ pub(crate) async fn configure(path: PathBuf) -> Result { } fn pretty_serialize(config: &TomlConfig) -> Result { - let mut doc: Document = toml::to_string(&config)?.parse()?; + let mut doc: DocumentMut = toml::to_string(&config)?.parse()?; doc.iter_mut().for_each(|(_, item)| { if let Some(item) = item.as_table_mut() { @@ -299,7 +299,9 @@ folder.sync.permissions.delete = true host: "localhost".into(), port: 143, login: "test@localhost".into(), - auth: ImapAuthConfig::Passwd(PasswdConfig(Secret::new_cmd("pass show test"))), + auth: ImapAuthConfig::Passwd(PasswdConfig(Secret::new_command( + "pass show test", + ))), ..Default::default() }), ..Default::default() @@ -330,7 +332,7 @@ imap.passwd.cmd = "pass show test" host: "localhost".into(), port: 143, login: "test@localhost".into(), - auth: ImapAuthConfig::Passwd(PasswdConfig(Secret::new_cmd(vec![ + auth: ImapAuthConfig::Passwd(PasswdConfig(Secret::new_command(vec![ "pass show test", "tr -d '[:blank:]'", ]))), @@ -424,7 +426,9 @@ maildir.root-dir = "/tmp/test" host: "localhost".into(), port: 143, login: "test@localhost".into(), - auth: SmtpAuthConfig::Passwd(PasswdConfig(Secret::new_cmd("pass show test"))), + auth: SmtpAuthConfig::Passwd(PasswdConfig(Secret::new_command( + "pass show test", + ))), ..Default::default() }), ..Default::default() @@ -455,7 +459,7 @@ smtp.passwd.cmd = "pass show test" host: "localhost".into(), port: 143, login: "test@localhost".into(), - auth: SmtpAuthConfig::Passwd(PasswdConfig(Secret::new_cmd(vec![ + auth: SmtpAuthConfig::Passwd(PasswdConfig(Secret::new_command(vec![ "pass show test", "tr -d '[:blank:]'", ]))), diff --git a/src/imap/wizard.rs b/src/imap/wizard.rs index 42431c6..0d7df13 100644 --- a/src/imap/wizard.rs +++ b/src/imap/wizard.rs @@ -163,10 +163,10 @@ pub(crate) async fn configure( .with_prompt("IMAP OAuth 2.0 client secret") .interact()?; config.client_secret = - Secret::new_keyring_entry(format!("{account_name}-imap-oauth2-client-secret")); + Secret::try_new_keyring_entry(format!("{account_name}-imap-oauth2-client-secret"))?; config .client_secret - .set_keyring_entry_secret(&client_secret) + .set_only_keyring(&client_secret) .await?; let default_auth_url = autoconfig_oauth2 @@ -278,19 +278,13 @@ pub(crate) async fn configure( .await?; config.access_token = - Secret::new_keyring_entry(format!("{account_name}-imap-oauth2-access-token")); - config - .access_token - .set_keyring_entry_secret(access_token) - .await?; + Secret::try_new_keyring_entry(format!("{account_name}-imap-oauth2-access-token"))?; + config.access_token.set_only_keyring(access_token).await?; if let Some(refresh_token) = &refresh_token { config.refresh_token = - Secret::new_keyring_entry(format!("{account_name}-imap-oauth2-refresh-token")); - config - .refresh_token - .set_keyring_entry_secret(refresh_token) - .await?; + Secret::try_new_keyring_entry(format!("{account_name}-imap-oauth2-refresh-token"))?; + config.refresh_token.set_only_keyring(refresh_token).await?; } ImapAuthConfig::OAuth2(config) @@ -303,14 +297,14 @@ pub(crate) async fn configure( let secret = match secret_idx { Some(idx) if SECRETS[idx] == KEYRING => { - let secret = Secret::new_keyring_entry(format!("{account_name}-imap-passwd")); + let secret = Secret::try_new_keyring_entry(format!("{account_name}-imap-passwd"))?; secret - .set_keyring_entry_secret(prompt::passwd("IMAP password")?) + .set_only_keyring(prompt::passwd("IMAP password")?) .await?; secret } Some(idx) if SECRETS[idx] == RAW => Secret::new_raw(prompt::passwd("IMAP password")?), - Some(idx) if SECRETS[idx] == CMD => Secret::new_cmd( + Some(idx) if SECRETS[idx] == CMD => Secret::new_command( Input::with_theme(&*THEME) .with_prompt("Shell command") .default(format!("pass show {account_name}-imap-passwd")) @@ -404,10 +398,10 @@ pub(crate) async fn configure(account_name: &str, email: &str) -> Result Result Result { - let secret = Secret::new_keyring_entry(format!("{account_name}-imap-passwd")); + let secret = Secret::try_new_keyring_entry(format!("{account_name}-imap-passwd"))?; secret - .set_keyring_entry_secret(prompt::passwd("IMAP password")?) + .set_only_keyring(prompt::passwd("IMAP password")?) .await?; secret } Some(idx) if SECRETS[idx] == RAW => Secret::new_raw(prompt::passwd("IMAP password")?), - Some(idx) if SECRETS[idx] == CMD => Secret::new_cmd( + Some(idx) if SECRETS[idx] == CMD => Secret::new_command( Input::with_theme(&*THEME) .with_prompt("Shell command") .default(format!("pass show {account_name}-imap-passwd")) diff --git a/src/main.rs b/src/main.rs index 740882d..ab43025 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,10 +22,11 @@ async fn main() -> Result<()> { // if the first argument starts by "mailto:", execute straight the // mailto message command - if let Some(ref url) = std::env::args() + let mailto = std::env::args() .nth(1) - .filter(|arg| arg.starts_with("mailto:")) - { + .filter(|arg| arg.starts_with("mailto:")); + + if let Some(ref url) = mailto { let mut printer = StdoutPrinter::default(); let config = TomlConfig::from_default_paths().await?; @@ -38,9 +39,9 @@ async fn main() -> Result<()> { let mut printer = StdoutPrinter::new(cli.output, cli.color); match cli.command { - Some(cmd) => cmd.execute(&mut printer, cli.config_path.as_ref()).await, + Some(cmd) => cmd.execute(&mut printer, cli.config_paths.as_ref()).await, None => { - let config = TomlConfig::from_some_path_or_default(cli.config_path.as_ref()).await?; + let config = TomlConfig::from_paths_or_default(cli.config_paths.as_ref()).await?; ListEnvelopesCommand::default() .execute(&mut printer, &config) .await diff --git a/src/smtp/wizard.rs b/src/smtp/wizard.rs index e4e55a5..6084c46 100644 --- a/src/smtp/wizard.rs +++ b/src/smtp/wizard.rs @@ -163,10 +163,10 @@ pub(crate) async fn configure( .with_prompt("SMTP OAuth 2.0 client secret") .interact()?; config.client_secret = - Secret::new_keyring_entry(format!("{account_name}-smtp-oauth2-client-secret")); + Secret::try_new_keyring_entry(format!("{account_name}-smtp-oauth2-client-secret"))?; config .client_secret - .set_keyring_entry_secret(&client_secret) + .set_only_keyring(&client_secret) .await?; let default_auth_url = autoconfig_oauth2 @@ -278,19 +278,13 @@ pub(crate) async fn configure( .await?; config.access_token = - Secret::new_keyring_entry(format!("{account_name}-smtp-oauth2-access-token")); - config - .access_token - .set_keyring_entry_secret(access_token) - .await?; + Secret::try_new_keyring_entry(format!("{account_name}-smtp-oauth2-access-token"))?; + config.access_token.set_only_keyring(access_token).await?; if let Some(refresh_token) = &refresh_token { config.refresh_token = - Secret::new_keyring_entry(format!("{account_name}-smtp-oauth2-refresh-token")); - config - .refresh_token - .set_keyring_entry_secret(refresh_token) - .await?; + Secret::try_new_keyring_entry(format!("{account_name}-smtp-oauth2-refresh-token"))?; + config.refresh_token.set_only_keyring(refresh_token).await?; } SmtpAuthConfig::OAuth2(config) @@ -303,14 +297,14 @@ pub(crate) async fn configure( let secret = match secret_idx { Some(idx) if SECRETS[idx] == KEYRING => { - let secret = Secret::new_keyring_entry(format!("{account_name}-smtp-passwd")); + let secret = Secret::try_new_keyring_entry(format!("{account_name}-smtp-passwd"))?; secret - .set_keyring_entry_secret(prompt::passwd("SMTP password")?) + .set_only_keyring(prompt::passwd("SMTP password")?) .await?; secret } Some(idx) if SECRETS[idx] == RAW => Secret::new_raw(prompt::passwd("SMTP password")?), - Some(idx) if SECRETS[idx] == CMD => Secret::new_cmd( + Some(idx) if SECRETS[idx] == CMD => Secret::new_command( Input::with_theme(&*THEME) .with_prompt("Shell command") .default(format!("pass show {account_name}-smtp-passwd")) @@ -403,10 +397,10 @@ pub(crate) async fn configure(account_name: &str, email: &str) -> Result Result Result { - let secret = Secret::new_keyring_entry(format!("{account_name}-smtp-passwd")); + let secret = Secret::try_new_keyring_entry(format!("{account_name}-smtp-passwd"))?; secret - .set_keyring_entry_secret(prompt::passwd("SMTP password")?) + .set_only_keyring(prompt::passwd("SMTP password")?) .await?; secret } Some(idx) if SECRETS[idx] == RAW => Secret::new_raw(prompt::passwd("SMTP password")?), - Some(idx) if SECRETS[idx] == CMD => Secret::new_cmd( + Some(idx) if SECRETS[idx] == CMD => Secret::new_command( Input::with_theme(&*THEME) .with_prompt("Shell command") .default(format!("pass show {account_name}-smtp-passwd")) diff --git a/src/ui/editor.rs b/src/ui/editor.rs index 85d6fea..b0adbe9 100644 --- a/src/ui/editor.rs +++ b/src/ui/editor.rs @@ -8,7 +8,7 @@ use email::{ }; use log::debug; use mml::MmlCompilerBuilder; -use process::SingleCmd; +use process::SingleCommand; use std::{env, fs, sync::Arc}; use crate::{ @@ -25,7 +25,7 @@ pub async fn open_with_tpl(tpl: String) -> Result { debug!("open editor"); let editor = env::var("EDITOR").context("cannot get editor from env var")?; - SingleCmd::from(format!("{editor} {}", &path.to_string_lossy())) + SingleCommand::from(format!("{editor} {}", &path.to_string_lossy())) .with_output_piped(false) .run() .await