parent
d36ebc8c74
commit
855048041d
89 changed files with 184 additions and 180 deletions
|
@ -1,4 +1,5 @@
|
|||
use crate::wasm_host::{wit::ToWasmtimeResult, WasmState};
|
||||
use ::http_client::AsyncBody;
|
||||
use ::settings::Settings;
|
||||
use anyhow::{anyhow, bail, Context, Result};
|
||||
use async_compression::futures::bufread::GzipDecoder;
|
||||
|
@ -6,7 +7,6 @@ use async_tar::Archive;
|
|||
use async_trait::async_trait;
|
||||
use futures::AsyncReadExt;
|
||||
use futures::{io::BufReader, FutureExt as _};
|
||||
use http::AsyncBody;
|
||||
use indexed_docs::IndexedDocsDatabase;
|
||||
use language::{
|
||||
language_settings::AllLanguageSettings, LanguageServerBinaryStatus, LspAdapterDelegate,
|
||||
|
@ -209,8 +209,8 @@ impl nodejs::Host for WasmState {
|
|||
#[async_trait]
|
||||
impl lsp::Host for WasmState {}
|
||||
|
||||
impl From<http::github::GithubRelease> for github::GithubRelease {
|
||||
fn from(value: http::github::GithubRelease) -> Self {
|
||||
impl From<::http_client::github::GithubRelease> for github::GithubRelease {
|
||||
fn from(value: ::http_client::github::GithubRelease) -> Self {
|
||||
Self {
|
||||
version: value.tag_name,
|
||||
assets: value.assets.into_iter().map(Into::into).collect(),
|
||||
|
@ -218,8 +218,8 @@ impl From<http::github::GithubRelease> for github::GithubRelease {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<http::github::GithubReleaseAsset> for github::GithubReleaseAsset {
|
||||
fn from(value: http::github::GithubReleaseAsset) -> Self {
|
||||
impl From<::http_client::github::GithubReleaseAsset> for github::GithubReleaseAsset {
|
||||
fn from(value: ::http_client::github::GithubReleaseAsset) -> Self {
|
||||
Self {
|
||||
name: value.name,
|
||||
download_url: value.browser_download_url,
|
||||
|
@ -235,7 +235,7 @@ impl github::Host for WasmState {
|
|||
options: github::GithubReleaseOptions,
|
||||
) -> wasmtime::Result<Result<github::GithubRelease, String>> {
|
||||
maybe!(async {
|
||||
let release = http::github::latest_github_release(
|
||||
let release = ::http_client::github::latest_github_release(
|
||||
&repo,
|
||||
options.require_assets,
|
||||
options.pre_release,
|
||||
|
@ -254,9 +254,12 @@ impl github::Host for WasmState {
|
|||
tag: String,
|
||||
) -> wasmtime::Result<Result<github::GithubRelease, String>> {
|
||||
maybe!(async {
|
||||
let release =
|
||||
http::github::get_release_by_tag_name(&repo, &tag, self.host.http_client.clone())
|
||||
.await?;
|
||||
let release = ::http_client::github::get_release_by_tag_name(
|
||||
&repo,
|
||||
&tag,
|
||||
self.host.http_client.clone(),
|
||||
)
|
||||
.await?;
|
||||
Ok(release.into())
|
||||
})
|
||||
.await
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue