Refactor: Create new crate binstalk-git-repo-api

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2024-05-05 23:44:19 +10:00
parent dfdaf6952e
commit 9efe39528f
No known key found for this signature in database
GPG key ID: 76D1E687CA3C4928
17 changed files with 262 additions and 34 deletions

View file

@ -12,7 +12,8 @@ license = "GPL-3.0-only"
[dependencies]
async-trait = "0.1.68"
binstalk-downloader = { version = "0.10.3", path = "../binstalk-downloader", default-features = false, features = ["gh-api-client"] }
binstalk-downloader = { version = "0.10.3", path = "../binstalk-downloader", default-features = false }
binstalk-git-repo-api = { version = "0.1.0", path = "../binstalk-git-repo-api" }
binstalk-types = { version = "0.7.0", path = "../binstalk-types" }
bytes = "1.4.0"
compact_str = { version = "0.7.0" }
@ -25,7 +26,10 @@ minisign-verify = "0.2.1"
once_cell = "1.18.0"
strum = "0.26.1"
thiserror = "1.0.52"
tokio = { version = "1.35.0", features = ["rt", "sync"], default-features = false }
tokio = { version = "1.35.0", features = [
"rt",
"sync",
], default-features = false }
tracing = "0.1.39"
url = "2.3.1"

View file

@ -3,12 +3,12 @@ use std::sync::{
Once,
};
use binstalk_downloader::gh_api_client::{GhReleaseArtifact, HasReleaseArtifact};
pub(super) use binstalk_downloader::{
download::{Download, ExtractedFiles},
gh_api_client::GhApiClient,
remote::{Client, Url},
};
pub(super) use binstalk_git_repo_api::gh_api_client::GhApiClient;
use binstalk_git_repo_api::gh_api_client::{GhReleaseArtifact, HasReleaseArtifact};
pub(super) use binstalk_types::cargo_toml_binstall::{PkgFmt, PkgMeta};
pub(super) use compact_str::CompactString;
pub(super) use tokio::task::JoinHandle;

View file

@ -2,9 +2,8 @@
use std::{path::Path, sync::Arc};
use binstalk_downloader::{
download::DownloadError, gh_api_client::GhApiError, remote::Error as RemoteError,
};
use binstalk_downloader::{download::DownloadError, remote::Error as RemoteError};
use binstalk_git_repo_api::gh_api_client::GhApiError;
use binstalk_types::cargo_toml_binstall::SigningAlgorithm;
use thiserror::Error as ThisError;
use tokio::sync::OnceCell;