MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / print_value

Function print_value

atomic-cli/src/commands/provenance/command.rs:247–262  ·  view source on GitHub ↗

Print the PROV JSON-LD artifact(s) to stdout. When `signed`, add the dev-signature caveat (the signing path was used).

(values: &[serde_json::Value], signed: bool)

Source from the content-addressed store, hash-verified

245/// Print the PROV JSON-LD artifact(s) to stdout. When `signed`, add the
246/// dev-signature caveat (the signing path was used).
247fn print_value(values: &[serde_json::Value], signed: bool) {
248 let out = if values.len() == 1 {
249 serde_json::to_string_pretty(&values[0])
250 } else {
251 serde_json::to_string_pretty(&values)
252 }
253 .expect("PROV value serialization is infallible");
254 println!("{out}");
255 if signed {
256 eprintln!(
257 "note: signing keys are stored unencrypted on disk; treat this \
258 signed projection as a non-production dev signature until key-at-rest \
259 encryption lands."
260 );
261 }
262}
263
264/// Print the human-readable flywheel chain: change -> activity -> generated ->
265/// agent -> person -> turnParent -> ... (walking `previous`).

Callers 1

runMethod · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected