update cargo deps (#2959)

* update cargo deps

* readd device info header
This commit is contained in:
Aiden McClelland
2025-06-05 17:17:02 -06:00
committed by GitHub
parent e7469388cc
commit 586d950b8c
41 changed files with 551 additions and 558 deletions

792
core/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,12 +6,13 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
axum = "0.7.5" axum = "0.8.4"
base64 = "0.21.4" base64 = "0.22.1"
color-eyre = "0.6.2" color-eyre = "0.6.2"
ed25519-dalek = { version = "2.0.0", features = ["serde"] } ed25519-dalek = { version = "2.0.0", features = ["serde"] }
gpt = "4.1.0"
lazy_static = "1.4" lazy_static = "1.4"
mbrman = "0.5.2" mbrman = "0.6.0"
exver = { version = "0.2.0", git = "https://github.com/Start9Labs/exver-rs.git", features = [ exver = { version = "0.2.0", git = "https://github.com/Start9Labs/exver-rs.git", features = [
"serde", "serde",
] } ] }
@@ -21,21 +22,21 @@ openssl = { version = "0.10.57", features = ["vendored"] }
patch-db = { version = "*", path = "../../patch-db/patch-db", features = [ patch-db = { version = "*", path = "../../patch-db/patch-db", features = [
"trace", "trace",
] } ] }
rand = "0.8.5" rand = "0.9.1"
regex = "1.10.2" regex = "1.10.2"
reqwest = "0.12" reqwest = "0.12"
rpc-toolkit = { git = "https://github.com/Start9Labs/rpc-toolkit.git", branch = "master" } rpc-toolkit = { git = "https://github.com/Start9Labs/rpc-toolkit.git", branch = "master" }
rustls = "0.23" rustls = "0.23"
serde = { version = "1.0", features = ["derive", "rc"] } serde = { version = "1.0", features = ["derive", "rc"] }
serde_json = "1.0" serde_json = "1.0"
sqlx = { version = "0.7.2", features = [ sqlx = { version = "0.8.6", features = [
"chrono", "chrono",
"runtime-tokio-rustls", "runtime-tokio-rustls",
"postgres", "postgres",
] } ] }
ssh-key = "0.6.2" ssh-key = "0.6.2"
ts-rs = { git = "https://github.com/dr-bonez/ts-rs.git", branch = "feature/top-level-as" } # "8" ts-rs = { git = "https://github.com/dr-bonez/ts-rs.git", branch = "feature/top-level-as" } # "8"
thiserror = "1.0" thiserror = "2.0"
tokio = { version = "1", features = ["full"] } tokio = { version = "1", features = ["full"] }
torut = { git = "https://github.com/Start9Labs/torut.git", branch = "update/dependencies" } torut = { git = "https://github.com/Start9Labs/torut.git", branch = "update/dependencies" }
tracing = "0.1.39" tracing = "0.1.39"

View File

@@ -323,6 +323,16 @@ impl From<mbrman::Error> for Error {
Error::new(e, ErrorKind::DiskManagement) Error::new(e, ErrorKind::DiskManagement)
} }
} }
impl From<gpt::GptError> for Error {
fn from(e: gpt::GptError) -> Self {
Error::new(e, ErrorKind::DiskManagement)
}
}
impl From<gpt::mbr::MBRError> for Error {
fn from(e: gpt::mbr::MBRError) -> Self {
Error::new(e, ErrorKind::DiskManagement)
}
}
impl From<InvalidUri> for Error { impl From<InvalidUri> for Error {
fn from(e: InvalidUri) -> Self { fn from(e: InvalidUri) -> Self {
Error::new(eyre!("{}", e), ErrorKind::ParseUrl) Error::new(eyre!("{}", e), ErrorKind::ParseUrl)

View File

@@ -63,8 +63,8 @@ impl AsRef<Path> for HostId {
impl<'q> sqlx::Encode<'q, sqlx::Postgres> for HostId { impl<'q> sqlx::Encode<'q, sqlx::Postgres> for HostId {
fn encode_by_ref( fn encode_by_ref(
&self, &self,
buf: &mut <sqlx::Postgres as sqlx::database::HasArguments<'q>>::ArgumentBuffer, buf: &mut <sqlx::Postgres as sqlx::Database>::ArgumentBuffer<'q>,
) -> sqlx::encode::IsNull { ) -> Result<sqlx::encode::IsNull, sqlx::error::BoxDynError> {
<&str as sqlx::Encode<'q, sqlx::Postgres>>::encode_by_ref(&&**self, buf) <&str as sqlx::Encode<'q, sqlx::Postgres>>::encode_by_ref(&&**self, buf)
} }
} }

View File

@@ -119,8 +119,8 @@ impl Serialize for Id {
impl<'q> sqlx::Encode<'q, sqlx::Postgres> for Id { impl<'q> sqlx::Encode<'q, sqlx::Postgres> for Id {
fn encode_by_ref( fn encode_by_ref(
&self, &self,
buf: &mut <sqlx::Postgres as sqlx::database::HasArguments<'q>>::ArgumentBuffer, buf: &mut <sqlx::Postgres as sqlx::Database>::ArgumentBuffer<'q>,
) -> sqlx::encode::IsNull { ) -> Result<sqlx::encode::IsNull, sqlx::error::BoxDynError> {
<&str as sqlx::Encode<'q, sqlx::Postgres>>::encode_by_ref(&&**self, buf) <&str as sqlx::Encode<'q, sqlx::Postgres>>::encode_by_ref(&&**self, buf)
} }
} }

View File

@@ -90,8 +90,8 @@ impl Serialize for PackageId {
impl<'q> sqlx::Encode<'q, sqlx::Postgres> for PackageId { impl<'q> sqlx::Encode<'q, sqlx::Postgres> for PackageId {
fn encode_by_ref( fn encode_by_ref(
&self, &self,
buf: &mut <sqlx::Postgres as sqlx::database::HasArguments<'q>>::ArgumentBuffer, buf: &mut <sqlx::Postgres as sqlx::Database>::ArgumentBuffer<'q>,
) -> sqlx::encode::IsNull { ) -> Result<sqlx::encode::IsNull, sqlx::error::BoxDynError> {
<&str as sqlx::Encode<'q, sqlx::Postgres>>::encode_by_ref(&&**self, buf) <&str as sqlx::Encode<'q, sqlx::Postgres>>::encode_by_ref(&&**self, buf)
} }
} }

View File

@@ -47,8 +47,8 @@ impl AsRef<Path> for ServiceInterfaceId {
impl<'q> sqlx::Encode<'q, sqlx::Postgres> for ServiceInterfaceId { impl<'q> sqlx::Encode<'q, sqlx::Postgres> for ServiceInterfaceId {
fn encode_by_ref( fn encode_by_ref(
&self, &self,
buf: &mut <sqlx::Postgres as sqlx::database::HasArguments<'q>>::ArgumentBuffer, buf: &mut <sqlx::Postgres as sqlx::Database>::ArgumentBuffer<'q>,
) -> sqlx::encode::IsNull { ) -> Result<sqlx::encode::IsNull, sqlx::error::BoxDynError> {
<&str as sqlx::Encode<'q, sqlx::Postgres>>::encode_by_ref(&&**self, buf) <&str as sqlx::Encode<'q, sqlx::Postgres>>::encode_by_ref(&&**self, buf)
} }
} }

View File

@@ -14,7 +14,7 @@ keywords = [
name = "start-os" name = "start-os"
readme = "README.md" readme = "README.md"
repository = "https://github.com/Start9Labs/start-os" repository = "https://github.com/Start9Labs/start-os"
version = "0.4.0-alpha.5" # VERSION_BUMP version = "0.4.0-alpha.6" # VERSION_BUMP
license = "MIT" license = "MIT"
[lib] [lib]
@@ -61,9 +61,9 @@ async-compression = { version = "0.4.4", features = [
] } ] }
async-stream = "0.3.5" async-stream = "0.3.5"
async-trait = "0.1.74" async-trait = "0.1.74"
axum = { version = "0.7.3", features = ["ws"] } axum = { version = "0.8.4", features = ["ws"] }
barrage = "0.2.3" barrage = "0.2.3"
backhand = "0.18.0" backhand = "0.21.0"
base32 = "0.5.0" base32 = "0.5.0"
base64 = "0.22.1" base64 = "0.22.1"
base64ct = "1.6.0" base64ct = "1.6.0"
@@ -74,7 +74,7 @@ chrono = { version = "0.4.31", features = ["serde"] }
clap = { version = "4.4.12", features = ["string"] } clap = { version = "4.4.12", features = ["string"] }
color-eyre = "0.6.2" color-eyre = "0.6.2"
console = "0.15.7" console = "0.15.7"
console-subscriber = { version = "0.3.0", optional = true } console-subscriber = { version = "0.4.1", optional = true }
const_format = "0.2.34" const_format = "0.2.34"
cookie = "0.18.0" cookie = "0.18.0"
cookie_store = "0.21.0" cookie_store = "0.21.0"
@@ -96,7 +96,7 @@ exver = { version = "0.2.0", git = "https://github.com/Start9Labs/exver-rs.git",
fd-lock-rs = "0.1.4" fd-lock-rs = "0.1.4"
form_urlencoded = "1.2.1" form_urlencoded = "1.2.1"
futures = "0.3.28" futures = "0.3.28"
gpt = "3.1.0" gpt = "4.1.0"
helpers = { path = "../helpers" } helpers = { path = "../helpers" }
hex = "0.4.3" hex = "0.4.3"
hmac = "0.12.1" hmac = "0.12.1"
@@ -116,8 +116,8 @@ id-pool = { version = "0.2.2", default-features = false, features = [
"serde", "serde",
"u16", "u16",
] } ] }
imbl = "2.0.3" imbl = "4.0.1"
imbl-value = "0.1.2" imbl-value = "0.2.0"
include_dir = { version = "0.7.3", features = ["metadata"] } include_dir = { version = "0.7.3", features = ["metadata"] }
indexmap = { version = "2.0.2", features = ["serde"] } indexmap = { version = "2.0.2", features = ["serde"] }
indicatif = { version = "0.17.7", features = ["tokio"] } indicatif = { version = "0.17.7", features = ["tokio"] }
@@ -125,10 +125,10 @@ integer-encoding = { version = "4.0.0", features = ["tokio_async"] }
ipnet = { version = "2.8.0", features = ["serde"] } ipnet = { version = "2.8.0", features = ["serde"] }
iprange = { version = "0.6.7", features = ["serde"] } iprange = { version = "0.6.7", features = ["serde"] }
isocountry = "0.3.2" isocountry = "0.3.2"
itertools = "0.13.0" itertools = "0.14.0"
jaq-core = "0.10.1" jaq-core = "0.10.1"
jaq-std = "0.10.0" jaq-std = "0.10.0"
josekit = "0.8.4" josekit = "0.10.3"
jsonpath_lib = { git = "https://github.com/Start9Labs/jsonpath.git" } jsonpath_lib = { git = "https://github.com/Start9Labs/jsonpath.git" }
lazy_async_pool = "0.3.3" lazy_async_pool = "0.3.3"
lazy_format = "2.0" lazy_format = "2.0"
@@ -136,10 +136,10 @@ lazy_static = "1.4.0"
libc = "0.2.149" libc = "0.2.149"
log = "0.4.20" log = "0.4.20"
mio = "1" mio = "1"
mbrman = "0.5.2" mbrman = "0.6.0"
models = { version = "*", path = "../models" } models = { version = "*", path = "../models" }
new_mime_guess = "4" new_mime_guess = "4"
nix = { version = "0.29.0", features = [ nix = { version = "0.30.1", features = [
"fs", "fs",
"mount", "mount",
"net", "net",
@@ -148,7 +148,7 @@ nix = { version = "0.29.0", features = [
"signal", "signal",
"user", "user",
] } ] }
nom = "7.1.3" nom = "8.0.0"
num = "0.4.1" num = "0.4.1"
num_enum = "0.7.0" num_enum = "0.7.0"
num_cpus = "1.16.0" num_cpus = "1.16.0"
@@ -163,7 +163,7 @@ pbkdf2 = "0.12.2"
pin-project = "1.1.3" pin-project = "1.1.3"
pkcs8 = { version = "0.10.2", features = ["std"] } pkcs8 = { version = "0.10.2", features = ["std"] }
prettytable-rs = "0.10.0" prettytable-rs = "0.10.0"
procfs = { version = "0.16.0", optional = true } procfs = { version = "0.17.0", optional = true }
proptest = "1.3.1" proptest = "1.3.1"
proptest-derive = "0.5.0" proptest-derive = "0.5.0"
pty-process = { version = "0.5.1", optional = true } pty-process = { version = "0.5.1", optional = true }
@@ -183,14 +183,14 @@ serde_json = "1.0"
serde_toml = { package = "toml", version = "0.8.2" } serde_toml = { package = "toml", version = "0.8.2" }
serde_urlencoded = "0.7" serde_urlencoded = "0.7"
serde_with = { version = "3.4.0", features = ["macros", "json"] } serde_with = { version = "3.4.0", features = ["macros", "json"] }
serde_yaml = { package = "serde_yml", version = "0.0.10" } serde_yaml = { package = "serde_yml", version = "0.0.12" }
sha-crypt = "0.5.0" sha-crypt = "0.5.0"
sha2 = "0.10.2" sha2 = "0.10.2"
shell-words = "1" shell-words = "1"
signal-hook = "0.3.17" signal-hook = "0.3.17"
simple-logging = "2.0.2" simple-logging = "2.0.2"
socket2 = "0.5.7" socket2 = "0.5.7"
sqlx = { version = "0.7.2", features = [ sqlx = { version = "0.8.6", features = [
"chrono", "chrono",
"runtime-tokio-rustls", "runtime-tokio-rustls",
"postgres", "postgres",
@@ -199,14 +199,14 @@ sscanf = "0.4.1"
ssh-key = { version = "0.6.2", features = ["ed25519"] } ssh-key = { version = "0.6.2", features = ["ed25519"] }
tar = "0.4.40" tar = "0.4.40"
termion = "4.0.5" termion = "4.0.5"
thiserror = "1.0.49" thiserror = "2.0.12"
textwrap = "0.16.1" textwrap = "0.16.1"
tokio = { version = "1.38.1", features = ["full"] } tokio = { version = "1.38.1", features = ["full"] }
tokio-rustls = "0.26.0" tokio-rustls = "0.26.0"
tokio-socks = "0.5.1" tokio-socks = "0.5.1"
tokio-stream = { version = "0.1.14", features = ["io-util", "sync", "net"] } tokio-stream = { version = "0.1.14", features = ["io-util", "sync", "net"] }
tokio-tar = { git = "https://github.com/dr-bonez/tokio-tar.git" } tokio-tar = { git = "https://github.com/dr-bonez/tokio-tar.git" }
tokio-tungstenite = { version = "0.23.1", features = ["native-tls", "url"] } tokio-tungstenite = { version = "0.26.2", features = ["native-tls", "url"] }
tokio-util = { version = "0.7.9", features = ["io"] } tokio-util = { version = "0.7.9", features = ["io"] }
torut = { git = "https://github.com/Start9Labs/torut.git", branch = "update/dependencies", features = [ torut = { git = "https://github.com/Start9Labs/torut.git", branch = "update/dependencies", features = [
"serialize", "serialize",
@@ -219,7 +219,7 @@ tracing-journald = "0.3.0"
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
trust-dns-server = "0.23.1" trust-dns-server = "0.23.1"
ts-rs = { git = "https://github.com/dr-bonez/ts-rs.git", branch = "feature/top-level-as" } # "8.1.0" ts-rs = { git = "https://github.com/dr-bonez/ts-rs.git", branch = "feature/top-level-as" } # "8.1.0"
typed-builder = "0.18.0" typed-builder = "0.21.0"
unix-named-pipe = "0.2.0" unix-named-pipe = "0.2.0"
url = { version = "2.4.1", features = ["serde"] } url = { version = "2.4.1", features = ["serde"] }
urlencoding = "2.1.3" urlencoding = "2.1.3"

View File

@@ -223,18 +223,7 @@ fn assure_backing_up<'a>(
.as_server_info_mut() .as_server_info_mut()
.as_status_info_mut() .as_status_info_mut()
.as_backup_progress_mut(); .as_backup_progress_mut();
if backing_up if backing_up.transpose_ref().is_some() {
.clone()
.de()?
.iter()
.flat_map(|x| x.values())
.fold(false, |acc, x| {
if !x.complete {
return true;
}
acc
})
{
return Err(Error::new( return Err(Error::new(
eyre!("Server is already backing up!"), eyre!("Server is already backing up!"),
ErrorKind::InvalidRequest, ErrorKind::InvalidRequest,
@@ -287,6 +276,22 @@ async fn perform_backup(
timestamp: Utc::now(), timestamp: Utc::now(),
}, },
); );
ctx.db
.mutate(|db| {
if let Some(progress) = db
.as_public_mut()
.as_server_info_mut()
.as_status_info_mut()
.as_backup_progress_mut()
.transpose_mut()
{
progress.insert(&id, &BackupProgress { complete: true })?;
}
Ok(())
})
.await
.result?;
} }
backup_report.insert( backup_report.insert(
id.clone(), id.clone(),

View File

@@ -172,7 +172,8 @@ impl SetupContext {
if let Some(progress) = progress { if let Some(progress) = progress {
ws.send(ws::Message::Text( ws.send(ws::Message::Text(
serde_json::to_string(&progress) serde_json::to_string(&progress)
.with_kind(ErrorKind::Serialization)?, .with_kind(ErrorKind::Serialization)?
.into(),
)) ))
.await .await
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;

View File

@@ -203,7 +203,9 @@ pub async fn subscribe(
rev = sub.recv() => { rev = sub.recv() => {
if let Some(rev) = rev { if let Some(rev) = rev {
ws.send(ws::Message::Text( ws.send(ws::Message::Text(
serde_json::to_string(&rev).with_kind(ErrorKind::Serialization)?, serde_json::to_string(&rev)
.with_kind(ErrorKind::Serialization)?
.into(),
)) ))
.await .await
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;

View File

@@ -6,10 +6,9 @@ use color_eyre::eyre::{self, eyre};
use futures::TryStreamExt; use futures::TryStreamExt;
use nom::bytes::complete::{tag, take_till1}; use nom::bytes::complete::{tag, take_till1};
use nom::character::complete::multispace1; use nom::character::complete::multispace1;
use nom::character::is_space;
use nom::combinator::{opt, rest}; use nom::combinator::{opt, rest};
use nom::sequence::{pair, preceded, terminated}; use nom::sequence::{pair, preceded, terminated};
use nom::IResult; use nom::{AsChar, IResult, Parser};
use regex::Regex; use regex::Regex;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use tokio::process::Command; use tokio::process::Command;
@@ -450,17 +449,17 @@ fn parse_pvscan_output(pvscan_output: &str) -> BTreeMap<PathBuf, Option<String>>
fn parse_line(line: &str) -> IResult<&str, (&str, Option<&str>)> { fn parse_line(line: &str) -> IResult<&str, (&str, Option<&str>)> {
let pv_parse = preceded( let pv_parse = preceded(
tag(" PV "), tag(" PV "),
terminated(take_till1(|c| is_space(c as u8)), multispace1), terminated(take_till1(|c: char| c.is_space()), multispace1),
); );
let vg_parse = preceded( let vg_parse = preceded(
opt(tag("is in exported ")), opt(tag("is in exported ")),
preceded( preceded(
tag("VG "), tag("VG "),
terminated(take_till1(|c| is_space(c as u8)), multispace1), terminated(take_till1(|c: char| c.is_space()), multispace1),
), ),
); );
let mut parser = terminated(pair(pv_parse, opt(vg_parse)), rest); let mut parser = terminated(pair(pv_parse, opt(vg_parse)), rest);
parser(line) parser.parse(line)
} }
let lines = pvscan_output.lines(); let lines = pvscan_output.lines();
let n = lines.clone().count(); let n = lines.clone().count();

View File

@@ -1,6 +1,6 @@
use imbl_value::InternedString; use imbl_value::InternedString;
use lazy_format::lazy_format; use lazy_format::lazy_format;
use rand::{thread_rng, Rng}; use rand::{rng, Rng};
use tokio::process::Command; use tokio::process::Command;
use tracing::instrument; use tracing::instrument;
@@ -34,7 +34,7 @@ impl Hostname {
} }
pub fn generate_hostname() -> Hostname { pub fn generate_hostname() -> Hostname {
let mut rng = thread_rng(); let mut rng = rng();
let adjective = &ADJECTIVES[rng.gen_range(0..ADJECTIVES.len())]; let adjective = &ADJECTIVES[rng.gen_range(0..ADJECTIVES.len())];
let noun = &NOUNS[rng.gen_range(0..NOUNS.len())]; let noun = &NOUNS[rng.gen_range(0..NOUNS.len())];
Hostname(InternedString::from_display(&lazy_format!( Hostname(InternedString::from_display(&lazy_format!(

View File

@@ -620,7 +620,8 @@ pub async fn init_progress(ctx: InitContext) -> Result<InitProgressRes, Error> {
while let Some(progress) = stream.next().await { while let Some(progress) = stream.next().await {
ws.send(ws::Message::Text( ws.send(ws::Message::Text(
serde_json::to_string(&progress) serde_json::to_string(&progress)
.with_kind(ErrorKind::Serialization)?, .with_kind(ErrorKind::Serialization)?
.into(),
)) ))
.await .await
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;

View File

@@ -23,7 +23,7 @@ use tracing::instrument;
use ts_rs::TS; use ts_rs::TS;
use crate::context::{CliContext, RpcContext}; use crate::context::{CliContext, RpcContext};
use crate::db::model::package::{ManifestPreference, PackageState, PackageStateMatchModelRef}; use crate::db::model::package::{ManifestPreference, PackageStateMatchModelRef};
use crate::prelude::*; use crate::prelude::*;
use crate::progress::{FullProgress, FullProgressTracker, PhasedProgressBar}; use crate::progress::{FullProgress, FullProgressTracker, PhasedProgressBar};
use crate::registry::context::{RegistryContext, RegistryUrlParams}; use crate::registry::context::{RegistryContext, RegistryUrlParams};
@@ -215,7 +215,8 @@ pub async fn sideload(
if let Some(progress) = progress { if let Some(progress) = progress {
ws.send(ws::Message::Text( ws.send(ws::Message::Text(
serde_json::to_string(&progress) serde_json::to_string(&progress)
.with_kind(ErrorKind::Serialization)?, .with_kind(ErrorKind::Serialization)?
.into(),
)) ))
.await .await
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;

View File

@@ -87,7 +87,6 @@ use crate::context::{
CliContext, DiagnosticContext, InitContext, InstallContext, RpcContext, SetupContext, CliContext, DiagnosticContext, InitContext, InstallContext, RpcContext, SetupContext,
}; };
use crate::disk::fsck::RequiresReboot; use crate::disk::fsck::RequiresReboot;
use crate::net::net;
use crate::registry::context::{RegistryContext, RegistryUrlParams}; use crate::registry::context::{RegistryContext, RegistryUrlParams};
use crate::system::kiosk; use crate::system::kiosk;
use crate::util::serde::{HandlerExtSerde, WithIoFormat}; use crate::util::serde::{HandlerExtSerde, WithIoFormat};

View File

@@ -75,7 +75,9 @@ async fn ws_handler(
if let Some(first_entry) = first_entry { if let Some(first_entry) = first_entry {
stream stream
.send(ws::Message::Text( .send(ws::Message::Text(
serde_json::to_string(&first_entry).with_kind(ErrorKind::Serialization)?, serde_json::to_string(&first_entry)
.with_kind(ErrorKind::Serialization)?
.into(),
)) ))
.await .await
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;
@@ -88,7 +90,9 @@ async fn ws_handler(
let (_, log_entry) = entry.log_entry()?; let (_, log_entry) = entry.log_entry()?;
stream stream
.send(ws::Message::Text( .send(ws::Message::Text(
serde_json::to_string(&log_entry).with_kind(ErrorKind::Serialization)?, serde_json::to_string(&log_entry)
.with_kind(ErrorKind::Serialization)?
.into(),
)) ))
.await .await
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;

View File

@@ -429,7 +429,8 @@ pub async fn connect(ctx: &RpcContext, container: &LxcContainer) -> Result<Guid,
.await; .await;
ws.send(Message::Text( ws.send(Message::Text(
serde_json::to_string(&RpcResponse { id, result }) serde_json::to_string(&RpcResponse { id, result })
.with_kind(ErrorKind::Serialization)?, .with_kind(ErrorKind::Serialization)?
.into(),
)) ))
.await .await
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;
@@ -503,7 +504,7 @@ pub async fn connect_cli(ctx: &CliContext, guid: Guid) -> Result<(), Error> {
if let ReadlineEvent::Line(line) = line { if let ReadlineEvent::Line(line) = line {
input.add_history_entry(line.clone()); input.add_history_entry(line.clone());
if serde_json::from_str::<RpcRequest>(&line).is_ok() { if serde_json::from_str::<RpcRequest>(&line).is_ok() {
ws.send(Message::Text(line)) ws.send(Message::Text(line.into()))
.await .await
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;
} else { } else {
@@ -531,7 +532,7 @@ pub async fn connect_cli(ctx: &CliContext, guid: Guid) -> Result<(), Error> {
method: GenericRpcMethod::new(method.into()), method: GenericRpcMethod::new(method.into()),
params: Value::Object(params), params: Value::Object(params),
}) { }) {
Ok(a) => a, Ok(a) => a.into(),
Err(e) => { Err(e) => {
tracing::error!("Error Serializing Request: {e}"); tracing::error!("Error Serializing Request: {e}");
tracing::debug!("{e:?}"); tracing::debug!("{e:?}");

View File

@@ -5,7 +5,6 @@ use std::sync::{Arc, Weak};
use std::time::Duration; use std::time::Duration;
use color_eyre::eyre::eyre; use color_eyre::eyre::eyre;
use futures::TryFutureExt;
use helpers::NonDetachingJoinHandle; use helpers::NonDetachingJoinHandle;
use models::PackageId; use models::PackageId;
use tokio::net::{TcpListener, UdpSocket}; use tokio::net::{TcpListener, UdpSocket};

View File

@@ -83,9 +83,9 @@ pub fn rpc_router<C: Context + Clone + AsRef<RpcContinuations>>(
server: HttpServer<C>, server: HttpServer<C>,
) -> Router { ) -> Router {
Router::new() Router::new()
.route("/rpc/*path", any(server)) .route("/rpc/{*path}", any(server))
.route( .route(
"/ws/rpc/:guid", "/ws/rpc/{guid}",
get({ get({
let ctx = ctx.clone(); let ctx = ctx.clone();
move |x::Path(guid): x::Path<Guid>, move |x::Path(guid): x::Path<Guid>,
@@ -98,7 +98,7 @@ pub fn rpc_router<C: Context + Clone + AsRef<RpcContinuations>>(
}), }),
) )
.route( .route(
"/rest/rpc/:guid", "/rest/rpc/{guid}",
any({ any({
let ctx = ctx.clone(); let ctx = ctx.clone();
move |x::Path(guid): x::Path<Guid>, request: x::Request| async move { move |x::Path(guid): x::Path<Guid>, request: x::Request| async move {
@@ -185,7 +185,7 @@ pub fn main_ui_router(ctx: RpcContext) -> Router {
.middleware(Auth::new()) .middleware(Auth::new())
.middleware(SyncDb::new()) .middleware(SyncDb::new())
}) })
.route("/proxy/:url", { .route("/proxy/{url}", {
let ctx = ctx.clone(); let ctx = ctx.clone();
any(move |x::Path(url): x::Path<String>, request: Request| { any(move |x::Path(url): x::Path<String>, request: Request| {
let ctx = ctx.clone(); let ctx = ctx.clone();
@@ -258,7 +258,7 @@ async fn proxy_request(ctx: RpcContext, request: Request, url: String) -> Result
fn s9pk_router(ctx: RpcContext) -> Router { fn s9pk_router(ctx: RpcContext) -> Router {
Router::new() Router::new()
.route("/installed/:s9pk", { .route("/installed/{s9pk}", {
let ctx = ctx.clone(); let ctx = ctx.clone();
any( any(
|x::Path(s9pk): x::Path<String>, request: Request| async move { |x::Path(s9pk): x::Path<String>, request: Request| async move {
@@ -282,7 +282,7 @@ fn s9pk_router(ctx: RpcContext) -> Router {
}, },
) )
}) })
.route("/installed/:s9pk/*path", { .route("/installed/{s9pk}/{*path}", {
let ctx = ctx.clone(); let ctx = ctx.clone();
any( any(
|x::Path((s9pk, path)): x::Path<(String, PathBuf)>, |x::Path((s9pk, path)): x::Path<(String, PathBuf)>,
@@ -319,7 +319,7 @@ fn s9pk_router(ctx: RpcContext) -> Router {
) )
}) })
.route( .route(
"/proxy/:url/*path", "/proxy/{url}/{*path}",
any( any(
|x::Path((url, path)): x::Path<(Url, PathBuf)>, |x::Path((url, path)): x::Path<(Url, PathBuf)>,
x::RawQuery(query): x::RawQuery, x::RawQuery(query): x::RawQuery,

View File

@@ -1,4 +1,3 @@
use std::collections::BTreeMap;
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV6}; use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV6};
use std::path::Path; use std::path::Path;
@@ -6,18 +5,13 @@ use async_stream::try_stream;
use color_eyre::eyre::eyre; use color_eyre::eyre::eyre;
use futures::stream::BoxStream; use futures::stream::BoxStream;
use futures::{StreamExt, TryStreamExt}; use futures::{StreamExt, TryStreamExt};
use helpers::NonDetachingJoinHandle;
use imbl_value::InternedString; use imbl_value::InternedString;
use ipnet::{IpNet, Ipv4Net, Ipv6Net}; use ipnet::{IpNet, Ipv4Net, Ipv6Net};
use nix::net::if_::if_nametoindex; use nix::net::if_::if_nametoindex;
use tokio::net::{TcpListener, TcpStream}; use tokio::net::{TcpListener, TcpStream};
use tokio::process::Command; use tokio::process::Command;
use crate::db::model::public::NetworkInterfaceInfo;
use crate::net::network_interface::NetworkInterfaceListener;
use crate::net::web_server::Accept;
use crate::prelude::*; use crate::prelude::*;
use crate::util::sync::Watch;
use crate::util::Invoke; use crate::util::Invoke;
pub fn ipv6_is_link_local(addr: Ipv6Addr) -> bool { pub fn ipv6_is_link_local(addr: Ipv6Addr) -> bool {

View File

@@ -1,7 +1,6 @@
use std::collections::{BTreeMap, BTreeSet}; use std::collections::{BTreeMap, BTreeSet};
use std::net::{IpAddr, SocketAddr}; use std::net::{IpAddr, SocketAddr};
use std::sync::{Arc, Weak}; use std::sync::{Arc, Weak};
use std::time::Duration;
use async_acme::acme::{Identifier, ACME_TLS_ALPN_NAME}; use async_acme::acme::{Identifier, ACME_TLS_ALPN_NAME};
use axum::body::Body; use axum::body::Body;

View File

@@ -18,7 +18,6 @@ use ts_rs::TS;
use crate::context::{CliContext, RpcContext}; use crate::context::{CliContext, RpcContext};
use crate::db::model::public::WifiInfo; use crate::db::model::public::WifiInfo;
use crate::db::model::Database; use crate::db::model::Database;
use crate::net::utils::find_wifi_iface;
use crate::prelude::*; use crate::prelude::*;
use crate::util::serde::{display_serializable, HandlerExtSerde, WithIoFormat}; use crate::util::serde::{display_serializable, HandlerExtSerde, WithIoFormat};
use crate::util::Invoke; use crate::util::Invoke;

View File

@@ -1,13 +1,12 @@
use std::path::Path; use std::path::Path;
use color_eyre::eyre::eyre;
use gpt::disk::LogicalBlockSize; use gpt::disk::LogicalBlockSize;
use gpt::GptConfig; use gpt::GptConfig;
use crate::disk::util::DiskInfo; use crate::disk::util::DiskInfo;
use crate::disk::OsPartitionInfo; use crate::disk::OsPartitionInfo;
use crate::os_install::partition_for; use crate::os_install::partition_for;
use crate::Error; use crate::prelude::*;
pub async fn partition(disk: &DiskInfo, overwrite: bool) -> Result<OsPartitionInfo, Error> { pub async fn partition(disk: &DiskInfo, overwrite: bool) -> Result<OsPartitionInfo, Error> {
let efi = { let efi = {
@@ -28,7 +27,6 @@ pub async fn partition(disk: &DiskInfo, overwrite: bool) -> Result<OsPartitionIn
( (
GptConfig::new() GptConfig::new()
.writable(true) .writable(true)
.initialized(false)
.logical_block_size(LogicalBlockSize::Lb512) .logical_block_size(LogicalBlockSize::Lb512)
.create_from_device(device, None)?, .create_from_device(device, None)?,
None, None,
@@ -36,7 +34,6 @@ pub async fn partition(disk: &DiskInfo, overwrite: bool) -> Result<OsPartitionIn
} else { } else {
let gpt = GptConfig::new() let gpt = GptConfig::new()
.writable(true) .writable(true)
.initialized(true)
.logical_block_size(LogicalBlockSize::Lb512) .logical_block_size(LogicalBlockSize::Lb512)
.open_from_device(device)?; .open_from_device(device)?;
let mut guid_part = None; let mut guid_part = None;
@@ -115,7 +112,12 @@ pub async fn partition(disk: &DiskInfo, overwrite: bool) -> Result<OsPartitionIn
)?; )?;
} else if let Some(guid_part) = guid_part { } else if let Some(guid_part) = guid_part {
let mut parts = gpt.partitions().clone(); let mut parts = gpt.partitions().clone();
parts.insert(gpt.find_next_partition_id(), guid_part); parts.insert(
gpt.find_next_partition_id().ok_or_else(|| {
Error::new(eyre!("Partition table is full"), ErrorKind::DiskManagement)
})?,
guid_part,
);
gpt.update_partitions(parts)?; gpt.update_partitions(parts)?;
} }

View File

@@ -19,6 +19,7 @@ use crate::context::config::{ContextConfig, CONFIG_PATH};
use crate::context::{CliContext, RpcContext}; use crate::context::{CliContext, RpcContext};
use crate::prelude::*; use crate::prelude::*;
use crate::registry::auth::{SignatureHeader, AUTH_SIG_HEADER}; use crate::registry::auth::{SignatureHeader, AUTH_SIG_HEADER};
use crate::registry::device_info::{DeviceInfo, DEVICE_INFO_HEADER};
use crate::registry::signer::sign::AnySigningKey; use crate::registry::signer::sign::AnySigningKey;
use crate::registry::RegistryDatabase; use crate::registry::RegistryDatabase;
use crate::rpc_continuations::RpcContinuations; use crate::rpc_continuations::RpcContinuations;
@@ -254,7 +255,10 @@ impl CallRemote<RegistryContext, RegistryUrlParams> for RpcContext {
.header(CONTENT_TYPE, "application/json") .header(CONTENT_TYPE, "application/json")
.header(ACCEPT, "application/json") .header(ACCEPT, "application/json")
.header(CONTENT_LENGTH, body.len()) .header(CONTENT_LENGTH, body.len())
// .header(DEVICE_INFO_HEADER, DeviceInfo::from(self).to_header_value()) .header(
DEVICE_INFO_HEADER,
DeviceInfo::load(self).await?.to_header_value(),
)
.body(body) .body(body)
.send() .send()
.await?; .await?;

View File

@@ -90,7 +90,7 @@ pub fn registry_router(ctx: RegistryContext) -> Router {
use axum::extract as x; use axum::extract as x;
use axum::routing::{any, get}; use axum::routing::{any, get};
Router::new() Router::new()
.route("/rpc/*path", { .route("/rpc/{*path}", {
let ctx = ctx.clone(); let ctx = ctx.clone();
any( any(
Server::new(move || ready(Ok(ctx.clone())), registry_api()) Server::new(move || ready(Ok(ctx.clone())), registry_api())
@@ -100,7 +100,7 @@ pub fn registry_router(ctx: RegistryContext) -> Router {
) )
}) })
.route( .route(
"/ws/rpc/*path", "/ws/rpc/{*path}",
get({ get({
let ctx = ctx.clone(); let ctx = ctx.clone();
move |x::Path(path): x::Path<String>, move |x::Path(path): x::Path<String>,
@@ -119,7 +119,7 @@ pub fn registry_router(ctx: RegistryContext) -> Router {
}), }),
) )
.route( .route(
"/rest/rpc/*path", "/rest/rpc/{*path}",
any({ any({
let ctx = ctx.clone(); let ctx = ctx.clone();
move |request: x::Request| async move { move |request: x::Request| async move {

View File

@@ -196,9 +196,9 @@ impl TryFrom<ManifestV1> for Manifest {
version = version.with_flavor("knots"); version = version.with_flavor("knots");
} else if &*value.id == "lnd" || &*value.id == "ride-the-lightning" || &*value.id == "datum" } else if &*value.id == "lnd" || &*value.id == "ride-the-lightning" || &*value.id == "datum"
{ {
version = version.map_upstream(|mut v| v.with_prerelease(["beta".into()])); version = version.map_upstream(|v| v.with_prerelease(["beta".into()]));
} else if &*value.id == "lightning-terminal" || &*value.id == "robosats" { } else if &*value.id == "lightning-terminal" || &*value.id == "robosats" {
version = version.map_upstream(|mut v| v.with_prerelease(["alpha".into()])); version = version.map_upstream(|v| v.with_prerelease(["alpha".into()]));
} }
Ok(Self { Ok(Self {
id: value.id, id: value.id,

View File

@@ -7,7 +7,6 @@ use exver::VersionRange;
use imbl::OrdMap; use imbl::OrdMap;
use imbl_value::InternedString; use imbl_value::InternedString;
use models::{FromStrParser, HealthCheckId, PackageId, ReplayId, VersionString, VolumeId}; use models::{FromStrParser, HealthCheckId, PackageId, ReplayId, VersionString, VolumeId};
use tokio::process::Command;
use crate::db::model::package::{ use crate::db::model::package::{
CurrentDependencies, CurrentDependencyInfo, CurrentDependencyKind, ManifestPreference, CurrentDependencies, CurrentDependencyInfo, CurrentDependencyKind, ManifestPreference,
@@ -19,7 +18,6 @@ use crate::disk::mount::filesystem::{FileSystem, MountType};
use crate::disk::mount::util::{is_mountpoint, unmount}; use crate::disk::mount::util::{is_mountpoint, unmount};
use crate::service::effects::prelude::*; use crate::service::effects::prelude::*;
use crate::status::health_check::NamedHealthCheckResult; use crate::status::health_check::NamedHealthCheckResult;
use crate::util::Invoke;
use crate::volume::data_dir; use crate::volume::data_dir;
use crate::DATA_DIR; use crate::DATA_DIR;

View File

@@ -5,7 +5,6 @@ use models::PackageId;
use crate::service::effects::callbacks::CallbackHandler; use crate::service::effects::callbacks::CallbackHandler;
use crate::service::effects::prelude::*; use crate::service::effects::prelude::*;
use crate::service::rpc::CallbackId; use crate::service::rpc::CallbackId;
use crate::HOST_IP;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, TS)] #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, TS)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]

View File

@@ -8,7 +8,7 @@ use std::process::Stdio;
use std::sync::{Arc, Weak}; use std::sync::{Arc, Weak};
use std::time::Duration; use std::time::Duration;
use axum::extract::ws::WebSocket; use axum::extract::ws::{Utf8Bytes, WebSocket};
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use clap::Parser; use clap::Parser;
use futures::future::BoxFuture; use futures::future::BoxFuture;
@@ -916,7 +916,7 @@ pub async fn attach(
let mut stdin = Some(child.stdin.take().or_not_found("child stdin")?); let mut stdin = Some(child.stdin.take().or_not_found("child stdin")?);
let mut current_in = "stdin".to_owned(); let mut current_in: Utf8Bytes = "stdin".into();
let mut current_out = "stdout"; let mut current_out = "stdout";
ws.send(Message::Text(current_out.into())) ws.send(Message::Text(current_out.into()))
.await .await
@@ -942,7 +942,7 @@ pub async fn attach(
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;
current_out = "stdout"; current_out = "stdout";
} }
ws.send(Message::Binary(out)) ws.send(Message::Binary(out.into()))
.await .await
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;
} else { } else {
@@ -959,7 +959,7 @@ pub async fn attach(
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;
current_out = "stderr"; current_out = "stderr";
} }
ws.send(Message::Binary(err)) ws.send(Message::Binary(err.into()))
.await .await
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;
} else { } else {
@@ -1018,9 +1018,11 @@ pub async fn attach(
ws.send(Message::Text("exit".into())) ws.send(Message::Text("exit".into()))
.await .await
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;
ws.send(Message::Binary(i32::to_be_bytes(exit.into_raw()).to_vec())) ws.send(Message::Binary(
.await i32::to_be_bytes(exit.into_raw()).to_vec().into(),
.with_kind(ErrorKind::Network)?; ))
.await
.with_kind(ErrorKind::Network)?;
Ok(()) Ok(())
} }
@@ -1181,7 +1183,7 @@ pub async fn cli_attach(
let mut stdin = Some(recv); let mut stdin = Some(recv);
let mut current_in = "stdin"; let mut current_in = "stdin";
let mut current_out = "stdout".to_owned(); let mut current_out: tokio_tungstenite::tungstenite::Utf8Bytes = "stdout".into();
ws.send(Message::Text(current_in.into())) ws.send(Message::Text(current_in.into()))
.await .await
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;
@@ -1216,7 +1218,7 @@ pub async fn cli_attach(
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;
current_in = "stdin"; current_in = "stdin";
} }
ws.send(Message::Binary(input)) ws.send(Message::Binary(input.into()))
.await .await
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;
} else { } else {

View File

@@ -1,8 +1,6 @@
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use ts_rs::TS; use ts_rs::TS;
use crate::status::MainStatus;
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize, Serialize, TS)] #[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize, Serialize, TS)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub enum StartStop { pub enum StartStop {

View File

@@ -522,6 +522,7 @@ pub async fn metrics_follow(
local_cache local_cache
.peek(|m| serde_json::to_string(&m)) .peek(|m| serde_json::to_string(&m))
.with_kind(ErrorKind::Serialization)? .with_kind(ErrorKind::Serialization)?
.into(),
)).await.with_kind(ErrorKind::Network)?; )).await.with_kind(ErrorKind::Network)?;
} }
msg = ws.try_next() => { msg = ws.try_next() => {

View File

@@ -118,7 +118,8 @@ pub async fn update_system(
.de()?; .de()?;
ws.send(axum::extract::ws::Message::Text( ws.send(axum::extract::ws::Message::Text(
serde_json::to_string(&progress) serde_json::to_string(&progress)
.with_kind(ErrorKind::Serialization)?, .with_kind(ErrorKind::Serialization)?
.into(),
)) ))
.await .await
.with_kind(ErrorKind::Network)?; .with_kind(ErrorKind::Network)?;

View File

@@ -1,8 +1,7 @@
use core::fmt; use core::fmt;
use std::borrow::Cow;
use std::sync::Mutex; use std::sync::Mutex;
use axum::extract::ws::{self, CloseFrame}; use axum::extract::ws::{self, CloseFrame, Utf8Bytes};
use futures::{Future, Stream, StreamExt}; use futures::{Future, Stream, StreamExt};
use crate::prelude::*; use crate::prelude::*;
@@ -10,21 +9,21 @@ use crate::prelude::*;
pub trait WebSocketExt { pub trait WebSocketExt {
fn normal_close( fn normal_close(
self, self,
msg: impl Into<Cow<'static, str>> + Send, msg: impl Into<Utf8Bytes> + Send,
) -> impl Future<Output = Result<(), Error>> + Send; ) -> impl Future<Output = Result<(), Error>> + Send;
fn close_result( fn close_result(
self, self,
result: Result<impl Into<Cow<'static, str>> + Send, impl fmt::Display + Send>, result: Result<impl Into<Utf8Bytes> + Send, impl fmt::Display + Send>,
) -> impl Future<Output = Result<(), Error>> + Send; ) -> impl Future<Output = Result<(), Error>> + Send;
} }
impl WebSocketExt for ws::WebSocket { impl WebSocketExt for ws::WebSocket {
async fn normal_close(self, msg: impl Into<Cow<'static, str>> + Send) -> Result<(), Error> { async fn normal_close(self, msg: impl Into<Utf8Bytes> + Send) -> Result<(), Error> {
self.close_result(Ok::<_, Error>(msg)).await self.close_result(Ok::<_, Error>(msg)).await
} }
async fn close_result( async fn close_result(
mut self, mut self,
result: Result<impl Into<Cow<'static, str>> + Send, impl fmt::Display + Send>, result: Result<impl Into<Utf8Bytes> + Send, impl fmt::Display + Send>,
) -> Result<(), Error> { ) -> Result<(), Error> {
match result { match result {
Ok(msg) => self Ok(msg) => self

View File

@@ -45,8 +45,9 @@ mod v0_4_0_alpha_2;
mod v0_4_0_alpha_3; mod v0_4_0_alpha_3;
mod v0_4_0_alpha_4; mod v0_4_0_alpha_4;
mod v0_4_0_alpha_5; mod v0_4_0_alpha_5;
mod v0_4_0_alpha_6;
pub type Current = v0_4_0_alpha_5::Version; // VERSION_BUMP pub type Current = v0_4_0_alpha_6::Version; // VERSION_BUMP
impl Current { impl Current {
#[instrument(skip(self, db))] #[instrument(skip(self, db))]
@@ -155,7 +156,8 @@ enum Version {
V0_4_0_alpha_2(Wrapper<v0_4_0_alpha_2::Version>), V0_4_0_alpha_2(Wrapper<v0_4_0_alpha_2::Version>),
V0_4_0_alpha_3(Wrapper<v0_4_0_alpha_3::Version>), V0_4_0_alpha_3(Wrapper<v0_4_0_alpha_3::Version>),
V0_4_0_alpha_4(Wrapper<v0_4_0_alpha_4::Version>), V0_4_0_alpha_4(Wrapper<v0_4_0_alpha_4::Version>),
V0_4_0_alpha_5(Wrapper<v0_4_0_alpha_5::Version>), // VERSION_BUMP V0_4_0_alpha_5(Wrapper<v0_4_0_alpha_5::Version>),
V0_4_0_alpha_6(Wrapper<v0_4_0_alpha_6::Version>), // VERSION_BUMP
Other(exver::Version), Other(exver::Version),
} }
@@ -203,7 +205,8 @@ impl Version {
Self::V0_4_0_alpha_2(v) => DynVersion(Box::new(v.0)), Self::V0_4_0_alpha_2(v) => DynVersion(Box::new(v.0)),
Self::V0_4_0_alpha_3(v) => DynVersion(Box::new(v.0)), Self::V0_4_0_alpha_3(v) => DynVersion(Box::new(v.0)),
Self::V0_4_0_alpha_4(v) => DynVersion(Box::new(v.0)), Self::V0_4_0_alpha_4(v) => DynVersion(Box::new(v.0)),
Self::V0_4_0_alpha_5(v) => DynVersion(Box::new(v.0)), // VERSION_BUMP Self::V0_4_0_alpha_5(v) => DynVersion(Box::new(v.0)),
Self::V0_4_0_alpha_6(v) => DynVersion(Box::new(v.0)), // VERSION_BUMP
Self::Other(v) => { Self::Other(v) => {
return Err(Error::new( return Err(Error::new(
eyre!("unknown version {v}"), eyre!("unknown version {v}"),
@@ -243,7 +246,8 @@ impl Version {
Version::V0_4_0_alpha_2(Wrapper(x)) => x.semver(), Version::V0_4_0_alpha_2(Wrapper(x)) => x.semver(),
Version::V0_4_0_alpha_3(Wrapper(x)) => x.semver(), Version::V0_4_0_alpha_3(Wrapper(x)) => x.semver(),
Version::V0_4_0_alpha_4(Wrapper(x)) => x.semver(), Version::V0_4_0_alpha_4(Wrapper(x)) => x.semver(),
Version::V0_4_0_alpha_5(Wrapper(x)) => x.semver(), // VERSION_BUMP Version::V0_4_0_alpha_5(Wrapper(x)) => x.semver(),
Version::V0_4_0_alpha_6(Wrapper(x)) => x.semver(), // VERSION_BUMP
Version::Other(x) => x.clone(), Version::Other(x) => x.clone(),
} }
} }

View File

@@ -0,0 +1,46 @@
use exver::{PreReleaseSegment, VersionRange};
use super::v0_3_5::V0_3_0_COMPAT;
use super::{v0_4_0_alpha_5, VersionT};
use crate::prelude::*;
lazy_static::lazy_static! {
static ref V0_4_0_alpha_6: exver::Version = exver::Version::new(
[0, 4, 0],
[PreReleaseSegment::String("alpha".into()), 6.into()]
);
}
#[derive(Clone, Copy, Debug, Default)]
pub struct Version;
impl VersionT for Version {
type Previous = v0_4_0_alpha_5::Version;
type PreUpRes = ();
async fn pre_up(self) -> Result<Self::PreUpRes, Error> {
Ok(())
}
fn semver(self) -> exver::Version {
V0_4_0_alpha_6.clone()
}
fn compat(self) -> &'static VersionRange {
&V0_3_0_COMPAT
}
#[instrument]
fn up(self, db: &mut Value, _: Self::PreUpRes) -> Result<(), Error> {
let ui = db["public"]["ui"]
.as_object_mut()
.or_not_found("public.ui")?;
if ui.get("ackInstructions").is_none() {
if let Some(old) = ui.remove("ack-instructions") {
ui.insert("ackInstructions".into(), old);
}
}
ui.remove("ackWelcome");
Ok(())
}
fn down(self, _db: &mut Value) -> Result<(), Error> {
Ok(())
}
}

View File

@@ -68,7 +68,7 @@ import {
setupOnUninit, setupOnUninit,
} from "../../base/lib/inits" } from "../../base/lib/inits"
export const OSVersion = testTypeVersion("0.4.0-alpha.5") export const OSVersion = testTypeVersion("0.4.0-alpha.6")
// prettier-ignore // prettier-ignore
type AnyNeverCond<T extends any[], Then, Else> = type AnyNeverCond<T extends any[], Then, Else> =

4
web/package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "startos-ui", "name": "startos-ui",
"version": "0.4.0-alpha.5", "version": "0.4.0-alpha.6",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "startos-ui", "name": "startos-ui",
"version": "0.4.0-alpha.5", "version": "0.4.0-alpha.6",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@angular/animations": "^19.2.11", "@angular/animations": "^19.2.11",

View File

@@ -1,6 +1,6 @@
{ {
"name": "startos-ui", "name": "startos-ui",
"version": "0.4.0-alpha.5", "version": "0.4.0-alpha.6",
"author": "Start9 Labs, Inc", "author": "Start9 Labs, Inc",
"homepage": "https://start9.com/", "homepage": "https://start9.com/",
"license": "MIT", "license": "MIT",

View File

@@ -110,7 +110,7 @@ export namespace Mock {
squashfs: { squashfs: {
aarch64: { aarch64: {
publishedAt: '2025-04-21T20:58:48.140749883Z', publishedAt: '2025-04-21T20:58:48.140749883Z',
url: 'https://alpha-registry-x.start9.com/startos/v0.4.0-alpha.5/startos-0.4.0-alpha.5-33ae46f~dev_aarch64.squashfs', url: 'https://alpha-registry-x.start9.com/startos/v0.4.0-alpha.6/startos-0.4.0-alpha.6-33ae46f~dev_aarch64.squashfs',
commitment: { commitment: {
hash: '4elBFVkd/r8hNadKmKtLIs42CoPltMvKe2z3LRqkphk=', hash: '4elBFVkd/r8hNadKmKtLIs42CoPltMvKe2z3LRqkphk=',
size: 1343500288, size: 1343500288,
@@ -122,7 +122,7 @@ export namespace Mock {
}, },
'aarch64-nonfree': { 'aarch64-nonfree': {
publishedAt: '2025-04-21T21:07:00.249285116Z', publishedAt: '2025-04-21T21:07:00.249285116Z',
url: 'https://alpha-registry-x.start9.com/startos/v0.4.0-alpha.5/startos-0.4.0-alpha.5-33ae46f~dev_aarch64-nonfree.squashfs', url: 'https://alpha-registry-x.start9.com/startos/v0.4.0-alpha.6/startos-0.4.0-alpha.6-33ae46f~dev_aarch64-nonfree.squashfs',
commitment: { commitment: {
hash: 'MrCEi4jxbmPS7zAiGk/JSKlMsiuKqQy6RbYOxlGHOIQ=', hash: 'MrCEi4jxbmPS7zAiGk/JSKlMsiuKqQy6RbYOxlGHOIQ=',
size: 1653075968, size: 1653075968,
@@ -134,7 +134,7 @@ export namespace Mock {
}, },
raspberrypi: { raspberrypi: {
publishedAt: '2025-04-21T21:16:12.933319237Z', publishedAt: '2025-04-21T21:16:12.933319237Z',
url: 'https://alpha-registry-x.start9.com/startos/v0.4.0-alpha.5/startos-0.4.0-alpha.5-33ae46f~dev_raspberrypi.squashfs', url: 'https://alpha-registry-x.start9.com/startos/v0.4.0-alpha.6/startos-0.4.0-alpha.6-33ae46f~dev_raspberrypi.squashfs',
commitment: { commitment: {
hash: '/XTVQRCqY3RK544PgitlKu7UplXjkmzWoXUh2E4HCw0=', hash: '/XTVQRCqY3RK544PgitlKu7UplXjkmzWoXUh2E4HCw0=',
size: 1490731008, size: 1490731008,
@@ -146,7 +146,7 @@ export namespace Mock {
}, },
x86_64: { x86_64: {
publishedAt: '2025-04-21T21:14:20.246908903Z', publishedAt: '2025-04-21T21:14:20.246908903Z',
url: 'https://alpha-registry-x.start9.com/startos/v0.4.0-alpha.5/startos-0.4.0-alpha.5-33ae46f~dev_x86_64.squashfs', url: 'https://alpha-registry-x.start9.com/startos/v0.4.0-alpha.6/startos-0.4.0-alpha.6-33ae46f~dev_x86_64.squashfs',
commitment: { commitment: {
hash: '/6romKTVQGSaOU7FqSZdw0kFyd7P+NBSYNwM3q7Fe44=', hash: '/6romKTVQGSaOU7FqSZdw0kFyd7P+NBSYNwM3q7Fe44=',
size: 1411657728, size: 1411657728,
@@ -158,7 +158,7 @@ export namespace Mock {
}, },
'x86_64-nonfree': { 'x86_64-nonfree': {
publishedAt: '2025-04-21T21:15:17.955265284Z', publishedAt: '2025-04-21T21:15:17.955265284Z',
url: 'https://alpha-registry-x.start9.com/startos/v0.4.0-alpha.5/startos-0.4.0-alpha.5-33ae46f~dev_x86_64-nonfree.squashfs', url: 'https://alpha-registry-x.start9.com/startos/v0.4.0-alpha.6/startos-0.4.0-alpha.6-33ae46f~dev_x86_64-nonfree.squashfs',
commitment: { commitment: {
hash: 'HCRq9sr/0t85pMdrEgNBeM4x11zVKHszGnD1GDyZbSE=', hash: 'HCRq9sr/0t85pMdrEgNBeM4x11zVKHszGnD1GDyZbSE=',
size: 1731035136, size: 1731035136,