jezzsantos / automate

Templatize patterns from your own codebase, make them programmable, then share them with your team. https://jezzsantos.github.io/automate/
https://www.nuget.org/packages/automate
MIT License
7 stars 0 forks source link

Pattern configuration is too busy #66

Closed jezzsantos closed 2 years ago

jezzsantos commented 2 years ago

When viewing a pattern configuration (showing all details), the amount of data displayed makes quick reference difficult, especially when the output is soft-wrapped in most terminals.

(Note the example below is not wrapped so is easier to consume)

automate view pattern --all

Example output:

PS C:\Projects\github\jezzsantos\ddd-forum> automate view pattern --all

Pattern 'SubDomain' (ID: 'Qps9Xgbd, v0.4.0) is configured as:
- SubDomain [Qps9Xgbd] (root element)
        - Automation:
                - Go [5DhrMHhf] (CommandLaunchPoint) (ids: Gb3r11qG;XxMmzS0H;x664EbyV;eZYU0UWX;VsEhhtp3;f4m3qHck;75jm5Xj0;SaPEKz6h;VUbQMgMU;V3CskeRB;rmWtB8Mg;5M93B0Sd;KcSe1axf)
        - Attributes:
                - Name (string, required)
        - Elements:
                - Resource [YQY1UP9X] (collection)
                        - CodeTemplates:
                                - Resource [7R1gAwGe] (file: C:\Projects\github\stemmlerjs\ddd-forum\src\modules\forum\domain\post.ts, ext: .ts)
                                - DTO [ne5ds8AR] (file: C:\Projects\github\stemmlerjs\ddd-forum\src\modules\forum\dtos\postDTO.ts, ext: .ts)
                                - Routes [VdsjeCF0] (file: C:\Projects\github\stemmlerjs\ddd-forum\src\modules\forum\infra\http\routes\post.ts, ext: .ts)
                                - Mapper [r4VRhFkE] (file: C:\Projects\github\stemmlerjs\ddd-forum\src\modules\forum\mappers\postMap.ts, ext: .ts)
                                - RepoInterface [cTfY562u] (file: C:\Projects\github\stemmlerjs\ddd-forum\src\modules\forum\repos\postRepo.ts, ext: .ts)
                                - RepoImplementation [2CcBpTbV] (file: C:\Projects\github\stemmlerjs\ddd-forum\src\modules\forum\repos\implementations\sequelizePostRepo.ts, ext: .ts)
                                - Identifier [yZY2WRg8] (file: C:\Projects\github\stemmlerjs\ddd-forum\src\modules\forum\domain\postId.ts, ext: .ts)
                                - RepoIndex [r5vt6KT5] (file: C:\Projects\github\stemmlerjs\ddd-forum\src\modules\forum\repos\index.ts, ext: .ts)
                        - Automation:
                                - ResourceCommand1 [Gb3r11qG] (CodeTemplateCommand) (template: 7R1gAwGe, oneOff: true, path: src/modules/{{Parent.Name | string.camelsingular}}/domain/{{Name | string.camelsingular}}.ts)
                                - DTOCommand2 [XxMmzS0H] (CodeTemplateCommand) (template: ne5ds8AR, oneOff: true, path: src/modules/{{Parent.Name | string.camelsingular}}/dtos/{{Name | string.camelsingular}}DTO.ts)    
                                - RoutesCommand3 [x664EbyV] (CodeTemplateCommand) (template: VdsjeCF0, oneOff: true, path: src/modules/{{Parent.Name | string.camelsingular}}/infra/http/routes/{{Name | string.camelsingular}}.ts)
                                - MapperCommand5 [eZYU0UWX] (CodeTemplateCommand) (template: r4VRhFkE, oneOff: true, path: src/modules/{{Parent.Name | string.camelsingular}}/mappers/{{Name | string.camelsingular}}Map.ts)
                                - RepoInterfaceCommand4 [VsEhhtp3] (CodeTemplateCommand) (template: cTfY562u, oneOff: true, path: src/modules/{{Parent.Name | string.camelsingular}}/repos/{{Name | string.camelsingular}}Repo.ts)
                                - RepoImplementationCommand6 [f4m3qHck] (CodeTemplateCommand) (template: 2CcBpTbV, oneOff: true, path: src/modules/{{Parent.Name | string.camelsingular}}/repos/implementations/sequelize{{Name | string.pascalsingular}}Repo.ts)
                                - IdentifierCommand7 [75jm5Xj0] (CodeTemplateCommand) (template: yZY2WRg8, oneOff: true, path: src/modules/{{Parent.Name | string.camelsingular}}/domain/{{Name | string.camelsingular}}Id.ts)
                                - RepoIndexCommand8 [SaPEKz6h] (CodeTemplateCommand) (template: r5vt6KT5, oneOff: true, path: src/modules/{{Parent.Name | string.camelsingular}}/repos/index.ts)
                        - Attributes:
                                - Name (string, required)
                                - Kind (string, required, oneof: aggregate;entity, default: entity)
                        - Elements:
                                - UseCase [fG9N9vM6] (collection)
                                        - CodeTemplates:
                                                - UseCase [dwDXxv9G] (file: C:\Projects\github\stemmlerjs\ddd-forum\src\modules\forum\useCases\post\createPost\CreatePost.ts, ext: .ts)
                                                - Controller [PmEpX6M7] (file: C:\Projects\github\stemmlerjs\ddd-forum\src\modules\forum\useCases\post\createPost\CreatePostController.ts, ext: .ts)
                                                - DTO [1uxps3Sc] (file: C:\Projects\github\stemmlerjs\ddd-forum\src\modules\forum\useCases\post\createPost\CreatePostDTO.ts, ext: .ts)
                                                - Errors [cd8R6rKQ] (file: C:\Projects\github\stemmlerjs\ddd-forum\src\modules\forum\useCases\post\createPost\CreatePostErrors.ts, ext: .ts)
                                                - Index [Dn8BrSRK] (file: C:\Projects\github\stemmlerjs\ddd-forum\src\modules\forum\useCases\post\createPost\index.ts, ext: .ts)
                                        - Automation:
                                                - UseCaseCommand1 [VUbQMgMU] (CodeTemplateCommand) (template: dwDXxv9G, oneOff: true, path: src/modules/{{Parent.Parent.Name | string.camelsingular}}/useCases/{{Parent.Name | string.camelsingular}}/{{Name | string.camelsingular}}{{Parent.Name | string.pascalsingular}}/{{Name | string.pascalsingular}}{{Parent.Name | string.pascalsingular}}.ts)
                                                - ControllerCommand2 [V3CskeRB] (CodeTemplateCommand) (template: PmEpX6M7, oneOff: true, path: src/modules/{{Parent.Parent.Name | string.camelsingular}}/useCases/{{Parent.Name | string.camelsingular}}/{{Name | string.camelsingular}}{{Parent.Name | string.pascalsingular}}/{{Name | string.pascalsingular}}{{Parent.Name | string.pascalsingular}}Controller.ts)
                                                - DTOCommand3 [rmWtB8Mg] (CodeTemplateCommand) (template: 1uxps3Sc, oneOff: true, path: src/modules/{{Parent.Parent.Name | string.camelsingular}}/useCases/{{Parent.Name | string.camelsingular}}/{{Name | string.camelsingular}}{{Parent.Name | string.pascalsingular}}/{{Name | string.pascalsingular}}{{Parent.Name | string.pascalsingular}}DTO.ts)
                                                - ErrorsCommand4 [5M93B0Sd] (CodeTemplateCommand) (template: cd8R6rKQ, oneOff: true, path: src/modules/{{Parent.Parent.Name | string.camelsingular}}/useCases/{{Parent.Name | string.camelsingular}}/{{Name | string.camelsingular}}{{Parent.Name | string.pascalsingular}}/{{Name | string.pascalsingular}}{{Parent.Name | string.pascalsingular}}Errors.ts)
                                                - IndexCommand5 [KcSe1axf] (CodeTemplateCommand) (template: Dn8BrSRK, oneOff: true, path: src/modules/{{Parent.Parent.Name | string.camelsingular}}/useCases/{{Parent.Name | string.camelsingular}}/{{Name | string.camelsingular}}{{Parent.Name | string.pascalsingular}}/index.ts)
                                                - Go [8HYpvvQc] (CommandLaunchPoint) (ids: VUbQMgMU;V3CskeRB;rmWtB8Mg;5M93B0Sd;KcSe1axf)
                                        - Attributes:
                                                - Name (string, required)
                                                - Kind (string, required, oneof: command;query, default: command)
                                                - Route (string, required, default: /)
                                                - IsAuthenticated (bool, required, default: true)

Perhaps we can truncate and remove some of these details?