From 0495c84384363585da9914786dca02ee45b28d1a Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 24 Jun 2023 20:52:20 +0300 Subject: [PATCH 01/10] =?UTF-8?q?=F0=9F=A7=B9=20chore:=20add=20config=20fi?= =?UTF-8?q?le=20for=20Gitpod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitpod.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..2aa70df --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,45 @@ +--- +image: ubuntu:latest +# Commands that will run on workspace start +tasks: + - name: Setup, Install & Build + - before: apt install cargo redis-server nodejs npm && cargo test + - init: cargo install cargo-watch + - command: redis-server --port 8080 & cargo watch -q -w "." -x "run" +# Ports to expose on workspace startup +ports: + - port: 8080 + - onOpen: open-preview + - name: Website + - description: Website Preview +# vscode IDE setup +vscode: + extensions: + - vadimcn.vscode-lldb + - rust-lang.rust-analyzer + - bungcip.better-toml + - serayuzgur.crates + - usernamehw.errorlens + - DavidAnson.vscode-markdownlint + - esbenp.prettier-vscode + - stylelint.vscode-stylelint + - dbaeumer.vscode-eslint + - evgeniypeshkov.syntax-highlighter + - redhat.vscode-yaml + - ms-azuretools.vscode-docker + - GitHub.vscode-github-actions + - Catppuccin.catppuccin-vsc + - PKief.material-icon-theme + - tal7aouy.rainbow-bracket + - oderwat.indent-rainbow + - formulahendry.auto-rename-tag + - eamodio.gitlens +github: + prebuilds: + - master: true + - branches: true + - pullRequests: true + - pullRequestsFromForks: true + - addCheck: true + - addComment: false + - addBadge: true From c6696720d02a893c0b312d75e61bd4488f7bea3d Mon Sep 17 00:00:00 2001 From: spoloxs <112800996+spoloxs@users.noreply.github.com> Date: Sun, 25 Jun 2023 14:57:35 +0530 Subject: [PATCH 02/10] Update Cargo.toml --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index fd20eed..6ee7916 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,6 +27,7 @@ error-stack = {version="0.3.1"} [dev-dependencies] rusty-hook = "^0.11.2" +criterion = "0.5.1" [profile.dev] opt-level = 0 From 6efc528588571aa32541ca9ab2cfb62330dd43b6 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Mon, 26 Jun 2023 19:24:15 +0300 Subject: [PATCH 03/10] =?UTF-8?q?=F0=9F=A7=B9=20chore:=20add=20config=20fi?= =?UTF-8?q?le=20for=20gitpod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 92 +++++++++++++++++++++++++++--------------------------- Cargo.toml | 2 +- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6b19dd2..38297d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -201,7 +201,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2262160a7ae29e3415554a3f1fc04c764b1540c116aa524683208078b7a75bc9" dependencies = [ "actix-router", - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", "syn 1.0.109", ] @@ -620,7 +620,7 @@ dependencies = [ "itoa 1.0.6", "matches", "phf 0.10.1", - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", "smallvec 1.10.0", "syn 1.0.109", @@ -633,7 +633,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote 1.0.28", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -643,7 +643,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case", - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", "rustc_version 0.4.0", "syn 1.0.109", @@ -771,7 +771,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", "syn 1.0.109", "synstructure", @@ -1082,7 +1082,7 @@ dependencies = [ "log", "mac", "markup5ever 0.11.0", - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", "syn 1.0.109", ] @@ -1662,9 +1662,9 @@ checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "openssl" -version = "0.10.54" +version = "0.10.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b3f656a17a6cbc115b5c7a40c616947d213ba182135b014d6051b73ab6f019" +checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" dependencies = [ "bitflags", "cfg-if 1.0.0", @@ -1681,9 +1681,9 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -1694,9 +1694,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.88" +version = "0.9.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ce0f250f34a308dcfdbb351f511359857d4ed2134ba715a4eadd46e1ffd617" +checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" dependencies = [ "cc", "libc", @@ -1773,9 +1773,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.6.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16833386b02953ca926d19f64af613b9bf742c48dcd5e09b32fbfc9740bf84e2" +checksum = "f73935e4d55e2abf7f130186537b19e7a4abc886a0252380b59248af473a3fc9" dependencies = [ "thiserror", "ucd-trie", @@ -1783,9 +1783,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.6.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7763190f9406839f99e5197afee8c9e759969f7dbfa40ad3b8dbee8757b745b5" +checksum = "aef623c9bbfa0eedf5a0efba11a5ee83209c326653ca31ff019bec3a95bfff2b" dependencies = [ "pest", "pest_generator", @@ -1793,22 +1793,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.6.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "249061b22e99973da1f5f5f1410284419e283bb60b79255bf5f42a94b66a2e00" +checksum = "b3e8cba4ec22bada7fc55ffe51e2deb6a0e0db2d0b7ab0b103acc80d2510c190" dependencies = [ "pest", "pest_meta", - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] name = "pest_meta" -version = "2.6.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "457c310cfc9cf3f22bc58901cc7f0d3410ac5d6298e432a4f9a6138565cb6df6" +checksum = "a01f71cb40bd8bb94232df14b946909e14660e33fc05db3e50ae2a82d7ea0ca0" dependencies = [ "once_cell", "pest", @@ -1913,7 +1913,7 @@ dependencies = [ "phf_generator 0.10.0", "phf_shared 0.10.0", "proc-macro-hack", - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", "syn 1.0.109", ] @@ -1992,9 +1992,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.60" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" +checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" dependencies = [ "unicode-ident", ] @@ -2024,7 +2024,7 @@ version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" dependencies = [ - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", ] [[package]] @@ -2548,16 +2548,16 @@ version = "1.0.164" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" dependencies = [ - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] name = "serde_json" -version = "1.0.97" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf3bf93142acad5821c99197022e170842cdbc1c30482b98750c688c640842a" +checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3" dependencies = [ "itoa 1.0.6", "ryu", @@ -2733,7 +2733,7 @@ checksum = "f0f45ed1b65bf9a4bf2f7b7dc59212d1926e9eaf00fa998988e420fd124467c6" dependencies = [ "phf_generator 0.7.24", "phf_shared 0.7.24", - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", "string_cache_shared", ] @@ -2746,7 +2746,7 @@ checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" dependencies = [ "phf_generator 0.10.0", "phf_shared 0.10.0", - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", ] @@ -2773,18 +2773,18 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.18" +version = "2.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "2efbeae7acf4eabd6bcdcbd11c92f45231ddda7539edc7806bd1a04a03b24616" dependencies = [ - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", "unicode-ident", ] @@ -2795,7 +2795,7 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", "syn 1.0.109", "unicode-xid 0.2.4", @@ -2850,9 +2850,9 @@ version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -2994,9 +2994,9 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", - "syn 2.0.18", + "syn 2.0.22", ] [[package]] @@ -3322,9 +3322,9 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", - "syn 2.0.18", + "syn 2.0.22", "wasm-bindgen-shared", ] @@ -3356,9 +3356,9 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ - "proc-macro2 1.0.60", + "proc-macro2 1.0.63", "quote 1.0.28", - "syn 2.0.18", + "syn 2.0.22", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3381,7 +3381,7 @@ dependencies = [ [[package]] name = "websurfx" -version = "0.13.0" +version = "0.13.5" dependencies = [ "actix-files", "actix-web", diff --git a/Cargo.toml b/Cargo.toml index fd20eed..5b60bad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "websurfx" -version = "0.13.0" +version = "0.13.5" edition = "2021" description = "An open-source alternative to Searx that provides clean, ad-free, and organic results with incredible speed while keeping privacy and security in mind." repository = "https://github.com/neon-mmd/websurfx" From 1f90b4e15cf52666635e973c5cbc16659a4c5aba Mon Sep 17 00:00:00 2001 From: Milim <81323548+MilimTheTrueOne@users.noreply.github.com> Date: Thu, 29 Jun 2023 18:49:38 +0200 Subject: [PATCH 04/10] refactor search route and change default page to 0 that thing was utterly insane, and i am not sorry for saying this --- public/static/pagination.js | 4 ++-- src/server/routes.rs | 42 ++++++++----------------------------- 2 files changed, 11 insertions(+), 35 deletions(-) diff --git a/public/static/pagination.js b/public/static/pagination.js index 72ce320..92f9272 100644 --- a/public/static/pagination.js +++ b/public/static/pagination.js @@ -30,8 +30,8 @@ function navigate_backward() { let page = parseInt(searchParams.get('page')); if (isNaN(page)) { - page = 1; - } else if (page > 1) { + page = 0; + } else if (page > 0) { page--; } diff --git a/src/server/routes.rs b/src/server/routes.rs index 9234d8d..60d3007 100644 --- a/src/server/routes.rs +++ b/src/server/routes.rs @@ -1,5 +1,5 @@ //! This module provides the functionality to handle different routes of the `websurfx` -//! meta search engine website and provide approriate response to each route/page +//! meta search engine website and provide appropriate response to each route/page //! when requested. use std::fs::read_to_string; @@ -82,40 +82,16 @@ pub async fn search( .insert_header(("location", "/")) .finish()) } else { - let page_url: String; // Declare the page_url variable without initializing it - - // ... - - let page = match params.page { - Some(page_number) => { - if page_number <= 1 { - page_url = format!( - "http://{}:{}/search?q={}&page={}", - config.binding_ip_addr, config.port, query, 1 - ); - 1 - } else { - page_url = format!( - "http://{}:{}/search?q={}&page={}", - config.binding_ip_addr, config.port, query, page_number - ); - - page_number - } - } - None => { - page_url = format!( - "http://{}:{}{}&page={}", - config.binding_ip_addr, - config.port, - req.uri(), - 1 - ); - - 1 - } + let page = match ¶ms.page { + Some(page) => *page, + None => 0, }; + let page_url = format!( + "http://{}:{}/search?q={}&page={}", + config.binding_ip_addr, config.port, query, page + ); + // fetch the cached results json. let cached_results_json = redis_cache.cached_results_json(&page_url); // check if fetched results was indeed fetched or it was an error and if so From e2907edf6efcad4c184227d583e75fca916f1666 Mon Sep 17 00:00:00 2001 From: Milim <81323548+MilimTheTrueOne@users.noreply.github.com> Date: Thu, 29 Jun 2023 19:10:09 +0200 Subject: [PATCH 05/10] refactor config helper function --- src/config_parser/parser.rs | 73 ++++++++++++++---------------- src/config_parser/parser_models.rs | 2 +- 2 files changed, 34 insertions(+), 41 deletions(-) diff --git a/src/config_parser/parser.rs b/src/config_parser/parser.rs index 4c5c1e6..5b4c2d8 100644 --- a/src/config_parser/parser.rs +++ b/src/config_parser/parser.rs @@ -24,46 +24,35 @@ pub struct Config { pub binding_ip_addr: String, pub style: Style, pub redis_connection_url: String, - pub aggregator: AggreatorConfig, + pub aggregator: AggregatorConfig, pub logging: bool, pub debug: bool, } /// Configuration options for the aggregator. #[derive(Clone)] -pub struct AggreatorConfig { +pub struct AggregatorConfig { /// Whether to introduce a random delay before sending the request to the search engine. pub random_delay: bool, } impl Config { /// A function which parses the config.lua file and puts all the parsed options in the newly - /// contructed Config struct and returns it. + /// constructed Config struct and returns it. /// /// # Error /// /// Returns a lua parse error if parsing of the config.lua file fails or has a syntax error - /// or io error if the config.lua file doesn't exists otherwise it returns a newly contructed + /// or io error if the config.lua file doesn't exists otherwise it returns a newly constructed /// Config struct with all the parsed config options from the parsed config file. pub fn parse() -> Result> { Lua::new().context(|context| -> Result> { let globals = context.globals(); context - .load(&fs::read_to_string( - Config::handle_different_config_file_path()?, - )?) + .load(&fs::read_to_string(Config::get_config_path()?)?) .exec()?; - let production_use = globals.get::<_, bool>("production_use")?; - let aggregator_config = if production_use { - AggreatorConfig { random_delay: true } - } else { - AggreatorConfig { - random_delay: false, - } - }; - Ok(Config { port: globals.get::<_, u16>("port")?, binding_ip_addr: globals.get::<_, String>("binding_ip_addr")?, @@ -72,7 +61,9 @@ impl Config { globals.get::<_, String>("colorscheme")?, ), redis_connection_url: globals.get::<_, String>("redis_connection_url")?, - aggregator: aggregator_config, + aggregator: AggregatorConfig { + random_delay: globals.get::<_, bool>("production_use")?, + }, logging: globals.get::<_, bool>("logging")?, debug: globals.get::<_, bool>("debug")?, }) @@ -90,35 +81,37 @@ impl Config { /// one (3). /// 3. `websurfx/` (under project folder ( or codebase in other words)) if it is not present /// here then it returns an error as mentioned above. - fn handle_different_config_file_path() -> Result> { - if Path::new( - format!( - "{}/.config/{}/config.lua", - std::env::var("HOME").unwrap(), - COMMON_DIRECTORY_NAME - ) - .as_str(), - ) - .exists() - { - Ok(format!( + fn get_config_path() -> Result> { + // check user config + + let path = format!( + "{}/.config/{}/config.lua", + std::env::var("HOME").unwrap(), + COMMON_DIRECTORY_NAME + ); + if Path::new(path.as_str()).exists() { + return Ok(format!( "{}/.config/{}/{}", std::env::var("HOME").unwrap(), COMMON_DIRECTORY_NAME, CONFIG_FILE_NAME - )) - } else if Path::new( - format!("/etc/xdg/{}/{}", COMMON_DIRECTORY_NAME, CONFIG_FILE_NAME).as_str(), - ) - .exists() - { - Ok("/etc/xdg/websurfx/config.lua".to_string()) - } else if Path::new(format!("./{}/{}", COMMON_DIRECTORY_NAME, CONFIG_FILE_NAME).as_str()) + )); + } + + // look for config in /etc/xdg + if Path::new(format!("/etc/xdg/{}/{}", COMMON_DIRECTORY_NAME, CONFIG_FILE_NAME).as_str()) .exists() { - Ok("./websurfx/config.lua".to_string()) - } else { - Err("Config file not found!!".to_string().into()) + return Ok("/etc/xdg/websurfx/config.lua".to_string()); } + + // use dev config + if Path::new(format!("./{}/{}", COMMON_DIRECTORY_NAME, CONFIG_FILE_NAME).as_str()).exists() + { + return Ok("./websurfx/config.lua".to_string()); + } + + // if no of the configs above exist, return error + Err("Config file not found!!".to_string().into()) } } diff --git a/src/config_parser/parser_models.rs b/src/config_parser/parser_models.rs index 42baf0d..0bc52d8 100644 --- a/src/config_parser/parser_models.rs +++ b/src/config_parser/parser_models.rs @@ -1,5 +1,5 @@ //! This module provides public models for handling, storing and serializing parsed config file -//! options from config.lua by grouping them togather. +//! options from config.lua by grouping them together. use serde::{Deserialize, Serialize}; From dbe5b533d6382566374355edb2afef2382bdac7f Mon Sep 17 00:00:00 2001 From: Milim <81323548+MilimTheTrueOne@users.noreply.github.com> Date: Thu, 29 Jun 2023 19:18:42 +0200 Subject: [PATCH 06/10] fix spelling --- CONTRIBUTING.md | 2 +- PULL_REQUEST_TEMPLATE.md | 2 +- README.md | 4 ++-- src/engines/duckduckgo.rs | 4 ++-- src/engines/engine_models.rs | 2 +- src/search_results_handler/aggregator.rs | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 324dfbf..41ff84e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,7 +14,7 @@ Know how to fix or improve a github action?. Consider Submitting a Pull request ## Source Code -You should know atleast one of the things below to start contributing: +You should know at least one of the things below to start contributing: - Rust basics - Actix-web crate basics diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index a7ad130..28cb6b7 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -16,7 +16,7 @@ ## Author's checklist - + ## Related issues diff --git a/README.md b/README.md index 29f2cb2..0724a57 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ - **Community** - [📊 System Requirements](#system-requirements-) - [🗨️ FAQ (Frequently Asked Questions)](#faq-frequently-asked-questions-) - - [📣 More Contributers Wanted](#more-contributers-wanted-) + - [📣 More Contributors Wanted](#more-contributers-wanted-) - [💖 Supporting Websurfx](#supporting-websurfx-) - [📘 Documentation](#documentation-) - [🛣️ Roadmap](#roadmap-) @@ -165,7 +165,7 @@ Websurfx is based on Rust due to its memory safety features, which prevents vuln **[⬆️ Back to Top](#--)** -# More Contributers Wanted 📣 +# More Contributors Wanted 📣 We are looking for more willing contributors to help grow this project. For more information on how you can contribute, check out the [project board](https://github.com/neon-mmd/websurfx/projects?query=is%3Aopen) and the [CONTRIBUTING.md](CONTRIBUTING.md) file for guidelines and rules for making contributions. diff --git a/src/engines/duckduckgo.rs b/src/engines/duckduckgo.rs index 70c3a87..44d7b0d 100644 --- a/src/engines/duckduckgo.rs +++ b/src/engines/duckduckgo.rs @@ -36,7 +36,7 @@ pub async fn results( user_agent: &str, ) -> Result, EngineError> { // Page number can be missing or empty string and so appropriate handling is required - // so that upstream server recieves valid page number. + // so that upstream server receives valid page number. let url: String = match page { 1 => { format!("https://html.duckduckgo.com/html/?q={query}&s=&dc=&v=1&o=json&api=/d.js") @@ -86,7 +86,7 @@ pub async fn results( let results: String = reqwest::Client::new() .get(url) .timeout(Duration::from_secs(5)) - .headers(header_map) // add spoofed headers to emulate human behaviour + .headers(header_map) // add spoofed headers to emulate human behavior .send() .await .into_report() diff --git a/src/engines/engine_models.rs b/src/engines/engine_models.rs index 7a58688..091c62d 100644 --- a/src/engines/engine_models.rs +++ b/src/engines/engine_models.rs @@ -13,7 +13,7 @@ use std::fmt; /// search engines. /// * `UnexpectedError` - This variant handles all the errors which are unexpected or occur rarely /// and are errors mostly related to failure in initialization of HeaderMap, Selector errors and -/// all other errors occuring within the code handling the `upstream search engines`. +/// all other errors occurring within the code handling the `upstream search engines`. #[derive(Debug)] pub enum EngineError { EmptyResultSet, diff --git a/src/search_results_handler/aggregator.rs b/src/search_results_handler/aggregator.rs index cba266c..f5719b0 100644 --- a/src/search_results_handler/aggregator.rs +++ b/src/search_results_handler/aggregator.rs @@ -17,7 +17,7 @@ use crate::engines::{duckduckgo, searx}; /// then removes duplicate results and if two results are found to be from two or more engines /// then puts their names together to show the results are fetched from these upstream engines /// and then removes all data from the HashMap and puts into a struct of all results aggregated -/// into a vector and also adds the query used into the struct this is neccessory because +/// into a vector and also adds the query used into the struct this is necessary because /// otherwise the search bar in search remains empty if searched from the query url /// /// # Example: From b18db5414aa078eb67a3f375c16a78698112b5f6 Mon Sep 17 00:00:00 2001 From: Milim <81323548+MilimTheTrueOne@users.noreply.github.com> Date: Fri, 30 Jun 2023 14:47:15 +0000 Subject: [PATCH 07/10] Update README.md Co-authored-by: neon_arch --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0724a57..e9c7e5c 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ - **Community** - [📊 System Requirements](#system-requirements-) - [🗨️ FAQ (Frequently Asked Questions)](#faq-frequently-asked-questions-) - - [📣 More Contributors Wanted](#more-contributers-wanted-) + - [📣 More Contributors Wanted](#more-contributors-wanted-) - [💖 Supporting Websurfx](#supporting-websurfx-) - [📘 Documentation](#documentation-) - [🛣️ Roadmap](#roadmap-) From aa43b3f2dc3aef23a47b8312d27b8196fd4560c0 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Fri, 30 Jun 2023 18:27:26 +0300 Subject: [PATCH 08/10] =?UTF-8?q?=F0=9F=A7=B9=20chore:=20replace=20dashes?= =?UTF-8?q?=20with=20spaces?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitpod.yml | 68 ++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 2aa70df..d919d82 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -2,44 +2,44 @@ image: ubuntu:latest # Commands that will run on workspace start tasks: - - name: Setup, Install & Build - - before: apt install cargo redis-server nodejs npm && cargo test - - init: cargo install cargo-watch - - command: redis-server --port 8080 & cargo watch -q -w "." -x "run" + name: Setup, Install & Build + before: apt install cargo redis-server nodejs npm && cargo test + init: cargo install cargo-watch + command: redis-server --port 8080 & cargo watch -q -w "." -x "run" # Ports to expose on workspace startup ports: - - port: 8080 - - onOpen: open-preview - - name: Website - - description: Website Preview + port: 8080 + onOpen: open-preview + name: Website + description: Website Preview # vscode IDE setup vscode: extensions: - - vadimcn.vscode-lldb - - rust-lang.rust-analyzer - - bungcip.better-toml - - serayuzgur.crates - - usernamehw.errorlens - - DavidAnson.vscode-markdownlint - - esbenp.prettier-vscode - - stylelint.vscode-stylelint - - dbaeumer.vscode-eslint - - evgeniypeshkov.syntax-highlighter - - redhat.vscode-yaml - - ms-azuretools.vscode-docker - - GitHub.vscode-github-actions - - Catppuccin.catppuccin-vsc - - PKief.material-icon-theme - - tal7aouy.rainbow-bracket - - oderwat.indent-rainbow - - formulahendry.auto-rename-tag - - eamodio.gitlens + vadimcn.vscode-lldb + rust-lang.rust-analyzer + bungcip.better-toml + serayuzgur.crates + usernamehw.errorlens + DavidAnson.vscode-markdownlint + esbenp.prettier-vscode + stylelint.vscode-stylelint + dbaeumer.vscode-eslint + evgeniypeshkov.syntax-highlighter + redhat.vscode-yaml + ms-azuretools.vscode-docker + GitHub.vscode-github-actions + Catppuccin.catppuccin-vsc + PKief.material-icon-theme + tal7aouy.rainbow-bracket + oderwat.indent-rainbow + formulahendry.auto-rename-tag + eamodio.gitlens github: prebuilds: - - master: true - - branches: true - - pullRequests: true - - pullRequestsFromForks: true - - addCheck: true - - addComment: false - - addBadge: true + master: true + branches: true + pullRequests: true + pullRequestsFromForks: true + addCheck: true + addComment: false + addBadge: true From 957ff6975d247adc4497f9ba32a21573a356b8df Mon Sep 17 00:00:00 2001 From: neon_arch Date: Fri, 30 Jun 2023 18:32:56 +0300 Subject: [PATCH 09/10] =?UTF-8?q?=F0=9F=9A=80=20chore:=20bump=20the=20app?= =?UTF-8?q?=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 659 ++++++++++++++++++++++++++++++++--------------------- Cargo.toml | 2 +- 2 files changed, 406 insertions(+), 255 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 38297d6..89ec79d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,13 +8,13 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617a8268e3537fe1d8c9ead925fca49ef6400927ee7bc26750e90ecee14ce4b8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "bytes 1.4.0", "futures-core", "futures-sink", "memchr", "pin-project-lite", - "tokio 1.28.2", + "tokio 1.29.1", "tokio-util", "tracing", ] @@ -30,7 +30,7 @@ dependencies = [ "actix-utils", "actix-web", "askama_escape", - "bitflags", + "bitflags 1.3.2", "bytes 1.4.0", "derive_more", "futures-core", @@ -54,7 +54,7 @@ dependencies = [ "actix-utils", "ahash 0.8.3", "base64 0.21.2", - "bitflags", + "bitflags 1.3.2", "brotli", "bytes 1.4.0", "bytestring", @@ -62,7 +62,7 @@ dependencies = [ "encoding_rs", "flate2", "futures-core", - "h2 0.3.19", + "h2 0.3.20", "http 0.2.9", "httparse", "httpdate", @@ -75,7 +75,7 @@ dependencies = [ "rand 0.8.5", "sha1", "smallvec 1.10.0", - "tokio 1.28.2", + "tokio 1.29.1", "tokio-util", "tracing", "zstd", @@ -87,7 +87,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" dependencies = [ - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -111,7 +111,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15265b6b8e2347670eb363c47fc8c75208b4a4994b27192f345fcbe707804f3e" dependencies = [ "futures-core", - "tokio 1.28.2", + "tokio 1.29.1", ] [[package]] @@ -128,7 +128,7 @@ dependencies = [ "mio 0.8.8", "num_cpus", "socket2", - "tokio 1.28.2", + "tokio 1.29.1", "tracing", ] @@ -202,15 +202,15 @@ checksum = "2262160a7ae29e3415554a3f1fc04c764b1540c116aa524683208078b7a75bc9" dependencies = [ "actix-router", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] [[package]] name = "addr2line" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" dependencies = [ "gimli", ] @@ -227,7 +227,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.10", + "getrandom", "once_cell", "version_check", ] @@ -239,7 +239,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if 1.0.0", - "getrandom 0.2.10", + "getrandom", "once_cell", "version_check", ] @@ -268,6 +268,18 @@ dependencies = [ "alloc-no-stdlib", ] +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + +[[package]] +name = "anstyle" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" + [[package]] name = "anyhow" version = "1.0.71" @@ -297,15 +309,15 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" dependencies = [ "addr2line", "cc", "cfg-if 1.0.0", "libc", - "miniz_oxide 0.6.2", + "miniz_oxide", "object", "rustc-demangle", ] @@ -346,6 +358,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + [[package]] name = "block-buffer" version = "0.10.4" @@ -423,6 +441,12 @@ dependencies = [ "bytes 1.4.0", ] +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + [[package]] name = "cc" version = "1.0.79" @@ -453,13 +477,65 @@ dependencies = [ "envmnt", ] +[[package]] +name = "ciborium" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" + +[[package]] +name = "ciborium-ll" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "clap" +version = "4.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384e169cc618c613d5e3ca6404dda77a8685a63e08660dcc64abaf7da7cb0c7a" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef137bbe35aab78bdb468ccfba75a5f4d8321ae011d34063770780545176af2d" +dependencies = [ + "anstyle", + "clap_lex", +] + +[[package]] +name = "clap_lex" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" + [[package]] name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -551,17 +627,74 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "is-terminal", + "itertools", + "num-traits", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils 0.8.16", +] + [[package]] name = "crossbeam-deque" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", + "crossbeam-epoch 0.8.2", + "crossbeam-utils 0.7.2", "maybe-uninit", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-epoch 0.9.15", + "crossbeam-utils 0.8.16", +] + [[package]] name = "crossbeam-epoch" version = "0.8.2" @@ -570,10 +703,23 @@ checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ "autocfg 1.1.0", "cfg-if 0.1.10", - "crossbeam-utils", + "crossbeam-utils 0.7.2", "lazy_static", "maybe-uninit", - "memoffset", + "memoffset 0.5.6", + "scopeguard", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +dependencies = [ + "autocfg 1.1.0", + "cfg-if 1.0.0", + "crossbeam-utils 0.8.16", + "memoffset 0.9.0", "scopeguard", ] @@ -584,7 +730,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" dependencies = [ "cfg-if 0.1.10", - "crossbeam-utils", + "crossbeam-utils 0.7.2", "maybe-uninit", ] @@ -599,6 +745,15 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if 1.0.0", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -611,19 +766,15 @@ dependencies = [ [[package]] name = "cssparser" -version = "0.29.6" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93d03419cb5950ccfd3daf3ff1c7a36ace64609a1a8746d493df1ca0afde0fa" +checksum = "5b3df4f93e5fbbe73ec01ec8d3f68bba73107993a5b1e7519273c32db9b0d5be" dependencies = [ "cssparser-macros", "dtoa-short", "itoa 1.0.6", - "matches", - "phf 0.10.1", - "proc-macro2 1.0.63", - "quote 1.0.28", + "phf 0.11.2", "smallvec 1.10.0", - "syn 1.0.109", ] [[package]] @@ -632,7 +783,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ - "quote 1.0.28", + "quote 1.0.29", "syn 2.0.22", ] @@ -644,7 +795,7 @@ checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "rustc_version 0.4.0", "syn 1.0.109", ] @@ -772,7 +923,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", "synstructure", ] @@ -804,7 +955,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] @@ -855,7 +1006,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" dependencies = [ - "bitflags", + "bitflags 1.3.2", "fuchsia-zircon-sys", ] @@ -958,17 +1109,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.10" @@ -1006,9 +1146,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes 1.4.0", "fnv", @@ -1018,11 +1158,17 @@ dependencies = [ "http 0.2.9", "indexmap", "slab", - "tokio 1.28.2", + "tokio 1.29.1", "tokio-util", "tracing", ] +[[package]] +name = "half" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + [[package]] name = "handlebars" version = "4.3.7" @@ -1044,15 +1190,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.1" @@ -1083,7 +1220,7 @@ dependencies = [ "mac", "markup5ever 0.11.0", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", ] @@ -1188,15 +1325,15 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes 1.4.0", "futures-channel", "futures-core", "futures-util", - "h2 0.3.19", + "h2 0.3.20", "http 0.2.9", "http-body 0.4.5", "httparse", @@ -1204,7 +1341,7 @@ dependencies = [ "itoa 1.0.6", "pin-project-lite", "socket2", - "tokio 1.28.2", + "tokio 1.29.1", "tower-service", "tracing", "want 0.3.1", @@ -1230,9 +1367,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes 1.4.0", - "hyper 0.14.26", + "hyper 0.14.27", "native-tls", - "tokio 1.28.2", + "tokio 1.29.1", "tokio-native-tls", ] @@ -1293,7 +1430,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi", "libc", "windows-sys 0.48.0", ] @@ -1309,22 +1446,30 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", + "hermit-abi", + "rustix 0.38.1", "windows-sys 0.48.0", ] +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "0.4.8" @@ -1379,9 +1524,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.146" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "linux-raw-sys" @@ -1389,6 +1534,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +[[package]] +name = "linux-raw-sys" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" + [[package]] name = "local-channel" version = "0.1.3" @@ -1502,6 +1653,15 @@ dependencies = [ "autocfg 1.1.0", ] +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg 1.1.0", +] + [[package]] name = "mime" version = "0.3.17" @@ -1518,15 +1678,6 @@ dependencies = [ "unicase", ] -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -1620,12 +1771,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab250442c86f1850815b5d268639dff018c0627022bc1940eb2d642ca1ce12f0" -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - [[package]] name = "num-traits" version = "0.2.15" @@ -1637,19 +1782,19 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi", "libc", ] [[package]] name = "object" -version = "0.30.4" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" dependencies = [ "memchr", ] @@ -1660,13 +1805,19 @@ version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +[[package]] +name = "oorandom" +version = "11.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" + [[package]] name = "openssl" version = "0.10.55" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "foreign-types", "libc", @@ -1682,7 +1833,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 2.0.22", ] @@ -1800,7 +1951,7 @@ dependencies = [ "pest", "pest_meta", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 2.0.22", ] @@ -1824,24 +1975,23 @@ dependencies = [ "phf_shared 0.7.24", ] -[[package]] -name = "phf" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" -dependencies = [ - "phf_shared 0.8.0", -] - [[package]] name = "phf" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" dependencies = [ - "phf_macros", "phf_shared 0.10.0", - "proc-macro-hack", +] + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared 0.11.2", ] [[package]] @@ -1854,16 +2004,6 @@ dependencies = [ "phf_shared 0.7.24", ] -[[package]] -name = "phf_codegen" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" -dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", -] - [[package]] name = "phf_codegen" version = "0.10.0" @@ -1884,16 +2024,6 @@ dependencies = [ "rand 0.6.5", ] -[[package]] -name = "phf_generator" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" -dependencies = [ - "phf_shared 0.8.0", - "rand 0.7.3", -] - [[package]] name = "phf_generator" version = "0.10.0" @@ -1905,17 +2035,26 @@ dependencies = [ ] [[package]] -name = "phf_macros" -version = "0.10.0" +name = "phf_generator" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", - "proc-macro-hack", + "phf_shared 0.11.2", + "rand 0.8.5", +] + +[[package]] +name = "phf_macros" +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", "proc-macro2 1.0.63", - "quote 1.0.28", - "syn 1.0.109", + "quote 1.0.29", + "syn 2.0.22", ] [[package]] @@ -1929,18 +2068,18 @@ dependencies = [ [[package]] name = "phf_shared" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ "siphasher 0.3.10", ] [[package]] name = "phf_shared" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ "siphasher 0.3.10", ] @@ -1963,6 +2102,34 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +[[package]] +name = "plotters" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" + +[[package]] +name = "plotters-svg" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +dependencies = [ + "plotters-backend", +] + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -1975,12 +2142,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" version = "0.4.30" @@ -2020,9 +2181,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.28" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" dependencies = [ "proc-macro2 1.0.63", ] @@ -2037,29 +2198,15 @@ dependencies = [ "libc", "rand_chacha 0.1.1", "rand_core 0.4.2", - "rand_hc 0.1.0", + "rand_hc", "rand_isaac", "rand_jitter", "rand_os", - "rand_pcg 0.1.2", + "rand_pcg", "rand_xorshift", "winapi 0.3.9", ] -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", - "rand_pcg 0.2.1", -] - [[package]] name = "rand" version = "0.8.5" @@ -2081,16 +2228,6 @@ dependencies = [ "rand_core 0.3.1", ] -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - [[package]] name = "rand_chacha" version = "0.3.1" @@ -2116,22 +2253,13 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - [[package]] name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.10", + "getrandom", ] [[package]] @@ -2143,15 +2271,6 @@ dependencies = [ "rand_core 0.3.1", ] -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "rand_isaac" version = "0.1.1" @@ -2196,15 +2315,6 @@ dependencies = [ "rand_core 0.4.2", ] -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "rand_xorshift" version = "0.1.1" @@ -2214,6 +2324,28 @@ dependencies = [ "rand_core 0.3.1", ] +[[package]] +name = "rayon" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque 0.8.3", + "crossbeam-utils 0.8.16", + "num_cpus", +] + [[package]] name = "rdrand" version = "0.4.0" @@ -2249,7 +2381,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -2314,10 +2446,10 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.3.19", + "h2 0.3.20", "http 0.2.9", "http-body 0.4.5", - "hyper 0.14.26", + "hyper 0.14.27", "hyper-tls 0.5.0", "ipnet", "js-sys", @@ -2330,7 +2462,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded 0.7.1", - "tokio 1.28.2", + "tokio 1.29.1", "tokio-native-tls", "tower-service", "url 2.4.0", @@ -2346,7 +2478,7 @@ version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "753540fb29c9a615ce5dd64be5c957271adc887c8424555fc372e0b88ebde074" dependencies = [ - "bitflags", + "bitflags 1.3.2", "bstr", "libc", "num-traits", @@ -2390,15 +2522,28 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.20" +version = "0.37.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" +checksum = "62f25693a73057a1b4cb56179dd3c7ea21a7c6c5ee7d85781f5749b46f34b79c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc6396159432b5c8490d4e301d8c705f61860b8b6c863bf79942ce5401968f3" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys 0.4.3", "windows-sys 0.48.0", ] @@ -2446,9 +2591,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scraper" -version = "0.16.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59e25654b5e9fd557a67dbaab5a5d36b8c448d0561beb4c041b6dbb902eddfa6" +checksum = "c95a930e03325234c18c7071fd2b60118307e025d6fff3e12745ffbf63a3d29c" dependencies = [ "ahash 0.8.3", "cssparser", @@ -2467,7 +2612,7 @@ version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -2496,17 +2641,18 @@ dependencies = [ [[package]] name = "selectors" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c37578180969d00692904465fb7f6b3d50b9a2b952b87c23d0e2e5cb5013416" +checksum = "4eb30575f3638fc8f6815f448d50cb1a2e255b0897985c8c59f4d37b72a07b06" dependencies = [ - "bitflags", + "bitflags 2.3.3", "cssparser", "derive_more", "fxhash", "log", - "phf 0.8.0", - "phf_codegen 0.8.0", + "new_debug_unreachable", + "phf 0.10.1", + "phf_codegen 0.10.0", "precomputed-hash", "servo_arc", "smallvec 1.10.0", @@ -2549,7 +2695,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 2.0.22", ] @@ -2590,11 +2736,10 @@ dependencies = [ [[package]] name = "servo_arc" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52aa42f8fdf0fed91e5ce7f23d8138441002fa31dca008acf47e6fd4721f741" +checksum = "d036d71a959e00c77a63538b90a6c2390969f9772b096ea837205c6bd0491a44" dependencies = [ - "nodrop", "stable_deref_trait", ] @@ -2734,7 +2879,7 @@ dependencies = [ "phf_generator 0.7.24", "phf_shared 0.7.24", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "string_cache_shared", ] @@ -2747,7 +2892,7 @@ dependencies = [ "phf_generator 0.10.0", "phf_shared 0.10.0", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", ] [[package]] @@ -2774,7 +2919,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "unicode-ident", ] @@ -2785,7 +2930,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2efbeae7acf4eabd6bcdcbd11c92f45231ddda7539edc7806bd1a04a03b24616" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "unicode-ident", ] @@ -2796,7 +2941,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 1.0.109", "unicode-xid 0.2.4", ] @@ -2811,7 +2956,7 @@ dependencies = [ "cfg-if 1.0.0", "fastrand", "redox_syscall 0.3.5", - "rustix", + "rustix 0.37.21", "windows-sys 0.48.0", ] @@ -2851,7 +2996,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 2.0.22", ] @@ -2893,6 +3038,16 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -2929,11 +3084,12 @@ dependencies = [ [[package]] name = "tokio" -version = "1.28.2" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ "autocfg 1.1.0", + "backtrace", "bytes 1.4.0", "libc", "mio 0.8.8", @@ -2973,7 +3129,7 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.7.2", "futures", ] @@ -2995,7 +3151,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 2.0.22", ] @@ -3006,7 +3162,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ "native-tls", - "tokio 1.28.2", + "tokio 1.29.1", ] [[package]] @@ -3015,7 +3171,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.7.2", "futures", "lazy_static", "log", @@ -3058,9 +3214,9 @@ version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" dependencies = [ - "crossbeam-deque", + "crossbeam-deque 0.7.4", "crossbeam-queue", - "crossbeam-utils", + "crossbeam-utils 0.7.2", "futures", "lazy_static", "log", @@ -3075,7 +3231,7 @@ version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.7.2", "futures", "slab", "tokio-executor", @@ -3091,7 +3247,7 @@ dependencies = [ "futures-core", "futures-sink", "pin-project-lite", - "tokio 1.28.2", + "tokio 1.29.1", "tracing", ] @@ -3285,12 +3441,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.10.0+wasi-snapshot-preview1" @@ -3323,7 +3473,7 @@ dependencies = [ "log", "once_cell", "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 2.0.22", "wasm-bindgen-shared", ] @@ -3346,7 +3496,7 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ - "quote 1.0.28", + "quote 1.0.29", "wasm-bindgen-macro-support", ] @@ -3357,7 +3507,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2 1.0.63", - "quote 1.0.28", + "quote 1.0.29", "syn 2.0.22", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -3381,10 +3531,11 @@ dependencies = [ [[package]] name = "websurfx" -version = "0.13.5" +version = "0.13.7" dependencies = [ "actix-files", "actix-web", + "criterion", "env_logger", "error-stack", "fake-useragent", @@ -3400,7 +3551,7 @@ dependencies = [ "scraper", "serde", "serde_json", - "tokio 1.28.2", + "tokio 1.29.1", ] [[package]] @@ -3472,9 +3623,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ "windows_aarch64_gnullvm 0.48.0", "windows_aarch64_msvc 0.48.0", diff --git a/Cargo.toml b/Cargo.toml index 57792f6..de596e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "websurfx" -version = "0.13.5" +version = "0.13.7" edition = "2021" description = "An open-source alternative to Searx that provides clean, ad-free, and organic results with incredible speed while keeping privacy and security in mind." repository = "https://github.com/neon-mmd/websurfx" From b083f844eb73678c46156c54610dee337620f56d Mon Sep 17 00:00:00 2001 From: alamin655 <129589283+alamin655@users.noreply.github.com> Date: Sun, 2 Jul 2023 11:29:42 +0530 Subject: [PATCH 10/10] Apply suggestions from code review --- .gitpod.yml | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index d919d82..9913c27 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -2,38 +2,38 @@ image: ubuntu:latest # Commands that will run on workspace start tasks: - name: Setup, Install & Build - before: apt install cargo redis-server nodejs npm && cargo test - init: cargo install cargo-watch - command: redis-server --port 8080 & cargo watch -q -w "." -x "run" + - name: Setup, Install & Build + - before: apt install cargo redis-server nodejs npm && cargo test + - init: cargo install cargo-watch + - command: redis-server --port 8080 & cargo watch -q -w "." -x "run" # Ports to expose on workspace startup ports: + - name: Website + description: Website Preview port: 8080 - onOpen: open-preview - name: Website - description: Website Preview + onOpen: open-browser # vscode IDE setup vscode: extensions: - vadimcn.vscode-lldb - rust-lang.rust-analyzer - bungcip.better-toml - serayuzgur.crates - usernamehw.errorlens - DavidAnson.vscode-markdownlint - esbenp.prettier-vscode - stylelint.vscode-stylelint - dbaeumer.vscode-eslint - evgeniypeshkov.syntax-highlighter - redhat.vscode-yaml - ms-azuretools.vscode-docker - GitHub.vscode-github-actions - Catppuccin.catppuccin-vsc - PKief.material-icon-theme - tal7aouy.rainbow-bracket - oderwat.indent-rainbow - formulahendry.auto-rename-tag - eamodio.gitlens + - vadimcn.vscode-lldb + - rust-lang.rust-analyzer + - bungcip.better-toml + - serayuzgur.crates + - usernamehw.errorlens + - DavidAnson.vscode-markdownlint + - esbenp.prettier-vscode + - stylelint.vscode-stylelint + - dbaeumer.vscode-eslint + - evgeniypeshkov.syntax-highlighter + - redhat.vscode-yaml + - ms-azuretools.vscode-docker + - GitHub.vscode-github-actions + - Catppuccin.catppuccin-vsc + - PKief.material-icon-theme + - tal7aouy.rainbow-bracket + - oderwat.indent-rainbow + - formulahendry.auto-rename-tag + - eamodio.gitlens github: prebuilds: master: true