Feature/consolidate setup (#3092)

* start consolidating

* add start-cli flash-os

* combine install and setup and refactor all

* use http

* undo mock

* fix translation

* translations

* use dialogservice wrapper

* better ST messaging on setup

* only warn on update if breakages (#3097)

* finish setup wizard and ui language-keyboard feature

* fix typo

* wip: localization

* remove start-tunnel readme

* switch to posix strings for language internal

* revert mock

* translate backend strings

* fix missing about text

* help text for args

* feat: add "Add new gateway" option (#3098)

* feat: add "Add new gateway" option

* Update web/projects/ui/src/app/routes/portal/components/form/controls/select.component.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add translation

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Matt Hill <mattnine@protonmail.com>

* fix dns selection

* keyboard keymap also

* ability to shutdown after install

* revert mock

* working setup flow + manifest localization

* (mostly) redundant localization on frontend

* version bump

* omit live medium from disk list and better space management

* ignore missing package archive on 035 migration

* fix device migration

* add i18n helper to sdk

* fix install over 0.3.5.1

* fix grub config

---------

Co-authored-by: Matt Hill <mattnine@protonmail.com>
Co-authored-by: Matt Hill <MattDHill@users.noreply.github.com>
Co-authored-by: Alex Inkin <alexander@inkin.ru>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Aiden McClelland
2026-01-27 14:44:41 -08:00
committed by GitHub
parent 99871805bd
commit c65db31fd9
251 changed files with 12163 additions and 3966 deletions

View File

@@ -1,6 +1,7 @@
use std::collections::BTreeSet;
use rpc_toolkit::{Context, HandlerExt, ParentHandler, from_fn_async};
use rust_i18n::t;
use crate::action::{ActionInput, ActionResult, display_action_result};
use crate::db::model::package::{
@@ -80,7 +81,7 @@ pub async fn export_action(
#[ts(export)]
#[serde(rename_all = "camelCase")]
pub struct ClearActionsParams {
#[arg(long)]
#[arg(long, help = "help.arg.except-actions")]
pub except: Vec<ActionId>,
}
@@ -117,7 +118,9 @@ pub struct GetActionInputParams {
#[arg(skip)]
procedure_id: Guid,
#[ts(optional)]
#[arg(help = "help.arg.package-id")]
package_id: Option<PackageId>,
#[arg(help = "help.arg.action-id")]
action_id: ActionId,
}
async fn get_action_input(
@@ -155,9 +158,12 @@ pub struct RunActionParams {
#[arg(skip)]
procedure_id: Guid,
#[ts(optional)]
#[arg(help = "help.arg.package-id")]
package_id: Option<PackageId>,
#[arg(help = "help.arg.action-id")]
action_id: ActionId,
#[ts(type = "any")]
#[arg(help = "help.arg.action-input")]
input: Value,
}
async fn run_action(
@@ -175,7 +181,7 @@ async fn run_action(
if package_id != &context.seed.id {
return Err(Error::new(
eyre!("calling actions on other packages is unsupported at this time"),
eyre!("{}", t!("service.effects.action.calling-actions-on-other-packages-unsupported")),
ErrorKind::InvalidRequest,
));
context
@@ -220,7 +226,7 @@ async fn create_task(
TaskCondition::InputNotMatches => {
let Some(input) = task.input.as_ref() else {
return Err(Error::new(
eyre!("input-not-matches trigger requires input to be specified"),
eyre!("{}", t!("service.effects.action.input-not-matches-requires-input")),
ErrorKind::InvalidRequest,
));
};
@@ -238,9 +244,7 @@ async fn create_task(
else {
return Err(Error::new(
eyre!(
"action {} of {} has no input",
task.action_id,
task.package_id
"{}", t!("service.effects.action.action-has-no-input", action_id = task.action_id, package_id = task.package_id)
),
ErrorKind::InvalidRequest,
));
@@ -286,9 +290,9 @@ async fn create_task(
#[ts(type = "{ only: string[] } | { except: string[] }")]
#[ts(export)]
pub struct ClearTasksParams {
#[arg(long, conflicts_with = "except")]
#[arg(long, conflicts_with = "except", help = "help.arg.only-tasks")]
pub only: Option<Vec<ReplayId>>,
#[arg(long, conflicts_with = "only")]
#[arg(long, conflicts_with = "only", help = "help.arg.except-tasks")]
pub except: Option<Vec<ReplayId>>,
}

View File

@@ -319,9 +319,9 @@ impl CallbackHandlers {
#[ts(type = "{ only: number[] } | { except: number[] }")]
#[ts(export)]
pub struct ClearCallbacksParams {
#[arg(long, conflicts_with = "except")]
#[arg(long, conflicts_with = "except", help = "help.arg.only-callbacks")]
pub only: Option<Vec<CallbackId>>,
#[arg(long, conflicts_with = "only")]
#[arg(long, conflicts_with = "only", help = "help.arg.except-callbacks")]
pub except: Option<Vec<CallbackId>>,
}

View File

@@ -4,7 +4,7 @@ use std::str::FromStr;
use clap::builder::ValueParserFactory;
use exver::VersionRange;
use imbl_value::InternedString;
use rust_i18n::t;
use crate::db::model::package::{
CurrentDependencies, CurrentDependencyInfo, CurrentDependencyKind, ManifestPreference,
@@ -148,13 +148,25 @@ impl FromStr for DependencyRequirement {
.map(|id| id.parse().map_err(Error::from))
.collect(),
Some((kind, _)) => Err(Error::new(
eyre!("unknown dependency kind {kind}"),
eyre!(
"{}",
t!(
"service.effects.dependency.unknown-dependency-kind",
kind = kind
)
),
ErrorKind::InvalidRequest,
)),
None => match rest {
"r" | "running" => Ok(BTreeSet::new()),
kind => Err(Error::new(
eyre!("unknown dependency kind {kind}"),
eyre!(
"{}",
t!(
"service.effects.dependency.unknown-dependency-kind",
kind = kind
)
),
ErrorKind::InvalidRequest,
)),
},
@@ -293,8 +305,7 @@ pub struct CheckDependenciesParam {
#[ts(export)]
pub struct CheckDependenciesResult {
package_id: PackageId,
#[ts(type = "string | null")]
title: Option<InternedString>,
title: Option<String>,
installed_version: Option<VersionString>,
satisfies: BTreeSet<VersionString>,
is_running: bool,
@@ -334,7 +345,7 @@ pub async fn check_dependencies(
.collect();
results.push(CheckDependenciesResult {
package_id,
title,
title: title.map(|t| t.localized()),
installed_version: None,
satisfies: BTreeSet::new(),
is_running: false,
@@ -360,7 +371,7 @@ pub async fn check_dependencies(
.collect();
results.push(CheckDependenciesResult {
package_id,
title,
title: title.map(|t| t.localized()),
installed_version,
satisfies,
is_running,

View File

@@ -11,6 +11,6 @@ pub(super) use crate::service::effects::context::EffectContext;
#[ts(export)]
pub struct EventId {
#[serde(default)]
#[arg(default_value_t, long)]
#[arg(default_value_t, long, help = "help.arg.event-id")]
pub event_id: Guid,
}

View File

@@ -107,22 +107,23 @@ fn open_file_read(path: impl AsRef<Path>) -> Result<File, Error> {
#[derive(Debug, Clone, Serialize, Deserialize, Parser)]
pub struct ExecParams {
#[arg(long)]
#[arg(long, help = "help.arg.force-tty")]
force_tty: bool,
#[arg(long)]
#[arg(long, help = "help.arg.force-stderr-tty")]
force_stderr_tty: bool,
#[arg(long)]
#[arg(long, help = "help.arg.pty-size")]
pty_size: Option<TermSize>,
#[arg(short, long)]
#[arg(short, long, help = "help.arg.env-variable")]
env: Vec<String>,
#[arg(long)]
#[arg(long, help = "help.arg.env-file-path")]
env_file: Option<PathBuf>,
#[arg(short, long)]
#[arg(short, long, help = "help.arg.workdir-path")]
workdir: Option<PathBuf>,
#[arg(short, long)]
#[arg(short, long, help = "help.arg.user-name")]
user: Option<String>,
#[arg(help = "help.arg.chroot-path")]
chroot: PathBuf,
#[arg(trailing_var_arg = true)]
#[arg(trailing_var_arg = true, help = "help.arg.command-to-execute")]
command: Vec<OsString>,
}
impl ExecParams {