search and ai stabilization work, localization stablized.
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Text;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using static StellaOps.Localization.T;
|
||||
|
||||
namespace StellaOps.Evidence.Serialization;
|
||||
|
||||
@@ -35,7 +36,7 @@ public static class EvidenceIndexSerializer
|
||||
public static EvidenceIndex Deserialize(string json)
|
||||
{
|
||||
return JsonSerializer.Deserialize<EvidenceIndex>(json, _jsonOptions)
|
||||
?? throw new InvalidOperationException("Failed to deserialize evidence index");
|
||||
?? throw new InvalidOperationException(_t("common.evidence.deserialization_failed"));
|
||||
}
|
||||
|
||||
public static string ComputeDigest(EvidenceIndex index)
|
||||
|
||||
@@ -2,6 +2,7 @@ using StellaOps.Evidence.Models;
|
||||
using StellaOps.Evidence.Serialization;
|
||||
using System.Collections.Immutable;
|
||||
using System.Globalization;
|
||||
using static StellaOps.Localization.T;
|
||||
|
||||
namespace StellaOps.Evidence.Services;
|
||||
|
||||
@@ -18,7 +19,7 @@ public sealed partial class EvidenceLinker
|
||||
|
||||
lock (_lock)
|
||||
{
|
||||
toolChain = _toolChain ?? throw new InvalidOperationException("ToolChain must be set before building index");
|
||||
toolChain = _toolChain ?? throw new InvalidOperationException(_t("common.evidence.toolchain_required"));
|
||||
sboms = _sboms.ToImmutableArray();
|
||||
attestations = _attestations.ToImmutableArray();
|
||||
vexDocuments = _vexDocuments.ToImmutableArray();
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\StellaOps.Canonical.Json\StellaOps.Canonical.Json.csproj" />
|
||||
<ProjectReference Include="..\StellaOps.Determinism.Abstractions\StellaOps.Determinism.Abstractions.csproj" />
|
||||
<ProjectReference Include="..\StellaOps.Localization\StellaOps.Localization.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
using System.Reflection;
|
||||
using static StellaOps.Localization.T;
|
||||
|
||||
namespace StellaOps.Evidence.Validation;
|
||||
|
||||
@@ -13,13 +14,13 @@ internal static class SchemaLoader
|
||||
|
||||
if (resourceName is null)
|
||||
{
|
||||
throw new InvalidOperationException($"Schema resource not found: {fileName}");
|
||||
throw new InvalidOperationException(_t("common.evidence.schema_resource_not_found", fileName));
|
||||
}
|
||||
|
||||
using var stream = assembly.GetManifestResourceStream(resourceName);
|
||||
if (stream is null)
|
||||
{
|
||||
throw new InvalidOperationException($"Schema resource not available: {resourceName}");
|
||||
throw new InvalidOperationException(_t("common.evidence.schema_resource_not_available", resourceName));
|
||||
}
|
||||
|
||||
using var reader = new StreamReader(stream);
|
||||
|
||||
Reference in New Issue
Block a user