diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index c5055f2..09a3940 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -9,16 +9,22 @@ ] }, "dotnet-reportgenerator-globaltool": { - "version": "5.1.3", + "version": "5.1.24", "commands": [ "reportgenerator" ] }, "dotnet-outdated-tool": { - "version": "4.5.2", + "version": "4.5.3", "commands": [ "dotnet-outdated" ] + }, + "jetbrains.resharper.globaltools": { + "version": "2023.2.1", + "commands": [ + "jb" + ] } } -} +} \ No newline at end of file diff --git a/MfGames.sln b/MfGames.sln index 6bd8f85..50bb854 100644 --- a/MfGames.sln +++ b/MfGames.sln @@ -97,6 +97,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Crypto", "src\MfGam EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Crypto.Tests", "tests\MfGames.Crypto.Tests\MfGames.Crypto.Tests.csproj", "{7A773B2F-ADF4-450F-8F43-D3C3C689E1CE}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MfGames.Nitride.SpectreConsole", "src\MfGames.Nitride.SpectreConsole\MfGames.Nitride.SpectreConsole.csproj", "{0C5C8D0A-D283-477F-82C4-2FF026F6EC0C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -638,6 +640,18 @@ Global {7A773B2F-ADF4-450F-8F43-D3C3C689E1CE}.Release|x64.Build.0 = Release|Any CPU {7A773B2F-ADF4-450F-8F43-D3C3C689E1CE}.Release|x86.ActiveCfg = Release|Any CPU {7A773B2F-ADF4-450F-8F43-D3C3C689E1CE}.Release|x86.Build.0 = Release|Any CPU + {0C5C8D0A-D283-477F-82C4-2FF026F6EC0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0C5C8D0A-D283-477F-82C4-2FF026F6EC0C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0C5C8D0A-D283-477F-82C4-2FF026F6EC0C}.Debug|x64.ActiveCfg = Debug|Any CPU + {0C5C8D0A-D283-477F-82C4-2FF026F6EC0C}.Debug|x64.Build.0 = Debug|Any CPU + {0C5C8D0A-D283-477F-82C4-2FF026F6EC0C}.Debug|x86.ActiveCfg = Debug|Any CPU + {0C5C8D0A-D283-477F-82C4-2FF026F6EC0C}.Debug|x86.Build.0 = Debug|Any CPU + {0C5C8D0A-D283-477F-82C4-2FF026F6EC0C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0C5C8D0A-D283-477F-82C4-2FF026F6EC0C}.Release|Any CPU.Build.0 = Release|Any CPU + {0C5C8D0A-D283-477F-82C4-2FF026F6EC0C}.Release|x64.ActiveCfg = Release|Any CPU + {0C5C8D0A-D283-477F-82C4-2FF026F6EC0C}.Release|x64.Build.0 = Release|Any CPU + {0C5C8D0A-D283-477F-82C4-2FF026F6EC0C}.Release|x86.ActiveCfg = Release|Any CPU + {0C5C8D0A-D283-477F-82C4-2FF026F6EC0C}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {5253E2A6-9565-45AF-92EA-1BFD3A63AC23} = {9C845D9A-B359-43B3-AE9E-B84CE945AF21} @@ -684,5 +698,6 @@ Global {B47F12D0-70A0-410F-A023-97437A2CEDC6} = {4CE102F8-5C70-4696-B85F-93BB10034918} {832DBBC9-3A53-4F6B-B98C-4059DF780124} = {9C845D9A-B359-43B3-AE9E-B84CE945AF21} {7A773B2F-ADF4-450F-8F43-D3C3C689E1CE} = {4CE102F8-5C70-4696-B85F-93BB10034918} + {0C5C8D0A-D283-477F-82C4-2FF026F6EC0C} = {9C845D9A-B359-43B3-AE9E-B84CE945AF21} EndGlobalSection EndGlobal diff --git a/examples/NitrideCopyFiles/CopyFilesProgram.cs b/examples/NitrideCopyFiles/CopyFilesProgram.cs index 843f523..ba00b3f 100644 --- a/examples/NitrideCopyFiles/CopyFilesProgram.cs +++ b/examples/NitrideCopyFiles/CopyFilesProgram.cs @@ -51,6 +51,5 @@ public static class CopyFilesProgram private static void ConfigureNitride(NitrideConfiguration config) { config.AddLogPipelineCommandLineOption = true; - config.AddStatusProgressCommandLineOption = true; } } diff --git a/examples/NitrideCopyFiles/NitrideCopyFiles.csproj b/examples/NitrideCopyFiles/NitrideCopyFiles.csproj index 7a7b343..529dc46 100644 --- a/examples/NitrideCopyFiles/NitrideCopyFiles.csproj +++ b/examples/NitrideCopyFiles/NitrideCopyFiles.csproj @@ -11,4 +11,19 @@ + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + diff --git a/examples/NitridePipelines/NitridePipelines.csproj b/examples/NitridePipelines/NitridePipelines.csproj index 7a7b343..529dc46 100644 --- a/examples/NitridePipelines/NitridePipelines.csproj +++ b/examples/NitridePipelines/NitridePipelines.csproj @@ -11,4 +11,19 @@ + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + diff --git a/examples/NitridePipelines/NitridePipelinesProgram.cs b/examples/NitridePipelines/NitridePipelinesProgram.cs index cc5a1f8..14b28a5 100644 --- a/examples/NitridePipelines/NitridePipelinesProgram.cs +++ b/examples/NitridePipelines/NitridePipelinesProgram.cs @@ -32,6 +32,5 @@ public static class NitridePipelinesProgram private static void ConfigureNitride(NitrideConfiguration config) { config.AddLogPipelineCommandLineOption = true; - config.AddStatusProgressCommandLineOption = true; } } diff --git a/examples/SampleTool/Commands/SpectreCommand.cs b/examples/SampleTool/Commands/SpectreCommand.cs index bf42af1..5c24e55 100644 --- a/examples/SampleTool/Commands/SpectreCommand.cs +++ b/examples/SampleTool/Commands/SpectreCommand.cs @@ -1,3 +1,11 @@ +/* + * 2023-09-02 DREM: The SpectreConsole command didn't give much benefit for the + * cost of occasionally trashing the console window due to colors, the extra + * space after progress bars went away, and a few other visual quirks. So it was + * removed but I'm leaving the code here in case things change. + */ + +#if REMOVED using System; using System.CommandLine; using System.CommandLine.Invocation; @@ -80,3 +88,4 @@ public class SpectreCommand : Command, ICommandHandler, ITopCommand return 0; } } +#endif diff --git a/examples/SampleTool/SampleTool.csproj b/examples/SampleTool/SampleTool.csproj index 968f7d9..f0cde0d 100644 --- a/examples/SampleTool/SampleTool.csproj +++ b/examples/SampleTool/SampleTool.csproj @@ -7,6 +7,18 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/flake.lock b/flake.lock index 7000b2a..2df02ca 100644 --- a/flake.lock +++ b/flake.lock @@ -270,11 +270,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1688590700, - "narHash": "sha256-ZF055rIUP89cVwiLpG5xkJzx00gEuuGFF60Bs/LM3wc=", + "lastModified": 1693565476, + "narHash": "sha256-ya00zHt7YbPo3ve/wNZ/6nts61xt7wK/APa6aZAfey0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f292b4964cb71f9dfbbd30dc9f511d6165cd109b", + "rev": "aa8aa7e2ea35ce655297e8322dc82bf77a31d04b", "type": "github" }, "original": { diff --git a/nix/common/configs.nix b/nix/common/configs.nix index b1c43dc..3da1bf9 100644 --- a/nix/common/configs.nix +++ b/nix/common/configs.nix @@ -206,7 +206,7 @@ in { formatter = { dotnet = { command = "dotnet"; - options = ["format" "--include"]; + options = ["jb" "cleanupcode"]; includes = ["*.cs"]; }; @@ -217,7 +217,8 @@ in { prettier = { command = "prettier"; - options = ["--plugin" "prettier-plugin-toml" "--write"]; + # 2023-09-02 DREM: Removed "--plugin" "prettier-plugin-toml" + options = ["--write"]; includes = [ "*.css" "*.html" @@ -229,7 +230,7 @@ in { "*.scss" "*.ts" "*.yaml" - "*.toml" + #"*.toml" ]; }; @@ -254,8 +255,8 @@ in { nixpkgs.go ]; - devshell.startup.prettier-plugin-toml = l.stringsWithDeps.noDepEntry '' - export NODE_PATH=${nixpkgs.nodePackages.prettier-plugin-toml}/lib/node_modules:$NODE_PATH - ''; + #devshell.startup.prettier-plugin-toml = l.stringsWithDeps.noDepEntry '' + # export NODE_PATH=${nixpkgs.nodePackages.prettier-plugin-toml}/lib/node_modules:$NODE_PATH + #''; }; } diff --git a/src/MfGames.Crypto/MfGames.Crypto.csproj b/src/MfGames.Crypto/MfGames.Crypto.csproj index bb9b963..373a5a7 100644 --- a/src/MfGames.Crypto/MfGames.Crypto.csproj +++ b/src/MfGames.Crypto/MfGames.Crypto.csproj @@ -20,11 +20,15 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/MfGames.Gallium/MfGames.Gallium.csproj b/src/MfGames.Gallium/MfGames.Gallium.csproj index f6cb9f4..1a217aa 100644 --- a/src/MfGames.Gallium/MfGames.Gallium.csproj +++ b/src/MfGames.Gallium/MfGames.Gallium.csproj @@ -20,6 +20,18 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Gallium/SelectEntityExtensions.cs b/src/MfGames.Gallium/SelectEntityExtensions.cs index 5754fc9..95f22bf 100644 --- a/src/MfGames.Gallium/SelectEntityExtensions.cs +++ b/src/MfGames.Gallium/SelectEntityExtensions.cs @@ -173,9 +173,9 @@ public static class SelectEntityExtensions foreach (Entity entity in entities) { Entity? result = entity.TryGet(out T1 value1) - && entity.TryGet(out T2 value2) - ? selectWithComponents?.Invoke(entity, value1, value2) - : selectWithoutComponents?.Invoke(entity); + && entity.TryGet(out T2 value2) + ? selectWithComponents?.Invoke(entity, value1, value2) + : selectWithoutComponents?.Invoke(entity); if (result != null) { diff --git a/src/MfGames.Gallium/SplitEntityExtensions.cs b/src/MfGames.Gallium/SplitEntityExtensions.cs index 1c07134..23b0373 100644 --- a/src/MfGames.Gallium/SplitEntityExtensions.cs +++ b/src/MfGames.Gallium/SplitEntityExtensions.cs @@ -262,12 +262,12 @@ public static class SplitEntityExtensions return SplitEntity( entities, a => a.HasAll(t1, t2, t3, t4) - && test( - a, - a.Get(t1), - a.Get(t2), - a.Get(t3), - a.Get(t4))); + && test( + a, + a.Get(t1), + a.Get(t2), + a.Get(t3), + a.Get(t4))); } private static SplitEntityEnumerations SplitEntity( diff --git a/src/MfGames.Gallium/WhereEntityExtensions.cs b/src/MfGames.Gallium/WhereEntityExtensions.cs index cae7ff7..fb46690 100644 --- a/src/MfGames.Gallium/WhereEntityExtensions.cs +++ b/src/MfGames.Gallium/WhereEntityExtensions.cs @@ -15,7 +15,7 @@ public static class WhereEntityExtensions { return entities.Where( x => x.HasAll() - && include(x, x.Get(), x.Get())); + && include(x, x.Get(), x.Get())); } public static IEnumerable WhereEntity( @@ -24,7 +24,7 @@ public static class WhereEntityExtensions { return entities.Where( x => x.HasAll() - && include(x, x.Get(), x.Get(), x.Get())); + && include(x, x.Get(), x.Get(), x.Get())); } public static IEnumerable WhereEntity( @@ -33,11 +33,11 @@ public static class WhereEntityExtensions { return entities.Where( x => x.HasAll() - && include( - x, - x.Get(), - x.Get(), - x.Get(), - x.Get())); + && include( + x, + x.Get(), + x.Get(), + x.Get(), + x.Get())); } } diff --git a/src/MfGames.IO/Extensions/DirectoryInfoExtensions.cs b/src/MfGames.IO/Extensions/DirectoryInfoExtensions.cs index 2b0660d..20c9d66 100644 --- a/src/MfGames.IO/Extensions/DirectoryInfoExtensions.cs +++ b/src/MfGames.IO/Extensions/DirectoryInfoExtensions.cs @@ -165,6 +165,6 @@ public static class DirectoryInfoExtensions public static bool IsGitRoot(this DirectoryInfo? directory) { return directory != null - && directory.GetDirectories(".git").Length > 0; + && directory.GetDirectories(".git").Length > 0; } } diff --git a/src/MfGames.IO/MfGames.IO.csproj b/src/MfGames.IO/MfGames.IO.csproj index 1e0be2b..1061f08 100644 --- a/src/MfGames.IO/MfGames.IO.csproj +++ b/src/MfGames.IO/MfGames.IO.csproj @@ -19,6 +19,18 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Locking/MfGames.Locking.csproj b/src/MfGames.Locking/MfGames.Locking.csproj index bb9b963..373a5a7 100644 --- a/src/MfGames.Locking/MfGames.Locking.csproj +++ b/src/MfGames.Locking/MfGames.Locking.csproj @@ -20,11 +20,15 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/MfGames.Markdown.Gemtext/Extensions/SetBlockLinkHandling.cs b/src/MfGames.Markdown.Gemtext/Extensions/SetBlockLinkHandling.cs index 6ea37b2..8b38449 100644 --- a/src/MfGames.Markdown.Gemtext/Extensions/SetBlockLinkHandling.cs +++ b/src/MfGames.Markdown.Gemtext/Extensions/SetBlockLinkHandling.cs @@ -54,10 +54,10 @@ public class SetBlockLinkHandling : IMarkdownExtension } gemtext.BlockLinkHandling = this.BlockLinkHandling - ?? gemtext.BlockLinkHandling; + ?? gemtext.BlockLinkHandling; gemtext.EndLinkInlineFormatting = this.EndLinkInlineFormatting - ?? gemtext.EndLinkInlineFormatting; + ?? gemtext.EndLinkInlineFormatting; gemtext.NextFootnoteNumber = this.NextFootnoteNumber - ?? gemtext.NextFootnoteNumber; + ?? gemtext.NextFootnoteNumber; } } diff --git a/src/MfGames.Markdown.Gemtext/MfGames.Markdown.Gemtext.csproj b/src/MfGames.Markdown.Gemtext/MfGames.Markdown.Gemtext.csproj index 03c955e..1dfc8da 100644 --- a/src/MfGames.Markdown.Gemtext/MfGames.Markdown.Gemtext.csproj +++ b/src/MfGames.Markdown.Gemtext/MfGames.Markdown.Gemtext.csproj @@ -22,6 +22,18 @@ all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Markdown.Gemtext/Renderers/Gemtext/Blocks/TableRenderer.cs b/src/MfGames.Markdown.Gemtext/Renderers/Gemtext/Blocks/TableRenderer.cs index 34d7938..4bc1dc0 100644 --- a/src/MfGames.Markdown.Gemtext/Renderers/Gemtext/Blocks/TableRenderer.cs +++ b/src/MfGames.Markdown.Gemtext/Renderers/Gemtext/Blocks/TableRenderer.cs @@ -104,9 +104,10 @@ public class TableRenderer : GemtextObjectRenderer // Copied from Markdig's version. var cell = (TableCell)row[i]; int columnIndex = cell.ColumnIndex < 0 - || cell.ColumnIndex >= table.ColumnDefinitions.Count - ? i - : cell.ColumnIndex; + || cell.ColumnIndex >= + table.ColumnDefinitions.Count + ? i + : cell.ColumnIndex; columnIndex = columnIndex >= table.ColumnDefinitions.Count ? table.ColumnDefinitions.Count - 1 diff --git a/src/MfGames.Markdown.Gemtext/Renderers/Gemtext/Inlines/GemtextSmartyPantRenderer.cs b/src/MfGames.Markdown.Gemtext/Renderers/Gemtext/Inlines/GemtextSmartyPantRenderer.cs index 71c3c4d..f25be71 100644 --- a/src/MfGames.Markdown.Gemtext/Renderers/Gemtext/Inlines/GemtextSmartyPantRenderer.cs +++ b/src/MfGames.Markdown.Gemtext/Renderers/Gemtext/Inlines/GemtextSmartyPantRenderer.cs @@ -23,7 +23,7 @@ public class GemtextSmartyPantRenderer public GemtextSmartyPantRenderer(SmartyPantOptions? options) { this.options = options - ?? throw new ArgumentNullException(nameof(options)); + ?? throw new ArgumentNullException(nameof(options)); } protected override void Write(GemtextRenderer renderer, SmartyPant obj) diff --git a/src/MfGames.Markdown.Gemtext/Renderers/Gemtext/Inlines/LinkInlineRenderer.cs b/src/MfGames.Markdown.Gemtext/Renderers/Gemtext/Inlines/LinkInlineRenderer.cs index 18a21e8..ff8f44d 100644 --- a/src/MfGames.Markdown.Gemtext/Renderers/Gemtext/Inlines/LinkInlineRenderer.cs +++ b/src/MfGames.Markdown.Gemtext/Renderers/Gemtext/Inlines/LinkInlineRenderer.cs @@ -39,17 +39,18 @@ public class LinkInlineRenderer : GemtextObjectRenderer // Figure out the various states we have. bool outside = !renderer.LinkInsideBlock; bool insert = !outside - && renderer.BlockLinkHandling == BlockLinkHandling.InsertLine; + && renderer.BlockLinkHandling == + BlockLinkHandling.InsertLine; bool gather = !outside - && renderer.BlockLinkHandling switch - { - BlockLinkHandling.DocumentEnd => true, - BlockLinkHandling.ParagraphEnd => true, - _ => false, - }; + && renderer.BlockLinkHandling switch + { + BlockLinkHandling.DocumentEnd => true, + BlockLinkHandling.ParagraphEnd => true, + _ => false, + }; bool hasText = link.FirstChild != null; bool footnotes = renderer.EndLinkInlineFormatting - == EndLinkInlineFormatting.Footnote; + == EndLinkInlineFormatting.Footnote; // Bare links and ones where we insert into the paragraph have // their own line. diff --git a/src/MfGames.Markdown.Gemtext/Renderers/Gemtext/MarkdigExtensions.cs b/src/MfGames.Markdown.Gemtext/Renderers/Gemtext/MarkdigExtensions.cs index 874b903..07cdb5e 100644 --- a/src/MfGames.Markdown.Gemtext/Renderers/Gemtext/MarkdigExtensions.cs +++ b/src/MfGames.Markdown.Gemtext/Renderers/Gemtext/MarkdigExtensions.cs @@ -16,8 +16,8 @@ public static class MarkdigExtensions public static bool OnlyHasSingleLink(this ParagraphBlock obj) { return obj.Inline != null - && obj.Inline.Count() == 1 - && obj.Inline.FirstChild is LinkInline; + && obj.Inline.Count() == 1 + && obj.Inline.FirstChild is LinkInline; } /// @@ -28,7 +28,7 @@ public static class MarkdigExtensions public static bool OnlyHasSingleLink(this ListItemBlock obj) { return obj.Count == 1 - && obj.LastChild is ParagraphBlock paragraphBlock - && paragraphBlock.OnlyHasSingleLink(); + && obj.LastChild is ParagraphBlock paragraphBlock + && paragraphBlock.OnlyHasSingleLink(); } } diff --git a/src/MfGames.Markdown/Extensions/WikiLinkInlineParser.cs b/src/MfGames.Markdown/Extensions/WikiLinkInlineParser.cs index 499ead0..61050f7 100644 --- a/src/MfGames.Markdown/Extensions/WikiLinkInlineParser.cs +++ b/src/MfGames.Markdown/Extensions/WikiLinkInlineParser.cs @@ -104,7 +104,7 @@ public class WikiLinkInlineParser : InlineParser char delimiter) { return slice.CurrentChar != delimiter - || slice.PeekChar() != delimiter - || slice.PeekCharExtra(-1) == '\\'; + || slice.PeekChar() != delimiter + || slice.PeekCharExtra(-1) == '\\'; } } diff --git a/src/MfGames.Markdown/MfGames.Markdown.csproj b/src/MfGames.Markdown/MfGames.Markdown.csproj index f144518..4d1d0ce 100644 --- a/src/MfGames.Markdown/MfGames.Markdown.csproj +++ b/src/MfGames.Markdown/MfGames.Markdown.csproj @@ -21,6 +21,18 @@ all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Nitride.Calendar/MfGames.Nitride.Calendar.csproj b/src/MfGames.Nitride.Calendar/MfGames.Nitride.Calendar.csproj index 512068f..791542a 100644 --- a/src/MfGames.Nitride.Calendar/MfGames.Nitride.Calendar.csproj +++ b/src/MfGames.Nitride.Calendar/MfGames.Nitride.Calendar.csproj @@ -28,6 +28,18 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Nitride.Exec/MfGames.Nitride.Exec.csproj b/src/MfGames.Nitride.Exec/MfGames.Nitride.Exec.csproj index 407fda4..728186a 100644 --- a/src/MfGames.Nitride.Exec/MfGames.Nitride.Exec.csproj +++ b/src/MfGames.Nitride.Exec/MfGames.Nitride.Exec.csproj @@ -25,6 +25,18 @@ all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Nitride.Feeds/MfGames.Nitride.Feeds.csproj b/src/MfGames.Nitride.Feeds/MfGames.Nitride.Feeds.csproj index 5cbb5ab..5f2d516 100644 --- a/src/MfGames.Nitride.Feeds/MfGames.Nitride.Feeds.csproj +++ b/src/MfGames.Nitride.Feeds/MfGames.Nitride.Feeds.csproj @@ -27,6 +27,18 @@ all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Nitride.Feeds/Structure/AtomEntry.cs b/src/MfGames.Nitride.Feeds/Structure/AtomEntry.cs index a1688b1..5e62ea7 100644 --- a/src/MfGames.Nitride.Feeds/Structure/AtomEntry.cs +++ b/src/MfGames.Nitride.Feeds/Structure/AtomEntry.cs @@ -39,10 +39,10 @@ public partial class AtomEntry /// public string? Id { get; set; } - /// - /// Gets or sets when the entry was first published. - /// - public Instant? Published { get; set; } + /// + /// Gets or sets when the entry was first published. + /// + public Instant? Published { get; set; } /// /// Gets or sets the summary of the entry. @@ -89,7 +89,10 @@ public partial class AtomEntry new XAttribute("href", this.Url.ToString()))); } - AtomHelper.AddIfSet(elem, "published", this.Published?.ToString("g", null)); + AtomHelper.AddIfSet( + elem, + "published", + this.Published?.ToString("g", null)); AtomHelper.AddIfSet(elem, "updated", this.Updated?.ToString("g", null)); AtomHelper.AddIfSet(elem, "id", this.Id); AtomHelper.AddIfSet(elem, this.Author?.ToXElement()); diff --git a/src/MfGames.Nitride.Gemtext/MfGames.Nitride.Gemtext.csproj b/src/MfGames.Nitride.Gemtext/MfGames.Nitride.Gemtext.csproj index 4c1cc42..f269dea 100644 --- a/src/MfGames.Nitride.Gemtext/MfGames.Nitride.Gemtext.csproj +++ b/src/MfGames.Nitride.Gemtext/MfGames.Nitride.Gemtext.csproj @@ -36,6 +36,18 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Nitride.Generators/ClassAttributeSyntaxReceiverBase.cs b/src/MfGames.Nitride.Generators/ClassAttributeSyntaxReceiverBase.cs index 282a64c..8b05156 100644 --- a/src/MfGames.Nitride.Generators/ClassAttributeSyntaxReceiverBase.cs +++ b/src/MfGames.Nitride.Generators/ClassAttributeSyntaxReceiverBase.cs @@ -79,7 +79,7 @@ public abstract class ClassAttributeSyntaxReceiverBase : ISyntaxReceiver bool found = attributes .Any( x => x == this.attributeName - || x == $"{this.attributeName}Attribute"); + || x == $"{this.attributeName}Attribute"); if (this.DebugAttributes) { diff --git a/src/MfGames.Nitride.Generators/MfGames.Nitride.Generators.csproj b/src/MfGames.Nitride.Generators/MfGames.Nitride.Generators.csproj index c4b888f..1ae773c 100644 --- a/src/MfGames.Nitride.Generators/MfGames.Nitride.Generators.csproj +++ b/src/MfGames.Nitride.Generators/MfGames.Nitride.Generators.csproj @@ -20,9 +20,21 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Nitride.Generators/WithPropertiesSourceGenerator.cs b/src/MfGames.Nitride.Generators/WithPropertiesSourceGenerator.cs index 05f07fd..6992f91 100644 --- a/src/MfGames.Nitride.Generators/WithPropertiesSourceGenerator.cs +++ b/src/MfGames.Nitride.Generators/WithPropertiesSourceGenerator.cs @@ -59,8 +59,8 @@ public class WithPropertiesSourceGenerator { // See if we have a setter. bool found = pds.AccessorList?.Accessors - .Any(x => x.Keyword.ToString() == "set") - ?? false; + .Any(x => x.Keyword.ToString() == "set") + ?? false; if (!found) { diff --git a/src/MfGames.Nitride.Handlebars/MfGames.Nitride.Handlebars.csproj b/src/MfGames.Nitride.Handlebars/MfGames.Nitride.Handlebars.csproj index 9c981a8..45ce5f5 100644 --- a/src/MfGames.Nitride.Handlebars/MfGames.Nitride.Handlebars.csproj +++ b/src/MfGames.Nitride.Handlebars/MfGames.Nitride.Handlebars.csproj @@ -24,6 +24,18 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Nitride.Html/MfGames.Nitride.Html.csproj b/src/MfGames.Nitride.Html/MfGames.Nitride.Html.csproj index 7b80e90..e1a8c24 100644 --- a/src/MfGames.Nitride.Html/MfGames.Nitride.Html.csproj +++ b/src/MfGames.Nitride.Html/MfGames.Nitride.Html.csproj @@ -36,6 +36,18 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Nitride.IO/MfGames.Nitride.IO.csproj b/src/MfGames.Nitride.IO/MfGames.Nitride.IO.csproj index 191a810..070de6c 100644 --- a/src/MfGames.Nitride.IO/MfGames.Nitride.IO.csproj +++ b/src/MfGames.Nitride.IO/MfGames.Nitride.IO.csproj @@ -24,6 +24,18 @@ all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Nitride.IO/Paths/UPathExtensions.cs b/src/MfGames.Nitride.IO/Paths/UPathExtensions.cs index edb7d14..b64b369 100644 --- a/src/MfGames.Nitride.IO/Paths/UPathExtensions.cs +++ b/src/MfGames.Nitride.IO/Paths/UPathExtensions.cs @@ -18,9 +18,9 @@ public static class UPathExtensions if (path.GetNameWithoutExtension() == "index") { return path.GetDirectory() - .ToString() - .TrimEnd('/') - + "/"; + .ToString() + .TrimEnd('/') + + "/"; } return path.ToString(); @@ -37,8 +37,8 @@ public static class UPathExtensions } string parentPath = parent.ToString() - .TrimEnd('/') - + "/"; + .TrimEnd('/') + + "/"; return parentPath; } diff --git a/src/MfGames.Nitride.Json/MfGames.Nitride.Json.csproj b/src/MfGames.Nitride.Json/MfGames.Nitride.Json.csproj index 79c6fdb..f69007c 100644 --- a/src/MfGames.Nitride.Json/MfGames.Nitride.Json.csproj +++ b/src/MfGames.Nitride.Json/MfGames.Nitride.Json.csproj @@ -25,6 +25,18 @@ all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Nitride.Markdown/MfGames.Nitride.Markdown.csproj b/src/MfGames.Nitride.Markdown/MfGames.Nitride.Markdown.csproj index 107b25f..5fc734c 100644 --- a/src/MfGames.Nitride.Markdown/MfGames.Nitride.Markdown.csproj +++ b/src/MfGames.Nitride.Markdown/MfGames.Nitride.Markdown.csproj @@ -29,6 +29,18 @@ all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Nitride.Slugs/MfGames.Nitride.Slugs.csproj b/src/MfGames.Nitride.Slugs/MfGames.Nitride.Slugs.csproj index 28fd59f..5ede81e 100644 --- a/src/MfGames.Nitride.Slugs/MfGames.Nitride.Slugs.csproj +++ b/src/MfGames.Nitride.Slugs/MfGames.Nitride.Slugs.csproj @@ -20,6 +20,18 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Nitride.SpectreConsole/MfGames.Nitride.SpectreConsole.csproj b/src/MfGames.Nitride.SpectreConsole/MfGames.Nitride.SpectreConsole.csproj new file mode 100644 index 0000000..c75921b --- /dev/null +++ b/src/MfGames.Nitride.SpectreConsole/MfGames.Nitride.SpectreConsole.csproj @@ -0,0 +1,32 @@ + + + + net6.0 + enable + enable + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + diff --git a/src/MfGames.Nitride.SpectreConsole/NitrideSpectreConsoleModule.cs b/src/MfGames.Nitride.SpectreConsole/NitrideSpectreConsoleModule.cs new file mode 100644 index 0000000..7eab9c6 --- /dev/null +++ b/src/MfGames.Nitride.SpectreConsole/NitrideSpectreConsoleModule.cs @@ -0,0 +1,120 @@ +using System.CommandLine; + +using Autofac; + +using MfGames.Nitride.Commands; +using MfGames.Nitride.Pipelines; +using MfGames.Nitride.Pipelines.Observers; +using MfGames.Nitride.SpectreConsole.Observers; +using MfGames.Nitride.SpectreConsole.Setup; + +namespace MfGames.Nitride.SpectreConsole; + +public class NitrideSpectreConsoleModule : Module +{ + public NitrideSpectreConsoleModule() + { + this.Configuration = new NitrideSpectreConsoleConfiguration(); + } + + public string? ApplicationName { get; set; } + + /// + /// Gets or sets the configuration. + /// + public NitrideSpectreConsoleConfiguration Configuration { get; set; } + + /// + /// Gets or sets the description of the website. + /// + public string? Description { get; set; } + + /// + protected override void Load(ContainerBuilder builder) + { + // Pipelines + builder + .RegisterType() + .AsSelf(); + + builder.RegisterType() + .AsSelf() + .SingleInstance(); + + // Operations + builder.RegisterValidators(this); + builder.RegisterOperators(this); + + // Commands + builder + .RegisterType() + .AsSelf() + .As() + .SingleInstance(); + builder + .RegisterType() + .AsSelf() + .As() + .SingleInstance(); + + // MfGames.ToolBuilder requires the RootCommand to be registered. This is because + // of various things, mostly coordinating between different systems. + builder + .Register(this.CreateRootCommand) + .AsSelf(); + + // Register our observers. + this.RegisterObservers(builder); + } + + private RootCommand CreateRootCommand(IComponentContext c) + { + // Create the new root command. + var root = new RootCommand(); + + if (!string.IsNullOrWhiteSpace(this.ApplicationName)) + { + root.Name = this.ApplicationName; + } + + if (!string.IsNullOrWhiteSpace(this.Description)) + { + root.Description = this.Description; + } + + ; + + // Add in the commands. + IEnumerable commands = c.Resolve>(); + + foreach (Command command in commands) + { + root.AddCommand(command); + } + + return root; + } + + private void RegisterObservers(ContainerBuilder builder) + { + // Register our observers. + builder + .RegisterType() + .AsSelf(); + + // See if we need to register our options. + if (this.Configuration.AddStatusProgressCommandLineOption) + { + builder + .RegisterType() + .AsSelf() + .As() + .SingleInstance(); + + builder + .RegisterType() + .As() + .SingleInstance(); + } + } +} diff --git a/src/MfGames.Nitride/Pipelines/Observers/ProgressRemainingColumn.cs b/src/MfGames.Nitride.SpectreConsole/Observers/ProgressRemainingColumn.cs similarity index 92% rename from src/MfGames.Nitride/Pipelines/Observers/ProgressRemainingColumn.cs rename to src/MfGames.Nitride.SpectreConsole/Observers/ProgressRemainingColumn.cs index 5ce48cd..ddd6676 100644 --- a/src/MfGames.Nitride/Pipelines/Observers/ProgressRemainingColumn.cs +++ b/src/MfGames.Nitride.SpectreConsole/Observers/ProgressRemainingColumn.cs @@ -1,7 +1,7 @@ using Spectre.Console; using Spectre.Console.Rendering; -namespace MfGames.Nitride.Pipelines.Observers; +namespace MfGames.Nitride.SpectreConsole.Observers; /// /// A column showing item count. diff --git a/src/MfGames.Nitride/Pipelines/Observers/SpectreDisplayMode.cs b/src/MfGames.Nitride.SpectreConsole/Observers/SpectreDisplayMode.cs similarity index 87% rename from src/MfGames.Nitride/Pipelines/Observers/SpectreDisplayMode.cs rename to src/MfGames.Nitride.SpectreConsole/Observers/SpectreDisplayMode.cs index 8de5c91..7fddacd 100644 --- a/src/MfGames.Nitride/Pipelines/Observers/SpectreDisplayMode.cs +++ b/src/MfGames.Nitride.SpectreConsole/Observers/SpectreDisplayMode.cs @@ -1,4 +1,4 @@ -namespace MfGames.Nitride.Pipelines.Observers; +namespace MfGames.Nitride.SpectreConsole.Observers; public enum SpectreDisplayMode { diff --git a/src/MfGames.Nitride/Pipelines/Observers/StatusPipelineObserver.cs b/src/MfGames.Nitride.SpectreConsole/Observers/StatusPipelineObserver.cs similarity index 97% rename from src/MfGames.Nitride/Pipelines/Observers/StatusPipelineObserver.cs rename to src/MfGames.Nitride.SpectreConsole/Observers/StatusPipelineObserver.cs index ecc48e8..f476f40 100644 --- a/src/MfGames.Nitride/Pipelines/Observers/StatusPipelineObserver.cs +++ b/src/MfGames.Nitride.SpectreConsole/Observers/StatusPipelineObserver.cs @@ -1,10 +1,13 @@ using System.Collections.Concurrent; +using MfGames.Nitride.Pipelines; +using MfGames.Nitride.Pipelines.Observers; + using Serilog; using Spectre.Console; -namespace MfGames.Nitride.Pipelines.Observers; +namespace MfGames.Nitride.SpectreConsole.Observers; /// /// An observer that displays progress bars as the pipelines progress. diff --git a/src/MfGames.Nitride.SpectreConsole/Setup/NitrideSpectreConsoleConfiguration.cs b/src/MfGames.Nitride.SpectreConsole/Setup/NitrideSpectreConsoleConfiguration.cs new file mode 100644 index 0000000..6510c59 --- /dev/null +++ b/src/MfGames.Nitride.SpectreConsole/Setup/NitrideSpectreConsoleConfiguration.cs @@ -0,0 +1,21 @@ +using MfGames.Nitride.SpectreConsole.Observers; + +namespace MfGames.Nitride.SpectreConsole.Setup; + +/// +/// The configuration class for setting up Nitride. +/// +public class NitrideSpectreConsoleConfiguration +{ + /// + /// Gets or sets a value indicating whether or not to include a command + /// line option to show progress bars (`--pipeline-progress-bar`). + /// + public bool AddStatusProgressCommandLineOption { get; set; } + + /// + /// Gets or sets the default mode for showing the pipeline progress bars. + /// This defaults to Auto. + /// + public SpectreDisplayMode DefaultStatusDisplayMode { get; set; } +} diff --git a/src/MfGames.Nitride/Setup/StatusPipelineCommandLineOption.cs b/src/MfGames.Nitride.SpectreConsole/Setup/StatusPipelineCommandLineOption.cs similarity index 91% rename from src/MfGames.Nitride/Setup/StatusPipelineCommandLineOption.cs rename to src/MfGames.Nitride.SpectreConsole/Setup/StatusPipelineCommandLineOption.cs index 10153f4..936ed01 100644 --- a/src/MfGames.Nitride/Setup/StatusPipelineCommandLineOption.cs +++ b/src/MfGames.Nitride.SpectreConsole/Setup/StatusPipelineCommandLineOption.cs @@ -2,10 +2,10 @@ using System.CommandLine; using System.CommandLine.Invocation; using MfGames.Nitride.Commands; -using MfGames.Nitride.Pipelines.Observers; +using MfGames.Nitride.SpectreConsole.Observers; using MfGames.ToolBuilder.Extensions; -namespace MfGames.Nitride.Setup; +namespace MfGames.Nitride.SpectreConsole.Setup; /// /// A factory to inject the "--pipeline-status" argument into the build diff --git a/src/MfGames.Nitride.Temporal.Schedules/MfGames.Nitride.Temporal.Schedules.csproj b/src/MfGames.Nitride.Temporal.Schedules/MfGames.Nitride.Temporal.Schedules.csproj index e90e1ab..457b57e 100644 --- a/src/MfGames.Nitride.Temporal.Schedules/MfGames.Nitride.Temporal.Schedules.csproj +++ b/src/MfGames.Nitride.Temporal.Schedules/MfGames.Nitride.Temporal.Schedules.csproj @@ -22,6 +22,18 @@ all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Nitride.Temporal.Schedules/PathRegexScheduleBase.cs b/src/MfGames.Nitride.Temporal.Schedules/PathRegexScheduleBase.cs index b27826b..b8ad113 100644 --- a/src/MfGames.Nitride.Temporal.Schedules/PathRegexScheduleBase.cs +++ b/src/MfGames.Nitride.Temporal.Schedules/PathRegexScheduleBase.cs @@ -52,10 +52,10 @@ public abstract partial class PathRegexScheduleBase : ISchedule string path = this.GetPath(entity); Regex? regex = this.GetRegex(); Match match = regex?.Match(path) - ?? throw new NullReferenceException( - "PathRegex was not configured for the " - + this.GetType().Name - + "."); + ?? throw new NullReferenceException( + "PathRegex was not configured for the " + + this.GetType().Name + + "."); if (!match.Success) { @@ -91,10 +91,10 @@ public abstract partial class PathRegexScheduleBase : ISchedule string path = this.GetPath(entity); Regex? regex = this.GetRegex(); Match match = regex?.Match(path) - ?? throw new NullReferenceException( - "PathRegex was not configured for the " - + this.GetType().Name - + "."); + ?? throw new NullReferenceException( + "PathRegex was not configured for the " + + this.GetType().Name + + "."); return match.Success; } diff --git a/src/MfGames.Nitride.Temporal.Schedules/SimplePathSchedule.cs b/src/MfGames.Nitride.Temporal.Schedules/SimplePathSchedule.cs index 0e11fb4..1a17e5f 100644 --- a/src/MfGames.Nitride.Temporal.Schedules/SimplePathSchedule.cs +++ b/src/MfGames.Nitride.Temporal.Schedules/SimplePathSchedule.cs @@ -22,8 +22,8 @@ public partial class SimplePathSchedule : ISchedule TimeService timeService) { DateTime start = this.ScheduleStart - ?? throw new NullReferenceException( - "Cannot use a schedule without a start date."); + ?? throw new NullReferenceException( + "Cannot use a schedule without a start date."); Instant instant = timeService.CreateInstant(start); // If the time hasn't past, then we don't apply it. diff --git a/src/MfGames.Nitride.Temporal/MfGames.Nitride.Temporal.csproj b/src/MfGames.Nitride.Temporal/MfGames.Nitride.Temporal.csproj index 05ff678..0eb9f6a 100644 --- a/src/MfGames.Nitride.Temporal/MfGames.Nitride.Temporal.csproj +++ b/src/MfGames.Nitride.Temporal/MfGames.Nitride.Temporal.csproj @@ -24,6 +24,18 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Nitride.Temporal/Setup/ExpiresPipelineCommandOption.cs b/src/MfGames.Nitride.Temporal/Setup/ExpiresPipelineCommandOption.cs index 69799dc..e67b25c 100644 --- a/src/MfGames.Nitride.Temporal/Setup/ExpiresPipelineCommandOption.cs +++ b/src/MfGames.Nitride.Temporal/Setup/ExpiresPipelineCommandOption.cs @@ -50,7 +50,11 @@ public class ExpiresPipelineCommandOption : IPipelineCommandOption string? value = (string?)context.ParseResult.GetValueForOption(this.Option); - if (value != null && value.ToLowerInvariant() != "never") + if (value != null + && !string.Equals( + value, + "never", + StringComparison.InvariantCultureIgnoreCase)) { // Parse the format using TimeSpanParser. this.clock.Expires = TimeSpanParser.Parse(value); diff --git a/src/MfGames.Nitride.Yaml/MfGames.Nitride.Yaml.csproj b/src/MfGames.Nitride.Yaml/MfGames.Nitride.Yaml.csproj index 5d77f3b..932e51c 100644 --- a/src/MfGames.Nitride.Yaml/MfGames.Nitride.Yaml.csproj +++ b/src/MfGames.Nitride.Yaml/MfGames.Nitride.Yaml.csproj @@ -24,6 +24,18 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Nitride/Entities/EntitySequence.cs b/src/MfGames.Nitride/Entities/EntitySequence.cs index fbe15ca..827fff7 100644 --- a/src/MfGames.Nitride/Entities/EntitySequence.cs +++ b/src/MfGames.Nitride/Entities/EntitySequence.cs @@ -24,7 +24,7 @@ public class EntitySequence public bool IsFirst => this.Sequence.Count > 0 && this.Index == 0; public bool IsLast => this.Sequence.Count > 0 - && this.Index == this.Sequence.Count - 1; + && this.Index == this.Sequence.Count - 1; public Entity? Next => this.HasNext ? this.Sequence[this.Index + 1] : null; diff --git a/src/MfGames.Nitride/MfGames.Nitride.csproj b/src/MfGames.Nitride/MfGames.Nitride.csproj index b52740c..e03ec43 100644 --- a/src/MfGames.Nitride/MfGames.Nitride.csproj +++ b/src/MfGames.Nitride/MfGames.Nitride.csproj @@ -31,6 +31,18 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/MfGames.Nitride/NitrideModule.cs b/src/MfGames.Nitride/NitrideModule.cs index b7135ca..f2b70d5 100644 --- a/src/MfGames.Nitride/NitrideModule.cs +++ b/src/MfGames.Nitride/NitrideModule.cs @@ -115,19 +115,5 @@ public class NitrideModule : Module .As() .SingleInstance(); } - - if (this.Configuration.AddStatusProgressCommandLineOption) - { - builder - .RegisterType() - .AsSelf() - .As() - .SingleInstance(); - - builder - .RegisterType() - .As() - .SingleInstance(); - } } } diff --git a/src/MfGames.Nitride/Pipelines/PipelineRunner.cs b/src/MfGames.Nitride/Pipelines/PipelineRunner.cs index 9f03c53..3fdbae4 100644 --- a/src/MfGames.Nitride/Pipelines/PipelineRunner.cs +++ b/src/MfGames.Nitride/Pipelines/PipelineRunner.cs @@ -56,7 +56,7 @@ public class PipelineRunner { this.observers = observers; this.Pipeline = pipeline - ?? throw new ArgumentNullException(nameof(pipeline)); + ?? throw new ArgumentNullException(nameof(pipeline)); this.Incoming = new List(); this.Outgoing = new List(); this.outputs = new List(); diff --git a/src/MfGames.Nitride/Setup/NitrideConfiguration.cs b/src/MfGames.Nitride/Setup/NitrideConfiguration.cs index ee7b82f..91f27d5 100644 --- a/src/MfGames.Nitride/Setup/NitrideConfiguration.cs +++ b/src/MfGames.Nitride/Setup/NitrideConfiguration.cs @@ -13,16 +13,4 @@ public class NitrideConfiguration /// LoggingPipelineObserver is also registered as a component. /// public bool AddLogPipelineCommandLineOption { get; set; } - - /// - /// Gets or sets a value indicating whether or not to include a command - /// line option to show progress bars (`--pipeline-progress-bar`). - /// - public bool AddStatusProgressCommandLineOption { get; set; } - - /// - /// Gets or sets the default mode for showing the pipeline progress bars. - /// This defaults to Auto. - /// - public SpectreDisplayMode DefaultStatusDisplayMode { get; set; } } diff --git a/src/MfGames.Serilog.SpectreExpressions/MfGames.Serilog.SpectreExpressions.csproj b/src/MfGames.Serilog.SpectreExpressions/MfGames.Serilog.SpectreExpressions.csproj index f3437e9..0b63561 100644 --- a/src/MfGames.Serilog.SpectreExpressions/MfGames.Serilog.SpectreExpressions.csproj +++ b/src/MfGames.Serilog.SpectreExpressions/MfGames.Serilog.SpectreExpressions.csproj @@ -20,15 +20,15 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/MfGames.TestSetup/MfGames.TestSetup.csproj b/src/MfGames.TestSetup/MfGames.TestSetup.csproj index b5d3fd8..c7a41a2 100644 --- a/src/MfGames.TestSetup/MfGames.TestSetup.csproj +++ b/src/MfGames.TestSetup/MfGames.TestSetup.csproj @@ -22,15 +22,15 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/MfGames.TestSetup/TestContext.cs b/src/MfGames.TestSetup/TestContext.cs index 8e13da2..6915d37 100644 --- a/src/MfGames.TestSetup/TestContext.cs +++ b/src/MfGames.TestSetup/TestContext.cs @@ -16,16 +16,16 @@ public class TestContext : IDisposable public IContainer Container { get => this.container - ?? throw new NullReferenceException( - "ConfigureContainer has not been called."); + ?? throw new NullReferenceException( + "ConfigureContainer has not been called."); private set => this.container = value; } public ILogger Logger { get => this.logger - ?? throw new NullReferenceException( - "SetLogger has not been called."); + ?? throw new NullReferenceException( + "SetLogger has not been called."); private set => this.logger = value; } diff --git a/src/MfGames.ToolBuilder.Tables/MfGames.ToolBuilder.Tables.csproj b/src/MfGames.ToolBuilder.Tables/MfGames.ToolBuilder.Tables.csproj index 6be3634..bfd760a 100644 --- a/src/MfGames.ToolBuilder.Tables/MfGames.ToolBuilder.Tables.csproj +++ b/src/MfGames.ToolBuilder.Tables/MfGames.ToolBuilder.Tables.csproj @@ -32,15 +32,15 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/MfGames.ToolBuilder.Tables/TableToolService.cs b/src/MfGames.ToolBuilder.Tables/TableToolService.cs index a4d0285..158bf3b 100644 --- a/src/MfGames.ToolBuilder.Tables/TableToolService.cs +++ b/src/MfGames.ToolBuilder.Tables/TableToolService.cs @@ -79,8 +79,8 @@ public class TableToolService if (defaultColumns != null) { tableColumnsDescription += " [default: " - + string.Join(",", defaultColumns) - + "]"; + + string.Join(",", defaultColumns) + + "]"; } } diff --git a/src/MfGames.ToolBuilder/Logging/LoggingToolService.cs b/src/MfGames.ToolBuilder/Logging/LoggingToolService.cs index 5583157..dc19a8a 100644 --- a/src/MfGames.ToolBuilder/Logging/LoggingToolService.cs +++ b/src/MfGames.ToolBuilder/Logging/LoggingToolService.cs @@ -1,6 +1,5 @@ using System.CommandLine; -using MfGames.Serilog.SpectreExpressions; using MfGames.ToolBuilder.Extensions; using Serilog; @@ -113,7 +112,7 @@ public class LoggingToolService configuration = configuration .Enrich.FromLogContext() - .WriteTo.SpectreExpression(template); + .WriteTo.Console(template); Logger logger = configuration.CreateLogger(); Log.Logger = logger; @@ -173,6 +172,7 @@ public class LoggingToolService contextExpression, " {@m}\n{@x}"), theme: TemplateTheme.Literate); + return template; } diff --git a/src/MfGames.ToolBuilder/MfGames.ToolBuilder.csproj b/src/MfGames.ToolBuilder/MfGames.ToolBuilder.csproj index 8defca7..bf87720 100644 --- a/src/MfGames.ToolBuilder/MfGames.ToolBuilder.csproj +++ b/src/MfGames.ToolBuilder/MfGames.ToolBuilder.csproj @@ -22,20 +22,20 @@ - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - - + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -43,27 +43,25 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - + + + + + + + + + + + - - + diff --git a/src/MfGames.ToolBuilder/ToolBox.cs b/src/MfGames.ToolBuilder/ToolBox.cs index b55f13f..c0acd12 100644 --- a/src/MfGames.ToolBuilder/ToolBox.cs +++ b/src/MfGames.ToolBuilder/ToolBox.cs @@ -2,8 +2,6 @@ using System.CommandLine.Parsing; using Serilog; -using Spectre.Console; - namespace MfGames.ToolBuilder; /// @@ -44,9 +42,5 @@ public class ToolBox return Environment.ExitCode == 0 ? 1 : Environment.ExitCode; } - finally - { - AnsiConsole.Reset(); - } } } diff --git a/tests/MfGames.Crypto.Tests/MfGames.Crypto.Tests.csproj b/tests/MfGames.Crypto.Tests/MfGames.Crypto.Tests.csproj index 77f0b1d..2ed5bd4 100644 --- a/tests/MfGames.Crypto.Tests/MfGames.Crypto.Tests.csproj +++ b/tests/MfGames.Crypto.Tests/MfGames.Crypto.Tests.csproj @@ -11,27 +11,31 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + - - + + diff --git a/tests/MfGames.Gallium.Tests/MfGames.Gallium.Tests.csproj b/tests/MfGames.Gallium.Tests/MfGames.Gallium.Tests.csproj index ae66794..7aeea6d 100644 --- a/tests/MfGames.Gallium.Tests/MfGames.Gallium.Tests.csproj +++ b/tests/MfGames.Gallium.Tests/MfGames.Gallium.Tests.csproj @@ -6,10 +6,22 @@ - - + + - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -20,7 +32,7 @@ - - + + diff --git a/tests/MfGames.IO.Tests/MfGames.IO.Tests.csproj b/tests/MfGames.IO.Tests/MfGames.IO.Tests.csproj index 48bb03e..25f3369 100644 --- a/tests/MfGames.IO.Tests/MfGames.IO.Tests.csproj +++ b/tests/MfGames.IO.Tests/MfGames.IO.Tests.csproj @@ -6,9 +6,21 @@ - + - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -20,7 +32,7 @@ - + diff --git a/tests/MfGames.Locking.Tests/MfGames.Locking.Tests.csproj b/tests/MfGames.Locking.Tests/MfGames.Locking.Tests.csproj index ad0d32a..c03fa80 100644 --- a/tests/MfGames.Locking.Tests/MfGames.Locking.Tests.csproj +++ b/tests/MfGames.Locking.Tests/MfGames.Locking.Tests.csproj @@ -11,26 +11,30 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + diff --git a/tests/MfGames.Markdown.Gemtext.Tests/MfGames.Markdown.Gemtext.Tests.csproj b/tests/MfGames.Markdown.Gemtext.Tests/MfGames.Markdown.Gemtext.Tests.csproj index 39c3c24..c62ee9f 100644 --- a/tests/MfGames.Markdown.Gemtext.Tests/MfGames.Markdown.Gemtext.Tests.csproj +++ b/tests/MfGames.Markdown.Gemtext.Tests/MfGames.Markdown.Gemtext.Tests.csproj @@ -7,8 +7,20 @@ - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -20,9 +32,9 @@ - - - + + + diff --git a/tests/MfGames.Markdown.Tests/MfGames.Markdown.Tests.csproj b/tests/MfGames.Markdown.Tests/MfGames.Markdown.Tests.csproj index b1bf03c..92e7dbe 100644 --- a/tests/MfGames.Markdown.Tests/MfGames.Markdown.Tests.csproj +++ b/tests/MfGames.Markdown.Tests/MfGames.Markdown.Tests.csproj @@ -8,8 +8,20 @@ - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -21,8 +33,8 @@ - - + + diff --git a/tests/MfGames.Nitride.Exec.Tests/MfGames.Nitride.Exec.Tests.csproj b/tests/MfGames.Nitride.Exec.Tests/MfGames.Nitride.Exec.Tests.csproj index 3e95551..1dba7f1 100644 --- a/tests/MfGames.Nitride.Exec.Tests/MfGames.Nitride.Exec.Tests.csproj +++ b/tests/MfGames.Nitride.Exec.Tests/MfGames.Nitride.Exec.Tests.csproj @@ -7,8 +7,20 @@ - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -20,10 +32,10 @@ - - - - + + + + diff --git a/tests/MfGames.Nitride.IO.Tests/MfGames.Nitride.IO.Tests.csproj b/tests/MfGames.Nitride.IO.Tests/MfGames.Nitride.IO.Tests.csproj index 43a3d31..4b9ddfc 100644 --- a/tests/MfGames.Nitride.IO.Tests/MfGames.Nitride.IO.Tests.csproj +++ b/tests/MfGames.Nitride.IO.Tests/MfGames.Nitride.IO.Tests.csproj @@ -6,23 +6,35 @@ - - - + + + - + - - - + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/MfGames.Nitride.Json.Tests/MfGames.Nitride.Json.Tests.csproj b/tests/MfGames.Nitride.Json.Tests/MfGames.Nitride.Json.Tests.csproj index 746506c..1615897 100644 --- a/tests/MfGames.Nitride.Json.Tests/MfGames.Nitride.Json.Tests.csproj +++ b/tests/MfGames.Nitride.Json.Tests/MfGames.Nitride.Json.Tests.csproj @@ -7,8 +7,20 @@ - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -20,9 +32,9 @@ - - - + + + diff --git a/tests/MfGames.Nitride.Markdown.Tests/MfGames.Nitride.Markdown.Tests.csproj b/tests/MfGames.Nitride.Markdown.Tests/MfGames.Nitride.Markdown.Tests.csproj index c1fb32e..49c79ba 100644 --- a/tests/MfGames.Nitride.Markdown.Tests/MfGames.Nitride.Markdown.Tests.csproj +++ b/tests/MfGames.Nitride.Markdown.Tests/MfGames.Nitride.Markdown.Tests.csproj @@ -6,16 +6,28 @@ - - + + - - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/MfGames.Nitride.Slugs.Tests/MfGames.Nitride.Slugs.Tests.csproj b/tests/MfGames.Nitride.Slugs.Tests/MfGames.Nitride.Slugs.Tests.csproj index 1923d2e..4b97824 100644 --- a/tests/MfGames.Nitride.Slugs.Tests/MfGames.Nitride.Slugs.Tests.csproj +++ b/tests/MfGames.Nitride.Slugs.Tests/MfGames.Nitride.Slugs.Tests.csproj @@ -6,20 +6,32 @@ - - - + + + - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/MfGames.Nitride.Temporal.Schedules.Tests/MfGames.Nitride.Temporal.Schedules.Tests.csproj b/tests/MfGames.Nitride.Temporal.Schedules.Tests/MfGames.Nitride.Temporal.Schedules.Tests.csproj index 0cba5ca..1b1bdf0 100644 --- a/tests/MfGames.Nitride.Temporal.Schedules.Tests/MfGames.Nitride.Temporal.Schedules.Tests.csproj +++ b/tests/MfGames.Nitride.Temporal.Schedules.Tests/MfGames.Nitride.Temporal.Schedules.Tests.csproj @@ -6,16 +6,28 @@ - - + + - - - + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/MfGames.Nitride.Temporal.Tests/MfGames.Nitride.Temporal.Tests.csproj b/tests/MfGames.Nitride.Temporal.Tests/MfGames.Nitride.Temporal.Tests.csproj index 4b98cf1..a9dd8ec 100644 --- a/tests/MfGames.Nitride.Temporal.Tests/MfGames.Nitride.Temporal.Tests.csproj +++ b/tests/MfGames.Nitride.Temporal.Tests/MfGames.Nitride.Temporal.Tests.csproj @@ -6,16 +6,28 @@ - - + + - - - + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/MfGames.Nitride.Tests/Entities/CreateOrUpdateIndexTests.cs b/tests/MfGames.Nitride.Tests/Entities/CreateOrUpdateIndexTests.cs index eb32322..e4d9152 100644 --- a/tests/MfGames.Nitride.Tests/Entities/CreateOrUpdateIndexTests.cs +++ b/tests/MfGames.Nitride.Tests/Entities/CreateOrUpdateIndexTests.cs @@ -219,7 +219,7 @@ public class CreateOrUpdateIndexTests : NitrideTestBase, IDisposable } return this.Index == other.Index - && this.Pages.SequenceEqual(other.Pages); + && this.Pages.SequenceEqual(other.Pages); } /// diff --git a/tests/MfGames.Nitride.Tests/MfGames.Nitride.Tests.csproj b/tests/MfGames.Nitride.Tests/MfGames.Nitride.Tests.csproj index 9eb5b8e..f6cfd5f 100644 --- a/tests/MfGames.Nitride.Tests/MfGames.Nitride.Tests.csproj +++ b/tests/MfGames.Nitride.Tests/MfGames.Nitride.Tests.csproj @@ -8,9 +8,21 @@ - - - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -22,8 +34,8 @@ - - + + diff --git a/tests/MfGames.Nitride.Yaml.Tests/MfGames.Nitride.Yaml.Tests.csproj b/tests/MfGames.Nitride.Yaml.Tests/MfGames.Nitride.Yaml.Tests.csproj index 02a4f15..6c58e9a 100644 --- a/tests/MfGames.Nitride.Yaml.Tests/MfGames.Nitride.Yaml.Tests.csproj +++ b/tests/MfGames.Nitride.Yaml.Tests/MfGames.Nitride.Yaml.Tests.csproj @@ -7,8 +7,20 @@ - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -20,9 +32,9 @@ - - - + + + diff --git a/tests/MfGames.ToolBuilder.Tests/MfGames.ToolBuilder.Tests.csproj b/tests/MfGames.ToolBuilder.Tests/MfGames.ToolBuilder.Tests.csproj index b55499b..e35a538 100644 --- a/tests/MfGames.ToolBuilder.Tests/MfGames.ToolBuilder.Tests.csproj +++ b/tests/MfGames.ToolBuilder.Tests/MfGames.ToolBuilder.Tests.csproj @@ -7,38 +7,38 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - - - + + + +