feat: WinPE pre-config collector + simplified first-boot toolbox (SP1) #21
@@ -39,7 +39,6 @@ public static class MauiProgram
|
|||||||
var appsDir = Path.Combine(AppContext.BaseDirectory, "apps");
|
var appsDir = Path.Combine(AppContext.BaseDirectory, "apps");
|
||||||
builder.Services.AddSingleton<IAppInstaller>(sp => new AppInstaller(sp.GetRequiredService<IProcessRunner>(), appsDir));
|
builder.Services.AddSingleton<IAppInstaller>(sp => new AppInstaller(sp.GetRequiredService<IProcessRunner>(), appsDir));
|
||||||
builder.Services.AddSingleton<IApplyService>(sp => new ApplyService(
|
builder.Services.AddSingleton<IApplyService>(sp => new ApplyService(
|
||||||
sp.GetRequiredService<IProcessRunner>(),
|
|
||||||
sp.GetRequiredService<IBitLockerService>(),
|
sp.GetRequiredService<IBitLockerService>(),
|
||||||
sp.GetRequiredService<IAppInstaller>()));
|
sp.GetRequiredService<IAppInstaller>()));
|
||||||
builder.Services.AddScoped<WizardState>();
|
builder.Services.AddScoped<WizardState>();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ namespace SilverOS.Welcome.Core.Apply;
|
|||||||
// Toolbox Apply pipeline: apps -> bitlocker -> done.
|
// Toolbox Apply pipeline: apps -> bitlocker -> done.
|
||||||
// Account creation moved to Windows Setup (WinPE collector); OS hardening runs from
|
// Account creation moved to Windows Setup (WinPE collector); OS hardening runs from
|
||||||
// SetupComplete; sm-bootstrap teardown is owned by Setup, not the toolbox.
|
// SetupComplete; sm-bootstrap teardown is owned by Setup, not the toolbox.
|
||||||
public sealed class ApplyService(IProcessRunner runner, IBitLockerService bitlocker, IAppInstaller installer) : IApplyService
|
public sealed class ApplyService(IBitLockerService bitlocker, IAppInstaller installer) : IApplyService
|
||||||
{
|
{
|
||||||
public async Task RunAsync(ApplyRequest req, IProgress<ApplyProgress> progress, CancellationToken ct = default)
|
public async Task RunAsync(ApplyRequest req, IProgress<ApplyProgress> progress, CancellationToken ct = default)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class ApplyServiceTests
|
|||||||
It.IsAny<IProgress<ApplyProgress>>(), It.IsAny<CancellationToken>()))
|
It.IsAny<IProgress<ApplyProgress>>(), It.IsAny<CancellationToken>()))
|
||||||
.Callback(() => order.Add("apps")).ReturnsAsync(Array.Empty<AppInstallResult>());
|
.Callback(() => order.Add("apps")).ReturnsAsync(Array.Empty<AppInstallResult>());
|
||||||
|
|
||||||
var sut = new ApplyService(run.Object, bl.Object, installer.Object);
|
var sut = new ApplyService(bl.Object, installer.Object);
|
||||||
var req = new ApplyRequest(Flavour(), "123456", System.Array.Empty<AppCatalogEntry>());
|
var req = new ApplyRequest(Flavour(), "123456", System.Array.Empty<AppCatalogEntry>());
|
||||||
var progress = new List<string>();
|
var progress = new List<string>();
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ public class ApplyServiceTests
|
|||||||
It.IsAny<IProgress<ApplyProgress>>(), It.IsAny<CancellationToken>()))
|
It.IsAny<IProgress<ApplyProgress>>(), It.IsAny<CancellationToken>()))
|
||||||
.Callback(() => order.Add("apps")).ReturnsAsync(Array.Empty<AppInstallResult>());
|
.Callback(() => order.Add("apps")).ReturnsAsync(Array.Empty<AppInstallResult>());
|
||||||
|
|
||||||
var sut = new ApplyService(run.Object, bl.Object, installer.Object);
|
var sut = new ApplyService(bl.Object, installer.Object);
|
||||||
var req = new ApplyRequest(Flavour(), "", System.Array.Empty<AppCatalogEntry>());
|
var req = new ApplyRequest(Flavour(), "", System.Array.Empty<AppCatalogEntry>());
|
||||||
|
|
||||||
await sut.RunAsync(req, new Progress<ApplyProgress>(_ => { }));
|
await sut.RunAsync(req, new Progress<ApplyProgress>(_ => { }));
|
||||||
@@ -78,7 +78,7 @@ public class ApplyServiceTests
|
|||||||
var installer = NoApps();
|
var installer = NoApps();
|
||||||
var apps = new[] { new AppCatalogEntry { Id = "firefox", Name = "Firefox" } };
|
var apps = new[] { new AppCatalogEntry { Id = "firefox", Name = "Firefox" } };
|
||||||
|
|
||||||
var sut = new ApplyService(run.Object, bl.Object, installer.Object);
|
var sut = new ApplyService(bl.Object, installer.Object);
|
||||||
var req = new ApplyRequest(Flavour(), "123456", apps);
|
var req = new ApplyRequest(Flavour(), "123456", apps);
|
||||||
|
|
||||||
await sut.RunAsync(req, new Progress<ApplyProgress>(_ => { }));
|
await sut.RunAsync(req, new Progress<ApplyProgress>(_ => { }));
|
||||||
|
|||||||
Reference in New Issue
Block a user