From f9c64a923e16f1f9bedfd633d026bea4ec0d683d Mon Sep 17 00:00:00 2001 From: Michael <12646562+mbround18@users.noreply.github.com> Date: Sat, 21 Aug 2021 14:10:05 -0700 Subject: [PATCH] Regressed dep and fixed other (#421) * Regressed dep and fixed other * Update Makefile.toml --- Cargo.lock | 333 +++++++----------- Dockerfile.odin | 8 +- src/odin/Cargo.toml | 4 +- src/odin/cli.yaml | 54 +-- src/odin/commands/notify.rs | 2 +- src/odin/commands/status.rs | 2 +- src/odin/main.rs | 31 +- src/odin/mods/bepinex.rs | 2 +- src/odin/mods/mod.rs | 22 +- .../notifications/enums/notification_event.rs | 2 +- src/odin/server/startup.rs | 10 +- src/odin/server/update.rs | 10 +- 12 files changed, 200 insertions(+), 280 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f8e06f73..bcdb636b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,6 +20,15 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +dependencies = [ + "winapi", +] + [[package]] name = "atty" version = "0.2.14" @@ -45,9 +54,9 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bitflags" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" @@ -164,9 +173,9 @@ checksum = "7b02b629252fe8ef6460461409564e2c21d0c8e77e0944f3d189ff06c4e932ad" [[package]] name = "cc" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a72c244c1ff497a746a7e1fb3d14bd08420ecda70c8f25c7112f2781652d787" +checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" [[package]] name = "cfg-if" @@ -189,37 +198,20 @@ dependencies = [ [[package]] name = "clap" -version = "3.0.0-beta.2" +version = "2.33.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bd1061998a501ee7d4b6d449020df3266ca3124b941ec56cf2005c3779ca142" +checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" dependencies = [ + "ansi_term", "atty", "bitflags", - "clap_derive", - "indexmap", - "lazy_static", - "os_str_bytes", "strsim", - "termcolor", "textwrap", "unicode-width", "vec_map", "yaml-rust", ] -[[package]] -name = "clap_derive" -version = "3.0.0-beta.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "370f715b81112975b1b69db93e0b56ea4cd4e5002ac43b2da8474106a54096a1" -dependencies = [ - "heck", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "core-foundation-sys" version = "0.8.2" @@ -228,9 +220,9 @@ checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" [[package]] name = "cpufeatures" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed00c67cb5d0a7d64a44f6ad2668db7e7530311dd53ea79bcd4fb022c64911c8" +checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" dependencies = [ "libc", ] @@ -316,9 +308,9 @@ checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] name = "filetime" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d34cfa13a63ae058bfa601fe9e313bbdb3746427c1459185464ce0fcf62e1e8" +checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" dependencies = [ "cfg-if", "libc", @@ -362,9 +354,9 @@ checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" [[package]] name = "futures" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7e43a803dae2fa37c1f6a8fe121e1f7bf9548b4dfc0522a42f34145dadfc27" +checksum = "1adc00f486adfc9ce99f77d717836f0c5aa84965eb0b4f051f4e83f7cab53f8b" dependencies = [ "futures-channel", "futures-core", @@ -376,9 +368,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e682a68b29a882df0545c143dc3646daefe80ba479bcdede94d5a703de2871e2" +checksum = "74ed2411805f6e4e3d9bc904c95d5d423b89b3b25dc0250aa74729de20629ff9" dependencies = [ "futures-core", "futures-sink", @@ -386,21 +378,21 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0402f765d8a89a26043b889b26ce3c4679d268fa6bb22cd7c6aad98340e179d1" +checksum = "af51b1b4a7fdff033703db39de8802c673eb91855f2e0d47dcf3bf2c0ef01f99" [[package]] name = "futures-io" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acc499defb3b348f8d8f3f66415835a9131856ff7714bf10dadfc4ec4bdb29a1" +checksum = "0b0e06c393068f3a6ef246c75cdca793d6a46347e75286933e5e75fd2fd11582" [[package]] name = "futures-macro" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c40298486cdf52cc00cd6d6987892ba502c7656a16a4192a9992b1ccedd121" +checksum = "c54913bae956fb8df7f4dc6fc90362aa72e69148e3f39041fbe8742d21e0ac57" dependencies = [ "autocfg", "proc-macro-hack", @@ -411,21 +403,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a57bead0ceff0d6dde8f465ecd96c9338121bb7717d3e7b108059531870c4282" +checksum = "c0f30aaa67363d119812743aa5f33c201a7a66329f97d1a887022971feea4b53" [[package]] name = "futures-task" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a16bef9fc1a4dddb5bee51c989e3fbba26569cbb0e31f5b303c184e3dd33dae" +checksum = "bbe54a98670017f3be909561f6ad13e810d9a51f3f061b902062ca3da80799f2" [[package]] name = "futures-util" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feb5c238d27e2bf94ffdfd27b2c29e3df4a68c4193bb6427384259e2bf191967" +checksum = "67eb846bfd58e44a8481a00049e82c43e0ccb5d61f8dc071057cb19249dd4d78" dependencies = [ "autocfg", "futures-core", @@ -509,9 +501,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "4.0.1" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2060119114dd8a8bc87facce6384751af8280a7adc8e203c023c95cbb11f5663" +checksum = "fd85ecabdb47308d28d3a4113224fefcab2510ccb4e463aee0a1362eb84c756a" dependencies = [ "log", "pest", @@ -523,9 +515,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.9.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" [[package]] name = "headers" @@ -539,7 +531,7 @@ dependencies = [ "headers-core", "http", "mime", - "sha-1 0.9.6", + "sha-1 0.9.7", "time", ] @@ -552,20 +544,11 @@ dependencies = [ "http", ] -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "hermit-abi" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "libc", ] @@ -583,9 +566,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60daa14be0e0786db0f03a9e57cb404c9d756eed2b6c62b9ea98ec5743ec75a9" +checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5" dependencies = [ "bytes", "http", @@ -594,9 +577,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.4.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3a87b616e37e93c22fb19bcd386f02f3af5ea98a25670ad0fce773de23c5e68" +checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" [[package]] name = "httpdate" @@ -617,9 +600,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.9" +version = "0.14.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07d6baa1b441335f3ce5098ac421fb6547c46dda735ca1bc6d0153c838f9dd83" +checksum = "0b61cf2d1aebcf6e6352c97b81dc2244ca29194be1b276f5d8ad5c6330fffb11" dependencies = [ "bytes", "futures-channel", @@ -667,9 +650,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.6.2" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3" +checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" dependencies = [ "autocfg", "hashbrown", @@ -692,9 +675,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" +checksum = "bee0328b1209d157ef001c94dd85b4f8f64139adb0eac2659f4b08382b2f474d" dependencies = [ "cfg-if", ] @@ -713,9 +696,9 @@ checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" [[package]] name = "js-sys" -version = "0.3.51" +version = "0.3.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" +checksum = "e4bf49d50e2961077d9c99f4b7997d770a1114f087c3c2e0069b36c13fc2979d" dependencies = [ "wasm-bindgen", ] @@ -728,15 +711,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6" - -[[package]] -name = "linked-hash-map" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +checksum = "a7f823d141fe0a24df1e23b4af4e3c7ba9e5966ec514ea068c93024aa7deb765" [[package]] name = "lock_api" @@ -764,9 +741,9 @@ checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" [[package]] name = "matches" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] name = "md5" @@ -776,9 +753,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" +checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" [[package]] name = "mime" @@ -886,7 +863,7 @@ dependencies = [ [[package]] name = "odin" -version = "1.4.0" +version = "1.4.1" dependencies = [ "a2s", "cargo-husky", @@ -932,12 +909,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" -[[package]] -name = "os_str_bytes" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb2e1c3ee07430c2cf76151675e583e0f19985fa6efae47d6848a3e2c824f85" - [[package]] name = "parking_lot" version = "0.11.1" @@ -1014,18 +985,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7509cc106041c40a4518d2af7a61530e1eed0e6285296a3d8c5472806ccc4a4" +checksum = "576bc800220cc65dac09e99e97b08b358cfab6e17078de8dc5fee223bd2d0c08" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c950132583b500556b1efd71d45b319029f2b71518d979fcc208e16b42426f" +checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" dependencies = [ "proc-macro2", "quote", @@ -1034,9 +1005,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" +checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" [[package]] name = "pin-utils" @@ -1056,30 +1027,6 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro-hack" version = "0.5.19" @@ -1094,9 +1041,9 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" +checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612" dependencies = [ "unicode-xid", ] @@ -1205,9 +1152,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc" +checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" dependencies = [ "bitflags", ] @@ -1321,18 +1268,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.126" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03" +checksum = "f03b9878abf6d14e6779d3f24f07b2cfa90352cfec4acc5aab8f1ac7f146fae8" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.126" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43" +checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc" dependencies = [ "proc-macro2", "quote", @@ -1341,9 +1288,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.64" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" +checksum = "336b10da19a12ad094b59d870ebde26a45402e5b470add4b5fd03c5048a32127" dependencies = [ "itoa", "ryu", @@ -1398,9 +1345,9 @@ dependencies = [ [[package]] name = "sha-1" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c4cfa741c5832d0ef7fab46cabed29c2aae926db0b11bb2069edd8db5e64e16" +checksum = "1a0c8611594e2ab4ebbf06ec7cbbf0a99450b8570e96cbf5188b5d5f6ef18d81" dependencies = [ "block-buffer 0.9.0", "cfg-if", @@ -1420,9 +1367,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" +checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" [[package]] name = "smallvec" @@ -1432,9 +1379,9 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "socket2" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2" +checksum = "765f090f0e423d2b55843402a07915add955e7d60657db13707a159727326cad" dependencies = [ "libc", "winapi", @@ -1448,15 +1395,15 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "strsim" -version = "0.10.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "syn" -version = "1.0.73" +version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" +checksum = "1873d832550d4588c3dbc20f01361ab00bfe741048f71e3fecf145a7cc18b29c" dependencies = [ "proc-macro2", "quote", @@ -1480,9 +1427,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.35" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d779dc6aeff029314570f666ec83f19df7280bb36ef338442cfa8c604021b80" +checksum = "d6f5515d3add52e0bbdcad7b83c388bb36ba7b754dda3b5f5bc2d38640cdba5c" dependencies = [ "filetime", "libc", @@ -1503,38 +1450,29 @@ dependencies = [ "winapi", ] -[[package]] -name = "termcolor" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" -dependencies = [ - "winapi-util", -] - [[package]] name = "textwrap" -version = "0.12.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "203008d98caf094106cfaba70acfed15e18ed3ddb7d94e49baec153a2b462789" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ "unicode-width", ] [[package]] name = "thiserror" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa6f76457f59514c7eeb4e59d891395fab0b2fd1d40723ae737d64153392e9c6" +checksum = "93119e4feac1cbe6c798c34d3a53ea0026b0b1de6a120deef895137c0529bfe2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a36768c0fbf1bb15eca10defa29526bda730a2376c2ab4393ccfa16fb1a318d" +checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745" dependencies = [ "proc-macro2", "quote", @@ -1553,9 +1491,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b5220f05bb7de7f3f53c7c065e1199b3172696fe2db9f9c4d8ad9b4ee74c342" +checksum = "848a1e1181b9f6753b5e96a092749e29b11d19ede67dfbbd6c7dc7e0f49b5338" dependencies = [ "tinyvec_macros", ] @@ -1568,9 +1506,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.6.2" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aea337f72e96efe29acc234d803a5981cd9a2b6ed21655cd7fc21cfe021e8ec7" +checksum = "01cf844b23c6131f624accf65ce0e4e9956a8bb329400ea5bcc26ae3a5c20b0b" dependencies = [ "autocfg", "bytes", @@ -1588,9 +1526,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c49e3df43841dafb86046472506755d8501c5615673955f6aa17181125d13c37" +checksum = "54473be61f4ebe4efd09cec9bd5d16fa51d70ea0192213d754d2d500457db110" dependencies = [ "proc-macro2", "quote", @@ -1610,9 +1548,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8864d706fdb3cc0843a49647ac892720dac98a6eeb818b77190592cf4994066" +checksum = "7b2f3f698253f03119ac0102beaa64f67a67e08074d03a22d18784104543727f" dependencies = [ "futures-core", "pin-project-lite", @@ -1666,9 +1604,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9ff14f98b1a4b289c6248a023c1c2fa1491062964e9fed67ab29c4e4da4a052" +checksum = "2ca517f43f0fb96e0c3072ed5c275fe5eece87e8cb52f4a77b69226d3b1c9df8" dependencies = [ "lazy_static", ] @@ -1693,7 +1631,7 @@ dependencies = [ "input_buffer", "log", "rand 0.8.4", - "sha-1 0.9.6", + "sha-1 0.9.7", "url", "utf-8", ] @@ -1730,12 +1668,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb8be209bb1c96b7c177c7420d26e04eccacb0eeae6b980e35fcb74678107e0" -dependencies = [ - "matches", -] +checksum = "246f4c42e67e7a4e3c6106ff716a5d067d4132a642840b242e357e468a2a0085" [[package]] name = "unicode-normalization" @@ -1746,12 +1681,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" - [[package]] name = "unicode-width" version = "0.1.8" @@ -1863,9 +1792,9 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-bindgen" -version = "0.2.74" +version = "0.2.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" +checksum = "8ce9b1b516211d33767048e5d47fa2a381ed8b76fc48d2ce4aa39877f9f183e0" dependencies = [ "cfg-if", "serde", @@ -1875,9 +1804,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.74" +version = "0.2.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" +checksum = "cfe8dc78e2326ba5f845f4b5bf548401604fa20b1dd1d365fb73b6c1d6364041" dependencies = [ "bumpalo", "lazy_static", @@ -1890,9 +1819,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.24" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fba7978c679d53ce2d0ac80c8c175840feb849a161664365d1287b41f2e67f1" +checksum = "95fded345a6559c2cfee778d562300c581f7d4ff3edb9b0d230d69800d213972" dependencies = [ "cfg-if", "js-sys", @@ -1902,9 +1831,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.74" +version = "0.2.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" +checksum = "44468aa53335841d9d6b6c023eaab07c0cd4bddbcfdee3e2bb1e8d2cb8069fef" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1912,9 +1841,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.74" +version = "0.2.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" +checksum = "0195807922713af1e67dc66132c7328206ed9766af3858164fb583eedc25fbad" dependencies = [ "proc-macro2", "quote", @@ -1925,15 +1854,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.74" +version = "0.2.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" +checksum = "acdb075a845574a1fa5f09fd77e43f7747599301ea3417a9fbffdeedfc1f4a29" [[package]] name = "web-sys" -version = "0.3.51" +version = "0.3.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e828417b379f3df7111d3a2a9e5753706cae29c41f7c4029ee9fd77f3e09e582" +checksum = "224b2f6b67919060055ef1a67807367c2066ed520c3862cc013d26cf893a783c" dependencies = [ "js-sys", "wasm-bindgen", @@ -1985,15 +1914,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -2020,12 +1940,9 @@ dependencies = [ [[package]] name = "yaml-rust" -version = "0.4.5" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] +checksum = "e66366e18dc58b46801afbf2ca7661a9f59cc8c5962c29892b6039b4f86fa992" [[package]] name = "zip" diff --git a/Dockerfile.odin b/Dockerfile.odin index c135b47b..38a06b81 100644 --- a/Dockerfile.odin +++ b/Dockerfile.odin @@ -23,14 +23,14 @@ FROM mbround18/cargo-make:latest as cargo-make # ------------------ # # -- Odin Builder -- # # ------------------ # -FROM rust as builder +FROM rust:1.54 as builder WORKDIR /data/odin COPY . . # Copy over the cached dependencies COPY --from=cacher /data/odin/target target -COPY --from=cacher /usr/local/cargo /usr/local/cargo -COPY --from=cargo-make /usr/local/bin/cargo-make /usr/local/bin/cargo-make -RUN cargo-make make -p production release +COPY --from=cacher /usr/local/cargo/registry /usr/local/cargo/ +COPY --from=cargo-make /usr/local/bin/cargo-make /usr/local/cargo/bin +RUN /usr/local/cargo/bin/cargo make -p production release # ------------------ # # -- Odin Runtime -- # diff --git a/src/odin/Cargo.toml b/src/odin/Cargo.toml index cbeaa4ba..765d3bf6 100644 --- a/src/odin/Cargo.toml +++ b/src/odin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "odin" -version = "1.4.0" +version = "1.4.1" authors = ["mbround18"] edition = "2018" license = "BSD-3-Clause License" @@ -30,7 +30,7 @@ path = "lib.rs" handlebars = "4" dotenv = "0.15.0" log = "0.4.14" -clap = { version = "3.0.0-beta.2", features = ["yaml"] } +clap = { version = "2.33.3" , features = ["yaml"] } which = "4.2.2" serde = { version = "1.0", features = ["derive"], default_features = false } sysinfo = { version = "0.18.2", default_features = false } diff --git a/src/odin/cli.yaml b/src/odin/cli.yaml index 5cde0721..48881bd3 100644 --- a/src/odin/cli.yaml +++ b/src/odin/cli.yaml @@ -1,7 +1,7 @@ name: odin version: "stub" author: mbround18 -about: Installs and Runs Valheim +help: Installs and Runs Valheim args: - run_as_root: long: run-as-root @@ -18,11 +18,11 @@ args: short: r global: true long: dry-run - about: Will output the commands that it intends to run. + help: Will output the commands that it intends to run. subcommands: - configure: - about: > + help: > Initializes Odin with its configuration variables. version: "1.0" @@ -31,76 +31,76 @@ subcommands: - server_executable: long: server-executable value_name: SERVER_EXECUTABLE_PATH - about: Sets the servers executable path. + help: Sets the servers executable path. takes_value: true default_value: ./valheim_server.x86_64 - name: short: n long: name value_name: NAME - about: Sets the name of the server, (Can be set with ENV variable NAME) + help: Sets the name of the server, (Can be set with ENV variable NAME) takes_value: true - port: short: p long: port value_name: PORT - about: Sets the port of the server, (Can be set with ENV variable PORT) + help: Sets the port of the server, (Can be set with ENV variable PORT) takes_value: true - world: short: w long: world value_name: WORLD - about: Sets the world of the server, (Can be set with ENV variable WORLD) + help: Sets the world of the server, (Can be set with ENV variable WORLD) takes_value: true - password: short: s long: password value_name: PASSWORD - about: Sets the password of the server, (Can be set with ENV variable PASSWORD) + help: Sets the password of the server, (Can be set with ENV variable PASSWORD) takes_value: true - public: short: o long: public value_name: PUBLIC - about: Sets the public state of the server, (Can be set with ENV variable PUBLIC) + help: Sets the public state of the server, (Can be set with ENV variable PUBLIC) takes_value: true - install: - about: > + help: > Installs Valheim with steamcmd version: "2.1" author: mbround18 - start: - about: > + help: > Starts Valheim version: "2.0" author: mbround18 - stop: - about: > + help: > Stops Valheim version: "1.1" author: mbround18 - backup: - about: > + help: > Backups the current saves to a specific location version: "1.0" author: mbround18 args: - INPUT_DIR: - about: Directory to back up + help: Directory to back up required: true index: 1 - OUTPUT_FILE: - about: Sets the output file to use + help: Sets the output file to use required: true index: 2 - update: version: "1.0" author: LovecraftianHorror - about: > + help: > Attempts to update an existing Valheim server installation. By default this involves checking for an update, if an update is available, the server will be shut down, updated, and brought back online @@ -111,7 +111,7 @@ subcommands: - check: long: check short: c - about: > + help: > Check for a server update, exiting with 0 if one is available and 10 if the server is up to date. @@ -120,38 +120,38 @@ subcommands: - force: long: force short: f - about: > + help: > Force an update attempt, even if no update is detected. conflicts_with: - check - notify: - about: > + help: > Sends a notification to the provided webhook. version: "1.1" author: mbround18 args: - MESSAGE: - about: Message to send to the webhook. + help: Message to send to the webhook. required: true - TITLE: long: title required: false takes_value: true - about: > + help: > Title of the message block (required by discord & generic webhook, automatically supplied, default: "Broadcast") - webhook_url: long: webhook value_name: WEBHOOK_URL takes_value: true - about: > + help: > Sets the webhook to send a notification to, (Can be set with ENV variable WEBHOOK_URL) - mod:install: - about: > + help: > Installs a mod from a given source by downloading the zip file and then extracting it. Supported platforms are Nexus (with premium account and API key), GitHub, and any other direct download source. @@ -159,11 +159,11 @@ subcommands: author: mbround18 args: - URL: - about: Url of the mod to download and install + help: Url of the mod to download and install required: true index: 1 - status: - about: > + help: > Prints out the status of your server with information about current players, mod support, and a few other details. Note: If your server has PUBLIC set to 0 it will not be able to be queried! @@ -171,13 +171,13 @@ subcommands: author: mbround18 args: - json: - about: Print out as json + help: Print out as json required: false takes_value: false long: json short: j - address: - about: Search for server information based on address + help: Search for server information based on address required: false takes_value: true long: address diff --git a/src/odin/commands/notify.rs b/src/odin/commands/notify.rs index 381e095d..a6dc0d38 100644 --- a/src/odin/commands/notify.rs +++ b/src/odin/commands/notify.rs @@ -13,7 +13,7 @@ pub fn invoke(args: &ArgMatches) { .unwrap_or("Test Notification") .to_string(), ); - let webhook_url = parse_arg_variable(&args, "WEBHOOK_URL", ""); + let webhook_url = parse_arg_variable(args, "WEBHOOK_URL", ""); let notification = NotificationMessage { author: get_server_name(), event_type: EventType { diff --git a/src/odin/commands/status.rs b/src/odin/commands/status.rs index 63feab9c..219a9f39 100644 --- a/src/odin/commands/status.rs +++ b/src/odin/commands/status.rs @@ -30,7 +30,7 @@ fn parse_address(args: &ArgMatches) -> Result { pub fn invoke(args: &ArgMatches) { let output_json = args.is_present("json"); - let address = parse_address(&args).unwrap_or_else(|_| { + let address = parse_address(args).unwrap_or_else(|_| { let addr = fetch_var("ADDRESS", args.value_of("address").unwrap()); error!("Failed to parse supplied address! {}", addr); exit(1) diff --git a/src/odin/main.rs b/src/odin/main.rs index deb2e1e2..461ae203 100644 --- a/src/odin/main.rs +++ b/src/odin/main.rs @@ -23,7 +23,8 @@ fn main() { let yaml = load_yaml!("cli.yaml"); let app = App::from(yaml) .version(constants::VERSION) - .setting(AppSettings::SubcommandRequired); + .setting(AppSettings::SubcommandRequired) + .setting(AppSettings::ArgRequiredElseHelp); let matches = app.get_matches(); let debug_mode = matches.is_present("debug") || environment::fetch_var("DEBUG_MODE", "0").eq("1"); @@ -32,23 +33,25 @@ fn main() { } logger::initialize_logger(debug_mode).unwrap(); - debug!("Debug mode enabled!"); - if let Some((command_name, _)) = matches.subcommand() { - debug!("Launching {} command...", command_name); - }; - match matches.subcommand().expect("Subcommand is required") { - ("configure", sub_m) => commands::configure::invoke(sub_m), + if debug_mode { + debug!("Debug mode enabled!"); + } + let command_name = matches.subcommand(); + debug!("Launching {} command...", command_name.0); + + match matches.subcommand() { + ("configure", sub_m) => commands::configure::invoke(sub_m.unwrap()), ("install", _) => handle_exit_status( commands::install::invoke(constants::GAME_ID), "Successfully installed Valheim!".to_string(), ), - ("start", sub_m) => commands::start::invoke(sub_m), - ("stop", sub_m) => commands::stop::invoke(sub_m), - ("backup", sub_m) => commands::backup::invoke(sub_m), - ("notify", sub_m) => commands::notify::invoke(sub_m), - ("update", sub_m) => commands::update::invoke(sub_m), - ("mod:install", sub_m) => commands::install_mod::invoke(sub_m), - ("status", sub_m) => commands::status::invoke(sub_m), + ("start", sub_m) => commands::start::invoke(sub_m.unwrap()), + ("stop", sub_m) => commands::stop::invoke(sub_m.unwrap()), + ("backup", sub_m) => commands::backup::invoke(sub_m.unwrap()), + ("notify", sub_m) => commands::notify::invoke(sub_m.unwrap()), + ("update", sub_m) => commands::update::invoke(sub_m.unwrap()), + ("mod:install", sub_m) => commands::install_mod::invoke(sub_m.unwrap()), + ("status", sub_m) => commands::status::invoke(sub_m.unwrap()), _ => { panic!("No Command Launched!"); } // Either no subcommand or one not tested for... diff --git a/src/odin/mods/bepinex.rs b/src/odin/mods/bepinex.rs index f6bf098e..2ed3542a 100644 --- a/src/odin/mods/bepinex.rs +++ b/src/odin/mods/bepinex.rs @@ -99,7 +99,7 @@ impl BepInExEnvironment { &self.doorstop_invoke_dll, ]; let expected_state = true; - let output = checks.iter().all(|ref v| path_exists(&v) == expected_state); + let output = checks.iter().all(|v| path_exists(v) == expected_state); if output { debug!("Yay! looks like we found all the required files for BepInEx to run! <3") } else { diff --git a/src/odin/mods/mod.rs b/src/odin/mods/mod.rs index fafe8dde..9adad5e0 100644 --- a/src/odin/mods/mod.rs +++ b/src/odin/mods/mod.rs @@ -34,28 +34,28 @@ impl ZipExt for ZipArchive { Err(_) => continue, }; - let mut outpath = dst_dir.as_ref().join(filepath); + let mut out_path = dst_dir.as_ref().join(filepath); - debug!("Extracting file: {:?}", outpath); + debug!("Extracting file: {:?}", out_path); if file.name().ends_with('/') { - fs::create_dir_all(&outpath)?; + fs::create_dir_all(&out_path)?; } else { - if let Some(p) = outpath.parent() { + if let Some(p) = out_path.parent() { if !p.exists() { fs::create_dir_all(&p)?; } } // Don't overwrite old cfg files - if outpath.extension().unwrap_or_default() == "cfg" && outpath.exists() { + if out_path.extension().unwrap_or_default() == "cfg" && out_path.exists() { debug!("File is config with already exiting destination! Adding '.new'"); - outpath = outpath.with_extension("cfg.new"); + out_path = out_path.with_extension("cfg.new"); } - let mut outfile = File::create(&outpath)?; + let mut outfile = File::create(&out_path)?; io::copy(&mut file, &mut outfile)?; - debug!("Extracted file {:?}", outpath); + debug!("Extracted file {:?}", out_path); } // Get and Set permissions @@ -63,7 +63,7 @@ impl ZipExt for ZipArchive { { use std::os::unix::fs::PermissionsExt; if let Some(mode) = file.unix_mode() { - fs::set_permissions(&outpath, fs::Permissions::from_mode(mode))?; + fs::set_permissions(&out_path, fs::Permissions::from_mode(mode))?; } } } @@ -251,7 +251,7 @@ impl ValheimMod { self.staging_location )); } - if let Ok(parsed_url) = Url::parse(&download_url) { + if let Ok(parsed_url) = Url::parse(download_url) { match reqwest::blocking::get(parsed_url) { Ok(mut response) => { if !SUPPORTED_FILE_TYPES.contains(&self.file_type.as_str()) { @@ -262,7 +262,7 @@ impl ValheimMod { let file_name = parse_file_name( &Url::parse(&self.url).unwrap(), - format!("{}.{}", get_md5_hash(&download_url), &self.file_type).as_str(), + format!("{}.{}", get_md5_hash(download_url), &self.file_type).as_str(), ); self.staging_location = self.staging_location.join(file_name); debug!("Downloading to: {:?}", self.staging_location); diff --git a/src/odin/notifications/enums/notification_event.rs b/src/odin/notifications/enums/notification_event.rs index 69da7fb3..551ed33e 100644 --- a/src/odin/notifications/enums/notification_event.rs +++ b/src/odin/notifications/enums/notification_event.rs @@ -45,7 +45,7 @@ impl std::str::FromStr for NotificationEvent { ::std::result::Result::Ok(Broadcast) } else { let status = parts[1]; - let event_status = EventStatus::from_str(&status).unwrap(); + let event_status = EventStatus::from_str(status).unwrap(); match event { "Update" => ::std::result::Result::Ok(Update(event_status)), "Start" => ::std::result::Result::Ok(Start(event_status)), diff --git a/src/odin/server/startup.rs b/src/odin/server/startup.rs index cb399feb..73871290 100644 --- a/src/odin/server/startup.rs +++ b/src/odin/server/startup.rs @@ -61,13 +61,13 @@ pub fn start(config: &ValheimArguments) -> CommandResult { // Required vars .args(&[ "-port", - &config.port.as_str(), + config.port.as_str(), "-name", - &config.name.as_str(), + config.name.as_str(), "-world", - &config.world.as_str(), + config.world.as_str(), "-public", - &config.public.as_str(), + config.public.as_str(), ]) .env("SteamAppId", environment::fetch_var("APPID", "892970")) .current_dir(game_directory()); @@ -84,7 +84,7 @@ pub fn start(config: &ValheimArguments) -> CommandResult { exit(1) } else { debug!(target: "server_startup","Password found, adding password flag."); - base_command = base_command.args(&["-password", &config.password.as_str()]); + base_command = base_command.args(&["-password", config.password.as_str()]); } // Tack on save dir at the end. diff --git a/src/odin/server/update.rs b/src/odin/server/update.rs index b6d363c6..bf92a681 100644 --- a/src/odin/server/update.rs +++ b/src/odin/server/update.rs @@ -104,14 +104,14 @@ fn get_latest_build_id() -> String { // Remove the cached file to force an updated response. This is done because `steamcmd` seems to // refuse to update information before querying the app_info even with `+app_info_update 1` or // `+@bCSForceNoCache 1` - let appinfo_file = Path::new("/home/steam/Steam/appcache/appinfo.vdf"); - fs::remove_file(&appinfo_file).unwrap_or_else(|e| match e.kind() { + let app_info_file = Path::new("/home/steam/Steam/appcache/appinfo.vdf"); + fs::remove_file(&app_info_file).unwrap_or_else(|e| match e.kind() { // AOK if it doesn't exist ErrorKind::NotFound => {} err_kind => { error!( - "Failed to remove appinfo file at '{}'! Error: {:?}", - appinfo_file.display(), + "Failed to remove app_info file at '{}'! Error: {:?}", + app_info_file.display(), err_kind ); exit(1); @@ -148,7 +148,7 @@ fn extract_build_id_from_manifest(manifest: &str) -> &str { fn extract_build_id_from_app_info(app_info: &str) -> &str { let mut lines = app_info.lines(); - while let Some(line) = lines.next() { + for line in &mut lines { if line.trim() == "\"public\"" { break; }