diff --git a/Cargo.lock b/Cargo.lock index 8b85016..985a068 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -158,12 +158,14 @@ dependencies = [ [[package]] name = "async-broadcast" -version = "0.5.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" +checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" dependencies = [ - "event-listener 2.5.3", + "event-listener", + "event-listener-strategy", "futures-core", + "pin-project-lite", ] [[package]] @@ -179,23 +181,27 @@ dependencies = [ ] [[package]] -name = "async-io" -version = "1.13.0" +name = "async-executor" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", + "async-task", "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.27", + "fastrand", + "futures-lite", "slab", - "socket2 0.4.10", - "waker-fn", +] + +[[package]] +name = "async-fs" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" +dependencies = [ + "async-lock", + "blocking", + "futures-lite", ] [[package]] @@ -204,54 +210,47 @@ version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ - "async-lock 3.4.0", + "async-lock", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.3.0", + "futures-lite", "parking", - "polling 3.7.3", - "rustix 0.38.37", + "polling", + "rustix", "slab", "tracing", "windows-sys 0.59.0", ] -[[package]] -name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener 2.5.3", -] - [[package]] name = "async-lock" version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 5.3.1", + "event-listener", "event-listener-strategy", "pin-project-lite", ] [[package]] name = "async-process" -version = "1.8.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" dependencies = [ - "async-io 1.13.0", - "async-lock 2.8.0", + "async-channel", + "async-io", + "async-lock", "async-signal", + "async-task", "blocking", "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", - "rustix 0.38.37", - "windows-sys 0.48.0", + "event-listener", + "futures-lite", + "rustix", + "tracing", ] [[package]] @@ -262,7 +261,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] @@ -271,13 +270,13 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" dependencies = [ - "async-io 2.3.4", - "async-lock 3.4.0", + "async-io", + "async-lock", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.37", + "rustix", "signal-hook-registry", "slab", "windows-sys 0.59.0", @@ -297,7 +296,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] @@ -405,7 +404,7 @@ dependencies = [ "async-channel", "async-task", "futures-io", - "futures-lite 2.3.0", + "futures-lite", "piper", ] @@ -433,7 +432,7 @@ checksum = "e0af050e27e5d57aa14975f97fe47a134c46a390f91819f23a625319a7111bfa" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] @@ -476,9 +475,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "camellia" @@ -510,13 +509,19 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.30" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ "shlex", ] +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + [[package]] name = "cfb-mode" version = "0.8.2" @@ -542,6 +547,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" version = "0.4.38" @@ -604,9 +615,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.33" +version = "4.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9646e2e245bf62f45d39a0f3f36f1171ad1ea0d6967fd114bca72cb02a8fcdfb" +checksum = "07a13ab5b8cb13dbe35e68b83f6c12f9293b2f601797b71bc9f23befdb329feb" dependencies = [ "clap", ] @@ -620,7 +631,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] @@ -672,6 +683,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "comfy-table" version = "7.1.1" @@ -718,6 +739,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -871,7 +902,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] @@ -956,6 +987,35 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +[[package]] +name = "dbus" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bb21987b9fb1613058ba3843121dd18b163b254d8a6e797e144cbac14d96d1b" +dependencies = [ + "libc", + "libdbus-sys", + "winapi", +] + +[[package]] +name = "dbus-secret-service" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42a16374481d92aed73ae45b1f120207d8e71d24fb89f357fadbd8f946fd84b" +dependencies = [ + "aes", + "block-padding", + "cbc", + "dbus", + "futures-util", + "hkdf", + "num", + "once_cell", + "rand", + "sha2", +] + [[package]] name = "der" version = "0.7.9" @@ -967,17 +1027,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "derive_builder" version = "0.12.0" @@ -1144,7 +1193,8 @@ dependencies = [ [[package]] name = "email-lib" -version = "0.25.0" +version = "1.0.0" +source = "git+https://github.com/pimalaya/core#3d94ec45b2cbdda4f1bd75d83f4adc9837d5f3bd" dependencies = [ "async-trait", "chrono", @@ -1153,10 +1203,7 @@ dependencies = [ "email_address", "futures", "hickory-resolver", - "http-body-util", - "hyper 1.4.1", - "hyper-rustls 0.27.3", - "hyper-util", + "http-lib", "imap-client", "imap-next", "keyring-lib", @@ -1196,7 +1243,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f24a09fd651027f8764f8a12c12358715cb9bab622ab3125ede3dd6ae047c95" dependencies = [ "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] @@ -1210,13 +1257,19 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] +[[package]] +name = "endi" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" + [[package]] name = "enum-as-inner" version = "0.6.1" @@ -1226,7 +1279,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] @@ -1247,7 +1300,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] @@ -1266,23 +1319,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - -[[package]] -name = "event-listener" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - [[package]] name = "event-listener" version = "5.3.1" @@ -1300,7 +1336,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.3.1", + "event-listener", "pin-project-lite", ] @@ -1314,15 +1350,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fastrand" version = "2.1.1" @@ -1467,28 +1494,16 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - [[package]] name = "futures-lite" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ + "fastrand", "futures-core", + "futures-io", + "parking", "pin-project-lite", ] @@ -1500,7 +1515,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] @@ -1593,9 +1608,9 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "gpg-error" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29dd79aa3d28d1759188a70e42f3084484d9933d7afd1a50decd84314b84caba" +checksum = "545aae14d0e95734d639c8076304e6e86de765c19c76bead3648583d9caed919" dependencies = [ "libgpg-error-sys", ] @@ -1643,44 +1658,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "h2" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http 1.1.0", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "hashbrown" version = "0.14.5" @@ -1824,12 +1801,15 @@ dependencies = [ ] [[package]] -name = "home" -version = "0.5.9" +name = "hoot" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "6a018c1f2075066355e95ac5ab7909d35a84c9d14d1fae84c4bacdf6dec188d8" dependencies = [ - "windows-sys 0.52.0", + "http", + "httparse", + "log", + "url", ] [[package]] @@ -1843,17 +1823,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.1.0" @@ -1866,37 +1835,14 @@ dependencies = [ ] [[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +name = "http-lib" +version = "1.0.0" +source = "git+https://github.com/pimalaya/core#3d94ec45b2cbdda4f1bd75d83f4adc9837d5f3bd" dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http 1.1.0", -] - -[[package]] -name = "http-body-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -dependencies = [ - "bytes", - "futures-util", - "http 1.1.0", - "http-body 1.0.1", - "pin-project-lite", + "thiserror", + "tokio", + "tracing", + "ureq", ] [[package]] @@ -1905,110 +1851,6 @@ version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "0.14.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.5.7", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "h2 0.4.6", - "http 1.1.0", - "http-body 1.0.1", - "httparse", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.30", - "log", - "rustls 0.21.12", - "rustls-native-certs 0.6.3", - "tokio", - "tokio-rustls 0.24.1", -] - -[[package]] -name = "hyper-rustls" -version = "0.27.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" -dependencies = [ - "futures-util", - "http 1.1.0", - "hyper 1.4.1", - "hyper-util", - "log", - "rustls 0.23.14", - "rustls-native-certs 0.8.0", - "rustls-pki-types", - "tokio", - "tokio-rustls 0.26.0", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http 1.1.0", - "http-body 1.0.1", - "hyper 1.4.1", - "pin-project-lite", - "socket2 0.5.7", - "tokio", - "tower-service", - "tracing", -] - [[package]] name = "iana-time-zone" version = "0.1.61" @@ -2084,8 +1926,7 @@ dependencies = [ [[package]] name = "imap-codec" version = "2.0.0-alpha.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f584310addd1fb8fe288e4f07c279fec9264ac1ea68b018241ae4dcd4fb28557" +source = "git+https://github.com/duesee/imap-codec#086523d64095fd7da35b4fe5ffe27067185c9801" dependencies = [ "abnf-core", "base64 0.22.1", @@ -2111,8 +1952,7 @@ dependencies = [ [[package]] name = "imap-types" version = "2.0.0-alpha.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d601d81f11962a649acc2d535ad7311770e30364b4a978a762de291829c9ef53" +source = "git+https://github.com/duesee/imap-codec#086523d64095fd7da35b4fe5ffe27067185c9801" dependencies = [ "base64 0.22.1", "bounded-static", @@ -2194,24 +2034,13 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.9", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipconfig" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.7", + "socket2", "widestring", "windows-sys 0.48.0", "winreg 0.50.0", @@ -2235,6 +2064,26 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "jni" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +dependencies = [ + "cesu8", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + [[package]] name = "js-sys" version = "0.3.72" @@ -2255,26 +2104,31 @@ dependencies = [ [[package]] name = "keyring" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "363387f0019d714aa60cc30ab4fe501a747f4c08fc58f069dd14be971bd495a0" +version = "3.5.0" +source = "git+https://github.com/soywod/keyring-rs.git?branch=secret-service-with-keyutils#16236b85f92733550cce0a5e06fe4e63cf835b71" dependencies = [ - "lazy_static", + "byteorder", + "dbus-secret-service", "linux-keyutils", + "log", "secret-service", + "security-framework 2.11.1", + "security-framework 3.0.0", + "windows-sys 0.59.0", + "zbus", ] [[package]] name = "keyring-lib" -version = "0.4.3" -source = "git+https://github.com/pimalaya/core#17305a90a7ff1e69b9dd6e3e645e720e172d4ad6" +version = "1.0.0" +source = "git+https://github.com/pimalaya/core#3d94ec45b2cbdda4f1bd75d83f4adc9837d5f3bd" dependencies = [ "keyring", - "log", "once_cell", "serde", "thiserror", "tokio", + "tracing", ] [[package]] @@ -2308,15 +2162,24 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.159" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" + +[[package]] +name = "libdbus-sys" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06085512b750d640299b79be4bad3d2fa90a9c00b1fd9e1b46364f66f0485c72" +dependencies = [ + "pkg-config", +] [[package]] name = "libgpg-error-sys" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc23cc53e9b81f56330826fe36b6cc651543a7661748d5259f446de2ef4fdac9" +checksum = "500a4cbc0816ed820a5bcf73a19e74dd6df4bedeabc0f64471c61186938b6c82" dependencies = [ "build-rs", "system-deps", @@ -2356,12 +2219,6 @@ dependencies = [ "libc", ] -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - [[package]] name = "linux-raw-sys" version = "0.4.14" @@ -2419,12 +2276,12 @@ checksum = "7a575d25cf00ed68e5790b473b29242a47e991c6187785d47b45e31fc5816554" dependencies = [ "base64 0.22.1", "gethostname", - "rustls 0.23.14", + "rustls 0.23.15", "rustls-pki-types", "smtp-proto", "tokio", "tokio-rustls 0.26.0", - "webpki-roots 0.26.6", + "webpki-roots", ] [[package]] @@ -2493,12 +2350,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -2549,14 +2400,12 @@ dependencies = [ [[package]] name = "mml-lib" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875723012f6a5fb47a6b42ae947e44286ba61498007836ebe4fc60bc84c6899f" +version = "1.1.0" +source = "git+https://github.com/pimalaya/core#3d94ec45b2cbdda4f1bd75d83f4adc9837d5f3bd" dependencies = [ "async-recursion", "chumsky", "gpgme", - "log", "mail-builder", "mail-parser", "nanohtml2text", @@ -2566,6 +2415,7 @@ dependencies = [ "serde", "shellexpand-utils", "thiserror", + "tracing", "tree_magic_mini", ] @@ -2586,14 +2436,15 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.4" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "cfg-if", + "cfg_aliases", "libc", - "memoffset 0.7.1", + "memoffset 0.9.1", ] [[package]] @@ -2702,7 +2553,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] @@ -2748,29 +2599,27 @@ dependencies = [ [[package]] name = "oauth-lib" -version = "0.1.1" -source = "git+https://github.com/pimalaya/core#17305a90a7ff1e69b9dd6e3e645e720e172d4ad6" +version = "1.0.0" +source = "git+https://github.com/pimalaya/core#3d94ec45b2cbdda4f1bd75d83f4adc9837d5f3bd" dependencies = [ - "log", + "http-lib", "oauth2", - "reqwest", "thiserror", "tokio", - "url", + "tracing", ] [[package]] name = "oauth2" -version = "4.4.2" +version = "5.0.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c38841cdd844847e3e7c8d29cef9dcfed8877f8f56f9071f77843ecf3baf937f" +checksum = "23d385da3c602d29036d2f70beed71c36604df7570be17fed4c5b839616785bf" dependencies = [ - "base64 0.13.1", + "base64 0.22.1", "chrono", "getrandom", - "http 0.2.12", + "http", "rand", - "reqwest", "serde", "serde_json", "serde_path_to_error", @@ -3023,26 +2872,26 @@ dependencies = [ [[package]] name = "pgp-lib" -version = "0.2.0" +version = "1.0.0" +source = "git+https://github.com/pimalaya/core#3d94ec45b2cbdda4f1bd75d83f4adc9837d5f3bd" dependencies = [ "async-recursion", "futures", - "hyper 0.14.30", - "hyper-rustls 0.24.2", - "log", + "http-lib", "pgp", "rand", "sha1", "smallvec", "thiserror", "tokio", - "url", + "tracing", "z-base-32", ] [[package]] name = "pimalaya-tui" -version = "0.1.0" +version = "1.0.0" +source = "git+https://github.com/pimalaya/tui#1f83c115d7aa3d12ff278a7b4bc10d4b7157286f" dependencies = [ "async-trait", "clap", @@ -3067,7 +2916,7 @@ dependencies = [ "thiserror", "tokio", "toml", - "toml_edit 0.22.22", + "toml_edit", "tracing", "tracing-error", "tracing-subscriber", @@ -3075,9 +2924,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -3092,7 +2941,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", - "fastrand 2.1.1", + "fastrand", "futures-io", ] @@ -3123,22 +2972,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", -] - [[package]] name = "polling" version = "3.7.3" @@ -3149,7 +2982,7 @@ dependencies = [ "concurrent-queue", "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.37", + "rustix", "tracing", "windows-sys 0.59.0", ] @@ -3174,12 +3007,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.3.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "once_cell", - "toml_edit 0.19.15", + "toml_edit", ] [[package]] @@ -3208,22 +3040,22 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.87" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] [[package]] name = "process-lib" -version = "0.4.2" -source = "git+https://github.com/pimalaya/core#17305a90a7ff1e69b9dd6e3e645e720e172d4ad6" +version = "1.0.0" +source = "git+https://github.com/pimalaya/core#3d94ec45b2cbdda4f1bd75d83f4adc9837d5f3bd" dependencies = [ - "log", "serde", "thiserror", "tokio", + "tracing", ] [[package]] @@ -3381,47 +3213,6 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" -[[package]] -name = "reqwest" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", - "hyper-rustls 0.24.2", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls 0.21.12", - "rustls-pemfile 1.0.4", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "system-configuration", - "tokio", - "tokio-rustls 0.24.1", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots 0.25.4", - "winreg 0.50.0", -] - [[package]] name = "resolv-conf" version = "0.7.0" @@ -3507,20 +3298,6 @@ dependencies = [ "semver", ] -[[package]] -name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - [[package]] name = "rustix" version = "0.38.37" @@ -3530,7 +3307,7 @@ dependencies = [ "bitflags 2.6.0", "errno", "libc", - "linux-raw-sys 0.4.14", + "linux-raw-sys", "windows-sys 0.52.0", ] @@ -3548,9 +3325,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.14" +version = "0.23.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" +checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" dependencies = [ "log", "once_cell", @@ -3563,14 +3340,15 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.6.3" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", - "rustls-pemfile 1.0.4", + "rustls-pemfile 2.2.0", + "rustls-pki-types", "schannel", - "security-framework", + "security-framework 2.11.1", ] [[package]] @@ -3583,7 +3361,7 @@ dependencies = [ "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", - "security-framework", + "security-framework 2.11.1", ] [[package]] @@ -3606,9 +3384,36 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" + +[[package]] +name = "rustls-platform-verifier" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afbb878bdfdf63a336a5e63561b1835e7a8c91524f51621db870169eac84b490" +dependencies = [ + "core-foundation 0.9.4", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls 0.23.15", + "rustls-native-certs 0.7.3", + "rustls-platform-verifier-android", + "rustls-webpki 0.102.8", + "security-framework 2.11.1", + "security-framework-sys", + "webpki-roots", + "winapi", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" @@ -3633,9 +3438,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -3693,21 +3498,21 @@ dependencies = [ [[package]] name = "secret-lib" -version = "0.4.6" -source = "git+https://github.com/pimalaya/core#17305a90a7ff1e69b9dd6e3e645e720e172d4ad6" +version = "1.0.0" +source = "git+https://github.com/pimalaya/core#3d94ec45b2cbdda4f1bd75d83f4adc9837d5f3bd" dependencies = [ "keyring-lib", - "log", "process-lib", "serde", "thiserror", + "tracing", ] [[package]] name = "secret-service" -version = "3.1.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5204d39df37f06d1944935232fd2dfe05008def7ca599bf28c0800366c8a8f9" +checksum = "e4d35ad99a181be0a60ffcbe85d680d98f87bdc4d7644ade319b87076b9dbfd4" dependencies = [ "aes", "cbc", @@ -3729,7 +3534,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.6.0", - "core-foundation", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "num-bigint", + "security-framework-sys", +] + +[[package]] +name = "security-framework" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d0283c0a4a22a0f1b0e4edca251aa20b92fc96eaa09b84bec052f9415e9d71" +dependencies = [ + "bitflags 2.6.0", + "core-foundation 0.10.0", "core-foundation-sys", "libc", "security-framework-sys", @@ -3753,9 +3572,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.213" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" dependencies = [ "serde_derive", ] @@ -3783,20 +3602,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.213" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", "memchr", @@ -3822,7 +3641,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] @@ -3834,18 +3653,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - [[package]] name = "sha1" version = "0.10.6" @@ -3992,16 +3799,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51b8ad3dd187f0d4debab02ad65405a9919d6a4f7bce25bd64a258781063a53a" -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.5.7" @@ -4068,7 +3865,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] @@ -4090,42 +3887,15 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.79" +version = "2.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "system-deps" version = "6.2.2" @@ -4152,9 +3922,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", - "fastrand 2.1.1", + "fastrand", "once_cell", - "rustix 0.38.37", + "rustix", "windows-sys 0.59.0", ] @@ -4164,28 +3934,28 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f599bd7ca042cfdf8f4512b277c02ba102247820f9d9d4a9f521f496751a6ef" dependencies = [ - "rustix 0.38.37", + "rustix", "windows-sys 0.59.0", ] [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] @@ -4215,9 +3985,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", "bytes", @@ -4225,7 +3995,7 @@ dependencies = [ "mio 1.0.2", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.7", + "socket2", "tokio-macros", "tracing", "windows-sys 0.52.0", @@ -4239,7 +4009,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] @@ -4258,24 +4028,11 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.14", + "rustls 0.23.15", "rustls-pki-types", "tokio", ] -[[package]] -name = "tokio-util" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - [[package]] name = "toml" version = "0.8.19" @@ -4285,7 +4042,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.22", + "toml_edit", ] [[package]] @@ -4297,17 +4054,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow 0.5.40", -] - [[package]] name = "toml_edit" version = "0.22.22" @@ -4318,15 +4064,9 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.20", + "winnow", ] -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - [[package]] name = "tracing" version = "0.1.40" @@ -4346,7 +4086,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] @@ -4400,24 +4140,17 @@ dependencies = [ [[package]] name = "tree_magic_mini" -version = "3.1.5" +version = "3.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469a727cac55b41448315cc10427c069c618ac59bb6a4480283fcd811749bdc2" +checksum = "aac5e8971f245c3389a5a76e648bfc80803ae066a1243a75db0064d7c1129d63" dependencies = [ "fnv", - "home", "memchr", "nom", "once_cell", "petgraph", ] -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - [[package]] name = "twofish" version = "0.7.1" @@ -4483,6 +4216,27 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +[[package]] +name = "ureq" +version = "3.0.0-rc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a139c7262528ca928e9a4368281577453ae93953159d7d7b922165bd083049f" +dependencies = [ + "base64 0.22.1", + "cc", + "hoot", + "http", + "log", + "once_cell", + "percent-encoding", + "rustls 0.23.15", + "rustls-pemfile 2.2.0", + "rustls-pki-types", + "rustls-platform-verifier", + "utf-8", + "webpki-roots", +] + [[package]] name = "url" version = "2.5.2" @@ -4501,6 +4255,12 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + [[package]] name = "utf7-imap" version = "0.3.2" @@ -4545,12 +4305,6 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" -[[package]] -name = "waker-fn" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" - [[package]] name = "walkdir" version = "2.5.0" @@ -4561,15 +4315,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -4598,22 +4343,10 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "wasm-bindgen-macro" version = "0.2.95" @@ -4632,7 +4365,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4643,22 +4376,6 @@ version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" -[[package]] -name = "web-sys" -version = "0.3.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - [[package]] name = "webpki-roots" version = "0.26.6" @@ -4862,15 +4579,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" version = "0.6.20" @@ -4951,24 +4659,27 @@ checksum = "21bf7b4a78668416e1e8a332334e26fb2f377afe707f0c6feaf6ed5f9100133b" [[package]] name = "zbus" -version = "3.15.2" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" +checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" dependencies = [ "async-broadcast", + "async-executor", + "async-fs", + "async-io", + "async-lock", "async-process", "async-recursion", + "async-task", "async-trait", - "byteorder", - "derivative", + "blocking", "enumflags2", - "event-listener 2.5.3", + "event-listener", "futures-core", "futures-sink", "futures-util", "hex", "nix", - "once_cell", "ordered-stream", "rand", "serde", @@ -4978,7 +4689,7 @@ dependencies = [ "tokio", "tracing", "uds_windows", - "winapi", + "windows-sys 0.52.0", "xdg-home", "zbus_macros", "zbus_names", @@ -4987,23 +4698,22 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.15.2" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7131497b0f887e8061b430c530240063d33bf9455fa34438f388a245da69e0a5" +checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "regex", - "syn 1.0.109", + "syn 2.0.85", "zvariant_utils", ] [[package]] name = "zbus_names" -version = "2.6.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" dependencies = [ "serde", "static_assertions", @@ -5028,7 +4738,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] @@ -5048,18 +4758,17 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.85", ] [[package]] name = "zvariant" -version = "3.15.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eef2be88ba09b358d3b58aca6e41cd853631d44787f319a1383ca83424fb2db" +checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" dependencies = [ - "byteorder", + "endi", "enumflags2", - "libc", "serde", "static_assertions", "zvariant_derive", @@ -5067,24 +4776,24 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "3.15.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c24dc0bed72f5f90d1f8bb5b07228cbf63b3c6e9f82d82559d4bae666e7ed9" +checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.85", "zvariant_utils", ] [[package]] name = "zvariant_utils" -version = "1.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" +checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.85", ] diff --git a/Cargo.toml b/Cargo.toml index 2b557d8..b36fe4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,12 +21,10 @@ default = [ "maildir", #"notmuch", "smtp", - "sendmail", - + #"sendmail", #"keyring", #"oauth2", "wizard", - #"pgp-commands", #"pgp-gpg", #"pgp-native", @@ -38,14 +36,14 @@ notmuch = ["email-lib/notmuch", "pimalaya-tui/notmuch"] smtp = ["email-lib/smtp", "pimalaya-tui/smtp"] sendmail = ["email-lib/sendmail", "pimalaya-tui/sendmail"] -keyring = ["email-lib/keyring", "pimalaya-tui/keyring", "secret-lib?/keyring-tokio"] +keyring = ["email-lib/keyring", "pimalaya-tui/keyring", "secret-lib/keyring"] oauth2 = ["dep:oauth-lib", "email-lib/oauth2", "pimalaya-tui/oauth2", "keyring"] -wizard = ["dep:email_address", "dep:secret-lib", "email-lib/autoconfig", "pimalaya-tui/wizard"] +wizard = ["dep:email_address", "email-lib/autoconfig", "pimalaya-tui/wizard"] pgp = [] -pgp-commands = ["email-lib/pgp-commands", "mml-lib/pgp-commands", "pgp"] -pgp-gpg = ["email-lib/pgp-gpg", "mml-lib/pgp-gpg", "pgp"] -pgp-native = ["email-lib/pgp-native", "mml-lib/pgp-native", "pgp"] +pgp-commands = ["email-lib/pgp-commands", "mml-lib/pgp-commands", "pimalaya-tui/pgp-commands", "pgp"] +pgp-gpg = ["email-lib/pgp-gpg", "mml-lib/pgp-gpg", "pimalaya-tui/pgp-gpg", "pgp"] +pgp-native = ["email-lib/pgp-native", "mml-lib/pgp-native", "pimalaya-tui/pgp-native", "pgp"] [dependencies] ariadne = "0.2" @@ -57,17 +55,17 @@ color-eyre = "0.6" comfy-table = "7.1" crossterm = { version = "0.27", features = ["serde"] } dirs = "4" -email-lib = { version = "=0.25.0", default-features = false, features = ["derive", "thread", "tracing"] } +email-lib = { version = "1", default-features = false, features = ["tokio-rustls", "derive", "thread"] } email_address = { version = "0.2", optional = true } mail-builder = "0.3" md5 = "0.7" -mml-lib = { version = "=1.0.14", default-features = false, features = ["derive"] } -oauth-lib = { version = "=0.1.1", optional = true } +mml-lib = { version = "1", default-features = false, features = ["derive"] } +oauth-lib = { version = "1", optional = true } once_cell = "1.16" petgraph = "0.6" -pimalaya-tui = { version = "=0.1.0", default-features = false, features = ["email", "path", "cli", "himalaya", "tracing", "sled"] } -process-lib = { version = "=0.4.2", features = ["derive"] } -secret-lib = { version = "=0.4.6", default-features = false, features = ["command", "derive"], optional = true } +pimalaya-tui = { version = "1", default-features = false, features = ["email", "path", "cli", "himalaya", "tracing", "sled"] } +process-lib = { version = "1", features = ["derive"] } +secret-lib = { version = "1", default-features = false, features = ["tokio", "rustls", "command", "derive"] } serde = { version = "1", features = ["derive"] } serde_json = "1" shellexpand-utils = "=0.2.1" @@ -79,18 +77,16 @@ uuid = { version = "0.8", features = ["v4"] } [patch.crates-io] # IMAP +imap-codec = { git = "https://github.com/duesee/imap-codec" } imap-next = { git = "https://github.com/duesee/imap-next" } imap-client = { git = "https://github.com/pimalaya/imap-client" } # Pimalaya core -#email-lib = { git = "https://github.com/pimalaya/core" } -email-lib = { path = "/home/soywod/code/pimalaya/core/email" } -pgp-lib = { path = "/home/soywod/code/pimalaya/core/pgp" } -keyring-lib = { git = "https://github.com/pimalaya/core" } +email-lib = { git = "https://github.com/pimalaya/core" } +mml-lib = { git = "https://github.com/pimalaya/core" } oauth-lib = { git = "https://github.com/pimalaya/core" } process-lib = { git = "https://github.com/pimalaya/core" } secret-lib = { git = "https://github.com/pimalaya/core" } -# Pimalaya TUI -#pimalaya-tui = { git = "https://github.com/pimalaya/tui" } -pimalaya-tui = { path = "/home/soywod/code/pimalaya/tui" } +# Pimalaya non-core +pimalaya-tui = { git = "https://github.com/pimalaya/tui" } diff --git a/src/account/command/check_up.rs b/src/account/command/check_up.rs index 283391b..f608dd9 100644 --- a/src/account/command/check_up.rs +++ b/src/account/command/check_up.rs @@ -13,7 +13,10 @@ use email::notmuch::NotmuchContextBuilder; use email::sendmail::SendmailContextBuilder; #[cfg(feature = "smtp")] use email::smtp::SmtpContextBuilder; -use pimalaya_tui::terminal::{cli::printer::Printer, config::TomlConfig as _}; +use pimalaya_tui::{ + himalaya::config::{Backend, SendingBackend}, + terminal::{cli::printer::Printer, config::TomlConfig as _}, +}; use tracing::info; use crate::{account::arg::name::OptionalAccountNameArg, config::TomlConfig}; @@ -42,56 +45,65 @@ impl AccountCheckUpCommand { printer.log("Checking backend context integrity…")?; - #[cfg(feature = "maildir")] - if let Some(mdir_config) = toml_account_config.maildir { - printer.log("Checking Maildir integrity…")?; + match toml_account_config.backend { + #[cfg(feature = "maildir")] + Some(Backend::Maildir(mdir_config)) => { + printer.log("Checking Maildir integrity…")?; - let ctx = MaildirContextBuilder::new(account_config.clone(), Arc::new(mdir_config)); - BackendBuilder::new(account_config.clone(), ctx) - .check_up() - .await?; + let ctx = MaildirContextBuilder::new(account_config.clone(), Arc::new(mdir_config)); + BackendBuilder::new(account_config.clone(), ctx) + .check_up() + .await?; + } + #[cfg(feature = "imap")] + Some(Backend::Imap(imap_config)) => { + printer.log("Checking IMAP integrity…")?; + + let ctx = ImapContextBuilder::new(account_config.clone(), Arc::new(imap_config)) + .with_pool_size(1); + BackendBuilder::new(account_config.clone(), ctx) + .check_up() + .await?; + } + #[cfg(feature = "notmuch")] + Some(Backend::Notmuch(notmuch_config)) => { + printer.log("Checking Notmuch integrity…")?; + + let ctx = + NotmuchContextBuilder::new(account_config.clone(), Arc::new(notmuch_config)); + BackendBuilder::new(account_config.clone(), ctx) + .check_up() + .await?; + } + _ => (), } - #[cfg(feature = "imap")] - if let Some(imap_config) = toml_account_config.imap { - printer.log("Checking IMAP integrity…")?; + let sending_backend = toml_account_config + .message + .and_then(|msg| msg.send) + .and_then(|send| send.backend); - let ctx = ImapContextBuilder::new(account_config.clone(), Arc::new(imap_config)) - .with_pool_size(1); - BackendBuilder::new(account_config.clone(), ctx) - .check_up() - .await?; - } + match sending_backend { + #[cfg(feature = "smtp")] + Some(SendingBackend::Smtp(smtp_config)) => { + printer.log("Checking Smtp integrity…")?; - #[cfg(feature = "notmuch")] - if let Some(notmuch_config) = toml_account_config.notmuch { - printer.log("Checking Notmuch integrity…")?; + let ctx = SmtpContextBuilder::new(account_config.clone(), Arc::new(smtp_config)); + BackendBuilder::new(account_config.clone(), ctx) + .check_up() + .await?; + } + #[cfg(feature = "sendmail")] + Some(SendingBackend::Sendmail(sendmail_config)) => { + printer.log("Checking Sendmail integrity…")?; - let ctx = NotmuchContextBuilder::new(account_config.clone(), Arc::new(notmuch_config)); - BackendBuilder::new(account_config.clone(), ctx) - .check_up() - .await?; - } - - #[cfg(feature = "smtp")] - if let Some(smtp_config) = toml_account_config.smtp { - printer.log("Checking SMTP integrity…")?; - - let ctx = SmtpContextBuilder::new(account_config.clone(), Arc::new(smtp_config)); - BackendBuilder::new(account_config.clone(), ctx) - .check_up() - .await?; - } - - #[cfg(feature = "sendmail")] - if let Some(sendmail_config) = toml_account_config.sendmail { - printer.log("Checking Sendmail integrity…")?; - - let ctx = - SendmailContextBuilder::new(account_config.clone(), Arc::new(sendmail_config)); - BackendBuilder::new(account_config.clone(), ctx) - .check_up() - .await?; + let ctx = + SendmailContextBuilder::new(account_config.clone(), Arc::new(sendmail_config)); + BackendBuilder::new(account_config.clone(), ctx) + .check_up() + .await?; + } + _ => (), } printer.out("Checkup successfully completed!") diff --git a/src/account/command/configure.rs b/src/account/command/configure.rs index 7e15e58..12aba23 100644 --- a/src/account/command/configure.rs +++ b/src/account/command/configure.rs @@ -40,13 +40,14 @@ impl AccountConfigureCommand { if self.reset { #[cfg(feature = "imap")] - if let Some(config) = &toml_account_config.imap { - let reset = match &config.auth { - ImapAuthConfig::Passwd(config) => config.reset().await, + { + let reset = match toml_account_config.imap_auth_config() { + Some(ImapAuthConfig::Password(config)) => config.reset().await, #[cfg(feature = "oauth2")] - ImapAuthConfig::OAuth2(config) => config.reset().await, - ImapAuthConfig::MissingOAuth2Feature => unreachable!(), + Some(ImapAuthConfig::OAuth2(config)) => config.reset().await, + _ => Ok(()), }; + if let Err(err) = reset { warn!("error while resetting imap secrets: {err}"); debug!("error while resetting imap secrets: {err:?}"); @@ -54,12 +55,14 @@ impl AccountConfigureCommand { } #[cfg(feature = "smtp")] - if let Some(config) = &toml_account_config.smtp { - let reset = match &config.auth { - SmtpAuthConfig::Passwd(config) => config.reset().await, + { + let reset = match toml_account_config.smtp_auth_config() { + Some(SmtpAuthConfig::Passwd(config)) => config.reset().await, #[cfg(feature = "oauth2")] - SmtpAuthConfig::OAuth2(config) => config.reset().await, + Some(SmtpAuthConfig::OAuth2(config)) => config.reset().await, + _ => Ok(()), }; + if let Err(err) = reset { warn!("error while resetting smtp secrets: {err}"); debug!("error while resetting smtp secrets: {err:?}"); @@ -67,50 +70,47 @@ impl AccountConfigureCommand { } #[cfg(feature = "pgp")] - if let Some(ref config) = account_config.pgp { + if let Some(config) = &toml_account_config.pgp { config.reset().await?; } } #[cfg(feature = "imap")] - if let Some(config) = &toml_account_config.imap { - match &config.auth { - ImapAuthConfig::Passwd(config) => { - config - .configure(|| Ok(prompt::password("IMAP password")?)) - .await - } - #[cfg(feature = "oauth2")] - ImapAuthConfig::OAuth2(config) => { - config - .configure(|| Ok(prompt::secret("IMAP OAuth 2.0 clientsecret")?)) - .await - } - ImapAuthConfig::MissingOAuth2Feature => unreachable!(), - }?; - } + match toml_account_config.imap_auth_config() { + Some(ImapAuthConfig::Password(config)) => { + config + .configure(|| Ok(prompt::password("IMAP password")?)) + .await + } + #[cfg(feature = "oauth2")] + Some(ImapAuthConfig::OAuth2(config)) => { + config + .configure(|| Ok(prompt::secret("IMAP OAuth 2.0 client secret")?)) + .await + } + _ => Ok(()), + }?; #[cfg(feature = "smtp")] - if let Some(config) = &toml_account_config.smtp { - match &config.auth { - SmtpAuthConfig::Passwd(config) => { - config - .configure(|| Ok(prompt::password("SMTP password")?)) - .await - } - #[cfg(feature = "oauth2")] - SmtpAuthConfig::OAuth2(config) => { - config - .configure(|| Ok(prompt::secret("SMTP OAuth 2.0 client secret")?)) - .await - } - }?; - } + match toml_account_config.smtp_auth_config() { + Some(SmtpAuthConfig::Passwd(config)) => { + config + .configure(|| Ok(prompt::password("SMTP password")?)) + .await + } + #[cfg(feature = "oauth2")] + Some(SmtpAuthConfig::OAuth2(config)) => { + config + .configure(|| Ok(prompt::secret("SMTP OAuth 2.0 client secret")?)) + .await + } + _ => Ok(()), + }?; #[cfg(feature = "pgp")] - if let Some(ref config) = account_config.pgp { + if let Some(config) = &toml_account_config.pgp { config - .configure(&account_config.email, || { + .configure(&toml_account_config.email, || { Ok(prompt::password("PGP secret key password")?) }) .await?; diff --git a/src/config.rs b/src/config.rs index becded1..3f6d68f 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,4 +1,3 @@ -#[cfg(feature = "wizard")] use pimalaya_tui::himalaya::config::HimalayaTomlConfig; pub type TomlConfig = HimalayaTomlConfig; diff --git a/src/email/message/template/command/save.rs b/src/email/message/template/command/save.rs index 9e3967c..15da3b0 100644 --- a/src/email/message/template/command/save.rs +++ b/src/email/message/template/command/save.rs @@ -45,9 +45,11 @@ impl TemplateSaveCommand { .clone() .into_account_configs(self.account.name.as_deref())?; + let account_config = Arc::new(account_config); + let backend = BackendBuilder::new( Arc::new(toml_account_config), - Arc::new(account_config), + account_config.clone(), |builder| { builder .without_features() diff --git a/src/email/message/template/command/send.rs b/src/email/message/template/command/send.rs index 821323e..9cb2f2f 100644 --- a/src/email/message/template/command/send.rs +++ b/src/email/message/template/command/send.rs @@ -39,9 +39,11 @@ impl TemplateSendCommand { .clone() .into_account_configs(self.account.name.as_deref())?; + let account_config = Arc::new(account_config); + let backend = BackendBuilder::new( Arc::new(toml_account_config), - Arc::new(account_config), + account_config.clone(), |builder| { builder .without_features()