refactor(config): centralize Mihomo YAML output

This commit is contained in:
Tunglies
2026-12-01 22:10:13 +08:00
parent 840de9c4d1
commit 5c05722f9a
14 changed files with 69 additions and 74 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
use crate::core::notify::NoticeStatus;
use crate::utils::dirs;
use crate::{
config::{Config, runtime::IRuntime},
config::{Config, mihomo_yaml, runtime::IRuntime},
constants,
core::{
CoreManager,
@@ -613,7 +613,7 @@ async fn collect_service_runtime_bundle(config_file: &Path) -> Result<RuntimeBun
let bin_path = service_core_path(&clash_core, bin_ext)?;
let plan = collect_runtime_bundle(config_file).await?;
Ok(RuntimeBundle {
yaml: plan.yaml,
yaml: mihomo_yaml::serialize(&plan.config).context("failed to serialize service runtime config")?,
assets: plan
.assets
.into_iter()