Commit Graph

531 Commits

Author SHA1 Message Date
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
Janne Valkealahti
942108e612 Update docs
- Split adoc files
- Relates #383
2022-04-23 08:36:10 +01:00
Janne Valkealahti
412053d414 Change bean name
- To not clash with exchangeStrategiesCustomizer bean name from boot
  change it to shellCommonComponentFlowCustomizer.
- This was a typical copy/pasting mistake.
2022-03-09 08:41:42 +00:00
Janne Valkealahti
bc267a2e18 Update jfrog cli 2.13.0 2022-03-05 13:08:23 +00:00
Janne Valkealahti
0e4825a71f Disable some jcommander tests on jre17
- For now to think about how things should work on 17
2022-03-05 09:42:15 +00:00
Janne Valkealahti
30e7c4d370 Add auto-config for ComponentFlow
- ComponentFlowAutoConfiguration which creates a builder bean
  and configures ComponentFlowCustomizer to set needed
  defaults for terminal, resource loader and template executor.
- Fixes #387
2022-03-05 09:37:27 +00:00
Janne Valkealahti
85976cff48 Native support for JCommander
- Fixes #340
2022-03-05 08:18:28 +00:00
Janne Valkealahti
c532dc227e Flow system for UI components
- Implement basic flow system with builder patterns
  to easily use components and hook those together
  as a flow.
- Fixes #364
2022-03-03 15:45:02 +00:00
Janne Valkealahti
e5151bb3a6 Update boot 2.6.4
- Fixes #382
2022-03-02 09:15:57 +00:00
Janne Valkealahti
7b547e53a8 Add dynamic command registration
- Extend CommandRegistry for add/remove methods.
- For rest of shell classes move to use registry
  directly instead of caching commands as registry
  is not immutable anymore.
- Add new sample
- Fixes #379
2022-02-26 09:26:23 +00:00
Janne Valkealahti
8920db699d Update component docs
- Relates #361
2022-02-24 09:25:38 +00:00
Janne Valkealahti
4733c3c7b5 Add custom renderer example for component 2022-02-24 09:24:29 +00:00
Janne Valkealahti
547e82ab93 Fix highlight in docs 2022-02-24 09:23:35 +00:00
Janne Valkealahti
114dbeccaa Fix NonInteractiveShellRunner for empty args
- Fix issue when empty args resulted runner to
  think it should handle this scenario effectively
  hijacking interactive mode.
- This bug were added by previous rework on #372
2022-02-22 09:47:20 +00:00
Janne Valkealahti
0a074b37e4 Polish 2022-02-22 08:07:52 +00:00
Janne Valkealahti
2d589f4752 Update readme 2022-02-22 08:07:05 +00:00
onobc
5f447aa831 Add support for multiple non-interactive commmands
Also:
* Rename ThemeResolver bean to avoid clash w/ Spring Boot registered ThemeResolver
* Move shell runner precedence to public static field to allow extension/access
2022-02-21 08:47:07 +00:00
Janne Valkealahti
7746e571b6 Fix version command due to recent rework 2022-02-20 14:44:43 +00:00
Janne Valkealahti
f1a93f7476 Polish stringinput when no default value 2022-02-20 08:47:45 +00:00
Janne Valkealahti
240cf2d96d Add new highlight style tag 2022-02-19 13:49:02 +00:00
Janne Valkealahti
ac80086094 Add missing field inits 2022-02-18 13:20:26 +00:00
Janne Valkealahti
5ff98290e9 Add more beans to AbstractShellComponent
- Add more common stuff like ResourceLoader, TemplateExecutor,
  ThemeResolver.
- Make class abstract.
- Expose more with sub-classes.
2022-02-18 13:07:08 +00:00
Janne Valkealahti
544e4aee1d Fix version command attributes
- Now passing version command attributes
  even if those are nulls(not set) as ST
  logs those in a listener as errors while
  it doesn't cause any failures.
- Change all LoggingSTErrorListener methods
  into debug level to limit more noise.
- Fixes #363
2022-02-11 13:47:15 +00:00
Janne Valkealahti
785a9268e3 Add confirmation component
- New ConfirmationInput component
- Add missing native resource config for templates.
- Add sample "component confirmation", use flag --no
  to switch default from yes to no.
- Fixes #366
2022-02-11 10:06:33 +00:00
Janne Valkealahti
2f4209785e StringInput masking
- Add a feature to define a mask character for StringInput
  which help when there's a need to as something sensitive.
- This masks both input and result value.
2022-02-08 10:26:17 +00:00
Janne Valkealahti
e3604a5bc5 Basic UI components
- Add first preliminary model of building and working with
  higher level components.
- Components for text input, path input, single selector and
  multi selector.
- Components renderings are based on ANTLR ST templates while
  there is support for building rendering output manually.
- Add these into sample.
- This is a base of additional work what goes to these components
  and concepts around it.
- Relates #360
2022-02-04 12:58:53 +00:00
Janne Valkealahti
65ff3820da Add prs to release notes 2022-02-03 10:44:56 +00:00
Janne Valkealahti
1593ee86d2 Update docs
- Polish pom
- Version command
- Theming
- Templating
- Relates #354
2022-02-03 09:51:13 +00:00
Janne Valkealahti
7e2a44f1ce Render group templates with new styles
- Can now render ST group with hardcoded
  main template name
- Add additional style tags
- Add sample to list various styles
2022-02-02 09:28:33 +00:00
Janne Valkealahti
9ec5ffa9e0 Make grouping configurable in build-in help
- New option spring.shell.command.help.grouping-mode which can be either flat/group.
- Build-in help command can now choose if to group command or just show flat list.
- Fixes #347
2022-02-01 14:42:46 +00:00
Chris Bono
0efd71aea2 Add non-interactive shell runner customizer
- Add non-interactive shell runner customizer
- Update javadoc for DefaultApplicationRunner
- Rename DefaultApplicationRunner
- Formatting
2022-02-01 14:40:57 +00:00
Janne Valkealahti
9d7a345fff Add missing boot configuration processor 2022-01-28 16:17:37 +00:00
Janne Valkealahti
f5c21bca09 Create spring-shell-starter-jna
- Fixes #357
2022-01-28 10:17:51 +00:00
Janne Valkealahti
3197c94be7 Switch main from 3.0.0-SNAPSHOT to 2.1.0-SNAPSHOT
- Relates #356
2022-01-28 09:27:06 +00:00
Janne Valkealahti
7bab5fe14b Bring back missing table tests 2022-01-24 20:35:05 +00:00
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