mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-17 16:16:37 +00:00
Refactor: Create new crate binstalk-git-repo-api
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
dfdaf6952e
commit
9efe39528f
17 changed files with 262 additions and 34 deletions
|
@ -11,9 +11,8 @@ license = "GPL-3.0-only"
|
|||
|
||||
[dependencies]
|
||||
binstalk-bins = { version = "0.4.0", path = "../binstalk-bins" }
|
||||
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-fetchers = { version = "0.4.0", path = "../binstalk-fetchers", features = [
|
||||
"quickinstall",
|
||||
] }
|
||||
|
|
|
@ -4,9 +4,7 @@ use std::{
|
|||
process::{ExitCode, ExitStatus, Termination},
|
||||
};
|
||||
|
||||
use binstalk_downloader::{
|
||||
download::DownloadError, gh_api_client::GhApiError, remote::Error as RemoteError,
|
||||
};
|
||||
use binstalk_downloader::{download::DownloadError, remote::Error as RemoteError};
|
||||
use binstalk_fetchers::FetchError;
|
||||
use compact_str::CompactString;
|
||||
use itertools::Itertools;
|
||||
|
@ -19,7 +17,8 @@ use tracing::{error, warn};
|
|||
use crate::{
|
||||
bins,
|
||||
helpers::{
|
||||
cargo_toml::Error as CargoTomlError, cargo_toml_workspace::Error as LoadManifestFromWSError,
|
||||
cargo_toml::Error as CargoTomlError,
|
||||
cargo_toml_workspace::Error as LoadManifestFromWSError, gh_api_client::GhApiError,
|
||||
},
|
||||
registry::{InvalidRegistryError, RegistryError},
|
||||
};
|
||||
|
|
|
@ -4,7 +4,7 @@ pub(crate) mod target_triple;
|
|||
pub mod tasks;
|
||||
|
||||
pub(crate) use binstalk_downloader::download;
|
||||
pub use binstalk_downloader::gh_api_client;
|
||||
pub use binstalk_git_repo_api::gh_api_client;
|
||||
|
||||
pub(crate) use cargo_toml_workspace::{self, cargo_toml};
|
||||
#[cfg(feature = "git")]
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
pub use binstalk_downloader::remote::*;
|
||||
pub use url::ParseError as UrlParseError;
|
||||
|
||||
use binstalk_downloader::gh_api_client::{GhApiClient, GhReleaseArtifact, HasReleaseArtifact};
|
||||
use std::sync::{
|
||||
atomic::{AtomicBool, Ordering::Relaxed},
|
||||
Once,
|
||||
};
|
||||
use tracing::{debug, warn};
|
||||
|
||||
use super::gh_api_client::{GhApiClient, GhReleaseArtifact, HasReleaseArtifact};
|
||||
use crate::errors::BinstallError;
|
||||
|
||||
/// This function returns a future where its size should be at most size of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue