All Versions
12
Latest Version
Avg Release Cycle
-
Latest Release
-

Changelog History
Page 1

  • v3.1.0 Changes

    • .NET 6 support (including DateOnly and TimeOnly).
    • Added InteractiveModeOptions.Prompt, InteractiveModeOptions.SetDefaultPrompt() and InteractiveModeOptions.SetPrompt() for specifying custom prompt template. PromptForeground and ScopeForeground can still be used to configure foreground without changing prompt template.
    • Added support for custom binding converters BindingConverter<T> - see ArgumentBindingConverterTests for examples.
    • Added BindableArgument and BindableArgument.Bindable, as well as marked ArgumentSchema.Property, ArgumentSchema.IsScalar, and ArgumentSchema.GetValidValues() obsolete - will be removed in Typin 4.0.
    • BindableArgument.IsScalar and BindableArgument.GetValidValues() are now optimized with a simple cache (backing field).
    • Faster Guid binding by explicit Guid.Parse() call (added Guid to ArgumentBinder.PrimitiveConverters).
    • Changed default values format in help - now in round brackets.
    • Fixed StackTraceParser: add a filter for --- End of stack trace from previous location --- and --- End of stack trace from previous location where exception was thrown ---.
    • Fixed invalid help text: Environment variable: instead of Fallback variable:.
    • Fixed default version format (complex versions like 3.0.0-beta1 were incorrectly dispalyed as 3.0.0).
    • Fixed console not being disposed when stopping the application (for consoles that were created within CliApplicationBuilder).
    • Fixed showing choices for non-scalar nullable and non-nullable enum arguments.
    • Fixed dependency injection IDisposable anti-pattern in IConsole - IDisposable is no longer present in IConsole. If you wish to use it, implement it in IConsole implementation.
    • Removed IDisposable from CliContext.
  • v3.0.4 Changes

    • Fixed issue #208: interactive mode executes the command line arguments at every new commands.
  • v3.0.3 Changes

    • Fixed DefaultDirective ([!]) executes default command - unable to execute scoped command without parameters, e.g., [>] books\r [!]\r was executing default command.
    • Fixed DefaultDirective behavior (more consistent with direct mode): it WILL NOT (was: WILL) force default command execution when input contains default commmand parameter values equal to command/subcommand name.
  • v3.0.2 Changes

    • Fixed CliApplicationBuilder.UseHelpWriter<> - it was using UseOptionFallbackProvider(Type) instead of UseHelpWriter(Type).
  • v3.0.1 Changes

    • Fixed Ctrl+C in interactive mode.
    • .NET 5/C# 9 related refactor.
  • v3.0.0 Changes

    • โž• Added Typin.Core library.
    • Core middleware execution order has changed: ResolveCommandSchemaAndInstance -> InitializeDirectives -> ExecuteDirectivesSubpipeline -> [Directives subpipeline] -> HandleSpecialOptions -> BindInput -> [User middlewares] -> ExecuteCommand.
    • ๐Ÿ“‡ Renamed normal mode to direct mode, and added support for custom modes.
    • ๐Ÿ‘ป It is now possible to register multiple exception handleres to handle different exceptions in app.
    • ๐Ÿšš Major API and command execution changes: a) added ICliApplicationLifetime, ICliMode, ICliCommandExecutor, ICliApplicationLifetime, DirectMode, InteractiveMode, IPipelinedDirective, and more; b) removed InteractiveCliApplication.
    • โœ‚ Removed HandleInteractiveDirective and HandleInteractiveCommands middlewares.
    • ๐Ÿ‘ Replaced IsInteractiveModeOnly with SupportedModes and ExcludedModes.
    • โž• Added support for options with no name by automatic conversion of property names.
    • โž• Added native support for .NET 5.0 (including usage of init instead of get).
    • โž• Added Typin.Console.IO namespace with IStandardInput, IStandardOuput, IStandardError, IStandardOutputAndError, IStandardRedirectableConsoleStream, StandardStreamReader, StandardStreamWriter.
    • Rewritten Typin.Core.Console.ConsoleExtensions to target StandardStreamWriter.
    • ๐Ÿ‘‰ User middlewares are now executed after command instance creation.
    • Middleware types collection in ApplicationConfiguration order was reversed.
    • ๐Ÿ”€ Merged HandleVersionOption and HandleHelpOption into one middleware named HandleSpecialOptions.
    • โœ‚ Removed unnecessary casts to CliContext from ICliContext.
    • โœ‚ Removed IDirective.ContinueExecution, modified IDirective, and added IPipelinedDirective.
    • CommandPipelineHandlerDelegate now uses ValueTask instead of a Task.
    • โž• Added logging with Microsoft.Extensions.Logging (default logger is DebugLogger).
    • โž• Added IConsole.ReadKeyAsync().
    • Option name with 3 characters is no longer treated as option alias (e.g., --h is not -h).
    • Option name and short name must start with letter (previously not start with digit).
    • Parameter names are generated using StringExtensions.ToHyphenCase() instead of string.ToLowerInvariant().
    • ๐Ÿ‘ป Option attributes are validated in ctor, and appropiate exception is thrown without the need of resolving RootSchema.
    • โž• Added TextUtils.UnescapeChar() and a support for the following escape sequences: '\0', '\a', '\b', '\f', '\n', '\r', '\t', '\v', '\\', and Unicode escape e.g. \u006A) during char parsing.
    • โž• Added CliApplication.RunAsync with string command line and replaced IReadOnlyList<string> with IEnumerable<string>.
    • Advanced interactive input is disabled when input is redirected.
    • โž• Added IRootSchemaAccessor and IEnvironmentVariablesAccessor singleton services;
    • โž• Added ExceptionFormatter utility and used it as a default exception printer in DefaultExceptionHandler.
    • ๐Ÿ”จ TableUtils refactory and fix for proper handling of empty collection.
    • [!] directive is now required only to execute command without parameters and options.
    • โž• Added startup message color personalization, and replaced string formating based on macros with Func<ApplicationMetadata, string> and Action<ApplicationMetadata, IConsole>.
    • ๐Ÿ›  Fixed case-sensitivity of command and option names (always case-sesitive).
    • ๐Ÿ›  Fixed interactive mode autocompletion results (fo 'column chan' TAB TAB result was 'column column change-range' instead of 'column change-range').
  • v2.1.1 Changes

    • ๐Ÿ›  Fixed CommandOptionInput.IsOptionAlias bug.
    • It is no possible to scope to cmd command even if there is only cmd sub in application.
    • โž• Added CommandInput.Arguments.
    • โž• Added RootSchema.IsCommandOrSubcommandPart().
    • [>] is now not resseting the scope when no name after [>].
  • v2.1 Changes

    • Schemas resolving improvements
    • โž• Added support for strings with spaces by surrounding with " in interactive mode (to escape " type "") with a custom command line splitter that works in both interactive and direct modes.
    • ๐Ÿ›  Fixed negative numbers handling by forbidding options starting from digit. Options must have a name starting from char other than digit, while short name must not be a digit.
    • ๐Ÿ›  Auto-completion bug fixes.
  • v2.0 Changes

    • โž• Added preview of custom DI containter support (CliApplicationBuilder.UseServiceProviderFactory and CliApplicationBuilder.ConfigureContainer).
    • โž• Added ShortcutDefinition struct and user defined shortcuts configuration in CliApplicationBuilder.UseInteractiveMode(...).
    • ๐Ÿ‘Œ Improvements in shortcuts handling.
    • 0๏ธโƒฃ Renamed [default] directive to [!].
    • 0๏ธโƒฃ [!] directive is now required to execute user-defined default command. However, -h, --help, --version will still work without [!] directive.
    • ๐Ÿ‘Œ Improvements in Ctrl+[Delete/Backspace/ArrowLeft/ArrowRight] handling.
    • ๐Ÿ“‡ Renamed EnvironmentVariableName to FallbackVariableName.
    • โž• Added IOptionFallbackProvider, as well as EnvironmentVariableFallbackProvider as default implementation of IOptionFallbackProvider and EmptyFallbackProvider that can be used to disable fallback.
    • Command execution now heavily uses middleware pipeline (ResolveCommandSchema -> HandleVersionOption -> ResolveCommandInstance -> HandleInteractiveDirective -> HandleHelpOption -> HandleInteractiveCommands -> ExecuteCommand).
    • โž• Added CliExecutionScope and ensured that Context.Input, Context.Command, Context.CommandDefaultValues, Context.CommandSchema, and Context.ExitCode are reset to default values after middleware pipeline execution.
    • โž• Added IHelpWriter, renamed HelpTextWriter to DefaultHelpWriter, and made DefaultHelpWriter a public class.
    • ๐Ÿ›  Fixed AddDirectivesFrom(Assembly directiveAssembly) and AddDirectivesFrom(IEnumerable<Assembly> directiveAssemblies).
    • โœ‚ Removed partial classes.
  • v1.0.1 Changes

    • โœ‚ Removed middleware delegate parameters.