From 0df34e2bd7e07dbc10161aafa34c724582b5c41d Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Wed, 8 Nov 2023 08:40:48 +0100 Subject: [PATCH] update packages --- Cargo.lock | 169 +++++++++++++++++---------------------- docs/api.md | 17 ++++ ffplayout-api/Cargo.toml | 2 +- lib/Cargo.toml | 2 +- tests/Cargo.toml | 2 +- 5 files changed, 94 insertions(+), 98 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a042ef9b..7a0d5851 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -64,7 +64,7 @@ dependencies = [ "actix-service", "actix-utils", "ahash", - "base64 0.21.5", + "base64", "bitflags 2.4.1", "brotli", "bytes", @@ -271,7 +271,7 @@ checksum = "1d613edf08a42ccc6864c941d30fe14e1b676a77d16f1dbadc1174d065a0a775" dependencies = [ "actix-utils", "actix-web", - "base64 0.21.5", + "base64", "futures-core", "futures-util", "log", @@ -613,12 +613,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.21.5" @@ -769,6 +763,16 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "chumsky" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eebd66744a15ded14960ab4ccdbfb51ad3b81f51f3f04a80adac98c985396c9" +dependencies = [ + "hashbrown 0.14.2", + "stacker", +] + [[package]] name = "chunked_transfer" version = "1.4.1" @@ -1079,7 +1083,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbfb21b9878cf7a348dcb8559109aabc0ec40d69924bd706fa5149846c4fef75" dependencies = [ - "base64 0.21.5", + "base64", "memchr", ] @@ -1106,9 +1110,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e" dependencies = [ "libc", "windows-sys", @@ -1462,9 +1466,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "libc", @@ -1694,16 +1698,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.4.0" @@ -1815,13 +1809,13 @@ dependencies = [ [[package]] name = "jsonwebtoken" -version = "8.3.0" +version = "9.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +checksum = "155c4d7e39ad04c172c5e3a99c434ea3b4a7ba7960b38ecd562b270b097cce09" dependencies = [ - "base64 0.21.5", + "base64", "pem", - "ring 0.16.20", + "ring", "serde", "serde_json", "simple_asn1", @@ -1873,25 +1867,27 @@ dependencies = [ [[package]] name = "lettre" -version = "0.10.4" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bd09637ae3ec7bd605b8e135e757980b3968430ff2b1a4a94fb7769e50166d" +checksum = "a466bc111374ccf4d90877dba636924a2185e67e5be4b35d32043199365097b2" dependencies = [ - "base64 0.21.5", + "base64", + "chumsky", "email-encoding", "email_address", - "fastrand 1.9.0", + "fastrand 2.0.1", "httpdate", - "idna 0.3.0", + "idna", "mime", "nom", "once_cell", "quoted_printable", "rustls", "rustls-pemfile", - "socket2 0.4.10", + "socket2 0.5.5", "tokio", - "webpki-roots 0.23.1", + "url", + "webpki-roots", ] [[package]] @@ -1934,9 +1930,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" [[package]] name = "local-channel" @@ -2304,11 +2300,12 @@ checksum = "498a099351efa4becc6a19c72aa9270598e8fd274ca47052e37455241c88b696" [[package]] name = "pem" -version = "1.1.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +checksum = "3163d2912b7c3b52d651a055f2c7eec9ba5cd22d26ef75b8dd3a59980b185923" dependencies = [ - "base64 0.13.1", + "base64", + "serde", ] [[package]] @@ -2413,6 +2410,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "psm" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +dependencies = [ + "cc", +] + [[package]] name = "quote" version = "1.0.33" @@ -2424,9 +2430,9 @@ dependencies = [ [[package]] name = "quoted_printable" -version = "0.4.8" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3866219251662ec3b26fc217e3e05bf9c4f84325234dfb96bf0bf840889e49" +checksum = "79ec282e887b434b68c18fe5c121d38e72a5cf35119b59e54ec5b992ea9c8eb0" [[package]] name = "rand" @@ -2537,7 +2543,7 @@ version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ - "base64 0.21.5", + "base64", "bytes", "encoding_rs", "futures-core", @@ -2567,25 +2573,10 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.25.2", + "webpki-roots", "winreg", ] -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - [[package]] name = "ring" version = "0.17.5" @@ -2596,7 +2587,7 @@ dependencies = [ "getrandom", "libc", "spin 0.9.8", - "untrusted 0.9.0", + "untrusted", "windows-sys", ] @@ -2679,7 +2670,7 @@ dependencies = [ "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys 0.4.10", + "linux-raw-sys 0.4.11", "windows-sys", ] @@ -2690,8 +2681,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" dependencies = [ "log", - "ring 0.17.5", - "rustls-webpki 0.101.7", + "ring", + "rustls-webpki", "sct", ] @@ -2701,17 +2692,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.5", -] - -[[package]] -name = "rustls-webpki" -version = "0.100.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", + "base64", ] [[package]] @@ -2720,8 +2701,8 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.5", - "untrusted 0.9.0", + "ring", + "untrusted", ] [[package]] @@ -2761,8 +2742,8 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.5", - "untrusted 0.9.0", + "ring", + "untrusted", ] [[package]] @@ -3107,7 +3088,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "864b869fdf56263f4c95c45483191ea0af340f9f3e3e7b4d57a61c7c87a970db" dependencies = [ "atoi", - "base64 0.21.5", + "base64", "bitflags 2.4.1", "byteorder", "bytes", @@ -3149,7 +3130,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb7ae0e6a97fb3ba33b23ac2671a5ce6e3cabe003f451abd5a56e7951d975624" dependencies = [ "atoi", - "base64 0.21.5", + "base64", "bitflags 2.4.1", "byteorder", "crc", @@ -3203,6 +3184,19 @@ dependencies = [ "url", ] +[[package]] +name = "stacker" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "winapi", +] + [[package]] name = "static-files" version = "0.2.3" @@ -3583,12 +3577,6 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "untrusted" version = "0.9.0" @@ -3602,7 +3590,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna", "percent-encoding", ] @@ -3746,15 +3734,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki-roots" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" -dependencies = [ - "rustls-webpki 0.100.3", -] - [[package]] name = "webpki-roots" version = "0.25.2" diff --git a/docs/api.md b/docs/api.md index c05574d4..2c1931a8 100644 --- a/docs/api.md +++ b/docs/api.md @@ -336,6 +336,14 @@ Can be used for preview video files curl -X GET http://127.0.0.1:8787/file/1/path/to/file.mp4 ``` +**Get Public** + +Can be used for HLS Playlist and other static files in public folder + +```BASH +curl -X GET http://127.0.0.1:8787/live/stream.m3u8 +``` + **Import playlist** Import text/m3u file and convert it to a playlist @@ -369,3 +377,12 @@ curl -X GET http://127.0.0.1:8787/api/program/1/?start_after=2022-11-13T10:00:00 -H 'Authorization: Bearer ' ``` +### System Statistics + +Get statistics about CPU, Ram, Disk, etc. usage. + +```BASH +curl -X GET http://127.0.0.1:8787/api/system +-H 'Content-Type: application/json' -H 'Authorization: Bearer ' +``` + diff --git a/ffplayout-api/Cargo.toml b/ffplayout-api/Cargo.toml index 8f640e43..3cdef173 100644 --- a/ffplayout-api/Cargo.toml +++ b/ffplayout-api/Cargo.toml @@ -22,7 +22,7 @@ clap = { version = "4.3", features = ["derive"] } derive_more = "0.99" faccess = "0.2" futures-util = { version = "0.3", default-features = false, features = ["std"] } -jsonwebtoken = "8" +jsonwebtoken = "9" lazy_static = "1.4" lexical-sort = "0.3" local-ip-address = "0.5" diff --git a/lib/Cargo.toml b/lib/Cargo.toml index f202c76c..2b76ca5a 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -13,7 +13,7 @@ chrono = { version = "0.4", default-features = false, features = ["clock", "serd crossbeam-channel = "0.5" ffprobe = "0.3" file-rotate = "0.7" -lettre = { version = "0.10", features = ["builder", "rustls-tls", "smtp-transport"], default-features = false } +lettre = { version = "0.11", features = ["builder", "rustls-tls", "smtp-transport"], default-features = false } lexical-sort = "0.3" log = "0.4" rand = "0.8" diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 02be5927..46b94097 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -16,7 +16,7 @@ chrono = "0.4" crossbeam-channel = "0.5" ffprobe = "0.3" file-rotate = "0.7.0" -lettre = { version = "0.10", features = ["builder", "rustls-tls", "smtp-transport"], default-features = false } +lettre = { version = "0.11", features = ["builder", "rustls-tls", "smtp-transport"], default-features = false } log = "0.4" rand = "0.8" regex = "1"