diff --git a/Makefile b/Makefile index f19b40b47..9a6dee60f 100644 --- a/Makefile +++ b/Makefile @@ -176,11 +176,12 @@ container-runtime/node_modules: container-runtime/package.json container-runtime core/startos/bindings: $(shell git ls-files core) $(ENVIRONMENT_FILE) $(PLATFORM_FILE) rm -rf core/startos/bindings (cd core/ && cargo test) + npm --prefix sdk exec -- prettier -w ./core/startos/bindings/*.ts sdk/lib/test: $(shell git ls-files sdk) core/startos/bindings (cd sdk && make test) -sdk/dist: $(shell git ls-files sdk) +sdk/dist: $(shell git ls-files sdk) core/startos/bindings (cd sdk && make bundle) container-runtime/dist: container-runtime/node_modules $(shell git ls-files container-runtime/src) container-runtime/package.json container-runtime/tsconfig.json diff --git a/container-runtime/src/Adapters/Systems/SystemForEmbassy/MainLoop.ts b/container-runtime/src/Adapters/Systems/SystemForEmbassy/MainLoop.ts index 69e3e6615..17fd13468 100644 --- a/container-runtime/src/Adapters/Systems/SystemForEmbassy/MainLoop.ts +++ b/container-runtime/src/Adapters/Systems/SystemForEmbassy/MainLoop.ts @@ -112,8 +112,9 @@ export class MainLoop { ]) if (executed.exitCode === 59) { await effects.setHealth({ - name: healthId, - status: "disabled", + id: healthId, + name: value.name, + result: "disabled", message: executed.stderr.toString() || executed.stdout.toString(), }) @@ -121,8 +122,9 @@ export class MainLoop { } if (executed.exitCode === 60) { await effects.setHealth({ - name: healthId, - status: "starting", + id: healthId, + name: value.name, + result: "starting", message: executed.stderr.toString() || executed.stdout.toString(), }) @@ -130,8 +132,9 @@ export class MainLoop { } if (executed.exitCode === 61) { await effects.setHealth({ - name: healthId, - status: "warning", + id: healthId, + name: value.name, + result: "loading", message: executed.stderr.toString() || executed.stdout.toString(), }) @@ -141,15 +144,17 @@ export class MainLoop { const message = executed.stdout.toString() if (!!errorMessage) { await effects.setHealth({ - name: healthId, - status: "failure", + id: healthId, + name: value.name, + result: "failure", message: errorMessage, }) return } await effects.setHealth({ - name: healthId, - status: "passing", + id: healthId, + name: value.name, + result: "success", message, }) return @@ -159,9 +164,10 @@ export class MainLoop { const method = moduleCode.health?.[healthId] if (!method) { await effects.setHealth({ - name: healthId, - status: "failure", - message: `Expecting that thejs health check ${healthId} exists`, + id: healthId, + name: value.name, + result: "failure", + message: `Expecting that the js health check ${healthId} exists`, }) return } @@ -173,24 +179,27 @@ export class MainLoop { if ("result" in result) { await effects.setHealth({ + id: healthId, + name: value.name, + result: "success", message: null, - name: healthId, - status: "passing", }) return } if ("error" in result) { await effects.setHealth({ - name: healthId, - status: "failure", + id: healthId, + name: value.name, + result: "failure", message: result.error, }) return } if (!("error-code" in result)) { await effects.setHealth({ - name: healthId, - status: "failure", + id: healthId, + name: value.name, + result: "failure", message: `Unknown error type ${JSON.stringify(result)}`, }) return @@ -198,32 +207,36 @@ export class MainLoop { const [code, message] = result["error-code"] if (code === 59) { await effects.setHealth({ - name: healthId, - status: "disabled", + id: healthId, + name: value.name, + result: "disabled", message, }) return } if (code === 60) { await effects.setHealth({ - name: healthId, - status: "starting", + id: healthId, + name: value.name, + result: "starting", message, }) return } if (code === 61) { await effects.setHealth({ - name: healthId, - status: "warning", + id: healthId, + name: value.name, + result: "loading", message, }) return } await effects.setHealth({ - name: healthId, - status: "failure", + id: healthId, + name: value.name, + result: "failure", message: `${result["error-code"][0]}: ${result["error-code"][1]}`, }) return diff --git a/core/startos/bindings/ActionId.ts b/core/startos/bindings/ActionId.ts index 7c05d2b3c..9bb1f9990 100644 --- a/core/startos/bindings/ActionId.ts +++ b/core/startos/bindings/ActionId.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ActionId = string; \ No newline at end of file +export type ActionId = string; diff --git a/core/startos/bindings/ActionMetadata.ts b/core/startos/bindings/ActionMetadata.ts index e787190c8..c9373a5b8 100644 --- a/core/startos/bindings/ActionMetadata.ts +++ b/core/startos/bindings/ActionMetadata.ts @@ -1,4 +1,12 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { AllowedStatuses } from "./AllowedStatuses"; -export type ActionMetadata = { name: string, description: string, warning: string | null, input: any, disabled: boolean, allowedStatuses: AllowedStatuses, group: string | null, }; \ No newline at end of file +export type ActionMetadata = { + name: string; + description: string; + warning: string | null; + input: any; + disabled: boolean; + allowedStatuses: AllowedStatuses; + group: string | null; +}; diff --git a/core/startos/bindings/AddSslOptions.ts b/core/startos/bindings/AddSslOptions.ts index fcf2d63d4..984a1a7c6 100644 --- a/core/startos/bindings/AddSslOptions.ts +++ b/core/startos/bindings/AddSslOptions.ts @@ -1,4 +1,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { AlpnInfo } from "./AlpnInfo"; -export type AddSslOptions = { scheme: string | null, preferredExternalPort: number, alpn: AlpnInfo, }; \ No newline at end of file +export type AddSslOptions = { + scheme: string | null; + preferredExternalPort: number; + alpn: AlpnInfo; +}; diff --git a/core/startos/bindings/AddressInfo.ts b/core/startos/bindings/AddressInfo.ts index 6bc42c0e9..1355f72a2 100644 --- a/core/startos/bindings/AddressInfo.ts +++ b/core/startos/bindings/AddressInfo.ts @@ -2,4 +2,9 @@ import type { BindOptions } from "./BindOptions"; import type { HostId } from "./HostId"; -export type AddressInfo = { username: string | null, hostId: HostId, bindOptions: BindOptions, suffix: string, }; \ No newline at end of file +export type AddressInfo = { + username: string | null; + hostId: HostId; + bindOptions: BindOptions; + suffix: string; +}; diff --git a/core/startos/bindings/Alerts.ts b/core/startos/bindings/Alerts.ts index 4956bfa95..c6a671e83 100644 --- a/core/startos/bindings/Alerts.ts +++ b/core/startos/bindings/Alerts.ts @@ -1,3 +1,9 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type Alerts = { install: string | null, uninstall: string | null, restore: string | null, start: string | null, stop: string | null, }; \ No newline at end of file +export type Alerts = { + install: string | null; + uninstall: string | null; + restore: string | null; + start: string | null; + stop: string | null; +}; diff --git a/core/startos/bindings/Algorithm.ts b/core/startos/bindings/Algorithm.ts index d12447f04..877325fdf 100644 --- a/core/startos/bindings/Algorithm.ts +++ b/core/startos/bindings/Algorithm.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type Algorithm = "ecdsa" | "ed25519"; \ No newline at end of file +export type Algorithm = "ecdsa" | "ed25519"; diff --git a/core/startos/bindings/AllPackageData.ts b/core/startos/bindings/AllPackageData.ts index 74827426a..c7698d10d 100644 --- a/core/startos/bindings/AllPackageData.ts +++ b/core/startos/bindings/AllPackageData.ts @@ -2,4 +2,4 @@ import type { PackageDataEntry } from "./PackageDataEntry"; import type { PackageId } from "./PackageId"; -export type AllPackageData = { [key: PackageId]: PackageDataEntry }; \ No newline at end of file +export type AllPackageData = { [key: PackageId]: PackageDataEntry }; diff --git a/core/startos/bindings/AllowedStatuses.ts b/core/startos/bindings/AllowedStatuses.ts index a5c7f5d2d..a04ee2bac 100644 --- a/core/startos/bindings/AllowedStatuses.ts +++ b/core/startos/bindings/AllowedStatuses.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type AllowedStatuses = "onlyRunning" | "onlyStopped" | "any"; \ No newline at end of file +export type AllowedStatuses = "onlyRunning" | "onlyStopped" | "any"; diff --git a/core/startos/bindings/AlpnInfo.ts b/core/startos/bindings/AlpnInfo.ts index 2a760d235..eac072fc0 100644 --- a/core/startos/bindings/AlpnInfo.ts +++ b/core/startos/bindings/AlpnInfo.ts @@ -1,4 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { MaybeUtf8String } from "./MaybeUtf8String"; -export type AlpnInfo = "reflect" | { "specified": Array }; \ No newline at end of file +export type AlpnInfo = "reflect" | { specified: Array }; diff --git a/core/startos/bindings/BackupProgress.ts b/core/startos/bindings/BackupProgress.ts index 4a480dc93..42812a7b7 100644 --- a/core/startos/bindings/BackupProgress.ts +++ b/core/startos/bindings/BackupProgress.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type BackupProgress = { complete: boolean, }; \ No newline at end of file +export type BackupProgress = { complete: boolean }; diff --git a/core/startos/bindings/BindInfo.ts b/core/startos/bindings/BindInfo.ts index d42ed2d25..8bda6d37e 100644 --- a/core/startos/bindings/BindInfo.ts +++ b/core/startos/bindings/BindInfo.ts @@ -1,4 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { BindOptions } from "./BindOptions"; -export type BindInfo = { options: BindOptions, assignedLanPort: number | null, }; \ No newline at end of file +export type BindInfo = { options: BindOptions; assignedLanPort: number | null }; diff --git a/core/startos/bindings/BindOptions.ts b/core/startos/bindings/BindOptions.ts index 9043c5f57..6b12139a7 100644 --- a/core/startos/bindings/BindOptions.ts +++ b/core/startos/bindings/BindOptions.ts @@ -2,4 +2,9 @@ import type { AddSslOptions } from "./AddSslOptions"; import type { Security } from "./Security"; -export type BindOptions = { scheme: string | null, preferredExternalPort: number, addSsl: AddSslOptions | null, secure: Security | null, }; \ No newline at end of file +export type BindOptions = { + scheme: string | null; + preferredExternalPort: number; + addSsl: AddSslOptions | null; + secure: Security | null; +}; diff --git a/core/startos/bindings/BindParams.ts b/core/startos/bindings/BindParams.ts index 07a8033bc..4aa78e522 100644 --- a/core/startos/bindings/BindParams.ts +++ b/core/startos/bindings/BindParams.ts @@ -4,4 +4,12 @@ import type { HostId } from "./HostId"; import type { HostKind } from "./HostKind"; import type { Security } from "./Security"; -export type BindParams = { kind: HostKind, id: HostId, internalPort: number, scheme: string | null, preferredExternalPort: number, addSsl: AddSslOptions | null, secure: Security | null, }; \ No newline at end of file +export type BindParams = { + kind: HostKind; + id: HostId; + internalPort: number; + scheme: string | null; + preferredExternalPort: number; + addSsl: AddSslOptions | null; + secure: Security | null; +}; diff --git a/core/startos/bindings/Callback.ts b/core/startos/bindings/Callback.ts index 9c4cacab0..e6c5b004f 100644 --- a/core/startos/bindings/Callback.ts +++ b/core/startos/bindings/Callback.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type Callback = () => void; \ No newline at end of file +export type Callback = () => void; diff --git a/core/startos/bindings/ChrootParams.ts b/core/startos/bindings/ChrootParams.ts index d8d1b1b46..9ee6e8959 100644 --- a/core/startos/bindings/ChrootParams.ts +++ b/core/startos/bindings/ChrootParams.ts @@ -1,3 +1,10 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ChrootParams = { env: string | null, workdir: string | null, user: string | null, path: string, command: string, args: string[], }; \ No newline at end of file +export type ChrootParams = { + env: string | null; + workdir: string | null; + user: string | null; + path: string; + command: string; + args: string[]; +}; diff --git a/core/startos/bindings/CreateOverlayedImageParams.ts b/core/startos/bindings/CreateOverlayedImageParams.ts index 65e7487b6..d17f2e8c1 100644 --- a/core/startos/bindings/CreateOverlayedImageParams.ts +++ b/core/startos/bindings/CreateOverlayedImageParams.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type CreateOverlayedImageParams = { imageId: string, }; \ No newline at end of file +export type CreateOverlayedImageParams = { imageId: string }; diff --git a/core/startos/bindings/CurrentDependencies.ts b/core/startos/bindings/CurrentDependencies.ts index 55fb68501..75645e200 100644 --- a/core/startos/bindings/CurrentDependencies.ts +++ b/core/startos/bindings/CurrentDependencies.ts @@ -2,4 +2,4 @@ import type { CurrentDependencyInfo } from "./CurrentDependencyInfo"; import type { PackageId } from "./PackageId"; -export type CurrentDependencies = { [key: PackageId]: CurrentDependencyInfo }; \ No newline at end of file +export type CurrentDependencies = { [key: PackageId]: CurrentDependencyInfo }; diff --git a/core/startos/bindings/CurrentDependencyInfo.ts b/core/startos/bindings/CurrentDependencyInfo.ts index a253afa38..10112e312 100644 --- a/core/startos/bindings/CurrentDependencyInfo.ts +++ b/core/startos/bindings/CurrentDependencyInfo.ts @@ -1,4 +1,9 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { DataUrl } from "./DataUrl"; -export type CurrentDependencyInfo = { title: string, icon: DataUrl, registryUrl: string, versionSpec: string, } & ({ "kind": "exists" } | { "kind": "running", healthChecks: string[], }); \ No newline at end of file +export type CurrentDependencyInfo = { + title: string; + icon: DataUrl; + registryUrl: string; + versionSpec: string; +} & ({ kind: "exists" } | { kind: "running"; healthChecks: string[] }); diff --git a/core/startos/bindings/DataUrl.ts b/core/startos/bindings/DataUrl.ts index 835512711..65fa15059 100644 --- a/core/startos/bindings/DataUrl.ts +++ b/core/startos/bindings/DataUrl.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type DataUrl = string; \ No newline at end of file +export type DataUrl = string; diff --git a/core/startos/bindings/DepInfo.ts b/core/startos/bindings/DepInfo.ts index 8320d83eb..3c01e0939 100644 --- a/core/startos/bindings/DepInfo.ts +++ b/core/startos/bindings/DepInfo.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type DepInfo = { description: string | null, optional: boolean, }; \ No newline at end of file +export type DepInfo = { description: string | null; optional: boolean }; diff --git a/core/startos/bindings/Dependencies.ts b/core/startos/bindings/Dependencies.ts index a84adec24..974495b7b 100644 --- a/core/startos/bindings/Dependencies.ts +++ b/core/startos/bindings/Dependencies.ts @@ -2,4 +2,4 @@ import type { DepInfo } from "./DepInfo"; import type { PackageId } from "./PackageId"; -export type Dependencies = { [key: PackageId]: DepInfo }; \ No newline at end of file +export type Dependencies = { [key: PackageId]: DepInfo }; diff --git a/core/startos/bindings/DependencyConfigErrors.ts b/core/startos/bindings/DependencyConfigErrors.ts index 23281aa89..5f2246fa9 100644 --- a/core/startos/bindings/DependencyConfigErrors.ts +++ b/core/startos/bindings/DependencyConfigErrors.ts @@ -1,4 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { PackageId } from "./PackageId"; -export type DependencyConfigErrors = { [key: PackageId]: string }; \ No newline at end of file +export type DependencyConfigErrors = { [key: PackageId]: string }; diff --git a/core/startos/bindings/DependencyKind.ts b/core/startos/bindings/DependencyKind.ts index 018562971..71fd49762 100644 --- a/core/startos/bindings/DependencyKind.ts +++ b/core/startos/bindings/DependencyKind.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type DependencyKind = "exists" | "running"; \ No newline at end of file +export type DependencyKind = "exists" | "running"; diff --git a/core/startos/bindings/DependencyRequirement.ts b/core/startos/bindings/DependencyRequirement.ts index 40b78b473..e6224ce48 100644 --- a/core/startos/bindings/DependencyRequirement.ts +++ b/core/startos/bindings/DependencyRequirement.ts @@ -1,3 +1,11 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type DependencyRequirement = { "kind": "running", id: string, healthChecks: string[], versionSpec: string, registryUrl: string, } | { "kind": "exists", id: string, versionSpec: string, registryUrl: string, }; \ No newline at end of file +export type DependencyRequirement = + | { + kind: "running"; + id: string; + healthChecks: string[]; + versionSpec: string; + registryUrl: string; + } + | { kind: "exists"; id: string; versionSpec: string; registryUrl: string }; diff --git a/core/startos/bindings/Description.ts b/core/startos/bindings/Description.ts index da4b0d1bf..918bd09c5 100644 --- a/core/startos/bindings/Description.ts +++ b/core/startos/bindings/Description.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type Description = { short: string, long: string, }; \ No newline at end of file +export type Description = { short: string; long: string }; diff --git a/core/startos/bindings/DestroyOverlayedImageParams.ts b/core/startos/bindings/DestroyOverlayedImageParams.ts index 34d4085a1..47671604a 100644 --- a/core/startos/bindings/DestroyOverlayedImageParams.ts +++ b/core/startos/bindings/DestroyOverlayedImageParams.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type DestroyOverlayedImageParams = { guid: string, }; \ No newline at end of file +export type DestroyOverlayedImageParams = { guid: string }; diff --git a/core/startos/bindings/Duration.ts b/core/startos/bindings/Duration.ts index ac44b7c87..889c729b8 100644 --- a/core/startos/bindings/Duration.ts +++ b/core/startos/bindings/Duration.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type Duration = string; \ No newline at end of file +export type Duration = string; diff --git a/core/startos/bindings/ExecuteAction.ts b/core/startos/bindings/ExecuteAction.ts index 52636bdbc..aaa340747 100644 --- a/core/startos/bindings/ExecuteAction.ts +++ b/core/startos/bindings/ExecuteAction.ts @@ -1,3 +1,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ExecuteAction = { serviceId: string | null, actionId: string, input: any, }; \ No newline at end of file +export type ExecuteAction = { + serviceId: string | null; + actionId: string; + input: any; +}; diff --git a/core/startos/bindings/ExportActionParams.ts b/core/startos/bindings/ExportActionParams.ts index d19fc6905..4961c4a11 100644 --- a/core/startos/bindings/ExportActionParams.ts +++ b/core/startos/bindings/ExportActionParams.ts @@ -1,4 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { ActionMetadata } from "./ActionMetadata"; -export type ExportActionParams = { id: string, metadata: ActionMetadata, }; \ No newline at end of file +export type ExportActionParams = { id: string; metadata: ActionMetadata }; diff --git a/core/startos/bindings/ExportServiceInterfaceParams.ts b/core/startos/bindings/ExportServiceInterfaceParams.ts index ad7885507..93deb0ce5 100644 --- a/core/startos/bindings/ExportServiceInterfaceParams.ts +++ b/core/startos/bindings/ExportServiceInterfaceParams.ts @@ -2,4 +2,13 @@ import type { AddressInfo } from "./AddressInfo"; import type { ServiceInterfaceType } from "./ServiceInterfaceType"; -export type ExportServiceInterfaceParams = { id: string, name: string, description: string, hasPrimary: boolean, disabled: boolean, masked: boolean, addressInfo: AddressInfo, type: ServiceInterfaceType, }; \ No newline at end of file +export type ExportServiceInterfaceParams = { + id: string; + name: string; + description: string; + hasPrimary: boolean; + disabled: boolean; + masked: boolean; + addressInfo: AddressInfo; + type: ServiceInterfaceType; +}; diff --git a/core/startos/bindings/ExportedHostInfo.ts b/core/startos/bindings/ExportedHostInfo.ts index c4d36bd61..d8339a074 100644 --- a/core/startos/bindings/ExportedHostInfo.ts +++ b/core/startos/bindings/ExportedHostInfo.ts @@ -3,4 +3,8 @@ import type { ExportedHostnameInfo } from "./ExportedHostnameInfo"; import type { HostId } from "./HostId"; import type { HostKind } from "./HostKind"; -export type ExportedHostInfo = { id: HostId, kind: HostKind, hostnames: Array, }; \ No newline at end of file +export type ExportedHostInfo = { + id: HostId; + kind: HostKind; + hostnames: Array; +}; diff --git a/core/startos/bindings/ExportedHostnameInfo.ts b/core/startos/bindings/ExportedHostnameInfo.ts index 086fd95b1..23cbdd487 100644 --- a/core/startos/bindings/ExportedHostnameInfo.ts +++ b/core/startos/bindings/ExportedHostnameInfo.ts @@ -2,4 +2,11 @@ import type { ExportedIpHostname } from "./ExportedIpHostname"; import type { ExportedOnionHostname } from "./ExportedOnionHostname"; -export type ExportedHostnameInfo = { "kind": "ip", networkInterfaceId: string, public: boolean, hostname: ExportedIpHostname, } | { "kind": "onion", hostname: ExportedOnionHostname, }; \ No newline at end of file +export type ExportedHostnameInfo = + | { + kind: "ip"; + networkInterfaceId: string; + public: boolean; + hostname: ExportedIpHostname; + } + | { kind: "onion"; hostname: ExportedOnionHostname }; diff --git a/core/startos/bindings/ExportedIpHostname.ts b/core/startos/bindings/ExportedIpHostname.ts index 7d012fecc..1e02ab2be 100644 --- a/core/startos/bindings/ExportedIpHostname.ts +++ b/core/startos/bindings/ExportedIpHostname.ts @@ -1,3 +1,18 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ExportedIpHostname = { "kind": "ipv4", value: string, port: number | null, sslPort: number | null, } | { "kind": "ipv6", value: string, port: number | null, sslPort: number | null, } | { "kind": "local", value: string, port: number | null, sslPort: number | null, } | { "kind": "domain", domain: string, subdomain: string | null, port: number | null, sslPort: number | null, }; \ No newline at end of file +export type ExportedIpHostname = + | { kind: "ipv4"; value: string; port: number | null; sslPort: number | null } + | { kind: "ipv6"; value: string; port: number | null; sslPort: number | null } + | { + kind: "local"; + value: string; + port: number | null; + sslPort: number | null; + } + | { + kind: "domain"; + domain: string; + subdomain: string | null; + port: number | null; + sslPort: number | null; + }; diff --git a/core/startos/bindings/ExportedOnionHostname.ts b/core/startos/bindings/ExportedOnionHostname.ts index 82fee09e3..af072289f 100644 --- a/core/startos/bindings/ExportedOnionHostname.ts +++ b/core/startos/bindings/ExportedOnionHostname.ts @@ -1,3 +1,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ExportedOnionHostname = { value: string, port: number | null, sslPort: number | null, }; \ No newline at end of file +export type ExportedOnionHostname = { + value: string; + port: number | null; + sslPort: number | null; +}; diff --git a/core/startos/bindings/ExposeForDependentsParams.ts b/core/startos/bindings/ExposeForDependentsParams.ts index 9626f4dcf..714771c1e 100644 --- a/core/startos/bindings/ExposeForDependentsParams.ts +++ b/core/startos/bindings/ExposeForDependentsParams.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ExposeForDependentsParams = { paths: string[], }; \ No newline at end of file +export type ExposeForDependentsParams = { paths: string[] }; diff --git a/core/startos/bindings/FullProgress.ts b/core/startos/bindings/FullProgress.ts index 0c6a96832..56f6a1a15 100644 --- a/core/startos/bindings/FullProgress.ts +++ b/core/startos/bindings/FullProgress.ts @@ -2,4 +2,4 @@ import type { NamedProgress } from "./NamedProgress"; import type { Progress } from "./Progress"; -export type FullProgress = { overall: Progress, phases: Array, }; \ No newline at end of file +export type FullProgress = { overall: Progress; phases: Array }; diff --git a/core/startos/bindings/GetHostInfoParams.ts b/core/startos/bindings/GetHostInfoParams.ts index 69abeeb13..7c2b1b6b6 100644 --- a/core/startos/bindings/GetHostInfoParams.ts +++ b/core/startos/bindings/GetHostInfoParams.ts @@ -2,4 +2,9 @@ import type { Callback } from "./Callback"; import type { GetHostInfoParamsKind } from "./GetHostInfoParamsKind"; -export type GetHostInfoParams = { kind: GetHostInfoParamsKind | null, serviceInterfaceId: string, packageId: string | null, callback: Callback, }; \ No newline at end of file +export type GetHostInfoParams = { + kind: GetHostInfoParamsKind | null; + serviceInterfaceId: string; + packageId: string | null; + callback: Callback; +}; diff --git a/core/startos/bindings/GetHostInfoParamsKind.ts b/core/startos/bindings/GetHostInfoParamsKind.ts index 6d401f685..6353044ce 100644 --- a/core/startos/bindings/GetHostInfoParamsKind.ts +++ b/core/startos/bindings/GetHostInfoParamsKind.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type GetHostInfoParamsKind = "multi"; \ No newline at end of file +export type GetHostInfoParamsKind = "multi"; diff --git a/core/startos/bindings/GetPrimaryUrlParams.ts b/core/startos/bindings/GetPrimaryUrlParams.ts index 6296d4342..c5aaa0ebe 100644 --- a/core/startos/bindings/GetPrimaryUrlParams.ts +++ b/core/startos/bindings/GetPrimaryUrlParams.ts @@ -1,4 +1,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Callback } from "./Callback"; -export type GetPrimaryUrlParams = { packageId: string | null, serviceInterfaceId: string, callback: Callback, }; \ No newline at end of file +export type GetPrimaryUrlParams = { + packageId: string | null; + serviceInterfaceId: string; + callback: Callback; +}; diff --git a/core/startos/bindings/GetServiceInterfaceParams.ts b/core/startos/bindings/GetServiceInterfaceParams.ts index 1eb2b6f28..03990c10b 100644 --- a/core/startos/bindings/GetServiceInterfaceParams.ts +++ b/core/startos/bindings/GetServiceInterfaceParams.ts @@ -1,4 +1,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Callback } from "./Callback"; -export type GetServiceInterfaceParams = { packageId: string | null, serviceInterfaceId: string, callback: Callback, }; \ No newline at end of file +export type GetServiceInterfaceParams = { + packageId: string | null; + serviceInterfaceId: string; + callback: Callback; +}; diff --git a/core/startos/bindings/GetServicePortForwardParams.ts b/core/startos/bindings/GetServicePortForwardParams.ts index dd4eaf211..3de7e0219 100644 --- a/core/startos/bindings/GetServicePortForwardParams.ts +++ b/core/startos/bindings/GetServicePortForwardParams.ts @@ -1,3 +1,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type GetServicePortForwardParams = { packageId: string | null, internalPort: number, }; \ No newline at end of file +export type GetServicePortForwardParams = { + packageId: string | null; + internalPort: number; +}; diff --git a/core/startos/bindings/GetSslCertificateParams.ts b/core/startos/bindings/GetSslCertificateParams.ts index a4a2447cd..a1fd17bdd 100644 --- a/core/startos/bindings/GetSslCertificateParams.ts +++ b/core/startos/bindings/GetSslCertificateParams.ts @@ -1,4 +1,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Algorithm } from "./Algorithm"; -export type GetSslCertificateParams = { packageId: string | null, hostId: string, algorithm: Algorithm | null, }; \ No newline at end of file +export type GetSslCertificateParams = { + packageId: string | null; + hostId: string; + algorithm: Algorithm | null; +}; diff --git a/core/startos/bindings/GetSslKeyParams.ts b/core/startos/bindings/GetSslKeyParams.ts index eb36cd2f5..8c5170c9c 100644 --- a/core/startos/bindings/GetSslKeyParams.ts +++ b/core/startos/bindings/GetSslKeyParams.ts @@ -1,4 +1,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Algorithm } from "./Algorithm"; -export type GetSslKeyParams = { packageId: string | null, hostId: string, algorithm: Algorithm | null, }; \ No newline at end of file +export type GetSslKeyParams = { + packageId: string | null; + hostId: string; + algorithm: Algorithm | null; +}; diff --git a/core/startos/bindings/GetStoreParams.ts b/core/startos/bindings/GetStoreParams.ts index 6b965e75f..bfd97377b 100644 --- a/core/startos/bindings/GetStoreParams.ts +++ b/core/startos/bindings/GetStoreParams.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type GetStoreParams = { packageId: string | null, path: string, }; \ No newline at end of file +export type GetStoreParams = { packageId: string | null; path: string }; diff --git a/core/startos/bindings/GetSystemSmtpParams.ts b/core/startos/bindings/GetSystemSmtpParams.ts index 25d30529f..b96b9f595 100644 --- a/core/startos/bindings/GetSystemSmtpParams.ts +++ b/core/startos/bindings/GetSystemSmtpParams.ts @@ -1,4 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Callback } from "./Callback"; -export type GetSystemSmtpParams = { callback: Callback, }; \ No newline at end of file +export type GetSystemSmtpParams = { callback: Callback }; diff --git a/core/startos/bindings/Governor.ts b/core/startos/bindings/Governor.ts index 9e0bb14e2..82c9e39f1 100644 --- a/core/startos/bindings/Governor.ts +++ b/core/startos/bindings/Governor.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type Governor = string; \ No newline at end of file +export type Governor = string; diff --git a/core/startos/bindings/HardwareRequirements.ts b/core/startos/bindings/HardwareRequirements.ts index 5a28d0cbc..079483289 100644 --- a/core/startos/bindings/HardwareRequirements.ts +++ b/core/startos/bindings/HardwareRequirements.ts @@ -1,3 +1,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type HardwareRequirements = { device: { [key: string]: string }, ram: bigint | null, arch: Array | null, }; \ No newline at end of file +export type HardwareRequirements = { + device: { [key: string]: string }; + ram: bigint | null; + arch: Array | null; +}; diff --git a/core/startos/bindings/HealthCheckId.ts b/core/startos/bindings/HealthCheckId.ts index d9b6b7ca8..eeefafbb1 100644 --- a/core/startos/bindings/HealthCheckId.ts +++ b/core/startos/bindings/HealthCheckId.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type HealthCheckId = string; \ No newline at end of file +export type HealthCheckId = string; diff --git a/core/startos/bindings/HealthCheckResult.ts b/core/startos/bindings/HealthCheckResult.ts index a539fc805..ae4d3c3c2 100644 --- a/core/startos/bindings/HealthCheckResult.ts +++ b/core/startos/bindings/HealthCheckResult.ts @@ -1,3 +1,9 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type HealthCheckResult = { name: string, } & ({ "result": "success", message: string, } | { "result": "disabled" } | { "result": "starting" } | { "result": "loading", message: string, } | { "result": "failure", message: string, }); \ No newline at end of file +export type HealthCheckResult = { name: string } & ( + | { result: "success"; message: string | null } + | { result: "disabled"; message: string | null } + | { result: "starting"; message: string | null } + | { result: "loading"; message: string } + | { result: "failure"; message: string } +); diff --git a/core/startos/bindings/Host.ts b/core/startos/bindings/Host.ts index a08704ad2..4188cb404 100644 --- a/core/startos/bindings/Host.ts +++ b/core/startos/bindings/Host.ts @@ -3,4 +3,9 @@ import type { BindInfo } from "./BindInfo"; import type { HostAddress } from "./HostAddress"; import type { HostKind } from "./HostKind"; -export type Host = { kind: HostKind, bindings: { [key: number]: BindInfo }, addresses: Array, primary: HostAddress | null, }; \ No newline at end of file +export type Host = { + kind: HostKind; + bindings: { [key: number]: BindInfo }; + addresses: Array; + primary: HostAddress | null; +}; diff --git a/core/startos/bindings/HostAddress.ts b/core/startos/bindings/HostAddress.ts index f013cb540..9cddf778b 100644 --- a/core/startos/bindings/HostAddress.ts +++ b/core/startos/bindings/HostAddress.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type HostAddress = { "kind": "onion", address: string, }; \ No newline at end of file +export type HostAddress = { kind: "onion"; address: string }; diff --git a/core/startos/bindings/HostId.ts b/core/startos/bindings/HostId.ts index 1aef70f2a..23049a51d 100644 --- a/core/startos/bindings/HostId.ts +++ b/core/startos/bindings/HostId.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type HostId = string; \ No newline at end of file +export type HostId = string; diff --git a/core/startos/bindings/HostInfo.ts b/core/startos/bindings/HostInfo.ts index 3d2a34f14..b69dbf6b4 100644 --- a/core/startos/bindings/HostInfo.ts +++ b/core/startos/bindings/HostInfo.ts @@ -2,4 +2,4 @@ import type { Host } from "./Host"; import type { HostId } from "./HostId"; -export type HostInfo = { [key: HostId]: Host }; \ No newline at end of file +export type HostInfo = { [key: HostId]: Host }; diff --git a/core/startos/bindings/HostKind.ts b/core/startos/bindings/HostKind.ts index 1ad1bd95e..09e61b91b 100644 --- a/core/startos/bindings/HostKind.ts +++ b/core/startos/bindings/HostKind.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type HostKind = "multi"; \ No newline at end of file +export type HostKind = "multi"; diff --git a/core/startos/bindings/ImageId.ts b/core/startos/bindings/ImageId.ts index 9adb82d7a..408331f72 100644 --- a/core/startos/bindings/ImageId.ts +++ b/core/startos/bindings/ImageId.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ImageId = string; \ No newline at end of file +export type ImageId = string; diff --git a/core/startos/bindings/InstalledState.ts b/core/startos/bindings/InstalledState.ts index 3608a5ba0..053c3ae66 100644 --- a/core/startos/bindings/InstalledState.ts +++ b/core/startos/bindings/InstalledState.ts @@ -1,4 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Manifest } from "./Manifest"; -export type InstalledState = { manifest: Manifest, }; \ No newline at end of file +export type InstalledState = { manifest: Manifest }; diff --git a/core/startos/bindings/InstallingInfo.ts b/core/startos/bindings/InstallingInfo.ts index c3d13c984..7627f4502 100644 --- a/core/startos/bindings/InstallingInfo.ts +++ b/core/startos/bindings/InstallingInfo.ts @@ -2,4 +2,4 @@ import type { FullProgress } from "./FullProgress"; import type { Manifest } from "./Manifest"; -export type InstallingInfo = { newManifest: Manifest, progress: FullProgress, }; \ No newline at end of file +export type InstallingInfo = { newManifest: Manifest; progress: FullProgress }; diff --git a/core/startos/bindings/InstallingState.ts b/core/startos/bindings/InstallingState.ts index b7cfea14c..3203cfd6b 100644 --- a/core/startos/bindings/InstallingState.ts +++ b/core/startos/bindings/InstallingState.ts @@ -1,4 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { InstallingInfo } from "./InstallingInfo"; -export type InstallingState = { installingInfo: InstallingInfo, }; \ No newline at end of file +export type InstallingState = { installingInfo: InstallingInfo }; diff --git a/core/startos/bindings/IpInfo.ts b/core/startos/bindings/IpInfo.ts index 756d87219..1208fafb9 100644 --- a/core/startos/bindings/IpInfo.ts +++ b/core/startos/bindings/IpInfo.ts @@ -1,3 +1,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type IpInfo = { ipv4Range: string | null, ipv4: string | null, ipv6Range: string | null, ipv6: string | null, }; \ No newline at end of file +export type IpInfo = { + ipv4Range: string | null; + ipv4: string | null; + ipv6Range: string | null; + ipv6: string | null; +}; diff --git a/core/startos/bindings/ListServiceInterfacesParams.ts b/core/startos/bindings/ListServiceInterfacesParams.ts index cd889b149..03d1cdfc8 100644 --- a/core/startos/bindings/ListServiceInterfacesParams.ts +++ b/core/startos/bindings/ListServiceInterfacesParams.ts @@ -1,4 +1,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Callback } from "./Callback"; -export type ListServiceInterfacesParams = { packageId: string | null, callback: Callback, }; \ No newline at end of file +export type ListServiceInterfacesParams = { + packageId: string | null; + callback: Callback; +}; diff --git a/core/startos/bindings/MainStatus.ts b/core/startos/bindings/MainStatus.ts index 25482e113..878213087 100644 --- a/core/startos/bindings/MainStatus.ts +++ b/core/startos/bindings/MainStatus.ts @@ -3,4 +3,18 @@ import type { Duration } from "./Duration"; import type { HealthCheckId } from "./HealthCheckId"; import type { HealthCheckResult } from "./HealthCheckResult"; -export type MainStatus = { "status": "stopped" } | { "status": "restarting" } | { "status": "stopping", timeout: Duration, } | { "status": "starting" } | { "status": "running", started: string, health: { [key: HealthCheckId]: HealthCheckResult }, } | { "status": "backingUp", started: string | null, health: { [key: HealthCheckId]: HealthCheckResult }, }; \ No newline at end of file +export type MainStatus = + | { status: "stopped" } + | { status: "restarting" } + | { status: "stopping"; timeout: Duration } + | { status: "starting" } + | { + status: "running"; + started: string; + health: { [key: HealthCheckId]: HealthCheckResult }; + } + | { + status: "backingUp"; + started: string | null; + health: { [key: HealthCheckId]: HealthCheckResult }; + }; diff --git a/core/startos/bindings/Manifest.ts b/core/startos/bindings/Manifest.ts index 0eb91251b..688486a7d 100644 --- a/core/startos/bindings/Manifest.ts +++ b/core/startos/bindings/Manifest.ts @@ -7,4 +7,26 @@ import type { ImageId } from "./ImageId"; import type { PackageId } from "./PackageId"; import type { VolumeId } from "./VolumeId"; -export type Manifest = { id: PackageId, title: string, version: string, releaseNotes: string, license: string, replaces: Array, wrapperRepo: string, upstreamRepo: string, supportSite: string, marketingSite: string, donationUrl: string | null, description: Description, images: Array, assets: Array, volumes: Array, alerts: Alerts, dependencies: Dependencies, hardwareRequirements: HardwareRequirements, gitHash: string | null, osVersion: string, hasConfig: boolean, }; \ No newline at end of file +export type Manifest = { + id: PackageId; + title: string; + version: string; + releaseNotes: string; + license: string; + replaces: Array; + wrapperRepo: string; + upstreamRepo: string; + supportSite: string; + marketingSite: string; + donationUrl: string | null; + description: Description; + images: Array; + assets: Array; + volumes: Array; + alerts: Alerts; + dependencies: Dependencies; + hardwareRequirements: HardwareRequirements; + gitHash: string | null; + osVersion: string; + hasConfig: boolean; +}; diff --git a/core/startos/bindings/MaybeUtf8String.ts b/core/startos/bindings/MaybeUtf8String.ts index 6674a135b..a77f8ce4e 100644 --- a/core/startos/bindings/MaybeUtf8String.ts +++ b/core/startos/bindings/MaybeUtf8String.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type MaybeUtf8String = string | number[]; \ No newline at end of file +export type MaybeUtf8String = string | number[]; diff --git a/core/startos/bindings/MountParams.ts b/core/startos/bindings/MountParams.ts index 4f8615a25..daa4ddf32 100644 --- a/core/startos/bindings/MountParams.ts +++ b/core/startos/bindings/MountParams.ts @@ -1,4 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { MountTarget } from "./MountTarget"; -export type MountParams = { location: string, target: MountTarget, }; \ No newline at end of file +export type MountParams = { location: string; target: MountTarget }; diff --git a/core/startos/bindings/MountTarget.ts b/core/startos/bindings/MountTarget.ts index 6a28ec3ac..3009861fb 100644 --- a/core/startos/bindings/MountTarget.ts +++ b/core/startos/bindings/MountTarget.ts @@ -1,3 +1,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type MountTarget = { packageId: string, volumeId: string, subpath: string | null, readonly: boolean, }; \ No newline at end of file +export type MountTarget = { + packageId: string; + volumeId: string; + subpath: string | null; + readonly: boolean; +}; diff --git a/core/startos/bindings/NamedProgress.ts b/core/startos/bindings/NamedProgress.ts index 1e4c45093..42104c48b 100644 --- a/core/startos/bindings/NamedProgress.ts +++ b/core/startos/bindings/NamedProgress.ts @@ -1,4 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Progress } from "./Progress"; -export type NamedProgress = { name: string, progress: Progress, }; \ No newline at end of file +export type NamedProgress = { name: string; progress: Progress }; diff --git a/core/startos/bindings/PackageDataEntry.ts b/core/startos/bindings/PackageDataEntry.ts index 7abb7503a..8b906bb90 100644 --- a/core/startos/bindings/PackageDataEntry.ts +++ b/core/startos/bindings/PackageDataEntry.ts @@ -9,4 +9,18 @@ import type { ServiceInterfaceId } from "./ServiceInterfaceId"; import type { ServiceInterfaceWithHostInfo } from "./ServiceInterfaceWithHostInfo"; import type { Status } from "./Status"; -export type PackageDataEntry = { stateInfo: PackageState, status: Status, marketplaceUrl: string | null, developerKey: string, icon: DataUrl, lastBackup: string | null, currentDependencies: CurrentDependencies, actions: { [key: ActionId]: ActionMetadata }, serviceInterfaces: { [key: ServiceInterfaceId]: ServiceInterfaceWithHostInfo }, hosts: HostInfo, storeExposedDependents: string[], }; \ No newline at end of file +export type PackageDataEntry = { + stateInfo: PackageState; + status: Status; + marketplaceUrl: string | null; + developerKey: string; + icon: DataUrl; + lastBackup: string | null; + currentDependencies: CurrentDependencies; + actions: { [key: ActionId]: ActionMetadata }; + serviceInterfaces: { + [key: ServiceInterfaceId]: ServiceInterfaceWithHostInfo; + }; + hosts: HostInfo; + storeExposedDependents: string[]; +}; diff --git a/core/startos/bindings/PackageId.ts b/core/startos/bindings/PackageId.ts index fcf62f5e2..349bf44d7 100644 --- a/core/startos/bindings/PackageId.ts +++ b/core/startos/bindings/PackageId.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type PackageId = string; \ No newline at end of file +export type PackageId = string; diff --git a/core/startos/bindings/PackageState.ts b/core/startos/bindings/PackageState.ts index 4aa0c1d97..6c90bff09 100644 --- a/core/startos/bindings/PackageState.ts +++ b/core/startos/bindings/PackageState.ts @@ -3,4 +3,9 @@ import type { InstalledState } from "./InstalledState"; import type { InstallingState } from "./InstallingState"; import type { UpdatingState } from "./UpdatingState"; -export type PackageState = { "state": "installing" } & InstallingState | { "state": "restoring" } & InstallingState | { "state": "updating" } & UpdatingState | { "state": "installed" } & InstalledState | { "state": "removing" } & InstalledState; \ No newline at end of file +export type PackageState = + | ({ state: "installing" } & InstallingState) + | ({ state: "restoring" } & InstallingState) + | ({ state: "updating" } & UpdatingState) + | ({ state: "installed" } & InstalledState) + | ({ state: "removing" } & InstalledState); diff --git a/core/startos/bindings/ParamsMaybePackageId.ts b/core/startos/bindings/ParamsMaybePackageId.ts index 867eb2a51..e9f0f170c 100644 --- a/core/startos/bindings/ParamsMaybePackageId.ts +++ b/core/startos/bindings/ParamsMaybePackageId.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ParamsMaybePackageId = { packageId: string | null, }; \ No newline at end of file +export type ParamsMaybePackageId = { packageId: string | null }; diff --git a/core/startos/bindings/ParamsPackageId.ts b/core/startos/bindings/ParamsPackageId.ts index aa3caec92..7bc919843 100644 --- a/core/startos/bindings/ParamsPackageId.ts +++ b/core/startos/bindings/ParamsPackageId.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ParamsPackageId = { packageId: string, }; \ No newline at end of file +export type ParamsPackageId = { packageId: string }; diff --git a/core/startos/bindings/Progress.ts b/core/startos/bindings/Progress.ts index acddd8582..c8e5e4431 100644 --- a/core/startos/bindings/Progress.ts +++ b/core/startos/bindings/Progress.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type Progress = boolean | { done: number, total: number | null, }; \ No newline at end of file +export type Progress = boolean | { done: number; total: number | null }; diff --git a/core/startos/bindings/Public.ts b/core/startos/bindings/Public.ts index c913d8493..442176303 100644 --- a/core/startos/bindings/Public.ts +++ b/core/startos/bindings/Public.ts @@ -2,4 +2,8 @@ import type { AllPackageData } from "./AllPackageData"; import type { ServerInfo } from "./ServerInfo"; -export type Public = { serverInfo: ServerInfo, packageData: AllPackageData, ui: any, }; \ No newline at end of file +export type Public = { + serverInfo: ServerInfo; + packageData: AllPackageData; + ui: any; +}; diff --git a/core/startos/bindings/RemoveActionParams.ts b/core/startos/bindings/RemoveActionParams.ts index ae2faccbe..fcd567c3f 100644 --- a/core/startos/bindings/RemoveActionParams.ts +++ b/core/startos/bindings/RemoveActionParams.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type RemoveActionParams = { id: string, }; \ No newline at end of file +export type RemoveActionParams = { id: string }; diff --git a/core/startos/bindings/RemoveAddressParams.ts b/core/startos/bindings/RemoveAddressParams.ts index 2b9881ce1..578631d39 100644 --- a/core/startos/bindings/RemoveAddressParams.ts +++ b/core/startos/bindings/RemoveAddressParams.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type RemoveAddressParams = { id: string, }; \ No newline at end of file +export type RemoveAddressParams = { id: string }; diff --git a/core/startos/bindings/ReverseProxyBind.ts b/core/startos/bindings/ReverseProxyBind.ts index 6c2d5a586..c9d67b127 100644 --- a/core/startos/bindings/ReverseProxyBind.ts +++ b/core/startos/bindings/ReverseProxyBind.ts @@ -1,3 +1,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ReverseProxyBind = { ip: string | null, port: number, ssl: boolean, }; \ No newline at end of file +export type ReverseProxyBind = { + ip: string | null; + port: number; + ssl: boolean; +}; diff --git a/core/startos/bindings/ReverseProxyDestination.ts b/core/startos/bindings/ReverseProxyDestination.ts index 8786f1008..216d1310f 100644 --- a/core/startos/bindings/ReverseProxyDestination.ts +++ b/core/startos/bindings/ReverseProxyDestination.ts @@ -1,3 +1,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ReverseProxyDestination = { ip: string | null, port: number, ssl: boolean, }; \ No newline at end of file +export type ReverseProxyDestination = { + ip: string | null; + port: number; + ssl: boolean; +}; diff --git a/core/startos/bindings/ReverseProxyHttp.ts b/core/startos/bindings/ReverseProxyHttp.ts index f7b652e6a..07cf41862 100644 --- a/core/startos/bindings/ReverseProxyHttp.ts +++ b/core/startos/bindings/ReverseProxyHttp.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ReverseProxyHttp = { headers: null | {[key: string]: string}, }; \ No newline at end of file +export type ReverseProxyHttp = { headers: null | { [key: string]: string } }; diff --git a/core/startos/bindings/ReverseProxyParams.ts b/core/startos/bindings/ReverseProxyParams.ts index bc6d3016c..6f684b780 100644 --- a/core/startos/bindings/ReverseProxyParams.ts +++ b/core/startos/bindings/ReverseProxyParams.ts @@ -3,4 +3,8 @@ import type { ReverseProxyBind } from "./ReverseProxyBind"; import type { ReverseProxyDestination } from "./ReverseProxyDestination"; import type { ReverseProxyHttp } from "./ReverseProxyHttp"; -export type ReverseProxyParams = { bind: ReverseProxyBind, dst: ReverseProxyDestination, http: ReverseProxyHttp, }; \ No newline at end of file +export type ReverseProxyParams = { + bind: ReverseProxyBind; + dst: ReverseProxyDestination; + http: ReverseProxyHttp; +}; diff --git a/core/startos/bindings/Security.ts b/core/startos/bindings/Security.ts index 390b6a91f..e722707df 100644 --- a/core/startos/bindings/Security.ts +++ b/core/startos/bindings/Security.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type Security = { ssl: boolean, }; \ No newline at end of file +export type Security = { ssl: boolean }; diff --git a/core/startos/bindings/ServerInfo.ts b/core/startos/bindings/ServerInfo.ts index 97cd77888..e505c84e7 100644 --- a/core/startos/bindings/ServerInfo.ts +++ b/core/startos/bindings/ServerInfo.ts @@ -4,12 +4,32 @@ import type { IpInfo } from "./IpInfo"; import type { ServerStatus } from "./ServerStatus"; import type { WifiInfo } from "./WifiInfo"; -export type ServerInfo = { arch: string, platform: string, id: string, hostname: string, version: string, lastBackup: string | null, -/** - * Used in the wifi to determine the region to set the system to - */ -lastWifiRegion: string | null, eosVersionCompat: string, lanAddress: string, onionAddress: string, -/** - * for backwards compatibility - */ -torAddress: string, ipInfo: { [key: string]: IpInfo }, statusInfo: ServerStatus, wifi: WifiInfo, unreadNotificationCount: number, passwordHash: string, pubkey: string, caFingerprint: string, ntpSynced: boolean, zram: boolean, governor: Governor | null, }; \ No newline at end of file +export type ServerInfo = { + arch: string; + platform: string; + id: string; + hostname: string; + version: string; + lastBackup: string | null; + /** + * Used in the wifi to determine the region to set the system to + */ + lastWifiRegion: string | null; + eosVersionCompat: string; + lanAddress: string; + onionAddress: string; + /** + * for backwards compatibility + */ + torAddress: string; + ipInfo: { [key: string]: IpInfo }; + statusInfo: ServerStatus; + wifi: WifiInfo; + unreadNotificationCount: number; + passwordHash: string; + pubkey: string; + caFingerprint: string; + ntpSynced: boolean; + zram: boolean; + governor: Governor | null; +}; diff --git a/core/startos/bindings/ServerSpecs.ts b/core/startos/bindings/ServerSpecs.ts index ec464c8df..b2278873c 100644 --- a/core/startos/bindings/ServerSpecs.ts +++ b/core/startos/bindings/ServerSpecs.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ServerSpecs = { cpu: string, disk: string, memory: string, }; \ No newline at end of file +export type ServerSpecs = { cpu: string; disk: string; memory: string }; diff --git a/core/startos/bindings/ServerStatus.ts b/core/startos/bindings/ServerStatus.ts index 0d31f74ea..e72d5d6de 100644 --- a/core/startos/bindings/ServerStatus.ts +++ b/core/startos/bindings/ServerStatus.ts @@ -3,4 +3,10 @@ import type { BackupProgress } from "./BackupProgress"; import type { PackageId } from "./PackageId"; import type { UpdateProgress } from "./UpdateProgress"; -export type ServerStatus = { backupProgress: { [key: PackageId]: BackupProgress } | null, updated: boolean, updateProgress: UpdateProgress | null, shuttingDown: boolean, restarting: boolean, }; \ No newline at end of file +export type ServerStatus = { + backupProgress: { [key: PackageId]: BackupProgress } | null; + updated: boolean; + updateProgress: UpdateProgress | null; + shuttingDown: boolean; + restarting: boolean; +}; diff --git a/core/startos/bindings/ServiceInterface.ts b/core/startos/bindings/ServiceInterface.ts index 2d484d749..4167257bb 100644 --- a/core/startos/bindings/ServiceInterface.ts +++ b/core/startos/bindings/ServiceInterface.ts @@ -3,4 +3,13 @@ import type { AddressInfo } from "./AddressInfo"; import type { ServiceInterfaceId } from "./ServiceInterfaceId"; import type { ServiceInterfaceType } from "./ServiceInterfaceType"; -export type ServiceInterface = { id: ServiceInterfaceId, name: string, description: string, hasPrimary: boolean, disabled: boolean, masked: boolean, addressInfo: AddressInfo, type: ServiceInterfaceType, }; \ No newline at end of file +export type ServiceInterface = { + id: ServiceInterfaceId; + name: string; + description: string; + hasPrimary: boolean; + disabled: boolean; + masked: boolean; + addressInfo: AddressInfo; + type: ServiceInterfaceType; +}; diff --git a/core/startos/bindings/ServiceInterfaceId.ts b/core/startos/bindings/ServiceInterfaceId.ts index 87edd8694..55315ab60 100644 --- a/core/startos/bindings/ServiceInterfaceId.ts +++ b/core/startos/bindings/ServiceInterfaceId.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ServiceInterfaceId = string; \ No newline at end of file +export type ServiceInterfaceId = string; diff --git a/core/startos/bindings/ServiceInterfaceType.ts b/core/startos/bindings/ServiceInterfaceType.ts index 74372d4ad..fadd11f9d 100644 --- a/core/startos/bindings/ServiceInterfaceType.ts +++ b/core/startos/bindings/ServiceInterfaceType.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ServiceInterfaceType = "ui" | "p2p" | "api"; \ No newline at end of file +export type ServiceInterfaceType = "ui" | "p2p" | "api"; diff --git a/core/startos/bindings/ServiceInterfaceWithHostInfo.ts b/core/startos/bindings/ServiceInterfaceWithHostInfo.ts index 449c5b29d..bef83abe2 100644 --- a/core/startos/bindings/ServiceInterfaceWithHostInfo.ts +++ b/core/startos/bindings/ServiceInterfaceWithHostInfo.ts @@ -4,4 +4,14 @@ import type { ExportedHostInfo } from "./ExportedHostInfo"; import type { ServiceInterfaceId } from "./ServiceInterfaceId"; import type { ServiceInterfaceType } from "./ServiceInterfaceType"; -export type ServiceInterfaceWithHostInfo = { hostInfo: ExportedHostInfo, id: ServiceInterfaceId, name: string, description: string, hasPrimary: boolean, disabled: boolean, masked: boolean, addressInfo: AddressInfo, type: ServiceInterfaceType, }; \ No newline at end of file +export type ServiceInterfaceWithHostInfo = { + hostInfo: ExportedHostInfo; + id: ServiceInterfaceId; + name: string; + description: string; + hasPrimary: boolean; + disabled: boolean; + masked: boolean; + addressInfo: AddressInfo; + type: ServiceInterfaceType; +}; diff --git a/core/startos/bindings/SetConfigured.ts b/core/startos/bindings/SetConfigured.ts index 8f191b562..ff9eaf11d 100644 --- a/core/startos/bindings/SetConfigured.ts +++ b/core/startos/bindings/SetConfigured.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type SetConfigured = { configured: boolean, }; \ No newline at end of file +export type SetConfigured = { configured: boolean }; diff --git a/core/startos/bindings/SetDependenciesParams.ts b/core/startos/bindings/SetDependenciesParams.ts index b313b0718..d4d2d45cb 100644 --- a/core/startos/bindings/SetDependenciesParams.ts +++ b/core/startos/bindings/SetDependenciesParams.ts @@ -1,4 +1,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { DependencyRequirement } from "./DependencyRequirement"; -export type SetDependenciesParams = { dependencies: Array, }; \ No newline at end of file +export type SetDependenciesParams = { + dependencies: Array; +}; diff --git a/core/startos/bindings/SetHealth.ts b/core/startos/bindings/SetHealth.ts index cc8193863..8a4a1bcff 100644 --- a/core/startos/bindings/SetHealth.ts +++ b/core/startos/bindings/SetHealth.ts @@ -1,4 +1,10 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { HealthCheckId } from "./HealthCheckId"; -export type SetHealth = { id: HealthCheckId, name: string, } & ({ "result": "success", message: string, } | { "result": "disabled" } | { "result": "starting" } | { "result": "loading", message: string, } | { "result": "failure", message: string, }); \ No newline at end of file +export type SetHealth = { id: HealthCheckId; name: string } & ( + | { result: "success"; message: string | null } + | { result: "disabled"; message: string | null } + | { result: "starting"; message: string | null } + | { result: "loading"; message: string } + | { result: "failure"; message: string } +); diff --git a/core/startos/bindings/SetMainStatus.ts b/core/startos/bindings/SetMainStatus.ts index 0476ff4ce..653342e5f 100644 --- a/core/startos/bindings/SetMainStatus.ts +++ b/core/startos/bindings/SetMainStatus.ts @@ -1,4 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Status } from "./Status"; -export type SetMainStatus = { status: Status, }; \ No newline at end of file +export type SetMainStatus = { status: Status }; diff --git a/core/startos/bindings/SetStoreParams.ts b/core/startos/bindings/SetStoreParams.ts index e3496a171..8737295bd 100644 --- a/core/startos/bindings/SetStoreParams.ts +++ b/core/startos/bindings/SetStoreParams.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type SetStoreParams = { value: any, path: string, }; \ No newline at end of file +export type SetStoreParams = { value: any; path: string }; diff --git a/core/startos/bindings/Status.ts b/core/startos/bindings/Status.ts index 73894287a..e23c5b4be 100644 --- a/core/startos/bindings/Status.ts +++ b/core/startos/bindings/Status.ts @@ -2,4 +2,8 @@ import type { DependencyConfigErrors } from "./DependencyConfigErrors"; import type { MainStatus } from "./MainStatus"; -export type Status = { configured: boolean, main: MainStatus, dependencyConfigErrors: DependencyConfigErrors, }; \ No newline at end of file +export type Status = { + configured: boolean; + main: MainStatus; + dependencyConfigErrors: DependencyConfigErrors; +}; diff --git a/core/startos/bindings/UpdateProgress.ts b/core/startos/bindings/UpdateProgress.ts index ef6473f37..3d07c56b4 100644 --- a/core/startos/bindings/UpdateProgress.ts +++ b/core/startos/bindings/UpdateProgress.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type UpdateProgress = { size: number | null, downloaded: number, }; \ No newline at end of file +export type UpdateProgress = { size: number | null; downloaded: number }; diff --git a/core/startos/bindings/UpdatingState.ts b/core/startos/bindings/UpdatingState.ts index ce994ce33..37a83f0df 100644 --- a/core/startos/bindings/UpdatingState.ts +++ b/core/startos/bindings/UpdatingState.ts @@ -2,4 +2,7 @@ import type { InstallingInfo } from "./InstallingInfo"; import type { Manifest } from "./Manifest"; -export type UpdatingState = { manifest: Manifest, installingInfo: InstallingInfo, }; \ No newline at end of file +export type UpdatingState = { + manifest: Manifest; + installingInfo: InstallingInfo; +}; diff --git a/core/startos/bindings/VolumeId.ts b/core/startos/bindings/VolumeId.ts index b5e798c8b..e5c63994e 100644 --- a/core/startos/bindings/VolumeId.ts +++ b/core/startos/bindings/VolumeId.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type VolumeId = string; \ No newline at end of file +export type VolumeId = string; diff --git a/core/startos/bindings/WifiInfo.ts b/core/startos/bindings/WifiInfo.ts index e1debf26b..c949b1e76 100644 --- a/core/startos/bindings/WifiInfo.ts +++ b/core/startos/bindings/WifiInfo.ts @@ -1,3 +1,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type WifiInfo = { ssids: Array, selected: string | null, connected: string | null, }; \ No newline at end of file +export type WifiInfo = { + ssids: Array; + selected: string | null; + connected: string | null; +}; diff --git a/core/startos/src/status/health_check.rs b/core/startos/src/status/health_check.rs index 8629976a0..cd5616527 100644 --- a/core/startos/src/status/health_check.rs +++ b/core/startos/src/status/health_check.rs @@ -14,9 +14,9 @@ pub struct HealthCheckResult { #[serde(rename_all = "camelCase")] #[serde(tag = "result")] pub enum HealthCheckResultKind { - Success { message: String }, - Disabled, - Starting, + Success { message: Option }, + Disabled { message: Option }, + Starting { message: Option }, Loading { message: String }, Failure { message: String }, } @@ -25,10 +25,26 @@ impl std::fmt::Display for HealthCheckResult { let name = &self.name; match &self.kind { HealthCheckResultKind::Success { message } => { - write!(f, "{name}: Succeeded ({message})") + if let Some(message) = message { + write!(f, "{name}: Succeeded ({message})") + } else { + write!(f, "{name}: Succeeded") + } + } + HealthCheckResultKind::Disabled { message } => { + if let Some(message) = message { + write!(f, "{name}: Disabled ({message})") + } else { + write!(f, "{name}: Disabled") + } + } + HealthCheckResultKind::Starting { message } => { + if let Some(message) = message { + write!(f, "{name}: Starting ({message})") + } else { + write!(f, "{name}: Starting") + } } - HealthCheckResultKind::Disabled => write!(f, "{name}: Disabled"), - HealthCheckResultKind::Starting => write!(f, "{name}: Starting"), HealthCheckResultKind::Loading { message } => write!(f, "{name}: Loading ({message})"), HealthCheckResultKind::Failure { message } => write!(f, "{name}: Failed ({message})"), } diff --git a/web/projects/ui/src/app/services/api/mock-patch.ts b/web/projects/ui/src/app/services/api/mock-patch.ts index 3a8365b67..5d876cf30 100644 --- a/web/projects/ui/src/app/services/api/mock-patch.ts +++ b/web/projects/ui/src/app/services/api/mock-patch.ts @@ -101,6 +101,7 @@ export const mockPatchData: DataModel = { 'ephemeral-health-check': { name: 'Ephemeral Health Check', result: 'starting', + message: null, }, 'chain-state': { name: 'Chain State', @@ -120,6 +121,7 @@ export const mockPatchData: DataModel = { 'unnecessary-health-check': { name: 'Unnecessary Health Check', result: 'disabled', + message: null, }, }, },