mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-13 10:48:39 +02:00
Compare commits
8 Commits
@tauri-app
...
@tauri-app
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae13be2d17 | ||
|
|
3880b42d18 | ||
|
|
9bead42dbc | ||
|
|
2da043f04d | ||
|
|
de985bad18 | ||
|
|
be8e5aa307 | ||
|
|
94bef1c705 | ||
|
|
99865d9e9a |
3
.github/workflows/test-core.yml
vendored
3
.github/workflows/test-core.yml
vendored
@@ -88,6 +88,7 @@ jobs:
|
||||
cargo update -p system-deps:6.1.2 --precise 6.1.1
|
||||
cargo update -p toml:0.7.8 --precise 0.7.3
|
||||
cargo update -p toml_edit:0.19.15 --precise 0.19.8
|
||||
cargo update -p embed-resource --precise 2.3.0
|
||||
cargo update -p toml_datetime --precise 0.6.1
|
||||
cargo update -p serde_spanned --precise 0.6.1
|
||||
cargo update -p winnow --precise 0.4.1
|
||||
@@ -100,7 +101,7 @@ jobs:
|
||||
cargo update -p is-terminal --precise 0.4.7
|
||||
cargo update -p colored --precise 2.0.2
|
||||
cargo update -p tempfile --precise 3.6.0
|
||||
cargo update -p serde_with:3.3.0 --precise 3.0.0
|
||||
cargo update -p serde_with:3.4.0 --precise 3.0.0
|
||||
cargo update -p tokio --precise 1.29.0
|
||||
cargo update -p flate2 --precise 1.0.26
|
||||
cargo update -p h2 --precise 0.3.20
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
"updater": {
|
||||
"active": true,
|
||||
"dialog": false,
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE5QzMxNjYwNTM5OEUwNTgKUldSWTRKaFRZQmJER1h4d1ZMYVA3dnluSjdpN2RmMldJR09hUFFlZDY0SlFqckkvRUJhZDJVZXAK",
|
||||
"pubkey": "dummy",
|
||||
"endpoints": ["http://localhost:3007"],
|
||||
"windows": {
|
||||
"installMode": "quiet"
|
||||
|
||||
@@ -14,15 +14,30 @@ use std::{
|
||||
use serde::Serialize;
|
||||
|
||||
const UPDATER_PRIVATE_KEY: &str = "dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg==";
|
||||
// const UPDATER_PUBLIC_KEY: &str = "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE5QzMxNjYwNTM5OEUwNTgKUldSWTRKaFRZQmJER1h4d1ZMYVA3dnluSjdpN2RmMldJR09hUFFlZDY0SlFqckkvRUJhZDJVZXAK";
|
||||
|
||||
const UPDATER_PRIVATE_KEY_NEXT: &str = "dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5Vm1kaFhCeEh0N2svRy85djJQbmNGTnk3TUQ1emJRWTF3Y01INW9OZjJwSUFBQkFBQUFBQUFBQUFBQUlBQUFBQS9YRStJU1RjK1JmUS9QK0F3WmdaMFE0RmUrcVY1RXhkL0VaYVZEeTVDNHREWnE2Y21yTVZCcW0rM1lKOUVLd1p1MWVPVFN5WmZBZEUxYnVtT3BnWW93TDZZRnYra1FUblFXazBVempRUFZOTnFRSjdod05LMjhvK3M0VGhoR0V4YWkzWUpOQXBIcEU9Cg==";
|
||||
const UPDATER_PUBLIC_KEY_NEXT: &str = "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE3RjlEQzI0MjEzRTcxRkQKUldUOWNUNGhKTno1RjZtKzNZSjlFS3dadTFlT1RTeVpmQWRFMWJ1bU9wZ1lvd0w2WUZ2K2tRVG4K";
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct PackageConfig {
|
||||
version: &'static str,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct UpdaterConfig {
|
||||
pubkey: &'static str,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct TauriConfig {
|
||||
updater: UpdaterConfig,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct Config {
|
||||
package: PackageConfig,
|
||||
tauri: TauriConfig,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
@@ -57,6 +72,7 @@ fn get_cli_bin_path(cli_dir: &Path, debug: bool) -> Option<PathBuf> {
|
||||
fn build_app(
|
||||
cli_bin_path: &Path,
|
||||
cwd: &Path,
|
||||
envs: Vec<(&str, &str)>,
|
||||
config: &Config,
|
||||
bundle_updater: bool,
|
||||
target: BundleTarget,
|
||||
@@ -78,7 +94,7 @@ fn build_app(
|
||||
command.args(["--bundles", "msi", "nsis"]);
|
||||
|
||||
command
|
||||
.env("TAURI_PRIVATE_KEY", UPDATER_PRIVATE_KEY)
|
||||
.envs(envs)
|
||||
.env("TAURI_KEY_PASSWORD", "")
|
||||
.args(["--bundles", "updater"]);
|
||||
} else {
|
||||
@@ -197,12 +213,18 @@ fn update_app() {
|
||||
|
||||
let mut config = Config {
|
||||
package: PackageConfig { version: "1.0.0" },
|
||||
tauri: TauriConfig {
|
||||
updater: UpdaterConfig {
|
||||
pubkey: UPDATER_PUBLIC_KEY_NEXT,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
// bundle app update
|
||||
build_app(
|
||||
&cli_bin_path,
|
||||
&manifest_dir,
|
||||
vec![("TAURI_PRIVATE_KEY", UPDATER_PRIVATE_KEY_NEXT)],
|
||||
&config,
|
||||
true,
|
||||
Default::default(),
|
||||
@@ -285,7 +307,14 @@ fn update_app() {
|
||||
config.package.version = "0.1.0";
|
||||
|
||||
// bundle initial app version
|
||||
build_app(&cli_bin_path, &manifest_dir, &config, false, bundle_target);
|
||||
build_app(
|
||||
&cli_bin_path,
|
||||
&manifest_dir,
|
||||
vec![("TAURI_PRIVATE_KEY", UPDATER_PRIVATE_KEY)],
|
||||
&config,
|
||||
false,
|
||||
bundle_target,
|
||||
);
|
||||
|
||||
let mut binary_cmd = if cfg!(windows) {
|
||||
Command::new(root_dir.join("target/debug/app-updater.exe"))
|
||||
|
||||
2
examples/api/src-tauri/Cargo.lock
generated
2
examples/api/src-tauri/Cargo.lock
generated
@@ -3529,7 +3529,7 @@ checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5"
|
||||
|
||||
[[package]]
|
||||
name = "tauri"
|
||||
version = "1.5.1"
|
||||
version = "1.5.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64 0.21.2",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# Changelog
|
||||
|
||||
## \[1.4.4]
|
||||
|
||||
### Enhancements
|
||||
|
||||
- [`3880b42d`](https://www.github.com/tauri-apps/tauri/commit/3880b42d18f218b89998bb5ead1aacfbed9d6202)([#7974](https://www.github.com/tauri-apps/tauri/pull/7974)) Include notarytool log output on error message in case notarization fails.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- [`be8e5aa3`](https://www.github.com/tauri-apps/tauri/commit/be8e5aa3071d9bc5d0bd24647e8168f312d11c8d)([#8042](https://www.github.com/tauri-apps/tauri/pull/8042)) Fixes duplicated newlines on command outputs.
|
||||
|
||||
## \[1.4.3]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -2,7 +2,7 @@ workspace = { }
|
||||
|
||||
[package]
|
||||
name = "tauri-bundler"
|
||||
version = "1.4.3"
|
||||
version = "1.4.4"
|
||||
authors = [
|
||||
"George Burton <burtonageo@gmail.com>",
|
||||
"Tauri Programme within The Commons Conservancy"
|
||||
@@ -18,21 +18,21 @@ exclude = [ "CHANGELOG.md", "/target", "rustfmt.toml" ]
|
||||
|
||||
[dependencies]
|
||||
tauri-utils = { version = "1.5.0", path = "../../core/tauri-utils", features = [ "resources" ] }
|
||||
image = "0.24.6"
|
||||
image = "0.24.7"
|
||||
libflate = "1.4"
|
||||
anyhow = "1.0"
|
||||
thiserror = "1.0"
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = [ "derive" ] }
|
||||
strsim = "0.10.0"
|
||||
tar = "0.4.38"
|
||||
tar = "0.4.40"
|
||||
walkdir = "2"
|
||||
handlebars = "4.3"
|
||||
tempfile = "3.6.0"
|
||||
log = { version = "0.4.19", features = [ "kv_unstable" ] }
|
||||
handlebars = "4.4"
|
||||
tempfile = "3.8.0"
|
||||
log = { version = "0.4.20", features = [ "kv_unstable" ] }
|
||||
dirs-next = "2.0"
|
||||
os_pipe = "1"
|
||||
ureq = { version = "2.6", default-features = false }
|
||||
ureq = { version = "2.8", default-features = false }
|
||||
native-tls = { version = "0.2", optional = true }
|
||||
hex = "0.4"
|
||||
semver = "1"
|
||||
@@ -43,7 +43,7 @@ dunce = "1"
|
||||
|
||||
[target."cfg(target_os = \"windows\")".dependencies]
|
||||
uuid = { version = "1", features = [ "v4", "v5" ] }
|
||||
winreg = "0.50"
|
||||
winreg = "0.51"
|
||||
glob = "0.3"
|
||||
|
||||
[target."cfg(target_os = \"windows\")".dependencies.windows-sys]
|
||||
|
||||
@@ -8,7 +8,7 @@ use log::debug;
|
||||
use std::{
|
||||
ffi::OsStr,
|
||||
fs::{self, File},
|
||||
io::{self, BufReader, BufWriter},
|
||||
io::{self, BufRead, BufReader, BufWriter},
|
||||
path::Path,
|
||||
process::{Command, ExitStatus, Output, Stdio},
|
||||
sync::{Arc, Mutex},
|
||||
@@ -165,16 +165,15 @@ impl CommandExt for Command {
|
||||
let stdout_lines = Arc::new(Mutex::new(Vec::new()));
|
||||
let stdout_lines_ = stdout_lines.clone();
|
||||
std::thread::spawn(move || {
|
||||
let mut buf = Vec::new();
|
||||
let mut line = String::new();
|
||||
let mut lines = stdout_lines_.lock().unwrap();
|
||||
loop {
|
||||
buf.clear();
|
||||
if let Ok(0) = tauri_utils::io::read_line(&mut stdout, &mut buf) {
|
||||
line.clear();
|
||||
if let Ok(0) = stdout.read_line(&mut line) {
|
||||
break;
|
||||
}
|
||||
debug!(action = "stdout"; "{}", String::from_utf8_lossy(&buf));
|
||||
lines.extend(buf.clone());
|
||||
lines.push(b'\n');
|
||||
debug!(action = "stdout"; "{}", &line[0..line.len() - 1]);
|
||||
lines.extend(line.as_bytes().to_vec());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -182,16 +181,15 @@ impl CommandExt for Command {
|
||||
let stderr_lines = Arc::new(Mutex::new(Vec::new()));
|
||||
let stderr_lines_ = stderr_lines.clone();
|
||||
std::thread::spawn(move || {
|
||||
let mut buf = Vec::new();
|
||||
let mut line = String::new();
|
||||
let mut lines = stderr_lines_.lock().unwrap();
|
||||
loop {
|
||||
buf.clear();
|
||||
if let Ok(0) = tauri_utils::io::read_line(&mut stderr, &mut buf) {
|
||||
line.clear();
|
||||
if let Ok(0) = stderr.read_line(&mut line) {
|
||||
break;
|
||||
}
|
||||
debug!(action = "stderr"; "{}", String::from_utf8_lossy(&buf));
|
||||
lines.extend(buf.clone());
|
||||
lines.push(b'\n');
|
||||
debug!(action = "stderr"; "{}", &line[0..line.len() - 1]);
|
||||
lines.extend(line.as_bytes().to_vec());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -306,7 +306,22 @@ pub fn notarize(
|
||||
staple_app(app_bundle_path)?;
|
||||
Ok(())
|
||||
} else {
|
||||
Err(anyhow::anyhow!("{log_message}").into())
|
||||
if let Ok(output) = Command::new("xcrun")
|
||||
.args(["notarytool", "log"])
|
||||
.arg(&submit_output.id)
|
||||
.notarytool_args(&auth)
|
||||
.output_ok()
|
||||
{
|
||||
Err(
|
||||
anyhow::anyhow!(
|
||||
"{log_message}\nLog:\n{}",
|
||||
String::from_utf8_lossy(&output.stdout)
|
||||
)
|
||||
.into(),
|
||||
)
|
||||
} else {
|
||||
Err(anyhow::anyhow!("{log_message}").into())
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Err(anyhow::anyhow!("failed to parse notarytool output as JSON: `{output_str}`").into())
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
LangString addOrReinstall ${LANG_FRENCH} "Ajouter/Réinstaller un composant."
|
||||
LangString alreadyInstalled ${LANG_FRENCH} "Déja installé."
|
||||
LangString alreadyInstalledLong ${LANG_FRENCH} "${PRODUCTNAME} ${VERSION} est déja installé. Selectionne l'opération que tu souhaite effectuer puis clique sur Suivant pour continuer."
|
||||
LangString appRunning ${LANG_FRENCH} "${PRODUCTNAME} est en cours d'exécution! Ferme le et recommence."
|
||||
LangString appRunningOkKill ${LANG_FRENCH} "${PRODUCTNAME} est en cours d'exécution!$\nClique sur OK pour fermer l'application."
|
||||
LangString chooseMaintenanceOption ${LANG_FRENCH} "Choisie l'option de maintenance à effectuer."
|
||||
LangString choowHowToInstall ${LANG_FRENCH} "Choisie comment tu veux installer ${PRODUCTNAME}."
|
||||
LangString alreadyInstalledLong ${LANG_FRENCH} "${PRODUCTNAME} ${VERSION} est déja installé. Sélectionnez l'opération que vous souhaitez effectuer, puis cliquez sur Suivant pour continuer."
|
||||
LangString appRunning ${LANG_FRENCH} "${PRODUCTNAME} est en cours d'exécution. Veuillez fermer l'application avant de réessayer."
|
||||
LangString appRunningOkKill ${LANG_FRENCH} "${PRODUCTNAME} est en cours d'exécution.$\nCliquez sur OK pour fermer l'application."
|
||||
LangString chooseMaintenanceOption ${LANG_FRENCH} "Veuillez choisir l'option de maintenance à effectuer."
|
||||
LangString choowHowToInstall ${LANG_FRENCH} "Veuillez choisir l'emplacement d'installation de ${PRODUCTNAME}."
|
||||
LangString createDesktop ${LANG_FRENCH} "Créer un raccourci sur le bureau."
|
||||
LangString dontUninstall ${LANG_FRENCH} "Ne pas désinstaller"
|
||||
LangString dontUninstallDowngrade ${LANG_FRENCH} "Ne pas désinstaller (Revenir à une ancienne version sans désinstallation est désactivé pour cette installateur)"
|
||||
LangString failedToKillApp ${LANG_FRENCH} "La fermeture de ${PRODUCTNAME} a échoué. Ferme le et reessaye"
|
||||
LangString dontUninstallDowngrade ${LANG_FRENCH} "Ne pas désinstaller (revenir à une ancienne version sans désinstallation est désactivé pour cet installateur)"
|
||||
LangString failedToKillApp ${LANG_FRENCH} "La fermeture de ${PRODUCTNAME} a échoué. Veuillez fermer l'application et réessayer."
|
||||
LangString installingWebview2 ${LANG_FRENCH} "Installation de WebView2..."
|
||||
LangString newerVersionInstalled ${LANG_FRENCH} "Une version plus récente de ${PRODUCTNAME} est déja installé! Il n'est pas recommandé d'installer une ancienne version. Si tu veux vraiment installer cett ancienne version, il est conseillé de désinstaller la version courante en premier. Selectionne l'opération que tu souhaite effectuer puis clique sur Suivant pour continer"
|
||||
LangString newerVersionInstalled ${LANG_FRENCH} "Une version plus récente de ${PRODUCTNAME} est déja installée. Il n'est pas recommandé d'installer une ancienne version. Si vous souhaitez installer cette ancienne version, il est conseillé de désinstaller la version courante en premier. Veuillez sélectionner l'opération que vous souhaitez effectuer, puis cliquez sur Suivant pour continer."
|
||||
LangString older ${LANG_FRENCH} "ancien"
|
||||
LangString olderOrUnknownVersionInstalled ${LANG_FRENCH} "La version $R4 de ${PRODUCTNAME} est installé sur le système. il est recommandé de désinstaller la version actuelle avant d'installer celle-ci. Selectionne l'opération que tu soute effectuer puis clique sur Suivant pour continuer."
|
||||
LangString silentDowngrades ${LANG_FRENCH} "Revenir à une version antérieur est désactivé pour cet installateur, impossible de continer avec l'installation silencieuse, utilise l'interface graphique à la place.$\n"
|
||||
LangString unableToUninstall ${LANG_FRENCH} "Impossible de désinstaller!"
|
||||
LangString uninstallApp ${LANG_FRENCH} "Désinstalle ${PRODUCTNAME}"
|
||||
LangString uninstallBeforeInstalling ${LANG_FRENCH} "Désinstalle avant d'installer"
|
||||
LangString olderOrUnknownVersionInstalled ${LANG_FRENCH} "La version $R4 de ${PRODUCTNAME} est installée sur le système. Il est recommandé de désinstaller la version actuelle avant d'installer celle-ci. Sélectionnez l'opération que vous souhaitez effectuer, puis cliquez sur Suivant pour continuer."
|
||||
LangString silentDowngrades ${LANG_FRENCH} "Revenir à une version antérieure est désactivé pour cet installateur. Impossible de continuer avec l'installation silencieuse, veuillez utiliser l'interface graphique à la place.$\n"
|
||||
LangString unableToUninstall ${LANG_FRENCH} "Impossible de désinstaller le programme !"
|
||||
LangString uninstallApp ${LANG_FRENCH} "Désinstaller ${PRODUCTNAME}"
|
||||
LangString uninstallBeforeInstalling ${LANG_FRENCH} "Désinstaller avant d'installer"
|
||||
LangString unknown ${LANG_FRENCH} "inconnu"
|
||||
LangString webview2AbortError ${LANG_FRENCH} "L'installation de WebView2 a échoué! L'application ne peut s'éxécuter sans WebView2. Essaye de redémarrer l'installation."
|
||||
LangString webview2DownloadError ${LANG_FRENCH} "Erreur: le téléchargement de WebView2 a échoué - $0"
|
||||
LangString webview2DownloadSuccess ${LANG_FRENCH} "Le téléchargement du comosant WebView2 a été téléchargé avec succès!"
|
||||
LangString webview2Downloading ${LANG_FRENCH} "Téléchargement du composant WebView2 ..."
|
||||
LangString webview2InstallError ${LANG_FRENCH} "Erreur: L'installation de WebView2 a échoué avec le code erreur $1"
|
||||
LangString webview2AbortError ${LANG_FRENCH} "L'installation de WebView2 a échoué ! L'application ne peut s'éxécuter sans WebView2. Veuillez essayer de redémarrer l'installation."
|
||||
LangString webview2DownloadError ${LANG_FRENCH} "Erreur : le téléchargement de WebView2 a échoué - $0"
|
||||
LangString webview2DownloadSuccess ${LANG_FRENCH} "Le composant WebView2 a été téléchargé avec succès !"
|
||||
LangString webview2Downloading ${LANG_FRENCH} "Téléchargement du composant WebView2..."
|
||||
LangString webview2InstallError ${LANG_FRENCH} "Erreur : l'installation de WebView2 a échoué avec le code d'erreur $1"
|
||||
LangString webview2InstallSuccess ${LANG_FRENCH} "L'installation de WebView2 a réussi"
|
||||
LangString deleteAppData ${LANG_FRENCH} "Supprimer les données de l'application"
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# Changelog
|
||||
|
||||
## \[1.5.5]
|
||||
|
||||
### Enhancements
|
||||
|
||||
- [`9bead42d`](https://www.github.com/tauri-apps/tauri/commit/9bead42dbca0fb6dd7ea0b6bfb2f2308a5c5f992)([#8059](https://www.github.com/tauri-apps/tauri/pull/8059)) Allow rotating the updater private key.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- [`be8e5aa3`](https://www.github.com/tauri-apps/tauri/commit/be8e5aa3071d9bc5d0bd24647e8168f312d11c8d)([#8042](https://www.github.com/tauri-apps/tauri/pull/8042)) Fixes duplicated newlines on command outputs.
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `tauri-bundler@1.4.4`
|
||||
|
||||
## \[1.5.4]
|
||||
|
||||
### Dependencies
|
||||
|
||||
350
tooling/cli/Cargo.lock
generated
350
tooling/cli/Cargo.lock
generated
@@ -157,26 +157,15 @@ checksum = "d67af77d68a931ecd5cbd8a3b5987d63a1d1d1278f7f6a60ae33db485cdebb69"
|
||||
|
||||
[[package]]
|
||||
name = "async-trait"
|
||||
version = "0.1.73"
|
||||
version = "0.1.74"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0"
|
||||
checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.38",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "atty"
|
||||
version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
||||
dependencies = [
|
||||
"hermit-abi 0.1.19",
|
||||
"libc",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.1.0"
|
||||
@@ -185,13 +174,13 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||
|
||||
[[package]]
|
||||
name = "axum"
|
||||
version = "0.5.17"
|
||||
version = "0.6.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "acee9fd5073ab6b045a275b3e709c163dd36c90685219cb21804a147b58dba43"
|
||||
checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"axum-core",
|
||||
"base64 0.13.1",
|
||||
"base64",
|
||||
"bitflags 1.3.2",
|
||||
"bytes",
|
||||
"futures-util",
|
||||
@@ -204,24 +193,25 @@ dependencies = [
|
||||
"mime",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"rustversion",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_path_to_error",
|
||||
"serde_urlencoded",
|
||||
"sha-1",
|
||||
"sha1",
|
||||
"sync_wrapper",
|
||||
"tokio",
|
||||
"tokio-tungstenite",
|
||||
"tower",
|
||||
"tower-http",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "axum-core"
|
||||
version = "0.2.9"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "37e5939e02c56fecd5c017c37df4238c0a839fa76b7f97acdd7efb804fd181cc"
|
||||
checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bytes",
|
||||
@@ -229,6 +219,7 @@ dependencies = [
|
||||
"http",
|
||||
"http-body",
|
||||
"mime",
|
||||
"rustversion",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
]
|
||||
@@ -248,12 +239,6 @@ dependencies = [
|
||||
"rustc-demangle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.21.4"
|
||||
@@ -295,9 +280,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635"
|
||||
checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
|
||||
|
||||
[[package]]
|
||||
name = "block-buffer"
|
||||
@@ -491,16 +476,6 @@ dependencies = [
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "combine"
|
||||
version = "4.6.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "common-path"
|
||||
version = "1.0.0"
|
||||
@@ -737,11 +712,18 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "deranged"
|
||||
version = "0.3.8"
|
||||
name = "data-encoding"
|
||||
version = "2.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946"
|
||||
checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
|
||||
|
||||
[[package]]
|
||||
name = "deranged"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3"
|
||||
dependencies = [
|
||||
"powerfmt",
|
||||
"serde",
|
||||
]
|
||||
|
||||
@@ -852,12 +834,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.9.3"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7"
|
||||
checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
|
||||
dependencies = [
|
||||
"atty",
|
||||
"humantime",
|
||||
"is-terminal",
|
||||
"log",
|
||||
"regex",
|
||||
"termcolor",
|
||||
@@ -906,9 +888,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "fancy-regex"
|
||||
version = "0.10.0"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0678ab2d46fa5195aaf59ad034c083d351377d4af57f3e073c074d0da3e3c766"
|
||||
checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2"
|
||||
dependencies = [
|
||||
"bit-set",
|
||||
"regex",
|
||||
@@ -992,9 +974,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "fraction"
|
||||
version = "0.12.2"
|
||||
version = "0.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7aa5de57a62c2440ece64342ea59efb7171aa7d016faf8dfcb8795066a17146b"
|
||||
checksum = "3027ae1df8d41b4bed2241c8fdad4acc1e7af60c8e17743534b545e77182d678"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"num",
|
||||
@@ -1105,8 +1087,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
"libc",
|
||||
"wasi 0.11.0+wasi-snapshot-preview1",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1217,15 +1201,6 @@ dependencies = [
|
||||
"unicode-segmentation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.1.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.3.3"
|
||||
@@ -1283,12 +1258,6 @@ dependencies = [
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "http-range-header"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f"
|
||||
|
||||
[[package]]
|
||||
name = "httparse"
|
||||
version = "1.8.0"
|
||||
@@ -1333,16 +1302,16 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "iana-time-zone"
|
||||
version = "0.1.57"
|
||||
version = "0.1.58"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613"
|
||||
checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20"
|
||||
dependencies = [
|
||||
"android_system_properties",
|
||||
"core-foundation-sys",
|
||||
"iana-time-zone-haiku",
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
"windows 0.48.0",
|
||||
"windows-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1497,25 +1466,25 @@ version = "0.4.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
|
||||
dependencies = [
|
||||
"hermit-abi 0.3.3",
|
||||
"hermit-abi",
|
||||
"rustix",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "iso8601"
|
||||
version = "0.5.1"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "296af15e112ec6dc38c9fd3ae027b5337a75466e8eed757bd7d5cf742ea85eb6"
|
||||
checksum = "924e5d73ea28f59011fec52a0d12185d496a9b075d360657aed2a5707f701153"
|
||||
dependencies = [
|
||||
"nom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.10.5"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
|
||||
checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
|
||||
dependencies = [
|
||||
"either",
|
||||
]
|
||||
@@ -1584,22 +1553,23 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "jsonschema"
|
||||
version = "0.16.1"
|
||||
version = "0.17.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6ca9e2b45609132ae2214d50482c03aeee78826cd6fd53a8940915b81acedf16"
|
||||
checksum = "2a071f4f7efc9a9118dfb627a0a94ef247986e1ab8606a4c806ae2b3aa3b6978"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"anyhow",
|
||||
"base64 0.13.1",
|
||||
"base64",
|
||||
"bytecount",
|
||||
"clap",
|
||||
"fancy-regex",
|
||||
"fraction",
|
||||
"getrandom 0.2.10",
|
||||
"iso8601",
|
||||
"itoa 1.0.9",
|
||||
"lazy_static",
|
||||
"memchr",
|
||||
"num-cmp",
|
||||
"once_cell",
|
||||
"parking_lot",
|
||||
"percent-encoding",
|
||||
"regex",
|
||||
@@ -1709,9 +1679,9 @@ checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
version = "0.4.10"
|
||||
version = "0.4.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16"
|
||||
checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"scopeguard",
|
||||
@@ -1754,9 +1724,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
|
||||
|
||||
[[package]]
|
||||
name = "matchit"
|
||||
version = "0.5.0"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb"
|
||||
checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
|
||||
|
||||
[[package]]
|
||||
name = "md5"
|
||||
@@ -1793,9 +1763,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
||||
|
||||
[[package]]
|
||||
name = "minisign"
|
||||
version = "0.7.3"
|
||||
version = "0.7.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b23ef13ff1d745b1e52397daaa247e333c607f3cff96d4df2b798dc252db974b"
|
||||
checksum = "d2b6f58413c6cee060115673578e47271838f3c87cb9322c61a3bcd6d740b7d2"
|
||||
dependencies = [
|
||||
"getrandom 0.2.10",
|
||||
"rpassword",
|
||||
@@ -1830,7 +1800,7 @@ version = "2.13.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd063c93b900149304e3ba96ce5bf210cd4f81ef5eb80ded0d100df3e85a3ac0"
|
||||
dependencies = [
|
||||
"bitflags 2.4.0",
|
||||
"bitflags 2.4.1",
|
||||
"ctor 0.2.5",
|
||||
"napi-derive",
|
||||
"napi-sys",
|
||||
@@ -1911,7 +1881,7 @@ version = "0.27.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"
|
||||
dependencies = [
|
||||
"bitflags 2.4.0",
|
||||
"bitflags 2.4.1",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
]
|
||||
@@ -1938,7 +1908,7 @@ version = "6.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d"
|
||||
dependencies = [
|
||||
"bitflags 2.4.0",
|
||||
"bitflags 2.4.1",
|
||||
"crossbeam-channel",
|
||||
"filetime",
|
||||
"fsevent-sys",
|
||||
@@ -2049,7 +2019,7 @@ version = "1.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
|
||||
dependencies = [
|
||||
"hermit-abi 0.3.3",
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
]
|
||||
|
||||
@@ -2080,7 +2050,7 @@ version = "0.10.57"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c"
|
||||
dependencies = [
|
||||
"bitflags 2.4.0",
|
||||
"bitflags 2.4.1",
|
||||
"cfg-if",
|
||||
"foreign-types",
|
||||
"libc",
|
||||
@@ -2170,13 +2140,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot_core"
|
||||
version = "0.9.8"
|
||||
version = "0.9.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447"
|
||||
checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"redox_syscall 0.3.5",
|
||||
"redox_syscall 0.4.1",
|
||||
"smallvec",
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
@@ -2417,7 +2387,7 @@ version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bdc0001cfea3db57a2e24bc0d818e9e20e554b5f97fabb9bc231dc240269ae06"
|
||||
dependencies = [
|
||||
"base64 0.21.4",
|
||||
"base64",
|
||||
"indexmap 1.9.3",
|
||||
"line-wrap",
|
||||
"quick-xml",
|
||||
@@ -2450,6 +2420,12 @@ dependencies = [
|
||||
"universal-hash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "powerfmt"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
|
||||
|
||||
[[package]]
|
||||
name = "ppv-lite86"
|
||||
version = "0.2.17"
|
||||
@@ -2623,6 +2599,15 @@ dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_users"
|
||||
version = "0.4.3"
|
||||
@@ -2636,9 +2621,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.10.0"
|
||||
version = "1.10.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d119d7c7ca818f8a53c300863d4f87566aac09943aef5b355bb83969dae75d87"
|
||||
checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
@@ -2648,9 +2633,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.4.1"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "465c6fc0621e4abc4187a2bda0937bfd4f722c2730b29562e19689ea796c9a4b"
|
||||
checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
@@ -2659,9 +2644,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.8.1"
|
||||
version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "56d84fdd47036b038fc80dd333d10b6aab10d5d31f4a366e20014def75328d33"
|
||||
checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
|
||||
|
||||
[[package]]
|
||||
name = "reqwest"
|
||||
@@ -2669,7 +2654,7 @@ version = "0.11.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b"
|
||||
dependencies = [
|
||||
"base64 0.21.4",
|
||||
"base64",
|
||||
"bytes",
|
||||
"encoding_rs",
|
||||
"futures-core",
|
||||
@@ -2695,7 +2680,7 @@ dependencies = [
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
"web-sys",
|
||||
"winreg",
|
||||
"winreg 0.50.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2761,7 +2746,7 @@ version = "0.38.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "745ecfa778e66b2b63c88a61cb36e0eea109e803b0b86bf9879fbc77c70e86ed"
|
||||
dependencies = [
|
||||
"bitflags 2.4.0",
|
||||
"bitflags 2.4.1",
|
||||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
@@ -2790,6 +2775,12 @@ dependencies = [
|
||||
"untrusted",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustversion"
|
||||
version = "1.0.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.15"
|
||||
@@ -2991,6 +2982,25 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_path_to_error"
|
||||
version = "0.1.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335"
|
||||
dependencies = [
|
||||
"itoa 1.0.9",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_spanned"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_urlencoded"
|
||||
version = "0.7.1"
|
||||
@@ -3005,11 +3015,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_with"
|
||||
version = "3.3.0"
|
||||
version = "3.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ca3b16a3d82c4088f343b7480a93550b3eabe1a358569c2dfe38bbcead07237"
|
||||
checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23"
|
||||
dependencies = [
|
||||
"base64 0.21.4",
|
||||
"base64",
|
||||
"chrono",
|
||||
"hex",
|
||||
"indexmap 1.9.3",
|
||||
@@ -3022,9 +3032,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_with_macros"
|
||||
version = "3.3.0"
|
||||
version = "3.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2e6be15c453eb305019bfa438b1593c731f36a289a7853f7707ee29e870b3b3c"
|
||||
checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788"
|
||||
dependencies = [
|
||||
"darling",
|
||||
"proc-macro2",
|
||||
@@ -3064,17 +3074,6 @@ dependencies = [
|
||||
"stable_deref_trait",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha-1"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures",
|
||||
"digest",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha1"
|
||||
version = "0.10.6"
|
||||
@@ -3355,7 +3354,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-bundler"
|
||||
version = "1.4.3"
|
||||
version = "1.4.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"ar",
|
||||
@@ -3389,17 +3388,17 @@ dependencies = [
|
||||
"uuid",
|
||||
"walkdir",
|
||||
"windows-sys 0.48.0",
|
||||
"winreg",
|
||||
"winreg 0.51.0",
|
||||
"zip",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-cli"
|
||||
version = "1.5.4"
|
||||
version = "1.5.5"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
"base64 0.21.4",
|
||||
"base64",
|
||||
"cc",
|
||||
"clap",
|
||||
"clap_complete",
|
||||
@@ -3436,7 +3435,7 @@ dependencies = [
|
||||
"tauri-icns",
|
||||
"tauri-utils",
|
||||
"tokio",
|
||||
"toml",
|
||||
"toml 0.7.8",
|
||||
"toml_edit",
|
||||
"unicode-width",
|
||||
"ureq",
|
||||
@@ -3491,10 +3490,10 @@ dependencies = [
|
||||
"serde_with",
|
||||
"serialize-to-javascript",
|
||||
"thiserror",
|
||||
"toml",
|
||||
"toml 0.5.11",
|
||||
"url",
|
||||
"walkdir",
|
||||
"windows 0.39.0",
|
||||
"windows",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3579,12 +3578,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.3.29"
|
||||
version = "0.3.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe"
|
||||
checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5"
|
||||
dependencies = [
|
||||
"deranged",
|
||||
"itoa 1.0.9",
|
||||
"powerfmt",
|
||||
"serde",
|
||||
"time-core",
|
||||
"time-macros",
|
||||
@@ -3650,9 +3650,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tokio-tungstenite"
|
||||
version = "0.17.2"
|
||||
version = "0.20.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181"
|
||||
checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"log",
|
||||
@@ -3684,14 +3684,37 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_edit"
|
||||
version = "0.14.4"
|
||||
name = "toml"
|
||||
version = "0.7.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5376256e44f2443f8896ac012507c19a012df0fe8758b55246ae51a2279db51f"
|
||||
checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257"
|
||||
dependencies = [
|
||||
"combine",
|
||||
"indexmap 1.9.3",
|
||||
"itertools",
|
||||
"serde",
|
||||
"serde_spanned",
|
||||
"toml_datetime",
|
||||
"toml_edit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_datetime"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_edit"
|
||||
version = "0.19.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
|
||||
dependencies = [
|
||||
"indexmap 2.0.2",
|
||||
"serde",
|
||||
"serde_spanned",
|
||||
"toml_datetime",
|
||||
"winnow",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3710,25 +3733,6 @@ dependencies = [
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tower-http"
|
||||
version = "0.3.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"bytes",
|
||||
"futures-core",
|
||||
"futures-util",
|
||||
"http",
|
||||
"http-body",
|
||||
"http-range-header",
|
||||
"pin-project-lite",
|
||||
"tower",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tower-layer"
|
||||
version = "0.3.2"
|
||||
@@ -3743,11 +3747,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
|
||||
|
||||
[[package]]
|
||||
name = "tracing"
|
||||
version = "0.1.37"
|
||||
version = "0.1.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8"
|
||||
checksum = "ee2ef2af84856a50c1d430afce2fdded0a4ec7eda868db86409b4543df0797f9"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"log",
|
||||
"pin-project-lite",
|
||||
"tracing-core",
|
||||
@@ -3755,9 +3758,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tracing-core"
|
||||
version = "0.1.31"
|
||||
version = "0.1.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a"
|
||||
checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
]
|
||||
@@ -3779,18 +3782,18 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
|
||||
|
||||
[[package]]
|
||||
name = "tungstenite"
|
||||
version = "0.17.3"
|
||||
version = "0.20.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0"
|
||||
checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9"
|
||||
dependencies = [
|
||||
"base64 0.13.1",
|
||||
"byteorder",
|
||||
"bytes",
|
||||
"data-encoding",
|
||||
"http",
|
||||
"httparse",
|
||||
"log",
|
||||
"rand 0.8.5",
|
||||
"sha-1",
|
||||
"sha1",
|
||||
"thiserror",
|
||||
"url",
|
||||
"utf-8",
|
||||
@@ -3863,7 +3866,7 @@ version = "2.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f5ccd538d4a604753ebc2f17cd9946e89b77bf87f6a8e2309667c6f2e87855e3"
|
||||
dependencies = [
|
||||
"base64 0.21.4",
|
||||
"base64",
|
||||
"flate2",
|
||||
"log",
|
||||
"native-tls",
|
||||
@@ -4121,10 +4124,10 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows"
|
||||
version = "0.48.0"
|
||||
name = "windows-core"
|
||||
version = "0.51.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
|
||||
checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64"
|
||||
dependencies = [
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
@@ -4307,6 +4310,15 @@ version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.5.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winreg"
|
||||
version = "0.50.0"
|
||||
@@ -4317,6 +4329,16 @@ dependencies = [
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winreg"
|
||||
version = "0.51.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "937f3df7948156640f46aacef17a70db0de5917bda9c92b0f751f3a955b588fc"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "xattr"
|
||||
version = "1.0.1"
|
||||
|
||||
@@ -3,7 +3,7 @@ members = [ "node" ]
|
||||
|
||||
[package]
|
||||
name = "tauri-cli"
|
||||
version = "1.5.4"
|
||||
version = "1.5.5"
|
||||
authors = [ "Tauri Programme within The Commons Conservancy" ]
|
||||
edition = "2021"
|
||||
rust-version = "1.60"
|
||||
@@ -40,9 +40,9 @@ path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
clap_complete = "4"
|
||||
clap = { version = "4.0", features = [ "derive" ] }
|
||||
clap = { version = "4.3", features = [ "derive" ] }
|
||||
anyhow = "1.0"
|
||||
tauri-bundler = { version = "1.4.3", path = "../bundler", default-features = false }
|
||||
tauri-bundler = { version = "1.4.4", path = "../bundler", default-features = false }
|
||||
colored = "2.0"
|
||||
once_cell = "1"
|
||||
serde = { version = "1.0", features = [ "derive" ] }
|
||||
@@ -50,38 +50,38 @@ serde_json = "1.0"
|
||||
notify = "6.0"
|
||||
notify-debouncer-mini = "0.3"
|
||||
shared_child = "1.0"
|
||||
toml_edit = "0.14"
|
||||
toml_edit = "0.19"
|
||||
json-patch = "1.0"
|
||||
tauri-utils = { version = "1.5.0", path = "../../core/tauri-utils", features = [ "isolation", "schema", "config-json5", "config-toml" ] }
|
||||
toml = "0.5"
|
||||
jsonschema = "0.16"
|
||||
toml = "0.7"
|
||||
jsonschema = "0.17"
|
||||
handlebars = "4.3"
|
||||
include_dir = "0.7"
|
||||
minisign = "=0.7.3"
|
||||
base64 = "0.21.0"
|
||||
ureq = { version = "2.5", default-features = false, features = [ "gzip" ] }
|
||||
minisign = "=0.7.5"
|
||||
base64 = "0.21.2"
|
||||
ureq = { version = "2.7", default-features = false, features = [ "gzip" ] }
|
||||
os_info = "3"
|
||||
semver = "1.0"
|
||||
regex = "1.6.0"
|
||||
regex = "1.9.3"
|
||||
unicode-width = "0.1"
|
||||
zeroize = "1.5"
|
||||
zeroize = "1.6"
|
||||
heck = { version = "0.4", features = [ "unicode" ] }
|
||||
dialoguer = "0.10"
|
||||
url = { version = "2.3", features = [ "serde" ] }
|
||||
url = { version = "2.4", features = [ "serde" ] }
|
||||
os_pipe = "1"
|
||||
ignore = "0.4"
|
||||
ctrlc = "3.2"
|
||||
log = { version = "0.4.17", features = [ "kv_unstable", "kv_unstable_std" ] }
|
||||
env_logger = "0.9.1"
|
||||
ctrlc = "3.4"
|
||||
log = { version = "0.4.20", features = [ "kv_unstable", "kv_unstable_std" ] }
|
||||
env_logger = "0.10.0"
|
||||
icns = { package = "tauri-icns", version = "0.1" }
|
||||
image = { version = "0.24", default-features = false, features = [ "ico" ] }
|
||||
axum = { version = "0.5.16", features = [ "ws" ] }
|
||||
axum = { version = "0.6.20", features = [ "ws" ] }
|
||||
html5ever = "0.26"
|
||||
kuchiki = { package = "kuchikiki", version = "0.8" }
|
||||
tokio = { version = "1", features = [ "macros", "sync" ] }
|
||||
common-path = "1"
|
||||
serde-value = "0.7.0"
|
||||
itertools = "0.10"
|
||||
itertools = "0.11"
|
||||
|
||||
[target."cfg(windows)".dependencies]
|
||||
winapi = { version = "0.3", features = [ "handleapi", "processenv", "winbase", "wincon", "winnt" ] }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"cli.js": {
|
||||
"version": "1.5.4",
|
||||
"version": "1.5.5",
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"tauri": "1.5.2",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# Changelog
|
||||
|
||||
## \[1.5.5]
|
||||
|
||||
### Enhancements
|
||||
|
||||
- [`9bead42d`](https://www.github.com/tauri-apps/tauri/commit/9bead42dbca0fb6dd7ea0b6bfb2f2308a5c5f992)([#8059](https://www.github.com/tauri-apps/tauri/pull/8059)) Allow rotating the updater private key.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- [`be8e5aa3`](https://www.github.com/tauri-apps/tauri/commit/be8e5aa3071d9bc5d0bd24647e8168f312d11c8d)([#8042](https://www.github.com/tauri-apps/tauri/pull/8042)) Fixes duplicated newlines on command outputs.
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `tauri-cli@1.5.5`
|
||||
|
||||
## \[1.5.4]
|
||||
|
||||
### Dependencies
|
||||
|
||||
@@ -11,7 +11,7 @@ crate-type = ["cdylib"]
|
||||
napi = { version = "2.13", default-features = false, features = ["napi4"] }
|
||||
napi-derive = "2.13"
|
||||
tauri-cli = { path = "..", default-features = false }
|
||||
log = "0.4.19"
|
||||
log = "0.4.20"
|
||||
|
||||
[build-dependencies]
|
||||
napi-build = "2.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tauri-apps/cli",
|
||||
"version": "1.5.4",
|
||||
"version": "1.5.5",
|
||||
"description": "Command line interface for building Tauri apps",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
||||
@@ -24,7 +24,7 @@ icon = [
|
||||
tauri-build = { path = "../../../../../../../../core/tauri-build", features = [] }
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0.96"
|
||||
serde_json = "1.0.105"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
tauri = { path = "../../../../../../../../core/tauri", features = ["api-all"] }
|
||||
|
||||
@@ -320,9 +320,9 @@ pub fn command(mut options: Options, verbosity: u8) -> Result<()> {
|
||||
// sign our path from environment variables
|
||||
let (signature_path, signature) = sign_file(&secret_key, path)?;
|
||||
if signature.keynum() != public_key.keynum() {
|
||||
return Err(anyhow::anyhow!(
|
||||
"The updater secret key from `TAURI_PRIVATE_KEY` does not match the public key defined in `tauri.conf.json > tauri > updater > pubkey`."
|
||||
));
|
||||
log::warn!(
|
||||
"The updater secret key from `TAURI_PRIVATE_KEY` does not match the public key defined in `tauri.conf.json > tauri > updater > pubkey`. If you are not rotating keys, this means your configuration is wrong and won't be accepted at runtime."
|
||||
);
|
||||
}
|
||||
signed_paths.push(signature_path);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
use axum::{
|
||||
extract::{ws::WebSocket, WebSocketUpgrade},
|
||||
http::{header::CONTENT_TYPE, Request, StatusCode},
|
||||
http::{header::CONTENT_TYPE, StatusCode},
|
||||
response::IntoResponse,
|
||||
routing::get,
|
||||
Router, Server,
|
||||
@@ -67,17 +67,9 @@ pub fn start_dev_server<P: AsRef<Path>>(path: P, port: Option<u16>) -> crate::Re
|
||||
});
|
||||
|
||||
let state = Arc::new(State { serve_dir, tx });
|
||||
let state_ = state.clone();
|
||||
let router = Router::new()
|
||||
.fallback(
|
||||
Router::new().nest(
|
||||
"/",
|
||||
get({
|
||||
let state = state.clone();
|
||||
move |req| handler(req, state)
|
||||
})
|
||||
.handle_error(|_error| async move { StatusCode::INTERNAL_SERVER_ERROR }),
|
||||
),
|
||||
)
|
||||
.fallback(move |uri| handler(uri, state_))
|
||||
.route(
|
||||
"/_tauri-cli/ws",
|
||||
get(move |ws: WebSocketUpgrade| async move {
|
||||
@@ -130,8 +122,8 @@ pub fn start_dev_server<P: AsRef<Path>>(path: P, port: Option<u16>) -> crate::Re
|
||||
server_url_rx.recv().unwrap()
|
||||
}
|
||||
|
||||
async fn handler<T>(req: Request<T>, state: Arc<State>) -> impl IntoResponse {
|
||||
let uri = req.uri().to_string();
|
||||
async fn handler(uri: axum::http::Uri, state: Arc<State>) -> impl IntoResponse {
|
||||
let uri = uri.to_string();
|
||||
let uri = if uri == "/" {
|
||||
&uri
|
||||
} else {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use super::{SectionItem, Status};
|
||||
use super::SectionItem;
|
||||
use crate::helpers::framework;
|
||||
use std::{fs::read_to_string, path::PathBuf};
|
||||
|
||||
@@ -14,15 +14,11 @@ pub fn items(app_dir: Option<&PathBuf>, tauri_dir: Option<PathBuf>) -> Vec<Secti
|
||||
let config = config_guard.as_ref().unwrap();
|
||||
|
||||
let bundle_or_build = if config.tauri.bundle.active {
|
||||
"bundle".to_string()
|
||||
"bundle"
|
||||
} else {
|
||||
"build".to_string()
|
||||
"build"
|
||||
};
|
||||
items.push(SectionItem::new(
|
||||
move || Some((format!("build-type: {bundle_or_build}"), Status::Neutral)),
|
||||
|| None,
|
||||
false,
|
||||
));
|
||||
items.push(SectionItem::new().description(format!("build-type: {bundle_or_build}")));
|
||||
|
||||
let csp = config
|
||||
.tauri
|
||||
@@ -31,42 +27,24 @@ pub fn items(app_dir: Option<&PathBuf>, tauri_dir: Option<PathBuf>) -> Vec<Secti
|
||||
.clone()
|
||||
.map(|c| c.to_string())
|
||||
.unwrap_or_else(|| "unset".to_string());
|
||||
items.push(SectionItem::new(
|
||||
move || Some((format!("CSP: {csp}"), Status::Neutral)),
|
||||
|| None,
|
||||
false,
|
||||
));
|
||||
items.push(SectionItem::new().description(format!("CSP: {csp}")));
|
||||
|
||||
let dist_dir = config.build.dist_dir.to_string();
|
||||
items.push(SectionItem::new(
|
||||
move || Some((format!("distDir: {dist_dir}"), Status::Neutral)),
|
||||
|| None,
|
||||
false,
|
||||
));
|
||||
let dist_dir = &config.build.dist_dir;
|
||||
items.push(SectionItem::new().description(format!("distDir: {dist_dir}")));
|
||||
|
||||
let dev_path = config.build.dev_path.to_string();
|
||||
items.push(SectionItem::new(
|
||||
move || Some((format!("devPath: {dev_path}"), Status::Neutral)),
|
||||
|| None,
|
||||
false,
|
||||
));
|
||||
let dev_path = &config.build.dev_path;
|
||||
items.push(SectionItem::new().description(format!("devPath: {dev_path}")));
|
||||
|
||||
if let Some(app_dir) = app_dir {
|
||||
if let Ok(package_json) = read_to_string(app_dir.join("package.json")) {
|
||||
let (framework, bundler) = framework::infer_from_package_json(&package_json);
|
||||
|
||||
if let Some(framework) = framework {
|
||||
items.push(SectionItem::new(
|
||||
move || Some((format!("framework: {framework}"), Status::Neutral)),
|
||||
|| None,
|
||||
false,
|
||||
));
|
||||
items.push(SectionItem::new().description(format!("framework: {framework}")));
|
||||
}
|
||||
|
||||
if let Some(bundler) = bundler {
|
||||
items.push(SectionItem::new(
|
||||
move || Some((format!("bundler: {bundler}"), Status::Neutral)),
|
||||
|| None,
|
||||
false,
|
||||
));
|
||||
items.push(SectionItem::new().description(format!("bundler: {bundler}")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use super::{cross_command, VersionMetadata};
|
||||
use super::{SectionItem, Status};
|
||||
use super::{cross_command, ActionResult, SectionItem, VersionMetadata};
|
||||
use colored::Colorize;
|
||||
|
||||
pub fn items(metadata: &VersionMetadata) -> (Vec<SectionItem>, Option<String>) {
|
||||
let yarn_version = cross_command("yarn")
|
||||
pub fn manager_version(package_manager: &str) -> Option<String> {
|
||||
cross_command(package_manager)
|
||||
.arg("-v")
|
||||
.output()
|
||||
.map(|o| {
|
||||
@@ -19,129 +18,58 @@ pub fn items(metadata: &VersionMetadata) -> (Vec<SectionItem>, Option<String>) {
|
||||
}
|
||||
})
|
||||
.ok()
|
||||
.unwrap_or_default();
|
||||
let yarn_version_c = yarn_version.clone();
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
pub fn items(metadata: &VersionMetadata) -> Vec<SectionItem> {
|
||||
let node_target_ver = metadata.js_cli.node.replace(">= ", "");
|
||||
|
||||
(
|
||||
vec![
|
||||
SectionItem::new(
|
||||
move || {
|
||||
cross_command("node")
|
||||
.arg("-v")
|
||||
.output()
|
||||
.map(|o| {
|
||||
if o.status.success() {
|
||||
let v = String::from_utf8_lossy(o.stdout.as_slice()).to_string();
|
||||
let v = v
|
||||
.split('\n')
|
||||
.next()
|
||||
.unwrap()
|
||||
.strip_prefix('v')
|
||||
.unwrap_or_default()
|
||||
.trim();
|
||||
Some((
|
||||
format!("node: {}{}", v, {
|
||||
let version = semver::Version::parse(v).unwrap();
|
||||
let target_version = semver::Version::parse(node_target_ver.as_str()).unwrap();
|
||||
if version < target_version {
|
||||
format!(
|
||||
" ({}, latest: {})",
|
||||
"outdated".red(),
|
||||
target_version.to_string().green()
|
||||
)
|
||||
} else {
|
||||
"".into()
|
||||
}
|
||||
}),
|
||||
Status::Neutral,
|
||||
))
|
||||
vec![
|
||||
SectionItem::new().action(move || {
|
||||
cross_command("node")
|
||||
.arg("-v")
|
||||
.output()
|
||||
.map(|o| {
|
||||
if o.status.success() {
|
||||
let v = String::from_utf8_lossy(o.stdout.as_slice()).to_string();
|
||||
let v = v
|
||||
.split('\n')
|
||||
.next()
|
||||
.unwrap()
|
||||
.strip_prefix('v')
|
||||
.unwrap_or_default()
|
||||
.trim();
|
||||
ActionResult::Description(format!("node: {}{}", v, {
|
||||
let version = semver::Version::parse(v).unwrap();
|
||||
let target_version = semver::Version::parse(node_target_ver.as_str()).unwrap();
|
||||
if version < target_version {
|
||||
format!(
|
||||
" ({}, latest: {})",
|
||||
"outdated".red(),
|
||||
target_version.to_string().green()
|
||||
)
|
||||
} else {
|
||||
None
|
||||
"".into()
|
||||
}
|
||||
})
|
||||
.ok()
|
||||
.unwrap_or_default()
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
),
|
||||
SectionItem::new(
|
||||
|| {
|
||||
cross_command("pnpm")
|
||||
.arg("-v")
|
||||
.output()
|
||||
.map(|o| {
|
||||
if o.status.success() {
|
||||
let v = String::from_utf8_lossy(o.stdout.as_slice()).to_string();
|
||||
Some((
|
||||
format!("pnpm: {}", v.split('\n').next().unwrap()),
|
||||
Status::Neutral,
|
||||
))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.ok()
|
||||
.unwrap_or_default()
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
),
|
||||
SectionItem::new(
|
||||
|| {
|
||||
cross_command("bun")
|
||||
.arg("-v")
|
||||
.output()
|
||||
.map(|o| {
|
||||
if o.status.success() {
|
||||
let v = String::from_utf8_lossy(o.stdout.as_slice()).to_string();
|
||||
Some((
|
||||
format!("bun: {}", v.split('\n').next().unwrap()),
|
||||
Status::Neutral,
|
||||
))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.ok()
|
||||
.unwrap_or_default()
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
),
|
||||
SectionItem::new(
|
||||
move || {
|
||||
yarn_version_c
|
||||
.as_ref()
|
||||
.map(|v| (format!("yarn: {v}"), Status::Neutral))
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
),
|
||||
SectionItem::new(
|
||||
|| {
|
||||
cross_command("npm")
|
||||
.arg("-v")
|
||||
.output()
|
||||
.map(|o| {
|
||||
if o.status.success() {
|
||||
let v = String::from_utf8_lossy(o.stdout.as_slice()).to_string();
|
||||
Some((
|
||||
format!("npm: {}", v.split('\n').next().unwrap()),
|
||||
Status::Neutral,
|
||||
))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.ok()
|
||||
.unwrap_or_default()
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
),
|
||||
],
|
||||
yarn_version,
|
||||
)
|
||||
}))
|
||||
} else {
|
||||
ActionResult::None
|
||||
}
|
||||
})
|
||||
.ok()
|
||||
.unwrap_or_default()
|
||||
}),
|
||||
SectionItem::new().action(|| {
|
||||
manager_version("pnpm")
|
||||
.map(|v| format!("pnpm: {}", v))
|
||||
.into()
|
||||
}),
|
||||
SectionItem::new().action(|| {
|
||||
manager_version("yarn")
|
||||
.map(|v| format!("yarn: {}", v))
|
||||
.into()
|
||||
}),
|
||||
SectionItem::new().action(|| manager_version("npm").map(|v| format!("npm: {}", v)).into()),
|
||||
SectionItem::new().action(|| manager_version("bun").map(|v| format!("bun: {}", v)).into()),
|
||||
]
|
||||
}
|
||||
|
||||
@@ -7,95 +7,55 @@ use super::Status;
|
||||
use colored::Colorize;
|
||||
use std::process::Command;
|
||||
|
||||
fn component_version(component: &str) -> Option<(String, Status)> {
|
||||
Command::new(component)
|
||||
.arg("-V")
|
||||
.output()
|
||||
.map(|o| String::from_utf8_lossy(o.stdout.as_slice()).to_string())
|
||||
.map(|v| {
|
||||
format!(
|
||||
"{component}: {}",
|
||||
v.split('\n')
|
||||
.next()
|
||||
.unwrap()
|
||||
.strip_prefix(&format!("{component} "))
|
||||
.unwrap_or_default()
|
||||
)
|
||||
})
|
||||
.map(|desc| (desc, Status::Success))
|
||||
.ok()
|
||||
}
|
||||
|
||||
pub fn items() -> Vec<SectionItem> {
|
||||
vec![
|
||||
SectionItem::new(
|
||||
|| {
|
||||
Some(
|
||||
Command::new("rustc")
|
||||
.arg("-V")
|
||||
.output()
|
||||
.map(|o| String::from_utf8_lossy(o.stdout.as_slice()).to_string())
|
||||
.map(|v| {
|
||||
SectionItem::new().action(|| {
|
||||
component_version("rustc")
|
||||
.unwrap_or_else(|| {
|
||||
(
|
||||
format!(
|
||||
"rustc: {}",
|
||||
v.split('\n')
|
||||
.next()
|
||||
.unwrap()
|
||||
.strip_prefix("rustc ")
|
||||
.unwrap_or_default()
|
||||
)
|
||||
})
|
||||
.map(|desc| (desc, Status::Success))
|
||||
.ok()
|
||||
.unwrap_or_else(|| {
|
||||
(
|
||||
format!(
|
||||
"rustc: {}\nMaybe you don't have rust installed! Visit {}",
|
||||
"not installed!".red(),
|
||||
"https://rustup.rs/".cyan()
|
||||
),
|
||||
Status::Error,
|
||||
)
|
||||
}),
|
||||
)
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
),
|
||||
SectionItem::new(
|
||||
|| {
|
||||
Some(
|
||||
Command::new("cargo")
|
||||
.arg("-V")
|
||||
.output()
|
||||
.map(|o| String::from_utf8_lossy(o.stdout.as_slice()).to_string())
|
||||
.map(|v| {
|
||||
"rustc: {}\nMaybe you don't have rust installed! Visit {}",
|
||||
"not installed!".red(),
|
||||
"https://rustup.rs/".cyan()
|
||||
),
|
||||
Status::Error,
|
||||
)
|
||||
}).into()
|
||||
}),
|
||||
SectionItem::new().action(|| {
|
||||
component_version("cargo")
|
||||
.unwrap_or_else(|| {
|
||||
(
|
||||
format!(
|
||||
"Cargo: {}",
|
||||
v.split('\n')
|
||||
.next()
|
||||
.unwrap()
|
||||
.strip_prefix("cargo ")
|
||||
.unwrap_or_default()
|
||||
)
|
||||
})
|
||||
.map(|desc| (desc, Status::Success))
|
||||
.ok()
|
||||
.unwrap_or_else(|| {
|
||||
(
|
||||
format!(
|
||||
"Cargo: {}\nMaybe you don't have rust installed! Visit {}",
|
||||
"not installed!".red(),
|
||||
"https://rustup.rs/".cyan()
|
||||
),
|
||||
Status::Error,
|
||||
)
|
||||
}),
|
||||
)
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
),
|
||||
SectionItem::new(
|
||||
|| {
|
||||
Some(
|
||||
Command::new("rustup")
|
||||
.arg("-V")
|
||||
.output()
|
||||
.map(|o| String::from_utf8_lossy(o.stdout.as_slice()).to_string())
|
||||
.map(|v| {
|
||||
format!(
|
||||
"rustup: {}",
|
||||
v.split('\n')
|
||||
.next()
|
||||
.unwrap()
|
||||
.strip_prefix("rustup ")
|
||||
.unwrap_or_default()
|
||||
)
|
||||
})
|
||||
.map(|desc| (desc, Status::Success))
|
||||
.ok()
|
||||
"Cargo: {}\nMaybe you don't have rust installed! Visit {}",
|
||||
"not installed!".red(),
|
||||
"https://rustup.rs/".cyan()
|
||||
),
|
||||
Status::Error,
|
||||
)
|
||||
}).into()
|
||||
}),
|
||||
SectionItem::new().action(|| {
|
||||
component_version("rustup")
|
||||
.unwrap_or_else(|| {
|
||||
(
|
||||
format!(
|
||||
@@ -105,15 +65,9 @@ pub fn items() -> Vec<SectionItem> {
|
||||
),
|
||||
Status::Warning,
|
||||
)
|
||||
}),
|
||||
)
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
),
|
||||
SectionItem::new(
|
||||
|| {
|
||||
Some(
|
||||
}).into()
|
||||
}),
|
||||
SectionItem::new().action(|| {
|
||||
Command::new("rustup")
|
||||
.args(["show", "active-toolchain"])
|
||||
.output()
|
||||
@@ -135,11 +89,7 @@ pub fn items() -> Vec<SectionItem> {
|
||||
),
|
||||
Status::Warning,
|
||||
)
|
||||
}),
|
||||
)
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
),
|
||||
}).into()
|
||||
}),
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use super::SectionItem;
|
||||
use super::Status;
|
||||
use super::{SectionItem, Status};
|
||||
use colored::Colorize;
|
||||
#[cfg(windows)]
|
||||
use serde::Deserialize;
|
||||
@@ -177,74 +176,55 @@ fn is_xcode_command_line_tools_installed() -> bool {
|
||||
|
||||
pub fn items() -> Vec<SectionItem> {
|
||||
vec![
|
||||
SectionItem::new(
|
||||
|| {
|
||||
let os_info = os_info::get();
|
||||
Some((
|
||||
format!(
|
||||
"OS: {} {} {:?}",
|
||||
os_info.os_type(),
|
||||
os_info.version(),
|
||||
os_info.bitness()
|
||||
),
|
||||
Status::Neutral,
|
||||
))
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
),
|
||||
SectionItem::new().action(|| {
|
||||
let os_info = os_info::get();
|
||||
format!(
|
||||
"OS: {} {} {:?}",
|
||||
os_info.os_type(),
|
||||
os_info.version(),
|
||||
os_info.bitness()
|
||||
).into()
|
||||
}),
|
||||
#[cfg(windows)]
|
||||
SectionItem::new(
|
||||
|| {
|
||||
let error = || {
|
||||
format!(
|
||||
"Webview2: {}\nVisit {}",
|
||||
"not installed!".red(),
|
||||
"https://developer.microsoft.com/en-us/microsoft-edge/webview2/".cyan()
|
||||
)
|
||||
};
|
||||
Some(
|
||||
webview2_version()
|
||||
.map(|v| {
|
||||
v.map(|v| (format!("WebView2: {}", v), Status::Success))
|
||||
.unwrap_or_else(|| (error(), Status::Error))
|
||||
})
|
||||
.unwrap_or_else(|_| (error(), Status::Error)),
|
||||
)
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
),
|
||||
SectionItem::new().action(|| {
|
||||
let error = format!(
|
||||
"Webview2: {}\nVisit {}",
|
||||
"not installed!".red(),
|
||||
"https://developer.microsoft.com/en-us/microsoft-edge/webview2/".cyan()
|
||||
);
|
||||
webview2_version()
|
||||
.map(|v| {
|
||||
v.map(|v| (format!("WebView2: {}", v), Status::Success))
|
||||
.unwrap_or_else(|| (error.clone(), Status::Error))
|
||||
})
|
||||
.unwrap_or_else(|_| (error, Status::Error)).into()
|
||||
}),
|
||||
#[cfg(windows)]
|
||||
SectionItem::new(
|
||||
|| {
|
||||
let build_tools = build_tools_version().unwrap_or_default();
|
||||
if build_tools.is_empty() {
|
||||
Some((
|
||||
SectionItem::new().action(|| {
|
||||
let build_tools = build_tools_version().unwrap_or_default();
|
||||
if build_tools.is_empty() {
|
||||
(
|
||||
format!(
|
||||
"Couldn't detect any Visual Studio or VS Build Tools instance with MSVC and SDK components. Download from {}",
|
||||
"https://aka.ms/vs/17/release/vs_BuildTools.exe".cyan()
|
||||
),
|
||||
Status::Error,
|
||||
))
|
||||
} else {
|
||||
Some((
|
||||
format!(
|
||||
"MSVC: {}{}",
|
||||
if build_tools.len() > 1 {
|
||||
format!("\n {} ", "-".cyan())
|
||||
} else {
|
||||
"".into()
|
||||
},
|
||||
build_tools.join(format!("\n {} ", "-".cyan()).as_str()),
|
||||
),
|
||||
Status::Success,
|
||||
))
|
||||
}
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
),
|
||||
).into()
|
||||
} else {
|
||||
(
|
||||
format!(
|
||||
"MSVC: {}{}",
|
||||
if build_tools.len() > 1 {
|
||||
format!("\n {} ", "-".cyan())
|
||||
} else {
|
||||
"".into()
|
||||
},
|
||||
build_tools.join(format!("\n {} ", "-".cyan()).as_str()),
|
||||
),
|
||||
Status::Success,
|
||||
).into()
|
||||
}
|
||||
}),
|
||||
#[cfg(any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
@@ -252,9 +232,7 @@ pub fn items() -> Vec<SectionItem> {
|
||||
target_os = "openbsd",
|
||||
target_os = "netbsd"
|
||||
))]
|
||||
SectionItem::new(
|
||||
|| {
|
||||
Some(
|
||||
SectionItem::new().action(|| {
|
||||
webkit2gtk_ver()
|
||||
.map(|v| (format!("webkit2gtk-4.0: {v}"), Status::Success))
|
||||
.unwrap_or_else(|| {
|
||||
@@ -266,11 +244,8 @@ pub fn items() -> Vec<SectionItem> {
|
||||
),
|
||||
Status::Error,
|
||||
)
|
||||
}),
|
||||
)
|
||||
}).into()
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
),
|
||||
#[cfg(any(
|
||||
target_os = "linux",
|
||||
@@ -279,9 +254,7 @@ pub fn items() -> Vec<SectionItem> {
|
||||
target_os = "openbsd",
|
||||
target_os = "netbsd"
|
||||
))]
|
||||
SectionItem::new(
|
||||
|| {
|
||||
Some(
|
||||
SectionItem::new().action(|| {
|
||||
rsvg2_ver()
|
||||
.map(|v| (format!("rsvg2: {v}"), Status::Success))
|
||||
.unwrap_or_else(|| {
|
||||
@@ -293,16 +266,12 @@ pub fn items() -> Vec<SectionItem> {
|
||||
),
|
||||
Status::Error,
|
||||
)
|
||||
}),
|
||||
)
|
||||
}).into()
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
),
|
||||
#[cfg(target_os = "macos")]
|
||||
SectionItem::new(
|
||||
|| {
|
||||
Some(if is_xcode_command_line_tools_installed() {
|
||||
SectionItem::new().action(|| {
|
||||
if is_xcode_command_line_tools_installed() {
|
||||
(
|
||||
"Xcode Command Line Tools: installed".into(),
|
||||
Status::Success,
|
||||
@@ -316,10 +285,8 @@ pub fn items() -> Vec<SectionItem> {
|
||||
),
|
||||
Status::Error,
|
||||
)
|
||||
})
|
||||
}.into()
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
use crate::Result;
|
||||
use clap::Parser;
|
||||
use colored::Colorize;
|
||||
use colored::{ColoredString, Colorize};
|
||||
use dialoguer::{theme::ColorfulTheme, Confirm};
|
||||
use serde::Deserialize;
|
||||
use std::{
|
||||
@@ -92,6 +92,18 @@ pub enum Status {
|
||||
Error,
|
||||
}
|
||||
|
||||
impl Status {
|
||||
fn color<S: AsRef<str>>(&self, s: S) -> ColoredString {
|
||||
let s = s.as_ref();
|
||||
match self {
|
||||
Status::Neutral => s.normal(),
|
||||
Status::Success => s.green(),
|
||||
Status::Warning => s.yellow(),
|
||||
Status::Error => s.red(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for Status {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||
write!(
|
||||
@@ -107,15 +119,55 @@ impl Display for Status {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub enum ActionResult {
|
||||
Full {
|
||||
description: String,
|
||||
status: Status,
|
||||
},
|
||||
Description(String),
|
||||
#[default]
|
||||
None,
|
||||
}
|
||||
|
||||
impl From<String> for ActionResult {
|
||||
fn from(value: String) -> Self {
|
||||
ActionResult::Description(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<(String, Status)> for ActionResult {
|
||||
fn from(value: (String, Status)) -> Self {
|
||||
ActionResult::Full {
|
||||
description: value.0,
|
||||
status: value.1,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Option<String>> for ActionResult {
|
||||
fn from(value: Option<String>) -> Self {
|
||||
value.map(ActionResult::Description).unwrap_or_default()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Option<(String, Status)>> for ActionResult {
|
||||
fn from(value: Option<(String, Status)>) -> Self {
|
||||
value
|
||||
.map(|v| ActionResult::Full {
|
||||
description: v.0,
|
||||
status: v.1,
|
||||
})
|
||||
.unwrap_or_default()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct SectionItem {
|
||||
/// If description is none, the item is skipped
|
||||
description: Option<String>,
|
||||
status: Status,
|
||||
/// This closure return will be assigned to status and description
|
||||
action: Box<dyn FnMut() -> Option<(String, Status)>>,
|
||||
/// This closure return will be assigned to status and description
|
||||
action_if_err: Box<dyn FnMut() -> Option<(String, Status)>>,
|
||||
has_action_if_err: bool,
|
||||
action: Option<Box<dyn FnMut() -> ActionResult>>,
|
||||
action_if_err: Option<Box<dyn FnMut() -> ActionResult>>,
|
||||
}
|
||||
|
||||
impl Display for SectionItem {
|
||||
@@ -131,29 +183,66 @@ impl Display for SectionItem {
|
||||
}
|
||||
|
||||
impl SectionItem {
|
||||
fn new<
|
||||
F1: FnMut() -> Option<(String, Status)> + 'static,
|
||||
F2: FnMut() -> Option<(String, Status)> + 'static,
|
||||
>(
|
||||
action: F1,
|
||||
action_if_err: F2,
|
||||
has_action_if_err: bool,
|
||||
) -> Self {
|
||||
fn new() -> Self {
|
||||
Self {
|
||||
action: Box::new(action),
|
||||
action_if_err: Box::new(action_if_err),
|
||||
has_action_if_err,
|
||||
action: None,
|
||||
action_if_err: None,
|
||||
description: None,
|
||||
status: Status::Neutral,
|
||||
}
|
||||
}
|
||||
fn run(&mut self, interactive: bool) -> Status {
|
||||
if let Some(ret) = (self.action)() {
|
||||
self.description = Some(ret.0);
|
||||
self.status = ret.1;
|
||||
}
|
||||
|
||||
if self.status == Status::Error && interactive && self.has_action_if_err {
|
||||
fn action<F: FnMut() -> ActionResult + 'static>(mut self, action: F) -> Self {
|
||||
self.action = Some(Box::new(action));
|
||||
self
|
||||
}
|
||||
|
||||
// fn action_if_err<F: FnMut() -> ActionResult + 'static>(mut self, action: F) -> Self {
|
||||
// self.action_if_err = Some(Box::new(action));
|
||||
// self
|
||||
// }
|
||||
|
||||
fn description<S: AsRef<str>>(mut self, description: S) -> Self {
|
||||
self.description = Some(description.as_ref().to_string());
|
||||
self
|
||||
}
|
||||
|
||||
fn run_action(&mut self) {
|
||||
let mut res = ActionResult::None;
|
||||
if let Some(action) = &mut self.action {
|
||||
res = action();
|
||||
}
|
||||
self.apply_action_result(res);
|
||||
}
|
||||
|
||||
fn run_action_if_err(&mut self) {
|
||||
let mut res = ActionResult::None;
|
||||
if let Some(action) = &mut self.action_if_err {
|
||||
res = action();
|
||||
}
|
||||
self.apply_action_result(res);
|
||||
}
|
||||
|
||||
fn apply_action_result(&mut self, result: ActionResult) {
|
||||
match result {
|
||||
ActionResult::Full {
|
||||
description,
|
||||
status,
|
||||
} => {
|
||||
self.description = Some(description);
|
||||
self.status = status;
|
||||
}
|
||||
ActionResult::Description(description) => {
|
||||
self.description = Some(description);
|
||||
}
|
||||
ActionResult::None => {}
|
||||
}
|
||||
}
|
||||
|
||||
fn run(&mut self, interactive: bool) -> Status {
|
||||
self.run_action();
|
||||
|
||||
if self.status == Status::Error && interactive && self.action_if_err.is_some() {
|
||||
if let Some(description) = &self.description {
|
||||
let confirmed = Confirm::with_theme(&ColorfulTheme::default())
|
||||
.with_prompt(format!(
|
||||
@@ -163,13 +252,11 @@ impl SectionItem {
|
||||
.interact()
|
||||
.unwrap_or(false);
|
||||
if confirmed {
|
||||
if let Some(ret) = (self.action_if_err)() {
|
||||
self.description = Some(ret.0);
|
||||
self.status = ret.1;
|
||||
}
|
||||
self.run_action_if_err()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.status
|
||||
}
|
||||
}
|
||||
@@ -192,12 +279,7 @@ impl Section<'_> {
|
||||
}
|
||||
|
||||
let status_str = format!("[{status}]");
|
||||
let status = match status {
|
||||
Status::Neutral => status_str.normal(),
|
||||
Status::Success => status_str.green(),
|
||||
Status::Warning => status_str.yellow(),
|
||||
Status::Error => status_str.red(),
|
||||
};
|
||||
let status = status.color(status_str);
|
||||
|
||||
println!();
|
||||
println!("{} {}", status, self.label.bold().yellow());
|
||||
@@ -239,7 +321,7 @@ pub fn command(options: Options) -> Result<()> {
|
||||
};
|
||||
environment.items.extend(env_system::items());
|
||||
environment.items.extend(env_rust::items());
|
||||
let (items, yarn_version) = env_nodejs::items(&metadata);
|
||||
let items = env_nodejs::items(&metadata);
|
||||
environment.items.extend(items);
|
||||
|
||||
let mut packages = Section {
|
||||
@@ -252,7 +334,7 @@ pub fn command(options: Options) -> Result<()> {
|
||||
.extend(packages_rust::items(app_dir, tauri_dir.clone()));
|
||||
packages
|
||||
.items
|
||||
.extend(packages_nodejs::items(app_dir, &metadata, yarn_version));
|
||||
.extend(packages_nodejs::items(app_dir, &metadata));
|
||||
|
||||
let mut app = Section {
|
||||
label: "App",
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use super::{cross_command, VersionMetadata};
|
||||
use super::{SectionItem, Status};
|
||||
use super::SectionItem;
|
||||
use super::{cross_command, env_nodejs::manager_version, VersionMetadata};
|
||||
use colored::Colorize;
|
||||
use serde::Deserialize;
|
||||
use std::fmt::Display;
|
||||
@@ -241,11 +241,7 @@ fn get_package_manager<T: AsRef<str>>(app_dir_entries: &[T]) -> PackageManager {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn items(
|
||||
app_dir: Option<&PathBuf>,
|
||||
metadata: &VersionMetadata,
|
||||
yarn_version: Option<String>,
|
||||
) -> Vec<SectionItem> {
|
||||
pub fn items(app_dir: Option<&PathBuf>, metadata: &VersionMetadata) -> Vec<SectionItem> {
|
||||
let mut package_manager = PackageManager::Npm;
|
||||
if let Some(app_dir) = &app_dir {
|
||||
let app_dir_entries = std::fs::read_dir(app_dir)
|
||||
@@ -256,7 +252,7 @@ pub fn items(
|
||||
}
|
||||
|
||||
if package_manager == PackageManager::Yarn
|
||||
&& yarn_version
|
||||
&& manager_version("yarn")
|
||||
.map(|v| v.chars().next().map(|c| c > '1').unwrap_or_default())
|
||||
.unwrap_or(false)
|
||||
{
|
||||
@@ -270,46 +266,40 @@ pub fn items(
|
||||
("@tauri-apps/cli", Some(metadata.js_cli.version.clone())),
|
||||
] {
|
||||
let app_dir = app_dir.clone();
|
||||
let item = SectionItem::new(
|
||||
move || {
|
||||
let version = version.clone().unwrap_or_else(|| {
|
||||
npm_package_version(&package_manager, package, &app_dir)
|
||||
.unwrap_or_default()
|
||||
.unwrap_or_default()
|
||||
});
|
||||
let latest_ver = npm_latest_version(&package_manager, package)
|
||||
let item = SectionItem::new().action(move || {
|
||||
let version = version.clone().unwrap_or_else(|| {
|
||||
npm_package_version(&package_manager, package, &app_dir)
|
||||
.unwrap_or_default()
|
||||
.unwrap_or_default();
|
||||
.unwrap_or_default()
|
||||
});
|
||||
let latest_ver = npm_latest_version(&package_manager, package)
|
||||
.unwrap_or_default()
|
||||
.unwrap_or_default();
|
||||
|
||||
Some((
|
||||
if version.is_empty() {
|
||||
format!("{} {}: not installed!", package, "[NPM]".dimmed())
|
||||
if version.is_empty() {
|
||||
format!("{} {}: not installed!", package, "".green())
|
||||
} else {
|
||||
format!(
|
||||
"{} {}: {}{}",
|
||||
package,
|
||||
"[NPM]".dimmed(),
|
||||
version,
|
||||
if !(version.is_empty() || latest_ver.is_empty()) {
|
||||
let version = semver::Version::parse(version.as_str()).unwrap();
|
||||
let target_version = semver::Version::parse(latest_ver.as_str()).unwrap();
|
||||
|
||||
if version < target_version {
|
||||
format!(" ({}, latest: {})", "outdated".yellow(), latest_ver.green())
|
||||
} else {
|
||||
"".into()
|
||||
}
|
||||
} else {
|
||||
format!(
|
||||
"{} {}: {}{}",
|
||||
package,
|
||||
"[NPM]".dimmed(),
|
||||
version,
|
||||
if !(version.is_empty() || latest_ver.is_empty()) {
|
||||
let version = semver::Version::parse(version.as_str()).unwrap();
|
||||
let target_version = semver::Version::parse(latest_ver.as_str()).unwrap();
|
||||
|
||||
if version < target_version {
|
||||
format!(" ({}, latest: {})", "outdated".yellow(), latest_ver.green())
|
||||
} else {
|
||||
"".into()
|
||||
}
|
||||
} else {
|
||||
"".into()
|
||||
}
|
||||
)
|
||||
},
|
||||
Status::Neutral,
|
||||
))
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
);
|
||||
"".into()
|
||||
}
|
||||
)
|
||||
}
|
||||
.into()
|
||||
});
|
||||
|
||||
items.push(item);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use super::{SectionItem, Status};
|
||||
use super::{ActionResult, SectionItem};
|
||||
use crate::interface::rust::get_workspace_dir;
|
||||
use colored::Colorize;
|
||||
use serde::Deserialize;
|
||||
@@ -212,96 +212,58 @@ pub fn items(app_dir: Option<&PathBuf>, tauri_dir: Option<PathBuf>) -> Vec<Secti
|
||||
for dep in ["tauri", "tauri-build", "wry", "tao"] {
|
||||
let (version_string, version_suffix) =
|
||||
crate_version(&tauri_dir, manifest.as_ref(), lock.as_ref(), dep);
|
||||
let dep = dep.to_string();
|
||||
let item = SectionItem::new(
|
||||
move || {
|
||||
Some((
|
||||
format!(
|
||||
"{} {}: {}{}",
|
||||
dep,
|
||||
"[RUST]".dimmed(),
|
||||
version_string,
|
||||
version_suffix
|
||||
.clone()
|
||||
.map(|s| format!(",{s}"))
|
||||
.unwrap_or_else(|| "".into())
|
||||
),
|
||||
Status::Neutral,
|
||||
))
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
);
|
||||
let item = SectionItem::new().description(format!(
|
||||
"{} {}: {}{}",
|
||||
dep,
|
||||
"[RUST]".dimmed(),
|
||||
version_string,
|
||||
version_suffix
|
||||
.clone()
|
||||
.map(|s| format!(",{s}"))
|
||||
.unwrap_or_else(|| "".into())
|
||||
));
|
||||
items.push(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if let Ok(rust_cli) = std::process::Command::new("cargo")
|
||||
.arg("tauri")
|
||||
.arg("-V")
|
||||
.output()
|
||||
{
|
||||
if rust_cli.status.success() {
|
||||
let stdout = String::from_utf8_lossy(rust_cli.stdout.as_slice()).to_string();
|
||||
let mut output = stdout.split(' ');
|
||||
let dep = output.next().unwrap_or_default().to_string();
|
||||
let version_string = output
|
||||
.next()
|
||||
.unwrap_or_default()
|
||||
.strip_suffix('\n')
|
||||
.unwrap_or_default()
|
||||
.to_string();
|
||||
let tauri_cli_rust_item = SectionItem::new().action(|| {
|
||||
std::process::Command::new("cargo")
|
||||
.arg("tauri")
|
||||
.arg("-V")
|
||||
.output()
|
||||
.ok()
|
||||
.map(|o| {
|
||||
if o.status.success() {
|
||||
let out = String::from_utf8_lossy(o.stdout.as_slice());
|
||||
let (package, version) = out.split_once(' ').unwrap_or_default();
|
||||
let latest_ver = crate_latest_version(package).unwrap_or_default();
|
||||
format!(
|
||||
"{} {}: {}{}",
|
||||
package,
|
||||
"[RUST]".dimmed(),
|
||||
version.split_once('\n').unwrap_or_default().0,
|
||||
if !(version.is_empty() || latest_ver.is_empty()) {
|
||||
let version = semver::Version::parse(version).unwrap();
|
||||
let target_version = semver::Version::parse(latest_ver.as_str()).unwrap();
|
||||
|
||||
let version_suffix = match crate_latest_version(&dep) {
|
||||
Some(target_version) => {
|
||||
let version = semver::Version::parse(&version_string).unwrap();
|
||||
let target_version = semver::Version::parse(&target_version).unwrap();
|
||||
if version < target_version {
|
||||
Some(format!(
|
||||
" ({}, latest: {})",
|
||||
"outdated".yellow(),
|
||||
target_version.to_string().green()
|
||||
))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
if version < target_version {
|
||||
format!(" ({}, latest: {})", "outdated".yellow(), latest_ver.green())
|
||||
} else {
|
||||
"".into()
|
||||
}
|
||||
} else {
|
||||
"".into()
|
||||
}
|
||||
)
|
||||
.into()
|
||||
} else {
|
||||
ActionResult::None
|
||||
}
|
||||
None => None,
|
||||
};
|
||||
|
||||
items.push(SectionItem::new(
|
||||
move || {
|
||||
Some((
|
||||
format!(
|
||||
"{} {}: {}{}",
|
||||
dep,
|
||||
"[RUST]".dimmed(),
|
||||
version_string,
|
||||
version_suffix
|
||||
.clone()
|
||||
.map(|s| format!(", {s}"))
|
||||
.unwrap_or_else(|| "".into())
|
||||
),
|
||||
Status::Neutral,
|
||||
))
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
));
|
||||
} else {
|
||||
items.push(SectionItem::new(
|
||||
move || {
|
||||
Some((
|
||||
format!("tauri-cli {}: not installed!", "[RUST]".dimmed()),
|
||||
Status::Neutral,
|
||||
))
|
||||
},
|
||||
|| None,
|
||||
false,
|
||||
));
|
||||
}
|
||||
}
|
||||
})
|
||||
.unwrap_or_default()
|
||||
});
|
||||
items.push(tauri_cli_rust_item);
|
||||
|
||||
items
|
||||
}
|
||||
|
||||
@@ -207,9 +207,6 @@ fn build_dev_app<F: FnOnce(ExitStatus, ExitReason) + Send + 'static>(
|
||||
break;
|
||||
}
|
||||
let _ = io_stderr.write_all(&buf);
|
||||
if !buf.ends_with(&[b'\r']) {
|
||||
let _ = io_stderr.write_all(b"\n");
|
||||
}
|
||||
lines.push(String::from_utf8_lossy(&buf).into_owned());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -24,6 +24,7 @@ use std::io::{BufReader, Write};
|
||||
use std::process::{exit, Command, ExitStatus, Output, Stdio};
|
||||
use std::{
|
||||
ffi::OsString,
|
||||
io::BufRead,
|
||||
sync::{Arc, Mutex},
|
||||
};
|
||||
|
||||
@@ -226,16 +227,15 @@ impl CommandExt for Command {
|
||||
let stdout_lines = Arc::new(Mutex::new(Vec::new()));
|
||||
let stdout_lines_ = stdout_lines.clone();
|
||||
std::thread::spawn(move || {
|
||||
let mut buf = Vec::new();
|
||||
let mut line = String::new();
|
||||
let mut lines = stdout_lines_.lock().unwrap();
|
||||
loop {
|
||||
buf.clear();
|
||||
if let Ok(0) = tauri_utils::io::read_line(&mut stdout, &mut buf) {
|
||||
line.clear();
|
||||
if let Ok(0) = stdout.read_line(&mut line) {
|
||||
break;
|
||||
}
|
||||
debug!(action = "stdout"; "{}", String::from_utf8_lossy(&buf));
|
||||
lines.extend(buf.clone());
|
||||
lines.push(b'\n');
|
||||
debug!(action = "stdout"; "{}", &line[0..line.len() - 1]);
|
||||
lines.extend(line.as_bytes().to_vec());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -243,16 +243,15 @@ impl CommandExt for Command {
|
||||
let stderr_lines = Arc::new(Mutex::new(Vec::new()));
|
||||
let stderr_lines_ = stderr_lines.clone();
|
||||
std::thread::spawn(move || {
|
||||
let mut buf = Vec::new();
|
||||
let mut line = String::new();
|
||||
let mut lines = stderr_lines_.lock().unwrap();
|
||||
loop {
|
||||
buf.clear();
|
||||
if let Ok(0) = tauri_utils::io::read_line(&mut stderr, &mut buf) {
|
||||
line.clear();
|
||||
if let Ok(0) = stderr.read_line(&mut line) {
|
||||
break;
|
||||
}
|
||||
debug!(action = "stderr"; "{}", String::from_utf8_lossy(&buf));
|
||||
lines.extend(buf.clone());
|
||||
lines.push(b'\n');
|
||||
debug!(action = "stderr"; "{}", &line[0..line.len() - 1]);
|
||||
lines.extend(line.as_bytes().to_vec());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user