mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
misc fixes for alpha.16 (#3091)
* port misc fixes from feature/nvidia * switch back to official tor proxy on 9050 * refactor OpenUI * fix typo * fixes, plus getServiceManifest * fix EffectCreator, bump to beta.47 * fixes
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
CreateTaskParams,
|
||||
MountParams,
|
||||
StatusInfo,
|
||||
Manifest,
|
||||
} from "./osBindings"
|
||||
import {
|
||||
PackageId,
|
||||
@@ -83,6 +84,11 @@ export type Effects = {
|
||||
mount(options: MountParams): Promise<string>
|
||||
/** Returns a list of the ids of all installed packages */
|
||||
getInstalledPackages(): Promise<string[]>
|
||||
/** Returns the manifest of a service */
|
||||
getServiceManifest(options: {
|
||||
packageId: PackageId
|
||||
callback?: () => void
|
||||
}): Promise<Manifest>
|
||||
|
||||
// health
|
||||
/** sets the result of a health check */
|
||||
|
||||
8
sdk/base/lib/osBindings/GetServiceManifestParams.ts
Normal file
8
sdk/base/lib/osBindings/GetServiceManifestParams.ts
Normal 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 { CallbackId } from "./CallbackId"
|
||||
import type { PackageId } from "./PackageId"
|
||||
|
||||
export type GetServiceManifestParams = {
|
||||
packageId: PackageId
|
||||
callback?: CallbackId
|
||||
}
|
||||
@@ -91,6 +91,7 @@ export { GetPackageParams } from "./GetPackageParams"
|
||||
export { GetPackageResponseFull } from "./GetPackageResponseFull"
|
||||
export { GetPackageResponse } from "./GetPackageResponse"
|
||||
export { GetServiceInterfaceParams } from "./GetServiceInterfaceParams"
|
||||
export { GetServiceManifestParams } from "./GetServiceManifestParams"
|
||||
export { GetServicePortForwardParams } from "./GetServicePortForwardParams"
|
||||
export { GetSslCertificateParams } from "./GetSslCertificateParams"
|
||||
export { GetSslKeyParams } from "./GetSslKeyParams"
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
RunActionParams,
|
||||
SetDataVersionParams,
|
||||
SetMainStatus,
|
||||
GetServiceManifestParams,
|
||||
} from ".././osBindings"
|
||||
import { CreateSubcontainerFsParams } from ".././osBindings"
|
||||
import { DestroySubcontainerFsParams } from ".././osBindings"
|
||||
@@ -64,7 +65,6 @@ describe("startosTypeValidation ", () => {
|
||||
destroyFs: {} as DestroySubcontainerFsParams,
|
||||
},
|
||||
clearBindings: {} as ClearBindingsParams,
|
||||
getInstalledPackages: undefined,
|
||||
bind: {} as BindParams,
|
||||
getHostInfo: {} as WithCallback<GetHostInfoParams>,
|
||||
restart: undefined,
|
||||
@@ -76,6 +76,8 @@ describe("startosTypeValidation ", () => {
|
||||
getSslKey: {} as GetSslKeyParams,
|
||||
getServiceInterface: {} as WithCallback<GetServiceInterfaceParams>,
|
||||
setDependencies: {} as SetDependenciesParams,
|
||||
getInstalledPackages: undefined,
|
||||
getServiceManifest: {} as WithCallback<GetServiceManifestParams>,
|
||||
getSystemSmtp: {} as WithCallback<GetSystemSmtpParams>,
|
||||
getContainerIp: {} as WithCallback<GetContainerIpParams>,
|
||||
getOsIp: undefined,
|
||||
|
||||
@@ -153,10 +153,21 @@ export type SDKManifest = {
|
||||
|
||||
// this is hacky but idk a more elegant way
|
||||
type ArchOptions = {
|
||||
0: ["x86_64", "aarch64"]
|
||||
1: ["aarch64", "x86_64"]
|
||||
2: ["x86_64"]
|
||||
3: ["aarch64"]
|
||||
0: ["x86_64", "aarch64", "riscv64"]
|
||||
1: ["aarch64", "x86_64", "riscv64"]
|
||||
2: ["x86_64", "riscv64", "aarch64"]
|
||||
3: ["aarch64", "riscv64", "x86_64"]
|
||||
4: ["riscv64", "x86_64", "aarch64"]
|
||||
5: ["riscv64", "aarch64", "x86_64"]
|
||||
6: ["x86_64", "aarch64"]
|
||||
7: ["aarch64", "x86_64"]
|
||||
8: ["x86_64", "riscv64"]
|
||||
9: ["aarch64", "riscv64"]
|
||||
10: ["riscv64", "aarch64"]
|
||||
11: ["riscv64", "x86_64"]
|
||||
12: ["x86_64"]
|
||||
13: ["aarch64"]
|
||||
14: ["riscv64"]
|
||||
}
|
||||
export type SDKImageInputSpec = {
|
||||
[A in keyof ArchOptions]: {
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Effects } from "../Effects"
|
||||
import { DropGenerator, DropPromise } from "./Drop"
|
||||
import { IpAddress, IPV6_LINK_LOCAL } from "./ip"
|
||||
import { deepEqual } from "./deepEqual"
|
||||
import { once } from "./once"
|
||||
|
||||
export type UrlString = string
|
||||
export type HostId = string
|
||||
@@ -255,6 +256,21 @@ export const filledAddress = (
|
||||
function filledAddressFromHostnames<F extends Filter>(
|
||||
hostnames: HostnameInfo[],
|
||||
): Filled<F> & AddressInfo {
|
||||
const getNonLocal = once(() =>
|
||||
filledAddressFromHostnames<typeof nonLocalFilter & F>(
|
||||
filterRec(hostnames, nonLocalFilter, false),
|
||||
),
|
||||
)
|
||||
const getPublic = once(() =>
|
||||
filledAddressFromHostnames<typeof publicFilter & F>(
|
||||
filterRec(hostnames, publicFilter, false),
|
||||
),
|
||||
)
|
||||
const getOnion = once(() =>
|
||||
filledAddressFromHostnames<typeof onionFilter & F>(
|
||||
filterRec(hostnames, onionFilter, false),
|
||||
),
|
||||
)
|
||||
return {
|
||||
...addressInfo,
|
||||
hostnames,
|
||||
@@ -273,19 +289,13 @@ export const filledAddress = (
|
||||
)
|
||||
},
|
||||
get nonLocal(): Filled<typeof nonLocalFilter & F> {
|
||||
return filledAddressFromHostnames<typeof nonLocalFilter & F>(
|
||||
filterRec(hostnames, nonLocalFilter, false),
|
||||
)
|
||||
return getNonLocal()
|
||||
},
|
||||
get public(): Filled<typeof publicFilter & F> {
|
||||
return filledAddressFromHostnames<typeof publicFilter & F>(
|
||||
filterRec(hostnames, publicFilter, false),
|
||||
)
|
||||
return getPublic()
|
||||
},
|
||||
get onion(): Filled<typeof onionFilter & F> {
|
||||
return filledAddressFromHostnames<typeof onionFilter & F>(
|
||||
filterRec(hostnames, onionFilter, false),
|
||||
)
|
||||
return getOnion()
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,11 @@ export { getDefaultString } from "./getDefaultString"
|
||||
export * from "./ip"
|
||||
|
||||
/// Not being used, but known to be browser compatible
|
||||
export { GetServiceInterface, getServiceInterface } from "./getServiceInterface"
|
||||
export {
|
||||
GetServiceInterface,
|
||||
getServiceInterface,
|
||||
filledAddress,
|
||||
} from "./getServiceInterface"
|
||||
export { getServiceInterfaces } from "./getServiceInterfaces"
|
||||
export { once } from "./once"
|
||||
export { asError } from "./asError"
|
||||
|
||||
Reference in New Issue
Block a user