portaki-cli 8.5.0

Portaki module CLI (portaki) — init, build, lint, test, and OCI publish
1
2
3
4
5
6
7
8
9
10
11
12
13
//! `portaki catalog` — dump SDUI primitive catalog.

use anyhow::Result;

/// Runs `portaki catalog`: prints the SDUI primitive catalog as pretty JSON.
pub fn run() -> Result<()> {
    // Read from the SDK crate this binary was linked against, not from a sibling directory of
    // the source tree: installed from crates.io, that path resolved to nothing and the command
    // printed `[]` — an empty catalogue that `portaki docs` calls the documentation.
    let value: serde_json::Value = serde_json::from_str(portaki_sdk::SDUI_PRIMITIVES_JSON)?;
    println!("{}", serde_json::to_string_pretty(&value)?);
    Ok(())
}