misc improvements (#2836)

* misc improvements

* kill proc before destroying subcontainer fs

* version bump

* beta.11

* use bind mount explicitly

* Update sdk/base/lib/Effects.ts

Co-authored-by: Dominion5254 <musashidisciple@proton.me>

---------

Co-authored-by: Dominion5254 <musashidisciple@proton.me>
This commit is contained in:
Aiden McClelland
2025-02-21 15:08:22 -07:00
committed by GitHub
parent 40d194672b
commit 80461a78b0
36 changed files with 358 additions and 143 deletions

View File

@@ -131,6 +131,8 @@ export type Effects = {
}): Promise<Host | null>
/** Returns the IP address of the container */
getContainerIp(): Promise<string>
/** Returns the IP address of StartOS */
getOsIp(): Promise<string>
// interface
/** Creates an interface bound to a specific host and port to show to the user */
exportServiceInterface(options: ExportServiceInterfaceParams): Promise<null>

View File

@@ -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 ImageMetadata = { workdir: string; user: string }
export type ImageMetadata = {
workdir: string
user: string
entrypoint: Array<string> | null
cmd: Array<string> | null
}

View File

@@ -79,6 +79,7 @@ describe("startosTypeValidation ", () => {
},
getSystemSmtp: {} as WithCallback<GetSystemSmtpParams>,
getContainerIp: undefined,
getOsIp: undefined,
getServicePortForward: {} as GetServicePortForwardParams,
clearServiceInterfaces: {} as ClearServiceInterfacesParams,
exportServiceInterface: {} as ExportServiceInterfaceParams,

View File

@@ -127,7 +127,11 @@ export type SmtpValue = {
password: string | null | undefined
}
export type CommandType = string | [string, ...string[]]
export class UseEntrypoint {
constructor(readonly overridCmd?: string[]) {}
}
export type CommandType = string | [string, ...string[]] | UseEntrypoint
export type DaemonReturned = {
wait(): Promise<unknown>

View File

@@ -17,6 +17,7 @@ export const getHostname = (url: string): Hostname | null => {
export type Filled = {
hostnames: HostnameInfo[]
publicHostnames: HostnameInfo[]
onionHostnames: HostnameInfo[]
localHostnames: HostnameInfo[]
ipHostnames: HostnameInfo[]
@@ -25,6 +26,7 @@ export type Filled = {
nonIpHostnames: HostnameInfo[]
urls: UrlString[]
publicUrls: UrlString[]
onionUrls: UrlString[]
localUrls: UrlString[]
ipUrls: UrlString[]
@@ -105,6 +107,9 @@ export const filledAddress = (
return {
...addressInfo,
hostnames,
get publicHostnames() {
return hostnames.filter((h) => h.kind === "onion" || h.public)
},
get onionHostnames() {
return hostnames.filter((h) => h.kind === "onion")
},
@@ -141,6 +146,9 @@ export const filledAddress = (
get urls() {
return this.hostnames.flatMap(toUrl)
},
get publicUrls() {
return this.publicHostnames.flatMap(toUrl)
},
get onionUrls() {
return this.onionHostnames.flatMap(toUrl)
},