From e73961fe590d9db384dccc0d8bde019bb1f52af3 Mon Sep 17 00:00:00 2001 From: Ramon Date: Wed, 1 Oct 2025 23:57:11 -0400 Subject: [PATCH 01/17] Fix(config reset when syncing config) (#207) * fix(Add RUSTC_BOOTSTRAP to devshell) * fix(Serialize config if non-default, rather than never) --- flake.nix | 4 +++- rust-toolchain.toml | 1 + src/config/code.rs | 40 ++++++++++++++++++++++++++++++---------- 3 files changed, 34 insertions(+), 11 deletions(-) diff --git a/flake.nix b/flake.nix index 936e777..297d215 100644 --- a/flake.nix +++ b/flake.nix @@ -78,7 +78,7 @@ # Env vars # a nightly compiler is required unless we use this cheat code. - RUSTC_BOOTSTRAP = 0; + RUSTC_BOOTSTRAP = 1; # CFG_RELEASE = "${rustPlatform.rust.rustc.version}-stable"; CFG_RELEASE_CHANNEL = "stable"; @@ -104,6 +104,8 @@ PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; RUST_BACKTRACE = "full"; LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs; + RUSTC_BOOTSTRAP = 1; + CFG_RELEASE_CHANNEL = "stable"; }; } ); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 2a19081..92e3f22 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -6,5 +6,6 @@ components = [ "rustfmt", "clippy", "rust-analyzer", + "rust-src" ] profile = "minimal" diff --git a/src/config/code.rs b/src/config/code.rs index b842657..48e8105 100644 --- a/src/config/code.rs +++ b/src/config/code.rs @@ -1,12 +1,29 @@ //! Code in config use serde::{Deserialize, Serialize}; +const PICK_DEFAULT: &str = "${fid}.${slug}"; fn default_pick() -> String { - "${fid}.${slug}".into() + PICK_DEFAULT.into() } +const SUBMISSION_DEFAULT: &str = "${fid}.${slug}.${sid}.${ac}"; fn default_submission() -> String { - "${fid}.${slug}.${sid}.${ac}".into() + SUBMISSION_DEFAULT.into() +} + +fn is_default_pick(t: &String) -> bool { + t == PICK_DEFAULT +} + +fn is_default_submission(t: &String) -> bool { + t == SUBMISSION_DEFAULT +} + +fn is_default_string(t: &String) -> bool { + t.is_empty() +} +fn is_default_bool(t: &bool) -> bool { + !t } /// Code config @@ -18,26 +35,29 @@ pub struct Code { pub editor_args: Option>, #[serde(rename(serialize = "editor-envs"), alias = "editor-envs", default)] pub editor_envs: Option>, - #[serde(default, skip_serializing)] + #[serde(default, skip_serializing_if = "is_default_bool")] pub edit_code_marker: bool, - #[serde(default, skip_serializing)] + #[serde(default, skip_serializing_if = "is_default_string")] pub start_marker: String, - #[serde(default, skip_serializing)] + #[serde(default, skip_serializing_if = "is_default_string")] pub end_marker: String, #[serde(rename(serialize = "inject_before"), alias = "inject_before", default)] pub inject_before: Option>, #[serde(rename(serialize = "inject_after"), alias = "inject_after", default)] pub inject_after: Option>, - #[serde(default, skip_serializing)] + #[serde(default, skip_serializing_if = "is_default_bool")] pub comment_problem_desc: bool, - #[serde(default, skip_serializing)] + #[serde(default, skip_serializing_if = "is_default_string")] pub comment_leading: String, - #[serde(default, skip_serializing)] + #[serde(default, skip_serializing_if = "is_default_bool")] pub test: bool, pub lang: String, - #[serde(default = "default_pick", skip_serializing)] + #[serde(default = "default_pick", skip_serializing_if = "is_default_pick")] pub pick: String, - #[serde(default = "default_submission", skip_serializing)] + #[serde( + default = "default_submission", + skip_serializing_if = "is_default_submission" + )] pub submission: String, } From 366c4d86c9bcfd781ea222a28aa26fad1139576e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 12:03:45 +0800 Subject: [PATCH 02/17] chore(dep): bump the deps group across 1 directory with 17 updates (#206) Bumps the deps group with 17 updates in the / directory: | Package | From | To | | --- | --- | --- | | [async-trait](https://github.com/dtolnay/async-trait) | `0.1.88` | `0.1.89` | | [tokio](https://github.com/tokio-rs/tokio) | `1.45.1` | `1.47.1` | | [clap](https://github.com/clap-rs/clap) | `4.5.40` | `4.5.48` | | [keyring](https://github.com/hwchen/keyring-rs) | `3.6.2` | `3.6.3` | | [log](https://github.com/rust-lang/log) | `0.4.27` | `0.4.28` | | [pyo3](https://github.com/pyo3/pyo3) | `0.25.1` | `0.26.0` | | [rand](https://github.com/rust-random/rand) | `0.9.1` | `0.9.2` | | [serde](https://github.com/serde-rs/serde) | `1.0.219` | `1.0.228` | | [serde_json](https://github.com/serde-rs/json) | `1.0.140` | `1.0.145` | | [toml](https://github.com/toml-rs/toml) | `0.8.23` | `0.9.7` | | [regex](https://github.com/rust-lang/regex) | `1.11.1` | `1.11.3` | | [scraper](https://github.com/causal-agent/scraper) | `0.23.1` | `0.24.0` | | [anyhow](https://github.com/dtolnay/anyhow) | `1.0.98` | `1.0.100` | | [clap_complete](https://github.com/clap-rs/clap) | `4.5.54` | `4.5.58` | | [thiserror](https://github.com/dtolnay/thiserror) | `2.0.12` | `2.0.17` | | [diesel](https://github.com/diesel-rs/diesel) | `2.2.11` | `2.2.12` | | [reqwest](https://github.com/seanmonstar/reqwest) | `0.12.22` | `0.12.23` | Updates `async-trait` from 0.1.88 to 0.1.89 - [Release notes](https://github.com/dtolnay/async-trait/releases) - [Commits](https://github.com/dtolnay/async-trait/compare/0.1.88...0.1.89) Updates `tokio` from 1.45.1 to 1.47.1 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.45.1...tokio-1.47.1) Updates `clap` from 4.5.40 to 4.5.48 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.40...clap_complete-v4.5.48) Updates `keyring` from 3.6.2 to 3.6.3 - [Release notes](https://github.com/hwchen/keyring-rs/releases) - [Changelog](https://github.com/open-source-cooperative/keyring-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hwchen/keyring-rs/compare/v3.6.2...v3.6.3) Updates `log` from 0.4.27 to 0.4.28 - [Release notes](https://github.com/rust-lang/log/releases) - [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/log/compare/0.4.27...0.4.28) Updates `pyo3` from 0.25.1 to 0.26.0 - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md) - [Commits](https://github.com/pyo3/pyo3/compare/v0.25.1...v0.26.0) Updates `rand` from 0.9.1 to 0.9.2 - [Release notes](https://github.com/rust-random/rand/releases) - [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-random/rand/compare/rand_core-0.9.1...rand_core-0.9.2) Updates `serde` from 1.0.219 to 1.0.228 - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.219...v1.0.228) Updates `serde_json` from 1.0.140 to 1.0.145 - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.140...v1.0.145) Updates `toml` from 0.8.23 to 0.9.7 - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.23...toml-v0.9.7) Updates `regex` from 1.11.1 to 1.11.3 - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.11.1...1.11.3) Updates `scraper` from 0.23.1 to 0.24.0 - [Release notes](https://github.com/causal-agent/scraper/releases) - [Commits](https://github.com/causal-agent/scraper/compare/v0.23.1...v0.24.0) Updates `anyhow` from 1.0.98 to 1.0.100 - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.98...1.0.100) Updates `clap_complete` from 4.5.54 to 4.5.58 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.54...clap_complete-v4.5.58) Updates `thiserror` from 2.0.12 to 2.0.17 - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/2.0.12...2.0.17) Updates `diesel` from 2.2.11 to 2.2.12 - [Release notes](https://github.com/diesel-rs/diesel/releases) - [Changelog](https://github.com/diesel-rs/diesel/blob/master/CHANGELOG.md) - [Commits](https://github.com/diesel-rs/diesel/compare/v2.2.11...v2.2.12) Updates `reqwest` from 0.12.22 to 0.12.23 - [Release notes](https://github.com/seanmonstar/reqwest/releases) - [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md) - [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.22...v0.12.23) --- updated-dependencies: - dependency-name: async-trait dependency-version: 0.1.89 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: tokio dependency-version: 1.47.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: clap dependency-version: 4.5.48 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: keyring dependency-version: 3.6.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: log dependency-version: 0.4.28 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: pyo3 dependency-version: 0.26.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: rand dependency-version: 0.9.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: serde dependency-version: 1.0.228 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: serde_json dependency-version: 1.0.145 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: toml dependency-version: 0.9.7 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: regex dependency-version: 1.11.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: scraper dependency-version: 0.24.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: anyhow dependency-version: 1.0.100 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: clap_complete dependency-version: 4.5.58 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: thiserror dependency-version: 2.0.17 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: diesel dependency-version: 2.2.12 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: reqwest dependency-version: 0.12.23 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: clearloop --- Cargo.lock | 338 ++++++++++++++++++++++++++++------------------------- Cargo.toml | 34 +++--- 2 files changed, 193 insertions(+), 179 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1f006e7..3e00499 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -83,9 +83,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" [[package]] name = "async-compression" @@ -102,9 +102,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.88" +version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", @@ -191,18 +191,18 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "clap" -version = "4.5.40" +version = "4.5.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" +checksum = "e2134bb3ea021b78629caa971416385309e0131b351b25e01dc16fb54e1b5fae" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.40" +version = "4.5.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" +checksum = "c2ba64afa3c0a6df7fa517765e31314e983f51dda798ffba27b988194fb65dc9" dependencies = [ "anstream", "anstyle", @@ -212,9 +212,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.54" +version = "4.5.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aad5b1b4de04fead402672b48897030eec1f3bfe1550776322f59f6d6e6a5677" +checksum = "75bf0b32ad2e152de789bb635ea4d3078f6b838ad7974143e99b99f45a04af4a" dependencies = [ "clap", ] @@ -267,9 +267,9 @@ dependencies = [ [[package]] name = "cssparser" -version = "0.34.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c66d1cd8ed61bf80b38432613a7a2f09401ab8d0501110655f8b341484a3e3" +checksum = "4e901edd733a1472f944a45116df3f846f54d37e67e68640ac8bb69689aca2aa" dependencies = [ "cssparser-macros", "dtoa-short", @@ -334,9 +334,18 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.18" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ "proc-macro2", "quote", @@ -345,9 +354,9 @@ dependencies = [ [[package]] name = "diesel" -version = "2.2.11" +version = "2.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a917a9209950404d5be011c81d081a2692a822f73c3d6af586f0cab5ff50f614" +checksum = "229850a212cd9b84d4f0290ad9d294afc0ae70fccaa8949dbe8b43ffafa1e20c" dependencies = [ "diesel_derives", "libsqlite3-sys", @@ -592,11 +601,11 @@ dependencies = [ [[package]] name = "getopts" -version = "0.2.21" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" +checksum = "cfe4fbac503b8d1f88e6676011885f34b7174f46e59956bba534ba83abded4df" dependencies = [ - "unicode-width 0.1.14", + "unicode-width", ] [[package]] @@ -649,9 +658,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" [[package]] name = "heck" @@ -667,16 +676,13 @@ checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "html5ever" -version = "0.29.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e15626aaf9c351bc696217cbe29cb9b5e86c43f8a46b5e2f5c6c5cf7cb904ce" +checksum = "55d958c2f74b664487a2035fe1dadb032c48718a03b63f3ab0b8537db8549ed4" dependencies = [ "log", - "mac", "markup5ever", - "proc-macro2", - "quote", - "syn", + "match_token", ] [[package]] @@ -796,7 +802,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.5.10", "system-configuration", "tokio", "tower-service", @@ -822,9 +828,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.4.0" +version = "2.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" +checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" dependencies = [ "equivalent", "hashbrown", @@ -836,6 +842,17 @@ version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" +[[package]] +name = "io-uring" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" +dependencies = [ + "bitflags", + "cfg-if", + "libc", +] + [[package]] name = "ipnet" version = "2.9.0" @@ -876,11 +893,12 @@ dependencies = [ [[package]] name = "keyring" -version = "3.6.2" +version = "3.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1961983669d57bdfe6c0f3ef8e4c229b5ef751afcc7d87e4271d2f71f6ccfa8b" +checksum = "eebcc3aff044e5944a8fbaf69eb277d11986064cba30c468730e8b9909fb551c" dependencies = [ "log", + "zeroize", ] [[package]] @@ -900,7 +918,7 @@ dependencies = [ "nix", "openssl", "pyo3", - "rand 0.9.1", + "rand 0.9.2", "regex", "reqwest", "scraper", @@ -909,7 +927,7 @@ dependencies = [ "thiserror", "tokio", "toml", - "unicode-width 0.2.1", + "unicode-width", ] [[package]] @@ -956,9 +974,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "mac" @@ -968,16 +986,24 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" [[package]] name = "markup5ever" -version = "0.14.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82c88c6129bd24319e62a0359cb6b958fa7e8be6e19bb1663bc396b90883aca5" +checksum = "311fe69c934650f8f19652b3946075f0fc41ad8757dbb68f1ca14e7900ecc1c3" dependencies = [ "log", - "phf", - "phf_codegen", - "string_cache", - "string_cache_codegen", "tendril", + "web_atoms", +] + +[[package]] +name = "match_token" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac84fd3f360fcc43dc5f5d186f02a94192761a080e8bc58621ad4d12296a58cf" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1083,9 +1109,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "openssl" @@ -1173,7 +1199,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ "phf_macros", - "phf_shared 0.11.2", + "phf_shared", ] [[package]] @@ -1182,18 +1208,8 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" dependencies = [ - "phf_generator 0.11.2", - "phf_shared 0.11.2", -] - -[[package]] -name = "phf_generator" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" -dependencies = [ - "phf_shared 0.10.0", - "rand 0.8.5", + "phf_generator", + "phf_shared", ] [[package]] @@ -1202,7 +1218,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ - "phf_shared 0.11.2", + "phf_shared", "rand 0.8.5", ] @@ -1212,22 +1228,13 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ - "phf_generator 0.11.2", - "phf_shared 0.11.2", + "phf_generator", + "phf_shared", "proc-macro2", "quote", "syn", ] -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - [[package]] name = "phf_shared" version = "0.11.2" @@ -1293,9 +1300,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a" +checksum = "7ba0117f4212101ee6544044dae45abe1083d30ce7b29c4b5cbdfa2354e07383" dependencies = [ "indoc", "libc", @@ -1310,19 +1317,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598" +checksum = "4fc6ddaf24947d12a9aa31ac65431fb1b851b8f4365426e182901eabfb87df5f" dependencies = [ - "once_cell", "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c" +checksum = "025474d3928738efb38ac36d4744a74a400c901c7596199e20e45d98eb194105" dependencies = [ "libc", "pyo3-build-config", @@ -1330,9 +1336,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50" +checksum = "2e64eb489f22fe1c95911b77c44cc41e7c19f3082fc81cce90f657cdc42ffded" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -1342,9 +1348,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc" +checksum = "100246c0ecf400b475341b8455a9213344569af29a3c841d29270e53102e0fcf" dependencies = [ "heck", "proc-macro2", @@ -1368,31 +1374,19 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ - "libc", - "rand_chacha 0.3.1", "rand_core 0.6.4", ] [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ - "rand_chacha 0.9.0", + "rand_chacha", "rand_core 0.9.0", ] -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - [[package]] name = "rand_chacha" version = "0.9.0" @@ -1408,9 +1402,6 @@ name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.15", -] [[package]] name = "rand_core" @@ -1444,9 +1435,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.1" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "8b5288124840bee7b386bc413c487869b360b2b4ec421ea56425128692f2a82c" dependencies = [ "aho-corasick", "memchr", @@ -1456,9 +1447,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "833eb9ce86d40ef33cb1306d8accf7bc8ec2bfea4355cbdebb3df68b40925cad" dependencies = [ "aho-corasick", "memchr", @@ -1473,9 +1464,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.22" +version = "0.12.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531" +checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" dependencies = [ "async-compression", "base64", @@ -1610,9 +1601,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scraper" -version = "0.23.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527e65d9d888567588db4c12da1087598d0f6f8b346cc2c5abc91f05fc2dffe2" +checksum = "e5f3a24d916e78954af99281a455168d4a9515d65eca99a18da1b813689c4ad9" dependencies = [ "cssparser", "ego-tree", @@ -1648,9 +1639,9 @@ dependencies = [ [[package]] name = "selectors" -version = "0.26.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd568a4c9bb598e291a08244a5c1f5a8a6650bee243b5b0f8dbb3d9cc1d87fe8" +checksum = "5685b6ae43bfcf7d2e7dfcfb5d8e8f61b46442c902531e41a32a9a8bf0ee0fb6" dependencies = [ "bitflags", "cssparser", @@ -1667,18 +1658,28 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.219" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", @@ -1687,23 +1688,24 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "itoa", "memchr", "ryu", "serde", + "serde_core", ] [[package]] name = "serde_spanned" -version = "0.6.9" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +checksum = "5417783452c2be558477e104686f7de5dae53dba813c28435e0e70f82d9b04ee" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -1773,6 +1775,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "spin" version = "0.9.8" @@ -1787,26 +1799,25 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "string_cache" -version = "0.8.7" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" dependencies = [ "new_debug_unreachable", - "once_cell", "parking_lot", - "phf_shared 0.10.0", + "phf_shared", "precomputed-hash", "serde", ] [[package]] name = "string_cache_codegen" -version = "0.5.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" +checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0" dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", + "phf_generator", + "phf_shared", "proc-macro2", "quote", ] @@ -1896,18 +1907,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", @@ -1962,20 +1973,22 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.45.1" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", + "io-uring", "libc", "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "slab", + "socket2 0.6.0", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2025,44 +2038,42 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.23" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +checksum = "00e5e5d9bf2475ac9d4f0d9edab68cc573dc2fd644b0dba36b0c30a92dd9eaa0" dependencies = [ - "serde", + "indexmap", + "serde_core", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_parser", + "toml_writer", + "winnow", ] [[package]] name = "toml_datetime" -version = "0.6.11" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +checksum = "32f1085dec27c2b6632b04c80b3bb1b4300d6495d1e129693bdda7d91e72eec1" dependencies = [ - "serde", + "serde_core", ] [[package]] -name = "toml_edit" -version = "0.22.27" +name = "toml_parser" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +checksum = "4cf893c33be71572e0e9aa6dd15e6677937abd686b066eac3f8cd3531688a627" dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "toml_write", "winnow", ] [[package]] -name = "toml_write" -version = "0.1.2" +name = "toml_writer" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" +checksum = "d163a63c116ce562a22cda521fcc4d79152e7aba014456fb5eb442f6d6a10109" [[package]] name = "tower" @@ -2155,12 +2166,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - [[package]] name = "unicode-width" version = "0.2.1" @@ -2312,6 +2317,18 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web_atoms" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57ffde1dc01240bdf9992e3205668b235e59421fd085e8a317ed98da0178d414" +dependencies = [ + "phf", + "phf_codegen", + "string_cache", + "string_cache_codegen", +] + [[package]] name = "windows-link" version = "0.1.1" @@ -2495,12 +2512,9 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" -version = "0.7.11" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd" -dependencies = [ - "memchr", -] +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" [[package]] name = "wit-bindgen-rt" diff --git a/Cargo.toml b/Cargo.toml index a29aa42..ad17aeb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,33 +16,33 @@ keywords = ["cli", "games", "leetcode"] readme = './README.md' [dependencies] -async-trait = "0.1.88" -tokio = { version = "1.45.1", features = ["full"] } -clap = { version = "4.5.40", features = ["cargo"] } +async-trait = "0.1.89" +tokio = { version = "1.47.1", features = ["full"] } +clap = { version = "4.5.48", features = ["cargo"] } colored = "3.0.0" dirs = "6.0.0" env_logger = "0.11.6" -keyring = "3.6.2" -log = "0.4.27" +keyring = "3.6.3" +log = "0.4.28" openssl = "0.10.73" -pyo3 = { version = "0.25.1", optional = true } -rand = "0.9.1" -serde = { version = "1.0.219", features = ["derive"] } -serde_json = "1.0.140" -toml = "0.8.23" -regex = "1.11.1" -scraper = "0.23.1" -anyhow = "1.0.98" -clap_complete = "4.5.54" -thiserror = "2.0.12" +pyo3 = { version = "0.26.0", optional = true } +rand = "0.9.2" +serde = { version = "1.0.228", features = ["derive"] } +serde_json = "1.0.145" +toml = "0.9.7" +regex = "1.11.3" +scraper = "0.24.0" +anyhow = "1.0.100" +clap_complete = "4.5.58" +thiserror = "2.0.17" unicode-width = "0.2" [dependencies.diesel] -version = "2.2.11" +version = "2.2.12" features = ["sqlite"] [dependencies.reqwest] -version = "0.12.22" +version = "0.12.23" features = ["gzip", "json"] [features] From 1e6c53c04cd4b8d017fcab1a650ec96727f3950c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 12:19:56 +0800 Subject: [PATCH 03/17] chore(dep): bump actions/checkout from 4 to 5 in the deps group (#200) Bumps the deps group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4 to 5 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: clearloop --- .github/workflows/clippy.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/rust.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 563233f..c30a548 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -13,7 +13,7 @@ jobs: matrix: os: [macOS-latest, ubuntu-latest] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions-rs/toolchain@v1 with: components: clippy diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b86e39..72cc16a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install stable toolchain uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ee47a77..54f8919 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,7 +14,7 @@ jobs: os: [macOS-latest, ubuntu-latest] steps: - name: Checkout the source code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set nightly toolchain uses: actions-rs/toolchain@v1 with: From 356a0cbed06818f4490f6ba5f4a810fe08a54320 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Nov 2025 15:20:47 +0800 Subject: [PATCH 04/17] chore(dep): bump the deps group with 9 updates (#208) Bumps the deps group with 9 updates: | Package | From | To | | --- | --- | --- | | [tokio](https://github.com/tokio-rs/tokio) | `1.47.1` | `1.48.0` | | [clap](https://github.com/clap-rs/clap) | `4.5.48` | `4.5.51` | | [openssl](https://github.com/rust-openssl/rust-openssl) | `0.10.73` | `0.10.74` | | [pyo3](https://github.com/pyo3/pyo3) | `0.26.0` | `0.27.1` | | [toml](https://github.com/toml-rs/toml) | `0.9.7` | `0.9.8` | | [regex](https://github.com/rust-lang/regex) | `1.11.3` | `1.12.2` | | [clap_complete](https://github.com/clap-rs/clap) | `4.5.58` | `4.5.60` | | [unicode-width](https://github.com/unicode-rs/unicode-width) | `0.2.1` | `0.2.2` | | [reqwest](https://github.com/seanmonstar/reqwest) | `0.12.23` | `0.12.24` | Updates `tokio` from 1.47.1 to 1.48.0 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.47.1...tokio-1.48.0) Updates `clap` from 4.5.48 to 4.5.51 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.48...clap_complete-v4.5.51) Updates `openssl` from 0.10.73 to 0.10.74 - [Release notes](https://github.com/rust-openssl/rust-openssl/releases) - [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.73...openssl-v0.10.74) Updates `pyo3` from 0.26.0 to 0.27.1 - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/v0.27.1/CHANGELOG.md) - [Commits](https://github.com/pyo3/pyo3/compare/v0.26.0...v0.27.1) Updates `toml` from 0.9.7 to 0.9.8 - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.9.7...toml-v0.9.8) Updates `regex` from 1.11.3 to 1.12.2 - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.11.3...1.12.2) Updates `clap_complete` from 4.5.58 to 4.5.60 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.58...clap_complete-v4.5.60) Updates `unicode-width` from 0.2.1 to 0.2.2 - [Commits](https://github.com/unicode-rs/unicode-width/compare/v0.2.1...v0.2.2) Updates `reqwest` from 0.12.23 to 0.12.24 - [Release notes](https://github.com/seanmonstar/reqwest/releases) - [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md) - [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.23...v0.12.24) --- updated-dependencies: - dependency-name: tokio dependency-version: 1.48.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: clap dependency-version: 4.5.51 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: openssl dependency-version: 0.10.74 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: pyo3 dependency-version: 0.27.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: toml dependency-version: 0.9.8 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: regex dependency-version: 1.12.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: clap_complete dependency-version: 4.5.60 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: unicode-width dependency-version: 0.2.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: reqwest dependency-version: 0.12.24 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 183 ++++++++++++++++++----------------------------------- Cargo.toml | 16 ++--- 2 files changed, 70 insertions(+), 129 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3e00499..0b9f767 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,21 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "addr2line" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -123,21 +108,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" -[[package]] -name = "backtrace" -version = "0.3.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide 0.7.4", - "object", - "rustc-demangle", -] - [[package]] name = "base64" version = "0.22.1" @@ -191,18 +161,18 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "clap" -version = "4.5.48" +version = "4.5.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2134bb3ea021b78629caa971416385309e0131b351b25e01dc16fb54e1b5fae" +checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.48" +version = "4.5.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ba64afa3c0a6df7fa517765e31314e983f51dda798ffba27b988194fb65dc9" +checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" dependencies = [ "anstream", "anstyle", @@ -212,9 +182,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.58" +version = "4.5.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bf0b32ad2e152de789bb635ea4d3078f6b838ad7974143e99b99f45a04af4a" +checksum = "8e602857739c5a4291dfa33b5a298aeac9006185229a700e5810a3ef7272d971" dependencies = [ "clap", ] @@ -403,7 +373,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -508,7 +478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -631,12 +601,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "gimli" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" - [[package]] name = "h2" version = "0.4.6" @@ -842,17 +806,6 @@ version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" -[[package]] -name = "io-uring" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" -dependencies = [ - "bitflags", - "cfg-if", - "libc", -] - [[package]] name = "ipnet" version = "2.9.0" @@ -1027,15 +980,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.8.0" @@ -1098,15 +1042,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" -[[package]] -name = "object" -version = "0.36.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" -dependencies = [ - "memchr", -] - [[package]] name = "once_cell" version = "1.21.3" @@ -1115,9 +1050,9 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "openssl" -version = "0.10.73" +version = "0.10.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +checksum = "24ad14dd45412269e1a30f52ad8f0664f0f4f4a89ee8fe28c3b3527021ebb654" dependencies = [ "bitflags", "cfg-if", @@ -1147,9 +1082,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.109" +version = "0.9.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +checksum = "0a9f0075ba3c21b09f8e8b2026584b1d18d49388648f2fbbf3c97ea8deced8e2" dependencies = [ "cc", "libc", @@ -1300,9 +1235,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.26.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba0117f4212101ee6544044dae45abe1083d30ce7b29c4b5cbdfa2354e07383" +checksum = "37a6df7eab65fc7bee654a421404947e10a0f7085b6951bf2ea395f4659fb0cf" dependencies = [ "indoc", "libc", @@ -1317,18 +1252,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.26.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fc6ddaf24947d12a9aa31ac65431fb1b851b8f4365426e182901eabfb87df5f" +checksum = "f77d387774f6f6eec64a004eac0ed525aab7fa1966d94b42f743797b3e395afb" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.26.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "025474d3928738efb38ac36d4744a74a400c901c7596199e20e45d98eb194105" +checksum = "2dd13844a4242793e02df3e2ec093f540d948299a6a77ea9ce7afd8623f542be" dependencies = [ "libc", "pyo3-build-config", @@ -1336,9 +1271,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.26.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e64eb489f22fe1c95911b77c44cc41e7c19f3082fc81cce90f657cdc42ffded" +checksum = "eaf8f9f1108270b90d3676b8679586385430e5c0bb78bb5f043f95499c821a71" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -1348,9 +1283,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.26.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "100246c0ecf400b475341b8455a9213344569af29a3c841d29270e53102e0fcf" +checksum = "70a3b2274450ba5288bc9b8c1b69ff569d1d61189d4bff38f8d22e03d17f932b" dependencies = [ "heck", "proc-macro2", @@ -1435,9 +1370,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.3" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b5288124840bee7b386bc413c487869b360b2b4ec421ea56425128692f2a82c" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", @@ -1447,9 +1382,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "833eb9ce86d40ef33cb1306d8accf7bc8ec2bfea4355cbdebb3df68b40925cad" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -1464,9 +1399,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.23" +version = "0.12.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" +checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f" dependencies = [ "async-compression", "base64", @@ -1520,12 +1455,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - [[package]] name = "rustix" version = "0.38.34" @@ -1701,9 +1630,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5417783452c2be558477e104686f7de5dae53dba813c28435e0e70f82d9b04ee" +checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392" dependencies = [ "serde_core", ] @@ -1973,29 +1902,26 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.47.1" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ - "backtrace", "bytes", - "io-uring", "libc", "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", - "slab", "socket2 0.6.0", "tokio-macros", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "tokio-macros" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", @@ -2038,9 +1964,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00e5e5d9bf2475ac9d4f0d9edab68cc573dc2fd644b0dba36b0c30a92dd9eaa0" +checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8" dependencies = [ "indexmap", "serde_core", @@ -2053,27 +1979,27 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f1085dec27c2b6632b04c80b3bb1b4300d6495d1e129693bdda7d91e72eec1" +checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" dependencies = [ "serde_core", ] [[package]] name = "toml_parser" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cf893c33be71572e0e9aa6dd15e6677937abd686b066eac3f8cd3531688a627" +checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" dependencies = [ "winnow", ] [[package]] name = "toml_writer" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d163a63c116ce562a22cda521fcc4d79152e7aba014456fb5eb442f6d6a10109" +checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" [[package]] name = "tower" @@ -2168,9 +2094,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" [[package]] name = "unindent" @@ -2335,6 +2261,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + [[package]] name = "windows-registry" version = "0.4.0" @@ -2352,7 +2284,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" dependencies = [ - "windows-link", + "windows-link 0.1.1", ] [[package]] @@ -2361,7 +2293,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" dependencies = [ - "windows-link", + "windows-link 0.1.1", ] [[package]] @@ -2382,6 +2314,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link 0.2.1", +] + [[package]] name = "windows-targets" version = "0.52.6" diff --git a/Cargo.toml b/Cargo.toml index ad17aeb..4054e8c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,23 +17,23 @@ readme = './README.md' [dependencies] async-trait = "0.1.89" -tokio = { version = "1.47.1", features = ["full"] } -clap = { version = "4.5.48", features = ["cargo"] } +tokio = { version = "1.48.0", features = ["full"] } +clap = { version = "4.5.51", features = ["cargo"] } colored = "3.0.0" dirs = "6.0.0" env_logger = "0.11.6" keyring = "3.6.3" log = "0.4.28" -openssl = "0.10.73" -pyo3 = { version = "0.26.0", optional = true } +openssl = "0.10.74" +pyo3 = { version = "0.27.1", optional = true } rand = "0.9.2" serde = { version = "1.0.228", features = ["derive"] } serde_json = "1.0.145" -toml = "0.9.7" -regex = "1.11.3" +toml = "0.9.8" +regex = "1.12.2" scraper = "0.24.0" anyhow = "1.0.100" -clap_complete = "4.5.58" +clap_complete = "4.5.60" thiserror = "2.0.17" unicode-width = "0.2" @@ -42,7 +42,7 @@ version = "2.2.12" features = ["sqlite"] [dependencies.reqwest] -version = "0.12.23" +version = "0.12.24" features = ["gzip", "json"] [features] From 2b6f3759301a85e7dc673fc12589e5d0ddf44752 Mon Sep 17 00:00:00 2001 From: brubsby <57653502+brubsby@users.noreply.github.com> Date: Wed, 24 Dec 2025 02:04:18 -0500 Subject: [PATCH 05/17] Add -w/--watch flag to test subcommand to watch for file changes (#211) * add watch feature to test * bump version to 0.4.8 --- Cargo.lock | 247 ++++++++++++++++++++++++++++++++++++++++++++--- Cargo.toml | 3 +- src/cmds/test.rs | 75 +++++++++++++- 3 files changed, 308 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0b9f767..eee1d64 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -114,6 +114,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + [[package]] name = "bitflags" version = "2.6.0" @@ -235,6 +241,21 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-channel" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + [[package]] name = "cssparser" version = "0.35.0" @@ -471,6 +492,18 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +[[package]] +name = "filetime" +version = "0.2.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" +dependencies = [ + "cfg-if", + "libc", + "libredox", + "windows-sys 0.60.2", +] + [[package]] name = "flate2" version = "1.0.33" @@ -511,6 +544,15 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fsevent-sys" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" +dependencies = [ + "libc", +] + [[package]] name = "futf" version = "0.1.5" @@ -806,6 +848,26 @@ version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" +[[package]] +name = "inotify" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" +dependencies = [ + "bitflags 1.3.2", + "inotify-sys", + "libc", +] + +[[package]] +name = "inotify-sys" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" +dependencies = [ + "libc", +] + [[package]] name = "ipnet" version = "2.9.0" @@ -854,6 +916,26 @@ dependencies = [ "zeroize", ] +[[package]] +name = "kqueue" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac30106d7dce88daf4a3fcb4879ea939476d5074a9b7ddd0fb97fa4bed5596a" +dependencies = [ + "kqueue-sys", + "libc", +] + +[[package]] +name = "kqueue-sys" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" +dependencies = [ + "bitflags 1.3.2", + "libc", +] + [[package]] name = "leetcode-cli" version = "0.4.7" @@ -869,6 +951,7 @@ dependencies = [ "keyring", "log", "nix", + "notify", "openssl", "pyo3", "rand 0.9.2", @@ -895,8 +978,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags", + "bitflags 2.6.0", "libc", + "redox_syscall", ] [[package]] @@ -989,6 +1073,18 @@ dependencies = [ "adler2", ] +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", +] + [[package]] name = "mio" version = "1.0.2" @@ -1030,12 +1126,31 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags", + "bitflags 2.6.0", "cfg-if", "cfg_aliases", "libc", ] +[[package]] +name = "notify" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" +dependencies = [ + "bitflags 2.6.0", + "crossbeam-channel", + "filetime", + "fsevent-sys", + "inotify", + "kqueue", + "libc", + "log", + "mio 0.8.11", + "walkdir", + "windows-sys 0.48.0", +] + [[package]] name = "num-conv" version = "0.1.0" @@ -1054,7 +1169,7 @@ version = "0.10.74" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24ad14dd45412269e1a30f52ad8f0664f0f4f4a89ee8fe28c3b3527021ebb654" dependencies = [ - "bitflags", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -1354,7 +1469,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags", + "bitflags 2.6.0", ] [[package]] @@ -1461,7 +1576,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -1513,6 +1628,15 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "schannel" version = "0.1.23" @@ -1549,7 +1673,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -1572,7 +1696,7 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5685b6ae43bfcf7d2e7dfcfb5d8e8f61b46442c902531e41a32a9a8bf0ee0fb6" dependencies = [ - "bitflags", + "bitflags 2.6.0", "cssparser", "derive_more", "fxhash", @@ -1789,7 +1913,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags", + "bitflags 2.6.0", "core-foundation", "system-configuration-sys", ] @@ -1908,7 +2032,7 @@ checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ "bytes", "libc", - "mio", + "mio 1.0.2", "parking_lot", "pin-project-lite", "signal-hook-registry", @@ -2022,7 +2146,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ - "bitflags", + "bitflags 2.6.0", "bytes", "futures-util", "http", @@ -2139,6 +2263,16 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.1" @@ -2255,6 +2389,15 @@ dependencies = [ "string_cache_codegen", ] +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + [[package]] name = "windows-link" version = "0.1.1" @@ -2275,7 +2418,7 @@ checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ "windows-result", "windows-strings", - "windows-targets 0.53.0", + "windows-targets 0.53.5", ] [[package]] @@ -2296,6 +2439,15 @@ dependencies = [ "windows-link 0.1.1", ] +[[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.5", +] + [[package]] name = "windows-sys" version = "0.52.0" @@ -2314,6 +2466,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + [[package]] name = "windows-sys" version = "0.61.2" @@ -2323,6 +2484,21 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + [[package]] name = "windows-targets" version = "0.52.6" @@ -2341,10 +2517,11 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.0" +version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ + "windows-link 0.2.1", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -2355,6 +2532,12 @@ dependencies = [ "windows_x86_64_msvc 0.53.0", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -2367,6 +2550,12 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -2379,6 +2568,12 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -2403,6 +2598,12 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -2415,6 +2616,12 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -2427,6 +2634,12 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -2439,6 +2652,12 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -2463,7 +2682,7 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" dependencies = [ - "bitflags", + "bitflags 2.6.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 4054e8c..88de438 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ path = "src/bin/lc.rs" [package] name = "leetcode-cli" -version = "0.4.7" +version = "0.4.8" authors = ["clearloop "] edition = "2021" description = "Leetcode command-line interface in rust." @@ -36,6 +36,7 @@ anyhow = "1.0.100" clap_complete = "4.5.60" thiserror = "2.0.17" unicode-width = "0.2" +notify = "6.1.1" [dependencies.diesel] version = "2.2.12" diff --git a/src/cmds/test.rs b/src/cmds/test.rs index 6d36920..5bc4245 100644 --- a/src/cmds/test.rs +++ b/src/cmds/test.rs @@ -48,6 +48,13 @@ impl Command for TestCommand { .help("Test today's daily challenge") .action(ArgAction::SetTrue), ) + .arg( + Arg::new("watch") + .short('w') + .long("watch") + .help("Watch for file changes and test automatically") + .action(ArgAction::SetTrue), + ) .group( ArgGroup::new("question-id") .args(["id", "daily"]) @@ -59,6 +66,11 @@ impl Command for TestCommand { /// `test` handler async fn handler(m: &ArgMatches) -> Result<()> { use crate::cache::{Cache, Run}; + use crate::helper::code_path; + use notify::{Config as NotifyConfig, Event, RecommendedWatcher, RecursiveMode, Watcher}; + use std::path::Path; + use std::sync::mpsc::channel; + use std::time::{Duration, Instant}; let cache = Cache::new()?; @@ -80,9 +92,68 @@ impl Command for TestCommand { Some(case) => Option::from(case.replace("\\n", "\n")), _ => None, }; - let res = cache.exec_problem(id, Run::Test, case_str).await?; - println!("{}", res); + if *m.get_one::("watch").unwrap_or(&false) { + let problem = cache.get_problem(id)?; + let path_str = code_path(&problem, None)?; + let path = Path::new(&path_str); + let parent = path + .parent() + .ok_or_else(|| anyhow::anyhow!("Could not get parent directory"))?; + + let (tx, rx) = channel(); + let mut watcher = RecommendedWatcher::new(tx, NotifyConfig::default()) + .map_err(|e| anyhow::anyhow!("Failed to create watcher: {}", e))?; + + // Watch parent directory to handle file creation and atomic saves (which may delete/rename) + watcher + .watch(parent, RecursiveMode::NonRecursive) + .map_err(|e| anyhow::anyhow!("Failed to watch parent directory: {}", e))?; + + if path.exists() { + println!("Watching for changes in {}...", path_str); + let res = cache.exec_problem(id, Run::Test, case_str.clone()).await?; + println!("{}", res); + } else { + println!("File {} does not exist. Waiting for creation...", path_str); + } + + let mut last_run = Instant::now() - Duration::from_secs(1); + while let Ok(res_event) = rx.recv() { + match res_event { + Ok(event) if event.paths.iter().any(|p| p == path) => { + if event.kind.is_create() { + println!("File created, watching for changes..."); + } else if event.kind.is_modify() { + // Debounce: ignore events within 500ms of the last run + if last_run.elapsed() < Duration::from_millis(500) { + continue; + } + + // Wait for atomic save to complete (e.g. file content flush) + std::thread::sleep(Duration::from_millis(200)); + // Drain any subsequent events generated during the sleep + while rx.try_recv().is_ok() {} + + if !path.exists() { + continue; + } + println!("File changed, testing again..."); + match cache.exec_problem(id, Run::Test, case_str.clone()).await { + Ok(res) => println!("{}", res), + Err(e) => println!("Error: {}", e), + } + last_run = Instant::now(); + } + } + Err(e) => println!("watch error: {:?}", e), + _ => {} + } + } + } else { + let res = cache.exec_problem(id, Run::Test, case_str).await?; + println!("{}", res); + } Ok(()) } } From a2ee31e7b89321cf6fec04fe62544237d8ffec02 Mon Sep 17 00:00:00 2001 From: clearloop Date: Wed, 24 Dec 2025 16:20:59 +0800 Subject: [PATCH 06/17] feat(clap): use clap derive for commands (#212) * chore(workspace): bumps edition to 2024 * chore(cmd): rename module to cmd * feat(cmd): use clap derive for commands * chore(cmd): format code * chore(ci): introduce clippy checks * feat(workspace): bumps version to 0.5.0 * ci(rust): remove the setup of sqlite * chore(clippy): make clippy happy --- .github/workflows/clippy.yml | 23 --- .github/workflows/release.yml | 6 +- .github/workflows/rust.yml | 34 ++--- Cargo.lock | 15 +- Cargo.toml | 14 +- src/cache/mod.rs | 12 +- src/cache/models.rs | 4 +- src/cache/parser.rs | 9 +- src/cli.rs | 104 +++++++++----- src/cmd/completions.rs | 35 +++++ src/cmd/data.rs | 66 +++++++++ src/{cmds => cmd}/edit.rs | 93 ++++-------- src/cmd/exec.rs | 38 +++++ src/cmd/list.rs | 171 ++++++++++++++++++++++ src/cmd/mod.rs | 32 +++++ src/cmd/pick.rs | 174 +++++++++++++++++++++++ src/{cmds => cmd}/stat.rs | 35 +---- src/{cmds => cmd}/test.rs | 102 ++++---------- src/cmds/completions.rs | 59 -------- src/cmds/data.rs | 97 ------------- src/cmds/exec.rs | 78 ---------- src/cmds/list.rs | 258 ---------------------------------- src/cmds/mod.rs | 42 ------ src/cmds/pick.rs | 244 -------------------------------- src/config/code.rs | 4 +- src/config/cookies.rs | 8 +- src/config/mod.rs | 2 +- src/err.rs | 10 +- src/flag.rs | 36 ----- src/helper.rs | 10 +- src/lib.rs | 3 +- src/plugins/chrome.rs | 2 +- src/plugins/leetcode.rs | 30 ++-- src/pym.rs | 8 +- 34 files changed, 736 insertions(+), 1122 deletions(-) delete mode 100644 .github/workflows/clippy.yml create mode 100644 src/cmd/completions.rs create mode 100644 src/cmd/data.rs rename src/{cmds => cmd}/edit.rs (72%) create mode 100644 src/cmd/exec.rs create mode 100644 src/cmd/list.rs create mode 100644 src/cmd/mod.rs create mode 100644 src/cmd/pick.rs rename src/{cmds => cmd}/stat.rs (80%) rename src/{cmds => cmd}/test.rs (58%) delete mode 100644 src/cmds/completions.rs delete mode 100644 src/cmds/data.rs delete mode 100644 src/cmds/exec.rs delete mode 100644 src/cmds/list.rs delete mode 100644 src/cmds/mod.rs delete mode 100644 src/cmds/pick.rs delete mode 100644 src/flag.rs diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml deleted file mode 100644 index c30a548..0000000 --- a/.github/workflows/clippy.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Clippy Check - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - clippy: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macOS-latest, ubuntu-latest] - steps: - - uses: actions/checkout@v5 - - uses: actions-rs/toolchain@v1 - with: - components: clippy - toolchain: stable - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72cc16a..64c897f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,11 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + run: rustup update stable && rustup default stable - uses: katyo/publish-crates@v2 with: registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 54f8919..6cbf21b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,20 +14,22 @@ jobs: os: [macOS-latest, ubuntu-latest] steps: - name: Checkout the source code - uses: actions/checkout@v5 - - name: Set nightly toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Environment - run: | - if [[ "$(uname)" == 'Darwin' ]]; then - brew install sqlite3 - else - sudo apt-get update -y - sudo apt-get install -y libsqlite3-dev libdbus-1-dev - fi - - name: Build - run: cargo build --release --all-features + uses: actions/checkout@v6 + - name: Install Toolchain + run: rustup update stable && rustup default stable + - uses: taiki-e/install-action@sccache + - uses: taiki-e/install-action@nextest - name: Run tests - run: cargo test --release --all-features + run: cargo nextest run --release --all-features + check: + runs-on: ubuntu-latest + steps: + - name: Checkout the source code + uses: actions/checkout@v6 + - name: Install Toolchain + run: rustup update stable && rustup default stable + - uses: taiki-e/install-action@sccache + - name: Run format check + run: cargo fmt --check + - name: Run clippy + run: cargo clippy --all-features -- -D warnings diff --git a/Cargo.lock b/Cargo.lock index eee1d64..1bbd953 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -172,6 +172,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" dependencies = [ "clap_builder", + "clap_derive", ] [[package]] @@ -195,6 +196,18 @@ dependencies = [ "clap", ] +[[package]] +name = "clap_derive" +version = "4.5.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "clap_lex" version = "0.7.4" @@ -938,7 +951,7 @@ dependencies = [ [[package]] name = "leetcode-cli" -version = "0.4.7" +version = "0.5.0" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 88de438..27e3527 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,9 +4,9 @@ path = "src/bin/lc.rs" [package] name = "leetcode-cli" -version = "0.4.8" +version = "0.5.0" authors = ["clearloop "] -edition = "2021" +edition = "2024" description = "Leetcode command-line interface in rust." repository = "https://github.com/clearloop/leetcode-cli" license = "MIT" @@ -18,14 +18,14 @@ readme = './README.md' [dependencies] async-trait = "0.1.89" tokio = { version = "1.48.0", features = ["full"] } -clap = { version = "4.5.51", features = ["cargo"] } +clap = { version = "4.5", features = ["cargo", "derive"] } colored = "3.0.0" dirs = "6.0.0" env_logger = "0.11.6" keyring = "3.6.3" log = "0.4.28" -openssl = "0.10.74" -pyo3 = { version = "0.27.1", optional = true } +openssl = "0.10" +pyo3 = { version = "0.27", optional = true } rand = "0.9.2" serde = { version = "1.0.228", features = ["derive"] } serde_json = "1.0.145" @@ -33,7 +33,7 @@ toml = "0.9.8" regex = "1.12.2" scraper = "0.24.0" anyhow = "1.0.100" -clap_complete = "4.5.60" +clap_complete = "4.5" thiserror = "2.0.17" unicode-width = "0.2" notify = "6.1.1" @@ -50,4 +50,4 @@ features = ["gzip", "json"] pym = ["pyo3"] [target.'cfg(target_family = "unix")'.dependencies] -nix = { version = "0.30.1", features = [ "signal" ] } +nix = { version = "0.30.1", features = ["signal"] } diff --git a/src/cache/mod.rs b/src/cache/mod.rs index 3250bf6..8ec75a9 100644 --- a/src/cache/mod.rs +++ b/src/cache/mod.rs @@ -22,15 +22,13 @@ pub fn conn(p: String) -> SqliteConnection { } /// Condition submit or test -#[derive(Clone, Debug)] -#[derive(Default)] +#[derive(Clone, Debug, Default)] pub enum Run { Test, #[default] Submit, } - /// Requests if data not download #[derive(Clone)] pub struct Cache(pub LeetCode); @@ -188,7 +186,7 @@ impl Cache { Err(Error::CookieError) } else { Err(Error::PremiumError) - } + }; } Some(true) => (), } @@ -358,7 +356,11 @@ impl Cache { .await?; let run_res: RunCode = serde_json::from_str(&text).map_err(|e| { - anyhow!("JSON error: {e}, please double check your session and csrf config.") + anyhow!( + "Failed to decode run code result, could be caused by cookie expiration, \ + csrf token mismatch, or network issue:\n {e}, raw response:\n {text}\n, \ + please report this issue at https://github.com/clearloop/leetcode-cli/issues/new" + ) })?; trace!("Run code result {:#?}", run_res); diff --git a/src/cache/models.rs b/src/cache/models.rs index 9b28482..79f4a70 100644 --- a/src/cache/models.rs +++ b/src/cache/models.rs @@ -1,11 +1,11 @@ //! Leetcode data models -use unicode_width::UnicodeWidthStr; -use unicode_width::UnicodeWidthChar; use super::schemas::{problems, tags}; use crate::helper::HTML; use colored::Colorize; use serde::{Deserialize, Serialize}; use serde_json::Number; +use unicode_width::UnicodeWidthChar; +use unicode_width::UnicodeWidthStr; /// Tag model #[derive(Clone, Insertable, Queryable, Serialize, Debug)] diff --git a/src/cache/parser.rs b/src/cache/parser.rs index 329455d..24226e0 100644 --- a/src/cache/parser.rs +++ b/src/cache/parser.rs @@ -15,7 +15,12 @@ pub fn problem(problems: &mut Vec, v: Value) -> Option<()> { // Handle on leetcode-com Some(s) => s as i32, // Handle on leetcode-cn - None => fid_obj.as_str()?.split(' ').last()?.parse::().ok()?, + None => fid_obj + .as_str()? + .split(' ') + .next_back()? + .parse::() + .ok()?, }; problems.push(Problem { @@ -132,7 +137,7 @@ pub fn user(v: Value) -> Option> { pub use ss::ssr; /// string or squence mod ss { - use serde::{de, Deserialize, Deserializer}; + use serde::{Deserialize, Deserializer, de}; use std::fmt; use std::marker::PhantomData; diff --git a/src/cli.rs b/src/cli.rs index 63107a2..a53d39e 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,13 +1,10 @@ //! Clap Commanders use crate::{ - cmds::{ - completion_handler, Command, CompletionCommand, DataCommand, EditCommand, ExecCommand, - ListCommand, PickCommand, StatCommand, TestCommand, - }, + cmd::{CompletionsArgs, DataArgs, EditArgs, ExecArgs, ListArgs, PickArgs, StatArgs, TestArgs}, err::Error, - flag::{Debug, Flag}, }; -use clap::crate_version; +use clap::{CommandFactory, Parser, Subcommand}; +use env_logger::Env; use log::LevelFilter; /// This should be called before calling any cli method or printing any output. @@ -23,30 +20,62 @@ pub fn reset_signal_pipe_handler() { } } +/// May the Code be with You +#[derive(Parser)] +#[command(name = "leetcode", version, about = "May the Code be with You 👻")] +#[command(arg_required_else_help = true)] +pub struct Cli { + /// Debug mode + #[arg(short, long)] + pub debug: bool, + + #[command(subcommand)] + pub command: Option, +} + +#[derive(Subcommand)] +pub enum Commands { + /// Manage Cache + #[command(visible_alias = "d", display_order = 1)] + Data(DataArgs), + + /// Edit question + #[command(visible_alias = "e", display_order = 2)] + Edit(EditArgs), + + /// Submit solution + #[command(visible_alias = "x", display_order = 3)] + Exec(ExecArgs), + + /// List problems + #[command(visible_alias = "l", display_order = 4)] + List(ListArgs), + + /// Pick a problem + #[command(visible_alias = "p", display_order = 5)] + Pick(PickArgs), + + /// Show simple chart about submissions + #[command(visible_alias = "s", display_order = 6)] + Stat(StatArgs), + + /// Test a question + #[command(visible_alias = "t", display_order = 7)] + Test(TestArgs), + + /// Generate shell Completions + #[command(visible_alias = "c", display_order = 8)] + Completions(CompletionsArgs), +} + /// Get matches pub async fn main() -> Result<(), Error> { reset_signal_pipe_handler(); - let mut cmd = clap::Command::new("leetcode") - .version(crate_version!()) - .about("May the Code be with You 👻") - .subcommands(vec![ - DataCommand::usage().display_order(1), - EditCommand::usage().display_order(2), - ExecCommand::usage().display_order(3), - ListCommand::usage().display_order(4), - PickCommand::usage().display_order(5), - StatCommand::usage().display_order(6), - TestCommand::usage().display_order(7), - CompletionCommand::usage().display_order(8), - ]) - .arg(Debug::usage()) - .arg_required_else_help(true); - - let m = cmd.clone().get_matches(); - - if m.get_flag("debug") { - Debug::handler()?; + let cli = Cli::parse(); + + if cli.debug { + env_logger::Builder::from_env(Env::default().default_filter_or("debug")).init(); } else { env_logger::Builder::new() .filter_level(LevelFilter::Info) @@ -54,15 +83,18 @@ pub async fn main() -> Result<(), Error> { .init(); } - match m.subcommand() { - Some(("data", sub_m)) => Ok(DataCommand::handler(sub_m).await?), - Some(("edit", sub_m)) => Ok(EditCommand::handler(sub_m).await?), - Some(("exec", sub_m)) => Ok(ExecCommand::handler(sub_m).await?), - Some(("list", sub_m)) => Ok(ListCommand::handler(sub_m).await?), - Some(("pick", sub_m)) => Ok(PickCommand::handler(sub_m).await?), - Some(("stat", sub_m)) => Ok(StatCommand::handler(sub_m).await?), - Some(("test", sub_m)) => Ok(TestCommand::handler(sub_m).await?), - Some(("completions", sub_m)) => Ok(completion_handler(sub_m, &mut cmd)?), - _ => Err(Error::MatchError), + match cli.command { + Some(Commands::Data(args)) => args.run().await, + Some(Commands::Edit(args)) => args.run().await, + Some(Commands::Exec(args)) => args.run().await, + Some(Commands::List(args)) => args.run().await, + Some(Commands::Pick(args)) => args.run().await, + Some(Commands::Stat(args)) => args.run().await, + Some(Commands::Test(args)) => args.run().await, + Some(Commands::Completions(args)) => { + let mut cmd = Cli::command(); + args.run(&mut cmd) + } + None => Err(Error::MatchError), } } diff --git a/src/cmd/completions.rs b/src/cmd/completions.rs new file mode 100644 index 0000000..94c626b --- /dev/null +++ b/src/cmd/completions.rs @@ -0,0 +1,35 @@ +//! Completions command +use crate::err::Error; +use clap::{Args, Command as ClapCommand}; +use clap_complete::{Generator, Shell, generate}; + +/// Completions command arguments +#[derive(Args)] +pub struct CompletionsArgs { + /// Shell type [possible values: bash, elvish, fish, powershell, zsh] + #[arg(value_parser = clap::value_parser!(Shell))] + pub shell: Option, +} + +fn get_completions_string( + generator: G, + cmd: &mut ClapCommand, +) -> Result { + let mut v: Vec = Vec::new(); + let name = cmd.get_name().to_string(); + generate(generator, cmd, name, &mut v); + Ok(String::from_utf8(v)?) +} + +impl CompletionsArgs { + /// Generate and print shell completions + pub fn run(&self, cmd: &mut ClapCommand) -> Result<(), Error> { + let shell = self + .shell + .or_else(Shell::from_env) + .ok_or(Error::MatchError)?; + let completions = get_completions_string(shell, cmd)?; + println!("{}", completions); + Ok(()) + } +} diff --git a/src/cmd/data.rs b/src/cmd/data.rs new file mode 100644 index 0000000..47444fa --- /dev/null +++ b/src/cmd/data.rs @@ -0,0 +1,66 @@ +//! Cache manager +use crate::{Error, cache::Cache, helper::Digit}; +use clap::Args; +use colored::Colorize; + +/// Data command arguments +#[derive(Args)] +pub struct DataArgs { + /// Delete cache + #[arg(short, long)] + pub delete: bool, + + /// Update cache + #[arg(short, long)] + pub update: bool, +} + +impl DataArgs { + /// `data` handler + pub async fn run(&self) -> Result<(), Error> { + use std::fs::File; + use std::path::Path; + + let cache = Cache::new()?; + let path = cache.0.conf.storage.cache()?; + let f = File::open(&path)?; + let len = format!("{}K", f.metadata()?.len() / 1000); + + let out = format!( + " {}{}", + Path::new(&path) + .file_name() + .ok_or(Error::NoneError)? + .to_string_lossy() + .to_string() + .digit(65 - (len.len() as i32)) + .bright_green(), + len + ); + + let mut title = "\n Cache".digit(63); + title.push_str("Size"); + title.push_str("\n "); + title.push_str(&"-".repeat(65)); + + let mut flags = 0; + if self.delete { + flags += 1; + cache.clean()?; + println!("{}", "ok!".bright_green()); + } + + if self.update { + flags += 1; + cache.update().await?; + println!("{}", "ok!".bright_green()); + } + + if flags == 0 { + println!("{}", title.bright_black()); + println!("{}\n", out); + } + + Ok(()) + } +} diff --git a/src/cmds/edit.rs b/src/cmd/edit.rs similarity index 72% rename from src/cmds/edit.rs rename to src/cmd/edit.rs index f611d6c..13033cf 100644 --- a/src/cmds/edit.rs +++ b/src/cmd/edit.rs @@ -1,85 +1,43 @@ //! Edit command -use super::Command; use crate::{Error, Result}; use anyhow::anyhow; -use async_trait::async_trait; -use clap::{Arg, ArgAction, ArgGroup, ArgMatches, Command as ClapCommand}; +use clap::Args; use std::collections::HashMap; -/// Abstract `edit` command -/// -/// ```sh -/// leetcode-edit -/// Edit question by id -/// -/// USAGE: -/// leetcode edit -/// -/// FLAGS: -/// -h, --help Prints help information -/// -V, --version Prints version information -/// -/// ARGS: -/// question id -/// ``` -pub struct EditCommand; - -#[async_trait] -impl Command for EditCommand { - /// `edit` usage - fn usage() -> ClapCommand { - ClapCommand::new("edit") - .about("Edit question") - .visible_alias("e") - .arg( - Arg::new("lang") - .short('l') - .long("lang") - .num_args(1) - .help("Edit with specific language"), - ) - .arg( - Arg::new("id") - .num_args(1) - .value_parser(clap::value_parser!(i32)) - .help("question id"), - ) - .arg( - Arg::new("daily") - .short('d') - .long("daily") - .help("Edit today's daily challenge") - .action(ArgAction::SetTrue), - ) - .group( - ArgGroup::new("question-id") - .args(["id", "daily"]) - .multiple(false) - .required(true), - ) - } +/// Edit command arguments +#[derive(Args)] +#[command(group = clap::ArgGroup::new("question-id").args(&["id", "daily"]).required(true))] +pub struct EditArgs { + /// Question id + #[arg(value_parser = clap::value_parser!(i32))] + pub id: Option, + + /// Edit today's daily challenge + #[arg(short = 'd', long)] + pub daily: bool, + + /// Edit with specific language + #[arg(short, long)] + pub lang: Option, +} +impl EditArgs { /// `edit` handler - async fn handler(m: &ArgMatches) -> Result<()> { - use crate::{cache::models::Question, Cache}; + pub async fn run(&self) -> Result<()> { + use crate::{Cache, cache::models::Question}; use std::fs::File; use std::io::Write; use std::path::Path; let cache = Cache::new()?; - let daily = m.get_one::("daily").unwrap_or(&false); - let daily_id = if *daily { + let daily_id = if self.daily { Some(cache.get_daily_problem_id().await?) } else { None }; - let id = m - .get_one::("id") - .copied() - .or(daily_id) - .ok_or(Error::NoneError)?; + let id = self.id.or(daily_id).ok_or(Error::NoneError)?; let problem = cache.get_problem(id)?; let mut conf = cache.to_owned().0.conf; @@ -88,11 +46,8 @@ impl Command for EditCommand { let p_desc_comment = problem.desc_comment(&conf); // condition language - if m.contains_id("lang") { - conf.code.lang = m - .get_one::("lang") - .ok_or(Error::NoneError)? - .to_string(); + if let Some(ref lang) = self.lang { + conf.code.lang = lang.clone(); conf.sync()?; } diff --git a/src/cmd/exec.rs b/src/cmd/exec.rs new file mode 100644 index 0000000..81bf557 --- /dev/null +++ b/src/cmd/exec.rs @@ -0,0 +1,38 @@ +//! Exec command +use crate::{Error, Result}; +use clap::Args; + +/// Exec command arguments +#[derive(Args)] +#[command(group = clap::ArgGroup::new("question-id").args(&["id", "daily"]).required(true))] +pub struct ExecArgs { + /// Question id + #[arg(value_parser = clap::value_parser!(i32))] + pub id: Option, + + /// Submit today's daily challenge + #[arg(short = 'd', long)] + pub daily: bool, +} + +impl ExecArgs { + /// `exec` handler + pub async fn run(&self) -> Result<()> { + use crate::cache::{Cache, Run}; + + let cache = Cache::new()?; + + let daily_id = if self.daily { + Some(cache.get_daily_problem_id().await?) + } else { + None + }; + + let id = self.id.or(daily_id).ok_or(Error::NoneError)?; + + let res = cache.exec_problem(id, Run::Submit, None).await?; + + println!("{}", res); + Ok(()) + } +} diff --git a/src/cmd/list.rs b/src/cmd/list.rs new file mode 100644 index 0000000..7460d78 --- /dev/null +++ b/src/cmd/list.rs @@ -0,0 +1,171 @@ +//! list subcommand - List leetcode problems +use crate::{cache::Cache, err::Error, helper::Digit}; +use clap::Args; + +static CATEGORY_HELP: &str = r#"Filter problems by category name +[algorithms, database, shell, concurrency] +"#; + +static QUERY_HELP: &str = r#"Filter questions by conditions: +Uppercase means negative +e = easy E = m+h +m = medium M = e+h +h = hard H = e+m +d = done D = not done +l = locked L = not locked +s = starred S = not starred"#; + +static LIST_AFTER_HELP: &str = r#"EXAMPLES: + leetcode list List all questions + leetcode list array List questions that has "array" in name, and this is letter non-sensitive + leetcode list -c database List questions that in database category + leetcode list -q eD List questions that with easy level and not done + leetcode list -t linked-list List questions that under tag "linked-list" + leetcode list -r 50 100 List questions that has id in between 50 and 100 +"#; + +/// List command arguments +#[derive(Args)] +#[command(after_help = LIST_AFTER_HELP)] +pub struct ListArgs { + /// Keyword in select query + pub keyword: Option, + + /// Filter problems by category name + #[arg(short, long, help = CATEGORY_HELP)] + pub category: Option, + + /// Invoking python scripts to filter questions + #[arg(short, long)] + pub plan: Option, + + /// Filter questions by conditions + #[arg(short, long, help = QUERY_HELP)] + pub query: Option, + + /// Filter questions by id range + #[arg(short, long, num_args = 2.., value_parser = clap::value_parser!(i32))] + pub range: Vec, + + /// Show statistics of listed problems + #[arg(short, long)] + pub stat: bool, + + /// Filter questions by tag + #[arg(short, long)] + pub tag: Option, +} + +impl ListArgs { + /// `list` command handler + pub async fn run(&self) -> Result<(), Error> { + trace!("Input list command..."); + + let cache = Cache::new()?; + let mut ps = cache.get_problems()?; + + // if cache doesn't exist, request a new copy + if ps.is_empty() { + cache.download_problems().await?; + return Box::pin(self.run()).await; + } + + // filtering... + // pym scripts + #[cfg(feature = "pym")] + { + if let Some(ref plan) = self.plan { + let ids = crate::pym::exec(plan)?; + crate::helper::squash(&mut ps, ids)?; + } + } + + // filter tag + if let Some(ref tag) = self.tag { + let ids = cache.get_tagged_questions(tag).await?; + crate::helper::squash(&mut ps, ids)?; + } + + // filter category + if let Some(ref category) = self.category { + ps.retain(|x| x.category == *category); + } + + // filter query + if let Some(ref query) = self.query { + crate::helper::filter(&mut ps, query.to_string()); + } + + // filter range + if self.range.len() >= 2 { + ps.retain(|x| self.range[0] <= x.fid && x.fid <= self.range[1]); + } + + // retain if keyword exists + if let Some(ref keyword) = self.keyword { + let lowercase_kw = keyword.to_lowercase(); + ps.retain(|x| x.name.to_lowercase().contains(&lowercase_kw)); + } + + // output problem lines sorted by [problem number] like + // [ 1 ] Two Sum + // [ 2 ] Add Two Numbers + ps.sort_unstable_by_key(|p| p.fid); + + let out: Vec = ps.iter().map(ToString::to_string).collect(); + println!("{}", out.join("\n")); + + // one more thing, filter stat + if self.stat { + let mut listed = 0; + let mut locked = 0; + let mut starred = 0; + let mut ac = 0; + let mut notac = 0; + let mut easy = 0; + let mut medium = 0; + let mut hard = 0; + + for p in ps { + listed += 1; + if p.starred { + starred += 1; + } + if p.locked { + locked += 1; + } + + match p.status.as_str() { + "ac" => ac += 1, + "notac" => notac += 1, + _ => {} + } + + match p.level { + 1 => easy += 1, + 2 => medium += 1, + 3 => hard += 1, + _ => {} + } + } + + let remain = listed - ac - notac; + println!( + " + Listed: {} Locked: {} Starred: {} + Accept: {} Not-Ac: {} Remain: {} + Easy : {} Medium: {} Hard: {}", + listed.digit(4), + locked.digit(4), + starred.digit(4), + ac.digit(4), + notac.digit(4), + remain.digit(4), + easy.digit(4), + medium.digit(4), + hard.digit(4), + ); + } + Ok(()) + } +} diff --git a/src/cmd/mod.rs b/src/cmd/mod.rs new file mode 100644 index 0000000..c594b32 --- /dev/null +++ b/src/cmd/mod.rs @@ -0,0 +1,32 @@ +//! All subcommands in leetcode-cli +//! +//! ```sh +//! SUBCOMMANDS: +//! data Manage Cache [aliases: d] +//! edit Edit question by id [aliases: e] +//! exec Submit solution [aliases: x] +//! list List problems [aliases: l] +//! pick Pick a problem [aliases: p] +//! stat Show simple chart about submissions [aliases: s] +//! test Test a question [aliases: t] +//! completions Generate shell completions [aliases: c] +//! help Prints this message or the help of the given subcommand(s) +//! ``` + +mod completions; +mod data; +mod edit; +mod exec; +mod list; +mod pick; +mod stat; +mod test; + +pub use completions::CompletionsArgs; +pub use data::DataArgs; +pub use edit::EditArgs; +pub use exec::ExecArgs; +pub use list::ListArgs; +pub use pick::PickArgs; +pub use stat::StatArgs; +pub use test::TestArgs; diff --git a/src/cmd/pick.rs b/src/cmd/pick.rs new file mode 100644 index 0000000..a881d94 --- /dev/null +++ b/src/cmd/pick.rs @@ -0,0 +1,174 @@ +//! Pick command +use crate::cache::models::Problem; +use crate::err::Error; +use clap::Args; + +static QUERY_HELP: &str = r#"Filter questions by conditions: +Uppercase means negative +e = easy E = m+h +m = medium M = e+h +h = hard H = e+m +d = done D = not done +l = locked L = not locked +s = starred S = not starred"#; + +/// Pick command arguments +#[derive(Args)] +pub struct PickArgs { + /// Problem id + #[arg(value_parser = clap::value_parser!(i32))] + pub id: Option, + + /// Problem name + #[arg(short = 'n', long)] + pub name: Option, + + /// Invoking python scripts to filter questions + #[arg(short = 'p', long)] + pub plan: Option, + + /// Filter questions by conditions + #[arg(short, long, help = QUERY_HELP)] + pub query: Option, + + /// Filter questions by tag + #[arg(short, long)] + pub tag: Option, + + /// Pick today's daily challenge + #[arg(short = 'd', long)] + pub daily: bool, +} + +impl PickArgs { + /// `pick` handler + pub async fn run(&self) -> Result<(), Error> { + use crate::cache::Cache; + use rand::Rng; + + let cache = Cache::new()?; + let mut problems = cache.get_problems()?; + if problems.is_empty() { + cache.download_problems().await?; + return Box::pin(self.run()).await; + } + + // filtering... + // pym scripts + #[cfg(feature = "pym")] + { + if let Some(ref plan) = self.plan { + let ids = crate::pym::exec(plan)?; + crate::helper::squash(&mut problems, ids)?; + } + } + + // tag filter + if let Some(ref tag) = self.tag { + let ids = cache.clone().get_tagged_questions(tag).await?; + crate::helper::squash(&mut problems, ids)?; + } + + // query filter + if let Some(ref query) = self.query { + crate::helper::filter(&mut problems, query.to_string()); + } + + let daily_id = if self.daily { + Some(cache.get_daily_problem_id().await?) + } else { + None + }; + + let fid = if let Some(ref quesname) = self.name { + // check for name specified, or closest name + closest_named_problem(&problems, quesname).unwrap_or(1) + } else { + self.id.or(daily_id).unwrap_or_else(|| { + // Pick random without specify id + let problem = &problems[rand::rng().random_range(0..problems.len())]; + problem.fid + }) + }; + + let r = cache.get_question(fid).await; + + match r { + Ok(q) => println!("{}", q.desc()), + Err(e) => { + eprintln!("{:?}", e); + if let Error::Reqwest(_) = e { + Box::pin(self.run()).await?; + } + } + } + + Ok(()) + } +} + +// Returns the closest problem according to a scoring algorithm +// taking into account both the longest common subsequence and the size +// problem string (to compensate for smaller strings having smaller lcs). +// Returns None if there are no problems in the problem list +fn closest_named_problem(problems: &Vec, lookup_name: &str) -> Option { + let max_name_size: usize = problems.iter().map(|p| p.name.len()).max()?; + // Init table to the max name length of all the problems to share + // the same table allocation + let mut table: Vec = vec![0; (max_name_size + 1) * (lookup_name.len() + 1)]; + + // this is guaranteed because of the earlier max None propegation + assert!(!problems.is_empty()); + let mut max_score = 0; + let mut current_problem = &problems[0]; + for problem in problems { + // In case bug becomes bugged, always return the matching string + if problem.name == lookup_name { + return Some(problem.fid); + } + + let this_lcs = longest_common_subsequence(&mut table, &problem.name, lookup_name); + let this_score = this_lcs * (max_name_size - problem.name.len()); + + if this_score > max_score { + max_score = this_score; + current_problem = problem; + } + } + + Some(current_problem.fid) +} + +// Longest commong subsequence DP approach O(nm) space and time. Table must be at least +// (text1.len() + 1) * (text2.len() + 1) length or greater and is mutated every call +fn longest_common_subsequence(table: &mut [usize], text1: &str, text2: &str) -> usize { + assert!(table.len() >= (text1.len() + 1) * (text2.len() + 1)); + let height: usize = text1.len() + 1; + let width: usize = text2.len() + 1; + + // initialize base cases to 0 + for i in 0..height { + table[i * width + (width - 1)] = 0; + } + for j in 0..width { + table[((height - 1) * width) + j] = 0; + } + + let mut i: usize = height - 1; + let mut j: usize; + for c0 in text1.chars().rev() { + i -= 1; + j = width - 1; + for c1 in text2.chars().rev() { + j -= 1; + if c0.to_lowercase().next() == c1.to_lowercase().next() { + table[i * width + j] = 1 + table[(i + 1) * width + j + 1]; + } else { + let a = table[(i + 1) * width + j]; + let b = table[i * width + j + 1]; + table[i * width + j] = std::cmp::max(a, b); + } + } + } + table[0] +} diff --git a/src/cmds/stat.rs b/src/cmd/stat.rs similarity index 80% rename from src/cmds/stat.rs rename to src/cmd/stat.rs index 4b463da..4b079c0 100644 --- a/src/cmds/stat.rs +++ b/src/cmd/stat.rs @@ -1,36 +1,15 @@ //! status command -use super::Command; -use async_trait::async_trait; -use clap::{ArgMatches, Command as ClapCommand}; +use clap::Args; use colored::Colorize; -/// Abstract statues command -/// -/// ```sh -/// leetcode-stat -/// Show simple chart about submissions -/// -/// USAGE: -/// leetcode stat -/// -/// FLAGS: -/// -h, --help Prints help information -/// -V, --version Prints version information -/// ``` -pub struct StatCommand; - -#[async_trait] -impl Command for StatCommand { - /// `stat` usage - fn usage() -> ClapCommand { - ClapCommand::new("stat") - .about("Show simple chart about submissions") - .visible_alias("s") - } +/// Stat command arguments +#[derive(Args)] +pub struct StatArgs {} +impl StatArgs { /// `stat` handler - async fn handler(_m: &ArgMatches) -> Result<(), crate::err::Error> { - use crate::{helper::Digit, Cache}; + pub async fn run(&self) -> Result<(), crate::err::Error> { + use crate::{Cache, helper::Digit}; let cache = Cache::new()?; let res = cache.get_problems()?; diff --git a/src/cmds/test.rs b/src/cmd/test.rs similarity index 58% rename from src/cmds/test.rs rename to src/cmd/test.rs index 5bc4245..a2d9c2a 100644 --- a/src/cmds/test.rs +++ b/src/cmd/test.rs @@ -1,99 +1,49 @@ //! Test command -use super::Command; use crate::{Error, Result}; -use async_trait::async_trait; -use clap::{Arg, ArgAction, ArgGroup, ArgMatches, Command as ClapCommand}; +use clap::Args; -/// Abstract Test Command -/// -/// ```sh -/// leetcode-test -/// Edit question by id -/// -/// USAGE: -/// leetcode test -/// -/// FLAGS: -/// -h, --help Prints help information -/// -V, --version Prints version information -/// -/// ARGS: -/// question id -/// ``` -pub struct TestCommand; +/// Test command arguments +#[derive(Args)] +#[command(group = clap::ArgGroup::new("question-id").args(&["id", "daily"]).required(true))] +pub struct TestArgs { + /// Question id + #[arg(value_parser = clap::value_parser!(i32))] + pub id: Option, -#[async_trait] -impl Command for TestCommand { - /// `test` usage - fn usage() -> ClapCommand { - ClapCommand::new("test") - .about("Test a question") - .visible_alias("t") - .arg( - Arg::new("id") - .num_args(1) - .value_parser(clap::value_parser!(i32)) - .help("question id"), - ) - .arg( - Arg::new("testcase") - .num_args(1) - .required(false) - .help("custom testcase"), - ) - .arg( - Arg::new("daily") - .short('d') - .long("daily") - .help("Test today's daily challenge") - .action(ArgAction::SetTrue), - ) - .arg( - Arg::new("watch") - .short('w') - .long("watch") - .help("Watch for file changes and test automatically") - .action(ArgAction::SetTrue), - ) - .group( - ArgGroup::new("question-id") - .args(["id", "daily"]) - .multiple(false) - .required(true), - ) - } + /// Custom testcase + pub testcase: Option, + + /// Test today's daily challenge + #[arg(short = 'd', long)] + pub daily: bool, + + /// Watch for file changes and test automatically + #[arg(short, long)] + pub watch: bool, +} +impl TestArgs { /// `test` handler - async fn handler(m: &ArgMatches) -> Result<()> { + pub async fn run(&self) -> Result<()> { use crate::cache::{Cache, Run}; use crate::helper::code_path; - use notify::{Config as NotifyConfig, Event, RecommendedWatcher, RecursiveMode, Watcher}; + use notify::{Config as NotifyConfig, RecommendedWatcher, RecursiveMode, Watcher}; use std::path::Path; use std::sync::mpsc::channel; use std::time::{Duration, Instant}; let cache = Cache::new()?; - - let daily = m.get_one::("daily").unwrap_or(&false); - let daily_id = if *daily { + let daily_id = if self.daily { Some(cache.get_daily_problem_id().await?) } else { None }; - let id = m - .get_one::("id") - .copied() - .or(daily_id) - .ok_or(Error::NoneError)?; + let id = self.id.or(daily_id).ok_or(Error::NoneError)?; - let testcase = m.get_one::("testcase"); - let case_str: Option = match testcase { - Some(case) => Option::from(case.replace("\\n", "\n")), - _ => None, - }; + let case_str: Option = self.testcase.as_ref().map(|case| case.replace("\\n", "\n")); - if *m.get_one::("watch").unwrap_or(&false) { + if self.watch { let problem = cache.get_problem(id)?; let path_str = code_path(&problem, None)?; let path = Path::new(&path_str); diff --git a/src/cmds/completions.rs b/src/cmds/completions.rs deleted file mode 100644 index bc675de..0000000 --- a/src/cmds/completions.rs +++ /dev/null @@ -1,59 +0,0 @@ -//! Completions command - -use super::Command; -use crate::err::Error; -use async_trait::async_trait; -use clap::{Arg, ArgAction, ArgMatches, Command as ClapCommand}; -use clap_complete::{generate, Generator, Shell}; - -/// Abstract shell completions command -/// -/// ```sh -/// Generate shell Completions - -/// USAGE: -/// leetcode completions - -/// ARGUMENTS: -/// [possible values: bash, elvish, fish, powershell, zsh] -/// ``` -pub struct CompletionCommand; - -#[async_trait] -impl Command for CompletionCommand { - /// `pick` usage - fn usage() -> ClapCommand { - ClapCommand::new("completions") - .about("Generate shell Completions") - .visible_alias("c") - .arg( - Arg::new("shell") - .action(ArgAction::Set) - .value_parser(clap::value_parser!(Shell)), - ) - } - - async fn handler(_m: &ArgMatches) -> Result<(), Error> { - // defining custom handler to print the completions. Handler method signature limits taking - // other params. We need &ArgMatches and &mut ClapCommand to generate completions. - println!("Don't use this handler. Does not implement the functionality to print completions. Use completions_handler() below."); - Ok(()) - } -} - -fn get_completions_string(gen: G, cmd: &mut ClapCommand) -> Result { - let mut v: Vec = Vec::new(); - let name = cmd.get_name().to_string(); - generate(gen, cmd, name, &mut v); - Ok(String::from_utf8(v)?) -} - -pub fn completion_handler(m: &ArgMatches, cmd: &mut ClapCommand) -> Result<(), Error> { - let shell = *m.get_one::("shell").unwrap_or( - // if shell value is not provided try to get from the environment - &Shell::from_env().ok_or(Error::MatchError)?, - ); - let completions = get_completions_string(shell, cmd)?; - println!("{}", completions); - Ok(()) -} diff --git a/src/cmds/data.rs b/src/cmds/data.rs deleted file mode 100644 index cb66e39..0000000 --- a/src/cmds/data.rs +++ /dev/null @@ -1,97 +0,0 @@ -//! Cache managger -use super::Command; -use crate::{cache::Cache, helper::Digit, Error}; -use async_trait::async_trait; -use clap::{Arg, ArgAction, ArgMatches, Command as ClapCommand}; -use colored::Colorize; - -/// Abstract `data` command -/// -/// ```sh -/// leetcode-data -/// Manage Cache -/// -/// USAGE: -/// leetcode data [FLAGS] -/// -/// FLAGS: -/// -d, --delete Delete cache -/// -u, --update Update cache -/// -h, --help Prints help information -/// -V, --version Prints version information -/// ``` -pub struct DataCommand; - -#[async_trait] -impl Command for DataCommand { - /// `data` command usage - fn usage() -> ClapCommand { - ClapCommand::new("data") - .about("Manage Cache") - .visible_alias("d") - .arg( - Arg::new("delete") - .display_order(1) - .short('d') - .long("delete") - .help("Delete cache") - .action(ArgAction::SetTrue), - ) - .arg( - Arg::new("update") - .display_order(2) - .short('u') - .long("update") - .help("Update cache") - .action(ArgAction::SetTrue), - ) - } - - /// `data` handler - async fn handler(m: &ArgMatches) -> Result<(), Error> { - use std::fs::File; - use std::path::Path; - - let cache = Cache::new()?; - let path = cache.0.conf.storage.cache()?; - let f = File::open(&path)?; - let len = format!("{}K", f.metadata()?.len() / 1000); - - let out = format!( - " {}{}", - Path::new(&path) - .file_name() - .ok_or(Error::NoneError)? - .to_string_lossy() - .to_string() - .digit(65 - (len.len() as i32)) - .bright_green(), - len - ); - - let mut title = "\n Cache".digit(63); - title.push_str("Size"); - title.push_str("\n "); - title.push_str(&"-".repeat(65)); - - let mut flags = 0; - if m.get_flag("delete") { - flags += 1; - cache.clean()?; - println!("{}", "ok!".bright_green()); - } - - if m.get_flag("update") { - flags += 1; - cache.update().await?; - println!("{}", "ok!".bright_green()); - } - - if flags == 0 { - println!("{}", title.bright_black()); - println!("{}\n", out); - } - - Ok(()) - } -} diff --git a/src/cmds/exec.rs b/src/cmds/exec.rs deleted file mode 100644 index d6538f8..0000000 --- a/src/cmds/exec.rs +++ /dev/null @@ -1,78 +0,0 @@ -//! Exec command -use super::Command; -use crate::{Error, Result}; -use async_trait::async_trait; -use clap::{Arg, ArgAction, ArgGroup, ArgMatches, Command as ClapCommand}; - -/// Abstract Exec Command -/// -/// ```sh -/// leetcode-exec -/// Submit solution -/// -/// USAGE: -/// leetcode exec -/// -/// FLAGS: -/// -h, --help Prints help information -/// -V, --version Prints version information -/// -/// ARGS: -/// question id -/// ``` -pub struct ExecCommand; - -#[async_trait] -impl Command for ExecCommand { - /// `exec` usage - fn usage() -> ClapCommand { - ClapCommand::new("exec") - .about("Submit solution") - .visible_alias("x") - .arg( - Arg::new("id") - .num_args(1) - .required(true) - .value_parser(clap::value_parser!(i32)) - .help("question id"), - ) - .arg( - Arg::new("daily") - .short('d') - .long("daily") - .help("Exec today's daily challenge") - .action(ArgAction::SetTrue), - ) - .group( - ArgGroup::new("question-id") - .args(["id", "daily"]) - .multiple(false) - .required(true), - ) - } - - /// `exec` handler - async fn handler(m: &ArgMatches) -> Result<()> { - use crate::cache::{Cache, Run}; - - let cache = Cache::new()?; - - let daily = m.get_one::("daily").unwrap_or(&false); - let daily_id = if *daily { - Some(cache.get_daily_problem_id().await?) - } else { - None - }; - - let id = m - .get_one::("id") - .copied() - .or(daily_id) - .ok_or(Error::NoneError)?; - - let res = cache.exec_problem(id, Run::Submit, None).await?; - - println!("{}", res); - Ok(()) - } -} diff --git a/src/cmds/list.rs b/src/cmds/list.rs deleted file mode 100644 index ae6df47..0000000 --- a/src/cmds/list.rs +++ /dev/null @@ -1,258 +0,0 @@ -//! list subcomAmand - List leetcode problems -//! -//! ```sh -//! leetcode-list -//! List problems -//! -//! USAGE: -//! leetcode list [FLAGS] [OPTIONS] [keyword] -//! -//! FLAGS: -//! -h, --help Prints help information -//! -s, --stat Show statistics of listed problems -//! -V, --version Prints version information -//! -//! OPTIONS: -//! -c, --category Filter problems by category name -//! [algorithms, database, shell, concurrency] -//! -q, --query Filter questions by conditions: -//! Uppercase means negative -//! e = easy E = m+h -//! m = medium M = e+h -//! h = hard H = e+m -//! d = done D = not done -//! l = locked L = not locked -//! s = starred S = not starred -//! -//! ARGS: -//! Keyword in select query -//! -//! EXAMPLES: -//! leetcode list List all questions -//! leetcode list array List questions that has "array" in name -//! leetcode list -c database List questions that in database category -//! leetcode list -q eD List questions that with easy level and not done -//! ``` -use super::Command; -use crate::{cache::Cache, err::Error, helper::Digit}; -use async_trait::async_trait; -use clap::{Arg, ArgAction, ArgMatches, Command as ClapCommand}; -/// Abstract `list` command -/// -/// ## handler -/// + try to request cache -/// + prints the list -/// + if cache doesn't exist, download problems list -/// + ... -pub struct ListCommand; - -static CATEGORY_HELP: &str = r#"Filter problems by category name -[algorithms, database, shell, concurrency] -"#; - -static QUERY_HELP: &str = r#"Filter questions by conditions: -Uppercase means negative -e = easy E = m+h -m = medium M = e+h -h = hard H = e+m -d = done D = not done -l = locked L = not locked -s = starred S = not starred"#; - -static LIST_AFTER_HELP: &str = r#"EXAMPLES: - leetcode list List all questions - leetcode list array List questions that has "array" in name, and this is letter non-sensitive - leetcode list -c database List questions that in database category - leetcode list -q eD List questions that with easy level and not done - leetcode list -t linked-list List questions that under tag "linked-list" - leetcode list -r 50 100 List questions that has id in between 50 and 100 -"#; - -/// implement Command trait for `list` -#[async_trait] -impl Command for ListCommand { - /// `list` command usage - fn usage() -> ClapCommand { - ClapCommand::new("list") - .about("List problems") - .visible_alias("l") - .arg( - Arg::new("category") - .short('c') - .long("category") - .num_args(1) - .help(CATEGORY_HELP), - ) - .arg( - Arg::new("plan") - .short('p') - .long("plan") - .num_args(1) - .help("Invoking python scripts to filter questions"), - ) - .arg( - Arg::new("query") - .short('q') - .long("query") - .num_args(1) - .help(QUERY_HELP), - ) - .arg( - Arg::new("range") - .short('r') - .long("range") - .num_args(2..) - .value_parser(clap::value_parser!(i32)) - .help("Filter questions by id range"), - ) - .after_help(LIST_AFTER_HELP) - .arg( - Arg::new("stat") - .short('s') - .long("stat") - .help("Show statistics of listed problems") - .action(ArgAction::SetTrue), - ) - .arg( - Arg::new("tag") - .short('t') - .long("tag") - .num_args(1) - .help("Filter questions by tag"), - ) - .arg( - Arg::new("keyword") - .num_args(1) - .help("Keyword in select query"), - ) - } - - /// `list` command handler - /// - /// List commands contains "-c", "-q", "-s" flags. - /// + matches with `-c` will override the default keyword. - /// + `-qs` - async fn handler(m: &ArgMatches) -> Result<(), Error> { - trace!("Input list command..."); - - let cache = Cache::new()?; - let mut ps = cache.get_problems()?; - - // if cache doesn't exist, request a new copy - if ps.is_empty() { - cache.download_problems().await?; - return Self::handler(m).await; - } - - // filtering... - // pym scripts - #[cfg(feature = "pym")] - { - if m.contains_id("plan") { - let ids = crate::pym::exec(m.get_one::("plan").unwrap_or(&"".to_string()))?; - crate::helper::squash(&mut ps, ids)?; - } - } - - // filter tag - if m.contains_id("tag") { - let ids = cache - .get_tagged_questions(m.get_one::("tag").unwrap_or(&"".to_string())) - .await?; - crate::helper::squash(&mut ps, ids)?; - } - - // filter category - if m.contains_id("category") { - ps.retain(|x| { - x.category - == *m - .get_one::("category") - .unwrap_or(&"algorithms".to_string()) - }); - } - - // filter query - if m.contains_id("query") { - let query = m.get_one::("query").ok_or(Error::NoneError)?; - crate::helper::filter(&mut ps, query.to_string()); - } - - // filter range - if m.contains_id("range") { - let num_range: Vec = m - .get_many::("range") - .ok_or(Error::NoneError)? - .copied() - .collect(); - ps.retain(|x| num_range[0] <= x.fid && x.fid <= num_range[1]); - } - - // retain if keyword exists - if let Some(keyword) = m.get_one::("keyword") { - let lowercase_kw = keyword.to_lowercase(); - ps.retain(|x| x.name.to_lowercase().contains(&lowercase_kw)); - } - - // output problem lines sorted by [problem number] like - // [ 1 ] Two Sum - // [ 2 ] Add Two Numbers - ps.sort_unstable_by_key(|p| p.fid); - - let out: Vec = ps.iter().map(ToString::to_string).collect(); - println!("{}", out.join("\n")); - - // one more thing, filter stat - if m.contains_id("stat") { - let mut listed = 0; - let mut locked = 0; - let mut starred = 0; - let mut ac = 0; - let mut notac = 0; - let mut easy = 0; - let mut medium = 0; - let mut hard = 0; - - for p in ps { - listed += 1; - if p.starred { - starred += 1; - } - if p.locked { - locked += 1; - } - - match p.status.as_str() { - "ac" => ac += 1, - "notac" => notac += 1, - _ => {} - } - - match p.level { - 1 => easy += 1, - 2 => medium += 1, - 3 => hard += 1, - _ => {} - } - } - - let remain = listed - ac - notac; - println!( - " - Listed: {} Locked: {} Starred: {} - Accept: {} Not-Ac: {} Remain: {} - Easy : {} Medium: {} Hard: {}", - listed.digit(4), - locked.digit(4), - starred.digit(4), - ac.digit(4), - notac.digit(4), - remain.digit(4), - easy.digit(4), - medium.digit(4), - hard.digit(4), - ); - } - Ok(()) - } -} diff --git a/src/cmds/mod.rs b/src/cmds/mod.rs deleted file mode 100644 index 1124532..0000000 --- a/src/cmds/mod.rs +++ /dev/null @@ -1,42 +0,0 @@ -//! All subcommands in leetcode-cli -//! -//! ```sh -//! SUBCOMMANDS: -//! data Manage Cache [aliases: d] -//! edit Edit question by id [aliases: e] -//! list List problems [aliases: l] -//! pick Pick a problem [aliases: p] -//! stat Show simple chart about submissions [aliases: s] -//! test Edit question by id [aliases: t] -//! help Prints this message or the help of the given subcommand(s) -//! ``` -use crate::err::Error; -use async_trait::async_trait; -use clap::{ArgMatches, Command as ClapCommand}; - -/// Abstract commands' trait. -#[async_trait] -pub trait Command { - /// Usage of the specific command - fn usage() -> ClapCommand; - - /// The handler will deal [args, options,...] from the command-line - async fn handler(m: &ArgMatches) -> Result<(), Error>; -} - -mod completions; -mod data; -mod edit; -mod exec; -mod list; -mod pick; -mod stat; -mod test; -pub use completions::{completion_handler, CompletionCommand}; -pub use data::DataCommand; -pub use edit::EditCommand; -pub use exec::ExecCommand; -pub use list::ListCommand; -pub use pick::PickCommand; -pub use stat::StatCommand; -pub use test::TestCommand; diff --git a/src/cmds/pick.rs b/src/cmds/pick.rs deleted file mode 100644 index aba8166..0000000 --- a/src/cmds/pick.rs +++ /dev/null @@ -1,244 +0,0 @@ -//! Pick command -use super::Command; -use crate::cache::models::Problem; -use crate::err::Error; -use async_trait::async_trait; -use clap::{Arg, ArgAction, ArgMatches, Command as ClapCommand}; -/// Abstract pick command -/// -/// ```sh -/// leetcode-pick -/// Pick a problem -/// -/// USAGE: -/// leetcode pick [OPTIONS] [id] -/// -/// FLAGS: -/// -h, --help Prints help information -/// -V, --version Prints version information -/// -/// OPTIONS: -/// -q, --query Filter questions by conditions: -/// Uppercase means negative -/// e = easy E = m+h -/// m = medium M = e+h -/// h = hard H = e+m -/// d = done D = not done -/// l = locked L = not locked -/// s = starred S = not starred -/// -/// ARGS: -/// Problem id -/// ``` -pub struct PickCommand; - -static QUERY_HELP: &str = r#"Filter questions by conditions: -Uppercase means negative -e = easy E = m+h -m = medium M = e+h -h = hard H = e+m -d = done D = not done -l = locked L = not locked -s = starred S = not starred"#; - -#[async_trait] -impl Command for PickCommand { - /// `pick` usage - fn usage() -> ClapCommand { - ClapCommand::new("pick") - .about("Pick a problem") - .visible_alias("p") - .arg( - Arg::new("name") - .short('n') - .long("name") - .value_parser(clap::value_parser!(String)) - .help("Problem name") - .num_args(1), - ) - .arg( - Arg::new("id") - .value_parser(clap::value_parser!(i32)) - .help("Problem id") - .num_args(1), - ) - .arg( - Arg::new("plan") - .short('p') - .long("plan") - .num_args(1) - .help("Invoking python scripts to filter questions"), - ) - .arg( - Arg::new("query") - .short('q') - .long("query") - .num_args(1) - .help(QUERY_HELP), - ) - .arg( - Arg::new("tag") - .short('t') - .long("tag") - .num_args(1) - .help("Filter questions by tag"), - ) - .arg( - Arg::new("daily") - .short('d') - .long("daily") - .help("Pick today's daily challenge") - .action(ArgAction::SetTrue), - ) - } - - /// `pick` handler - async fn handler(m: &ArgMatches) -> Result<(), Error> { - use crate::cache::Cache; - use rand::Rng; - - let cache = Cache::new()?; - let mut problems = cache.get_problems()?; - if problems.is_empty() { - cache.download_problems().await?; - Self::handler(m).await?; - return Ok(()); - } - - // filtering... - // pym scripts - #[cfg(feature = "pym")] - { - if m.contains_id("plan") { - let ids = crate::pym::exec(m.get_one::("plan").unwrap_or(&"".to_string()))?; - crate::helper::squash(&mut problems, ids)?; - } - } - - // tag filter - if m.contains_id("tag") { - let ids = cache - .clone() - .get_tagged_questions(m.get_one::("tag").unwrap_or(&"".to_string())) - .await?; - crate::helper::squash(&mut problems, ids)?; - } - - // query filter - if m.contains_id("query") { - let query = m.get_one::("query").ok_or(Error::NoneError)?; - crate::helper::filter(&mut problems, query.to_string()); - } - - let daily = m.get_one::("daily").unwrap_or(&false); - let daily_id = if *daily { - Some(cache.get_daily_problem_id().await?) - } else { - None - }; - - let fid = match m.contains_id("name") { - // check for name specified, or closest name - true => { - match m.get_one::("name") { - Some(quesname) => closest_named_problem(&problems, quesname).unwrap_or(1), - None => { - // Pick random without specify id - let problem = &problems[rand::rng().random_range(0..problems.len())]; - problem.fid - } - } - } - false => { - m.get_one::("id") - .copied() - .or(daily_id) - .unwrap_or_else(|| { - // Pick random without specify id - let problem = &problems[rand::rng().random_range(0..problems.len())]; - problem.fid - }) - } - }; - - let r = cache.get_question(fid).await; - - match r { - Ok(q) => println!("{}", q.desc()), - Err(e) => { - eprintln!("{:?}", e); - if let Error::Reqwest(_) = e { - Self::handler(m).await?; - } - } - } - - Ok(()) - } -} - -// Returns the closest problem according to a scoring algorithm -// taking into account both the longest common subsequence and the size -// problem string (to compensate for smaller strings having smaller lcs). -// Returns None if there are no problems in the problem list -fn closest_named_problem(problems: &Vec, lookup_name: &str) -> Option { - let max_name_size: usize = problems.iter().map(|p| p.name.len()).max()?; - // Init table to the max name length of all the problems to share - // the same table allocation - let mut table: Vec = vec![0; (max_name_size + 1) * (lookup_name.len() + 1)]; - - // this is guaranteed because of the earlier max None propegation - assert!(!problems.is_empty()); - let mut max_score = 0; - let mut current_problem = &problems[0]; - for problem in problems { - // In case bug becomes bugged, always return the matching string - if problem.name == lookup_name { - return Some(problem.fid); - } - - let this_lcs = longest_common_subsequence(&mut table, &problem.name, lookup_name); - let this_score = this_lcs * (max_name_size - problem.name.len()); - - if this_score > max_score { - max_score = this_score; - current_problem = problem; - } - } - - Some(current_problem.fid) -} - -// Longest commong subsequence DP approach O(nm) space and time. Table must be at least -// (text1.len() + 1) * (text2.len() + 1) length or greater and is mutated every call -fn longest_common_subsequence(table: &mut [usize], text1: &str, text2: &str) -> usize { - assert!(table.len() >= (text1.len() + 1) * (text2.len() + 1)); - let height: usize = text1.len() + 1; - let width: usize = text2.len() + 1; - - // initialize base cases to 0 - for i in 0..height { - table[i * width + (width - 1)] = 0; - } - for j in 0..width { - table[((height - 1) * width) + j] = 0; - } - - let mut i: usize = height - 1; - let mut j: usize; - for c0 in text1.chars().rev() { - i -= 1; - j = width - 1; - for c1 in text2.chars().rev() { - j -= 1; - if c0.to_lowercase().next() == c1.to_lowercase().next() { - table[i * width + j] = 1 + table[(i + 1) * width + j + 1]; - } else { - let a = table[(i + 1) * width + j]; - let b = table[i * width + j + 1]; - table[i * width + j] = std::cmp::max(a, b); - } - } - } - table[0] -} diff --git a/src/config/code.rs b/src/config/code.rs index 48e8105..9a2cada 100644 --- a/src/config/code.rs +++ b/src/config/code.rs @@ -11,7 +11,7 @@ fn default_submission() -> String { SUBMISSION_DEFAULT.into() } -fn is_default_pick(t: &String) -> bool { +fn is_default_pick(t: &str) -> bool { t == PICK_DEFAULT } @@ -19,7 +19,7 @@ fn is_default_submission(t: &String) -> bool { t == SUBMISSION_DEFAULT } -fn is_default_string(t: &String) -> bool { +fn is_default_string(t: &str) -> bool { t.is_empty() } fn is_default_bool(t: &bool) -> bool { diff --git a/src/config/cookies.rs b/src/config/cookies.rs index 8492780..afc59eb 100644 --- a/src/config/cookies.rs +++ b/src/config/cookies.rs @@ -78,10 +78,10 @@ impl Cookies { if let Ok(session) = std::env::var(LEETCODE_SESSION_ENV) { self.session = session; } - if let Ok(site) = std::env::var(LEETCODE_SITE_ENV) { - if let Ok(leetcode_site) = LeetcodeSite::from_str(&site) { - self.site = leetcode_site; - } + if let Ok(site) = std::env::var(LEETCODE_SITE_ENV) + && let Ok(leetcode_site) = LeetcodeSite::from_str(&site) + { + self.site = leetcode_site; } self } diff --git a/src/config/mod.rs b/src/config/mod.rs index f3f5e40..de8bffc 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -6,8 +6,8 @@ //! + Edit leetcode.toml at `~/.leetcode/leetcode.toml` directly //! + Use `leetcode config` to update it use crate::{ - config::{code::Code, cookies::Cookies, storage::Storage, sys::Sys}, Error, Result, + config::{code::Code, cookies::Cookies, storage::Storage, sys::Sys}, }; use serde::{Deserialize, Serialize}; use std::{fs, path::Path}; diff --git a/src/err.rs b/src/err.rs index cf256cf..ddc1e16 100644 --- a/src/err.rs +++ b/src/err.rs @@ -1,5 +1,4 @@ //! Errors in leetcode-cli -use crate::cmds::{Command, DataCommand}; use anyhow::anyhow; use colored::Colorize; @@ -79,12 +78,9 @@ pub enum Error { impl std::convert::From for Error { fn from(err: diesel::result::Error) -> Self { match err { - diesel::result::Error::NotFound => { - DataCommand::usage().print_help().unwrap_or(()); - Error::Anyhow(anyhow!( - "NotFound, you may update cache, and try it again\r\n" - )) - } + diesel::result::Error::NotFound => Error::Anyhow(anyhow!( + "NotFound, you may update cache with `leetcode data -u`, and try it again\r\n" + )), _ => Error::Anyhow(anyhow!("{err}")), } } diff --git a/src/flag.rs b/src/flag.rs deleted file mode 100644 index 5517153..0000000 --- a/src/flag.rs +++ /dev/null @@ -1,36 +0,0 @@ -//! Flags in leetcode-cli -//! -//! ```sh -//! FLAGS: -//! -d, --debug debug mode -//! -h, --help Prints help information -//! -V, --version Prints version information -//! ``` -use crate::err::Error; -use clap::{Arg, ArgAction}; -use env_logger::Env; - -/// Abstract flag trait -pub trait Flag { - fn usage() -> Arg; - fn handler() -> Result<(), Error>; -} - -/// Debug logger -pub struct Debug; - -impl Flag for Debug { - fn usage() -> Arg { - Arg::new("debug") - .short('d') - .long("debug") - .help("debug mode") - .action(ArgAction::SetTrue) - } - - fn handler() -> Result<(), Error> { - env_logger::Builder::from_env(Env::default().default_filter_or("debug")).init(); - - Ok(()) - } -} diff --git a/src/helper.rs b/src/helper.rs index 321828c..af43954 100644 --- a/src/helper.rs +++ b/src/helper.rs @@ -154,13 +154,9 @@ mod html { }); let frag = Html::parse_fragment(&res); - - let res = frag - .root_element() + frag.root_element() .text() - .fold(String::new(), |acc, e| acc + e); - - res + .fold(String::new(), |acc, e| acc + e) } } } @@ -191,7 +187,7 @@ mod file { } } - use crate::{cache::models::Problem, Error}; + use crate::{Error, cache::models::Problem}; /// Generate test cases path by fid pub fn test_cases_path(problem: &Problem) -> crate::Result { diff --git a/src/lib.rs b/src/lib.rs index 39a89e6..8df9434 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -236,10 +236,9 @@ extern crate diesel; // show docs pub mod cache; pub mod cli; -pub mod cmds; +pub mod cmd; pub mod config; pub mod err; -pub mod flag; pub mod helper; pub mod plugins; #[cfg(feature = "pym")] diff --git a/src/plugins/chrome.rs b/src/plugins/chrome.rs index 0825300..7da03f9 100644 --- a/src/plugins/chrome.rs +++ b/src/plugins/chrome.rs @@ -1,4 +1,4 @@ -use crate::{cache, Error, Result}; +use crate::{Error, Result, cache}; use anyhow::anyhow; use diesel::prelude::*; use keyring::Entry; diff --git a/src/plugins/leetcode.rs b/src/plugins/leetcode.rs index ec8a924..4e67b8c 100644 --- a/src/plugins/leetcode.rs +++ b/src/plugins/leetcode.rs @@ -1,11 +1,11 @@ use self::req::{Json, Mode, Req}; use crate::{ - config::{self, Config}, Result, + config::{self, Config}, }; use reqwest::{ - header::{HeaderMap, HeaderName, HeaderValue}, Client, ClientBuilder, Response, + header::{HeaderMap, HeaderName, HeaderValue}, }; use std::{collections::HashMap, str::FromStr, time::Duration}; @@ -86,13 +86,15 @@ impl LeetCode { json.insert("variables", r#"{"slug": "$slug"}"#.replace("$slug", slug)); json.insert( "query", - ["query getTopicTag($slug: String!) {", + [ + "query getTopicTag($slug: String!) {", " topicTag(slug: $slug) {", " questions {", " questionId", " }", " }", - "}"] + "}", + ] .join("\n"), ); @@ -149,13 +151,15 @@ impl LeetCode { json.insert("operationName", "daily".to_string()); json.insert( "query", - ["query daily {", + [ + "query daily {", " activeDailyCodingChallengeQuestion {", " question {", " questionFrontendId", " }", " }", - "}"] + "}", + ] .join("\n"), ); } @@ -163,13 +167,15 @@ impl LeetCode { json.insert("operationName", "questionOfToday".to_string()); json.insert( "query", - ["query questionOfToday {", + [ + "query questionOfToday {", " todayRecord {", " question {", " questionFrontendId", " }", " }", - "}"] + "}", + ] .join("\n"), ); } @@ -195,7 +201,8 @@ impl LeetCode { let mut json: Json = HashMap::new(); json.insert( "query", - ["query getQuestionDetail($titleSlug: String!) {", + [ + "query getQuestionDetail($titleSlug: String!) {", " question(titleSlug: $titleSlug) {", " content", " stats", @@ -206,7 +213,8 @@ impl LeetCode { " metaData", " translatedContent", " }", - "}"] + "}", + ] .join("\n"), ); @@ -269,7 +277,7 @@ impl LeetCode { mod req { use super::LeetCode; use crate::err::Error; - use reqwest::{header::HeaderMap, Client, Response}; + use reqwest::{Client, Response, header::HeaderMap}; use std::collections::HashMap; /// Standardize json format diff --git a/src/pym.rs b/src/pym.rs index 43dd81b..2062704 100644 --- a/src/pym.rs +++ b/src/pym.rs @@ -1,14 +1,14 @@ //! This module is for python scripts. //! //! Seems like some error exists now, welocome pr to fix this : ) -use crate::{cache::Cache, helper::load_script, Result}; +use crate::{Result, cache::Cache, helper::load_script}; use pyo3::prelude::*; use std::ffi::CString; /// Exec python scripts as filter pub fn exec(module: &str) -> Result> { - pyo3::prepare_freethreaded_python(); - let script = load_script(&module)?; + Python::initialize(); + let script = load_script(module)?; let cache = Cache::new()?; // args @@ -16,7 +16,7 @@ pub fn exec(module: &str) -> Result> { let stags = serde_json::to_string(&cache.get_tags()?)?; // pygil - Python::with_gil(|py| { + Python::attach(|py| { let script_cstr = CString::new(script.as_str())?; let filename_cstr = CString::new("plan.py")?; let module_name_cstr = CString::new("plan")?; From d662002c7be6dbc0361d34094378726cdc544002 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Jan 2026 23:39:13 +0800 Subject: [PATCH 07/17] chore(dep): bump the deps group with 10 updates (#214) Bumps the deps group with 10 updates: | Package | From | To | | --- | --- | --- | | [clap](https://github.com/clap-rs/clap) | `4.5.51` | `4.5.53` | | [log](https://github.com/rust-lang/log) | `0.4.28` | `0.4.29` | | [openssl](https://github.com/rust-openssl/rust-openssl) | `0.10.74` | `0.10.75` | | [pyo3](https://github.com/pyo3/pyo3) | `0.27.1` | `0.27.2` | | [serde_json](https://github.com/serde-rs/json) | `1.0.145` | `1.0.148` | | [toml](https://github.com/toml-rs/toml) | `0.9.8` | `0.9.10+spec-1.1.0` | | [scraper](https://github.com/rust-scraper/scraper) | `0.24.0` | `0.25.0` | | [clap_complete](https://github.com/clap-rs/clap) | `4.5.60` | `4.5.64` | | [notify](https://github.com/notify-rs/notify) | `6.1.1` | `8.2.0` | | [reqwest](https://github.com/seanmonstar/reqwest) | `0.12.24` | `0.13.1` | Updates `clap` from 4.5.51 to 4.5.53 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.51...clap_complete-v4.5.53) Updates `log` from 0.4.28 to 0.4.29 - [Release notes](https://github.com/rust-lang/log/releases) - [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/log/compare/0.4.28...0.4.29) Updates `openssl` from 0.10.74 to 0.10.75 - [Release notes](https://github.com/rust-openssl/rust-openssl/releases) - [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.74...openssl-v0.10.75) Updates `pyo3` from 0.27.1 to 0.27.2 - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md) - [Commits](https://github.com/pyo3/pyo3/compare/v0.27.1...v0.27.2) Updates `serde_json` from 1.0.145 to 1.0.148 - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.145...v1.0.148) Updates `toml` from 0.9.8 to 0.9.10+spec-1.1.0 - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.9.8...toml-v0.9.10) Updates `scraper` from 0.24.0 to 0.25.0 - [Release notes](https://github.com/rust-scraper/scraper/releases) - [Commits](https://github.com/rust-scraper/scraper/compare/v0.24.0...v0.25.0) Updates `clap_complete` from 4.5.60 to 4.5.64 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.60...clap_complete-v4.5.64) Updates `notify` from 6.1.1 to 8.2.0 - [Release notes](https://github.com/notify-rs/notify/releases) - [Changelog](https://github.com/notify-rs/notify/blob/main/CHANGELOG.md) - [Commits](https://github.com/notify-rs/notify/compare/notify-6.1.1...notify-8.2.0) Updates `reqwest` from 0.12.24 to 0.13.1 - [Release notes](https://github.com/seanmonstar/reqwest/releases) - [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md) - [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.24...v0.13.1) --- updated-dependencies: - dependency-name: clap dependency-version: 4.5.53 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: log dependency-version: 0.4.29 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: openssl dependency-version: 0.10.75 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: pyo3 dependency-version: 0.27.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: serde_json dependency-version: 1.0.148 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: toml dependency-version: 0.9.10+spec-1.1.0 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: scraper dependency-version: 0.25.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: clap_complete dependency-version: 4.5.64 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: notify dependency-version: 8.2.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: deps - dependency-name: reqwest dependency-version: 0.13.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 738 ++++++++++++++++++++++++++++++----------------------- Cargo.toml | 12 +- 2 files changed, 424 insertions(+), 326 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1bbd953..cfc1071 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -108,6 +108,28 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +[[package]] +name = "aws-lc-rs" +version = "1.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a88aab2464f1f25453baa7a07c84c5b7684e274054ba06817f382357f77a288" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45afffdee1e7c9126814751f88dddc747f41d91da16c9551a0f1e8a11e788a1" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", +] + [[package]] name = "base64" version = "0.22.1" @@ -122,9 +144,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "bumpalo" @@ -146,13 +168,22 @@ checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "cc" -version = "1.1.14" +version = "1.2.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d2eb3cd3d1bf4529e31c215ee6f93ec5a3d536d9f578f93d9d33ee19562932" +checksum = "7a0aeaff4ff1a90589618835a598e545176939b97874f7abc7851caa0618f203" dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", "shlex", ] +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + [[package]] name = "cfg-if" version = "1.0.0" @@ -167,9 +198,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "clap" -version = "4.5.51" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" +checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" dependencies = [ "clap_builder", "clap_derive", @@ -177,9 +208,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.51" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" +checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" dependencies = [ "anstream", "anstyle", @@ -189,9 +220,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.60" +version = "4.5.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e602857739c5a4291dfa33b5a298aeac9006185229a700e5810a3ef7272d971" +checksum = "4c0da80818b2d95eca9aa614a30783e42f62bf5fdfee24e68cfb960b071ba8d1" dependencies = [ "clap", ] @@ -214,6 +245,15 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +[[package]] +name = "cmake" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" +dependencies = [ + "cc", +] + [[package]] name = "colorchoice" version = "1.0.2" @@ -229,6 +269,16 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -239,6 +289,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -254,26 +314,11 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - [[package]] name = "cssparser" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e901edd733a1472f944a45116df3f846f54d37e67e68640ac8bb69689aca2aa" +checksum = "dae61cf9c0abb83bd659dab65b7e4e38d8236824c85f0f804f173567bda257d2" dependencies = [ "cssparser-macros", "dtoa-short", @@ -439,6 +484,12 @@ dependencies = [ "dtoa", ] +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "ego-tree" version = "0.10.0" @@ -489,16 +540,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "fastrand" version = "2.1.1" @@ -506,16 +547,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] -name = "filetime" -version = "0.2.26" +name = "find-msvc-tools" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" -dependencies = [ - "cfg-if", - "libc", - "libredox", - "windows-sys 0.60.2", -] +checksum = "645cbb3a84e60b7531617d5ae4e57f7e27308f6445f5abf653209ea76dec8dff" [[package]] name = "flate2" @@ -557,6 +592,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "fsevent-sys" version = "4.1.0" @@ -615,15 +656,6 @@ dependencies = [ "pin-utils", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "getopts" version = "0.2.24" @@ -640,8 +672,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] @@ -651,8 +685,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi 0.13.3+wasi-0.2.2", + "wasm-bindgen", "windows-targets 0.52.6", ] @@ -695,13 +731,12 @@ checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "html5ever" -version = "0.35.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55d958c2f74b664487a2035fe1dadb032c48718a03b63f3ab0b8537db8549ed4" +checksum = "6452c4751a24e1b99c3260d505eaeee76a050573e61f30ac2c924ddc7236f01e" dependencies = [ "log", "markup5ever", - "match_token", ] [[package]] @@ -787,22 +822,6 @@ dependencies = [ "tower-service", ] -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - [[package]] name = "hyper-util" version = "0.1.13" @@ -863,11 +882,11 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "inotify" -version = "0.9.6" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" +checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.10.0", "inotify-sys", "libc", ] @@ -909,6 +928,37 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.77" @@ -967,13 +1017,13 @@ dependencies = [ "notify", "openssl", "pyo3", - "rand 0.9.2", + "rand", "regex", "reqwest", "scraper", "serde", "serde_json", - "thiserror", + "thiserror 2.0.17", "tokio", "toml", "unicode-width", @@ -991,9 +1041,8 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.10.0", "libc", - "redox_syscall", ] [[package]] @@ -1006,12 +1055,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - [[package]] name = "lock_api" version = "0.4.12" @@ -1024,9 +1067,15 @@ dependencies = [ [[package]] name = "log" -version = "0.4.28" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "lru-slab" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" [[package]] name = "mac" @@ -1036,26 +1085,15 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" [[package]] name = "markup5ever" -version = "0.35.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311fe69c934650f8f19652b3946075f0fc41ad8757dbb68f1ca14e7900ecc1c3" +checksum = "6c3294c4d74d0742910f8c7b466f44dda9eb2d5742c1e430138df290a1e8451c" dependencies = [ "log", "tendril", "web_atoms", ] -[[package]] -name = "match_token" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac84fd3f360fcc43dc5f5d186f02a94192761a080e8bc58621ad4d12296a58cf" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "memchr" version = "2.7.4" @@ -1086,18 +1124,6 @@ dependencies = [ "adler2", ] -[[package]] -name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", -] - [[package]] name = "mio" version = "1.0.2" @@ -1106,27 +1132,11 @@ checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi", "libc", + "log", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] -[[package]] -name = "native-tls" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "new_debug_unreachable" version = "1.0.6" @@ -1139,7 +1149,7 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.10.0", "cfg-if", "cfg_aliases", "libc", @@ -1147,23 +1157,28 @@ dependencies = [ [[package]] name = "notify" -version = "6.1.1" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" +checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3" dependencies = [ - "bitflags 2.6.0", - "crossbeam-channel", - "filetime", + "bitflags 2.10.0", "fsevent-sys", "inotify", "kqueue", "libc", "log", - "mio 0.8.11", + "mio", + "notify-types", "walkdir", - "windows-sys 0.48.0", + "windows-sys 0.60.2", ] +[[package]] +name = "notify-types" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" + [[package]] name = "num-conv" version = "0.1.0" @@ -1178,11 +1193,11 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "openssl" -version = "0.10.74" +version = "0.10.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ad14dd45412269e1a30f52ad8f0664f0f4f4a89ee8fe28c3b3527021ebb654" +checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.10.0", "cfg-if", "foreign-types", "libc", @@ -1204,15 +1219,15 @@ dependencies = [ [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "9f50d9b3dabb09ecd771ad0aa242ca6894994c130308ca3d7684634df8037391" [[package]] name = "openssl-sys" -version = "0.9.110" +version = "0.9.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a9f0075ba3c21b09f8e8b2026584b1d18d49388648f2fbbf3c97ea8deced8e2" +checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" dependencies = [ "cc", "libc", @@ -1257,19 +1272,20 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "phf" -version = "0.11.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" dependencies = [ "phf_macros", "phf_shared", + "serde", ] [[package]] name = "phf_codegen" -version = "0.11.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" +checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1" dependencies = [ "phf_generator", "phf_shared", @@ -1277,19 +1293,19 @@ dependencies = [ [[package]] name = "phf_generator" -version = "0.11.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" dependencies = [ + "fastrand", "phf_shared", - "rand 0.8.5", ] [[package]] name = "phf_macros" -version = "0.11.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" dependencies = [ "phf_generator", "phf_shared", @@ -1300,9 +1316,9 @@ dependencies = [ [[package]] name = "phf_shared" -version = "0.11.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" dependencies = [ "siphasher", ] @@ -1354,18 +1370,18 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "9695f8df41bb4f3d222c95a67532365f569318332d03d5f3f67f37b20e6ebdf0" dependencies = [ "unicode-ident", ] [[package]] name = "pyo3" -version = "0.27.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a6df7eab65fc7bee654a421404947e10a0f7085b6951bf2ea395f4659fb0cf" +checksum = "ab53c047fcd1a1d2a8820fe84f05d6be69e9526be40cb03b73f86b6b03e6d87d" dependencies = [ "indoc", "libc", @@ -1380,18 +1396,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.27.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f77d387774f6f6eec64a004eac0ed525aab7fa1966d94b42f743797b3e395afb" +checksum = "b455933107de8642b4487ed26d912c2d899dec6114884214a0b3bb3be9261ea6" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.27.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dd13844a4242793e02df3e2ec093f540d948299a6a77ea9ce7afd8623f542be" +checksum = "1c85c9cbfaddf651b1221594209aed57e9e5cff63c4d11d1feead529b872a089" dependencies = [ "libc", "pyo3-build-config", @@ -1399,9 +1415,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.27.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf8f9f1108270b90d3676b8679586385430e5c0bb78bb5f043f95499c821a71" +checksum = "0a5b10c9bf9888125d917fb4d2ca2d25c8df94c7ab5a52e13313a07e050a3b02" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -1411,9 +1427,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.27.1" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a3b2274450ba5288bc9b8c1b69ff569d1d61189d4bff38f8d22e03d17f932b" +checksum = "03b51720d314836e53327f5871d4c0cfb4fb37cc2c4a11cc71907a86342c40f9" dependencies = [ "heck", "proc-macro2", @@ -1423,21 +1439,68 @@ dependencies = [ ] [[package]] -name = "quote" -version = "1.0.37" +name = "quinn" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" dependencies = [ - "proc-macro2", + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2 0.6.0", + "thiserror 2.0.17", + "tokio", + "tracing", + "web-time", ] [[package]] -name = "rand" -version = "0.8.5" +name = "quinn-proto" +version = "0.11.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" +dependencies = [ + "aws-lc-rs", + "bytes", + "getrandom 0.3.1", + "lru-slab", + "rand", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.17", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2 0.6.0", + "tracing", + "windows-sys 0.60.2", +] + +[[package]] +name = "quote" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ - "rand_core 0.6.4", + "proc-macro2", ] [[package]] @@ -1447,7 +1510,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha", - "rand_core 0.9.0", + "rand_core", ] [[package]] @@ -1457,15 +1520,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.0", + "rand_core", ] -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" - [[package]] name = "rand_core" version = "0.9.0" @@ -1482,7 +1539,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.10.0", ] [[package]] @@ -1493,7 +1550,7 @@ checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" dependencies = [ "getrandom 0.2.15", "libredox", - "thiserror", + "thiserror 2.0.17", ] [[package]] @@ -1527,38 +1584,35 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.24" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f" +checksum = "04e9018c9d814e5f30cc16a0f03271aeab3571e609612d9fe78c1aa8d11c2f62" dependencies = [ - "async-compression", "base64", "bytes", "encoding_rs", "futures-core", - "futures-util", "h2", "http", "http-body", "http-body-util", "hyper", "hyper-rustls", - "hyper-tls", "hyper-util", "js-sys", "log", "mime", - "native-tls", "percent-encoding", "pin-project-lite", + "quinn", + "rustls", "rustls-pki-types", + "rustls-platform-verifier", "serde", "serde_json", - "serde_urlencoded", "sync_wrapper", "tokio", - "tokio-native-tls", - "tokio-util", + "tokio-rustls", "tower", "tower-http", "tower-service", @@ -1584,24 +1638,18 @@ dependencies = [ ] [[package]] -name = "rustix" -version = "0.38.34" +name = "rustc-hash" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" -dependencies = [ - "bitflags 2.6.0", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" dependencies = [ + "aws-lc-rs", "once_cell", "rustls-pki-types", "rustls-webpki", @@ -1609,21 +1657,62 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustls-native-certs" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework", +] + [[package]] name = "rustls-pki-types" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" dependencies = [ + "web-time", "zeroize", ] +[[package]] +name = "rustls-platform-verifier" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" +dependencies = [ + "core-foundation 0.10.1", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + [[package]] name = "rustls-webpki" -version = "0.102.6" +version = "0.103.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -1635,12 +1724,6 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - [[package]] name = "same-file" version = "1.0.6" @@ -1667,9 +1750,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scraper" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5f3a24d916e78954af99281a455168d4a9515d65eca99a18da1b813689c4ad9" +checksum = "93cecd86d6259499c844440546d02f55f3e17bd286e529e48d1f9f67e92315cb" dependencies = [ "cssparser", "ego-tree", @@ -1682,12 +1765,12 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.1" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" dependencies = [ - "bitflags 2.6.0", - "core-foundation", + "bitflags 2.10.0", + "core-foundation 0.10.1", "core-foundation-sys", "libc", "security-framework-sys", @@ -1695,9 +1778,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" dependencies = [ "core-foundation-sys", "libc", @@ -1705,19 +1788,19 @@ dependencies = [ [[package]] name = "selectors" -version = "0.31.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5685b6ae43bfcf7d2e7dfcfb5d8e8f61b46442c902531e41a32a9a8bf0ee0fb6" +checksum = "feef350c36147532e1b79ea5c1f3791373e61cbd9a6a2615413b3807bb164fb7" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.10.0", "cssparser", "derive_more", - "fxhash", "log", "new_debug_unreachable", "phf", "phf_codegen", "precomputed-hash", + "rustc-hash", "servo_arc", "smallvec", ] @@ -1754,43 +1837,31 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "3084b546a1dd6289475996f182a22aba973866ea8e8b02c51d9f46b1336a22da" dependencies = [ "itoa", "memchr", - "ryu", "serde", "serde_core", + "zmij", ] [[package]] name = "serde_spanned" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392" +checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" dependencies = [ "serde_core", ] -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - [[package]] name = "servo_arc" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae65c4249478a2647db249fb43e23cec56a2c8974a427e7bd8cb5a1d0964921a" +checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930" dependencies = [ "stable_deref_trait", ] @@ -1812,9 +1883,9 @@ dependencies = [ [[package]] name = "siphasher" -version = "0.3.11" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "slab" @@ -1865,9 +1936,9 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "string_cache" -version = "0.8.9" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" +checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901" dependencies = [ "new_debug_unreachable", "parking_lot", @@ -1878,9 +1949,9 @@ dependencies = [ [[package]] name = "string_cache_codegen" -version = "0.5.4" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0" +checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69" dependencies = [ "phf_generator", "phf_shared", @@ -1926,8 +1997,8 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.6.0", - "core-foundation", + "bitflags 2.10.0", + "core-foundation 0.9.4", "system-configuration-sys", ] @@ -1947,19 +2018,6 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" -[[package]] -name = "tempfile" -version = "3.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" -dependencies = [ - "cfg-if", - "fastrand", - "once_cell", - "rustix", - "windows-sys 0.59.0", -] - [[package]] name = "tendril" version = "0.4.3" @@ -1971,13 +2029,33 @@ dependencies = [ "utf-8", ] +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + [[package]] name = "thiserror" version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ - "thiserror-impl", + "thiserror-impl 2.0.17", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -2045,7 +2123,7 @@ checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ "bytes", "libc", - "mio 1.0.2", + "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", @@ -2065,16 +2143,6 @@ dependencies = [ "syn", ] -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.26.0" @@ -2101,9 +2169,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.8" +version = "0.9.10+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8" +checksum = "0825052159284a1a8b4d6c0c86cbc801f2da5afd2b225fa548c72f2e74002f48" dependencies = [ "indexmap", "serde_core", @@ -2116,27 +2184,27 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.3" +version = "0.7.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" dependencies = [ "serde_core", ] [[package]] name = "toml_parser" -version = "1.0.4" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" dependencies = [ "winnow", ] [[package]] name = "toml_writer" -version = "1.0.4" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" +checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" [[package]] name = "tower" @@ -2155,17 +2223,22 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ - "bitflags 2.6.0", + "async-compression", + "bitflags 2.10.0", "bytes", + "futures-core", "futures-util", "http", "http-body", + "http-body-util", "iri-string", "pin-project-lite", + "tokio", + "tokio-util", "tower", "tower-layer", "tower-service", @@ -2390,11 +2463,21 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "web_atoms" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ffde1dc01240bdf9992e3205668b235e59421fd085e8a317ed98da0178d414" +checksum = "acd0c322f146d0f8aad130ce6c187953889359584497dac6561204c8e17bb43d" dependencies = [ "phf", "phf_codegen", @@ -2402,6 +2485,15 @@ dependencies = [ "string_cache_codegen", ] +[[package]] +name = "webpki-root-certs" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee3e3b5f5e80bc89f30ce8d0343bf4e5f12341c51f3e26cbeecbc7c85443e85b" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "winapi-util" version = "0.1.11" @@ -2454,11 +2546,11 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.48.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets 0.48.5", + "windows-targets 0.42.2", ] [[package]] @@ -2499,17 +2591,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "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]] @@ -2547,9 +2639,9 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" @@ -2565,9 +2657,9 @@ checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" [[package]] name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" @@ -2583,9 +2675,9 @@ checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" [[package]] name = "windows_i686_gnu" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" @@ -2613,9 +2705,9 @@ checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" [[package]] name = "windows_i686_msvc" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" @@ -2631,9 +2723,9 @@ checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" [[package]] name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" @@ -2649,9 +2741,9 @@ checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" @@ -2667,9 +2759,9 @@ checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" [[package]] name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" @@ -2695,7 +2787,7 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.10.0", ] [[package]] @@ -2744,3 +2836,9 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zmij" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac060176f7020d62c3bcc1cdbcec619d54f48b07ad1963a3f80ce7a0c17755f" diff --git a/Cargo.toml b/Cargo.toml index 27e3527..fccde48 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,27 +23,27 @@ colored = "3.0.0" dirs = "6.0.0" env_logger = "0.11.6" keyring = "3.6.3" -log = "0.4.28" +log = "0.4.29" openssl = "0.10" pyo3 = { version = "0.27", optional = true } rand = "0.9.2" serde = { version = "1.0.228", features = ["derive"] } -serde_json = "1.0.145" -toml = "0.9.8" +serde_json = "1.0.148" +toml = "0.9.10" regex = "1.12.2" -scraper = "0.24.0" +scraper = "0.25.0" anyhow = "1.0.100" clap_complete = "4.5" thiserror = "2.0.17" unicode-width = "0.2" -notify = "6.1.1" +notify = "8.2.0" [dependencies.diesel] version = "2.2.12" features = ["sqlite"] [dependencies.reqwest] -version = "0.12.24" +version = "0.13.1" features = ["gzip", "json"] [features] From 6b352932b2cc7668458f065ae4adb4176a3155ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Feb 2026 18:02:48 +0800 Subject: [PATCH 08/17] chore(dep): bump the deps group with 8 updates (#215) Bumps the deps group with 8 updates: | Package | From | To | | --- | --- | --- | | [tokio](https://github.com/tokio-rs/tokio) | `1.48.0` | `1.49.0` | | [clap](https://github.com/clap-rs/clap) | `4.5.53` | `4.5.56` | | [colored](https://github.com/mackwic/colored) | `3.0.0` | `3.1.1` | | [serde_json](https://github.com/serde-rs/json) | `1.0.148` | `1.0.149` | | [toml](https://github.com/toml-rs/toml) | `0.9.10+spec-1.1.0` | `0.9.11+spec-1.1.0` | | [clap_complete](https://github.com/clap-rs/clap) | `4.5.64` | `4.5.65` | | [thiserror](https://github.com/dtolnay/thiserror) | `2.0.17` | `2.0.18` | | [nix](https://github.com/nix-rust/nix) | `0.30.1` | `0.31.1` | Updates `tokio` from 1.48.0 to 1.49.0 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.48.0...tokio-1.49.0) Updates `clap` from 4.5.53 to 4.5.56 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.53...clap_complete-v4.5.56) Updates `colored` from 3.0.0 to 3.1.1 - [Release notes](https://github.com/mackwic/colored/releases) - [Changelog](https://github.com/colored-rs/colored/blob/master/CHANGELOG.md) - [Commits](https://github.com/mackwic/colored/compare/v3.0.0...v3.1.1) Updates `serde_json` from 1.0.148 to 1.0.149 - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.148...v1.0.149) Updates `toml` from 0.9.10+spec-1.1.0 to 0.9.11+spec-1.1.0 - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.9.10...toml-v0.9.11) Updates `clap_complete` from 4.5.64 to 4.5.65 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.64...clap_complete-v4.5.65) Updates `thiserror` from 2.0.17 to 2.0.18 - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/2.0.17...2.0.18) Updates `nix` from 0.30.1 to 0.31.1 - [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md) - [Commits](https://github.com/nix-rust/nix/compare/v0.30.1...v0.31.1) --- updated-dependencies: - dependency-name: tokio dependency-version: 1.49.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: clap dependency-version: 4.5.56 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: colored dependency-version: 3.1.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: serde_json dependency-version: 1.0.149 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: toml dependency-version: 0.9.11+spec-1.1.0 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: clap_complete dependency-version: 4.5.65 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: thiserror dependency-version: 2.0.18 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: nix dependency-version: 0.31.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 60 +++++++++++++++++++++++++++--------------------------- Cargo.toml | 12 +++++------ 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cfc1071..d9d4cb3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -198,9 +198,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "clap" -version = "4.5.53" +version = "4.5.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" +checksum = "a75ca66430e33a14957acc24c5077b503e7d374151b2b4b3a10c83b4ceb4be0e" dependencies = [ "clap_builder", "clap_derive", @@ -208,9 +208,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.53" +version = "4.5.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" +checksum = "793207c7fa6300a0608d1080b858e5fdbe713cdc1c8db9fb17777d8a13e63df0" dependencies = [ "anstream", "anstyle", @@ -220,18 +220,18 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.64" +version = "4.5.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c0da80818b2d95eca9aa614a30783e42f62bf5fdfee24e68cfb960b071ba8d1" +checksum = "430b4dc2b5e3861848de79627b2bedc9f3342c7da5173a14eaa5d0f8dc18ae5d" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.5.49" +version = "4.5.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" +checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" dependencies = [ "heck", "proc-macro2", @@ -262,11 +262,11 @@ checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "colored" -version = "3.0.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" +checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -1023,7 +1023,7 @@ dependencies = [ "scraper", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "toml", "unicode-width", @@ -1031,9 +1031,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.172" +version = "0.2.180" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" +checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" [[package]] name = "libredox" @@ -1145,9 +1145,9 @@ checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "nix" -version = "0.30.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +checksum = "225e7cfe711e0ba79a68baeddb2982723e4235247aefce1482f2f16c27865b66" dependencies = [ "bitflags 2.10.0", "cfg-if", @@ -1452,7 +1452,7 @@ dependencies = [ "rustc-hash", "rustls", "socket2 0.6.0", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", "web-time", @@ -1474,7 +1474,7 @@ dependencies = [ "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.17", + "thiserror 2.0.18", "tinyvec", "tracing", "web-time", @@ -1550,7 +1550,7 @@ checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" dependencies = [ "getrandom 0.2.15", "libredox", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -1837,9 +1837,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.148" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3084b546a1dd6289475996f182a22aba973866ea8e8b02c51d9f46b1336a22da" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "itoa", "memchr", @@ -2040,11 +2040,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.17", + "thiserror-impl 2.0.18", ] [[package]] @@ -2060,9 +2060,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", @@ -2117,9 +2117,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.48.0" +version = "1.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" dependencies = [ "bytes", "libc", @@ -2169,9 +2169,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.10+spec-1.1.0" +version = "0.9.11+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0825052159284a1a8b4d6c0c86cbc801f2da5afd2b225fa548c72f2e74002f48" +checksum = "f3afc9a848309fe1aaffaed6e1546a7a14de1f935dc9d89d32afd9a44bab7c46" dependencies = [ "indexmap", "serde_core", diff --git a/Cargo.toml b/Cargo.toml index fccde48..d5e4b41 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,9 +17,9 @@ readme = './README.md' [dependencies] async-trait = "0.1.89" -tokio = { version = "1.48.0", features = ["full"] } +tokio = { version = "1.49.0", features = ["full"] } clap = { version = "4.5", features = ["cargo", "derive"] } -colored = "3.0.0" +colored = "3.1.1" dirs = "6.0.0" env_logger = "0.11.6" keyring = "3.6.3" @@ -28,13 +28,13 @@ openssl = "0.10" pyo3 = { version = "0.27", optional = true } rand = "0.9.2" serde = { version = "1.0.228", features = ["derive"] } -serde_json = "1.0.148" -toml = "0.9.10" +serde_json = "1.0.149" +toml = "0.9.11" regex = "1.12.2" scraper = "0.25.0" anyhow = "1.0.100" clap_complete = "4.5" -thiserror = "2.0.17" +thiserror = "2.0.18" unicode-width = "0.2" notify = "8.2.0" @@ -50,4 +50,4 @@ features = ["gzip", "json"] pym = ["pyo3"] [target.'cfg(target_family = "unix")'.dependencies] -nix = { version = "0.30.1", features = ["signal"] } +nix = { version = "0.31.1", features = ["signal"] } From 39deb06dfb1c1506a7d0b2aa36af17890e775077 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 1 Mar 2026 07:20:24 +0800 Subject: [PATCH 09/17] fix: macos chrome cookie plugin (#217) --- Cargo.toml | 4 +- src/err.rs | 2 - src/plugins/chrome.rs | 116 +++--------------------------------------- 3 files changed, 8 insertions(+), 114 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d5e4b41..b13f2a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,6 @@ clap = { version = "4.5", features = ["cargo", "derive"] } colored = "3.1.1" dirs = "6.0.0" env_logger = "0.11.6" -keyring = "3.6.3" log = "0.4.29" openssl = "0.10" pyo3 = { version = "0.27", optional = true } @@ -37,9 +36,10 @@ clap_complete = "4.5" thiserror = "2.0.18" unicode-width = "0.2" notify = "8.2.0" +rookie = "0.5.6" [dependencies.diesel] -version = "2.2.12" +version = "2.3.6" features = ["sqlite"] [dependencies.reqwest] diff --git a/src/err.rs b/src/err.rs index ddc1e16..e39eca5 100644 --- a/src/err.rs +++ b/src/err.rs @@ -67,8 +67,6 @@ pub enum Error { #[error(transparent)] Anyhow(#[from] anyhow::Error), #[error(transparent)] - Keyring(#[from] keyring::Error), - #[error(transparent)] OpenSSL(#[from] openssl::error::ErrorStack), #[cfg(feature = "pym")] #[error(transparent)] diff --git a/src/plugins/chrome.rs b/src/plugins/chrome.rs index 7da03f9..e7d0530 100644 --- a/src/plugins/chrome.rs +++ b/src/plugins/chrome.rs @@ -1,32 +1,6 @@ -use crate::{Error, Result, cache}; -use anyhow::anyhow; -use diesel::prelude::*; -use keyring::Entry; -use openssl::{hash, pkcs5, symm}; +use crate::{Error, Result}; use std::{collections::HashMap, fmt::Display}; -/// LeetCode Cookies Schema -mod schema { - table! { - cookies (host_key) { - encrypted_value -> Binary, - host_key -> Text, - name -> Text, - } - } -} - -/// Please make sure the order -/// -/// The order between table and struct must be same. -#[derive(Queryable, Debug, Clone)] -struct Cookies { - pub encrypted_value: Vec, - #[allow(dead_code)] - pub host_key: String, - pub name: String, -} - /// Spawn cookies to cookie format #[derive(Debug)] pub struct Ident { @@ -54,38 +28,13 @@ pub fn cookies() -> Result { }); } - // If doesn't config SESSION and csrftoken - use self::schema::cookies::dsl::*; - trace!("Derive cookies from google chrome..."); - - let home = dirs::home_dir().ok_or(Error::NoneError)?; - let p = match std::env::consts::OS { - "macos" => home.join("Library/Application Support/Google/Chrome/Default/Cookies"), - "linux" => home.join(".config/google-chrome/Default/Cookies"), - _ => panic!("Opps...only works on OSX or Linux now..."), - }; - - debug!("Chrome Cookies path is {:?}", &p); - let mut conn = cache::conn(p.to_string_lossy().to_string()); - let res = cookies - .filter(host_key.like(format!("#{}", ccfg.site))) - .load::(&mut conn) - .expect("Loading cookies from google chrome failed."); - - debug!("res {:?}", &res); - if res.is_empty() { - return Err(Error::CookieError); - } - - // Get system password - let ring = Entry::new("Chrome Safe Storage", "Chrome")?; - let pass = ring.get_password().expect("Get Password failed"); - - // Decode cookies let mut m: HashMap = HashMap::new(); - for c in res { + + let domains = vec![format!("{}", ccfg.site)]; + let cookies = rookie::chrome(Some(domains)).unwrap(); + for c in cookies { if (c.name == "csrftoken") || (c.name == "LEETCODE_SESSION") { - m.insert(c.name, decode_cookies(&pass, c.encrypted_value)?); + m.insert(c.name, c.value); } } @@ -98,56 +47,3 @@ pub fn cookies() -> Result { }) } -/// Decode cookies from chrome -fn decode_cookies(pass: &str, v: Vec) -> Result { - let mut key = [0_u8; 16]; - match std::env::consts::OS { - "macos" => { - pkcs5::pbkdf2_hmac( - pass.as_bytes(), - b"saltysalt", - 1003, - hash::MessageDigest::sha1(), - &mut key, - ) - .expect("pbkdf2 hmac went error."); - } - "linux" => { - pkcs5::pbkdf2_hmac( - b"peanuts", - b"saltysalt", - 1, - hash::MessageDigest::sha1(), - &mut key, - ) - .expect("pbkdf2 hmac went error."); - } - _ => return Err(anyhow!("only supports OSX or Linux for now").into()), - } - - chrome_decrypt(v, key) -} - -/// Decrypt chrome cookie value with aes-128-cbc -fn chrome_decrypt(v: Vec, key: [u8; 16]) -> Result { - // : \u16 - let iv = vec![32_u8; 16]; - let mut decrypter = symm::Crypter::new( - symm::Cipher::aes_128_cbc(), - symm::Mode::Decrypt, - &key, - Some(&iv), - )?; - - let data_len = v.len() - 3; - let block_size = symm::Cipher::aes_128_cbc().block_size(); - let mut plaintext = vec![0; data_len + block_size]; - - decrypter.pad(false); - - let count = decrypter.update(&v[3..], &mut plaintext)?; - decrypter.finalize(&mut plaintext[count..])?; - plaintext.retain(|x| x >= &20_u8); - - Ok(String::from_utf8_lossy(&plaintext.to_vec()).to_string()) -} From d013928a06c680eeffea64dd3825a979c8e1a22e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 09:59:19 +0800 Subject: [PATCH 10/17] chore(dep): bump the deps group across 1 directory with 12 updates (#220) Bumps the deps group with 12 updates in the / directory: | Package | From | To | | --- | --- | --- | | [tokio](https://github.com/tokio-rs/tokio) | `1.49.0` | `1.50.0` | | [clap](https://github.com/clap-rs/clap) | `4.5.56` | `4.6.0` | | [openssl](https://github.com/rust-openssl/rust-openssl) | `0.10.75` | `0.10.76` | | [pyo3](https://github.com/pyo3/pyo3) | `0.27.2` | `0.28.2` | | [rand](https://github.com/rust-random/rand) | `0.9.2` | `0.10.0` | | [toml](https://github.com/toml-rs/toml) | `0.9.11+spec-1.1.0` | `1.1.2+spec-1.1.0` | | [regex](https://github.com/rust-lang/regex) | `1.12.2` | `1.12.3` | | [scraper](https://github.com/rust-scraper/scraper) | `0.25.0` | `0.26.0` | | [anyhow](https://github.com/dtolnay/anyhow) | `1.0.100` | `1.0.102` | | [clap_complete](https://github.com/clap-rs/clap) | `4.5.65` | `4.6.0` | | [reqwest](https://github.com/seanmonstar/reqwest) | `0.13.1` | `0.13.2` | | [nix](https://github.com/nix-rust/nix) | `0.31.1` | `0.31.2` | Updates `tokio` from 1.49.0 to 1.50.0 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.49.0...tokio-1.50.0) Updates `clap` from 4.5.56 to 4.6.0 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.56...clap_complete-v4.6.0) Updates `openssl` from 0.10.75 to 0.10.76 - [Release notes](https://github.com/rust-openssl/rust-openssl/releases) - [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.75...openssl-v0.10.76) Updates `pyo3` from 0.27.2 to 0.28.2 - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md) - [Commits](https://github.com/pyo3/pyo3/compare/v0.27.2...v0.28.2) Updates `rand` from 0.9.2 to 0.10.0 - [Release notes](https://github.com/rust-random/rand/releases) - [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-random/rand/compare/rand_core-0.9.2...0.10.0) Updates `toml` from 0.9.11+spec-1.1.0 to 1.1.2+spec-1.1.0 - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.9.11...toml-v1.1.2) Updates `regex` from 1.12.2 to 1.12.3 - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.12.2...1.12.3) Updates `scraper` from 0.25.0 to 0.26.0 - [Release notes](https://github.com/rust-scraper/scraper/releases) - [Commits](https://github.com/rust-scraper/scraper/compare/v0.25.0...v0.26.0) Updates `anyhow` from 1.0.100 to 1.0.102 - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.100...1.0.102) Updates `clap_complete` from 4.5.65 to 4.6.0 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.65...clap_complete-v4.6.0) Updates `reqwest` from 0.13.1 to 0.13.2 - [Release notes](https://github.com/seanmonstar/reqwest/releases) - [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md) - [Commits](https://github.com/seanmonstar/reqwest/compare/v0.13.1...v0.13.2) Updates `nix` from 0.31.1 to 0.31.2 - [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md) - [Commits](https://github.com/nix-rust/nix/compare/v0.31.1...v0.31.2) --- updated-dependencies: - dependency-name: tokio dependency-version: 1.50.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: clap dependency-version: 4.6.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: openssl dependency-version: 0.10.76 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: pyo3 dependency-version: 0.28.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: rand dependency-version: 0.10.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: toml dependency-version: 1.1.2+spec-1.1.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: deps - dependency-name: regex dependency-version: 1.12.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: scraper dependency-version: 0.26.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: anyhow dependency-version: 1.0.102 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: clap_complete dependency-version: 4.6.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: reqwest dependency-version: 0.13.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: nix dependency-version: 0.31.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 2294 +++++++++++++++++++++++++++++++++++++++++++++++----- Cargo.toml | 22 +- 2 files changed, 2097 insertions(+), 219 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d9d4cb3..14cf017 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,6 +8,53 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures 0.2.17", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy 0.8.27", +] + [[package]] name = "aho-corasick" version = "1.1.3" @@ -17,6 +64,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "anstream" version = "0.6.15" @@ -24,7 +80,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", - "anstyle-parse", + "anstyle-parse 0.2.5", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse 1.0.0", "anstyle-query", "anstyle-wincon", "colorchoice", @@ -34,9 +105,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anstyle-parse" @@ -47,6 +118,15 @@ dependencies = [ "utf8parse", ] +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + [[package]] name = "anstyle-query" version = "1.1.1" @@ -58,19 +138,54 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "once_cell_polyfill", + "windows-sys 0.61.2", ] [[package]] name = "anyhow" -version = "1.0.100" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" + +[[package]] +name = "array-init" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "async-broadcast" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" +dependencies = [ + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] [[package]] name = "async-compression" @@ -85,6 +200,142 @@ dependencies = [ "tokio", ] +[[package]] +name = "async-executor" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand 2.1.1", + "futures-lite 2.6.1", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-lite 1.13.0", + "log", + "parking", + "polling 2.8.0", + "rustix 0.37.28", + "slab", + "socket2 0.4.10", + "waker-fn", +] + +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite 2.6.1", + "parking", + "polling 3.11.0", + "rustix 1.1.3", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener 2.5.3", +] + +[[package]] +name = "async-lock" +version = "3.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" +dependencies = [ + "event-listener 5.4.1", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +dependencies = [ + "async-io 1.13.0", + "async-lock 2.8.0", + "async-signal", + "blocking", + "cfg-if", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.44", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "async-signal" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" +dependencies = [ + "async-io 2.6.0", + "async-lock 3.4.2", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 1.1.3", + "signal-hook-registry", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + [[package]] name = "async-trait" version = "0.1.89" @@ -93,7 +344,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.117", ] [[package]] @@ -136,6 +387,29 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "binrw" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003da50fae3878bd26cc710742decd3412b8cfb396bc9b306e5e710106d207fb" +dependencies = [ + "array-init", + "binrw_derive", + "bytemuck", +] + +[[package]] +name = "binrw_derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfdce8fda72e8cc5038fb9e739e665d1f3072f7e3e24c573277b8fdce595ef72" +dependencies = [ + "either", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -148,12 +422,55 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-padding" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" +dependencies = [ + "generic-array", +] + +[[package]] +name = "blocking" +version = "1.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite 2.6.1", + "piper", +] + [[package]] name = "bumpalo" version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +[[package]] +name = "bytecount" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" + +[[package]] +name = "bytemuck" +version = "1.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" + [[package]] name = "byteorder" version = "1.5.0" @@ -166,6 +483,15 @@ version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +[[package]] +name = "cbc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +dependencies = [ + "cipher", +] + [[package]] name = "cc" version = "1.2.51" @@ -196,11 +522,45 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +[[package]] +name = "chacha20" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "rand_core 0.10.0", +] + +[[package]] +name = "chrono" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-link 0.2.1", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + [[package]] name = "clap" -version = "4.5.56" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75ca66430e33a14957acc24c5077b503e7d374151b2b4b3a10c83b4ceb4be0e" +checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" dependencies = [ "clap_builder", "clap_derive", @@ -208,11 +568,11 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.56" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793207c7fa6300a0608d1080b858e5fdbe713cdc1c8db9fb17777d8a13e63df0" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" dependencies = [ - "anstream", + "anstream 1.0.0", "anstyle", "clap_lex", "strsim", @@ -220,30 +580,30 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.65" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "430b4dc2b5e3861848de79627b2bedc9f3342c7da5173a14eaa5d0f8dc18ae5d" +checksum = "19c9f1dde76b736e3681f28cec9d5a61299cbaae0fce80a68e43724ad56031eb" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.5.55" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" +checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn", + "syn 2.0.117", ] [[package]] name = "clap_lex" -version = "0.7.4" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "cmake" @@ -279,6 +639,41 @@ dependencies = [ "memchr", ] +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.15", + "once_cell", + "tiny-keccak", +] + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + [[package]] name = "core-foundation" version = "0.9.4" @@ -305,6 +700,24 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + [[package]] name = "crc32fast" version = "1.4.2" @@ -314,6 +727,29 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "typenum", +] + [[package]] name = "cssparser" version = "0.36.0" @@ -334,14 +770,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn", + "syn 2.0.117", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", ] [[package]] name = "darling" -version = "0.20.10" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" dependencies = [ "darling_core", "darling_macro", @@ -349,27 +794,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.10" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn", + "syn 2.0.117", ] [[package]] name = "darling_macro" -version = "0.20.10" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core", "quote", - "syn", + "syn 2.0.117", ] [[package]] @@ -381,6 +826,30 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.117", +] + [[package]] name = "derive_more" version = "2.0.1" @@ -398,40 +867,53 @@ checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.117", ] [[package]] name = "diesel" -version = "2.2.12" +version = "2.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229850a212cd9b84d4f0290ad9d294afc0ae70fccaa8949dbe8b43ffafa1e20c" +checksum = "f4ae09a41a4b89f94ec1e053623da8340d996bc32c6517d325a9daad9b239358" dependencies = [ "diesel_derives", + "downcast-rs", "libsqlite3-sys", + "sqlite-wasm-rs", "time", ] [[package]] name = "diesel_derives" -version = "2.2.3" +version = "2.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f2c3de51e2ba6bf2a648285696137aaf0f5f487bcbea93972fe8a364e131a4" +checksum = "47618bf0fac06bb670c036e48404c26a865e6a71af4114dfd97dfe89936e404e" dependencies = [ "diesel_table_macro_syntax", "dsl_auto_type", "proc-macro2", "quote", - "syn", + "syn 2.0.117", ] [[package]] name = "diesel_table_macro_syntax" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" +checksum = "fe2444076b48641147115697648dc743c2c00b61adade0f01ce67133c7babe8c" dependencies = [ - "syn", + "syn 2.0.117", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", ] [[package]] @@ -455,18 +937,44 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "dlv-list" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" +dependencies = [ + "const-random", +] + +[[package]] +name = "downcast-rs" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "117240f60069e65410b3ae1bb213295bd828f707b5bec6596a1afc8793ce0cbc" + [[package]] name = "dsl_auto_type" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5d9abe6314103864cc2d8901b7ae224e0ab1a103a0a416661b4097b0779b607" +checksum = "dd122633e4bef06db27737f21d3738fb89c8f6d5360d6d9d7635dda142a7757e" dependencies = [ "darling", "either", - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn", + "syn 2.0.117", ] [[package]] @@ -492,9 +1000,9 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "ego-tree" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2972feb8dffe7bc8c5463b1dacda1b0dfbed3710e50f977d965429692d74cd8" +checksum = "b04dc5a38e4f151a79d9f2451ae6037fb6eaf5cba34771f44781f80e508498e3" [[package]] name = "either" @@ -511,6 +1019,38 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "enumflags2" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "enumn" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "env_filter" version = "0.1.2" @@ -527,7 +1067,7 @@ version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" dependencies = [ - "anstream", + "anstream 0.6.15", "anstyle", "env_filter", "humantime", @@ -540,6 +1080,85 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener 5.4.1", + "pin-project-lite", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + [[package]] name = "fastrand" version = "2.1.1" @@ -568,6 +1187,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -607,16 +1232,6 @@ dependencies = [ "libc", ] -[[package]] -name = "futf" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" -dependencies = [ - "mac", - "new_debug_unreachable", -] - [[package]] name = "futures-channel" version = "0.3.30" @@ -632,6 +1247,40 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +[[package]] +name = "futures-io" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" + +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand 2.1.1", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + [[package]] name = "futures-sink" version = "0.3.30" @@ -651,9 +1300,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", + "futures-io", + "futures-sink", "futures-task", + "memchr", "pin-project-lite", "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", ] [[package]] @@ -692,6 +1355,36 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "rand_core 0.10.0", + "wasip2", + "wasip3", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval", +] + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + [[package]] name = "h2" version = "0.4.6" @@ -712,10 +1405,43 @@ dependencies = [ ] [[package]] -name = "hashbrown" -version = "0.16.0" +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "hashlink" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "heck" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "heck" @@ -729,11 +1455,41 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + [[package]] name = "html5ever" -version = "0.36.1" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6452c4751a24e1b99c3260d505eaeee76a050573e61f30ac2c924ddc7236f01e" +checksum = "46a1761807faccc9a19e86944bbf40610014066306f96edcdedc2fb714bcb7b8" dependencies = [ "log", "markup5ever", @@ -848,6 +1604,36 @@ dependencies = [ "windows-registry", ] +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core 0.62.2", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + [[package]] name = "ident_case" version = "1.0.1" @@ -864,14 +1650,22 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "indenter" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" + [[package]] name = "indexmap" -version = "2.11.4" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.16.1", + "serde", + "serde_core", ] [[package]] @@ -900,6 +1694,36 @@ dependencies = [ "libc", ] +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "block-padding", + "generic-array", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "ipnet" version = "2.9.0" @@ -961,24 +1785,14 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.77" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" dependencies = [ "once_cell", "wasm-bindgen", ] -[[package]] -name = "keyring" -version = "3.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eebcc3aff044e5944a8fbaf69eb277d11986064cba30c468730e8b9909fb551c" -dependencies = [ - "log", - "zeroize", -] - [[package]] name = "kqueue" version = "1.1.1" @@ -999,6 +1813,12 @@ dependencies = [ "libc", ] +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "leetcode-cli" version = "0.5.0" @@ -1011,15 +1831,15 @@ dependencies = [ "diesel", "dirs", "env_logger", - "keyring", "log", - "nix", + "nix 0.31.2", "notify", "openssl", "pyo3", - "rand", + "rand 0.10.0", "regex", "reqwest", + "rookie", "scraper", "serde", "serde_json", @@ -1031,9 +1851,30 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.180" +version = "0.2.184" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" +checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af" + +[[package]] +name = "libesedb" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c72b56d9764a22feaaed1de8f2fc2accc6745dfdf79caff845714fcb52a2f72" +dependencies = [ + "libesedb-sys", + "time", +] + +[[package]] +name = "libesedb-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "110afdc2f932325712a6353243313d3878fd44e811d898176a13a6204b1f0186" +dependencies = [ + "cc", + "patch-apply", + "walkdir", +] [[package]] name = "libredox" @@ -1047,14 +1888,33 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.30.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" dependencies = [ + "cc", "pkg-config", "vcpkg", ] +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + [[package]] name = "lock_api" version = "0.4.12" @@ -1078,16 +1938,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" [[package]] -name = "mac" -version = "0.1.1" +name = "lz4_flex" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" +checksum = "373f5eceeeab7925e0c1098212f2fbc4d416adec9d35051a6ab251e824c1854a" +dependencies = [ + "twox-hash", +] [[package]] name = "markup5ever" -version = "0.36.1" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c3294c4d74d0742910f8c7b466f44dda9eb2d5742c1e430138df290a1e8451c" +checksum = "7122d987ec5f704ee56f6e5b41a7d93722e9aae27ae07cafa4036c4d3f9757de" dependencies = [ "log", "tendril", @@ -1100,6 +1963,15 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + [[package]] name = "memoffset" version = "0.9.1" @@ -1115,6 +1987,12 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.8.0" @@ -1130,7 +2008,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", @@ -1145,9 +2023,21 @@ checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "nix" -version = "0.31.1" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.7.1", +] + +[[package]] +name = "nix" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225e7cfe711e0ba79a68baeddb2982723e4235247aefce1482f2f16c27865b66" +checksum = "5d6d0705320c1e6ba1d912b5e37cf18071b6c2e9b7fa8215a1e8a7651966f5d3" dependencies = [ "bitflags 2.10.0", "cfg-if", @@ -1155,6 +2045,36 @@ dependencies = [ "libc", ] +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nom_locate" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e3c83c053b0713da60c5b8de47fe8e494fe3ece5267b2f23090a07a053ba8f3" +dependencies = [ + "bytecount", + "memchr", + "nom", +] + +[[package]] +name = "normpath" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf23ab2b905654b4cb177e30b629937b3868311d4e1cba859f899c041046e69b" +dependencies = [ + "windows-sys 0.61.2", +] + [[package]] name = "notify" version = "8.2.0" @@ -1179,23 +2099,73 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" +[[package]] +name = "nt-string" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f64f73b19d9405e886b53b9dee286e7fbb622a5276a7fd143c2d8e4dac3a0c6c" +dependencies = [ + "displaydoc", + "widestring", +] + +[[package]] +name = "ntfs" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26fe2140f3b6eef2648fa331ca7af7652da1bf3bb84f715878bf50f2f8f03c38" +dependencies = [ + "arrayvec", + "binrw", + "bitflags 2.10.0", + "byteorder", + "derive_more 0.99.20", + "displaydoc", + "enumn", + "memoffset 0.9.1", + "nt-string", + "strum_macros", + "time", +] + [[package]] name = "num-conv" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + [[package]] name = "once_cell" version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + [[package]] name = "openssl" -version = "0.10.75" +version = "0.10.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" +checksum = "951c002c75e16ea2c65b8c7e4d3d51d5530d8dfa7d060b4776828c88cfb18ecf" dependencies = [ "bitflags 2.10.0", "cfg-if", @@ -1214,7 +2184,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.117", ] [[package]] @@ -1225,9 +2195,9 @@ checksum = "9f50d9b3dabb09ecd771ad0aa242ca6894994c130308ca3d7684634df8037391" [[package]] name = "openssl-sys" -version = "0.9.111" +version = "0.9.112" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" +checksum = "57d55af3b3e226502be1526dfdba67ab0e9c96fc293004e79576b2b9edb0dbdb" dependencies = [ "cc", "libc", @@ -1241,6 +2211,32 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "ordered-multimap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" +dependencies = [ + "dlv-list", + "hashbrown 0.14.5", +] + +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + [[package]] name = "parking_lot" version = "0.12.3" @@ -1264,6 +2260,27 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "patch-apply" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe95476ec50a4e9b95ed12a4677ff5996aba4329bf2535fb21c49afaad20809" +dependencies = [ + "chrono", + "nom", + "nom_locate", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest", + "hmac", +] + [[package]] name = "percent-encoding" version = "2.3.1" @@ -1297,7 +2314,7 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" dependencies = [ - "fastrand", + "fastrand 2.1.1", "phf_shared", ] @@ -1311,7 +2328,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn", + "syn 2.0.117", ] [[package]] @@ -1335,12 +2352,65 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" +dependencies = [ + "atomic-waker", + "fastrand 2.1.1", + "futures-io", +] + [[package]] name = "pkg-config" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite", + "windows-sys 0.48.0", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi 0.5.2", + "pin-project-lite", + "rustix 1.1.3", + "windows-sys 0.61.2", +] + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "opaque-debug", + "universal-hash", +] + [[package]] name = "portable-atomic" version = "1.7.0" @@ -1359,55 +2429,84 @@ version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ - "zerocopy 0.7.35", + "zerocopy 0.7.35", +] + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.117", +] + +[[package]] +name = "privilege" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "765ec92721e112ffe07f5c06fb0654da0b708990888981d05cf12a7c9909df30" +dependencies = [ + "libc", + "security-framework-sys", + "which", + "windows-sys 0.48.0", ] [[package]] -name = "precomputed-hash" -version = "0.1.1" +name = "proc-macro-crate" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] [[package]] name = "proc-macro2" -version = "1.0.104" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9695f8df41bb4f3d222c95a67532365f569318332d03d5f3f67f37b20e6ebdf0" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "pyo3" -version = "0.27.2" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab53c047fcd1a1d2a8820fe84f05d6be69e9526be40cb03b73f86b6b03e6d87d" +checksum = "cf85e27e86080aafd5a22eae58a162e133a589551542b3e5cee4beb27e54f8e1" dependencies = [ - "indoc", "libc", - "memoffset", "once_cell", "portable-atomic", "pyo3-build-config", "pyo3-ffi", "pyo3-macros", - "unindent", ] [[package]] name = "pyo3-build-config" -version = "0.27.2" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b455933107de8642b4487ed26d912c2d899dec6114884214a0b3bb3be9261ea6" +checksum = "8bf94ee265674bf76c09fa430b0e99c26e319c945d96ca0d5a8215f31bf81cf7" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.27.2" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c85c9cbfaddf651b1221594209aed57e9e5cff63c4d11d1feead529b872a089" +checksum = "491aa5fc66d8059dd44a75f4580a2962c1862a1c2945359db36f6c2818b748dc" dependencies = [ "libc", "pyo3-build-config", @@ -1415,27 +2514,27 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.27.2" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a5b10c9bf9888125d917fb4d2ca2d25c8df94c7ab5a52e13313a07e050a3b02" +checksum = "f5d671734e9d7a43449f8480f8b38115df67bef8d21f76837fa75ee7aaa5e52e" dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn", + "syn 2.0.117", ] [[package]] name = "pyo3-macros-backend" -version = "0.27.2" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b51720d314836e53327f5871d4c0cfb4fb37cc2c4a11cc71907a86342c40f9" +checksum = "22faaa1ce6c430a1f71658760497291065e6450d7b5dc2bcf254d49f66ee700a" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "pyo3-build-config", "quote", - "syn", + "syn 2.0.117", ] [[package]] @@ -1468,7 +2567,7 @@ dependencies = [ "bytes", "getrandom 0.3.1", "lru-slab", - "rand", + "rand 0.9.2", "ring", "rustc-hash", "rustls", @@ -1496,21 +2595,59 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + [[package]] name = "rand" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ - "rand_chacha", - "rand_core", + "rand_chacha 0.9.0", + "rand_core 0.9.0", +] + +[[package]] +name = "rand" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc266eb313df6c5c09c1c7b1fbe2510961e5bcd3add930c1e31f7ed9da0feff8" +dependencies = [ + "chacha20", + "getrandom 0.4.2", + "rand_core 0.10.0", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", ] [[package]] @@ -1520,7 +2657,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.9.0", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", ] [[package]] @@ -1530,7 +2676,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff" dependencies = [ "getrandom 0.3.1", - "zerocopy 0.8.14", + "zerocopy 0.8.27", +] + +[[package]] +name = "rand_core" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c8d0fd677905edcbeedbf2edb6494d676f0e98d54d5cf9bda0b061cb8fb8aba" + +[[package]] +name = "rawcopy-rs-next" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ae516a90d6633521dd746eedb19018317daf519ef0c463c3fac4acb80bdec60" +dependencies = [ + "anyhow", + "log", + "normpath", + "ntfs", ] [[package]] @@ -1555,9 +2719,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.12.2" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", @@ -1584,9 +2748,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e9018c9d814e5f30cc16a0f03271aeab3571e609612d9fe78c1aa8d11c2f62" +checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801" dependencies = [ "base64", "bytes", @@ -1637,12 +2801,119 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rookie" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec13c4a0a48ef3a59770e8680eab740027ade9502c693320be12af29c025897e" +dependencies = [ + "aes", + "aes-gcm", + "base64", + "byteorder", + "cbc", + "eyre", + "glob", + "indoc", + "libesedb", + "log", + "lz4_flex", + "once_cell", + "pbkdf2", + "privilege", + "rand 0.8.5", + "rawcopy-rs-next", + "regex", + "rusqlite", + "rust-ini", + "serde", + "serde_json", + "sha1", + "url", + "windows", + "zbus", + "zvariant", +] + +[[package]] +name = "rusqlite" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" +dependencies = [ + "bitflags 2.10.0", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", +] + +[[package]] +name = "rust-ini" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "796e8d2b6696392a43bea58116b667fb4c29727dc5abd27d6acf338bb4f688c7" +dependencies = [ + "cfg-if", + "ordered-multimap", +] + [[package]] name = "rustc-hash" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.37.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "519165d378b97752ca44bbe15047d5d3409e875f39327546b42ac81d7e18c1b6" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.10.0", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +dependencies = [ + "bitflags 2.10.0", + "errno", + "libc", + "linux-raw-sys 0.11.0", + "windows-sys 0.61.2", +] + [[package]] name = "rustls" version = "0.23.35" @@ -1750,9 +3021,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scraper" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93cecd86d6259499c844440546d02f55f3e17bd286e529e48d1f9f67e92315cb" +checksum = "f0f5297102b8b62b4454ee8561601b2d551b4913148feb4241ca9d1a04bf4526" dependencies = [ "cssparser", "ego-tree", @@ -1788,13 +3059,13 @@ dependencies = [ [[package]] name = "selectors" -version = "0.33.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feef350c36147532e1b79ea5c1f3791373e61cbd9a6a2615413b3807bb164fb7" +checksum = "c5d9c0c92a92d33f08817311cf3f2c29a3538a8240e94a6a3c622ce652d7e00c" dependencies = [ "bitflags 2.10.0", "cssparser", - "derive_more", + "derive_more 2.0.1", "log", "new_debug_unreachable", "phf", @@ -1805,6 +3076,12 @@ dependencies = [ "smallvec", ] +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + [[package]] name = "serde" version = "1.0.228" @@ -1832,7 +3109,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.117", ] [[package]] @@ -1841,6 +3118,7 @@ version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ + "indexmap", "itoa", "memchr", "serde", @@ -1848,11 +3126,22 @@ dependencies = [ "zmij", ] +[[package]] +name = "serde_repr" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "serde_spanned" -version = "1.0.4" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" dependencies = [ "serde_core", ] @@ -1866,6 +3155,17 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest", +] + [[package]] name = "shlex" version = "1.3.0" @@ -1902,6 +3202,16 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "socket2" version = "0.5.10" @@ -1928,12 +3238,33 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "sqlite-wasm-rs" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60bdd87fcb4c9764b024805fb2df5f1d659bea6e629fdbdcdcfc4042b9a640d0" +dependencies = [ + "js-sys", + "once_cell", + "thiserror 2.0.18", + "tokio", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "string_cache" version = "0.9.0" @@ -1944,7 +3275,6 @@ dependencies = [ "parking_lot", "phf_shared", "precomputed-hash", - "serde", ] [[package]] @@ -1965,6 +3295,19 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + [[package]] name = "subtle" version = "2.6.1" @@ -1973,9 +3316,20 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.90" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -2014,18 +3368,30 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.13.2" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" + +[[package]] +name = "tempfile" +version = "3.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" +checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1" +dependencies = [ + "fastrand 2.1.1", + "getrandom 0.4.2", + "once_cell", + "rustix 1.1.3", + "windows-sys 0.61.2", +] [[package]] name = "tendril" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" +checksum = "c4790fc369d5a530f4b544b094e31388b9b3a37c0f4652ade4505945f5660d24" dependencies = [ - "futf", - "mac", + "new_debug_unreachable", "utf-8", ] @@ -2055,7 +3421,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.117", ] [[package]] @@ -2066,7 +3432,7 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.117", ] [[package]] @@ -2100,6 +3466,15 @@ dependencies = [ "time-core", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -2117,9 +3492,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.49.0" +version = "1.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" dependencies = [ "bytes", "libc", @@ -2140,7 +3515,7 @@ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.117", ] [[package]] @@ -2169,42 +3544,59 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.11+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3afc9a848309fe1aaffaed6e1546a7a14de1f935dc9d89d32afd9a44bab7c46" +checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" dependencies = [ "indexmap", "serde_core", "serde_spanned", - "toml_datetime", + "toml_datetime 1.1.1+spec-1.1.0", "toml_parser", "toml_writer", - "winnow", + "winnow 1.0.1", ] [[package]] name = "toml_datetime" -version = "0.7.5+spec-1.1.0" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" + +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ "serde_core", ] +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap", + "toml_datetime 0.6.11", + "winnow 0.5.40", +] + [[package]] name = "toml_parser" -version = "1.0.6+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ - "winnow", + "winnow 1.0.1", ] [[package]] name = "toml_writer" -version = "1.0.6+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" +checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" [[package]] name = "tower" @@ -2263,9 +3655,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "tracing-core" version = "0.1.32" @@ -2281,6 +3685,29 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "twox-hash" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea3136b675547379c4bd395ca6b938e5ad3c3d20fad76e7fe85f9e0d011419c" + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "uds_windows" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" +dependencies = [ + "memoffset 0.9.1", + "tempfile", + "windows-sys 0.61.2", +] + [[package]] name = "unicode-bidi" version = "0.3.15" @@ -2309,10 +3736,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" [[package]] -name = "unindent" -version = "0.2.3" +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "universal-hash" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] [[package]] name = "untrusted" @@ -2349,6 +3786,18 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "waker-fn" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" + [[package]] name = "walkdir" version = "2.5.0" @@ -2384,48 +3833,54 @@ dependencies = [ ] [[package]] -name = "wasm-bindgen" -version = "0.2.100" +name = "wasip2" +version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", + "wit-bindgen", ] [[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.100" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2433,31 +3888,65 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.100" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" dependencies = [ + "bumpalo", "proc-macro2", "quote", - "syn", - "wasm-bindgen-backend", + "syn 2.0.117", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.100" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags 2.10.0", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" dependencies = [ "js-sys", "wasm-bindgen", @@ -2475,9 +3964,9 @@ dependencies = [ [[package]] name = "web_atoms" -version = "0.2.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd0c322f146d0f8aad130ce6c187953889359584497dac6561204c8e17bb43d" +checksum = "57a9779e9f04d2ac1ce317aee707aa2f6b773afba7b931222bff6983843b1576" dependencies = [ "phf", "phf_codegen", @@ -2494,6 +3983,40 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.44", +] + +[[package]] +name = "widestring" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + [[package]] name = "winapi-util" version = "0.1.11" @@ -2503,6 +4026,66 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" +dependencies = [ + "windows-core 0.51.1", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "windows-link" version = "0.1.1" @@ -2521,8 +4104,8 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ - "windows-result", - "windows-strings", + "windows-result 0.3.2", + "windows-strings 0.3.1", "windows-targets 0.53.5", ] @@ -2535,6 +4118,15 @@ dependencies = [ "windows-link 0.1.1", ] +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link 0.2.1", +] + [[package]] name = "windows-strings" version = "0.3.1" @@ -2544,6 +4136,15 @@ dependencies = [ "windows-link 0.1.1", ] +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link 0.2.1", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -2553,6 +4154,15 @@ dependencies = [ "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.5", +] + [[package]] name = "windows-sys" version = "0.52.0" @@ -2604,6 +4214,21 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + [[package]] name = "windows-targets" version = "0.52.6" @@ -2643,6 +4268,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -2661,6 +4292,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -2679,6 +4316,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -2709,6 +4352,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -2727,6 +4376,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -2745,6 +4400,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -2763,6 +4424,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -2777,9 +4444,38 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" -version = "0.7.13" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09dac053f1cd375980747450bfc7250c264eaae0583872e845c0c7cd578872b5" + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser", +] [[package]] name = "wit-bindgen-rt" @@ -2790,6 +4486,150 @@ dependencies = [ "bitflags 2.10.0", ] +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap", + "prettyplease", + "syn 2.0.117", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.117", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags 2.10.0", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + +[[package]] +name = "xdg-home" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "zbus" +version = "3.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" +dependencies = [ + "async-broadcast", + "async-executor", + "async-fs", + "async-io 1.13.0", + "async-lock 2.8.0", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "byteorder", + "derivative", + "enumflags2", + "event-listener 2.5.3", + "futures-core", + "futures-sink", + "futures-util", + "hex", + "nix 0.26.4", + "once_cell", + "ordered-stream", + "rand 0.8.5", + "serde", + "serde_repr", + "sha1", + "static_assertions", + "tracing", + "uds_windows", + "winapi", + "xdg-home", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "3.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7131497b0f887e8061b430c530240063d33bf9455fa34438f388a245da69e0a5" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d" +dependencies = [ + "serde", + "static_assertions", + "zvariant", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -2802,11 +4642,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.14" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a367f292d93d4eab890745e75a778da40909cab4d6ff8173693812f79c4a2468" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" dependencies = [ - "zerocopy-derive 0.8.14", + "zerocopy-derive 0.8.27", ] [[package]] @@ -2817,18 +4657,18 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.117", ] [[package]] name = "zerocopy-derive" -version = "0.8.14" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3931cb58c62c13adec22e38686b559c86a30565e16ad6e8510a337cedc611e1" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.117", ] [[package]] @@ -2842,3 +4682,41 @@ name = "zmij" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aac060176f7020d62c3bcc1cdbcec619d54f48b07ad1963a3f80ce7a0c17755f" + +[[package]] +name = "zvariant" +version = "3.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eef2be88ba09b358d3b58aca6e41cd853631d44787f319a1383ca83424fb2db" +dependencies = [ + "byteorder", + "enumflags2", + "libc", + "serde", + "static_assertions", + "zvariant_derive", +] + +[[package]] +name = "zvariant_derive" +version = "3.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37c24dc0bed72f5f90d1f8bb5b07228cbf63b3c6e9f82d82559d4bae666e7ed9" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] diff --git a/Cargo.toml b/Cargo.toml index b13f2a2..04ec1c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,22 +17,22 @@ readme = './README.md' [dependencies] async-trait = "0.1.89" -tokio = { version = "1.49.0", features = ["full"] } -clap = { version = "4.5", features = ["cargo", "derive"] } +tokio = { version = "1.50.0", features = ["full"] } +clap = { version = "4.6", features = ["cargo", "derive"] } colored = "3.1.1" dirs = "6.0.0" env_logger = "0.11.6" log = "0.4.29" openssl = "0.10" -pyo3 = { version = "0.27", optional = true } -rand = "0.9.2" +pyo3 = { version = "0.28", optional = true } +rand = "0.10.0" serde = { version = "1.0.228", features = ["derive"] } serde_json = "1.0.149" -toml = "0.9.11" -regex = "1.12.2" -scraper = "0.25.0" -anyhow = "1.0.100" -clap_complete = "4.5" +toml = "1.1.2" +regex = "1.12.3" +scraper = "0.26.0" +anyhow = "1.0.102" +clap_complete = "4.6" thiserror = "2.0.18" unicode-width = "0.2" notify = "8.2.0" @@ -43,11 +43,11 @@ version = "2.3.6" features = ["sqlite"] [dependencies.reqwest] -version = "0.13.1" +version = "0.13.2" features = ["gzip", "json"] [features] pym = ["pyo3"] [target.'cfg(target_family = "unix")'.dependencies] -nix = { version = "0.31.1", features = ["signal"] } +nix = { version = "0.31.2", features = ["signal"] } From e59f6bff68476c14a71940b2ec3828bb8af6db0a Mon Sep 17 00:00:00 2001 From: Andrew Tawfeek <81664969+andrew-tawfeek@users.noreply.github.com> Date: Sat, 20 Jun 2026 23:34:12 -0700 Subject: [PATCH 11/17] fix: import rand::RngExt for random_range in pick (#223) The rand 0.10 bump (#220) moved `random_range` off the `Rng` trait into the new `RngExt` trait, so `src/cmd/pick.rs` no longer compiles on `main`: error[E0599]: no method named `random_range` found for struct `ThreadRng` help: trait `RngExt` which provides `random_range` is implemented but not in scope; perhaps you want to import it Import `RngExt` instead of `Rng` in the `pick` handler. --- src/cmd/pick.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/pick.rs b/src/cmd/pick.rs index a881d94..9297a93 100644 --- a/src/cmd/pick.rs +++ b/src/cmd/pick.rs @@ -44,7 +44,7 @@ impl PickArgs { /// `pick` handler pub async fn run(&self) -> Result<(), Error> { use crate::cache::Cache; - use rand::Rng; + use rand::RngExt; let cache = Cache::new()?; let mut problems = cache.get_problems()?; From c2b4eb9717b116b6849d6867f2e9b08ef7811277 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 Jun 2026 14:59:19 +0800 Subject: [PATCH 12/17] chore(dep): bump the deps group across 1 directory with 12 updates (#224) * chore(dep): bump the deps group across 1 directory with 12 updates Bumps the deps group with 12 updates in the / directory: | Package | From | To | | --- | --- | --- | | [tokio](https://github.com/tokio-rs/tokio) | `1.50.0` | `1.52.3` | | [clap](https://github.com/clap-rs/clap) | `4.6.0` | `4.6.1` | | [log](https://github.com/rust-lang/log) | `0.4.29` | `0.4.31` | | [openssl](https://github.com/rust-openssl/rust-openssl) | `0.10.76` | `0.10.80` | | [pyo3](https://github.com/pyo3/pyo3) | `0.28.2` | `0.28.3` | | [rand](https://github.com/rust-random/rand) | `0.10.0` | `0.10.1` | | [serde_json](https://github.com/serde-rs/json) | `1.0.149` | `1.0.150` | | [scraper](https://github.com/rust-scraper/scraper) | `0.26.0` | `0.27.0` | | [clap_complete](https://github.com/clap-rs/clap) | `4.6.0` | `4.6.5` | | [diesel](https://github.com/diesel-rs/diesel) | `2.3.7` | `2.3.9` | | [reqwest](https://github.com/seanmonstar/reqwest) | `0.13.2` | `0.13.4` | | [nix](https://github.com/nix-rust/nix) | `0.31.2` | `0.31.3` | Updates `tokio` from 1.50.0 to 1.52.3 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.50.0...tokio-1.52.3) Updates `clap` from 4.6.0 to 4.6.1 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.6.0...clap_complete-v4.6.1) Updates `log` from 0.4.29 to 0.4.31 - [Release notes](https://github.com/rust-lang/log/releases) - [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/log/compare/0.4.29...0.4.31) Updates `openssl` from 0.10.76 to 0.10.80 - [Release notes](https://github.com/rust-openssl/rust-openssl/releases) - [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.76...openssl-v0.10.80) Updates `pyo3` from 0.28.2 to 0.28.3 - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md) - [Commits](https://github.com/pyo3/pyo3/compare/v0.28.2...v0.28.3) Updates `rand` from 0.10.0 to 0.10.1 - [Release notes](https://github.com/rust-random/rand/releases) - [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-random/rand/compare/0.10.0...0.10.1) Updates `serde_json` from 1.0.149 to 1.0.150 - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.149...v1.0.150) Updates `scraper` from 0.26.0 to 0.27.0 - [Release notes](https://github.com/rust-scraper/scraper/releases) - [Commits](https://github.com/rust-scraper/scraper/compare/v0.26.0...v0.27.0) Updates `clap_complete` from 4.6.0 to 4.6.5 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.6.0...clap_complete-v4.6.5) Updates `diesel` from 2.3.7 to 2.3.9 - [Release notes](https://github.com/diesel-rs/diesel/releases) - [Changelog](https://github.com/diesel-rs/diesel/blob/main/CHANGELOG.md) - [Commits](https://github.com/diesel-rs/diesel/compare/v2.3.7...v2.3.9) Updates `reqwest` from 0.13.2 to 0.13.4 - [Release notes](https://github.com/seanmonstar/reqwest/releases) - [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md) - [Commits](https://github.com/seanmonstar/reqwest/compare/v0.13.2...v0.13.4) Updates `nix` from 0.31.2 to 0.31.3 - [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md) - [Commits](https://github.com/nix-rust/nix/compare/v0.31.2...v0.31.3) --- updated-dependencies: - dependency-name: tokio dependency-version: 1.52.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: clap dependency-version: 4.6.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: log dependency-version: 0.4.31 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: openssl dependency-version: 0.10.80 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: pyo3 dependency-version: 0.28.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: rand dependency-version: 0.10.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: serde_json dependency-version: 1.0.150 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: scraper dependency-version: 0.27.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: clap_complete dependency-version: 4.6.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: diesel dependency-version: 2.3.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: reqwest dependency-version: 0.13.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps - dependency-name: nix dependency-version: 0.31.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: deps ... Signed-off-by: dependabot[bot] * chore(ci): trigger CI on main * chore: rustfmt * chore: bumps version to 0.5.1 * chore(deps): bump dependencies to resolve security advisories * chore: typos --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: clearloop --- .github/workflows/rust.yml | 4 +- Cargo.lock | 173 ++++++++++++++++++------------------- Cargo.toml | 20 ++--- src/plugins/chrome.rs | 1 - src/plugins/mod.rs | 4 +- 5 files changed, 97 insertions(+), 105 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6cbf21b..2e74629 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,9 +2,9 @@ name: leetcode-cli on: push: - branches: [master] + branches: [main] pull_request: - branches: [master] + branches: [main] jobs: build: diff --git a/Cargo.lock b/Cargo.lock index 14cf017..9830c47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -361,9 +361,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "aws-lc-rs" -version = "1.15.2" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88aab2464f1f25453baa7a07c84c5b7684e274054ba06817f382357f77a288" +checksum = "5ec2f1fc3ec205783a5da9a7e6c1509cc69dedf09a1949e412c1e18469326d00" dependencies = [ "aws-lc-sys", "zeroize", @@ -371,9 +371,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.35.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45afffdee1e7c9126814751f88dddc747f41d91da16c9551a0f1e8a11e788a1" +checksum = "1a2f9779ce85b93ab6170dd940ad0169b5766ff848247aff13bb788b832fe3f4" dependencies = [ "cc", "cmake", @@ -479,9 +479,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593" [[package]] name = "cbc" @@ -558,9 +558,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.0" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" +checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" dependencies = [ "clap_builder", "clap_derive", @@ -580,18 +580,18 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.6.0" +version = "4.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c9f1dde76b736e3681f28cec9d5a61299cbaae0fce80a68e43724ad56031eb" +checksum = "e0a7a9bfdb35811f9e59832f0f05975114d2251b415fb534108e6f34060fd772" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.6.0" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a" +checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -752,9 +752,9 @@ dependencies = [ [[package]] name = "cssparser" -version = "0.36.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dae61cf9c0abb83bd659dab65b7e4e38d8236824c85f0f804f173567bda257d2" +checksum = "8c9cdaae01d5ed7882b04d795e7f752f46ff52d2fa3b50a20d28c464510bba98" dependencies = [ "cssparser-macros", "dtoa-short", @@ -765,9 +765,9 @@ dependencies = [ [[package]] name = "cssparser-macros" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" +checksum = "10a2a99df6e410a8ff4245aa2006499ea662245f967cc7c0a38c83ef8eb44dbf" dependencies = [ "quote", "syn 2.0.117", @@ -819,12 +819,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.11" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" [[package]] name = "derivative" @@ -872,9 +869,9 @@ dependencies = [ [[package]] name = "diesel" -version = "2.3.7" +version = "2.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4ae09a41a4b89f94ec1e053623da8340d996bc32c6517d325a9daad9b239358" +checksum = "9940fb8467a0a06312218ed384185cb8536aa10d8ec017d0ce7fad2c1bd882d5" dependencies = [ "diesel_derives", "downcast-rs", @@ -1821,7 +1818,7 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "leetcode-cli" -version = "0.5.0" +version = "0.5.1" dependencies = [ "anyhow", "async-trait", @@ -1832,11 +1829,11 @@ dependencies = [ "dirs", "env_logger", "log", - "nix 0.31.2", + "nix 0.31.3", "notify", "openssl", "pyo3", - "rand 0.10.0", + "rand 0.10.1", "regex", "reqwest", "rookie", @@ -1851,9 +1848,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.184" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libesedb" @@ -1927,9 +1924,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.29" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +checksum = "113b30b4cd05f7c06868fdb2854f66a7b9fece9a48425351cd532e810d74024f" [[package]] name = "lru-slab" @@ -2004,15 +2001,14 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.2" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" dependencies = [ - "hermit-abi 0.3.9", "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -2035,9 +2031,9 @@ dependencies = [ [[package]] name = "nix" -version = "0.31.2" +version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d0705320c1e6ba1d912b5e37cf18071b6c2e9b7fa8215a1e8a7651966f5d3" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" dependencies = [ "bitflags 2.10.0", "cfg-if", @@ -2130,9 +2126,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.1.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" [[package]] name = "num-traits" @@ -2163,15 +2159,14 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.76" +version = "0.10.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "951c002c75e16ea2c65b8c7e4d3d51d5530d8dfa7d060b4776828c88cfb18ecf" +checksum = "a45fa2aa886c42762255da344f0a0d313e254066c46aad76f300c3d3da62d967" dependencies = [ "bitflags 2.10.0", "cfg-if", "foreign-types", "libc", - "once_cell", "openssl-macros", "openssl-sys", ] @@ -2195,9 +2190,9 @@ checksum = "9f50d9b3dabb09ecd771ad0aa242ca6894994c130308ca3d7684634df8037391" [[package]] name = "openssl-sys" -version = "0.9.112" +version = "0.9.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d55af3b3e226502be1526dfdba67ab0e9c96fc293004e79576b2b9edb0dbdb" +checksum = "f28a22dc7140cda5f096e5e7724a6962ca81a7f8bfd2979f9b18c11af56318c4" dependencies = [ "cc", "libc", @@ -2481,9 +2476,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.2" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf85e27e86080aafd5a22eae58a162e133a589551542b3e5cee4beb27e54f8e1" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -2495,18 +2490,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.2" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf94ee265674bf76c09fa430b0e99c26e319c945d96ca0d5a8215f31bf81cf7" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.2" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "491aa5fc66d8059dd44a75f4580a2962c1862a1c2945359db36f6c2818b748dc" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -2514,9 +2509,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.2" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5d671734e9d7a43449f8480f8b38115df67bef8d21f76837fa75ee7aaa5e52e" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -2526,13 +2521,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.2" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22faaa1ce6c430a1f71658760497291065e6450d7b5dc2bcf254d49f66ee700a" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck 0.5.0", "proc-macro2", - "pyo3-build-config", "quote", "syn 2.0.117", ] @@ -2550,7 +2544,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2 0.6.0", + "socket2 0.6.4", "thiserror 2.0.18", "tokio", "tracing", @@ -2559,9 +2553,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.13" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" +checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" dependencies = [ "aws-lc-rs", "bytes", @@ -2588,7 +2582,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.0", + "socket2 0.6.4", "tracing", "windows-sys 0.60.2", ] @@ -2610,9 +2604,9 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "rand" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" dependencies = [ "libc", "rand_chacha 0.3.1", @@ -2631,9 +2625,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc266eb313df6c5c09c1c7b1fbe2510961e5bcd3add930c1e31f7ed9da0feff8" +checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" dependencies = [ "chacha20", "getrandom 0.4.2", @@ -2748,9 +2742,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.13.2" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801" +checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ "base64", "bytes", @@ -2821,7 +2815,7 @@ dependencies = [ "once_cell", "pbkdf2", "privilege", - "rand 0.8.5", + "rand 0.8.6", "rawcopy-rs-next", "regex", "rusqlite", @@ -2979,9 +2973,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.103.8" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ "aws-lc-rs", "ring", @@ -3021,9 +3015,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scraper" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f5297102b8b62b4454ee8561601b2d551b4913148feb4241ca9d1a04bf4526" +checksum = "bdd0be4d296f048bfb06dd01bbc80ef789ddd2e55583e8d2e6b804942abfabc2" dependencies = [ "cssparser", "ego-tree", @@ -3059,9 +3053,9 @@ dependencies = [ [[package]] name = "selectors" -version = "0.36.1" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5d9c0c92a92d33f08817311cf3f2c29a3538a8240e94a6a3c622ce652d7e00c" +checksum = "8adfa1c298912827b8a28b223b3b874357397ae706e6190acd9bf28cee99114d" dependencies = [ "bitflags 2.10.0", "cssparser", @@ -3114,9 +3108,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" dependencies = [ "indexmap", "itoa", @@ -3224,12 +3218,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -3437,30 +3431,29 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "711a53c2d47bbd818258c498c8dbfe186a2526c631495cfe7e078567f86b8469" dependencies = [ "deranged", - "itoa", "num-conv", "powerfmt", - "serde", + "serde_core", "time-core", "time-macros", ] [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "71c652a3727a9cbb9a02f707f530b618ce00d0ccd762009c8c23bd191df3c17d" dependencies = [ "num-conv", "time-core", @@ -3492,9 +3485,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.50.0" +version = "1.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" +checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" dependencies = [ "bytes", "libc", @@ -3502,16 +3495,16 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.0", + "socket2 0.6.4", "tokio-macros", "windows-sys 0.61.2", ] [[package]] name = "tokio-macros" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", @@ -4591,7 +4584,7 @@ dependencies = [ "nix 0.26.4", "once_cell", "ordered-stream", - "rand 0.8.5", + "rand 0.8.6", "serde", "serde_repr", "sha1", diff --git a/Cargo.toml b/Cargo.toml index 04ec1c2..d1aba75 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ path = "src/bin/lc.rs" [package] name = "leetcode-cli" -version = "0.5.0" +version = "0.5.1" authors = ["clearloop "] edition = "2024" description = "Leetcode command-line interface in rust." @@ -17,20 +17,20 @@ readme = './README.md' [dependencies] async-trait = "0.1.89" -tokio = { version = "1.50.0", features = ["full"] } +tokio = { version = "1.52.3", features = ["full"] } clap = { version = "4.6", features = ["cargo", "derive"] } colored = "3.1.1" dirs = "6.0.0" env_logger = "0.11.6" -log = "0.4.29" +log = "0.4.31" openssl = "0.10" -pyo3 = { version = "0.28", optional = true } -rand = "0.10.0" +pyo3 = { version = "0.29", optional = true } +rand = "0.10.1" serde = { version = "1.0.228", features = ["derive"] } -serde_json = "1.0.149" +serde_json = "1.0.150" toml = "1.1.2" regex = "1.12.3" -scraper = "0.26.0" +scraper = "0.27.0" anyhow = "1.0.102" clap_complete = "4.6" thiserror = "2.0.18" @@ -39,15 +39,15 @@ notify = "8.2.0" rookie = "0.5.6" [dependencies.diesel] -version = "2.3.6" +version = "2.3.9" features = ["sqlite"] [dependencies.reqwest] -version = "0.13.2" +version = "0.13.4" features = ["gzip", "json"] [features] pym = ["pyo3"] [target.'cfg(target_family = "unix")'.dependencies] -nix = { version = "0.31.2", features = ["signal"] } +nix = { version = "0.31.3", features = ["signal"] } diff --git a/src/plugins/chrome.rs b/src/plugins/chrome.rs index e7d0530..5b2ac52 100644 --- a/src/plugins/chrome.rs +++ b/src/plugins/chrome.rs @@ -46,4 +46,3 @@ pub fn cookies() -> Result { .to_string(), }) } - diff --git a/src/plugins/mod.rs b/src/plugins/mod.rs index 0102ca0..fdc651e 100644 --- a/src/plugins/mod.rs +++ b/src/plugins/mod.rs @@ -1,10 +1,10 @@ -//! Leetcode-cil plugins +//! Leetcode-cli plugins //! //! + chrome cookie parser //! + leetcode API //! //! ## login to `leetcode.com` -//! Leetcode-cli use chrome cookie directly, do not need to login, please make sure you have loggined in `leetcode.com` before usnig `leetcode-cli` +//! Leetcode-cli uses chrome cookie directly, do not need to login, please make sure you have logged in `leetcode.com` before using `leetcode-cli` //! // FIXME: Read cookies from local storage. (issue #122) From a8176095cc8146196e8d2e8fb0f5acf8c241a606 Mon Sep 17 00:00:00 2001 From: clearloop Date: Sun, 21 Jun 2026 17:35:43 +0800 Subject: [PATCH 13/17] docs: restructure README into a front-door + docs/ pages and embed it in rustdoc (#225) * docs: restructure README into front-door with docs/ pages for config, cookies, editors, and scripting * chore: drop dead config fields and fix flake feature * chore(deps): bump idna, ring, rand to clear security advisories * chore: drop unmaintained CHANGELOG and placeholder SECURITY in favor of GitHub Releases * chore: embed README into crate-level rustdoc and bump yanked futures-util --- CHANGELOG.md | 171 ------------------ Cargo.lock | 285 ++++++++++++++++++++++++------ README.md | 392 ++++-------------------------------------- SECURITY.md | 21 --- docs/configuration.md | 128 ++++++++++++++ docs/cookies.md | 46 +++++ docs/editors.md | 62 +++++++ docs/scripting.md | 43 +++++ flake.nix | 4 - src/config/code.rs | 15 -- src/config/storage.rs | 9 +- src/lib.rs | 231 +------------------------ 12 files changed, 559 insertions(+), 848 deletions(-) delete mode 100644 CHANGELOG.md delete mode 100644 SECURITY.md create mode 100644 docs/configuration.md create mode 100644 docs/cookies.md create mode 100644 docs/editors.md create mode 100644 docs/scripting.md diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index cb532f8..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,171 +0,0 @@ -## v0.4.1 - -- Search problems by name -- Re-enable chrome plugin - -## v0.3.3 - -- allow more flexible categories by @frrad -- change params type to `Option` @frrad - -## v0.3.2 - -- adds additional tracing by @shmuga -- removes test_mode parameter by @shmuga - -## v0.3.1 - -- pipe handling by @aymanbagabas -- Improve README by @xiaoxiae - -## v0.3.0 - -- Upgrade reqwest to async mode -- Format code using clippy - -## v0.2.23 - -- support color display - -## v0.2.22 - -- Fixed the cache can't update with new added problems - -- Display user friendly errors when pick/edit new added problem. - -- upgrade pyo3 - -- fix leetcode list with empty cache - -## v0.2.21 - -- Make programmable support to be an advanced feature - -## v0.2.20 - -- Support sup/sub style for numbers - -## v0.2.19 - -- Better HTML! - -## v0.2.18 - -- Display stdout for test and execute commands, fix minor spacing in results displayed - -- Fix panic on `pick` command without cache - -## v0.2.17 - -Fix panic on stat command with zero numbers - -## v0.2.16 - -Update versions of diesel and reqwest - -## v0.2.15 - -Allow for custom testcases with the `leetcode test` command, and some minor edits - -## v0.2.14 - -Corrects file suffixes for c\*\* and c# files - -## v0.2.13 - -fix percent length panic - -## v0.2.12 - -fix gt || ge || lt || le - -## v0.2.11 - -added code 14 and transfered `&#ge;`、`&#le` and `'`. - -## v0.2.10 - -add code 15 - -## v0.2.9 - -update ac status after submit successfully - -## v0.2.8 - -show last testcases - -## v0.2.7 - -fixed float bug in result - -## v0.2.6 - -sync config while change current lang - -## v0.2.5 - -update local cache when submission status changes - -## v0.2.4 - -auto fetch question while exec `edit` directly. - -## v0.2.3 - -Programmable leetcode-cli - -## v0.2.2 - -1. optimize logs -2. add tag filter -3. sync configs - -## v0.2.1 - -1. fix cookies error handling -2. dismiss all `unwrap`, `expect` and `panic` -3. add cookie configs - -## v0.2.0 - -1. Add Linux Support - -## v0.1.9 - -1. release submit command -2. deserialize json using outter funcs - -## v0.1.8 - -1. pack mod exports -2. add edit command -3. add test command - -## v0.1.7 - -render html in command-line, and `pick` command - -## v0.1.6 - -complete `stat` command - -## v0.1.5 - -complete `cache` command - -## v0.1.3 - -complete `list` command - -## v0.1.2 - -abstract data cache - -## v0.1.1 - -add list command - -## v0.1.0 - -chrome cookie diff --git a/Cargo.lock b/Cargo.lock index 9830c47..417ef73 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1240,9 +1240,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-io" @@ -1280,21 +1280,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-core", "futures-io", @@ -1302,7 +1302,6 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", "slab", ] @@ -1625,6 +1624,88 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + [[package]] name = "id-arena" version = "2.3.0" @@ -1639,12 +1720,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1912,6 +2004,12 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + [[package]] name = "lock_api" version = "0.4.12" @@ -2341,12 +2439,6 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - [[package]] name = "piper" version = "0.2.5" @@ -2412,6 +2504,15 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -2561,7 +2662,7 @@ dependencies = [ "bytes", "getrandom 0.3.1", "lru-slab", - "rand 0.9.2", + "rand 0.9.4", "ring", "rustc-hash", "rustls", @@ -2615,9 +2716,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.0", @@ -2782,15 +2883,14 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.8" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", "getrandom 0.2.15", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] @@ -3226,12 +3326,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "sqlite-wasm-rs" version = "0.4.8" @@ -3339,6 +3433,17 @@ dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "system-configuration" version = "0.6.1" @@ -3468,6 +3573,16 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -3701,27 +3816,12 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-width" version = "0.2.2" @@ -3752,9 +3852,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -3767,6 +3867,12 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -4547,6 +4653,12 @@ dependencies = [ "wasmparser", ] +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + [[package]] name = "xdg-home" version = "1.3.0" @@ -4557,6 +4669,29 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", + "synstructure", +] + [[package]] name = "zbus" version = "3.15.2" @@ -4664,12 +4799,66 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "zmij" version = "1.0.6" diff --git a/README.md b/README.md index 315587a..8d514f4 100644 --- a/README.md +++ b/README.md @@ -7,393 +7,77 @@ [![telegram](https://img.shields.io/badge/telegram-blue?logo=telegram)](https://t.me/+U_5si6PhWykxZTI1) [![LICENSE](https://img.shields.io/crates/l/leetcode-cli.svg)](https://choosealicense.com/licenses/mit/) -## Installing +May the code be with you. -```sh -# Required dependencies: -# -# gcc -# libssl-dev -# libdbus-1-dev -# libsqlite3-dev - -cargo install leetcode-cli -``` - -
-Shell completions - -For Bash and Zsh (by default picks up `$SHELL` from environment) +## Install ```sh -eval "$(leetcode completions)" +# Required dependencies: gcc, libssl-dev, libdbus-1-dev, libsqlite3-dev +cargo install leetcode-cli ``` -Copy the line above to `.bash_profile` or `.zshrc` - -You may also obtain specific shell configuration using. +Python filtering scripts (the `--plan` flag) require the optional `pym` feature: ```sh -leetcode completions fish +cargo install leetcode-cli --features pym ``` -If no argument is provided, the shell is inferred from the `SHELL` environment variable. +Nix users can `nix build` / `nix develop` against the bundled [`flake.nix`](./flake.nix). -
- -## Usage +## Quickstart -**Make sure you have logged in to `leetcode.com` with `Firefox`**. See [Cookies](#cookies) for why you need to do this first. +Sign in to LeetCode in **Chrome** first — leetcode-cli reads its cookies automatically (see [Cookies](./docs/cookies.md) for other browsers, manual setup, and environment variables). ```sh -leetcode 0.4.0 -May the Code be with You 👻 - -USAGE: - leetcode [FLAGS] [SUBCOMMAND] - -FLAGS: - -d, --debug debug mode - -h, --help Prints help information - -V, --version Prints version information - -SUBCOMMANDS: - data Manage Cache [aliases: d] - edit Edit question by id [aliases: e] - exec Submit solution [aliases: x] - list List problems [aliases: l] - pick Pick a problem [aliases: p] - stat Show simple chart about submissions [aliases: s] - test Test question by id [aliases: t] - help Prints this message or the help of the given subcommand(s) +leetcode pick 1 # pick a problem and print its description +leetcode edit 1 # open the solution file in your editor +leetcode test 1 # run the sample test cases +leetcode exec 1 # submit the solution ``` -## Example - -To configure leetcode-cli, create a file at `~/.leetcode/leetcode.toml`): - -```toml -[code] -editor = 'emacs' -# Optional parameter -editor_args = ['-nw'] -# Optional environment variables (ex. [ "XDG_DATA_HOME=...", "XDG_CONFIG_HOME=...", "XDG_STATE_HOME=..." ]) -editor_envs = [] -lang = 'rust' -edit_code_marker = false -start_marker = "" -end_marker = "" -# if include problem description -comment_problem_desc = false -# comment syntax -comment_leading = "" -test = true +Run `leetcode --help` (or `leetcode --help`) for the full, always-current list of commands and flags. The headline ones: -[cookies] -csrf = '' -session = '' -# leetcode.com or leetcode.cn -site = "leetcode.com" - -[storage] -cache = 'Problems' -code = 'code' -root = '~/.leetcode' -scripts = 'scripts' -``` +| Command | Alias | What it does | +| --- | --- | --- | +| `pick` | `p` | Pick a problem by id, `--name`, `--tag`, `--query`, `--plan`, or `--daily` | +| `edit` | `e` | Open a problem's code file; `--lang` overrides the configured language, `--daily` opens today's challenge | +| `test` | `t` | Run test cases; `--watch` re-runs on save, `--daily` targets today's challenge | +| `exec` | `x` | Submit the solution | +| `list` | `l` | List/filter problems by category, tag, id range, or `--query` | +| `stat` | `s` | Show a chart of your submissions | +| `data` | `d` | Manage the local cache (`--update`, `--delete`) | +| `completions` | `c` | Generate shell completions (`bash`, `elvish`, `fish`, `powershell`, `zsh`) |
- Configuration Explanation - -```toml -[code] -editor = 'emacs' -# Optional parameter -editor_args = ['-nw'] -# Optional environment variables (ex. [ "XDG_DATA_HOME=...", "XDG_CONFIG_HOME=...", "XDG_STATE_HOME=..." ]) -editor_envs = [] -lang = 'rust' -edit_code_marker = true -start_marker = "start_marker" -end_marker = "end_marker" -# if include problem description -comment_problem_desc = true -# comment syntax -comment_leading = "//" -test = true - -[cookies] -csrf = '' -session = '' - -[storage] -cache = 'Problems' -code = 'code' -root = '~/.leetcode' -scripts = 'scripts' -``` - -If we change the configuration as shown previously, we will get the following code after `leetcode edit 15`. - -```rust -// Category: algorithms -// Level: Medium -// Percent: 32.90331% - -// Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. -// -// Notice that the solution set must not contain duplicate triplets. -// -//   -// Example 1: -// -// Input: nums = [-1,0,1,2,-1,-4] -// Output: [[-1,-1,2],[-1,0,1]] -// Explanation: -// nums[0] + nums[1] + nums[2] = (-1) + 0 + 1 = 0. -// nums[1] + nums[2] + nums[4] = 0 + 1 + (-1) = 0. -// nums[0] + nums[3] + nums[4] = (-1) + 2 + (-1) = 0. -// The distinct triplets are [-1,0,1] and [-1,-1,2]. -// Notice that the order of the output and the order of the triplets does not matter. -// -// -// Example 2: -// -// Input: nums = [0,1,1] -// Output: [] -// Explanation: The only possible triplet does not sum up to 0. -// -// -// Example 3: -// -// Input: nums = [0,0,0] -// Output: [[0,0,0]] -// Explanation: The only possible triplet sums up to 0. -// -// -//   -// Constraints: -// -// -// 3 <= nums.length <= 3000 -// -10⁵ <= nums[i] <= 10⁵ -// - -// start_marker -impl Solution { -pub fn three_sum(nums: Vec) -> Vec> { - - } - -} -// end_marker - -``` - -
- -
- -Some linting tools/lsps will throw errors unless the necessary libraries are imported. leetcode-cli can generate this boilerplate automatically if the `inject_before` key is set. Similarly, if you want to test out your code locally, you can automate that with `inject_after`. For c++ this might look something like: - -```toml -[code] -inject_before = ["#include", "using namespace std;"] -inject_after = ["int main() {\n Solution solution;\n\n}"] -``` - -#### 1. pick - -```sh -leetcode pick 1 -``` - -```sh -leetcode pick --name "Two Sum" -``` - -```sh -[1] Two Sum is on the run... - - -Given an array of integers, return indices of the two numbers such that they add up to a specific target. - -You may assume that each input would have exactly one solution, and you may not use the same element twice. - --------------------------------------------------- - -Example: - - -Given nums = [2, 7, 11, 15], target = 9, - -Because nums[0] + nums[1] = 2 + 7 = 9, -return [0, 1]. -``` - -#### 2. edit - -```sh -leetcode edit 1 -``` - -```rust -# struct Solution; -impl Solution { - pub fn two_sum(nums: Vec, target: i32) -> Vec { - use std::collections::HashMap; - let mut m: HashMap = HashMap::new(); - - for (i, e) in nums.iter().enumerate() { - if let Some(v) = m.get(&(target - e)) { - return vec![*v, i as i32]; - } - - m.insert(*e, i as i32).unwrap_or_default(); - } - - return vec![]; - } -} -``` - -#### 3. test +Shell completions -```sh -leetcode test 1 -``` +By default the shell is inferred from `$SHELL`: ```sh - - Accepted Runtime: 0 ms - - Your input: [2,7,11,15], 9 - Output: [0,1] - Expected: [0,1] - +eval "$(leetcode completions)" ``` -#### 4. exec +Copy that line into `.bash_profile` or `.zshrc`. Pass a shell explicitly to target another: ```sh -leetcode exec 1 -``` - -```sh - - Success - - Runtime: 0 ms, faster than 100% of Rustonline submissions for Two Sum. - - Memory Usage: 2.4 MB, less than 100% of Rustonline submissions for Two Sum. - - -``` - -## Cookies - -The cookie plugin of leetcode-cli can work on OSX and [Linux][#1]. **If you are on a different platform, there are problems with caching the cookies**, -you can manually input your LeetCode Cookies to the configuration file. - -```toml -[cookies] -csrf = "..." -session = "..." -``` - -For Example, using Firefox (after logging in to LeetCode): - -#### Step 1 - -Open Firefox, press F12, and click `Storage` tab. - -#### Step 2 - -Expand `Cookies` tab on the left and select https://leetcode.com. - -#### Step 2 - -Copy `Value` from `LEETCODE_SESSION` and `csrftoken` to `session` and `csrf` in your configuration file, respectively: - -```toml -[cookies] -csrf = '' -session = '' -``` - -#### Environment variables - -The cookies can also be overridden by environment variables, which might be useful to exclude the sensitive information from the configuration file `leetcode.toml`. To do this, you can leave the `csrf` and `session` fields empty in the configuration file and override cookies settings via the environment variables `LEETCODE_CSRF`, `LEETCODE_SESSION`, and `LEETCODE_SITE`: - -```toml -[cookies] -csrf = '' -session = '' -site = 'leetcode.com' -``` - -Then set the environment variables: - -```bash -export LEETCODE_CSRF='' -export LEETCODE_SESSION='' -export LEETCODE_SITE='leetcode.cn' # or 'leetcode.com' -``` - -Note that `cookies.site` in still required in the `leetcode.toml` to avoid exception during configuration file parsing, but can be overridden using environment variables. - -## Programmable - -If you want to filter LeetCode questions using custom Python scripts, add the following to your the configuration file: - -```toml -[storage] -scripts = "scripts" -``` - -Then write the script: - -```python -# ~/.leetcode/scripts/plan1.py -import json; - -def plan(sps, stags): - ## - # `print` in python is supported, - # if you want to know the data structures of these two args, - # just print them - ## - problems = json.loads(sps) - tags = json.loads(stags) - - ret = [] - tm = {} - for tag in tags: - tm[tag["tag"]] = tag["refs"]; - - for i in problems: - if i["level"] == 1 and str(i["id"]) in tm["linked-list"]: - ret.append(str(i["id"])) - - # return is `List[string]` - return ret +leetcode completions fish ``` -Then run `list` with the filter that you just wrote: + -```sh -leetcode list -p plan1 -``` +## Documentation -That's it! Enjoy! +- [Configuration](./docs/configuration.md) — the full `leetcode.toml` reference: editor, code generation, filename templates, and storage paths. +- [Cookies](./docs/cookies.md) — automatic Chrome cookies, manual setup from any browser, `leetcode.cn` support, and environment-variable overrides. +- [Editors & LSP](./docs/editors.md) — getting rust-analyzer (and other language servers) working with generated solution files. +- [Scripting](./docs/scripting.md) — filtering problems with custom Python plans. -## Contributions +## Contributing -Feel free to add your names and emails in the `authors` field of `Cargo.toml` ! +Feel free to add your name and email to the `authors` field of `Cargo.toml`, and open a [pull request][pr]. -## LICENSE +## License MIT [pr]: https://github.com/clearloop/leetcode-cli/pulls -[#1]: https://github.com/clearloop/leetcode-cli/issues/1 diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 034e848..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,21 +0,0 @@ -# Security Policy - -## Supported Versions - -Use this section to tell people about which versions of your project are -currently being supported with security updates. - -| Version | Supported | -| ------- | ------------------ | -| 5.1.x | :white_check_mark: | -| 5.0.x | :x: | -| 4.0.x | :white_check_mark: | -| < 4.0 | :x: | - -## Reporting a Vulnerability - -Use this section to tell people how to report a vulnerability. - -Tell them where to go, how often they can expect to get an update on a -reported vulnerability, what to expect if the vulnerability is accepted or -declined, etc. diff --git a/docs/configuration.md b/docs/configuration.md new file mode 100644 index 0000000..7bfcdd2 --- /dev/null +++ b/docs/configuration.md @@ -0,0 +1,128 @@ +# Configuration + +leetcode-cli reads `~/.leetcode/leetcode.toml`. The file is created with defaults the first time you run any command, so the easiest way to start is to run leetcode-cli once and then edit the file. + +It has three sections: `[code]`, `[cookies]`, and `[storage]`. Cookies have their own page — see [Cookies](./cookies.md). + +## `[code]` + +Controls the editor that opens and the code that gets generated. + +```toml +[code] +editor = 'vim' +# Extra arguments passed to the editor +editor_args = ['-nw'] +# Environment variables for the editor process, as "NAME=VALUE" strings +editor_envs = ['XDG_CONFIG_HOME=/home/me/.config'] +# Language of the generated solution file +lang = 'rust' +# Run the sample test cases automatically and write them to a .tests.dat file +test = true +``` + +| Key | Default | Description | +| --- | --- | --- | +| `editor` | `'vim'` | Command used to open the solution file. | +| `editor_args` | — | Extra arguments passed before the file path. | +| `editor_envs` | — | Environment variables for the editor process, each as `"NAME=VALUE"`. | +| `lang` | `'rust'` | Language of the generated file. `leetcode edit --lang ` overrides this per-call and persists it. | +| `test` | `true` | Generate a `.tests.dat` file with the problem's sample cases. | + +### Problem description & code markers + +These let you embed the problem statement as a comment and wrap the editable region in markers so tools (or `inject_*`) can find it. + +```toml +[code] +# Prepend the problem description as a comment +comment_problem_desc = true +# Comment syntax used for the description and the markers +comment_leading = '//' +# Wrap the generated boilerplate in start/end markers +edit_code_marker = true +start_marker = 'start_marker' +end_marker = 'end_marker' +``` + +With the above, `leetcode edit 15` produces: + +```rust +// Category: algorithms +// Level: Medium +// +// Given an integer array nums, return all the triplets ... + +// start_marker +impl Solution { + pub fn three_sum(nums: Vec) -> Vec> { + + } +} +// end_marker +``` + +| Key | Default | Description | +| --- | --- | --- | +| `comment_problem_desc` | `false` | Prepend the problem statement as a comment. | +| `comment_leading` | `''` | Comment prefix used for the description and markers (e.g. `//`, `#`). | +| `edit_code_marker` | `false` | Wrap the generated code in `start_marker`/`end_marker`. | +| `start_marker` / `end_marker` | `''` | Marker text, emitted as `comment_leading + ' ' + marker`. | + +### Injecting code before & after + +Some language servers and linters complain unless the necessary imports are present, and you may want a `main` to run the solution locally. `inject_before` and `inject_after` add lines around the generated boilerplate without affecting what gets submitted to LeetCode. + +```toml +[code] +inject_before = ['#include', 'using namespace std;'] +inject_after = ['int main() {\n Solution solution;\n}'] +``` + +For getting a language server working with generated files, see [Editors & LSP](./editors.md). + +### Filename template + +`pick` controls the file name of generated solution and test files. It is interpolated against the picked problem: + +| Variable | Meaning | +| --- | --- | +| `${fid}` | Frontend problem id (e.g. `1`) | +| `${slug}` | Problem slug (e.g. `two-sum`) | + +```toml +[code] +# Default +pick = '${fid}.${slug}' +``` + +With `lang = 'rust'`, `leetcode edit 1` writes `code/1.two-sum.rs` (and `code/1.two-sum.tests.dat` when `test = true`). Because the template can include `/`, it doubles as a way to lay out one directory per problem — see [Editors & LSP](./editors.md). + +## `[storage]` + +Where leetcode-cli keeps its files. Paths under `root` are created on demand. `~` in `root` expands to your home directory. + +```toml +[storage] +root = '~/.leetcode' +code = 'code' +scripts = 'scripts' +``` + +| Key | Default | Description | +| --- | --- | --- | +| `root` | `'~/.leetcode'` | Base directory for everything below. | +| `code` | `'code'` | Sub-directory (under `root`) for generated solution files. | +| `scripts` | `'scripts'` | Sub-directory for Python filtering scripts — see [Scripting](./scripting.md). | + +## `[cookies]` + +See [Cookies](./cookies.md) for the full story (automatic Chrome reading, manual setup, `leetcode.cn`, and environment overrides). + +```toml +[cookies] +csrf = '' +session = '' +# Either 'leetcode.com' or 'leetcode.cn' +site = 'leetcode.com' +``` diff --git a/docs/cookies.md b/docs/cookies.md new file mode 100644 index 0000000..019f1ae --- /dev/null +++ b/docs/cookies.md @@ -0,0 +1,46 @@ +# Cookies + +leetcode-cli talks to LeetCode as you, so it needs your session cookies. There are three ways to provide them. + +## 1. Automatic (Chrome) + +If `csrf` and `session` are both empty in `leetcode.toml`, leetcode-cli reads the cookies straight from **Chrome's** cookie store for the configured `site`. Just sign in to LeetCode in Chrome and run any command — there is nothing else to set up. + +This is the only automatic path, and it is Chrome-only (powered by [`rookie`](https://crates.io/crates/rookie)). If you use a different browser, or Chrome's cookie store can't be read, fall back to the manual setup below. + +> If you see a "not logged in to Chrome" error, either sign in to LeetCode in Chrome or set the cookies manually. + +## 2. Manual (any browser) + +Copy the two cookie values into `leetcode.toml`: + +```toml +[cookies] +csrf = '' +session = '' +site = 'leetcode.com' +``` + +To find them — for example in Firefox, after logging in to LeetCode: + +1. Press F12 and open the **Storage** tab. +2. Expand **Cookies** and select `https://leetcode.com`. +3. Copy the `Value` of `csrftoken` into `csrf` and `LEETCODE_SESSION` into `session`. + +The same values are available under DevTools in any Chromium browser (Application → Cookies). + +## 3. Environment variables + +To keep secrets out of `leetcode.toml`, leave `csrf` and `session` empty and export them instead. Environment variables override whatever is in the file: + +```sh +export LEETCODE_CSRF='' +export LEETCODE_SESSION='' +export LEETCODE_SITE='leetcode.com' # or 'leetcode.cn' +``` + +`cookies.site` must still be present in `leetcode.toml` (otherwise config parsing fails), but `LEETCODE_SITE` overrides it at runtime. + +## leetcode.com vs leetcode.cn + +`site` accepts exactly two values: `leetcode.com` or `leetcode.cn` (anything else is rejected). Choosing `leetcode.cn` switches every API endpoint to the China site — set it via the config field or `LEETCODE_SITE`. diff --git a/docs/editors.md b/docs/editors.md new file mode 100644 index 0000000..5306aeb --- /dev/null +++ b/docs/editors.md @@ -0,0 +1,62 @@ +# Editors & LSP + +leetcode-cli generates flat solution files (e.g. `code/1.two-sum.rs`). That keeps submissions simple, but a language server like rust-analyzer expects a project it recognizes. Getting full autocomplete, diagnostics, and go-to-definition is an **editor-side** setup, not something leetcode-cli does for you — and there are two clean ways to do it. + +This page uses Rust as the running example; the same ideas apply to other languages and their servers. + +## Option A — single-file mode (recommended) + +rust-analyzer supports [detached / single files](https://github.com/rust-lang/rust-analyzer/pull/8955) that don't belong to a Cargo workspace. This needs no extra files and no change to how leetcode-cli generates code — just tell your editor to treat the directory as detached. + +- **VS Code** — open the `code/` directory; rust-analyzer picks up detached files automatically. You can pin them with `rust-analyzer.linkedProjects` if needed. +- **Neovim / other LSP clients** — point the rust-analyzer root at the `code/` directory (e.g. set the workspace root to the folder rather than searching for a `Cargo.toml`). +- **Helix / Zed** — make sure rust-analyzer is launched with the `code/` directory as its root; both honor rust-analyzer's detached-file handling. + +If your standard library completions don't show up, confirm `rustc` and `rust-analyzer` are recent — detached-file support has improved over time. + +## Option B — a Cargo workspace + +If you'd rather have a real crate (so `cargo check`/`cargo test` work too), put a workspace around the generated files and `include!` them. leetcode-cli's existing config does all the wiring — no patches required. + +1. Create a workspace and point leetcode-cli's storage at it: + + ```sh + cargo new --lib leetcode-solutions + ``` + + ```toml + # ~/.leetcode/leetcode.toml + [storage] + root = '/path/to/leetcode-solutions' + code = 'solutions' + ``` + + Now `leetcode edit 1` writes into `leetcode-solutions/solutions/`, inside a crate rust-analyzer understands. + +2. Pull the solution files into the crate from `src/lib.rs`: + + ```rust + #![allow(dead_code, unused_imports, unused_variables, non_snake_case)] + + mod solutions { + include!("../solutions/1.two-sum.rs"); + include!("../solutions/2.add-two-numbers.rs"); + } + ``` + +You get full rust-analyzer features across every file, and `leetcode test`/`leetcode exec` still extract and submit the solution snippet unchanged. + +### Tip: one directory per problem + +The [`[code] pick`](./configuration.md#filename-template) template can contain a `/`, so you can give each problem its own folder if your editor prefers that layout: + +```toml +[code] +pick = '${fid}.${slug}/solution' +``` + +This writes `code/1.two-sum/solution.rs`, etc. + +## Why leetcode-cli doesn't generate per-problem crates + +Scaffolding a Cargo crate (or any per-language project structure) for every problem would bake an editor concern into the tool, with a config flag and a directory layout to maintain forever. The two approaches above solve the same problem entirely from the editor and existing config — so that's where it belongs. See the discussion in [#204](https://github.com/clearloop/leetcode-cli/issues/204). diff --git a/docs/scripting.md b/docs/scripting.md new file mode 100644 index 0000000..b15a13f --- /dev/null +++ b/docs/scripting.md @@ -0,0 +1,43 @@ +# Scripting + +You can filter LeetCode problems with custom Python scripts and pass the result to `list` or `pick` via `--plan`. + +> Python scripting is gated behind the optional `pym` Cargo feature. A default `cargo install leetcode-cli` does **not** include it — install with `cargo install leetcode-cli --features pym`, otherwise `--plan` is silently ignored. + +## Writing a plan + +Scripts live in the `scripts` directory under your storage root (`~/.leetcode/scripts` by default; configurable via `[storage] scripts`). + +```python +# ~/.leetcode/scripts/plan1.py +import json + +def plan(sps, stags): + # `print` works here — print the two args if you want to inspect their shape. + problems = json.loads(sps) + tags = json.loads(stags) + + tm = {} + for tag in tags: + tm[tag["tag"]] = tag["refs"] + + ret = [] + for i in problems: + if i["level"] == 1 and str(i["id"]) in tm["linked-list"]: + ret.append(str(i["id"])) + + # Return a List[str] of problem ids + return ret +``` + +The module must define `plan(sps, stags)`: +- `sps` — JSON string of all problems. +- `stags` — JSON string of all tags. +- returns a `List[str]` of problem ids to keep. + +## Running it + +```sh +leetcode list -p plan1 # filter the list down to the plan's ids +leetcode pick -p plan1 # pick from the filtered set +``` diff --git a/flake.nix b/flake.nix index 297d215..30edd3d 100644 --- a/flake.nix +++ b/flake.nix @@ -64,10 +64,6 @@ inherit buildInputs nativeBuildInputs; - buildNoDefaultFeatures = true; - - buildFeatures = "git"; - meta = with pkgs.lib; { description = "Leet your code in command-line."; homepage = "https://github.com/clearloop/leetcode-cli"; diff --git a/src/config/code.rs b/src/config/code.rs index 9a2cada..6e9be74 100644 --- a/src/config/code.rs +++ b/src/config/code.rs @@ -6,19 +6,10 @@ fn default_pick() -> String { PICK_DEFAULT.into() } -const SUBMISSION_DEFAULT: &str = "${fid}.${slug}.${sid}.${ac}"; -fn default_submission() -> String { - SUBMISSION_DEFAULT.into() -} - fn is_default_pick(t: &str) -> bool { t == PICK_DEFAULT } -fn is_default_submission(t: &String) -> bool { - t == SUBMISSION_DEFAULT -} - fn is_default_string(t: &str) -> bool { t.is_empty() } @@ -54,11 +45,6 @@ pub struct Code { pub lang: String, #[serde(default = "default_pick", skip_serializing_if = "is_default_pick")] pub pick: String, - #[serde( - default = "default_submission", - skip_serializing_if = "is_default_submission" - )] - pub submission: String, } impl Default for Code { @@ -77,7 +63,6 @@ impl Default for Code { test: true, lang: "rust".into(), pick: "${fid}.${slug}".into(), - submission: "${fid}.${slug}.${sid}.${ac}".into(), } } } diff --git a/src/config/storage.rs b/src/config/storage.rs index 0395b1f..e3ee69f 100644 --- a/src/config/storage.rs +++ b/src/config/storage.rs @@ -3,12 +3,12 @@ use crate::{Error, Result}; use serde::{Deserialize, Serialize}; use std::{fs, path::PathBuf}; +/// Name of the local sqlite cache file under `root`. +const CACHE: &str = "Problems"; + /// Locate code files -/// -/// + cache -> the path to cache #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Storage { - cache: String, code: String, root: String, scripts: Option, @@ -17,7 +17,6 @@ pub struct Storage { impl Default for Storage { fn default() -> Self { Self { - cache: "Problems".into(), code: "code".into(), scripts: Some("scripts".into()), root: "~/.leetcode".into(), @@ -44,7 +43,7 @@ impl Storage { fs::DirBuilder::new().recursive(true).create(&root)?; } - Ok(root.join("Problems").to_string_lossy().to_string()) + Ok(root.join(CACHE).to_string_lossy().to_string()) } /// get code path diff --git a/src/lib.rs b/src/lib.rs index 8df9434..4b91e83 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,233 +1,4 @@ -//! # leetcode-cli -//! [![doc](https://img.shields.io/badge/current-docs-green.svg)](https://docs.rs/leetcode-cli/) -//! [![Crates.io](https://img.shields.io/crates/v/leetcode-cli.svg)](https://crates.io/crates/leetcode-cli) -//! [![Crates.io](https://img.shields.io/crates/d/leetcode-cli.svg)](https://crates.io/crates/leetcode-cli) -//! [![LICENSE](https://img.shields.io/crates/l/leetcode-cli.svg)](https://choosealicense.com/licenses/mit/) -//! -//! ## Installing -//! -//! ```sh -//! cargo install leetcode-cli -//! ``` -//! -//! ## Usage -//! -//! **Please make sure you have logined in `leetcode.com` with `chrome`**, more info plz checkout [this](#cookies) -//! -//! ```sh -//! leetcode 0.3.10 -//! May the Code be with You 👻 -//! -//! USAGE: -//! leetcode [FLAGS] [SUBCOMMAND] -//! -//! FLAGS: -//! -d, --debug debug mode -//! -h, --help Prints help information -//! -V, --version Prints version information -//! -//! SUBCOMMANDS: -//! data Manage Cache [aliases: d] -//! edit Edit question by id [aliases: e] -//! exec Submit solution [aliases: x] -//! list List problems [aliases: l] -//! pick Pick a problem [aliases: p] -//! stat Show simple chart about submissions [aliases: s] -//! test Edit question by id [aliases: t] -//! help Prints this message or the help of the given subcommand(s) -//! ``` -//! -//! ## Example -//! -//! For example, if your config is: -//! -//! ```toml -//! [code] -//! lang = "rust" -//! editor = "emacs" -//! ``` -//! -//! #### 1. pick -//! -//! ```sh -//! leetcode pick 1 -//! ``` -//! -//! ```sh -//! [1] Two Sum is on the run... -//! -//! -//! Given an array of integers, return indices of the two numbers such that they add up to a specific target. -//! -//! You may assume that each input would have exactly one solution, and you may not use the same element twice. -//! -//! -------------------------------------------------- -//! -//! Example: -//! -//! -//! Given nums = [2, 7, 11, 15], target = 9, -//! -//! Because nums[0] + nums[1] = 2 + 7 = 9, -//! return [0, 1]. -//! ``` -//! -//! #### 2. edit -//! -//! ```sh -//! leetcode edit 1 -//! ``` -//! -//! ```rust -//! # struct Solution; -//! impl Solution { -//! pub fn two_sum(nums: Vec, target: i32) -> Vec { -//! use std::collections::HashMap; -//! let mut m: HashMap = HashMap::new(); -//! -//! for (i, e) in nums.iter().enumerate() { -//! if let Some(v) = m.get(&(target - e)) { -//! return vec![*v, i as i32]; -//! } -//! -//! m.insert(*e, i as i32).unwrap_or_default(); -//! } -//! -//! return vec![]; -//! } -//! } -//! ``` -//! -//! #### 3. test -//! -//! ```sh -//! leetcode test 1 -//! ``` -//! -//! ```sh -//! -//! Accepted Runtime: 0 ms -//! -//! Your input: [2,7,11,15], 9 -//! Output: [0,1] -//! Expected: [0,1] -//! -//! ``` -//! -//! #### 4. submit -//! -//! ```sh -//! leetcode submit 1 -//! ``` -//! -//! ```sh -//! -//! Success -//! -//! Runtime: 0 ms, faster than 100% of Rustonline submissions for Two Sum. -//! -//! Memory Usage: 2.4 MB, less than 100% of Rustonline submissions for Two Sum. -//! -//! -//! ``` -//! -//! ## Cookies -//! -//! The cookie plugin of leetcode-cil can work on OSX and [Linux][#1], **If you are on other platforms or your cookies just don't want to be catched**, you can handwrite your LeetCode Cookies to `~/.leetcode/leetcode.toml` -//! -//! ```toml -//! # Make sure `leetcode.toml` file is placed at `~/.leetcode/leetcode.toml` -//! [cookies] -//! csrf = "..." -//! session = "..." -//! ``` -//! -//! For Example, if you're using chrome to login to leetcode.com. -//! -//! -//! #### Step 1 -//! -//! Open chrome and paste the link below to the `chrome linkbar`. -//! -//! ```sh -//! chrome://settings/cookies/detail?site=leetcode.com -//! ``` -//! -//! #### Step 2 -//! -//! Copy the contents of `LEETCODE_SESSION` and `csrftoken`. -//! -//! #### Step 3 -//! -//! Paste them to `session` and `csrf`. -//! -//! ```toml -//! # Make sure `leetcode.toml` file is placed at `~/.leetcode/leetcode.toml` -//! [cookies] -//! csrf = "${csrftoken}" -//! session = "${LEETCODE_SESSION}" -//! ``` -//! -//! -//! ## Programmable -//! -//! If we want to filter leetcode questions using our own python scripts, what should we do? -//! -//! For example, our config is: -//! -//! ```toml -//! # Make sure `leetcode.toml` file is placed at `~/.leetcode/leetcode.toml` -//! [storage] -//! scripts = "scripts" -//! ``` -//! -//! We write our python scripts: -//! -//! ```python -//! # ~/.leetcode/scripts/plan1.py -//! import json; -//! -//! def plan(sps, stags): -//! ## -//! # `print` in python is supported, -//! # if you want to know the data structures of these two args, -//! # just print them -//! ## -//! problems = json.loads(sps) -//! tags = json.loads(stags) -//! -//! ret = [] -//! tm = {} -//! for tag in tags: -//! tm[tag["tag"]] = tag["refs"]; -//! -//! for i in problems: -//! if i["level"] == 1 and str(i["id"]) in tm["linked-list"]: -//! ret.append(str(i["id"])) -//! -//! # return is `List[string]` -//! return ret -//! ``` -//! -//! Then we can run filter as what we write now: -//! -//! ```sh -//! leetcode list -p plan1 -//! ``` -//! -//! Well done, enjoy it! -//! -//! -//! ## PR -//! -//! PR is welcome, [here][pr] it is. -//! -//! ## LICENSE -//! MIT -//! -//! -//! [pr]: https://github.com/clearloop/leetcode-cli/pulls -//! [#1]: https://github.com/clearloop/leetcode-cli/issues/1 +#![doc = include_str!("../README.md")] #[macro_use] extern crate log; #[macro_use] From 6a5077a6b7ae8933924d9832b5055e6b0ef79c72 Mon Sep 17 00:00:00 2001 From: clearloop Date: Mon, 22 Jun 2026 04:06:00 +0800 Subject: [PATCH 14/17] fix: bundle sqlite so leetcode-cli builds without a system libsqlite3 (#227) * fix: bundle sqlite so the build does not need a system libsqlite3 * chore: bump version to 0.5.2 * docs: drop libsqlite3 system dependency now that sqlite is bundled * refactor: drop unused openssl and dbus system dependencies * trigger ci --- Cargo.lock | 56 ++---------------------------------------------------- Cargo.toml | 4 ++-- README.md | 2 +- flake.nix | 3 --- src/err.rs | 2 -- 5 files changed, 5 insertions(+), 62 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 417ef73..c1c8235 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1190,21 +1190,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.1" @@ -1910,7 +1895,7 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "leetcode-cli" -version = "0.5.1" +version = "0.5.2" dependencies = [ "anyhow", "async-trait", @@ -1920,10 +1905,10 @@ dependencies = [ "diesel", "dirs", "env_logger", + "libsqlite3-sys", "log", "nix 0.31.3", "notify", - "openssl", "pyo3", "rand 0.10.1", "regex", @@ -2255,49 +2240,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" -[[package]] -name = "openssl" -version = "0.10.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a45fa2aa886c42762255da344f0a0d313e254066c46aad76f300c3d3da62d967" -dependencies = [ - "bitflags 2.10.0", - "cfg-if", - "foreign-types", - "libc", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "openssl-probe" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f50d9b3dabb09ecd771ad0aa242ca6894994c130308ca3d7684634df8037391" -[[package]] -name = "openssl-sys" -version = "0.9.116" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28a22dc7140cda5f096e5e7724a6962ca81a7f8bfd2979f9b18c11af56318c4" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "option-ext" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index d1aba75..a65619c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ path = "src/bin/lc.rs" [package] name = "leetcode-cli" -version = "0.5.1" +version = "0.5.2" authors = ["clearloop "] edition = "2024" description = "Leetcode command-line interface in rust." @@ -23,7 +23,6 @@ colored = "3.1.1" dirs = "6.0.0" env_logger = "0.11.6" log = "0.4.31" -openssl = "0.10" pyo3 = { version = "0.29", optional = true } rand = "0.10.1" serde = { version = "1.0.228", features = ["derive"] } @@ -37,6 +36,7 @@ thiserror = "2.0.18" unicode-width = "0.2" notify = "8.2.0" rookie = "0.5.6" +libsqlite3-sys = { version = "0.28", features = ["bundled"] } [dependencies.diesel] version = "2.3.9" diff --git a/README.md b/README.md index 8d514f4..143575a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ May the code be with you. ## Install ```sh -# Required dependencies: gcc, libssl-dev, libdbus-1-dev, libsqlite3-dev +# Required dependencies: gcc, cmake (to build the bundled sqlite and aws-lc) cargo install leetcode-cli ``` diff --git a/flake.nix b/flake.nix index 30edd3d..98e6b94 100644 --- a/flake.nix +++ b/flake.nix @@ -50,9 +50,6 @@ ]; buildInputs = with pkgs; [ - openssl - dbus - sqlite ] ++ darwinBuildInputs; package = naersk'.buildPackage rec { diff --git a/src/err.rs b/src/err.rs index e39eca5..a89ecd6 100644 --- a/src/err.rs +++ b/src/err.rs @@ -66,8 +66,6 @@ pub enum Error { Io(#[from] std::io::Error), #[error(transparent)] Anyhow(#[from] anyhow::Error), - #[error(transparent)] - OpenSSL(#[from] openssl::error::ErrorStack), #[cfg(feature = "pym")] #[error(transparent)] Pyo3(#[from] pyo3::PyErr), From deb8483bac23c8b77983016a13de1163fe5c6d47 Mon Sep 17 00:00:00 2001 From: clearloop Date: Thu, 25 Jun 2026 17:32:49 +0800 Subject: [PATCH 15/17] refactor: replace the archived rookie crate with a native chrome cookie reader (#228) * refactor: replace the archived rookie crate with a native chrome cookie reader * chore: bumps version to 0.5.3 --- Cargo.lock | 1595 ++--------------------------------------- Cargo.toml | 7 +- README.md | 2 +- docs/cookies.md | 2 +- src/plugins/chrome.rs | 164 ++++- 5 files changed, 204 insertions(+), 1566 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c1c8235..6d975ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,16 +8,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" -[[package]] -name = "aead" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" -dependencies = [ - "crypto-common", - "generic-array", -] - [[package]] name = "aes" version = "0.8.4" @@ -29,32 +19,6 @@ dependencies = [ "cpufeatures 0.2.17", ] -[[package]] -name = "aes-gcm" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] - -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy 0.8.27", -] - [[package]] name = "aho-corasick" version = "1.1.3" @@ -64,15 +28,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - [[package]] name = "anstream" version = "0.6.15" @@ -153,40 +108,6 @@ version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" -[[package]] -name = "array-init" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "async-broadcast" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" -dependencies = [ - "event-listener 2.5.3", - "futures-core", -] - -[[package]] -name = "async-channel" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" -dependencies = [ - "concurrent-queue", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - [[package]] name = "async-compression" version = "0.4.12" @@ -200,142 +121,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "async-executor" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand 2.1.1", - "futures-lite 2.6.1", - "pin-project-lite", - "slab", -] - -[[package]] -name = "async-fs" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "blocking", - "futures-lite 1.13.0", -] - -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.28", - "slab", - "socket2 0.4.10", - "waker-fn", -] - -[[package]] -name = "async-io" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" -dependencies = [ - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-io", - "futures-lite 2.6.1", - "parking", - "polling 3.11.0", - "rustix 1.1.3", - "slab", - "windows-sys 0.61.2", -] - -[[package]] -name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener 2.5.3", -] - -[[package]] -name = "async-lock" -version = "3.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" -dependencies = [ - "event-listener 5.4.1", - "event-listener-strategy", - "pin-project-lite", -] - -[[package]] -name = "async-process" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" -dependencies = [ - "async-io 1.13.0", - "async-lock 2.8.0", - "async-signal", - "blocking", - "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", - "rustix 0.38.44", - "windows-sys 0.48.0", -] - -[[package]] -name = "async-recursion" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "async-signal" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" -dependencies = [ - "async-io 2.6.0", - "async-lock 3.4.2", - "atomic-waker", - "cfg-if", - "futures-core", - "futures-io", - "rustix 1.1.3", - "signal-hook-registry", - "slab", - "windows-sys 0.61.2", -] - -[[package]] -name = "async-task" -version = "4.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" - [[package]] name = "async-trait" version = "0.1.89" @@ -344,7 +129,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -387,29 +172,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "binrw" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003da50fae3878bd26cc710742decd3412b8cfb396bc9b306e5e710106d207fb" -dependencies = [ - "array-init", - "binrw_derive", - "bytemuck", -] - -[[package]] -name = "binrw_derive" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfdce8fda72e8cc5038fb9e739e665d1f3072f7e3e24c573277b8fdce595ef72" -dependencies = [ - "either", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "bitflags" version = "1.3.2" @@ -440,37 +202,12 @@ dependencies = [ "generic-array", ] -[[package]] -name = "blocking" -version = "1.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" -dependencies = [ - "async-channel", - "async-task", - "futures-io", - "futures-lite 2.6.1", - "piper", -] - [[package]] name = "bumpalo" version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" -[[package]] -name = "bytecount" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" - -[[package]] -name = "bytemuck" -version = "1.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" - [[package]] name = "byteorder" version = "1.5.0" @@ -533,19 +270,6 @@ dependencies = [ "rand_core 0.10.0", ] -[[package]] -name = "chrono" -version = "0.4.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" -dependencies = [ - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-link 0.2.1", -] - [[package]] name = "cipher" version = "0.4.4" @@ -593,10 +317,10 @@ version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -639,41 +363,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "const-random" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" -dependencies = [ - "const-random-macro", -] - -[[package]] -name = "const-random-macro" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" -dependencies = [ - "getrandom 0.2.15", - "once_cell", - "tiny-keccak", -] - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "core-foundation" version = "0.9.4" @@ -727,18 +416,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "crunchy" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" - [[package]] name = "crypto-common" version = "0.1.7" @@ -746,7 +423,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array", - "rand_core 0.6.4", "typenum", ] @@ -770,16 +446,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10a2a99df6e410a8ff4245aa2006499ea662245f967cc7c0a38c83ef8eb44dbf" dependencies = [ "quote", - "syn 2.0.117", -] - -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher", + "syn", ] [[package]] @@ -803,7 +470,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.117", + "syn", ] [[package]] @@ -814,7 +481,7 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -823,30 +490,6 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_more" -version = "0.99.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "syn 2.0.117", -] - [[package]] name = "derive_more" version = "2.0.1" @@ -864,7 +507,7 @@ checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -890,7 +533,7 @@ dependencies = [ "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -899,7 +542,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe2444076b48641147115697648dc743c2c00b61adade0f01ce67133c7babe8c" dependencies = [ - "syn 2.0.117", + "syn", ] [[package]] @@ -942,16 +585,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", -] - -[[package]] -name = "dlv-list" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" -dependencies = [ - "const-random", + "syn", ] [[package]] @@ -968,10 +602,10 @@ checksum = "dd122633e4bef06db27737f21d3738fb89c8f6d5360d6d9d7635dda142a7757e" dependencies = [ "darling", "either", - "heck 0.5.0", + "heck", "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -1016,38 +650,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "enumflags2" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" -dependencies = [ - "enumflags2_derive", - "serde", -] - -[[package]] -name = "enumflags2_derive" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "enumn" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "env_filter" version = "0.1.2" @@ -1077,85 +679,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" -[[package]] -name = "errno" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" -dependencies = [ - "libc", - "windows-sys 0.61.2", -] - -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - -[[package]] -name = "event-listener" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener" -version = "5.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" -dependencies = [ - "event-listener 5.4.1", - "pin-project-lite", -] - -[[package]] -name = "eyre" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" -dependencies = [ - "indenter", - "once_cell", -] - -[[package]] -name = "fallible-iterator" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" - -[[package]] -name = "fallible-streaming-iterator" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" - -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fastrand" version = "2.1.1" @@ -1229,40 +752,6 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" -[[package]] -name = "futures-io" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" - -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - -[[package]] -name = "futures-lite" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" -dependencies = [ - "fastrand 2.1.1", - "futures-core", - "futures-io", - "parking", - "pin-project-lite", -] - [[package]] name = "futures-sink" version = "0.3.32" @@ -1282,10 +771,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-core", - "futures-io", - "futures-sink", "futures-task", - "memchr", "pin-project-lite", "slab", ] @@ -1350,22 +836,6 @@ dependencies = [ "wasip3", ] -[[package]] -name = "ghash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" -dependencies = [ - "opaque-debug", - "polyval", -] - -[[package]] -name = "glob" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - [[package]] name = "h2" version = "0.4.6" @@ -1385,15 +855,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.15.5" @@ -1409,45 +870,12 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" -[[package]] -name = "hashlink" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" -dependencies = [ - "hashbrown 0.14.5", -] - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hermit-abi" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - [[package]] name = "hmac" version = "0.12.1" @@ -1457,15 +885,6 @@ dependencies = [ "digest", ] -[[package]] -name = "home" -version = "0.5.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" -dependencies = [ - "windows-sys 0.61.2", -] - [[package]] name = "html5ever" version = "0.39.0" @@ -1585,30 +1004,6 @@ dependencies = [ "windows-registry", ] -[[package]] -name = "iana-time-zone" -version = "0.1.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core 0.62.2", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - [[package]] name = "icu_collections" version = "2.2.0" @@ -1724,12 +1119,6 @@ dependencies = [ "icu_properties", ] -[[package]] -name = "indenter" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" - [[package]] name = "indexmap" version = "2.13.0" @@ -1742,12 +1131,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "indoc" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" - [[package]] name = "inotify" version = "0.11.0" @@ -1778,26 +1161,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.9", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipnet" version = "2.9.0" @@ -1895,10 +1258,12 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "leetcode-cli" -version = "0.5.2" +version = "0.5.3" dependencies = [ + "aes", "anyhow", "async-trait", + "cbc", "clap", "clap_complete", "colored", @@ -1907,16 +1272,17 @@ dependencies = [ "env_logger", "libsqlite3-sys", "log", - "nix 0.31.3", + "nix", "notify", + "pbkdf2", "pyo3", "rand 0.10.1", "regex", "reqwest", - "rookie", "scraper", "serde", "serde_json", + "sha1", "thiserror 2.0.18", "tokio", "toml", @@ -1929,27 +1295,6 @@ version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" -[[package]] -name = "libesedb" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c72b56d9764a22feaaed1de8f2fc2accc6745dfdf79caff845714fcb52a2f72" -dependencies = [ - "libesedb-sys", - "time", -] - -[[package]] -name = "libesedb-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "110afdc2f932325712a6353243313d3878fd44e811d898176a13a6204b1f0186" -dependencies = [ - "cc", - "patch-apply", - "walkdir", -] - [[package]] name = "libredox" version = "0.1.3" @@ -1969,25 +1314,7 @@ dependencies = [ "cc", "pkg-config", "vcpkg", -] - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" +] [[package]] name = "litemap" @@ -2017,15 +1344,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" -[[package]] -name = "lz4_flex" -version = "0.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373f5eceeeab7925e0c1098212f2fbc4d416adec9d35051a6ab251e824c1854a" -dependencies = [ - "twox-hash", -] - [[package]] name = "markup5ever" version = "0.39.0" @@ -2043,36 +1361,12 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - [[package]] name = "mime" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.8.0" @@ -2100,18 +1394,6 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" -[[package]] -name = "nix" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.7.1", -] - [[package]] name = "nix" version = "0.31.3" @@ -2124,36 +1406,6 @@ dependencies = [ "libc", ] -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "nom_locate" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e3c83c053b0713da60c5b8de47fe8e494fe3ece5267b2f23090a07a053ba8f3" -dependencies = [ - "bytecount", - "memchr", - "nom", -] - -[[package]] -name = "normpath" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf23ab2b905654b4cb177e30b629937b3868311d4e1cba859f899c041046e69b" -dependencies = [ - "windows-sys 0.61.2", -] - [[package]] name = "notify" version = "8.2.0" @@ -2178,50 +1430,12 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" -[[package]] -name = "nt-string" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f64f73b19d9405e886b53b9dee286e7fbb622a5276a7fd143c2d8e4dac3a0c6c" -dependencies = [ - "displaydoc", - "widestring", -] - -[[package]] -name = "ntfs" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fe2140f3b6eef2648fa331ca7af7652da1bf3bb84f715878bf50f2f8f03c38" -dependencies = [ - "arrayvec", - "binrw", - "bitflags 2.10.0", - "byteorder", - "derive_more 0.99.20", - "displaydoc", - "enumn", - "memoffset 0.9.1", - "nt-string", - "strum_macros", - "time", -] - [[package]] name = "num-conv" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - [[package]] name = "once_cell" version = "1.21.3" @@ -2234,12 +1448,6 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - [[package]] name = "openssl-probe" version = "0.2.0" @@ -2252,32 +1460,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "ordered-multimap" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" -dependencies = [ - "dlv-list", - "hashbrown 0.14.5", -] - -[[package]] -name = "ordered-stream" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" -dependencies = [ - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "parking" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" - [[package]] name = "parking_lot" version = "0.12.3" @@ -2301,17 +1483,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "patch-apply" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe95476ec50a4e9b95ed12a4677ff5996aba4329bf2535fb21c49afaad20809" -dependencies = [ - "chrono", - "nom", - "nom_locate", -] - [[package]] name = "pbkdf2" version = "0.12.2" @@ -2355,7 +1526,7 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" dependencies = [ - "fastrand 2.1.1", + "fastrand", "phf_shared", ] @@ -2369,7 +1540,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -2387,65 +1558,12 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" -[[package]] -name = "piper" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" -dependencies = [ - "atomic-waker", - "fastrand 2.1.1", - "futures-io", -] - [[package]] name = "pkg-config" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", -] - -[[package]] -name = "polling" -version = "3.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" -dependencies = [ - "cfg-if", - "concurrent-queue", - "hermit-abi 0.5.2", - "pin-project-lite", - "rustix 1.1.3", - "windows-sys 0.61.2", -] - -[[package]] -name = "polyval" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" -dependencies = [ - "cfg-if", - "cpufeatures 0.2.17", - "opaque-debug", - "universal-hash", -] - [[package]] name = "portable-atomic" version = "1.7.0" @@ -2489,29 +1607,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.117", -] - -[[package]] -name = "privilege" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765ec92721e112ffe07f5c06fb0654da0b708990888981d05cf12a7c9909df30" -dependencies = [ - "libc", - "security-framework-sys", - "which", - "windows-sys 0.48.0", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit", + "syn", ] [[package]] @@ -2565,7 +1661,7 @@ dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -2574,10 +1670,10 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -2651,24 +1747,13 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" -[[package]] -name = "rand" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - [[package]] name = "rand" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" dependencies = [ - "rand_chacha 0.9.0", + "rand_chacha", "rand_core 0.9.0", ] @@ -2683,16 +1768,6 @@ dependencies = [ "rand_core 0.10.0", ] -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - [[package]] name = "rand_chacha" version = "0.9.0" @@ -2703,15 +1778,6 @@ dependencies = [ "rand_core 0.9.0", ] -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.15", -] - [[package]] name = "rand_core" version = "0.9.0" @@ -2728,18 +1794,6 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c8d0fd677905edcbeedbf2edb6494d676f0e98d54d5cf9bda0b061cb8fb8aba" -[[package]] -name = "rawcopy-rs-next" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ae516a90d6633521dd746eedb19018317daf519ef0c463c3fac4acb80bdec60" -dependencies = [ - "anyhow", - "log", - "normpath", - "ntfs", -] - [[package]] name = "redox_syscall" version = "0.5.3" @@ -2843,119 +1897,12 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rookie" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec13c4a0a48ef3a59770e8680eab740027ade9502c693320be12af29c025897e" -dependencies = [ - "aes", - "aes-gcm", - "base64", - "byteorder", - "cbc", - "eyre", - "glob", - "indoc", - "libesedb", - "log", - "lz4_flex", - "once_cell", - "pbkdf2", - "privilege", - "rand 0.8.6", - "rawcopy-rs-next", - "regex", - "rusqlite", - "rust-ini", - "serde", - "serde_json", - "sha1", - "url", - "windows", - "zbus", - "zvariant", -] - -[[package]] -name = "rusqlite" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" -dependencies = [ - "bitflags 2.10.0", - "fallible-iterator", - "fallible-streaming-iterator", - "hashlink", - "libsqlite3-sys", - "smallvec", -] - -[[package]] -name = "rust-ini" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "796e8d2b6696392a43bea58116b667fb4c29727dc5abd27d6acf338bb4f688c7" -dependencies = [ - "cfg-if", - "ordered-multimap", -] - [[package]] name = "rustc-hash" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "0.37.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "519165d378b97752ca44bbe15047d5d3409e875f39327546b42ac81d7e18c1b6" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags 2.10.0", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" -dependencies = [ - "bitflags 2.10.0", - "errno", - "libc", - "linux-raw-sys 0.11.0", - "windows-sys 0.61.2", -] - [[package]] name = "rustls" version = "0.23.35" @@ -3107,7 +2054,7 @@ checksum = "8adfa1c298912827b8a28b223b3b874357397ae706e6190acd9bf28cee99114d" dependencies = [ "bitflags 2.10.0", "cssparser", - "derive_more 2.0.1", + "derive_more", "log", "new_debug_unreachable", "phf", @@ -3151,7 +2098,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -3160,7 +2107,6 @@ version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" dependencies = [ - "indexmap", "itoa", "memchr", "serde", @@ -3168,17 +2114,6 @@ dependencies = [ "zmij", ] -[[package]] -name = "serde_repr" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "serde_spanned" version = "1.1.1" @@ -3242,17 +2177,7 @@ dependencies = [ name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" @@ -3295,12 +2220,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "string_cache" version = "0.9.0" @@ -3331,36 +2250,12 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" -[[package]] -name = "strum_macros" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", -] - [[package]] name = "subtle" version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.117" @@ -3389,7 +2284,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -3419,19 +2314,6 @@ version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" -[[package]] -name = "tempfile" -version = "3.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1" -dependencies = [ - "fastrand 2.1.1", - "getrandom 0.4.2", - "once_cell", - "rustix 1.1.3", - "windows-sys 0.61.2", -] - [[package]] name = "tendril" version = "0.5.0" @@ -3468,7 +2350,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -3479,7 +2361,7 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -3512,15 +2394,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - [[package]] name = "tinystr" version = "0.8.3" @@ -3571,7 +2444,7 @@ checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -3607,18 +2480,12 @@ dependencies = [ "indexmap", "serde_core", "serde_spanned", - "toml_datetime 1.1.1+spec-1.1.0", + "toml_datetime", "toml_parser", "toml_writer", - "winnow 1.0.1", + "winnow", ] -[[package]] -name = "toml_datetime" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" - [[package]] name = "toml_datetime" version = "1.1.1+spec-1.1.0" @@ -3628,24 +2495,13 @@ dependencies = [ "serde_core", ] -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime 0.6.11", - "winnow 0.5.40", -] - [[package]] name = "toml_parser" version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ - "winnow 1.0.1", + "winnow", ] [[package]] @@ -3711,21 +2567,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "pin-project-lite", - "tracing-attributes", "tracing-core", ] -[[package]] -name = "tracing-attributes" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "tracing-core" version = "0.1.32" @@ -3741,29 +2585,12 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "twox-hash" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea3136b675547379c4bd395ca6b938e5ad3c3d20fad76e7fe85f9e0d011419c" - [[package]] name = "typenum" version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" -[[package]] -name = "uds_windows" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" -dependencies = [ - "memoffset 0.9.1", - "tempfile", - "windows-sys 0.61.2", -] - [[package]] name = "unicode-ident" version = "1.0.12" @@ -3782,16 +2609,6 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "universal-hash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" -dependencies = [ - "crypto-common", - "subtle", -] - [[package]] name = "untrusted" version = "0.9.0" @@ -3839,12 +2656,6 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" -[[package]] -name = "waker-fn" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" - [[package]] name = "walkdir" version = "2.5.0" @@ -3942,7 +2753,7 @@ dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.117", + "syn", "wasm-bindgen-shared", ] @@ -4030,40 +2841,6 @@ dependencies = [ "rustls-pki-types", ] -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix 0.38.44", -] - -[[package]] -name = "widestring" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" version = "0.1.11" @@ -4073,66 +2850,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows" -version = "0.51.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" -dependencies = [ - "windows-core 0.51.1", - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-core" -version = "0.51.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-core" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link 0.2.1", - "windows-result 0.4.1", - "windows-strings 0.5.1", -] - -[[package]] -name = "windows-implement" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "windows-interface" -version = "0.59.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "windows-link" version = "0.1.1" @@ -4151,8 +2868,8 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ - "windows-result 0.3.2", - "windows-strings 0.3.1", + "windows-result", + "windows-strings", "windows-targets 0.53.5", ] @@ -4165,15 +2882,6 @@ dependencies = [ "windows-link 0.1.1", ] -[[package]] -name = "windows-result" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" -dependencies = [ - "windows-link 0.2.1", -] - [[package]] name = "windows-strings" version = "0.3.1" @@ -4183,15 +2891,6 @@ dependencies = [ "windows-link 0.1.1", ] -[[package]] -name = "windows-strings" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" -dependencies = [ - "windows-link 0.2.1", -] - [[package]] name = "windows-sys" version = "0.45.0" @@ -4201,15 +2900,6 @@ dependencies = [ "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.5", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -4219,15 +2909,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.60.2" @@ -4261,21 +2942,6 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -4315,12 +2981,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -4339,12 +2999,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -4363,12 +3017,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -4399,12 +3047,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -4423,12 +3065,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -4447,12 +3083,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -4471,12 +3101,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -4489,15 +3113,6 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" version = "1.0.1" @@ -4520,7 +3135,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" dependencies = [ "anyhow", - "heck 0.5.0", + "heck", "wit-parser", ] @@ -4540,10 +3155,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" dependencies = [ "anyhow", - "heck 0.5.0", + "heck", "indexmap", "prettyplease", - "syn 2.0.117", + "syn", "wasm-metadata", "wit-bindgen-core", "wit-component", @@ -4559,7 +3174,7 @@ dependencies = [ "prettyplease", "proc-macro2", "quote", - "syn 2.0.117", + "syn", "wit-bindgen-core", "wit-bindgen-rust", ] @@ -4607,16 +3222,6 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" -[[package]] -name = "xdg-home" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - [[package]] name = "yoke" version = "0.8.3" @@ -4636,76 +3241,10 @@ checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", "synstructure", ] -[[package]] -name = "zbus" -version = "3.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" -dependencies = [ - "async-broadcast", - "async-executor", - "async-fs", - "async-io 1.13.0", - "async-lock 2.8.0", - "async-process", - "async-recursion", - "async-task", - "async-trait", - "blocking", - "byteorder", - "derivative", - "enumflags2", - "event-listener 2.5.3", - "futures-core", - "futures-sink", - "futures-util", - "hex", - "nix 0.26.4", - "once_cell", - "ordered-stream", - "rand 0.8.6", - "serde", - "serde_repr", - "sha1", - "static_assertions", - "tracing", - "uds_windows", - "winapi", - "xdg-home", - "zbus_macros", - "zbus_names", - "zvariant", -] - -[[package]] -name = "zbus_macros" -version = "3.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7131497b0f887e8061b430c530240063d33bf9455fa34438f388a245da69e0a5" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "regex", - "syn 1.0.109", - "zvariant_utils", -] - -[[package]] -name = "zbus_names" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d" -dependencies = [ - "serde", - "static_assertions", - "zvariant", -] - [[package]] name = "zerocopy" version = "0.7.35" @@ -4733,7 +3272,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -4744,7 +3283,7 @@ checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -4764,7 +3303,7 @@ checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", "synstructure", ] @@ -4804,7 +3343,7 @@ checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -4812,41 +3351,3 @@ name = "zmij" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aac060176f7020d62c3bcc1cdbcec619d54f48b07ad1963a3f80ce7a0c17755f" - -[[package]] -name = "zvariant" -version = "3.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eef2be88ba09b358d3b58aca6e41cd853631d44787f319a1383ca83424fb2db" -dependencies = [ - "byteorder", - "enumflags2", - "libc", - "serde", - "static_assertions", - "zvariant_derive", -] - -[[package]] -name = "zvariant_derive" -version = "3.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c24dc0bed72f5f90d1f8bb5b07228cbf63b3c6e9f82d82559d4bae666e7ed9" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", - "zvariant_utils", -] - -[[package]] -name = "zvariant_utils" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] diff --git a/Cargo.toml b/Cargo.toml index a65619c..1c63369 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ path = "src/bin/lc.rs" [package] name = "leetcode-cli" -version = "0.5.2" +version = "0.5.3" authors = ["clearloop "] edition = "2024" description = "Leetcode command-line interface in rust." @@ -35,7 +35,10 @@ clap_complete = "4.6" thiserror = "2.0.18" unicode-width = "0.2" notify = "8.2.0" -rookie = "0.5.6" +aes = "0.8" +cbc = { version = "0.1", features = ["alloc", "block-padding"] } +pbkdf2 = "0.12" +sha1 = "0.10" libsqlite3-sys = { version = "0.28", features = ["bundled"] } [dependencies.diesel] diff --git a/README.md b/README.md index 143575a..286d2b1 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Nix users can `nix build` / `nix develop` against the bundled [`flake.nix`](./fl ## Quickstart -Sign in to LeetCode in **Chrome** first — leetcode-cli reads its cookies automatically (see [Cookies](./docs/cookies.md) for other browsers, manual setup, and environment variables). +Sign in to LeetCode in **Chrome** first — on macOS and Linux leetcode-cli reads its cookies automatically (on Windows, set them manually). See [Cookies](./docs/cookies.md) for manual setup and environment-variable overrides. ```sh leetcode pick 1 # pick a problem and print its description diff --git a/docs/cookies.md b/docs/cookies.md index 019f1ae..260f4b1 100644 --- a/docs/cookies.md +++ b/docs/cookies.md @@ -6,7 +6,7 @@ leetcode-cli talks to LeetCode as you, so it needs your session cookies. There a If `csrf` and `session` are both empty in `leetcode.toml`, leetcode-cli reads the cookies straight from **Chrome's** cookie store for the configured `site`. Just sign in to LeetCode in Chrome and run any command — there is nothing else to set up. -This is the only automatic path, and it is Chrome-only (powered by [`rookie`](https://crates.io/crates/rookie)). If you use a different browser, or Chrome's cookie store can't be read, fall back to the manual setup below. +This is the only automatic path, and it is Chrome-only. It works on **macOS and Linux**; on **Windows** Chrome's cookie encryption isn't read automatically yet, so use the manual setup below. The same applies if you use a different browser, or Chrome's cookie store can't be read. > If you see a "not logged in to Chrome" error, either sign in to LeetCode in Chrome or set the cookies manually. diff --git a/src/plugins/chrome.rs b/src/plugins/chrome.rs index 5b2ac52..27d6d74 100644 --- a/src/plugins/chrome.rs +++ b/src/plugins/chrome.rs @@ -1,7 +1,17 @@ +//! Read and decrypt LeetCode cookies straight from Chrome's cookie store. +//! +//! Replaces the archived `rookie` crate. leetcode-cli only needs two cookies +//! (`LEETCODE_SESSION`, `csrftoken`) from one browser, so this reuses the SQLite +//! stack already pulled in by `diesel` to read the cookie DB and implements just +//! Chrome's value decryption — no second SQLite client and no dbus linkage. use crate::{Error, Result}; -use std::{collections::HashMap, fmt::Display}; +use cbc::cipher::{BlockDecryptMut, KeyIvInit, block_padding::Pkcs7}; +use diesel::{prelude::*, sql_query, sql_types, sqlite::SqliteConnection}; +use std::{collections::HashMap, fmt::Display, path::PathBuf}; -/// Spawn cookies to cookie format +type Aes128CbcDec = cbc::Decryptor; + +/// Resolved LeetCode identity. #[derive(Debug)] pub struct Ident { pub csrf: String, @@ -18,7 +28,7 @@ impl Display for Ident { } } -/// Get cookies from chrome storage +/// Get cookies, preferring the configured ones and falling back to Chrome. pub fn cookies() -> Result { let ccfg = crate::config::Config::locate()?.cookies; if !ccfg.csrf.is_empty() && !ccfg.session.is_empty() { @@ -28,21 +38,145 @@ pub fn cookies() -> Result { }); } - let mut m: HashMap = HashMap::new(); - - let domains = vec![format!("{}", ccfg.site)]; - let cookies = rookie::chrome(Some(domains)).unwrap(); - for c in cookies { - if (c.name == "csrftoken") || (c.name == "LEETCODE_SESSION") { - m.insert(c.name, c.value); - } - } - + let jar = chrome_cookies(&ccfg.site.to_string())?; Ok(Ident { - csrf: m.get("csrftoken").ok_or(Error::ChromeNotLogin)?.to_string(), - session: m + csrf: jar + .get("csrftoken") + .ok_or(Error::ChromeNotLogin)? + .to_string(), + session: jar .get("LEETCODE_SESSION") .ok_or(Error::ChromeNotLogin)? .to_string(), }) } + +#[derive(QueryableByName)] +struct CookieRow { + #[diesel(sql_type = sql_types::Text)] + name: String, + #[diesel(sql_type = sql_types::Binary)] + encrypted_value: Vec, +} + +/// Read Chrome's cookie DB for `domain` and decrypt the matching values. +fn chrome_cookies(domain: &str) -> Result> { + let db = cookie_db_path().ok_or(Error::ChromeNotLogin)?; + + // Chrome keeps the DB locked while running; read from a snapshot copy. + let tmp = std::env::temp_dir().join(format!("leetcode-cli-{}.sqlite", std::process::id())); + std::fs::copy(&db, &tmp)?; + let mut conn = SqliteConnection::establish(&tmp.to_string_lossy()) + .map_err(|e| anyhow::anyhow!("open chrome cookies: {e}"))?; + let rows: Vec = + sql_query("SELECT name, encrypted_value FROM cookies WHERE host_key LIKE ?") + .bind::(format!("%{domain}%")) + .load(&mut conn) + .map_err(|e| anyhow::anyhow!("read chrome cookies: {e}"))?; + drop(conn); + let _ = std::fs::remove_file(&tmp); + + let key = encryption_key()?; + let mut jar = HashMap::new(); + for row in rows { + if (row.name == "csrftoken" || row.name == "LEETCODE_SESSION") + && let Ok(value) = decrypt(&row.encrypted_value, &key) + { + jar.insert(row.name, value); + } + } + Ok(jar) +} + +/// Decrypt a Chrome `encrypted_value` (AES-128-CBC, `v10`/`v11`). +fn decrypt(blob: &[u8], key: &[u8]) -> Result { + if blob.len() <= 3 || (&blob[..3] != b"v10" && &blob[..3] != b"v11") { + return Err(anyhow::anyhow!("unsupported cookie encryption").into()); + } + let iv = [0x20u8; 16]; // Chrome uses 16 spaces as the IV. + let plain = Aes128CbcDec::new_from_slices(key, &iv) + .map_err(|e| anyhow::anyhow!("cipher init: {e}"))? + .decrypt_padded_vec_mut::(&blob[3..]) + .map_err(|e| anyhow::anyhow!("decrypt cookie: {e}"))?; + Ok(finalize(plain)) +} + +/// Chrome (v104+) prepends a 32-byte SHA-256 of the domain to the plaintext; +/// strip it when the leading bytes aren't printable. +fn finalize(plain: Vec) -> String { + if let Ok(s) = std::str::from_utf8(&plain) + && !s.chars().any(|c| c.is_control()) + { + return s.to_string(); + } + if plain.len() > 32 { + return String::from_utf8_lossy(&plain[32..]).into_owned(); + } + String::from_utf8_lossy(&plain).into_owned() +} + +/// PBKDF2-HMAC-SHA1 over the OS storage password (Chrome's KDF). +#[cfg(any(target_os = "macos", target_os = "linux"))] +fn derive(password: &[u8], iterations: u32) -> Vec { + pbkdf2::pbkdf2_hmac_array::(password, b"saltysalt", iterations).to_vec() +} + +#[cfg(target_os = "macos")] +fn cookie_db_path() -> Option { + Some(dirs::home_dir()?.join("Library/Application Support/Google/Chrome/Default/Cookies")) +} + +#[cfg(target_os = "macos")] +fn encryption_key() -> Result> { + let out = std::process::Command::new("security") + .args([ + "find-generic-password", + "-w", + "-a", + "Chrome", + "-s", + "Chrome Safe Storage", + ]) + .output()?; + let pw = String::from_utf8_lossy(&out.stdout); + let pw = pw.trim(); + if pw.is_empty() { + return Err(Error::ChromeNotLogin); + } + Ok(derive(pw.as_bytes(), 1003)) +} + +#[cfg(target_os = "linux")] +fn cookie_db_path() -> Option { + let cfg = dirs::config_dir()?; + ["google-chrome", "chromium"] + .iter() + .map(|b| cfg.join(b).join("Default/Cookies")) + .find(|p| p.exists()) +} + +#[cfg(target_os = "linux")] +fn encryption_key() -> Result> { + // Prefer the Secret Service password; fall back to Chrome's default. + let pw = std::process::Command::new("secret-tool") + .args(["lookup", "application", "chrome"]) + .output() + .ok() + .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string()) + .filter(|s| !s.is_empty()) + .unwrap_or_else(|| "peanuts".to_string()); + Ok(derive(pw.as_bytes(), 1)) +} + +#[cfg(target_os = "windows")] +fn cookie_db_path() -> Option { + Some(dirs::data_local_dir()?.join("Google/Chrome/User Data/Default/Network/Cookies")) +} + +#[cfg(target_os = "windows")] +fn encryption_key() -> Result> { + // Windows uses DPAPI + AES-256-GCM (and app-bound encryption on Chrome + // 127+), a separate code path that isn't implemented yet. Until then, + // Windows users should set `csrf`/`session` in the config manually. + Err(Error::ChromeNotLogin) +} From 977115bc981706ad748800b20ed32ed4929f51b8 Mon Sep 17 00:00:00 2001 From: Martin Dimitrov <36076588+martindmtrv@users.noreply.github.com> Date: Sun, 28 Jun 2026 20:02:18 -0700 Subject: [PATCH 16/17] stub methods in chrome plugin and use native tls (#230) * stub methods in chrome plugin and use native tls * fix lint --- Cargo.toml | 3 ++- src/plugins/chrome.rs | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1c63369..a415f76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,8 @@ features = ["sqlite"] [dependencies.reqwest] version = "0.13.4" -features = ["gzip", "json"] +default-features = false +features = ["gzip", "json", "native-tls"] [features] pym = ["pyo3"] diff --git a/src/plugins/chrome.rs b/src/plugins/chrome.rs index 27d6d74..d948a13 100644 --- a/src/plugins/chrome.rs +++ b/src/plugins/chrome.rs @@ -180,3 +180,15 @@ fn encryption_key() -> Result> { // Windows users should set `csrf`/`session` in the config manually. Err(Error::ChromeNotLogin) } + +// for headless installations stub functions are defined +// can add to stubs with cfg(any(...)) +#[cfg(target_os = "android")] +fn cookie_db_path() -> Option { + None +} + +#[cfg(target_os = "android")] +fn encryption_key() -> Result> { + Err(Error::ChromeNotLogin) +} From 99b0dacdf9a03bc03e10ada80dbe80c0490024a5 Mon Sep 17 00:00:00 2001 From: clearloop Date: Mon, 29 Jun 2026 13:09:44 +0800 Subject: [PATCH 17/17] fix: link the system sqlite instead of bundling it (#231) * docs: note native-tls build dependencies in the install steps * build: sync lockfile to native-tls and bump to 0.5.4 * fix: link the system sqlite instead of bundling it --- Cargo.lock | 731 ++++++++++------------------------------------------- Cargo.toml | 3 +- README.md | 3 +- 3 files changed, 140 insertions(+), 597 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6d975ff..10672ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -132,40 +132,12 @@ dependencies = [ "syn", ] -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - [[package]] name = "autocfg" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" -[[package]] -name = "aws-lc-rs" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ec2f1fc3ec205783a5da9a7e6c1509cc69dedf09a1949e412c1e18469326d00" -dependencies = [ - "aws-lc-sys", - "zeroize", -] - -[[package]] -name = "aws-lc-sys" -version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a2f9779ce85b93ab6170dd940ad0169b5766ff848247aff13bb788b832fe3f4" -dependencies = [ - "cc", - "cmake", - "dunce", - "fs_extra", -] - [[package]] name = "base64" version = "0.22.1" @@ -208,12 +180,6 @@ version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - [[package]] name = "bytes" version = "1.12.0" @@ -236,17 +202,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a0aeaff4ff1a90589618835a598e545176939b97874f7abc7851caa0618f203" dependencies = [ "find-msvc-tools", - "jobserver", - "libc", "shlex", ] -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - [[package]] name = "cfg-if" version = "1.0.0" @@ -267,7 +225,7 @@ checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" dependencies = [ "cfg-if", "cpufeatures 0.3.0", - "rand_core 0.10.0", + "rand_core", ] [[package]] @@ -329,15 +287,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" -[[package]] -name = "cmake" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" -dependencies = [ - "cc", -] - [[package]] name = "colorchoice" version = "1.0.2" @@ -353,26 +302,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "combine" -version = "4.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" -dependencies = [ - "bytes", - "memchr", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "core-foundation" version = "0.10.1" @@ -623,12 +552,6 @@ dependencies = [ "dtoa", ] -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - [[package]] name = "ego-tree" version = "0.11.0" @@ -641,15 +564,6 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" -[[package]] -name = "encoding_rs" -version = "0.8.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" -dependencies = [ - "cfg-if", -] - [[package]] name = "env_filter" version = "0.1.2" @@ -679,6 +593,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "fastrand" version = "2.1.1" @@ -713,6 +637,21 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -722,12 +661,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - [[package]] name = "fsevent-sys" version = "4.1.0" @@ -802,10 +735,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -815,10 +746,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.13.3+wasi-0.2.2", - "wasm-bindgen", "windows-targets 0.52.6", ] @@ -831,30 +760,11 @@ dependencies = [ "cfg-if", "libc", "r-efi", - "rand_core 0.10.0", + "rand_core", "wasip2", "wasip3", ] -[[package]] -name = "h2" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "hashbrown" version = "0.15.5" @@ -950,7 +860,6 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2", "http", "http-body", "httparse", @@ -962,19 +871,18 @@ dependencies = [ ] [[package]] -name = "hyper-rustls" -version = "0.27.2" +name = "hyper-tls" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ - "futures-util", - "http", + "bytes", + "http-body-util", "hyper", "hyper-util", - "rustls", - "rustls-pki-types", + "native-tls", "tokio", - "tokio-rustls", + "tokio-native-tls", "tower-service", ] @@ -997,11 +905,9 @@ dependencies = [ "percent-encoding", "pin-project-lite", "socket2 0.5.10", - "system-configuration", "tokio", "tower-service", "tracing", - "windows-registry", ] [[package]] @@ -1189,37 +1095,6 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" -[[package]] -name = "jni" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" -dependencies = [ - "cesu8", - "cfg-if", - "combine", - "jni-sys", - "log", - "thiserror 1.0.69", - "walkdir", - "windows-sys 0.45.0", -] - -[[package]] -name = "jni-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" - -[[package]] -name = "jobserver" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" -dependencies = [ - "libc", -] - [[package]] name = "js-sys" version = "0.3.83" @@ -1258,7 +1133,7 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "leetcode-cli" -version = "0.5.3" +version = "0.5.4" dependencies = [ "aes", "anyhow", @@ -1270,20 +1145,19 @@ dependencies = [ "diesel", "dirs", "env_logger", - "libsqlite3-sys", "log", "nix", "notify", "pbkdf2", "pyo3", - "rand 0.10.1", + "rand", "regex", "reqwest", "scraper", "serde", "serde_json", "sha1", - "thiserror 2.0.18", + "thiserror", "tokio", "toml", "unicode-width", @@ -1307,15 +1181,20 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.28.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" +checksum = "b1f111c8c41e7c61a49cd34e44c7619462967221a6443b0ec299e0ac30cfb9b1" dependencies = [ - "cc", "pkg-config", "vcpkg", ] +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + [[package]] name = "litemap" version = "0.8.2" @@ -1338,12 +1217,6 @@ version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "113b30b4cd05f7c06868fdb2854f66a7b9fece9a48425351cd532e810d74024f" -[[package]] -name = "lru-slab" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" - [[package]] name = "markup5ever" version = "0.39.0" @@ -1361,12 +1234,6 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - [[package]] name = "miniz_oxide" version = "0.8.0" @@ -1388,6 +1255,23 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "native-tls" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "new_debug_unreachable" version = "1.0.6" @@ -1448,11 +1332,48 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" +[[package]] +name = "openssl" +version = "0.10.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45" +dependencies = [ + "bitflags 2.10.0", + "cfg-if", + "foreign-types", + "libc", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "openssl-probe" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f50d9b3dabb09ecd771ad0aa242ca6894994c130308ca3d7684634df8037391" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" + +[[package]] +name = "openssl-sys" +version = "0.9.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] [[package]] name = "option-ext" @@ -1585,15 +1506,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy 0.7.35", -] - [[package]] name = "precomputed-hash" version = "0.1.1" @@ -1676,62 +1588,6 @@ dependencies = [ "syn", ] -[[package]] -name = "quinn" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" -dependencies = [ - "bytes", - "cfg_aliases", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls", - "socket2 0.6.4", - "thiserror 2.0.18", - "tokio", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-proto" -version = "0.11.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" -dependencies = [ - "aws-lc-rs", - "bytes", - "getrandom 0.3.1", - "lru-slab", - "rand 0.9.4", - "ring", - "rustc-hash", - "rustls", - "rustls-pki-types", - "slab", - "thiserror 2.0.18", - "tinyvec", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-udp" -version = "0.5.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" -dependencies = [ - "cfg_aliases", - "libc", - "once_cell", - "socket2 0.6.4", - "tracing", - "windows-sys 0.60.2", -] - [[package]] name = "quote" version = "1.0.45" @@ -1747,16 +1603,6 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" -[[package]] -name = "rand" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" -dependencies = [ - "rand_chacha", - "rand_core 0.9.0", -] - [[package]] name = "rand" version = "0.10.1" @@ -1765,27 +1611,7 @@ checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" dependencies = [ "chacha20", "getrandom 0.4.2", - "rand_core 0.10.0", -] - -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core 0.9.0", -] - -[[package]] -name = "rand_core" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff" -dependencies = [ - "getrandom 0.3.1", - "zerocopy 0.8.27", + "rand_core", ] [[package]] @@ -1811,7 +1637,7 @@ checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" dependencies = [ "getrandom 0.2.15", "libredox", - "thiserror 2.0.18", + "thiserror", ] [[package]] @@ -1851,29 +1677,24 @@ checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ "base64", "bytes", - "encoding_rs", "futures-core", - "h2", "http", "http-body", "http-body-util", "hyper", - "hyper-rustls", + "hyper-tls", "hyper-util", "js-sys", "log", - "mime", + "native-tls", "percent-encoding", "pin-project-lite", - "quinn", - "rustls", "rustls-pki-types", - "rustls-platform-verifier", "serde", "serde_json", "sync_wrapper", "tokio", - "tokio-rustls", + "tokio-native-tls", "tower", "tower-http", "tower-service", @@ -1883,20 +1704,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "ring" -version = "0.17.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" -dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.15", - "libc", - "untrusted", - "windows-sys 0.52.0", -] - [[package]] name = "rustc-hash" version = "2.1.1" @@ -1904,29 +1711,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] -name = "rustls" -version = "0.23.35" +name = "rustix" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "aws-lc-rs", - "once_cell", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-native-certs" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" -dependencies = [ - "openssl-probe", - "rustls-pki-types", - "schannel", - "security-framework", + "bitflags 2.10.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", ] [[package]] @@ -1935,49 +1729,9 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" dependencies = [ - "web-time", "zeroize", ] -[[package]] -name = "rustls-platform-verifier" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" -dependencies = [ - "core-foundation 0.10.1", - "core-foundation-sys", - "jni", - "log", - "once_cell", - "rustls", - "rustls-native-certs", - "rustls-platform-verifier-android", - "rustls-webpki", - "security-framework", - "security-framework-sys", - "webpki-root-certs", - "windows-sys 0.61.2", -] - -[[package]] -name = "rustls-platform-verifier-android" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" - -[[package]] -name = "rustls-webpki" -version = "0.103.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" -dependencies = [ - "aws-lc-rs", - "ring", - "rustls-pki-types", - "untrusted", -] - [[package]] name = "rustversion" version = "1.0.20" @@ -1995,11 +1749,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -2030,7 +1784,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" dependencies = [ "bitflags 2.10.0", - "core-foundation 0.10.1", + "core-foundation", "core-foundation-sys", "libc", "security-framework-sys", @@ -2207,7 +1961,7 @@ checksum = "60bdd87fcb4c9764b024805fb2df5f1d659bea6e629fdbdcdcfc4042b9a640d0" dependencies = [ "js-sys", "once_cell", - "thiserror 2.0.18", + "thiserror", "tokio", "wasm-bindgen", "wasm-bindgen-futures", @@ -2288,32 +2042,24 @@ dependencies = [ ] [[package]] -name = "system-configuration" -version = "0.6.1" +name = "target-lexicon" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" -dependencies = [ - "bitflags 2.10.0", - "core-foundation 0.9.4", - "system-configuration-sys", -] +checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" [[package]] -name = "system-configuration-sys" -version = "0.6.0" +name = "tempfile" +version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ - "core-foundation-sys", - "libc", + "fastrand", + "getrandom 0.3.1", + "once_cell", + "rustix", + "windows-sys 0.52.0", ] -[[package]] -name = "target-lexicon" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" - [[package]] name = "tendril" version = "0.5.0" @@ -2324,33 +2070,13 @@ dependencies = [ "utf-8", ] -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - [[package]] name = "thiserror" version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.18", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "thiserror-impl", ] [[package]] @@ -2404,21 +2130,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "tinyvec" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" version = "1.52.3" @@ -2448,13 +2159,12 @@ dependencies = [ ] [[package]] -name = "tokio-rustls" -version = "0.26.0" +name = "tokio-native-tls" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ - "rustls", - "rustls-pki-types", + "native-tls", "tokio", ] @@ -2609,12 +2319,6 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - [[package]] name = "url" version = "2.5.4" @@ -2810,16 +2514,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "web-time" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - [[package]] name = "web_atoms" version = "0.2.3" @@ -2832,15 +2526,6 @@ dependencies = [ "string_cache_codegen", ] -[[package]] -name = "webpki-root-certs" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee3e3b5f5e80bc89f30ce8d0343bf4e5f12341c51f3e26cbeecbc7c85443e85b" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "winapi-util" version = "0.1.11" @@ -2850,56 +2535,12 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "windows-link" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" - [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" -[[package]] -name = "windows-registry" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" -dependencies = [ - "windows-result", - "windows-strings", - "windows-targets 0.53.5", -] - -[[package]] -name = "windows-result" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" -dependencies = [ - "windows-link 0.1.1", -] - -[[package]] -name = "windows-strings" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" -dependencies = [ - "windows-link 0.1.1", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -2924,22 +2565,7 @@ version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-link 0.2.1", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "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", + "windows-link", ] [[package]] @@ -2964,7 +2590,7 @@ version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ - "windows-link 0.2.1", + "windows-link", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -2975,12 +2601,6 @@ dependencies = [ "windows_x86_64_msvc 0.53.0", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -2993,12 +2613,6 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -3011,12 +2625,6 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -3041,12 +2649,6 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -3059,12 +2661,6 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -3077,12 +2673,6 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -3095,12 +2685,6 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -3245,47 +2829,6 @@ dependencies = [ "synstructure", ] -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive 0.7.35", -] - -[[package]] -name = "zerocopy" -version = "0.8.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" -dependencies = [ - "zerocopy-derive 0.8.27", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "zerofrom" version = "0.1.8" diff --git a/Cargo.toml b/Cargo.toml index a415f76..905b8fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ path = "src/bin/lc.rs" [package] name = "leetcode-cli" -version = "0.5.3" +version = "0.5.4" authors = ["clearloop "] edition = "2024" description = "Leetcode command-line interface in rust." @@ -39,7 +39,6 @@ aes = "0.8" cbc = { version = "0.1", features = ["alloc", "block-padding"] } pbkdf2 = "0.12" sha1 = "0.10" -libsqlite3-sys = { version = "0.28", features = ["bundled"] } [dependencies.diesel] version = "2.3.9" diff --git a/README.md b/README.md index 286d2b1..43464eb 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,8 @@ May the code be with you. ## Install ```sh -# Required dependencies: gcc, cmake (to build the bundled sqlite and aws-lc) +# Linux build deps: system SQLite + OpenSSL headers + pkg-config +# (Debian/Ubuntu: libsqlite3-dev libssl-dev pkg-config). macOS ships both. cargo install leetcode-cli ```