Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
Expose artifact metadata in release DTO
Daniel Norman committed 7 days ago
commit 634527c1aa443a9663d5a5a19bc5be59de29c498
parent 6575680b2ef8e220834e35f921bc901d324fde25
2 files changed +11 -0
modified crates/radicle-types/bindings/cob/release/Artifact.ts
@@ -18,4 +18,9 @@ export type Artifact = {
   * ourselves as an iroh provider for it.
   */
  sharedByUs: boolean;
+
  /**
+
   * Free-form key/value annotations contributed by the artifact author
+
   * or repo delegates. Authorization is enforced upstream.
+
   */
+
  metadata?: Record<string, unknown>;
};
modified crates/radicle-types/src/cobs/release.rs
@@ -43,6 +43,11 @@ pub struct Artifact {
    /// to this artifact uses the `iroh://` scheme — i.e. we are advertising
    /// ourselves as an iroh provider for it.
    pub shared_by_us: bool,
+
    /// Free-form key/value annotations contributed by the artifact author
+
    /// or repo delegates. Authorization is enforced upstream.
+
    #[serde(skip_serializing_if = "BTreeMap::is_empty")]
+
    #[ts(type = "Record<string, unknown>", optional)]
+
    pub metadata: BTreeMap<String, serde_json::Value>,
}

#[derive(Clone, Serialize, TS, Debug)]
@@ -146,6 +151,7 @@ impl Artifact {
            attestations,
            redactions,
            shared_by_us,
+
            metadata: artifact.metadata().clone(),
        }
    }
}