From b9ea77335ed6b45734abb3371df258f521745bc1 Mon Sep 17 00:00:00 2001 From: grtcdr Date: Tue, 29 Oct 2024 10:48:45 +0100 Subject: [PATCH] Vendor ansi-to-tui and color-to-tui --- .github/workflows/macchina.yml | 4 +++- .gitmodules | 6 ++++++ Cargo.lock | 30 +++++++++++++++++++----------- Cargo.toml | 9 +++------ vendor/ansi-to-tui | 1 + vendor/color-to-tui | 1 + 6 files changed, 33 insertions(+), 18 deletions(-) create mode 100644 .gitmodules create mode 160000 vendor/ansi-to-tui create mode 160000 vendor/color-to-tui diff --git a/.github/workflows/macchina.yml b/.github/workflows/macchina.yml index d8b2642..ecd733f 100644 --- a/.github/workflows/macchina.yml +++ b/.github/workflows/macchina.yml @@ -121,12 +121,14 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + submodules: true - name: Bootstrap uses: dtolnay/rust-toolchain@stable with: targets: ${{ matrix.target }} - + - name: Install cross run: cargo install cross --git https://github.com/cross-rs/cross if: ${{ matrix.cross }} diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c09e2c3 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "vendor/color-to-tui"] + path = vendor/color-to-tui + url = https://github.com/Macchina-CLI/color-to-tui +[submodule "vendor/ansi-to-tui"] + path = vendor/ansi-to-tui + url = https://github.com/Macchina-CLI/ansi-to-tui diff --git a/Cargo.lock b/Cargo.lock index dcfcb26..28e3a59 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -46,9 +46,7 @@ dependencies = [ [[package]] name = "ansi-to-tui" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00c4af0bef1b514c9b6a32a773caf604c1390fa7913f4eaa23bfe76f251d6a42" +version = "7.0.0" dependencies = [ "nom", "ratatui", @@ -304,8 +302,6 @@ dependencies = [ [[package]] name = "color-to-tui" version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb7fe3c2fe4e88669ff503b2502dffc2f69125f276ae8ecb79439c3dd22f292" dependencies = [ "ratatui", "serde", @@ -756,6 +752,12 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "indoc" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" + [[package]] name = "instability" version = "0.3.2" @@ -933,7 +935,7 @@ dependencies = [ "shellexpand", "thiserror", "toml", - "unicode-width", + "unicode-width 0.1.13", "vergen", ] @@ -1246,23 +1248,23 @@ dependencies = [ [[package]] name = "ratatui" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdef7f9be5c0122f890d58bdf4d964349ba6a6161f705907526d891efabba57d" +checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b" dependencies = [ "bitflags 2.6.0", "cassowary", "compact_str", "crossterm", + "indoc", "instability", "itertools 0.13.0", "lru", "paste", "strum", - "strum_macros", "unicode-segmentation", "unicode-truncate", - "unicode-width", + "unicode-width 0.2.0", ] [[package]] @@ -1724,7 +1726,7 @@ checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" dependencies = [ "itertools 0.13.0", "unicode-segmentation", - "unicode-width", + "unicode-width 0.1.13", ] [[package]] @@ -1733,6 +1735,12 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + [[package]] name = "utf8parse" version = "0.2.2" diff --git a/Cargo.toml b/Cargo.toml index cc4eebf..b375faa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,18 +20,15 @@ colored = "2.0.4" rand = "0.8.5" unicode-width = "0.1.11" lazy_static = "1.4.0" -ansi-to-tui = "6.0.0" +ansi-to-tui = { path = "vendor/ansi-to-tui" } +color-to-tui = { path = "vendor/color-to-tui" } dirs = "5.0.1" toml = { version = "0.8.8", features = ["parse"] } serde_json = "1.0.107" thiserror = "1.0.49" -ratatui = { version = "0.28", default-features = false, features = ["crossterm"] } +ratatui = { version = "0.29", default-features = false, features = ["crossterm"] } serde = { version = "1.0.188", features = ["derive"] } -[dependencies.color-to-tui] -version = "0.3.0" -ratatui = { version = "0.28", default-features = false } - [build-dependencies.vergen] version = "8.2.6" default-features = false diff --git a/vendor/ansi-to-tui b/vendor/ansi-to-tui new file mode 160000 index 0000000..950d680 --- /dev/null +++ b/vendor/ansi-to-tui @@ -0,0 +1 @@ +Subproject commit 950d68067ed8c7f74469eb2fd996e04e1b931481 diff --git a/vendor/color-to-tui b/vendor/color-to-tui new file mode 160000 index 0000000..9a1b684 --- /dev/null +++ b/vendor/color-to-tui @@ -0,0 +1 @@ +Subproject commit 9a1b684d92cc64994889e100575e38316a68670b