mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 07:05:24 +00:00
feat: tailscale add host and copy ip, fix outbound fetch hang and plugin ESM warning
This commit is contained in:
1 parent
c21bca8cf0
commit
fbe736bc20
70 files changed
+1117
-1139
No files matched your search
@@ -271,6 +271,10 @@ export interface PluginHostSettingsContribution {
|
||||
enableLabelKey?: string;
|
||||
/** What the enable switch reads before a host saves it. Off by default. */
|
||||
enableDefault?: boolean;
|
||||
/** Host editor strip the generated tab sits in. Defaults to "top". */
|
||||
editorGroup?: "top" | "ssh";
|
||||
/** Position among that strip's tabs, core ones included. */
|
||||
editorOrder?: number;
|
||||
fields: PluginSettingsField[];
|
||||
}
|
||||
|
||||
@@ -1086,7 +1090,14 @@ function validateSettings(settings: unknown, errors: string[]): void {
|
||||
}
|
||||
rejectUnknown(
|
||||
host,
|
||||
["enableKey", "enableLabelKey", "enableDefault", "fields"],
|
||||
[
|
||||
"enableKey",
|
||||
"enableLabelKey",
|
||||
"enableDefault",
|
||||
"editorGroup",
|
||||
"editorOrder",
|
||||
"fields",
|
||||
],
|
||||
`"${at}"`,
|
||||
errors,
|
||||
);
|
||||
@@ -1104,6 +1115,20 @@ function validateSettings(settings: unknown, errors: string[]): void {
|
||||
if ("enableDefault" in host && typeof host.enableDefault !== "boolean") {
|
||||
errors.push(`${at}.enableDefault must be a boolean`);
|
||||
}
|
||||
if (
|
||||
"editorGroup" in host &&
|
||||
host.editorGroup !== "top" &&
|
||||
host.editorGroup !== "ssh"
|
||||
) {
|
||||
errors.push(`${at}.editorGroup must be "top" or "ssh"`);
|
||||
}
|
||||
if (
|
||||
"editorOrder" in host &&
|
||||
(typeof host.editorOrder !== "number" ||
|
||||
!Number.isFinite(host.editorOrder))
|
||||
) {
|
||||
errors.push(`${at}.editorOrder must be a number`);
|
||||
}
|
||||
|
||||
if (!Array.isArray(host.fields)) {
|
||||
errors.push(`${at}.fields must be an array`);
|
||||
|
||||
Reference in new issue
Block a user