Commit Graph

495 Commits

Author SHA1 Message Date
Janne Valkealahti
e8a42e0633 Fix javadoc publish
- Attempt to get api docs into static bundle.
- Relates #351
2022-01-23 15:10:37 +00:00
nicolas
91d355cb26 expose words for end users to take some default action
- Fixes #293
- Polished PR #294
2022-01-23 10:06:39 +00:00
Janne Valkealahti
52ff4a2d85 Add version command
- Add new styling system which works around concept that
  you use tags to request jline styles where tags comes
  from an activated theme.
- There is a default theme with options to add custom
  ones and change it via property.
- Add templating system which uses antlr stringtemplate which
  allows to write output with a template instead of manually
  crafting code.
- Add version command which integrates to Boot's BuildProperties
  and GitProperties. Only version field is visible on default
  and others can be enabled/disable via properties.
- Fixes #352
- Fixes #353
2022-01-23 09:23:16 +00:00
Janne Valkealahti
0fb5b5ee7a Change maven version in workflows 2022-01-21 13:24:24 +00:00
Janne Valkealahti
0f86b668a8 Add next dev version workflow 2022-01-21 13:18:47 +00:00
Janne Valkealahti
254e5c79a1 Update boot 2.6.3
- Fixes #350
2022-01-21 10:40:12 +00:00
Janne Valkealahti
cde73ec2c0 Update docs 2022-01-21 09:28:22 +00:00
Janne Valkealahti
6c2e858534 Fix docs copyright year 2022-01-18 13:23:56 +00:00
Janne Valkealahti
e145588475 Add milestone release workflow 2022-01-18 13:13:49 +00:00
Janne Valkealahti
dbe8a8b408 Separate interactive and non-interactive commands
- Add new ShellContext concept which now is just a way
  to stash info about interaction mode where ShellRunner
  can update supported mode.
- ShellMethod has a new field interactionMode which user
  can use to define commands between interactive/non-interactive
  modes which then prevents CommandRegistry to show
  commands at runtime.
- Fixes #345
2022-01-09 14:15:47 +00:00
Janne Valkealahti
3cb3309d68 Rename ShellRunner classes 2022-01-08 09:34:59 +00:00
Janne Valkealahti
668ddb458e Completion command for bash
- Add basic support of defining a command `completion bash` which
  outputs a generic bash script which can be used in a user environment.
- Idea for completion is copied from go's cobra library what comes for
  a bash dance itself.
- Goes through command registry, builds a model for command structure
  and uses antlr st4 for templating bash.
- Should give foundation to create other completions just like in cobra.
- Currently as we don't know a root-command in a generic way, option
  `spring.shell.command.completion.root-command` is required user to set.
- Fixes #343
2022-01-07 10:02:51 +00:00
Janne Valkealahti
7298b2ce78 Support for non-interactive shell commands
- Add support for running shell commands as a non-interactive mode.
- This works by adding new ShellApplicationRunner interface which is
  an extension to ApplicationRunner forcing to have exactly one main
  ApplicationRunner and then DefaultApplicationRunner dispatches to
  new interface ShellRunner which allows to pick between script,
  interactive and non-interactive, etc.
- It is sort of a breaking change but works much better not having
  a need to have previous hooks between application runners to disable
  things at runtime.
- All this makes it closer for a user to have a choice between
  using shell commands as is without entering interactive mode.
- Also add SpringShellProperties for better config props support
  for boot users.
- Fixes #342
2021-12-31 15:30:52 +00:00
Janne Valkealahti
7042d1f83b Rework shellConversionService
- Replace old ConversionService impl with something more aligned
  with current boot code with partially shameless copy as
  shell is most likely working outside of web or webflux env
  by creating FormattingConversionService and hooking convertes
  from DefaultConversionService.
- This should work on most cases and giving user a hook
  to define their own service.
2021-12-24 15:04:40 +00:00
Janne Valkealahti
58792bc695 Disable tests for publish
- For now as there is a weird error with running
  mvn build via jfrog, disable running tests as
  those are ran with various jdk's before publish
  is executed.
2021-12-24 14:19:19 +00:00
Janne Valkealahti
d578f28662 Polish 2021-12-24 13:54:41 +00:00
Janne Valkealahti
05311ffcdc Remove cache from publish 2021-12-24 13:43:12 +00:00
Janne Valkealahti
54702460d1 Make sample to work with spring-native
- While project uses jdk8, you can do native build with jdk11
  `./mvnw clean package -Pnative`
- You can then run these
  spring-shell-samples/target/spring-shell-samples
  java -jar spring-shell-samples/target/spring-shell-samples-3.0.0-SNAPSHOT-exec.jar
- Remove logback.xml in favour of spring config to workaround for
  https://github.com/spring-projects-experimental/spring-native/issues/625
- For now remove jcommander command sample to get support for it #340
- Relates #323
2021-12-24 13:27:44 +00:00
Janne Valkealahti
d879b7d6c4 Update boot 2.6.2
- Fixes #339
2021-12-24 09:01:14 +00:00
Janne Valkealahti
f6394a4531 Rework bean handling
- Lot of rework to move better model to work around bean cycles
- Remove use of @Lazy
- Move StandardAPIAutoConfiguration to autoconfig package
- Remove some of a direct ObjectProvider use in constructors
- Adds spring-native support with most of a things working out of a box
- Relates #324
- Relates #329
- Relates #323
2021-12-24 08:50:40 +00:00
Janne Valkealahti
2706da37cc Disable javadoc errors for now 2021-12-21 18:11:13 +00:00
Janne Valkealahti
d883e0e660 Introduce ResultHandlerService
- Replace main use of ResultHandler with ResultHandlerService which is
  a framework type of impl for handlers found from conversion service.
  This handles types better and easier to handle with bean cycles, etc.
- Removed IterableResultHandler to think about these use cases later
  when further refactoring is done.
- TypeHierarchyResultHandler is removed and better functionality now
  via ResultHandlerService.
- Relates #336
2021-12-21 18:11:13 +00:00
Janne Valkealahti
c5081acee8 Make starter packaging jar again 2021-12-19 16:44:05 +00:00
Janne Valkealahti
5dcdc4c185 Extract autoconfig
- Create separate spring-shell-autoconfigure and keep
  all autoconfig features there.
- Fixes #329
2021-12-19 12:38:41 +00:00
Janne Valkealahti
a2f3dd9ed8 Remove assertj dep handling 2021-12-19 08:39:37 +00:00
Janne Valkealahti
af838ca006 Polish 2021-12-18 16:59:48 +00:00
Janne Valkealahti
f20b71a8c2 Remove unused Parser usage 2021-12-18 16:17:10 +00:00
Janne Valkealahti
4417d3e394 Remove parent from spring-shell-dependencies 2021-12-18 15:59:26 +00:00
Janne Valkealahti
2a951ab952 Revert "Update jfrog 1.52.0"
This reverts commit 54cb988877.
2021-12-18 15:44:26 +00:00
Janne Valkealahti
54cb988877 Update jfrog 1.52.0 2021-12-18 15:01:21 +00:00
Janne Valkealahti
a8d20f29bf Remove legacy from sample
- Preparation for further work as remove shell 1.x dep
  from sample.
- Relates #333
2021-12-18 14:47:34 +00:00
Janne Valkealahti
ffbd88b860 Update jline 3.21.0
- Fixes #331
2021-12-18 13:38:45 +00:00
Janne Valkealahti
bc4c691bbd Update vscode settings 2021-12-18 13:23:52 +00:00
Janne Valkealahti
d26f6d1a90 Update doc authors 2021-12-18 13:01:58 +00:00
Johnny Marnell
2b7a9b15e6 Clarify how to achieve varying arity in docs
Add examples of how to achieve, with existing functionality, a varying amount of parameter arity (and favor this verbage over "infinite", which, though technically true, could be misleading for evoking neding a very large amount of a parameter, instead of the normal usecase of a few of any amount).
2021-12-18 12:54:06 +00:00
汪吉
763fef8e1b remove not use import and add Override and add a miss @Component 2021-12-18 12:46:52 +00:00
Joao Ferreira
63f786fd8c Update JCommander version
This commit updates the JCommander version to 1.81.
The update also takes into account an issue that was
introduced in new versions of the JCommander, namely,
https://github.com/cbeust/jcommander/issues/377.
2021-12-18 10:12:22 +00:00
Janne Valkealahti
3b06a9aef7 Remove coverage phase as there's no travis anymore 2021-12-18 09:40:06 +00:00
Janne Valkealahti
fd10bc2670 Add maven cache to publish workflow 2021-12-18 09:35:30 +00:00
Jay Bryant
012481ef63 Update document appearance
Use Spring's standard styles for the ToC. Also added epub generation.
2021-12-18 09:29:09 +00:00
Jay Bryant
7473c9ec5c Editing pass
Edited for spelling, puncuation, grammar, usage, and corporate voice.
2021-12-18 08:13:47 +00:00
Janne Valkealahti
8ad59b702c Kick publish after ci
- Take 3
- Relates #328
2021-12-17 17:51:31 +00:00
Janne Valkealahti
434930f679 Kick publish after ci
- Take 2
- Relates #328
2021-12-17 17:40:23 +00:00
Janne Valkealahti
f6f80237b5 Kick publish after ci
- Attempt to fire ci-publish after ci finish ok
- Relates #328
2021-12-17 17:38:11 +00:00
Janne Valkealahti
d0dd446744 Configure snapshot publish
- New workflow which can be run manually to test publish.
- Relates #328
2021-12-17 16:43:15 +00:00
Janne Valkealahti
1dd2706164 Make build work with jdk 11/17
- Fixes #326
2021-12-17 16:15:38 +00:00
Janne Valkealahti
3a8f8e317f Update maven 3.8.4
- Fixes #330
2021-12-17 16:14:37 +00:00
Janne Valkealahti
e14f4a3f32 Remove bean cycles
- Shuffle things around into different auto-config and configuration
  classes and use other tricks like ObjectProvider to work around
  boot 2.6.x imposing bean cycle checks.
- This is first set of changes to work around this issue, not
  to make things perfect. Further refactoring work is needed
  making code base more boot 2.x friendly as things are based
  on boot 1.5.x times.
- Fixes #324
2021-12-17 15:32:52 +00:00
Janne Valkealahti
2de3dd0334 Don't fail fast with ci 2021-12-17 14:50:57 +00:00
Janne Valkealahti
a6048e0e0f Use cache with ci workflows 2021-12-17 14:47:24 +00:00