Typin v3.0.0 Release Notes

    • โž• 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').