Skip to content

Releases: xo-energy/XO.Console.Cli

v5.0.56

11 Jun 13:43
Compare
Choose a tag to compare

What's Changed

  • Add net8.0 targets and update dependencies by @wjrogers in #9
  • Replace runtime reflection with compile-time source generator by @wjrogers in #8

Breaking Changes

  • For a given command, declarative configuration with CommandAttribute and imperative configuration with ICommandBuilder are mutually exclusive. CommandAttribute automatically adds the target command type to the application, and it has new properties that provide access to all command configuration options. (You can still mix declarative and imperative configuration of different commands in the same application. Be sure to omit CommandAttribute from any type you want to configure through the builder.)
  • Instead of using DescriptionAttribute to set the help text for commands, arguments, and options, use the Description property of CommandAttribute, CommandArgumentAttribute, and CommandOptionAttribute, respectively.
  • Support for typed global options has been removed. ICommandContext provides access to the raw string values of global options.
  • Some infrastructure types have been moved, renamed, or deleted.

Packages

Full Changelog: v4.0.3...v5.0.56

v4.0.3

22 Jun 03:51
Compare
Choose a tag to compare

What's Changed

  • Replace complicated reflection-based middleware support w/ interface by @wjrogers in #4
  • Add XO.Console.Cli.Instrumentation with support for OpenTelemetry by @wjrogers in #6
  • Expose ParseResult as a property of ICommandContext (#3)
  • Don't swallow exceptions in hosting extension methods (#5)

Full Changelog: v3.0.7...v4.0.3

Packages

v3.0.7

29 Aug 16:16
Compare
Choose a tag to compare

What's Changed

  • Refactor hosting extensions to resolve ICommandApp as a service by @wjrogers in #2

Full Changelog: v2.0.10...v3.0.7

v2.0.10

19 Jul 13:38
Compare
Choose a tag to compare

Changes

  • Fix parsing Enum parameter values (15cc953)

Full Changelog: v2.0.5...v2.0.10

v2.0.5

09 Jun 16:50
Compare
Choose a tag to compare

Changes

Breaking change: CommandContext implements IAsyncDisposable and IDisposable. Callers of CommandApp.Bind() must dispose the returned context to release its service scope. (The all-in-one ExecuteAsync(string[], CancellationToken) extension method does this for you.)

  • Support scoped dependency resolution by creating a new service scope in CommandApp.Bind() and using it to resolve the command and parameters instances
  • Add a scoped dependency resolution abstraction:
    • Implementations of ITypeResolver may, optionally, also implement ITypeResolverScopeFactory
    • If possible, CommandApp calls ITypeResolverScopeFactory.CreateScope() to get an instance of ITypeResolverScope
    • The scoped ITypeResolver instance is exposed as CommandContext.CommandServices for use by middleware
  • Implement ITypeResolverScopeFactory in XO.Console.Cli.Extensions for seamless integration with Microsoft.Extensions.DependencyInjection

Full Changelog: v1.1.4...v2.0.5

v1.1.4

16 May 17:22
Compare
Choose a tag to compare

Initial release