diff --git a/Cargo.lock b/Cargo.lock index f4aac82..c080c1d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,6 +8,15 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +[[package]] +name = "abnf-core" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182d1f071b906a9f59269c89af101515a5cbe58f723eb6717e7fe7445c0dea" +dependencies = [ + "nom", +] + [[package]] name = "addr2line" version = "0.21.0" @@ -35,14 +44,13 @@ dependencies = [ [[package]] name = "aes" -version = "0.7.5" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", "cpufeatures", - "opaque-debug", ] [[package]] @@ -95,47 +103,48 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -153,42 +162,16 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener 5.3.0", - "event-listener-strategy 0.5.1", + "event-listener-strategy", "futures-core", "pin-project-lite", ] -[[package]] -name = "async-executor" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand 2.0.2", - "futures-lite 2.3.0", - "slab", -] - -[[package]] -name = "async-fs" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "blocking", - "futures-lite 1.13.0", -] - [[package]] name = "async-io" version = "1.13.0" @@ -211,21 +194,21 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.2" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" +checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ - "async-lock 3.3.0", + "async-lock 3.4.0", "cfg-if", "concurrent-queue", "futures-io", "futures-lite 2.3.0", "parking", - "polling 3.6.0", - "rustix 0.38.32", + "polling 3.7.3", + "rustix 0.38.35", "slab", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -239,12 +222,12 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 4.0.3", - "event-listener-strategy 0.4.0", + "event-listener 5.3.1", + "event-listener-strategy", "pin-project-lite", ] @@ -261,54 +244,54 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.32", + "rustix 0.38.35", "windows-sys 0.48.0", ] [[package]] name = "async-recursion" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.77", ] [[package]] name = "async-signal" -version = "0.2.5" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" dependencies = [ - "async-io 2.3.2", - "async-lock 2.8.0", + "async-io 2.3.4", + "async-lock 3.4.0", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.32", + "rustix 0.38.35", "signal-hook-registry", "slab", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] name = "async-task" -version = "4.7.0" +version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.77", ] [[package]] @@ -319,9 +302,36 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "aws-lc-rs" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae74d9bd0a7530e8afd1770739ad34b36838829d6ad61818f9230f683f5ad77" +dependencies = [ + "aws-lc-sys", + "mirai-annotations", + "paste", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0f0e249228c6ad2d240c2dc94b714d711629d52bad946075d8e9b2f5391f0703" +dependencies = [ + "bindgen", + "cc", + "cmake", + "dunce", + "fs_extra", + "libc", + "paste", +] [[package]] name = "backtrace" @@ -352,27 +362,44 @@ checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] -name = "bitflags" -version = "1.3.2" +name = "bindgen" +version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags 2.6.0", + "cexpr", + "clang-sys", + "itertools", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.77", + "which", +] [[package]] name = "bitflags" -version = "2.5.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "block" -version = "0.1.6" +name = "bitflags" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block-buffer" @@ -384,53 +411,54 @@ dependencies = [ ] [[package]] -name = "block-modes" -version = "0.8.1" +name = "block-padding" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb03d1bed155d89dce0f845b7899b18a9a163e148fd004e1c28421a783e2d8e" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" dependencies = [ - "block-padding", - "cipher", + "generic-array", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "blocking" -version = "1.5.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ "async-channel", - "async-lock 3.3.0", "async-task", - "fastrand 2.0.2", "futures-io", "futures-lite 2.3.0", "piper", - "tracing", ] [[package]] -name = "bstr" -version = "1.9.1" +name = "bounded-static" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beb903daa49b43bcafb5d5eebe633f9ad638d8b16cd08f95fb05ee7bd099321" + +[[package]] +name = "bounded-static-derive" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "e0af050e27e5d57aa14975f97fe47a134c46a390f91819f23a625319a7111bfa" dependencies = [ - "memchr", - "regex-automata 0.4.6", - "serde", + "proc-macro2", + "quote", + "syn 2.0.77", ] [[package]] -name = "bufstream" -version = "0.1.4" +name = "bstr" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40e38929add23cdf8a366df9b0e088953150724bcbe5fc330b0d8eb3b328eec8" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" +dependencies = [ + "memchr", + "regex-automata 0.4.7", + "serde", +] [[package]] name = "bumpalo" @@ -446,15 +474,38 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" + +[[package]] +name = "cbc" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +dependencies = [ + "cipher", +] [[package]] name = "cc" -version = "1.0.94" +version = "1.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" +dependencies = [ + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cexpr" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] [[package]] name = "cfg-if" @@ -464,9 +515,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -474,7 +525,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -491,18 +542,30 @@ dependencies = [ [[package]] name = "cipher" -version = "0.3.0" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "generic-array", + "crypto-common", + "inout", +] + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", ] [[package]] name = "clap" -version = "4.5.4" +version = "4.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", "clap_derive", @@ -510,9 +573,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", @@ -523,41 +586,50 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.2" +version = "4.5.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79504325bf38b10165b02e89b4347300f855f273c4cb30c4a3209e6583275e" +checksum = "6d7db6eca8c205649e8d3ccd05aa5042b1800a784e56bc7c43524fde8abbfa9b" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.77", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "clap_mangen" -version = "0.2.20" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1dd95b5ebb5c1c54581dd6346f3ed6a79a3eef95dd372fc2ac13d535535300e" +checksum = "f17415fd4dfbea46e3274fcd8d368284519b358654772afb700dc2e8d2b24eeb" dependencies = [ "clap", "roff", ] +[[package]] +name = "cmake" +version = "0.1.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb1e43aa7fd152b1f968787f7dbcdeb306d1867ff373c69955211876c053f91a" +dependencies = [ + "cc", +] + [[package]] name = "color-eyre" version = "0.6.3" @@ -587,15 +659,15 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] @@ -613,12 +685,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "convert_case" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a24b1aaf0fd0ce8b45161144d6f42cd91677fd5940fd431183eb023b3a2b8" - [[package]] name = "core-foundation" version = "0.9.4" @@ -631,15 +697,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -665,9 +731,34 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crossterm" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" +dependencies = [ + "bitflags 1.3.2", + "crossterm_winapi", + "libc", + "mio 0.8.11", + "parking_lot", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] [[package]] name = "crypto-common" @@ -716,18 +807,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "derivative" @@ -740,18 +822,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "dialoguer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" -dependencies = [ - "console", - "shell-words", - "tempfile", - "zeroize", -] - [[package]] name = "digest" version = "0.10.7" @@ -781,16 +851,6 @@ dependencies = [ "dirs-sys 0.4.1", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - [[package]] name = "dirs-sys" version = "0.3.7" @@ -815,54 +875,53 @@ dependencies = [ ] [[package]] -name = "dirs-sys-next" -version = "0.1.2" +name = "dunce" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "either" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "email-lib" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28526bad9d46fcfb2c6385961aeb4b684546c965d18a12e5552ca4af7cf1f35e" +version = "0.25.0" +source = "git+https://github.com/pimalaya/core#d61f0e9c6fb26abd0d7f104e6839fcd02ef423bc" dependencies = [ "advisory-lock", "async-trait", "chrono", "chumsky", - "convert_case", "dirs 4.0.0", "email-macros", "email_address", "futures", "hickory-resolver", - "hyper", - "hyper-rustls", - "imap", - "imap-proto", + "http-body-util", + "hyper 1.4.1", + "hyper-rustls 0.27.2", + "hyper-util", + "imap-client", + "imap-next", "keyring-lib", - "log", "mail-builder", "mail-parser", - "maildirpp", + "maildirs", "mml-lib", "notify", - "notify-rust", "notmuch", "oauth-lib", "once_cell", - "ouroboros 0.15.6", + "ouroboros", "paste", "process-lib", "rayon", @@ -873,7 +932,7 @@ dependencies = [ "shellexpand-utils", "thiserror", "tokio", - "tokio-rustls 0.25.0", + "tracing", "tree_magic_mini", "urlencoding", "utf7-imap", @@ -886,17 +945,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f24a09fd651027f8764f8a12c12358715cb9bab622ab3125ede3dd6ae047c95" dependencies = [ "quote", - "syn 2.0.58", + "syn 2.0.77", ] [[package]] name = "email_address" -version = "0.2.4" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2153bd83ebc09db15bcbdc3e2194d901804952e3dc96967e1cd3b0c5c32d112" -dependencies = [ - "serde", -] +checksum = "e079f19b08ca6239f47f8ba8509c11cf3ea30095831f7fed61441475edd8c449" [[package]] name = "encode_unicode" @@ -922,14 +978,14 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.77", ] [[package]] name = "enumflags2" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" +checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" dependencies = [ "enumflags2_derive", "serde", @@ -937,13 +993,13 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" +checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.77", ] [[package]] @@ -952,20 +1008,11 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" -[[package]] -name = "erased-serde" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" -dependencies = [ - "serde", -] - [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -990,20 +1037,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener" -version = "5.3.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", @@ -1012,21 +1048,11 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener 4.0.3", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332f51cb23d20b0de8458b86580878211da09bcd4503cb579c225b3d124cabb3" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.3.0", + "event-listener 5.3.1", "pin-project-lite", ] @@ -1051,20 +1077,20 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.2" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] @@ -1109,6 +1135,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "futures" version = "0.3.30" @@ -1178,10 +1210,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.0.2", "futures-core", - "futures-io", - "parking", "pin-project-lite", ] @@ -1193,7 +1222,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.77", ] [[package]] @@ -1227,20 +1256,38 @@ dependencies = [ ] [[package]] -name = "generic-array" -version = "0.14.7" +name = "fuzzy-matcher" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94" dependencies = [ - "typenum", - "version_check", + "thread_local", ] [[package]] -name = "gethostname" -version = "0.4.3" +name = "fxhash" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "gethostname" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" dependencies = [ "libc", "windows-targets 0.48.5", @@ -1248,9 +1295,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -1265,6 +1312,12 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + [[package]] name = "h2" version = "0.3.26" @@ -1276,7 +1329,26 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "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", @@ -1286,9 +1358,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", @@ -1312,6 +1384,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -1320,9 +1398,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hickory-proto" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "091a6fbccf4860009355e3efc52ff4acf37a63489aad7435372d44ceeb6fbbcf" +checksum = "07698b8420e2f0d6447a436ba999ec85d8fbf2a398bbd737b82cac4a2e96e512" dependencies = [ "async-trait", "cfg-if", @@ -1335,7 +1413,7 @@ dependencies = [ "ipnet", "once_cell", "rand", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "thiserror", "tinyvec", @@ -1347,9 +1425,9 @@ dependencies = [ [[package]] name = "hickory-resolver" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35b8f021164e6a984c9030023544c57789c51760065cd510572fedcfb04164e8" +checksum = "28757f23aa75c98f254cf0405e6d8c25b831b32921b050a66692427679b1f243" dependencies = [ "cfg-if", "futures-util", @@ -1360,7 +1438,7 @@ dependencies = [ "parking_lot", "rand", "resolv-conf", - "rustls 0.21.10", + "rustls 0.21.12", "smallvec", "thiserror", "tokio", @@ -1417,6 +1495,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -1424,15 +1513,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "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", ] [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -1442,28 +1554,48 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.6", + "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" @@ -1471,15 +1603,52 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", - "hyper", - "log", - "rustls 0.21.10", - "rustls-native-certs 0.6.3", + "http 0.2.12", + "hyper 0.14.30", + "rustls 0.21.12", "tokio", "tokio-rustls 0.24.1", ] +[[package]] +name = "hyper-rustls" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.4.1", + "hyper-util", + "log", + "rustls 0.23.12", + "rustls-native-certs", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.0", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +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", + "tower-service", + "tracing", +] + [[package]] name = "iana-time-zone" version = "0.1.60" @@ -1491,7 +1660,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core 0.52.0", + "windows-core", ] [[package]] @@ -1530,29 +1699,57 @@ dependencies = [ ] [[package]] -name = "imap" -version = "3.0.0-alpha.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd82d66124b97aabeba7a4744b82bf244160e56611d8be9f89b74ed4ee481f1e" +name = "imap-client" +version = "0.1.4" +source = "git+https://github.com/pimalaya/imap-client#02d6bce5513c8ec6ac3aff0e7b13ce4ae87dbe1f" dependencies = [ - "base64 0.22.0", - "bufstream", + "imap-next", + "once_cell", + "rustls-native-certs", + "thiserror", + "tokio", + "tokio-rustls 0.26.0", + "tracing", +] + +[[package]] +name = "imap-codec" +version = "2.0.0-alpha.4" +source = "git+https://github.com/duesee/imap-codec#95de04494f89464a59c114859217e6119a18d426" +dependencies = [ + "abnf-core", + "base64 0.22.1", "chrono", - "imap-proto", - "lazy_static", + "imap-types", + "log", "nom", - "ouroboros 0.18.3", - "regex", - "rustls-connector", ] [[package]] -name = "imap-proto" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "305c25c6e69416059e3396c4a062b84dc7b0a782cd4c84d82bab268eb0421ec7" +name = "imap-next" +version = "0.2.0" +source = "git+https://github.com/duesee/imap-next?branch=jakoschiko_poison-message-with-fragmentizer#a8c5a7f312da145ead1ef8637abb4c54e76be077" dependencies = [ - "nom", + "bytes", + "imap-codec", + "rustls 0.23.12", + "thiserror", + "tokio", + "tokio-rustls 0.26.0", + "tracing", +] + +[[package]] +name = "imap-types" +version = "2.0.0-alpha.3" +source = "git+https://github.com/duesee/imap-codec#95de04494f89464a59c114859217e6119a18d426" +dependencies = [ + "base64 0.22.1", + "bounded-static", + "bounded-static-derive", + "chrono", + "rand", + "thiserror", ] [[package]] @@ -1563,9 +1760,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "2.2.6" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown", @@ -1604,11 +1801,38 @@ dependencies = [ "libc", ] +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "block-padding", + "generic-array", +] + +[[package]] +name = "inquire" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fddf93031af70e75410a2511ec04d49e758ed2f26dad3404a934e0fb45cc12a" +dependencies = [ + "bitflags 2.6.0", + "crossterm", + "dyn-clone", + "fuzzy-matcher", + "fxhash", + "newline-converter", + "once_cell", + "unicode-segmentation", + "unicode-width", +] + [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -1619,7 +1843,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", "windows-sys 0.48.0", ] @@ -1630,7 +1854,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.6", + "socket2 0.5.7", "widestring", "windows-sys 0.48.0", "winreg", @@ -1642,6 +1866,12 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.12.1" @@ -1657,20 +1887,29 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] [[package]] name = "keyring" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be8bc4c6b6e9d85ecdad090fcf342a9216f53d747a537cc05e3452fd650ca46" +checksum = "363387f0019d714aa60cc30ab4fe501a747f4c08fc58f069dd14be971bd495a0" dependencies = [ "lazy_static", "linux-keyutils", @@ -1679,9 +1918,9 @@ dependencies = [ [[package]] name = "keyring-lib" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2e6d01e57f1b382ba5a1c40ef866855e8bab15f7caa4033480db80a5b9b9aff" +checksum = "eb0a843c3edec50d5f5541e72c4068ab5bc273efa16b4ba51c5825a872ad8a9a" dependencies = [ "keyring", "log", @@ -1713,15 +1952,31 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" + +[[package]] +name = "libloading" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] [[package]] name = "libredox" @@ -1729,8 +1984,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", + "redox_syscall", ] [[package]] @@ -1745,7 +2001,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "761e49ec5fd8a5a463f9b84e877c373d888935b71c6be78f3767fe2ae6bed18e" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", ] @@ -1757,15 +2013,15 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -1773,9 +2029,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru-cache" @@ -1786,24 +2042,11 @@ dependencies = [ "linked-hash-map", ] -[[package]] -name = "mac-notification-sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51fca4d74ff9dbaac16a01b924bc3693fa2bba0862c2c633abc73f9a8ea21f64" -dependencies = [ - "cc", - "dirs-next", - "objc-foundation", - "objc_id", - "time", -] - [[package]] name = "mail-builder" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef70f53409852d2612f2249810cbbe0c9931ca25b739b734bafc7f61d88051d4" +checksum = "25f5871d5270ed80f2ee750b95600c8d69b05f8653ad3be913b2ad2e924fefcb" dependencies = [ "gethostname", ] @@ -1818,23 +2061,14 @@ dependencies = [ ] [[package]] -name = "maildirpp" -version = "0.0.2" +name = "maildirs" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739f52fb085592150b1a1ece82ffc4e29e1621b222141e709a64943282f0e6e5" +checksum = "0c95df9b6f086c16a471a5a2eda2e42b438a52d4cd5bd3381c533fb19709aef6" dependencies = [ "gethostname", - "log", "thiserror", -] - -[[package]] -name = "malloc_buf" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -dependencies = [ - "libc", + "walkdir", ] [[package]] @@ -1854,9 +2088,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memoffset" @@ -1890,9 +2124,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] @@ -1909,11 +2143,29 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mio" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "wasi", + "windows-sys 0.52.0", +] + +[[package]] +name = "mirai-annotations" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1" + [[package]] name = "mml-lib" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c6ac41c419e7857fdf7104a2f750c0d575969fa32f50a9d370ea3a3bcab1bf" +checksum = "875723012f6a5fb47a6b42ae947e44286ba61498007836ebe4fc60bc84c6899f" dependencies = [ "async-recursion", "chumsky", @@ -1937,35 +2189,37 @@ checksum = "999681fe3c0524336e98ece1c25ee4278607f25cc1e361ad0f9201c8bf56dc2c" [[package]] name = "neverest" -version = "1.0.0-beta" +version = "1.0.0" dependencies = [ "clap", "clap_complete", "clap_mangen", "color-eyre", "console", - "dialoguer", - "dirs 4.0.0", "email-lib", - "email_address", - "erased-serde", "indicatif", "oauth-lib", "once_cell", + "pimalaya-tui", "secret-lib", "serde", - "serde-toml-merge", "serde_json", - "shellexpand-utils", - "termcolor", "tokio", "toml", - "toml_edit 0.22.9", "tracing", "tracing-error", "tracing-subscriber", ] +[[package]] +name = "newline-converter" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b6b097ecb1cbfed438542d16e84fd7ad9b0c76c8a65b7f9039212a3d14dc7f" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "nix" version = "0.26.4" @@ -1994,30 +2248,17 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "filetime", "inotify", "kqueue", "libc", "log", - "mio", + "mio 0.8.11", "walkdir", "windows-sys 0.48.0", ] -[[package]] -name = "notify-rust" -version = "4.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "827c5edfa80235ded4ab3fe8e9dc619b4f866ef16fe9b1c6b8a7f8692c0f2226" -dependencies = [ - "log", - "mac-notification-sys", - "serde", - "tauri-winrt-notification", - "zbus", -] - [[package]] name = "notmuch" version = "0.8.0" @@ -2040,9 +2281,9 @@ dependencies = [ [[package]] name = "num" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", @@ -2054,30 +2295,23 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - [[package]] name = "num-integer" version = "0.1.46" @@ -2089,9 +2323,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -2100,11 +2334,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -2112,23 +2345,13 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "number_prefix" version = "0.4.0" @@ -2138,8 +2361,7 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "oauth-lib" version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd81f50b3bdf9656f511a776e5a76c249e00d7ce5c0c9071d0b923177d9248d" +source = "git+https://github.com/pimalaya/core#d61f0e9c6fb26abd0d7f104e6839fcd02ef423bc" dependencies = [ "log", "oauth2", @@ -2158,7 +2380,7 @@ dependencies = [ "base64 0.13.1", "chrono", "getrandom", - "http", + "http 0.2.12", "rand", "reqwest", "serde", @@ -2169,35 +2391,6 @@ dependencies = [ "url", ] -[[package]] -name = "objc" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" -dependencies = [ - "malloc_buf", -] - -[[package]] -name = "objc-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" -dependencies = [ - "block", - "objc", - "objc_id", -] - -[[package]] -name = "objc_id" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" -dependencies = [ - "objc", -] - [[package]] name = "object" version = "0.32.2" @@ -2213,12 +2406,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - [[package]] name = "openssl-probe" version = "0.1.5" @@ -2257,45 +2444,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1358bd1558bd2a083fed428ffeda486fbfb323e698cdda7794259d592ca72db" dependencies = [ "aliasable", - "ouroboros_macro 0.15.6", -] - -[[package]] -name = "ouroboros" -version = "0.18.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b7be5a8a3462b752f4be3ff2b2bf2f7f1d00834902e46be2a4d68b87b0573c" -dependencies = [ - "aliasable", - "ouroboros_macro 0.18.3", - "static_assertions", + "ouroboros_macro", ] [[package]] name = "ouroboros_macro" version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" -dependencies = [ - "Inflector", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ouroboros_macro" -version = "0.18.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b645dcde5f119c2c454a92d0dfa271a2a3b205da92e4292a68ead4bdbfde1f33" +checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" dependencies = [ - "heck 0.4.1", - "itertools", + "Inflector", + "proc-macro-error", "proc-macro2", - "proc-macro2-diagnostics", "quote", - "syn 2.0.58", + "syn 1.0.109", ] [[package]] @@ -2318,9 +2480,9 @@ checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -2328,22 +2490,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "percent-encoding" @@ -2353,14 +2515,60 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "petgraph" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", "indexmap", ] +[[package]] +name = "pimalaya-tui" +version = "0.1.0" +source = "git+https://github.com/pimalaya/tui#473e39d532befe795a7f52aee58165130a0eb9ee" +dependencies = [ + "clap", + "color-eyre", + "crossterm", + "dirs 4.0.0", + "email-lib", + "email_address", + "inquire", + "oauth-lib", + "secret-lib", + "serde", + "serde-toml-merge", + "serde_json", + "shellexpand-utils", + "thiserror", + "toml", + "toml_edit 0.22.20", + "tracing", + "tracing-error", + "tracing-subscriber", +] + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "pin-project-lite" version = "0.2.14" @@ -2375,12 +2583,12 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.1" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", - "fastrand 2.0.2", + "fastrand 2.1.1", "futures-io", ] @@ -2402,36 +2610,43 @@ dependencies = [ [[package]] name = "polling" -version = "3.6.0" +version = "3.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c976a60b2d7e99d6f229e414670a9b85d13ac305cc6d1e9c134de58c5aaaf6" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi", + "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.32", + "rustix 0.38.35", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] -name = "powerfmt" -version = "0.2.0" +name = "ppv-lite86" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] -name = "ppv-lite86" -version = "0.2.17" +name = "prettyplease" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" +dependencies = [ + "proc-macro2", + "syn 2.0.77", +] [[package]] name = "proc-macro-crate" @@ -2469,26 +2684,13 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] -[[package]] -name = "proc-macro2-diagnostics" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.58", - "version_check", - "yansi", -] - [[package]] name = "process-lib" version = "0.4.2" @@ -2507,20 +2709,11 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -[[package]] -name = "quick-xml" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" -dependencies = [ - "memchr", -] - [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -2577,18 +2770,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", @@ -2597,14 +2790,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -2629,13 +2822,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] [[package]] @@ -2652,9 +2845,9 @@ checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" @@ -2667,11 +2860,11 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-rustls", + "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", @@ -2679,7 +2872,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "serde", "serde_json", @@ -2724,15 +2917,21 @@ dependencies = [ [[package]] name = "roff" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b833d8d034ea094b1ea68aa6d5c740e0d04bad9d16568d08ba6f76823a114316" +checksum = "88f8660c1ff60292143c98d08fc6e2f654d722db50410e3f3797d40baaf9d8f3" [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" @@ -2750,22 +2949,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys 0.4.14", "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring", @@ -2775,51 +2974,27 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.3" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99008d7ad0bbbea527ec27bddbc0e432c5b87d8175178cee68d2eec9c4a1813c" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ + "aws-lc-rs", "log", - "ring", + "once_cell", "rustls-pki-types", - "rustls-webpki 0.102.2", + "rustls-webpki 0.102.7", "subtle", "zeroize", ] -[[package]] -name = "rustls-connector" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5bd40675c79c896f46d0031bf64c448b35e583dd2bc949751ddd800351e453a" -dependencies = [ - "log", - "rustls 0.22.3", - "rustls-native-certs 0.7.0", - "rustls-pki-types", - "rustls-webpki 0.102.2", -] - -[[package]] -name = "rustls-native-certs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" -dependencies = [ - "openssl-probe", - "rustls-pemfile 1.0.4", - "schannel", - "security-framework", -] - [[package]] name = "rustls-native-certs" -version = "0.7.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", - "rustls-pemfile 2.1.2", + "rustls-pemfile 2.1.3", "rustls-pki-types", "schannel", "security-framework", @@ -2836,19 +3011,19 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ - "base64 0.22.0", + "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.4.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-webpki" @@ -2862,10 +3037,11 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.2" +version = "0.102.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" +checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -2873,9 +3049,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -2913,9 +3089,9 @@ dependencies = [ [[package]] name = "secret-lib" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d99d0df4b8cb27c13c953abaf74bd089922a783fad99cd2b08b369cf7fabcbc9" +checksum = "f3d34288431a1ca4930e49cca081ce9368dc457eda755289cedf8cf32464a25a" dependencies = [ "keyring-lib", "log", @@ -2926,12 +3102,12 @@ dependencies = [ [[package]] name = "secret-service" -version = "3.0.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da1a5ad4d28c03536f82f77d9f36603f5e37d8869ac98f0a750d5b5686d8d95" +checksum = "b5204d39df37f06d1944935232fd2dfe05008def7ca599bf28c0800366c8a8f9" dependencies = [ "aes", - "block-modes", + "cbc", "futures-util", "generic-array", "hkdf", @@ -2945,11 +3121,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -2958,9 +3134,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -2968,18 +3144,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.197" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] [[package]] name = "serde-toml-merge" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88075e75b01384301454b1c188243552c674263c0c0c3c7ed5dd82291b20798f" +checksum = "93b4e415d6bff989e5e48649ca9b8b4d4997cb069a0c90a84bfd38c7df5e3968" dependencies = [ "toml", ] @@ -2998,22 +3174,23 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.115" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -3036,14 +3213,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.77", ] [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -3091,12 +3268,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shell-words" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" - [[package]] name = "shellexpand" version = "3.1.0" @@ -3119,11 +3290,38 @@ dependencies = [ "thiserror", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" +dependencies = [ + "libc", + "mio 0.8.11", + "signal-hook", +] + [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -3155,9 +3353,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -3189,9 +3387,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -3206,9 +3404,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.58" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -3242,35 +3440,17 @@ dependencies = [ "libc", ] -[[package]] -name = "tauri-winrt-notification" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006851c9ccefa3c38a7646b8cec804bb429def3da10497bfa977179869c3e8e2" -dependencies = [ - "quick-xml", - "windows", -] - [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", - "fastrand 2.0.2", - "rustix 0.38.32", - "windows-sys 0.52.0", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", + "fastrand 2.1.1", + "once_cell", + "rustix 0.38.35", + "windows-sys 0.59.0", ] [[package]] @@ -3279,28 +3459,28 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "rustix 0.38.32", + "rustix 0.38.35", "windows-sys 0.48.0", ] [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.77", ] [[package]] @@ -3313,30 +3493,11 @@ dependencies = [ "once_cell", ] -[[package]] -name = "time" -version = "0.3.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "num-conv", - "powerfmt", - "serde", - "time-core", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -3349,32 +3510,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", - "mio", - "num_cpus", + "mio 1.0.2", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.6", + "socket2 0.5.7", "tokio-macros", "tracing", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.77", ] [[package]] @@ -3383,52 +3543,51 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.10", + "rustls 0.21.12", "tokio", ] [[package]] name = "tokio-rustls" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.22.3", + "rustls 0.23.12", "rustls-pki-types", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] name = "toml" -version = "0.8.12" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.9", + "toml_edit 0.22.20", ] [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -3446,22 +3605,43 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.9" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.6", + "winnow 0.6.18", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -3482,7 +3662,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.77", ] [[package]] @@ -3536,9 +3716,9 @@ dependencies = [ [[package]] name = "tree_magic_mini" -version = "3.1.4" +version = "3.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ee137597cdb361b55a4746983e4ac1b35ab6024396a419944ad473bb915265" +checksum = "469a727cac55b41448315cc10427c069c618ac59bb6a4480283fcd811749bdc2" dependencies = [ "fnv", "home", @@ -3592,11 +3772,17 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-segmentation" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "untrusted" @@ -3606,9 +3792,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna 0.5.0", @@ -3635,9 +3821,9 @@ dependencies = [ [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "valuable" @@ -3647,15 +3833,15 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "waker-fn" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] name = "walkdir" @@ -3684,34 +3870,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -3721,9 +3908,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3731,28 +3918,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -3764,6 +3951,18 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.35", +] + [[package]] name = "widestring" version = "1.1.0" @@ -3788,11 +3987,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -3801,32 +4000,13 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.51.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" -dependencies = [ - "windows-core 0.51.1", - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-core" -version = "0.51.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-core" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3844,7 +4024,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -3864,18 +4053,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -3886,9 +4075,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -3898,9 +4087,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -3910,15 +4099,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -3928,9 +4117,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -3940,9 +4129,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -3952,9 +4141,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -3964,9 +4153,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -3979,9 +4168,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.6" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c976aaaa0e1f90dbb21e9587cdaf1d9679a1cde8875c0d6bd83ab96a208352" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -3998,25 +4187,19 @@ dependencies = [ [[package]] name = "xdg-home" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e5a325c3cb8398ad6cf859c1135b25dd29e186679cf2da7581d9679f63b38e" +checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" dependencies = [ "libc", - "winapi", + "windows-sys 0.59.0", ] [[package]] name = "xml-rs" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" - -[[package]] -name = "yansi" -version = "1.0.1" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" +checksum = "539a77ee7c0de333dcc6da69b177380a0b81e0dacfa4f7344c465a36871ee601" [[package]] name = "zbus" @@ -4025,15 +4208,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" dependencies = [ "async-broadcast", - "async-executor", - "async-fs", - "async-io 1.13.0", - "async-lock 2.8.0", "async-process", "async-recursion", - "async-task", "async-trait", - "blocking", "byteorder", "derivative", "enumflags2", @@ -4087,29 +4264,44 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.77", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] [[package]] name = "zvariant" diff --git a/Cargo.toml b/Cargo.toml index bd17b3f..fea75db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "neverest" description = "CLI to synchronize, backup and restore emails" -version = "1.0.0-beta" +version = "1.0.0" authors = ["soywod "] edition = "2021" license = "MIT" @@ -17,72 +17,50 @@ rustdoc-args = ["--cfg", "docsrs", "--document-private-items"] [features] default = [ - # Enables the IMAP backend, which allows the synchronizer to connect - # to remote IMAP servers. - # - # doc: "imap", - - # Enables the Maildir backend, which allows the synchronizer to - # access your emails locally, using the file system. - # - # spec: - # doc: "maildir", + "notmuch", - # Enables the Notmuch backend, which allows the synchronizer to - # access your emails locally, using the Notmuch email system. This - # feature turns on the maildir feature, since Notmuch requires a - # Maildir folder to operate. This feature also requires the - # libnotmuch to be installed and available on your system. - # - # site: - # doc: - # "notmuch", - - # Enables the wizard configurator, which interactively helps you to - # configure your default account. It also automatically discovers - # remote IMAP settings from your email address. - # - # doc: + "keyring", + "oauth2", "wizard", ] -imap = ["email-lib/imap"] -maildir = ["email-lib/maildir"] -notmuch = ["email-lib/notmuch"] -wizard = [ - "dep:console", - "dep:email_address", - "dep:oauth-lib", - "dep:secret-lib", - "dep:toml_edit", - "email-lib/account-discovery", -] +imap = ["email-lib/imap", "pimalaya-tui/imap"] +maildir = ["email-lib/maildir", "pimalaya-tui/maildir"] +notmuch = ["email-lib/notmuch", "pimalaya-tui/notmuch"] + +keyring = ["email-lib/keyring", "pimalaya-tui/keyring", "secret-lib?/keyring-tokio"] +oauth2 = ["dep:oauth-lib", "email-lib/oauth2", "pimalaya-tui/oauth2", "keyring"] +wizard = ["dep:console", "dep:secret-lib", "email-lib/autoconfig"] [dependencies] clap = { version = "4.4", features = ["derive", "wrap_help"] } clap_complete = "4.4" clap_mangen = "0.2" color-eyre = "0.6" -console = { version = "0.15.2", optional = true } -dialoguer = "0.10.2" -dirs = "4" -email-lib = { version = "=0.24.0", default-features = false, features = ["account-sync", "derive"] } -email_address = { version = "0.2.4", optional = true } -erased-serde = "0.3" -indicatif = "0.17" +email-lib = { version = "=0.25.0", default-features = false, features = ["pool", "sync", "derive"] } oauth-lib = { version = "=0.1.1", optional = true } once_cell = "1.16" -secret-lib = { version = "=0.4.4", optional = true, features = ["derive"] } +pimalaya-tui = { version = "=0.1.0", default-features = false, features = ["cli", "config", "tracing"] } +secret-lib = { version = "=0.4.6", optional = true, features = ["derive"] } serde = { version = "1", features = ["derive"] } -serde-toml-merge = "0.3" serde_json = "1" -shellexpand-utils = "=0.2.1" -termcolor = "1" tokio = { version = "1.23", default-features = false, features = ["macros", "rt-multi-thread"] } toml = "0.8" -toml_edit = { version = "0.22", optional = true } tracing = "0.1" tracing-error = "0.2" tracing-subscriber = { version = "0.3", features = ["env-filter"] } + +# TODO: delete console as soon as we can replace them with a crossterm +# alternative +console = { version = "0.15.2", optional = true } +indicatif = "0.17" + +[patch.crates-io] +imap-codec = { git = "https://github.com/duesee/imap-codec" } +imap-next = { git = "https://github.com/duesee/imap-next", branch = "jakoschiko_poison-message-with-fragmentizer" } +imap-client = { git = "https://github.com/pimalaya/imap-client" } +oauth-lib = { git = "https://github.com/pimalaya/core" } +email-lib = { git = "https://github.com/pimalaya/core" } +pimalaya-tui = { git = "https://github.com/pimalaya/tui" } diff --git a/src/account/command/configure.rs b/src/account/command/configure.rs index cfc0064..304ad44 100644 --- a/src/account/command/configure.rs +++ b/src/account/command/configure.rs @@ -4,11 +4,11 @@ use color_eyre::eyre::Result; use email::imap::config::ImapAuthConfig; #[cfg(feature = "smtp")] use email::smtp::config::SmtpAuthConfig; +use pimalaya_tui::{cli::printer::Printer, prompt}; use tracing::{debug, info, instrument, warn}; use crate::{ account::arg::name::OptionalAccountNameArg, backend::config::BackendConfig, config::Config, - printer::Printer, ui::prompt, }; /// Configure an account. @@ -65,12 +65,12 @@ impl ConfigureAccountCommand { BackendConfig::Imap(config) => match &config.auth { ImapAuthConfig::Passwd(config) => { config - .configure(|| prompt::passwd("Left IMAP password")) + .configure(|| Ok(prompt::password("Left IMAP password")?)) .await?; } ImapAuthConfig::OAuth2(config) => { config - .configure(|| prompt::secret("Left IMAP OAuth 2.0 client secret")) + .configure(|| Ok(prompt::secret("Left IMAP OAuth 2.0 client secret")?)) .await?; } }, @@ -82,12 +82,12 @@ impl ConfigureAccountCommand { BackendConfig::Imap(config) => match &config.auth { ImapAuthConfig::Passwd(config) => { config - .configure(|| prompt::passwd("Right IMAP password")) + .configure(|| Ok(prompt::password("Right IMAP password")?)) .await?; } ImapAuthConfig::OAuth2(config) => { config - .configure(|| prompt::secret("Right IMAP OAuth 2.0 client secret")) + .configure(|| Ok(prompt::secret("Right IMAP OAuth 2.0 client secret")?)) .await?; } }, @@ -95,6 +95,6 @@ impl ConfigureAccountCommand { }; let re = if self.reset { "re" } else { "" }; - printer.print(format!("Account {name} successfully {re}configured!")) + printer.out(format!("Account {name} successfully {re}configured!")) } } diff --git a/src/account/command/doctor.rs b/src/account/command/doctor.rs index 10ee3cd..df26b96 100644 --- a/src/account/command/doctor.rs +++ b/src/account/command/doctor.rs @@ -3,6 +3,8 @@ //! This module contains the [`clap`] command for checking up left and //! right backends integrity of a given account. +use std::sync::Arc; + use clap::Parser; use color_eyre::eyre::Result; use email::backend::{Backend, BackendBuilder}; @@ -12,12 +14,11 @@ use email::imap::{ImapContextBuilder, ImapContextSync}; use email::maildir::{MaildirContextBuilder, MaildirContextSync}; #[cfg(feature = "notmuch")] use email::notmuch::{NotmuchContextBuilder, NotmuchContextSync}; -use std::sync::Arc; +use pimalaya_tui::cli::printer::Printer; use tracing::{info, instrument}; use crate::{ account::arg::name::OptionalAccountNameArg, backend::config::BackendConfig, config::Config, - printer::Printer, }; /// Check up the given account. @@ -37,7 +38,7 @@ impl DoctorAccountCommand { info!("executing doctor account command"); let (name, config) = config.into_account_config(self.account.name.as_deref())?; - printer.print_log(format!("Checking `{name}` account integrity…"))?; + printer.log(format!("Checking `{name}` account integrity…"))?; let folder_filter = config.folder.map(|c| c.filters).unwrap_or_default(); let envelope_filter = config.envelope.map(|c| c.filters).unwrap_or_default(); @@ -51,7 +52,7 @@ impl DoctorAccountCommand { match left_backend { #[cfg(feature = "imap")] BackendConfig::Imap(imap_config) => { - printer.print_log("Checking left IMAP integrity…")?; + printer.log("Checking left IMAP integrity…")?; let ctx = ImapContextBuilder::new(left_config.clone(), Arc::new(imap_config)); BackendBuilder::new(left_config.clone(), ctx) .check_up::>() @@ -59,7 +60,7 @@ impl DoctorAccountCommand { } #[cfg(feature = "maildir")] BackendConfig::Maildir(maildir_config) => { - printer.print_log("Checking left Maildir integrity…")?; + printer.log("Checking left Maildir integrity…")?; let ctx = MaildirContextBuilder::new(left_config.clone(), Arc::new(maildir_config)); BackendBuilder::new(left_config.clone(), ctx) .check_up::>() @@ -67,7 +68,7 @@ impl DoctorAccountCommand { } #[cfg(feature = "notmuch")] BackendConfig::Notmuch(notmuch_config) => { - printer.print_log("Checking left Notmuch integrity…")?; + printer.log("Checking left Notmuch integrity…")?; let ctx = NotmuchContextBuilder::new(left_config.clone(), Arc::new(notmuch_config)); BackendBuilder::new(left_config.clone(), ctx) .check_up::>() @@ -83,7 +84,7 @@ impl DoctorAccountCommand { match right_backend { #[cfg(feature = "imap")] BackendConfig::Imap(imap_config) => { - printer.print_log("Checking right IMAP integrity…")?; + printer.log("Checking right IMAP integrity…")?; let ctx = ImapContextBuilder::new(right_config.clone(), Arc::new(imap_config)); BackendBuilder::new(right_config.clone(), ctx) .check_up::>() @@ -91,7 +92,7 @@ impl DoctorAccountCommand { } #[cfg(feature = "maildir")] BackendConfig::Maildir(maildir_config) => { - printer.print_log("Checking right Maildir integrity…")?; + printer.log("Checking right Maildir integrity…")?; let ctx = MaildirContextBuilder::new(right_config.clone(), Arc::new(maildir_config)); BackendBuilder::new(right_config.clone(), ctx) @@ -100,7 +101,7 @@ impl DoctorAccountCommand { } #[cfg(feature = "notmuch")] BackendConfig::Notmuch(notmuch_config) => { - printer.print_log("Checking right Notmuch integrity…")?; + printer.log("Checking right Notmuch integrity…")?; let ctx = NotmuchContextBuilder::new(right_config.clone(), Arc::new(notmuch_config)); BackendBuilder::new(right_config.clone(), ctx) @@ -109,6 +110,6 @@ impl DoctorAccountCommand { } }; - printer.print("Checkup successfully completed!") + printer.out("Checkup successfully completed!") } } diff --git a/src/account/command/sync.rs b/src/account/command/sync.rs index 173539c..0f535d6 100644 --- a/src/account/command/sync.rs +++ b/src/account/command/sync.rs @@ -3,6 +3,11 @@ //! This module contains the [`clap`] command for synchronizing two //! backends of a given account. +use std::{ + collections::{BTreeSet, HashMap}, + sync::{Arc, Mutex}, +}; + use clap::{ArgAction, Parser}; use color_eyre::eyre::Result; #[cfg(feature = "imap")] @@ -19,15 +24,11 @@ use email::{ }; use indicatif::{MultiProgress, ProgressBar, ProgressFinish, ProgressStyle}; use once_cell::sync::Lazy; -use std::{ - collections::{BTreeSet, HashMap}, - sync::{Arc, Mutex}, -}; +use pimalaya_tui::cli::printer::Printer; use tracing::{info, instrument}; use crate::{ account::arg::name::OptionalAccountNameArg, backend::config::BackendConfig, config::Config, - printer::Printer, }; static MAIN_PROGRESS_STYLE: Lazy = Lazy::new(|| { @@ -199,28 +200,28 @@ impl SynchronizeAccountCommand { let mut hunks_count = report.folder.patch.len(); if !report.folder.patch.is_empty() { - printer.print_log("Folders patch:")?; + printer.log("Folders patch:")?; for (hunk, _) in report.folder.patch { - printer.print_log(format!(" - {hunk}"))?; + printer.log(format!(" - {hunk}"))?; } - printer.print_log("")?; + printer.log("")?; } if !report.email.patch.is_empty() { - printer.print_log("Envelopes patch:")?; + printer.log("Envelopes patch:")?; for (hunk, _) in report.email.patch { hunks_count += 1; - printer.print_log(format!(" - {hunk}"))?; + printer.log(format!(" - {hunk}"))?; } - printer.print_log("")?; + printer.log("")?; } - printer.print(format!( + printer.out(format!( "Estimated patch length for account {account_name} to be synchronized: {hunks_count}" ))?; } else if printer.is_json() { sync_builder.sync().await?; - printer.print(format!("Account {account_name} successfully synchronized!"))?; + printer.out(format!("Account {account_name} successfully synchronized!"))?; } else { let multi = MultiProgress::new(); let sub_progresses = Mutex::new(HashMap::new()); @@ -300,11 +301,11 @@ impl SynchronizeAccountCommand { .filter_map(|(hunk, err)| err.as_ref().map(|err| (hunk, err))) .collect::>(); if !folders_patch_err.is_empty() { - printer.print_log("")?; - printer.print_log("Errors occurred while applying the folders patch:")?; + printer.log("")?; + printer.log("Errors occurred while applying the folders patch:")?; folders_patch_err .iter() - .try_for_each(|(hunk, err)| printer.print_log(format!(" - {hunk}: {err}")))?; + .try_for_each(|(hunk, err)| printer.log(format!(" - {hunk}: {err}")))?; } let envelopes_patch_err = report @@ -314,14 +315,14 @@ impl SynchronizeAccountCommand { .filter_map(|(hunk, err)| err.as_ref().map(|err| (hunk, err))) .collect::>(); if !envelopes_patch_err.is_empty() { - printer.print_log("")?; - printer.print_log("Errors occurred while applying the envelopes patch:")?; + printer.log("")?; + printer.log("Errors occurred while applying the envelopes patch:")?; for (hunk, err) in envelopes_patch_err { - printer.print_log(format!(" - {hunk}: {err}"))?; + printer.log(format!(" - {hunk}: {err}"))?; } } - printer.print(format!("Account {account_name} successfully synchronized!"))?; + printer.out(format!("Account {account_name} successfully synchronized!"))?; } Ok(()) diff --git a/src/account/config.rs b/src/account/config.rs index b294f9a..f8c1c12 100644 --- a/src/account/config.rs +++ b/src/account/config.rs @@ -8,7 +8,9 @@ use email::{ }; use serde::{Deserialize, Serialize}; -use crate::backend::config::{BackendConfig, BackendGlobalConfig}; +#[cfg(all(feature = "imap", feature = "keyring"))] +use crate::backend::config::BackendConfig; +use crate::backend::config::BackendGlobalConfig; /// The account configuration. #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] @@ -48,7 +50,7 @@ impl AccountConfig { /// entries by default ones, based on the given account name. pub fn configure(&mut self, account_name: &str) -> Result<()> { match &mut self.left.backend { - #[cfg(feature = "imap")] + #[cfg(all(feature = "imap", feature = "keyring"))] BackendConfig::Imap(config) => { config .auth @@ -58,7 +60,7 @@ impl AccountConfig { } match &mut self.right.backend { - #[cfg(feature = "imap")] + #[cfg(all(feature = "imap", feature = "keyring"))] BackendConfig::Imap(config) => { config .auth diff --git a/src/account/wizard.rs b/src/account/wizard.rs index 2c890b2..da815e2 100644 --- a/src/account/wizard.rs +++ b/src/account/wizard.rs @@ -1,18 +1,12 @@ use color_eyre::eyre::Result; -use dialoguer::Input; +use pimalaya_tui::prompt; -use crate::{ - backend::{self, BackendSource}, - ui::THEME, -}; +use crate::backend::{self, BackendSource}; use super::config::AccountConfig; pub async fn configure() -> Result<(String, AccountConfig)> { - let name = Input::with_theme(&*THEME) - .with_prompt("Account name") - .default(String::from("personal")) - .interact()?; + let name = prompt::text("Account name:", Some("personal"))?; let config = AccountConfig { default: Some(true), diff --git a/src/backend/mod.rs b/src/backend/mod.rs index 63e0b2f..5ba7d4e 100644 --- a/src/backend/mod.rs +++ b/src/backend/mod.rs @@ -1,3 +1,5 @@ +use std::fmt; + pub mod config; #[cfg(feature = "wizard")] pub mod wizard; @@ -18,11 +20,11 @@ impl BackendSource { } } -impl From for String { - fn from(source: BackendSource) -> Self { - match source { - BackendSource::Left => String::from("Left backend source"), - BackendSource::Right => String::from("Right backend source"), +impl fmt::Display for BackendSource { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Left => write!(f, "Left backend source"), + Self::Right => write!(f, "Right backend source"), } } } @@ -37,15 +39,15 @@ pub enum BackendKind { Notmuch, } -impl ToString for BackendKind { - fn to_string(&self) -> String { +impl fmt::Display for BackendKind { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { #[cfg(feature = "imap")] - Self::Imap => String::from("IMAP"), + Self::Imap => write!(f, "IMAP"), #[cfg(feature = "maildir")] - Self::Maildir => String::from("Maildir"), + Self::Maildir => write!(f, "Maildir"), #[cfg(feature = "notmuch")] - Self::Notmuch => String::from("Notmuch"), + Self::Notmuch => write!(f, "Notmuch"), } } } diff --git a/src/backend/wizard.rs b/src/backend/wizard.rs index 4e6e888..758cca7 100644 --- a/src/backend/wizard.rs +++ b/src/backend/wizard.rs @@ -1,13 +1,8 @@ use color_eyre::eyre::Result; -use dialoguer::Select; +use email::autoconfig; +use pimalaya_tui::{prompt, wizard}; -#[cfg(feature = "imap")] -use crate::imap; -#[cfg(feature = "maildir")] -use crate::maildir; -#[cfg(feature = "notmuch")] -use crate::notmuch; -use crate::ui::THEME; +use crate::backend::config::BackendConfig; use super::{config::BackendGlobalConfig, BackendKind, BackendSource}; @@ -21,23 +16,31 @@ static DEFAULT_BACKEND_KINDS: &[BackendKind] = &[ ]; pub async fn configure(account_name: &str, source: BackendSource) -> Result { - let default_kind = if source.is_left() { 0 } else { 1 }; + let backend = prompt::item(format!("{source}:"), &*DEFAULT_BACKEND_KINDS, None)?; - let kind = Select::with_theme(&*THEME) - .with_prompt(source) - .items(DEFAULT_BACKEND_KINDS) - .default(default_kind) - .interact_opt()? - .unwrap(); - - let backend = match &DEFAULT_BACKEND_KINDS[kind] { + let backend = match backend { #[cfg(feature = "imap")] - BackendKind::Imap => imap::wizard::configure(account_name).await, + BackendKind::Imap => { + let email = prompt::email("Email address:", None)?; + + println!("Discovering IMAP config…"); + let autoconfig = autoconfig::from_addr(&email).await.ok(); + + let config = wizard::imap::start(account_name, &email, autoconfig.as_ref()).await?; + + BackendConfig::Imap(config) + } #[cfg(feature = "maildir")] - BackendKind::Maildir => maildir::wizard::configure(account_name), + BackendKind::Maildir => { + let config = wizard::maildir::start(account_name)?; + BackendConfig::Maildir(config) + } #[cfg(feature = "notmuch")] - BackendKind::Notmuch => notmuch::wizard::configure(), - }?; + BackendKind::Notmuch => { + let config = wizard::notmuch::start()?; + BackendConfig::Notmuch(config) + } + }; Ok(BackendGlobalConfig { backend, diff --git a/src/cli.rs b/src/cli.rs index f3c490a..4fdadd1 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,7 +1,11 @@ +use std::path::PathBuf; + use clap::{Parser, Subcommand}; -use color_eyre::{eyre::Result, Section}; -use std::{env, path::PathBuf}; -use tracing_subscriber::filter::LevelFilter; +use color_eyre::eyre::Result; +use pimalaya_tui::cli::{ + arg::path_parser, + printer::{OutputFmt, Printer}, +}; use crate::{ account::command::{ @@ -9,10 +13,8 @@ use crate::{ sync::SynchronizeAccountCommand, }, completion::command::GenerateCompletionCommand, - config::{self, Config}, + config::Config, manual::command::GenerateManualCommand, - output::{ColorFmt, OutputFmt}, - printer::{Printer, StdoutPrinter}, }; #[derive(Parser, Debug)] @@ -30,8 +32,8 @@ pub struct Cli { /// 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)] + #[arg(short, long = "config", global = true, env = "NEVEREST_CONFIG")] + #[arg(value_name = "PATH", value_parser = path_parser)] pub config_paths: Vec, /// Customize the output format. @@ -49,30 +51,6 @@ pub struct Cli { #[arg(value_name = "FORMAT", value_enum, default_value_t = Default::default())] pub output: OutputFmt, - /// Control when to use colors - /// - /// The default setting is 'auto', which means neverest will try - /// to guess when to use colors. For example, if neverest is - /// printing to a terminal, then it will use colors, but if it is - /// redirected to a file or a pipe, then it will suppress color - /// output. neverest will suppress color output in some other - /// circumstances as well. For example, if the TERM environment - /// variable is not set or set to 'dumb', then neverest will not - /// use colors. - /// - /// The possible values are: - /// - /// - never: colors will never be used - /// - /// - always: colors will always be used regardless of where output is sent - /// - /// - ansi: like 'always', but emits ANSI escapes (even in a Windows console) - /// - /// - auto: neverest tries to be smart - #[arg(long, short = 'C', global = true)] - #[arg(value_name = "MODE", value_enum, default_value_t = Default::default())] - pub color: ColorFmt, - /// Enable logs with spantrace. /// /// This is the same as running the command with `RUST_LOG=debug` @@ -88,37 +66,6 @@ pub struct Cli { pub trace: bool, } -impl Cli { - pub async fn execute(self) -> Result<()> { - if env::var("RUST_LOG").is_err() { - if self.debug { - env::set_var("RUST_LOG", "debug"); - } else if self.trace { - env::set_var("RUST_LOG", "trace"); - } - } - - let filter = crate::tracing::install()?; - - let mut printer = StdoutPrinter::new(self.output, self.color); - - let mut res = self - .command - .execute(&mut printer, self.config_paths.as_ref()) - .await; - - if filter < LevelFilter::DEBUG { - res = res.note("Run with --debug to enable logs with spantrace."); - } - - if filter < LevelFilter::TRACE { - res = res.note("Run with --trace to enable verbose logs with backtrace.") - } - - res - } -} - #[derive(Subcommand, Debug)] pub enum NeverestCommand { #[command(alias = "check-up", alias = "checkup", visible_alias = "check")] diff --git a/src/config/mod.rs b/src/config/mod.rs index f528789..a004076 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -5,14 +5,11 @@ #[cfg(feature = "wizard")] pub mod wizard; -use color_eyre::eyre::{anyhow, bail, Context, Result}; -use dirs::{config_dir, home_dir}; +use color_eyre::eyre::{anyhow, Result}; use serde::{Deserialize, Serialize}; -use serde_toml_merge::merge; -use shellexpand_utils::{canonicalize, expand}; -use std::{collections::HashMap, fs, path::PathBuf}; -use toml::Value; -use tracing::debug; +use std::{collections::HashMap, path::PathBuf}; + +use pimalaya_tui::config::TomlConfig; use crate::account::config::AccountConfig; @@ -24,51 +21,9 @@ pub struct Config { pub accounts: HashMap, } -impl Config { - /// Read and parse the TOML configuration at the given paths. - /// - /// 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:?}")) - } - } - } +impl TomlConfig for Config {} +impl Config { /// Create and save a TOML configuration using the wizard. /// /// If the user accepts the confirmation, the wizard starts and @@ -78,25 +33,7 @@ impl Config { /// NOTE: the wizard can only be used with interactive shells. #[cfg(feature = "wizard")] async fn from_wizard(path: &PathBuf) -> Result { - use dialoguer::Confirm; - use std::process; - - use crate::{wizard_prompt, wizard_warn}; - - wizard_warn!("Cannot find configuration at {}", path.display()); - - let confirm = Confirm::new() - .with_prompt(wizard_prompt!( - "Would you like to create one with the wizard?" - )) - .default(true) - .interact_opt()? - .unwrap_or_default(); - - if !confirm { - process::exit(0); - } - + Self::confirm_from_wizard(path)?; wizard::configure(path).await } @@ -134,36 +71,6 @@ impl Config { } } - /// Get the default configuration path. - /// - /// Returns an error if the XDG configuration directory cannot be - /// found. - pub fn default_path() -> Result { - Ok(config_dir() - .ok_or(anyhow!("cannot get XDG config directory"))? - .join("neverest") - .join("config.toml")) - } - - /// Get the first default configuration path that points to a - /// valid file. - /// - /// Tries paths in this order: - /// - /// - `$XDG_CONFIG_DIR/neverest/config.toml` (or equivalent to - /// `$XDG_CONFIG_DIR` in other OSes.) - /// - `$HOME/.config/neverest/config.toml` - /// - `$HOME/.neverestrc` - pub fn first_valid_default_path() -> Option { - Self::default_path() - .ok() - .filter(|p| p.exists()) - .or_else(|| home_dir().map(|p| p.join(".config").join("neverest").join("config.toml"))) - .filter(|p| p.exists()) - .or_else(|| home_dir().map(|p| p.join(".neverestrc"))) - .filter(|p| p.exists()) - } - pub fn into_account_config( &self, account_name: Option<&str>, @@ -192,12 +99,3 @@ impl Config { Ok((account_name, account_config)) } } - -/// Parse a configuration file path as [`PathBuf`]. -/// -/// The path is shell-expanded then canonicalized (if applicable). -pub fn path_parser(path: &str) -> Result { - expand::try_path(path) - .map(canonicalize::path) - .map_err(|err| err.to_string()) -} diff --git a/src/config/wizard.rs b/src/config/wizard.rs index c9ad6f5..5bb5596 100644 --- a/src/config/wizard.rs +++ b/src/config/wizard.rs @@ -1,182 +1,27 @@ -use color_eyre::eyre::Result; -use dialoguer::Input; -use shellexpand_utils::expand; use std::{fs, path::PathBuf}; -use toml_edit::{DocumentMut, Table}; - -use crate::{account, ui::THEME}; -use super::Config; +use color_eyre::eyre::Result; +use pimalaya_tui::{config::TomlConfig, print, prompt}; -#[macro_export] -macro_rules! wizard_warn { - ($($arg:tt)*) => { - println!("{}", console::style(format!($($arg)*)).yellow().bold()); - }; -} +use crate::account; -#[macro_export] -macro_rules! wizard_prompt { - ($($arg:tt)*) => { - format!("{}", console::style(format!($($arg)*)).italic()) - }; -} - -#[macro_export] -macro_rules! wizard_log { - ($($arg:tt)*) => { - println!(); - println!("{}", console::style(format!($($arg)*)).underlined()); - println!(); - }; -} +use super::Config; pub async fn configure(path: &PathBuf) -> Result { - wizard_log!("Configuring your default account"); + print::section("Configuring your default account"); let mut config = Config::default(); let (account_name, account_config) = account::wizard::configure().await?; config.accounts.insert(account_name, account_config); - let path = Input::with_theme(&*THEME) - .with_prompt(wizard_prompt!( - "Where would you like to save your configuration?" - )) - .default(path.to_string_lossy().to_string()) - .interact()?; - let path = expand::path(path); + let path = prompt::path("Where to save the configuration?", Some(path))?; + println!("Writing the configuration to {}…", path.display()); - println!("Writing the configuration to {path:?}…"); - let toml = pretty_serialize(&config)?; + let toml = config.pretty_serialize()?; fs::create_dir_all(path.parent().unwrap_or(&path))?; fs::write(path, toml)?; - println!("Exiting the wizard…"); + println!("Done! Exiting the wizard…"); Ok(config) } - -fn pretty_serialize(config: &Config) -> Result { - let mut doc: DocumentMut = toml::to_string(&config)?.parse()?; - - doc.iter_mut().for_each(|(_, item)| { - if let Some(table) = item.as_table_mut() { - table.iter_mut().for_each(|(_, item)| { - if let Some(table) = item.as_table_mut() { - set_table_dotted(table); - } - }) - } - }); - - Ok(doc.to_string()) -} - -fn set_table_dotted(table: &mut Table) { - let keys: Vec = table.iter().map(|(key, _)| key.to_string()).collect(); - for ref key in keys { - if let Some(table) = table.get_mut(key).unwrap().as_table_mut() { - table.set_dotted(true); - set_table_dotted(table) - } - } -} - -#[cfg(test)] -mod test { - use email::{ - account::config::passwd::PasswdConfig, - flag::sync::config::FlagSyncPermissions, - folder::sync::config::{FolderSyncPermissions, FolderSyncStrategy}, - imap::config::{ImapAuthConfig, ImapConfig}, - maildir::config::MaildirConfig, - message::sync::config::MessageSyncPermissions, - }; - use secret::Secret; - use std::collections::{BTreeSet, HashMap}; - - use crate::{ - account::config::{AccountConfig, FolderConfig}, - backend::config::{ - BackendConfig, BackendGlobalConfig, FlagBackendConfig, FolderBackendConfig, - MessageBackendConfig, - }, - config::Config, - }; - - fn assert_eq(config: AccountConfig, expected_toml: &str) { - let config = Config { - accounts: HashMap::from_iter([("test".into(), config)]), - ..Default::default() - }; - - let toml = super::pretty_serialize(&config).expect("serialize error"); - assert_eq!(toml, expected_toml); - - let expected_config = toml::from_str(&toml).expect("deserialize error"); - assert_eq!(config, expected_config); - } - - #[test] - fn pretty_serialize() { - assert_eq( - AccountConfig { - default: Some(true), - folder: Some(FolderConfig { - filters: FolderSyncStrategy::Include(BTreeSet::from_iter(["INBOX".into()])), - }), - // TODO: test me - envelope: None, - left: BackendGlobalConfig { - backend: BackendConfig::Imap(ImapConfig { - host: "localhost".into(), - port: 143, - login: "test".into(), - auth: ImapAuthConfig::Passwd(PasswdConfig(Secret::Raw("password".into()))), - ..Default::default() - }), - folder: Some(FolderBackendConfig { - aliases: Default::default(), - permissions: FolderSyncPermissions { - create: true, - delete: false, - }, - }), - flag: Some(FlagBackendConfig { - permissions: FlagSyncPermissions { update: true }, - }), - message: Some(MessageBackendConfig { - permissions: MessageSyncPermissions { - create: true, - delete: false, - }, - }), - }, - right: BackendGlobalConfig { - backend: BackendConfig::Maildir(MaildirConfig { - root_dir: "/tmp/test".into(), - }), - folder: None, - flag: None, - message: None, - }, - }, - r#"[accounts.test] -default = true -folder.filter.include = ["INBOX"] -left.backend.type = "imap" -left.backend.host = "localhost" -left.backend.port = 143 -left.backend.login = "test" -left.backend.passwd.raw = "password" -left.folder.permissions.create = true -left.folder.permissions.delete = false -left.flag.permissions.update = true -left.message.permissions.create = true -left.message.permissions.delete = false -right.backend.type = "maildir" -right.backend.root-dir = "/tmp/test" -"#, - ) - } -} diff --git a/src/imap/mod.rs b/src/imap/mod.rs deleted file mode 100644 index 8999671..0000000 --- a/src/imap/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -#[cfg(feature = "wizard")] -pub mod wizard; diff --git a/src/imap/wizard.rs b/src/imap/wizard.rs deleted file mode 100644 index 80cf1a8..0000000 --- a/src/imap/wizard.rs +++ /dev/null @@ -1,370 +0,0 @@ -use std::time::Duration; - -use color_eyre::eyre::{bail, Result}; -use dialoguer::{Confirm, Input, Password, Select}; -use email::{ - account::{ - config::{ - oauth2::{OAuth2Config, OAuth2Method, OAuth2Scopes}, - passwd::PasswdConfig, - }, - discover::config::{AuthenticationType, SecurityType, ServerType}, - }, - imap::config::{ImapAuthConfig, ImapConfig, ImapEncryptionKind}, -}; -use email_address::EmailAddress; -use indicatif::{ProgressBar, ProgressStyle}; -use oauth::v2_0::{AuthorizationCodeGrant, Client}; -use secret::Secret; - -use crate::{ - backend::config::BackendConfig, - ui::{prompt, THEME}, - wizard_log, wizard_prompt, wizard_warn, -}; - -const ENCRYPTIONS: &[ImapEncryptionKind] = &[ - ImapEncryptionKind::Tls, - ImapEncryptionKind::StartTls, - ImapEncryptionKind::None, -]; - -static OAUTH2_MECHANISMS: &[&str] = &[XOAUTH2, OAUTHBEARER]; -static XOAUTH2: &str = "XOAUTH2"; -static OAUTHBEARER: &str = "OAUTHBEARER"; - -static SECRETS: &[&str] = &[KEYRING, RAW, CMD]; -static KEYRING: &str = "Ask my password, then save it in my system's global keyring"; -static RAW: &str = "Ask my password, then save it in the configuration file (not safe)"; -static CMD: &str = "Ask me a shell command that exposes my password"; - -pub async fn configure(account_name: &str) -> Result { - let email = Input::with_theme(&*THEME) - .with_prompt("Email address") - .validate_with(|email: &String| { - if EmailAddress::is_valid(email) { - Ok(()) - } else { - bail!("invalid email address: {email}") - } - }) - .interact()?; - let email = email.as_str(); - - let spinner = ProgressBar::new_spinner(); - spinner.enable_steady_tick(Duration::from_millis(80)); - spinner.set_style( - ProgressStyle::with_template("{spinner:.blue} Discovering IMAP config…") - .unwrap() - .tick_strings(&["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]), - ); - - let autoconfig_email = email.to_owned(); - let autoconfig = tokio::join!( - // wait a minima 1 sec to prevent the spinner to disappear too - // quickly - tokio::time::sleep(Duration::from_secs(1)), - email::account::discover::from_addr(&autoconfig_email), - ); - let autoconfig = autoconfig.1.ok(); - let autoconfig = autoconfig.as_ref(); - - spinner.finish_and_clear(); - - if let Some(config) = autoconfig { - if config.is_gmail() { - println!(); - wizard_warn!("Warning: Google passwords cannot be used directly, see:"); - wizard_warn!("https://pimalaya.org/neverest/cli/latest/configuration/gmail.html"); - println!(); - } - } - - let autoconfig_oauth2 = autoconfig.and_then(|c| c.oauth2()); - let autoconfig_server = autoconfig.and_then(|c| { - c.email_provider() - .incoming_servers() - .into_iter() - .find(|server| matches!(server.server_type(), ServerType::Imap)) - }); - - let autoconfig_host = autoconfig_server - .and_then(|s| s.hostname()) - .map(ToOwned::to_owned); - - let default_host = - autoconfig_host.unwrap_or_else(|| format!("imap.{}", email.rsplit_once('@').unwrap().1)); - - let host = Input::with_theme(&*THEME) - .with_prompt("IMAP hostname") - .default(default_host) - .interact()?; - - let autoconfig_encryption = autoconfig_server - .and_then(|imap| { - imap.security_type().map(|encryption| match encryption { - SecurityType::Plain => ImapEncryptionKind::None, - SecurityType::Starttls => ImapEncryptionKind::StartTls, - SecurityType::Tls => ImapEncryptionKind::Tls, - }) - }) - .unwrap_or_default(); - - let default_encryption_idx = match &autoconfig_encryption { - ImapEncryptionKind::Tls => 0, - ImapEncryptionKind::StartTls => 1, - ImapEncryptionKind::None => 2, - }; - - let encryption_idx = Select::with_theme(&*THEME) - .with_prompt("IMAP encryption") - .items(ENCRYPTIONS) - .default(default_encryption_idx) - .interact_opt()?; - - let autoconfig_port = autoconfig_server - .and_then(|s| s.port()) - .map(ToOwned::to_owned) - .unwrap_or_else(|| match &autoconfig_encryption { - ImapEncryptionKind::Tls => 993, - ImapEncryptionKind::StartTls => 143, - ImapEncryptionKind::None => 143, - }); - - let (encryption, default_port) = match encryption_idx { - Some(idx) if idx == default_encryption_idx => { - (Some(autoconfig_encryption), autoconfig_port) - } - Some(idx) if ENCRYPTIONS[idx] == ImapEncryptionKind::Tls => { - (Some(ImapEncryptionKind::Tls), 993) - } - Some(idx) if ENCRYPTIONS[idx] == ImapEncryptionKind::StartTls => { - (Some(ImapEncryptionKind::StartTls), 143) - } - _ => (Some(ImapEncryptionKind::None), 143), - }; - - let port = Input::with_theme(&*THEME) - .with_prompt("IMAP port") - .validate_with(|input: &String| input.parse::().map(|_| ())) - .default(default_port.to_string()) - .interact() - .map(|input| input.parse::().unwrap())?; - - let autoconfig_login = autoconfig_server.map(|imap| match imap.username() { - Some("%EMAILLOCALPART%") => email.rsplit_once('@').unwrap().0.to_owned(), - Some("%EMAILADDRESS%") => email.to_owned(), - _ => email.to_owned(), - }); - - let default_login = autoconfig_login.unwrap_or_else(|| email.to_owned()); - - let login = Input::with_theme(&*THEME) - .with_prompt("IMAP login") - .default(default_login) - .interact()?; - - let default_oauth2_enabled = autoconfig_server - .and_then(|imap| { - imap.authentication_type() - .into_iter() - .find_map(|t| Option::from(matches!(t, AuthenticationType::OAuth2))) - }) - .filter(|_| autoconfig_oauth2.is_some()) - .unwrap_or_default(); - - let oauth2_enabled = Confirm::new() - .with_prompt(wizard_prompt!("Would you like to enable OAuth 2.0?")) - .default(default_oauth2_enabled) - .interact_opt()? - .unwrap_or_default(); - - let auth = if oauth2_enabled { - let mut config = OAuth2Config::default(); - let redirect_host = OAuth2Config::LOCALHOST.to_owned(); - let redirect_port = OAuth2Config::get_first_available_port()?; - - let method_idx = Select::with_theme(&*THEME) - .with_prompt("IMAP OAuth 2.0 mechanism") - .items(OAUTH2_MECHANISMS) - .default(0) - .interact_opt()?; - - config.method = match method_idx { - Some(idx) if OAUTH2_MECHANISMS[idx] == XOAUTH2 => OAuth2Method::XOAuth2, - Some(idx) if OAUTH2_MECHANISMS[idx] == OAUTHBEARER => OAuth2Method::OAuthBearer, - _ => OAuth2Method::XOAuth2, - }; - - config.client_id = Input::with_theme(&*THEME) - .with_prompt("IMAP OAuth 2.0 client id") - .interact()?; - - let client_secret: String = Password::with_theme(&*THEME) - .with_prompt("IMAP OAuth 2.0 client secret") - .interact()?; - config.client_secret = - Secret::try_new_keyring_entry(format!("{account_name}-imap-oauth2-client-secret"))?; - config - .client_secret - .set_only_keyring(&client_secret) - .await?; - - let default_auth_url = autoconfig_oauth2 - .map(|o| o.auth_url().to_owned()) - .unwrap_or_default(); - config.auth_url = Input::with_theme(&*THEME) - .with_prompt("IMAP OAuth 2.0 authorization URL") - .default(default_auth_url) - .interact()?; - - let default_token_url = autoconfig_oauth2 - .map(|o| o.token_url().to_owned()) - .unwrap_or_default(); - config.token_url = Input::with_theme(&*THEME) - .with_prompt("IMAP OAuth 2.0 token URL") - .default(default_token_url) - .interact()?; - - let autoconfig_scopes = autoconfig_oauth2.map(|o| o.scope()); - - let prompt_scope = |prompt: &str| -> Result> { - Ok(match &autoconfig_scopes { - Some(scopes) => Select::with_theme(&*THEME) - .with_prompt(prompt) - .items(scopes) - .default(0) - .interact_opt()? - .and_then(|idx| scopes.get(idx)) - .map(|scope| scope.to_string()), - None => Some( - Input::with_theme(&*THEME) - .with_prompt(prompt) - .default(String::default()) - .interact()? - .to_owned(), - ) - .filter(|scope| !scope.is_empty()), - }) - }; - - if let Some(scope) = prompt_scope("IMAP OAuth 2.0 main scope")? { - config.scopes = OAuth2Scopes::Scope(scope); - } - - let confirm_additional_scope = || -> Result { - let confirm = Confirm::new() - .with_prompt(wizard_prompt!( - "Would you like to add more IMAP OAuth 2.0 scopes?" - )) - .default(false) - .interact_opt()? - .unwrap_or_default(); - - Ok(confirm) - }; - - while confirm_additional_scope()? { - let mut scopes = match config.scopes { - OAuth2Scopes::Scope(scope) => vec![scope], - OAuth2Scopes::Scopes(scopes) => scopes, - }; - - if let Some(scope) = prompt_scope("Additional IMAP OAuth 2.0 scope")? { - scopes.push(scope) - } - - config.scopes = OAuth2Scopes::Scopes(scopes); - } - - config.pkce = Confirm::new() - .with_prompt(wizard_prompt!( - "Would you like to enable PKCE verification?" - )) - .default(true) - .interact_opt()? - .unwrap_or(true); - - wizard_log!("To complete your OAuth 2.0 setup, click on the following link:"); - - let client = Client::new( - config.client_id.clone(), - client_secret, - config.auth_url.clone(), - config.token_url.clone(), - )? - .with_redirect_host(redirect_host.to_owned()) - .with_redirect_port(redirect_port) - .build()?; - - let mut auth_code_grant = AuthorizationCodeGrant::new() - .with_redirect_host(redirect_host.to_owned()) - .with_redirect_port(redirect_port); - - if config.pkce { - auth_code_grant = auth_code_grant.with_pkce(); - } - - for scope in config.scopes.clone() { - auth_code_grant = auth_code_grant.with_scope(scope); - } - - let (redirect_url, csrf_token) = auth_code_grant.get_redirect_url(&client); - - println!("{redirect_url}"); - println!(); - - let (access_token, refresh_token) = auth_code_grant - .wait_for_redirection(&client, csrf_token) - .await?; - - config.access_token = - 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::try_new_keyring_entry(format!("{account_name}-imap-oauth2-refresh-token"))?; - config.refresh_token.set_only_keyring(refresh_token).await?; - } - - ImapAuthConfig::OAuth2(config) - } else { - let secret_idx = Select::with_theme(&*THEME) - .with_prompt("IMAP authentication strategy") - .items(SECRETS) - .default(0) - .interact_opt()?; - - let secret = match secret_idx { - Some(idx) if SECRETS[idx] == KEYRING => { - let secret = Secret::try_new_keyring_entry(format!("{account_name}-imap-passwd"))?; - secret - .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_command( - Input::with_theme(&*THEME) - .with_prompt("Shell command") - .default(format!("pass show {account_name}-imap-passwd")) - .interact()?, - ), - _ => Default::default(), - }; - - ImapAuthConfig::Passwd(PasswdConfig(secret)) - }; - - let config = ImapConfig { - host, - port, - encryption, - login, - auth, - watch: None, - }; - - Ok(BackendConfig::Imap(config)) -} diff --git a/src/lib.rs b/src/lib.rs index f4e8c81..2c5963b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,18 +1,6 @@ -//! # Neverest CLI - pub mod account; pub mod backend; pub mod cli; pub mod completion; pub mod config; -#[cfg(feature = "imap")] -pub mod imap; -#[cfg(feature = "maildir")] -pub mod maildir; pub mod manual; -#[cfg(feature = "notmuch")] -pub mod notmuch; -pub mod output; -pub mod printer; -pub mod tracing; -pub mod ui; diff --git a/src/maildir/mod.rs b/src/maildir/mod.rs deleted file mode 100644 index 8999671..0000000 --- a/src/maildir/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -#[cfg(feature = "wizard")] -pub mod wizard; diff --git a/src/maildir/wizard.rs b/src/maildir/wizard.rs deleted file mode 100644 index 078f04a..0000000 --- a/src/maildir/wizard.rs +++ /dev/null @@ -1,23 +0,0 @@ -use color_eyre::eyre::Result; -use dialoguer::Input; -use dirs::home_dir; -use email::maildir::config::MaildirConfig; - -use crate::{backend::config::BackendConfig, ui::THEME}; - -pub fn configure(account_name: &str) -> Result { - let mut config = MaildirConfig::default(); - - let mut input = Input::with_theme(&*THEME); - - if let Some(home) = home_dir() { - input.default(home.join("Mail").join(account_name).display().to_string()); - }; - - config.root_dir = input - .with_prompt("Maildir directory") - .interact_text()? - .into(); - - Ok(BackendConfig::Maildir(config)) -} diff --git a/src/main.rs b/src/main.rs index 73d9cea..9e657ef 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,18 @@ use clap::Parser; use color_eyre::eyre::Result; use neverest::cli::Cli; +use pimalaya_tui::cli::{printer::StdoutPrinter, tracing}; #[tokio::main] async fn main() -> Result<()> { - Cli::parse().execute().await + let tracing = tracing::install()?; + + let cli = Cli::parse(); + let mut printer = StdoutPrinter::new(cli.output); + let res = cli + .command + .execute(&mut printer, cli.config_paths.as_ref()) + .await; + + tracing.with_debug_and_trace_notes(res) } diff --git a/src/manual/command.rs b/src/manual/command.rs index bf36984..a564b07 100644 --- a/src/manual/command.rs +++ b/src/manual/command.rs @@ -1,11 +1,12 @@ +use std::{fs, path::PathBuf}; + use clap::{CommandFactory, Parser}; use clap_mangen::Man; use color_eyre::eyre::Result; -use shellexpand_utils::{canonicalize, expand}; -use std::{fs, path::PathBuf}; +use pimalaya_tui::cli::{arg::path_parser, printer::Printer}; use tracing::{info, instrument}; -use crate::{cli::Cli, printer::Printer}; +use crate::cli::Cli; /// Generate manual pages to a directory. /// @@ -16,7 +17,7 @@ use crate::{cli::Cli, printer::Printer}; #[derive(Debug, Parser)] pub struct GenerateManualCommand { /// Directory where man files should be generated in. - #[arg(value_parser = dir_parser)] + #[arg(value_parser = path_parser)] pub dir: PathBuf, } @@ -34,7 +35,7 @@ impl GenerateManualCommand { Man::new(cmd).render(&mut buffer)?; fs::create_dir_all(&self.dir)?; - printer.print_log(format!("Generating man page for command {cmd_name}…"))?; + printer.log(format!("Generating man page for command {cmd_name}…"))?; fs::write(self.dir.join(format!("{}.1", cmd_name)), buffer)?; for subcmd in subcmds { @@ -43,14 +44,14 @@ impl GenerateManualCommand { let mut buffer = Vec::new(); Man::new(subcmd).render(&mut buffer)?; - printer.print_log(format!("Generating man page for subcommand {subcmd_name}…"))?; + printer.log(format!("Generating man page for subcommand {subcmd_name}…"))?; fs::write( self.dir.join(format!("{}-{}.1", cmd_name, subcmd_name)), buffer, )?; } - printer.print(format!( + printer.out(format!( "{subcmds_len} man page(s) successfully generated in {:?}!", self.dir ))?; @@ -58,13 +59,3 @@ impl GenerateManualCommand { Ok(()) } } - -/// Parse the given [`str`] as [`PathBuf`]. -/// -/// The path is first shell expanded, then canonicalized (if -/// applicable). -fn dir_parser(path: &str) -> Result { - expand::try_path(path) - .map(canonicalize::path) - .map_err(|err| err.to_string()) -} diff --git a/src/notmuch/mod.rs b/src/notmuch/mod.rs deleted file mode 100644 index 8999671..0000000 --- a/src/notmuch/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -#[cfg(feature = "wizard")] -pub mod wizard; diff --git a/src/notmuch/wizard.rs b/src/notmuch/wizard.rs deleted file mode 100644 index 6bc7940..0000000 --- a/src/notmuch/wizard.rs +++ /dev/null @@ -1,24 +0,0 @@ -use color_eyre::eyre::Result; -use dialoguer::Input; -use email::notmuch::config::NotmuchConfig; - -use crate::{backend::config::BackendConfig, ui::THEME}; - -pub fn configure() -> Result { - let mut config = NotmuchConfig::default(); - - let default_database_path = NotmuchConfig::get_default_database_path() - .unwrap_or_default() - .to_string_lossy() - .to_string(); - - config.database_path = Some( - Input::with_theme(&*THEME) - .with_prompt("Notmuch database path") - .default(default_database_path) - .interact_text()? - .into(), - ); - - Ok(BackendConfig::Notmuch(config)) -} diff --git a/src/output.rs b/src/output.rs deleted file mode 100644 index 87b58fb..0000000 --- a/src/output.rs +++ /dev/null @@ -1,107 +0,0 @@ -use clap::ValueEnum; -use color_eyre::eyre::{anyhow, Error, Result}; -use serde::Serialize; -use std::{ - fmt, - io::{self, IsTerminal}, - str::FromStr, -}; -use termcolor::ColorChoice; - -/// Represents the available output formats. -#[derive(Clone, Debug, Default, Eq, PartialEq, Ord, PartialOrd, ValueEnum)] -pub enum OutputFmt { - #[default] - Plain, - Json, -} - -impl FromStr for OutputFmt { - type Err = Error; - - fn from_str(fmt: &str) -> Result { - match fmt { - fmt if fmt.eq_ignore_ascii_case("json") => Ok(Self::Json), - fmt if fmt.eq_ignore_ascii_case("plain") => Ok(Self::Plain), - unknown => Err(anyhow!("cannot parse output format {}", unknown)), - } - } -} - -impl fmt::Display for OutputFmt { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let fmt = match *self { - OutputFmt::Json => "JSON", - OutputFmt::Plain => "Plain", - }; - write!(f, "{}", fmt) - } -} - -/// Defines a struct-wrapper to provide a JSON output. -#[derive(Clone, Debug, Eq, PartialEq, Serialize)] -pub struct OutputJson { - response: T, -} - -impl OutputJson { - pub fn new(response: T) -> Self { - Self { response } - } -} - -/// Represent the available color configs. -#[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Ord, ValueEnum)] -pub enum ColorFmt { - Never, - Always, - Ansi, - #[default] - Auto, -} - -impl FromStr for ColorFmt { - type Err = Error; - - fn from_str(fmt: &str) -> Result { - match fmt { - fmt if fmt.eq_ignore_ascii_case("never") => Ok(Self::Never), - fmt if fmt.eq_ignore_ascii_case("always") => Ok(Self::Always), - fmt if fmt.eq_ignore_ascii_case("ansi") => Ok(Self::Ansi), - fmt if fmt.eq_ignore_ascii_case("auto") => Ok(Self::Auto), - unknown => Err(anyhow!("cannot parse color format {}", unknown)), - } - } -} - -impl From for ColorChoice { - fn from(fmt: ColorFmt) -> Self { - match fmt { - ColorFmt::Never => Self::Never, - ColorFmt::Always => Self::Always, - ColorFmt::Ansi => Self::AlwaysAnsi, - ColorFmt::Auto => { - if io::stdout().is_terminal() { - // Otherwise let's `termcolor` decide by - // inspecting the environment. From the [doc]: - // - // * If `NO_COLOR` is set to any value, then - // colors will be suppressed. - // - // * If `TERM` is set to dumb, then colors will be - // suppressed. - // - // * In non-Windows environments, if `TERM` is not - // set, then colors will be suppressed. - // - // [doc]: https://github.com/BurntSushi/termcolor#automatic-color-selection - Self::Auto - } else { - // Colors should be deactivated if the terminal is - // not a tty. - Self::Never - } - } - } - } -} diff --git a/src/printer/mod.rs b/src/printer/mod.rs deleted file mode 100644 index b9199fb..0000000 --- a/src/printer/mod.rs +++ /dev/null @@ -1,8 +0,0 @@ -pub mod print; -pub mod print_table; -#[allow(clippy::module_inception)] -pub mod printer; - -pub use print::*; -pub use print_table::*; -pub use printer::*; diff --git a/src/printer/print.rs b/src/printer/print.rs deleted file mode 100644 index ced745c..0000000 --- a/src/printer/print.rs +++ /dev/null @@ -1,21 +0,0 @@ -use color_eyre::eyre::{Context, Result}; - -use crate::printer::WriteColor; - -pub trait Print { - fn print(&self, writer: &mut dyn WriteColor) -> Result<()>; -} - -impl Print for &str { - fn print(&self, writer: &mut dyn WriteColor) -> Result<()> { - writeln!(writer, "{}", self).context("cannot write string to writer")?; - Ok(writer.reset()?) - } -} - -impl Print for String { - fn print(&self, writer: &mut dyn WriteColor) -> Result<()> { - self.as_str().print(writer)?; - Ok(writer.reset()?) - } -} diff --git a/src/printer/print_table.rs b/src/printer/print_table.rs deleted file mode 100644 index 9492cbd..0000000 --- a/src/printer/print_table.rs +++ /dev/null @@ -1,17 +0,0 @@ -use color_eyre::eyre::Result; -use email::email::config::EmailTextPlainFormat; -use std::io; -use termcolor::{self, StandardStream}; - -pub trait WriteColor: io::Write + termcolor::WriteColor {} - -impl WriteColor for StandardStream {} - -pub trait PrintTable { - fn print_table(&self, writer: &mut dyn WriteColor, opts: PrintTableOpts) -> Result<()>; -} - -pub struct PrintTableOpts<'a> { - pub format: &'a EmailTextPlainFormat, - pub max_width: Option, -} diff --git a/src/printer/printer.rs b/src/printer/printer.rs deleted file mode 100644 index 2979c26..0000000 --- a/src/printer/printer.rs +++ /dev/null @@ -1,86 +0,0 @@ -use color_eyre::eyre::{Context, Result}; -use std::fmt::{self, Debug}; -use termcolor::StandardStream; - -use crate::{ - output::{ColorFmt, OutputFmt}, - printer::{Print, PrintTable, PrintTableOpts, WriteColor}, -}; - -pub trait Printer { - // TODO: rename end - fn print(&mut self, data: T) -> Result<()>; - // TODO: rename log - fn print_log(&mut self, data: T) -> Result<()>; - // TODO: rename table - fn print_table( - &mut self, - // TODO: remove Box - data: Box, - opts: PrintTableOpts, - ) -> Result<()>; - fn is_json(&self) -> bool; -} - -pub struct StdoutPrinter { - pub writer: Box, - pub fmt: OutputFmt, -} - -impl Default for StdoutPrinter { - fn default() -> Self { - let fmt = OutputFmt::default(); - let writer = Box::new(StandardStream::stdout(ColorFmt::default().into())); - Self { fmt, writer } - } -} - -impl StdoutPrinter { - pub fn new(fmt: OutputFmt, color: ColorFmt) -> Self { - let writer = Box::new(StandardStream::stdout(color.into())); - Self { fmt, writer } - } -} - -impl Printer for StdoutPrinter { - fn print_log(&mut self, data: T) -> Result<()> { - match self.fmt { - OutputFmt::Plain => data.print(self.writer.as_mut()), - OutputFmt::Json => Ok(()), - } - } - - fn print(&mut self, data: T) -> Result<()> { - match self.fmt { - OutputFmt::Plain => data.print(self.writer.as_mut()), - OutputFmt::Json => serde_json::to_writer(self.writer.as_mut(), &data) - .context("cannot write json to writer"), - } - } - - fn print_table( - &mut self, - data: Box, - opts: PrintTableOpts, - ) -> Result<()> { - match self.fmt { - OutputFmt::Plain => data.print_table(self.writer.as_mut(), opts), - OutputFmt::Json => { - let json = &mut serde_json::Serializer::new(self.writer.as_mut()); - let ser = &mut ::erase(json); - data.erased_serialize(ser).unwrap(); - Ok(()) - } - } - } - - fn is_json(&self) -> bool { - self.fmt == OutputFmt::Json - } -} - -impl From for StdoutPrinter { - fn from(fmt: OutputFmt) -> Self { - Self::new(fmt, ColorFmt::Auto) - } -} diff --git a/src/tracing.rs b/src/tracing.rs deleted file mode 100644 index 4a61a7f..0000000 --- a/src/tracing.rs +++ /dev/null @@ -1,40 +0,0 @@ -use color_eyre::eyre::Result; -use std::env; -use tracing_error::ErrorLayer; -use tracing_subscriber::{filter::LevelFilter, fmt, prelude::*, EnvFilter}; - -pub fn install() -> Result { - let fmt_layer = fmt::layer().with_target(false); - - let (filter_layer, current_filter) = match EnvFilter::try_from_default_env() { - Err(_) => (EnvFilter::try_new("warn").unwrap(), LevelFilter::OFF), - Ok(layer) => { - let level = layer.max_level_hint().unwrap_or(LevelFilter::OFF); - (layer, level) - } - }; - - let registry = tracing_subscriber::registry() - .with(filter_layer) - .with(ErrorLayer::default()); - - if current_filter == LevelFilter::OFF { - registry.with(fmt_layer.without_time()).init() - } else { - registry.with(fmt_layer).init() - } - - if env::var("RUST_BACKTRACE").is_err() && current_filter == LevelFilter::TRACE { - env::set_var("RUST_BACKTRACE", "1"); - } - - let debug = current_filter >= LevelFilter::DEBUG; - - color_eyre::config::HookBuilder::new() - .capture_span_trace_by_default(debug) - .display_location_section(debug) - .display_env_section(false) - .install()?; - - Ok(current_filter) -} diff --git a/src/ui/mod.rs b/src/ui/mod.rs deleted file mode 100644 index 61d4516..0000000 --- a/src/ui/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -pub(crate) mod prompt; - -use dialoguer::theme::ColorfulTheme; -use once_cell::sync::Lazy; - -pub(crate) static THEME: Lazy = Lazy::new(ColorfulTheme::default); diff --git a/src/ui/prompt.rs b/src/ui/prompt.rs deleted file mode 100644 index 8f5a66b..0000000 --- a/src/ui/prompt.rs +++ /dev/null @@ -1,21 +0,0 @@ -use dialoguer::Password; -use std::io; - -use super::THEME; - -pub(crate) fn passwd(prompt: &str) -> io::Result { - Password::with_theme(&*THEME) - .with_prompt(prompt) - .with_confirmation( - "Confirm password", - "Passwords do not match, please try again.", - ) - .interact() -} - -pub(crate) fn secret(prompt: &str) -> io::Result { - Password::with_theme(&*THEME) - .with_prompt(prompt) - .report(false) - .interact() -}