refactor(launcher): reorganize into responsibility folders

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
lincube
2026-05-28 10:43:30 +08:00
parent 1ee6e68f33
commit b219f109ec
57 changed files with 92 additions and 197 deletions

View File

@@ -1,5 +1,5 @@
using LanMountainDesktop.Launcher.Services;
using LanMountainDesktop.Launcher.Services.AirApp;
using LanMountainDesktop.Launcher.AirApp;
using LanMountainDesktop.Launcher.Infrastructure;
using Xunit;
namespace LanMountainDesktop.Tests;

View File

@@ -69,7 +69,7 @@ public sealed class CornerRadiusStyleTests
ThemeVariant: "Dark"));
var context = new PluginDesktopComponentContext(
new PluginManifest("plugin.id", "Plugin Name", "plugin.dll"),
new LanMountainDesktop.PluginSdk.PluginManifest("plugin.id", "Plugin Name", "plugin.dll"),
"C:\\Plugins\\plugin.id",
"C:\\Data\\plugin.id",
new NullServiceProvider(),

View File

@@ -1,7 +1,7 @@
using System.Diagnostics;
using LanMountainDesktop.ComponentSystem;
using LanMountainDesktop.Launcher;
using LanMountainDesktop.Launcher.Services.AirApp;
using LanMountainDesktop.Launcher.AirApp;
using LanMountainDesktop.Shared.IPC.Abstractions.Services;
using Xunit;

View File

@@ -0,0 +1,6 @@
global using LanMountainDesktop.Launcher.AirApp;
global using LanMountainDesktop.Launcher.Deployment;
global using LanMountainDesktop.Launcher.Infrastructure;
global using LanMountainDesktop.Launcher.Ipc;
global using LanMountainDesktop.Launcher.Oobe;
global using LanMountainDesktop.Launcher.Update;

View File

@@ -1,4 +1,4 @@
using LanMountainDesktop.Launcher.Services;
using LanMountainDesktop.Launcher.Plugins;
using System.IO.Compression;
using Xunit;

View File

@@ -18,7 +18,7 @@ public sealed class PluginManifestRuntimeTests
""";
using var stream = new MemoryStream(Encoding.UTF8.GetBytes(json));
var manifest = PluginManifest.Load(stream, "plugin.json");
var manifest = LanMountainDesktop.PluginSdk.PluginManifest.Load(stream, "plugin.json");
Assert.NotNull(manifest.Runtime);
Assert.Equal(PluginRuntimeModes.InProcess, manifest.Runtime!.Mode);
@@ -40,7 +40,7 @@ public sealed class PluginManifestRuntimeTests
""";
using var stream = new MemoryStream(Encoding.UTF8.GetBytes(json));
var ex = Assert.Throws<InvalidOperationException>(() => PluginManifest.Load(stream, "plugin.json"));
var ex = Assert.Throws<InvalidOperationException>(() => LanMountainDesktop.PluginSdk.PluginManifest.Load(stream, "plugin.json"));
Assert.Contains("runtime.mode", ex.Message);
Assert.Contains("shared-worker", ex.Message);