Compare commits
No commits in common. "660576172cc3a413d03497e2b65db954d14cbae3" and "a7183731c740fbcefac9ac81b6503006b2675f8c" have entirely different histories.
660576172c
...
a7183731c7
|
|
@ -1,7 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="SqlDialectMappings">
|
|
||||||
<file url="file://$PROJECT_DIR$/migrations/2023-09-20-230922_extend userinfo to include XP/up.sql" dialect="GenericSQL" />
|
|
||||||
<file url="PROJECT" dialect="SQLite" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
|
|
@ -39,9 +39,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "aho-corasick"
|
name = "aho-corasick"
|
||||||
version = "1.1.1"
|
version = "1.0.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab"
|
checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"memchr",
|
"memchr",
|
||||||
]
|
]
|
||||||
|
|
@ -77,9 +77,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anstyle"
|
name = "anstyle"
|
||||||
version = "1.0.3"
|
version = "1.0.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46"
|
checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anstyle-parse"
|
name = "anstyle-parse"
|
||||||
|
|
@ -117,7 +117,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.37",
|
"syn 2.0.29",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -159,7 +159,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "badgey"
|
name = "badgey"
|
||||||
version = "2.0.0"
|
version = "1.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"built",
|
"built",
|
||||||
"clap",
|
"clap",
|
||||||
|
|
@ -169,7 +169,6 @@ dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"manifold",
|
"manifold",
|
||||||
"poise",
|
"poise",
|
||||||
"rand 0.8.5",
|
|
||||||
"tokio",
|
"tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -181,9 +180,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "base64"
|
name = "base64"
|
||||||
version = "0.21.4"
|
version = "0.21.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2"
|
checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitflags"
|
name = "bitflags"
|
||||||
|
|
@ -220,9 +219,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bumpalo"
|
name = "bumpalo"
|
||||||
version = "3.14.0"
|
version = "3.13.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
|
checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "byteorder"
|
name = "byteorder"
|
||||||
|
|
@ -232,9 +231,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bytes"
|
name = "bytes"
|
||||||
version = "1.5.0"
|
version = "1.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
|
checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cargo-lock"
|
name = "cargo-lock"
|
||||||
|
|
@ -244,7 +243,7 @@ checksum = "e11c675378efb449ed3ce8de78d75d0d80542fc98487c26aba28eb3b82feac72"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"semver",
|
"semver",
|
||||||
"serde",
|
"serde",
|
||||||
"toml 0.7.8",
|
"toml 0.7.6",
|
||||||
"url",
|
"url",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -266,15 +265,16 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "chrono"
|
name = "chrono"
|
||||||
version = "0.4.31"
|
version = "0.4.27"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38"
|
checksum = "f56b4c72906975ca04becb8a30e102dfecddd0c06181e3e95ddc444be28881f8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"android-tzdata",
|
"android-tzdata",
|
||||||
"iana-time-zone",
|
"iana-time-zone",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"serde",
|
"serde",
|
||||||
|
"time 0.1.45",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
"windows-targets",
|
"windows-targets",
|
||||||
]
|
]
|
||||||
|
|
@ -303,22 +303,23 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
version = "4.4.4"
|
version = "4.4.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136"
|
checksum = "7c8d502cbaec4595d2e7d5f61e318f05417bd2b66fdc3809498f0d3fdf0bea27"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap_builder",
|
"clap_builder",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_builder"
|
name = "clap_builder"
|
||||||
version = "4.4.4"
|
version = "4.4.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56"
|
checksum = "5891c7bc0edb3e1c2204fc5e94009affabeb1821c9e5fdc3959536c5c0bb984d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anstream",
|
"anstream",
|
||||||
"anstyle",
|
"anstyle",
|
||||||
"clap_lex",
|
"clap_lex",
|
||||||
|
"once_cell",
|
||||||
"strsim",
|
"strsim",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -486,7 +487,7 @@ dependencies = [
|
||||||
"diesel_derives",
|
"diesel_derives",
|
||||||
"libsqlite3-sys",
|
"libsqlite3-sys",
|
||||||
"r2d2",
|
"r2d2",
|
||||||
"time",
|
"time 0.3.28",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -498,7 +499,7 @@ dependencies = [
|
||||||
"diesel_table_macro_syntax",
|
"diesel_table_macro_syntax",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.37",
|
"syn 2.0.29",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -518,7 +519,7 @@ version = "0.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5"
|
checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"syn 2.0.37",
|
"syn 2.0.29",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -576,7 +577,7 @@ dependencies = [
|
||||||
"humantime",
|
"humantime",
|
||||||
"is-terminal",
|
"is-terminal",
|
||||||
"log",
|
"log",
|
||||||
"regex 1.9.5",
|
"regex 1.9.4",
|
||||||
"termcolor",
|
"termcolor",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -703,7 +704,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.37",
|
"syn 2.0.29",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -754,7 +755,7 @@ checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"libc",
|
"libc",
|
||||||
"wasi",
|
"wasi 0.11.0+wasi-snapshot-preview1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -812,9 +813,9 @@ checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hermit-abi"
|
name = "hermit-abi"
|
||||||
version = "0.3.3"
|
version = "0.3.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"
|
checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "http"
|
name = "http"
|
||||||
|
|
@ -1026,9 +1027,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.148"
|
version = "0.2.147"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b"
|
checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libgit2-sys"
|
name = "libgit2-sys"
|
||||||
|
|
@ -1072,9 +1073,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "linux-raw-sys"
|
name = "linux-raw-sys"
|
||||||
version = "0.4.7"
|
version = "0.4.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128"
|
checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lock_api"
|
name = "lock_api"
|
||||||
|
|
@ -1094,8 +1095,8 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "manifold"
|
name = "manifold"
|
||||||
version = "4.0.0"
|
version = "3.0.0"
|
||||||
source = "git+ssh://git@code.orbiter-radio.uk/source/mfold.git#3d712fdcb32f4a6269d12b25b10371e1c307e272"
|
source = "git+ssh://git@code.orbiter-radio.uk/source/mfold.git#57b79e7a5e9a8b04259dd618a5a48ada4b41ccac"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"built",
|
"built",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
|
@ -1112,7 +1113,7 @@ dependencies = [
|
||||||
"poise",
|
"poise",
|
||||||
"r2d2",
|
"r2d2",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"regex 1.9.5",
|
"regex 1.9.4",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
|
@ -1121,9 +1122,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memchr"
|
name = "memchr"
|
||||||
version = "2.6.3"
|
version = "2.6.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c"
|
checksum = "5486aed0026218e61b8a01d5fbd5a0a134649abb71a0e53b7bc088529dced86e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "migrations_internals"
|
name = "migrations_internals"
|
||||||
|
|
@ -1132,7 +1133,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0f23f71580015254b020e856feac3df5878c2c7a8812297edd6c0a485ac9dada"
|
checksum = "0f23f71580015254b020e856feac3df5878c2c7a8812297edd6c0a485ac9dada"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"toml 0.7.8",
|
"toml 0.7.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -1184,7 +1185,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
|
checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"wasi",
|
"wasi 0.11.0+wasi-snapshot-preview1",
|
||||||
"windows-sys",
|
"windows-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -1304,9 +1305,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "object"
|
name = "object"
|
||||||
version = "0.32.1"
|
version = "0.32.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0"
|
checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"memchr",
|
"memchr",
|
||||||
]
|
]
|
||||||
|
|
@ -1340,7 +1341,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.37",
|
"syn 2.0.29",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -1351,9 +1352,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "openssl-sys"
|
name = "openssl-sys"
|
||||||
version = "0.9.93"
|
version = "0.9.92"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d"
|
checksum = "db7e971c2c2bba161b2d2fdf37080177eff520b3bc044787c7f1f5f9e78d869b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"libc",
|
"libc",
|
||||||
|
|
@ -1415,7 +1416,7 @@ version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41"
|
checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"regex 1.9.5",
|
"regex 1.9.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -1461,7 +1462,7 @@ dependencies = [
|
||||||
"pest_meta",
|
"pest_meta",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.37",
|
"syn 2.0.29",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -1533,9 +1534,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "poise"
|
name = "poise"
|
||||||
version = "0.5.6"
|
version = "0.5.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "649248bcf202ebd1fe3202a7eaf2f705466c92f8d32a644ef565d9221e3ff6f1"
|
checksum = "6d591af1c934c29adda172665f69b837e642d4fee85598baffb95dd98110467d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"derivative",
|
"derivative",
|
||||||
|
|
@ -1545,16 +1546,16 @@ dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"poise_macros",
|
"poise_macros",
|
||||||
"regex 1.9.5",
|
"regex 1.9.4",
|
||||||
"serenity",
|
"serenity",
|
||||||
"tokio",
|
"tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "poise_macros"
|
name = "poise_macros"
|
||||||
version = "0.5.6"
|
version = "0.5.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "05960fe87728cef0533d13f8ead89da228f5eb7840bee5602eeaa8db150084a0"
|
checksum = "40270099e1527efae99fdc0609d397e76310b529d4980ad38ab14d81803ca0fa"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"darling",
|
"darling",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
|
|
@ -1570,9 +1571,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.67"
|
version = "1.0.66"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328"
|
checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
@ -1718,11 +1719,11 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex"
|
name = "regex"
|
||||||
version = "1.9.5"
|
version = "1.9.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47"
|
checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick 1.1.1",
|
"aho-corasick 1.0.5",
|
||||||
"memchr",
|
"memchr",
|
||||||
"regex-automata",
|
"regex-automata",
|
||||||
"regex-syntax 0.7.5",
|
"regex-syntax 0.7.5",
|
||||||
|
|
@ -1730,11 +1731,11 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex-automata"
|
name = "regex-automata"
|
||||||
version = "0.3.8"
|
version = "0.3.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795"
|
checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick 1.1.1",
|
"aho-corasick 1.0.5",
|
||||||
"memchr",
|
"memchr",
|
||||||
"regex-syntax 0.7.5",
|
"regex-syntax 0.7.5",
|
||||||
]
|
]
|
||||||
|
|
@ -1760,7 +1761,7 @@ version = "0.11.20"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1"
|
checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.21.4",
|
"base64 0.21.3",
|
||||||
"bytes",
|
"bytes",
|
||||||
"encoding_rs",
|
"encoding_rs",
|
||||||
"futures-core",
|
"futures-core",
|
||||||
|
|
@ -1843,9 +1844,9 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustix"
|
name = "rustix"
|
||||||
version = "0.38.14"
|
version = "0.38.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f"
|
checksum = "ed6248e1caa625eb708e266e06159f135e8c26f2bb7ceb72dc4b2766d0340964"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.4.0",
|
"bitflags 2.4.0",
|
||||||
"errno",
|
"errno",
|
||||||
|
|
@ -1884,14 +1885,14 @@ version = "1.0.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2"
|
checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.21.4",
|
"base64 0.21.3",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls-webpki"
|
name = "rustls-webpki"
|
||||||
version = "0.101.6"
|
version = "0.101.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe"
|
checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ring",
|
"ring",
|
||||||
"untrusted",
|
"untrusted",
|
||||||
|
|
@ -1968,9 +1969,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "semver"
|
name = "semver"
|
||||||
version = "1.0.19"
|
version = "1.0.18"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0"
|
checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
@ -2002,14 +2003,14 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.37",
|
"syn 2.0.29",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.107"
|
version = "1.0.105"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65"
|
checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa",
|
"itoa",
|
||||||
"ryu",
|
"ryu",
|
||||||
|
|
@ -2062,7 +2063,7 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde-value",
|
"serde-value",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"time",
|
"time 0.3.28",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tracing",
|
"tracing",
|
||||||
"typemap_rev",
|
"typemap_rev",
|
||||||
|
|
@ -2108,9 +2109,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "smallvec"
|
name = "smallvec"
|
||||||
version = "1.11.1"
|
version = "1.11.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a"
|
checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "socket2"
|
name = "socket2"
|
||||||
|
|
@ -2124,9 +2125,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "socket2"
|
name = "socket2"
|
||||||
version = "0.5.4"
|
version = "0.5.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e"
|
checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"windows-sys",
|
"windows-sys",
|
||||||
|
|
@ -2157,9 +2158,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.37"
|
version = "2.0.29"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8"
|
checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|
@ -2181,31 +2182,31 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "termcolor"
|
name = "termcolor"
|
||||||
version = "1.3.0"
|
version = "1.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64"
|
checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"winapi-util",
|
"winapi-util",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror"
|
name = "thiserror"
|
||||||
version = "1.0.48"
|
version = "1.0.47"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7"
|
checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"thiserror-impl",
|
"thiserror-impl",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror-impl"
|
name = "thiserror-impl"
|
||||||
version = "1.0.48"
|
version = "1.0.47"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35"
|
checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.37",
|
"syn 2.0.29",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -2219,9 +2220,20 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "time"
|
name = "time"
|
||||||
version = "0.3.29"
|
version = "0.1.45"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe"
|
checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
"wasi 0.10.0+wasi-snapshot-preview1",
|
||||||
|
"winapi",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "time"
|
||||||
|
version = "0.3.28"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"deranged",
|
"deranged",
|
||||||
"itoa",
|
"itoa",
|
||||||
|
|
@ -2232,15 +2244,15 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "time-core"
|
name = "time-core"
|
||||||
version = "0.1.2"
|
version = "0.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
|
checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "time-macros"
|
name = "time-macros"
|
||||||
version = "0.2.15"
|
version = "0.2.14"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20"
|
checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"time-core",
|
"time-core",
|
||||||
]
|
]
|
||||||
|
|
@ -2272,7 +2284,7 @@ dependencies = [
|
||||||
"mio",
|
"mio",
|
||||||
"num_cpus",
|
"num_cpus",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"socket2 0.5.4",
|
"socket2 0.5.3",
|
||||||
"tokio-macros",
|
"tokio-macros",
|
||||||
"windows-sys",
|
"windows-sys",
|
||||||
]
|
]
|
||||||
|
|
@ -2285,7 +2297,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.37",
|
"syn 2.0.29",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -2321,9 +2333,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio-util"
|
name = "tokio-util"
|
||||||
version = "0.7.9"
|
version = "0.7.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d"
|
checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"futures-core",
|
"futures-core",
|
||||||
|
|
@ -2344,9 +2356,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml"
|
name = "toml"
|
||||||
version = "0.7.8"
|
version = "0.7.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257"
|
checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde_spanned",
|
"serde_spanned",
|
||||||
|
|
@ -2365,9 +2377,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml_edit"
|
name = "toml_edit"
|
||||||
version = "0.19.15"
|
version = "0.19.14"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
|
checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.0.0",
|
"indexmap 2.0.0",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
@ -2403,7 +2415,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.37",
|
"syn 2.0.29",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -2450,9 +2462,9 @@ checksum = "ed5b74f0a24b5454580a79abb6994393b09adf0ab8070f15827cb666255de155"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "typenum"
|
name = "typenum"
|
||||||
version = "1.17.0"
|
version = "1.16.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ucd-trie"
|
name = "ucd-trie"
|
||||||
|
|
@ -2483,9 +2495,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-ident"
|
name = "unicode-ident"
|
||||||
version = "1.0.12"
|
version = "1.0.11"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-normalization"
|
name = "unicode-normalization"
|
||||||
|
|
@ -2553,6 +2565,12 @@ dependencies = [
|
||||||
"try-lock",
|
"try-lock",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wasi"
|
||||||
|
version = "0.10.0+wasi-snapshot-preview1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasi"
|
name = "wasi"
|
||||||
version = "0.11.0+wasi-snapshot-preview1"
|
version = "0.11.0+wasi-snapshot-preview1"
|
||||||
|
|
@ -2580,7 +2598,7 @@ dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.37",
|
"syn 2.0.29",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -2614,7 +2632,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.37",
|
"syn 2.0.29",
|
||||||
"wasm-bindgen-backend",
|
"wasm-bindgen-backend",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
]
|
]
|
||||||
|
|
@ -2650,9 +2668,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webpki"
|
name = "webpki"
|
||||||
version = "0.22.1"
|
version = "0.22.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e"
|
checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ring",
|
"ring",
|
||||||
"untrusted",
|
"untrusted",
|
||||||
|
|
@ -2691,9 +2709,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winapi-util"
|
name = "winapi-util"
|
||||||
version = "0.1.6"
|
version = "0.1.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
|
checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "badgey"
|
name = "badgey"
|
||||||
version = "2.0.0"
|
version = "1.0.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
@ -16,7 +16,6 @@ diesel_migrations = "2.1.0"
|
||||||
env_logger = "0.10.0"
|
env_logger = "0.10.0"
|
||||||
log = "0.4.20"
|
log = "0.4.20"
|
||||||
manifold = { git = "ssh://git@code.orbiter-radio.uk/source/mfold.git" }
|
manifold = { git = "ssh://git@code.orbiter-radio.uk/source/mfold.git" }
|
||||||
# manifold = { path = "/home/xyon/Workspace/manifold/" }
|
#manifold = { path = "/home/xyon/Workspace/manifold/" }
|
||||||
poise = { version = "0.5.*", features = [ "cache" ] }
|
poise = "0.5.5"
|
||||||
rand = { version = "0.8.5", features = [ "small_rng" ] }
|
|
||||||
tokio = { version = "1.16.1", features = ["sync", "macros", "rt-multi-thread"] }
|
tokio = { version = "1.16.1", features = ["sync", "macros", "rt-multi-thread"] }
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
ssh badgey@badgey sudo /usr/bin/systemctl stop badgey
|
|
||||||
rsync -avP target/release/badgey badgey@badgey:/srv/badgey/
|
|
||||||
rsync -avP config badgey@badgey:/srv/badgey/
|
|
||||||
rsync -avP txt badgey@badgey:/srv/badgey/
|
|
||||||
ssh badgey@badgey sudo /usr/bin/systemctl start badgey
|
|
||||||
|
|
@ -27,16 +27,6 @@
|
||||||
"cache_name": "cat_pics",
|
"cache_name": "cat_pics",
|
||||||
"cache_mode": "Cache",
|
"cache_mode": "Cache",
|
||||||
"api_key": "live_nvupPQbrXjHy8jsZJ1stp72fzsRLR8jQby8IR3l9yMngqAU9gcTEV8RA0OOiK8zP"
|
"api_key": "live_nvupPQbrXjHy8jsZJ1stp72fzsRLR8jQby8IR3l9yMngqAU9gcTEV8RA0OOiK8zP"
|
||||||
},
|
|
||||||
"dad_jokes": {
|
|
||||||
"source_uri": "https://icanhazdadjoke.com/search?limit=30",
|
|
||||||
"cache_name": "dad_jokes",
|
|
||||||
"cache_mode": "Cache"
|
|
||||||
},
|
|
||||||
"nasa_apod": {
|
|
||||||
"source_uri": "https://api.nasa.gov/planetary/apod?api_key=NZfKclpoaO9HnvfvaCjeJ3csDecvIqNiABVw2YvN",
|
|
||||||
"cache_name": "nasa_apod",
|
|
||||||
"cache_mode": "NoCache"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,16 +27,6 @@
|
||||||
"cache_name": "cat_pics",
|
"cache_name": "cat_pics",
|
||||||
"cache_mode": "Cache",
|
"cache_mode": "Cache",
|
||||||
"api_key": "live_nvupPQbrXjHy8jsZJ1stp72fzsRLR8jQby8IR3l9yMngqAU9gcTEV8RA0OOiK8zP"
|
"api_key": "live_nvupPQbrXjHy8jsZJ1stp72fzsRLR8jQby8IR3l9yMngqAU9gcTEV8RA0OOiK8zP"
|
||||||
},
|
|
||||||
"dad_jokes": {
|
|
||||||
"source_uri": "https://icanhazdadjoke.com/search?limit=30",
|
|
||||||
"cache_name": "dad_jokes",
|
|
||||||
"cache_mode": "Cache"
|
|
||||||
},
|
|
||||||
"nasa_apod": {
|
|
||||||
"source_uri": "https://api.nasa.gov/planetary/apod?api_key=NZfKclpoaO9HnvfvaCjeJ3csDecvIqNiABVw2YvN",
|
|
||||||
"cache_name": "nasa_apod",
|
|
||||||
"cache_mode": "NoCache"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
# For documentation on how to configure this file,
|
|
||||||
# see https://diesel.rs/guides/configuring-diesel-cli
|
|
||||||
|
|
||||||
[print_schema]
|
|
||||||
file = "src/badgey/schema.rs"
|
|
||||||
custom_type_derives = ["diesel::query_builder::QueryId"]
|
|
||||||
|
|
||||||
[migrations_directory]
|
|
||||||
dir = "migrations"
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
-- This file should undo anything in `up.sql`
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
-- Your SQL goes here
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
-- This file should undo anything in `up.sql`
|
|
||||||
DROP TABLE IF EXISTS "xp";
|
|
||||||
DROP TABLE IF EXISTS "levels";
|
|
||||||
DROP TABLE IF EXISTS "ranks";
|
|
||||||
DROP TABLE IF EXISTS "tracks";
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
CREATE TABLE IF NOT EXISTS "xp"
|
|
||||||
(
|
|
||||||
user_id BIGINT NOT NULL REFERENCES userinfo(user_id) PRIMARY KEY,
|
|
||||||
user_current_level INTEGER NOT NULL DEFAULT 0,
|
|
||||||
xp_value BIGINT NOT NULL DEFAULT 0,
|
|
||||||
last_given_xp BIGINT,
|
|
||||||
rank_track INTEGER NOT NULL,
|
|
||||||
rank_track_last_changed BIGINT,
|
|
||||||
freeze_rank BIGINT,
|
|
||||||
freeze_rank_last_changed BIGINT
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS "tracks"
|
|
||||||
(
|
|
||||||
track_id INTEGER NOT NULL PRIMARY KEY,
|
|
||||||
track_name VARCHAR(128) NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS "ranks"
|
|
||||||
(
|
|
||||||
role_id BIGINT NOT NULL PRIMARY KEY,
|
|
||||||
required_level INTEGER NOT NULL DEFAULT 1,
|
|
||||||
rank_track INTEGER NOT NULL DEFAULT 0,
|
|
||||||
rank_name VARCHAR(128) NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
INSERT INTO "tracks" (track_id, track_name) VALUES
|
|
||||||
(0, "officer"),
|
|
||||||
(1, "enlisted");
|
|
||||||
|
|
||||||
INSERT INTO "ranks" (role_id, required_level, rank_track, rank_name) VALUES
|
|
||||||
(1154403063960961063, 0, 0, "cadet first year"), -- cadet 1
|
|
||||||
(1154403107313307729, 10, 0, "cadet fourth year"), -- cadet 4
|
|
||||||
(1152963553620393995, 20, 0, "ensign"), -- ensign
|
|
||||||
(1152963552299188224, 30, 0, "lieutenant junior grade"), -- ltjg
|
|
||||||
(1152963550906695762, 40, 0, "lieutenant"), -- lt
|
|
||||||
(1152963549979758712, 50, 0, "lieutenant commander"), -- ltcmdr
|
|
||||||
(1152963548843094126, 60, 0, "commander"), -- cmdr
|
|
||||||
(1152963541255594054, 80, 0, "captain"), -- capt
|
|
||||||
(1152759044893843656, 100, 0, "fleet captain"), -- fleetcapt
|
|
||||||
(1152965025938550926, 0, 1, "crewman third class"), -- crewman 3rd
|
|
||||||
(1152965024550228099, 10, 1, "crewman second class"), -- crewman 2nd
|
|
||||||
(1152965023098994789, 20, 1, "crewman first class"), -- crewman 1st
|
|
||||||
(1152964462844846162, 30, 1, "petty officer third class"), -- petty 3rd
|
|
||||||
(1152964461817253958, 40, 1, "petty officer second class"), -- petty 2nd
|
|
||||||
(1152964460835778631, 50, 1, "petty officer first class"), -- petty 1st
|
|
||||||
(1152963559010087022, 60, 1, "chief petty officer"), -- chief petty
|
|
||||||
(1152963557537886229, 80, 1, "senior chief petty officer"), -- sr ch petty
|
|
||||||
(1152963556527063110, 100, 1, "master chief petty officer"); -- master ch petty
|
|
||||||
|
|
@ -2,12 +2,8 @@ use manifold::{ManifoldData};
|
||||||
use manifold::error::{ManifoldError};
|
use manifold::error::{ManifoldError};
|
||||||
use poise::Command;
|
use poise::Command;
|
||||||
|
|
||||||
pub mod ranks;
|
|
||||||
|
|
||||||
pub fn collect_commands() -> Vec<Command<ManifoldData, ManifoldError>> {
|
pub fn collect_commands() -> Vec<Command<ManifoldData, ManifoldError>> {
|
||||||
commands().into_iter()
|
commands().into_iter().collect()
|
||||||
.chain(ranks::commands())
|
|
||||||
.collect()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn commands() -> [Command<ManifoldData, ManifoldError>; 0] {
|
fn commands() -> [Command<ManifoldData, ManifoldError>; 0] {
|
||||||
|
|
|
||||||
|
|
@ -1,127 +0,0 @@
|
||||||
use built::chrono;
|
|
||||||
use manifold::error::{ManifoldError, ManifoldResult};
|
|
||||||
use manifold::{ManifoldContext, ManifoldData};
|
|
||||||
use crate::badgey::models::xp::{Rank, Track, Xp};
|
|
||||||
|
|
||||||
#[poise::command(prefix_command, slash_command)]
|
|
||||||
async fn switch_rank_track(ctx: ManifoldContext<'_>, #[description = "Track to switch to: officer or enlisted"] track: String) -> ManifoldResult<()> {
|
|
||||||
let db = &ctx.data().database;
|
|
||||||
let user_id_i64 = ctx.author().id.as_u64().clone() as i64;
|
|
||||||
|
|
||||||
let mut xp = match Xp::get(db, &user_id_i64) {
|
|
||||||
Ok(x) => x,
|
|
||||||
Err(_) => Xp::new(&user_id_i64)
|
|
||||||
};
|
|
||||||
|
|
||||||
Xp::check_timeout(&xp.rank_track_last_changed, &86400)?;
|
|
||||||
|
|
||||||
let parsed_track = Track::get_track_by_name(db, &track)?;
|
|
||||||
if xp.rank_track != parsed_track.track_id {
|
|
||||||
let current_level_rank = Rank::get_rank_for_level(db, &xp.user_current_level, &xp.rank_track)?;
|
|
||||||
let new_level_rank = Rank::get_rank_for_level(db, &xp.user_current_level, &parsed_track.track_id)?;
|
|
||||||
|
|
||||||
if let Some(mut member) = ctx.author_member().await {
|
|
||||||
member.to_mut().remove_role(ctx, current_level_rank.role_id as u64).await?;
|
|
||||||
member.to_mut().add_role(ctx, new_level_rank.role_id as u64).await?;
|
|
||||||
}
|
|
||||||
|
|
||||||
xp.rank_track = parsed_track.track_id;
|
|
||||||
|
|
||||||
ctx.reply(format!("I have switched you onto the {} rank track. You're now a {}. I hope this was worth it.", parsed_track.track_name, new_level_rank.rank_name)).await?;
|
|
||||||
xp.rank_track_last_changed = Some(chrono::Utc::now().timestamp());
|
|
||||||
xp.insert(db)?;
|
|
||||||
} else {
|
|
||||||
ctx.reply(format!("You're already on the {} rank track.", parsed_track.track_name)).await?;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
#[poise::command(prefix_command, slash_command)]
|
|
||||||
async fn freeze_rank(ctx: ManifoldContext<'_>, #[rest] #[description = "Rank to lock yourself at. Omit to unfreeze your progression."] rank: Option<String>) -> ManifoldResult<()> {
|
|
||||||
let db = &ctx.data().database;
|
|
||||||
let user_id_i64 = ctx.author().id.as_u64().clone() as i64;
|
|
||||||
|
|
||||||
let mut xp = match Xp::get(db, &user_id_i64) {
|
|
||||||
Ok(x) => x,
|
|
||||||
Err(_) => Xp::new(&user_id_i64)
|
|
||||||
};
|
|
||||||
|
|
||||||
Xp::check_timeout(&xp.freeze_rank_last_changed, &86400)?;
|
|
||||||
|
|
||||||
if let Some(r) = rank {
|
|
||||||
let frozen_rank = match Rank::get_rank_by_name(db, &r, &xp.rank_track) {
|
|
||||||
Ok(r) => r,
|
|
||||||
Err(e) => {
|
|
||||||
error!("Rank lookup error: {}", e);
|
|
||||||
ctx.reply(format!("I couldn't find that rank as a rank I can give you. You might need to switch tracks, or it might just not exist.")).await?;
|
|
||||||
Err(e)?
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if let Some(fr) = xp.freeze_rank {
|
|
||||||
// Remove any old frozen rank
|
|
||||||
if let Some(mut member) = ctx.author_member().await {
|
|
||||||
member.to_mut().remove_role(ctx, fr as u64).await?;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
xp.freeze_rank = Some(frozen_rank.role_id.clone() as i64);
|
|
||||||
|
|
||||||
if let Some(mut member) = ctx.author_member().await {
|
|
||||||
member.to_mut().add_role(ctx, frozen_rank.role_id as u64).await?;
|
|
||||||
ctx.reply(format!("Okay. I've frozen your rank at {}. Enjoy!", frozen_rank.rank_name)).await?;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if let Some(fr) = xp.freeze_rank {
|
|
||||||
// Remove any old frozen rank
|
|
||||||
if let Some(mut member) = ctx.author_member().await {
|
|
||||||
member.to_mut().remove_role(ctx, fr as u64).await?;
|
|
||||||
}
|
|
||||||
|
|
||||||
xp.freeze_rank = None;
|
|
||||||
ctx.reply(format!("Okay. I've unfrozen your rank. Good luck out there.")).await?;
|
|
||||||
} else {
|
|
||||||
ctx.reply(format!("Negative, your rank wasn't frozen.")).await?;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
xp.freeze_rank_last_changed = Some(chrono::Utc::now().timestamp());
|
|
||||||
xp.insert(db)?;
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
#[poise::command(prefix_command, slash_command)]
|
|
||||||
async fn rank(ctx: ManifoldContext<'_>) -> ManifoldResult<()> {
|
|
||||||
let db = &ctx.data().database;
|
|
||||||
let user_id_i64 = ctx.author().id.as_u64().clone() as i64;
|
|
||||||
|
|
||||||
let xp = match Xp::get(db, &user_id_i64) {
|
|
||||||
Ok(x) => x,
|
|
||||||
Err(_) => Xp::new(&user_id_i64)
|
|
||||||
};
|
|
||||||
|
|
||||||
let current_rank = Rank::get_rank_for_level(db, &xp.user_current_level, &xp.rank_track).unwrap_or(Rank::new());
|
|
||||||
|
|
||||||
let next_level_xp = xp.get_xp_to_next_level();
|
|
||||||
let next_rank_xp = xp.get_xp_to_next_rank(&db).unwrap_or(0);
|
|
||||||
|
|
||||||
let mut response = format!("You're currently {}. You need {} more XP to get to the next level", current_rank.rank_name, next_level_xp);
|
|
||||||
if next_rank_xp == 0 {
|
|
||||||
response = format!("{}. There are no more ranks for you - you can't be promoted any further!", response);
|
|
||||||
} else if next_rank_xp == next_level_xp {
|
|
||||||
response = format!("{} and rank!", response);
|
|
||||||
} else {
|
|
||||||
response = format!("{} and you need {} more to rank up. Good luck!", response, next_rank_xp);
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.reply(response).await?;
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn commands() -> [poise::Command<ManifoldData, ManifoldError>; 3] {
|
|
||||||
[switch_rank_track(), freeze_rank(), rank()]
|
|
||||||
}
|
|
||||||
|
|
@ -1,84 +0,0 @@
|
||||||
use built::chrono;
|
|
||||||
use manifold::error::{ManifoldError, ManifoldResult};
|
|
||||||
use manifold::events::{Handler, EventHandler};
|
|
||||||
use manifold::ManifoldData;
|
|
||||||
use poise::{async_trait, FrameworkContext, Event};
|
|
||||||
use poise::serenity_prelude::{Context, Mentionable, Message, RoleId};
|
|
||||||
use rand::rngs::SmallRng;
|
|
||||||
use rand::{Rng, SeedableRng};
|
|
||||||
|
|
||||||
use crate::badgey::models::xp::{Rank, Xp};
|
|
||||||
|
|
||||||
|
|
||||||
pub struct BadgeyHandler {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#[async_trait]
|
|
||||||
impl EventHandler for BadgeyHandler {
|
|
||||||
async fn listen(ctx: &Context, framework_ctx: FrameworkContext<'_, ManifoldData, ManifoldError>, event: &Event<'_>) -> ManifoldResult<()> {
|
|
||||||
Handler::listen(ctx, framework_ctx, event).await?;
|
|
||||||
|
|
||||||
match event {
|
|
||||||
Event::Message { new_message } => BadgeyHandler::message(&ctx, &framework_ctx, new_message).await,
|
|
||||||
_ => Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl BadgeyHandler {
|
|
||||||
pub async fn message(ctx: &Context, fctx: &FrameworkContext<'_, ManifoldData, ManifoldError>, msg: &Message) -> ManifoldResult<()> {
|
|
||||||
if msg.author.id == ctx.http.get_current_user().await?.id || msg.content.starts_with(&fctx.user_data().await.bot_config.prefix) {
|
|
||||||
return Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
let db = &fctx.user_data().await.database;
|
|
||||||
let mut rng = SmallRng::from_entropy();
|
|
||||||
let xp_reward = rng.gen_range(1..30).clone();
|
|
||||||
drop(rng);
|
|
||||||
let user_id_i64 = msg.author.id.as_u64().clone() as i64;
|
|
||||||
|
|
||||||
let mut xp = match Xp::get(db, &user_id_i64) {
|
|
||||||
Ok(x) => x,
|
|
||||||
Err(_) => Xp::new(&user_id_i64)
|
|
||||||
};
|
|
||||||
|
|
||||||
let valid = match xp.last_given_xp {
|
|
||||||
Some(t) => {
|
|
||||||
if (chrono::Utc::now().timestamp() - 60) > t {
|
|
||||||
true
|
|
||||||
} else {
|
|
||||||
false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
None => true
|
|
||||||
};
|
|
||||||
|
|
||||||
if valid {
|
|
||||||
xp.last_given_xp = Some(chrono::Utc::now().timestamp());
|
|
||||||
xp.xp_value += &xp_reward;
|
|
||||||
let calculated_level = xp.get_level_from_xp();
|
|
||||||
if (xp.user_current_level != calculated_level) || xp.user_current_level == 1 {
|
|
||||||
if let Some(guild) = msg.guild(&ctx.cache) {
|
|
||||||
let mut member = guild.member(&ctx, msg.author.id).await?;
|
|
||||||
let old_role_id = RoleId::from(Rank::get_rank_for_level(db, &xp.user_current_level, &xp.rank_track).unwrap_or(Rank::new()).role_id as u64);
|
|
||||||
xp.user_current_level = calculated_level;
|
|
||||||
let new_role = RoleId::from(Rank::get_rank_for_level(db, &calculated_level, &xp.rank_track)?.role_id as u64);
|
|
||||||
|
|
||||||
if (new_role != old_role_id || xp.user_current_level == 1) && msg.author.has_role(ctx, guild.id, new_role).await? == false {
|
|
||||||
member.remove_role(ctx, old_role_id).await?;
|
|
||||||
member.add_role(ctx, new_role).await?;
|
|
||||||
|
|
||||||
msg.channel_id.say(ctx, format!("{} is now a {}", msg.author.mention(), new_role.mention())).await?;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
error!("Needed to add level to user, but couldn't get the member from the guild!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
xp.insert(db)?;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +1,15 @@
|
||||||
use clap::ArgMatches;
|
use clap::ArgMatches;
|
||||||
use poise::serenity_prelude::GatewayIntents;
|
use poise::serenity_prelude::GatewayIntents;
|
||||||
use crate::built_info;
|
use crate::built_info;
|
||||||
use diesel_migrations::{embed_migrations, EmbeddedMigrations};
|
|
||||||
|
|
||||||
use events::BadgeyHandler;
|
|
||||||
|
|
||||||
mod commands;
|
mod commands;
|
||||||
mod events;
|
|
||||||
mod models;
|
|
||||||
mod schema;
|
|
||||||
|
|
||||||
pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!("migrations");
|
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
pub async fn run(arguments: ArgMatches) {
|
pub async fn run(arguments: ArgMatches) {
|
||||||
let git_info: String = built_info::GIT_VERSION.unwrap_or("unknown").to_string();
|
let git_info: String = built_info::GIT_VERSION.unwrap_or("unknown").to_string();
|
||||||
let version_string = format!("Badgey Bot version {ver} built at {time} from revision {rev}", ver=built_info::PKG_VERSION, time=built_info::BUILT_TIME_UTC, rev=git_info);
|
let version_string = format!("Badgey Bot version {ver} built at {time} from revision {rev}", ver=built_info::PKG_VERSION, time=built_info::BUILT_TIME_UTC, rev=git_info);
|
||||||
|
|
||||||
let client = match manifold::prepare_client::<BadgeyHandler>(arguments, GatewayIntents::all(), commands::collect_commands(), version_string, MIGRATIONS).await {
|
let client = match manifold::prepare_client(arguments, GatewayIntents::all(), commands::collect_commands(), version_string).await {
|
||||||
Ok(c) => c,
|
Ok(c) => c,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
error!("Error preparing client; {:?}", e);
|
error!("Error preparing client; {:?}", e);
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
pub mod xp;
|
|
||||||
|
|
@ -1,167 +0,0 @@
|
||||||
use built::chrono;
|
|
||||||
use diesel::prelude::*;
|
|
||||||
use diesel::insert_into;
|
|
||||||
use manifold::Db;
|
|
||||||
use manifold::error::{ManifoldError, ManifoldResult};
|
|
||||||
use manifold::models::user::UserInfo;
|
|
||||||
use manifold::schema::userinfo;
|
|
||||||
|
|
||||||
use crate::badgey::schema::xp as xp_table;
|
|
||||||
use crate::badgey::schema::*;
|
|
||||||
|
|
||||||
#[derive(Queryable, Selectable, Identifiable, Insertable, AsChangeset, Associations, Debug, PartialEq, Clone)]
|
|
||||||
#[diesel(belongs_to(UserInfo, foreign_key = user_id))]
|
|
||||||
#[diesel(table_name = xp_table)]
|
|
||||||
#[diesel(primary_key(user_id))]
|
|
||||||
pub struct Xp {
|
|
||||||
pub user_id: i64,
|
|
||||||
pub user_current_level: i32,
|
|
||||||
pub xp_value: i64,
|
|
||||||
pub last_given_xp: Option<i64>,
|
|
||||||
pub rank_track: i32,
|
|
||||||
pub rank_track_last_changed: Option<i64>,
|
|
||||||
pub freeze_rank: Option<i64>,
|
|
||||||
pub freeze_rank_last_changed: Option<i64>
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Queryable, Selectable, Identifiable, Debug, Clone)]
|
|
||||||
#[diesel(primary_key(role_id))]
|
|
||||||
pub struct Rank {
|
|
||||||
pub role_id: i64,
|
|
||||||
pub required_level: i32,
|
|
||||||
pub rank_track: i32,
|
|
||||||
pub rank_name: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Queryable, Selectable, Identifiable, Debug, Clone)]
|
|
||||||
#[diesel(primary_key(track_id))]
|
|
||||||
pub struct Track {
|
|
||||||
pub track_id: i32,
|
|
||||||
pub track_name: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Xp {
|
|
||||||
pub fn new(user_id: &i64) -> Self {
|
|
||||||
Self {
|
|
||||||
user_id: user_id.clone(),
|
|
||||||
user_current_level: 0,
|
|
||||||
xp_value: 0,
|
|
||||||
last_given_xp: None,
|
|
||||||
rank_track: 0,
|
|
||||||
rank_track_last_changed: None,
|
|
||||||
freeze_rank: None,
|
|
||||||
freeze_rank_last_changed: None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn get(conn: &Db, needle: &i64) -> ManifoldResult<Self> {
|
|
||||||
let user = userinfo::table
|
|
||||||
.filter(userinfo::user_id.eq(needle))
|
|
||||||
.select(UserInfo::as_select())
|
|
||||||
.get_result(&mut conn.get()?)?;
|
|
||||||
|
|
||||||
Ok(Xp::belonging_to(&user)
|
|
||||||
.select(Xp::as_select())
|
|
||||||
.get_result(&mut conn.get()?)?)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn insert(&self, conn: &Db) -> ManifoldResult<usize> {
|
|
||||||
insert_into(xp_table::dsl::xp)
|
|
||||||
.values(self)
|
|
||||||
.on_conflict(xp_table::user_id)
|
|
||||||
.do_update()
|
|
||||||
.set(self)
|
|
||||||
.execute(&mut conn.get()?)
|
|
||||||
.map_err(|e| ManifoldError::from(e))
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn get_level_from_xp(&self) -> i32 {
|
|
||||||
(0.125 * f64::sqrt(self.xp_value.clone() as f64)) as i32
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn get_xp_to_next_level(&self) -> i64 {
|
|
||||||
let current_level = self.get_level_from_xp();
|
|
||||||
let target_level = current_level + 1;
|
|
||||||
|
|
||||||
(target_level as f32 / 0.125).powi(2) as i64 - &self.xp_value
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn get_xp_to_next_rank(&self, conn: &Db) -> ManifoldResult<i64> {
|
|
||||||
let current_level = self.get_level_from_xp();
|
|
||||||
let target_level = Rank::get_next_rank_for_level(conn, ¤t_level, &self.rank_track)?.required_level;
|
|
||||||
|
|
||||||
Ok((target_level as f32 / 0.125).powi(2) as i64 - &self.xp_value)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn check_timeout(value: &Option<i64>, timeout: &i64) -> ManifoldResult<()> {
|
|
||||||
if let Some(v) = value {
|
|
||||||
if v > &(chrono::Utc::now().timestamp() - timeout) {
|
|
||||||
let timeuntil = v - (chrono::Utc::now().timestamp() - timeout);
|
|
||||||
Err(format!("You are on cooldown. Try again in {} seconds.", timeuntil))?;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Rank {
|
|
||||||
pub fn new() -> Self {
|
|
||||||
Self {
|
|
||||||
role_id: 0,
|
|
||||||
required_level: 0,
|
|
||||||
rank_track: 0,
|
|
||||||
rank_name: "unranked".to_string(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn get_rank_for_level(conn: &Db, level: &i32, track: &i32) -> ManifoldResult<Self> {
|
|
||||||
Ok(ranks::table
|
|
||||||
.filter(ranks::required_level.le(level))
|
|
||||||
.filter(ranks::rank_track.eq(track))
|
|
||||||
.order(ranks::required_level.desc())
|
|
||||||
.limit(1)
|
|
||||||
.get_result(&mut conn.get()?)?
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn get_next_rank_for_level(conn: &Db, level: &i32, track: &i32) -> ManifoldResult<Self> {
|
|
||||||
Ok(ranks::table
|
|
||||||
.filter(ranks::required_level.gt(level))
|
|
||||||
.filter(ranks::rank_track.eq(track))
|
|
||||||
.order(ranks::required_level.asc())
|
|
||||||
.limit(1)
|
|
||||||
.get_result(&mut conn.get()?)?
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn get_rank_by_name(conn: &Db, needle: &String, track: &i32) -> ManifoldResult<Rank> {
|
|
||||||
Ok(ranks::table
|
|
||||||
.filter(ranks::rank_name.like(needle.trim().to_lowercase()))
|
|
||||||
.filter(ranks::rank_track.eq(track))
|
|
||||||
.order(ranks::required_level.desc())
|
|
||||||
.limit(1)
|
|
||||||
.get_result(&mut conn.get()?)?
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Track {
|
|
||||||
pub fn get_track_by_name(conn: &Db, needle: &String) -> ManifoldResult<Track> {
|
|
||||||
Ok(tracks::table
|
|
||||||
.filter(tracks::track_name.like(needle.trim().to_lowercase()))
|
|
||||||
.select(Track::as_select())
|
|
||||||
.limit(1)
|
|
||||||
.get_result(&mut conn.get()?)?
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn get_track_by_id(conn: &Db, needle: &i32) -> ManifoldResult<Track> {
|
|
||||||
Ok(tracks::table
|
|
||||||
.filter(tracks::track_id.eq(needle))
|
|
||||||
.select(Track::as_select())
|
|
||||||
.limit(1)
|
|
||||||
.get_result(&mut conn.get()?)?
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
// @generated automatically by Diesel CLI.
|
|
||||||
|
|
||||||
diesel::table! {
|
|
||||||
ranks (role_id) {
|
|
||||||
role_id -> BigInt,
|
|
||||||
required_level -> Integer,
|
|
||||||
rank_track -> Integer,
|
|
||||||
rank_name -> Text,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
diesel::table! {
|
|
||||||
tracks (track_id) {
|
|
||||||
track_id -> Integer,
|
|
||||||
track_name -> Text,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
diesel::table! {
|
|
||||||
userinfo (user_id) {
|
|
||||||
user_id -> BigInt,
|
|
||||||
username -> Text,
|
|
||||||
weather_location -> Nullable<Text>,
|
|
||||||
weather_units -> Nullable<Text>,
|
|
||||||
timezone -> Nullable<Text>,
|
|
||||||
last_seen -> Nullable<BigInt>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
diesel::table! {
|
|
||||||
xp (user_id) {
|
|
||||||
user_id -> BigInt,
|
|
||||||
user_current_level -> Integer,
|
|
||||||
xp_value -> BigInt,
|
|
||||||
last_given_xp -> Nullable<BigInt>,
|
|
||||||
rank_track -> Integer,
|
|
||||||
rank_track_last_changed -> Nullable<BigInt>,
|
|
||||||
freeze_rank -> Nullable<BigInt>,
|
|
||||||
freeze_rank_last_changed -> Nullable<BigInt>,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
diesel::joinable!(xp -> userinfo (user_id));
|
|
||||||
|
|
||||||
diesel::allow_tables_to_appear_in_same_query!(
|
|
||||||
ranks,
|
|
||||||
tracks,
|
|
||||||
userinfo,
|
|
||||||
xp,
|
|
||||||
);
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
#![feature(string_remove_matches)]
|
#![feature(string_remove_matches)]
|
||||||
|
|
||||||
|
extern crate diesel;
|
||||||
|
extern crate diesel_migrations;
|
||||||
#[macro_use] extern crate log;
|
#[macro_use] extern crate log;
|
||||||
|
|
||||||
pub mod badgey;
|
pub mod badgey;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue