Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion lib/cli-compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ wasmer-compiler = { version = "=6.1.0", path = "../compiler", features = [
"compiler",
] }
wasmer-types = { version = "=6.1.0", path = "../types", features = ["detect-wasm-features"] }
is-terminal = "0.4.7"
colored = "2.0"
anyhow.workspace = true
# For the function names autosuggestion
Expand Down
2 changes: 1 addition & 1 deletion lib/cli-compiler/src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Utility functions for the WebAssembly module
use anyhow::{Context, Result, bail};
use is_terminal::IsTerminal;
use std::io::IsTerminal as _;
use std::path::PathBuf;
use std::{env, path::Path};

Expand Down
1 change: 0 additions & 1 deletion lib/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ time01 = { package = "time", version = "0.1.45", optional = true }
# Third-party dependencies.

http.workspace = true
is-terminal = "0.4.7"
colored = "2.0"
anyhow.workspace = true
bytesize.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/commands/app/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use colored::Colorize;
use dialoguer::{Confirm, Select, theme::ColorfulTheme};
use futures::stream::TryStreamExt;
use indexmap::IndexMap;
use is_terminal::IsTerminal;
use std::io::IsTerminal as _;
use wasmer_backend_api::{
WasmerClient,
types::{AppTemplate, TemplateLanguage},
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/commands/app/delete.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Delete an Edge app.

use dialoguer::Confirm;
use is_terminal::IsTerminal;
use std::io::IsTerminal as _;

use super::util::AppIdentOpts;
use crate::{commands::AsyncCliCommand, config::WasmerEnv};
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/commands/app/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use bytesize::ByteSize;
use colored::Colorize;
use dialoguer::{Confirm, theme::ColorfulTheme};
use indexmap::IndexMap;
use is_terminal::IsTerminal;
use std::io::IsTerminal as _;
use std::io::Write;
use std::{path::Path, path::PathBuf, str::FromStr, time::Duration};
use wasmer_backend_api::{
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/commands/app/regions/list.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{commands::AsyncCliCommand, config::WasmerEnv, opts::ListFormatOpts};
use is_terminal::IsTerminal;
use std::io::IsTerminal as _;

/// List available Edge regions.
#[derive(clap::Parser, Debug)]
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/commands/app/secrets/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{
use anyhow::Context;
use colored::Colorize;
use dialoguer::theme::ColorfulTheme;
use is_terminal::IsTerminal;
use std::io::IsTerminal as _;
use std::{
collections::{HashMap, HashSet},
path::{Path, PathBuf},
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/commands/app/secrets/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
};
use colored::Colorize;
use dialoguer::theme::ColorfulTheme;
use is_terminal::IsTerminal;
use std::io::IsTerminal as _;
use std::path::{Path, PathBuf};
use wasmer_backend_api::WasmerClient;

Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/commands/app/secrets/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
config::WasmerEnv,
opts::ListFormatOpts,
};
use is_terminal::IsTerminal;
use std::io::IsTerminal as _;
use std::path::PathBuf;

/// Retrieve the value of an existing app secret.
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/commands/app/secrets/reveal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{
utils::render::{ItemFormat, ListFormat},
};
use dialoguer::theme::ColorfulTheme;
use is_terminal::IsTerminal;
use std::io::IsTerminal as _;
use std::path::PathBuf;

/// Reveal the value of an existing app secret.
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/commands/app/secrets/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{
use anyhow::Context;
use colored::Colorize;
use dialoguer::theme::ColorfulTheme;
use is_terminal::IsTerminal;
use std::io::IsTerminal as _;
use std::{
collections::HashSet,
path::{Path, PathBuf},
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/commands/auth/logout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::{
config::{DEFAULT_PROD_REGISTRY, WasmerConfig, WasmerEnv},
};
use colored::Colorize;
use is_terminal::IsTerminal;
use std::io::IsTerminal as _;

/// Log out from Wasmer
#[derive(Debug, Clone, clap::Parser)]
Expand Down
3 changes: 2 additions & 1 deletion lib/cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ mod validate;
#[cfg(feature = "wast")]
mod wast;
use std::ffi::OsString;
use std::io::IsTerminal as _;
use tokio::task::JoinHandle;

#[cfg(target_os = "linux")]
Expand Down Expand Up @@ -75,7 +76,7 @@ pub(crate) trait AsyncCliCommand: Send + Sync {
&self,
done: tokio::sync::oneshot::Receiver<()>,
) -> Option<JoinHandle<anyhow::Result<()>>> {
if is_terminal::IsTerminal::is_terminal(&std::io::stdin()) {
if std::io::stdin().is_terminal() {
return Some(tokio::task::spawn(async move {
tokio::select! {
_ = done => {}
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/commands/package/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::{
config::WasmerEnv,
};
use colored::Colorize;
use is_terminal::IsTerminal;
use std::io::IsTerminal as _;
use std::path::{Path, PathBuf};
use wasmer_backend_api::WasmerClient;
use wasmer_config::package::{Manifest, PackageIdent};
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/commands/package/push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::{
};
use anyhow::Context;
use colored::Colorize;
use is_terminal::IsTerminal;
use std::io::IsTerminal as _;
use std::path::{Path, PathBuf};
use wasmer_backend_api::WasmerClient;
use wasmer_config::package::{Manifest, PackageHash};
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/commands/package/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
use anyhow::Context;
use colored::Colorize;
use dialoguer::{Confirm, theme::ColorfulTheme};
use is_terminal::IsTerminal;
use std::io::IsTerminal as _;
use std::{
path::{Path, PathBuf},
str::FromStr,
Expand Down
10 changes: 5 additions & 5 deletions lib/cli/src/commands/run/capabilities/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::config::WasmerEnv;

use super::PackageSource;
use super::CliPackageSource;
use anyhow::anyhow;
use sha2::{Digest, Sha256};
use std::{
Expand All @@ -25,7 +25,7 @@ pub(crate) struct PkgCapabilityCache {

pub(crate) fn get_capability_cache_path(
env: &WasmerEnv,
input: &PackageSource,
input: &CliPackageSource,
) -> anyhow::Result<PathBuf> {
let registry_name = env
.registry_public_url()?
Expand All @@ -36,7 +36,7 @@ pub(crate) fn get_capability_cache_path(
// We don't have the bytes of the module yet, but we still want to have the
// package-capabilities cache be as close to an actual identifier as possible.
let package_cache_path = match &input {
PackageSource::File(f) => {
CliPackageSource::File(f) => {
let full_path = f.canonicalize()?.to_path_buf();
let metadata = full_path
.parent()
Expand All @@ -61,7 +61,7 @@ pub(crate) fn get_capability_cache_path(

format!("path_{}.json", hex::encode(hash.finalize()))
}
PackageSource::Dir(f) => {
CliPackageSource::Dir(f) => {
let full_path = f.canonicalize()?.to_path_buf();
let metadata = full_path.metadata()?.modified()?;

Expand All @@ -82,7 +82,7 @@ pub(crate) fn get_capability_cache_path(

format!("path_{}.json", hex::encode(hash.finalize()))
}
PackageSource::Package(p) => match p {
CliPackageSource::Package(p) => match p {
PackageSpecifier::Ident(id) => match id {
wasmer_config::package::PackageIdent::Named(n) => format!(
"ident_{}_{}",
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/commands/run/capabilities/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{
time::Duration,
};

use super::{super::PackageSource, PkgCapabilityCache};
use super::{super::CliPackageSource, PkgCapabilityCache};
use anyhow::Context;
use colored::Colorize;
use dialoguer::theme::ColorfulTheme;
Expand Down
Loading
Loading