Feature/registry package index (#2623)

* include system images in compat s9pk

* wip

* wip

* update types

* wip

* fix signature serialization

* Add SignatureHeader conversions

* finish display impl for get

---------

Co-authored-by: Shadowy Super Coder <musashidisciple@proton.me>
This commit is contained in:
Aiden McClelland
2024-05-31 12:13:23 -06:00
committed by GitHub
parent 0ccbb52c1f
commit fd7c2fbe93
113 changed files with 3265 additions and 1436 deletions

View File

@@ -1,7 +1,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { SignerKey } from "./SignerKey"
import type { AnyVerifyingKey } from "./AnyVerifyingKey"
export type AcceptSigners =
| { signer: SignerKey }
| { signer: AnyVerifyingKey }
| { any: Array<AcceptSigners> }
| { all: Array<AcceptSigners> }

View File

@@ -1,3 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Guid } from "./Guid"
export type AddAdminParams = { signer: string }
export type AddAdminParams = { signer: Guid }

View File

@@ -1,12 +1,13 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Signature } from "./Signature"
import type { SignerKey } from "./SignerKey"
import type { AnySignature } from "./AnySignature"
import type { Blake3Commitment } from "./Blake3Commitment"
import type { Version } from "./Version"
export type AddAssetParams = {
url: string
signature: Signature
version: string
version: Version
platform: string
upload: boolean
__auth_signer: SignerKey
url: string
signature: AnySignature
commitment: Blake3Commitment
}

View File

@@ -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 { Version } from "./Version"
export type AddVersionParams = {
version: string
version: Version
headline: string
releaseNotes: string
sourceVersion: string

View File

@@ -1,4 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Pem } from "./Pem"
export type SignerKey = { alg: "ed25519"; pubkey: Pem }
export type AnySignature = string

View 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 AnySigningKey = string

View 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 AnyVerifyingKey = string

View File

@@ -0,0 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Base64 } from "./Base64"
export type Blake3Commitment = { hash: Base64; size: number }

View File

@@ -0,0 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Description } from "./Description"
export type Category = { name: string; description: Description }

View File

@@ -1,5 +1,13 @@
// 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"
import type { Guid } from "./Guid"
import type { OsIndex } from "./OsIndex"
import type { PackageIndex } from "./PackageIndex"
import type { SignerInfo } from "./SignerInfo"
export type FullIndex = { os: OsIndex; signers: { [key: string]: SignerInfo } }
export type FullIndex = {
icon: DataUrl | null
package: PackageIndex
os: OsIndex
signers: { [key: Guid]: SignerInfo }
}

View File

@@ -1,3 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Version } from "./Version"
export type GetOsAssetParams = { version: string; platform: string }
export type GetOsAssetParams = { version: Version; platform: string }

View File

@@ -0,0 +1,10 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { PackageDetailLevel } from "./PackageDetailLevel"
import type { PackageId } from "./PackageId"
export type GetPackageParams = {
id: PackageId | null
version: string | null
sourceVersion: string | null
otherVersions: PackageDetailLevel | null
}

View File

@@ -0,0 +1,9 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { PackageInfoShort } from "./PackageInfoShort"
import type { PackageVersionInfo } from "./PackageVersionInfo"
import type { Version } from "./Version"
export type GetPackageResponse = {
best: { [key: Version]: PackageVersionInfo }
otherVersions?: { [key: Version]: PackageInfoShort }
}

View File

@@ -0,0 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { PackageVersionInfo } from "./PackageVersionInfo"
import type { Version } from "./Version"
export type GetPackageResponseFull = {
best: { [key: Version]: PackageVersionInfo }
otherVersions: { [key: Version]: PackageVersionInfo }
}

View File

@@ -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 Pem = string
export type Guid = string

View File

@@ -2,6 +2,6 @@
export type HardwareRequirements = {
device: { [key: string]: string }
ram: bigint | null
ram: number | null
arch: Array<string> | null
}

View File

@@ -1,3 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Version } from "./Version"
export type ListVersionSignersParams = { version: string }
export type ListVersionSignersParams = { version: Version }

View File

@@ -5,15 +5,15 @@ import type { Description } from "./Description"
import type { HardwareRequirements } from "./HardwareRequirements"
import type { ImageId } from "./ImageId"
import type { PackageId } from "./PackageId"
import type { Version } from "./Version"
import type { VolumeId } from "./VolumeId"
export type Manifest = {
id: PackageId
title: string
version: string
version: Version
releaseNotes: string
license: string
replaces: Array<string>
wrapperRepo: string
upstreamRepo: string
supportSite: string
@@ -27,6 +27,6 @@ export type Manifest = {
dependencies: Dependencies
hardwareRequirements: HardwareRequirements
gitHash: string | null
osVersion: string
osVersion: Version
hasConfig: boolean
}

View File

@@ -1,10 +1,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Base64 } from "./Base64"
import type { Pem } from "./Pem"
export type Blake3Ed25519Signature = {
hash: Base64
size: bigint
pubkey: Pem
signature: Base64
export type MerkleArchiveCommitment = {
rootSighash: Base64
rootMaxsize: number
}

View File

@@ -1,4 +1,5 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { OsVersionInfo } from "./OsVersionInfo"
import type { Version } from "./Version"
export type OsIndex = { versions: { [key: string]: OsVersionInfo } }
export type OsIndex = { versions: { [key: Version]: OsVersionInfo } }

View File

@@ -1,12 +1,14 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Blake3Commitment } from "./Blake3Commitment"
import type { Guid } from "./Guid"
import type { RegistryAsset } from "./RegistryAsset"
export type OsVersionInfo = {
headline: string
releaseNotes: string
sourceVersion: string
signers: string[]
iso: { [key: string]: RegistryAsset }
squashfs: { [key: string]: RegistryAsset }
img: { [key: string]: RegistryAsset }
signers: Array<Guid>
iso: { [key: string]: RegistryAsset<Blake3Commitment> }
squashfs: { [key: string]: RegistryAsset<Blake3Commitment> }
img: { [key: string]: RegistryAsset<Blake3Commitment> }
}

View 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 PackageDetailLevel = "short" | "full"

View File

@@ -0,0 +1,9 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Category } from "./Category"
import type { PackageId } from "./PackageId"
import type { PackageInfo } from "./PackageInfo"
export type PackageIndex = {
categories: { [key: string]: Category }
packages: { [key: PackageId]: PackageInfo }
}

View File

@@ -0,0 +1,9 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Guid } from "./Guid"
import type { PackageVersionInfo } from "./PackageVersionInfo"
import type { Version } from "./Version"
export type PackageInfo = {
signers: Array<Guid>
versions: { [key: Version]: PackageVersionInfo }
}

View 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 PackageInfoShort = { releaseNotes: string }

View File

@@ -0,0 +1,25 @@
// 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"
import type { Description } from "./Description"
import type { HardwareRequirements } from "./HardwareRequirements"
import type { MerkleArchiveCommitment } from "./MerkleArchiveCommitment"
import type { RegistryAsset } from "./RegistryAsset"
import type { Version } from "./Version"
export type PackageVersionInfo = {
title: string
icon: DataUrl
description: Description
releaseNotes: string
gitHash: string
license: string
wrapperRepo: string
upstreamRepo: string
supportSite: string
marketingSite: string
categories: string[]
osVersion: Version
hardwareRequirements: HardwareRequirements
sourceVersion: string | null
s9pk: RegistryAsset<MerkleArchiveCommitment>
}

View File

@@ -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 { SignatureInfo } from "./SignatureInfo"
import type { AnySignature } from "./AnySignature"
import type { AnyVerifyingKey } from "./AnyVerifyingKey"
export type RegistryAsset = { url: string; signatureInfo: SignatureInfo }
export type RegistryAsset<Commitment> = {
url: string
commitment: Commitment
signatures: { [key: AnyVerifyingKey]: AnySignature }
}

View File

@@ -1,3 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Version } from "./Version"
export type RemoveVersionParams = { version: string }
export type RemoveVersionParams = { version: Version }

View File

@@ -1,9 +1,9 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Base64 } from "./Base64"
import type { Pem } from "./Pem"
export type Blake3Ed2551SignatureInfo = {
hash: Base64
size: bigint
signatures: { [key: Pem]: Base64 }
export type RequestCommitment = {
timestamp: number
nonce: number
size: number
blake3: Base64
}

View File

@@ -2,6 +2,7 @@
import type { Governor } from "./Governor"
import type { IpInfo } from "./IpInfo"
import type { ServerStatus } from "./ServerStatus"
import type { Version } from "./Version"
import type { WifiInfo } from "./WifiInfo"
export type ServerInfo = {
@@ -9,7 +10,7 @@ export type ServerInfo = {
platform: string
id: string
hostname: string
version: string
version: Version
lastBackup: string | null
eosVersionCompat: string
lanAddress: string

View File

@@ -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"
import type { SetMainStatusStatus } from "./SetMainStatusStatus"
export type SetMainStatus = { status: "running" | "stopped" | "starting" }
export type SetMainStatus = { status: SetMainStatusStatus }

View 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 SetMainStatusStatus = "running" | "stopped" | "starting"

View File

@@ -1,8 +1,9 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Signature } from "./Signature"
import type { AnySignature } from "./AnySignature"
import type { Version } from "./Version"
export type SignAssetParams = {
version: string
version: Version
platform: string
signature: Signature
signature: AnySignature
}

View File

@@ -1,4 +0,0 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Blake3Ed25519Signature } from "./Blake3Ed25519Signature"
export type Signature = { blake3Ed25519: Blake3Ed25519Signature }

View File

@@ -1,7 +0,0 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Blake3Ed2551SignatureInfo } from "./Blake3Ed2551SignatureInfo"
export type SignatureInfo = {
context: string
"blake-3-ed-25-5i-9": Blake3Ed2551SignatureInfo | null
}

View File

@@ -1,9 +1,9 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AnyVerifyingKey } from "./AnyVerifyingKey"
import type { ContactInfo } from "./ContactInfo"
import type { SignerKey } from "./SignerKey"
export type SignerInfo = {
name: string
contact: Array<ContactInfo>
keys: Array<SignerKey>
keys: Array<AnyVerifyingKey>
}

View 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 Version = string

View File

@@ -1,3 +1,5 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Guid } from "./Guid"
import type { Version } from "./Version"
export type VersionSignerParams = { version: string; signer: string }
export type VersionSignerParams = { version: Version; signer: Guid }

View File

@@ -11,14 +11,17 @@ export { Algorithm } from "./Algorithm"
export { AllowedStatuses } from "./AllowedStatuses"
export { AllPackageData } from "./AllPackageData"
export { AlpnInfo } from "./AlpnInfo"
export { AnySignature } from "./AnySignature"
export { AnySigningKey } from "./AnySigningKey"
export { AnyVerifyingKey } from "./AnyVerifyingKey"
export { BackupProgress } from "./BackupProgress"
export { Base64 } from "./Base64"
export { BindInfo } from "./BindInfo"
export { BindOptions } from "./BindOptions"
export { BindParams } from "./BindParams"
export { Blake3Ed25519Signature } from "./Blake3Ed25519Signature"
export { Blake3Ed2551SignatureInfo } from "./Blake3Ed2551SignatureInfo"
export { Blake3Commitment } from "./Blake3Commitment"
export { Callback } from "./Callback"
export { Category } from "./Category"
export { CheckDependenciesParam } from "./CheckDependenciesParam"
export { CheckDependenciesResult } from "./CheckDependenciesResult"
export { ChrootParams } from "./ChrootParams"
@@ -48,6 +51,9 @@ export { FullProgress } from "./FullProgress"
export { GetHostInfoParamsKind } from "./GetHostInfoParamsKind"
export { GetHostInfoParams } from "./GetHostInfoParams"
export { GetOsAssetParams } from "./GetOsAssetParams"
export { GetPackageParams } from "./GetPackageParams"
export { GetPackageResponseFull } from "./GetPackageResponseFull"
export { GetPackageResponse } from "./GetPackageResponse"
export { GetPrimaryUrlParams } from "./GetPrimaryUrlParams"
export { GetServiceInterfaceParams } from "./GetServiceInterfaceParams"
export { GetServicePortForwardParams } from "./GetServicePortForwardParams"
@@ -57,6 +63,7 @@ export { GetStoreParams } from "./GetStoreParams"
export { GetSystemSmtpParams } from "./GetSystemSmtpParams"
export { GetVersionParams } from "./GetVersionParams"
export { Governor } from "./Governor"
export { Guid } from "./Guid"
export { HardwareRequirements } from "./HardwareRequirements"
export { HealthCheckId } from "./HealthCheckId"
export { HealthCheckResult } from "./HealthCheckResult"
@@ -75,24 +82,30 @@ export { ListVersionSignersParams } from "./ListVersionSignersParams"
export { MainStatus } from "./MainStatus"
export { Manifest } from "./Manifest"
export { MaybeUtf8String } from "./MaybeUtf8String"
export { MerkleArchiveCommitment } from "./MerkleArchiveCommitment"
export { MountParams } from "./MountParams"
export { MountTarget } from "./MountTarget"
export { NamedProgress } from "./NamedProgress"
export { OsIndex } from "./OsIndex"
export { OsVersionInfo } from "./OsVersionInfo"
export { PackageDataEntry } from "./PackageDataEntry"
export { PackageDetailLevel } from "./PackageDetailLevel"
export { PackageId } from "./PackageId"
export { PackageIndex } from "./PackageIndex"
export { PackageInfoShort } from "./PackageInfoShort"
export { PackageInfo } from "./PackageInfo"
export { PackageState } from "./PackageState"
export { PackageVersionInfo } from "./PackageVersionInfo"
export { ParamsMaybePackageId } from "./ParamsMaybePackageId"
export { ParamsPackageId } from "./ParamsPackageId"
export { PasswordType } from "./PasswordType"
export { Pem } from "./Pem"
export { Progress } from "./Progress"
export { Public } from "./Public"
export { RegistryAsset } from "./RegistryAsset"
export { RemoveActionParams } from "./RemoveActionParams"
export { RemoveAddressParams } from "./RemoveAddressParams"
export { RemoveVersionParams } from "./RemoveVersionParams"
export { RequestCommitment } from "./RequestCommitment"
export { ReverseProxyBind } from "./ReverseProxyBind"
export { ReverseProxyDestination } from "./ReverseProxyDestination"
export { ReverseProxyHttp } from "./ReverseProxyHttp"
@@ -111,16 +124,15 @@ export { Session } from "./Session"
export { SetConfigured } from "./SetConfigured"
export { SetDependenciesParams } from "./SetDependenciesParams"
export { SetHealth } from "./SetHealth"
export { SetMainStatusStatus } from "./SetMainStatusStatus"
export { SetMainStatus } from "./SetMainStatus"
export { SetStoreParams } from "./SetStoreParams"
export { SetSystemSmtpParams } from "./SetSystemSmtpParams"
export { SignAssetParams } from "./SignAssetParams"
export { SignatureInfo } from "./SignatureInfo"
export { Signature } from "./Signature"
export { SignerInfo } from "./SignerInfo"
export { SignerKey } from "./SignerKey"
export { Status } from "./Status"
export { UpdatingState } from "./UpdatingState"
export { VersionSignerParams } from "./VersionSignerParams"
export { Version } from "./Version"
export { VolumeId } from "./VolumeId"
export { WifiInfo } from "./WifiInfo"