Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAlan404 committed Aug 5, 2024
1 parent 69fac3b commit 21c789f
Show file tree
Hide file tree
Showing 22 changed files with 115 additions and 48 deletions.
1 change: 1 addition & 0 deletions src/api/app/actions/build/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ impl App {

/// Process a single file. Calls [`Self::should_bootstrap_file`] on the file to decide if it should process it
/// or copy it.
#[allow(unused)]
pub async fn action_bootstrap_file(
self: Arc<Self>,
output_base: &Path,
Expand Down
12 changes: 0 additions & 12 deletions src/api/app/actions/init/mod.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/api/app/actions/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
mod build;
mod init;
mod markdown;
mod script;
mod lockfile;
2 changes: 1 addition & 1 deletion src/api/app/actions/script/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::path::Path;

use anyhow::Result;

use crate::api::{app::{App, APP_VERSION}, models::server::Server, tools::java::get_java_installation_for, utils::script::Shell};
use crate::api::{app::{App, APP_VERSION}, models::server::Server, utils::script::Shell};

impl App {
async fn get_script_lines_for(&self, shell: &Shell, server: &Server) -> Result<Vec<String>> {
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl App {
dirs::cache_dir().map(|p| p.join("mcman"))
});

let mut app = Self {
let app = Self {
http_client,
server: Arc::new(RwLock::new(None)),
network: Arc::new(RwLock::new(None)),
Expand Down
2 changes: 2 additions & 0 deletions src/api/app/options/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ pub struct AppOptions {
pub github_token: Option<String>,
#[config(env = "CF_API_TOKEN")]
pub curseforge_token: Option<String>,
#[config(env = "MODRINTH_API_TOKEN")]
pub modrinth_token: Option<String>,

#[config(default = false)]
pub use_curseforge_api: bool,
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/step/cache_check.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::Path;

use anyhow::{anyhow, Context, Result};
use anyhow::{Context, Result};
use futures::{StreamExt, TryStreamExt};
use tokio::{fs::File, io::BufWriter};
use tokio_util::io::ReaderStream;
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/step/download.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::Path;

use anyhow::{anyhow, bail, Context, Result};
use anyhow::{bail, Context, Result};
use futures::TryStreamExt;

use crate::api::{app::App, step::{FileMeta, StepResult}, utils::fs::create_parents};
Expand Down
4 changes: 2 additions & 2 deletions src/api/app/step/remove_file.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::path::Path;

use anyhow::{anyhow, bail, Result};
use anyhow::Result;

use crate::api::{app::App, step::{FileMeta, StepResult}, tools::{self, java::{JavaProcess, JavaVersion}}};
use crate::api::{app::App, step::{FileMeta, StepResult}};

impl App {
pub(super) async fn execute_step_remove_file(
Expand Down
10 changes: 7 additions & 3 deletions src/api/models/modpack_source.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{path::Path, str::FromStr};

use anyhow::Result;
use anyhow::{Context, Result};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

Expand Down Expand Up @@ -33,11 +33,15 @@ impl FromStr for ModpackSource {
impl ModpackSource {
pub fn accessor(&self, base: &Path) -> Result<Accessor> {
let str = match self {
Self::Local { path } => &base.join(path).to_string_lossy().into_owned(),
Self::Local { path } => &base.join(path)
.canonicalize()
.with_context(|| format!("Resolving path: {:?}", base.join(path)))?
.to_string_lossy()
.into_owned(),
Self::Remote { url } => url,
};

Ok(Accessor::from(str)?)
Ok(Accessor::from(str).with_context(|| "Creating Accessor")?)

Check failure on line 44 in src/api/models/modpack_source.rs

View workflow job for this annotation

GitHub Actions / clippy

question mark operator is useless here

error: question mark operator is useless here --> src/api/models/modpack_source.rs:44:9 | 44 | Ok(Accessor::from(str).with_context(|| "Creating Accessor")?) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `Accessor::from(str).with_context(|| "Creating Accessor")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
}
}

9 changes: 6 additions & 3 deletions src/api/models/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,12 @@ impl Source {

pub fn accessor(&self, relative_to: &Path) -> Result<Accessor> {
match &self.source_type {
SourceType::File { path } => Ok(Accessor::Local(path.into())),
SourceType::Folder { path } => Ok(Accessor::Local(path.into())),
SourceType::Modpack { modpack, .. } => modpack.accessor(relative_to),
SourceType::File { path } => Ok(Accessor::Local(relative_to.join(path).canonicalize()
.with_context(|| format!("Resolving path: {:?}", relative_to.join(path)))?)),
SourceType::Folder { path } => Ok(Accessor::Local(relative_to.join(path).canonicalize()
.with_context(|| format!("Resolving path: {:?}", relative_to.join(path)))?)),
SourceType::Modpack { modpack, .. } => modpack.accessor(relative_to)
.with_context(|| "Getting Modpack Accessor"),
}
}

Expand Down
5 changes: 5 additions & 0 deletions src/api/sources/github/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ impl<'a> GithubAPI<'a> {
let cached_data = self.0.cache.try_get_json::<CachedData<T>>(&path)?;

let mut headers = HeaderMap::new();

if let Some(token) = &self.0.options.github_token {
headers.insert("Authorization", HeaderValue::from_str(token)?);
}

if let Some(cached_data) = &cached_data {
headers.insert("if-none-match", HeaderValue::from_str(&cached_data.etag)?);
}
Expand Down
21 changes: 16 additions & 5 deletions src/api/sources/modrinth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use std::collections::HashMap;

use anyhow::{anyhow, Result};
use models::{ModrinthFile, ModrinthProject, ModrinthVersion};
use reqwest::header::{HeaderMap, HeaderValue};
use serde::de::DeserializeOwned;

use crate::api::{
Expand All @@ -16,7 +17,18 @@ pub struct ModrinthAPI<'a>(pub &'a App);

impl<'a> ModrinthAPI<'a> {
pub async fn fetch_api<T: DeserializeOwned>(&self, url: String) -> Result<T> {
self.0.http_get_json(&*format!("{}/{url}", self.0.options.api_urls.modrinth)).await
let mut headers = HeaderMap::new();

if let Some(token) = &self.0.options.modrinth_token {
headers.insert("Authorization", HeaderValue::from_str(token)?);
}

self.0
.http_get_json_with(
&*format!("{}/{url}", self.0.options.api_urls.modrinth),
|req| req.headers(headers),
)
.await
}

pub async fn fetch_project(&self, id: &str) -> Result<ModrinthProject> {
Expand Down Expand Up @@ -52,7 +64,8 @@ impl<'a> ModrinthAPI<'a> {
return Ok(id.to_owned());
}

let res: ModrinthProjectCheckResponse = self.fetch_api(format!("project/{slug}/check")).await?;
let res: ModrinthProjectCheckResponse =
self.fetch_api(format!("project/{slug}/check")).await?;

let mut ids = store.unwrap_or_default();
ids.insert(slug.to_owned(), res.id.clone());
Expand Down Expand Up @@ -137,8 +150,6 @@ impl<'a> ModrinthAPI<'a> {
let id = self.get_id(id).await?;
let (file, _) = self.fetch_file(&id, version).await?;

Ok(vec![
Step::RemoveFile(FileMeta::filename(file.filename))
])
Ok(vec![Step::RemoveFile(FileMeta::filename(file.filename))])
}
}
2 changes: 1 addition & 1 deletion src/api/sources/quilt/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anyhow::{bail, Result};
use anyhow::Result;

use crate::api::{app::App, models::Environment, step::Step};

Expand Down
18 changes: 14 additions & 4 deletions src/api/tools/git/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
use std::{ffi::OsStr, process::Command};
use std::{ffi::OsStr, process::Command, sync::LazyLock};

use anyhow::Result;
use anyhow::{anyhow, Result};

pub const GIT: &str = "git";

static GIT_VERSION: LazyLock<Option<String>> = LazyLock::new(|| version_check());

Check failure on line 7 in src/api/tools/git/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

redundant closure

error: redundant closure --> src/api/tools/git/mod.rs:7:62 | 7 | static GIT_VERSION: LazyLock<Option<String>> = LazyLock::new(|| version_check()); | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `version_check` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `-D clippy::redundant-closure` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::redundant_closure)]`

Check failure on line 7 in src/api/tools/git/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

current MSRV (Minimum Supported Rust Version) is `1.75.0` but this item is stable since `1.80.0`

error: current MSRV (Minimum Supported Rust Version) is `1.75.0` but this item is stable since `1.80.0` --> src/api/tools/git/mod.rs:7:48 | 7 | static GIT_VERSION: LazyLock<Option<String>> = LazyLock::new(|| version_check()); | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv = note: `-D clippy::incompatible-msrv` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::incompatible_msrv)]`

Check warning on line 7 in src/api/tools/git/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

static `GIT_VERSION` is never used

warning: static `GIT_VERSION` is never used --> src/api/tools/git/mod.rs:7:8 | 7 | static GIT_VERSION: LazyLock<Option<String>> = LazyLock::new(|| version_check()); | ^^^^^^^^^^^

pub fn require_git() -> Result<()> {

Check warning on line 9 in src/api/tools/git/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

function `require_git` is never used

warning: function `require_git` is never used --> src/api/tools/git/mod.rs:9:8 | 9 | pub fn require_git() -> Result<()> { | ^^^^^^^^^^^
GIT_VERSION.as_ref().map(|_| ()).ok_or(anyhow!("Couldn't invoke git"))
}

pub fn git_command<I: IntoIterator<Item = S>, S: AsRef<OsStr>>(args: I) -> Result<String> {
Ok(String::from_utf8_lossy(Command::new(GIT)
.args(args)
Expand All @@ -13,8 +19,12 @@ pub fn git_command<I: IntoIterator<Item = S>, S: AsRef<OsStr>>(args: I) -> Resul
).into_owned())
}

pub fn git_check() -> Option<String> {
git_command(["--version"]).ok().map(|s| s.replacen("git version ", "", 1))
pub fn version_check() -> Option<String> {
git_command(["--version"]).ok().map(|s| s.trim().replacen("git version ", "", 1))
}

pub fn is_dirty() -> Result<bool> {

Check warning on line 26 in src/api/tools/git/mod.rs

View workflow job for this annotation

GitHub Actions / clippy

function `is_dirty` is never used

warning: function `is_dirty` is never used --> src/api/tools/git/mod.rs:26:8 | 26 | pub fn is_dirty() -> Result<bool> { | ^^^^^^^^
require_git()?;
Ok(!git_command(["status", "--porcelain"])?.is_empty())
}

13 changes: 7 additions & 6 deletions src/api/utils/accessor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::api::app::App;
pub enum Accessor {
Local(PathBuf),
Remote(reqwest::Url),
ZipLocal(ZipArchive<std::fs::File>),
ZipLocal((PathBuf, ZipArchive<std::fs::File>)),
//ZipRemote(SomeSortOfTempFile, ZipArchive<std::fs::File>),
}

Expand All @@ -20,7 +20,7 @@ impl ToString for Accessor {
match self {
Accessor::Local(path) => path.to_string_lossy().into_owned(),
Accessor::Remote(url) => url.to_string(),
Accessor::ZipLocal(_) => String::from("a zip archive"),
Accessor::ZipLocal((path ,_)) => path.to_string_lossy().into_owned(),

Check warning on line 23 in src/api/utils/accessor.rs

View workflow job for this annotation

GitHub Actions / clippy

this match arm has an identical body to another arm

warning: this match arm has an identical body to another arm --> src/api/utils/accessor.rs:23:13 | 23 | Accessor::ZipLocal((path ,_)) => path.to_string_lossy().into_owned(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try changing either arm body = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms help: or try merging the arm patterns | 23 | Accessor::ZipLocal((path ,_)) | Accessor::Local(path) => path.to_string_lossy().into_owned(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: and remove this obsolete arm | 21 - Accessor::Local(path) => path.to_string_lossy().into_owned(), |
}
}
}

Check failure on line 26 in src/api/utils/accessor.rs

View workflow job for this annotation

GitHub Actions / clippy

direct implementation of `ToString`

error: direct implementation of `ToString` --> src/api/utils/accessor.rs:18:1 | 18 | / impl ToString for Accessor { 19 | | fn to_string(&self) -> String { 20 | | match self { 21 | | Accessor::Local(path) => path.to_string_lossy().into_owned(), ... | 25 | | } 26 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
Expand All @@ -32,16 +32,17 @@ impl Accessor {
} else if str.ends_with(".zip") || str.ends_with(".mrpack") {

Check warning on line 32 in src/api/utils/accessor.rs

View workflow job for this annotation

GitHub Actions / clippy

case-sensitive file extension comparison

warning: case-sensitive file extension comparison --> src/api/utils/accessor.rs:32:19 | 32 | } else if str.ends_with(".zip") || str.ends_with(".mrpack") { | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a case-insensitive comparison instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#case_sensitive_file_extension_comparisons = note: `-W clippy::case-sensitive-file-extension-comparisons` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::case_sensitive_file_extension_comparisons)]` help: use std::path::Path | 32 ~ } else if std::path::Path::new(str) 33 + .extension() 34 ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("zip")) || str.ends_with(".mrpack") { |
let file = std::fs::File::open(str)?;
let archive = ZipArchive::new(file)?;
Ok(Self::ZipLocal(archive))
Ok(Self::ZipLocal((PathBuf::from(str), archive)))
} else {
Ok(Self::Local(PathBuf::from(str)))
}
}

/// Try listing a directory
#[allow(unused)]
pub async fn dir(&self) -> Result<Vec<String>> {
match self {
Accessor::ZipLocal(zip) => Ok(zip.file_names().map(ToOwned::to_owned).collect()),
Accessor::ZipLocal((_, zip)) => Ok(zip.file_names().map(ToOwned::to_owned).collect()),
Accessor::Local(path) => Ok(path
.read_dir()?
.filter_map(|r| r.ok())

Check warning on line 48 in src/api/utils/accessor.rs

View workflow job for this annotation

GitHub Actions / clippy

redundant closure

warning: redundant closure --> src/api/utils/accessor.rs:48:29 | 48 | .filter_map(|r| r.ok()) | ^^^^^^^^^^ help: replace the closure with the method itself: `std::result::Result::ok` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
Expand All @@ -57,7 +58,7 @@ impl Accessor {
Accessor::Local(base) => Ok(serde_json::from_reader(std::fs::File::open(
base.join(path),
)?)?),
Accessor::ZipLocal(zip) => Ok(serde_json::from_reader(zip.by_name(path)?)?),
Accessor::ZipLocal((_, zip)) => Ok(serde_json::from_reader(zip.by_name(path)?)?),
Accessor::Remote(url) => Ok(app.http_get_json(url.join(path)?).await?),
}
}
Expand All @@ -68,7 +69,7 @@ impl Accessor {
Accessor::Local(base) => Ok(toml::from_str(
&tokio::fs::read_to_string(base.join(path)).await?,
)?),
Accessor::ZipLocal(zip) => {
Accessor::ZipLocal((_, zip)) => {
let file = zip.by_name(path)?;

Ok(toml::from_str(&std::io::read_to_string(file)?)?)
Expand Down
9 changes: 7 additions & 2 deletions src/api/ws/msg.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@


use serde::{Deserialize, Serialize};
use tokio_tungstenite::tungstenite::Message;

use crate::api::models::{network::Network, server::Server};
use crate::api::models::{network::Network, server::Server, Source};

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[serde(tag = "type", content = "data", rename_all = "snake_case")]
pub enum MsgIn {

AddSource {
to: ServerOrNetwork,
source: Source,
},
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
Expand Down
1 change: 1 addition & 0 deletions src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ pub mod markdown;
pub mod migrate;
pub mod websocket;
pub mod run;
pub mod update;
6 changes: 3 additions & 3 deletions src/commands/run.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::{path::PathBuf, sync::Arc};
use std::sync::Arc;

use anyhow::{bail, Context, Result};
use anyhow::Result;

use crate::api::{app::App, tools::java::{get_java_installation_for, JavaProcess}, ws::WebsocketServer};
use crate::api::{app::App, tools::java::JavaProcess};

#[derive(clap::Args)]
pub struct RunArgs {
Expand Down
19 changes: 17 additions & 2 deletions src/commands/sources/list.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
use std::sync::Arc;

use anyhow::Result;
use console::style;

use crate::api::app::App;
use crate::api::{app::App, models::{ModpackSource, SourceType}};

Check warning on line 6 in src/commands/sources/list.rs

View workflow job for this annotation

GitHub Actions / clippy

unused import: `ModpackSource`

warning: unused import: `ModpackSource` --> src/commands/sources/list.rs:6:37 | 6 | use crate::api::{app::App, models::{ModpackSource, SourceType}}; | ^^^^^^^^^^^^^

#[derive(clap::Args)]
pub struct Args {}

pub async fn run(app: Arc<App>, args: Args) -> Result<()> {

Check warning on line 11 in src/commands/sources/list.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `args`

warning: unused variable: `args` --> src/commands/sources/list.rs:11:33 | 11 | pub async fn run(app: Arc<App>, args: Args) -> Result<()> { | ^^^^ help: if this is intentional, prefix it with an underscore: `_args`
let sources = app.collect_sources().await?;

println!("{sources:#?}");
for (idx, (base, source)) in sources.iter().enumerate() {
println!(
"{} {}{}",
style(idx.to_string() + ".").cyan().bold(),
style(source.source_name()).bold(),
match source.source_type {
SourceType::Modpack { modpack_type, .. } => format!(
"/{}", style(modpack_type.to_string()).bold()
),
_ => String::new(),
}
);

println!(" -> {}", style(source.accessor(base)?.to_string()).dim())

Check warning on line 27 in src/commands/sources/list.rs

View workflow job for this annotation

GitHub Actions / clippy

consider adding a `;` to the last statement for consistent formatting

warning: consider adding a `;` to the last statement for consistent formatting --> src/commands/sources/list.rs:27:9 | 27 | println!(" -> {}", style(source.accessor(base)?.to_string()).dim()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `println!(" -> {}", style(source.accessor(base)?.to_string()).dim());` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
}

Ok(())
}
17 changes: 17 additions & 0 deletions src/commands/update.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use std::sync::Arc;

use anyhow::Result;

use crate::api::{app::App, tools::git::version_check};

#[derive(clap::Args)]
pub struct Args {

}

pub async fn run(app: Arc<App>, args: Args) -> Result<()> {

Check warning on line 12 in src/commands/update.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `args`

warning: unused variable: `args` --> src/commands/update.rs:12:33 | 12 | pub async fn run(app: Arc<App>, args: Args) -> Result<()> { | ^^^^ help: if this is intentional, prefix it with an underscore: `_args`

Check warning on line 12 in src/commands/update.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `app`

warning: unused variable: `app` --> src/commands/update.rs:12:18 | 12 | pub async fn run(app: Arc<App>, args: Args) -> Result<()> { | ^^^ help: if this is intentional, prefix it with an underscore: `_app`
println!("{:#?}", version_check());

Ok(())
}

Check warning on line 16 in src/commands/update.rs

View workflow job for this annotation

GitHub Actions / clippy

unused `async` for function with no await statements

warning: unused `async` for function with no await statements --> src/commands/update.rs:12:1 | 12 | / pub async fn run(app: Arc<App>, args: Args) -> Result<()> { 13 | | println!("{:#?}", version_check()); 14 | | 15 | | Ok(()) 16 | | } | |_^ | = help: consider removing the `async` from this function = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_async

5 changes: 5 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ enum Commands {
#[command(alias = "md", subcommand)]
Markdown(commands::markdown::Commands),
Migrate(commands::migrate::Args),
#[command(alias = "ws")]
WebSocket(commands::websocket::Args),
Update(commands::update::Args),
}

#[tokio::main]
Expand Down Expand Up @@ -66,5 +69,7 @@ async fn main() -> Result<()> {
Commands::Java(args) => commands::java::run(app, args).await,
Commands::Markdown(args) => commands::markdown::run(app, args).await,
Commands::Migrate(args) => commands::migrate::run(app, args).await,
Commands::WebSocket(args) => commands::websocket::run(app, args).await,
Commands::Update(args) => commands::update::run(app, args).await,
}
}

0 comments on commit 21c789f

Please sign in to comment.