Renames project paths from Lumina to Nemera

This commit is contained in:
BinaryAlley committed 2026-11-27 15:34:43 +02:00
1 parent ce6fddb4c9
commit 0f659a4877
6450 files changed

No files matched your search

@@ -0,0 +1,22 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Infrastructure.Common.Models.DTO.Configuration;
/// <summary>
/// Data transfer object for deserializing cross-origin resource sharing settings.
/// </summary>
[DebuggerDisplay("{SECTION_NAME}")]
public class CorsSettingsDto
{
/// <summary>
/// The name of the configuration section that holds the cross-origin resource sharing settings.
/// </summary>
public const string SECTION_NAME = "CorsSettings";
/// <summary>
/// The allowed hosts in regards to cross-origin resource sharing rules.
/// </summary>
public required string[] AllowedOrigins { get; init; }
}
@@ -0,0 +1,22 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Infrastructure.Common.Models.DTO.Configuration;
/// <summary>
/// Data transfer object for deserializing database configuration settings.
/// </summary>
[DebuggerDisplay("{SECTION_NAME}")]
public class DatabaseSettingsDto
{
/// <summary>
/// The name of the configuration section that holds the database connection strings.
/// </summary>
public const string SECTION_NAME = "ConnectionStrings";
/// <summary>
/// Gets or sets the connection string to the database.
/// </summary>
public required string DefaultConnection { get; init; }
}
@@ -0,0 +1,22 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Infrastructure.Common.Models.DTO.Configuration;
/// <summary>
/// Data transfer object for deserializing encryption settings.
/// </summary>
[DebuggerDisplay("{SECTION_NAME}")]
public class EncryptionSettingsDto
{
/// <summary>
/// The name of the configuration section that holds the encryption settings.
/// </summary>
public const string SECTION_NAME = "EncryptionSettings";
/// <summary>
/// Gets or sets the Base64 encoded secret key used to encrypt and decrypt protected data.
/// </summary>
public required string SecretKey { get; init; }
}
@@ -0,0 +1,37 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Infrastructure.Common.Models.DTO.Configuration;
/// <summary>
/// Data transfer object for deserializing JSON Web Token settings.
/// </summary>
[DebuggerDisplay("{SECTION_NAME}")]
public class JwtSettingsDto
{
/// <summary>
/// The name of the configuration section that holds the JSON Web Token settings.
/// </summary>
public const string SECTION_NAME = "JwtSettings";
/// <summary>
/// The secret key used to sign the JWT. This should be a strong, securely stored key.
/// </summary>
public required string SecretKey { get; init; }
/// <summary>
/// The duration (in minutes) for which the JWT is valid.
/// </summary>
public required int ExpiryMinutes { get; init; }
/// <summary>
/// The issuer of the JWT, typically the application or service generating the token.
/// </summary>
public required string Issuer { get; init; }
/// <summary>
/// The intended audience for the JWT, usually representing the clients that can consume the token.
/// </summary>
public required string Audience { get; init; }
}
@@ -0,0 +1,52 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Infrastructure.Common.Models.DTO.Configuration;
/// <summary>
/// Data transfer object for deserializing theme engine settings.
/// </summary>
[DebuggerDisplay("Section name: {SECTION_NAME}")]
public sealed class ThemeEngineOptionsDto
{
/// <summary>
/// The name of the configuration section that holds the theme engine settings.
/// </summary>
public const string SECTION_NAME = "ThemeEngine";
/// <summary>
/// Gets or sets the directory where installed theme packs are stored, relative to the API base directory when not rooted.
/// </summary>
public string StoragePath { get; set; } = "themes";
/// <summary>
/// Gets or sets the directory where the theme pack archives shipped with the application are located, relative to the API base directory when not rooted.
/// </summary>
public string BundledThemesPath { get; set; } = "themes/bundled";
/// <summary>
/// Gets or sets the identifier of the theme selected when no valid current theme is persisted.
/// </summary>
public string DefaultThemeId { get; set; } = "lumina-default";
/// <summary>
/// Gets or sets the maximum allowed size of an uploaded theme archive, in bytes.
/// </summary>
public long MaxArchiveBytes { get; set; } = 8 * 1024 * 1024;
/// <summary>
/// Gets or sets the maximum allowed total size of an extracted theme pack, in bytes.
/// </summary>
public long MaxExpandedBytes { get; set; } = 24 * 1024 * 1024;
/// <summary>
/// Gets or sets the maximum allowed size of a single file within a theme pack, in bytes.
/// </summary>
public long MaxSingleFileBytes { get; set; } = 6 * 1024 * 1024;
/// <summary>
/// Gets or sets the maximum allowed number of entries in a theme pack archive.
/// </summary>
public int MaxEntries { get; set; } = 250;
}
@@ -0,0 +1,54 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Infrastructure.Common.Models.DTO.Configuration;
/// <summary>
/// Data transfer object for deserializing the settings of the audio normalization pipeline.
/// </summary>
[DebuggerDisplay("Section name: {SECTION_NAME}")]
public sealed class TranscodingSettingsDto
{
/// <summary>
/// The name of the configuration section that holds the settings of the audio normalization pipeline.
/// </summary>
public const string SECTION_NAME = "TranscodingSettings";
/// <summary>
/// Gets or sets the file name or path of the ffmpeg binary, relative to the process search path when not rooted.
/// </summary>
public string FfmpegPath { get; set; } = "ffmpeg";
/// <summary>
/// Gets or sets the maximum number of normalization jobs that may run at the same time.
/// </summary>
public int MaxConcurrentJobs { get; set; } = 2;
/// <summary>
/// Gets or sets the maximum number of normalization jobs a single user may have running at the same time. A production that was
/// started by another user can still be waited for, because it is shared by every request for the same track and delivery.
/// </summary>
public int MaxConcurrentJobsPerUser { get; set; } = 1;
/// <summary>
/// Gets or sets the maximum total size of the normalized audio cache, in bytes.
/// </summary>
public long MaxCacheBytes { get; set; } = 2L * 1024 * 1024 * 1024;
/// <summary>
/// Gets or sets the maximum duration of a single normalization job, in seconds, after which the job is stopped.
/// </summary>
public int JobTimeoutSeconds { get; set; } = 900;
/// <summary>
/// Gets or sets the period, in seconds, during which a cache entry that was just produced or served is protected from eviction.
/// </summary>
public int EvictionGraceSeconds { get; set; } = 120;
/// <summary>
/// Gets or sets the directory where normalized audio is cached, relative to the API base directory when not rooted. When absent or empty, a
/// private directory under the system temporary directory is used.
/// </summary>
public string? CacheDirectory { get; set; }
}
@@ -0,0 +1,24 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Infrastructure.Common.Models.DTO.MediaLibrary.AudioLibrary.MusicLibrary.Playback;
/// <summary>
/// Describes how a single container and codec combination of the audio normalization pipeline is muxed and, when it has to be re-encoded, encoded.
/// </summary>
/// <param name="Container">The canonical container of the delivered audio.</param>
/// <param name="Codec">The canonical codec of the delivered audio.</param>
/// <param name="MuxerName">The name of the ffmpeg muxer that writes the container.</param>
/// <param name="FileExtension">The file extension of a single segment, including the leading dot.</param>
/// <param name="EncoderName">The name of the ffmpeg encoder used when the audio is transcoded.</param>
/// <param name="IsLossless">Whether the codec is lossless, in which case an encoder bitrate cap does not apply.</param>
[DebuggerDisplay("Container: {Container} Codec: {Codec} Muxer: {MuxerName}")]
internal sealed record NormalizedAudioFormatDto(
string Container,
string Codec,
string MuxerName,
string FileExtension,
string EncoderName,
bool IsLossless
);
@@ -0,0 +1,37 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Domain.SharedKernel.Common.Enums.Playback;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Infrastructure.Common.Models.DTO.MediaLibrary.AudioLibrary.MusicLibrary.Playback;
/// <summary>
/// Represents the persisted description of a cached normalized track, which lets the cache be read without parsing the ffmpeg output again.
/// </summary>
/// <param name="Version">The version of the index layout, so an index written by an older version is treated as a cache miss.</param>
/// <param name="TrackId">The Id of the track the cached audio belongs to, so a cache handle can be authorized against the track of the route.</param>
/// <param name="Mode">The way the audio is delivered, which is a remux or a transcode.</param>
/// <param name="Container">The container of the delivered audio.</param>
/// <param name="Codec">The codec of the delivered audio.</param>
/// <param name="SegmentDurationSeconds">The duration of each segment of the delivered audio, in seconds.</param>
/// <param name="DurationInSeconds">
/// The duration of the produced and cached audio, in seconds, rounded up to the next second. It is the produced end rather than the probed duration, so
/// it always covers every produced segment.
/// </param>
/// <param name="Segments">The segments that make up the delivered audio, in playback order.</param>
[DebuggerDisplay("TrackId: {TrackId} Container: {Container} Codec: {Codec} Segments: {Segments.Count}")]
// The record is internal, so its primary constructor is not public. Marking it tells System.Text.Json to use it for the on disk index anyway.
[method: JsonConstructor]
internal sealed record NormalizedTrackIndexDto(
int Version,
Guid TrackId,
PlaybackDeliveryMode Mode,
string Container,
string Codec,
int SegmentDurationSeconds,
int DurationInSeconds,
IReadOnlyList<NormalizedTrackSegmentIndexDto> Segments
);
@@ -0,0 +1,25 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Infrastructure.Common.Models.DTO.MediaLibrary.AudioLibrary.MusicLibrary.Playback;
/// <summary>
/// Represents the persisted description of a single segment of a cached normalized track.
/// </summary>
/// <param name="Index">The zero based position of the segment in the delivered audio.</param>
/// <param name="StartSeconds">The time, in seconds from the start of the track, at which the segment starts.</param>
/// <param name="DurationSeconds">The duration of the segment, in seconds.</param>
/// <param name="FileName">The file name of the segment inside the cache entry.</param>
/// <param name="Length">The length of the segment, in bytes.</param>
[DebuggerDisplay("Index: {Index} StartSeconds: {StartSeconds} FileName: {FileName}")]
// The record is internal, so its primary constructor is not public. Marking it tells System.Text.Json to use it for the on disk index anyway.
[method: JsonConstructor]
internal sealed record NormalizedTrackSegmentIndexDto(
int Index,
decimal StartSeconds,
decimal DurationSeconds,
string FileName,
long Length
);
@@ -0,0 +1,21 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Infrastructure.Common.Models.DTO.MediaLibrary.AudioLibrary.MusicLibrary.Playback;
/// <summary>
/// Represents a single entry of the normalized audio cache, used to enforce the cache size limit.
/// </summary>
/// <param name="Path">The absolute path of the directory that holds the entry.</param>
/// <param name="Size">The total size of the entry, in bytes.</param>
/// <param name="LastUsedUtc">The date and time, in UTC, when the entry was last produced or served.</param>
/// <param name="ProducedAtUtc">The date and time, in UTC, when the entry was produced or, for an entry found on disk, the earliest representable time.</param>
[DebuggerDisplay("Path: {Path} Size: {Size}")]
internal sealed record TranscodingCacheEntryDto(
string Path,
long Size,
DateTime LastUsedUtc,
DateTime ProducedAtUtc
);
@@ -0,0 +1,16 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Infrastructure.Common.Models.DTO.Plugins;
/// <summary>
/// Data transfer object for the error that occurred while loading a plugin assembly.
/// </summary>
/// <param name="AssemblyName">The file name of the plugin assembly that failed to load, without its extension.</param>
/// <param name="ErrorMessage">The error message describing the load failure.</param>
[DebuggerDisplay("AssemblyName: {AssemblyName}")]
internal sealed record PluginLoadErrorDto(
string AssemblyName,
string ErrorMessage
);
@@ -0,0 +1,23 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Infrastructure.Core.Plugins;
using Lumina.Plugins.Contracts.Core.Plugins;
using System.Collections.Generic;
#endregion
namespace Lumina.Infrastructure.Common.Models.DTO.Plugins;
/// <summary>
/// Data transfer object for the result of loading the plugins from the plugins directory.
/// </summary>
/// <param name="Plugins">The plugins that were loaded successfully.</param>
/// <param name="LoadContexts">
/// The load contexts of the successfully loaded plugins. The contexts are kept referenced here for the lifetime of the host, because a collectible
/// load context is only kept alive by a direct reference to the context object itself, and the garbage collector would otherwise unload the plugin assemblies mid-request,
/// when a lazily resolved dependency is first used.
/// </param>
/// <param name="Errors">The errors that occurred while loading the plugins.</param>
internal sealed record PluginLoadResultDto(
IReadOnlyList<IPlugin> Plugins,
IReadOnlyList<PluginLoadContext> LoadContexts,
IReadOnlyList<PluginLoadErrorDto> Errors
);