diff --git a/.gitignore b/.gitignore index ea8c4bf..2c87efa 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /target +*.snap.new +*.pending-snap diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ca30bf8..f11d4da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,3 +11,12 @@ repos: args: ["--all"] - id: cargo-clippy args: ["--all", "--all-features", "--", "-D", "warnings"] + + - repo: local + hooks: + - id: ui-menu + name: ui/menu lint+fmt + language: system + files: ^ui/menu/ + pass_filenames: false + entry: npm run --prefix ui/menu pc diff --git a/.woodpecker.yml b/.woodpecker.yml index 04cbc96..2c3f5d6 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -4,8 +4,9 @@ pipeline: environment: - VERSION=${CI_COMMIT_TAG} commands: - - npm ci --prefix ui/talon-client - - npm ci --prefix ui/menu + - npm install --prefix ui/talon-client + - npm install --prefix ui/menu + - npm run ci --prefix ui/menu - npm run build --prefix ui/menu test-server: @@ -48,6 +49,16 @@ pipeline: event: tag tag: v* + compress-release: + image: debian:latest + commands: + - mkdir target/upload + - gzip -c target/x86_64-unknown-linux-musl/release/talon > target/upload/talon-amd64.gz + - gzip -c target/aarch64-unknown-linux-musl/release/talon > target/upload/talon-aarch64.gz + when: + event: tag + tag: v* + publish-release: group: publish image: woodpeckerci/plugin-gitea-release:latest @@ -57,6 +68,9 @@ pipeline: from_secret: GITEA_KEY title: "Talon ${CI_COMMIT_TAG}" note: "./target/CHANGES.md" + files: + - "target/upload/talon-amd64.gz" + - "target/upload/talon-aarch64.gz" when: event: tag tag: v* diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c3095f..2bec355 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,78 @@ All notable changes to this project will be documented in this file. +## [0.4.2] - 2023-07-22 + +### Bug Fixes + +- Container entrypoint +- Website version ordering + +### Miscellaneous Tasks + +- Fix npm pre-commit hook + +## [0.4.1] - 2023-04-05 + +### Bug Fixes + +- Stop propagation of key events on menu search +- Use sh +- Remove version prefix from "latest" tag +- Detect CI commit SHA +- Use better abbreviations for page names + +### Features + +- Add upload script + +## [0.4.0] - 2023-04-02 + +### Features + +- [**breaking**] Switch database format to CBOR (not compatible with previous format) + +### Miscellaneous Tasks + +- Hide version-bump messages + +## [0.3.0] - 2023-04-02 + +### Bug Fixes + +- Move menu bar down +- Set icon size to 48px + +### Features + +- Add last-modified date to all GET responses +- Add last-version tag to PageInfoModal +- Purge file storage daily + +### Miscellaneous Tasks + +- Update cargo dependencies +- Bump version -> 0.3.0 + +## [0.2.0] - 2023-04-01 + +### Bug Fixes + +- Revert svelte-preprocess update +- Delete versions from db when upload failed +- Change version info icon +- Smaller menu button on mobile +- Release script + +### Features + +- Add instance info dialog +- Add website icons + +### Miscellaneous Tasks + +- Publish release on gitea + ## [0.1.0] - 2023-03-31 ### Bug Fixes diff --git a/Cargo.lock b/Cargo.lock index fe96e58..a2bc278 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,15 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -10,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aead" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c192eb8f11fc081b0fe4259ba5af04217d4e0faddd02417310a927911abd7c8" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ "crypto-common", "generic-array", @@ -20,9 +29,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if", "cipher", @@ -31,9 +40,9 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c" +checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" dependencies = [ "aead", "aes", @@ -45,9 +54,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" dependencies = [ "memchr", ] @@ -67,6 +76,12 @@ dependencies = [ "alloc-no-stdlib", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -76,6 +91,55 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" + +[[package]] +name = "anstyle-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +dependencies = [ + "anstyle", + "windows-sys 0.48.0", +] + [[package]] name = "async-compression" version = "0.3.15" @@ -92,9 +156,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad445822218ce64be7a341abfb0b1ea43b5c23aa83902542a4542e78309d8e5e" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ "async-stream-impl", "futures-core", @@ -103,24 +167,24 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4655ae1a7b0cdf149156f780c5bf3f1352bc53cbd9e0a361a7ef7b22947e965" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] name = "async-trait" -version = "0.1.64" +version = "0.1.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" +checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] @@ -129,6 +193,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" version = "0.13.1" @@ -143,9 +222,15 @@ checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" + +[[package]] +name = "bit_field" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" [[package]] name = "bitflags" @@ -154,10 +239,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "block-buffer" -version = "0.10.3" +name = "bitflags" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] @@ -185,9 +276,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + +[[package]] +name = "bytemuck" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" [[package]] name = "byteorder" @@ -245,21 +342,21 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ + "android-tzdata", "iana-time-zone", - "num-integer", "num-traits", "winapi", ] [[package]] name = "cipher" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", @@ -267,50 +364,65 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.8" +version = "4.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5" +checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d" dependencies = [ - "bitflags", + "clap_builder", "clap_derive", - "clap_lex", - "is-terminal", "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", "strsim", - "termcolor", ] [[package]] name = "clap_derive" -version = "4.1.8" +version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] name = "clap_lex" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" + +[[package]] +name = "clokwerk" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd108d365fcb6d7eddf17a6718eb6a33db18ba4178f8cc6b667f480710f10d76" dependencies = [ - "os_str_bytes", + "chrono", ] [[package]] -name = "codespan-reporting" -version = "0.11.1" +name = "color_quant" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "compressible" @@ -323,14 +435,14 @@ dependencies = [ [[package]] name = "console" -version = "0.15.5" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" dependencies = [ "encode_unicode", "lazy_static", "libc", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -341,18 +453,18 @@ checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" [[package]] name = "const_format" -version = "0.2.30" +version = "0.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7309d9b4d3d2c0641e018d449232f2e28f1b22933c137f157d3dbc14228b8c0e" +checksum = "c990efc7a285731f9a4378d81aff2f0e85a2c8781a05ef0f8baa8dac54d0ff48" dependencies = [ "const_format_proc_macros", ] [[package]] name = "const_format_proc_macros" -version = "0.2.29" +version = "0.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f47bf7270cf70d370f8f98c1abb6d2d4cf60a6845d30e05bfb90c6568650" +checksum = "e026b6ce194a874cb9cf32cd5772d1ef9767cc8fcb5765948d74f37a9d8b2bf6" dependencies = [ "proc-macro2", "quote", @@ -385,15 +497,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -408,10 +520,31 @@ dependencies = [ ] [[package]] -name = "crossbeam-epoch" -version = "0.9.13" +name = "crossbeam-channel" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", @@ -422,13 +555,19 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + [[package]] name = "crypto-common" version = "0.1.6" @@ -449,55 +588,11 @@ dependencies = [ "cipher", ] -[[package]] -name = "cxx" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d3488e7665a7a483b57e25bdd90d0aeb2bc7608c8d0346acf2ad3f1caf1d62" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48fcaf066a053a41a81dfb14d57d99738b767febb8b735c3016e469fac5da690" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef98b8b717a829ca5603af80e1f9e2e48013ab227b68ef37872ef84ee479bf" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "086c685979a698443656e5cf7856c95c642295a38599f12fb1ff76fb28d19892" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "darling" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0808e1bd8671fb44a113a14e13497557533369847788fa2ae912b6ebfce9fa8" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ "darling_core", "darling_macro", @@ -505,27 +600,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "001d80444f28e193f30c2f293455da62dcf9a6b29918a4253152ae2b1de592cb" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn", + "syn 1.0.109", ] [[package]] name = "darling_macro" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b36230598a2d5de7ec1c6f51f72d8a99a9208daff41de2084d06e3fd3ea56685" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ "darling_core", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -538,20 +633,26 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn", + "syn 1.0.109", ] [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", "subtle", ] +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + [[package]] name = "encode_unicode" version = "0.3.6" @@ -568,14 +669,20 @@ dependencies = [ ] [[package]] -name = "errno" -version = "0.2.8" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -589,36 +696,71 @@ dependencies = [ ] [[package]] -name = "fastrand" -version = "1.9.0" +name = "exr" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +checksum = "d1e481eb11a482815d3e9d618db8c42a93207134662873809335a92327440c18" dependencies = [ - "instant", + "bit_field", + "flume", + "half 2.2.1", + "lebe", + "miniz_oxide", + "rayon-core", + "smallvec", + "zune-inflate", +] + +[[package]] +name = "fastrand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + +[[package]] +name = "fdeflate" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" +dependencies = [ + "simd-adler32", ] [[package]] name = "filetime" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412" +checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys 0.45.0", + "redox_syscall 0.2.16", + "windows-sys 0.48.0", ] [[package]] name = "flate2" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", "miniz_oxide", ] +[[package]] +name = "flume" +version = "0.10.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" +dependencies = [ + "futures-core", + "futures-sink", + "nanorand", + "pin-project 1.1.2", + "spin", +] + [[package]] name = "fnv" version = "1.0.7" @@ -627,9 +769,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -646,9 +788,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -661,9 +803,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -671,15 +813,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -688,32 +830,32 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] name = "futures-sink" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-timer" @@ -723,9 +865,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -748,7 +890,7 @@ dependencies = [ "bytes 0.5.6", "futures", "memchr", - "pin-project", + "pin-project 0.4.30", ] [[package]] @@ -762,9 +904,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -772,13 +914,15 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -791,13 +935,29 @@ dependencies = [ "polyval", ] +[[package]] +name = "gif" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" +dependencies = [ + "color_quant", + "weezl", +] + +[[package]] +name = "gimli" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" + [[package]] name = "git2" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf7f68c2995f392c49fffb4f95ae2c873297830eb25c6bc4c114ce8f4562acc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", "libgit2-sys", "log", @@ -806,9 +966,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.15" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes 1.4.0", "fnv", @@ -816,19 +976,40 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", "tracing", ] +[[package]] +name = "half" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + +[[package]] +name = "half" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" +dependencies = [ + "crunchy", +] + [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "headers" version = "0.3.8" @@ -836,7 +1017,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ "base64 0.13.1", - "bitflags", + "bitflags 1.3.2", "bytes 1.4.0", "headers-core", "http", @@ -862,18 +1043,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -886,9 +1058,9 @@ dependencies = [ [[package]] name = "hex-literal" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "hkdf" @@ -944,9 +1116,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.24" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes 1.4.0", "futures-channel", @@ -968,26 +1140,25 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows", ] [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] @@ -998,22 +1169,51 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", ] [[package]] -name = "indexmap" -version = "1.9.2" +name = "image" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a" +dependencies = [ + "bytemuck", + "byteorder", + "color_quant", + "exr", + "gif", + "jpeg-decoder", + "num-rational", + "num-traits", + "png", + "qoi", + "tiff", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", ] [[package]] @@ -1027,9 +1227,9 @@ dependencies = [ [[package]] name = "insta" -version = "1.28.0" +version = "1.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea5b3894afe466b4bcf0388630fc15e11938a6074af0cd637c825ba2ec8a099" +checksum = "a0770b0a3d4c70567f0d58331f3088b0e4c4f56c9b8d764efe654b4a5d46de3a" dependencies = [ "console", "lazy_static", @@ -1051,26 +1251,15 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "io-lifetimes" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" -dependencies = [ - "libc", - "windows-sys 0.45.0", -] - [[package]] name = "is-terminal" -version = "0.4.4" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", + "hermit-abi", "rustix", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -1081,24 +1270,33 @@ checksum = "06d198e9919d9822d5f7083ba8530e04de87841eaf21ead9af8f2304efd57c89" [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" dependencies = [ "libc", ] [[package]] -name = "js-sys" -version = "0.3.61" +name = "jpeg-decoder" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" +dependencies = [ + "rayon", +] + +[[package]] +name = "js-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -1110,10 +1308,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "libc" -version = "0.2.139" +name = "lebe" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" + +[[package]] +name = "libc" +version = "0.2.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libgit2-sys" @@ -1129,9 +1333,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" +checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" dependencies = [ "cc", "libc", @@ -1139,15 +1343,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "link-cplusplus" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" -dependencies = [ - "cc", -] - [[package]] name = "linked-hash-map" version = "0.5.6" @@ -1156,15 +1351,15 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.1.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -1172,12 +1367,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "memchr" @@ -1187,18 +1379,18 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" @@ -1212,30 +1404,30 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", + "simd-adler32", ] [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", "wasi", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "multer" -version = "2.0.4" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed4198ce7a4cbd2a57af78d28c6fbb57d81ac5f1d6ad79ac6c5587419cbdf22" +checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" dependencies = [ "bytes 1.4.0", "encoding_rs", @@ -1251,12 +1443,12 @@ dependencies = [ ] [[package]] -name = "nom8" -version = "0.2.0" +name = "nanorand" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" dependencies = [ - "memchr", + "getrandom", ] [[package]] @@ -1280,21 +1472,32 @@ dependencies = [ ] [[package]] -name = "num-traits" -version = "0.2.15" +name = "num-rational" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi", "libc", ] @@ -1308,10 +1511,19 @@ dependencies = [ ] [[package]] -name = "once_cell" -version = "1.17.1" +name = "object" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -1319,12 +1531,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" -[[package]] -name = "os_str_bytes" -version = "6.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" - [[package]] name = "overload" version = "0.1.1" @@ -1349,7 +1555,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.7", + "parking_lot_core 0.9.8", ] [[package]] @@ -1361,30 +1567,24 @@ dependencies = [ "cfg-if", "instant", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "winapi", ] [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.3.5", "smallvec", - "windows-sys 0.45.0", + "windows-targets 0.48.1", ] -[[package]] -name = "paste" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" - [[package]] name = "path_macro" version = "1.0.0" @@ -1393,15 +1593,15 @@ checksum = "a6e819bbd49d5939f682638fa54826bf1650abddcd65d000923de8ad63cc7d15" [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.5.6" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cbd939b234e95d72bc393d51788aec68aeeb5d51e748ca08ff3aad58cb722f7" +checksum = "0d2d1d55045829d65aad9d389139882ad623b33b904e7c9f1b10c5b8927298e5" dependencies = [ "thiserror", "ucd-trie", @@ -1409,9 +1609,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.5.6" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a81186863f3d0a27340815be8f2078dd8050b14cd71913db9fbda795e5f707d7" +checksum = "5f94bca7e7a599d89dea5dfa309e217e7906c3c007fb9c3299c40b10d6a315d3" dependencies = [ "pest", "pest_generator", @@ -1419,22 +1619,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.5.6" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a1ef20bf3193c15ac345acb32e26b3dc3223aff4d77ae4fc5359567683796b" +checksum = "99d490fe7e8556575ff6911e45567ab95e71617f43781e5c05490dc8d75c965c" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] name = "pest_meta" -version = "2.5.6" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e3b284b1f13a20dc5ebc90aff59a51b8d7137c221131b52a7260c08cbc1cc80" +checksum = "2674c66ebb4b4d9036012091b537aae5878970d6999f81a265034d85b136b341" dependencies = [ "once_cell", "pest", @@ -1447,7 +1647,16 @@ version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ef0f924a5ee7ea9cbcea77529dba45f8a9ba9f622419fe3386ca581a3ae9d5a" dependencies = [ - "pin-project-internal", + "pin-project-internal 0.4.30", +] + +[[package]] +name = "pin-project" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" +dependencies = [ + "pin-project-internal 1.1.2", ] [[package]] @@ -1458,14 +1667,25 @@ checksum = "851c8d0ce9bebe43790dedfc86614c23494ac9f423dd618d3a61fc693eafe61e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" [[package]] name = "pin-utils" @@ -1475,15 +1695,28 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[package]] +name = "png" +version = "0.17.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59871cc5b6cce7eaccca5a802b4173377a1c2ba90654246789a8fa2334426d11" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] [[package]] name = "poem" -version = "1.3.55" +version = "1.3.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0608069d4999c3c02d49dff261663f2e73a8f7b00b7cd364fb5e93e419dafa1" +checksum = "0a56df40b79ebdccf7986b337f9b0e51ac55cd5e9d21fb20b6aa7c7d49741854" dependencies = [ "async-trait", "bytes 1.4.0", @@ -1492,8 +1725,10 @@ dependencies = [ "futures-util", "headers", "http", + "httpdate", "hyper", "mime", + "mime_guess", "multer", "parking_lot 0.12.1", "percent-encoding", @@ -1519,23 +1754,23 @@ dependencies = [ [[package]] name = "poem-derive" -version = "1.3.55" +version = "1.3.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b839bad877aa933dd00901abd127a44496130e3def48e079d60e43f2c8a33cc" +checksum = "1701f977a2d650a03df42c053686ea0efdb83554f34c7b026b89383c0a1b7846" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "poem-openapi" -version = "2.0.26" +version = "2.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1077defedfd8ff15990bb42993970ac75bc46dd8a5b3c0b452ab4e2041b825a4" +checksum = "3e26f78b6195ea1b7a16f46bda1961c598e5a66912f2aa1b8b7a2f395aebb9fc" dependencies = [ - "base64 0.21.0", + "base64 0.21.2", "bytes 1.4.0", "derive_more", "futures-util", @@ -1556,27 +1791,27 @@ dependencies = [ [[package]] name = "poem-openapi-derive" -version = "2.0.26" +version = "2.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bf9dc3b9c42bb8744bc633f9581f740b429122e1840fa37c06beeefc35a719" +checksum = "88c3e2975c930dc72c024e75b230c3b6058fb3a746d5739b83aa8f28ab1a42d4" dependencies = [ "darling", "http", - "indexmap", + "indexmap 1.9.3", "mime", "proc-macro-crate", "proc-macro2", "quote", "regex", - "syn", + "syn 1.0.109", "thiserror", ] [[package]] name = "polyval" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" dependencies = [ "cfg-if", "cpufeatures", @@ -1592,47 +1827,32 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro-crate" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit 0.18.1", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", + "toml_edit", ] [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] +[[package]] +name = "qoi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] + [[package]] name = "quick-xml" version = "0.26.0" @@ -1645,9 +1865,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.23" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" dependencies = [ "proc-macro2", ] @@ -1682,20 +1902,63 @@ dependencies = [ "getrandom", ] +[[package]] +name = "rayon" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + [[package]] name = "redox_syscall" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", ] [[package]] name = "regex" -version = "1.7.1" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" dependencies = [ "aho-corasick", "memchr", @@ -1704,9 +1967,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "rfc7239" @@ -1717,28 +1980,6 @@ dependencies = [ "uncased", ] -[[package]] -name = "rmp" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44519172358fd6d58656c86ab8e7fbc9e1490c3e8f14d35ed78ca0dd07403c9f" -dependencies = [ - "byteorder", - "num-traits", - "paste", -] - -[[package]] -name = "rmp-serde" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5b13be192e0220b8afb7222aa5813cb62cc269ebb5cac346ca6487681d2913e" -dependencies = [ - "byteorder", - "rmp", - "serde", -] - [[package]] name = "ron" version = "0.7.1" @@ -1746,7 +1987,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a" dependencies = [ "base64 0.13.1", - "bitflags", + "bitflags 1.3.2", "serde", ] @@ -1772,15 +2013,15 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn", + "syn 1.0.109", "unicode-ident", ] [[package]] name = "rust-embed" -version = "6.6.1" +version = "6.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b68543d5527e158213414a92832d2aab11a84d2571a5eb021ebe22c43aab066" +checksum = "a36224c3276f8c4ebc8c20f158eca7ca4359c8db89991c4925132aaaf6702661" dependencies = [ "hex", "mime_guess", @@ -1793,27 +2034,33 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "6.5.0" +version = "6.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4e0f0ced47ded9a68374ac145edd65a6c1fa13a96447b873660b2a568a0fd7" +checksum = "49b94b81e5b2c284684141a2fb9e2a31be90638caf040bf9afbc5a0416afe1ac" dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn", + "syn 2.0.27", "walkdir", ] [[package]] name = "rust-embed-utils" -version = "7.5.0" +version = "7.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512b0ab6853f7e14e3c8754acb43d6f748bb9ced66aa5915a6553ac8213f7731" +checksum = "9d38ff6bf570dc3bb7100fce9f7b60c33fa71d80e88da3f2580df4ff2bdded74" dependencies = [ "sha2", "walkdir", ] +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc_version" version = "0.4.0" @@ -1825,23 +2072,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.8" +version = "0.38.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" +checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" dependencies = [ - "bitflags", + "bitflags 2.3.3", "errno", - "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -1854,47 +2100,51 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "scratch" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "semver" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.174" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "3b88756493a5bd5e5395d53baa70b194b05764ab85b59e43e4b8f4e1192fa9b1" dependencies = [ "serde_derive", ] [[package]] -name = "serde_derive" -version = "1.0.152" +name = "serde_cbor" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half 1.8.2", + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.174" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e5c3a298c7f978e53536f95a63bdc4c4a64550582f31a0359a9afda6aede62e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] name = "serde_json" -version = "1.0.93" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" +checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" dependencies = [ "itoa", "ryu", @@ -1903,9 +2153,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" dependencies = [ "serde", ] @@ -1924,11 +2174,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.17" +version = "0.9.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb06d4b6cdaef0e0c51fa881acb721bed3c924cfaa71d9c94a3b771dfdf6567" +checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" dependencies = [ - "indexmap", + "indexmap 2.0.0", "itoa", "ryu", "serde", @@ -1948,9 +2198,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", @@ -1988,6 +2238,12 @@ dependencies = [ "libc", ] +[[package]] +name = "simd-adler32" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f" + [[package]] name = "similar" version = "2.2.1" @@ -2021,15 +2277,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -2037,9 +2293,12 @@ dependencies = [ [[package]] name = "spin" -version = "0.9.5" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dccf47db1b41fa1573ed27ccf5e08e3ca771cb994f776668c5ebda893b248fc" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] [[package]] name = "sse-codec" @@ -2061,9 +2320,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" @@ -2076,18 +2335,31 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "talon" -version = "0.1.0" +version = "0.4.2" dependencies = [ "async-compression", "brotli", "clap", + "clokwerk", "compressible", "flate2", "hex", "hex-literal", "httpdate", + "image", "insta", "log", "mime_guess", @@ -2096,10 +2368,10 @@ dependencies = [ "poem", "poem-openapi", "regex", - "rmp-serde", "rstest", "rust-embed", "serde", + "serde_cbor", "serde_json", "sha2", "shadow-rs", @@ -2119,9 +2391,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +checksum = "ec96d2ffad078296368d46ff1cb309be1c23c513b4ab0e22a45de0185275ac96" dependencies = [ "filetime", "libc", @@ -2142,44 +2414,35 @@ checksum = "921f1e9c427802414907a48b21a6504ff6b3a15a1a3cf37e699590949ad9befc" [[package]] name = "tempfile" -version = "3.4.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" +checksum = "5486094ee78b2e5038a6382ed7645bc084dc2ec433426ca4c3cb61e2007b8998" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", + "redox_syscall 0.3.5", "rustix", - "windows-sys 0.42.0", -] - -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", + "windows-sys 0.48.0", ] [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] @@ -2193,10 +2456,21 @@ dependencies = [ ] [[package]] -name = "time" -version = "0.3.20" +name = "tiff" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" +checksum = "7449334f9ff2baf290d55d73983a7d6fa15e01198faef72af07e2a8db851e471" +dependencies = [ + "flate2", + "jpeg-decoder", + "weezl", +] + +[[package]] +name = "time" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" dependencies = [ "itoa", "libc", @@ -2208,15 +2482,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" dependencies = [ "time-core", ] @@ -2238,39 +2512,39 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.25.0" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ "autocfg", + "backtrace", "bytes 1.4.0", "libc", - "memchr", "mio", "num_cpus", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] name = "tokio-stream" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -2292,9 +2566,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes 1.4.0", "futures-core", @@ -2307,52 +2581,35 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.2" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7afcae9e3f0fe2c370fd4657108972cbb2fa9db1b9f84849cefd80741b01cb6" +checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" dependencies = [ "serde", "serde_spanned", - "toml_datetime 0.6.1", - "toml_edit 0.19.4", + "toml_datetime", + "toml_edit", ] [[package]] name = "toml_datetime" -version = "0.5.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" - -[[package]] -name = "toml_datetime" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.18.1" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ - "indexmap", - "nom8", - "toml_datetime 0.5.1", -] - -[[package]] -name = "toml_edit" -version = "0.19.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1eb0622d28f4b9c90adc4ea4b2b46b47663fde9ac5fafcb14a1369d5508825" -dependencies = [ - "indexmap", + "indexmap 2.0.0", "serde", "serde_spanned", - "toml_datetime 0.6.1", + "toml_datetime", "winnow", ] @@ -2376,20 +2633,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", "valuable", @@ -2408,9 +2665,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" +checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" dependencies = [ "nu-ansi-term", "sharded-slab", @@ -2443,9 +2700,9 @@ dependencies = [ [[package]] name = "tzdb" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4b882d864be6a5d7c3c916719944458b1e03c85f86dbc825ec98155117c4408" +checksum = "ec758958f2fb5069cd7fae385be95cc8eceb8cdfd270c7d14de6034f0108d99e" dependencies = [ "iana-time-zone", "tz-rs", @@ -2453,15 +2710,15 @@ dependencies = [ [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "uncased" -version = "0.9.7" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b01702b0fd0b3fadcf98e098780badda8742d4f4a7676615cad90e8ac73622" +checksum = "9b9bc53168a4be7402ab86c3aad243a84dd7381d09be0eddc81280c1da95ca68" dependencies = [ "version_check", ] @@ -2477,15 +2734,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.10" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -2496,12 +2753,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - [[package]] name = "unicode-xid" version = "0.2.4" @@ -2510,9 +2761,9 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "universal-hash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3160b73c9a19f7e2939a2fdad446c57c1bbbbf4d919d3213ff1267a580d8b5" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", "subtle", @@ -2520,21 +2771,27 @@ dependencies = [ [[package]] name = "unsafe-libyaml" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc7ed8ba44ca06be78ea1ad2c3682a43349126c8818054231ee6f4748012aed2" +checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" [[package]] name = "url" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "valuable" version = "0.1.0" @@ -2555,22 +2812,20 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -2582,9 +2837,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2592,24 +2847,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn", + "syn 2.0.27", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2617,22 +2872,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + +[[package]] +name = "weezl" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" [[package]] name = "winapi" @@ -2666,18 +2927,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-sys" -version = "0.42.0" +name = "windows" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows-targets 0.48.1", ] [[package]] @@ -2686,71 +2941,137 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.1", ] [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.3.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf09497b8f8b5ac5d3bb4d05c0a99be20f26fd3d5f2db7b0716e946d5103658" +checksum = "81fac9742fd1ad1bd9643b991319f72dd031016d44b77039a26977eb667141e7" dependencies = [ "memchr", ] @@ -2775,9 +3096,9 @@ dependencies = [ [[package]] name = "zip" -version = "0.6.4" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0445d0fbc924bb93539b4316c11afb121ea39296f99a3c4c9edad09e3658cdef" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ "byteorder", "bzip2", @@ -2808,11 +3129,20 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.7+zstd.1.5.4" +version = "2.0.8+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94509c3ba2fe55294d752b79842c530ccfab760192521df74a081a78d2b3c7f5" +checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" dependencies = [ "cc", "libc", "pkg-config", ] + +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] diff --git a/Cargo.toml b/Cargo.toml index c05d204..798bd12 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "talon" -version = "0.1.0" +version = "0.4.2" edition = "2021" authors = ["ThetaDev "] license = "MIT" @@ -10,13 +10,13 @@ build = "build.rs" default-run = "talon" [dependencies] -poem = "1.3.55" +poem = { version = "1.3.55", features = ["static-files"] } poem-openapi = { version = "2.0.26", features = ["time", "swagger-ui"] } tokio = { version = "1.25.0", features = ["rt-multi-thread", "fs", "signal"] } sled = "0.34.7" serde = "1.0.152" serde_json = "1.0.93" -rmp-serde = "1.1.1" +serde_cbor = "0.11.2" toml = "0.7.2" thiserror = "1.0.38" time = { version = "0.3.15", features = [ @@ -27,7 +27,7 @@ time = { version = "0.3.15", features = [ httpdate = "1.0.2" sha2 = "0.10.6" path_macro = "1.0.0" -hex-literal = "0.3.4" +hex-literal = "0.4.0" hex = { version = "0.4.3", features = ["serde"] } temp-dir = "0.1.11" zip = { version = "0.6.4", default-features = false, features = [ @@ -53,6 +53,8 @@ clap = { version = "4.1.8", features = ["derive"] } shadow-rs = "0.21.0" walkdir = "2.3.2" rust-embed = { version = "6.6.1", features = ["poem-ex"] } +image = "0.24.6" +clokwerk = { version = "0.4.0", default-features = false } [dev-dependencies] rstest = "0.17.0" diff --git a/Justfile b/Justfile index 6b3f524..5da99d0 100644 --- a/Justfile +++ b/Justfile @@ -18,12 +18,13 @@ oai-doc: cargo run --bin openapi # Generate the JS API client -oai-client: +oai-client: && npm-setup + rm -rf ui/menu/node_modules/talon-client openapi-generator-cli generate -i openapi.json -g typescript-fetch -o ui/talon-client -p "npmName=talon-client" npm-setup: - npm ci --prefix ui/talon-client - npm ci --prefix ui/menu + npm install --prefix ui/talon-client + npm install --prefix ui/menu # Start the dev server for the sidebar menu menu-dev: @@ -37,7 +38,7 @@ release: if [ -n "$(git status --porcelain)" ]; then echo "Workdir must be clean"; exit 1; fi if git rev-parse "v{{version}}" >/dev/null 2>&1; then echo "Version tag v{{version}} already exists"; exit 1; fi - if `file CHANGELOG.md`; then git-cliff --tag "v{{version}}" --unreleased --prepend CHANGELOG.md; else git-cliff --tag "v{{version}}" --unreleased --output CHANGELOG.md; fi + if [ -f "CHANGELOG.md" ]; then git-cliff --tag "v{{version}}" --unreleased --prepend CHANGELOG.md; else git-cliff --tag "v{{version}}" --unreleased --output CHANGELOG.md; fi git add CHANGELOG.md git commit -m "chore(release): prepare for v{{version}}" diff --git a/assets/icon.png b/assets/icon.png new file mode 100644 index 0000000..e0a335f Binary files /dev/null and b/assets/icon.png differ diff --git a/cliff.toml b/cliff.toml index 72270cf..81432d7 100644 --- a/cliff.toml +++ b/cliff.toml @@ -48,7 +48,7 @@ commit_parsers = [ { message = "^refactor", group = "Refactor"}, { message = "^style", group = "Styling"}, { message = "^test", group = "Testing"}, - { message = "^chore\\(release\\): prepare for", skip = true}, + { message = "^chore\\(release\\):", skip = true}, { message = "(^chore)|(^ci)", group = "Miscellaneous Tasks"}, { body = ".*security", group = "Security"}, ] diff --git a/openapi.json b/openapi.json index bef500b..7c04bc0 100644 --- a/openapi.json +++ b/openapi.json @@ -135,6 +135,70 @@ ] } }, + "/website/{subdomain}/icon": { + "put": { + "summary": "Upload a website icon", + "description": "Supported image formats: png, jpeg, gif, bmp, ico, tiff,\nwebp, pnm, dds, tga, openexr, farbfeld\n\nMaximum upload size: 5MB, 4000 pixels\n\nIcons are resized to 32x32 pixels.", + "parameters": [ + { + "name": "subdomain", + "schema": { + "type": "string" + }, + "in": "path", + "required": true, + "deprecated": false, + "explode": true + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "ApiKeyAuthorization": [] + } + ] + }, + "delete": { + "summary": "Delete a website icon", + "parameters": [ + { + "name": "subdomain", + "schema": { + "type": "string" + }, + "in": "path", + "required": true, + "deprecated": false, + "explode": true + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "ApiKeyAuthorization": [] + } + ] + } + }, "/websites": { "get": { "summary": "Get all publicly listed websites", @@ -522,7 +586,7 @@ "required": [ "stats", "version", - "uptime" + "start_time" ], "properties": { "stats": { @@ -545,10 +609,10 @@ } ] }, - "uptime": { - "type": "integer", - "format": "uint64", - "description": "Current uptime of the server in seconds" + "start_time": { + "type": "string", + "format": "date-time", + "description": "Start time of the server" } } }, @@ -693,7 +757,8 @@ "subdomain", "name", "created_at", - "visibility" + "visibility", + "has_icon" ], "properties": { "subdomain": { @@ -741,6 +806,10 @@ "description": "Icon for the source link" } ] + }, + "has_icon": { + "type": "boolean", + "description": "Does the website have an icon?" } } }, diff --git a/scripts/build_container.sh b/scripts/build_container.sh index 3f6301d..b7392fe 100755 --- a/scripts/build_container.sh +++ b/scripts/build_container.sh @@ -41,7 +41,8 @@ for arch in "${ARCHITECTURES[@]}"; do # Finalize container buildah umount "$container" - buildah config --entrypoint "/talon" --cmd "run -d /data" --arch "$arch" --port 3000 --author "ThetaDev" "$container" + # entrypoint syntax: see issue https://github.com/containers/buildah/issues/1768 + buildah config --entrypoint '["/talon"]' --cmd "run -d /data" --arch "$arch" --port 3000 --author "ThetaDev" "$container" buildah commit "$container" "$IMAGE:$arch-$TAG" buildah manifest add "$REGISTRY/$IMAGE:$TAG" "$IMAGE:$arch-$TAG" diff --git a/scripts/upload.sh b/scripts/upload.sh new file mode 100755 index 0000000..c4581bf --- /dev/null +++ b/scripts/upload.sh @@ -0,0 +1,75 @@ +#!/bin/sh +set -e + +# Check for dependencies +which curl > /dev/null +which jq > /dev/null + +# Assert required variables +if [ -z "$TALON_KEY" ]; then echo "TALON_KEY unset"; exit 1; fi +if [ -z "$TALON_URL" ]; then echo "TALON_URL unset"; exit 1; fi +if [ -z "$SUBDOMAIN" ]; then echo "SUBDOMAIN unset"; exit 1; fi + +API_URL="$TALON_URL/api" +API_KEY_H="x-api-key: $TALON_KEY" + +# Check if the website already exists +WEBSITE_STATUS=$(curl --head -o /dev/null -s -w "%{http_code}" "$API_URL/website/$SUBDOMAIN") +if [ "$WEBSITE_STATUS" = "200" ]; then + echo "Website '$SUBDOMAIN' found" +else + # Create the website if it does not exist + if [ -z "$WEBSITE_NAME" ]; then echo "WEBSITE_NAME unset"; exit 1; fi + + CREATE_BODY=$(jq -c --null-input --arg name "$WEBSITE_NAME" --arg color "$WEBSITE_COLOR" \ + --arg visibility "$WEBSITE_VISIBILITY" --arg source_url "$WEBSITE_SOURCE_URL" \ + --arg source_icon "$WEBSITE_SOURCE_ICON" \ + '{"name": $name, "color": $color, "visibility": $visibility, "source_url": $source_url, "source_icon": $source_icon} | delpaths([path(.[]| select(.==""))])') + echo "Creating website '$SUBDOMAIN': $CREATE_BODY" + + curl -Ss --fail -X "PUT" -H "$API_KEY_H" -H "content-type: application/json" --data "$CREATE_BODY" "$API_URL/website/$SUBDOMAIN" +fi + +# Check the upload directory +if [ ! -d "$1" ]; then echo "Upload directory does not exist"; exit 1; fi +if [ ! -f "$1/index.html" ]; then echo "Upload directory does not contain index.html"; exit 1; fi + +# Validate fallback page param +if [ "$FALLBACK" ] && [ ! -f "$1/$FALLBACK" ]; then echo "fallback page $FALLBACK does not exist"; exit 1; fi + +# Automatically detect fallback pages +if [ -z "$SPA" ] && [ -z "$FALLBACK" ]; then + if [ -f "$1/404.html" ]; then FALLBACK="404.html"; fi + if [ -f "$1/200.html" ]; then SPA=true; FALLBACK="200.html"; fi +fi + +push_arg() { + if [ "$UPLOAD_ARGS" ]; then UPLOAD_ARGS="$UPLOAD_ARGS&"; fi + UPLOAD_ARGS="$UPLOAD_ARGS$1" +} + +if [ "$FALLBACK" ]; then push_arg "fallback=$FALLBACK"; fi +if [ "$SPA" = "true" ]; then push_arg "spa=true"; fi + +if [ "$UPLOAD_ARGS" ]; then UPLOAD_ARGS="?$UPLOAD_ARGS"; fi + +if [ "$CI_COMMIT_SHA" ]; then + echo "Git commit: $CI_COMMIT_SHA" + push_arg "commit=$CI_COMMIT_SHA" +elif GIT_COMMIT=$(git rev-parse HEAD 2> /dev/null); then + echo "Git commit: $GIT_COMMIT" + push_arg "commit=$GIT_COMMIT" +fi + +# Compress website +ARCHIVE=$(mktemp) +tar -cz --directory "$1" --file "$ARCHIVE" . + +# Upload website +echo "Version params: $UPLOAD_ARGS" +echo "Uploading..." +curl --fail -X "POST" -H "$API_KEY_H" -H "content-type: application/octet-stream" --data-binary "@$ARCHIVE" "$API_URL/website/$SUBDOMAIN/upload$UPLOAD_ARGS" + +rm "$ARCHIVE" + +echo "Website uploaded ;-)" diff --git a/src/api.rs b/src/api.rs index 95ed675..15a4176 100644 --- a/src/api.rs +++ b/src/api.rs @@ -63,6 +63,8 @@ pub enum ApiError { InvalidArchiveType, #[error("invalid color")] InvalidColor, + #[error("join error: {0}")] + TokioJoin(#[from] tokio::task::JoinError), } impl ResponseError for ApiError { @@ -72,7 +74,8 @@ impl ResponseError for ApiError { | ApiError::InvalidFallback(_) | ApiError::InvalidArchiveType | ApiError::InvalidColor => StatusCode::BAD_REQUEST, - ApiError::NoAccess => StatusCode::UNAUTHORIZED, + ApiError::NoAccess => StatusCode::FORBIDDEN, + ApiError::TokioJoin(_) => StatusCode::INTERNAL_SERVER_ERROR, } } } @@ -99,11 +102,17 @@ impl TalonApi { &self, talon: Data<&Talon>, subdomain: Path, - ) -> Result> { + ) -> Result>> { talon .db .get_website(&subdomain) - .map(|w| Json(Website::from((subdomain.0, w)))) + .map(|website| { + let modified = website.updated_at; + Response::new(Json(Website::from((subdomain.0, website)))).header( + header::LAST_MODIFIED, + httpdate::fmt_http_date(modified.into()), + ) + }) .map_err(Error::from) } @@ -144,6 +153,64 @@ impl TalonApi { Ok(()) } + /// Upload a website icon + /// + /// Supported image formats: png, jpeg, gif, bmp, ico, tiff, + /// webp, pnm, dds, tga, openexr, farbfeld + /// + /// Maximum upload size: 5MB, 4000 pixels + /// + /// Icons are resized to 32x32 pixels. + #[oai(path = "/website/:subdomain/icon", method = "put")] + async fn website_add_icon( + &self, + auth: ApiKeyAuthorization, + talon: Data<&Talon>, + subdomain: Path, + /// Icon data. + data: Binary>, + ) -> Result<()> { + auth.check_subdomain(&subdomain, Access::Modify)?; + + let t2 = talon.clone(); + let sd = subdomain.clone(); + tokio::task::spawn_blocking(move || { + t2.icons.insert_icon(Cursor::new(data.as_slice()), &sd) + }) + .await + .map_err(ApiError::from)??; + + talon.db.update_website( + &subdomain, + db::model::WebsiteUpdate { + has_icon: Some(true), + ..Default::default() + }, + )?; + Ok(()) + } + + /// Delete a website icon + #[oai(path = "/website/:subdomain/icon", method = "delete")] + async fn website_delete_icon( + &self, + auth: ApiKeyAuthorization, + talon: Data<&Talon>, + subdomain: Path, + ) -> Result<()> { + auth.check_subdomain(&subdomain, Access::Modify)?; + + talon.icons.delete_icon(&subdomain)?; + talon.db.update_website( + &subdomain, + db::model::WebsiteUpdate { + has_icon: Some(false), + ..Default::default() + }, + )?; + Ok(()) + } + /// Delete website #[oai(path = "/website/:subdomain", method = "delete")] async fn website_delete( @@ -199,7 +266,8 @@ impl TalonApi { /// Mimimum visibility of the websites #[oai(default)] visibility: Query, - ) -> Result>> { + ) -> Result>>> { + let modified = talon.db.websites_last_update()?; talon .db .get_websites() @@ -217,7 +285,10 @@ impl TalonApi { Err(_) => true, }) .collect::, _>>() - .map(Json) + .map(|data| { + Response::new(Json(data)) + .header(header::LAST_MODIFIED, httpdate::fmt_http_date(modified)) + }) .map_err(Error::from) } @@ -227,15 +298,19 @@ impl TalonApi { &self, talon: Data<&Talon>, subdomain: Path, - ) -> Result>> { - talon.db.website_exists(&subdomain)?; - talon + ) -> Result>>> { + let website = talon.db.get_website(&subdomain)?; + let mut versions = talon .db .get_website_versions(&subdomain) .map(|r| r.map(Version::from)) - .collect::, _>>() - .map(Json) - .map_err(Error::from) + .collect::, _>>()?; + versions.sort_by_key(|v| v.id); + + Ok(Response::new(Json(versions)).header( + header::LAST_MODIFIED, + httpdate::fmt_http_date(website.updated_at.into()), + )) } /// Get version @@ -245,11 +320,17 @@ impl TalonApi { talon: Data<&Talon>, subdomain: Path, version: Path, - ) -> Result> { + ) -> Result>> { talon .db .get_version(&subdomain, *version) - .map(|v| Json(Version::from((*version, v)))) + .map(|v| { + let create_date = v.created_at; + Response::new(Json(Version::from((*version, v)))).header( + header::LAST_MODIFIED, + httpdate::fmt_http_date(create_date.into()), + ) + }) .map_err(Error::from) } @@ -260,14 +341,19 @@ impl TalonApi { talon: Data<&Talon>, subdomain: Path, version: Path, - ) -> Result>> { - talon.db.version_exists(&subdomain, *version)?; + ) -> Result>>> { + let v = talon.db.get_version(&subdomain, *version)?; talon .db .get_version_files(&subdomain, *version) .map(|r| r.map(VersionFile::from)) .collect::, _>>() - .map(Json) + .map(|r| { + Response::new(Json(r)).header( + header::LAST_MODIFIED, + httpdate::fmt_http_date(v.created_at.into()), + ) + }) .map_err(Error::from) } @@ -325,39 +411,66 @@ impl TalonApi { }, )?; - if data.starts_with(&hex!("1f8b")) { - talon - .storage - .insert_tgz_archive(data.as_slice(), &subdomain, version)?; - } else if data.starts_with(&hex!("504b0304")) { - talon - .storage - .insert_zip_archive(Cursor::new(data.as_slice()), &subdomain, version)?; - } else { - return Err(ApiError::InvalidArchiveType.into()); - } - - // Validata fallback path - if let Some(fallback) = &fallback.0 { - if let Err(e) = + // Try to store the uploaded website + // If this fails, the new version needs to be deleted + fn try_insert( + talon: &Talon, + data: Binary>, + subdomain: &str, + version: u32, + fallback: Option, + ) -> Result<()> { + if data.starts_with(&hex!("1f8b")) { talon .storage - .get_file(&subdomain, version, fallback, &Default::default()) - { - // Remove the bad version - let _ = talon.db.delete_version(&subdomain, version, false); - return Err(ApiError::InvalidFallback(e.to_string()).into()); + .insert_tgz_archive(data.as_slice(), subdomain, version)?; + } else if data.starts_with(&hex!("504b0304")) { + talon.storage.insert_zip_archive( + Cursor::new(data.as_slice()), + subdomain, + version, + )?; + } else { + return Err(Error::from(ApiError::InvalidArchiveType)); } + + // Validata fallback path + if let Some(fallback) = &fallback { + if let Err(e) = + talon + .storage + .get_file(subdomain, version, fallback, &Default::default()) + { + return Err(Error::from(ApiError::InvalidFallback(e.to_string()))); + } + } + Ok(()) } - talon.db.update_website( - &subdomain, - db::model::WebsiteUpdate { - latest_version: Some(Some(version)), - ..Default::default() - }, - )?; - Ok(()) + let t2 = talon.clone(); + let sd = subdomain.clone(); + + match tokio::task::spawn_blocking(move || try_insert(&t2, data, &sd, version, fallback.0)) + .await + .map_err(|e| Error::from(ApiError::from(e))) + { + Ok(Ok(())) => { + talon.db.update_website( + &subdomain, + db::model::WebsiteUpdate { + latest_version: Some(Some(version)), + ..Default::default() + }, + )?; + Ok(()) + } + Err(e) | Ok(Err(e)) => { + // Remove the bad version and decrement the id counter + let _ = talon.db.delete_version(&subdomain, version, false); + let _ = talon.db.decrement_vid(&subdomain, version); + Err(e) + } + } } /// Retrieve a file diff --git a/src/config.rs b/src/config.rs index 4d1288a..ee64b42 100644 --- a/src/config.rs +++ b/src/config.rs @@ -80,10 +80,26 @@ impl Config { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(default)] pub struct ServerCfg { + /// Address to bind the server to + /// + /// Default: `0.0.0.0:3000` pub address: String, + /// Root domain (and port if non-standard) under which Talon is available + /// + /// Default: `localhost:3000` pub root_domain: String, + /// Subdomain used for Talon internals (API, assets) + /// + /// Default: `talon` pub internal_subdomain: String, + /// URL under which the internals are available + /// + /// Default: `http://talon.localhost:3000` pub internal_url: String, + /// Interval in minutes between file storage purges + /// + /// Default: 1440 (24h) + pub purge_interval: u32, } impl Default for ServerCfg { @@ -93,6 +109,7 @@ impl Default for ServerCfg { root_domain: "localhost:3000".to_owned(), internal_subdomain: "talon".to_owned(), internal_url: "http://talon.localhost:3000".to_owned(), + purge_interval: 1440, } } } diff --git a/src/db/mod.rs b/src/db/mod.rs index fb25193..e795ef8 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -30,10 +30,8 @@ struct DbInner { pub enum DbError { #[error("sled db error: {0}")] Sled(#[from] sled::Error), - #[error("msgpack serialization error: {0}")] - Serialize(#[from] rmp_serde::encode::Error), - #[error("msgpack deserialization error: {0}")] - Deserialize(#[from] rmp_serde::decode::Error), + #[error("cbor serialization error: {0}")] + Serialize(#[from] serde_cbor::Error), #[error("json serialization error: {0}")] Json(#[from] serde_json::Error), #[error("{0} with id `{1}` already exists")] @@ -100,7 +98,7 @@ impl Db { for item in self.i.websites.iter() { let (k, v) = item?; let key = Self::key_to_string(k.to_vec())?; - let value = rmp_serde::from_slice::(&v)?; + let value = serde_cbor::from_slice::(&v)?; let dataset = ExportDataset::Website { key, value }; @@ -111,7 +109,7 @@ impl Db { for item in self.i.versions.iter() { let (k, v) = item?; let key = Self::key_to_string(k.to_vec())?; - let value = rmp_serde::from_slice::(&v)?; + let value = serde_cbor::from_slice::(&v)?; let dataset = ExportDataset::Version { key, value }; serde_json::to_writer(&mut writer, &dataset)?; @@ -152,11 +150,11 @@ impl Db { fn import_dataset(&self, ds: ExportDataset) -> Result<()> { match ds { ExportDataset::Website { key, value } => { - let data = rmp_serde::to_vec(&value)?; + let data = serde_cbor::to_vec(&value)?; self.i.websites.insert(key, data)?; } ExportDataset::Version { key, value } => { - let data = rmp_serde::to_vec(&value)?; + let data = serde_cbor::to_vec(&value)?; self.i.versions.insert(key, data)?; } ExportDataset::File { key, value } => { @@ -178,13 +176,13 @@ impl Db { /// Get a website from the database pub fn get_website(&self, subdomain: &str) -> Result { let data = self.i.websites.get(subdomain)?; - data.and_then(|data| rmp_serde::from_slice::(data.as_ref()).ok()) + data.and_then(|data| serde_cbor::from_slice::(data.as_ref()).ok()) .ok_or_else(|| DbError::NotExists("website", subdomain.to_owned())) } /// Insert a new website into the database pub fn insert_website(&self, subdomain: &str, website: &Website) -> Result<()> { - let data = rmp_serde::to_vec(website)?; + let data = serde_cbor::to_vec(website)?; self.i .websites .compare_and_swap(subdomain, None::<&[u8]>, Some(data))? @@ -198,7 +196,7 @@ impl Db { .i .websites .update_and_fetch(subdomain, |data| match data { - Some(data) => match rmp_serde::from_slice::(data) { + Some(data) => match serde_cbor::from_slice::(data) { Ok(mut w) => { let website = website.clone(); w.name = website.name.unwrap_or(w.name); @@ -207,8 +205,10 @@ impl Db { w.visibility = website.visibility.unwrap_or(w.visibility); w.source_url = website.source_url.unwrap_or(w.source_url); w.source_icon = website.source_icon.unwrap_or(w.source_icon); + w.has_icon = website.has_icon.unwrap_or(w.has_icon); + w.updated_at = OffsetDateTime::now_utc(); - rmp_serde::to_vec(&w).ok() + serde_cbor::to_vec(&w).ok() } Err(_) => None, }, @@ -250,7 +250,7 @@ impl Db { self.i.websites.iter().map(|r| { r.map_err(DbError::from).and_then(|(k, v)| { let subdomain = Self::key_to_string(k.to_vec())?; - let website = rmp_serde::from_slice::(&v)?; + let website = serde_cbor::from_slice::(&v)?; Ok((subdomain, website)) }) }) @@ -299,7 +299,7 @@ impl Db { let key = Self::version_key(subdomain, id); let data = self.i.versions.get(&key)?; - data.and_then(|data| rmp_serde::from_slice::(data.as_ref()).ok()) + data.and_then(|data| serde_cbor::from_slice::(data.as_ref()).ok()) .ok_or_else(|| DbError::NotExists("version", key)) } @@ -311,16 +311,16 @@ impl Db { .i .websites .update_and_fetch(subdomain, |data| match data { - Some(data) => match rmp_serde::from_slice::(data) { + Some(data) => match serde_cbor::from_slice::(data) { Ok(mut w) => { w.vid_count += 1; - rmp_serde::to_vec(&w).ok() + serde_cbor::to_vec(&w).ok() } Err(_) => None, }, None => None, })? - .and_then(|data| rmp_serde::from_slice::(&data).ok()); + .and_then(|data| serde_cbor::from_slice::(&data).ok()); let id = match ws { Some(ws) => ws.vid_count, @@ -328,7 +328,7 @@ impl Db { }; let key = Self::version_key(subdomain, id); - let data = rmp_serde::to_vec(version)?; + let data = serde_cbor::to_vec(version)?; self.i .versions .compare_and_swap(&key, None::<&[u8]>, Some(data))? @@ -336,6 +336,27 @@ impl Db { Ok(id) } + /// Decrement the version id counter after a failed insertion. + /// + /// Does not decrement the counter if it does not equal the given value. + pub fn decrement_vid(&self, subdomain: &str, version: u32) -> Result<()> { + self.i + .websites + .update_and_fetch(subdomain, |data| match data { + Some(data) => match serde_cbor::from_slice::(data) { + Ok(mut w) => { + if w.vid_count == version { + w.vid_count -= 1; + } + serde_cbor::to_vec(&w).ok() + } + Err(_) => None, + }, + None => None, + })?; + Ok(()) + } + /// internal method for deleting a version from the database /// /// this method does not lock the db or update the associated website @@ -395,7 +416,7 @@ impl Db { self.i.versions.scan_prefix(key).map(|r| { r.map_err(DbError::from).and_then(|(k, v)| { let (_, id) = Self::split_version_key(k.to_vec())?; - let version = rmp_serde::from_slice::(&v)?; + let version = serde_cbor::from_slice::(&v)?; Ok((id, version)) }) }) diff --git a/src/db/model.rs b/src/db/model.rs index e8f3646..a144e25 100644 --- a/src/db/model.rs +++ b/src/db/model.rs @@ -12,6 +12,8 @@ pub struct Website { pub name: String, /// Website creation date pub created_at: OffsetDateTime, + /// Website update date + pub updated_at: OffsetDateTime, /// Latest version ID pub latest_version: Option, /// Color of the page icon @@ -26,19 +28,25 @@ pub struct Website { /// /// value + 1 will be the next version ID pub vid_count: u32, + /// Does the website have an icon? + pub has_icon: bool, } impl Default for Website { fn default() -> Self { + let created_at = OffsetDateTime::now_utc(); + Self { name: Default::default(), - created_at: OffsetDateTime::now_utc(), + created_at, + updated_at: created_at, latest_version: Default::default(), color: Default::default(), visibility: Default::default(), source_url: Default::default(), source_icon: Default::default(), vid_count: Default::default(), + has_icon: Default::default(), } } } @@ -60,6 +68,8 @@ pub struct WebsiteUpdate { pub source_url: Option>, /// Icon for the source link pub source_icon: Option>, + /// Does the website have an icon? + pub has_icon: Option, } /// Website version stored in the database diff --git a/src/icons.rs b/src/icons.rs new file mode 100644 index 0000000..17883bc --- /dev/null +++ b/src/icons.rs @@ -0,0 +1,110 @@ +use std::{ + io::{BufReader, Read, Seek}, + path::PathBuf, +}; + +use image::io::Reader as ImageReader; +use poem::{ + error::ResponseError, + handler, + http::StatusCode, + web::{Data, Path, StaticFileRequest, StaticFileResponse}, + FromRequest, IntoResponse, Request, Response, +}; + +use crate::Talon; + +pub struct Icons { + path: PathBuf, +} + +#[derive(thiserror::Error, Debug)] +pub enum ImagesError { + #[error("io error: {0}")] + Io(#[from] std::io::Error), + #[error("image error: {0}")] + Image(#[from] image::ImageError), + #[error("image for `{0}` not found")] + NotFound(String), +} + +impl ResponseError for ImagesError { + fn status(&self) -> StatusCode { + match self { + ImagesError::NotFound(_) => StatusCode::NOT_FOUND, + ImagesError::Io(_) | ImagesError::Image(_) => StatusCode::INTERNAL_SERVER_ERROR, + } + } +} + +const IMAGE_SIZE: u32 = 48; +const MAX_IMAGE_SIZE: u32 = 4000; + +type Result = std::result::Result; + +impl Icons { + /// Create a new image storage + pub fn new>(path: P) -> Self { + Self { path: path.into() } + } + + fn icon_path(&self, subdomain: &str) -> PathBuf { + self.path.join(format!("{subdomain}.png")) + } + + pub fn insert_icon(&self, reader: impl Read + Seek, subdomain: &str) -> Result<()> { + let mut img_reader = ImageReader::new(BufReader::new(reader)); + let mut limits = image::io::Limits::default(); + limits.max_image_height = Some(MAX_IMAGE_SIZE); + limits.max_image_width = Some(MAX_IMAGE_SIZE); + img_reader.limits(limits); + + let img = img_reader.with_guessed_format()?.decode()?; + let img = img.resize( + IMAGE_SIZE, + IMAGE_SIZE, + image::imageops::FilterType::Lanczos3, + ); + img.save(self.icon_path(subdomain))?; + Ok(()) + } + + pub fn delete_icon(&self, subdomain: &str) -> Result<()> { + let path = self.get_icon(subdomain)?; + std::fs::remove_file(path)?; + Ok(()) + } + + pub fn get_icon(&self, subdomain: &str) -> Result { + let path = self.icon_path(subdomain); + if path.is_file() { + Ok(path) + } else { + Err(ImagesError::NotFound(subdomain.to_owned())) + } + } + + pub async fn get_icon_response( + &self, + subdomain: &str, + request: &Request, + ) -> poem::Result { + let path = self.icon_path(subdomain); + Ok(StaticFileRequest::from_request_without_body(request) + .await? + .create_response(path, false)?) + } +} + +#[handler] +pub async fn icon( + request: &Request, + talon: Data<&Talon>, + subdomain: Path, +) -> poem::Result { + talon + .icons + .get_icon_response(&subdomain, request) + .await + .map(|r| r.into_response()) +} diff --git a/src/lib.rs b/src/lib.rs index f697374..52babda 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,6 +4,7 @@ pub mod api; pub mod assets; pub mod config; pub mod db; +pub mod icons; pub mod model; pub mod server; pub mod storage; diff --git a/src/model.rs b/src/model.rs index 7f9f4c9..ac7e76b 100644 --- a/src/model.rs +++ b/src/model.rs @@ -29,6 +29,8 @@ pub struct Website { pub source_url: Option, /// Icon for the source link pub source_icon: Option, + /// Does the website have an icon? + pub has_icon: bool, } /// Create a new website @@ -98,8 +100,9 @@ pub struct Info { pub stats: Stats, /// Version information pub version: VersionInfo, - /// Current uptime of the server in seconds - pub uptime: u64, + /// Start time of the server + #[serde(with = "time::serde::rfc3339")] + pub start_time: OffsetDateTime, } /// Information about a Talon version @@ -134,7 +137,7 @@ pub struct Stats { /// Embedded site config #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TalonConfig<'a> { - pub api: &'a str, + pub internal: &'a str, pub version: &'a str, pub root_domain: &'a str, } @@ -175,6 +178,7 @@ impl From<(String, db::model::Website)> for Website { visibility: w.visibility, source_url: w.source_url, source_icon: w.source_icon, + has_icon: w.has_icon, } } } @@ -214,6 +218,7 @@ impl TryFrom for db::model::WebsiteUpdate { visibility: value.visibility, source_url: value.source_url, source_icon: value.source_icon, + has_icon: None, }) } } diff --git a/src/server.rs b/src/server.rs index 5c0c061..9e2fb6a 100644 --- a/src/server.rs +++ b/src/server.rs @@ -1,14 +1,16 @@ -use std::{ops::Deref, path::Path, sync::Arc}; +use std::{ops::Deref, path::Path, sync::Arc, time::Duration}; use crate::{ assets, config::Config, db::Db, + icons::{icon, Icons}, model::{Info, VersionInfo}, page::page, storage::Storage, util, }; +use clokwerk::{Interval, Scheduler}; use path_macro::path; use poem::{ http::header, listener::TcpListener, middleware, Endpoint, EndpointExt, Route, RouteDomain, @@ -26,6 +28,7 @@ pub struct TalonInner { pub cfg: Config, pub db: Db, pub storage: Storage, + pub icons: Icons, pub start_time: OffsetDateTime, } @@ -55,23 +58,44 @@ impl Talon { pub fn new>(workdir: P) -> Result { let db_dir = path!(workdir / "db"); let storage_dir = path!(workdir / "storage"); + let icons_dir = path!(workdir / "icons"); util::create_dir_ne(&workdir)?; util::create_dir_ne(&db_dir)?; util::create_dir_ne(&storage_dir)?; + util::create_dir_ne(&icons_dir)?; let cfg = Config::from_file(path!(workdir / "config.toml"))?; let db = Db::new(db_dir)?; let storage = Storage::new(storage_dir, db.clone(), cfg.clone()); + let icons = Icons::new(icons_dir); - Ok(Self { + let talon = Self { i: TalonInner { cfg, db, storage, + icons, start_time: OffsetDateTime::now_utc(), } .into(), - }) + }; + + Ok(talon) + } + + fn scheduler(&self) -> Scheduler { + let mut scheduler = Scheduler::new(); + let talon = self.clone(); + scheduler + .every(Interval::Minutes(self.cfg.server.purge_interval)) + .run(move || { + log::info!("Starting purge"); + match talon.storage.purge() { + Ok((files, freed)) => log::info!("{files} files purged, {freed} bytes freed"), + Err(e) => log::error!("purge error: {e}"), + } + }); + scheduler } pub fn endpoint(&self) -> impl Endpoint { @@ -96,7 +120,8 @@ impl Talon { "/api/spec", poem::endpoint::make_sync(move |_| spec.clone()), ) - .at("/assets/menu/*path", assets::menu_assets); + .at("/assets/menu/*path", assets::menu_assets) + .at("/icons/:subdomain", icon); let internal_domain = format!( "{}.{}", @@ -122,6 +147,9 @@ impl Talon { } pub async fn launch(&self) -> Result<()> { + let scheduler = self.scheduler(); + let _scheduler_handle = scheduler.watch_thread(Duration::from_secs(1)); + Server::new(TcpListener::bind(&self.i.cfg.server.address)) .run_with_graceful_shutdown(self.endpoint(), Self::shutdown_signal(), None) .await?; @@ -132,10 +160,7 @@ impl Talon { Ok(Info { stats: self.storage.stats()?, version: VersionInfo::get(), - uptime: (OffsetDateTime::now_utc() - self.start_time) - .whole_seconds() - .try_into() - .unwrap_or_default(), + start_time: self.start_time, }) } } diff --git a/src/storage.rs b/src/storage.rs index 3449224..3ffde3b 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -120,7 +120,7 @@ impl Storage { pub fn new>(path: P, db: Db, cfg: Config) -> Self { // Build the string to inject into html pages let talon_cfg = TalonConfig { - api: &format!("{}/api", cfg.server.internal_url), + internal: &cfg.server.internal_url, version: crate::build::PKG_VERSION, root_domain: &cfg.server.root_domain, }; diff --git a/tests/fixtures/mod.rs b/tests/fixtures/mod.rs index 60ceffe..251a031 100644 --- a/tests/fixtures/mod.rs +++ b/tests/fixtures/mod.rs @@ -46,6 +46,7 @@ pub const HASH_SPA_FALLBACK: [u8; 32] = pub const API_KEY_ROOT: &str = "c32ff286c8ac1c3102625badf38ffd251ae0c4a56079d8ba490f320af63f1f47"; pub const API_KEY_2: &str = "21bdac19ffd22870d561b1d55b35eddd9029497107edb7b926aa3e7856bb409b"; // pub const API_KEY_3: &str = "04e99561e3824f387a217d141d2a3b46375de6864afbedf9c9a2cc102bc946a4"; +pub const API_KEY_RO: &str = "48691ad9f42bb12e61e259b5e90dc941a293cfae11af18c9e6557f92557f0086"; pub struct DbTest { db: Db, @@ -74,6 +75,7 @@ fn insert_websites(db: &Db) { &Website { name: "ThetaDev".to_owned(), created_at: datetime!(2023-02-18 16:30 +0), + updated_at: datetime!(2023-02-18 16:30 +0), latest_version: Some(2), color: Some(2068974), visibility: talon::model::Visibility::Featured, @@ -86,6 +88,7 @@ fn insert_websites(db: &Db) { &Website { name: "Spotify-Gender-Ex".to_owned(), created_at: datetime!(2023-02-18 16:30 +0), + updated_at: datetime!(2023-02-18 16:30 +0), latest_version: Some(1), color: Some(1947988), visibility: talon::model::Visibility::Featured, @@ -100,6 +103,7 @@ fn insert_websites(db: &Db) { &Website { name: "RustyPipe".to_owned(), created_at: datetime!(2023-02-20 18:30 +0), + updated_at: datetime!(2023-02-20 18:30 +0), latest_version: Some(1), color: Some(7943647), visibility: talon::model::Visibility::Featured, @@ -114,6 +118,7 @@ fn insert_websites(db: &Db) { &Website { name: "SvelteKit SPA".to_owned(), created_at: datetime!(2023-03-03 22:00 +0), + updated_at: datetime!(2023-03-03 22:00 +0), latest_version: Some(1), color: Some(16727552), visibility: talon::model::Visibility::Hidden, diff --git a/tests/snapshots/tests__api__websites_get.snap b/tests/snapshots/tests__api__websites_get.snap index 809f138..efdbc2f 100644 --- a/tests/snapshots/tests__api__websites_get.snap +++ b/tests/snapshots/tests__api__websites_get.snap @@ -12,6 +12,7 @@ expression: websites visibility: featured, source_url: None, source_icon: None, + has_icon: false, ), Website( subdomain: "rustypipe", @@ -22,6 +23,7 @@ expression: websites visibility: featured, source_url: Some("https://code.thetadev.de/ThetaDev/rustypipe"), source_icon: Some(gitea), + has_icon: false, ), Website( subdomain: "spotify-gender-ex", @@ -32,5 +34,6 @@ expression: websites visibility: featured, source_url: Some("https://github.com/Theta-Dev/Spotify-Gender-Ex"), source_icon: Some(github), + has_icon: false, ), ] diff --git a/tests/snapshots/tests__api__websites_get_all.snap b/tests/snapshots/tests__api__websites_get_all.snap index acbac19..3e8f51b 100644 --- a/tests/snapshots/tests__api__websites_get_all.snap +++ b/tests/snapshots/tests__api__websites_get_all.snap @@ -12,6 +12,7 @@ expression: websites visibility: featured, source_url: None, source_icon: None, + has_icon: false, ), Website( subdomain: "rustypipe", @@ -22,6 +23,7 @@ expression: websites visibility: featured, source_url: Some("https://code.thetadev.de/ThetaDev/rustypipe"), source_icon: Some(gitea), + has_icon: false, ), Website( subdomain: "spa", @@ -32,6 +34,7 @@ expression: websites visibility: hidden, source_url: None, source_icon: None, + has_icon: false, ), Website( subdomain: "spotify-gender-ex", @@ -42,5 +45,6 @@ expression: websites visibility: featured, source_url: Some("https://github.com/Theta-Dev/Spotify-Gender-Ex"), source_icon: Some(github), + has_icon: false, ), ] diff --git a/tests/snapshots/tests__config__default.snap b/tests/snapshots/tests__config__default.snap index 7de5d4b..3f3f3af 100644 --- a/tests/snapshots/tests__config__default.snap +++ b/tests/snapshots/tests__config__default.snap @@ -8,6 +8,7 @@ ConfigInner( root_domain: "example.com", internal_subdomain: "talon-i", internal_url: "http://talon-i.example.com", + purge_interval: 60, ), compression: CompressionCfg( gzip_en: true, diff --git a/tests/snapshots/tests__config__sparse.snap b/tests/snapshots/tests__config__sparse.snap index f9d11cb..3374eb6 100644 --- a/tests/snapshots/tests__config__sparse.snap +++ b/tests/snapshots/tests__config__sparse.snap @@ -8,6 +8,7 @@ ConfigInner( root_domain: "localhost:3000", internal_subdomain: "talon", internal_url: "http://talon.localhost:3000", + purge_interval: 1440, ), compression: CompressionCfg( gzip_en: true, diff --git a/tests/snapshots/tests__database__delete_website.snap b/tests/snapshots/tests__database__delete_website.snap index dea45a7..3aeb9da 100644 --- a/tests/snapshots/tests__database__delete_website.snap +++ b/tests/snapshots/tests__database__delete_website.snap @@ -2,9 +2,9 @@ source: tests/tests.rs expression: data --- -{"type":"website","key":"rustypipe","value":{"name":"RustyPipe","created_at":[2023,51,18,30,0,0,0,0,0],"latest_version":1,"color":7943647,"visibility":"featured","source_url":"https://code.thetadev.de/ThetaDev/rustypipe","source_icon":"gitea","vid_count":1}} -{"type":"website","key":"spa","value":{"name":"SvelteKit SPA","created_at":[2023,62,22,0,0,0,0,0,0],"latest_version":1,"color":16727552,"visibility":"hidden","source_url":null,"source_icon":null,"vid_count":1}} -{"type":"website","key":"spotify-gender-ex","value":{"name":"Spotify-Gender-Ex","created_at":[2023,49,16,30,0,0,0,0,0],"latest_version":1,"color":1947988,"visibility":"featured","source_url":"https://github.com/Theta-Dev/Spotify-Gender-Ex","source_icon":"github","vid_count":1}} +{"type":"website","key":"rustypipe","value":{"name":"RustyPipe","created_at":[2023,51,18,30,0,0,0,0,0],"updated_at":[2023,51,18,30,0,0,0,0,0],"latest_version":1,"color":7943647,"visibility":"featured","source_url":"https://code.thetadev.de/ThetaDev/rustypipe","source_icon":"gitea","vid_count":1,"has_icon":false}} +{"type":"website","key":"spa","value":{"name":"SvelteKit SPA","created_at":[2023,62,22,0,0,0,0,0,0],"updated_at":[2023,62,22,0,0,0,0,0,0],"latest_version":1,"color":16727552,"visibility":"hidden","source_url":null,"source_icon":null,"vid_count":1,"has_icon":false}} +{"type":"website","key":"spotify-gender-ex","value":{"name":"Spotify-Gender-Ex","created_at":[2023,49,16,30,0,0,0,0,0],"updated_at":[2023,49,16,30,0,0,0,0,0],"latest_version":1,"color":1947988,"visibility":"featured","source_url":"https://github.com/Theta-Dev/Spotify-Gender-Ex","source_icon":"github","vid_count":1,"has_icon":false}} {"type":"version","key":"rustypipe:1","value":{"created_at":[2023,51,18,30,0,0,0,0,0],"data":{},"fallback":null,"spa":false}} {"type":"version","key":"spa:1","value":{"created_at":[2023,62,22,0,0,0,0,0,0],"data":{},"fallback":"200.html","spa":true}} {"type":"version","key":"spotify-gender-ex:1","value":{"created_at":[2023,49,16,30,0,0,0,0,0],"data":{},"fallback":null,"spa":false}} diff --git a/tests/snapshots/tests__database__export.snap b/tests/snapshots/tests__database__export.snap index f7bfb0e..13ee9ae 100644 --- a/tests/snapshots/tests__database__export.snap +++ b/tests/snapshots/tests__database__export.snap @@ -2,10 +2,10 @@ source: tests/tests.rs expression: data --- -{"type":"website","key":"-","value":{"name":"ThetaDev","created_at":[2023,49,16,30,0,0,0,0,0],"latest_version":2,"color":2068974,"visibility":"featured","source_url":null,"source_icon":null,"vid_count":2}} -{"type":"website","key":"rustypipe","value":{"name":"RustyPipe","created_at":[2023,51,18,30,0,0,0,0,0],"latest_version":1,"color":7943647,"visibility":"featured","source_url":"https://code.thetadev.de/ThetaDev/rustypipe","source_icon":"gitea","vid_count":1}} -{"type":"website","key":"spa","value":{"name":"SvelteKit SPA","created_at":[2023,62,22,0,0,0,0,0,0],"latest_version":1,"color":16727552,"visibility":"hidden","source_url":null,"source_icon":null,"vid_count":1}} -{"type":"website","key":"spotify-gender-ex","value":{"name":"Spotify-Gender-Ex","created_at":[2023,49,16,30,0,0,0,0,0],"latest_version":1,"color":1947988,"visibility":"featured","source_url":"https://github.com/Theta-Dev/Spotify-Gender-Ex","source_icon":"github","vid_count":1}} +{"type":"website","key":"-","value":{"name":"ThetaDev","created_at":[2023,49,16,30,0,0,0,0,0],"updated_at":[2023,49,16,30,0,0,0,0,0],"latest_version":2,"color":2068974,"visibility":"featured","source_url":null,"source_icon":null,"vid_count":2,"has_icon":false}} +{"type":"website","key":"rustypipe","value":{"name":"RustyPipe","created_at":[2023,51,18,30,0,0,0,0,0],"updated_at":[2023,51,18,30,0,0,0,0,0],"latest_version":1,"color":7943647,"visibility":"featured","source_url":"https://code.thetadev.de/ThetaDev/rustypipe","source_icon":"gitea","vid_count":1,"has_icon":false}} +{"type":"website","key":"spa","value":{"name":"SvelteKit SPA","created_at":[2023,62,22,0,0,0,0,0,0],"updated_at":[2023,62,22,0,0,0,0,0,0],"latest_version":1,"color":16727552,"visibility":"hidden","source_url":null,"source_icon":null,"vid_count":1,"has_icon":false}} +{"type":"website","key":"spotify-gender-ex","value":{"name":"Spotify-Gender-Ex","created_at":[2023,49,16,30,0,0,0,0,0],"updated_at":[2023,49,16,30,0,0,0,0,0],"latest_version":1,"color":1947988,"visibility":"featured","source_url":"https://github.com/Theta-Dev/Spotify-Gender-Ex","source_icon":"github","vid_count":1,"has_icon":false}} {"type":"version","key":"-:1","value":{"created_at":[2023,49,16,30,0,0,0,0,0],"data":{"Deployed by":"https://github.com/Theta-Dev/Talon/actions/runs/1352014628","Version":"v0.1.0"},"fallback":null,"spa":false}} {"type":"version","key":"-:2","value":{"created_at":[2023,49,16,52,0,0,0,0,0],"data":{"Deployed by":"https://github.com/Theta-Dev/Talon/actions/runs/1354755231","Version":"v0.1.1"},"fallback":null,"spa":false}} {"type":"version","key":"rustypipe:1","value":{"created_at":[2023,51,18,30,0,0,0,0,0],"data":{},"fallback":null,"spa":false}} diff --git a/tests/snapshots/tests__database__get_website.snap b/tests/snapshots/tests__database__get_website.snap index 2274b21..105a14c 100644 --- a/tests/snapshots/tests__database__get_website.snap +++ b/tests/snapshots/tests__database__get_website.snap @@ -6,31 +6,37 @@ expression: "vec![ws1, ws2, ws3]" Website( name: "ThetaDev", created_at: (2023, 49, 16, 30, 0, 0, 0, 0, 0), + updated_at: (2023, 49, 16, 30, 0, 0, 0, 0, 0), latest_version: Some(2), color: Some(2068974), visibility: featured, source_url: None, source_icon: None, vid_count: 2, + has_icon: false, ), Website( name: "Spotify-Gender-Ex", created_at: (2023, 49, 16, 30, 0, 0, 0, 0, 0), + updated_at: (2023, 49, 16, 30, 0, 0, 0, 0, 0), latest_version: Some(1), color: Some(1947988), visibility: featured, source_url: Some("https://github.com/Theta-Dev/Spotify-Gender-Ex"), source_icon: Some(github), vid_count: 1, + has_icon: false, ), Website( name: "RustyPipe", created_at: (2023, 51, 18, 30, 0, 0, 0, 0, 0), + updated_at: (2023, 51, 18, 30, 0, 0, 0, 0, 0), latest_version: Some(1), color: Some(7943647), visibility: featured, source_url: Some("https://code.thetadev.de/ThetaDev/rustypipe"), source_icon: Some(gitea), vid_count: 1, + has_icon: false, ), ] diff --git a/tests/snapshots/tests__database__get_websites.snap b/tests/snapshots/tests__database__get_websites.snap index a79883f..d5f05c3 100644 --- a/tests/snapshots/tests__database__get_websites.snap +++ b/tests/snapshots/tests__database__get_websites.snap @@ -6,41 +6,49 @@ expression: websites ("-", Website( name: "ThetaDev", created_at: (2023, 49, 16, 30, 0, 0, 0, 0, 0), + updated_at: (2023, 49, 16, 30, 0, 0, 0, 0, 0), latest_version: Some(2), color: Some(2068974), visibility: featured, source_url: None, source_icon: None, vid_count: 2, + has_icon: false, )), ("rustypipe", Website( name: "RustyPipe", created_at: (2023, 51, 18, 30, 0, 0, 0, 0, 0), + updated_at: (2023, 51, 18, 30, 0, 0, 0, 0, 0), latest_version: Some(1), color: Some(7943647), visibility: featured, source_url: Some("https://code.thetadev.de/ThetaDev/rustypipe"), source_icon: Some(gitea), vid_count: 1, + has_icon: false, )), ("spa", Website( name: "SvelteKit SPA", created_at: (2023, 62, 22, 0, 0, 0, 0, 0, 0), + updated_at: (2023, 62, 22, 0, 0, 0, 0, 0, 0), latest_version: Some(1), color: Some(16727552), visibility: hidden, source_url: None, source_icon: None, vid_count: 1, + has_icon: false, )), ("spotify-gender-ex", Website( name: "Spotify-Gender-Ex", created_at: (2023, 49, 16, 30, 0, 0, 0, 0, 0), + updated_at: (2023, 49, 16, 30, 0, 0, 0, 0, 0), latest_version: Some(1), color: Some(1947988), visibility: featured, source_url: Some("https://github.com/Theta-Dev/Spotify-Gender-Ex"), source_icon: Some(github), vid_count: 1, + has_icon: false, )), ] diff --git a/tests/snapshots/tests__database__update_website.snap b/tests/snapshots/tests__database__update_website.snap index 023a8e4..151230d 100644 --- a/tests/snapshots/tests__database__update_website.snap +++ b/tests/snapshots/tests__database__update_website.snap @@ -5,10 +5,12 @@ expression: website Website( name: "ThetaDev2", created_at: (2023, 49, 16, 30, 0, 0, 0, 0, 0), + updated_at: "[date]", latest_version: Some(2), color: Some(1000), visibility: hidden, source_url: Some("https://example.com"), source_icon: Some(link), vid_count: 2, + has_icon: false, ) diff --git a/tests/testfiles/config/config.toml b/tests/testfiles/config/config.toml index d715bb1..fb644a8 100644 --- a/tests/testfiles/config/config.toml +++ b/tests/testfiles/config/config.toml @@ -3,6 +3,7 @@ address = "127.0.0.1:3000" root_domain = "example.com" internal_subdomain = "talon-i" internal_url = "http://talon-i.example.com" +purge_interval = 60 # Talon compresses files when they are uploaded # Here you can configure compression algorithms and levels diff --git a/tests/tests.rs b/tests/tests.rs index 39c1420..8356db0 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -8,6 +8,8 @@ use rstest::rstest; use fixtures::*; use talon::db::{Db, DbError}; +const ICON_SIZE: u32 = 48; + mod database { use super::*; @@ -83,7 +85,7 @@ mod database { .unwrap(); let website = db.get_website(SUBDOMAIN_1).unwrap(); - insta::assert_ron_snapshot!(website); + insta::assert_ron_snapshot!(website, {".updated_at" => "[date]"}); } #[rstest] @@ -592,6 +594,50 @@ mod storage { } } +mod icons { + use talon::icons::Icons; + + use super::*; + + use image::io::Reader as ImageReader; + + #[test] + fn insert_icon() { + let temp = temp_testdir::TempDir::default(); + let icons = Icons::new(temp.to_path_buf()); + + let icon = File::open(path!("assets" / "icon.png")).unwrap(); + icons.insert_icon(icon, "talon").unwrap(); + + let stored_path = path!(temp / "talon.png"); + let got_path = icons.get_icon("talon").unwrap(); + assert_eq!(stored_path, got_path); + assert!(stored_path.is_file()); + + let stored_img = ImageReader::open(&stored_path).unwrap().decode().unwrap(); + assert_eq!(stored_img.height(), ICON_SIZE); + assert_eq!(stored_img.width(), ICON_SIZE); + } + + #[test] + fn delete_icon() { + let temp = temp_testdir::TempDir::default(); + let icons = Icons::new(temp.to_path_buf()); + + let icon = File::open(path!("assets" / "icon.png")).unwrap(); + icons.insert_icon(icon, "talon").unwrap(); + + icons.delete_icon("talon").unwrap(); + + let stored_path = path!(temp / "talon.png"); + assert!(!stored_path.exists()); + assert!(matches!( + icons.get_icon("talon"), + Err(talon::icons::ImagesError::NotFound(_)) + )); + } +} + mod config { use talon::config::Config; @@ -743,8 +789,11 @@ mod page { } mod api { + use std::io::{Cursor, Read}; + use hex::ToHex; use hex_literal::hex; + use image::io::Reader as ImageReader; use poem::{ http::{header, Method, StatusCode}, test::TestClient, @@ -773,6 +822,7 @@ mod api { visibility: Visibility::Featured, source_url: Some("https://github.com/Theta-Dev/Spotify-Gender-Ex".to_owned()), source_icon: Some(SourceIcon::Github), + has_icon: false, })); } @@ -808,16 +858,18 @@ mod api { resp.assert_status_is_ok(); let ws = tln.db.get_website("test").unwrap(); - insta::assert_ron_snapshot!(ws, {".created_at" => "[date]"}, @r###" + insta::assert_ron_snapshot!(ws, {".created_at" => "[date]", ".updated_at" => "[date]"}, @r###" Website( name: "Test", created_at: "[date]", + updated_at: "[date]", latest_version: None, color: Some(1000), visibility: searchable, source_url: Some("example.com"), source_icon: Some(git), vid_count: 0, + has_icon: false, ) "###); } @@ -862,16 +914,18 @@ mod api { resp.assert_status_is_ok(); let ws = tln.db.get_website("-").unwrap(); - insta::assert_ron_snapshot!(ws, @r###" + insta::assert_ron_snapshot!(ws, {".updated_at" => "[date]"}, @r###" Website( name: "Test", created_at: (2023, 49, 16, 30, 0, 0, 0, 0, 0), + updated_at: "[date]", latest_version: Some(2), color: Some(1000), visibility: searchable, source_url: Some("example.com"), source_icon: Some(git), vid_count: 2, + has_icon: false, ) "###); } @@ -896,6 +950,111 @@ mod api { resp.assert_status(StatusCode::NOT_FOUND); } + #[rstest] + fn website_get_icon(tln: TalonTest) { + let icon = File::open(path!("assets" / "icon.png")).unwrap(); + tln.icons.insert_icon(icon, "-").unwrap(); + + let mut resp = tokio_test::block_on( + TestClient::new(tln.endpoint()) + .get("http://talon.localhost:3000/icons/-") + .header(header::HOST, "talon.localhost:3000") + .data(tln.clone()) + .send(), + ); + resp.assert_status_is_ok(); + resp.assert_header(header::CONTENT_TYPE, "image/png"); + + let icon_bts = tokio_test::block_on(resp.0.take_body().into_bytes()).unwrap(); + let got_icon = ImageReader::new(BufReader::new(Cursor::new(icon_bts))) + .with_guessed_format() + .unwrap() + .decode() + .unwrap(); + assert_eq!(got_icon.height(), ICON_SIZE); + assert_eq!(got_icon.width(), ICON_SIZE); + } + + #[rstest] + fn website_get_icon_404(tln: TalonTest) { + let resp = tokio_test::block_on( + TestClient::new(tln.endpoint()) + .get("http://talon.localhost:3000/icons/-") + .header(header::HOST, "talon.localhost:3000") + .data(tln.clone()) + .send(), + ); + resp.assert_status(StatusCode::NOT_FOUND); + } + + #[rstest] + fn website_upload_icon(tln: TalonTest) { + let mut icon = File::open(path!("assets" / "icon.png")).unwrap(); + let mut icon_bts = Vec::new(); + icon.read_to_end(&mut icon_bts).unwrap(); + + let resp = tokio_test::block_on( + TestClient::new(tln.endpoint()) + .put("http://talon.localhost:3000/api/website/-/icon") + .header(header::HOST, "talon.localhost:3000") + .header(header::CONTENT_TYPE, "application/octet-stream") + .header("x-api-key", API_KEY_ROOT) + .data(tln.clone()) + .body(icon_bts) + .send(), + ); + resp.assert_status_is_ok(); + + let resp = tokio_test::block_on( + TestClient::new(tln.endpoint()) + .get("http://talon.localhost:3000/api/website/-") + .header(header::HOST, "talon.localhost:3000") + .data(tln.clone()) + .send(), + ); + resp.assert_status_is_ok(); + tokio_test::block_on(resp.assert_json(Website { + subdomain: "-".to_string(), + name: "ThetaDev".to_owned(), + created_at: datetime!(2023-02-18 16:30 +0), + latest_version: Some(2), + color: Some("#1f91ee".to_owned()), + visibility: talon::model::Visibility::Featured, + source_icon: None, + source_url: None, + has_icon: true, + })); + } + + #[rstest] + fn website_delete_icon(tln: TalonTest) { + let icon = File::open(path!("assets" / "icon.png")).unwrap(); + tln.icons.insert_icon(icon, "-").unwrap(); + + let resp = tokio_test::block_on( + TestClient::new(tln.endpoint()) + .delete("http://talon.localhost:3000/api/website/-/icon") + .header(header::HOST, "talon.localhost:3000") + .header("x-api-key", API_KEY_ROOT) + .data(tln.clone()) + .send(), + ); + resp.assert_status_is_ok(); + } + + #[rstest] + fn website_delete_icon_404(tln: TalonTest) { + let resp = tokio_test::block_on( + TestClient::new(tln.endpoint()) + .delete("http://talon.localhost:3000/api/website/-/icon") + .header(header::HOST, "talon.localhost:3000") + .header("x-api-key", API_KEY_ROOT) + .data(tln.clone()) + .send(), + ); + resp.assert_status(StatusCode::NOT_FOUND); + } + #[rstest] fn website_delete(tln: TalonTest) { let resp = tokio_test::block_on( @@ -1172,6 +1331,10 @@ mod api { .send(), ); resp.assert_status(StatusCode::BAD_REQUEST); + + // Check that no zombie version remains + assert_eq!(tln.db.get_website_versions("rustypipe").count(), 1); + assert_eq!(tln.db.get_website("rustypipe").unwrap().vid_count, 1); } #[rstest] @@ -1190,6 +1353,10 @@ mod api { .send(), ); resp.assert_status(StatusCode::BAD_REQUEST); + + // Check that no zombie version remains + assert_eq!(tln.db.get_website_versions("rustypipe").count(), 1); + assert_eq!(tln.db.get_website("rustypipe").unwrap().vid_count, 1); } #[rstest] @@ -1219,11 +1386,13 @@ mod api { #[case::websites_all("websitesAll", Method::GET)] #[case::version_delete("website/test/version/1", Method::DELETE)] #[case::version_upload("website/test/upload", Method::POST)] + #[case::icon_upload("website/test/icon", Method::PUT)] + #[case::icon_delete("website/test/icon", Method::DELETE)] fn unauthorized(tln: TalonTest, #[case] endpoint: &str, #[case] method: Method) { let resp = tokio_test::block_on( TestClient::new(tln.endpoint()) .request( - method, + method.clone(), format!("http://talon.localhost:3000/api/{endpoint}"), ) .header(header::HOST, "talon.localhost:3000") @@ -1231,5 +1400,34 @@ mod api { .send(), ); resp.assert_status(StatusCode::UNAUTHORIZED); + + let resp = match method { + Method::POST => tokio_test::block_on( + TestClient::new(tln.endpoint()) + .request( + method.clone(), + format!("http://talon.localhost:3000/api/{endpoint}"), + ) + .header(header::HOST, "talon.localhost:3000") + .header(header::CONTENT_TYPE, "application/octet-stream") + .header("x-api-key", API_KEY_RO) + .data(tln.clone()) + .send(), + ), + Method::GET | Method::PUT | Method::PATCH => return, + _ => tokio_test::block_on( + TestClient::new(tln.endpoint()) + .request( + method.clone(), + format!("http://talon.localhost:3000/api/{endpoint}"), + ) + .header(header::HOST, "talon.localhost:3000") + .header("x-api-key", API_KEY_RO) + .data(tln.clone()) + .body_json(&serde_json::Value::Null) + .send(), + ), + }; + resp.assert_status(StatusCode::FORBIDDEN); } } diff --git a/tsconfig.json b/tsconfig.json index 9b5cd8e..bccca2a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,8 +8,9 @@ * a value or a type, so tell TypeScript to enforce using * `import type` instead of `import` for Types. */ - "importsNotUsedAsValues": "error", - "isolatedModules": true, + "importsNotUsedAsValues": "error", + "isolatedModules": true, + // for TS5 "verbatimModuleSyntax": true, /** * To have warnings / errors of the Svelte compiler at the * correct position, enable source maps by default. diff --git a/ui/menu/.eslintrc.js b/ui/menu/.eslintrc.js deleted file mode 100644 index 4ac818b..0000000 --- a/ui/menu/.eslintrc.js +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = { - extends: ["eslint:recommended"], - env: { browser: true, es6: true, node: true }, - parserOptions: { - sourceType: "module", - }, - overrides: [ - { - files: ["*.ts", "*.svelte"], - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - ], - globals: { - Atomics: "readonly", - SharedArrayBuffer: "readonly", - }, - parser: "@typescript-eslint/parser", - parserOptions: { - project: "./tsconfig.json", - }, - plugins: ["@typescript-eslint"], - }, - { - files: ["*.svelte"], - processor: "svelte3/svelte3", - parserOptions: { - extraFileExtensions: [".svelte"], - }, - plugins: ["svelte3", "@typescript-eslint"], - settings: { - "svelte3/typescript": true, - "svelte3/ignore-styles": () => true, - }, - }, - ], - rules: {}, - ignorePatterns: [".rollup/**", "public/**", "dist/**"], -}; diff --git a/ui/menu/package-lock.json b/ui/menu/package-lock.json index 92d80e6..fe5e88d 100644 --- a/ui/menu/package-lock.json +++ b/ui/menu/package-lock.json @@ -23,12 +23,8 @@ "@rollup/plugin-typescript": "^8.2.5", "@rollup/pluginutils": "^4.1.1", "@tsconfig/svelte": "^2.0.1", - "@typescript-eslint/eslint-plugin": "^4.31.2", - "@typescript-eslint/parser": "^4.31.2", - "eslint": "^7.32.0", - "eslint-plugin-svelte3": "^3.2.1", - "prettier": "^2.2.1", - "prettier-plugin-svelte": "^1.2.0", + "prettier": "^2.8.7", + "prettier-plugin-svelte": "^2.10.0", "rollup": "^2.57.0", "rollup-plugin-brotli": "^3.1.0", "rollup-plugin-copy": "^3.4.0", @@ -37,11 +33,11 @@ "rollup-plugin-svelte": "^7.1.0", "rollup-plugin-terser": "^7.0.2", "sass": "^1.42.1", - "sirv-cli": "^1.0.14", + "sirv-cli": "^2.0.2", "svelte": "^3.43.0", - "svelte-check": "^2.2.6", - "svelte-keydown": "^0.3.1", - "svelte-modals": "^1.0.4", + "svelte-check": "^3.1.4", + "svelte-keydown": "^0.6.0", + "svelte-modals": "^1.2.1", "svelte-preprocess": "^4.9.5", "tslib": "^2.5.0", "typescript": "^4.9.5" @@ -49,6 +45,7 @@ }, "../talon-client": { "version": "0.1.0", + "extraneous": true, "devDependencies": { "typescript": "^4.0" } @@ -1709,50 +1706,6 @@ "node": ">=6.9.0" } }, - "node_modules/@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/@fortawesome/fontawesome-common-types": { "version": "0.2.36", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.36.tgz", @@ -1786,26 +1739,6 @@ "node": ">=6" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.0", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", @@ -2228,12 +2161,6 @@ "@types/uglify-js": "*" } }, - "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true - }, "node_modules/@types/minimatch": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", @@ -2286,284 +2213,6 @@ "source-map": "^0.6.1" } }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz", - "integrity": "sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==", - "dev": true, - "dependencies": { - "@typescript-eslint/experimental-utils": "4.33.0", - "@typescript-eslint/scope-manager": "4.33.0", - "debug": "^4.3.1", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", - "regexpp": "^3.1.0", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^4.0.0", - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/@typescript-eslint/experimental-utils": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", - "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", - "integrity": "sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "debug": "^4.3.1" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", - "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0" - }, - "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", - "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", - "dev": true, - "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", - "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", - "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "4.33.0", - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -2589,15 +2238,6 @@ "node": ">= 8" } }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -2607,15 +2247,6 @@ "node": ">=8" } }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", @@ -2902,20 +2533,6 @@ "url": "https://opencollective.com/core-js" } }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -2933,12 +2550,6 @@ } } }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, "node_modules/deepmerge": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.0.tgz", @@ -2969,42 +2580,12 @@ "node": ">=8" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/electron-to-chromium": { "version": "1.4.325", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.325.tgz", "integrity": "sha512-K1C03NT4I7BuzsRdCU5RWkgZxtswnKDYM6/eMhkEXqKu4e5T+ck610x3FPzu1y7HVFSiQKZqP16gnJzPpji1TQ==", "dev": true }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/es6-promise": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", @@ -3029,375 +2610,6 @@ "node": ">=0.8.0" } }, - "node_modules/eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-plugin-svelte3": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-svelte3/-/eslint-plugin-svelte3-3.4.1.tgz", - "integrity": "sha512-7p59WG8qV8L6wLdl4d/c3mdjkgVglQCdv5XOTk/iNPBKXuuV+Q0eFP5Wa6iJd/G2M1qR3BkLPEzaANOqKAZczw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "eslint": ">=6.0.0", - "svelte": "^3.2.0" - } - }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint/node_modules/@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint/node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/eslint/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, - "dependencies": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", @@ -3413,12 +2625,6 @@ "node": ">=0.10.0" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, "node_modules/fast-glob": { "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", @@ -3435,18 +2641,6 @@ "node": ">=8.6.0" } }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -3456,18 +2650,6 @@ "reusify": "^1.0.4" } }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -3480,25 +2662,6 @@ "node": ">=8" } }, - "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, "node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -3539,12 +2702,6 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -3604,26 +2761,6 @@ "node": ">=4" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -3712,15 +2849,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -3785,15 +2913,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -3839,12 +2958,6 @@ "@types/estree": "*" } }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, "node_modules/jest-worker": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", @@ -3886,19 +2999,6 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -3911,18 +3011,6 @@ "node": ">=4" } }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -3945,27 +3033,14 @@ } }, "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", "dev": true, "engines": { "node": ">=6" } }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/livereload": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.9.3.tgz", @@ -4005,18 +3080,6 @@ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", "dev": true }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true - }, "node_modules/lower-case": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", @@ -4143,12 +3206,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, "node_modules/no-case": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", @@ -4182,23 +3239,6 @@ "wrappy": "1" } }, - "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/opts": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/opts/-/opts-2.0.2.tgz", @@ -4235,15 +3275,6 @@ "node": ">=0.10.0" } }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -4277,19 +3308,10 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/prettier": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", - "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.7.tgz", + "integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -4302,33 +3324,15 @@ } }, "node_modules/prettier-plugin-svelte": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-1.4.2.tgz", - "integrity": "sha512-O9VsNwII+raTG8QPoQWouk5ABQy/hmLm4dZ2eqJ7DPnbO35A+BxMSjlfqkw0cNP+UcbykHFYU8zNXm93ytWP9g==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-2.10.0.tgz", + "integrity": "sha512-GXMY6t86thctyCvQq+jqElO+MKdB09BkL3hexyGP3Oi8XLKRFaJP1ud/xlWCZ9ZIa2BxHka32zhHfcuU+XsRQg==", "dev": true, "peerDependencies": { "prettier": "^1.16.4 || ^2.0.0", "svelte": "^3.2.0" } }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -4403,18 +3407,6 @@ "@babel/runtime": "^7.8.4" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/regexpu-core": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.1.tgz", @@ -4462,15 +3454,6 @@ "node": ">= 0.10" } }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/resolve": { "version": "1.22.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", @@ -4516,21 +3499,6 @@ "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/rollup": { "version": "2.79.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", @@ -4772,54 +3740,33 @@ "randombytes": "^2.1.0" } }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/sirv": { - "version": "1.0.19", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-1.0.19.tgz", - "integrity": "sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.2.tgz", + "integrity": "sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w==", "dev": true, "dependencies": { "@polka/url": "^1.0.0-next.20", "mrmime": "^1.0.0", - "totalist": "^1.0.0" + "totalist": "^3.0.0" }, "engines": { "node": ">= 10" } }, "node_modules/sirv-cli": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/sirv-cli/-/sirv-cli-1.0.14.tgz", - "integrity": "sha512-yyUTNr984ANKDloqepkYbBSqvx3buwYg2sQKPWjSU+IBia5loaoka2If8N9CMwt8AfP179cdEl7kYJ//iWJHjQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/sirv-cli/-/sirv-cli-2.0.2.tgz", + "integrity": "sha512-OtSJDwxsF1NWHc7ps3Sa0s+dPtP15iQNJzfKVz+MxkEo3z72mCD+yu30ct79rPr0CaV1HXSOBp+MIY5uIhHZ1A==", "dev": true, "dependencies": { "console-clear": "^1.1.0", "get-port": "^3.2.0", - "kleur": "^3.0.0", + "kleur": "^4.1.4", "local-access": "^1.0.1", "sade": "^1.6.0", "semiver": "^1.0.0", - "sirv": "^1.0.13", + "sirv": "^2.0.0", "tinydate": "^1.0.0" }, "bin": { @@ -4838,56 +3785,6 @@ "node": ">=8" } }, - "node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/slice-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/sorcery": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz", @@ -4938,38 +3835,6 @@ "deprecated": "Please use @jridgewell/sourcemap-codec instead", "dev": true }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-indent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", @@ -4982,18 +3847,6 @@ "node": ">=8" } }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -5028,31 +3881,120 @@ } }, "node_modules/svelte-check": { - "version": "2.10.3", - "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-2.10.3.tgz", - "integrity": "sha512-Nt1aWHTOKFReBpmJ1vPug0aGysqPwJh2seM1OvICfM2oeyaA62mOiy5EvkXhltGfhCcIQcq2LoE0l1CwcWPjlw==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.1.4.tgz", + "integrity": "sha512-25Lb46ZS4IK/XpBMe4IBMrtYf23V8alqBX+szXoccb7uM0D2Wqq5rMRzYBONZnFVuU1bQG3R50lyIT5eRewv2g==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.9", + "@jridgewell/trace-mapping": "^0.3.17", "chokidar": "^3.4.1", "fast-glob": "^3.2.7", "import-fresh": "^3.2.1", "picocolors": "^1.0.0", "sade": "^1.7.4", - "svelte-preprocess": "^4.0.0", - "typescript": "*" + "svelte-preprocess": "^5.0.0", + "typescript": "^4.9.4" }, "bin": { "svelte-check": "bin/svelte-check" }, "peerDependencies": { - "svelte": "^3.24.0" + "svelte": "^3.55.0" + } + }, + "node_modules/svelte-check/node_modules/magic-string": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", + "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.13" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/svelte-check/node_modules/sorcery": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.11.0.tgz", + "integrity": "sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.14", + "buffer-crc32": "^0.2.5", + "minimist": "^1.2.0", + "sander": "^0.5.0" + }, + "bin": { + "sorcery": "bin/sorcery" + } + }, + "node_modules/svelte-check/node_modules/svelte-preprocess": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-5.0.3.tgz", + "integrity": "sha512-GrHF1rusdJVbOZOwgPWtpqmaexkydznKzy5qIC2FabgpFyKN57bjMUUUqPRfbBXK5igiEWn1uO/DXsa2vJ5VHA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@types/pug": "^2.0.6", + "detect-indent": "^6.1.0", + "magic-string": "^0.27.0", + "sorcery": "^0.11.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">= 14.10.0" + }, + "peerDependencies": { + "@babel/core": "^7.10.2", + "coffeescript": "^2.5.1", + "less": "^3.11.3 || ^4.0.0", + "postcss": "^7 || ^8", + "postcss-load-config": "^2.1.0 || ^3.0.0 || ^4.0.0", + "pug": "^3.0.0", + "sass": "^1.26.8", + "stylus": "^0.55.0", + "sugarss": "^2.0.0 || ^3.0.0 || ^4.0.0", + "svelte": "^3.23.0", + "typescript": ">=3.9.5 || ^4.0.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "coffeescript": { + "optional": true + }, + "less": { + "optional": true + }, + "postcss": { + "optional": true + }, + "postcss-load-config": { + "optional": true + }, + "pug": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "typescript": { + "optional": true + } } }, "node_modules/svelte-keydown": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/svelte-keydown/-/svelte-keydown-0.3.1.tgz", - "integrity": "sha512-/tLz9VcI9AEkCZnmLy85N2RGYm86QO9E4py7uI3FzzDo2LdFs3NRNxPo4OIqM6QgBn3rlunxmJY0QPoN0G259w==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/svelte-keydown/-/svelte-keydown-0.6.0.tgz", + "integrity": "sha512-X5YBpz2SZY7ReMfbjqfsq4wFBuNM0Epi2/VS9LbxYYDHfJBSP/F5sx8D1hZz3amVLlc0JP8OLzIGsQAv6LJpIA==", "dev": true }, "node_modules/svelte-modals": { @@ -5130,44 +4072,6 @@ } } }, - "node_modules/table": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", - "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", - "dev": true, - "dependencies": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, "node_modules/talon-client": { "version": "0.1.0", "resolved": "file:../talon-client" @@ -5202,12 +4106,6 @@ "node": ">=0.4.0" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, "node_modules/tinydate": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.3.0.tgz", @@ -5239,9 +4137,9 @@ } }, "node_modules/totalist": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz", - "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.0.tgz", + "integrity": "sha512-eM+pCBxXO/njtF7vdFsHuqb+ElbxqtI4r5EAvk6grfAFyJ6IvWlSkfZ5T9ozC6xWw3Fj1fGoSmrl0gUs46JVIw==", "dev": true, "engines": { "node": ">=6" @@ -5253,51 +4151,6 @@ "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", "dev": true }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/typescript": { "version": "4.9.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", @@ -5404,45 +4257,6 @@ "integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==", "dev": true }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/ui/menu/package.json b/ui/menu/package.json index 57d7b51..460293d 100644 --- a/ui/menu/package.json +++ b/ui/menu/package.json @@ -6,13 +6,11 @@ "scripts": { "dev": "rollup -c -w", "build": "rollup -c", - "start": "sirv public --single", - "lint": "eslint .", - "fix": "eslint . --fix", + "start": "sirv public -p 5000 --single", "check": "svelte-check --tsconfig ../../tsconfig.json", "format": "prettier --plugin=./node_modules/prettier-plugin-svelte --write .", - "pc": "npm run fix & npm run check & npm run format", - "ci": "npm run lint & npm run check & prettier --plugin=./node_modules/prettier-plugin-svelte --check ." + "pc": "npm run check & npm run format", + "ci": "npm run check & prettier --plugin=./node_modules/prettier-plugin-svelte --check ." }, "devDependencies": { "@babel/core": "^7.15.5", @@ -25,12 +23,8 @@ "@rollup/plugin-typescript": "^8.2.5", "@rollup/pluginutils": "^4.1.1", "@tsconfig/svelte": "^2.0.1", - "@typescript-eslint/eslint-plugin": "^4.31.2", - "@typescript-eslint/parser": "^4.31.2", - "eslint": "^7.32.0", - "eslint-plugin-svelte3": "^3.2.1", - "prettier": "^2.2.1", - "prettier-plugin-svelte": "^1.2.0", + "prettier": "^2.8.7", + "prettier-plugin-svelte": "^2.10.0", "rollup": "^2.57.0", "rollup-plugin-brotli": "^3.1.0", "rollup-plugin-copy": "^3.4.0", @@ -39,11 +33,11 @@ "rollup-plugin-svelte": "^7.1.0", "rollup-plugin-terser": "^7.0.2", "sass": "^1.42.1", - "sirv-cli": "^1.0.14", + "sirv-cli": "^2.0.2", "svelte": "^3.43.0", - "svelte-check": "^2.2.6", - "svelte-keydown": "^0.3.1", - "svelte-modals": "^1.0.4", + "svelte-check": "^3.1.4", + "svelte-keydown": "^0.6.0", + "svelte-modals": "^1.2.1", "svelte-preprocess": "^4.9.5", "tslib": "^2.5.0", "typescript": "^4.9.5" diff --git a/ui/menu/public/index.html b/ui/menu/public/index.html index 73f4ccc..6c2a610 100644 --- a/ui/menu/public/index.html +++ b/ui/menu/public/index.html @@ -190,7 +190,7 @@ - -
{#if currentWebsite} @@ -46,3 +34,13 @@
+ + diff --git a/ui/menu/src/components/FloatingButton.svelte b/ui/menu/src/components/FloatingButton.svelte index c0cc741..71aa6f4 100644 --- a/ui/menu/src/components/FloatingButton.svelte +++ b/ui/menu/src/components/FloatingButton.svelte @@ -1,21 +1,32 @@ + + - - diff --git a/ui/menu/src/components/Icon.svelte b/ui/menu/src/components/Icon.svelte index 6c4a43d..8381156 100644 --- a/ui/menu/src/components/Icon.svelte +++ b/ui/menu/src/components/Icon.svelte @@ -9,9 +9,29 @@ let icon: [number, number, string]; $: icon = icons[iconName] ?? [0, 0, ""]; - + + {#if icon} + + + + {/if} + + - - - {#if icon} - - - - {/if} - diff --git a/ui/menu/src/components/ImageIcon.svelte b/ui/menu/src/components/ImageIcon.svelte index 4ae6049..cadfcdc 100644 --- a/ui/menu/src/components/ImageIcon.svelte +++ b/ui/menu/src/components/ImageIcon.svelte @@ -4,9 +4,25 @@ export let scale = 1; export let alt = "??"; export let color = "#4b228a"; - + + {#if imageSrc} + + {:else} + + {alt} + + {/if} + + - - - {#if imageSrc} - - {:else} - - {alt} - - {/if} - diff --git a/ui/menu/src/components/InfoModal.svelte b/ui/menu/src/components/InfoModal.svelte deleted file mode 100644 index a886c5e..0000000 --- a/ui/menu/src/components/InfoModal.svelte +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - -{#if isOpen && currentWebsite} - -{/if} diff --git a/ui/menu/src/components/InlineIcon.svelte b/ui/menu/src/components/InlineIcon.svelte index c2e3035..a062e63 100644 --- a/ui/menu/src/components/InlineIcon.svelte +++ b/ui/menu/src/components/InlineIcon.svelte @@ -7,16 +7,8 @@ let icon: [number, number, string]; $: icon = icons[iconName] ?? [0, 0, ""]; - - - + + diff --git a/ui/menu/src/components/InstanceInfoModal.svelte b/ui/menu/src/components/InstanceInfoModal.svelte new file mode 100644 index 0000000..f8a77ab --- /dev/null +++ b/ui/menu/src/components/InstanceInfoModal.svelte @@ -0,0 +1,62 @@ + + + + {#if instanceInfo} +

+ + Instance info +

+ + + + +

+ + Version info +

+ + + + + + + {:else} +

Loading instance info...

+

+ Talon + {talonConfig.version} + {/if} + + + diff --git a/ui/menu/src/components/Menu.svelte b/ui/menu/src/components/Menu.svelte index 38c6036..c29bc92 100644 --- a/ui/menu/src/components/Menu.svelte +++ b/ui/menu/src/components/Menu.svelte @@ -4,7 +4,7 @@ import Icon from "./Icon.svelte"; import MenuItem from "./MenuItem.svelte"; import MenuItemPage from "./MenuItemPage.svelte"; - import InfoModal from "./InfoModal.svelte"; + import PageInfoModal from "./PageInfoModal.svelte"; import FloatingButton from "./FloatingButton.svelte"; import type { Focusable } from "../util/types"; @@ -12,7 +12,7 @@ import MenuItemInput from "./MenuItemInput.svelte"; import { currentWebsiteStore, websitesStore } from "../util/api"; import { Visibility, Website } from "talon-client"; - import { getWebsiteUrl } from "../util/functions"; + import { getWebsiteUrl, isMobile } from "../util/functions"; let currentWebsite: Website; let websites: Website[]; @@ -32,10 +32,6 @@ sidebarShown = false; } - function isMobile(): boolean { - return window.innerWidth < 768; - } - function openSearch(): void { searchOpen = true; searchInput.focus(); @@ -53,7 +49,7 @@ closeSearch(); } - function searchKeypress(e: KeyboardEvent) { + function searchKeyup(e: KeyboardEvent) { switch (e.key) { case "Enter": if (!searchText) { @@ -70,8 +66,8 @@ } } - function openInfo() { - openModal(InfoModal); + function openPageInfo() { + openModal(PageInfoModal, null, { replace: true }); } let sidebarShown = !isMobile(); @@ -92,9 +88,46 @@ } return ws.visibility === Visibility.Featured; }); - +

+ + + - - - - diff --git a/ui/menu/src/components/MenuItem.svelte b/ui/menu/src/components/MenuItem.svelte index f9fe26f..ae0f415 100644 --- a/ui/menu/src/components/MenuItem.svelte +++ b/ui/menu/src/components/MenuItem.svelte @@ -4,9 +4,21 @@ export let active = false; export let newTab = false; export let privacy = false; - + + - - diff --git a/ui/menu/src/components/MenuItemInput.svelte b/ui/menu/src/components/MenuItemInput.svelte index 121fccb..6d8a7f2 100644 --- a/ui/menu/src/components/MenuItemInput.svelte +++ b/ui/menu/src/components/MenuItemInput.svelte @@ -18,9 +18,22 @@ inputElm.blur(); }, }; - + + + + + - - - - - diff --git a/ui/menu/src/components/MenuItemPage.svelte b/ui/menu/src/components/MenuItemPage.svelte index c9199ef..ba86cb7 100644 --- a/ui/menu/src/components/MenuItemPage.svelte +++ b/ui/menu/src/components/MenuItemPage.svelte @@ -14,7 +14,6 @@ website.name.length > MAX_TEXT_LEN ? website.name.substring(0, 20).trim() + "..." : website.name; - diff --git a/ui/menu/src/components/Modal.svelte b/ui/menu/src/components/Modal.svelte new file mode 100644 index 0000000..46bad0a --- /dev/null +++ b/ui/menu/src/components/Modal.svelte @@ -0,0 +1,66 @@ + + + + +{#if isOpen} + +{/if} + + diff --git a/ui/menu/src/components/PageIcon.svelte b/ui/menu/src/components/PageIcon.svelte index 4654d37..7cf159f 100644 --- a/ui/menu/src/components/PageIcon.svelte +++ b/ui/menu/src/components/PageIcon.svelte @@ -1,21 +1,25 @@ {#if website} + {scale} + /> {:else} {/if} diff --git a/ui/menu/src/components/PageInfoModal.svelte b/ui/menu/src/components/PageInfoModal.svelte new file mode 100644 index 0000000..d41485a --- /dev/null +++ b/ui/menu/src/components/PageInfoModal.svelte @@ -0,0 +1,142 @@ + + + + {#if currentWebsite} +
+ + {currentWebsite.name} +
+ + {#if currentVersion} +

+ + Current version #{currentVersion.id} + + {#if latestVersion && latestVersion !== currentVersion} + Latest: #{latestVersion.id} + {/if} +

+ + + {#each Object.entries(currentVersion.data) as [key, value]} + + {/each} + + {#if versions && versions.length} +

+ + History +

+ + {#each { length: versions.length } as _, index} + {@const reverseIndex = versions.length - 1 - index} + {@const version = versions[reverseIndex]} + + {/each} + {/if} + {:else} +

Loading website...

+ {/if} + +

+ +

+ Powered by + +
+ {/if} +
+ + diff --git a/ui/menu/src/components/Tag.svelte b/ui/menu/src/components/Tag.svelte index 4937cad..ece202b 100644 --- a/ui/menu/src/components/Tag.svelte +++ b/ui/menu/src/components/Tag.svelte @@ -1,10 +1,30 @@ +

+ {#if href} + + {key} + {#if value2}{value2}{/if} + {value} + + {:else} + {key} + {#if value2}{value2}{/if} + {value} + {/if} +

+ -

- {#if href} - {key} {value} - {:else}{key} {value}{/if} -

+ .val2 + background-color: values.$color-base-2 + diff --git a/ui/menu/src/style/main.sass b/ui/menu/src/style/main.sass index ebe37e6..7903d5d 100644 --- a/ui/menu/src/style/main.sass +++ b/ui/menu/src/style/main.sass @@ -6,11 +6,18 @@ font-family: sans-serif color: values.$color-text -a +a, .link display: inline + text-decoration: none + cursor: pointer + background: none + border: none + box-shadow: none + padding: 0 + +.link color: var(--talon-color) filter: brightness(150%) - text-decoration: none &:hover text-decoration: underline @@ -19,9 +26,6 @@ a p margin: 0.8em 0 -button - cursor: pointer - ::placeholder, ::-webkit-input-placeholder color: values.$color-text-1 opacity: 1 @@ -30,3 +34,11 @@ button display: flex align-items: center justify-content: center + +.divider + width: 100% + font-size: 1.4em + border-style: solid + border-image-source: linear-gradient(to right, values.$color-base-1, values.$color-base-2, values.$color-base-1) + border-image-slice: 0 0 1 0 + border-image-width: 2px diff --git a/ui/menu/src/style/values.sass b/ui/menu/src/style/values.sass index d3995f4..973379b 100644 --- a/ui/menu/src/style/values.sass +++ b/ui/menu/src/style/values.sass @@ -13,3 +13,4 @@ $color-base-2: color.scale($color-base, $lightness: 20%) $color-primary-light: color.scale($color-primary, $lightness: 15%) $color-primary-dark: color.scale($color-primary, $lightness: -15%) $color-text-1: color.scale($color-text, $lightness: -15%) +$color-text-d1: color.scale($color-base, $lightness: -20%) diff --git a/ui/menu/src/util/api.ts b/ui/menu/src/util/api.ts index 57003c4..f4ad6e9 100644 --- a/ui/menu/src/util/api.ts +++ b/ui/menu/src/util/api.ts @@ -1,13 +1,15 @@ -import { Writable, writable } from "svelte/store"; +import { type Writable, writable } from "svelte/store"; -import { Configuration, DefaultApi, Website } from "talon-client"; +import { Configuration, DefaultApi, type Website } from "talon-client"; import { getSubdomain } from "./functions"; import { talonConfig } from "./talonData"; export const websitesStore: Writable = writable([]); export const currentWebsiteStore: Writable = writable(null); -export const client = new DefaultApi(new Configuration({ basePath: talonConfig.api })); +export const client = new DefaultApi( + new Configuration({ basePath: `${talonConfig.internal}/api` }) +); export function fetchWebsites(): void { client.websitesGet().then((ws) => { diff --git a/ui/menu/src/util/functions.ts b/ui/menu/src/util/functions.ts index 41b6256..3ab6f85 100644 --- a/ui/menu/src/util/functions.ts +++ b/ui/menu/src/util/functions.ts @@ -21,6 +21,29 @@ export function getSubdomain(): string { return "-"; } +export function getSubdomainAndVersion(): [string, number | null] { + const hn = window.location.hostname; + const rd_noport = talonConfig.root_domain.split(":", 1)[0]; + + if (hn.endsWith("." + rd_noport)) { + const subdomainSplit = hn + .substring(0, hn.length - rd_noport.length - 1) + .split("--", 2); + const subdomain = subdomainSplit[0]; + + let version = + subdomainSplit.length > 1 ? parseInt(subdomainSplit[1].replace(/^v/, "")) : null; + if (Number.isNaN(version)) version = null; + + if (subdomain === "x") { + return ["-", version]; + } else { + return [subdomain, version]; + } + } + return ["-", null]; +} + export function getWebsiteUrl(subdomain: string): string { const proto = window.location.protocol; @@ -41,3 +64,40 @@ export function getWebsiteVersionUrl(subdomain: string, version: number): string return `${proto}//${subdomain}${v}.${talonConfig.root_domain}`; } } + +export function isUrl(url: string): boolean { + return /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)/.test( + url + ); +} + +export function trimCommit(commit: string | undefined): string | undefined { + if (commit) { + return commit.slice(0, 9); + } + return undefined; +} + +export function isMobile(): boolean { + return window.innerWidth < 768; +} + +/** + * Get a 2-letter abbreviation of the website name. + * + * If the name consists of multiple words + * (separated by spaces, underscores or CamelCase), output + * the first letters of these words. + * + * Otherwise output the first letters of the name. + */ +export function getAbbreviation(name: string): string { + const split_sep = name + .replace(/([a-z])([A-Z])/g, "$1_$2") + .split(/[ ,.;_-]/) + .filter((x) => x.length > 0); + if (split_sep.length >= 2) { + return split_sep[0].charAt(0) + split_sep[1].charAt(0); + } + return name.substring(0, 2); +} diff --git a/ui/menu/src/util/icons.ts b/ui/menu/src/util/icons.ts index 2eb2544..ec9fa2a 100644 --- a/ui/menu/src/util/icons.ts +++ b/ui/menu/src/util/icons.ts @@ -6,6 +6,7 @@ import { svgPathData as faHistory } from "@fortawesome/free-solid-svg-icons/faHi import { svgPathData as faArrowRight } from "@fortawesome/free-solid-svg-icons/faChevronRight"; import { svgPathData as faClose } from "@fortawesome/free-solid-svg-icons/faTimes"; import { svgPathData as faMenu } from "@fortawesome/free-solid-svg-icons/faTh"; +import { svgPathData as faCog } from "@fortawesome/free-solid-svg-icons/faCog"; import { svgPathData as faGit } from "@fortawesome/free-brands-svg-icons/faGitAlt"; import { svgPathData as faGithub } from "@fortawesome/free-brands-svg-icons/faGithub"; @@ -21,6 +22,7 @@ const icons: { [key: string]: [number, number, string] } = { arrowRight: [320, 512, faArrowRight], close: [352, 512, faClose], menu: [512, 512, faMenu], + cog: [512, 512, faCog], git: [496, 512, faGit], github: [496, 512, faGithub], diff --git a/ui/menu/src/util/types.ts b/ui/menu/src/util/types.ts index 0c5fb17..45df53f 100644 --- a/ui/menu/src/util/types.ts +++ b/ui/menu/src/util/types.ts @@ -1,5 +1,5 @@ export interface TalonConfig { - api: string; + internal: string; version: string; root_domain: string; } diff --git a/ui/talon-client/.openapi-generator/FILES b/ui/talon-client/.openapi-generator/FILES index 4acdeed..2d64860 100644 --- a/ui/talon-client/.openapi-generator/FILES +++ b/ui/talon-client/.openapi-generator/FILES @@ -1,6 +1,5 @@ .gitignore .npmignore -.openapi-generator-ignore README.md package.json src/apis/DefaultApi.ts diff --git a/ui/talon-client/package-lock.json b/ui/talon-client/package-lock.json index 7816643..6450afb 100644 --- a/ui/talon-client/package-lock.json +++ b/ui/talon-client/package-lock.json @@ -1,12 +1,12 @@ { "name": "talon-client", - "version": "0.1.0", + "version": "0.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "talon-client", - "version": "0.1.0", + "version": "0.2.0", "devDependencies": { "typescript": "^4.0" } diff --git a/ui/talon-client/package.json b/ui/talon-client/package.json index a459cd3..69a12db 100644 --- a/ui/talon-client/package.json +++ b/ui/talon-client/package.json @@ -1,6 +1,6 @@ { "name": "talon-client", - "version": "0.1.0", + "version": "0.2.0", "description": "OpenAPI client for talon-client", "author": "OpenAPI-Generator", "repository": { diff --git a/ui/talon-client/src/apis/DefaultApi.ts b/ui/talon-client/src/apis/DefaultApi.ts index c5c159a..60479a9 100644 --- a/ui/talon-client/src/apis/DefaultApi.ts +++ b/ui/talon-client/src/apis/DefaultApi.ts @@ -52,6 +52,15 @@ export interface WebsiteSubdomainGetRequest { subdomain: string; } +export interface WebsiteSubdomainIconDeleteRequest { + subdomain: string; +} + +export interface WebsiteSubdomainIconPutRequest { + subdomain: string; + body: Blob; +} + export interface WebsiteSubdomainPatchRequest { subdomain: string; websiteUpdate: WebsiteUpdate; @@ -221,6 +230,81 @@ export class DefaultApi extends runtime.BaseAPI { return await response.value(); } + /** + * Delete a website icon + */ + async websiteSubdomainIconDeleteRaw(requestParameters: WebsiteSubdomainIconDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.subdomain === null || requestParameters.subdomain === undefined) { + throw new runtime.RequiredError('subdomain','Required parameter requestParameters.subdomain was null or undefined when calling websiteSubdomainIconDelete.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["X-API-Key"] = this.configuration.apiKey("X-API-Key"); // ApiKeyAuthorization authentication + } + + const response = await this.request({ + path: `/website/{subdomain}/icon`.replace(`{${"subdomain"}}`, encodeURIComponent(String(requestParameters.subdomain))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete a website icon + */ + async websiteSubdomainIconDelete(requestParameters: WebsiteSubdomainIconDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.websiteSubdomainIconDeleteRaw(requestParameters, initOverrides); + } + + /** + * Supported image formats: png, jpeg, gif, bmp, ico, tiff, webp, pnm, dds, tga, openexr, farbfeld Maximum upload size: 5MB, 4000 pixels Icons are resized to 32x32 pixels. + * Upload a website icon + */ + async websiteSubdomainIconPutRaw(requestParameters: WebsiteSubdomainIconPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.subdomain === null || requestParameters.subdomain === undefined) { + throw new runtime.RequiredError('subdomain','Required parameter requestParameters.subdomain was null or undefined when calling websiteSubdomainIconPut.'); + } + + if (requestParameters.body === null || requestParameters.body === undefined) { + throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling websiteSubdomainIconPut.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/octet-stream'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["X-API-Key"] = this.configuration.apiKey("X-API-Key"); // ApiKeyAuthorization authentication + } + + const response = await this.request({ + path: `/website/{subdomain}/icon`.replace(`{${"subdomain"}}`, encodeURIComponent(String(requestParameters.subdomain))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: requestParameters.body as any, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Supported image formats: png, jpeg, gif, bmp, ico, tiff, webp, pnm, dds, tga, openexr, farbfeld Maximum upload size: 5MB, 4000 pixels Icons are resized to 32x32 pixels. + * Upload a website icon + */ + async websiteSubdomainIconPut(requestParameters: WebsiteSubdomainIconPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.websiteSubdomainIconPutRaw(requestParameters, initOverrides); + } + /** * Update website */ diff --git a/ui/talon-client/src/models/Info.ts b/ui/talon-client/src/models/Info.ts index db4f551..40815c8 100644 --- a/ui/talon-client/src/models/Info.ts +++ b/ui/talon-client/src/models/Info.ts @@ -45,11 +45,11 @@ export interface Info { */ version: InfoVersion; /** - * Current uptime of the server in seconds - * @type {number} + * Start time of the server + * @type {Date} * @memberof Info */ - uptime: number; + startTime: Date; } /** @@ -59,7 +59,7 @@ export function instanceOfInfo(value: object): boolean { let isInstance = true; isInstance = isInstance && "stats" in value; isInstance = isInstance && "version" in value; - isInstance = isInstance && "uptime" in value; + isInstance = isInstance && "startTime" in value; return isInstance; } @@ -76,7 +76,7 @@ export function InfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): Info 'stats': InfoStatsFromJSON(json['stats']), 'version': InfoVersionFromJSON(json['version']), - 'uptime': json['uptime'], + 'startTime': (new Date(json['start_time'])), }; } @@ -91,6 +91,6 @@ export function InfoToJSON(value?: Info | null): any { 'stats': InfoStatsToJSON(value.stats), 'version': InfoVersionToJSON(value.version), - 'uptime': value.uptime, + 'start_time': (value.startTime.toISOString()), }; } diff --git a/ui/talon-client/src/models/Website.ts b/ui/talon-client/src/models/Website.ts index ae97648..d582a66 100644 --- a/ui/talon-client/src/models/Website.ts +++ b/ui/talon-client/src/models/Website.ts @@ -82,6 +82,12 @@ export interface Website { * @memberof Website */ sourceIcon?: SourceIcon; + /** + * Does the website have an icon? + * @type {boolean} + * @memberof Website + */ + hasIcon: boolean; } /** @@ -93,6 +99,7 @@ export function instanceOfWebsite(value: object): boolean { isInstance = isInstance && "name" in value; isInstance = isInstance && "createdAt" in value; isInstance = isInstance && "visibility" in value; + isInstance = isInstance && "hasIcon" in value; return isInstance; } @@ -115,6 +122,7 @@ export function WebsiteFromJSONTyped(json: any, ignoreDiscriminator: boolean): W 'visibility': VisibilityFromJSON(json['visibility']), 'sourceUrl': !exists(json, 'source_url') ? undefined : json['source_url'], 'sourceIcon': !exists(json, 'source_icon') ? undefined : SourceIconFromJSON(json['source_icon']), + 'hasIcon': json['has_icon'], }; } @@ -135,5 +143,6 @@ export function WebsiteToJSON(value?: Website | null): any { 'visibility': VisibilityToJSON(value.visibility), 'source_url': value.sourceUrl, 'source_icon': SourceIconToJSON(value.sourceIcon), + 'has_icon': value.hasIcon, }; }