Merge branch 'next/minor' of github.com:Start9Labs/start-os into next/minor

This commit is contained in:
Aiden McClelland
2024-04-01 14:57:20 -06:00
105 changed files with 88 additions and 464 deletions

View File

@@ -51,7 +51,6 @@ pub fn display_action_result(params: WithIoFormat<ActionParams>, result: ActionR
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ActionParams {
#[arg(id = "id")]
#[serde(rename = "id")]

View File

@@ -183,7 +183,6 @@ pub fn check_password_against_db(db: &DatabaseModel, password: &str) -> Result<(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct LoginParams {
password: Option<PasswordType>,
#[serde(default)]
@@ -226,7 +225,6 @@ pub async fn login_impl(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct LogoutParams {
#[ts(type = "string")]
session: InternedString,
@@ -320,7 +318,6 @@ fn display_sessions(params: WithIoFormat<ListParams>, arg: SessionList) {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ListParams {
#[arg(skip)]
#[ts(skip)]
@@ -357,7 +354,6 @@ impl AsLogoutSessionId for KillSessionId {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct KillParams {
ids: Vec<String>,
}
@@ -371,7 +367,6 @@ pub async fn kill(ctx: RpcContext, KillParams { ids }: KillParams) -> Result<(),
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ResetPasswordParams {
old_password: Option<PasswordType>,
new_password: Option<PasswordType>,

View File

@@ -33,7 +33,6 @@ use crate::version::VersionT;
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct BackupParams {
target_id: BackupTargetId,
#[arg(long = "old-password")]

View File

@@ -28,7 +28,6 @@ use crate::util::serde::IoFormat;
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct RestorePackageParams {
pub ids: Vec<PackageId>,
pub target_id: BackupTargetId,

View File

@@ -71,7 +71,6 @@ pub fn cifs() -> ParentHandler {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct AddParams {
pub hostname: String,
pub path: PathBuf,
@@ -126,7 +125,6 @@ pub async fn add(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct UpdateParams {
pub id: BackupTargetId,
pub hostname: String,
@@ -191,7 +189,6 @@ pub async fn update(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct RemoveParams {
pub id: BackupTargetId,
}

View File

@@ -247,7 +247,6 @@ fn display_backup_info(params: WithIoFormat<InfoParams>, info: BackupInfo) {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct InfoParams {
target_id: BackupTargetId,
password: String,
@@ -282,7 +281,6 @@ lazy_static::lazy_static! {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct MountParams {
target_id: BackupTargetId,
password: String,
@@ -318,7 +316,6 @@ pub async fn mount(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct UmountParams {
target_id: Option<BackupTargetId>,
}

View File

@@ -129,7 +129,6 @@ pub enum MatchError {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ConfigParams {
pub id: PackageId,
}
@@ -160,7 +159,6 @@ pub async fn get(ctx: RpcContext, _: Empty, id: PackageId) -> Result<ConfigRes,
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export)]
pub struct SetParams {
#[arg(long = "timeout")]
pub timeout: Option<crate::util::serde::Duration>,

View File

@@ -13,7 +13,6 @@ use crate::Error;
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ControlParams {
pub id: PackageId,
}

View File

@@ -219,7 +219,6 @@ async fn cli_dump(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct DumpParams {
#[arg(long = "include-private", short = 'p')]
#[serde(default)]
@@ -277,7 +276,6 @@ async fn cli_apply(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ApplyParams {
expr: String,
path: Option<PathBuf>,
@@ -316,7 +314,6 @@ pub fn put() -> ParentHandler {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct UiParams {
#[ts(type = "string")]
pointer: JsonPointer,

View File

@@ -46,7 +46,6 @@ pub struct DepInfo {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ConfigureParams {
dependent_id: PackageId,
dependency_id: PackageId,

View File

@@ -44,7 +44,6 @@ pub fn error(ctx: DiagnosticContext) -> Result<Arc<RpcError>, Error> {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct LogsParams {
#[ts(type = "number | null")]
limit: Option<usize>,

View File

@@ -26,7 +26,6 @@ pub fn inspect() -> ParentHandler {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct HashParams {
path: PathBuf,
}
@@ -42,7 +41,6 @@ pub async fn hash(_: CliContext, HashParams { path }: HashParams) -> Result<Stri
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ManifestParams {
path: PathBuf,
#[arg(long = "no-verify")]
@@ -61,7 +59,6 @@ pub async fn manifest(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct InspectParams {
path: PathBuf,
#[arg(long = "no-verify")]
@@ -94,7 +91,6 @@ pub async fn icon(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct InstructionParams {
path: PathBuf,
#[arg(long = "no-verify")]

View File

@@ -106,7 +106,6 @@ impl std::fmt::Display for MinMax {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct InstallParams {
id: PackageId,
#[arg(short = 'm', long = "marketplace-url")]
@@ -397,7 +396,6 @@ pub async fn cli_install(ctx: CliContext, params: CliInstallParams) -> Result<()
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct UninstallParams {
id: PackageId,
}

View File

@@ -83,7 +83,6 @@ use crate::util::serde::HandlerExtSerde;
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct EchoParams {
message: String,
}

View File

@@ -353,7 +353,6 @@ pub async fn list(ctx: RpcContext) -> Result<Vec<InternedString>, Error> {
}
#[derive(Deserialize, Serialize, Parser, TS)]
#[ts(export)]
pub struct RemoveParams {
#[ts(type = "string")]
pub guid: InternedString,
@@ -367,7 +366,6 @@ pub async fn remove(ctx: RpcContext, RemoveParams { guid }: RemoveParams) -> Res
}
#[derive(Deserialize, Serialize, Parser, TS)]
#[ts(export)]
pub struct ConnectParams {
#[ts(type = "string")]
pub guid: InternedString,

View File

@@ -64,7 +64,6 @@ pub fn dhcp() -> ParentHandler {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct UpdateParams {
interface: String,
}

View File

@@ -108,7 +108,6 @@ pub fn tor() -> ParentHandler {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ResetParams {
#[arg(name = "wipe-state", short = 'w', long = "wipe-state")]
wipe_state: bool,
@@ -147,7 +146,6 @@ pub async fn list_services(ctx: RpcContext, _: Empty) -> Result<Vec<OnionAddress
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct LogsParams {
#[arg(short = 'l', long = "limit")]
#[ts(type = "number | null")]

View File

@@ -91,7 +91,6 @@ pub fn country() -> ParentHandler {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct AddParams {
ssid: String,
password: String,
@@ -143,7 +142,6 @@ pub async fn add(ctx: RpcContext, AddParams { ssid, password }: AddParams) -> Re
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct SsidParams {
ssid: String,
}
@@ -408,7 +406,6 @@ pub async fn get_available(ctx: RpcContext, _: Empty) -> Result<Vec<WifiListOut>
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct SetCountryParams {
#[arg(value_parser = CountryCodeParser)]
#[ts(type = "string")]

View File

@@ -52,7 +52,6 @@ pub fn notification() -> ParentHandler {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ListParams {
#[ts(type = "number | null")]
before: Option<u32>,
@@ -117,7 +116,6 @@ pub async fn list(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct DeleteParams {
#[ts(type = "number")]
id: u32,
@@ -134,7 +132,6 @@ pub async fn delete(ctx: RpcContext, DeleteParams { id }: DeleteParams) -> Resul
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct DeleteBeforeParams {
#[ts(type = "number")]
before: u32,
@@ -159,7 +156,6 @@ pub async fn delete_before(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct CreateParams {
package: Option<PackageId>,
level: NotificationLevel,

View File

@@ -116,7 +116,6 @@ async fn partition(disk: &mut DiskInfo, overwrite: bool) -> Result<OsPartitionIn
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ExecuteParams {
logicalname: PathBuf,
#[arg(short = 'o')]

View File

@@ -40,7 +40,6 @@ pub fn with_query_params(ctx: RpcContext, mut url: Url) -> Url {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct GetParams {
#[ts(type = "string")]
url: Url,

View File

@@ -69,7 +69,6 @@ fn inspect() -> ParentHandler<S9pkPath> {
}
#[derive(Deserialize, Serialize, Parser, TS)]
#[ts(export)]
struct AddImageParams {
id: ImageId,
image: String,
@@ -186,7 +185,6 @@ async fn add_image(
}
#[derive(Deserialize, Serialize, Parser, TS)]
#[ts(export)]
struct EditManifestParams {
expression: String,
}

View File

@@ -16,7 +16,6 @@ pub const SIG_CONTEXT: &[u8] = b"s9pk";
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct VerifyParams {
pub path: PathBuf,
}

View File

@@ -501,7 +501,6 @@ impl Actor for ServiceActor {
}
#[derive(Deserialize, Serialize, Parser, TS)]
#[ts(export)]
pub struct ConnectParams {
pub id: PackageId,
}

View File

@@ -102,7 +102,6 @@ async fn setup_init(
#[derive(Deserialize, Serialize, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export)]
pub struct AttachParams {
#[serde(rename = "startOsPassword")]
password: Option<EncryptedWire>,
@@ -214,7 +213,6 @@ pub fn cifs() -> ParentHandler {
#[derive(Deserialize, Serialize, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export)]
pub struct VerifyCifsParams {
hostname: String,
path: PathBuf,
@@ -258,7 +256,6 @@ pub enum RecoverySource {
#[derive(Deserialize, Serialize, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export)]
pub struct ExecuteParams {
start_os_logicalname: PathBuf,
start_os_password: EncryptedWire,

View File

@@ -107,7 +107,6 @@ pub fn ssh() -> ParentHandler {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct AddParams {
key: SshPubKey,
}
@@ -141,7 +140,6 @@ pub async fn add(ctx: RpcContext, AddParams { key }: AddParams) -> Result<SshKey
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct DeleteParams {
#[ts(type = "string")]
fingerprint: InternedString,

View File

@@ -77,7 +77,6 @@ pub async fn enable_zram() -> Result<(), Error> {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ZramParams {
enable: bool,
}
@@ -140,7 +139,6 @@ fn display_governor_info(params: WithIoFormat<GovernorParams>, result: GovernorI
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct GovernorParams {
set: Option<Governor>,
}
@@ -235,7 +233,6 @@ pub async fn time(ctx: RpcContext, _: Empty) -> Result<TimeInfo, Error> {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct LogsParams {
#[arg(short = 'l', long = "limit")]
#[ts(type = "number | null")]
@@ -321,7 +318,6 @@ pub async fn logs_follow(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct KernelLogsParams {
#[arg(short = 'l', long = "limit")]
#[ts(type = "number | null")]

View File

@@ -38,7 +38,6 @@ lazy_static! {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct UpdateSystemParams {
#[ts(type = "string")]
marketplace_url: Url,