import Foundation /// `repo deps status ` — dependency-check status. `lastCheck`, /// `lastError` and `issueNumber` are `omitempty` server-side: a repository /// whose checks were just switched on carries none of them, which is the /// ordinary case, not an edge case. nonisolated struct DepsStatus: Decodable, Sendable, Hashable { let enabled: Bool let lastCheck: Date? let lastError: String? let issueNumber: Int64? let behind: [DepBehind] enum CodingKeys: String, CodingKey { case enabled, behind case lastCheck = "last_check" case lastError = "last_error" case issueNumber = "issue_number" } } /// One outdated dependency. `id` includes the ecosystem because two /// ecosystems can carry the same package name, and a colliding id makes /// SwiftUI reuse one row for the other. nonisolated struct DepBehind: Decodable, Sendable, Hashable, Identifiable { let ecosystem: String let name: String let current: String let latest: String var id: String { "\(ecosystem)/\(name)" } }