mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
use hardware requirements to display conflicts and prevent install (#2700)
* use hardware requirements to display conflicts and prevent install * better messaging and also consider OS compatibility * wip: backend hw requirements * update backend components * migration --------- Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
7
sdk/base/lib/osBindings/DeviceFilter.ts
Normal file
7
sdk/base/lib/osBindings/DeviceFilter.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type DeviceFilter = {
|
||||
class: "processor" | "display"
|
||||
pattern: string
|
||||
patternDescription: string
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DeviceFilter } from "./DeviceFilter"
|
||||
|
||||
export type HardwareRequirements = {
|
||||
device: { display?: string; processor?: string }
|
||||
device: Array<DeviceFilter>
|
||||
ram: number | null
|
||||
arch: string[] | null
|
||||
}
|
||||
|
||||
7
sdk/base/lib/osBindings/LshwDevice.ts
Normal file
7
sdk/base/lib/osBindings/LshwDevice.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { LshwDisplay } from "./LshwDisplay"
|
||||
import type { LshwProcessor } from "./LshwProcessor"
|
||||
|
||||
export type LshwDevice =
|
||||
| ({ class: "processor" } & LshwProcessor)
|
||||
| ({ class: "display" } & LshwDisplay)
|
||||
3
sdk/base/lib/osBindings/LshwDisplay.ts
Normal file
3
sdk/base/lib/osBindings/LshwDisplay.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type LshwDisplay = { product: string }
|
||||
3
sdk/base/lib/osBindings/LshwProcessor.ts
Normal file
3
sdk/base/lib/osBindings/LshwProcessor.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type LshwProcessor = { product: string }
|
||||
@@ -1,6 +1,7 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Governor } from "./Governor"
|
||||
import type { IpInfo } from "./IpInfo"
|
||||
import type { LshwDevice } from "./LshwDevice"
|
||||
import type { ServerStatus } from "./ServerStatus"
|
||||
import type { SmtpValue } from "./SmtpValue"
|
||||
import type { WifiInfo } from "./WifiInfo"
|
||||
@@ -11,7 +12,7 @@ export type ServerInfo = {
|
||||
id: string
|
||||
hostname: string
|
||||
version: string
|
||||
versionCompat: string
|
||||
packageVersionCompat: string
|
||||
postInitMigrationTodos: string[]
|
||||
lastBackup: string | null
|
||||
lanAddress: string
|
||||
@@ -31,4 +32,6 @@ export type ServerInfo = {
|
||||
zram: boolean
|
||||
governor: Governor | null
|
||||
smtp: SmtpValue | null
|
||||
ram: number
|
||||
devices: Array<LshwDevice>
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@ export { DependencyRequirement } from "./DependencyRequirement"
|
||||
export { DepInfo } from "./DepInfo"
|
||||
export { Description } from "./Description"
|
||||
export { DestroySubcontainerFsParams } from "./DestroySubcontainerFsParams"
|
||||
export { DeviceFilter } from "./DeviceFilter"
|
||||
export { Duration } from "./Duration"
|
||||
export { EchoParams } from "./EchoParams"
|
||||
export { EncryptedWire } from "./EncryptedWire"
|
||||
@@ -111,6 +112,9 @@ export { LanInfo } from "./LanInfo"
|
||||
export { ListServiceInterfacesParams } from "./ListServiceInterfacesParams"
|
||||
export { ListVersionSignersParams } from "./ListVersionSignersParams"
|
||||
export { LoginParams } from "./LoginParams"
|
||||
export { LshwDevice } from "./LshwDevice"
|
||||
export { LshwDisplay } from "./LshwDisplay"
|
||||
export { LshwProcessor } from "./LshwProcessor"
|
||||
export { MainStatus } from "./MainStatus"
|
||||
export { Manifest } from "./Manifest"
|
||||
export { MaybeUtf8String } from "./MaybeUtf8String"
|
||||
|
||||
@@ -144,7 +144,7 @@ export type SDKManifest = {
|
||||
* ```
|
||||
*/
|
||||
readonly hardwareRequirements?: {
|
||||
readonly device?: { display?: RegExp; processor?: RegExp }
|
||||
readonly device?: T.DeviceFilter[]
|
||||
readonly ram?: number | null
|
||||
readonly arch?: string[] | null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user