Commit Graph

579 Commits

Author SHA1 Message Date
Janne Valkealahti
2ba288cb54 Fix ShellOption with required
- Take 2
- Fix case with optional.
- Fixes #436
2022-06-02 09:55:55 +01:00
Janne Valkealahti
f7992a682e Fix ShellOption with required
- Where applicable mark option required so that
  user is notified instead of blindly using null.
- Fixes #436
2022-06-02 08:41:48 +01:00
Janne Valkealahti
0be37d164f Split e2e sample commands 2022-06-02 07:46:43 +01:00
Janne Valkealahti
c2774b9d8f Label workflow 2022-06-01 08:41:35 +01:00
Janne Valkealahti
7201a25567 Make ConversionService customisable
- Add ShellConversionServiceSupplier interface to define
  shell spesific ConversionService so that we don't
  get trouble with other services in boot.
- Fixes #435
2022-05-31 12:58:10 +01:00
Janne Valkealahti
3891a8b375 Add support for exit codes
- New configurations to CommandRegistration
- Re-using exit code concepts from boot
- Handling exit codes only in non-interactive mode
- Adding e2e commands and tests for better coverage
- Fixes #431
2022-05-31 07:49:50 +01:00
Janne Valkealahti
08428c88cb Add timeout to pr workflow 2022-05-30 14:13:20 +01:00
Janne Valkealahti
0fa85cba83 Update boot 2.7.0
- Pump spring-native 0.12.0 as needed by boot 2.7.0
- Fixes #419
2022-05-30 11:10:07 +01:00
Janne Valkealahti
a673310edc Fix tests for win 2022-05-28 08:37:56 +01:00
Jay Bryant
2af4e86925 Editing pass
for a bunch of new content to support the new version.
2022-05-28 08:27:36 +01:00
Janne Valkealahti
9779b5c729 Better errors with non-interactive mode
- Change how errors are printed for interactive
  vs non-interactive mode.
- This now changes behaviour so that stacktrace is printed
  if non-interactive mode is active so that user has a change
  to see the full error.
- Fixes #427
2022-05-27 09:09:21 +01:00
Janne Valkealahti
b194660ffa Set jdk11 if samples are enabled 2022-05-26 08:18:34 +01:00
Janne Valkealahti
5470e29a9c Add spring release repo to samples
- This is to be able to import project without having
  active spring profile. Basically needed for spring-native
  which is not in central.
2022-05-26 07:48:40 +01:00
Janne Valkealahti
bd9ab62013 Rework help command
- Change help command output to get templated using
  model classes.
- Remove things around ParameterDescription as those are
  replaced with template classes.
- Fixes for native configs.
- For now availability and aliases are removed from
  help to get back in better form.
- Aliases has been partly introduced to structure.
- Fixes #422
2022-05-26 07:45:35 +01:00
Janne Valkealahti
eed1d84653 Update docs 2022-05-18 09:44:26 +01:00
Janne Valkealahti
baf8346063 Change help to description in command registration
- Fixes #421
2022-05-18 08:59:57 +01:00
Janne Valkealahti
c7d3eb15b4 Expose CommandRegistration in CommandContext
- Fixes #420
2022-05-18 08:18:38 +01:00
Janne Valkealahti
b119473881 New e2e test 2022-05-18 08:01:24 +01:00
Janne Valkealahti
57f6cff7c6 Convert default value
- Change parser to user conversion service to attempt
  conversion from a default value to an expected type.
- Make more use of shellConversionService bean so that
  we use the one which can be customized.
2022-05-18 08:00:49 +01:00
Janne Valkealahti
6a1158dc12 Make history file path configurable
- UserConfigPathProvider interface to provid "user-level"
  config directory which can be used within a shell.
- New options which can be used to configure behaviour.
  spring.shell.history.enabled
  spring.shell.history.name
  spring.shell.config.location
  spring.shell.config.env
- Fixes #417
2022-05-17 18:29:58 +01:00
Janne Valkealahti
f2d97ae2de Upload surefire reports in manual workflow 2022-05-17 16:14:46 +01:00
Janne Valkealahti
4a05106d86 Add manual build and test workflow 2022-05-17 10:24:15 +01:00
Janne Valkealahti
3a832b1a8e Add e2e readme 2022-05-15 20:04:20 +01:00
Janne Valkealahti
0f655a03ce Add missing headers to snippets 2022-05-15 16:46:42 +01:00
Janne Valkealahti
ac451ad4d0 Schedule e2e tests 3 times per week 2022-05-15 16:37:14 +01:00
Janne Valkealahti
7224ee31de Update e2e tests
- Add new e2e group to samples which can be used
  with particular tests.
- Relates #401
2022-05-15 16:29:48 +01:00
Janne Valkealahti
ee21619885 Update docs 2022-05-15 16:29:23 +01:00
Janne Valkealahti
60e63f87ae Update docs 2022-05-14 17:08:09 +01:00
Janne Valkealahti
ab476345fa Update docs 2022-05-14 16:36:53 +01:00
Janne Valkealahti
3599182536 Update docs 2022-05-14 09:02:37 +01:00
Janne Valkealahti
751c9e213e Update docs 2022-05-13 17:28:32 +01:00
Janne Valkealahti
d49429975d Expose default option in SingleItemSelector
- Tweak flow framework so that single item selector
  can be configured with a default item which is then
  "exposed" automatically so that user can just hit enter.
- Fixes #414
2022-05-13 15:38:37 +01:00
Janne Valkealahti
8477a5ac4c Update docs
- Add docs for component flow
- Relates #383
2022-05-11 15:36:10 +01:00
Janne Valkealahti
bed8457ff2 Update docs
- Split some adoc files
- Shuffle to reorg structure
- Relates #383
2022-05-11 10:18:11 +01:00
Janne Valkealahti
3515885993 Update graal 22.1.0 in e2e tests 2022-05-11 07:59:50 +01:00
Janne Valkealahti
0085df585a Update boot 2.6.7
- Update spring-native 0.11.5 as that should be used with
  boot 2.6.7.
- Fixes #411
2022-05-11 07:49:52 +01:00
Janne Valkealahti
38645a3cc2 Fix pr workflow
- Use corret jdk
- Relates #407
2022-05-11 07:24:47 +01:00
Janne Valkealahti
75ff6e976f Fix use of default values
- Change parsing to extract and use option default value
  and also hook it with @ShellOption.
- Fixes #409
2022-05-11 07:23:11 +01:00
Janne Valkealahti
6738c92117 Change samples build with workflows
- Relates #407
2022-05-10 16:23:04 +01:00
Janne Valkealahti
32baac91d5 Fix ConversionService in auto-config
- Now using qualifier for one we expect which should
  work if some other services are in a context.
- Properly use shellConversionService in defined
  MethodArgumentResolver beans.
- Fixes #400
2022-05-10 14:03:34 +01:00
Janne Valkealahti
1a1864f8c5 Update e2e tests
- Tweak things on win for settings combinations which might
  work with all trouble you're getting from win versions and
  node-pty, etc.
- Relates #401
2022-05-10 09:42:00 +01:00
Janne Valkealahti
8af3bd892e Change e2e timeouts
- Relates #401
2022-05-08 14:41:59 +01:00
Janne Valkealahti
c6a8e1c65c Update e2e tests
- Fix native configs for win in sample app.
- Integrate spring-native with samples app.
- Tweak e2e workflow to upload artifacts and some other generic changes.
- Relates #401
2022-05-08 14:19:35 +01:00
Janne Valkealahti
6d39c2b059 Change e2e timeouts
- Relates #401
2022-05-08 08:13:54 +01:00
Janne Valkealahti
d05d829a6f Change e2e timeouts
- Relates #401
2022-05-08 07:53:47 +01:00
Janne Valkealahti
3743a7f32d Initial attempt for e2e tests
- Add node code for e2e tests. This is a first take to try running
  these tests via actions.
- Relates to #401
2022-05-07 17:51:51 +01:00
Janne Valkealahti
8a23518b84 Rework command subsystem
- Focus of these changes are to introduce a new command system based on
  real registrations (new way) instead of continuously (old way) resolve
  methods and its parameters via reflection.
- There's a lot of changes as this resolution via reflection had its
  hooks almost everywhere and thus most changes are just refactorings.
- Order to understand real changes I'd start to look classes under
  `org.springframework.shell.command` package as it defines new registration,
  catalog and parser classes. Also samples contain new classes to demonstrate
  new functionality.
- Fixes #380
2022-05-06 08:32:53 +01:00
Janne Valkealahti
81e5bf8c81 Fix auto-config
- Remove JCommanderParameterResolverAutoConfiguration from
  spring.factories as it was mistake not to remove it.
- Relates #395
2022-05-03 16:08:07 +01:00
Janne Valkealahti
4e625feb03 Drop jcommander
- Fixes #395
2022-04-29 15:55:21 +01:00
Janne Valkealahti
d16cda75f3 Drop spring-shell-test-samples
- Fixes #394
2022-04-29 15:17:34 +01:00