From 0940e9cf28759a9489d53dbd28882d6b46cb0076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Thu, 1 Oct 2026 05:44:34 +0500 Subject: [PATCH] v0.2.0: first batch release (companions control, progress, offline bots, tick rate, sharing guides, logo, translations, scroll bars, new base/update pipeline verified end to end) Co-Authored-By: Claude Sonnet 5.5 --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- crates/coa-core/examples/update_url.rs | 25 +++++++++++++++++++++++++ package.json | 2 +- src-tauri/tauri.conf.json | 2 +- 5 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 crates/coa-core/examples/update_url.rs diff --git a/Cargo.lock b/Cargo.lock index 839e147..4466ba0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -347,7 +347,7 @@ dependencies = [ [[package]] name = "coa-core" -version = "0.1.6" +version = "0.2.0" dependencies = [ "base64 0.22.1", "chrono", @@ -375,7 +375,7 @@ dependencies = [ [[package]] name = "coa-release" -version = "0.1.6" +version = "0.2.0" dependencies = [ "chrono", "coa-core", @@ -384,7 +384,7 @@ dependencies = [ [[package]] name = "coa-server-manager" -version = "0.1.6" +version = "0.2.0" dependencies = [ "coa-core", "serde", diff --git a/Cargo.toml b/Cargo.toml index 62b5fd2..71eb694 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = ["crates/coa-core", "crates/coa-release", "src-tauri"] [workspace.package] -version = "0.1.6" +version = "0.2.0" edition = "2021" license = "AGPL-3.0-only" diff --git a/crates/coa-core/examples/update_url.rs b/crates/coa-core/examples/update_url.rs new file mode 100644 index 0000000..89df5b4 --- /dev/null +++ b/crates/coa-core/examples/update_url.rs @@ -0,0 +1,25 @@ +//! Check and apply a real published update on a DISPOSABLE install. usage: update_url +//! The folder name must contain "installtest"; ports must already point away from any running server. +use coa_core::download::Cancel; +use coa_core::pkgsource::Source; +use coa_core::registry::{metadata_dir_for, MetaDir}; +use coa_core::update::{apply, preview, Params, RepackEnv}; + +fn main() { + let a: Vec = std::env::args().skip(1).collect(); + let root = std::path::PathBuf::from(&a[0]); + assert!(a[0].to_lowercase().contains("installtest"), "refusing: not a disposable test install"); + let dir = metadata_dir_for(&root).unwrap(); + let (_, meta) = MetaDir::open(&dir).unwrap(); + let src = Source::Url(a[1].clone()); + let p = preview(&root, &meta, &src, coa_core::signing::EMBEDDED_PUBLIC_KEY, &Default::default()).unwrap_or_else(|e| panic!("preview failed: {e:?}")); + println!("preview: {} -> {} | download {} bytes | {} files change | {} migrations | conflicts {:?}", p.from_version.clone().unwrap_or_default(), p.to_version, p.download_bytes, p.items.iter().filter(|i| format!("{:?}", i.action) != "Skip").count(), p.migrations, p.conflicts); + let env = RepackEnv { root: &root, meta_dir: &dir }; + let t = std::time::Instant::now(); + let out = apply( + &Params { root: &root, meta_dir: &dir, source: src, trusted_key: coa_core::signing::EMBEDDED_PUBLIC_KEY, cancel: Cancel::default(), resolutions: Default::default(), env: &env, fail_after_ops: None }, + &|s, pct| eprintln!(" {pct:>3}% {s}"), + ) + .unwrap_or_else(|e| panic!("apply failed: {e:?}")); + println!("apply finished in {:?}: state {:?}, to {:?}", t.elapsed(), out.txn.state, out.txn.to_version); +} diff --git a/package.json b/package.json index a139716..198dce5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "coa-server-manager", "private": true, - "version": "0.1.6", + "version": "0.2.0", "license": "AGPL-3.0-only", "type": "module", "scripts": { diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 57e054a..1aa7d03 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "CoA Server Manager", - "version": "0.1.6", + "version": "0.2.0", "identifier": "com.coa.servermanager", "build": { "beforeDevCommand": "npm run dev",