mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
chore: Fix the build
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DependencyKind } from "./DependencyKind";
|
||||
import type { HealthCheckId } from "./HealthCheckId";
|
||||
import type { PackageId } from "./PackageId";
|
||||
|
||||
export interface DependencyRequirement { id: PackageId, kind: DependencyKind, healthChecks: Array<HealthCheckId>, }
|
||||
export interface DependencyRequirement { id: string, kind: DependencyKind, healthChecks: string[], }
|
||||
@@ -875,16 +875,18 @@ enum DependencyKind {
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export)]
|
||||
struct DependencyRequirement {
|
||||
#[ts(type = "string")]
|
||||
id: PackageId,
|
||||
kind: DependencyKind,
|
||||
#[serde(default)]
|
||||
#[ts(type = "string[]")]
|
||||
health_checks: BTreeSet<HealthCheckId>,
|
||||
}
|
||||
// filebrowser:exists,bitcoind:running:foo+bar+baz
|
||||
impl FromStr for DependencyRequirement {
|
||||
type Err = Error;
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
match s.split_once(":") {
|
||||
match s.split_once(':') {
|
||||
Some((id, "e")) | Some((id, "exists")) => Ok(Self {
|
||||
id: id.parse()?,
|
||||
kind: DependencyKind::Exists,
|
||||
|
||||
Reference in New Issue
Block a user