Skip to content

Commit

Permalink
Bump Spectre.Console from 0.30.0 to 0.47.0 (#227)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <[email protected]>
  • Loading branch information
Xtansia authored Jun 14, 2023
1 parent f047db7 commit cdf1ad8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/ApiGenerator/ApiGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="ShellProgressBar" Version="5.2.0" />
<PackageReference Include="CsQuery.Core" Version="2.0.1" />
<PackageReference Include="Spectre.Console" Version="0.30.0" />
<PackageReference Include="Spectre.Console" Version="0.47.0" />
<PackageReference Include="System.CommandLine.DragonFruit" Version="0.3.0-alpha.20371.2" />
<PackageReference Include="RazorLight" Version="2.1.0" />
<PackageReference Include="System.Text.Encodings.Web" Version="7.0.0" />
Expand Down
17 changes: 7 additions & 10 deletions src/ApiGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,14 @@ private static async Task<int> Main(
catch (OperationCanceledException)
{
AnsiConsole.WriteLine();
AnsiConsole.Render(new Rule("[b white on orange4_1] Cancelled [/]").LeftAligned());
AnsiConsole.Write(new Rule("[b white on orange4_1] Cancelled [/]").LeftJustified());
AnsiConsole.WriteLine();
return 1;
}
catch (Exception ex)
{
AnsiConsole.WriteLine();
AnsiConsole.Render(new Rule("[b white on darkred] Exception [/]")
{
Alignment = Justify.Left,
});
AnsiConsole.Write(new Rule("[b white on darkred] Exception [/]").LeftJustified());
AnsiConsole.WriteLine();
AnsiConsole.WriteException(ex);
return 1;
Expand Down Expand Up @@ -115,7 +112,7 @@ private static async Task<int> Generate(bool download, string branch, bool inclu
.AddRow("[b]Include high level client[/]", $"{YesNo(!lowLevelOnly)}");

Console.WriteLine();
AnsiConsole.Render(
AnsiConsole.Write(
new Panel(grid)
.Header(new PanelHeader("[b white on chartreuse4] OpenSearch .NET client API generator [/]", Justify.Left))
);
Expand All @@ -124,15 +121,15 @@ private static async Task<int> Generate(bool download, string branch, bool inclu
if (redownloadCoreSpecification)
{
Console.WriteLine();
AnsiConsole.Render(new Rule("[b white on chartreuse4] Downloading specification [/]").LeftAligned());
AnsiConsole.Write(new Rule("[b white on chartreuse4] Downloading specification [/]").LeftJustified());
Console.WriteLine();
await RestSpecDownloader.DownloadAsync(downloadBranch, token);
}

if (!generateCode) return 0;

Console.WriteLine();
AnsiConsole.Render(new Rule("[b white on chartreuse4] Loading specification [/]").LeftAligned());
AnsiConsole.Write(new Rule("[b white on chartreuse4] Loading specification [/]").LeftJustified());
Console.WriteLine();

var spec = Generator.ApiGenerator.CreateRestApiSpecModel(downloadBranch, "Core");
Expand All @@ -148,7 +145,7 @@ private static async Task<int> Generate(bool download, string branch, bool inclu
}

Console.WriteLine();
AnsiConsole.Render(new Rule("[b white on chartreuse4] Generating code [/]").LeftAligned());
AnsiConsole.Write(new Rule("[b white on chartreuse4] Generating code [/]").LeftJustified());
Console.WriteLine();

await Generator.ApiGenerator.Generate(downloadBranch, lowLevelOnly, spec, token);
Expand All @@ -157,7 +154,7 @@ private static async Task<int> Generate(bool download, string branch, bool inclu
if (warnings.Count > 0)
{
Console.WriteLine();
AnsiConsole.Render(new Rule("[b black on yellow] Specification warnings [/]").LeftAligned());
AnsiConsole.Write(new Rule("[b black on yellow] Specification warnings [/]").LeftJustified());
Console.WriteLine();

foreach (var warning in warnings.Distinct().OrderBy(w => w))
Expand Down
17 changes: 6 additions & 11 deletions src/ApiGenerator/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@
},
"Spectre.Console": {
"type": "Direct",
"requested": "[0.30.0, )",
"resolved": "0.30.0",
"contentHash": "7UG9p43sEJ2IjPuzkFNCE8zWmV1OOE0Kwh1jlJXv8/dzEADmWImzt9q868FCQ1ny5mDhNIkrZ3mfy2zxMSDagQ==",
"requested": "[0.47.0, )",
"resolved": "0.47.0",
"contentHash": "wz8mszcZr0cSOo8GyoG9e2DFW0SkMT8/n78Q/lIXX7EbCtHNXOoOKWpJ9Str+rCYtmQOGGyDutZzubrUHK/XkA==",
"dependencies": {
"Wcwidth": "0.2.0"
"System.Memory": "4.5.5"
}
},
"System.CommandLine.DragonFruit": {
Expand Down Expand Up @@ -305,8 +305,8 @@
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.4",
"contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw=="
"resolved": "4.5.5",
"contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw=="
},
"System.Reflection": {
"type": "Transitive",
Expand Down Expand Up @@ -459,11 +459,6 @@
"type": "Transitive",
"resolved": "4.5.4",
"contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg=="
},
"Wcwidth": {
"type": "Transitive",
"resolved": "0.2.0",
"contentHash": "H7no2W0vuLJTvSPanlrijtG3UdJNVoeWBOp2a5dJFVa2tqSQuP5GfbJw1xAtPG9agRW310nFTUUsyPz5tuVIxw=="
}
}
}
Expand Down

0 comments on commit cdf1ad8

Please sign in to comment.