Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<PackageVersion Include="Pomelo.EntityFrameworkCore.MySql" Version="9.0.0" />
<PackageVersion Include="Qdrant.Client" Version="1.16.1" />
<PackageVersion Include="RabbitMQ.Client" Version="7.2.0" />
<PackageVersion Include="Spectre.Console" Version="0.52.1-preview.0.5" />
<PackageVersion Include="Spectre.Console" Version="0.55.0" />
Comment thread
JamesNK marked this conversation as resolved.
<PackageVersion Include="StackExchange.Redis" Version="2.11.0" />
<PackageVersion Include="System.IO.Hashing" Version="10.0.3" />
<PackageVersion Include="Yarp.ReverseProxy" Version="2.3.0" />
Expand Down
1 change: 1 addition & 0 deletions eng/Signing.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<FileSignInfo Include="ModelContextProtocol.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="OpenAI.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Spectre.Console.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Spectre.Console.Ansi.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="OpenTelemetry.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="OpenTelemetry.Api.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="OpenTelemetry.Api.ProviderBuilderExtensions.dll" CertificateName="3PartySHA2" />
Expand Down
13 changes: 2 additions & 11 deletions src/Aspire.Cli/Utils/CliHostEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,8 @@ private static bool DetectAnsiSupport(IConfiguration configuration)
{
// If there is no explicit configuration to enable or disable ANSI support, attempt to detect it.
// This is required because some terminals don't support ANSI output, e.g. https://github.com/microsoft/aspire/issues/13737

// TODO: Creating a fake console here is a hack to run ANSI detection logic.
// Update this to use AnsiCapabilities once it's available in Spectre.Console 0.60+ instead of creating a full AnsiConsole instance.
var ansiConsole = AnsiConsole.Create(new AnsiConsoleSettings
{
Out = new AnsiConsoleOutput(TextWriter.Null),
Ansi = AnsiSupport.Detect,
ColorSystem = ColorSystemSupport.Detect
});

supportsAnsi = ansiConsole.Profile.Capabilities.Ansi;
var capabilities = AnsiCapabilities.Create(TextWriter.Null);
supportsAnsi = capabilities.Ansi;
}

return supportsAnsi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,7 @@ public TestAnsiConsoleWithInput(IAnsiConsole inner, TextReader inputReader)

public void Clear(bool home) => _inner.Clear(home);
public void Write(IRenderable renderable) => _inner.Write(renderable);
public void WriteAnsi(Action<AnsiWriter> action) => _inner.WriteAnsi(action);

private sealed class TextReaderInput : IAnsiConsoleInput
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Aspire.Cli.Tests/Utils/ConsoleActivityLoggerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ private static ConsoleActivityLogger CreateLogger(StringBuilder output, bool int
{
Ansi = color ? AnsiSupport.Yes : AnsiSupport.No,
ColorSystem = color ? ColorSystemSupport.TrueColor : ColorSystemSupport.NoColors,
Out = new AnsiConsoleOutput(new StringWriter(output))
Out = new AnsiConsoleOutput(new StringWriter(output)),
Enrichment = new ProfileEnrichment { UseDefaultEnrichers = false },
});
console.Profile.Width = width ?? int.MaxValue;

Expand Down
Loading