generator-jhipster 7.3.0 → 7.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/cli/import-jdl.js +3 -2
  2. package/cli/jhipster-command.js +2 -2
  3. package/cli/program.js +32 -29
  4. package/generators/app/index.js +46 -27
  5. package/generators/aws/index.js +8 -8
  6. package/generators/aws/lib/eb.js +1 -1
  7. package/generators/azure-app-service/index.js +16 -9
  8. package/generators/azure-app-service/templates/github/workflows/azure-app-service.yml.ejs +2 -2
  9. package/generators/azure-spring-cloud/index.js +16 -9
  10. package/generators/azure-spring-cloud/templates/github/workflows/azure-spring-cloud.yml.ejs +2 -2
  11. package/generators/bootstrap/index.js +57 -62
  12. package/generators/ci-cd/index.js +11 -8
  13. package/generators/ci-cd/templates/github-actions.yml.ejs +1 -1
  14. package/generators/ci-cd/templates/travis.yml.ejs +9 -4
  15. package/generators/cleanup.js +27 -171
  16. package/generators/client/files-angular.js +12 -1
  17. package/generators/client/files-common.js +6 -2
  18. package/generators/client/files-react.js +13 -2
  19. package/generators/client/files-vue.js +59 -7
  20. package/generators/client/index.js +46 -32
  21. package/generators/client/needle-api/needle-client-angular.js +1 -1
  22. package/generators/client/needle-api/needle-client-vue.js +57 -7
  23. package/generators/client/templates/angular/.eslintrc.json.ejs +1 -0
  24. package/generators/client/templates/angular/angular.json.ejs +5 -0
  25. package/generators/client/templates/angular/jest.conf.js.ejs +2 -0
  26. package/generators/client/templates/angular/package.json +29 -29
  27. package/generators/client/templates/angular/package.json.ejs +3 -1
  28. package/generators/client/templates/angular/src/main/webapp/app/account/activate/activate.component.spec.ts.ejs +52 -54
  29. package/generators/client/templates/angular/src/main/webapp/app/account/activate/activate.component.ts.ejs +4 -4
  30. package/generators/client/templates/angular/src/main/webapp/app/account/activate/activate.service.spec.ts.ejs +65 -0
  31. package/generators/client/templates/angular/src/main/webapp/app/account/password/password-strength-bar/password-strength-bar.component.spec.ts.ejs +35 -37
  32. package/generators/client/templates/angular/src/main/webapp/app/account/password/password-strength-bar/password-strength-bar.component.ts.ejs +1 -1
  33. package/generators/client/templates/angular/src/main/webapp/app/account/password/password.component.spec.ts.ejs +78 -80
  34. package/generators/client/templates/angular/src/main/webapp/app/account/password/password.component.ts.ejs +4 -4
  35. package/generators/client/templates/angular/src/main/webapp/app/account/password/password.service.spec.ts.ejs +41 -0
  36. package/generators/client/templates/angular/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.spec.ts.ejs +73 -75
  37. package/generators/client/templates/angular/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.ts.ejs +4 -4
  38. package/generators/client/templates/angular/src/main/webapp/app/account/password-reset/finish/password-reset-finish.service.spec.ts.ejs +62 -0
  39. package/generators/client/templates/angular/src/main/webapp/app/account/password-reset/init/password-reset-init.component.spec.ts.ejs +44 -46
  40. package/generators/client/templates/angular/src/main/webapp/app/account/password-reset/init/password-reset-init.service.spec.ts.ejs +61 -0
  41. package/generators/client/templates/angular/src/main/webapp/app/account/register/register.component.spec.ts.ejs +122 -123
  42. package/generators/client/templates/angular/src/main/webapp/app/account/register/register.component.ts.ejs +1 -1
  43. package/generators/client/templates/angular/src/main/webapp/app/account/register/register.service.spec.ts.ejs +66 -0
  44. package/generators/client/templates/angular/src/main/webapp/app/account/sessions/sessions.component.spec.ts.ejs +75 -77
  45. package/generators/client/templates/angular/src/main/webapp/app/account/settings/settings.component.spec.ts.ejs +80 -80
  46. package/generators/client/templates/angular/src/main/webapp/app/admin/configuration/configuration.component.spec.ts.ejs +48 -50
  47. package/generators/client/templates/angular/src/main/webapp/app/admin/health/health.component.spec.ts.ejs +45 -47
  48. package/generators/client/templates/angular/src/main/webapp/app/admin/health/health.component.ts.ejs +4 -4
  49. package/generators/client/templates/angular/src/main/webapp/app/admin/health/health.service.spec.ts.ejs +66 -0
  50. package/generators/client/templates/angular/src/main/webapp/app/admin/health/modal/health-modal.component.spec.ts.ejs +99 -101
  51. package/generators/client/templates/angular/src/main/webapp/app/admin/logs/logs.component.spec.ts.ejs +61 -63
  52. package/generators/client/templates/angular/src/main/webapp/app/admin/metrics/blocks/jvm-memory/jvm-memory.component.html.ejs +2 -2
  53. package/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics.component.spec.ts.ejs +28 -30
  54. package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/delete/user-management-delete-dialog.component.spec.ts.ejs +35 -37
  55. package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/detail/user-management-detail.component.spec.ts.ejs +40 -42
  56. package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/list/user-management.component.spec.ts.ejs +89 -91
  57. package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/list/user-management.component.ts.ejs +4 -4
  58. package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/update/user-management-update.component.spec.ts.ejs +81 -83
  59. package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/update/user-management-update.component.ts.ejs +8 -8
  60. package/generators/client/templates/angular/src/main/webapp/app/app-routing.module.ts.ejs +14 -3
  61. package/generators/client/templates/angular/src/main/webapp/app/app.module.ts.ejs +8 -29
  62. package/generators/client/templates/angular/src/main/webapp/app/config/datepicker-adapter.ts.ejs +1 -1
  63. package/generators/client/templates/angular/src/main/webapp/app/config/dayjs.ts.ejs +4 -4
  64. package/generators/client/templates/angular/src/main/webapp/app/core/auth/account.service.spec.ts.ejs +14 -9
  65. package/generators/client/templates/angular/src/main/webapp/app/core/tracker/tracker.service.ts.ejs +6 -6
  66. package/generators/client/templates/angular/src/main/webapp/app/core/util/parse-links.service.ts.ejs +1 -1
  67. package/generators/client/templates/angular/src/main/webapp/app/entities/entity-navbar-items.ts.ejs +29 -0
  68. package/generators/client/templates/angular/src/main/webapp/app/home/home.component.spec.ts.ejs +106 -98
  69. package/generators/client/templates/angular/src/main/webapp/app/layouts/main/main.component.spec.ts.ejs +166 -168
  70. package/generators/client/templates/angular/src/main/webapp/app/layouts/main/main.component.ts.ejs +1 -1
  71. package/generators/client/templates/angular/src/main/webapp/app/layouts/navbar/navbar.component.html.ejs +20 -0
  72. package/generators/client/templates/angular/src/main/webapp/app/layouts/navbar/navbar.component.spec.ts.ejs +74 -70
  73. package/generators/client/templates/angular/src/main/webapp/app/layouts/navbar/navbar.component.ts.ejs +41 -2
  74. package/generators/client/templates/angular/src/main/webapp/app/layouts/profiles/page-ribbon.component.spec.ts.ejs +27 -29
  75. package/generators/client/templates/angular/src/main/webapp/app/login/login.component.spec.ts.ejs +114 -115
  76. package/generators/client/templates/angular/src/main/webapp/app/login/login.component.ts.ejs +4 -4
  77. package/generators/client/templates/angular/src/main/webapp/app/shared/alert/alert-error.component.spec.ts.ejs +132 -134
  78. package/generators/client/templates/angular/src/main/webapp/app/shared/alert/alert.component.spec.ts.ejs +29 -31
  79. package/generators/client/templates/angular/src/main/webapp/app/shared/auth/has-any-authority.directive.spec.ts.ejs +4 -4
  80. package/generators/client/templates/angular/src/main/webapp/app/shared/date/duration.pipe.ts.ejs +1 -1
  81. package/generators/client/templates/angular/src/main/webapp/app/shared/date/format-medium-date.pipe.spec.ts.ejs +1 -1
  82. package/generators/client/templates/angular/src/main/webapp/app/shared/date/format-medium-date.pipe.ts.ejs +1 -1
  83. package/generators/client/templates/angular/src/main/webapp/app/shared/date/format-medium-datetime.pipe.spec.ts.ejs +1 -1
  84. package/generators/client/templates/angular/src/main/webapp/app/shared/date/format-medium-datetime.pipe.ts.ejs +1 -1
  85. package/generators/client/templates/angular/src/main/webapp/app/shared/language/translate.directive.ts.ejs +6 -6
  86. package/generators/client/templates/angular/src/main/webapp/app/shared/language/translation.module.ts.ejs +83 -0
  87. package/generators/client/templates/angular/src/main/webapp/declarations.d.ts.ejs +16 -2
  88. package/generators/client/templates/angular/tsconfig.json.ejs +2 -0
  89. package/generators/client/templates/angular/tsconfig.spec.json.ejs +0 -1
  90. package/generators/client/templates/angular/webpack/proxy.conf.js.ejs +0 -2
  91. package/generators/client/templates/angular/webpack/webpack.custom.js.ejs +0 -16
  92. package/generators/client/templates/angular/webpack/webpack.microfrontend.js.ejs +12 -5
  93. package/generators/client/templates/common/package.json +6 -6
  94. package/generators/client/templates/common/src/main/webapp/robots.txt.ejs +0 -1
  95. package/generators/client/templates/common/src/main/webapp/swagger-ui/index.html.ejs +86 -56
  96. package/generators/client/templates/common/webpack/webpack.microfrontend.js.jhi.ejs +56 -0
  97. package/generators/client/templates/react/.eslintrc.json.ejs +1 -0
  98. package/generators/client/templates/react/package.json +54 -53
  99. package/generators/client/templates/react/package.json.ejs +6 -1
  100. package/generators/client/templates/react/src/main/webapp/app/app.scss.ejs +0 -3
  101. package/generators/client/templates/react/src/main/webapp/app/config/axios-interceptor.spec.ts.ejs +3 -2
  102. package/generators/client/templates/react/src/main/webapp/app/modules/account/password/password.tsx.ejs +2 -2
  103. package/generators/client/templates/react/src/main/webapp/app/modules/administration/configuration/configuration.tsx.ejs +2 -2
  104. package/generators/client/templates/react/src/main/webapp/app/modules/administration/gateway/gateway.tsx.ejs +2 -2
  105. package/generators/client/templates/react/src/main/webapp/app/modules/administration/metrics/metrics.tsx.ejs +6 -6
  106. package/generators/client/templates/react/src/main/webapp/app/modules/administration/user-management/user-management.tsx.ejs +8 -8
  107. package/generators/client/templates/react/src/main/webapp/app/modules/home/home.tsx.ejs +1 -1
  108. package/generators/client/templates/react/src/main/webapp/app/shared/layout/header/header.scss.ejs +9 -0
  109. package/generators/client/templates/react/src/main/webapp/app/shared/layout/header/header.tsx.ejs +2 -2
  110. package/generators/client/templates/react/src/main/webapp/app/shared/layout/menus/account.tsx.ejs +3 -3
  111. package/generators/client/templates/react/src/main/webapp/app/shared/layout/menus/admin.tsx.ejs +7 -7
  112. package/generators/client/templates/react/src/main/webapp/app/shared/layout/menus/menu-components.tsx.ejs +1 -1
  113. package/generators/client/templates/react/src/main/webapp/app/shared/reducers/authentication.spec.ts.ejs +1 -1
  114. package/generators/client/templates/react/webpack/webpack.dev.js.ejs +17 -3
  115. package/generators/client/templates/react/webpack/webpack.prod.js.ejs +13 -1
  116. package/generators/client/templates/vue/.eslintrc.js.ejs +8 -5
  117. package/generators/client/templates/vue/package.json +40 -49
  118. package/generators/client/templates/vue/package.json.ejs +13 -17
  119. package/generators/client/templates/vue/src/main/webapp/app/account/account.service.ts.ejs +23 -12
  120. package/generators/client/templates/vue/src/main/webapp/app/account/settings/settings.vue.ejs +7 -1
  121. package/generators/client/templates/vue/src/main/webapp/app/admin/configuration/configuration.vue.ejs +1 -1
  122. package/generators/client/templates/vue/src/main/webapp/app/admin/metrics/metrics.component.ts.ejs +1 -1
  123. package/generators/client/templates/vue/src/main/webapp/app/constants.ts.ejs +16 -6
  124. package/generators/client/templates/vue/src/main/webapp/app/core/jhi-navbar/jhi-navbar.component.ts.ejs +27 -8
  125. package/generators/client/templates/vue/src/main/webapp/app/core/jhi-navbar/jhi-navbar.vue.ejs +6 -0
  126. package/generators/client/templates/vue/src/main/webapp/app/declarations.d.ts.ejs +41 -0
  127. package/generators/client/templates/vue/src/main/webapp/app/entities/entities-menu.component.ts.ejs +34 -0
  128. package/generators/client/templates/vue/src/main/webapp/app/entities/entities-menu.vue.ejs +13 -0
  129. package/generators/client/templates/vue/src/main/webapp/app/entities/entities.component.ts.ejs +20 -0
  130. package/generators/client/templates/vue/src/main/webapp/app/entities/entities.vue.ejs +5 -0
  131. package/generators/client/templates/vue/src/main/webapp/app/entities/user/{user.oauth2.service.ts.ejs → user.service.ts.ejs} +1 -1
  132. package/generators/client/templates/vue/{webpack/utils.js.ejs → src/main/webapp/app/index.ts.ejs} +1 -12
  133. package/generators/client/templates/vue/src/main/webapp/app/locale/translation.service.ts.ejs +26 -9
  134. package/generators/client/templates/vue/src/main/webapp/app/main.ts.ejs +20 -18
  135. package/generators/client/templates/vue/src/main/webapp/app/router/entities.ts.ejs +45 -3
  136. package/generators/client/templates/vue/src/main/webapp/app/router/index.ts.ejs +19 -3
  137. package/generators/client/templates/vue/src/main/webapp/app/shared/config/axios-interceptor.ts.ejs +0 -2
  138. package/generators/client/templates/vue/src/main/webapp/app/shared/data/data-utils.service.ts.ejs +3 -1
  139. package/generators/client/templates/vue/src/main/webapp/app/shims-vue.d.ts.ejs +17 -3
  140. package/generators/client/templates/vue/src/test/javascript/jest.conf.js.ejs +25 -10
  141. package/generators/client/templates/vue/src/test/javascript/spec/app/account/login-form/login-form.component.spec.ts.ejs +2 -2
  142. package/generators/client/templates/vue/src/test/javascript/spec/app/admin/user-management/user-management-edit.component.spec.ts.ejs +6 -4
  143. package/generators/client/templates/vue/src/test/javascript/spec/app/admin/user-management/user-management.component.spec.ts.ejs +4 -2
  144. package/generators/client/templates/vue/src/test/javascript/spec/app/core/jhi-navbar/jhi-navbar.component.spec.ts.ejs +10 -4
  145. package/generators/client/templates/vue/src/test/javascript/spec/app/entities/entities-menu.spec.ts.ejs +52 -0
  146. package/generators/client/templates/vue/src/test/javascript/spec/app/microfrontends/entities-menu.component.ts.ejs +4 -0
  147. package/generators/client/templates/vue/src/test/javascript/spec/app/microfrontends/entities-menu.vue.ejs +7 -0
  148. package/generators/client/templates/vue/src/test/javascript/spec/app/microfrontends/entities-router.ts.ejs +1 -0
  149. package/generators/client/templates/vue/src/test/javascript/spec/app/shared/config/axios-interceptor.spec.ts.ejs +0 -1
  150. package/generators/client/templates/vue/tsconfig.json.ejs +6 -10
  151. package/generators/client/templates/vue/tsconfig.spec.json.ejs +37 -0
  152. package/generators/client/templates/vue/webpack/config.js.ejs +50 -0
  153. package/generators/client/templates/vue/webpack/vue.utils.js.ejs +33 -32
  154. package/generators/client/templates/vue/webpack/webpack.common.js.ejs +150 -126
  155. package/generators/client/templates/vue/webpack/webpack.dev.js.ejs +19 -76
  156. package/generators/client/templates/vue/webpack/webpack.microfrontend.js.jhi.vue.ejs +77 -0
  157. package/generators/client/templates/vue/webpack/webpack.prod.js.ejs +5 -41
  158. package/generators/cloudfoundry/index.js +9 -9
  159. package/generators/common/index.js +12 -10
  160. package/generators/common/templates/.prettierrc.ejs +1 -1
  161. package/generators/common/templates/README.md.jhi.ejs +19 -0
  162. package/generators/common/templates/package.json +4 -4
  163. package/generators/cypress/index.js +12 -9
  164. package/generators/cypress/templates/cypress.json.ejs +16 -2
  165. package/generators/cypress/templates/src/test/javascript/cypress/integration/account/login-page.spec.ts.ejs +3 -14
  166. package/generators/cypress/templates/src/test/javascript/cypress/integration/account/password-page.spec.ts.ejs +33 -39
  167. package/generators/cypress/templates/src/test/javascript/cypress/integration/account/register-page.spec.ts.ejs +52 -62
  168. package/generators/cypress/templates/src/test/javascript/cypress/integration/account/reset-password-page.spec.ts.ejs +2 -10
  169. package/generators/cypress/templates/src/test/javascript/cypress/integration/account/settings-page.spec.ts.ejs +25 -34
  170. package/generators/cypress/templates/src/test/javascript/cypress/integration/administration/administration.spec.ts.ejs +1 -22
  171. package/generators/cypress/templates/src/test/javascript/cypress/plugins/index.ts.ejs +4 -4
  172. package/generators/cypress/templates/src/test/javascript/cypress/support/commands.ts.ejs +67 -7
  173. package/generators/cypress/templates/src/test/javascript/cypress/support/entity.ts.ejs +4 -4
  174. package/generators/cypress/templates/src/test/javascript/cypress/support/index.ts.ejs +1 -6
  175. package/generators/cypress/templates/src/test/javascript/cypress/support/management.ts.ejs +1 -1
  176. package/generators/cypress/templates/src/test/javascript/cypress/support/navbar.ts.ejs +8 -8
  177. package/generators/cypress/templates/src/test/javascript/cypress/support/oauth2.ts.ejs +0 -9
  178. package/generators/database-changelog/index.js +33 -22
  179. package/generators/database-changelog-liquibase/index.js +12 -8
  180. package/generators/database-changelog-liquibase/templates/src/main/resources/config/liquibase/changelog/updated_entity_constraints.xml.ejs +1 -1
  181. package/generators/docker-compose/index.js +11 -12
  182. package/generators/docker-compose/templates/realm-config/jhipster-realm.json.ejs +1 -1
  183. package/generators/entities/index.js +35 -26
  184. package/generators/entities-client/index.js +10 -7
  185. package/generators/entity/index.js +81 -32
  186. package/generators/entity-client/files.js +7 -16
  187. package/generators/entity-client/index.js +22 -12
  188. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/delete/entity-management-delete-dialog.component.spec.ts.ejs +42 -44
  189. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/detail/entity-management-detail.component.html.ejs +1 -1
  190. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/detail/entity-management-detail.component.spec.ts.ejs +58 -60
  191. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/entity-management.module.ts.ejs +1 -35
  192. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/entity.model.ts.ejs +1 -1
  193. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/list/entity-management.component.html.ejs +4 -4
  194. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/list/entity-management.component.spec.ts.ejs +110 -112
  195. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/list/entity-management.component.ts.ejs +9 -2
  196. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/list/infinite-scroll-template.ejs +8 -8
  197. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/list/no-pagination-template.ejs +8 -8
  198. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/list/pagination-template.ejs +8 -8
  199. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/route/entity-management-routing-resolve.service.spec.ts.ejs +15 -6
  200. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/route/entity-management-routing.module.ts.ejs +1 -1
  201. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/service/entity.service.spec.ts.ejs +1 -1
  202. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/service/entity.service.ts.ejs +1 -1
  203. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/update/entity-management-update.component.spec.ts.ejs +203 -198
  204. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/update/entity-management-update.component.ts.ejs +5 -5
  205. package/generators/entity-client/templates/angular/src/test/javascript/e2e/entities/entity.spec.ts.ejs +1 -1
  206. package/generators/entity-client/templates/common/src/test/javascript/cypress/integration/entity/entity.spec.ts.ejs +264 -127
  207. package/generators/entity-client/templates/react/src/main/webapp/app/entities/entity-update.tsx.ejs +17 -14
  208. package/generators/entity-client/templates/react/src/main/webapp/app/entities/entity.reducer.ts.ejs +5 -4
  209. package/generators/entity-client/templates/react/src/main/webapp/app/entities/entity.tsx.ejs +11 -13
  210. package/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity-update.component.ts.ejs +32 -25
  211. package/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity-update.vue.ejs +6 -9
  212. package/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.component.ts.ejs +2 -1
  213. package/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.model.ts.ejs +1 -1
  214. package/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.service.ts.ejs +2 -6
  215. package/generators/entity-client/templates/vue/src/test/javascript/spec/app/entities/entity-update.component.spec.ts.ejs +10 -7
  216. package/generators/entity-client/templates/vue/src/test/javascript/spec/app/entities/entity.component.spec.ts.ejs +5 -1
  217. package/generators/entity-client/templates/vue/src/test/javascript/spec/app/entities/entity.service.spec.ts.ejs +1 -1
  218. package/generators/entity-i18n/index.js +7 -4
  219. package/generators/entity-server/files.js +14 -0
  220. package/generators/entity-server/index.js +12 -8
  221. package/generators/entity-server/templates/src/main/java/package/common/get_all_template.ejs +2 -2
  222. package/generators/entity-server/templates/src/main/java/package/common/search_template.ejs +1 -1
  223. package/generators/entity-server/templates/src/main/java/package/domain/Entity.java.jhi.ejs +9 -8
  224. package/generators/entity-server/templates/src/main/java/package/repository/EntityRepositoryInternalImpl_reactive.java.ejs +16 -29
  225. package/generators/entity-server/templates/src/main/java/package/repository/EntityRepository_reactive.java.ejs +3 -3
  226. package/generators/entity-server/templates/src/main/java/package/repository/EntitySqlHelper_reactive.java.ejs +46 -0
  227. package/generators/entity-server/templates/src/main/java/package/repository/rowmapper/EntityRowMapper.java.ejs +1 -1
  228. package/generators/entity-server/templates/src/main/java/package/repository/search/EntitySearchRepository.java.ejs +18 -2
  229. package/generators/entity-server/templates/src/main/java/package/repository/search/SortToFieldSortBuilderConverter.java.ejs +24 -0
  230. package/generators/entity-server/templates/src/main/java/package/service/dto/EntityDTO.java.ejs +8 -6
  231. package/generators/entity-server/templates/src/main/java/package/service/mapper/EntityMapper.java.ejs +5 -1
  232. package/generators/entity-server/templates/src/main/java/package/web/rest/EntityResource.java.ejs +41 -43
  233. package/generators/entity-server/templates/src/test/java/package/web/rest/EntityResourceIT.java.ejs +3 -3
  234. package/generators/gae/index.js +10 -10
  235. package/generators/generator-base-blueprint.js +14 -46
  236. package/generators/generator-base-private.js +44 -23
  237. package/generators/generator-base.js +58 -18
  238. package/generators/generator-constants.js +30 -23
  239. package/generators/generator-transforms.js +39 -27
  240. package/generators/heroku/index.js +14 -33
  241. package/generators/init/constants.cjs +1 -1
  242. package/generators/java/constants.cjs +1 -1
  243. package/generators/kubernetes/files.js +3 -0
  244. package/generators/kubernetes/index.js +10 -10
  245. package/generators/kubernetes/templates/db/couchbase.yml.ejs +1 -1
  246. package/generators/kubernetes/templates/deployment.yml.ejs +8 -3
  247. package/generators/kubernetes/templates/istio/destination-rule.yml.ejs +1 -1
  248. package/generators/kubernetes/templates/istio/gateway/grafana-gateway.yml.ejs +5 -2
  249. package/generators/kubernetes/templates/istio/gateway/jhipster-grafana-gateway.yml.ejs +5 -2
  250. package/generators/kubernetes/templates/istio/gateway/kiali-gateway.yml.ejs +10 -8
  251. package/generators/kubernetes/templates/istio/gateway/zipkin-gateway.yml.ejs +5 -2
  252. package/generators/kubernetes/templates/istio/gateway.yml.ejs +7 -5
  253. package/generators/kubernetes/templates/secret/couchbase-secret.yml.ejs +9 -0
  254. package/generators/kubernetes-base.js +1 -0
  255. package/generators/kubernetes-helm/files.js +3 -8
  256. package/generators/kubernetes-helm/index.js +10 -10
  257. package/generators/kubernetes-helm/templates/README-KUBERNETES-HELM.md.ejs +0 -1
  258. package/generators/kubernetes-helm/templates/app/Chart.yml.ejs +5 -0
  259. package/generators/kubernetes-helm/templates/app/helpers.tpl.ejs +0 -11
  260. package/generators/kubernetes-helm/templates/app/requirements.yml.ejs +5 -0
  261. package/generators/kubernetes-helm/templates/app/values.yml.ejs +68 -5
  262. package/generators/kubernetes-helm/templates/csvc/Chart.yml.ejs +1 -1
  263. package/generators/kubernetes-helm/templates/csvc/requirements.yml.ejs +1 -1
  264. package/generators/kubernetes-knative/index.js +10 -10
  265. package/generators/kubernetes-knative/templates/istio/gateway.yml.ejs +6 -4
  266. package/generators/kubernetes-knative/templates/service.yml.ejs +1 -1
  267. package/generators/languages/index.js +13 -13
  268. package/generators/languages/templates/src/main/webapp/i18n/vi/login.json +1 -1
  269. package/generators/openapi-client/index.js +13 -10
  270. package/generators/openshift/index.js +10 -11
  271. package/generators/openshift/templates/deployment.yml.ejs +1 -1
  272. package/generators/page/index.js +12 -10
  273. package/generators/server/__snapshots__/generator.spec.mjs.snap +28 -15
  274. package/generators/server/cleanup.js +151 -0
  275. package/generators/server/files-sql.js +52 -0
  276. package/generators/server/files.js +31 -14
  277. package/generators/server/index.js +86 -33
  278. package/generators/server/templates/build.gradle.ejs +231 -189
  279. package/generators/server/templates/gradle.properties.ejs +12 -12
  280. package/generators/server/templates/npmw +8 -6
  281. package/generators/server/templates/npmw.cmd +13 -8
  282. package/generators/server/templates/pom.xml.ejs +425 -217
  283. package/generators/server/templates/sql/reactive/src/main/java/package/repository/UserSqlHelper.java.ejs +48 -0
  284. package/generators/server/templates/src/main/docker/app.yml.ejs +1 -1
  285. package/generators/server/templates/src/main/docker/config/realm-config/jhipster-realm.json.ejs +2 -2
  286. package/generators/server/templates/src/main/java/package/config/LocaleConfiguration.java.ejs +3 -2
  287. package/generators/server/templates/src/main/java/package/config/OpenApiConfiguration.java.ejs +17 -54
  288. package/generators/server/templates/src/main/java/package/config/SecurityConfiguration.java.ejs +5 -5
  289. package/generators/server/templates/src/main/java/package/config/SecurityConfiguration_reactive.java.ejs +4 -6
  290. package/generators/server/templates/src/main/java/package/config/WebConfigurer.java.ejs +0 -3
  291. package/generators/server/templates/src/main/java/package/config/neo4j/Neo4jMigrations.java.ejs +19 -9
  292. package/generators/server/templates/src/main/java/package/management/SecurityMetersService.java.ejs +68 -0
  293. package/generators/server/templates/src/main/java/package/repository/AuthorityRepository.java.ejs +2 -2
  294. package/generators/server/templates/src/main/java/package/repository/UserRepository.java.ejs +0 -25
  295. package/generators/server/templates/src/main/java/package/security/jwt/TokenProvider.java.ejs +31 -4
  296. package/generators/server/templates/src/main/java/package/security/oauth2/CustomClaimConverter.java.ejs +23 -11
  297. package/generators/server/templates/src/main/java/package/service/UserService.java.ejs +16 -8
  298. package/generators/server/templates/src/main/java/package/service/dto/UserDTO.java.ejs +6 -6
  299. package/generators/server/templates/src/main/java/package/web/filter/ModifyServersOpenApiFilter.java.ejs +3 -2
  300. package/generators/server/templates/src/main/java/package/web/filter/SpaWebFilter.java.ejs +1 -1
  301. package/generators/server/templates/src/main/java/package/web/rest/PublicUserResource.java.ejs +2 -2
  302. package/generators/server/templates/src/main/java/package/web/rest/UserResource.java.ejs +2 -2
  303. package/generators/server/templates/src/main/resources/config/application.yml.ejs +22 -8
  304. package/generators/server/templates/src/main/resources/logback-spring.xml.ejs +1 -2
  305. package/generators/server/templates/src/main/resources/static/microservices_index.html.ejs +1 -1
  306. package/generators/server/templates/src/test/java/package/cucumber/CucumberIT.java.ejs +2 -6
  307. package/generators/server/templates/src/test/java/package/cucumber/CucumberTestContextConfiguration.java.ejs +2 -3
  308. package/generators/server/templates/src/test/java/package/cucumber/stepdefs/UserStepDefs.java.ejs +41 -6
  309. package/generators/server/templates/src/test/java/package/management/SecurityMetersServiceTests.java.ejs +113 -0
  310. package/generators/server/templates/src/test/java/package/security/jwt/JWTFilterTest.java.ejs +6 -1
  311. package/generators/server/templates/src/test/java/package/security/jwt/TokenProviderSecurityMetersTests.java.ejs +198 -0
  312. package/generators/server/templates/src/test/java/package/security/jwt/TokenProviderTest.java.ejs +13 -3
  313. package/generators/server/templates/src/test/java/package/security/oauth2/AuthorizationHeaderUtilTest.java.ejs +17 -3
  314. package/generators/server/templates/src/test/java/package/security/oauth2/CustomClaimConverterIT.java.ejs +63 -0
  315. package/generators/server/templates/src/test/java/package/service/MailServiceIT.java.ejs +1 -1
  316. package/generators/server/templates/src/test/java/package/web/rest/AccountResourceIT.java.ejs +2 -3
  317. package/generators/server/templates/src/test/java/package/web/rest/ClientForwardControllerTest.java.ejs +9 -0
  318. package/generators/server/templates/src/test/resources/junit-platform.properties.ejs +2 -0
  319. package/generators/server/templates/src/test/resources/logback.xml.ejs +1 -1
  320. package/generators/server/templates/src/test/{features → resources/package/features}/gitkeep +0 -0
  321. package/generators/server/templates/src/test/{features → resources/package/features}/user/user.feature.ejs +0 -0
  322. package/generators/spring-controller/index.js +9 -7
  323. package/generators/spring-controller/templates/src/test/java/package/web/rest/ResourceIT.java.ejs +1 -1
  324. package/generators/spring-service/index.js +10 -7
  325. package/generators/upgrade/index.js +4 -5
  326. package/generators/utils.js +2 -2
  327. package/generators/workspaces/index.js +16 -7
  328. package/jdl/jhipster/default-application-options.js +9 -7
  329. package/package.json +22 -22
  330. package/utils/entity.js +17 -4
  331. package/utils/field.js +11 -1
  332. package/utils/multi-step-transform/index.js +8 -8
  333. package/generators/client/templates/react/.npmrc.ejs +0 -1
  334. package/generators/client/templates/vue/webpack/dev.env.js.ejs +0 -17
  335. package/generators/client/templates/vue/webpack/env.js.ejs +0 -67
  336. package/generators/client/templates/vue/webpack/loader.conf.js.ejs +0 -20
  337. package/generators/client/templates/vue/webpack/prod.env.js.ejs +0 -15
  338. package/generators/server/templates/src/main/java/package/config/apidocs/GatewaySwaggerResourcesProvider.java.ejs +0 -91
  339. package/generators/server/templates/src/test/java/package/config/apidocs/GatewaySwaggerResourcesProviderTest.java.ejs +0 -79
  340. package/generators/server/templates/src/test/resources/cucumber.properties.ejs +0 -1
@@ -67,7 +67,7 @@ spec:
67
67
  rt=$(nc -z -w 1 <%= app.baseName.toLowerCase() %>-mongodb 27017)
68
68
  <%_ } _%>
69
69
  <%_ if (app.prodDatabaseTypeCouchbase) { _%>
70
- rt=$(nc -z -w 1 <%= app.baseName.toLowerCase() %>-couchbase 8091)
70
+ rt=$(nc -z -w 1 <%= app.baseName.toLowerCase() %>-couchbase-cluster-srv 8091)
71
71
  <%_ } _%>
72
72
  <%_ if (app.prodDatabaseTypeNeo4j) { _%>
73
73
  rt=$(nc -z -w 1 <%= app.baseName.toLowerCase() %>-neo4j 7474)
@@ -177,9 +177,14 @@ spec:
177
177
  <%_ } _%>
178
178
  <%_ if (app.prodDatabaseTypeCouchbase) { _%>
179
179
  - name: SPRING_COUCHBASE_CONNECTION_STRING
180
- value: "<% for (let i = 0; i < app.dbPeerCount; i++) { %><%= app.baseName.toLowerCase() %>-couchbase-<%= i %>.<%= app.baseName.toLowerCase() %>-couchbase<% if (i < (app.dbPeerCount-1)) { %>,<% }} %>"
181
- - name: JHIPSTER_COUCHBASE_BUCKET_NAME
180
+ value: "<%= app.baseName.toLowerCase() %>-couchbase-cluster-srv"
181
+ - name: JHIPSTER_DATABASE_COUCHBASE_BUCKET_NAME
182
182
  value: <%= app.baseName.toLowerCase() %>
183
+ - name: SPRING_COUCHBASE_BUCKET_PASSWORD
184
+ valueFrom:
185
+ secretKeyRef:
186
+ name: couchbase-secret
187
+ key: password
183
188
  <%_ } _%>
184
189
  <%_ if (app.searchEngineElasticsearch) { _%>
185
190
  - name: SPRING_ELASTICSEARCH_REST_URIS
@@ -18,7 +18,7 @@ spec:
18
18
  maxRequestsPerConnection: 10
19
19
  maxRetries: 5
20
20
  outlierDetection:
21
- consecutiveErrors: 5
21
+ consecutive5xxErrors: 5
22
22
  interval: 30s
23
23
  baseEjectionTime: 60s
24
24
  subsets:
@@ -16,7 +16,10 @@
16
16
  See the License for the specific language governing permissions and
17
17
  limitations under the License.
18
18
  -%>
19
- apiVersion: networking.istio.io/v1alpha3
19
+ # This configuration uses 'http' and is not recommended for production use.
20
+ # Refer https://istio.io/latest/docs/tasks/observability/gateways/ for a more secure 'https' config
21
+ # using a self signed certificate and prefer that for production use
22
+ apiVersion: <%= KUBERNETES_ISTIO_NETWORKING_API_VERSION %>
20
23
  kind: Gateway
21
24
  metadata:
22
25
  name: grafana-observability-gateway
@@ -38,7 +41,7 @@ spec:
38
41
  hosts:
39
42
  - grafana.istio-system.<%= ingressDomain %>
40
43
  ---
41
- apiVersion: networking.istio.io/v1alpha3
44
+ apiVersion: <%= KUBERNETES_ISTIO_NETWORKING_API_VERSION %>
42
45
  kind: VirtualService
43
46
  metadata:
44
47
  name: grafana-gw-virtualservice
@@ -16,7 +16,10 @@
16
16
  See the License for the specific language governing permissions and
17
17
  limitations under the License.
18
18
  -%>
19
- apiVersion: networking.istio.io/v1alpha3
19
+ # This configuration uses 'http' and is not recommended for production use.
20
+ # Refer https://istio.io/latest/docs/tasks/observability/gateways/ for a more secure 'https' config
21
+ # using a self signed certificate and prefer that for production use
22
+ apiVersion: <%= KUBERNETES_ISTIO_NETWORKING_API_VERSION %>
20
23
  kind: Gateway
21
24
  metadata:
22
25
  name: jhipster-grafana-gateway
@@ -38,7 +41,7 @@ spec:
38
41
  hosts:
39
42
  - jhipster-grafana.<%= kubernetesNamespace %>.<%= ingressDomain %>
40
43
  ---
41
- apiVersion: networking.istio.io/v1alpha3
44
+ apiVersion: <%= KUBERNETES_ISTIO_NETWORKING_API_VERSION %>
42
45
  kind: VirtualService
43
46
  metadata:
44
47
  name: jhipster-grafana-gw-virtualservice
@@ -16,7 +16,10 @@
16
16
  See the License for the specific language governing permissions and
17
17
  limitations under the License.
18
18
  -%>
19
- apiVersion: networking.istio.io/v1alpha3
19
+ # This configuration uses 'http' and is not recommended for production use.
20
+ # Refer https://istio.io/latest/docs/tasks/observability/gateways/ for a more secure 'https' config
21
+ # using a self signed certificate and prefer that for production use
22
+ apiVersion: <%= KUBERNETES_ISTIO_NETWORKING_API_VERSION %>
20
23
  kind: Gateway
21
24
  metadata:
22
25
  name: kiali-observability-gateway
@@ -38,7 +41,7 @@ spec:
38
41
  hosts:
39
42
  - kiali.istio-system.<%= ingressDomain %>
40
43
  ---
41
- apiVersion: networking.istio.io/v1alpha3
44
+ apiVersion: <%= KUBERNETES_ISTIO_NETWORKING_API_VERSION %>
42
45
  kind: VirtualService
43
46
  metadata:
44
47
  name: kiali-gw-virtualservice
@@ -49,9 +52,8 @@ spec:
49
52
  gateways:
50
53
  - kiali-observability-gateway
51
54
  http:
52
- - match:
53
- - uri:
54
- prefix: /
55
- route:
56
- - destination:
57
- host: kiali
55
+ - route:
56
+ - destination:
57
+ host: kiali
58
+ port:
59
+ number: 20001
@@ -16,7 +16,10 @@
16
16
  See the License for the specific language governing permissions and
17
17
  limitations under the License.
18
18
  -%>
19
- apiVersion: networking.istio.io/v1alpha3
19
+ # This configuration uses 'http' and is not recommended for production use.
20
+ # Refer https://istio.io/latest/docs/tasks/observability/gateways/ for a more secure 'https' config
21
+ # using a self signed certificate and prefer that for production use
22
+ apiVersion: <%= KUBERNETES_ISTIO_NETWORKING_API_VERSION %>
20
23
  kind: Gateway
21
24
  metadata:
22
25
  name: zipkin-observability-gateway
@@ -38,7 +41,7 @@ spec:
38
41
  hosts:
39
42
  - zipkin.istio-system.<%= ingressDomain %>
40
43
  ---
41
- apiVersion: networking.istio.io/v1alpha3
44
+ apiVersion: <%= KUBERNETES_ISTIO_NETWORKING_API_VERSION %>
42
45
  kind: VirtualService
43
46
  metadata:
44
47
  name: zipkin-gw-virtualservice
@@ -16,6 +16,9 @@
16
16
  See the License for the specific language governing permissions and
17
17
  limitations under the License.
18
18
  -%>
19
+ # This configuration uses 'http' and is not recommended for production use.
20
+ # Refer https://istio.io/latest/docs/reference/config/networking/gateway/ for a more secure 'https' config
21
+ # using certificates and prefer that for production use
19
22
  apiVersion: <%= KUBERNETES_ISTIO_NETWORKING_API_VERSION %>
20
23
  kind: Gateway
21
24
  metadata:
@@ -58,15 +61,14 @@ spec:
58
61
  <%_ appConfigs.filter(config => config.baseName !== app.baseName).forEach(config => { _%>
59
62
  - match:
60
63
  - uri:
61
- prefix: /<%= config.baseName.toLowerCase() %>/
64
+ prefix: /services/<%= config.baseName.toLowerCase() %>/
65
+ rewrite:
66
+ uri: /
62
67
  route:
63
68
  - destination:
64
69
  host: <%= config.baseName.toLowerCase() %>
65
70
  <%_ }); _%>
66
71
  <%_ } _%>
67
- - match:
68
- - uri:
69
- prefix: /
70
- route:
72
+ - route:
71
73
  - destination:
72
74
  host: <%= app.baseName.toLowerCase() %>
@@ -0,0 +1,9 @@
1
+ apiVersion: <%= KUBERNETES_CORE_API_VERSION %>
2
+ kind: Secret
3
+ metadata:
4
+ name: couchbase-secret
5
+ namespace: <%= kubernetesNamespace %>
6
+ type: Opaque
7
+ data:
8
+ username: QWRtaW5pc3RyYXRvcg==
9
+ password: cGFzc3dvcmQ=
@@ -144,4 +144,5 @@ function setupHelmConstants() {
144
144
  this.HELM_MYSQL = constants.HELM_MYSQL;
145
145
  this.HELM_POSTGRESQL = constants.HELM_POSTGRESQL;
146
146
  this.HELM_MOGODB_REPLICASET = constants.HELM_MOGODB_REPLICASET;
147
+ this.HELM_COUCHBASE_OPERATOR = constants.HELM_COUCHBASE_OPERATOR;
147
148
  }
@@ -16,7 +16,6 @@
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
18
  */
19
- const { COUCHBASE } = require('../../jdl/jhipster/database-types');
20
19
  const { ELASTICSEARCH } = require('../../jdl/jhipster/search-engine-types');
21
20
  const { GATEWAY, MONOLITH } = require('../../jdl/jhipster/application-types');
22
21
  const { JWT } = require('../../jdl/jhipster/authentication-types');
@@ -50,13 +49,6 @@ function writeFiles() {
50
49
  this.template('app/requirements.yml.ejs', `${appOut}/requirements.yaml`);
51
50
  this.template('app/helpers.tpl.ejs', `${appOut}/templates/_helpers.tpl`);
52
51
 
53
- if (this.app.prodDatabaseType === COUCHBASE) {
54
- this.template(
55
- `${kubernetesSubgenPath}/db/${this.app.prodDatabaseType}.yml.ejs`,
56
- `${appOut}/templates/${appName}-${this.app.prodDatabaseType}.yml`
57
- );
58
- }
59
-
60
52
  if (this.app.searchEngine === ELASTICSEARCH) {
61
53
  this.template(`${kubernetesSubgenPath}/db/elasticsearch.yml.ejs`, `${appOut}/templates/${appName}-elasticsearch.yml`);
62
54
  }
@@ -70,6 +62,9 @@ function writeFiles() {
70
62
  if (!this.app.serviceDiscoveryType && this.app.authenticationType === JWT) {
71
63
  this.template(`${kubernetesSubgenPath}/secret/jwt-secret.yml.ejs`, `${appOut}/templates/jwt-secret.yml`);
72
64
  }
65
+ if (this.app.prodDatabaseTypeCouchbase) {
66
+ this.template(`${kubernetesSubgenPath}/secret/couchbase-secret.yml.ejs`, `${appOut}/templates/couchbase-secret.yml`);
67
+ }
73
68
  if (this.istio) {
74
69
  this.template(`${kubernetesSubgenPath}/istio/destination-rule.yml.ejs`, `${appOut}/templates/${appName}-destination-rule.yml`);
75
70
  this.template(`${kubernetesSubgenPath}/istio/virtual-service.yml.ejs`, `${appOut}/templates/${appName}-virtual-service.yml`);
@@ -36,11 +36,11 @@ const {
36
36
  } = require('../kubernetes-base');
37
37
  const statistics = require('../statistics');
38
38
 
39
- let useBlueprints;
40
39
  module.exports = class extends BaseDockerGenerator {
41
- constructor(args, options, features) {
42
- super(args, options, features);
43
- useBlueprints = !this.fromBlueprint && this.instantiateBlueprints(GENERATOR_KUBERNETES_HELM);
40
+ async _postConstruct() {
41
+ if (!this.fromBlueprint) {
42
+ await this.composeWithBlueprints(GENERATOR_KUBERNETES_HELM);
43
+ }
44
44
  }
45
45
 
46
46
  _initializing() {
@@ -59,7 +59,7 @@ module.exports = class extends BaseDockerGenerator {
59
59
  }
60
60
 
61
61
  get initializing() {
62
- if (useBlueprints) return;
62
+ if (this.delegateToBlueprint) return {};
63
63
  return this._initializing();
64
64
  }
65
65
 
@@ -83,7 +83,7 @@ module.exports = class extends BaseDockerGenerator {
83
83
  }
84
84
 
85
85
  get prompting() {
86
- if (useBlueprints) return;
86
+ if (this.delegateToBlueprint) return {};
87
87
  return this._prompting();
88
88
  }
89
89
 
@@ -111,7 +111,7 @@ module.exports = class extends BaseDockerGenerator {
111
111
  }
112
112
 
113
113
  get configuring() {
114
- if (useBlueprints) return;
114
+ if (this.delegateToBlueprint) return {};
115
115
  return this._configuring();
116
116
  }
117
117
 
@@ -129,7 +129,7 @@ module.exports = class extends BaseDockerGenerator {
129
129
  }
130
130
 
131
131
  get loading() {
132
- if (useBlueprints) return;
132
+ if (this.delegateToBlueprint) return {};
133
133
  return this._loading();
134
134
  }
135
135
 
@@ -138,7 +138,7 @@ module.exports = class extends BaseDockerGenerator {
138
138
  }
139
139
 
140
140
  get writing() {
141
- if (useBlueprints) return;
141
+ if (this.delegateToBlueprint) return {};
142
142
  return this._writing();
143
143
  }
144
144
 
@@ -185,7 +185,7 @@ module.exports = class extends BaseDockerGenerator {
185
185
  }
186
186
 
187
187
  get end() {
188
- if (useBlueprints) return;
188
+ if (this.delegateToBlueprint) return {};
189
189
  return this._end();
190
190
  }
191
191
  };
@@ -48,6 +48,5 @@ For Kubernetes specific information, refer to the `kubernetes` sub-generator Rea
48
48
 
49
49
  ### Backlogs to be covered
50
50
 
51
- * Couchbase is yet to be integrated with Helm repository, it is still referring the Kubernetes sub-generator manifest - to be tested
52
51
  * helm upgrade - to be tested
53
52
  * Istio - to be tested
@@ -36,4 +36,9 @@ dependencies:
36
36
  version: <%= HELM_MOGODB_REPLICASET %>
37
37
  repository: https://charts.helm.sh/stable
38
38
  condition: mongodb.enabled
39
+ <%_ } else if (app.prodDatabaseTypeCouchbase) { _%>
40
+ - name: couchbase-operator
41
+ version: <%= HELM_COUCHBASE_OPERATOR %>
42
+ repository: https://couchbase-partners.github.io/helm-charts/
43
+ condition: couchbase-operator.enabled
39
44
  <%_ } _%>
@@ -43,15 +43,4 @@ mongodb customisation
43
43
  {{- define "mongodb-replicaset.fullname" -}}
44
44
  {{- default "<%= app.baseName.toLowerCase() %>-mongodb" -}}
45
45
  {{- end -}}
46
- <%_ } else if (app.prodDatabaseTypeCouchbase) { _%>
47
- {{/*
48
- couchdb customisation
49
- */}}
50
- {{- define "couchdb.name" -}}
51
- {{- default "<%= app.baseName.toLowerCase() %>-couchbase" -}}
52
- {{- end -}}
53
-
54
- {{- define "couchdb.fullname" -}}
55
- {{- default "<%= app.baseName.toLowerCase() %>-couchbase" -}}
56
- {{- end -}}
57
46
  <%_ } _%>
@@ -19,4 +19,9 @@ dependencies:
19
19
  version: <%= HELM_MOGODB_REPLICASET %>
20
20
  repository: https://charts.helm.sh/stable
21
21
  condition: mongodb.enabled
22
+ <%_ } else if (app.prodDatabaseTypeCouchbase) { _%>
23
+ - name: couchbase-operator
24
+ version: <%= HELM_COUCHBASE_OPERATOR %>
25
+ repository: https://couchbase-partners.github.io/helm-charts/
26
+ condition: couchbase-operator.enabled
22
27
  <%_ } _%>
@@ -48,10 +48,73 @@ mongodb-replicaset:
48
48
  sidecar.istio.io/inject: "false"
49
49
  <%_ } _%>
50
50
  <%_ } else if (app.prodDatabaseTypeCouchbase) { _%>
51
- couchdb:
51
+ couchbase-operator:
52
52
  enabled: true
53
- allowAdminParty: true
54
- clusterSize: 3
55
- persistentVolume:
56
- enabled: true
53
+ buckets:
54
+ default: nil
55
+ <%= app.baseName.toLowerCase() %>:
56
+ replicas: <%= app.dbPeerCount - 1 %>
57
+ users:
58
+ <%= app.baseName.toLowerCase() %>:
59
+ authSecret: couchbase-secret
60
+ authDomain: local
61
+ roles:
62
+ - name: bucket_admin
63
+ bucket: <%= app.baseName.toLowerCase() %>
64
+ - name: bucket_full_access
65
+ bucket: <%= app.baseName.toLowerCase() %>
66
+ - name: fts_admin
67
+ bucket: <%= app.baseName.toLowerCase() %>
68
+ - name: fts_searcher
69
+ bucket: <%= app.baseName.toLowerCase() %>
70
+ cluster:
71
+ antiAffinity: true
72
+ image: <%= DOCKER_COUCHBASE %>
73
+ security:
74
+ adminSecret: couchbase-secret
75
+ servers:
76
+ default:
77
+ <%_ if (kubernetesUseDynamicStorage) { _%>
78
+ volumeMounts:
79
+ default: pvc-default
80
+ data: pvc-data
81
+ index: pvc-index
82
+ <%_ } _%>
83
+ services:
84
+ - data
85
+ - query
86
+ - index
87
+ - search
88
+ size: <%= app.dbPeerCount %>
89
+ cluster:
90
+ dataServiceMemoryQuota: 500Mi
91
+ indexServiceMemoryQuota: 300Mi
92
+ searchServiceMemoryQuota: 300Mi
93
+ indexStorageSetting: plasma
94
+ indexer:
95
+ storageMode: plasma
96
+ <%_ if (kubernetesUseDynamicStorage) { _%>
97
+ volumeClaimTemplates:
98
+ - metadata:
99
+ name: pvc-default
100
+ spec:
101
+ storageClassName: <%= kubernetesStorageClassName %>
102
+ resources:
103
+ requests:
104
+ storage: 1Gi
105
+ - metadata:
106
+ name: pvc-data
107
+ spec:
108
+ storageClassName: <%= kubernetesStorageClassName %>
109
+ resources:
110
+ requests:
111
+ storage: 1Gi
112
+ - metadata:
113
+ name: pvc-index
114
+ spec:
115
+ storageClassName: <%= kubernetesStorageClassName %>
116
+ resources:
117
+ requests:
118
+ storage: 1Gi
119
+ <%_ } _%>
57
120
  <%_ } _%>
@@ -23,7 +23,7 @@ dependencies:
23
23
  condition: kafka.enabled
24
24
  <%_ } _%>
25
25
  <%_ if (monitoringPrometheus) { _%>
26
- - name: prometheus-community
26
+ - name: prometheus
27
27
  version: <%= HELM_PROMETHEUS %>
28
28
  repository: https://prometheus-community.github.io/helm-charts
29
29
  condition: prometheus.enabled
@@ -6,7 +6,7 @@ dependencies:
6
6
  condition: kafka.enabled
7
7
  <%_ } _%>
8
8
  <%_ if (monitoringPrometheus) { _%>
9
- - name: prometheus-community
9
+ - name: prometheus
10
10
  version: <%= HELM_PROMETHEUS %>
11
11
  repository: https://prometheus-community.github.io/helm-charts
12
12
  condition: prometheus.enabled
@@ -41,11 +41,11 @@ const { GeneratorTypes } = require('../../jdl/jhipster/kubernetes-platform-types
41
41
 
42
42
  const { K8S } = GeneratorTypes;
43
43
 
44
- let useBlueprints;
45
44
  module.exports = class extends BaseDockerGenerator {
46
- constructor(args, options, features) {
47
- super(args, options, features);
48
- useBlueprints = !this.fromBlueprint && this.instantiateBlueprints(GENERATOR_KUBERNETES_KNATIVE);
45
+ async _postConstruct() {
46
+ if (!this.fromBlueprint) {
47
+ await this.composeWithBlueprints(GENERATOR_KUBERNETES_KNATIVE);
48
+ }
49
49
  }
50
50
 
51
51
  _initializing() {
@@ -85,7 +85,7 @@ module.exports = class extends BaseDockerGenerator {
85
85
  }
86
86
 
87
87
  get initializing() {
88
- if (useBlueprints) return;
88
+ if (this.delegateToBlueprint) return {};
89
89
  return this._initializing();
90
90
  }
91
91
 
@@ -106,7 +106,7 @@ module.exports = class extends BaseDockerGenerator {
106
106
  }
107
107
 
108
108
  get prompting() {
109
- if (useBlueprints) return;
109
+ if (this.delegateToBlueprint) return {};
110
110
  return this._prompting();
111
111
  }
112
112
 
@@ -134,7 +134,7 @@ module.exports = class extends BaseDockerGenerator {
134
134
  }
135
135
 
136
136
  get configuring() {
137
- if (useBlueprints) return;
137
+ if (this.delegateToBlueprint) return {};
138
138
  return this._configuring();
139
139
  }
140
140
 
@@ -152,7 +152,7 @@ module.exports = class extends BaseDockerGenerator {
152
152
  }
153
153
 
154
154
  get loading() {
155
- if (useBlueprints) return;
155
+ if (this.delegateToBlueprint) return {};
156
156
  return this._loading();
157
157
  }
158
158
 
@@ -161,7 +161,7 @@ module.exports = class extends BaseDockerGenerator {
161
161
  }
162
162
 
163
163
  get writing() {
164
- if (useBlueprints) return;
164
+ if (this.delegateToBlueprint) return {};
165
165
  return this._writing();
166
166
  }
167
167
 
@@ -235,7 +235,7 @@ module.exports = class extends BaseDockerGenerator {
235
235
  }
236
236
 
237
237
  get end() {
238
- if (useBlueprints) return;
238
+ if (this.delegateToBlueprint) return {};
239
239
  return this._end();
240
240
  }
241
241
  };
@@ -16,6 +16,9 @@
16
16
  See the License for the specific language governing permissions and
17
17
  limitations under the License.
18
18
  -%>
19
+ # This configuration uses 'http' and is not recommended for production use.
20
+ # Refer https://istio.io/latest/docs/reference/config/networking/gateway/ for a more secure 'https' config
21
+ # using certificates and prefer that for production use
19
22
  apiVersion: <%= KUBERNETES_ISTIO_NETWORKING_API_VERSION %>
20
23
  kind: Gateway
21
24
  metadata:
@@ -59,6 +62,8 @@ spec:
59
62
  - match:
60
63
  - uri:
61
64
  prefix: /services/<%= config.baseName.toLowerCase() %>/
65
+ rewrite:
66
+ uri: /
62
67
  route:
63
68
  - destination:
64
69
  host: <%= config.baseName.toLowerCase() %>-knative
@@ -69,10 +74,7 @@ spec:
69
74
  Knative-Serving-Revision: <%= config.baseName.toLowerCase() %>-knative
70
75
  <%_ }); _%>
71
76
  <%_ } _%>
72
- - match:
73
- - uri:
74
- prefix: /
75
- route:
77
+ - route:
76
78
  - destination:
77
79
  host: <%= app.baseName.toLowerCase() %>-knative
78
80
  headers:
@@ -114,7 +114,7 @@ spec:
114
114
  <%_ if (app.prodDatabaseTypeCouchbase) { _%>
115
115
  - name: SPRING_COUCHBASE_CONNECTION_STRING
116
116
  value: "<% for (let i = 0; i < app.dbPeerCount; i++) { %><%= app.baseName.toLowerCase() %>-couchbase-<%= i %>.<%= app.baseName.toLowerCase() %>-couchbase<% if (i < (app.dbPeerCount-1)) { %>,<% }} %>"
117
- - name: JHIPSTER_COUCHBASE_BUCKET_NAME
117
+ - name: JHIPSTER_DATABASE_COUCHBASE_BUCKET_NAME
118
118
  value: <%= app.baseName.toLowerCase() %>
119
119
  <%_ } _%>
120
120
  <%_ if (app.searchEngineElasticsearch) { _%>
@@ -31,8 +31,6 @@ const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
31
31
  const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
32
32
  const VUE = constants.SUPPORTED_CLIENT_FRAMEWORKS.VUE;
33
33
 
34
- let useBlueprints;
35
-
36
34
  module.exports = class extends BaseBlueprintGenerator {
37
35
  constructor(args, options, features) {
38
36
  super(args, options, { unique: 'namespace', ...features });
@@ -90,10 +88,12 @@ module.exports = class extends BaseBlueprintGenerator {
90
88
  }
91
89
  });
92
90
  }
91
+ }
93
92
 
94
- useBlueprints =
95
- !this.fromBlueprint &&
96
- this.instantiateBlueprints('languages', { languages: this.languagesToApply, arguments: this.options.languages });
93
+ async _postConstruct() {
94
+ if (!this.fromBlueprint) {
95
+ await this.composeWithBlueprints('languages', { languages: this.languagesToApply, arguments: this.options.languages });
96
+ }
97
97
  }
98
98
 
99
99
  // Public API method used by the getter and also by Blueprints
@@ -118,7 +118,7 @@ module.exports = class extends BaseBlueprintGenerator {
118
118
  }
119
119
 
120
120
  get initializing() {
121
- if (useBlueprints) return;
121
+ if (this.delegateToBlueprint) return {};
122
122
  return this._initializing();
123
123
  }
124
124
 
@@ -131,7 +131,7 @@ module.exports = class extends BaseBlueprintGenerator {
131
131
  }
132
132
 
133
133
  get prompting() {
134
- if (useBlueprints) return;
134
+ if (this.delegateToBlueprint) return {};
135
135
  return this._prompting();
136
136
  }
137
137
 
@@ -170,7 +170,7 @@ module.exports = class extends BaseBlueprintGenerator {
170
170
  }
171
171
 
172
172
  get configuring() {
173
- if (useBlueprints) return;
173
+ if (this.delegateToBlueprint) return {};
174
174
  return this._configuring();
175
175
  }
176
176
 
@@ -193,7 +193,7 @@ module.exports = class extends BaseBlueprintGenerator {
193
193
  }
194
194
 
195
195
  get loading() {
196
- if (useBlueprints) return;
196
+ if (this.delegateToBlueprint) return {};
197
197
  return this._loading();
198
198
  }
199
199
 
@@ -214,7 +214,7 @@ module.exports = class extends BaseBlueprintGenerator {
214
214
  }
215
215
 
216
216
  get preparing() {
217
- if (useBlueprints) return;
217
+ if (this.delegateToBlueprint) return {};
218
218
  return this._preparing();
219
219
  }
220
220
 
@@ -229,7 +229,7 @@ module.exports = class extends BaseBlueprintGenerator {
229
229
  }
230
230
 
231
231
  get default() {
232
- if (useBlueprints) return;
232
+ if (this.delegateToBlueprint) return {};
233
233
  return this._default();
234
234
  }
235
235
 
@@ -258,7 +258,7 @@ module.exports = class extends BaseBlueprintGenerator {
258
258
  }
259
259
 
260
260
  get writing() {
261
- if (useBlueprints) return;
261
+ if (this.delegateToBlueprint) return {};
262
262
  return this._writing();
263
263
  }
264
264
 
@@ -292,7 +292,7 @@ module.exports = class extends BaseBlueprintGenerator {
292
292
  }
293
293
 
294
294
  get postWriting() {
295
- if (useBlueprints) return;
295
+ if (this.delegateToBlueprint) return {};
296
296
  return this._postWriting();
297
297
  }
298
298
  };
@@ -3,7 +3,7 @@
3
3
  "title": "Đăng nhập",
4
4
  "form": {
5
5
  "password": "Mật khẩu",
6
- "password.placeholder": "Nhập mật khầu của bạn",
6
+ "password.placeholder": "Nhập mật khẩu của bạn",
7
7
  "rememberme": "Nhớ tài khoản",
8
8
  "button": "Đăng nhập"
9
9
  },