Skip to content

Version 0.0.3

Pre-release
Pre-release
Compare
Choose a tag to compare
@darvil82 darvil82 released this 23 Oct 18:53
· 594 commits to main since this release
d99a902

Features

  • New Command Template argument types that can be inferred from the field:
    • File, giving a FileArgumentType.
    • String[], giving a MultipleStringsArgumentType.
    • Array type for all the non-primitive number types (Integer, Double, Byte, etc). Uses the new MultipleNumbersArgumentType.
  • Improve registering system for infer types. (Now ArgumentTypeInfer)
    • Now accepts function references instead of class types.
  • Refactor TupleArgumentType so that now it acts as a mapper of strings (argument values) to what a subtype decides to parse to.
    • Refactor MultipleStringsArgumentType and MultipleNumbersArgumentType to now inherit this class.
  • Improve FileArgumentType:
    • Add mustExist option. When true, requires the specified path to exist.
    • Now possible to specify if the file should be a directory or a regular file.
    • Improved the generated description and representation.
  • Change default option chain for ArgumentParser#parseFromInto.
  • Make errors clearer for Command Templates when attempting to instantiate the class fails.

Fixes

  • Small optimizations.
  • FileArgumentType not behaving as expected.
  • ArgumentTypeInfer#register allowing to pass no Classes, essentially doing nothing.
  • ArgumentTypeInfer#register allowing to overwrite previous definitions.
  • Default version argument showing "Version: null" if no version was defined. Now shows "unknown".
  • Synopsis help layout generator appending an extra space character when printing commands.
  • Blank string not being detected as no input (CLInput).