mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 02:11:56 +00:00
remove tls for smtp and add method for getting primary URL
This commit is contained in:
@@ -41,12 +41,6 @@ export const customSmtp = Config.of<ConfigSpecOf<SmtpValue>, never, never>({
|
||||
required: false,
|
||||
masked: true,
|
||||
}),
|
||||
tls: Value.toggle({
|
||||
name: "Require Transport Security",
|
||||
default: true,
|
||||
description:
|
||||
"Require TLS transport security. If disabled, email will use plaintext by default and TLS via STARTTLS <strong>if the SMTP server supports it</strong>. If enabled, email will refuse to connect unless the server supports STARTTLS.",
|
||||
}),
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||
@@ -143,7 +143,6 @@ export type SmtpValue = {
|
||||
from: string
|
||||
login: string
|
||||
password: string | null | undefined
|
||||
tls: boolean
|
||||
}
|
||||
|
||||
export type CommandType<A extends string> =
|
||||
@@ -194,7 +193,7 @@ export type NetworkInterface = {
|
||||
/** Defaults to false, but describes if this address can be opened in a browser as an
|
||||
* ui interface
|
||||
*/
|
||||
ui?: boolean
|
||||
ui: boolean
|
||||
}
|
||||
|
||||
/** Used to reach out from the pure js runtime */
|
||||
|
||||
@@ -22,6 +22,7 @@ export type Filled = {
|
||||
ipv6Urls: UrlString[]
|
||||
nonIpUrls: UrlString[]
|
||||
allUrls: UrlString[]
|
||||
primaryUrl: UrlString
|
||||
}
|
||||
export type FilledAddress = Address & Filled
|
||||
export type NetworkInterfaceFilled = {
|
||||
@@ -30,12 +31,16 @@ export type NetworkInterfaceFilled = {
|
||||
name: string
|
||||
/** Human readable description, used as tooltip usually */
|
||||
description: string
|
||||
/** Whether or not the interface has a primary URL */
|
||||
hasPrimary: boolean
|
||||
/** Whether or not the interface disabled */
|
||||
disabled: boolean
|
||||
/** All URIs */
|
||||
addresses: FilledAddress[]
|
||||
/** Defaults to false, but describes if this address can be opened in a browser as an
|
||||
* ui interface
|
||||
*/
|
||||
ui?: boolean
|
||||
ui: boolean
|
||||
} & Filled
|
||||
const either =
|
||||
<A>(...args: ((a: A) => boolean)[]) =>
|
||||
@@ -113,6 +118,9 @@ export const filledAddress = (
|
||||
get allUrls() {
|
||||
return hostnames.map(toUrl)
|
||||
},
|
||||
get primaryUrl() {
|
||||
return this.allUrls[0] // @TODO this is a placeholder
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,6 +179,9 @@ export const networkInterfaceFilled = (
|
||||
get allUrls() {
|
||||
return unique(addresses.flatMap((x) => x.allUrls))
|
||||
},
|
||||
get primaryUrl() {
|
||||
return this.allUrls[0] // @TODO this is a placeholder
|
||||
},
|
||||
}
|
||||
}
|
||||
const makeInterfaceFilled = async ({
|
||||
|
||||
Reference in New Issue
Block a user