refactor(temporal)!: cleaned up organization

main
D. Moonfire 5 months ago
parent e02c56e77e
commit edda9a2773

@ -1,2 +1,3 @@
export PATH=$PWD/scripts:$PATH
use flake || use nix
export PATH=$PWD/scripts:$PATH
export DOTNET_ROOT=$(dirname $(dirname $(which dotnet)))

@ -1,4 +1,6 @@
using System;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using CliWrap;
@ -41,14 +43,31 @@ public class CopyFilesTest : NitrideTestBase
}
// Execute the generator. This will throw if there is an exception.
await Cli.Wrap("dotnet")
.WithArguments(
x => x.Add("run")
.Add("--project")
.Add(projectFile.FullName)
.Add("--")
.Add("build"))
.ExecuteAsync();
StringBuilder output = new();
try
{
await Cli
.Wrap("dotnet")
.WithWorkingDirectory(projectFile.DirectoryName!)
.WithArguments(
argumentsBuilder => argumentsBuilder
.Add("run")
.Add("--no-build")
.Add("--")
.Add("build"))
.WithStandardOutputPipe(PipeTarget.ToStringBuilder(output))
.WithStandardErrorPipe(PipeTarget.ToStringBuilder(output))
.ExecuteAsync();
}
catch (Exception exception)
{
this.Logger.Fatal(
exception,
"There was an exception running the command:\n\n{Log:l}",
output);
throw;
}
// Make sure we have our output.
FileInfo aFile = outputDir.GetFile("a.txt");

@ -1,6 +1,6 @@
using Autofac;
using MfGames.Nitride.Temporal;
using MfGames.Nitride.Temporal.Setup;
namespace MfGames.Nitride.Calendar;

@ -1,6 +1,6 @@
using Autofac;
using MfGames.Nitride.Temporal;
using MfGames.Nitride.Temporal.Setup;
namespace MfGames.Nitride.Feeds;

@ -3,7 +3,6 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>Nitride.Temporal</RootNamespace>
</PropertyGroup>
<PropertyGroup>
@ -11,18 +10,18 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="6.4.0"/>
<PackageReference Include="MfGames.Gallium" Version="0.3.0"/>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0"/>
<PackageReference Include="NodaTime" Version="3.1.2"/>
<PackageReference Include="NodaTime.Testing" Version="3.1.2"/>
<PackageReference Include="Serilog" Version="2.11.0"/>
<PackageReference Include="TimeSpanParserUtil" Version="1.2.0"/>
<PackageReference Include="Zio" Version="0.15.0"/>
<PackageReference Include="Autofac" Version="6.4.0" />
<PackageReference Include="MfGames.Gallium" Version="0.3.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="NodaTime" Version="3.1.2" />
<PackageReference Include="NodaTime.Testing" Version="3.1.2" />
<PackageReference Include="Serilog" Version="2.11.0" />
<PackageReference Include="TimeSpanParserUtil" Version="1.2.0" />
<PackageReference Include="Zio" Version="0.15.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MfGames.Nitride\MfGames.Nitride.csproj"/>
<ProjectReference Include="..\MfGames.Nitride\MfGames.Nitride.csproj" />
</ItemGroup>
<!-- Include the source generator -->

@ -4,6 +4,7 @@ using System.Collections.Generic;
using FluentValidation;
using MfGames.Gallium;
using MfGames.Nitride.Temporal.Validators;
using NodaTime;

@ -7,7 +7,7 @@ using MfGames.Nitride.Temporal.Cli;
using Serilog;
namespace MfGames.Nitride.Temporal;
namespace MfGames.Nitride.Temporal.Setup;
public static class NitrideTemporalBuilderExtensions
{

@ -4,7 +4,7 @@ using MfGames.Nitride.Generators;
using NodaTime;
namespace MfGames.Nitride.Temporal;
namespace MfGames.Nitride.Temporal.Setup;
/// <summary>
/// Configures the temporal settings for use with `UseTemporal`.

@ -1,6 +1,6 @@
using FluentValidation;
namespace MfGames.Nitride.Temporal;
namespace MfGames.Nitride.Temporal.Validators;
public class CreateDateIndexesValidator : AbstractValidator<CreateDateIndexes>
{

@ -1,6 +1,6 @@
using FluentValidation;
namespace MfGames.Nitride.Temporal;
namespace MfGames.Nitride.Temporal.Validators;
public class FilterOutExpiredInstantValidator
: AbstractValidator<FilterOutExpiredInstant>

@ -1,6 +1,6 @@
using FluentValidation;
namespace MfGames.Nitride.Temporal;
namespace MfGames.Nitride.Temporal.Validators;
public class FilterOutFutureInstantValidator
: AbstractValidator<FilterOutFutureInstant>

@ -1,6 +1,6 @@
using FluentValidation;
namespace MfGames.Nitride.Temporal;
namespace MfGames.Nitride.Temporal.Validators;
public class SetInstantFromComponentValidator
<TComponent> : AbstractValidator<SetInstantFromComponent<TComponent>>

@ -1,6 +1,6 @@
using FluentValidation;
namespace MfGames.Nitride.Temporal;
namespace MfGames.Nitride.Temporal.Validators;
public class SetInstantFromPathValidator : AbstractValidator<SetInstantFromPath>
{

@ -300,11 +300,11 @@ public class CreateDateIndexesTests : TemporalTestBase
x.Get<string>(),
x.GetOptional<DateIndex>()
?.Entries.Select(a => a.Get<string>())
.OrderBy(x => x)
.OrderBy(b => b)
.ToList(),
x.GetOptional<DateIndex>()
?.Indexes.Select(a => a.Get<string>())
.OrderBy(x => x)
.OrderBy(b => b)
.ToList()))
.OrderBy(x => x.Item1)
.ToList();

Loading…
Cancel
Save