diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2024-08-02 02:43:39 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2024-08-02 02:43:39 +0200 |
commit | 3362cd9b55021c1325fc573a90ee0be22497bdeb (patch) | |
tree | 0aa139cd452fcb8d9f6bc9c6baac21e852b09f52 /src-tauri | |
parent | e5a74818e79e78d0e065d9375f38fd17a3a591a9 (diff) | |
parent | edbce33c4a8f142967df868fb99476400f4ddfb3 (diff) | |
download | FlightCore-3362cd9b55021c1325fc573a90ee0be22497bdeb.tar.gz FlightCore-3362cd9b55021c1325fc573a90ee0be22497bdeb.zip |
Merge branch 'main' into chore/bump-upload-artifact-action
Diffstat (limited to 'src-tauri')
29 files changed, 1323 insertions, 491 deletions
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 5b3da0dc..db7379e2 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -75,15 +75,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "arboard" -version = "3.3.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aafb29b107435aa276664c1db8954ac27a6e105cdad3c88287a199eb0e313c08" +checksum = "ac57f2b058a76363e357c056e4f74f1945bf734d37b8b3ef49066c4787dde0fc" dependencies = [ "clipboard-win", "core-graphics", @@ -95,10 +95,17 @@ dependencies = [ "parking_lot", "thiserror", "winapi", + "wl-clipboard-rs", "x11rb", ] [[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + +[[package]] name = "async-broadcast" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -194,9 +201,9 @@ dependencies = [ [[package]] name = "async-recursion" -version = "1.0.5" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", @@ -284,6 +291,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" [[package]] +name = "base64" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" + +[[package]] name = "base64ct" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -369,6 +382,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] +name = "bytecount" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205" + +[[package]] name = "bytemuck" version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -446,9 +465,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.81" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c6b2562119bf28c3439f7f02db99faf0aa1a8cdfe5772a2ee155d32227239f0" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", "libc", @@ -498,9 +517,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.33" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -670,6 +689,21 @@ dependencies = [ ] [[package]] +name = "crc" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] name = "crc32fast" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -815,10 +849,11 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.7" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ + "powerfmt", "serde", ] @@ -834,6 +869,17 @@ dependencies = [ ] [[package]] +name = "derive-new" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] name = "derive_more" version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -906,6 +952,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" [[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + +[[package]] name = "dtoa" version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1096,6 +1148,12 @@ dependencies = [ ] [[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] name = "flate2" version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1107,7 +1165,7 @@ dependencies = [ [[package]] name = "flightcore" -version = "2.18.1" +version = "2.23.2" dependencies = [ "anyhow", "async-recursion", @@ -1118,10 +1176,12 @@ dependencies = [ "json5", "libthermite", "log", - "open 5.0.1", + "octocrab", + "open 5.3.0", "pretty_env_logger", "regex", - "reqwest", + "remove-markdown-links", + "reqwest 0.11.27", "semver", "sentry", "sentry-log", @@ -1181,12 +1241,28 @@ dependencies = [ ] [[package]] +name = "futures" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] name = "futures-channel" version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", + "futures-sink", ] [[package]] @@ -1256,6 +1332,7 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ + "futures-channel", "futures-core", "futures-io", "futures-macro", @@ -1387,9 +1464,9 @@ dependencies = [ [[package]] name = "gethostname" -version = "0.3.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb65d4ba3173c56a500b555b532f72c42e8d1fe64962b518897f8959fae2c177" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" dependencies = [ "libc", "winapi", @@ -1413,8 +1490,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] @@ -1594,7 +1673,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.9", "indexmap 1.9.3", "slab", "tokio", @@ -1610,9 +1689,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" @@ -1630,6 +1709,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[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.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1652,13 +1737,13 @@ dependencies = [ [[package]] name = "hostname" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +checksum = "f9c7c7c8ac16c798734b8a24560c1362120597c40d5e1459f09498f8f6c8f2ba" dependencies = [ + "cfg-if", "libc", - "match_cfg", - "winapi", + "windows 0.52.0", ] [[package]] @@ -1687,13 +1772,47 @@ dependencies = [ ] [[package]] +name = "http" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +dependencies = [ + "bytes", + "fnv", + "itoa 1.0.9", +] + +[[package]] name = "http-body" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", - "http", + "http 0.2.9", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.0.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" +dependencies = [ + "bytes", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", "pin-project-lite", ] @@ -1732,8 +1851,8 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", - "http-body", + "http 0.2.9", + "http-body 0.4.5", "httparse", "httpdate", "itoa 1.0.9", @@ -1746,19 +1865,105 @@ dependencies = [ ] [[package]] +name = "hyper" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", + "httparse", + "itoa 1.0.9", + "pin-project-lite", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" +dependencies = [ + "futures-util", + "http 1.0.0", + "hyper 1.1.0", + "hyper-util", + "log", + "rustls 0.22.2", + "rustls-native-certs", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-timeout" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +dependencies = [ + "hyper 1.1.0", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] name = "hyper-tls" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper", + "hyper 0.14.27", "native-tls", "tokio", "tokio-native-tls", ] [[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.1.0", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", + "hyper 1.1.0", + "pin-project-lite", + "socket2 0.5.5", + "tokio", + "tower", + "tower-service", + "tracing", +] + +[[package]] name = "iana-time-zone" version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1852,12 +2057,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.3", ] [[package]] @@ -1905,6 +2110,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] +name = "iri-string" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21859b667d66a4c1dacd9df0863b3efb65785474255face87f5bca39dd8407c0" +dependencies = [ + "memchr", + "serde", +] + +[[package]] name = "is-docker" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2037,10 +2252,25 @@ dependencies = [ ] [[package]] +name = "jsonwebtoken" +version = "9.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7ea04a7c5c055c175f189b6dc6ba036fd62306b58c66c9f6389036c503a3f4" +dependencies = [ + "base64 0.21.2", + "js-sys", + "pem", + "ring 0.17.7", + "serde", + "serde_json", + "simple_asn1", +] + +[[package]] name = "keyvalues-parser" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d990301996c856ea07a84bc291e76f1273db52683663efc05c8d355976897e5" +checksum = "7e4c8354918309196302015ac9cae43362f1a13d0d5c5539a33b4c2fd2cd6d25" dependencies = [ "pest", "pest_derive", @@ -2049,14 +2279,11 @@ dependencies = [ [[package]] name = "keyvalues-serde" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da419ac133bb3ddf0dbf9c12fcc0ce01d994fcb65f6f1713faf15cc689320b5f" +checksum = "0447866c47c00f8bd1949618e8f63017cf93e985b4684dc28d784527e2882390" dependencies = [ "keyvalues-parser", - "once_cell", - "paste", - "regex", "serde", "thiserror", ] @@ -2082,15 +2309,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.150" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libthermite" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f03a5433bd7fe142ed36e8df2596fff1d2fa5d3cd3a4ee80480ba37e7645313" +checksum = "c27ac02c14161a4b0db739b37618d929d7f2af320c1f993e3d674599f77b79e7" dependencies = [ "flate2", "json5", @@ -2138,9 +2365,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "loom" @@ -2200,12 +2427,6 @@ dependencies = [ ] [[package]] -name = "match_cfg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" - -[[package]] name = "matchers" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2228,6 +2449,15 @@ checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" @@ -2251,6 +2481,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] name = "minisign-verify" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2331,6 +2567,18 @@ checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" [[package]] name = "nix" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.6.5", +] + +[[package]] +name = "nix" version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" @@ -2350,9 +2598,13 @@ checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" [[package]] name = "nom" -version = "1.2.4" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b8c256fd9471521bcb84c3cdba98921497f1a331cbc15b8030fc63b82050ce" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] [[package]] name = "notify-rust" @@ -2387,6 +2639,23 @@ dependencies = [ ] [[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] name = "num-integer" version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2496,6 +2765,45 @@ dependencies = [ ] [[package]] +name = "octocrab" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68a8a3df00728324ad654ecd1ed449a60157c55b7ff8c109af3a35989687c367" +dependencies = [ + "arc-swap", + "async-trait", + "base64 0.22.0", + "bytes", + "cfg-if", + "chrono", + "either", + "futures", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.1.0", + "hyper-rustls", + "hyper-timeout", + "hyper-util", + "jsonwebtoken", + "once_cell", + "percent-encoding", + "pin-project", + "secrecy", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "snafu", + "tokio", + "tower", + "tower-http", + "tracing", + "url", +] + +[[package]] name = "once_cell" version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2513,9 +2821,9 @@ dependencies = [ [[package]] name = "open" -version = "5.0.1" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90878fb664448b54c4e592455ad02831e23a3f7e157374a8b95654731aac7349" +checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" dependencies = [ "is-wsl", "libc", @@ -2675,12 +2983,6 @@ dependencies = [ ] [[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] name = "pathdiff" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2699,6 +3001,16 @@ dependencies = [ ] [[package]] +name = "pem" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310" +dependencies = [ + "base64 0.21.2", + "serde", +] + +[[package]] name = "percent-encoding" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2749,6 +3061,16 @@ dependencies = [ ] [[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap 2.2.5", +] + +[[package]] name = "phf" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2883,6 +3205,26 @@ dependencies = [ ] [[package]] +name = "pin-project" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.46", +] + +[[package]] name = "pin-project-lite" version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2944,6 +3286,12 @@ dependencies = [ ] [[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] name = "ppv-lite86" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3130,9 +3478,9 @@ checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" dependencies = [ "either", "rayon-core", @@ -3140,14 +3488,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -3181,9 +3527,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", @@ -3224,10 +3570,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] +name = "remove-markdown-links" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f12300eb28972e58b37a90854ec8a8f58e762e526f3c429a350879a8d4cbbeb" +dependencies = [ + "regex", +] + +[[package]] name = "reqwest" -version = "0.11.23" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.2", "bytes", @@ -3235,10 +3590,10 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", - "http-body", - "hyper", - "hyper-tls", + "http 0.2.9", + "http-body 0.4.5", + "hyper 0.14.27", + "hyper-tls 0.5.0", "ipnet", "js-sys", "log", @@ -3247,9 +3602,11 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", "system-configuration", "tokio", "tokio-native-tls", @@ -3264,6 +3621,46 @@ dependencies = [ ] [[package]] +name = "reqwest" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +dependencies = [ + "base64 0.22.0", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.1.0", + "hyper-tls 0.6.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 2.0.0", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg 0.52.0", +] + +[[package]] name = "rfd" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3296,13 +3693,27 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "untrusted 0.7.1", "web-sys", "winapi", ] [[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom 0.2.10", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + +[[package]] name = "rustc-demangle" version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3351,19 +3762,71 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb" dependencies = [ "log", - "ring", + "ring 0.16.20", "rustls-webpki 0.101.2", "sct", ] [[package]] +name = "rustls" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" +dependencies = [ + "log", + "ring 0.17.7", + "rustls-pki-types", + "rustls-webpki 0.102.2", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +dependencies = [ + "openssl-probe", + "rustls-pemfile 2.0.0", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.2", +] + +[[package]] +name = "rustls-pemfile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e4980fa29e4c4b212ffb3db068a564cbf560e51d3944b7c88bd8bf5bec64f4" +dependencies = [ + "base64 0.21.2", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a716eb65e3158e90e17cd93d855216e27bde02745ab842f2cab4a39dba1bacf" + +[[package]] name = "rustls-webpki" version = "0.100.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -3372,8 +3835,19 @@ version = "0.101.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "513722fd73ad80a71f72b61009ea1b584bcfa1483ca93949c8f290298837fa59" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", +] + +[[package]] +name = "rustls-webpki" +version = "0.102.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" +dependencies = [ + "ring 0.17.7", + "rustls-pki-types", + "untrusted 0.9.0", ] [[package]] @@ -3430,8 +3904,17 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", +] + +[[package]] +name = "secrecy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +dependencies = [ + "zeroize", ] [[package]] @@ -3479,25 +3962,25 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] [[package]] name = "sentry" -version = "0.32.2" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "766448f12e44d68e675d5789a261515c46ac6ccd240abdd451a9c46c84a49523" +checksum = "00421ed8fa0c995f07cde48ba6c89e80f2b312f74ff637326f392fbfd23abe02" dependencies = [ "httpdate", "native-tls", - "reqwest", + "reqwest 0.12.4", "sentry-backtrace", "sentry-contexts", - "sentry-core", + "sentry-core 0.32.3", "sentry-debug-images", "sentry-panic", "sentry-tracing", @@ -3507,91 +3990,120 @@ dependencies = [ [[package]] name = "sentry-backtrace" -version = "0.32.2" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32701cad8b3c78101e1cd33039303154791b0ff22e7802ed8cc23212ef478b45" +checksum = "a79194074f34b0cbe5dd33896e5928bbc6ab63a889bd9df2264af5acb186921e" dependencies = [ "backtrace", "once_cell", "regex", - "sentry-core", + "sentry-core 0.32.3", ] [[package]] name = "sentry-contexts" -version = "0.32.2" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ddd2a91a13805bd8dab4ebf47323426f758c35f7bf24eacc1aded9668f3824" +checksum = "eba8870c5dba2bfd9db25c75574a11429f6b95957b0a78ac02e2970dd7a5249a" dependencies = [ "hostname", "libc", "os_info", "rustc_version", - "sentry-core", + "sentry-core 0.32.3", "uname", ] [[package]] name = "sentry-core" -version = "0.32.2" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1189f68d7e7e102ef7171adf75f83a59607fafd1a5eecc9dc06c026ff3bdec4" +checksum = "46a75011ea1c0d5c46e9e57df03ce81f5c7f0a9e199086334a1f9c0a541e0826" dependencies = [ "once_cell", "rand 0.8.5", - "sentry-types", + "sentry-types 0.32.3", + "serde", + "serde_json", +] + +[[package]] +name = "sentry-core" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "161283cfe8e99c8f6f236a402b9ccf726b201f365988b5bb637ebca0abbd4a30" +dependencies = [ + "once_cell", + "sentry-types 0.34.0", "serde", "serde_json", ] [[package]] name = "sentry-debug-images" -version = "0.32.2" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4d0a615e5eeca5699030620c119a094e04c14cf6b486ea1030460a544111a7" +checksum = "7ec2a486336559414ab66548da610da5e9626863c3c4ffca07d88f7dc71c8de8" dependencies = [ "findshlibs", "once_cell", - "sentry-core", + "sentry-core 0.32.3", ] [[package]] name = "sentry-log" -version = "0.32.2" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d7cd58e7b31a1a533163abf86c182824ea8f8867853a6b402cde053595a54b" +checksum = "75bbcc61886955045a1dd4bdb173412a80bb2571be3c5bfcf7eb8f55a442bbf5" dependencies = [ "log", - "sentry-core", + "sentry-core 0.34.0", ] [[package]] name = "sentry-panic" -version = "0.32.2" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1c18d0b5fba195a4950f2f4c31023725c76f00aabb5840b7950479ece21b5ca" +checksum = "2eaa3ecfa3c8750c78dcfd4637cfa2598b95b52897ed184b4dc77fcf7d95060d" dependencies = [ "sentry-backtrace", - "sentry-core", + "sentry-core 0.32.3", ] [[package]] name = "sentry-tracing" -version = "0.32.2" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3012699a9957d7f97047fd75d116e22d120668327db6e7c59824582e16e791b2" +checksum = "f715932bf369a61b7256687c6f0554141b7ce097287e30e3f7ed6e9de82498fe" dependencies = [ "sentry-backtrace", - "sentry-core", + "sentry-core 0.32.3", "tracing-core", "tracing-subscriber", ] [[package]] name = "sentry-types" -version = "0.32.2" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7173fd594569091f68a7c37a886e202f4d0c1db1e1fa1d18a051ba695b2e2ec" +checksum = "4519c900ce734f7a0eb7aba0869dfb225a7af8820634a7dd51449e3b093cfb7c" +dependencies = [ + "debugid", + "hex", + "rand 0.8.5", + "serde", + "serde_json", + "thiserror", + "time", + "url", + "uuid", +] + +[[package]] +name = "sentry-types" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d68cdf6bc41b8ff3ae2a9c4671e97426dcdd154cc1d4b6b72813f285d6b163f" dependencies = [ "debugid", "hex", @@ -3606,18 +4118,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.196" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", @@ -3626,16 +4138,27 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ + "indexmap 2.2.5", "itoa 1.0.9", "ryu", "serde", ] [[package]] +name = "serde_path_to_error" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c" +dependencies = [ + "itoa 1.0.9", + "serde", +] + +[[package]] name = "serde_repr" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3794,6 +4317,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +dependencies = [ + "num-bigint", + "num-traits", + "thiserror", + "time", +] + +[[package]] name = "siphasher" version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3815,6 +4350,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] +name = "snafu" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ed22871b3fe6eff9f1b48f6cbd54149ff8e9acd740dea9146092435f9c43bd3" +dependencies = [ + "snafu-derive", +] + +[[package]] +name = "snafu-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4651148226ec36010993fcba6c3381552e8463e9f3e337b75af202b0688b5274" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "syn 2.0.46", +] + +[[package]] name = "socket2" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3869,6 +4425,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] name = "stable_deref_trait" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3891,25 +4453,16 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "steamlocate" -version = "1.2.1" +version = "2.0.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec01c74611d14a808cb212d17c6e03f0e30736a15ed1d5736f8a53154cea3ae" +checksum = "c3b6a4810c4e7fecb0123a9a8ba99b335c17d92e636c265ef99108ee4734c812" dependencies = [ + "crc", "dirs", "keyvalues-parser", "keyvalues-serde", "serde", - "steamy-vdf", - "winreg 0.11.0", -] - -[[package]] -name = "steamy-vdf" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "533127ad49314bfe71c3d3fd36b3ebac3d24f40618092e70e1cfe8362c7fac79" -dependencies = [ - "nom", + "winreg 0.51.0", ] [[package]] @@ -3979,6 +4532,12 @@ dependencies = [ ] [[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] name = "sys-locale" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3993,9 +4552,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.29.11" +version = "0.30.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd727fc423c2060f6c92d9534cef765c65a6ed3f428a03d7def74a8c4348e666" +checksum = "732ffa00f53e6b2af46208fba5718d9662a421049204e156328b66791ffa15ae" dependencies = [ "cfg-if", "core-foundation-sys", @@ -4003,7 +4562,7 @@ dependencies = [ "ntapi", "once_cell", "rayon", - "winapi", + "windows 0.52.0", ] [[package]] @@ -4130,26 +4689,30 @@ checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "tauri" -version = "1.5.4" +version = "1.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd27c04b9543776a972c86ccf70660b517ecabbeced9fb58d8b961a13ad129af" +checksum = "77567d2b3b74de4588d544147142d02297f3eaa171a25a065252141d8597a516" dependencies = [ "anyhow", "base64 0.21.2", "bytes", "cocoa", "dirs-next", + "dunce", "embed_plist", "encoding_rs", "flate2", "futures-util", + "getrandom 0.2.10", "glib", "glob", "gtk", - "heck 0.4.1", - "http", + "heck 0.5.0", + "http 0.2.9", "ignore", + "indexmap 1.9.3", "minisign-verify", + "nix 0.26.2", "notify-rust", "objc", "once_cell", @@ -4160,7 +4723,7 @@ dependencies = [ "rand 0.8.5", "raw-window-handle", "regex", - "reqwest", + "reqwest 0.11.27", "rfd", "semver", "serde", @@ -4189,14 +4752,14 @@ dependencies = [ [[package]] name = "tauri-build" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9914a4715e0b75d9f387a285c7e26b5bbfeb1249ad9f842675a82481565c532" +checksum = "ab30cba12974d0f9b09794f61e72cad6da2142d3ceb81e519321bab86ce53312" dependencies = [ "anyhow", "cargo_toml", "dirs-next", - "heck 0.4.1", + "heck 0.5.0", "json-patch", "semver", "serde", @@ -4208,9 +4771,9 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "1.4.2" +version = "1.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1554c5857f65dbc377cefb6b97c8ac77b1cb2a90d30d3448114d5d6b48a77fc" +checksum = "c1aed706708ff1200ec12de9cfbf2582b5d8ec05f6a7293911091effbd22036b" dependencies = [ "base64 0.21.2", "brotli", @@ -4234,11 +4797,11 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "1.4.3" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "277abf361a3a6993ec16bcbb179de0d6518009b851090a01adfea12ac89fa875" +checksum = "b88f831d2973ae4f81a706a0004e67dac87f2e4439973bbe98efbd73825d8ede" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", "syn 1.0.109", @@ -4248,8 +4811,8 @@ dependencies = [ [[package]] name = "tauri-plugin-store" -version = "0.1.0" -source = "git+https://github.com/tauri-apps/plugins-workspace?rev=5a6abd3203dc94c38f96d0c4bf7ecbef399f8c25#5a6abd3203dc94c38f96d0c4bf7ecbef399f8c25" +version = "0.0.0" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#4aeee08cde4cf8253b7b52c2204655ac8bb6769d" dependencies = [ "log", "serde", @@ -4260,12 +4823,12 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "0.14.2" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2d0652aa2891ff3e9caa2401405257ea29ab8372cce01f186a5825f1bd0e76" +checksum = "3068ed62b63dedc705558f4248c7ecbd5561f0f8050949859ea0db2326f26012" dependencies = [ "gtk", - "http", + "http 0.2.9", "http-range", "rand 0.8.5", "raw-window-handle", @@ -4281,9 +4844,9 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "0.14.3" +version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cae61fbc731f690a4899681c9052dde6d05b159b44563ace8186fc1bfb7d158" +checksum = "d4c3db170233096aa30330feadcd895bf9317be97e624458560a20e814db7955" dependencies = [ "arboard", "cocoa", @@ -4302,15 +4865,15 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "1.5.2" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece74810b1d3d44f29f732a7ae09a63183d63949bbdd59c61f8ed2a1b70150db" +checksum = "2826db448309d382dac14d520f0c0a40839b87b57b977e59cf5f296b3ace6a93" dependencies = [ "brotli", "ctor", "dunce", "glob", - "heck 0.4.1", + "heck 0.5.0", "html5ever", "infer", "json-patch", @@ -4391,18 +4954,18 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.44" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.44" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", @@ -4432,12 +4995,14 @@ dependencies = [ [[package]] name = "time" -version = "0.3.25" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa 1.0.9", + "num-conv", + "powerfmt", "serde", "time-core", "time-macros", @@ -4445,16 +5010,17 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.11" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] @@ -4475,9 +5041,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.1" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes", @@ -4494,9 +5060,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", @@ -4514,6 +5080,17 @@ dependencies = [ ] [[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.2", + "rustls-pki-types", + "tokio", +] + +[[package]] name = "tokio-util" version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4563,7 +5140,7 @@ version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.5", "serde", "serde_spanned", "toml_datetime", @@ -4571,6 +5148,49 @@ dependencies = [ ] [[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0da193277a4e2c33e59e09b5861580c33dd0a637c3883d0fa74ba40c0374af2e" +dependencies = [ + "bitflags 2.3.3", + "bytes", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", + "http-body-util", + "iri-string", + "pin-project-lite", + "tower", + "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" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4583,6 +5203,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4639,6 +5260,20 @@ dependencies = [ ] [[package]] +name = "tree_magic_mini" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91adfd0607cacf6e4babdb870e9bec4037c1c4b151cfd279ccefc5e0c7feaa6d" +dependencies = [ + "bytecount", + "fnv", + "lazy_static", + "nom", + "once_cell", + "petgraph", +] + +[[package]] name = "treediff" version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4655,9 +5290,9 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "ts-rs" -version = "7.1.1" +version = "8.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc2cae1fc5d05d47aa24b64f9a4f7cba24cdc9187a2084dd97ac57bef5eccae6" +checksum = "09d3fa4606cdab1e9b668cc65ce2545941d01f52bc27536a195c66c55b91cb84" dependencies = [ "thiserror", "ts-rs-macros", @@ -4665,9 +5300,9 @@ dependencies = [ [[package]] name = "ts-rs-macros" -version = "7.1.1" +version = "8.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f7f9b821696963053a89a7bd8b292dc34420aea8294d7b225274d488f3ec92" +checksum = "f86ae36cbb2d58b86677ad413054feeb0712e382e822131cf9a4a1e580c419b5" dependencies = [ "Inflector", "proc-macro2", @@ -4747,6 +5382,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] name = "ureq" version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4757,7 +5398,7 @@ dependencies = [ "log", "native-tls", "once_cell", - "rustls", + "rustls 0.21.6", "rustls-webpki 0.100.1", "url", "webpki-roots", @@ -4946,9 +5587,9 @@ checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wasm-streams" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" dependencies = [ "futures-util", "js-sys", @@ -4958,6 +5599,65 @@ dependencies = [ ] [[package]] +name = "wayland-client" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" +dependencies = [ + "bitflags 1.3.2", + "downcast-rs", + "libc", + "nix 0.24.3", + "wayland-commons", + "wayland-scanner", + "wayland-sys", +] + +[[package]] +name = "wayland-commons" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" +dependencies = [ + "nix 0.24.3", + "once_cell", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-protocols" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" +dependencies = [ + "bitflags 1.3.2", + "wayland-client", + "wayland-commons", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +dependencies = [ + "proc-macro2", + "quote", + "xml-rs", +] + +[[package]] +name = "wayland-sys" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +dependencies = [ + "pkg-config", +] + +[[package]] name = "web-sys" version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -5144,6 +5844,16 @@ dependencies = [ ] [[package]] +name = "windows" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core", + "windows-targets 0.52.0", +] + +[[package]] name = "windows-bindgen" version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -5154,6 +5864,15 @@ dependencies = [ ] [[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] name = "windows-implement" version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -5479,6 +6198,16 @@ dependencies = [ [[package]] name = "winreg" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "937f3df7948156640f46aacef17a70db0de5917bda9c92b0f751f3a955b588fc" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "winreg" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" @@ -5488,10 +6217,28 @@ dependencies = [ ] [[package]] +name = "wl-clipboard-rs" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "981a303dfbb75d659f6612d05a14b2e363c103d24f676a2d44a00d18507a1ad9" +dependencies = [ + "derive-new", + "libc", + "log", + "nix 0.24.3", + "os_pipe", + "tempfile", + "thiserror", + "tree_magic_mini", + "wayland-client", + "wayland-protocols", +] + +[[package]] name = "wry" -version = "0.24.7" +version = "0.24.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ad85d0e067359e409fcb88903c3eac817c392e5d638258abfb3da5ad8ba6fc4" +checksum = "00711278ed357350d44c749c286786ecac644e044e4da410d466212152383b45" dependencies = [ "base64 0.13.1", "block", @@ -5504,7 +6251,7 @@ dependencies = [ "glib", "gtk", "html5ever", - "http", + "http 0.2.9", "kuchikiki", "libc", "log", @@ -5548,12 +6295,12 @@ dependencies = [ [[package]] name = "x11rb" -version = "0.12.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a" +checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507" dependencies = [ "gethostname", - "nix", + "nix 0.24.3", "winapi", "winapi-wsapoll", "x11rb-protocol", @@ -5561,11 +6308,11 @@ dependencies = [ [[package]] name = "x11rb-protocol" -version = "0.12.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d6c3f9a0fb6701fab8f6cea9b0c0bd5d6876f1f89f7fada07e558077c344bc" +checksum = "56b245751c0ac9db0e006dc812031482784e434630205a93c73cfefcaabeac67" dependencies = [ - "nix", + "nix 0.24.3", ] [[package]] @@ -5583,11 +6330,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2769203cd13a0c6015d515be729c526d041e9cf2c0cc478d57faee85f40c6dcd" dependencies = [ - "nix", + "nix 0.26.2", "winapi", ] [[package]] +name = "xml-rs" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" + +[[package]] name = "zbus" version = "3.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -5611,7 +6364,7 @@ dependencies = [ "futures-sink", "futures-util", "hex", - "nix", + "nix 0.26.2", "once_cell", "ordered-stream", "rand 0.8.5", @@ -5654,6 +6407,12 @@ dependencies = [ ] [[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" + +[[package]] name = "zip" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -5675,9 +6434,9 @@ dependencies = [ [[package]] name = "zip-extract" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb654964c003959ed64cbd0d7b329bcdcbd9690facd50c8617748d3622543972" +checksum = "e109e5a291403b4c1e514d39f8a22d3f98d257e691a52bb1f16051bb1ffed63e" dependencies = [ "log", "thiserror", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 2277ede0..c9a559a7 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "flightcore" -version = "2.18.1" +version = "2.23.2" description = "Mod-manager for Northstar" authors = ["https://github.com/R2NorthstarTools/FlightCore/graphs/contributors"] license = "MIT" @@ -23,49 +23,55 @@ tauri-build = { version = "1.5", features = [] } [dependencies] serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } -tauri = { version = "1.5", features = ["api-all", "dialog", "updater"] } +tauri = { version = "1.6", features = ["api-all", "dialog", "updater"] } tokio = { version = "1", features = ["full"] } # Sentry (crash) logging sentry = "0.32" -sentry-log = "0.32" +sentry-log = "0.34" # Find steam games -steamlocate = "1.2" +steamlocate = "2.0.0-beta.2" # Error messages anyhow = "1.0" # libthermite for Northstar/mod install handling -libthermite = { version = "0.7.0", features = ["proton"] } +libthermite = { version = "0.8.1", features = ["proton"] } # zip stuff zip = "0.6.2" # Regex regex = "1.10" # Read out running application process names -sysinfo = "0.29.11" +sysinfo = "0.30.12" # HTTP requests reqwest = { version = "0.11", features = ["blocking"] } # Persistent store for settings -tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", rev = "5a6abd3203dc94c38f96d0c4bf7ecbef399f8c25" } +tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" } # JSON5 parsing support (allows comments in JSON) json5 = "0.4.1" # Async recursion for recursive mod install -async-recursion = "1.0.5" +async-recursion = "1.1.1" # For parsing timestamps -chrono = "0.4.33" +chrono = "0.4.38" # TypeScript bindings -ts-rs = "7.1" +ts-rs = "8.1" # const formatting const_format = "0.2.32" # Logging libraries pretty_env_logger = "0.5.0" log = "0.4" # Extracting zip files easily -zip-extract = "0.1.2" +zip-extract = "0.1.3" # open urls -open = "5.0.1" +open = "5.3.0" semver = "1.0" # simplified filesystem access glob = "0.3.1" dirs = "5" +# Interacting with GitHub +octocrab = "0.38.0" +# Library for removing markdown links +remove-markdown-links = "1.0.0" + + [target.'cfg(windows)'.dependencies] # Windows API stuff winapi = "0.3.9" diff --git a/src-tauri/bindings/CommitHead.ts b/src-tauri/bindings/CommitHead.ts index 58f31657..7c4da020 100644 --- a/src-tauri/bindings/CommitHead.ts +++ b/src-tauri/bindings/CommitHead.ts @@ -1,4 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Repo } from "./Repo"; -export interface CommitHead { sha: string, ref: string, repo: Repo, }
\ No newline at end of file +export type CommitHead = { sha: string, ref: string, repo: Repo, };
\ No newline at end of file diff --git a/src-tauri/bindings/FlightCoreVersion.ts b/src-tauri/bindings/FlightCoreVersion.ts index 9017a840..6c0af915 100644 --- a/src-tauri/bindings/FlightCoreVersion.ts +++ b/src-tauri/bindings/FlightCoreVersion.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export interface FlightCoreVersion { tag_name: string, published_at: string, }
\ No newline at end of file +export type FlightCoreVersion = { tag_name: string, published_at: string, };
\ No newline at end of file diff --git a/src-tauri/bindings/InstallProgress.ts b/src-tauri/bindings/InstallProgress.ts index 7bea9bb8..234f3c35 100644 --- a/src-tauri/bindings/InstallProgress.ts +++ b/src-tauri/bindings/InstallProgress.ts @@ -1,4 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { InstallState } from "./InstallState"; -export interface InstallProgress { current_downloaded: bigint, total_size: bigint, state: InstallState, }
\ No newline at end of file +export type InstallProgress = { current_downloaded: bigint, total_size: bigint, state: InstallState, };
\ No newline at end of file diff --git a/src-tauri/bindings/InstallType.ts b/src-tauri/bindings/InstallType.ts index 2a0f9a7f..094ccf8b 100644 --- a/src-tauri/bindings/InstallType.ts +++ b/src-tauri/bindings/InstallType.ts @@ -1,3 +1,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +/** + * Defines how Titanfall2 was installed (Steam, Origin, ...) + */ export type InstallType = "STEAM" | "ORIGIN" | "EAPLAY" | "UNKNOWN";
\ No newline at end of file diff --git a/src-tauri/bindings/NorthstarLaunchOptions.ts b/src-tauri/bindings/NorthstarLaunchOptions.ts new file mode 100644 index 00000000..fc977f68 --- /dev/null +++ b/src-tauri/bindings/NorthstarLaunchOptions.ts @@ -0,0 +1,3 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type NorthstarLaunchOptions = { launch_via_steam: boolean, bypass_checks: boolean, };
\ No newline at end of file diff --git a/src-tauri/bindings/NorthstarMod.ts b/src-tauri/bindings/NorthstarMod.ts index 3686485b..1643778d 100644 --- a/src-tauri/bindings/NorthstarMod.ts +++ b/src-tauri/bindings/NorthstarMod.ts @@ -1,3 +1,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export interface NorthstarMod { name: string, version: string | null, thunderstore_mod_string: string | null, enabled: boolean, directory: string, }
\ No newline at end of file +/** + * Object holding various information about a Northstar mod + */ +export type NorthstarMod = { name: string, version: string | null, thunderstore_mod_string: string | null, enabled: boolean, directory: string, };
\ No newline at end of file diff --git a/src-tauri/bindings/NorthstarThunderstoreRelease.ts b/src-tauri/bindings/NorthstarThunderstoreRelease.ts index 4e9d5235..771ca732 100644 --- a/src-tauri/bindings/NorthstarThunderstoreRelease.ts +++ b/src-tauri/bindings/NorthstarThunderstoreRelease.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export interface NorthstarThunderstoreRelease { package: string, version: string, }
\ No newline at end of file +export type NorthstarThunderstoreRelease = { package: string, version: string, };
\ No newline at end of file diff --git a/src-tauri/bindings/NorthstarThunderstoreReleaseWrapper.ts b/src-tauri/bindings/NorthstarThunderstoreReleaseWrapper.ts index 77593816..8551dde6 100644 --- a/src-tauri/bindings/NorthstarThunderstoreReleaseWrapper.ts +++ b/src-tauri/bindings/NorthstarThunderstoreReleaseWrapper.ts @@ -1,4 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { NorthstarThunderstoreRelease } from "./NorthstarThunderstoreRelease"; -export interface NorthstarThunderstoreReleaseWrapper { label: string, value: NorthstarThunderstoreRelease, }
\ No newline at end of file +export type NorthstarThunderstoreReleaseWrapper = { label: string, value: NorthstarThunderstoreRelease, };
\ No newline at end of file diff --git a/src-tauri/bindings/PullsApiResponseElement.ts b/src-tauri/bindings/PullsApiResponseElement.ts index b2b5c476..2db93fe2 100644 --- a/src-tauri/bindings/PullsApiResponseElement.ts +++ b/src-tauri/bindings/PullsApiResponseElement.ts @@ -1,4 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { CommitHead } from "./CommitHead"; -export interface PullsApiResponseElement { number: bigint, title: string, url: string, head: CommitHead, html_url: string, }
\ No newline at end of file +export type PullsApiResponseElement = { number: bigint, title: string, url: string, head: CommitHead, html_url: string, labels: Array<string>, };
\ No newline at end of file diff --git a/src-tauri/bindings/ReleaseInfo.ts b/src-tauri/bindings/ReleaseInfo.ts index 249f986e..78426273 100644 --- a/src-tauri/bindings/ReleaseInfo.ts +++ b/src-tauri/bindings/ReleaseInfo.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export interface ReleaseInfo { name: string, published_at: string, body: string, }
\ No newline at end of file +export type ReleaseInfo = { name: string, published_at: string, body: string, };
\ No newline at end of file diff --git a/src-tauri/bindings/Repo.ts b/src-tauri/bindings/Repo.ts index 836f39d7..eade8cd4 100644 --- a/src-tauri/bindings/Repo.ts +++ b/src-tauri/bindings/Repo.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export interface Repo { full_name: string, }
\ No newline at end of file +export type Repo = { full_name: string, };
\ No newline at end of file diff --git a/src-tauri/bindings/Tag.ts b/src-tauri/bindings/Tag.ts index adbbff33..00ff5225 100644 --- a/src-tauri/bindings/Tag.ts +++ b/src-tauri/bindings/Tag.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export interface Tag { name: string, }
\ No newline at end of file +export type Tag = { name: string, };
\ No newline at end of file diff --git a/src-tauri/bindings/TagWrapper.ts b/src-tauri/bindings/TagWrapper.ts index f9f56a51..ea7f0bcd 100644 --- a/src-tauri/bindings/TagWrapper.ts +++ b/src-tauri/bindings/TagWrapper.ts @@ -1,4 +1,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Tag } from "./Tag"; -export interface TagWrapper { label: string, value: Tag, }
\ No newline at end of file +/** + * Wrapper type needed for frontend + */ +export type TagWrapper = { label: string, value: Tag, };
\ No newline at end of file diff --git a/src-tauri/bindings/ThunderstoreMod.ts b/src-tauri/bindings/ThunderstoreMod.ts index 25d119cb..a421334b 100644 --- a/src-tauri/bindings/ThunderstoreMod.ts +++ b/src-tauri/bindings/ThunderstoreMod.ts @@ -1,4 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { ThunderstoreModVersion } from "./ThunderstoreModVersion"; -export interface ThunderstoreMod { name: string, full_name: string, owner: string, package_url: string, date_created: string, date_updated: string, uuid4: string, rating_score: number, is_pinned: boolean, is_deprecated: boolean, has_nsfw_content: boolean, categories: Array<string>, versions: Array<ThunderstoreModVersion>, }
\ No newline at end of file +export type ThunderstoreMod = { name: string, full_name: string, owner: string, package_url: string, date_created: string, date_updated: string, uuid4: string, rating_score: number, is_pinned: boolean, is_deprecated: boolean, has_nsfw_content: boolean, categories: Array<string>, versions: Array<ThunderstoreModVersion>, };
\ No newline at end of file diff --git a/src-tauri/bindings/ThunderstoreModVersion.ts b/src-tauri/bindings/ThunderstoreModVersion.ts index 7e76308e..a20f776f 100644 --- a/src-tauri/bindings/ThunderstoreModVersion.ts +++ b/src-tauri/bindings/ThunderstoreModVersion.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export interface ThunderstoreModVersion { name: string, full_name: string, description: string, icon: string, version_number: string, dependencies: Array<string>, download_url: string, downloads: number, date_created: string, website_url: string, is_active: boolean, uuid4: string, file_size: bigint, }
\ No newline at end of file +export type ThunderstoreModVersion = { name: string, full_name: string, description: string, icon: string, version_number: string, dependencies: Array<string>, download_url: string, downloads: number, date_created: string, website_url: string, is_active: boolean, uuid4: string, file_size: bigint, };
\ No newline at end of file diff --git a/src-tauri/src/constants.rs b/src-tauri/src/constants.rs index 1f6a0a25..47eeef19 100644 --- a/src-tauri/src/constants.rs +++ b/src-tauri/src/constants.rs @@ -26,20 +26,11 @@ pub const BLACKLISTED_MODS: [&str; 3] = [ "ebkr-r2modman", ]; -/// Titanfall2 Steam App ID -pub const TITANFALL2_STEAM_ID: &str = "1237970"; - /// Order in which the sections for release notes should be displayed pub const SECTION_ORDER: [&str; 11] = [ "feat", "fix", "docs", "style", "refactor", "build", "test", "i18n", "ci", "chore", "other", ]; -/// GitHub API endpoints for launcher/mods PRs -pub const PULLS_API_ENDPOINT_LAUNCHER: &str = - "https://api.github.com/repos/R2Northstar/NorthstarLauncher/pulls"; -pub const PULLS_API_ENDPOINT_MODS: &str = - "https://api.github.com/repos/R2Northstar/NorthstarMods/pulls"; - /// Statistics (players and servers counts) refresh delay pub const REFRESH_DELAY: Duration = Duration::from_secs(5 * 60); @@ -49,6 +40,12 @@ pub const FLIGHTCORE_REPO_NAME: &str = "R2NorthstarTools/FlightCore"; /// Northstar release repo name and org name on GitHub pub const NORTHSTAR_RELEASE_REPO_NAME: &str = "R2Northstar/Northstar"; +/// NorthstarLauncher repo name on GitHub +pub const NORTHSTAR_LAUNCHER_REPO_NAME: &str = "NorthstarLauncher"; + +/// NorthstarMods repo name on GitHub +pub const NORTHSTAR_MODS_REPO_NAME: &str = "NorthstarMods"; + /// URL to launcher commits API URL pub const NS_LAUNCHER_COMMITS_API_URL: &str = "https://api.github.com/repos/R2Northstar/NorthstarLauncher/commits"; diff --git a/src-tauri/src/github/pull_requests.rs b/src-tauri/src/github/pull_requests.rs index 91d8a5da..de733feb 100644 --- a/src-tauri/src/github/pull_requests.rs +++ b/src-tauri/src/github/pull_requests.rs @@ -1,6 +1,4 @@ -use crate::github::release_notes::fetch_github_releases_api; - -use crate::constants::{APP_USER_AGENT, PULLS_API_ENDPOINT_LAUNCHER, PULLS_API_ENDPOINT_MODS}; +use crate::constants::{APP_USER_AGENT, NORTHSTAR_LAUNCHER_REPO_NAME, NORTHSTAR_MODS_REPO_NAME}; use crate::repair_and_verify::check_is_valid_game_path; use crate::GameInstall; use anyhow::anyhow; @@ -29,11 +27,12 @@ struct CommitHead { #[derive(Serialize, Deserialize, Debug, Clone, TS)] #[ts(export)] pub struct PullsApiResponseElement { - number: i64, + number: u64, title: String, url: String, head: CommitHead, html_url: String, + labels: Vec<String>, } // GitHub API response JSON elements as structs @@ -50,6 +49,7 @@ struct ActionsRunsResponse { #[derive(Debug, Deserialize, Clone)] struct Artifact { id: u64, + name: String, workflow_run: WorkflowRun, } @@ -66,32 +66,65 @@ pub enum PullRequestType { } /// Parse pull requests from specified URL -pub async fn get_pull_requests(url: String) -> Result<Vec<PullsApiResponseElement>, String> { - let mut all_pull_requests: Vec<PullsApiResponseElement> = vec![]; +pub async fn get_pull_requests( + repo: PullRequestType, +) -> Result<Vec<PullsApiResponseElement>, anyhow::Error> { + let repo = match repo { + PullRequestType::Mods => NORTHSTAR_MODS_REPO_NAME, + PullRequestType::Launcher => NORTHSTAR_LAUNCHER_REPO_NAME, + }; - let mut i = 1; // pagination on GitHub starts with `1`. - loop { - let paginated_url = format!("{}?page={}", url, i); + // Grab list of PRs + let octocrab = octocrab::instance(); + let page = octocrab + .pulls("R2Northstar", repo) + .list() + .state(octocrab::params::State::Open) + .per_page(50) // Only grab 50 PRs + .page(1u32) + .send() + .await?; - let json_response = match fetch_github_releases_api(&paginated_url).await { - Ok(result) => result, - Err(err) => return Err(format!("Failed fetching GitHub API {err}")), + // Iterate over pull request elements and insert into struct + let mut all_pull_requests: Vec<PullsApiResponseElement> = vec![]; + for item in page.items { + let repo = Repo { + full_name: item + .head + .repo + .ok_or(anyhow!("repo not found"))? + .full_name + .ok_or(anyhow!("full_name not found"))?, }; - let pulls_response: Vec<PullsApiResponseElement> = - match serde_json::from_str(&json_response) { - Ok(res) => res, - Err(err) => return Err(err.to_string()), - }; + let head = CommitHead { + sha: item.head.sha, + gh_ref: item.head.ref_field, + repo, + }; - // Check if we still got a result - if pulls_response.is_empty() { - // Empty result means we went through all pages with content - break; - } + // Get labels and their names and put the into vector + let label_names: Vec<String> = item + .labels + .unwrap_or_else(Vec::new) + .into_iter() + .map(|label| label.name) + .collect(); + + // TODO there's probably a way to automatically serialize into the struct but I don't know yet how to + let elem = PullsApiResponseElement { + number: item.number, + title: item.title.ok_or(anyhow!("title not found"))?, + url: item.url, + head, + html_url: item + .html_url + .ok_or(anyhow!("html_url not found"))? + .to_string(), + labels: label_names, + }; - all_pull_requests.extend(pulls_response); - i += 1; + all_pull_requests.push(elem); } Ok(all_pull_requests) @@ -102,12 +135,10 @@ pub async fn get_pull_requests(url: String) -> Result<Vec<PullsApiResponseElemen pub async fn get_pull_requests_wrapper( install_type: PullRequestType, ) -> Result<Vec<PullsApiResponseElement>, String> { - let api_pr_url = match install_type { - PullRequestType::Mods => PULLS_API_ENDPOINT_MODS, - PullRequestType::Launcher => PULLS_API_ENDPOINT_LAUNCHER, - }; - - get_pull_requests(api_pr_url.to_string()).await + match get_pull_requests(install_type).await { + Ok(res) => Ok(res), + Err(err) => Err(err.to_string()), + } } pub async fn check_github_api(url: &str) -> Result<serde_json::Value, Box<dyn std::error::Error>> { @@ -186,12 +217,16 @@ pub async fn get_launcher_download_link(commit_sha: String) -> Result<String, St ) .unwrap(); + let multiple_artifacts = artifacts_response.artifacts.len() > 1; + // Iterate over artifacts for artifact in artifacts_response.artifacts { + if multiple_artifacts && !artifact.name.starts_with("NorthstarLauncher-MSVC") { + continue; + } + // Make sure artifact and CI run commit head sha match if artifact.workflow_run.head_sha == workflow_run.head_sha { - dbg!(artifact.id); - // Download artifact return Ok(format!("https://nightly.link/R2Northstar/NorthstarLauncher/actions/artifacts/{}.zip", artifact.id)); } diff --git a/src-tauri/src/github/release_notes.rs b/src-tauri/src/github/release_notes.rs index 16b65183..e3a14537 100644 --- a/src-tauri/src/github/release_notes.rs +++ b/src-tauri/src/github/release_notes.rs @@ -1,4 +1,3 @@ -use crate::constants::APP_USER_AGENT; use serde::{Deserialize, Serialize}; use std::vec::Vec; use ts_rs::TS; @@ -18,35 +17,31 @@ pub struct FlightCoreVersion { published_at: String, } -// Fetches repo release API and returns response as string -pub async fn fetch_github_releases_api(url: &str) -> Result<String, anyhow::Error> { - log::info!("Fetching releases notes from GitHub API"); - - let client = reqwest::Client::new(); - let res = client - .get(url) - .header(reqwest::header::USER_AGENT, APP_USER_AGENT) - .send() - .await? - .text() - .await?; - - Ok(res) -} - /// Gets newest FlighCore version from GitHub #[tauri::command] pub async fn get_newest_flightcore_version() -> Result<FlightCoreVersion, String> { // Get newest version number from GitHub API log::info!("Checking GitHub API"); - let url = "https://api.github.com/repos/R2NorthstarTools/FlightCore/releases/latest"; - let res = match fetch_github_releases_api(url).await { - Ok(res) => res, - Err(err) => return Err(format!("Failed getting newest FlightCore version: {err}")), - }; + let octocrab = octocrab::instance(); + let page = octocrab + .repos("R2NorthstarTools", "FlightCore") + .releases() + .list() + // Optional Parameters + .per_page(1) + .page(1u32) + // Send the request + .send() + .await + .map_err(|err| err.to_string())?; - let flightcore_version: FlightCoreVersion = - serde_json::from_str(&res).expect("JSON was not well-formatted"); + // Get newest element + let latest_release_item = &page.items[0]; + + let flightcore_version = FlightCoreVersion { + tag_name: latest_release_item.tag_name.clone(), + published_at: latest_release_item.published_at.unwrap().to_rfc3339(), + }; log::info!("Done checking GitHub API"); Ok(flightcore_version) @@ -98,20 +93,109 @@ pub async fn check_is_flightcore_outdated() -> Result<bool, String> { #[tauri::command] pub async fn get_northstar_release_notes() -> Result<Vec<ReleaseInfo>, String> { - let url = "https://api.github.com/repos/R2Northstar/Northstar/releases"; - let res = match fetch_github_releases_api(url).await { - Ok(res) => res, - Err(err) => return Err(format!("Failed getting Northstar release notes: {err}")), - }; + let octocrab = octocrab::instance(); + let page = octocrab + .repos("R2Northstar", "Northstar") + .releases() + .list() + // Optional Parameters + .per_page(25) + .page(1u32) + // Send the request + .send() + .await + .map_err(|err| err.to_string())?; + + // TODO there's probably a way to automatically serialize into the struct but I don't know yet how to + let mut release_info_vector: Vec<ReleaseInfo> = vec![]; + for item in page.items { + let release_info = ReleaseInfo { + name: item.name.ok_or(String::from("Release name not found"))?, + published_at: item + .published_at + .ok_or(String::from("Release date not found"))? + .to_rfc3339(), + body: item.body.ok_or(String::from("Release body not found"))?, + }; + release_info_vector.push(release_info); + } - let release_info_vector: Vec<ReleaseInfo> = match serde_json::from_str(&res) { - Ok(res) => res, - Err(err) => { - log::warn!("{err}"); - return Err("Could not fetch release notes. JSON was not well-formatted".to_string()); - } - }; log::info!("Done checking GitHub API"); Ok(release_info_vector) } + +/// Checks latest GitHub release and generates a announcement message for Discord based on it +#[tauri::command] +pub async fn generate_release_note_announcement() -> Result<String, String> { + let octocrab = octocrab::instance(); + let page = octocrab + .repos("R2Northstar", "Northstar") + .releases() + .list() + // Optional Parameters + .per_page(1) + .page(1u32) + // Send the request + .send() + .await + .unwrap(); + + // Get newest element + let latest_release_item = &page.items[0]; + + // Extract the URL to the GitHub release note + let github_release_link = latest_release_item.html_url.clone(); + + // Extract release version number + let current_ns_version = &latest_release_item.tag_name; + + // Extract changelog and format it + let changelog = remove_markdown_links::remove_markdown_links( + latest_release_item + .body + .as_ref() + .unwrap() + .split("**Contributors:**") + .next() + .unwrap() + .trim(), + ); + + // Strings to insert for different sections + // Hardcoded for now + let general_info = "REPLACE ME"; + let modders_info = "Mod compatibility should not be impacted"; + let server_hosters_info = "REPLACE ME"; + + // Build announcement string + let return_string = format!( + r"Hello beautiful people <3 +**Northstar `{current_ns_version}` is out!** + +{general_info} + +__**Modders:**__ + +{modders_info} + +__**Server hosters:**__ + +{server_hosters_info} + +__**Changelog:**__ +``` +{changelog} +``` +{github_release_link} + +Checkout #installation on how to install/update Northstar +(the process is the same for both, using a Northstar installer like FlightCore, Viper, or VTOL is recommended over manual installation) + +If you do notice any bugs, please open an issue on Github or drop a message in the thread below +" + ); + + // Return built announcement message + Ok(return_string.to_string()) +} diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 1fc55678..ee7da27f 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -3,11 +3,7 @@ windows_subsystem = "windows" )] -use std::{ - env, - sync::{Arc, Mutex}, - time::Duration, -}; +use std::{env, time::Duration}; mod constants; mod development; @@ -42,9 +38,6 @@ pub struct NorthstarThunderstoreReleaseWrapper { value: NorthstarThunderstoreRelease, } -#[derive(Default)] -struct Counter(Arc<Mutex<i32>>); - fn main() { // Setup logger let mut log_builder = pretty_env_logger::formatted_builder(); @@ -65,7 +58,7 @@ fn main() { }, )); - match tauri::Builder::default() + let tauri_builder_res = tauri::Builder::default() .plugin(tauri_plugin_store::Builder::default().build()) .setup(|app| { let app_handle = app.app_handle(); @@ -114,7 +107,7 @@ fn main() { Ok(()) }) - .manage(Counter(Default::default())) + .manage(()) .invoke_handler(tauri::generate_handler![ development::install_git_main, github::compare_tags, @@ -124,6 +117,7 @@ fn main() { github::pull_requests::get_launcher_download_link, github::pull_requests::get_pull_requests_wrapper, github::release_notes::check_is_flightcore_outdated, + github::release_notes::generate_release_note_announcement, github::release_notes::get_newest_flightcore_version, github::release_notes::get_northstar_release_notes, mod_management::delete_northstar_mod, @@ -145,7 +139,6 @@ fn main() { platform_specific::get_host_os, platform_specific::get_local_northstar_proton_wrapper_version, platform_specific::install_northstar_proton_wrapper, - platform_specific::linux_checks, platform_specific::uninstall_northstar_proton_wrapper, repair_and_verify::clean_up_download_folder_wrapper, repair_and_verify::disable_all_but_core, @@ -161,8 +154,9 @@ fn main() { util::kill_northstar, util::open_repair_window, ]) - .run(tauri::generate_context!()) - { + .run(tauri::generate_context!()); + + match tauri_builder_res { Ok(()) => (), Err(err) => { // Failed to launch system native web view diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs index ab639b11..ebbcf431 100644 --- a/src-tauri/src/mod_management/mod.rs +++ b/src-tauri/src/mod_management/mod.rs @@ -7,6 +7,7 @@ use thermite::prelude::ThermiteError; use crate::NorthstarMod; use anyhow::{anyhow, Result}; use serde::{Deserialize, Serialize}; +use std::error::Error; use std::str::FromStr; use std::string::ToString; use std::{fs, path::PathBuf}; @@ -46,9 +47,9 @@ impl std::str::FromStr for ParsedThunderstoreModString { } } -impl ToString for ParsedThunderstoreModString { - fn to_string(&self) -> String { - format!("{}-{}-{}", self.author_name, self.mod_name, self.version) +impl std::fmt::Display for ParsedThunderstoreModString { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}-{}-{}", self.author_name, self.mod_name, self.version) } } @@ -414,7 +415,6 @@ async fn get_ns_mod_download_url(thunderstore_mod_string: &str) -> Result<String // Iterate over all versions of a given mod for ns_mod in ns_mod.versions.values() { if ns_mod.url.contains(&ts_mod_string_url) { - dbg!(ns_mod.clone()); return Ok(ns_mod.url.clone()); } } @@ -437,7 +437,6 @@ async fn get_mod_dependencies(thunderstore_mod_string: &str) -> Result<Vec<Strin // Iterate over all versions of a given mod for ns_mod in ns_mod.versions.values() { if ns_mod.url.contains(&ts_mod_string_url) { - dbg!(ns_mod.clone()); return Ok(ns_mod.deps.clone()); } } @@ -507,10 +506,14 @@ fn delete_older_versions( /// Checks whether some mod is correctly formatted /// Currently checks whether /// - Some `mod.json` exists under `mods/*/mod.json` -fn fc_sanity_check(input: &&fs::File) -> bool { +fn fc_sanity_check(input: &&fs::File) -> Result<(), Box<dyn Error + Send + Sync + 'static>> { let mut archive = match zip::read::ZipArchive::new(*input) { Ok(archive) => archive, - Err(_) => return false, + Err(_) => { + return Err(Box::new(ThermiteError::UnknownError( + "Failed reading zip file".into(), + ))) + } }; let mut has_mods = false; @@ -540,14 +543,22 @@ fn fc_sanity_check(input: &&fs::File) -> bool { if name.to_str().unwrap().contains(".dll") { log::warn!("Plugin detected, prompting user"); if !plugins::plugin_prompt() { - return false; // Plugin detected and user denied install + return Err(Box::new(ThermiteError::UnknownError( + "Plugin detected and install denied".into(), + ))); } } } } } - has_mods && mod_json_exists + if has_mods && mod_json_exists { + Ok(()) + } else { + Err(Box::new(ThermiteError::UnknownError( + "Mod not correctly formatted".into(), + ))) + } } // Copied from `libtermite` source code and modified @@ -645,9 +656,8 @@ pub async fn fc_download_mod_and_install( Err(err) => { log::warn!("libthermite couldn't install mod {thunderstore_mod_string} due to {err:?}",); return match err { - ThermiteError::SanityError => Err( - "Mod failed sanity check during install. It's probably not correctly formatted" - .to_string(), + ThermiteError::SanityError(e) => Err( + format!("Mod failed sanity check during install. It's probably not correctly formatted. {}", e) ), _ => Err(err.to_string()), }; diff --git a/src-tauri/src/northstar/install.rs b/src-tauri/src/northstar/install.rs index a89de018..0953fa38 100644 --- a/src-tauri/src/northstar/install.rs +++ b/src-tauri/src/northstar/install.rs @@ -4,7 +4,7 @@ use std::time::Duration; use std::{cell::RefCell, time::Instant}; use ts_rs::TS; -use crate::constants::{CORE_MODS, NORTHSTAR_DEFAULT_PROFILE, NORTHSTAR_DLL, TITANFALL2_STEAM_ID}; +use crate::constants::{CORE_MODS, NORTHSTAR_DEFAULT_PROFILE, NORTHSTAR_DLL}; use crate::{ util::{extract, move_dir_all}, GameInstall, InstallType, @@ -293,7 +293,7 @@ pub async fn install_northstar( pub fn find_game_install_location() -> Result<GameInstall, String> { // Attempt parsing Steam library directly match steamlocate::SteamDir::locate() { - Some(mut steamdir) => { + Ok(steamdir) => { #[cfg(target_os = "linux")] { let snap_dir = match std::env::var("SNAP_USER_DATA") { @@ -305,26 +305,37 @@ pub fn find_game_install_location() -> Result<GameInstall, String> { .join("snap"), }; - if steamdir.path.starts_with(snap_dir) { + if steamdir.path().starts_with(snap_dir) { log::warn!("Found Steam installed via Snap, you may encounter issues"); } } - let titanfall2_steamid = TITANFALL2_STEAM_ID.parse().unwrap(); - match steamdir.app(&titanfall2_steamid) { - Some(app) => { - // println!("{:#?}", app); + match steamdir.find_app(thermite::TITANFALL2_STEAM_ID) { + Ok(Some((app, library))) => { + let app_path = library + .path() + .join("steamapps") + .join("common") + .join(app.install_dir) + .into_os_string() + .into_string() + .unwrap(); + let game_install = GameInstall { - game_path: app.path.to_str().unwrap().to_string(), + game_path: app_path, profile: "R2Northstar".to_string(), install_type: InstallType::STEAM, }; return Ok(game_install); } - None => log::info!("Couldn't locate Titanfall2 Steam install"), + Ok(None) => log::info!("Couldn't locate your Titanfall 2 Steam install."), + Err(err) => log::info!( + "Something went wrong while trying to find Titanfall 2 {}", + err + ), } } - None => log::info!("Couldn't locate Steam on this computer!"), + Err(err) => log::info!("Couldn't locate Steam on this computer! {}", err), } // (On Windows only) try parsing Windows registry for Origin install path diff --git a/src-tauri/src/northstar/mod.rs b/src-tauri/src/northstar/mod.rs index ea4f4cde..4b16f701 100644 --- a/src-tauri/src/northstar/mod.rs +++ b/src-tauri/src/northstar/mod.rs @@ -4,13 +4,18 @@ pub mod install; pub mod profile; use crate::util::check_ea_app_or_origin_running; -use crate::{ - constants::{CORE_MODS, TITANFALL2_STEAM_ID}, - platform_specific::get_host_os, - GameInstall, InstallType, -}; +use crate::{constants::CORE_MODS, platform_specific::get_host_os, GameInstall, InstallType}; use crate::{NorthstarThunderstoreRelease, NorthstarThunderstoreReleaseWrapper}; use anyhow::anyhow; +use serde::{Deserialize, Serialize}; +use ts_rs::TS; + +#[derive(Serialize, Deserialize, Debug, Clone, TS)] +#[ts(export)] +pub struct NorthstarLaunchOptions { + launch_via_steam: bool, + bypass_checks: bool, +} /// Gets list of available Northstar versions from Thunderstore #[tauri::command] @@ -154,14 +159,12 @@ pub fn get_northstar_version_number(game_install: GameInstall) -> Result<String, #[tauri::command] pub fn launch_northstar( game_install: GameInstall, - launch_via_steam: Option<bool>, - bypass_checks: Option<bool>, + launch_options: NorthstarLaunchOptions, ) -> Result<String, String> { dbg!(game_install.clone()); - let launch_via_steam = launch_via_steam.unwrap_or(false); - if launch_via_steam { - return launch_northstar_steam(game_install, bypass_checks); + if launch_options.launch_via_steam { + return launch_northstar_steam(game_install); } let host_os = get_host_os(); @@ -176,13 +179,11 @@ pub fn launch_northstar( )); } - return launch_northstar_steam(game_install, bypass_checks); + return launch_northstar_steam(game_install); } - let bypass_checks = bypass_checks.unwrap_or(false); - // Only check guards if bypassing checks is not enabled - if !bypass_checks { + if !launch_options.bypass_checks { // Some safety checks before, should have more in the future if get_northstar_version_number(game_install.clone()).is_err() { return Err(anyhow!("Not all checks were met").to_string()); @@ -228,29 +229,31 @@ pub fn launch_northstar( } /// Prepare Northstar and Launch through Steam using the Browser Protocol -pub fn launch_northstar_steam( - game_install: GameInstall, - _bypass_checks: Option<bool>, -) -> Result<String, String> { +pub fn launch_northstar_steam(game_install: GameInstall) -> Result<String, String> { if !matches!(game_install.install_type, InstallType::STEAM) { return Err("Titanfall2 was not installed via Steam".to_string()); } match steamlocate::SteamDir::locate() { - Some(mut steamdir) => { + Ok(steamdir) => { if get_host_os() != "windows" { - let titanfall2_steamid: u32 = TITANFALL2_STEAM_ID.parse().unwrap(); - match steamdir.compat_tool(&titanfall2_steamid) { - Some(_) => {} - None => { - return Err( - "Titanfall2 was not configured to use a compatibility tool".to_string() - ); + match steamdir.compat_tool_mapping() { + Ok(map) => match map.get(&thermite::TITANFALL2_STEAM_ID) { + Some(_) => {} + None => { + return Err( + "Titanfall2 was not configured to use a compatibility tool" + .to_string(), + ); + } + }, + Err(_) => { + return Err("Could not get compatibility tool mapping".to_string()); } } } } - None => { + Err(_) => { return Err("Couldn't access Titanfall2 directory".to_string()); } } @@ -263,7 +266,8 @@ pub fn launch_northstar_steam( match open::that(format!( "steam://run/{}//-profile={} --northstar/", - TITANFALL2_STEAM_ID, game_install.profile + thermite::TITANFALL2_STEAM_ID, + game_install.profile )) { Ok(()) => Ok("Started game".to_string()), Err(_err) => Err("Failed to launch Titanfall 2 via Steam".to_string()), diff --git a/src-tauri/src/platform_specific/linux.rs b/src-tauri/src/platform_specific/linux.rs index 706a4d22..fcac5b67 100644 --- a/src-tauri/src/platform_specific/linux.rs +++ b/src-tauri/src/platform_specific/linux.rs @@ -1,73 +1,79 @@ // Linux specific code -use regex::Regex; -use std::process::Command; - -// I intend to add more linux related stuff to check here, so making a func -// for now tho it only checks `ldd --version` -// - salmon -pub fn linux_checks_librs() -> Result<(), String> { - // Perform various checks in terms of Linux compatibility - // Return early with error message if a check fails - - // check `ldd --version` to see if glibc is up to date for northstar proton - let min_required_ldd_version = 2.33; - let lddv = check_glibc_v(); - if lddv < min_required_ldd_version { - return Err(format!( - "GLIBC is not version {} or greater", - min_required_ldd_version - )); +fn get_proton_dir() -> Result<String, String> { + let steam_dir = match steamlocate::SteamDir::locate() { + Ok(result) => result, + Err(_) => return Err("Unable to find Steam directory".to_string()), }; + let compat_dir = format!("{}/compatibilitytools.d", steam_dir.path().display()); - // All checks passed - Ok(()) -} - -fn get_proton_dir() -> Option<String> { - let steam_dir = steamlocate::SteamDir::locate()?; - let compat_dir = format!("{}/compatibilitytools.d/", steam_dir.path.display()); - - Some(compat_dir) + Ok(compat_dir) } /// Downloads and installs NS proton /// Assumes Steam install -pub fn install_ns_proton() -> Result<(), thermite::prelude::ThermiteError> { +pub fn install_ns_proton() -> Result<(), String> { // Get latest NorthstarProton release - let latest = thermite::core::latest_release()?; + let latest = match thermite::core::latest_release() { + Ok(result) => result, + Err(_) => return Err("Failed to fetch latest NorthstarProton release".to_string()), + }; let temp_dir = std::env::temp_dir(); let path = format!("{}/nsproton-{}.tar.gz", temp_dir.display(), latest); - let archive = std::fs::File::create(path.clone())?; + let archive = match std::fs::File::create(path.clone()) { + Ok(result) => result, + Err(_) => return Err("Failed to allocate NorthstarProton archive on disk".to_string()), + }; // Download the latest Proton release log::info!("Downloading NorthstarProton to {}", path); - thermite::core::download_ns_proton(latest, archive)?; + match thermite::core::download_ns_proton(latest, archive) { + Ok(_) => {} + Err(_) => return Err("Failed to download NorthstarProton".to_string()), + } + log::info!("Finished Download"); - let compat_dir = get_proton_dir().unwrap(); - std::fs::create_dir_all(compat_dir.clone())?; + let compat_dir = get_proton_dir()?; - let finished = std::fs::File::open(path.clone())?; + match std::fs::create_dir_all(compat_dir.clone()) { + Ok(_) => {} + Err(_) => return Err("Failed to create compatibilitytools directory".to_string()), + } + + let finished = match std::fs::File::open(path.clone()) { + Ok(result) => result, + Err(_) => return Err("Failed to open NorthstarProton archive".to_string()), + }; // Extract to Proton dir log::info!("Installing NorthstarProton to {}", compat_dir); - thermite::core::install_ns_proton(&finished, compat_dir)?; + match thermite::core::install_ns_proton(&finished, compat_dir) { + Ok(_) => {} + Err(_) => return Err("Failed to create install NorthstarProton".to_string()), + } log::info!("Finished Installation"); drop(finished); - std::fs::remove_file(path)?; + // We installed NSProton, lets ignore this if it fails + let _ = std::fs::remove_file(path); Ok(()) } /// Remove NS Proton pub fn uninstall_ns_proton() -> Result<(), String> { - let compat_dir = get_proton_dir().unwrap(); - let pattern = format!("{}/NorthstarProton-*", compat_dir); + let compat_dir = get_proton_dir()?; + let pattern = format!("{}/NorthstarProton*", compat_dir); for e in glob::glob(&pattern).expect("Failed to read glob pattern") { - std::fs::remove_dir_all(e.unwrap()).unwrap(); + match e { + Ok(path) => match std::fs::remove_dir_all(path.clone()) { + Ok(_) => {} + Err(_) => return Err(format!("Failed to remove {}", path.display())), + }, + Err(e) => return Err(format!("Found unprocessable entry {}", e)), + } } Ok(()) @@ -76,84 +82,17 @@ pub fn uninstall_ns_proton() -> Result<(), String> { /// Get the latest installed NS Proton version pub fn get_local_ns_proton_version() -> Result<String, String> { let compat_dir = get_proton_dir().unwrap(); - let ns_prefix = "NorthstarProton-"; - let pattern = format!("{}/{}*/version", compat_dir, ns_prefix); - - let mut version: String = "".to_string(); + let pattern = format!("{}/NorthstarProton*/version", compat_dir); - for e in glob::glob(&pattern).expect("Failed to read glob pattern") { + if let Some(e) = glob::glob(&pattern) + .expect("Failed to read glob pattern") + .next() + { let version_content = std::fs::read_to_string(e.unwrap()).unwrap(); - let version_string = version_content.split(' ').nth(1).unwrap(); - - if version_string.starts_with(ns_prefix) { - version = version_string[ns_prefix.len()..version_string.len() - 1] - .to_string() - .clone(); - } - } + let version = version_content.split(' ').nth(1).unwrap().to_string(); - if version.is_empty() { - return Err("Northstar Proton is not installed".to_string()); + return Ok(version); } - Ok(version) -} - -pub fn check_glibc_v() -> f32 { - let out = Command::new("/bin/ldd") - .arg("--version") - .output() - .expect("failed to run 'ldd --version'"); - - // parse the output down to just the first line - let lddva = String::from_utf8_lossy(&out.stdout); - let lddvl: Vec<&str> = lddva.split('\n').collect(); - let lddvlo = &lddvl[0]; - let reg = Regex::new(r"(2.\d{2}$)").unwrap(); - if let Some(caps) = reg.captures_iter(lddvlo).next() { - return caps.get(1).unwrap().as_str().parse::<f32>().unwrap(); // theres prolly a better way ijdk how tho - } - 0.0 // this shouldnt ever be reached but it has to be here + Err("Northstar Proton is not installed".to_string()) } - -/* -Outputs of ldd --verssion from distros, all we care about is the first line so trimmed, also removed all duplicates -Thanks tony -Distros not included: AmazonLinux, Gentoo, Kali, Debian before 11, Oracle Linux, Scientific Linux, Slackware, Mageia, Neurodebian, RHEL 8 and 9 (Same as AlmaLinux), RockyLinux (Same as AlmaLinux), Ubuntu before 20.04 - -AlmaLinux 8 -ldd (GNU libc) 2.35 - -Centos Stream 8 -ldd (GNU libc) 2.28 - -Centos Stream 9 -ldd (GNU libc) 2.34 - -Centos 7 -ldd (GNU libc) 2.17 - -Debian 11 -ldd (Debian GLIBC 2.31-13+deb11u4) 2.31 - -Debian Testing -ldd (Debian GLIBC 2.35-1) 2.35 - -Debian Unstable -ldd (Debian GLIBC 2.35-3) 2.35 - -Fedora 37 -ldd (GNU libc) 2.36 - -Opensuse Leap -ldd (GNU libc) 2.31 - -Ubuntu 20.04 -ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31 - -Ubuntu 22.04 -ldd (Ubuntu GLIBC 2.35-0ubuntu3.1) 2.35 - -Ubuntu 22.10 -ldd (Ubuntu GLIBC 2.36-0ubuntu2) 2.36 -*/ diff --git a/src-tauri/src/platform_specific/mod.rs b/src-tauri/src/platform_specific/mod.rs index 8dca9424..6fdb1ed1 100644 --- a/src-tauri/src/platform_specific/mod.rs +++ b/src-tauri/src/platform_specific/mod.rs @@ -38,20 +38,3 @@ pub async fn get_local_northstar_proton_wrapper_version() -> Result<String, Stri #[cfg(target_os = "windows")] Err("Not supported on Windows".to_string()) } - -/// Returns true if linux compatible -#[tauri::command] -pub async fn linux_checks() -> Result<(), String> { - // Different behaviour depending on OS - // MacOS is missing as it is not a target - // in turn this means this application will not build on MacOS. - #[cfg(target_os = "windows")] - { - Err("Not available on Windows".to_string()) - } - - #[cfg(target_os = "linux")] - { - linux::linux_checks_librs() - } -} diff --git a/src-tauri/src/repair_and_verify/mod.rs b/src-tauri/src/repair_and_verify/mod.rs index c752a3ab..3c861609 100644 --- a/src-tauri/src/repair_and_verify/mod.rs +++ b/src-tauri/src/repair_and_verify/mod.rs @@ -92,7 +92,6 @@ pub fn clean_up_download_folder( Ok(contents) => contents, Err(_) => continue, }; - // dbg!(download_dir_contents); let mut count = 0; download_dir_contents.for_each(|_| count += 1); diff --git a/src-tauri/src/util.rs b/src-tauri/src/util.rs index ad09eec2..1d355997 100644 --- a/src-tauri/src/util.rs +++ b/src-tauri/src/util.rs @@ -2,7 +2,6 @@ use anyhow::{Context, Result}; use serde::{Deserialize, Serialize}; -use sysinfo::{ProcessExt, SystemExt}; use zip::ZipArchive; use crate::constants::{APP_USER_AGENT, MASTER_SERVER_URL, SERVER_BROWSER_ENDPOINT}; diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 9829c412..63721461 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "FlightCore", - "version": "2.18.1" + "version": "2.23.2" }, "tauri": { "allowlist": { |