diff --git a/Cargo.lock b/Cargo.lock index a933cc603..a14147e09 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -192,7 +192,6 @@ dependencies = [ "bytestring", "cfg-if", "http 0.2.12", - "regex", "regex-lite", "serde", "tracing", @@ -267,9 +266,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.6.0" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1cf67dadb19d7c95e5a299e2dda24193b89d5d4f33a3b9800888ede9e19aa32" +checksum = "5d6316df3fa569627c98b12557a8b6ff0674e5be4bb9b5e4ae2550ddb4964ed6" dependencies = [ "actix-codec", "actix-http", @@ -308,9 +307,9 @@ dependencies = [ [[package]] name = "actix-web-codegen" -version = "4.2.2" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5" +checksum = "f591380e2e68490b5dfaf1dd1aa0ebe78d84ba7067078512b4ea6e4492d622b8" dependencies = [ "actix-router", "proc-macro2", @@ -320,13 +319,13 @@ dependencies = [ [[package]] name = "actix-web-httpauth" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d613edf08a42ccc6864c941d30fe14e1b676a77d16f1dbadc1174d065a0a775" +checksum = "456348ed9dcd72a13a1f4a660449fafdecee9ac8205552e286809eb5b0b29bd3" dependencies = [ "actix-utils", "actix-web", - "base64 0.21.7", + "base64 0.22.1", "futures-core", "futures-util", "log", @@ -978,9 +977,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.6" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9689a29b593160de5bc4aacab7b5d54fb52231de70122626c178e6a368994c7" +checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" dependencies = [ "clap_builder", "clap_derive", @@ -988,9 +987,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.6" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5387378c84f6faa26890ebf9f0a92989f8873d4d380467bcd0d8d8620424df" +checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" dependencies = [ "anstream", "anstyle", @@ -1121,13 +1120,26 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "console-api" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a257c22cd7e487dd4a13d413beabc512c5052f0bc048db0da6a84c3d8a6142fd" +dependencies = [ + "futures-core", + "prost 0.12.6", + "prost-types", + "tonic 0.11.0", + "tracing-core", +] + [[package]] name = "console-subscriber" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7481d4c57092cd1c19dd541b92bdce883de840df30aa5d03fd48a3935c01842e" dependencies = [ - "console-api", + "console-api 0.6.0", "crossbeam-channel", "crossbeam-utils", "futures-task", @@ -1145,6 +1157,31 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "console-subscriber" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31c4cc54bae66f7d9188996404abdf7fdfa23034ef8e43478c8810828abad758" +dependencies = [ + "console-api 0.7.0", + "crossbeam-channel", + "crossbeam-utils", + "futures-task", + "hdrhistogram", + "humantime", + "prost 0.12.6", + "prost-types", + "serde", + "serde_json", + "thread_local", + "tokio", + "tokio-stream", + "tonic 0.11.0", + "tracing", + "tracing-core", + "tracing-subscriber", +] + [[package]] name = "const-oid" version = "0.9.6" @@ -1611,6 +1648,17 @@ dependencies = [ "chrono", ] +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "doku" version = "0.21.1" @@ -2484,6 +2532,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f8ac670d7422d7f76b32e17a5db556510825b29ec9154f235977c9caba61036" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -2510,6 +2676,18 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "idna" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4716a3a0933a1d01c2f72450e89596eb51dd34ef3c211ccd875acdf1f8fe47ed" +dependencies = [ + "icu_normalizer", + "icu_properties", + "smallvec", + "utf8_iter", +] + [[package]] name = "image" version = "0.24.9" @@ -2693,7 +2871,7 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "lemmy_api" -version = "0.19.4" +version = "0.19.5" dependencies = [ "activitypub_federation", "actix-web", @@ -2722,7 +2900,7 @@ dependencies = [ [[package]] name = "lemmy_api_common" -version = "0.19.4" +version = "0.19.5" dependencies = [ "activitypub_federation", "actix-web", @@ -2760,7 +2938,7 @@ dependencies = [ [[package]] name = "lemmy_api_crud" -version = "0.19.4" +version = "0.19.5" dependencies = [ "accept-language", "activitypub_federation", @@ -2783,7 +2961,7 @@ dependencies = [ [[package]] name = "lemmy_apub" -version = "0.19.4" +version = "0.19.5" dependencies = [ "activitypub_federation", "actix-web", @@ -2821,7 +2999,7 @@ dependencies = [ [[package]] name = "lemmy_db_perf" -version = "0.19.4" +version = "0.19.5" dependencies = [ "anyhow", "clap", @@ -2836,7 +3014,7 @@ dependencies = [ [[package]] name = "lemmy_db_schema" -version = "0.19.4" +version = "0.19.5" dependencies = [ "activitypub_federation", "anyhow", @@ -2858,7 +3036,7 @@ dependencies = [ "once_cell", "pretty_assertions", "regex", - "rustls 0.23.9", + "rustls 0.23.10", "serde", "serde_json", "serde_with", @@ -2877,7 +3055,7 @@ dependencies = [ [[package]] name = "lemmy_db_views" -version = "0.19.4" +version = "0.19.5" dependencies = [ "actix-web", "chrono", @@ -2899,7 +3077,7 @@ dependencies = [ [[package]] name = "lemmy_db_views_actor" -version = "0.19.4" +version = "0.19.5" dependencies = [ "chrono", "diesel", @@ -2920,7 +3098,7 @@ dependencies = [ [[package]] name = "lemmy_db_views_moderator" -version = "0.19.4" +version = "0.19.5" dependencies = [ "diesel", "diesel-async", @@ -2932,7 +3110,7 @@ dependencies = [ [[package]] name = "lemmy_federate" -version = "0.19.4" +version = "0.19.5" dependencies = [ "activitypub_federation", "anyhow", @@ -2957,7 +3135,7 @@ dependencies = [ [[package]] name = "lemmy_routes" -version = "0.19.4" +version = "0.19.5" dependencies = [ "activitypub_federation", "actix-web", @@ -2982,7 +3160,7 @@ dependencies = [ [[package]] name = "lemmy_server" -version = "0.19.4" +version = "0.19.5" dependencies = [ "activitypub_federation", "actix-cors", @@ -2991,7 +3169,7 @@ dependencies = [ "chrono", "clap", "clokwerk", - "console-subscriber", + "console-subscriber 0.3.0", "diesel", "diesel-async", "futures-util", @@ -3025,7 +3203,7 @@ dependencies = [ [[package]] name = "lemmy_utils" -version = "0.19.4" +version = "0.19.5" dependencies = [ "actix-web", "anyhow", @@ -3133,6 +3311,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "local-channel" version = "0.1.5" @@ -3310,9 +3494,9 @@ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "metrics" -version = "0.22.3" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2be3cbd384d4e955b231c895ce10685e3d8260c5ccffae898c96c723b0772835" +checksum = "884adb57038347dfbaf2d5065887b6cf4312330dc8e94bc30a1a839bd79d3261" dependencies = [ "ahash", "portable-atomic", @@ -3320,9 +3504,9 @@ dependencies = [ [[package]] name = "metrics-exporter-prometheus" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d58e362dc7206e9456ddbcdbd53c71ba441020e62104703075a69151e38d85f" +checksum = "26eb45aff37b45cff885538e1dcbd6c2b462c04fe84ce0155ea469f325672c98" dependencies = [ "base64 0.22.1", "http-body-util", @@ -3340,9 +3524,9 @@ dependencies = [ [[package]] name = "metrics-util" -version = "0.16.3" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b07a5eb561b8cbc16be2d216faf7757f9baf3bfb94dbb0fae3df8387a5bb47f" +checksum = "4259040465c955f9f2f1a4a8a16dc46726169bca0f88e8fb2dbeced487c3e828" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -3641,9 +3825,9 @@ dependencies = [ [[package]] name = "opentelemetry" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900d57987be3f2aeb70d385fff9b27fb74c5723cc9a52d904d4f9c807a0667bf" +checksum = "1b69a91d4893e713e06f724597ad630f1fa76057a5e1026c0ca67054a9032a76" dependencies = [ "futures-core", "futures-sink", @@ -3651,7 +3835,6 @@ dependencies = [ "once_cell", "pin-project-lite", "thiserror", - "urlencoding", ] [[package]] @@ -3674,17 +3857,16 @@ dependencies = [ [[package]] name = "opentelemetry-otlp" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a016b8d9495c639af2145ac22387dcb88e44118e45320d9238fbf4e7889abcb" +checksum = "a94c69209c05319cdf7460c6d4c055ed102be242a0a6245835d7bc42c6ec7f54" dependencies = [ "async-trait", "futures-core", "http 0.2.12", - "opentelemetry 0.22.0", - "opentelemetry-proto 0.5.0", - "opentelemetry-semantic-conventions", - "opentelemetry_sdk 0.22.1", + "opentelemetry 0.23.0", + "opentelemetry-proto 0.6.0", + "opentelemetry_sdk 0.23.0", "prost 0.12.6", "thiserror", "tokio", @@ -3706,22 +3888,16 @@ dependencies = [ [[package]] name = "opentelemetry-proto" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a8fddc9b68f5b80dae9d6f510b88e02396f006ad48cac349411fbecc80caae4" +checksum = "984806e6cf27f2b49282e2a05e288f30594f3dbc74eb7a6e99422bc48ed78162" dependencies = [ - "opentelemetry 0.22.0", - "opentelemetry_sdk 0.22.1", + "opentelemetry 0.23.0", + "opentelemetry_sdk 0.23.0", "prost 0.12.6", "tonic 0.11.0", ] -[[package]] -name = "opentelemetry-semantic-conventions" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9ab5bd6c42fb9349dcf28af2ba9a0667f697f9bdcca045d39f2cec5543e2910" - [[package]] name = "opentelemetry_api" version = "0.19.0" @@ -3762,18 +3938,18 @@ dependencies = [ [[package]] name = "opentelemetry_sdk" -version = "0.22.1" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e90c7113be649e31e9a0f8b5ee24ed7a16923b322c3c5ab6367469c049d6b7e" +checksum = "ae312d58eaa90a82d2e627fd86e075cf5230b3f11794e2ed74199ebbe572d4fd" dependencies = [ "async-trait", - "crossbeam-channel", "futures-channel", "futures-executor", "futures-util", "glob", + "lazy_static", "once_cell", - "opentelemetry 0.22.0", + "opentelemetry 0.23.0", "ordered-float", "percent-encoding", "rand", @@ -3972,9 +4148,9 @@ dependencies = [ [[package]] name = "pict-rs" -version = "0.5.15" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f60cdba5d277139be805efb823d2c2a9801f508dd9e5f724225a75a4834b60b4" +checksum = "5bbee61836cce10f7cf733196b7c0701e7ea6d0b617da68a3e6e4311b6262c2b" dependencies = [ "actix-form-data", "actix-web", @@ -3986,7 +4162,7 @@ dependencies = [ "clap", "color-eyre", "config", - "console-subscriber", + "console-subscriber 0.2.0", "dashmap", "diesel", "diesel-async", @@ -3997,15 +4173,15 @@ dependencies = [ "metrics", "metrics-exporter-prometheus", "mime", - "opentelemetry 0.22.0", - "opentelemetry-otlp 0.15.0", - "opentelemetry_sdk 0.22.1", + "opentelemetry 0.23.0", + "opentelemetry-otlp 0.16.0", + "opentelemetry_sdk 0.23.0", "pin-project-lite", "refinery", "reqwest 0.12.4", "reqwest-middleware 0.3.1", "reqwest-tracing 0.5.0", - "rustls 0.23.9", + "rustls 0.23.10", "rustls-channel-resolver", "rustls-pemfile 2.1.2", "rusty-s3", @@ -4028,7 +4204,7 @@ dependencies = [ "tracing-actix-web", "tracing-error", "tracing-log 0.2.0", - "tracing-opentelemetry 0.23.0", + "tracing-opentelemetry 0.24.0", "tracing-subscriber", "url", "uuid", @@ -4494,9 +4670,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", @@ -4817,9 +4993,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.9" +version = "0.23.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a218f0f6d05669de4eabfb24f31ce802035c952429d037507b4a4a39f0e60c5b" +checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" dependencies = [ "aws-lc-rs", "log", @@ -4838,7 +5014,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fede2a247359da6b4998f7723ec6468c2d6a577a5d8c17e54f21806426ad2290" dependencies = [ "nanorand", - "rustls 0.23.9", + "rustls 0.23.10", ] [[package]] @@ -5293,6 +5469,12 @@ dependencies = [ "der", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "stacker" version = "0.1.15" @@ -5430,6 +5612,17 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "syntect" version = "5.2.0" @@ -5587,6 +5780,16 @@ version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ab95735ea2c8fd51154d01e39cf13912a78071c2d89abc49a7ef102a7dd725a" +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -5707,7 +5910,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8e98c31c29b2666fb28720739e11476166be4ead1610a37dcd7414bb124413a" dependencies = [ "aws-lc-rs", - "rustls 0.23.9", + "rustls 0.23.10", "tokio", "tokio-postgres", "tokio-rustls 0.26.0", @@ -5721,7 +5924,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04fb792ccd6bbcd4bba408eb8a292f70fc4a3589e5d793626f45190e6454b6ab" dependencies = [ "ring", - "rustls 0.23.9", + "rustls 0.23.10", "tokio", "tokio-postgres", "tokio-rustls 0.26.0", @@ -5745,7 +5948,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.9", + "rustls 0.23.10", "rustls-pki-types", "tokio", ] @@ -5987,10 +6190,10 @@ checksum = "4ee9e39a66d9b615644893ffc1704d2a89b5b315b7fd0228ad3182ca9a306b19" dependencies = [ "actix-web", "mutually_exclusive_features", - "opentelemetry 0.22.0", + "opentelemetry 0.23.0", "pin-project", "tracing", - "tracing-opentelemetry 0.23.0", + "tracing-opentelemetry 0.24.0", "uuid", ] @@ -6086,14 +6289,14 @@ dependencies = [ [[package]] name = "tracing-opentelemetry" -version = "0.23.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9be14ba1bbe4ab79e9229f7f89fab8d120b865859f10527f31c033e599d2284" +checksum = "f68803492bf28ab40aeccaecc7021096bd256baf7ca77c3d425d89b35a7be4e4" dependencies = [ "js-sys", "once_cell", - "opentelemetry 0.22.0", - "opentelemetry_sdk 0.22.1", + "opentelemetry 0.23.0", + "opentelemetry_sdk 0.23.0", "smallvec", "tracing", "tracing-core", @@ -6263,12 +6466,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "f7c25da092f0a868cdf09e8674cd3b7ef3a7d92a24253e663a2fb85e2496de56" dependencies = [ "form_urlencoded", - "idna 0.5.0", + "idna 1.0.0", "percent-encoding", "serde", ] @@ -6285,12 +6488,24 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + [[package]] name = "utf8-width" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.1" @@ -6743,6 +6958,18 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "x509-cert" version = "0.2.5" @@ -6817,6 +7044,30 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.34" @@ -6837,6 +7088,27 @@ dependencies = [ "syn 2.0.66", ] +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" @@ -6857,6 +7129,28 @@ dependencies = [ "syn 2.0.66", ] +[[package]] +name = "zerovec" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb2cc8827d6c0994478a15c53f374f46fbd41bea663d809b14744bc42e6b109c" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97cf56601ee5052b4417d90c8755c6683473c926039908196cf35d99f893ebe7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "zstd" version = "0.13.1" diff --git a/Cargo.toml b/Cargo.toml index f80d147db..ce6d3357d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "0.19.4" +version = "0.19.5" edition = "2021" description = "A link aggregator for the fediverse" license = "AGPL-3.0" @@ -88,17 +88,17 @@ unused_self = "deny" unwrap_used = "deny" [workspace.dependencies] -lemmy_api = { version = "=0.19.4", path = "./crates/api" } -lemmy_api_crud = { version = "=0.19.4", path = "./crates/api_crud" } -lemmy_apub = { version = "=0.19.4", path = "./crates/apub" } -lemmy_utils = { version = "=0.19.4", path = "./crates/utils", default-features = false } -lemmy_db_schema = { version = "=0.19.4", path = "./crates/db_schema" } -lemmy_api_common = { version = "=0.19.4", path = "./crates/api_common" } -lemmy_routes = { version = "=0.19.4", path = "./crates/routes" } -lemmy_db_views = { version = "=0.19.4", path = "./crates/db_views" } -lemmy_db_views_actor = { version = "=0.19.4", path = "./crates/db_views_actor" } -lemmy_db_views_moderator = { version = "=0.19.4", path = "./crates/db_views_moderator" } -lemmy_federate = { version = "=0.19.4", path = "./crates/federate" } +lemmy_api = { version = "=0.19.5", path = "./crates/api" } +lemmy_api_crud = { version = "=0.19.5", path = "./crates/api_crud" } +lemmy_apub = { version = "=0.19.5", path = "./crates/apub" } +lemmy_utils = { version = "=0.19.5", path = "./crates/utils", default-features = false } +lemmy_db_schema = { version = "=0.19.5", path = "./crates/db_schema" } +lemmy_api_common = { version = "=0.19.5", path = "./crates/api_common" } +lemmy_routes = { version = "=0.19.5", path = "./crates/routes" } +lemmy_db_views = { version = "=0.19.5", path = "./crates/db_views" } +lemmy_db_views_actor = { version = "=0.19.5", path = "./crates/db_views_actor" } +lemmy_db_views_moderator = { version = "=0.19.5", path = "./crates/db_views_moderator" } +lemmy_federate = { version = "=0.19.5", path = "./crates/federate" } activitypub_federation = { version = "0.5.6", default-features = false, features = [ "actix-web", ] } @@ -195,7 +195,7 @@ clokwerk = { workspace = true } serde_json = { workspace = true } tracing-opentelemetry = { workspace = true, optional = true } opentelemetry = { workspace = true, optional = true } -console-subscriber = { version = "0.2.0", optional = true } +console-subscriber = { version = "0.3.0", optional = true } opentelemetry-otlp = { version = "0.12.0", optional = true } pict-rs = { version = "0.5.15", optional = true } tokio.workspace = true diff --git a/api_tests/package.json b/api_tests/package.json index 87f864012..d80edfdc5 100644 --- a/api_tests/package.json +++ b/api_tests/package.json @@ -6,7 +6,7 @@ "repository": "https://github.com/LemmyNet/lemmy", "author": "Dessalines", "license": "AGPL-3.0", - "packageManager": "pnpm@9.1.4", + "packageManager": "pnpm@9.4.0", "scripts": { "lint": "tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx src && prettier --check 'src/**/*.ts'", "fix": "prettier --write src && eslint --fix src", @@ -25,7 +25,7 @@ "@typescript-eslint/eslint-plugin": "^7.5.0", "@typescript-eslint/parser": "^7.5.0", "download-file-sync": "^1.0.4", - "eslint": "^8.57.0", + "eslint": "^9.0.0", "eslint-plugin-prettier": "^5.1.3", "jest": "^29.5.0", "lemmy-js-client": "0.19.4", diff --git a/api_tests/pnpm-lock.yaml b/api_tests/pnpm-lock.yaml index a0d281196..de2c9e84c 100644 --- a/api_tests/pnpm-lock.yaml +++ b/api_tests/pnpm-lock.yaml @@ -13,34 +13,34 @@ importers: version: 29.5.12 '@types/node': specifier: ^20.12.4 - version: 20.12.4 + version: 20.14.5 '@typescript-eslint/eslint-plugin': specifier: ^7.5.0 - version: 7.5.0(@typescript-eslint/parser@7.5.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) + version: 7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5) '@typescript-eslint/parser': specifier: ^7.5.0 - version: 7.5.0(eslint@8.57.0)(typescript@5.4.5) + version: 7.13.1(eslint@9.5.0)(typescript@5.4.5) download-file-sync: specifier: ^1.0.4 version: 1.0.4 eslint: - specifier: ^8.57.0 - version: 8.57.0 + specifier: ^9.0.0 + version: 9.5.0 eslint-plugin-prettier: specifier: ^5.1.3 - version: 5.1.3(eslint@8.57.0)(prettier@3.2.5) + version: 5.1.3(eslint@9.5.0)(prettier@3.3.2) jest: specifier: ^29.5.0 - version: 29.7.0(@types/node@20.12.4) + version: 29.7.0(@types/node@20.14.5) lemmy-js-client: specifier: 0.19.4 version: 0.19.4 prettier: specifier: ^3.2.5 - version: 3.2.5 + version: 3.3.2 ts-jest: specifier: ^29.1.0 - version: 29.1.4(@babel/core@7.23.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(jest@29.7.0(@types/node@20.12.4))(typescript@5.4.5) + version: 29.1.5(@babel/core@7.23.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(jest@29.7.0(@types/node@20.14.5))(typescript@5.4.5) typescript: specifier: ^5.4.4 version: 5.4.5 @@ -232,24 +232,33 @@ packages: resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint-community/regexpp@4.10.1': + resolution: {integrity: sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/js@8.57.0': - resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/config-array@0.16.0': + resolution: {integrity: sha512-/jmuSd74i4Czf1XXn7wGRWZCuyaUZ330NH1Bek0Pplatt4Sy1S5haN21SCLLdbeKslQ+S0wEJ+++v5YibSi+Lg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@humanwhocodes/config-array@0.11.14': - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} - engines: {node: '>=10.10.0'} + '@eslint/eslintrc@3.1.0': + resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.5.0': + resolution: {integrity: sha512-A7+AOT2ICkodvtsWnxZP4Xxk3NbZ3VMHd8oihydLRGrJgqqdEz1qSeEgXYyT/Cu8h1TWWsQRejIx48mtjZ5y1w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.4': + resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/object-schema@2.0.2': - resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} + '@humanwhocodes/retry@0.3.0': + resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} + engines: {node: '>=18.18'} '@istanbuljs/load-nyc-config@1.1.0': resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} @@ -395,14 +404,8 @@ packages: '@types/jest@29.5.12': resolution: {integrity: sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==} - '@types/json-schema@7.0.15': - resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - - '@types/node@20.12.4': - resolution: {integrity: sha512-E+Fa9z3wSQpzgYQdYmme5X3OTuejnnTx88A6p6vkkJosR3KBz+HpE3kqNm98VE6cfLFcISx7zW7MsJkH6KwbTw==} - - '@types/semver@7.5.8': - resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} + '@types/node@20.14.5': + resolution: {integrity: sha512-aoRR+fJkZT2l0aGOJhuA8frnCSoNX6W7U2mpNq63+BxBIj5BQFt8rHy627kijCmm63ijdSdwvGgpUsU6MBsZZA==} '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} @@ -413,8 +416,8 @@ packages: '@types/yargs@17.0.32': resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==} - '@typescript-eslint/eslint-plugin@7.5.0': - resolution: {integrity: sha512-HpqNTH8Du34nLxbKgVMGljZMG0rJd2O9ecvr2QLYp+7512ty1j42KnsFwspPXg1Vh8an9YImf6CokUBltisZFQ==} + '@typescript-eslint/eslint-plugin@7.13.1': + resolution: {integrity: sha512-kZqi+WZQaZfPKnsflLJQCz6Ze9FFSMfXrrIOcyargekQxG37ES7DJNpJUE9Q/X5n3yTIP/WPutVNzgknQ7biLg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -424,8 +427,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@7.5.0': - resolution: {integrity: sha512-cj+XGhNujfD2/wzR1tabNsidnYRaFfEkcULdcIyVBYcXjBvBKOes+mpMBP7hMpOyk+gBcfXsrg4NBGAStQyxjQ==} + '@typescript-eslint/parser@7.13.1': + resolution: {integrity: sha512-1ELDPlnLvDQ5ybTSrMhRTFDfOQEOXNM+eP+3HT/Yq7ruWpciQw+Avi73pdEbA4SooCawEWo3dtYbF68gN7Ed1A==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -434,12 +437,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@7.5.0': - resolution: {integrity: sha512-Z1r7uJY0MDeUlql9XJ6kRVgk/sP11sr3HKXn268HZyqL7i4cEfrdFuSSY/0tUqT37l5zT0tJOsuDP16kio85iA==} + '@typescript-eslint/scope-manager@7.13.1': + resolution: {integrity: sha512-adbXNVEs6GmbzaCpymHQ0MB6E4TqoiVbC0iqG3uijR8ZYfpAXMGttouQzF4Oat3P2GxDVIrg7bMI/P65LiQZdg==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/type-utils@7.5.0': - resolution: {integrity: sha512-A021Rj33+G8mx2Dqh0nMO9GyjjIBK3MqgVgZ2qlKf6CJy51wY/lkkFqq3TqqnH34XyAHUkq27IjlUkWlQRpLHw==} + '@typescript-eslint/type-utils@7.13.1': + resolution: {integrity: sha512-aWDbLu1s9bmgPGXSzNCxELu+0+HQOapV/y+60gPXafR8e2g1Bifxzevaa+4L2ytCWm+CHqpELq4CSoN9ELiwCg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -448,12 +451,12 @@ packages: typescript: optional: true - '@typescript-eslint/types@7.5.0': - resolution: {integrity: sha512-tv5B4IHeAdhR7uS4+bf8Ov3k793VEVHd45viRRkehIUZxm0WF82VPiLgHzA/Xl4TGPg1ZD49vfxBKFPecD5/mg==} + '@typescript-eslint/types@7.13.1': + resolution: {integrity: sha512-7K7HMcSQIAND6RBL4kDl24sG/xKM13cA85dc7JnmQXw2cBDngg7c19B++JzvJHRG3zG36n9j1i451GBzRuHchw==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/typescript-estree@7.5.0': - resolution: {integrity: sha512-YklQQfe0Rv2PZEueLTUffiQGKQneiIEKKnfIqPIOxgM9lKSZFCjT5Ad4VqRKj/U4+kQE3fa8YQpskViL7WjdPQ==} + '@typescript-eslint/typescript-estree@7.13.1': + resolution: {integrity: sha512-uxNr51CMV7npU1BxZzYjoVz9iyjckBduFBP0S5sLlh1tXYzHzgZ3BR9SVsNed+LmwKrmnqN3Kdl5t7eZ5TS1Yw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -461,19 +464,16 @@ packages: typescript: optional: true - '@typescript-eslint/utils@7.5.0': - resolution: {integrity: sha512-3vZl9u0R+/FLQcpy2EHyRGNqAS/ofJ3Ji8aebilfJe+fobK8+LbIFmrHciLVDxjDoONmufDcnVSF38KwMEOjzw==} + '@typescript-eslint/utils@7.13.1': + resolution: {integrity: sha512-h5MzFBD5a/Gh/fvNdp9pTfqJAbuQC4sCN2WzuXme71lqFJsZtLbjxfSk4r3p02WIArOF9N94pdsLiGutpDbrXQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 - '@typescript-eslint/visitor-keys@7.5.0': - resolution: {integrity: sha512-mcuHM/QircmA6O7fy6nn2w/3ditQkj+SgtOc8DW3uQ10Yfj42amm2i+6F2K4YAOPNNTmE6iM1ynM6lrSwdendA==} + '@typescript-eslint/visitor-keys@7.13.1': + resolution: {integrity: sha512-k/Bfne7lrP7hcb7m9zSsgcBmo+8eicqqfNAJ7uUY+jkTFpKeH2FSkWpFRtimBxgkyvqfu9jTPRbYOvud6isdXA==} engines: {node: ^18.18.0 || >=20.0.0} - '@ungap/structured-clone@1.2.0': - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -559,6 +559,10 @@ packages: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + browserslist@4.22.3: resolution: {integrity: sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -656,6 +660,15 @@ packages: supports-color: optional: true + debug@4.3.5: + resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dedent@1.5.1: resolution: {integrity: sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==} peerDependencies: @@ -683,10 +696,6 @@ packages: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - download-file-sync@1.0.4: resolution: {integrity: sha512-vH92qNH508jZZA12HQNq/aiMDfagr4JvjFiI17Bi8oYjsxwv5ZVIi7iHkYmUXxOQUr90tcVX+8EPePjAqG1Y0w==} @@ -733,22 +742,26 @@ packages: eslint-config-prettier: optional: true - eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-scope@8.0.1: + resolution: {integrity: sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint@8.57.0: - resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-visitor-keys@4.0.0: + resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.5.0: + resolution: {integrity: sha512-+NAOZFrW/jFTS3dASCGBxX1pkFD0/fsO+hfAkJ4TyYKwgsXZbqzrw+seCYFCcPCYXvnD67tAnglU7GQTz6kcVw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true - espree@9.6.1: - resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + espree@10.0.1: + resolution: {integrity: sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -805,14 +818,18 @@ packages: fb-watchman@2.0.2: resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -821,9 +838,9 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -871,9 +888,9 @@ packages: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - globals@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} @@ -1189,10 +1206,6 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - lru-cache@6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} - make-dir@4.0.0: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} @@ -1214,6 +1227,10 @@ packages: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} + micromatch@4.0.7: + resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==} + engines: {node: '>=8.6'} + mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} @@ -1221,8 +1238,8 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - minimatch@9.0.3: - resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + minimatch@9.0.4: + resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} engines: {node: '>=16 || 14 >=14.17'} ms@2.1.2: @@ -1326,8 +1343,8 @@ packages: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} - prettier@3.2.5: - resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} + prettier@3.3.2: + resolution: {integrity: sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==} engines: {node: '>=14'} hasBin: true @@ -1380,11 +1397,6 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -1392,11 +1404,6 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - semver@7.6.0: - resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} - engines: {node: '>=10'} - hasBin: true - semver@7.6.2: resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} engines: {node: '>=10'} @@ -1502,8 +1509,8 @@ packages: peerDependencies: typescript: '>=4.2.0' - ts-jest@29.1.4: - resolution: {integrity: sha512-YiHwDhSvCiItoAgsKtoLFCuakDzDsJ1DLDnSouTaTmdOcOwIkSzbLXduaQ6M5DRVhuZC/NYaaZ/mtHbWMv/S6Q==} + ts-jest@29.1.5: + resolution: {integrity: sha512-UuClSYxM7byvvYfyWdFI+/2UxMmwNyJb0NPkZPQE2hew3RurV7l7zURgOHAd/1I1ZdPpe3GUsXNXAcN8TFKSIg==} engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -1537,10 +1544,6 @@ packages: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} - type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} @@ -1592,9 +1595,6 @@ packages: yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -1636,7 +1636,7 @@ snapshots: '@babel/traverse': 7.23.9 '@babel/types': 7.23.9 convert-source-map: 2.0.0 - debug: 4.3.4 + debug: 4.3.5 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -1802,7 +1802,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.23.9 '@babel/types': 7.23.9 - debug: 4.3.4 + debug: 4.3.5 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -1815,19 +1815,29 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.5.0)': dependencies: - eslint: 8.57.0 + eslint: 9.5.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.10.0': {} - '@eslint/eslintrc@2.1.4': + '@eslint-community/regexpp@4.10.1': {} + + '@eslint/config-array@0.16.0': + dependencies: + '@eslint/object-schema': 2.1.4 + debug: 4.3.4 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 debug: 4.3.4 - espree: 9.6.1 - globals: 13.24.0 + espree: 10.0.1 + globals: 14.0.0 ignore: 5.3.1 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -1836,19 +1846,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.57.0': {} + '@eslint/js@9.5.0': {} - '@humanwhocodes/config-array@0.11.14': - dependencies: - '@humanwhocodes/object-schema': 2.0.2 - debug: 4.3.4 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color + '@eslint/object-schema@2.1.4': {} '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/object-schema@2.0.2': {} + '@humanwhocodes/retry@0.3.0': {} '@istanbuljs/load-nyc-config@1.1.0': dependencies: @@ -1863,7 +1867,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.14.5 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -1876,14 +1880,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.14.5 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.12.4) + jest-config: 29.7.0(@types/node@20.14.5) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -1908,7 +1912,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.14.5 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -1926,7 +1930,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.12.4 + '@types/node': 20.14.5 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -1948,7 +1952,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.22 - '@types/node': 20.12.4 + '@types/node': 20.14.5 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -2018,7 +2022,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.12.4 + '@types/node': 20.14.5 '@types/yargs': 17.0.32 chalk: 4.1.2 @@ -2086,7 +2090,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 20.12.4 + '@types/node': 20.14.5 '@types/istanbul-lib-coverage@2.0.6': {} @@ -2103,14 +2107,10 @@ snapshots: expect: 29.7.0 pretty-format: 29.7.0 - '@types/json-schema@7.0.15': {} - - '@types/node@20.12.4': + '@types/node@20.14.5': dependencies: undici-types: 5.26.5 - '@types/semver@7.5.8': {} - '@types/stack-utils@2.0.3': {} '@types/yargs-parser@21.0.3': {} @@ -2119,66 +2119,64 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@7.5.0(@typescript-eslint/parser@7.5.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/eslint-plugin@7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5)': dependencies: - '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.5.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.5.0 - '@typescript-eslint/type-utils': 7.5.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.5.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.5.0 - debug: 4.3.4 - eslint: 8.57.0 + '@eslint-community/regexpp': 4.10.1 + '@typescript-eslint/parser': 7.13.1(eslint@9.5.0)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.13.1 + '@typescript-eslint/type-utils': 7.13.1(eslint@9.5.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.13.1 + eslint: 9.5.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - semver: 7.6.0 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.5.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/scope-manager': 7.5.0 - '@typescript-eslint/types': 7.5.0 - '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.5.0 - debug: 4.3.4 - eslint: 8.57.0 + '@typescript-eslint/scope-manager': 7.13.1 + '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/typescript-estree': 7.13.1(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.13.1 + debug: 4.3.5 + eslint: 9.5.0 optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@7.5.0': + '@typescript-eslint/scope-manager@7.13.1': dependencies: - '@typescript-eslint/types': 7.5.0 - '@typescript-eslint/visitor-keys': 7.5.0 + '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/visitor-keys': 7.13.1 - '@typescript-eslint/type-utils@7.5.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/type-utils@7.13.1(eslint@9.5.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.5) - '@typescript-eslint/utils': 7.5.0(eslint@8.57.0)(typescript@5.4.5) - debug: 4.3.4 - eslint: 8.57.0 + '@typescript-eslint/typescript-estree': 7.13.1(typescript@5.4.5) + '@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.4.5) + debug: 4.3.5 + eslint: 9.5.0 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@7.5.0': {} + '@typescript-eslint/types@7.13.1': {} - '@typescript-eslint/typescript-estree@7.5.0(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@7.13.1(typescript@5.4.5)': dependencies: - '@typescript-eslint/types': 7.5.0 - '@typescript-eslint/visitor-keys': 7.5.0 - debug: 4.3.4 + '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/visitor-keys': 7.13.1 + debug: 4.3.5 globby: 11.1.0 is-glob: 4.0.3 - minimatch: 9.0.3 + minimatch: 9.0.4 semver: 7.6.2 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: @@ -2186,27 +2184,22 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.5.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/utils@7.13.1(eslint@9.5.0)(typescript@5.4.5)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@types/json-schema': 7.0.15 - '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 7.5.0 - '@typescript-eslint/types': 7.5.0 - '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.5) - eslint: 8.57.0 - semver: 7.6.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0) + '@typescript-eslint/scope-manager': 7.13.1 + '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/typescript-estree': 7.13.1(typescript@5.4.5) + eslint: 9.5.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@7.5.0': + '@typescript-eslint/visitor-keys@7.13.1': dependencies: - '@typescript-eslint/types': 7.5.0 + '@typescript-eslint/types': 7.13.1 eslint-visitor-keys: 3.4.3 - '@ungap/structured-clone@1.2.0': {} - acorn-jsx@5.3.2(acorn@8.11.3): dependencies: acorn: 8.11.3 @@ -2316,6 +2309,10 @@ snapshots: dependencies: fill-range: 7.0.1 + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + browserslist@4.22.3: dependencies: caniuse-lite: 1.0.30001581 @@ -2384,13 +2381,13 @@ snapshots: convert-source-map@2.0.0: {} - create-jest@29.7.0(@types/node@20.12.4): + create-jest@29.7.0(@types/node@20.14.5): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.12.4) + jest-config: 29.7.0(@types/node@20.14.5) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -2409,6 +2406,10 @@ snapshots: dependencies: ms: 2.1.2 + debug@4.3.5: + dependencies: + ms: 2.1.2 + dedent@1.5.1: {} deep-is@0.1.4: {} @@ -2423,10 +2424,6 @@ snapshots: dependencies: path-type: 4.0.0 - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - download-file-sync@1.0.4: {} electron-to-chromium@1.4.648: {} @@ -2447,52 +2444,50 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-plugin-prettier@5.1.3(eslint@8.57.0)(prettier@3.2.5): + eslint-plugin-prettier@5.1.3(eslint@9.5.0)(prettier@3.3.2): dependencies: - eslint: 8.57.0 - prettier: 3.2.5 + eslint: 9.5.0 + prettier: 3.3.2 prettier-linter-helpers: 1.0.0 synckit: 0.8.8 - eslint-scope@7.2.2: + eslint-scope@8.0.1: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} - eslint@8.57.0: + eslint-visitor-keys@4.0.0: {} + + eslint@9.5.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0) '@eslint-community/regexpp': 4.10.0 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.0 - '@humanwhocodes/config-array': 0.11.14 + '@eslint/config-array': 0.16.0 + '@eslint/eslintrc': 3.1.0 + '@eslint/js': 9.5.0 '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.4 - doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 + eslint-scope: 8.0.1 + eslint-visitor-keys: 4.0.0 + espree: 10.0.1 esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 + file-entry-cache: 8.0.0 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -2504,11 +2499,11 @@ snapshots: transitivePeerDependencies: - supports-color - espree@9.6.1: + espree@10.0.1: dependencies: acorn: 8.11.3 acorn-jsx: 5.3.2(acorn@8.11.3) - eslint-visitor-keys: 3.4.3 + eslint-visitor-keys: 4.0.0 esprima@4.0.1: {} @@ -2556,7 +2551,7 @@ snapshots: '@nodelib/fs.walk': 1.2.8 glob-parent: 5.1.2 merge2: 1.4.1 - micromatch: 4.0.5 + micromatch: 4.0.7 fast-json-stable-stringify@2.1.0: {} @@ -2570,14 +2565,18 @@ snapshots: dependencies: bser: 2.1.1 - file-entry-cache@6.0.1: + file-entry-cache@8.0.0: dependencies: - flat-cache: 3.2.0 + flat-cache: 4.0.1 fill-range@7.0.1: dependencies: to-regex-range: 5.0.1 + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + find-up@4.1.0: dependencies: locate-path: 5.0.0 @@ -2588,11 +2587,10 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@3.2.0: + flat-cache@4.0.1: dependencies: flatted: 3.3.1 keyv: 4.5.4 - rimraf: 3.0.2 flatted@3.3.1: {} @@ -2630,9 +2628,7 @@ snapshots: globals@11.12.0: {} - globals@13.24.0: - dependencies: - type-fest: 0.20.2 + globals@14.0.0: {} globby@11.1.0: dependencies: @@ -2734,7 +2730,7 @@ snapshots: istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.3.4 + debug: 4.3.5 istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -2757,7 +2753,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.14.5 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -2777,16 +2773,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@20.12.4): + jest-cli@29.7.0(@types/node@20.14.5): dependencies: '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.12.4) + create-jest: 29.7.0(@types/node@20.14.5) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@20.12.4) + jest-config: 29.7.0(@types/node@20.14.5) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -2796,7 +2792,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@20.12.4): + jest-config@29.7.0(@types/node@20.14.5): dependencies: '@babel/core': 7.23.9 '@jest/test-sequencer': 29.7.0 @@ -2821,7 +2817,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 20.12.4 + '@types/node': 20.14.5 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -2850,7 +2846,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.14.5 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -2860,7 +2856,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 20.12.4 + '@types/node': 20.14.5 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -2899,7 +2895,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.14.5 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -2934,7 +2930,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.14.5 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -2962,7 +2958,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.14.5 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -3008,7 +3004,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.14.5 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -3027,7 +3023,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.14.5 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -3036,17 +3032,17 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 20.12.4 + '@types/node': 20.14.5 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@20.12.4): + jest@29.7.0(@types/node@20.14.5): dependencies: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@20.12.4) + jest-cli: 29.7.0(@types/node@20.14.5) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -3109,10 +3105,6 @@ snapshots: dependencies: yallist: 3.1.1 - lru-cache@6.0.0: - dependencies: - yallist: 4.0.0 - make-dir@4.0.0: dependencies: semver: 7.6.2 @@ -3132,13 +3124,18 @@ snapshots: braces: 3.0.2 picomatch: 2.3.1 + micromatch@4.0.7: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + mimic-fn@2.1.0: {} minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 - minimatch@9.0.3: + minimatch@9.0.4: dependencies: brace-expansion: 2.0.1 @@ -3228,7 +3225,7 @@ snapshots: dependencies: fast-diff: 1.3.0 - prettier@3.2.5: {} + prettier@3.3.2: {} pretty-format@29.7.0: dependencies: @@ -3269,20 +3266,12 @@ snapshots: reusify@1.0.4: {} - rimraf@3.0.2: - dependencies: - glob: 7.2.3 - run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 semver@6.3.1: {} - semver@7.6.0: - dependencies: - lru-cache: 6.0.0 - semver@7.6.2: {} shebang-command@2.0.0: @@ -3370,11 +3359,11 @@ snapshots: dependencies: typescript: 5.4.5 - ts-jest@29.1.4(@babel/core@7.23.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(jest@29.7.0(@types/node@20.12.4))(typescript@5.4.5): + ts-jest@29.1.5(@babel/core@7.23.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(jest@29.7.0(@types/node@20.14.5))(typescript@5.4.5): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.12.4) + jest: 29.7.0(@types/node@20.14.5) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -3396,8 +3385,6 @@ snapshots: type-detect@4.0.8: {} - type-fest@0.20.2: {} - type-fest@0.21.3: {} typescript@5.4.5: {} @@ -3445,8 +3432,6 @@ snapshots: yallist@3.1.1: {} - yallist@4.0.0: {} - yargs-parser@21.1.1: {} yargs@17.7.2: diff --git a/crates/api_crud/src/post/read.rs b/crates/api_crud/src/post/read.rs index 54029c0cf..60b5609a9 100644 --- a/crates/api_crud/src/post/read.rs +++ b/crates/api_crud/src/post/read.rs @@ -83,12 +83,13 @@ pub async fn get_post( .ok_or(LemmyErrorType::CouldntFindCommunity)?; let moderators = CommunityModeratorView::for_community(&mut context.pool(), community_id).await?; + let local_user = local_user_view.as_ref().map(|u| &u.local_user); // Fetch the cross_posts let cross_posts = if let Some(url) = &post_view.post.url { let mut x_posts = PostQuery { url_search: Some(url.inner().as_str().into()), - local_user: local_user_view.as_ref(), + local_user, ..Default::default() } .list(&local_site.site, &mut context.pool()) diff --git a/crates/apub/src/api/list_comments.rs b/crates/apub/src/api/list_comments.rs index 25d197007..d83b9a135 100644 --- a/crates/apub/src/api/list_comments.rs +++ b/crates/apub/src/api/list_comments.rs @@ -70,6 +70,8 @@ pub async fn list_comments( let parent_path_cloned = parent_path.clone(); let post_id = data.post_id; + let local_user = local_user_view.as_ref().map(|l| &l.local_user); + let comments = CommentQuery { listing_type, sort, @@ -80,7 +82,7 @@ pub async fn list_comments( community_id, parent_path: parent_path_cloned, post_id, - local_user: local_user_view.as_ref(), + local_user, page, limit, ..Default::default() diff --git a/crates/apub/src/api/list_posts.rs b/crates/apub/src/api/list_posts.rs index ec5412de8..31bdd0c8e 100644 --- a/crates/apub/src/api/list_posts.rs +++ b/crates/apub/src/api/list_posts.rs @@ -49,17 +49,17 @@ pub async fn list_posts( return Err(LemmyError::from(LemmyErrorType::ContradictingFilters)); } - let local_user_ref = local_user_view.as_ref().map(|u| &u.local_user); + let local_user = local_user_view.as_ref().map(|u| &u.local_user); let listing_type = Some(listing_type_with_default( data.type_, - local_user_ref, + local_user, &local_site.local_site, community_id, )); let sort = Some(sort_type_with_default( data.sort, - local_user_ref, + local_user, &local_site.local_site, )); @@ -71,7 +71,7 @@ pub async fn list_posts( }; let posts = PostQuery { - local_user: local_user_view.as_ref(), + local_user, listing_type, sort, community_id, diff --git a/crates/apub/src/api/read_person.rs b/crates/apub/src/api/read_person.rs index 0d65ab4f7..a6b3560aa 100644 --- a/crates/apub/src/api/read_person.rs +++ b/crates/apub/src/api/read_person.rs @@ -65,10 +65,12 @@ pub async fn read_person( None }; + let local_user = local_user_view.as_ref().map(|l| &l.local_user); + let posts = PostQuery { sort, saved_only, - local_user: local_user_view.as_ref(), + local_user, community_id, page, limit, @@ -79,7 +81,7 @@ pub async fn read_person( .await?; let comments = CommentQuery { - local_user: local_user_view.as_ref(), + local_user, sort: sort.map(post_to_comment_sort_type), saved_only, community_id, diff --git a/crates/apub/src/api/search.rs b/crates/apub/src/api/search.rs index f3cd36faf..a048b64a7 100644 --- a/crates/apub/src/api/search.rs +++ b/crates/apub/src/api/search.rs @@ -55,7 +55,7 @@ pub async fn search( data.community_id }; let creator_id = data.creator_id; - let local_user = local_user_view.as_ref().map(|luv| &luv.local_user); + let local_user = local_user_view.as_ref().map(|l| &l.local_user); match search_type { SearchType::Posts => { @@ -64,7 +64,7 @@ pub async fn search( listing_type: (listing_type), community_id: (community_id), creator_id: (creator_id), - local_user: (local_user_view.as_ref()), + local_user, search_term: (Some(q)), page: (page), limit: (limit), @@ -80,7 +80,7 @@ pub async fn search( search_term: (Some(q)), community_id: (community_id), creator_id: (creator_id), - local_user: (local_user_view.as_ref()), + local_user, page: (page), limit: (limit), ..Default::default() @@ -125,7 +125,7 @@ pub async fn search( listing_type: (listing_type), community_id: (community_id), creator_id: (creator_id), - local_user: (local_user_view.as_ref()), + local_user, search_term: (Some(q)), page: (page), limit: (limit), @@ -142,7 +142,7 @@ pub async fn search( search_term: (Some(q)), community_id: (community_id), creator_id: (creator_id), - local_user: (local_user_view.as_ref()), + local_user, page: (page), limit: (limit), ..Default::default() @@ -192,6 +192,7 @@ pub async fn search( community_id: (community_id), creator_id: (creator_id), url_search: (Some(q)), + local_user, page: (page), limit: (limit), ..Default::default() diff --git a/crates/db_schema/replaceable_schema/triggers.sql b/crates/db_schema/replaceable_schema/triggers.sql index 561206872..b99e30265 100644 --- a/crates/db_schema/replaceable_schema/triggers.sql +++ b/crates/db_schema/replaceable_schema/triggers.sql @@ -486,7 +486,7 @@ BEGIN INNER JOIN old_post ON old_post.id = new_post.id AND (old_post.featured_community, old_post.featured_local) != (new_post.featured_community, - old_post.featured_local) + new_post.featured_local) WHERE post_aggregates.post_id = new_post.id; RETURN NULL; diff --git a/crates/db_schema/src/impls/local_user.rs b/crates/db_schema/src/impls/local_user.rs index 62fc418d0..9b59e07ba 100644 --- a/crates/db_schema/src/impls/local_user.rs +++ b/crates/db_schema/src/impls/local_user.rs @@ -5,6 +5,7 @@ use crate::{ actor_language::LocalUserLanguage, local_user::{LocalUser, LocalUserInsertForm, LocalUserUpdateForm}, local_user_vote_display_mode::{LocalUserVoteDisplayMode, LocalUserVoteDisplayModeInsertForm}, + site::Site, }, utils::{ functions::{coalesce, lower}, @@ -216,6 +217,44 @@ impl LocalUser { } } +/// Adds some helper functions for an optional LocalUser +pub trait LocalUserOptionHelper { + fn person_id(&self) -> Option; + fn local_user_id(&self) -> Option; + fn show_bot_accounts(&self) -> bool; + fn show_read_posts(&self) -> bool; + fn is_admin(&self) -> bool; + fn show_nsfw(&self, site: &Site) -> bool; +} + +impl LocalUserOptionHelper for Option<&LocalUser> { + fn person_id(&self) -> Option { + self.map(|l| l.person_id) + } + + fn local_user_id(&self) -> Option { + self.map(|l| l.id) + } + + fn show_bot_accounts(&self) -> bool { + self.map(|l| l.show_bot_accounts).unwrap_or(true) + } + + fn show_read_posts(&self) -> bool { + self.map(|l| l.show_read_posts).unwrap_or(true) + } + + fn is_admin(&self) -> bool { + self.map(|l| l.admin).unwrap_or(false) + } + + fn show_nsfw(&self, site: &Site) -> bool { + self + .map(|l| l.show_nsfw) + .unwrap_or(site.content_warning.is_some()) + } +} + impl LocalUserInsertForm { pub fn test_form(person_id: PersonId) -> Self { Self::builder() diff --git a/crates/db_schema/src/utils.rs b/crates/db_schema/src/utils.rs index ec95796e6..48084799f 100644 --- a/crates/db_schema/src/utils.rs +++ b/crates/db_schema/src/utils.rs @@ -1,7 +1,15 @@ -use crate::{newtypes::DbUrl, CommentSortType, SortType}; +use crate::{ + diesel::ExpressionMethods, + newtypes::{DbUrl, PersonId}, + schema::community, + CommentSortType, + CommunityVisibility, + SortType, +}; use chrono::{DateTime, TimeDelta, Utc}; use deadpool::Runtime; use diesel::{ + dsl, helper_types::AsExprOf, pg::Pg, query_builder::{Query, QueryFragment}, @@ -324,6 +332,10 @@ pub fn diesel_url_create(opt: Option<&str>) -> LemmyResult> { fn establish_connection(config: &str) -> BoxFuture> { let fut = async { + rustls::crypto::ring::default_provider() + .install_default() + .expect("Failed to install rustls crypto provider"); + let rustls_config = DangerousClientConfigBuilder { cfg: ClientConfig::builder(), } @@ -575,6 +587,20 @@ impl Queries { } } +pub fn visible_communities_only(my_person_id: Option, query: Q) -> Q +where + Q: diesel::query_dsl::methods::FilterDsl< + dsl::Eq, + Output = Q, + >, +{ + if my_person_id.is_none() { + query.filter(community::visibility.eq(CommunityVisibility::Public)) + } else { + query + } +} + #[cfg(test)] #[allow(clippy::indexing_slicing)] mod tests { diff --git a/crates/db_views/src/comment_view.rs b/crates/db_views/src/comment_view.rs index 247dea9fc..61dbceb4b 100644 --- a/crates/db_views/src/comment_view.rs +++ b/crates/db_views/src/comment_view.rs @@ -1,4 +1,4 @@ -use crate::structs::{CommentView, LocalUserView}; +use crate::structs::CommentView; use diesel::{ dsl::{exists, not}, pg::Pg, @@ -16,6 +16,7 @@ use diesel::{ use diesel_async::RunQueryDsl; use diesel_ltree::{nlevel, subpath, Ltree, LtreeExtensions}; use lemmy_db_schema::{ + impls::local_user::LocalUserOptionHelper, newtypes::{CommentId, CommunityId, LocalUserId, PersonId, PostId}, schema::{ comment, @@ -34,9 +35,18 @@ use lemmy_db_schema::{ person_block, post, }, - utils::{fuzzy_search, limit_and_offset, DbConn, DbPool, ListFn, Queries, ReadFn}, + source::local_user::LocalUser, + utils::{ + fuzzy_search, + limit_and_offset, + visible_communities_only, + DbConn, + DbPool, + ListFn, + Queries, + ReadFn, + }, CommentSortType, - CommunityVisibility, ListingType, }; @@ -174,22 +184,19 @@ fn queries<'a>() -> Queries< let read = move |mut conn: DbConn<'a>, (comment_id, my_person_id): (CommentId, Option)| async move { let mut query = all_joins(comment::table.find(comment_id).into_boxed(), my_person_id); - // Hide local only communities from unauthenticated users - if my_person_id.is_none() { - query = query.filter(community::visibility.eq(CommunityVisibility::Public)); - } + query = visible_communities_only(my_person_id, query); query.first(&mut conn).await }; let list = move |mut conn: DbConn<'a>, options: CommentQuery<'a>| async move { - let my_person_id = options.local_user.map(|l| l.person.id); - let my_local_user_id = options.local_user.map(|l| l.local_user.id); - // The left join below will return None in this case - let person_id_join = my_person_id.unwrap_or(PersonId(-1)); - let local_user_id_join = my_local_user_id.unwrap_or(LocalUserId(-1)); + let person_id_join = options.local_user.person_id().unwrap_or(PersonId(-1)); + let local_user_id_join = options + .local_user + .local_user_id() + .unwrap_or(LocalUserId(-1)); - let mut query = all_joins(comment::table.into_boxed(), my_person_id); + let mut query = all_joins(comment::table.into_boxed(), options.local_user.person_id()); if let Some(creator_id) = options.creator_id { query = query.filter(comment::creator_id.eq(creator_id)); @@ -251,7 +258,7 @@ fn queries<'a>() -> Queries< .then_order_by(comment_saved::published.desc()); } - if let Some(my_id) = my_person_id { + if let Some(my_id) = options.local_user.person_id() { let not_creator_filter = comment::creator_id.ne(my_id); if options.liked_only { query = query.filter(not_creator_filter).filter(score(my_id).eq(1)); @@ -260,11 +267,7 @@ fn queries<'a>() -> Queries< } } - if !options - .local_user - .map(|l| l.local_user.show_bot_accounts) - .unwrap_or(true) - { + if !options.local_user.show_bot_accounts() { query = query.filter(person::bot_account.eq(false)); }; @@ -298,10 +301,7 @@ fn queries<'a>() -> Queries< query = query.filter(not(is_creator_blocked(person_id_join))); }; - // Hide comments in local only communities from unauthenticated users - if options.local_user.is_none() { - query = query.filter(community::visibility.eq(CommunityVisibility::Public)); - } + query = visible_communities_only(options.local_user.person_id(), query); // A Max depth given means its a tree fetch let (limit, offset) = if let Some(max_depth) = options.max_depth { @@ -396,7 +396,7 @@ pub struct CommentQuery<'a> { pub post_id: Option, pub parent_path: Option, pub creator_id: Option, - pub local_user: Option<&'a LocalUserView>, + pub local_user: Option<&'a LocalUser>, pub search_term: Option, pub saved_only: bool, pub liked_only: bool, @@ -659,7 +659,7 @@ mod tests { let read_comment_views_with_person = CommentQuery { sort: (Some(CommentSortType::Old)), post_id: (Some(data.inserted_post.id)), - local_user: (Some(&data.timmy_local_user_view)), + local_user: (Some(&data.timmy_local_user_view.local_user)), ..Default::default() } .list(pool) @@ -711,7 +711,7 @@ mod tests { CommentLike::like(pool, &comment_like_form).await?; let read_liked_comment_views = CommentQuery { - local_user: (Some(&data.timmy_local_user_view)), + local_user: (Some(&data.timmy_local_user_view.local_user)), liked_only: (true), ..Default::default() } @@ -727,7 +727,7 @@ mod tests { assert_length!(1, read_liked_comment_views); let read_disliked_comment_views: Vec = CommentQuery { - local_user: (Some(&data.timmy_local_user_view)), + local_user: (Some(&data.timmy_local_user_view.local_user)), disliked_only: (true), ..Default::default() } @@ -822,7 +822,7 @@ mod tests { // by default, user has all languages enabled and should see all comments // (except from blocked user) let all_languages = CommentQuery { - local_user: (Some(&data.timmy_local_user_view)), + local_user: (Some(&data.timmy_local_user_view.local_user)), ..Default::default() } .list(pool) @@ -840,7 +840,7 @@ mod tests { ) .await?; let finnish_comments = CommentQuery { - local_user: (Some(&data.timmy_local_user_view)), + local_user: (Some(&data.timmy_local_user_view.local_user)), ..Default::default() } .list(pool) @@ -866,7 +866,7 @@ mod tests { ) .await?; let undetermined_comment = CommentQuery { - local_user: (Some(&data.timmy_local_user_view)), + local_user: (Some(&data.timmy_local_user_view.local_user)), ..Default::default() } .list(pool) @@ -979,7 +979,7 @@ mod tests { // Fetch the saved comments let comments = CommentQuery { - local_user: Some(&data.timmy_local_user_view), + local_user: Some(&data.timmy_local_user_view.local_user), saved_only: true, ..Default::default() } @@ -1158,7 +1158,7 @@ mod tests { assert_eq!(0, unauthenticated_query.len()); let authenticated_query = CommentQuery { - local_user: Some(&data.timmy_local_user_view), + local_user: Some(&data.timmy_local_user_view.local_user), ..Default::default() } .list(pool) diff --git a/crates/db_views/src/post_view.rs b/crates/db_views/src/post_view.rs index eac44bb39..fb616b0d3 100644 --- a/crates/db_views/src/post_view.rs +++ b/crates/db_views/src/post_view.rs @@ -1,4 +1,4 @@ -use crate::structs::{LocalUserView, PaginationCursor, PostView}; +use crate::structs::{PaginationCursor, PostView}; use diesel::{ debug_query, dsl::{exists, not, IntervalDsl}, @@ -20,6 +20,7 @@ use diesel_async::RunQueryDsl; use i_love_jesus::PaginatedQueryBuilder; use lemmy_db_schema::{ aggregates::structs::{post_aggregates_keys as key, PostAggregates}, + impls::local_user::LocalUserOptionHelper, newtypes::{CommunityId, LocalUserId, PersonId, PostId}, schema::{ community, @@ -40,13 +41,14 @@ use lemmy_db_schema::{ post_read, post_saved, }, - source::site::Site, + source::{local_user::LocalUser, site::Site}, utils::{ functions::coalesce, fuzzy_search, get_conn, limit_and_offset, now, + visible_communities_only, Commented, DbConn, DbPool, @@ -55,7 +57,6 @@ use lemmy_db_schema::{ ReadFn, ReverseTimestampKey, }, - CommunityVisibility, ListingType, SortType, }; @@ -285,10 +286,7 @@ fn queries<'a>() -> Queries< ); } - // Hide posts in local only communities from unauthenticated users - if my_person_id.is_none() { - query = query.filter(community::visibility.eq(CommunityVisibility::Public)); - } + query = visible_communities_only(my_person_id, query); Commented::new(query) .text("PostView::read") @@ -297,31 +295,30 @@ fn queries<'a>() -> Queries< }; let list = move |mut conn: DbConn<'a>, (options, site): (PostQuery<'a>, &'a Site)| async move { - let my_person_id = options.local_user.map(|l| l.person.id); - let my_local_user_id = options.local_user.map(|l| l.local_user.id); - // The left join below will return None in this case - let person_id_join = my_person_id.unwrap_or(PersonId(-1)); - let local_user_id_join = my_local_user_id.unwrap_or(LocalUserId(-1)); + let person_id_join = options.local_user.person_id().unwrap_or(PersonId(-1)); + let local_user_id_join = options + .local_user + .local_user_id() + .unwrap_or(LocalUserId(-1)); - let mut query = all_joins(post_aggregates::table.into_boxed(), my_person_id); + let mut query = all_joins( + post_aggregates::table.into_boxed(), + options.local_user.person_id(), + ); // hide posts from deleted communities query = query.filter(community::deleted.eq(false)); // only show deleted posts to creator - if let Some(person_id) = my_person_id { + if let Some(person_id) = options.local_user.person_id() { query = query.filter(post::deleted.eq(false).or(post::creator_id.eq(person_id))); } else { query = query.filter(post::deleted.eq(false)); } - let is_admin = options - .local_user - .map(|l| l.local_user.admin) - .unwrap_or(false); // only show removed posts to admin when viewing user profile - if !(options.creator_id.is_some() && is_admin) { + if !(options.creator_id.is_some() && options.local_user.is_admin()) { query = query .filter(community::removed.eq(false)) .filter(post::removed.eq(false)); @@ -335,7 +332,7 @@ fn queries<'a>() -> Queries< } if let Some(listing_type) = options.listing_type { - if let Some(person_id) = my_person_id { + if let Some(person_id) = options.local_user.person_id() { let is_subscribed = exists( community_follower::table.filter( post_aggregates::community_id @@ -392,54 +389,40 @@ fn queries<'a>() -> Queries< .filter(not(post::removed.or(post::deleted))); } - // If there is a content warning, show nsfw content by default. - let has_content_warning = site.content_warning.is_some(); - if !options - .local_user - .map(|l| l.local_user.show_nsfw) - .unwrap_or(has_content_warning) - { + if !options.local_user.show_nsfw(site) { query = query .filter(post::nsfw.eq(false)) .filter(community::nsfw.eq(false)); }; - if !options - .local_user - .map(|l| l.local_user.show_bot_accounts) - .unwrap_or(true) - { + if !options.local_user.show_bot_accounts() { query = query.filter(person::bot_account.eq(false)); }; // If its saved only, then filter, and order by the saved time, not the comment creation time. - if let (true, Some(_person_id)) = (options.saved_only, my_person_id) { + if options.saved_only { query = query .filter(post_saved::person_id.is_not_null()) .then_order_by(post_saved::published.desc()); } // Only hide the read posts, if the saved_only is false. Otherwise ppl with the hide_read // setting wont be able to see saved posts. - else if !options - .local_user - .map(|l| l.local_user.show_read_posts) - .unwrap_or(true) - { + else if !options.local_user.show_read_posts() { // Do not hide read posts when it is a user profile view // Or, only hide read posts on non-profile views - if let (None, Some(person_id)) = (options.creator_id, my_person_id) { + if let (None, Some(person_id)) = (options.creator_id, options.local_user.person_id()) { query = query.filter(not(is_read(person_id))); } } if !options.show_hidden { // If a creator id isn't given (IE its on home or community pages), hide the hidden posts - if let (None, Some(person_id)) = (options.creator_id, my_person_id) { + if let (None, Some(person_id)) = (options.creator_id, options.local_user.person_id()) { query = query.filter(not(is_hidden(person_id))); } } - if let Some(my_id) = my_person_id { + if let Some(my_id) = options.local_user.person_id() { let not_creator_filter = post_aggregates::creator_id.ne(my_id); if options.liked_only { query = query.filter(not_creator_filter).filter(score(my_id).eq(1)); @@ -448,14 +431,11 @@ fn queries<'a>() -> Queries< } }; - // Hide posts in local only communities from unauthenticated users - if options.local_user.is_none() { - query = query.filter(community::visibility.eq(CommunityVisibility::Public)); - } + query = visible_communities_only(options.local_user.person_id(), query); // Dont filter blocks or missing languages for moderator view type if let (Some(person_id), false) = ( - my_person_id, + options.local_user.person_id(), options.listing_type.unwrap_or_default() == ListingType::ModeratorView, ) { // Filter out the rows with missing languages @@ -618,7 +598,7 @@ pub struct PostQuery<'a> { // if true, the query should be handled as if community_id was not given except adding the // literal filter pub community_id_just_for_prefetch: bool, - pub local_user: Option<&'a LocalUserView>, + pub local_user: Option<&'a LocalUser>, pub search_term: Option, pub url_search: Option, pub saved_only: bool, @@ -663,11 +643,7 @@ impl<'a> PostQuery<'a> { "legacy pagination cannot be combined with v2 pagination".into(), )); } - let self_person_id = self - .local_user - .expect("part of the above if") - .local_user - .person_id; + let self_person_id = self.local_user.expect("part of the above if").person_id; let largest_subscribed = { let conn = &mut get_conn(pool).await?; community_follower @@ -807,7 +783,7 @@ mod tests { fn default_post_query(&self) -> PostQuery<'_> { PostQuery { sort: Some(SortType::New), - local_user: Some(&self.local_user_view), + local_user: Some(&self.local_user_view.local_user), ..Default::default() } } @@ -1324,8 +1300,8 @@ mod tests { // Deleted post is only shown to creator for (local_user, expect_contains_deleted) in [ (None, false), - (Some(&data.blocked_local_user_view), false), - (Some(&data.local_user_view), true), + (Some(&data.blocked_local_user_view.local_user), false), + (Some(&data.local_user_view.local_user), true), ] { let contains_deleted = PostQuery { local_user, @@ -1563,7 +1539,7 @@ mod tests { // Make sure it does come back with the show_hidden option let post_listings_show_hidden = PostQuery { sort: Some(SortType::New), - local_user: Some(&data.local_user_view), + local_user: Some(&data.local_user_view.local_user), show_hidden: true, ..Default::default() } @@ -1738,7 +1714,7 @@ mod tests { assert_eq!(0, unauthenticated_query.len()); let authenticated_query = PostQuery { - local_user: Some(&data.local_user_view), + local_user: Some(&data.local_user_view.local_user), ..Default::default() } .list(&data.site, pool) diff --git a/crates/db_views_actor/src/community_view.rs b/crates/db_views_actor/src/community_view.rs index c5b28c7ce..25e76c7b3 100644 --- a/crates/db_views_actor/src/community_view.rs +++ b/crates/db_views_actor/src/community_view.rs @@ -11,6 +11,7 @@ use diesel::{ }; use diesel_async::RunQueryDsl; use lemmy_db_schema::{ + impls::local_user::LocalUserOptionHelper, newtypes::{CommunityId, PersonId}, schema::{ community, @@ -19,11 +20,18 @@ use lemmy_db_schema::{ community_follower, community_person_ban, instance_block, - local_user, }, source::{community::CommunityFollower, local_user::LocalUser, site::Site}, - utils::{fuzzy_search, limit_and_offset, DbConn, DbPool, ListFn, Queries, ReadFn}, - CommunityVisibility, + utils::{ + fuzzy_search, + limit_and_offset, + visible_communities_only, + DbConn, + DbPool, + ListFn, + Queries, + ReadFn, + }, ListingType, SortType, }; @@ -97,10 +105,7 @@ fn queries<'a>() -> Queries< query = query.filter(not_removed_or_deleted); } - // Hide local only communities from unauthenticated users - if my_person_id.is_none() { - query = query.filter(community::visibility.eq(CommunityVisibility::Public)); - } + query = visible_communities_only(my_person_id, query); query.first(&mut conn).await }; @@ -108,14 +113,14 @@ fn queries<'a>() -> Queries< let list = move |mut conn: DbConn<'a>, (options, site): (CommunityQuery<'a>, &'a Site)| async move { use SortType::*; - let my_person_id = options.local_user.map(|l| l.person_id); - // The left join below will return None in this case - let person_id_join = my_person_id.unwrap_or(PersonId(-1)); + let person_id_join = options.local_user.person_id().unwrap_or(PersonId(-1)); - let mut query = all_joins(community::table.into_boxed(), my_person_id) - .left_join(local_user::table.on(local_user::person_id.eq(person_id_join))) - .select(selection); + let mut query = all_joins( + community::table.into_boxed(), + options.local_user.person_id(), + ) + .select(selection); if let Some(search_term) = options.search_term { let searcher = fuzzy_search(&search_term); @@ -162,21 +167,14 @@ fn queries<'a>() -> Queries< // Don't show blocked communities and communities on blocked instances. nsfw communities are // also hidden (based on profile setting) - if options.local_user.is_some() { - query = query.filter(instance_block::person_id.is_null()); - query = query.filter(community_block::person_id.is_null()); - query = query.filter(community::nsfw.eq(false).or(local_user::show_nsfw.eq(true))); - } else { - // No person in request, only show nsfw communities if show_nsfw is passed into request or if - // site has content warning. - let has_content_warning = site.content_warning.is_some(); - if !options.show_nsfw && !has_content_warning { - query = query.filter(community::nsfw.eq(false)); - } - // Hide local only communities from unauthenticated users - query = query.filter(community::visibility.eq(CommunityVisibility::Public)); + query = query.filter(instance_block::person_id.is_null()); + query = query.filter(community_block::person_id.is_null()); + if !(options.local_user.show_nsfw(site) || options.show_nsfw) { + query = query.filter(community::nsfw.eq(false)); } + query = visible_communities_only(options.local_user.person_id(), query); + let (limit, offset) = limit_and_offset(options.page, options.limit)?; query .limit(limit) diff --git a/crates/routes/src/feeds.rs b/crates/routes/src/feeds.rs index 5e3db357a..f08f28c4a 100644 --- a/crates/routes/src/feeds.rs +++ b/crates/routes/src/feeds.rs @@ -355,7 +355,7 @@ async fn get_feed_front( let posts = PostQuery { listing_type: (Some(ListingType::Subscribed)), - local_user: (Some(&local_user)), + local_user: (Some(&local_user.local_user)), sort: (Some(*sort_type)), limit: (Some(*limit)), page: (Some(*page)), diff --git a/crates/utils/translations b/crates/utils/translations index b3bdd9cf7..ee2cffac8 160000 --- a/crates/utils/translations +++ b/crates/utils/translations @@ -1 +1 @@ -Subproject commit b3bdd9cf78a234438dcc7ccb904739280eda5915 +Subproject commit ee2cffac809ad466644f061ad79ac577b6c2e4fd diff --git a/docker/Dockerfile b/docker/Dockerfile index c252204d4..5125e3c3c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -# syntax=docker/dockerfile:1.7 +# syntax=docker/dockerfile:1.8 ARG RUST_VERSION=1.78 ARG CARGO_BUILD_FEATURES=default ARG RUST_RELEASE_MODE=debug diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 3d965e911..655182e1a 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -23,7 +23,7 @@ services: lemmy: # use "image" to pull down an already compiled lemmy. make sure to comment out "build". - # image: dessalines/lemmy:0.19.4 + # image: dessalines/lemmy:0.19.5 # platform: linux/x86_64 # no arm64 support. uncomment platform if using m1. # use "build" to build your local lemmy server image for development. make sure to comment out "image". # run: docker compose up --build @@ -53,7 +53,7 @@ services: lemmy-ui: # use "image" to pull down an already compiled lemmy-ui. make sure to comment out "build". - image: dessalines/lemmy-ui:0.19.4 + image: dessalines/lemmy-ui:0.19.5 # platform: linux/x86_64 # no arm64 support. uncomment platform if using m1. # use "build" to build your local lemmy ui image for development. make sure to comment out "image". # run: docker compose up --build @@ -75,7 +75,7 @@ services: init: true pictrs: - image: asonix/pictrs:0.5.14 + image: asonix/pictrs:0.5.16 # this needs to match the pictrs url in lemmy.hjson hostname: pictrs # we can set options to pictrs like this, here we set max. image size and forced format for conversion diff --git a/docker/federation/docker-compose.yml b/docker/federation/docker-compose.yml index fe243aa52..72a8145ec 100644 --- a/docker/federation/docker-compose.yml +++ b/docker/federation/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" x-ui-default: &ui-default init: true - image: dessalines/lemmy-ui:0.19.4 + image: dessalines/lemmy-ui:0.19.5 # assuming lemmy-ui is cloned besides lemmy directory # build: # context: ../../../lemmy-ui @@ -49,7 +49,7 @@ services: pictrs: restart: always - image: asonix/pictrs:0.5.14 + image: asonix/pictrs:0.5.16 user: 991:991 volumes: - ./volumes/pictrs_alpha:/mnt:Z diff --git a/migrations/2024-06-17-160323_fix_post_aggregates_featured_local/down.sql b/migrations/2024-06-17-160323_fix_post_aggregates_featured_local/down.sql new file mode 100644 index 000000000..9ca12fc18 --- /dev/null +++ b/migrations/2024-06-17-160323_fix_post_aggregates_featured_local/down.sql @@ -0,0 +1,3 @@ +SELECT +; + diff --git a/migrations/2024-06-17-160323_fix_post_aggregates_featured_local/up.sql b/migrations/2024-06-17-160323_fix_post_aggregates_featured_local/up.sql new file mode 100644 index 000000000..3bb6e16b1 --- /dev/null +++ b/migrations/2024-06-17-160323_fix_post_aggregates_featured_local/up.sql @@ -0,0 +1,11 @@ +-- Fix rows that were not updated because of the old incorrect trigger +UPDATE + post_aggregates +SET + featured_local = post.featured_local +FROM + post +WHERE + post.id = post_aggregates.post_id + AND post.featured_local != post_aggregates.featured_local; +