diff --git a/.cargo/config.toml b/.cargo/config.toml index d557d13..4cc9335 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,5 @@ [registry] default = "crates-io" -[registries.vcs-elnafo] +[registries.elnafo-vcs] index = "sparse+https://vcs.elnafo.ru/api/packages/L-Nafaryus/cargo/" diff --git a/.envrc b/.envrc deleted file mode 100644 index 3550a30..0000000 --- a/.envrc +++ /dev/null @@ -1 +0,0 @@ -use flake diff --git a/Cargo.lock b/Cargo.lock index 67cbc6c..6ccc49c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -41,19 +41,13 @@ dependencies = [ "libc", ] -[[package]] -name = "anyhow" -version = "1.0.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" - [[package]] name = "aquamarine" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a941c39708478e8eea39243b5983f1c42d2717b3620ee91f4a52115fd02ac43f" dependencies = [ - "itertools 0.9.0", + "itertools", "proc-macro-error", "proc-macro2", "quote", @@ -70,21 +64,96 @@ dependencies = [ ] [[package]] -name = "async-stream" -version = "0.3.5" +name = "async-channel" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ - "async-stream-impl", + "concurrent-queue", + "event-listener-strategy", "futures-core", "pin-project-lite", ] [[package]] -name = "async-stream-impl" -version = "0.3.5" +name = "async-io" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" +dependencies = [ + "async-lock", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix", + "slab", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-lock" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7eda79bbd84e29c2b308d1dc099d7de8dcc7035e48f4bf5dc4a531a44ff5e2a" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-signal" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfb3634b73397aa844481f814fad23bbf07fdb0eabec10f2eb95e58944b1ec32" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix", + "signal-hook-registry", + "slab", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", @@ -92,15 +161,10 @@ dependencies = [ ] [[package]] -name = "async-trait" -version = "0.1.80" +name = "atomic-waker" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", -] +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" @@ -108,51 +172,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" -[[package]] -name = "axum" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" -dependencies = [ - "async-trait", - "axum-core", - "bitflags 1.3.2", - "bytes", - "futures-util", - "http 0.2.12", - "http-body", - "hyper", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper", - "tower", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 0.2.12", - "http-body", - "mime", - "rustversion", - "tower-layer", - "tower-service", -] - [[package]] name = "backtrace" version = "0.3.71" @@ -201,6 +220,19 @@ dependencies = [ "generic-array", ] +[[package]] +name = "blocking" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + [[package]] name = "bumpalo" version = "3.16.0" @@ -209,9 +241,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytecount" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205" +checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" [[package]] name = "byteorder" @@ -221,15 +253,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" [[package]] name = "camino" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" dependencies = [ "serde", ] @@ -282,36 +314,12 @@ dependencies = [ ] [[package]] -name = "colored" -version = "2.1.0" +name = "concurrent-queue" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ - "lazy_static", - "windows-sys 0.48.0", -] - -[[package]] -name = "comfy-table" -version = "6.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e959d788268e3bf9d35ace83e81b124190378e4c91c9067524675e33394b8ba" -dependencies = [ - "crossterm 0.26.1", - "strum 0.24.1", - "strum_macros 0.24.3", - "unicode-width", -] - -[[package]] -name = "command_attr" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88da8d7e9fe6f30d8e3fcf72d0f84102b49de70fece952633e8439e89bdc7631" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "crossbeam-utils", ] [[package]] @@ -347,18 +355,18 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] @@ -369,47 +377,6 @@ version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" -[[package]] -name = "crossterm" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a84cda67535339806297f1b331d6dd6320470d2a0fe65381e79ee9e156dd3d13" -dependencies = [ - "bitflags 1.3.2", - "crossterm_winapi", - "libc", - "mio", - "parking_lot", - "signal-hook", - "signal-hook-mio", - "winapi", -] - -[[package]] -name = "crossterm" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" -dependencies = [ - "bitflags 2.5.0", - "crossterm_winapi", - "libc", - "mio", - "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 = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" -dependencies = [ - "winapi", -] - [[package]] name = "crypto-common" version = "0.1.6" @@ -432,12 +399,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.8", - "darling_macro 0.20.8", + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -450,21 +417,21 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim", + "strsim 0.10.0", "syn 1.0.109", ] [[package]] name = "darling_core" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", + "strsim 0.11.1", "syn 2.0.60", ] @@ -481,11 +448,11 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.8", + "darling_core 0.20.10", "quote", "syn 2.0.60", ] @@ -497,7 +464,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.3", + "hashbrown", "lock_api", "once_cell", "parking_lot_core", @@ -506,9 +473,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" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "deranged" @@ -565,9 +532,9 @@ dependencies = [ [[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 = "encoding_rs" @@ -578,19 +545,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "env_logger" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" -dependencies = [ - "humantime", - "is-terminal", - "log", - "regex", - "termcolor", -] - [[package]] name = "equivalent" version = "1.0.1" @@ -626,6 +580,27 @@ dependencies = [ "version_check", ] +[[package]] +name = "event-listener" +version = "5.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener", + "pin-project-lite", +] + [[package]] name = "fastrand" version = "2.0.2" @@ -634,9 +609,9 @@ checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", "miniz_oxide", @@ -720,6 +695,19 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +[[package]] +name = "futures-lite" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + [[package]] name = "futures-macro" version = "0.3.30" @@ -782,9 +770,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", "libc", @@ -815,7 +803,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.2.6", + "indexmap", "slab", "tokio", "tokio-util", @@ -824,15 +812,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "heck" @@ -846,6 +828,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 = "http" version = "0.2.12" @@ -881,9 +869,9 @@ dependencies = [ [[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" @@ -891,17 +879,11 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - [[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", @@ -930,23 +912,11 @@ dependencies = [ "futures-util", "http 0.2.12", "hyper", - "rustls 0.21.10", + "rustls 0.21.12", "tokio", "tokio-rustls 0.24.1", ] -[[package]] -name = "hyper-timeout" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" -dependencies = [ - "hyper", - "pin-project-lite", - "tokio", - "tokio-io-timeout", -] - [[package]] name = "hyper-tls" version = "0.5.0" @@ -999,16 +969,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.2.6" @@ -1016,7 +976,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown", ] [[package]] @@ -1025,17 +985,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" -[[package]] -name = "is-terminal" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "itertools" version = "0.9.0" @@ -1045,15 +994,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.11" @@ -1075,17 +1015,11 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -[[package]] -name = "levenshtein" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" - [[package]] name = "libc" -version = "0.2.153" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "linux-raw-sys" @@ -1095,9 +1029,9 @@ checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[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", @@ -1118,12 +1052,6 @@ dependencies = [ "regex-automata 0.1.10", ] -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - [[package]] name = "memchr" version = "2.7.2" @@ -1138,9 +1066,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -1177,7 +1105,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", - "log", "wasi", "windows-sys 0.48.0", ] @@ -1223,9 +1150,9 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[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", ] @@ -1236,7 +1163,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", ] @@ -1257,9 +1184,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.5.0", "cfg-if", @@ -1289,9 +1216,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -1299,77 +1226,11 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "opentelemetry" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e32339a5dc40459130b3bd269e9892439f55b33e772d2a9d402a789baaf4e8a" -dependencies = [ - "futures-core", - "futures-sink", - "indexmap 2.2.6", - "js-sys", - "once_cell", - "pin-project-lite", - "thiserror", - "urlencoding", -] - -[[package]] -name = "opentelemetry-http" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f51189ce8be654f9b5f7e70e49967ed894e84a06fc35c6c042e64ac1fc5399e" -dependencies = [ - "async-trait", - "bytes", - "http 0.2.12", - "opentelemetry", -] - -[[package]] -name = "opentelemetry_sdk" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f16aec8a98a457a52664d69e0091bac3a0abd18ead9b641cb00202ba4e0efe4" -dependencies = [ - "async-trait", - "crossbeam-channel", - "futures-channel", - "futures-executor", - "futures-util", - "glob", - "once_cell", - "opentelemetry", - "ordered-float", - "percent-encoding", - "rand", - "thiserror", -] - -[[package]] -name = "ordered-float" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76df7075c7d4d01fdcb46c912dd17fba5b60c78ea480b475f2b6ab6f666584e" -dependencies = [ - "num-traits", -] - [[package]] name = "oscuro" -version = "0.1.0" -dependencies = [ - "oscuro-core", - "tokio", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "oscuro-core" -version = "0.1.0" +version = "0.1.1" dependencies = [ + "async-process", "poise", "rand", "serde", @@ -1378,26 +1239,7 @@ dependencies = [ "tokio", "toml", "tracing", -] - -[[package]] -name = "oscuro-shuttle" -version = "0.1.0" -dependencies = [ - "oscuro-core", - "shuttle-runtime", - "shuttle-serenity", -] - -[[package]] -name = "oscuro-telegram" -version = "0.1.0" -dependencies = [ - "log", - "pretty_env_logger", - "serenity", - "teloxide", - "tokio", + "tracing-subscriber", ] [[package]] @@ -1407,10 +1249,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] -name = "parking_lot" -version = "0.12.1" +name = "parking" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1418,15 +1266,15 @@ 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.5", ] [[package]] @@ -1467,6 +1315,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + [[package]] name = "pkg-config" version = "0.3.30" @@ -1496,12 +1355,27 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fa2c123c961e78315cd3deac7663177f12be4460f5440dbf62a7ed37b1effea" dependencies = [ - "darling 0.20.8", + "darling 0.20.10", "proc-macro2", "quote", "syn 2.0.60", ] +[[package]] +name = "polling" +version = "3.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi 0.4.0", + "pin-project-lite", + "rustix", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -1514,16 +1388,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "pretty_env_logger" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "865724d4dbe39d9f3dd3b52b88d859d66bcb2d6a0acfd5ea68a65fb66d4bdc1c" -dependencies = [ - "env_logger", - "log", -] - [[package]] name = "proc-macro-error" version = "1.0.4" @@ -1557,38 +1421,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prost" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f5d036824e4761737860779c906171497f6d55681139d8312388f8fe398922" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-derive" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19de2de2a00075bf566bee3bd4db014b11587e84184d3f7a791bc17f1a8e9e48" -dependencies = [ - "anyhow", - "itertools 0.12.1", - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "prost-types" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3235c33eb02c1f1e212abdbe34c78b264b038fb58ca612664343271e36e55ffe" -dependencies = [ - "prost", -] - [[package]] name = "pulldown-cmark" version = "0.9.6" @@ -1650,11 +1482,11 @@ 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.5.0", ] [[package]] @@ -1727,7 +1559,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile", "serde", "serde_json", @@ -1793,9 +1625,9 @@ dependencies = [ [[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", @@ -1805,14 +1637,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.3" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99008d7ad0bbbea527ec27bddbc0e432c5b87d8175178cee68d2eec9c4a1813c" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" dependencies = [ "log", "ring", "rustls-pki-types", - "rustls-webpki 0.102.2", + "rustls-webpki 0.102.6", "subtle", "zeroize", ] @@ -1828,9 +1660,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.4.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] name = "rustls-webpki" @@ -1844,26 +1676,20 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.2" +version = "0.102.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" +checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" dependencies = [ "ring", "rustls-pki-types", "untrusted", ] -[[package]] -name = "rustversion" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" - [[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" @@ -1924,9 +1750,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -1934,36 +1760,36 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.198" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_cow" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e84ce5596a72f0c4c60759a10ff8c22d5eaf227b0dc2789c8746193309058b" +checksum = "1e7bbbec7196bfde255ab54b65e34087c0849629280028238e67ee25d6a4b7da" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", @@ -1972,9 +1798,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", @@ -1983,9 +1809,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -2026,12 +1852,10 @@ dependencies = [ "bitflags 2.5.0", "bytes", "chrono", - "command_attr", "dashmap", "flate2", "futures", "fxhash", - "levenshtein", "mime_guess", "parking_lot", "percent-encoding", @@ -2040,7 +1864,6 @@ dependencies = [ "serde", "serde_cow", "serde_json", - "static_assertions", "time", "tokio", "tokio-tungstenite", @@ -2048,7 +1871,6 @@ dependencies = [ "typemap_rev", "typesize", "url", - "uwl", ] [[package]] @@ -2071,125 +1893,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shuttle-codegen" -version = "0.43.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c7c1ea0dfd165fa64dd91bf4c67d1cf22e2f13c5edc4b64656b6015303aa82f" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "shuttle-common" -version = "0.43.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5367bffb2a9788af483024aaa3a7efc52f901516ef007eb82f739eb7ba609c5f" -dependencies = [ - "anyhow", - "chrono", - "comfy-table", - "crossterm 0.27.0", - "http 0.2.12", - "opentelemetry", - "opentelemetry-http", - "pin-project", - "semver", - "serde", - "serde_json", - "strum 0.26.2", - "tower", - "tracing", - "tracing-opentelemetry", - "tracing-subscriber", - "url", - "uuid", - "zeroize", -] - -[[package]] -name = "shuttle-proto" -version = "0.43.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf359a9d0077e1526f02004b34a4ad605bd72855a5ce371a646096297043f2f" -dependencies = [ - "futures-core", - "prost", - "prost-types", - "shuttle-common", - "tonic", -] - -[[package]] -name = "shuttle-runtime" -version = "0.43.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "163ea2e829b0448c8faaf10bba50c66d6280449beafcbdda3da3e69461d974d6" -dependencies = [ - "anyhow", - "async-trait", - "colored", - "serde", - "serde_json", - "shuttle-codegen", - "shuttle-common", - "shuttle-proto", - "shuttle-service", - "strfmt", - "tokio", - "tokio-stream", - "tonic", - "tracing-subscriber", -] - -[[package]] -name = "shuttle-serenity" -version = "0.43.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9319aadc77801dec9fa44d3b0f7f0b0b150c021770a1cd0151a0305d687dc561" -dependencies = [ - "serenity", - "shuttle-runtime", -] - -[[package]] -name = "shuttle-service" -version = "0.43.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c41b682b8639915d01f6b9b5bff76afc8b67d553b8199d0364bd4675397b06d" -dependencies = [ - "anyhow", - "async-trait", - "serde", - "shuttle-common", - "strfmt", - "thiserror", -] - -[[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.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" -dependencies = [ - "libc", - "mio", - "signal-hook", -] - [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -2231,9 +1934,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[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", @@ -2245,18 +1948,6 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strfmt" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a8348af2d9fc3258c8733b8d9d8db2e56f54b2363a4b5b81585c7875ed65e65" - [[package]] name = "strsim" version = "0.10.0" @@ -2264,51 +1955,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] -name = "strum" -version = "0.24.1" +name = "strsim" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" - -[[package]] -name = "strum" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" -dependencies = [ - "strum_macros 0.26.2", -] - -[[package]] -name = "strum_macros" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", -] - -[[package]] -name = "strum_macros" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.60", -] +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" @@ -2458,29 +2114,20 @@ dependencies = [ "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", -] - [[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", @@ -2530,9 +2177,9 @@ dependencies = [ [[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", ] @@ -2554,7 +2201,6 @@ dependencies = [ "libc", "mio", "num_cpus", - "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", @@ -2562,16 +2208,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.3.0" @@ -2599,7 +2235,7 @@ 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", ] @@ -2609,7 +2245,7 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ - "rustls 0.22.3", + "rustls 0.22.4", "rustls-pki-types", "tokio", ] @@ -2633,33 +2269,32 @@ checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" dependencies = [ "futures-util", "log", - "rustls 0.22.3", + "rustls 0.22.4", "rustls-pki-types", "tokio", "tokio-rustls 0.25.0", "tungstenite", - "webpki-roots 0.26.1", + "webpki-roots 0.26.3", ] [[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.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "ac2caab0bf757388c6c0ae23b3293fdb463fee59434529014f85e3263b995c28" dependencies = [ "serde", "serde_spanned", @@ -2669,79 +2304,26 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.9" +version = "0.22.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" +checksum = "278f3d518e152219c994ce877758516bca5e118eaed6996192a774fb9fbf0788" dependencies = [ - "indexmap 2.2.6", + "indexmap", "serde", "serde_spanned", "toml_datetime", "winnow", ] -[[package]] -name = "tonic" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" -dependencies = [ - "async-stream", - "async-trait", - "axum", - "base64 0.21.7", - "bytes", - "h2", - "http 0.2.12", - "http-body", - "hyper", - "hyper-timeout", - "percent-encoding", - "pin-project", - "prost", - "tokio", - "tokio-stream", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand", - "slab", - "tokio", - "tokio-util", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - [[package]] name = "tower-service" version = "0.3.2" @@ -2792,34 +2374,6 @@ dependencies = [ "tracing-core", ] -[[package]] -name = "tracing-opentelemetry" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c67ac25c5407e7b961fafc6f7e9aa5958fd297aada2d20fa2ae1737357e55596" -dependencies = [ - "js-sys", - "once_cell", - "opentelemetry", - "opentelemetry_sdk", - "smallvec", - "tracing", - "tracing-core", - "tracing-log", - "tracing-subscriber", - "web-time", -] - -[[package]] -name = "tracing-serde" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" -dependencies = [ - "serde", - "tracing-core", -] - [[package]] name = "tracing-subscriber" version = "0.3.18" @@ -2830,22 +2384,19 @@ dependencies = [ "nu-ansi-term", "once_cell", "regex", - "serde", - "serde_json", "sharded-slab", "smallvec", "thread_local", "tracing", "tracing-core", "tracing-log", - "tracing-serde", ] [[package]] name = "triomphe" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" +checksum = "e6631e42e10b40c0690bf92f404ebcfe6e1fdb480391d15f17cc8e96eeed5369" [[package]] name = "try-lock" @@ -2866,7 +2417,7 @@ dependencies = [ "httparse", "log", "rand", - "rustls 0.22.3", + "rustls 0.22.4", "rustls-pki-types", "sha1", "thiserror", @@ -2894,7 +2445,7 @@ checksum = "eb704842c709bc76f63e99e704cb208beeccca2abbabd0d9aec02e48ca1cee0f" dependencies = [ "chrono", "dashmap", - "hashbrown 0.14.3", + "hashbrown", "mini-moka", "parking_lot", "secrecy", @@ -2945,12 +2496,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-width" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" - [[package]] name = "untrusted" version = "0.9.0" @@ -2959,9 +2504,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", @@ -2969,12 +2514,6 @@ dependencies = [ "serde", ] -[[package]] -name = "urlencoding" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" - [[package]] name = "utf-8" version = "0.7.6" @@ -2983,20 +2522,13 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "uuid" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ "getrandom", - "serde", ] -[[package]] -name = "uwl" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4bf03e0ca70d626ecc4ba6b0763b934b6f2976e8c744088bb3c1d646fbb1ad0" - [[package]] name = "valuable" version = "0.1.0" @@ -3129,16 +2661,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "web-time" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - [[package]] name = "webpki-roots" version = "0.25.4" @@ -3147,9 +2669,9 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.26.1" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" dependencies = [ "rustls-pki-types", ] @@ -3172,11 +2694,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -3335,9 +2857,9 @@ checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.6.6" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c976aaaa0e1f90dbb21e9587cdaf1d9679a1cde8875c0d6bd83ab96a208352" +checksum = "557404e450152cd6795bb558bca69e43c585055f4606e3bcae5894fc6dac9ba0" dependencies = [ "memchr", ] @@ -3354,6 +2876,6 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" diff --git a/Cargo.toml b/Cargo.toml index 5d9bdce..9108248 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,18 +1,24 @@ [package] name = "oscuro" -version = "0.1.0" +version = "0.1.1" edition = "2021" -description = "Oscuro - a fancy discord bot" +description = "Oscuro is a fancy multibot" license = "MIT" repository = "https://vcs.elnafo.ru/L-Nafaryus/oscuro" publish = ["vcs-elnafo"] [dependencies] -oscuro-core = { version = "0.1.0", path = "crates/oscuro-core", registry = "vcs-elnafo" } +async-process = "2.2.3" +poise = "0.6.1" +rand = "0.8.5" +serde = { version = "1.0.204", features = ["derive"] } +serde_json = "1.0.120" +teloxide = { version = "0.12.2", features = ["macros"] } tokio = { version = "1.26.0", features = ["macros", "rt-multi-thread"] } +toml = "0.8.15" tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } [workspace] resolver = "2" -members = ["crates/oscuro-core", "crates/oscuro-shuttle", "crates/oscuro-telegram"] +members = [] diff --git a/crates/oscuro-core/Cargo.toml b/crates/oscuro-core/Cargo.toml deleted file mode 100644 index 21e54ed..0000000 --- a/crates/oscuro-core/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "oscuro-core" -version = "0.1.0" -edition = "2021" -description = "Core of a fancy discord bot Oscuro" -license = "MIT" -repository = "https://vcs.elnafo.ru/L-Nafaryus/oscuro" -publish = ["vcs-elnafo"] - -[dependencies] -poise = "0.6.1" -rand = "0.8.5" -serde = { version = "1.0.198", features = ["derive"] } -serde_json = "1.0.116" -teloxide = { version = "0.12.2", features = ["macros"] } -tokio = { version = "1.26.0", features = ["macros", "rt-multi-thread"] } -toml = "0.8.12" -tracing = "0.1.37" diff --git a/crates/oscuro-core/src/commands.rs b/crates/oscuro-core/src/commands.rs deleted file mode 100644 index 96a8488..0000000 --- a/crates/oscuro-core/src/commands.rs +++ /dev/null @@ -1,40 +0,0 @@ -use poise::serenity_prelude as serenity; -use rand::Rng; - -use super::errors::BoxedError; -use super::Context; - -#[poise::command(prefix_command)] -pub async fn register(ctx: Context<'_>) -> Result<(), BoxedError> { - poise::builtins::register_application_commands_buttons(ctx).await?; - Ok(()) -} - -#[poise::command(slash_command, prefix_command)] -pub async fn age( - ctx: Context<'_>, - #[description = "Ooph user"] user: Option, -) -> Result<(), BoxedError> { - let u = user.as_ref().unwrap_or_else(|| ctx.author()); - let response = format!("{}'s account was created at {}", u.name, u.created_at()); - ctx.say(response).await?; - Ok(()) -} - -#[poise::command(slash_command, prefix_command)] -pub async fn dice(ctx: Context<'_>) -> Result<(), BoxedError> { - let number = { - let mut rng = rand::thread_rng(); - rng.gen_range(1..21) - }; - - let response = format!("{} throws {}.", ctx.author(), number); - let response = match number { - 20 => format!("{} Critical success.", response), - 1 => format!("{} Critical failure.", response), - _ => response, - }; - - ctx.say(response).await?; - Ok(()) -} diff --git a/crates/oscuro-core/src/lib.rs b/crates/oscuro-core/src/lib.rs deleted file mode 100644 index ac7a003..0000000 --- a/crates/oscuro-core/src/lib.rs +++ /dev/null @@ -1,76 +0,0 @@ -pub mod commands; -pub mod config; -pub mod errors; - -use errors::BoxedError; -use poise::serenity_prelude::{self as serenity, prelude::TypeMapKey, Client}; - -use teloxide::prelude::*; -use teloxide::types::Recipient; - -#[derive(Debug, Clone)] -pub struct AppState { - pub config: config::Config, -} - -impl TypeMapKey for AppState { - type Value = AppState; -} - -type Context<'a> = poise::Context<'a, AppState, BoxedError>; - -pub async fn client(state: AppState) -> Result { - let intents = serenity::GatewayIntents::non_privileged(); - let state_copy = state.clone(); - let framework = poise::Framework::builder() - .options(poise::FrameworkOptions { - commands: vec![commands::register(), commands::age(), commands::dice()], - event_handler: |ctx, event, framework, data| { - Box::pin(event_handler(ctx, event, framework, data)) - }, - ..Default::default() - }) - .setup(|ctx, _ready, framework| { - Box::pin(async move { - poise::builtins::register_globally(ctx, &framework.options().commands).await?; - Ok(state_copy) - }) - }) - .build(); - - let client = serenity::ClientBuilder::new(state.clone().config.discord_token, intents) - .framework(framework) - .await?; - - { - let mut data = client.data.write().await; - data.insert::(state); - } - - Ok(client) -} - -async fn event_handler( - _ctx: &serenity::Context, - event: &serenity::FullEvent, - _framework: poise::FrameworkContext<'_, AppState, BoxedError>, - _state: &AppState, -) -> Result<(), BoxedError> { - match event { - serenity::FullEvent::Ready { data_about_bot, .. } => { - println!("Logged in as {}", data_about_bot.user.name); - } - serenity::FullEvent::Message { new_message } => { - println!("{:?}", new_message.clone()); - let bot = Bot::from_env(); - bot.send_message( - Recipient::Id(ChatId(-4221527632)), - new_message.author.name.clone(), - ) - .await - .expect("err"); - } - _ => {} - } - Ok(()) -} diff --git a/crates/oscuro-shuttle/Cargo.toml b/crates/oscuro-shuttle/Cargo.toml deleted file mode 100644 index 4ea1f55..0000000 --- a/crates/oscuro-shuttle/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "oscuro-shuttle" -version = "0.1.0" -edition = "2021" -publish = false - -[package.metadata.release] -release = false - -[dependencies] -oscuro-core = { version = "0.1.0", path = "../oscuro-core" } -shuttle-runtime = "0.43.0" -shuttle-serenity = "0.43.0" diff --git a/crates/oscuro-shuttle/src/main.rs b/crates/oscuro-shuttle/src/main.rs deleted file mode 100644 index 24210d0..0000000 --- a/crates/oscuro-shuttle/src/main.rs +++ /dev/null @@ -1,20 +0,0 @@ -use oscuro_core::{client, config::Config, AppState}; - -#[shuttle_runtime::main] -async fn main( - #[shuttle_runtime::Secrets] secrets: shuttle_runtime::SecretStore, -) -> shuttle_serenity::ShuttleSerenity { - let token = secrets - .get("discord_token") - .expect("Variable 'DISCORD_TOKEN' must be set"); - - let state = AppState { - config: Config { - discord_token: token, - }, - }; - - let client = client(state).await.expect("Failed to create client"); - - Ok(client.into()) -} diff --git a/crates/oscuro-telegram/Cargo.toml b/crates/oscuro-telegram/Cargo.toml deleted file mode 100644 index 1fab116..0000000 --- a/crates/oscuro-telegram/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "oscuro-telegram" -version = "0.1.0" -edition = "2021" -publish = ["vcs-elnafo"] - -[dependencies] -log = "0.4.22" -pretty_env_logger = "0.5.0" -serenity = "0.12.2" -teloxide = { version = "0.12.2", features = ["macros"] } -tokio = { version = "1.38.0", features = ["rt-multi-thread", "macros"] } diff --git a/crates/oscuro-telegram/src/main.rs b/crates/oscuro-telegram/src/main.rs deleted file mode 100644 index f4979ff..0000000 --- a/crates/oscuro-telegram/src/main.rs +++ /dev/null @@ -1,31 +0,0 @@ -use serenity::builder::ExecuteWebhook; -use serenity::http::Http; -use serenity::model::webhook::Webhook; -use teloxide::prelude::*; -use teloxide::types::Recipient; - -#[tokio::main] -async fn main() { - pretty_env_logger::init(); - log::info!("Starting throw dice bot..."); - - let bot = Bot::from_env(); - - /*let http = Http::new(""); - let webhook = Webhook::from_url(&http, "https://discord.com/api/webhooks/1259860143579987999/whI0ozB5uc17Wdzkb2-HSrVGi8h_MyR2_4eyCsGuGpQN4KcjMhq7rfQH1JIdbD1HNaW_") - .await - .expect("Replace the webhook with your own"); - - let builder = ExecuteWebhook::new().content("hello there").username("Webhook test"); - webhook.execute(&http, false, builder).await.expect("Could not execute webhook."); - */ - teloxide::repl(bot, |bot: Bot, msg: Message| async move { - bot.send_dice(msg.chat.id).await?; - Ok(()) - }) - .await; - - /*bot.send_message(Recipient::Id(ChatId(-4221527632)), "Heya!") - .await - .expect("err");*/ -} diff --git a/flake.lock b/flake.lock index 88a0e1a..5e7021d 100644 --- a/flake.lock +++ b/flake.lock @@ -1,22 +1,27 @@ { "nodes": { - "blobs": { - "flake": false, + "ags": { + "inputs": { + "nixpkgs": [ + "bonfire", + "nixpkgs" + ] + }, "locked": { - "lastModified": 1604995301, - "narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=", - "owner": "simple-nixos-mailserver", - "repo": "blobs", - "rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265", - "type": "gitlab" + "lastModified": 1718921313, + "narHash": "sha256-TFJah1RW5qnYW7kajjAFPAS5j/0q0R3vz9zPjrRA0Mc=", + "owner": "Aylur", + "repo": "ags", + "rev": "646d5ad073ff7f8b1d50cfbd40f5b8a250fcd59d", + "type": "github" }, "original": { - "owner": "simple-nixos-mailserver", - "repo": "blobs", - "type": "gitlab" + "owner": "Aylur", + "repo": "ags", + "type": "github" } }, - "blobs_2": { + "blobs": { "flake": false, "locked": { "lastModified": 1604995301, @@ -34,46 +39,24 @@ }, "bonfire": { "inputs": { + "ags": "ags", + "catppuccin": "catppuccin", "crane": "crane", "fenix": "fenix", "home-manager": "home-manager", - "nixgl": "nixgl", "nixos-mailserver": "nixos-mailserver", "nixpkgs": "nixpkgs", - "oscuro": "oscuro", - "sops-nix": "sops-nix_2" - }, - "locked": { - "lastModified": 1714133223, - "narHash": "sha256-mappc4Lj+nVE3Xc7aw5+kqDSJdXs4ALYlRpegWtNoyY=", - "owner": "L-Nafaryus", - "repo": "bonfire", - "rev": "a2f306e7fc5abcf1c05e4cbe72c23d9e53588932", - "type": "github" - }, - "original": { - "owner": "L-Nafaryus", - "repo": "bonfire", - "type": "github" - } - }, - "bonfire_2": { - "inputs": { - "crane": "crane_2", - "devenv": "devenv", - "fenix": "fenix_2", - "home-manager": "home-manager_2", - "nixgl": "nixgl_2", - "nixos-mailserver": "nixos-mailserver_2", - "nixpkgs": "nixpkgs_3", + "nixvim": "nixvim", + "obs-image-reaction": "obs-image-reaction", + "oscuro": [], "sops-nix": "sops-nix" }, "locked": { - "lastModified": 1713950784, - "narHash": "sha256-E8KH9rUYRNEajvuUhQxaqVZEj4INxgux/HbQ7NzZZ68=", + "lastModified": 1721564098, + "narHash": "sha256-1hTF86lu1iE+RVxteFRGCa6kyarkS2a/rGcs1HBH9dM=", "owner": "L-Nafaryus", "repo": "bonfire", - "rev": "5217f6d2229e246f0df4d47c1b4046559160c14f", + "rev": "7c8f579ef9a3c3ded888405a4810cd4aa889feaf", "type": "github" }, "original": { @@ -82,42 +65,18 @@ "type": "github" } }, - "cachix": { - "inputs": { - "devenv": "devenv_2", - "flake-compat": [ - "bonfire", - "oscuro", - "bonfire", - "devenv", - "flake-compat" - ], - "nixpkgs": [ - "bonfire", - "oscuro", - "bonfire", - "devenv", - "nixpkgs" - ], - "pre-commit-hooks": [ - "bonfire", - "oscuro", - "bonfire", - "devenv", - "pre-commit-hooks" - ] - }, + "catppuccin": { "locked": { - "lastModified": 1712055811, - "narHash": "sha256-7FcfMm5A/f02yyzuavJe06zLa9hcMHsagE28ADcmQvk=", - "owner": "cachix", - "repo": "cachix", - "rev": "02e38da89851ec7fec3356a5c04bc8349cae0e30", + "lastModified": 1719758387, + "narHash": "sha256-bMaI1jJNzIZar4TP/hhoPQROqqcbD6zT6O+sqIJdp8c=", + "owner": "catppuccin", + "repo": "nix", + "rev": "9eb0610d48dd0e1fecf772bbdacf9050d7b82d7c", "type": "github" }, "original": { - "owner": "cachix", - "repo": "cachix", + "owner": "catppuccin", + "repo": "nix", "type": "github" } }, @@ -129,11 +88,11 @@ ] }, "locked": { - "lastModified": 1713738183, - "narHash": "sha256-qd/MuLm7OfKQKyd4FAMqV4H6zYyOfef5lLzRrmXwKJM=", + "lastModified": 1719685792, + "narHash": "sha256-WIoVERD4AN6CmfGSRPy3mfPx2dDbRHgzP2V8z6aNbaY=", "owner": "ipetkov", "repo": "crane", - "rev": "f6c6a2fb1b8bd9b65d65ca9342dd0eb180a63f11", + "rev": "aa5dcd0518a422dfd545d565f0d5a25971fea52a", "type": "github" }, "original": { @@ -142,90 +101,26 @@ "type": "github" } }, - "crane_2": { + "devshell": { "inputs": { + "flake-utils": "flake-utils", "nixpkgs": [ "bonfire", - "oscuro", - "bonfire", + "nixvim", "nixpkgs" ] }, "locked": { - "lastModified": 1713738183, - "narHash": "sha256-qd/MuLm7OfKQKyd4FAMqV4H6zYyOfef5lLzRrmXwKJM=", - "owner": "ipetkov", - "repo": "crane", - "rev": "f6c6a2fb1b8bd9b65d65ca9342dd0eb180a63f11", + "lastModified": 1717408969, + "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", + "owner": "numtide", + "repo": "devshell", + "rev": "1ebbe68d57457c8cae98145410b164b5477761f4", "type": "github" }, "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "devenv": { - "inputs": { - "cachix": "cachix", - "flake-compat": "flake-compat_3", - "nix": "nix_2", - "nixpkgs": [ - "bonfire", - "oscuro", - "bonfire", - "nixpkgs" - ], - "pre-commit-hooks": "pre-commit-hooks" - }, - "locked": { - "lastModified": 1713860250, - "narHash": "sha256-FF/a1Isk7XrhAWjSS0687YCmmm6khaBHPk9Dbsessqk=", - "owner": "cachix", - "repo": "devenv", - "rev": "09549b3a55e12f43c9ce29356ba6762c8fbd84ec", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "devenv", - "type": "github" - } - }, - "devenv_2": { - "inputs": { - "flake-compat": [ - "bonfire", - "oscuro", - "bonfire", - "devenv", - "cachix", - "flake-compat" - ], - "nix": "nix", - "nixpkgs": "nixpkgs_2", - "poetry2nix": "poetry2nix", - "pre-commit-hooks": [ - "bonfire", - "oscuro", - "bonfire", - "devenv", - "cachix", - "pre-commit-hooks" - ] - }, - "locked": { - "lastModified": 1708704632, - "narHash": "sha256-w+dOIW60FKMaHI1q5714CSibk99JfYxm0CzTinYWr+Q=", - "owner": "cachix", - "repo": "devenv", - "rev": "2ee4450b0f4b95a1b90f2eb5ffea98b90e48c196", - "type": "github" - }, - "original": { - "owner": "cachix", - "ref": "python-rewrite", - "repo": "devenv", + "owner": "numtide", + "repo": "devshell", "type": "github" } }, @@ -240,39 +135,11 @@ ] }, "locked": { - "lastModified": 1713853552, - "narHash": "sha256-OOXi+9cSbst7Crah6UVxHe33O6HK91WgD2yU/p5/dqs=", + "lastModified": 1719815435, + "narHash": "sha256-K2xFp142onP35jcx7li10xUxNVEVRWjAdY8DSuR7Naw=", "owner": "nix-community", "repo": "fenix", - "rev": "d596927635ddd8db224bbff6e4ccb08e42649eb5", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, - "fenix_2": { - "inputs": { - "nixpkgs": [ - "bonfire", - "oscuro", - "bonfire", - "nixpkgs" - ], - "rust-analyzer-src": [ - "bonfire", - "oscuro", - "bonfire" - ] - }, - "locked": { - "lastModified": 1713853552, - "narHash": "sha256-OOXi+9cSbst7Crah6UVxHe33O6HK91WgD2yU/p5/dqs=", - "owner": "nix-community", - "repo": "fenix", - "rev": "d596927635ddd8db224bbff6e4ccb08e42649eb5", + "rev": "ebfe2c639111d7e82972a12711206afaeeda2450", "type": "github" }, "original": { @@ -298,19 +165,17 @@ } }, "flake-compat_2": { - "flake": false, "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" }, "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, "flake-compat_3": { @@ -329,47 +194,38 @@ "type": "github" } }, - "flake-compat_4": { - "flake": false, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "bonfire", + "nixvim", + "nixpkgs" + ] + }, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "lastModified": 1719745305, + "narHash": "sha256-xwgjVUpqSviudEkpQnioeez1Uo2wzrsMaJKJClh+Bls=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c3c5ecc05edc7dafba779c6c1a61cd08ac6583e9", "type": "github" }, "original": { - "owner": "edolstra", - "repo": "flake-compat", + "owner": "hercules-ci", + "repo": "flake-parts", "type": "github" } }, "flake-utils": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { "inputs": { - "systems": "systems_2" + "systems": "systems" }, "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "owner": "numtide", "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "type": "github" }, "original": { @@ -378,36 +234,32 @@ "type": "github" } }, - "flake-utils_3": { + "git-hooks": { "inputs": { - "systems": "systems_3" + "flake-compat": "flake-compat_3", + "gitignore": "gitignore", + "nixpkgs": [ + "bonfire", + "nixvim", + "nixpkgs" + ], + "nixpkgs-stable": [ + "bonfire", + "nixvim", + "nixpkgs" + ] }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "lastModified": 1719259945, + "narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "cachix", + "repo": "git-hooks.nix", "type": "github" } }, @@ -415,10 +267,8 @@ "inputs": { "nixpkgs": [ "bonfire", - "oscuro", - "bonfire", - "devenv", - "pre-commit-hooks", + "nixvim", + "git-hooks", "nixpkgs" ] }, @@ -444,11 +294,11 @@ ] }, "locked": { - "lastModified": 1713818326, - "narHash": "sha256-aw3xbVPJauLk/bbrlakIYxKpeuMWzA2feGrkIpIuXd8=", + "lastModified": 1719827439, + "narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=", "owner": "nix-community", "repo": "home-manager", - "rev": "67de98ae6eed5ad6f91b1142356d71a87ba97f21", + "rev": "59ce796b2563e19821361abbe2067c3bb4143a7d", "type": "github" }, "original": { @@ -461,17 +311,16 @@ "inputs": { "nixpkgs": [ "bonfire", - "oscuro", - "bonfire", + "nixvim", "nixpkgs" ] }, "locked": { - "lastModified": 1713818326, - "narHash": "sha256-aw3xbVPJauLk/bbrlakIYxKpeuMWzA2feGrkIpIuXd8=", + "lastModified": 1719677234, + "narHash": "sha256-qO9WZsj/0E6zcK4Ht1y/iJ8XfwbBzq7xdqhBh44OP/M=", "owner": "nix-community", "repo": "home-manager", - "rev": "67de98ae6eed5ad6f91b1142356d71a87ba97f21", + "rev": "36317d4d38887f7629876b0e43c8d9593c5cc48d", "type": "github" }, "original": { @@ -480,138 +329,25 @@ "type": "github" } }, - "nix": { - "inputs": { - "flake-compat": "flake-compat_2", - "nixpkgs": [ - "bonfire", - "oscuro", - "bonfire", - "devenv", - "cachix", - "devenv", - "nixpkgs" - ], - "nixpkgs-regression": "nixpkgs-regression" - }, - "locked": { - "lastModified": 1708577783, - "narHash": "sha256-92xq7eXlxIT5zFNccLpjiP7sdQqQI30Gyui2p/PfKZM=", - "owner": "domenkozar", - "repo": "nix", - "rev": "ecd0af0c1f56de32cbad14daa1d82a132bf298f8", - "type": "github" - }, - "original": { - "owner": "domenkozar", - "ref": "devenv-2.21", - "repo": "nix", - "type": "github" - } - }, - "nix-github-actions": { + "nix-darwin": { "inputs": { "nixpkgs": [ "bonfire", - "oscuro", - "bonfire", - "devenv", - "cachix", - "devenv", - "poetry2nix", + "nixvim", "nixpkgs" ] }, "locked": { - "lastModified": 1688870561, - "narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=", - "owner": "nix-community", - "repo": "nix-github-actions", - "rev": "165b1650b753316aa7f1787f3005a8d2da0f5301", + "lastModified": 1719128254, + "narHash": "sha256-I7jMpq0CAOZA/i70+HDQO/ulLttyQu/K70cSESiMX7A=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "50581970f37f06a4719001735828519925ef8310", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "nix-github-actions", - "type": "github" - } - }, - "nix_2": { - "inputs": { - "flake-compat": [ - "bonfire", - "oscuro", - "bonfire", - "devenv", - "flake-compat" - ], - "nixpkgs": [ - "bonfire", - "oscuro", - "bonfire", - "devenv", - "nixpkgs" - ], - "nixpkgs-regression": "nixpkgs-regression_2" - }, - "locked": { - "lastModified": 1712911606, - "narHash": "sha256-BGvBhepCufsjcUkXnEEXhEVjwdJAwPglCC2+bInc794=", - "owner": "domenkozar", - "repo": "nix", - "rev": "b24a9318ea3f3600c1e24b4a00691ee912d4de12", - "type": "github" - }, - "original": { - "owner": "domenkozar", - "ref": "devenv-2.21", - "repo": "nix", - "type": "github" - } - }, - "nixgl": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "bonfire", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1713543440, - "narHash": "sha256-lnzZQYG0+EXl/6NkGpyIz+FEOc/DSEG57AP1VsdeNrM=", - "owner": "guibou", - "repo": "nixGL", - "rev": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a", - "type": "github" - }, - "original": { - "owner": "guibou", - "repo": "nixGL", - "type": "github" - } - }, - "nixgl_2": { - "inputs": { - "flake-utils": "flake-utils_4", - "nixpkgs": [ - "bonfire", - "oscuro", - "bonfire", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1713543440, - "narHash": "sha256-lnzZQYG0+EXl/6NkGpyIz+FEOc/DSEG57AP1VsdeNrM=", - "owner": "guibou", - "repo": "nixGL", - "rev": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a", - "type": "github" - }, - "original": { - "owner": "guibou", - "repo": "nixGL", + "owner": "lnl7", + "repo": "nix-darwin", "type": "github" } }, @@ -623,40 +359,14 @@ "bonfire", "nixpkgs" ], - "utils": "utils" + "nixpkgs-24_05": "nixpkgs-24_05" }, "locked": { - "lastModified": 1713012165, - "narHash": "sha256-z/soXKDnz+w4Nw0LkRaM73YqolhSmIYy6cpg1F2ps8I=", + "lastModified": 1718697807, + "narHash": "sha256-Enla61WFisytTYbWygPynEbu8vozjeGc6Obkj2GRj7o=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "9f6635a0351c190179dc6904545f950108a23dd8", - "type": "gitlab" - }, - "original": { - "owner": "simple-nixos-mailserver", - "repo": "nixos-mailserver", - "type": "gitlab" - } - }, - "nixos-mailserver_2": { - "inputs": { - "blobs": "blobs_2", - "flake-compat": "flake-compat_4", - "nixpkgs": [ - "bonfire", - "oscuro", - "bonfire", - "nixpkgs" - ], - "utils": "utils_2" - }, - "locked": { - "lastModified": 1713012165, - "narHash": "sha256-z/soXKDnz+w4Nw0LkRaM73YqolhSmIYy6cpg1F2ps8I=", - "owner": "simple-nixos-mailserver", - "repo": "nixos-mailserver", - "rev": "9f6635a0351c190179dc6904545f950108a23dd8", + "rev": "290a995de5c3d3f08468fa548f0d55ab2efc7b6b", "type": "gitlab" }, "original": { @@ -667,11 +377,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1713714899, - "narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=", + "lastModified": 1719690277, + "narHash": "sha256-0xSej1g7eP2kaUF+JQp8jdyNmpmCJKRpO12mKl/36Kc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6143fc5eeb9c4f00163267708e26191d1e918932", + "rev": "2741b4b489b55df32afac57bc4bfd220e8bf617e", "type": "github" }, "original": { @@ -681,77 +391,28 @@ "type": "github" } }, - "nixpkgs-regression": { + "nixpkgs-24_05": { "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "lastModified": 1717144377, + "narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "rev": "805a384895c696f802a9bf5bf4720f37385df547", "type": "github" }, "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, - "nixpkgs-regression_2": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" + "id": "nixpkgs", + "ref": "nixos-24.05", + "type": "indirect" } }, "nixpkgs-stable": { "locked": { - "lastModified": 1710695816, - "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", + "lastModified": 1719663039, + "narHash": "sha256-tXlrgAQygNIy49LDVFuPXlWD2zTQV9/F8pfoqwwPJyo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "614b4613980a522ba49f0d194531beddbb7220d3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_2": { - "locked": { - "lastModified": 1713638189, - "narHash": "sha256-q7APLfB6FmmSMI1Su5ihW9IwntBsk2hWNXh8XtSdSIk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "74574c38577914733b4f7a775dd77d24245081dd", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "release-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_3": { - "locked": { - "lastModified": 1713638189, - "narHash": "sha256-q7APLfB6FmmSMI1Su5ihW9IwntBsk2hWNXh8XtSdSIk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "74574c38577914733b4f7a775dd77d24245081dd", + "rev": "4a1e673523344f6ccc84b37f4413ad74ea19a119", "type": "github" }, "original": { @@ -763,11 +424,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1692808169, - "narHash": "sha256-x9Opq06rIiwdwGeK2Ykj69dNc2IvUH1fY55Wm7atwrE=", + "lastModified": 1719223410, + "narHash": "sha256-jtIo8xR0Zp4SalIwmD+OdCwHF4l7OU6PD63UUK4ckt4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9201b5ff357e781bf014d0330d18555695df7ba8", + "rev": "efb39c6052f3ce51587cf19733f5f4e5d515aa13", "type": "github" }, "original": { @@ -777,99 +438,49 @@ "type": "github" } }, - "nixpkgs_3": { - "locked": { - "lastModified": 1713714899, - "narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "6143fc5eeb9c4f00163267708e26191d1e918932", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "oscuro": { + "nixvim": { "inputs": { - "bonfire": "bonfire_2" - }, - "locked": { - "lastModified": 1714131862, - "narHash": "sha256-t936zWQu+wHz4i1SPveDrCIpzvtjzhqlbCh7quzZldU=", - "owner": "L-Nafaryus", - "repo": "oscuro", - "rev": "d3944c0a08747f11aa4b9227dcb256c103a5a559", - "type": "github" - }, - "original": { - "owner": "L-Nafaryus", - "repo": "oscuro", - "type": "github" - } - }, - "poetry2nix": { - "inputs": { - "flake-utils": "flake-utils_2", - "nix-github-actions": "nix-github-actions", + "devshell": "devshell", + "flake-compat": "flake-compat_2", + "flake-parts": "flake-parts", + "git-hooks": "git-hooks", + "home-manager": "home-manager_2", + "nix-darwin": "nix-darwin", "nixpkgs": [ "bonfire", - "oscuro", - "bonfire", - "devenv", - "cachix", - "devenv", "nixpkgs" - ] + ], + "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1692876271, - "narHash": "sha256-IXfZEkI0Mal5y1jr6IRWMqK8GW2/f28xJenZIPQqkY0=", + "lastModified": 1719835160, + "narHash": "sha256-AyZJM2la6+CAdKKSC3y80sbneW8dH/2lb+OxKzi2cAw=", "owner": "nix-community", - "repo": "poetry2nix", - "rev": "d5006be9c2c2417dafb2e2e5034d83fabd207ee3", + "repo": "nixvim", + "rev": "7cc1685eafdcf04cf1058949647ea2c7560f2d65", "type": "github" }, "original": { "owner": "nix-community", - "repo": "poetry2nix", + "repo": "nixvim", "type": "github" } }, - "pre-commit-hooks": { + "obs-image-reaction": { "inputs": { - "flake-compat": [ - "bonfire", - "oscuro", - "bonfire", - "devenv", - "flake-compat" - ], - "flake-utils": "flake-utils_3", - "gitignore": "gitignore", - "nixpkgs": [ - "bonfire", - "oscuro", - "bonfire", - "devenv", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" + "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1712897695, - "narHash": "sha256-nMirxrGteNAl9sWiOhoN5tIHyjBbVi5e2tgZUgZlK3Y=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "40e6053ecb65fcbf12863338a6dcefb3f55f1bf8", + "lastModified": 1719314544, + "narHash": "sha256-GZa3+2OELKp/9b2+EwwzaIMNvR9niCy/YZ5OERhG9Hg=", + "owner": "L-Nafaryus", + "repo": "obs-image-reaction", + "rev": "0dcb3c27de5782dfdf95cb047ccceb3e65360e6b", "type": "github" }, "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", + "owner": "L-Nafaryus", + "repo": "obs-image-reaction", "type": "github" } }, @@ -885,41 +496,17 @@ "sops-nix": { "inputs": { "nixpkgs": [ - "bonfire", - "oscuro", "bonfire", "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable_2" + "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1713775152, - "narHash": "sha256-xyP8h9jLQ0AmyPy40sIwL7/D03oVpXG9YHoYJ4ecYWA=", + "lastModified": 1719716556, + "narHash": "sha256-KA9gy2Wkv76s4A8eLnOcdKVTygewbw3xsB8+awNMyqs=", "owner": "Mic92", "repo": "sops-nix", - "rev": "4371a1301c4d36cc791069d90ae522613a3a335e", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "sops-nix", - "type": "github" - } - }, - "sops-nix_2": { - "inputs": { - "nixpkgs": [ - "bonfire", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable_3" - }, - "locked": { - "lastModified": 1713775152, - "narHash": "sha256-xyP8h9jLQ0AmyPy40sIwL7/D03oVpXG9YHoYJ4ecYWA=", - "owner": "Mic92", - "repo": "sops-nix", - "rev": "4371a1301c4d36cc791069d90ae522613a3a335e", + "rev": "b5974d4331fb6c893e808977a2e1a6d34b3162d6", "type": "github" }, "original": { @@ -943,84 +530,25 @@ "type": "github" } }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "utils": { + "treefmt-nix": { "inputs": { - "systems": "systems" + "nixpkgs": [ + "bonfire", + "nixvim", + "nixpkgs" + ] }, "locked": { - "lastModified": 1709126324, - "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", + "lastModified": 1719749022, + "narHash": "sha256-ddPKHcqaKCIFSFc/cvxS14goUhCOAwsM1PbMr0ZtHMg=", "owner": "numtide", - "repo": "flake-utils", - "rev": "d465f4819400de7c8d874d50b982301f28a84605", + "repo": "treefmt-nix", + "rev": "8df5ff62195d4e67e2264df0b7f5e8c9995fd0bd", "type": "github" }, "original": { "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_2": { - "inputs": { - "systems": "systems_4" - }, - "locked": { - "lastModified": 1709126324, - "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "d465f4819400de7c8d874d50b982301f28a84605", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", + "repo": "treefmt-nix", "type": "github" } } diff --git a/flake.nix b/flake.nix index 886c09d..1e0718b 100644 --- a/flake.nix +++ b/flake.nix @@ -1,14 +1,23 @@ { - description = "Oscuro - a fancy discord bot"; + description = "Oscuro is a fancy multibot"; nixConfig = { - extra-substituters = ["https://bonfire.cachix.org"]; - extra-trusted-public-keys = ["bonfire.cachix.org-1:mzAGBy/Crdf8NhKail5ciK7ZrGRbPJJobW6TwFb7WYM="]; + extra-substituters = [ + "https://cache.elnafo.ru" + "https://bonfire.cachix.org" + ]; + extra-trusted-public-keys = [ + "cache.elnafo.ru:j3VD+Hn+is2Qk3lPXDSdPwHJQSatizk7V82iJ2RP1yo=" + "bonfire.cachix.org-1:mzAGBy/Crdf8NhKail5ciK7ZrGRbPJJobW6TwFb7WYM=" + ]; }; inputs = { bonfire = { url = "github:L-Nafaryus/bonfire"; + inputs = { + oscuro.follows = ""; + }; }; nixpkgs.follows = "bonfire/nixpkgs"; }; @@ -19,49 +28,47 @@ bonfire, ... }: let - forAllSystems = nixpkgs.lib.genAttrs ["x86_64-linux"]; - nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;}); + pkgs = nixpkgs.legacyPackages.x86_64-linux; + lib = pkgs.lib; + fenixPkgs = bonfire.inputs.fenix.packages.x86_64-linux; + craneLib = (bonfire.inputs.crane.mkLib pkgs).overrideToolchain fenixPkgs.complete.toolchain; in { - packages = forAllSystems (system: let - pkgs = nixpkgsFor.${system}; - crane-lib = bonfire.inputs.crane.lib.${system}; + packages.x86_64-linux = rec { + oscuro = let + common = { + pname = "oscuro"; + version = "0.1.0"; - src = pkgs.lib.cleanSourceWith { - src = ./.; - filter = path: type: (crane-lib.filterCargoSources path type); - }; + src = pkgs.lib.cleanSourceWith { + src = ./.; + filter = path: type: (craneLib.filterCargoSources path type); + }; - common = { - inherit src; - pname = "oscuro"; - version = "0.1.0"; - strictDeps = true; - }; + strictDeps = true; - cargoArtifacts = crane-lib.buildDepsOnly common; - in { - oscuro = crane-lib.buildPackage (common // {inherit cargoArtifacts;}); + nativeBuildInputs = [pkgs.pkg-config]; - default = self.packages.${system}.oscuro; - }); + buildInputs = [pkgs.openssl]; + }; - devShells = forAllSystems (system: let - pkgs = nixpkgsFor.${system}; - bonfire-pkgs = bonfire.packages.${system}; - fenix-pkgs = bonfire.inputs.fenix.packages.${system}; - in { - default = pkgs.mkShell { - buildInputs = [ - fenix-pkgs.complete.toolchain - bonfire-pkgs.cargo-shuttle - pkgs.cargo-release - pkgs.pkg-config - pkgs.openssl - ]; - }; - }); + cargoArtifacts = craneLib.buildDepsOnly common; + in + craneLib.buildPackage (common // {inherit cargoArtifacts;}); - nixosModules = { + default = oscuro; + }; + + devShells.x86_64-linux.default = pkgs.mkShell { + nativeBuildInputs = [pkgs.pkg-config]; + buildInputs = [ + fenixPkgs.complete.toolchain + pkgs.cargo-release + pkgs.openssl + ]; + LD_LIBRARY_PATH = lib.makeLibraryPath [pkgs.openssl]; + }; + + nixosModules = rec { oscuro = { config, lib, @@ -148,7 +155,7 @@ }; }; - default = self.nixosModules.oscuro; + default = oscuro; }; nixosConfigurations.oscuro = nixpkgs.lib.nixosSystem { diff --git a/crates/oscuro-core/src/config.rs b/src/config.rs similarity index 75% rename from crates/oscuro-core/src/config.rs rename to src/config.rs index 10b3826..5480e40 100644 --- a/crates/oscuro-core/src/config.rs +++ b/src/config.rs @@ -1,10 +1,12 @@ +use std::env; use std::fs; use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Config { - pub discord_token: String, + pub discord_token: Option, + pub telegram_token: Option, } impl Config { @@ -28,12 +30,24 @@ impl Config { pub fn write(&self, path: &std::path::Path) -> Result<(), ConfigError> { Ok(fs::write(path, self.to_string()?)?) } + + pub fn with_env(mut self) -> Self { + if let Ok(token) = env::var("OSCURO_DISCORD_TOKEN") { + self.discord_token = Some(token); + }; + if let Ok(token) = env::var("OSCURO_TELEGRAM_TOKEN") { + self.telegram_token = Some(token); + }; + + self + } } impl Default for Config { fn default() -> Self { Self { - discord_token: String::new(), + discord_token: Some(String::new()), + telegram_token: Some(String::new()), } } } @@ -58,10 +72,10 @@ impl std::error::Error for ConfigError {} impl std::fmt::Display for ConfigError { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { - Self::Parse => write!(f, "Failed to parse Config from string"), + Self::Parse => write!(f, "Failed to parse config from string"), Self::StringParse => write!(f, "Failed to parse environment variable"), Self::Serialize => write!(f, "Failed to serialize Config to TOML"), - Self::IO => write!(f, "Faild to write file"), + Self::IO => write!(f, "Failed to write file"), } } } diff --git a/src/discord/commands.rs b/src/discord/commands.rs new file mode 100644 index 0000000..ad93295 --- /dev/null +++ b/src/discord/commands.rs @@ -0,0 +1,84 @@ +use async_process::Command; +use poise::serenity_prelude as serenity; +use rand::Rng; +use std::collections::HashMap; +use std::str; + +use super::Context; +use crate::errors::BoxedError; + +#[poise::command(prefix_command)] +pub async fn register(ctx: Context<'_>) -> Result<(), BoxedError> { + poise::builtins::register_application_commands_buttons(ctx).await?; + Ok(()) +} + +#[poise::command(slash_command, prefix_command)] +pub async fn age( + ctx: Context<'_>, + #[description = "Ooph user"] user: Option, +) -> Result<(), BoxedError> { + let u = user.as_ref().unwrap_or_else(|| ctx.author()); + let response = format!("{}'s account was created at {}", u.name, u.created_at()); + ctx.say(response).await?; + Ok(()) +} + +#[poise::command(slash_command, prefix_command)] +pub async fn dice(ctx: Context<'_>) -> Result<(), BoxedError> { + let number = { + let mut rng = rand::thread_rng(); + rng.gen_range(1..21) + }; + + let response = format!("{} throws {}.", ctx.author(), number); + let response = match number { + 20 => format!("{} Critical success.", response), + 1 => format!("{} Critical failure.", response), + _ => response, + }; + + ctx.say(response).await?; + Ok(()) +} + +#[derive(Debug, poise::ChoiceParameter)] +pub enum ServiceChoice { + #[name = "Elnafo VCS"] + ElnafoVcs, + #[name = "Elnafo Mail"] + ElnafoMail, +} + +#[poise::command(slash_command, prefix_command)] +pub async fn status( + ctx: Context<'_>, + #[description = "Check service status"] service: ServiceChoice, +) -> Result<(), BoxedError> { + let mut systemctl = Command::new("systemctl"); + let service_info = match service { + ServiceChoice::ElnafoVcs => systemctl.arg("show").arg("gitea.service"), + ServiceChoice::ElnafoMail => systemctl.arg("show").arg("acpid.service"), + }; + let output = service_info.output().await?; + + let mut data: HashMap<&str, &str> = HashMap::new(); + + for line in str::from_utf8(&output.stdout)?.lines() { + let kv: Vec<&str> = line.split('=').collect(); + data.insert(kv[0], kv[1]); + } + println!("{:?} {:?}", data["LoadState"], data["SubState"]); + + if data["LoadState"] == "loaded" && data["SubState"] == "running" { + ctx.say(format!( + "{:?} is up and running for {}", + service, data["ExecMainStartTimestamp"] + )) + .await?; + } else { + ctx.say(format!("{:?} is dead", service)).await?; + } + + Ok(()) +} diff --git a/src/discord/mod.rs b/src/discord/mod.rs new file mode 100644 index 0000000..a92a1f7 --- /dev/null +++ b/src/discord/mod.rs @@ -0,0 +1,148 @@ +pub mod commands; + +use crate::config::Config; +use crate::errors::BoxedError; +use std::sync::Arc; + +use poise::serenity_prelude::{ + self as serenity, + builder::{CreateEmbed, CreateMessage}, + model::id::ChannelId, + prelude::TypeMapKey, + //Client, +}; +use serenity::GatewayIntents; + +use teloxide::prelude::*; +use teloxide::types::Recipient; + +use crate::telegram; + +#[derive(Debug, Clone)] +pub struct BotState { + pub config: Config, + pub telegram_agent: Option, +} + +impl TypeMapKey for BotState { + type Value = BotState; +} + +type Context<'a> = poise::Context<'a, BotState, BoxedError>; + +pub struct Client { + client: serenity::Client, +} + +impl Client { + pub async fn new(config: Config) -> Result { + let telegram_agent = if config.clone().telegram_token.is_some() { + Some(telegram::Client::new(config.clone())) + } else { + None + }; + + let state = BotState { + config: config.clone(), + telegram_agent: telegram_agent, + }; + + let intents = GatewayIntents::GUILDS + | GatewayIntents::GUILD_MESSAGES + | GatewayIntents::MESSAGE_CONTENT; + let state_copy = state.clone(); + let framework = poise::Framework::builder() + .options(poise::FrameworkOptions { + commands: vec![ + commands::register(), + commands::age(), + commands::dice(), + commands::status(), + ], + event_handler: |ctx, event, framework, data| { + Box::pin(event_handler(ctx, event, framework, data)) + }, + ..Default::default() + }) + .setup(|ctx, _ready, framework| { + Box::pin(async move { + poise::builtins::register_globally(ctx, &framework.options().commands).await?; + Ok(state_copy) + }) + }) + .build(); + + let client = + serenity::ClientBuilder::new(state.clone().config.discord_token.unwrap(), intents) + .framework(framework) + .await?; + + { + let mut data = client.data.write().await; + data.insert::(state); + } + + Ok(Self { client }) + } + + pub async fn start(&mut self) -> Result<(), BoxedError> { + self.client.start().await; + Ok(()) + } + + pub async fn send(&self, chat_id: u64, msg: String) -> Result<(), BoxedError> { + let builder = CreateMessage::new().content(msg); + let message = ChannelId::new(chat_id) + .send_message(&self.client.http, builder) + .await?; + Ok(()) + } +} + +async fn event_handler( + ctx: &serenity::Context, + event: &serenity::FullEvent, + _framework: poise::FrameworkContext<'_, BotState, BoxedError>, + _state: &BotState, +) -> Result<(), BoxedError> { + match event { + serenity::FullEvent::Ready { data_about_bot, .. } => { + tracing::info!("discord: Logged in as {}", data_about_bot.user.name); + + // We can use ChannelId directly to send a message to a specific channel; in this case, the + // message would be sent to the #testing channel on the discord server. + /*let embed = CreateEmbed::new().title("System Resource Load").field( + "CPU Load Average", + format!("{:.2}%", 10.0), + false, + ); + let builder = CreateMessage::new().embed(embed); + let message = ChannelId::new(1145642256443904002) + .send_message(&ctx, builder) + .await; + if let Err(why) = message { + eprintln!("Error sending message: {why:?}"); + };*/ + } + serenity::FullEvent::Message { new_message } => { + let mut data = ctx.data.write().await; + let state = data.get_mut::().unwrap(); + println!("{:?}", new_message); + + let author = new_message + .author + .global_name + .clone() + .or(Some(new_message.author.name.clone())) + .unwrap(); + + if let Some(agent) = &state.telegram_agent { + agent + .send(-4221527632, format!("{}: {}", author, new_message.content)) + .await; + } + } + _ => {} + } + Ok(()) +} diff --git a/crates/oscuro-core/src/errors.rs b/src/errors.rs similarity index 100% rename from crates/oscuro-core/src/errors.rs rename to src/errors.rs diff --git a/src/main.rs b/src/main.rs index 6c9544b..9e20658 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,34 +1,76 @@ -use oscuro_core::{client, config::Config, AppState}; -use std::env; +mod config; +mod discord; +mod errors; +mod telegram; + +use config::Config; + +use tokio::signal; +use tokio::task::JoinSet; #[tokio::main] -async fn main() -> Result<(), Box> { +async fn main() -> Result<(), errors::BoxedError> { tracing_subscriber::fmt() .with_target(false) .compact() .init(); - let mut config = match Config::open(Config::data_dir()?.join("config.toml").as_path()) { + tracing::info!("Working directory: {:?}", Config::data_dir()?); + + let config = match Config::open(Config::data_dir()?.join("config.toml").as_path()) { Ok(config) => config, - Err(_) => Config::default(), - }; + Err(err) => { + tracing::debug!("{}", err); + tracing::info!("Using default configuration"); + Config::default() + } + } + .with_env(); - if let Ok(token) = env::var("DISCORD_TOKEN") { - config.discord_token = token; - }; + let mut runset = JoinSet::new(); - if config.discord_token.is_empty() { - tracing::error!("Missing discord token"); + if !config.clone().discord_token.is_some() { + tracing::warn!("Missing discord token"); + } else { + let mut discord_client = discord::Client::new(config.clone()) + .await + .expect("Failed to create discord client"); + + runset.spawn(async move { + + let res = discord_client.start().await; + if let Err(err) = res { + tracing::error!("{}", err); + } + }); } - let state = AppState { config }; + if !config.clone().telegram_token.is_some() { + tracing::warn!("Missing telegram token"); + } else { + let telegram_client = telegram::Client::new(config); - client(state) - .await - .expect("Failed to create client") - .start() - .await - .expect("Failed to start client"); + runset.spawn(async move { + let res = telegram_client.start().await; + if let Err(err) = res { + tracing::error!("{}", err); + } + }); + } + + while let Some(res) = runset.join_next().await { + if let Err(err) = res { + tracing::error!("{}", err); + } + } + + match signal::ctrl_c().await { + Ok(()) => {} + Err(err) => { + eprintln!("Unable to listen for shutdown signal: {}", err); + // we also shut down in case of error + } + } Ok(()) } diff --git a/src/telegram/mod.rs b/src/telegram/mod.rs new file mode 100644 index 0000000..bee571c --- /dev/null +++ b/src/telegram/mod.rs @@ -0,0 +1,85 @@ +use teloxide::prelude::*; +use teloxide::types::Recipient; +use teloxide::utils::command::BotCommands; + +use crate::config::Config; +use crate::errors; +use rand::Rng; + +async fn main() { + let bot = Bot::from_env(); + + /*let http = Http::new(""); + let webhook = Webhook::from_url(&http, "https://discord.com/api/webhooks/1259860143579987999/whI0ozB5uc17Wdzkb2-HSrVGi8h_MyR2_4eyCsGuGpQN4KcjMhq7rfQH1JIdbD1HNaW_") + .await + .expect("Replace the webhook with your own"); + + let builder = ExecuteWebhook::new().content("hello there").username("Webhook test"); + webhook.execute(&http, false, builder).await.expect("Could not execute webhook."); + */ + teloxide::repl(bot, |bot: Bot, msg: Message| async move { + bot.send_dice(msg.chat.id).await?; + Ok(()) + }) + .await; + + /*bot.send_message(Recipient::Id(ChatId(-4221527632)), "Heya!") + .await + .expect("err");*/ +} + +#[derive(Clone, Debug)] +pub struct Client { + bot: Bot, +} + +impl Client { + pub fn new(config: Config) -> Self { + Self { + bot: Bot::new(config.telegram_token.unwrap()), + } + } + + pub async fn start(&self) -> Result<(), errors::BoxedError> { + Command::repl(self.bot.clone(), event_handler).await; + Ok(()) + } + + pub async fn send(&self, chat_id: i64, msg: String) -> ResponseResult<()> { + self.bot + .send_message(Recipient::Id(ChatId(chat_id)), msg) + .await?; + Ok(()) + } +} + +#[derive(BotCommands, Clone)] +#[command(rename_rule = "lowercase")] +pub enum Command { + #[command()] + Dice, +} + +async fn event_handler(bot: Bot, msg: Message, cmd: Command) -> ResponseResult<()> { + match cmd { + Command::Dice => { + let number = { + let mut rng = rand::thread_rng(); + rng.gen_range(1..21) + }; + + let response = format!("{} throws {}.", "test", number); + let response = match number { + 20 => format!("{} Critical success.", response), + 1 => format!("{} Critical failure.", response), + _ => response, + }; + // -4221527632 + + bot.send_message(Recipient::Id(msg.chat.id), response) + .await?; + } + }; + + Ok(()) +}