V5.2.0/add cli context - #35
Conversation
Updated all central NuGet package versions to latest stable releases across all dependency groups: Codebelt.Extensions, Cuemon, Microsoft.NET.Test.Sdk, and targeted framework-specific packages for net9 and net10.
Added analyzer warning suppressions (7035, CA2260, S6618), enabled code style enforcement in build, and configured MinVer tag prefix. Fixed incorrect AnalysisLevel property to AnalysisMode in test and benchmark project configurations.
Adjusted nginx base image from 1.31.2-alpine to 1.31-alpine to use the stable release channel for documentation build infrastructure.
Introduced CommandLineContext class to encapsulate and expose command-line arguments within the bootstrapper infrastructure, providing a consistent interface for accessing args across all project types.
Added comprehensive unit test coverage for CommandLineContext, verifying null-arg handling, empty arrays, populated arrays, and reference preservation across multiple property accesses.
Unit tests for ConsoleHostedService and MinimalConsoleHostedService provide validation of service initialization and lifecycle management. These tests ensure that startup delegates are properly invoked and that logging is correctly handled in both traditional and minimal console application patterns.
Extract nested callback logic into focused private methods: StartRunAsync, RunAsync, ResolveLogger, LogRunAsyncStarted, LogUnableToActivate, and LogFatalError. This improves code clarity, testability, and maintainability by reducing complexity in StartAsync and making error-handling paths explicit.
Add v5.2.0 release notes to all four package release-note files documenting the new CommandLineContext infrastructure, comprehensive test coverage, dependency updates, build analyzer enhancements, and refactored hosted service implementations.
Document v5.2.0 release with new CommandLineContext infrastructure, comprehensive unit test coverage for console hosted services, all dependency upgrades to latest stable releases, build analyzer enhancements with warning suppressions, refactored service implementations for improved code clarity, and DocFX infrastructure updates.
Greptile SummaryThis release adds a command-line argument context and refreshes console hosting, dependencies, build settings, documentation, and tests.
Confidence Score: 4/5The PR appears safe to merge, with only the previously reported release-description mismatch still outstanding. The implementation and API example present CommandLineContext as a directly constructed argument holder, while the changelog continues to characterize it as bootstrapper infrastructure. Files Needing Attention: CHANGELOG.md Important Files Changed
Reviews (3): Last reviewed commit: "✨ update commandlinecontext description ..." | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #35 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 22 +1
Lines 291 308 +17
Branches 23 29 +6
=========================================
+ Hits 291 308 +17 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This pull request introduces version 5.2.0 with several improvements, new features, and maintenance updates across the codebase. The most significant changes include the addition of the
CommandLineContextclass for handling command-line arguments, comprehensive refactoring of the console hosted services for better maintainability and testability, and upgrades to all major dependencies and build configurations. Documentation and release notes have also been updated to reflect these changes.New Features
CommandLineContextclass in theCodebelt.Bootstrappernamespace to encapsulate and provide consistent access to command-line arguments within the bootstrapper infrastructure. [1] [2]Service Refactoring and Testability
ConsoleHostedServiceandMinimalConsoleHostedServiceto extract nested callback logic into focused private methods (StartRunAsync,RunAsync,ResolveLogger,LogRunAsyncStarted,LogUnableToActivate,LogFatalError) for improved code clarity, testability, and maintainability. [1] [2]CommandLineContext,ConsoleHostedService, andMinimalConsoleHostedService. [1] [2]Dependency and Build System Upgrades
Codebelt.Extensions.Swashbuckle.AspNetCore,Codebelt.Extensions.Xunit.App,Cuemon.Core,Cuemon.Extensions.Hosting,Microsoft.NET.Test.Sdk, and allMicrosoft.AspNetCoreandMicrosoft.Extensionspackages for net9 and net10). [1] [2] [3] [4] [5]Documentation and Release Notes
BootstrapperLogMessagesin API documentation.Infrastructure
1.31-alpineto use the stable release channel for documentation build infrastructure.