comindly_api/
manifests.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
4pub struct PackageRow {
5 pub repo: String,
6 pub ecosystem: String,
8 pub name: String,
10 pub publishes: bool,
12 pub version: Option<String>,
14 pub locked: Option<String>,
16 pub manifest: String,
18}
19
20#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
22pub struct InternalDep {
23 pub ecosystem: String,
24 pub name: String,
25 pub publisher: String,
26 pub published: Option<String>,
27 pub consumer: String,
28 pub requirement: Option<String>,
29 pub locked: Option<String>,
30}
31
32impl InternalDep {
33 pub fn skewed(&self) -> bool {
35 matches!((&self.locked, &self.published), (Some(l), Some(p)) if l != p)
36 }
37}