1 Commits

Author SHA1 Message Date
8b5a462fc4 Update Rust crate serde_json to v1.0.131
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2024-10-19 00:29:14 +00:00
32 changed files with 1700 additions and 2125 deletions

View File

@@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
version = 3
[[package]]
name = "actix"
@@ -492,34 +492,24 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.94"
version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7"
[[package]]
name = "arbitrary"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223"
dependencies = [
"derive_arbitrary",
]
checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6"
[[package]]
name = "asn1"
version = "0.20.0"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d8b84b4ea1de2bf1dcd2a759737ddb328fb6695b2a95eb7e44fed67e3406f32"
checksum = "147a10032de7d9e6f21c3f1cb1c9c0f94cf30ef67f38310588fe6cfa53e0d3f0"
dependencies = [
"asn1_derive",
"itoa",
]
[[package]]
name = "asn1_derive"
version = "0.20.0"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a200809d0138620b3dba989f1d08d0620e76248bc1e62a2ec1b2df5eb1ee08ad"
checksum = "3df30ecdcaf8338675a1413460a1b11df89789e1fcc6a10dc52f6e38b6982aa2"
dependencies = [
"proc-macro2",
"quote",
@@ -653,32 +643,11 @@ dependencies = [
"bytes",
]
[[package]]
name = "bzip2"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8"
dependencies = [
"bzip2-sys",
"libc",
]
[[package]]
name = "bzip2-sys"
version = "0.1.11+1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc"
dependencies = [
"cc",
"libc",
"pkg-config",
]
[[package]]
name = "cc"
version = "1.1.31"
version = "1.1.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f"
checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945"
dependencies = [
"jobserver",
"libc",
@@ -687,7 +656,7 @@ dependencies = [
[[package]]
name = "central_backend"
version = "1.0.2"
version = "0.1.0"
dependencies = [
"actix",
"actix-cors",
@@ -701,7 +670,6 @@ dependencies = [
"bincode",
"chrono",
"clap",
"dotenvy",
"env_logger",
"foreign-types-shared",
"fs4",
@@ -723,12 +691,10 @@ dependencies = [
"serde",
"serde_json",
"serde_yml",
"thiserror 2.0.8",
"thiserror",
"tokio",
"tokio_schedule",
"uuid",
"walkdir",
"zip",
]
[[package]]
@@ -739,9 +705,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.39"
version = "0.4.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
dependencies = [
"android-tzdata",
"iana-time-zone",
@@ -763,9 +729,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.5.23"
version = "4.5.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84"
checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8"
dependencies = [
"clap_builder",
"clap_derive",
@@ -773,9 +739,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.5.23"
version = "4.5.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838"
checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54"
dependencies = [
"anstream",
"anstyle",
@@ -797,9 +763,9 @@ dependencies = [
[[package]]
name = "clap_lex"
version = "0.7.4"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
[[package]]
name = "colorchoice"
@@ -807,12 +773,6 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
[[package]]
name = "constant_time_eq"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6"
[[package]]
name = "convert_case"
version = "0.4.0"
@@ -862,21 +822,6 @@ dependencies = [
"libc",
]
[[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.4.2"
@@ -977,12 +922,6 @@ dependencies = [
"syn",
]
[[package]]
name = "deflate64"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b"
[[package]]
name = "deranged"
version = "0.3.11"
@@ -992,17 +931,6 @@ dependencies = [
"powerfmt",
]
[[package]]
name = "derive_arbitrary"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "derive_more"
version = "0.99.18"
@@ -1069,23 +997,6 @@ dependencies = [
"winapi",
]
[[package]]
name = "displaydoc"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "dotenvy"
version = "0.15.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"
[[package]]
name = "encode_unicode"
version = "1.0.0"
@@ -1188,9 +1099,9 @@ dependencies = [
[[package]]
name = "fs4"
version = "0.12.0"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c29c30684418547d476f0b48e84f4821639119c483b1eccd566c8cd0cd05f521"
checksum = "ec6fcfb3c0c1d71612528825042261419d5dade9678c39a781e05b63677d9b32"
dependencies = [
"rustix",
"windows-sys 0.52.0",
@@ -1469,9 +1380,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hyper"
version = "1.5.0"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a"
checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05"
dependencies = [
"bytes",
"futures-channel",
@@ -1580,9 +1491,9 @@ dependencies = [
[[package]]
name = "impl-more"
version = "0.1.8"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aae21c3177a27788957044151cc2800043d127acaa460a47ebb9b84dfa2c6aa0"
checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d"
[[package]]
name = "indexmap"
@@ -1702,9 +1613,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "libc"
version = "0.2.169"
version = "0.2.161"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1"
[[package]]
name = "libredox"
@@ -1759,28 +1670,12 @@ dependencies = [
"scopeguard",
]
[[package]]
name = "lockfree-object-pool"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e"
[[package]]
name = "log"
version = "0.4.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
[[package]]
name = "lzma-rs"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e"
dependencies = [
"byteorder",
"crc",
]
[[package]]
name = "memchr"
version = "2.7.4"
@@ -1976,16 +1871,6 @@ version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "pbkdf2"
version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
dependencies = [
"digest",
"hmac",
]
[[package]]
name = "pem"
version = "3.0.4"
@@ -2063,9 +1948,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.88"
version = "1.0.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9"
checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a"
dependencies = [
"unicode-ident",
]
@@ -2126,7 +2011,7 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
dependencies = [
"getrandom",
"libredox",
"thiserror 1.0.69",
"thiserror",
]
[[package]]
@@ -2166,9 +2051,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
name = "reqwest"
version = "0.12.9"
version = "0.12.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f"
checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b"
dependencies = [
"base64 0.22.1",
"bytes",
@@ -2286,9 +2171,9 @@ dependencies = [
[[package]]
name = "rustls"
version = "0.23.15"
version = "0.23.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993"
checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8"
dependencies = [
"once_cell",
"rustls-pki-types",
@@ -2308,9 +2193,9 @@ dependencies = [
[[package]]
name = "rustls-pki-types"
version = "1.10.0"
version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b"
checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55"
[[package]]
name = "rustls-webpki"
@@ -2384,27 +2269,27 @@ dependencies = [
[[package]]
name = "semver"
version = "1.0.24"
version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba"
checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
dependencies = [
"serde",
]
[[package]]
name = "serde"
version = "1.0.216"
version = "1.0.210"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e"
checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.216"
version = "1.0.210"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
dependencies = [
"proc-macro2",
"quote",
@@ -2413,9 +2298,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.133"
version = "1.0.131"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
checksum = "67d42a0bd4ac281beff598909bb56a86acaf979b84483e1c79c10dcaf98f8cf3"
dependencies = [
"itoa",
"memchr",
@@ -2496,12 +2381,6 @@ dependencies = [
"libc",
]
[[package]]
name = "simd-adler32"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
[[package]]
name = "simple_asn1"
version = "0.6.2"
@@ -2510,7 +2389,7 @@ checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085"
dependencies = [
"num-bigint",
"num-traits",
"thiserror 1.0.69",
"thiserror",
"time",
]
@@ -2559,9 +2438,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "syn"
version = "2.0.87"
version = "2.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590"
dependencies = [
"proc-macro2",
"quote",
@@ -2624,38 +2503,18 @@ dependencies = [
[[package]]
name = "thiserror"
version = "1.0.69"
version = "1.0.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84"
dependencies = [
"thiserror-impl 1.0.69",
]
[[package]]
name = "thiserror"
version = "2.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08f5383f3e0071702bf93ab5ee99b52d26936be9dedd9413067cbdcddcb6141a"
dependencies = [
"thiserror-impl 2.0.8",
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.69"
version = "1.0.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "thiserror-impl"
version = "2.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2f357fcec90b3caef6623a099691be676d033b40a058ac95d2a6ade6fa0c943"
checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3"
dependencies = [
"proc-macro2",
"quote",
@@ -2710,9 +2569,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.42.0"
version = "1.40.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551"
checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998"
dependencies = [
"backtrace",
"bytes",
@@ -2832,9 +2691,12 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
[[package]]
name = "unicase"
version = "2.8.0"
version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df"
checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89"
dependencies = [
"version_check",
]
[[package]]
name = "unicode-bidi"
@@ -2904,9 +2766,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "uuid"
version = "1.11.0"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a"
checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314"
dependencies = [
"getrandom",
"serde",
@@ -3210,63 +3072,6 @@ name = "zeroize"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
dependencies = [
"zeroize_derive",
]
[[package]]
name = "zeroize_derive"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "zip"
version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99d52293fc86ea7cf13971b3bb81eb21683636e7ae24c729cdaf1b7c4157a352"
dependencies = [
"aes",
"arbitrary",
"bzip2",
"constant_time_eq",
"crc32fast",
"crossbeam-utils",
"deflate64",
"displaydoc",
"flate2",
"hmac",
"indexmap",
"lzma-rs",
"memchr",
"pbkdf2",
"rand",
"sha1",
"thiserror 2.0.8",
"time",
"zeroize",
"zopfli",
"zstd",
]
[[package]]
name = "zopfli"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946"
dependencies = [
"bumpalo",
"crc32fast",
"lockfree-object-pool",
"log",
"once_cell",
"simd-adler32",
]
[[package]]
name = "zstd"

View File

@@ -1,35 +1,34 @@
[package]
name = "central_backend"
version = "1.0.2"
version = "0.1.0"
edition = "2021"
[dependencies]
log = "0.4.22"
env_logger = "0.11.5"
lazy_static = "1.5.0"
dotenvy = "0.15.7"
clap = { version = "4.5.20", features = ["derive", "env"] }
anyhow = "1.0.89"
thiserror = "2.0.3"
thiserror = "1.0.64"
openssl = { version = "0.10.66" }
openssl-sys = "0.9.102"
libc = "0.2.159"
foreign-types-shared = "0.1.1"
asn1 = "0.20"
asn1 = "0.17"
actix-web = { version = "4", features = ["openssl"] }
futures = "0.3.31"
serde = { version = "1.0.215", features = ["derive"] }
serde = { version = "1.0.210", features = ["derive"] }
reqwest = { version = "0.12.7", features = ["json"] }
serde_json = "1.0.131"
serde_json = "1.0.128"
rand = "0.8.5"
actix = "0.13.5"
actix-identity = "0.8.0"
actix-session = { version = "0.10.1", features = ["cookie-session"] }
actix-cors = "0.7.0"
actix-multipart = { version = "0.7.2", features = ["derive"] }
actix-multipart = { version ="0.7.2", features = ["derive"] }
actix-remote-ip = "0.1.0"
futures-util = "0.3.31"
uuid = { version = "1.11.0", features = ["v4", "serde"] }
uuid = { version = "1.10.0", features = ["v4", "serde"] }
semver = { version = "1.0.23", features = ["serde"] }
lazy-regex = "3.3.0"
tokio = { version = "1.40.0", features = ["full"] }
@@ -41,6 +40,4 @@ prettytable-rs = "0.10.0"
chrono = "0.4.38"
serde_yml = "0.0.12"
bincode = "=2.0.0-rc.3"
fs4 = { version = "0.12.0", features = ["sync"] }
zip = { version = "2.2.0", features = ["bzip2"] }
walkdir = "2.5.0"
fs4 = { version = "0.10.0", features = ["sync"] }

View File

@@ -10,7 +10,7 @@ pub enum ConsumptionHistoryType {
}
/// Electrical consumption fetcher backend
#[derive(Subcommand, Debug, Clone, serde::Serialize)]
#[derive(Subcommand, Debug, Clone)]
pub enum ConsumptionBackend {
/// Constant consumption value
Constant {
@@ -39,17 +39,13 @@ pub enum ConsumptionBackend {
/// Fronius inverter consumption
Fronius {
/// The origin of the domain where the webserver of the Fronius Symo can be reached
#[clap(short, long, env)]
fronius_orig: String,
/// Use cURL instead of reqwest to perform request
#[clap(short, long)]
curl: bool,
#[clap(short, long, env = "FRONIUS_ORIG")]
origin: String,
},
}
/// Solar system central backend
#[derive(Parser, Debug, serde::Serialize)]
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
pub struct AppConfig {
/// Read arguments from env file
@@ -110,18 +106,6 @@ pub struct AppConfig {
#[arg(short('f'), long, env, default_value_t = 5)]
pub energy_fetch_interval: u64,
/// Custom current consumption title in dashboard
#[arg(long, env)]
pub dashboard_custom_current_consumption_title: Option<String>,
/// Custom relays consumption title in dashboard
#[arg(long, env)]
pub dashboard_custom_relays_consumption_title: Option<String>,
/// Custom cached consumption title in dashboard
#[arg(long, env)]
pub dashboard_custom_cached_consumption_title: Option<String>,
/// Consumption backend provider
#[clap(subcommand)]
pub consumption_backend: Option<ConsumptionBackend>,

View File

@@ -120,7 +120,7 @@ enum GenCertificatSubjectReq<'a> {
CSR { csr: &'a X509Req },
}
impl Default for GenCertificatSubjectReq<'_> {
impl<'a> Default for GenCertificatSubjectReq<'a> {
fn default() -> Self {
Self::Subject { cn: "" }
}

View File

@@ -9,8 +9,6 @@ pub enum ConsumptionError {
NonExistentFile,
#[error("The file that should contain the consumption has an invalid content!")]
FileInvalidContent(#[source] ParseIntError),
#[error("Failed to execute cURL request!")]
CurlReqFailed,
}
pub type EnergyConsumption = i32;
@@ -65,25 +63,9 @@ pub async fn get_curr_consumption() -> anyhow::Result<EnergyConsumption> {
.map_err(ConsumptionError::FileInvalidContent)?)
}
ConsumptionBackend::Fronius { fronius_orig, curl } => {
let url = format!("{fronius_orig}/solar_api/v1/GetPowerFlowRealtimeData.fcgi");
let response = match curl {
false => reqwest::get(url).await?.json::<FroniusResponse>().await?,
true => {
let res = std::process::Command::new("curl")
.arg("--connect-timeout")
.arg("1.5")
.arg(url)
.output()?;
if !res.status.success() {
return Err(ConsumptionError::CurlReqFailed.into());
}
serde_json::from_slice::<FroniusResponse>(&res.stdout)?
}
};
ConsumptionBackend::Fronius { origin } => {
let url = format!("{origin}/solar_api/v1/GetPowerFlowRealtimeData.fcgi");
let response = reqwest::get(url).await?.json::<FroniusResponse>().await?;
Ok(response.body.data.site.grid_production as i32)
}

View File

@@ -25,14 +25,7 @@ impl EnergyActor {
pub async fn new() -> anyhow::Result<Self> {
let consumption_cache_size =
AppConfig::get().refresh_interval / AppConfig::get().energy_fetch_interval;
let curr_consumption = match consumption::get_curr_consumption().await {
Ok(v) => v,
Err(e) => {
log::warn!("Failed to fetch consumption, using default value! {e}");
constants::FALLBACK_PRODUCTION_VALUE
}
};
log::info!("Initial consumption value: {curr_consumption}");
let curr_consumption = consumption::get_curr_consumption().await?;
let mut consumption_cache = ConsumptionCache::new(consumption_cache_size as usize);
consumption_cache.add_value(curr_consumption);

View File

@@ -4,7 +4,6 @@ use actix_web::HttpResponse;
use std::error::Error;
use std::fmt::{Display, Formatter};
use std::io::ErrorKind;
use zip::result::ZipError;
/// Custom error to ease controller writing
#[derive(Debug)]
@@ -110,18 +109,6 @@ impl From<openssl::error::ErrorStack> for HttpErr {
}
}
impl From<ZipError> for HttpErr {
fn from(value: ZipError) -> Self {
HttpErr::Err(std::io::Error::new(ErrorKind::Other, value.to_string()).into())
}
}
impl From<walkdir::Error> for HttpErr {
fn from(value: walkdir::Error) -> Self {
HttpErr::Err(std::io::Error::new(ErrorKind::Other, value.to_string()).into())
}
}
impl From<HttpResponse> for HttpErr {
fn from(value: HttpResponse) -> Self {
HttpErr::HTTPResponse(value)

View File

@@ -243,11 +243,6 @@ pub async fn secure_server(energy_actor: EnergyActorAddr) -> anyhow::Result<()>
"/web_api/relay/{id}/status",
web::get().to(relays_controller::status_single),
)
// Management API
.route(
"/web_api/management/download_storage",
web::get().to(management_controller::download_storage),
)
// Devices API
.route(
"/devices_api/utils/time",

View File

@@ -9,20 +9,14 @@ use actix_web::HttpResponse;
#[derive(serde::Serialize)]
struct Consumption {
consumption: Option<i32>,
consumption: i32,
}
/// Get current energy consumption
pub async fn curr_consumption() -> HttpResult {
Ok(match consumption::get_curr_consumption().await {
Ok(v) => HttpResponse::Ok().json(Consumption {
consumption: Some(v),
}),
Err(e) => {
log::error!("Failed to fetch current consumption! {e}");
HttpResponse::Ok().json(Consumption { consumption: None })
}
})
let consumption = consumption::get_curr_consumption().await?;
Ok(HttpResponse::Ok().json(Consumption { consumption }))
}
/// Get curr consumption history
@@ -40,9 +34,7 @@ pub async fn curr_consumption_history() -> HttpResult {
pub async fn cached_consumption(energy_actor: WebEnergyActor) -> HttpResult {
let consumption = energy_actor.send(energy_actor::GetCurrConsumption).await?;
Ok(HttpResponse::Ok().json(Consumption {
consumption: Some(consumption),
}))
Ok(HttpResponse::Ok().json(Consumption { consumption }))
}
/// Get current relays consumption
@@ -50,9 +42,7 @@ pub async fn relays_consumption(energy_actor: WebEnergyActor) -> HttpResult {
let consumption =
energy_actor.send(energy_actor::RelaysConsumption).await? as EnergyConsumption;
Ok(HttpResponse::Ok().json(Consumption {
consumption: Some(consumption),
}))
Ok(HttpResponse::Ok().json(Consumption { consumption }))
}
pub async fn relays_consumption_history() -> HttpResult {

View File

@@ -1,66 +0,0 @@
use crate::app_config::AppConfig;
use crate::server::custom_error::HttpResult;
use crate::utils::time_utils::current_day;
use actix_web::HttpResponse;
use anyhow::Context;
use std::fs::File;
use std::io::{Cursor, Read, Write};
use walkdir::WalkDir;
use zip::write::SimpleFileOptions;
/// Download a full copy of the storage data
pub async fn download_storage() -> HttpResult {
let mut zip_buff = Cursor::new(Vec::new());
let mut zip = zip::ZipWriter::new(&mut zip_buff);
let options = SimpleFileOptions::default()
.compression_method(zip::CompressionMethod::Bzip2)
.unix_permissions(0o700);
let storage = AppConfig::get().storage_path();
let mut file_buff = Vec::new();
for entry in WalkDir::new(&storage) {
let entry = entry?;
let path = entry.path();
let name = path.strip_prefix(&storage).unwrap();
let path_as_string = name
.to_str()
.map(str::to_owned)
.with_context(|| format!("{name:?} Is a Non UTF-8 Path"))?;
// Write file or directory explicitly
// Some unzip tools unzip files with directory paths correctly, some do not!
if path.is_file() {
log::debug!("adding file {path:?} as {name:?} ...");
zip.start_file(path_as_string, options)?;
let mut f = File::open(path)?;
f.read_to_end(&mut file_buff)?;
zip.write_all(&file_buff)?;
file_buff.clear();
} else if !name.as_os_str().is_empty() {
// Only if not root! Avoids path spec / warning
// and mapname conversion failed error on unzip
log::debug!("adding dir {path_as_string:?} as {name:?} ...");
zip.add_directory(path_as_string, options)?;
}
}
// Inject runtime configuration
zip.start_file("/app_config.json", options)?;
zip.write_all(&serde_json::to_vec_pretty(&AppConfig::get())?)?;
zip.finish()?;
let filename = format!("storage-{}.zip", current_day());
Ok(HttpResponse::Ok()
.content_type("application/zip")
.insert_header((
"content-disposition",
format!("attachment; filename=\"{filename}\""),
))
.body(zip_buff.into_inner()))
}

View File

@@ -2,7 +2,6 @@ pub mod auth_controller;
pub mod devices_controller;
pub mod energy_controller;
pub mod logging_controller;
pub mod management_controller;
pub mod ota_controller;
pub mod relays_controller;
pub mod server_controller;

View File

@@ -13,10 +13,6 @@ struct ServerConfig {
auth_disabled: bool,
constraints: StaticConstraints,
unsecure_origin: String,
backend_version: &'static str,
dashboard_custom_current_consumption_title: Option<&'static str>,
dashboard_custom_relays_consumption_title: Option<&'static str>,
dashboard_custom_cached_consumption_title: Option<&'static str>,
}
impl Default for ServerConfig {
@@ -25,16 +21,6 @@ impl Default for ServerConfig {
auth_disabled: AppConfig::get().unsecure_disable_login,
constraints: Default::default(),
unsecure_origin: AppConfig::get().unsecure_origin(),
backend_version: env!("CARGO_PKG_VERSION"),
dashboard_custom_current_consumption_title: AppConfig::get()
.dashboard_custom_current_consumption_title
.as_deref(),
dashboard_custom_relays_consumption_title: AppConfig::get()
.dashboard_custom_relays_consumption_title
.as_deref(),
dashboard_custom_cached_consumption_title: AppConfig::get()
.dashboard_custom_cached_consumption_title
.as_deref(),
}
}
}

View File

@@ -41,12 +41,6 @@ pub fn time_start_of_day() -> anyhow::Result<u64> {
Ok(local.timestamp() as u64)
}
/// Get formatted string containing current day information
pub fn current_day() -> String {
let dt = Local::now();
format!("{}-{:0>2}-{:0>2}", dt.year(), dt.month(), dt.day())
}
#[cfg(test)]
mod test {
use crate::utils::time_utils::day_number;

File diff suppressed because it is too large Load Diff

View File

@@ -15,29 +15,29 @@
"@fontsource/roboto": "^5.1.0",
"@mdi/js": "^7.4.47",
"@mdi/react": "^1.6.1",
"@mui/icons-material": "^6.1.4",
"@mui/material": "^6.1.4",
"@mui/x-charts": "^7.21.0",
"@mui/x-date-pickers": "^7.21.0",
"@mui/icons-material": "^6.1.3",
"@mui/material": "^6.1.3",
"@mui/x-charts": "^7.20.0",
"@mui/x-date-pickers": "^7.20.0",
"@types/semver": "^7.5.8",
"date-and-time": "^3.6.0",
"dayjs": "^1.11.13",
"filesize": "^10.1.6",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^7.0.0",
"react-router-dom": "^6.27.0",
"semver": "^7.6.3"
},
"devDependencies": {
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.1",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.10.0",
"@typescript-eslint/eslint-plugin": "^8.8.0",
"@typescript-eslint/parser": "^8.8.0",
"@vitejs/plugin-react": "^4.3.2",
"eslint": "^9.0.0",
"eslint": "^8.57.1",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.12",
"typescript": "^5.6.3",
"vite": "^5.4.9"
"vite": "^5.4.8"
}
}

View File

@@ -16,7 +16,6 @@ import { PendingDevicesRoute } from "./routes/PendingDevicesRoute";
import { RelaysListRoute } from "./routes/RelaysListRoute";
import { BaseAuthenticatedPage } from "./widgets/BaseAuthenticatedPage";
import { OTARoute } from "./routes/OTARoute";
import { ManagementRoute } from "./routes/ManagementRoute";
export function App() {
if (!AuthApi.SignedIn && !ServerApi.Config.auth_disabled)
@@ -32,7 +31,6 @@ export function App() {
<Route path="relays" element={<RelaysListRoute />} />
<Route path="ota" element={<OTARoute />} />
<Route path="logs" element={<LogsRoute />} />
<Route path="management" element={<ManagementRoute />} />
<Route path="*" element={<NotFoundRoute />} />
</Route>
)

View File

@@ -4,10 +4,6 @@ export interface ServerConfig {
auth_disabled: boolean;
constraints: ServerConstraint;
unsecure_origin: string;
backend_version: string;
dashboard_custom_current_consumption_title?: string;
dashboard_custom_relays_consumption_title?: string;
dashboard_custom_cached_consumption_title?: string;
}
export interface ServerConstraint {

View File

@@ -81,7 +81,7 @@ function ValidatedDevicesList(p: {
<Table sx={{ minWidth: 650 }} aria-label="simple table">
<TableHead>
<TableRow>
<TableCell>Name</TableCell>
<TableCell>#</TableCell>
<TableCell align="center">Model</TableCell>
<TableCell align="center">Version</TableCell>
<TableCell align="center">Max relays</TableCell>
@@ -99,7 +99,7 @@ function ValidatedDevicesList(p: {
onDoubleClick={() => navigate(DeviceURL(dev))}
>
<TableCell component="th" scope="row">
{dev.name}
{dev.id}
</TableCell>
<TableCell align="center">{dev.info.reference}</TableCell>
<TableCell align="center">{dev.info.version}</TableCell>

View File

@@ -2,7 +2,6 @@ import React from "react";
import { EnergyApi } from "../../api/EnergyApi";
import { useSnackbar } from "../../hooks/context_providers/SnackbarProvider";
import StatCard from "../../widgets/StatCard";
import { ServerApi } from "../../api/ServerApi";
export function CachedConsumptionWidget(): React.ReactElement {
const snackbar = useSnackbar();
@@ -27,12 +26,6 @@ export function CachedConsumptionWidget(): React.ReactElement {
});
return (
<StatCard
title={
ServerApi.Config.dashboard_custom_cached_consumption_title ??
"Cached consumption"
}
value={val?.toString() ?? "Loading"}
/>
<StatCard title="Cached consumption" value={val?.toString() ?? "Loading"} />
);
}

View File

@@ -2,7 +2,6 @@ import React from "react";
import { EnergyApi } from "../../api/EnergyApi";
import { useSnackbar } from "../../hooks/context_providers/SnackbarProvider";
import StatCard from "../../widgets/StatCard";
import { ServerApi } from "../../api/ServerApi";
export function CurrConsumptionWidget(): React.ReactElement {
const snackbar = useSnackbar();
@@ -30,10 +29,7 @@ export function CurrConsumptionWidget(): React.ReactElement {
return (
<StatCard
title={
ServerApi.Config.dashboard_custom_current_consumption_title ??
"Current consumption"
}
title="Current consumption"
data={history ?? []}
interval="Last day"
value={val?.toString() ?? "Loading"}

View File

@@ -2,7 +2,6 @@ import React from "react";
import { EnergyApi } from "../../api/EnergyApi";
import { useSnackbar } from "../../hooks/context_providers/SnackbarProvider";
import StatCard from "../../widgets/StatCard";
import { ServerApi } from "../../api/ServerApi";
export function RelayConsumptionWidget(): React.ReactElement {
const snackbar = useSnackbar();
@@ -30,10 +29,7 @@ export function RelayConsumptionWidget(): React.ReactElement {
return (
<StatCard
title={
ServerApi.Config.dashboard_custom_relays_consumption_title ??
"Relays consumption"
}
title="Relays consumption"
data={history ?? []}
interval="Last day"
value={val?.toString() ?? "Loading"}

View File

@@ -1,31 +0,0 @@
import { Button } from "@mui/material";
import { useConfirm } from "../hooks/context_providers/ConfirmDialogProvider";
import { SolarEnergyRouteContainer } from "../widgets/SolarEnergyRouteContainer";
import { APIClient } from "../api/ApiClient";
export function ManagementRoute(): React.ReactElement {
const confirm = useConfirm();
const downloadBackup = async () => {
try {
if (
!(await confirm(
`Do you really want to download a copy of the storage? It will contain sensitive information!`
))
)
return;
location.href = APIClient.backendURL() + "/management/download_storage";
} catch (e) {
console.error(`Failed to donwload a backup of the storage! Error: ${e}`);
}
};
return (
<SolarEnergyRouteContainer label="Management">
<Button variant="outlined" onClick={downloadBackup}>
Download a backup of storage
</Button>
</SolarEnergyRouteContainer>
);
}

View File

@@ -1,6 +1,5 @@
import {
mdiChip,
mdiCog,
mdiElectricSwitch,
mdiHome,
mdiMonitorArrowDown,
@@ -13,11 +12,9 @@ import {
ListItemButton,
ListItemIcon,
ListItemText,
Typography,
} from "@mui/material";
import { useLocation } from "react-router-dom";
import { RouterLink } from "./RouterLink";
import { ServerApi } from "../api/ServerApi";
export function SolarEnergyNavList(): React.ReactElement {
return (
@@ -55,18 +52,6 @@ export function SolarEnergyNavList(): React.ReactElement {
uri="/logs"
icon={<Icon path={mdiNotebookMultiple} size={1} />}
/>
<NavLink
label="Management"
uri="/management"
icon={<Icon path={mdiCog} size={1} />}
/>
<Typography
variant="caption"
component="div"
style={{ textAlign: "center", width: "100%", marginTop: "30px" }}
>
Version {ServerApi.Config.backend_version}
</Typography>
</List>
);
}

View File

@@ -21,7 +21,7 @@ export function timeDiff(a: number, b: number): string {
diff = Math.floor(diff / 60);
if (diff === 1) return "1 minute";
if (diff < 60) {
if (diff < 24) {
return `${diff} minutes`;
}

File diff suppressed because it is too large Load Diff

View File

@@ -7,6 +7,6 @@ edition = "2021"
env_logger = "0.11.5"
log = "0.4.22"
clap = { version = "4.5.18", features = ["derive", "env"] }
egui = "0.29.1"
eframe = "0.29.1"
egui = "0.28.1"
eframe = "0.28.1"
lazy_static = "1.5.0"

View File

@@ -1,6 +1,7 @@
use std::time::{SystemTime, UNIX_EPOCH};
/// Get the current time since epoch
pub fn time_millis() -> u128 {
SystemTime::now()
.duration_since(UNIX_EPOCH)

View File

@@ -1,7 +1,5 @@
# Configure project for production
Note: This guide assumes that you use the default hostname, `central.internal` as hostname for your central system.
## Create production build
### Central
@@ -46,70 +44,6 @@ The OTA update is then located in `build/main.bin`
* A server running a recent Linux (Debian / Ubuntu preferred) with `central` as hostname
* DHCP configured on the network
## Configure DNS server
If you need to setup a DNS server / proxy to point `central.internal` to the central server IP, you can follow this guide.
### Retrieve DNS server binary
Use [DNSProxy](https://gitlab.com/pierre42100/dnsproxy) as DNS server. Get and compile the sources:
```bash
git clone https://gitlab.com/pierre42100/dnsproxy
cd dnsproxy
cargo build --release
scp target/release/dns_proxy USER@CENTRAL_IP:/home/USER
```
Then, on the target server, install the binary to its final destination:
```bash
sudo mv dns_proxy /usr/local/bin/
```
### Configure DNS server
Configure the server as a service `/etc/systemd/system/dns.service`:
```conf
[Unit]
Description=DNS server
After=syslog.target
After=network.target
[Service]
RestartSec=2s
Type=simple
User=root
Group=root
WorkingDirectory=/tmp
ExecStart=/usr/local/bin/dns_proxy -l "CENTRAL_IP:53" -c "central.internal. A CENTRAL_IP"
Restart=always
[Install]
WantedBy=multi-user.target
```
Enable and start the new service:
```bash
sudo systemctl enable dns
sudo systemctl start dns
```
Check that it works correctly:
```bash
dig central.internal. @CENTRAL_IP
```
You should get an entry like this if it works:
```
;; ANSWER SECTION:
central.internal. 0 IN A CENTRAL_IP
```
Then, in your DHCP service, define the central as the DNS server.
## Configure server
### Create a user dedicated to the central
@@ -148,7 +82,7 @@ COOKIE_SECURE=true
LISTEN_ADDRESS=0.0.0.0:443
ADMIN_USERNAME=admin
ADMIN_PASSWORD=FIXME
HOSTNAME=central.internal
HOSTNAME=central.local
STORAGE=/home/central/storage
FRONIUS_ORIG=http://10.0.0.10
```
@@ -157,7 +91,7 @@ FRONIUS_ORIG=http://10.0.0.10
Run the following command to check if the configuration is working:
```bash
sudo -u central central_backend -c /home/central/config.yaml fronius -c
sudo -u central central_backend -c /home/central/config.yaml
```
### Create systemd unit file
@@ -175,7 +109,7 @@ Type=simple
User=central
Group=central
WorkingDirectory=/home/central
ExecStart=/usr/local/bin/central_backend -c /home/central/config.yaml fronius -c
ExecStart=/usr/local/bin/central_backend -c /home/central/config.yaml
Restart=always
Environment=USER=central
HOME=/home/central

View File

@@ -2,11 +2,6 @@
ESP32 client device, using `W32-ETH01` device
## Pins for relays
The pins are the following (in the order of definition): 4, 14, 15, 2
**WARNING!** The Pin 2 MUST be disconnect to reflash the card!
## Some commands
Create a new firmware build:

View File

@@ -8,7 +8,7 @@
/**
* Backend unsecure API URL
*/
#define BACKEND_UNSECURE_URL "http://central.internal:8080"
#define BACKEND_UNSECURE_URL "http://devweb.internal:8080"
/**
* Device name len

View File

@@ -9,7 +9,7 @@ static const char *TAG = "relays";
/**
* Device relays GPIO ids
*/
static int DEVICE_GPIO_IDS[4] = {4, 14, 15, 2};
static int DEVICE_GPIO_IDS[3] = {4, 14, 15};
int relays_count()
{

View File

@@ -1 +1 @@
1.0.2
1.0.0