move butler to another crate

This commit is contained in:
Nikita Galaiko 2023-07-17 13:21:47 +02:00
parent f0f615c150
commit d1fc5d23e0
20 changed files with 6286 additions and 19 deletions

3
butler/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# Generated by Cargo
# will have compiled files and executables
/target/

6250
butler/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

18
butler/Cargo.toml Normal file
View File

@ -0,0 +1,18 @@
[package]
name = "butler"
version = "0.0.0"
description = ""
authors = [""]
license = ""
repository = ""
edition = "2021"
rust-version = "1.57"
[dependencies]
git2 = { version = "0.17.2", features = ["vendored-openssl", "vendored-libgit2"] }
dirs = "5.0.1"
colored = "2.0.0"
clap = { version = "4.0", features = ["derive"] }
dialoguer = "0.10.4"
anyhow = "1.0.71"
git-butler-tauri = { path = "../src-tauri" }

View File

@ -1,9 +1,6 @@
mod app;
mod commands;
use std::process::ExitCode;
use commands::RunCommand;
use crate::commands::{self, RunCommand};
use clap::{Parser, Subcommand};
use colored::Colorize;

View File

@ -4,7 +4,7 @@ use colored::Colorize;
use git_butler_tauri::virtual_branches;
use crate::cli::butler::app::App;
use crate::app::App;
#[derive(Debug, Args)]
pub struct Branches {}

View File

@ -3,7 +3,7 @@ use clap::Args;
use git_butler_tauri::{sessions, virtual_branches};
use crate::cli::butler::app::App;
use crate::app::App;
#[derive(Debug, Args)]
pub struct Clear {}

View File

@ -5,7 +5,7 @@ use dialoguer::{console::Term, theme::ColorfulTheme, Input, Select};
use git_butler_tauri::{reader, sessions, virtual_branches};
use crate::cli::butler::app::App;
use crate::app::App;
#[derive(Debug, Args)]
pub struct Commit {}

View File

@ -1,7 +1,7 @@
use anyhow::{Context, Result};
use clap::Args;
use crate::cli::butler::app::App;
use crate::app::App;
#[derive(Debug, Args)]
pub struct Flush {}

View File

@ -4,7 +4,7 @@ use colored::Colorize;
use git_butler_tauri::{reader, sessions, virtual_branches};
use crate::cli::butler::app::App;
use crate::app::App;
#[derive(Debug, Args)]
pub struct Info {}

View File

@ -4,7 +4,7 @@ use dialoguer::{console::Term, theme::ColorfulTheme, MultiSelect, Select};
use git_butler_tauri::{reader, sessions, virtual_branches};
use crate::cli::butler::app::App;
use crate::app::App;
#[derive(Debug, Args)]
pub struct Move {}

View File

@ -4,7 +4,7 @@ use dialoguer::{theme::ColorfulTheme, Input};
use git_butler_tauri::virtual_branches;
use crate::cli::butler::app::App;
use crate::app::App;
#[derive(Debug, Args)]
pub struct New {}

View File

@ -3,7 +3,7 @@ use clap::Args;
use git_butler_tauri::virtual_branches;
use crate::cli::butler::app::App;
use crate::app::App;
#[derive(Debug, Args)]
pub struct Remotes {}

View File

@ -3,7 +3,7 @@ use clap::Args;
use git_butler_tauri::{reader, sessions, virtual_branches};
use crate::cli::butler::app::App;
use crate::app::App;
#[derive(Debug, Args)]
pub struct Reset {}

View File

@ -3,7 +3,7 @@ use clap::Args;
use colored::Colorize;
use dialoguer::{console::Term, theme::ColorfulTheme, Select};
use crate::cli::butler::app::App;
use crate::app::App;
#[derive(Debug, Args)]
pub struct Setup {}

View File

@ -4,7 +4,7 @@ use colored::Colorize;
use git_butler_tauri::virtual_branches;
use crate::cli::butler::app::App;
use crate::app::App;
#[derive(Debug, Args)]
pub struct Status {}

View File

@ -2,8 +2,10 @@ use std::process::ExitCode;
use clap::Parser;
mod commands;
mod app;
mod cli;
fn main() -> ExitCode {
cli::Butler::parse().run()
cli::Cli::parse().run()
}

View File

@ -1,3 +0,0 @@
mod butler;
pub use butler::Cli as Butler;