• version-0.2.0 406221cf57

    version-0.2.0
    All checks were successful
    Release / release (push) Successful in 1m23s
    Stable

    eric released this 2026-11-08 12:19:23 +01:00 | 30 commits to main since this release

    • REST API: Expose a new api feature providing Axum-based routes (GET /api/config, GET /api/config/{path}, POST /api/config) with OpenAPI documentation.

    • Typed Configuration: Implement typed readers (src/typed.rs) such as get_integer and get_bool_or_set that enforce type safety and treat absent values as None.

    • Machine-Bound Encryption: Enforce encryption tied to the local machine via /etc/machine-id checks, requiring encrypted: prefixes for decryption.

    • API Simplification: Remove intermediate request/response structs from the configuration update API; endpoints now return 204 No Content directly.

    • Error Handling: Fix permission error handling in the API and replace the generic PmoConfigError::Permission with a specific variant containing a message string.

    • Integer Defaults: Correct integer default handling in get_number_or_set to write integers as integers when appropriate.

    • Dependency Migration: Replace deprecated serde_yaml with serde_yaml_ng (v0.10.0).

    • Storage Refactor: Move configuration storage logic to src/tree.rs, implementing key lowercasing, null removal, and atomic file operations.

    • Environment Overrides: Extract environment override logic into a dedicated function and improve merge behavior for cloned data.

    • Build System: Update .crate-kit scripts for modularity; bump dependencies (dirs 7.0, aes-gcm/sha2 0.11, tokio 1.54, utoipa 6.0).

    < pub enum pmoconfig::error::PmoConfigError
    > #[non_exhaustive] pub enum pmoconfig::error::PmoConfigError
    < pub pmoconfig::error::PmoConfigError::Io(core::io::error::Error)
    > pub pmoconfig::error::PmoConfigError::Io
    > pub pmoconfig::error::PmoConfigError::Io::context: alloc::string::String
    > pub pmoconfig::error::PmoConfigError::Io::source: core::io::error::Error
    < pub pmoconfig::error::PmoConfigError::Permission
    < pub pmoconfig::error::PmoConfigError::Permission::message: alloc::string::String
    < pub pmoconfig::error::PmoConfigError::Yaml(serde_yaml::error::Error)
    < impl core::convert::From<core::io::error::Error> for pmoconfig::error::PmoConfigError
    < pub fn pmoconfig::error::PmoConfigError::from(core::io::error::Error) -> Self
    > pub pmoconfig::error::PmoConfigError::Yaml(serde_yaml_ng::error::Error)
    < impl core::convert::From<serde_yaml::error::Error> for pmoconfig::error::PmoConfigError
    < pub fn pmoconfig::error::PmoConfigError::from(serde_yaml::error::Error) -> Self
    > impl core::convert::From<serde_yaml_ng::error::Error> for pmoconfig::error::PmoConfigError
    > pub fn pmoconfig::error::PmoConfigError::from(serde_yaml_ng::error::Error) -> Self
    < pub fn pmoconfig::Config::config_dir(&pmoconfig::AppSpec, &str) -> pmoconfig::error::Result<alloc::string::String>
    > pub fn pmoconfig::Config::config_dir(&self) -> &str
    < pub fn pmoconfig::Config::get_value(&self, &[&str]) -> pmoconfig::error::Result<serde_yaml::value::Value>
    > pub fn pmoconfig::Config::get_value(&self, &[&str]) -> pmoconfig::error::Result<serde_yaml_ng::value::Value>
    > pub fn pmoconfig::Config::resolve_config_dir(&pmoconfig::AppSpec, &str) -> pmoconfig::error::Result<alloc::string::String>
    < pub fn pmoconfig::Config::set_managed_dir(&self, &[&str], alloc::string::String) -> pmoconfig::error::Result<()>
    < pub fn pmoconfig::Config::set_value(&self, &[&str], serde_yaml::value::Value) -> pmoconfig::error::Result<()>
    > pub fn pmoconfig::Config::set_managed_dir(&self, &[&str], &str) -> pmoconfig::error::Result<()>
    > pub fn pmoconfig::Config::set_value(&self, &[&str], serde_yaml_ng::value::Value) -> pmoconfig::error::Result<()>
    > pub fn pmoconfig::Config::get_bool(&self, &[&str]) -> pmoconfig::error::Result<core::option::Option<bool>>
    > pub fn pmoconfig::Config::get_integer(&self, &[&str]) -> pmoconfig::error::Result<core::option::Option<i64>>
    > pub fn pmoconfig::Config::get_integer_or_set(&self, &[&str], i64) -> pmoconfig::error::Result<i64>
    > pub fn pmoconfig::Config::get_string_or_set(&self, &[&str], &str) -> pmoconfig::error::Result<alloc::string::String>
    > pub fn pmoconfig::try_get_config() -> core::option::Option<alloc::sync::Arc<pmoconfig::Config>>
    
    Downloads