feat: complete hosted mod sync and launcher interface updates
Axolotl desktop CI / guardrails (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled
Axolotl desktop CI / guardrails (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled
Add pack sync markers, tagged mod updates, parallel progress, JWT downloads and retry recovery. Include pending onboarding, about scene, compatibility data pack and download fixes.
This commit is contained in:
1 parent
5d473ebfbc
commit
bc904065c3
63 files changed
+3516
-1059
No files matched your search
@@ -34,6 +34,7 @@ pub async fn plan_instance_upgrade(
|
||||
instance_id: &str,
|
||||
target_environment: crate::state::InstanceUpgradeEnvironment,
|
||||
) -> crate::Result<InstanceUpgradePlan> {
|
||||
ensure_local_version_management(instance_id).await?;
|
||||
let state = State::get().await?;
|
||||
let creation_watch =
|
||||
state.file_watcher.content_watch_snapshot(instance_id).await;
|
||||
@@ -380,6 +381,7 @@ pub async fn execute_instance_upgrade(
|
||||
let state = State::get().await?;
|
||||
let handle = stored_plan_handle(plan_id)?;
|
||||
let mut stored = handle.lock().await;
|
||||
ensure_local_version_management(&stored.plan.instance_id).await?;
|
||||
if stored.execution_started {
|
||||
return Err(crate::ErrorKind::InputError(
|
||||
"Upgrade plan execution has already started".to_string(),
|
||||
@@ -638,10 +640,22 @@ fn stored_plan_handle(plan_id: &str) -> crate::Result<StoredUpgradePlan> {
|
||||
})
|
||||
}
|
||||
|
||||
async fn ensure_local_version_management(
|
||||
instance_id: &str,
|
||||
) -> crate::Result<()> {
|
||||
if crate::pack::hosted::instance_mode(instance_id).await?
|
||||
== crate::state::InstanceMode::StarLight
|
||||
{
|
||||
return Err(crate::ErrorKind::InputError("StarLight 实例的游戏版本和加载器由服务器整合包管理,不能手动选择版本".into()).as_error());
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn ensure_current_revision(
|
||||
stored: &mut StoredUpgradePlanState,
|
||||
state: &State,
|
||||
) -> crate::Result<crate::state::instances::commands::ReadOnlyUpgradeSource> {
|
||||
ensure_local_version_management(&stored.plan.instance_id).await?;
|
||||
let current_revision = content_rows::get_applied_content_set(
|
||||
&stored.plan.instance_id,
|
||||
&state.pool,
|
||||
|
||||
Reference in new issue
Block a user