mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
* update registry upload to take id for new admin permissions (#2605) * wip * wip: Get the get dependencies * wip check_dependencies * wip: Get the build working to the vm * wip: Add in the last of the things that where needed for the new sdk * Add fix * wip: implement the changes * wip: Fix the naming --------- Co-authored-by: Lucy <12953208+elvece@users.noreply.github.com>
30 lines
703 B
TypeScript
30 lines
703 B
TypeScript
import { SDKManifest } from "../manifest/ManifestTypes"
|
|
import { Dependencies } from "../types"
|
|
|
|
export type ConfigDependencies<T extends SDKManifest> = {
|
|
exists(id: keyof T["dependencies"]): Dependencies[number]
|
|
running(
|
|
id: keyof T["dependencies"],
|
|
healthChecks: string[],
|
|
): Dependencies[number]
|
|
}
|
|
|
|
export const configDependenciesSet = <
|
|
T extends SDKManifest,
|
|
>(): ConfigDependencies<T> => ({
|
|
exists(id: keyof T["dependencies"]) {
|
|
return {
|
|
id,
|
|
kind: "exists",
|
|
} as Dependencies[number]
|
|
},
|
|
|
|
running(id: keyof T["dependencies"], healthChecks: string[]) {
|
|
return {
|
|
id,
|
|
kind: "running",
|
|
healthChecks,
|
|
} as Dependencies[number]
|
|
},
|
|
})
|