From 151adf09e682d992f208dab98089cac08aace6d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20DOUIN?= Date: Mon, 28 Oct 2024 11:29:15 +0100 Subject: [PATCH] pin pimalaya core lib versions --- Cargo.lock | 65 ++++++++++++------- Cargo.toml | 29 ++------- src/account/command/check_up.rs | 16 ++--- src/account/command/configure.rs | 2 +- src/email/envelope/command/thread.rs | 1 + src/email/envelope/flag/command/add.rs | 1 + src/email/envelope/flag/command/remove.rs | 1 + src/email/envelope/flag/command/set.rs | 1 + .../message/attachment/command/download.rs | 1 + src/email/message/command/copy.rs | 1 + src/email/message/command/delete.rs | 1 + src/email/message/command/forward.rs | 1 + src/email/message/command/mailto.rs | 1 + src/email/message/command/move.rs | 1 + src/email/message/command/read.rs | 1 + src/email/message/command/save.rs | 1 + src/email/message/command/thread.rs | 1 + src/email/message/template/command/forward.rs | 1 + src/email/message/template/command/reply.rs | 1 + src/email/message/template/command/save.rs | 1 + src/folder/command/add.rs | 1 + src/folder/command/delete.rs | 1 + src/folder/command/expunge.rs | 1 + src/folder/command/list.rs | 1 + src/folder/command/purge.rs | 1 + 25 files changed, 74 insertions(+), 59 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 410b589..5483c85 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1193,8 +1193,9 @@ dependencies = [ [[package]] name = "email-lib" -version = "1.0.0" -source = "git+https://github.com/pimalaya/core#79a960a684274537788d1193fe3db5bcf66cfb7e" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efdb5d972806dac8ab65f659d7c7ec59fc683bd2b9e149bdc77b18ae95a16fd9" dependencies = [ "async-trait", "chrono", @@ -1824,8 +1825,9 @@ dependencies = [ [[package]] name = "http-lib" -version = "1.0.0" -source = "git+https://github.com/pimalaya/core#79a960a684274537788d1193fe3db5bcf66cfb7e" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "994cbd23c90551cb5821d1c9d9b1e41383f338b31fc122671edc7d1695a61338" dependencies = [ "thiserror", "tokio", @@ -1899,8 +1901,9 @@ dependencies = [ [[package]] name = "imap-client" -version = "0.1.4" -source = "git+https://github.com/pimalaya/imap-client#c1f0dfcfb3e5f22763324d6d2497e195d44c9ec8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e667382fe3b5f75c78af4f7028a44435ed5f6da8e91500037115cee1569d8c5" dependencies = [ "imap-next", "once_cell", @@ -1914,7 +1917,8 @@ dependencies = [ [[package]] name = "imap-codec" version = "2.0.0-alpha.5" -source = "git+https://github.com/duesee/imap-codec#086523d64095fd7da35b4fe5ffe27067185c9801" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f584310addd1fb8fe288e4f07c279fec9264ac1ea68b018241ae4dcd4fb28557" dependencies = [ "abnf-core", "base64 0.22.1", @@ -1926,8 +1930,9 @@ dependencies = [ [[package]] name = "imap-next" -version = "0.2.0" -source = "git+https://github.com/duesee/imap-next#7e120f40cb30cef0f761c0efd44a4846234e9e91" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793a41b36eb0fbe7eff9d8715717be264c9429d1989a60fd3d7893476b966506" dependencies = [ "bytes", "imap-codec", @@ -1940,7 +1945,8 @@ dependencies = [ [[package]] name = "imap-types" version = "2.0.0-alpha.4" -source = "git+https://github.com/duesee/imap-codec#086523d64095fd7da35b4fe5ffe27067185c9801" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d601d81f11962a649acc2d535ad7311770e30364b4a978a762de291829c9ef53" dependencies = [ "base64 0.22.1", "bounded-static", @@ -2092,8 +2098,9 @@ dependencies = [ [[package]] name = "keyring" -version = "3.5.0" -source = "git+https://github.com/soywod/keyring-rs.git?branch=secret-service-with-keyutils#f59afd50e4b9be4e333e6c050ac8f97f51fe632d" +version = "3.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f8fe839464d4e4b37d756d7e910063696af79a7e877282cb1825e4ec5f10833" dependencies = [ "byteorder", "dbus-secret-service", @@ -2108,8 +2115,9 @@ dependencies = [ [[package]] name = "keyring-lib" -version = "1.0.0" -source = "git+https://github.com/pimalaya/core#79a960a684274537788d1193fe3db5bcf66cfb7e" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56921558c465f33d51c6047b86b76764cd2a86b69b99653b43ba1f9a32965218" dependencies = [ "keyring", "once_cell", @@ -2176,9 +2184,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "a00419de735aac21d53b0de5ce2c03bd3627277cf471300f27ebc89f7d828047" [[package]] name = "libredox" @@ -2389,7 +2397,8 @@ dependencies = [ [[package]] name = "mml-lib" version = "1.1.0" -source = "git+https://github.com/pimalaya/core#79a960a684274537788d1193fe3db5bcf66cfb7e" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ac497207f2c20c5f29503ad6e04a7d5a15e29583526764a03d46239d5b80fa" dependencies = [ "async-recursion", "chumsky", @@ -2588,7 +2597,8 @@ dependencies = [ [[package]] name = "oauth-lib" version = "1.0.0" -source = "git+https://github.com/pimalaya/core#79a960a684274537788d1193fe3db5bcf66cfb7e" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d936e2859cd8769d97a035df0886e0a8c487d916415b4ad3802ecd5a86664452" dependencies = [ "http-lib", "oauth2", @@ -2861,7 +2871,8 @@ dependencies = [ [[package]] name = "pgp-lib" version = "1.0.0" -source = "git+https://github.com/pimalaya/core#79a960a684274537788d1193fe3db5bcf66cfb7e" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b1a64cb843daaa31d7109d77871ba6fcaa25be5b488c97eeb28fc378e5fed7" dependencies = [ "async-recursion", "futures", @@ -2878,8 +2889,9 @@ dependencies = [ [[package]] name = "pimalaya-tui" -version = "1.0.0" -source = "git+https://github.com/pimalaya/tui#d3664c02dce63fe0f91b7e47a49e68bbe86f5bfc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d72a8bba0e012700dfb3a7611fffaa6b9ec9dc747134b1a1d34d2fd9f8ddce5" dependencies = [ "async-trait", "clap", @@ -3038,7 +3050,8 @@ dependencies = [ [[package]] name = "process-lib" version = "1.0.0" -source = "git+https://github.com/pimalaya/core#79a960a684274537788d1193fe3db5bcf66cfb7e" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eb47ed33aeaf6b32cecbbde6f56dde6c8740f2dac4a146179cc82f797918c46" dependencies = [ "serde", "thiserror", @@ -3288,9 +3301,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" dependencies = [ "bitflags 2.6.0", "errno", @@ -3487,7 +3500,8 @@ dependencies = [ [[package]] name = "secret-lib" version = "1.0.0" -source = "git+https://github.com/pimalaya/core#79a960a684274537788d1193fe3db5bcf66cfb7e" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba34b385def61154faed219ac86f80ad8c72877a278208bac2ecdd85d68f962f" dependencies = [ "keyring-lib", "process-lib", @@ -4212,6 +4226,7 @@ checksum = "3a139c7262528ca928e9a4368281577453ae93953159d7d7b922165bd083049f" dependencies = [ "base64 0.22.1", "cc", + "flate2", "hoot", "http", "log", diff --git a/Cargo.toml b/Cargo.toml index b09195b..7ffb918 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,8 +12,8 @@ documentation = "https://github.com/pimalaya/himalaya/" repository = "https://github.com/pimalaya/himalaya/" [package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs", "--document-private-items"] +features = ["imap", "maildir", "smtp", "sendmail", "oauth2", "wizard", "pgp-commands", "pgp-native"] +rustdoc-args = ["--cfg", "docsrs"] [features] default = [ @@ -51,11 +51,11 @@ clap = { version = "4.4", features = ["derive", "env", "wrap_help"] } clap_complete = "4.4" clap_mangen = "0.2" color-eyre = "0.6" -email-lib = { version = "1", default-features = false, features = ["tokio-rustls", "derive", "thread"] } +email-lib = { version = "=0.26", default-features = false, features = ["tokio-rustls", "derive", "thread"] } mail-builder = "0.3" -mml-lib = { version = "1", default-features = false, features = ["derive"] } +mml-lib = { version = "1", default-features = false, features = ["compiler", "interpreter", "derive"] } once_cell = "1.16" -pimalaya-tui = { version = "1", default-features = false, features = ["email", "path", "cli", "himalaya", "tracing", "sled"] } +pimalaya-tui = { version = "=0.1", default-features = false, features = ["email", "path", "cli", "himalaya", "tracing", "sled"] } secret-lib = { version = "1", default-features = false, features = ["tokio", "rustls", "command", "derive"] } serde = { version = "1", features = ["derive"] } serde_json = "1" @@ -65,22 +65,3 @@ toml = "0.8" tracing = "0.1" url = "2.2" uuid = { version = "0.8", features = ["v4"] } - -[patch.crates-io] -# IMAP -imap-codec = { git = "https://github.com/duesee/imap-codec" } -imap-next = { git = "https://github.com/duesee/imap-next" } -imap-client = { git = "https://github.com/pimalaya/imap-client" } - -# Pimalaya core -email-lib = { git = "https://github.com/pimalaya/core" } -http-lib = { git = "https://github.com/pimalaya/core" } -keyring-lib = { git = "https://github.com/pimalaya/core" } -mml-lib = { git = "https://github.com/pimalaya/core" } -oauth-lib = { git = "https://github.com/pimalaya/core" } -pgp-lib = { git = "https://github.com/pimalaya/core" } -process-lib = { git = "https://github.com/pimalaya/core" } -secret-lib = { git = "https://github.com/pimalaya/core" } - -# Pimalaya non-core -pimalaya-tui = { git = "https://github.com/pimalaya/tui" } diff --git a/src/account/command/check_up.rs b/src/account/command/check_up.rs index f608dd9..72f4d12 100644 --- a/src/account/command/check_up.rs +++ b/src/account/command/check_up.rs @@ -38,17 +38,15 @@ impl AccountCheckUpCommand { let account = self.account.name.as_ref().map(String::as_str); - printer.log("Checking configuration integrity…")?; + printer.log("Checking configuration integrity…\n")?; let (toml_account_config, account_config) = config.clone().into_account_configs(account)?; let account_config = Arc::new(account_config); - printer.log("Checking backend context integrity…")?; - match toml_account_config.backend { #[cfg(feature = "maildir")] Some(Backend::Maildir(mdir_config)) => { - printer.log("Checking Maildir integrity…")?; + printer.log("Checking Maildir integrity…\n")?; let ctx = MaildirContextBuilder::new(account_config.clone(), Arc::new(mdir_config)); BackendBuilder::new(account_config.clone(), ctx) @@ -57,7 +55,7 @@ impl AccountCheckUpCommand { } #[cfg(feature = "imap")] Some(Backend::Imap(imap_config)) => { - printer.log("Checking IMAP integrity…")?; + printer.log("Checking IMAP integrity…\n")?; let ctx = ImapContextBuilder::new(account_config.clone(), Arc::new(imap_config)) .with_pool_size(1); @@ -67,7 +65,7 @@ impl AccountCheckUpCommand { } #[cfg(feature = "notmuch")] Some(Backend::Notmuch(notmuch_config)) => { - printer.log("Checking Notmuch integrity…")?; + printer.log("Checking Notmuch integrity…\n")?; let ctx = NotmuchContextBuilder::new(account_config.clone(), Arc::new(notmuch_config)); @@ -86,7 +84,7 @@ impl AccountCheckUpCommand { match sending_backend { #[cfg(feature = "smtp")] Some(SendingBackend::Smtp(smtp_config)) => { - printer.log("Checking Smtp integrity…")?; + printer.log("Checking SMTP integrity…\n")?; let ctx = SmtpContextBuilder::new(account_config.clone(), Arc::new(smtp_config)); BackendBuilder::new(account_config.clone(), ctx) @@ -95,7 +93,7 @@ impl AccountCheckUpCommand { } #[cfg(feature = "sendmail")] Some(SendingBackend::Sendmail(sendmail_config)) => { - printer.log("Checking Sendmail integrity…")?; + printer.log("Checking Sendmail integrity…\n")?; let ctx = SendmailContextBuilder::new(account_config.clone(), Arc::new(sendmail_config)); @@ -106,6 +104,6 @@ impl AccountCheckUpCommand { _ => (), } - printer.out("Checkup successfully completed!") + printer.out("Checkup successfully completed!\n") } } diff --git a/src/account/command/configure.rs b/src/account/command/configure.rs index dbeb9c2..1d01e42 100644 --- a/src/account/command/configure.rs +++ b/src/account/command/configure.rs @@ -117,7 +117,7 @@ impl AccountConfigureCommand { } printer.out(format!( - "Account {account} successfully {}configured!", + "Account {account} successfully {}configured!\n", if self.reset { "re" } else { "" } )) } diff --git a/src/email/envelope/command/thread.rs b/src/email/envelope/command/thread.rs index 7259baf..8927c53 100644 --- a/src/email/envelope/command/thread.rs +++ b/src/email/envelope/command/thread.rs @@ -57,6 +57,7 @@ impl ThreadEnvelopesCommand { .with_thread_envelopes(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/email/envelope/flag/command/add.rs b/src/email/envelope/flag/command/add.rs index 449cb96..f90a1ae 100644 --- a/src/email/envelope/flag/command/add.rs +++ b/src/email/envelope/flag/command/add.rs @@ -51,6 +51,7 @@ impl FlagAddCommand { .with_add_flags(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/email/envelope/flag/command/remove.rs b/src/email/envelope/flag/command/remove.rs index 2311faa..be651cf 100644 --- a/src/email/envelope/flag/command/remove.rs +++ b/src/email/envelope/flag/command/remove.rs @@ -51,6 +51,7 @@ impl FlagRemoveCommand { .with_remove_flags(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/email/envelope/flag/command/set.rs b/src/email/envelope/flag/command/set.rs index 39276b8..7c0e387 100644 --- a/src/email/envelope/flag/command/set.rs +++ b/src/email/envelope/flag/command/set.rs @@ -51,6 +51,7 @@ impl FlagSetCommand { .with_set_flags(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/email/message/attachment/command/download.rs b/src/email/message/attachment/command/download.rs index 382b1cc..55b3680 100644 --- a/src/email/message/attachment/command/download.rs +++ b/src/email/message/attachment/command/download.rs @@ -52,6 +52,7 @@ impl AttachmentDownloadCommand { .with_get_messages(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/email/message/command/copy.rs b/src/email/message/command/copy.rs index 8a934d2..64728fc 100644 --- a/src/email/message/command/copy.rs +++ b/src/email/message/command/copy.rs @@ -53,6 +53,7 @@ impl MessageCopyCommand { .with_copy_messages(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/email/message/command/delete.rs b/src/email/message/command/delete.rs index 99b35b2..e765878 100644 --- a/src/email/message/command/delete.rs +++ b/src/email/message/command/delete.rs @@ -52,6 +52,7 @@ impl MessageDeleteCommand { .with_delete_messages(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/email/message/command/forward.rs b/src/email/message/command/forward.rs index 8e05bcc..d4287f6 100644 --- a/src/email/message/command/forward.rs +++ b/src/email/message/command/forward.rs @@ -63,6 +63,7 @@ impl MessageForwardCommand { .with_send_message(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/email/message/command/mailto.rs b/src/email/message/command/mailto.rs index 37ddd87..034a425 100644 --- a/src/email/message/command/mailto.rs +++ b/src/email/message/command/mailto.rs @@ -56,6 +56,7 @@ impl MessageMailtoCommand { .with_send_message(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/email/message/command/move.rs b/src/email/message/command/move.rs index 4c0ceed..0371d16 100644 --- a/src/email/message/command/move.rs +++ b/src/email/message/command/move.rs @@ -54,6 +54,7 @@ impl MessageMoveCommand { .with_move_messages(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/email/message/command/read.rs b/src/email/message/command/read.rs index 4da9913..f4614c3 100644 --- a/src/email/message/command/read.rs +++ b/src/email/message/command/read.rs @@ -99,6 +99,7 @@ impl MessageReadCommand { .with_get_messages(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/email/message/command/save.rs b/src/email/message/command/save.rs index f85f64e..d80bcb5 100644 --- a/src/email/message/command/save.rs +++ b/src/email/message/command/save.rs @@ -50,6 +50,7 @@ impl MessageSaveCommand { .with_add_message(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/email/message/command/thread.rs b/src/email/message/command/thread.rs index fbac12a..9a83091 100644 --- a/src/email/message/command/thread.rs +++ b/src/email/message/command/thread.rs @@ -101,6 +101,7 @@ impl MessageThreadCommand { .with_thread_envelopes(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/email/message/template/command/forward.rs b/src/email/message/template/command/forward.rs index 5085c3b..5300d3b 100644 --- a/src/email/message/template/command/forward.rs +++ b/src/email/message/template/command/forward.rs @@ -61,6 +61,7 @@ impl TemplateForwardCommand { .with_get_messages(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/email/message/template/command/reply.rs b/src/email/message/template/command/reply.rs index a899686..77cd00d 100644 --- a/src/email/message/template/command/reply.rs +++ b/src/email/message/template/command/reply.rs @@ -66,6 +66,7 @@ impl TemplateReplyCommand { .with_get_messages(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/email/message/template/command/save.rs b/src/email/message/template/command/save.rs index 15da3b0..6be452a 100644 --- a/src/email/message/template/command/save.rs +++ b/src/email/message/template/command/save.rs @@ -56,6 +56,7 @@ impl TemplateSaveCommand { .with_add_message(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/folder/command/add.rs b/src/folder/command/add.rs index fcfbbf3..a4a913c 100644 --- a/src/folder/command/add.rs +++ b/src/folder/command/add.rs @@ -45,6 +45,7 @@ impl AddFolderCommand { .with_add_folder(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/folder/command/delete.rs b/src/folder/command/delete.rs index ef8c778..de0addd 100644 --- a/src/folder/command/delete.rs +++ b/src/folder/command/delete.rs @@ -52,6 +52,7 @@ impl FolderDeleteCommand { .with_delete_folder(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/folder/command/expunge.rs b/src/folder/command/expunge.rs index c680fc1..8577295 100644 --- a/src/folder/command/expunge.rs +++ b/src/folder/command/expunge.rs @@ -45,6 +45,7 @@ impl FolderExpungeCommand { .with_expunge_folder(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/folder/command/list.rs b/src/folder/command/list.rs index 61e94cd..1eb3f66 100644 --- a/src/folder/command/list.rs +++ b/src/folder/command/list.rs @@ -50,6 +50,7 @@ impl FolderListCommand { .with_list_folders(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?; diff --git a/src/folder/command/purge.rs b/src/folder/command/purge.rs index 0df11e2..c1b9b50 100644 --- a/src/folder/command/purge.rs +++ b/src/folder/command/purge.rs @@ -52,6 +52,7 @@ impl FolderPurgeCommand { .with_purge_folder(BackendFeatureSource::Context) }, ) + .without_sending_backend() .build() .await?;