diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1f16929..ce1c4c3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -5,6 +5,10 @@ on: pull_request permissions: contents: read +concurrency: + group: rust-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + env: APP_NAME: notify_push @@ -14,7 +18,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v26 - - uses: cachix/cachix-action@v14 + - uses: cachix/cachix-action@v13 with: name: notify-push authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' @@ -26,7 +30,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v26 - - uses: cachix/cachix-action@v14 + - uses: cachix/cachix-action@v13 with: name: notify-push authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' @@ -38,7 +42,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v26 - - uses: cachix/cachix-action@v14 + - uses: cachix/cachix-action@v13 with: name: notify-push authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' @@ -63,7 +67,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v26 - - uses: cachix/cachix-action@v14 + - uses: cachix/cachix-action@v13 with: name: notify-push authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' @@ -79,7 +83,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v26 - - uses: cachix/cachix-action@v14 + - uses: cachix/cachix-action@v13 with: name: notify-push authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' @@ -91,7 +95,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v26 - - uses: cachix/cachix-action@v14 + - uses: cachix/cachix-action@v13 with: name: notify-push authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' @@ -117,7 +121,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v26 - - uses: cachix/cachix-action@v14 + - uses: cachix/cachix-action@v13 with: name: notify-push authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' @@ -134,7 +138,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v26 - - uses: cachix/cachix-action@v14 + - uses: cachix/cachix-action@v13 with: name: notify-push authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' @@ -146,7 +150,7 @@ jobs: needs: build steps: - uses: cachix/install-nix-action@v26 - - uses: cachix/cachix-action@v14 + - uses: cachix/cachix-action@v13 with: name: notify-push authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' diff --git a/Cargo.lock b/Cargo.lock index 4a8e151..7fb52da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -117,46 +117,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener 2.5.3", - "futures-core", -] - -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite", - "log", - "parking", - "polling", - "rustix 0.37.27", - "slab", - "socket2 0.4.10", - "waker-fn", -] - -[[package]] -name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener 2.5.3", -] - [[package]] name = "async-stream" version = "0.3.5" @@ -176,18 +136,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -287,9 +247,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" dependencies = [ "serde", ] @@ -362,9 +322,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.2" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651" +checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" dependencies = [ "clap_builder", "clap_derive", @@ -384,14 +344,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.0" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" +checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -626,12 +586,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - [[package]] name = "event-listener" version = "3.1.0" @@ -643,15 +597,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "finl_unicode" version = "1.2.0" @@ -670,14 +615,13 @@ dependencies = [ [[package]] name = "flexi_logger" -version = "0.27.4" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469e584c031833564840fb0cdbce99bdfe946fd45480a188545e73a76f45461c" +checksum = "f248c29a6d4bc5d065c9e9068d858761a0dcd796759f7801cc14db35db23abd8" dependencies = [ "chrono", "glob", "is-terminal", - "lazy_static", "log", "nu-ansi-term", "regex", @@ -769,21 +713,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - [[package]] name = "futures-macro" version = "0.3.30" @@ -792,7 +721,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -807,18 +736,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" -[[package]] -name = "futures-time" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6404853a6824881fe5f7d662d147dc4e84ecd2259ba0378f272a71dab600758a" -dependencies = [ - "async-channel", - "async-io", - "futures-core", - "pin-project-lite", -] - [[package]] name = "futures-util" version = "0.3.30" @@ -872,9 +789,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ "bytes", "fnv", @@ -950,6 +867,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -1060,7 +983,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.6", + "socket2", "tokio", "tower-service", "tracing", @@ -1124,26 +1047,6 @@ dependencies = [ "hashbrown", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.9", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipnet" version = "2.9.0" @@ -1218,7 +1121,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "libc", "redox_syscall", ] @@ -1234,12 +1137,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - [[package]] name = "linux-raw-sys" version = "0.4.13" @@ -1283,7 +1180,7 @@ dependencies = [ "proc-macro2", "quote", "regex-syntax 0.8.2", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1348,7 +1245,7 @@ checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1469,7 +1366,7 @@ name = "notify_push" version = "0.1.0" dependencies = [ "ahash", - "clap 4.5.2", + "clap 4.5.3", "dashmap", "derivative", "dotenvy", @@ -1656,7 +1553,7 @@ dependencies = [ "regex", "regex-syntax 0.8.2", "structmeta", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1717,7 +1614,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -1759,22 +1656,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", -] - [[package]] name = "ppv-lite86" version = "0.2.17" @@ -1807,9 +1688,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -1861,16 +1742,15 @@ dependencies = [ [[package]] name = "redis" -version = "0.25.0" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3268dab7fe8f1d136b3c4367bc230383dc2c357f8e305ee898fa3beacddaf00d" +checksum = "71d64e978fd98a0e6b105d066ba4889a7301fca65aeac850a877d8797343feeb" dependencies = [ "async-trait", "bytes", "combine", "crc16", "futures", - "futures-time", "futures-util", "itoa", "log", @@ -1949,9 +1829,9 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.25" +version = "0.11.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eea5a9eb898d3783f17c6407670e3592fd174cb81a10e51d4c37f49450b9946" +checksum = "78bf93c4af7a8bb7d879d51cebe797356ff10ae8516ace542b5182d9dcac10b2" dependencies = [ "base64 0.21.7", "bytes", @@ -2038,30 +1918,16 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" -[[package]] -name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - [[package]] name = "rustix" version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys", "windows-sys 0.52.0", ] @@ -2187,7 +2053,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2287,16 +2153,6 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.5.6" @@ -2352,7 +2208,7 @@ dependencies = [ "ahash", "atoi 2.0.0", "base64 0.21.7", - "bitflags 2.4.2", + "bitflags 2.5.0", "byteorder", "bytes", "crc", @@ -2361,7 +2217,7 @@ dependencies = [ "dirs", "dotenvy", "either", - "event-listener 3.1.0", + "event-listener", "flume", "futures-channel", "futures-core", @@ -2474,7 +2330,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2485,7 +2341,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2573,9 +2429,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" dependencies = [ "proc-macro2", "quote", @@ -2590,20 +2446,20 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "system-configuration" -version = "0.6.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bc6ee10a9b4fcf576e9b0819d95ec16f4d2c02d39fd83ac1c8789785c4a42" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "bitflags 2.4.2", + "bitflags 1.3.2", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.6.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" dependencies = [ "core-foundation-sys", "libc", @@ -2615,7 +2471,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "rustix 0.38.31", + "rustix", "windows-sys 0.48.0", ] @@ -2655,22 +2511,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2712,7 +2568,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.6", + "socket2", "tokio-macros", "windows-sys 0.48.0", ] @@ -2725,7 +2581,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -2740,9 +2596,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite", @@ -2813,7 +2669,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] @@ -3077,12 +2933,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "waker-fn" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" - [[package]] name = "want" version = "0.3.1" @@ -3167,7 +3017,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "wasm-bindgen-shared", ] @@ -3201,7 +3051,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3448,7 +3298,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.53", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 4f5d00b..ee8244c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,10 +6,10 @@ edition = "2021" rust-version = "1.74.0" [dependencies] -redis = { version = "0.25.0", default-features = false, features = ["tokio-comp", "aio", "cluster", "cluster-async"] } +redis = { version = "0.25.2", default-features = false, features = ["tokio-comp", "aio", "cluster", "cluster-async"] } serde = { version = "1.0.197", features = ["derive"] } serde_json = "1.0.114" -thiserror = "1.0.57" +thiserror = "1.0.58" warp = { version = "0.3.6", features = ["tls"] } tokio = { version = "1.36.0", features = ["macros", "rt-multi-thread", "signal"] } futures = "0.3.30" @@ -20,18 +20,18 @@ dashmap = "5.5.3" once_cell = "1.19.0" miette = { version = "7.2.0", features = ["fancy"] } smallvec = { version = "1.13.1", features = ["serde"] } -reqwest = { version = "0.11.25", default-features = false, features = ["rustls-tls", "json"] } +reqwest = { version = "0.11.26", default-features = false, features = ["rustls-tls", "json"] } warp-real-ip = "0.2.0" parse-display = "0.9.0" percent-encoding = "2.3.1" rand = { version = "0.8.5", features = ["small_rng"] } ahash = "0.8.11" -flexi_logger = { version = "0.27.4", features = ["colors", "is-terminal"] } -tokio-stream = { version = "0.1.14", features = ["net"] } +flexi_logger = { version = "0.28.0", features = ["colors", "is-terminal"] } +tokio-stream = { version = "0.1.15", features = ["net"] } derivative = "2.2.0" nextcloud-config-parser = { version = "0.10.0", features = ["redis-connect"] } url = "2.5.0" -clap = { version = "4.5.2", features = ["derive"] } +clap = { version = "4.5.3", features = ["derive"] } [dev-dependencies] mini-redis = "0.4.1" diff --git a/src/error.rs b/src/error.rs index 2d241c0..0a17010 100644 --- a/src/error.rs +++ b/src/error.rs @@ -18,13 +18,13 @@ pub enum Error { #[error("Error while running self test: {0}")] #[diagnostic(transparent)] SelfTest(#[from] SelfTestError), - #[error("Failed to set signal hook")] + #[error("Failed to set signal hook: {0}")] SignalHook(#[source] std::io::Error), - #[error("Failed to listen to socket")] + #[error("Failed to listen to socket: {0}")] Socket(#[from] SocketError), - #[error("Error while handling authentication")] + #[error("Error while handling authentication: {0}")] Authentication(#[from] AuthenticationError), - #[error("Error while communicating with Nextcloud")] + #[error("Error while communicating with Nextcloud: {0}")] NextCloud(#[from] NextCloudError), } @@ -32,9 +32,9 @@ pub enum Error { pub enum NextCloudError { #[error(transparent)] Request(#[from] reqwest::Error), - #[error("Invalid nextcloud url")] + #[error("Invalid nextcloud url: {0}")] NextcloudUrl(#[from] url::ParseError), - #[error("Error while connecting to nextcloud")] + #[error("Error while connecting to nextcloud: {0}")] NextcloudConnect(#[source] reqwest::Error), #[error("Client error: {0}")] Client(StatusCode), @@ -44,35 +44,35 @@ pub enum NextCloudError { Other(StatusCode), #[error("{0} is not configured as a trusted domain for the nextcloud server")] NotATrustedDomain(String), - #[error("Invalid response when getting test cookie")] + #[error("Invalid response when getting test cookie: {0}")] MalformedCookieResponse(#[source] ParseIntError), - #[error("Invalid response when testing if the push server is a trusted proxy")] + #[error("Invalid response when testing if the push server is a trusted proxy: {0}")] MalformedRemote(#[source] AddrParseError), } #[derive(Debug, Error, Diagnostic)] pub enum DatabaseError { - #[error("Failed to connect to database")] + #[error("Failed to connect to database: {0}")] Connect(#[source] sqlx_oldapi::Error), - #[error("Failed to query database")] + #[error("Failed to query database: {0}")] Query(#[source] sqlx_oldapi::Error), } #[derive(Debug, Error, Diagnostic)] pub enum SelfTestError { - #[error("Failed to test database access")] + #[error("Failed to test database access: {0}")] Database(#[from] DatabaseError), - #[error("Failed to test redis access")] + #[error("Failed to test redis access: {0}")] Redis(#[from] RedisError), - #[error("Error while communicating with nextcloud instance")] + #[error("Error while communicating with nextcloud instance: {0}")] NextcloudCommunication(#[from] NextCloudError), } #[derive(Debug, Error, Diagnostic)] pub enum SocketError { - #[error("Failed to bind to socket at {1}")] + #[error("Failed to bind to socket at {1}: {0}")] Bind(#[source] std::io::Error, String), - #[error("Failed to set socket permissions")] + #[error("Failed to set socket permissions: {0}")] SocketPermissions(#[source] std::io::Error), } @@ -94,7 +94,7 @@ pub enum ConfigError { ), #[error("socket permissions should be provided in the octal form `0xxx`, got {0}")] SocketPermissions(String, Option), - #[error("Failed to parse log level")] + #[error("Failed to parse log level: {0}")] LogLevel(#[from] FlexiLoggerError), #[error("Failed to parse database configuration: {0:#}")] InvalidDatabase(#[from] sqlx_oldapi::Error), @@ -114,7 +114,7 @@ pub enum AuthenticationError { Socket(#[from] WebSocketError), #[error("Invalid authentication message")] InvalidMessage, - #[error("Error while sending authentication request to nextcloud")] + #[error("Error while sending authentication request to nextcloud: {0}")] Nextcloud(#[from] NextCloudError), #[error("Invalid credentials")] Invalid, diff --git a/test_client/Cargo.toml b/test_client/Cargo.toml index 0e3736e..db3a2f1 100644 --- a/test_client/Cargo.toml +++ b/test_client/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" tungstenite = { version = "0.21.0", features = ["rustls-tls-webpki-roots"] } serde_json = "1.0.114" ureq = "2.9.6" -flexi_logger = { version = "0.27.4", features = ["colors"] } +flexi_logger = { version = "0.28.0", features = ["colors"] } log = "0.4.21" base64 = "0.22.0" miette = { version = "7.2.0", features = ["fancy"] }