nuget reorganization

This commit is contained in:
master
2025-11-18 23:45:25 +02:00
parent 77cee6a209
commit d3ecd7f8e6
7712 changed files with 13963 additions and 10007504 deletions

View File

@@ -0,0 +1,40 @@
using System;
using System.IO;
using Microsoft.Extensions.Options;
using StellaOps.Scanner.Surface.Env;
using StellaOps.Scanner.Surface.FS;
namespace StellaOps.Scanner.WebService.Options;
/// <summary>
/// Aligns surface manifest store options with environment-derived cache settings.
/// </summary>
public sealed class SurfaceManifestStoreOptionsConfigurator : IConfigureOptions<SurfaceManifestStoreOptions>
{
private readonly ISurfaceEnvironment _surfaceEnvironment;
private readonly IOptions<SurfaceCacheOptions> _cacheOptions;
public SurfaceManifestStoreOptionsConfigurator(
ISurfaceEnvironment surfaceEnvironment,
IOptions<SurfaceCacheOptions> cacheOptions)
{
_surfaceEnvironment = surfaceEnvironment ?? throw new ArgumentNullException(nameof(surfaceEnvironment));
_cacheOptions = cacheOptions ?? throw new ArgumentNullException(nameof(cacheOptions));
}
public void Configure(SurfaceManifestStoreOptions options)
{
ArgumentNullException.ThrowIfNull(options);
var settings = _surfaceEnvironment.Settings;
options.Bucket = settings.SurfaceFsBucket;
options.Scheme = settings.SurfaceFsEndpoint.Scheme;
if (string.IsNullOrWhiteSpace(options.RootDirectory))
{
options.RootDirectory = Path.Combine(
_cacheOptions.Value.ResolveRoot(),
"manifests");
}
}
}