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

Function print_value

atomic-cli/src/commands/provenance/command.rs:250–265  ·  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

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

Callers 1

runMethod · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected