Commit Graph

779 Commits

Author SHA1 Message Date
Janne Valkealahti
2d714c04cf Upgrade spring-boot 3.1.0-RC1
- Fixes #717
2023-04-27 20:48:40 +01:00
Janne Valkealahti
fa1adeaa82 Disable tests with manual build 2023-04-10 17:56:17 +01:00
Janne Valkealahti
0f5f5e0ca7 Upload buildlogs with failure in e2e tests 2023-04-10 16:27:41 +01:00
Janne Valkealahti
b934ddeccb Polish 2023-04-10 15:56:11 +01:00
Janne Valkealahti
5a4a241cb8 Refactor short option docs
- Add e2e samples
- Add short option snippets as tabs content(to get later
  converted to an actual tabs).
- Relates #637
2023-04-10 14:48:57 +01:00
Janne Valkealahti
62e469be49 Polish naming in docs
- Relates #637
2023-04-08 17:15:47 +01:00
Janne Valkealahti
efbc223118 Refactor option basic docs
- Document better a relationship between annotation,
  legacy annotation and programmatic registration.
- Relates #637
2023-04-07 16:54:55 +01:00
cachescrubber
84cb5a7332 Pass ShellContext to CommandCatalog.of in CommandCatalogAutoConfiguration (#693)
- Fixes #702
2023-04-06 09:08:09 +01:00
Janne Valkealahti
a05752713d Revert "Update issue handler for prs"
This reverts commit fbbfd7b9c9.
2023-04-06 08:49:49 +01:00
Janne Valkealahti
fbbfd7b9c9 Update issue handler for prs 2023-04-06 08:45:33 +01:00
Janne Valkealahti
2e19929a32 Fix option type parsing
- In `CommandRegistration` add `ResolvableType` for `OptionSpec` giving
  more spesific handling of a type.
- In `CommandParser` handle source and target types so that we
  have generics with `List`, `Set` and arrays working better.
- In `HandlerMethodArgumentResolver` add better handling for
  `ConversionService` for generic types.
- In `StandardMethodTargetRegistrar` add better types via `ResolvableType`
  now that `CommandRegistration` support it.
- In `OptionConversionCommands` remove converter from `String` to `Set` as
  now things should work as is if generic in a `Set` has a converter.
- Backport #694 #699
- Fixes #700
2023-04-05 18:56:09 +01:00
Janne Valkealahti
64abc1da22 Fix positional args with new parser
- Better alignment for use of positional args without using
  an option.
- Should work similarly with old parsing framework.
- Change position where missing options are checked.
- Fixes #701
2023-04-05 13:42:22 +01:00
Janne Valkealahti
a3a6c0e15a Update labels 2023-04-01 14:23:08 +01:00
Janne Valkealahti
e7b4c82e34 Upgrade spring-boot 3.1.0-M2
- Fixes #697
2023-03-24 16:06:34 +00:00
Janne Valkealahti
575d95428b Update docs copyright year 2023-03-18 16:50:38 +00:00
Janne Valkealahti
a9c52e2a19 Add notes to docs about new annotation model
- Relates #637
2023-03-18 16:40:34 +00:00
Janne Valkealahti
cfd2b7f72e Fix ConfirmationInput template message
- Fix confirmation-input-default.stg to use correct style
  names in format.
- Fixes #690
2023-03-17 08:40:41 +00:00
Janne Valkealahti
0363b38204 Polish 2023-03-13 08:56:42 +00:00
Janne Valkealahti
93f2cf00de Rename name to provider
- Align naming in CommandAvailability
- Relates #663
2023-03-13 08:54:23 +00:00
Simon Verhoeven
60126b9c47 Rename setMaskCharater to setMaskCharacter 2023-03-12 16:08:54 +00:00
Janne Valkealahti
eaa3e5caf9 OptionValues supports multiple resolvers
- Change ref field in OptionValues to providers
  takin an array.
- Relates #637
2023-03-05 16:38:01 +00:00
Janne Valkealahti
d4506d2583 Fix setup-java configs 2023-02-27 17:46:20 +00:00
Janne Valkealahti
c46bf91dae Wrong arity for default boolean type
- Set boolean type arity zero or more as default.
- Fixes #675
2023-02-27 10:12:09 +00:00
Janne Valkealahti
fd73531986 Document @Option long name
- Relates #637
2023-02-24 12:18:16 +00:00
Janne Valkealahti
07e08b36a7 Document registration with @Command
- Split and separate new annotations with legacy annotations
  on a registration level.
- Relates #637
2023-02-24 09:55:26 +00:00
Janne Valkealahti
1170ec965c Upgrade spring-boot 3.1.0-M1
- Fixes #662
2023-02-24 08:54:49 +00:00
Janne Valkealahti
44734fd634 Rename command registration doc files 2023-02-23 09:57:42 +00:00
Janne Valkealahti
9f16ccd57e Polish 2023-02-19 09:32:28 +00:00
Janne Valkealahti
3d3d37294f Use correct type with set
- When target is set and only one option argument is given,
  we should not convert to list as user expects string to xxx
  Converter to work.
- This is how it used to work and previous changes caused
  regression.
- Bug is actually in an old parser and new parser works fine.
- Fixes #667
2023-02-18 14:19:56 +00:00
Janne Valkealahti
cf1a6f7839 Add support defining Availability with annotated method
- This is for new annotation model
- @CommandAvailability which takes names of
  AvailabilityProvider beans supplying Availability info.
- Relates #663
2023-02-09 21:18:22 +00:00
Janne Valkealahti
cb998fae08 Upgrade setup-jfrog-cli action 2023-02-08 17:21:06 +00:00
Janne Valkealahti
8ba7d335b5 Upgrade checkout and setup-java actions 2023-02-08 16:15:58 +00:00
jongwooo
87914b27f5 Replace deprecated command with environment file
Signed-off-by: jongwooo <jongwooo.han@gmail.com>
2023-02-08 16:07:09 +00:00
Janne Valkealahti
75b8a0c90e Rework command parser
- Previously CommandParser contained parser which was
  scannerless type of brute force parsing of command
  line args.
- Contract in that old parser wasn't super clear what
  is its role with caller as it was given options
  and registration was parsed in a Shell class.
- Add completely new parser package which has better
  model and which will be much easier to modify for
  future needs.
- Change some interfaces around parsing so that we do
  as much in this new parsing model instead of pre-parsing
  something in a Shell class.
- We also try to move away from using exceptions as
  a message delivery which had its own problems. Instead
  introducing parser messages which gives better info
  when errors are detected.
- Add ParserConfig class which allows to expose settings
  to change some parser features. Later this will be
  exposed to user so that some features can be turned on/off
  for an actual shell needs.
- Fixes #646
2023-02-08 15:47:08 +00:00
Janne Valkealahti
e8d5d70792 Make annotated command visible to native
- Use @Reflective with @Command
- This should automatically register reflection hints
  and make native work again
- Relates #638
2023-02-08 14:04:42 +00:00
Janne Valkealahti
e721bc57f3 Switch to spring-boot 3.1.0 snapshots
- Relates #662
2023-02-05 17:06:01 +00:00
Janne Valkealahti
006ed5e443 Better e2e tests coverage
- Add integration tests for e2e samples.
- Add some missing commands for new annotation system.
- Fixes #654
2023-02-05 16:21:45 +00:00
Janne Valkealahti
a95e60dd8b Test terminal can set dimensions
- ShellTest now has fields which can be used to
  change terminal default widht/height.
- Backed by properties so can be used with
  `spring.shell.test.terminal-width` and
  `spring.shell.test.terminal-height`.
- Fixes #656
2023-02-05 15:24:36 +00:00
Janne Valkealahti
809e296e55 Handle arg looking options better
- Now lexing better with valid options
- Only report unrecognised option with double dash
  as current parser don't have structure to do
  deeper analysis.
- Fixes #651
2023-02-01 09:29:20 +00:00
Janne Valkealahti
3ce7afac6b CommandRegistration should return same options
- Cache created CommandOption(s) to return same instance.
- Fixes #648
2023-01-28 17:13:29 +00:00
Janne Valkealahti
347b49b262 Update readme 2023-01-28 08:34:52 +00:00
Janne Valkealahti
fcb4f076cd Update readme 2023-01-27 13:00:20 +00:00
Janne Valkealahti
de1a3baf18 New annotation model
- This is a first commit to add new annotation model
  which eventually will replace old legacy annotations
  like ShellComponent, ShellMethod, @ShellOption, etc.
- Adds subset of features needed for parity with manual
  use of CommandRegistration.
- Relates #637
- Relates #638
- Relates #639
- Relates #640
- Relates #641
2023-01-27 12:04:21 +00:00
Janne Valkealahti
d1c482cd49 OptionArity NONE value
- Fixes #644
2023-01-27 09:41:03 +00:00
Janne Valkealahti
03b343812d Reorganise e2e samples
- Fixes #642
2023-01-26 14:18:24 +00:00
Janne Valkealahti
2f298ccb6a Define CommandExceptionResolver bean order
- CommandParserExceptionResolver uses default bean
  order -100.
- Fixes #634
2023-01-25 17:57:13 +00:00
Janne Valkealahti
4f50961976 Start next minor development version 2023-01-24 13:42:28 +00:00
github-actions[bot]
bd7f5b882c Next development version 2023-01-24 10:23:23 +00:00
Janne Valkealahti
d44d0c3016 Update next version workflow 2023-01-23 11:32:14 +00:00
Janne Valkealahti
ae3af74b20 Update release workflow 2023-01-23 11:04:07 +00:00