Skip to content

Commit

Permalink
Updated dependencies versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-cpsn committed Jun 30, 2024
1 parent a368cc2 commit b4733d4
Show file tree
Hide file tree
Showing 13 changed files with 810 additions and 283 deletions.
953 changes: 735 additions & 218 deletions Cargo.lock

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ description = "Arguably a Terminal API Client. Feature-full, free, open-source,
version = "0.16.0"
authors = ["julien-cpsn"]
edition = "2021"
rust-version = "1.79"
license = "MIT"
readme = "README.md"
documentation = "https://github.com/Julien-cpsn/ATAC/wiki"
homepage = "https://github.com/Julien-cpsn/ATAC"
repository = "https://github.com/Julien-cpsn/ATAC"
keywords = ["API", "TUI", "Postman", "Insomnia"]
keywords = ["API", "Client", "TUI", "Postman", "Insomnia"]

exclude = [
".github/*"
Expand All @@ -18,37 +19,36 @@ exclude = [
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
reqwest = { version = "0.11.27", default-features = false, features = ["cookies", "rustls-tls-native-roots", "multipart", "gzip", "brotli", "deflate", "stream"] }
reqwest_cookie_store = "0.6.0"
cookie_store = "0.20.0"
ratatui = "0.26.3"
crossterm = "0.27.0"
crokey = "1.0.0"
tui-big-text = "0.4.2"
tui-tree-widget = "0.19.0"
tui-textarea = { version = "0.4.0", features = ["ratatui"] }
throbber-widgets-tui = "0.5.0"
ratatui-image = { version = "1.0.0", features = ["crossterm"] }
image = "0.24.9"
reqwest = { version = "0.12.5", default-features = false, features = ["cookies", "rustls-tls-native-roots", "multipart", "gzip", "brotli", "deflate", "stream"] }
reqwest_cookie_store = "0.8.0"
cookie_store = "0.21.0"
ratatui = "0.27.0"
crokey = "1.0.1"
tui-big-text = "0.4.5"
tui-tree-widget = "0.21.0"
tui-textarea = { package = "tui-textarea-julien-cpsn", version = "0.4.1", features = ["ratatui"] }
throbber-widgets-tui = "0.6.0"
ratatui-image = { version = "1.0.1", features = ["crossterm"] }
image = "0.25.1"
syntect = "5.2.0"
serde = { version = "1.0.197", features = ["derive", "rc"] }
serde_json = "1.0.114"
serde = { version = "1.0.203", features = ["derive", "rc"] }
serde_json = "1.0.118"
serde_yaml = "0.9.34"
jsonxf = "1.1.1"
toml = "0.8.11"
toml = "0.8.14"
boa_engine = { version = "0.18.0", default-features = false }
parse_postman_collection = "0.2.3"
curl-parser = { version = "0.3.1", default-features = false }
clap = { version = "4.5.4", features = ["derive", "color", "suggestions"] }
clap = { version = "4.5.8", features = ["derive", "color", "suggestions"] }
dirs = "5.0.1"
arboard = "3.3.2"
tokio = { version = "1.36.0", features = ["rt", "rt-multi-thread", "macros"] }
parking_lot = { version = "0.12.2", features = ["serde"] }
strum = "0.26.2"
lazy_static = "1.4.0"
arboard = "3.4.0"
tokio = { version = "1.38.0", features = ["rt", "rt-multi-thread", "macros"] }
parking_lot = { version = "0.12.3", features = ["serde"] }
strum = "0.26.3"
lazy_static = "1.5.0"
nestify = "0.3.3"
walkdir = "2.5.0"
snailquote = "0.3.1"
indexmap = { version = "2.2.6", features = ["serde"] }
base64 = "0.22.0"
regex = "1.10.3"
base64 = "0.22.1"
regex = "1.10.5"
47 changes: 25 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,54 +243,57 @@ https://github.com/NachoNievaG/atac.nvim
- Console Host
- Windows 11 (Pro)
- WSL2 Debian
- WSL2 Debian 12
- Windows 10 (Pro)
- Windows 8.1 (N)
- Ubuntu Desktop Terminal
- Ubuntu 23.04 64-bit
- Ubuntu 17.10
- Pop!_OS 20.04
- (Arch, Manjaro) KDE Konsole
- (Arch, NixOS) Kitty
- Linux Mint
- (OpenSuse) Alacritty
- (Chrome OS) Crostini
- Apple
- macOS Monterey 12.7.1 (Intel-Chip)
- macOS Sonama 14.4 (M1 Max, Apple Silicon-Chip)
(List from [here](https://github.com/crossterm-rs/crossterm#tested-terminals))
### Dependencies
| Library | Version | Reason |
|--------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|----------------------------------------------------------------------------------------|
| [reqwest](https://github.com/seanmonstar/reqwest) & [reqwest cookie store](https://github.com/pfernie/reqwest_cookie_store) | 0.11.27 & 0.6.0 | Send requests |
| [ratatui](https://github.com/ratatui-org/ratatui) | 0.26.2 | Terminal UI framework |
| [crossterm](https://github.com/crossterm-rs/crossterm) | 0.27.0 | Terminal Backend |
| [crokey](https://github.com/Canop/crokey) | 0.6.4 | Used to parse, use key bindings files and some utilities |
| [tui-big-text](https://github.com/joshka/tui-big-text) | 0.4.2 | Display big texts. Only used for displaying ATAC in the homepage. |
| [tui-tree-widget](https://github.com/EdJoPaTo/tui-rs-tree-widget) | 0.19.0 | Display tree-like lists. Used for displaying the collections. |
| [tui-textarea](https://github.com/rhysd/tui-textarea) | 0.5.0 | Text area that handle a lot of features. Used for editing request body. |
| [throbber-widgets-tui](https://github.com/arkbig/throbber-widgets-tui) | 0.4.1 | Display loading UI elements. Used when request is pending. |
| [ratatui-image](https://github.com/benjajaja/ratatui-image) | 1.0.0 | Display response images. |
| [image](https://github.com/image-rs/image) | 0.24.9 | Decode images. |
| [reqwest](https://github.com/seanmonstar/reqwest) & [reqwest cookie store](https://github.com/pfernie/reqwest_cookie_store) | 0.12.5 & 0.8.0 | Send requests |
| [ratatui](https://github.com/ratatui-org/ratatui) | 0.27.0 | Terminal UI framework |
| [crokey](https://github.com/Canop/crokey) | 1.0 | Used to parse, use key bindings files and some utilities |
| [tui-big-text](https://github.com/joshka/tui-big-text) | 0.4.5 | Display big texts. Only used for displaying ATAC in the homepage. |
| [tui-tree-widget](https://github.com/EdJoPaTo/tui-rs-tree-widget) | 0.21.0 | Display tree-like lists. Used for displaying the collections. |
| [My fork](https://github.com/Julien-cpsn/tui-textarea) of [tui-textarea](https://github.com/rhysd/tui-textarea) | 0.4.1 | Text area that handle a lot of features. Used for editing request body. |
| [throbber-widgets-tui](https://github.com/arkbig/throbber-widgets-tui) | 0.6.0 | Display loading UI elements. Used when request is pending. |
| [ratatui-image](https://github.com/benjajaja/ratatui-image) | 1.0.1 | Display response images. |
| [image](https://github.com/image-rs/image) | 0.25.1 | Decode images. |
| [syntect](https://github.com/trishume/syntect) | 5.2.0 | Syntax highlighting |
| [serde](https://github.com/serde-rs/serde) ([serde_json](https://github.com/serde-rs/json), [serde-yaml](https://github.com/dtolnay/serde-yaml)) | 1.0.197 (1.0.144, 0.9.34) | Serialize & Deserialize application data into files |
| [serde](https://github.com/serde-rs/serde) ([serde_json](https://github.com/serde-rs/json), [serde-yaml](https://github.com/dtolnay/serde-yaml)) | 1.0.203 (1.0.118, 0.9.34) | Serialize & Deserialize application data into files |
| [jsonxf](https://github.com/gamache/jsonxf) | 0.1.1 | Pretty print JSON |
| [toml](https://github.com/toml-rs/toml) | 0.8.11 | Serialize & Deserialize application config files |
| [toml](https://github.com/toml-rs/toml) | 0.8.14 | Serialize & Deserialize application config files |
| [boa_engine](https://github.com/boa-dev/boa) | 0.18.0 | Create Javascript runtimes. Used for pre and post request scripts |
| [My fork](https://github.com/Julien-cpsn/postman-collection-rs) of [postman_collection](https://github.com/mandrean/postman-collection-rs) | 0.2.1 | Deserialize Postman collection files |
| [My fork](https://github.com/Julien-cpsn/postman-collection-rs) of [postman_collection](https://github.com/mandrean/postman-collection-rs) | 0.2.3 | Deserialize Postman collection files |
| [curl-parser](https://github.com/tyrchen/curl-parser) | 0.3.1 | Parse cURL request files |
| [clap](https://github.com/clap-rs/clap) | 4.5.0 | Command Line Argument Parser |
| [clap](https://github.com/clap-rs/clap) | 4.5.8 | Command Line Argument Parser |
| [dirs](https://github.com/dirs-dev/dirs-rs) | 5.0.1 | Use system files |
| [arboard](https://github.com/1Password/arboard) | 3.3.2 | Copy response body to clipboard |
| [tokio](https://github.com/tokio-rs/tokio) | 1.0.0 | Handle asynchronous requests |
| [parking_lot](https://github.com/Amanieu/parking_lot) | 0.12.2 | Smaller, faster and more flexible implementation of RwLock and Mutex. Used everywhere. |
| [strum](https://github.com/Peternator7/strum) | 0.26.2 | Enum facilities |
| [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) | 1.4.0 | Allows for more flexible constants. Mainly used for accessing CLI arguments everywhere |
| [arboard](https://github.com/1Password/arboard) | 3.4.0 | Copy response body to clipboard |
| [tokio](https://github.com/tokio-rs/tokio) | 1.38.0 | Handle asynchronous requests |
| [parking_lot](https://github.com/Amanieu/parking_lot) | 0.12.3 | Smaller, faster and more flexible implementation of RwLock and Mutex. Used everywhere. |
| [strum](https://github.com/Peternator7/strum) | 0.26.3 | Enum facilities |
| [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) | 1.5.0 | Allows for more flexible constants. Mainly used for accessing CLI arguments everywhere |
| [nestify](https://github.com/snowfoxsh/nestify) | 0.3.3 | Used to nest struct definitions |
| [walkdir](https://github.com/BurntSushi/walkdir) | 2.5.0 | Recursively retrieve files |
| [snailquote](https://github.com/euank/snailquote) | 0.3.1 | Unescape string |
| [indexmap](https://github.com/indexmap-rs/indexmap) | 2.2.6 | Ordered hashmap. Used in environments to preserve files' values order |
| [base64](https://github.com/marshallpierce/rust-base64) | 0.22.0 | Encode auth. |
| [regex](https://github.com/rust-lang/regex) | 1.10.3 | Regex. Using for parsing requests URL |
| [base64](https://github.com/marshallpierce/rust-base64) | 0.22.1 | Encode auth. |
| [regex](https://github.com/rust-lang/regex) | 1.10.5 | Regex. Using for parsing requests URL |
### Binary size
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::fs::File;
use std::sync::Arc;
use std::time::Duration;

use crossterm::terminal::disable_raw_mode;
use ratatui::crossterm::terminal::disable_raw_mode;
use parking_lot::RwLock;
use ratatui::backend::Backend;
use ratatui::Terminal;
Expand Down
11 changes: 7 additions & 4 deletions src/app/app_logic/collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,11 @@ impl App<'_> {
}

pub fn delete_request(&mut self) {
let selected_request_index = self.collections_tree.state.selected();
self.collections[selected_request_index[0]].requests.remove(selected_request_index[1]);
let selected_request_index = self.collections_tree.state.selected().to_vec();
let collection_index = selected_request_index[0].clone();
let request_index = selected_request_index[1].clone();

self.collections[collection_index].requests.remove(request_index);

self.collections_tree.state.select(Vec::new());
self.collections_tree.selected = None;
Expand Down Expand Up @@ -306,7 +309,7 @@ impl App<'_> {
return;
}

let mut selection = self.collections_tree.state.selected();
let mut selection = self.collections_tree.state.selected().to_vec();

// Cannot decrement selection further
if selection[1] == 0 {
Expand All @@ -333,7 +336,7 @@ impl App<'_> {
return;
}

let mut selection = self.collections_tree.state.selected();
let mut selection = self.collections_tree.state.selected().to_vec();

// Cannot increment selection further
if selection[1] == self.collections[selection[0]].requests.len() - 1 {
Expand Down
2 changes: 1 addition & 1 deletion src/app/app_states.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crokey::{key, KeyCombination};
use crossterm::event::{KeyCode, KeyModifiers};
use ratatui::crossterm::event::{KeyCode, KeyModifiers};
use lazy_static::lazy_static;
use parking_lot::RwLock;
use ratatui::prelude::Span;
Expand Down
4 changes: 2 additions & 2 deletions src/app/events.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crokey::KeyCombination;
use crokey::OneToThree::One;
use crossterm::event;
use crossterm::event::{Event, KeyCode, KeyEventKind};
use ratatui::crossterm::event;
use ratatui::crossterm::event::{Event, KeyCode, KeyEventKind};
use tui_textarea::CursorMove;

use crate::app::app::App;
Expand Down
4 changes: 2 additions & 2 deletions src/app/startup/prepare_terminal.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::io::stdout;
use crossterm::ExecutableCommand;
use crossterm::terminal::{enable_raw_mode, EnterAlternateScreen};
use ratatui::crossterm::ExecutableCommand;
use ratatui::crossterm::terminal::{enable_raw_mode, EnterAlternateScreen};
use crate::app::app::App;

impl App<'_> {
Expand Down
5 changes: 4 additions & 1 deletion src/app/ui/collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ impl<'a> App<'a> {
})
.collect();

let collections_tree = Tree::new(self.collections_tree.items.clone())

let tree_items = self.collections_tree.items.clone();

let collections_tree = Tree::new(&tree_items)
.unwrap()
.highlight_style(Style::default().add_modifier(Modifier::BOLD))
.highlight_symbol(">")
Expand Down
Loading

0 comments on commit b4733d4

Please sign in to comment.