generator-jhipster 7.6.0 → 7.8.1

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 (432) hide show
  1. package/README.md +1 -4
  2. package/cli/commands.js +3 -0
  3. package/cli/environment-builder.js +53 -18
  4. package/cli/import-jdl.js +3 -0
  5. package/cli/index.mjs +20 -0
  6. package/cli/jhipster.js +19 -11
  7. package/cli/program.js +94 -38
  8. package/generators/app/esm.mjs +1 -3
  9. package/generators/app/index.js +11 -16
  10. package/generators/aws/esm.mjs +1 -3
  11. package/generators/azure-app-service/esm.mjs +1 -3
  12. package/generators/azure-spring-cloud/esm.mjs +1 -3
  13. package/generators/base/esm.mjs +1 -3
  14. package/generators/bootstrap/esm.mjs +1 -3
  15. package/generators/bootstrap/index.js +36 -86
  16. package/generators/bootstrap-application/esm.mjs +19 -0
  17. package/generators/bootstrap-application/generator.mjs +353 -0
  18. package/generators/bootstrap-application/index.mjs +19 -0
  19. package/generators/ci-cd/esm.mjs +1 -3
  20. package/generators/ci-cd/index.js +1 -1
  21. package/generators/ci-cd/prompts.js +1 -1
  22. package/generators/ci-cd/templates/github-actions.yml.ejs +6 -6
  23. package/generators/client/esm.mjs +5 -3
  24. package/generators/client/files-angular.js +9 -0
  25. package/generators/client/files-common.js +9 -9
  26. package/generators/client/files-react.js +25 -2
  27. package/generators/client/files-vue.js +7 -6
  28. package/generators/client/index.js +3 -2
  29. package/generators/client/needle-api/needle-client-react.js +11 -8
  30. package/generators/client/templates/angular/angular.json.ejs +2 -10
  31. package/generators/client/templates/angular/jest.conf.js.ejs +1 -1
  32. package/generators/client/templates/angular/package.json +29 -27
  33. package/generators/client/templates/angular/package.json.ejs +6 -2
  34. package/generators/client/templates/angular/src/main/webapp/app/account/activate/activate.component.html.ejs +1 -1
  35. package/generators/client/templates/angular/src/main/webapp/app/account/password/password.component.html.ejs +7 -7
  36. package/generators/client/templates/angular/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.html.ejs +5 -5
  37. package/generators/client/templates/angular/src/main/webapp/app/account/password-reset/init/password-reset-init.component.html.ejs +3 -3
  38. package/generators/client/templates/angular/src/main/webapp/app/account/register/register.component.html.ejs +10 -10
  39. package/generators/client/templates/angular/src/main/webapp/app/account/settings/settings.component.html.ejs +8 -8
  40. package/generators/client/templates/angular/src/main/webapp/app/admin/configuration/configuration.component.html.ejs +2 -2
  41. package/generators/client/templates/angular/src/main/webapp/app/admin/gateway/gateway.component.html.ejs +5 -5
  42. package/generators/client/templates/angular/src/main/webapp/app/admin/health/health.component.html.ejs +1 -1
  43. package/generators/client/templates/angular/src/main/webapp/app/admin/health/health.component.spec.ts.ejs +2 -2
  44. package/generators/client/templates/angular/src/main/webapp/app/admin/health/health.component.ts.ejs +2 -2
  45. package/generators/client/templates/angular/src/main/webapp/app/admin/health/modal/health-modal.component.html.ejs +6 -6
  46. package/generators/client/templates/angular/src/main/webapp/app/admin/logs/logs.component.html.ejs +51 -49
  47. package/generators/client/templates/angular/src/main/webapp/app/admin/metrics/blocks/metrics-cache/metrics-cache.component.html.ejs +16 -16
  48. package/generators/client/templates/angular/src/main/webapp/app/admin/metrics/blocks/metrics-datasource/metrics-datasource.component.html.ejs +32 -32
  49. package/generators/client/templates/angular/src/main/webapp/app/admin/metrics/blocks/metrics-endpoints-requests/metrics-endpoints-requests.component.html.ejs +4 -4
  50. package/generators/client/templates/angular/src/main/webapp/app/admin/metrics/blocks/metrics-garbagecollector/metrics-garbagecollector.component.html.ejs +18 -18
  51. package/generators/client/templates/angular/src/main/webapp/app/admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.html.ejs +12 -12
  52. package/generators/client/templates/angular/src/main/webapp/app/admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.ts.ejs +4 -4
  53. package/generators/client/templates/angular/src/main/webapp/app/admin/metrics/blocks/metrics-request/metrics-request.component.html.ejs +4 -4
  54. package/generators/client/templates/angular/src/main/webapp/app/admin/metrics/blocks/metrics-system/metrics-system.component.html.ejs +8 -8
  55. package/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics.component.html.ejs +1 -1
  56. package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/delete/user-management-delete-dialog.component.html.ejs +1 -1
  57. package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/detail/user-management-detail.component.html.ejs +4 -4
  58. package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/list/user-management.component.html.ejs +5 -5
  59. package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/list/user-management.component.ts.ejs +1 -1
  60. package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/update/user-management-update.component.html.ejs +11 -11
  61. package/generators/client/templates/angular/src/main/webapp/app/core/util/data-util.service.ts.ejs +1 -1
  62. package/generators/client/templates/angular/src/main/webapp/app/core/util/parse-links.service.ts.ejs +1 -1
  63. package/generators/client/templates/angular/src/main/webapp/app/layouts/navbar/navbar.component.html.ejs +4 -2
  64. package/generators/client/templates/angular/src/main/webapp/app/layouts/navbar/navbar.component.scss.ejs +0 -6
  65. package/generators/client/templates/angular/src/main/webapp/app/layouts/profiles/page-ribbon.component.scss.ejs +0 -6
  66. package/generators/client/templates/angular/src/main/webapp/app/login/login.component.html.ejs +3 -3
  67. package/generators/client/templates/angular/src/main/webapp/content/scss/_bootstrap-variables.scss.ejs +5 -5
  68. package/generators/client/templates/angular/src/main/webapp/content/scss/global.scss.ejs +29 -0
  69. package/generators/client/templates/angular/src/main/webapp/content/scss/vendor.scss.ejs +0 -4
  70. package/generators/client/templates/angular/webpack/webpack.custom.js.ejs +31 -1
  71. package/generators/client/templates/common/package.json +7 -6
  72. package/generators/client/templates/common/src/main/webapp/swagger-ui/index.html.ejs +1 -7
  73. package/generators/client/templates/common/webpack/webpack.microfrontend.js.jhi.ejs +2 -3
  74. package/generators/client/templates/react/.eslintrc.json.ejs +1 -1
  75. package/generators/client/templates/react/jest.conf.js.ejs +1 -1
  76. package/generators/client/templates/react/package.json +44 -45
  77. package/generators/client/templates/react/package.json.ejs +1 -0
  78. package/generators/client/templates/react/src/main/webapp/app/app.scss.ejs +1 -1
  79. package/generators/client/templates/react/src/main/webapp/app/config/store.ts.ejs +53 -6
  80. package/generators/client/templates/react/src/main/webapp/app/config/translation-middleware.ts.ejs +58 -0
  81. package/generators/client/templates/react/src/main/webapp/app/entities/menu.tsx.ejs +45 -0
  82. package/generators/client/templates/react/src/main/webapp/app/entities/reducers.ts.ejs +25 -0
  83. package/generators/client/templates/react/src/main/webapp/app/entities/routes.tsx.ejs +47 -0
  84. package/generators/client/templates/react/src/main/webapp/app/index.tsx.ejs +7 -7
  85. package/generators/client/templates/react/src/main/webapp/app/main.tsx.ejs +19 -0
  86. package/generators/client/templates/react/src/main/webapp/app/modules/administration/logs/logs.tsx.ejs +1 -1
  87. package/generators/client/templates/react/src/main/webapp/app/modules/administration/user-management/user-management.tsx.ejs +2 -1
  88. package/generators/client/templates/react/src/main/webapp/app/modules/login/login-modal.tsx.ejs +5 -1
  89. package/generators/client/templates/react/src/main/webapp/app/routes.tsx.ejs +24 -7
  90. package/generators/client/templates/react/src/main/webapp/app/shared/error/error-loading.tsx.ejs +15 -0
  91. package/generators/client/templates/react/src/main/webapp/app/shared/layout/menus/entities.tsx.ejs +34 -6
  92. package/generators/client/templates/react/src/main/webapp/app/shared/reducers/index.ts.ejs +9 -2
  93. package/generators/client/templates/react/src/main/webapp/app/shared/reducers/locale.spec.ts.ejs +9 -3
  94. package/generators/client/templates/react/src/main/webapp/app/shared/reducers/locale.ts.ejs +21 -5
  95. package/generators/client/templates/react/src/main/webapp/app/typings.d.ts.ejs +15 -0
  96. package/generators/client/templates/react/src/main/webapp/microfrontends/entities-menu.tsx.ejs +3 -0
  97. package/generators/client/templates/react/src/main/webapp/microfrontends/entities-routes.tsx.ejs +3 -0
  98. package/generators/client/templates/react/tsconfig.json.ejs +3 -3
  99. package/generators/client/templates/react/tsconfig.test.json.ejs +9 -1
  100. package/generators/client/templates/react/webpack/webpack.common.js.ejs +6 -13
  101. package/generators/client/templates/react/webpack/webpack.dev.js.ejs +7 -8
  102. package/generators/client/templates/react/webpack/webpack.microfrontend.js.jhi.react.ejs +99 -0
  103. package/generators/client/templates/react/webpack/webpack.prod.js.ejs +31 -21
  104. package/generators/client/templates/vue/package.json +30 -31
  105. package/generators/client/templates/vue/package.json.ejs +1 -1
  106. package/generators/client/templates/vue/src/main/webapp/app/core/jhi-navbar/jhi-navbar.component.ts.ejs +4 -3
  107. package/generators/client/templates/vue/src/main/webapp/app/entities/user/user.service.ts.ejs +0 -0
  108. package/generators/client/templates/vue/src/main/webapp/app/main.ts.ejs +29 -1
  109. package/generators/client/templates/vue/src/main/webapp/app/shared/config/axios-interceptor.ts.ejs +2 -2
  110. package/generators/client/templates/vue/src/main/webapp/app/shared/config/config.ts.ejs +0 -4
  111. package/generators/client/templates/vue/src/main/webapp/app/shared/data/data-utils.service.ts.ejs +1 -1
  112. package/generators/client/templates/vue/src/test/javascript/jest.conf.js.ejs +2 -2
  113. package/generators/client/templates/vue/tsconfig.json.ejs +0 -3
  114. package/generators/client/templates/vue/webpack/webpack.common.js.ejs +6 -2
  115. package/generators/cloudfoundry/esm.mjs +1 -3
  116. package/generators/common/esm.mjs +2 -3
  117. package/generators/common/files.js +1 -2
  118. package/generators/common/index.js +6 -0
  119. package/generators/common/templates/.husky/{pre-commit → pre-commit.ejs} +4 -0
  120. package/generators/common/templates/README.md.jhi.ejs +3 -1
  121. package/generators/common/templates/package.json +4 -4
  122. package/generators/common/templates/sonar-project.properties.ejs +1 -1
  123. package/generators/cypress/esm.mjs +2 -3
  124. package/generators/cypress/files.js +2 -1
  125. package/generators/cypress/templates/src/test/javascript/cypress/integration/account/settings-page.spec.ts.ejs +18 -14
  126. package/generators/database-changelog/esm.mjs +1 -3
  127. package/generators/database-changelog/index.js +1 -1
  128. package/generators/database-changelog-liquibase/esm.mjs +2 -3
  129. package/generators/docker-compose/esm.mjs +1 -3
  130. package/generators/docker-compose/index.js +9 -5
  131. package/generators/entities/esm.mjs +1 -3
  132. package/generators/entities/index.js +2 -2
  133. package/generators/entities-client/esm.mjs +1 -3
  134. package/generators/entity/esm.mjs +1 -3
  135. package/generators/entity/index.js +39 -28
  136. package/generators/entity/prompts.js +4 -1
  137. package/generators/entity-client/esm.mjs +2 -3
  138. package/generators/entity-client/index.js +8 -0
  139. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/delete/entity-management-delete-dialog.component.html.ejs +1 -1
  140. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/detail/entity-management-detail.component.html.ejs +2 -2
  141. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/list/entity-management.component.html.ejs +20 -21
  142. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/list/entity-management.component.ts.ejs +1 -1
  143. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/update/entity-management-update.component.html.ejs +14 -16
  144. package/generators/entity-client/templates/angular/src/main/webapp/app/entities/update/entity-management-update.component.ts.ejs +3 -3
  145. package/generators/entity-client/templates/common/src/test/javascript/cypress/integration/entity/entity.spec.ts.ejs +2 -1
  146. package/generators/entity-client/templates/react/src/main/webapp/app/entities/entity-delete-dialog.tsx.ejs +3 -3
  147. package/generators/entity-client/templates/react/src/main/webapp/app/entities/entity-detail.tsx.ejs +5 -4
  148. package/generators/entity-client/templates/react/src/main/webapp/app/entities/entity-reducer.spec.ts.ejs +1 -1
  149. package/generators/entity-client/templates/react/src/main/webapp/app/entities/entity-update.tsx.ejs +20 -19
  150. package/generators/entity-client/templates/react/src/main/webapp/app/entities/entity.reducer.ts.ejs +2 -2
  151. package/generators/entity-client/templates/react/src/main/webapp/app/entities/entity.tsx.ejs +21 -20
  152. package/generators/entity-client/templates/react/src/test/javascript/e2e/entities/entity-update-page-object.ts.ejs +1 -1
  153. package/generators/entity-client/templates/vue/src/test/javascript/e2e/entities/entity-update-page-object.ts.ejs +1 -1
  154. package/generators/entity-client/templates/vue/src/test/javascript/e2e/entities/entity.spec.ts.ejs +1 -1
  155. package/generators/entity-i18n/esm.mjs +2 -3
  156. package/generators/entity-i18n/templates/i18n/entity_fr.json.ejs +1 -1
  157. package/generators/entity-server/esm.mjs +2 -3
  158. package/generators/entity-server/files-couchbase.js +23 -2
  159. package/generators/entity-server/files.js +40 -6
  160. package/generators/entity-server/index.js +27 -2
  161. package/generators/entity-server/templates/couchbase/src/main/java/package/domain/Entity.java.jhi.spring_data_couchbase.ejs +11 -13
  162. package/generators/entity-server/templates/couchbase/src/main/java/package/repository/EntityRepository.java.ejs +30 -43
  163. package/generators/entity-server/templates/couchbase/src/main/resources/config/couchmove/changelog/entity.fts.ejs +5 -6
  164. package/generators/entity-server/templates/couchbase/src/main/resources/config/couchmove/changelog/entity.n1ql.ejs +5 -0
  165. package/generators/entity-server/templates/partials/it_patch_update.partial.java.ejs +2 -2
  166. package/generators/entity-server/templates/partials/save_template.ejs +1 -1
  167. package/generators/entity-server/templates/partials/update_template.ejs +77 -0
  168. package/generators/entity-server/templates/reactive/partials/save_template.ejs +1 -1
  169. package/generators/entity-server/templates/reactive/partials/update_template.ejs +41 -0
  170. package/generators/entity-server/templates/src/main/java/package/common/get_all_template.ejs +5 -5
  171. package/generators/entity-server/templates/src/main/java/package/common/get_template.ejs +1 -1
  172. package/generators/entity-server/templates/src/main/java/package/common/inject_template.ejs +17 -8
  173. package/generators/entity-server/templates/src/main/java/package/common/patch_template.ejs +5 -5
  174. package/generators/entity-server/templates/src/main/java/package/common/search_stream_template.ejs +1 -1
  175. package/generators/entity-server/templates/src/main/java/package/common/search_template.ejs +1 -1
  176. package/generators/entity-server/templates/src/main/java/package/domain/Entity.java.jhi.ejs +4 -3
  177. package/generators/entity-server/templates/src/main/java/package/domain/Entity.java.jhi.javax_lifecycle_events.ejs +31 -0
  178. package/generators/entity-server/templates/src/main/java/package/domain/Entity.java.jhi.spring_data_persistable.ejs +54 -0
  179. package/generators/entity-server/templates/src/main/java/package/domain/Entity.java.jhi.spring_data_reactive.ejs +1 -1
  180. package/generators/entity-server/templates/src/main/java/package/domain/EntityCallback.java.ejs +43 -0
  181. package/generators/entity-server/templates/src/main/java/package/repository/EntityRepository.java.ejs +36 -23
  182. package/generators/entity-server/templates/src/main/java/package/repository/EntityRepositoryInternalImpl_reactive.java.ejs +24 -28
  183. package/generators/entity-server/templates/src/main/java/package/repository/EntityRepositoryWithBagRelationships.java.ejs +37 -0
  184. package/generators/entity-server/templates/src/main/java/package/repository/EntityRepositoryWithBagRelationshipsImpl.java.ejs +91 -0
  185. package/generators/entity-server/templates/src/main/java/package/repository/EntityRepository_reactive.java.ejs +17 -25
  186. package/generators/entity-server/templates/src/main/java/package/repository/EntitySqlHelper_reactive.java.ejs +2 -2
  187. package/generators/entity-server/templates/src/main/java/package/repository/rowmapper/EntityRowMapper.java.ejs +3 -3
  188. package/generators/entity-server/templates/src/main/java/package/repository/search/EntitySearchRepository.java.ejs +12 -27
  189. package/generators/entity-server/templates/src/main/java/package/service/EntityService.java.ejs +10 -2
  190. package/generators/entity-server/templates/src/main/java/package/service/criteria/EntityCriteria.java.ejs +8 -6
  191. package/generators/entity-server/templates/src/main/java/package/service/impl/EntityServiceImpl.java.ejs +21 -5
  192. package/generators/entity-server/templates/src/main/java/package/service/mapper/EntityMapper.java.ejs +61 -90
  193. package/generators/entity-server/templates/src/main/java/package/web/rest/EntityResource.java.ejs +6 -4
  194. package/generators/entity-server/templates/src/test/java/package/web/rest/EntityResourceIT.java.ejs +33 -20
  195. package/generators/export-jdl/esm.mjs +1 -3
  196. package/generators/gae/esm.mjs +1 -3
  197. package/generators/generate-blueprint/constants.mjs +146 -0
  198. package/generators/generate-blueprint/esm.mjs +19 -0
  199. package/generators/generate-blueprint/files.mjs +81 -0
  200. package/generators/generate-blueprint/generator.mjs +363 -0
  201. package/generators/generate-blueprint/index.mjs +20 -0
  202. package/generators/generate-blueprint/templates/.eslintrc.json.ejs +41 -0
  203. package/generators/generate-blueprint/templates/.github/workflows/generator.yml.ejs +32 -0
  204. package/generators/generate-blueprint/templates/.mocharc.cjs.ejs +29 -0
  205. package/generators/{server/templates/couchbase/src/main/java/package/config/couchbase/package-info.java.ejs → generate-blueprint/templates/.prettierignore.jhi.blueprint.ejs} +4 -7
  206. package/generators/generate-blueprint/templates/README.md.ejs +75 -0
  207. package/generators/generate-blueprint/templates/cli/cli.mjs.ejs +35 -0
  208. package/generators/generate-blueprint/templates/cli/commands.cjs.ejs +25 -0
  209. package/generators/generate-blueprint/templates/generators/generator/generator.mjs.jhi.ejs +98 -0
  210. package/generators/generate-blueprint/templates/generators/generator/generator.spec.mjs.ejs +42 -0
  211. package/generators/generate-blueprint/templates/generators/generator/index.mjs.ejs +19 -0
  212. package/generators/generate-blueprint/templates/generators/generator/templates/template-file.ejs +0 -0
  213. package/generators/generate-blueprint/templates/test/utils.mjs.ejs +17 -0
  214. package/generators/generator-base-blueprint.js +29 -0
  215. package/generators/generator-base-docker.js +1 -0
  216. package/generators/generator-base-entities.cjs +368 -0
  217. package/generators/generator-base-private.js +1 -1
  218. package/generators/generator-base.js +157 -23
  219. package/generators/generator-constants.js +22 -20
  220. package/generators/generator-list.js +2 -0
  221. package/generators/generator-transforms.js +0 -1
  222. package/generators/gradle/constants.cjs +1 -1
  223. package/generators/gradle/esm.mjs +19 -0
  224. package/generators/heroku/esm.mjs +1 -3
  225. package/generators/info/esm.mjs +1 -3
  226. package/generators/init/esm.mjs +19 -0
  227. package/generators/init/files.cjs +9 -3
  228. package/generators/init/index.cjs +5 -0
  229. package/generators/init/templates/.gitignore.jhi.ejs +5 -0
  230. package/generators/init/templates/{.lintstagedrc.js.ejs → .lintstagedrc.cjs.ejs} +0 -0
  231. package/generators/java/esm.mjs +19 -0
  232. package/generators/java/index.cjs +58 -2
  233. package/generators/kubernetes/esm.mjs +1 -3
  234. package/generators/kubernetes-helm/esm.mjs +1 -3
  235. package/generators/kubernetes-knative/esm.mjs +1 -3
  236. package/generators/languages/esm.mjs +2 -3
  237. package/generators/languages/templates/src/test/resources/i18n/messages_fr.properties.ejs +4 -1
  238. package/generators/maven/esm.mjs +19 -0
  239. package/generators/maven/files.cjs +0 -1
  240. package/generators/maven/templates/.mvn/wrapper/maven-wrapper.jar +0 -0
  241. package/generators/maven/templates/.mvn/wrapper/maven-wrapper.properties +18 -2
  242. package/generators/maven/templates/mvnw +13 -7
  243. package/generators/maven/templates/mvnw.cmd +19 -13
  244. package/generators/maven/templates/pom.xml.jhi.ejs +1 -1
  245. package/generators/openapi-client/esm.mjs +1 -3
  246. package/generators/openapi-client/index.js +11 -4
  247. package/generators/openshift/esm.mjs +1 -3
  248. package/generators/page/esm.mjs +1 -3
  249. package/generators/project-name/esm.mjs +19 -0
  250. package/generators/server/cleanup.js +19 -3
  251. package/generators/server/esm.mjs +2 -2
  252. package/generators/server/files-couchbase.js +28 -31
  253. package/generators/server/files.js +115 -18
  254. package/generators/server/index.js +23 -17
  255. package/generators/server/needle-api/needle-server-gradle.js +38 -0
  256. package/generators/server/needle-api/needle-server-maven.js +1 -1
  257. package/generators/server/templates/.mvn/jvm.config +1 -0
  258. package/generators/server/templates/.mvn/wrapper/maven-wrapper.jar +0 -0
  259. package/generators/server/templates/.mvn/wrapper/maven-wrapper.properties +18 -2
  260. package/generators/server/templates/build.gradle.ejs +7 -5
  261. package/generators/server/templates/couchbase/src/main/java/package/repository/CouchbaseSearchRepository.java.ejs +91 -0
  262. package/generators/server/templates/couchbase/src/main/java/package/repository/JHipsterCouchbaseRepository.java.ejs +47 -45
  263. package/generators/server/templates/couchbase/src/main/java/package/repository/PersistentTokenRepository_couchbase.java.ejs +2 -2
  264. package/generators/server/templates/couchbase/src/main/resources/config/couchmove/changelog/V0.1__initial_setup/authority/ROLE_ADMIN.json.ejs +3 -0
  265. package/generators/server/templates/couchbase/src/main/resources/config/couchmove/changelog/V0.1__initial_setup/authority/ROLE_USER.json.ejs +3 -0
  266. package/generators/server/templates/couchbase/src/main/resources/config/couchmove/changelog/V0.1__initial_setup/{user__admin.json.ejs → user/admin.json.ejs} +2 -2
  267. package/generators/server/templates/couchbase/src/main/resources/config/couchmove/changelog/V0.1__initial_setup/{user__user.json.ejs → user/user.json.ejs} +2 -2
  268. package/generators/server/templates/couchbase/src/main/resources/config/couchmove/changelog/V0.2__create_indexes.n1ql.ejs +34 -0
  269. package/generators/server/templates/couchbase/src/main/resources/config/couchmove/changelog/V0__create_collections.n1ql.ejs +8 -0
  270. package/generators/server/templates/couchbase/src/test/java/package/CouchbaseTestContainerExtension.java.ejs +4 -3
  271. package/generators/server/templates/couchbase/src/test/java/package/repository/{JHipsterCouchbaseRepositoryTest.java.ejs → CouchbaseSearchRepositoryTest.java.ejs} +2 -2
  272. package/generators/server/templates/devcontainer/Dockerfile.ejs +25 -0
  273. package/generators/server/templates/devcontainer/devcontainer.json.ejs +64 -0
  274. package/generators/server/templates/gradle/profile_prod.gradle.ejs +4 -0
  275. package/generators/server/templates/gradle/wrapper/gradle-wrapper.jar +0 -0
  276. package/generators/server/templates/gradle.properties.ejs +8 -8
  277. package/generators/server/templates/mvnw +13 -7
  278. package/generators/server/templates/mvnw.cmd +19 -13
  279. package/generators/server/templates/npmw +14 -5
  280. package/generators/server/templates/pom.xml.ejs +65 -58
  281. package/generators/server/templates/settings.gradle.ejs +6 -4
  282. package/generators/server/templates/src/main/docker/app.yml.ejs +4 -6
  283. package/generators/server/templates/src/main/docker/config/realm-config/jhipster-realm.json.ejs +2 -1
  284. package/generators/server/templates/src/main/docker/mysql.yml.ejs +1 -0
  285. package/generators/server/templates/src/main/docker/zipkin.yml.ejs +25 -0
  286. package/generators/server/templates/src/main/java/package/config/AsyncConfiguration.java.ejs +6 -0
  287. package/generators/server/templates/src/main/java/package/config/DatabaseConfiguration_couchbase.java.ejs +26 -16
  288. package/generators/{client/templates/react/src/main/webapp/app/entities/index.tsx.ejs → server/templates/src/main/java/package/config/KafkaSseConsumer.java.ejs} +8 -14
  289. package/generators/server/templates/src/main/java/package/config/KafkaSseProducer.java.ejs +30 -0
  290. package/generators/server/templates/src/main/java/package/config/LocaleConfiguration_reactive.java.ejs +1 -1
  291. package/generators/server/templates/src/main/java/package/config/SecurityConfiguration.java.ejs +12 -10
  292. package/generators/server/templates/src/main/java/package/config/SecurityConfiguration_reactive.java.ejs +2 -1
  293. package/generators/server/templates/src/main/java/package/domain/Authority.java.ejs +11 -0
  294. package/generators/server/templates/src/main/java/package/domain/PersistentToken.java.ejs +6 -6
  295. package/generators/server/templates/src/main/java/package/domain/User.java.ejs +9 -7
  296. package/generators/server/templates/src/main/java/package/repository/AuthorityRepository.java.ejs +1 -11
  297. package/generators/server/templates/src/main/java/package/repository/EntityManager.java.ejs +48 -38
  298. package/generators/server/templates/src/main/java/package/repository/UserRepository.java.ejs +48 -72
  299. package/generators/server/templates/src/main/java/package/security/jwt/JWTFilter.java.ejs +1 -1
  300. package/generators/server/templates/src/main/java/package/security/jwt/TokenProvider.java.ejs +1 -1
  301. package/generators/server/templates/src/main/java/package/security/oauth2/CustomClaimConverter.java.ejs +1 -1
  302. package/generators/server/templates/src/main/java/package/service/UserService.java.ejs +8 -6
  303. package/generators/server/templates/src/main/java/package/web/filter/OAuth2ReactiveRefreshTokensWebFilter.java.ejs +0 -1
  304. package/generators/server/templates/src/main/java/package/web/rest/AccountResource.java.ejs +1 -1
  305. package/generators/server/templates/src/main/java/package/web/rest/KafkaResource.java.ejs +60 -108
  306. package/generators/server/templates/src/main/java/package/web/rest/KafkaResource_reactive.java.ejs +74 -0
  307. package/generators/server/templates/src/main/java/package/web/rest/LogoutResource_reactive.java.ejs +1 -1
  308. package/generators/server/templates/src/main/java/package/web/rest/PublicUserResource.java.ejs +2 -2
  309. package/generators/server/templates/src/main/resources/config/application-dev.yml.ejs +8 -0
  310. package/generators/server/templates/src/main/resources/config/application-prod.yml.ejs +6 -0
  311. package/generators/server/templates/src/main/resources/config/application.yml.ejs +28 -22
  312. package/generators/server/templates/src/test/java/package/CassandraKeyspaceIT.java.ejs +3 -4
  313. package/generators/server/templates/src/test/java/package/IntegrationTest.java.ejs +12 -4
  314. package/generators/server/templates/src/test/java/package/TechnicalStructureTest.java.ejs +18 -15
  315. package/generators/server/templates/src/test/java/package/config/CassandraTestContainer.java.ejs +122 -0
  316. package/generators/server/templates/src/test/java/package/config/EmbeddedCassandra.java.ejs +11 -0
  317. package/generators/server/templates/src/test/java/package/config/EmbeddedKafka.java.ejs +11 -0
  318. package/generators/server/templates/src/test/java/package/config/EmbeddedMongo.java.ejs +11 -0
  319. package/generators/server/templates/src/test/java/package/config/JHipsterBlockHoundIntegration.java.ejs +2 -0
  320. package/generators/server/templates/src/test/java/package/config/KafkaTestContainer.java.ejs +38 -0
  321. package/generators/server/templates/src/test/java/package/config/MongoDbTestContainer.java.ejs +67 -0
  322. package/generators/server/templates/src/test/java/package/config/TestContainersSpringContextCustomizerFactory.java.ejs +114 -0
  323. package/generators/server/templates/src/test/java/package/cucumber/CucumberIT.java.ejs +3 -10
  324. package/generators/server/templates/src/test/java/package/cucumber/stepdefs/StepDefs.java.ejs +8 -0
  325. package/generators/server/templates/src/test/java/package/cucumber/stepdefs/UserStepDefs.java.ejs +17 -3
  326. package/generators/server/templates/src/test/java/package/security/DomainUserDetailsServiceIT.java.ejs +1 -4
  327. package/generators/server/templates/src/test/java/package/security/SecurityUtilsUnitTest_reactive.java.ejs +1 -1
  328. package/generators/server/templates/src/test/java/package/security/jwt/JWTFilterTest.java.ejs +5 -5
  329. package/generators/server/templates/src/test/java/package/security/oauth2/CustomClaimConverterIT.java.ejs +1 -1
  330. package/generators/server/templates/src/test/java/package/service/MailServiceIT.java.ejs +2 -4
  331. package/generators/server/templates/src/test/java/package/service/UserServiceIT.java.ejs +1 -4
  332. package/generators/server/templates/src/test/java/package/service/mapper/UserMapperTest.java.ejs +1 -1
  333. package/generators/server/templates/src/test/java/package/web/rest/AccountResourceIT.java.ejs +15 -8
  334. package/generators/server/templates/src/test/java/package/web/rest/AccountResourceIT_oauth2.java.ejs +1 -4
  335. package/generators/server/templates/src/test/java/package/web/rest/AccountResourceIT_skipUserManagement.java.ejs +1 -4
  336. package/generators/server/templates/src/test/java/package/web/rest/KafkaResourceIT.java.ejs +52 -123
  337. package/generators/server/templates/src/test/java/package/web/rest/KafkaResourceIT_reactive.java.ejs +99 -0
  338. package/generators/server/templates/src/test/java/package/web/rest/PublicUserResourceIT.java.ejs +7 -10
  339. package/generators/server/templates/src/test/java/package/web/rest/TestUtil.java.ejs +1 -6
  340. package/generators/server/templates/src/test/java/package/web/rest/UserJWTControllerIT.java.ejs +1 -4
  341. package/generators/server/templates/src/test/java/package/web/rest/UserResourceIT.java.ejs +42 -47
  342. package/generators/server/templates/src/test/java/package/web/rest/errors/ExceptionTranslatorIT.java.ejs +1 -4
  343. package/generators/server/templates/src/test/java/package/web/rest/errors/ExceptionTranslatorIT_reactive.java.ejs +2 -5
  344. package/generators/server/templates/src/test/resources/META-INF/spring.factories.ejs +1 -1
  345. package/generators/server/templates/src/test/resources/config/application.yml.ejs +21 -20
  346. package/generators/server/templates/src/test/resources/testcontainers.properties.ejs +1 -0
  347. package/generators/spring-boot/esm.mjs +19 -0
  348. package/generators/spring-controller/esm.mjs +1 -3
  349. package/generators/spring-service/esm.mjs +1 -3
  350. package/generators/upgrade/esm.mjs +1 -3
  351. package/generators/upgrade-config/esm.mjs +1 -3
  352. package/generators/workspaces/esm.mjs +1 -3
  353. package/generators/workspaces/index.js +2 -1
  354. package/lib/constants/logo.cjs +30 -0
  355. package/lib/constants/priorities.cjs +216 -2
  356. package/lib/constants/priorities.mjs +29 -1
  357. package/lib/index.mjs +6 -0
  358. package/lib/support/mixin.cjs +5 -1
  359. package/lib/support/shared-data.cjs +34 -1
  360. package/package.json +33 -29
  361. package/utils/entity.js +21 -2
  362. package/utils/faker.js +3 -3
  363. package/utils/field.js +69 -52
  364. package/utils/relationship.js +15 -4
  365. package/utils/user.js +109 -0
  366. package/generators/app/generator.spec.mjs +0 -47
  367. package/generators/aws/generator.spec.mjs +0 -47
  368. package/generators/azure-app-service/generator.spec.mjs +0 -47
  369. package/generators/azure-spring-cloud/generator.spec.mjs +0 -47
  370. package/generators/base/generator.spec.mjs +0 -44
  371. package/generators/bootstrap/generator.spec.mjs +0 -44
  372. package/generators/ci-cd/generator.spec.mjs +0 -47
  373. package/generators/client/__workflow/devserver-angular.json +0 -13
  374. package/generators/client/__workflow/devserver-react.json +0 -13
  375. package/generators/client/__workflow/devserver-vue.json +0 -13
  376. package/generators/client/generator.spec.mjs +0 -47
  377. package/generators/cloudfoundry/generator.spec.mjs +0 -47
  378. package/generators/common/generator.spec.mjs +0 -47
  379. package/generators/cypress/generator.spec.mjs +0 -47
  380. package/generators/database-changelog/generator.spec.mjs +0 -47
  381. package/generators/database-changelog-liquibase/generator.spec.mjs +0 -47
  382. package/generators/docker-compose/generator.spec.mjs +0 -44
  383. package/generators/entities/generator.spec.mjs +0 -47
  384. package/generators/entities-client/generator.spec.mjs +0 -47
  385. package/generators/entity/generator.spec.mjs +0 -47
  386. package/generators/entity-client/generator.spec.mjs +0 -47
  387. package/generators/entity-i18n/generator.spec.mjs +0 -47
  388. package/generators/entity-server/generator.spec.mjs +0 -47
  389. package/generators/entity-server/templates/src/main/java/package/repository/search/SortToFieldSortBuilderConverter.java.ejs +0 -24
  390. package/generators/export-jdl/generator.spec.mjs +0 -44
  391. package/generators/gae/generator.spec.mjs +0 -47
  392. package/generators/gradle/__snapshots__/generator.spec.cjs.snap +0 -59
  393. package/generators/gradle/generator.spec.cjs +0 -71
  394. package/generators/heroku/generator.spec.mjs +0 -47
  395. package/generators/info/generator.spec.mjs +0 -44
  396. package/generators/init/__snapshots__/generator.spec.cjs.snap +0 -65
  397. package/generators/init/generator.spec.cjs +0 -112
  398. package/generators/java/__snapshots__/generator.spec.cjs.snap +0 -118
  399. package/generators/java/generator.spec.cjs +0 -87
  400. package/generators/kubernetes/generator.spec.mjs +0 -44
  401. package/generators/kubernetes-helm/generator.spec.mjs +0 -44
  402. package/generators/kubernetes-knative/generator.spec.mjs +0 -44
  403. package/generators/languages/generator.spec.mjs +0 -47
  404. package/generators/maven/__snapshots__/generator.spec.cjs.snap +0 -53
  405. package/generators/maven/generator.spec.cjs +0 -78
  406. package/generators/maven/templates/.mvn/wrapper/MavenWrapperDownloader.java +0 -117
  407. package/generators/openapi-client/generator.spec.mjs +0 -47
  408. package/generators/openshift/generator.spec.mjs +0 -44
  409. package/generators/page/generator.spec.mjs +0 -47
  410. package/generators/project-name/generator.spec.cjs +0 -43
  411. package/generators/server/__snapshots__/generator.spec.mjs.snap +0 -1931
  412. package/generators/server/generator.spec.mjs +0 -52
  413. package/generators/server/templates/.mvn/wrapper/MavenWrapperDownloader.java +0 -117
  414. package/generators/server/templates/couchbase/src/main/java/package/config/couchbase/CustomCouchbaseRepositoryFactory.java.ejs +0 -83
  415. package/generators/server/templates/couchbase/src/main/java/package/config/couchbase/CustomCouchbaseRepositoryFactoryBean.java.ejs +0 -40
  416. package/generators/server/templates/couchbase/src/main/java/package/config/couchbase/CustomCouchbaseRepositoryQuery.java.ejs +0 -44
  417. package/generators/server/templates/couchbase/src/main/java/package/config/couchbase/CustomN1qlQueryCreator.java.ejs +0 -162
  418. package/generators/server/templates/couchbase/src/main/java/package/config/couchbase/CustomN1qlRepositoryQueryExecutor.java.ejs +0 -104
  419. package/generators/server/templates/couchbase/src/main/resources/config/couchmove/changelog/V0.1__initial_setup/ROLE_ADMIN.json.ejs +0 -3
  420. package/generators/server/templates/couchbase/src/main/resources/config/couchmove/changelog/V0.1__initial_setup/ROLE_USER.json.ejs +0 -3
  421. package/generators/server/templates/couchbase/src/main/resources/config/couchmove/changelog/V0__create_indexes.n1ql.ejs +0 -19
  422. package/generators/server/templates/src/main/java/package/config/KafkaProperties.java.ejs +0 -68
  423. package/generators/server/templates/src/test/java/package/AbstractCassandraTest.java.ejs +0 -125
  424. package/generators/server/templates/src/test/java/package/MongoDbTestContainerExtension.java.ejs +0 -37
  425. package/generators/server/templates/src/test/java/package/TestContainersSpringContextCustomizerFactory.java.ejs +0 -24
  426. package/generators/spring-boot/__snapshots__/generator.spec.cjs.snap +0 -80
  427. package/generators/spring-boot/generator.spec.cjs +0 -64
  428. package/generators/spring-controller/generator.spec.mjs +0 -47
  429. package/generators/spring-service/generator.spec.mjs +0 -47
  430. package/generators/upgrade/generator.spec.mjs +0 -44
  431. package/generators/upgrade-config/generator.spec.mjs +0 -44
  432. package/generators/workspaces/generator.spec.mjs +0 -47
@@ -29,6 +29,7 @@ const os = require('os');
29
29
  const normalize = require('normalize-path');
30
30
  const simpleGit = require('simple-git');
31
31
 
32
+ const SharedData = require('../lib/support/shared-data.cjs');
32
33
  const packagejs = require('../package.json');
33
34
  const jhipsterUtils = require('./utils');
34
35
  const constants = require('./generator-constants');
@@ -42,6 +43,30 @@ const { calculateDbNameWithLimit, hibernateSnakeCase } = require('../utils/db');
42
43
  const defaultApplicationOptions = require('../jdl/jhipster/default-application-options');
43
44
  const databaseTypes = require('../jdl/jhipster/database-types');
44
45
  const { ANGULAR_X: ANGULAR, REACT, VUE, NO: CLIENT_FRAMEWORK_NO } = require('../jdl/jhipster/client-framework-types');
46
+ const {
47
+ PRIORITY_NAMES: {
48
+ LOADING,
49
+ PREPARING,
50
+
51
+ CONFIGURING_EACH_ENTITY,
52
+ LOADING_EACH_ENTITY,
53
+ PREPARING_EACH_ENTITY,
54
+ PREPARING_FIELDS,
55
+ PREPARING_EACH_ENTITY_FIELD,
56
+ PREPARING_RELATIONSHIPS,
57
+ PREPARING_EACH_ENTITY_RELATIONSHIP,
58
+ POST_PREPARING_EACH_ENTITY,
59
+
60
+ DEFAULT,
61
+ WRITING,
62
+ WRITING_ENTITIES,
63
+ POST_WRITING,
64
+ POST_WRITING_ENTITIES,
65
+ PRE_CONFLICTS,
66
+ INSTALL,
67
+ END,
68
+ },
69
+ } = require('../lib/constants/priorities.cjs');
45
70
 
46
71
  const JHIPSTER_CONFIG_DIR = constants.JHIPSTER_CONFIG_DIR;
47
72
  const MODULES_HOOK_FILE = `${JHIPSTER_CONFIG_DIR}/modules/jhi-hooks.json`;
@@ -121,7 +146,6 @@ module.exports = class JHipsterBaseGenerator extends PrivateBase {
121
146
  // JHipster runtime config that should not be stored to .yo-rc.json.
122
147
  this.configOptions = this.options.configOptions || { sharedEntities: {} };
123
148
  this.configOptions.sharedEntities = this.configOptions.sharedEntities || {};
124
- this._sharedData = this.options.jhipsterSharedData;
125
149
 
126
150
  /* Force config to use 'generator-jhipster' namespace. */
127
151
  this._config = this._getStorage('generator-jhipster', { sorted: true });
@@ -167,12 +191,29 @@ module.exports = class JHipsterBaseGenerator extends PrivateBase {
167
191
  return this.fetchFromInstalledJHipster(this._jhipsterGenerator, 'templates', ...args);
168
192
  }
169
193
 
194
+ /**
195
+ * Get generator dependencies for building help
196
+ * This is a stub and should be overwritten by the generator.
197
+ *
198
+ * @returns {string[]}
199
+ */
200
+ getPossibleDependencies() {
201
+ return [];
202
+ }
203
+
170
204
  /**
171
205
  * Shared Data
172
206
  */
173
207
  get sharedData() {
174
208
  if (!this._sharedData) {
175
- throw new Error("Shared data doesn't exists it should be provided by the cli");
209
+ const { baseName } = this.jhipsterConfig;
210
+ if (!baseName) {
211
+ throw new Error('baseName is required');
212
+ }
213
+ if (!this.options.sharedData[baseName]) {
214
+ this.options.sharedData[baseName] = {};
215
+ }
216
+ this._sharedData = new SharedData(this.options.sharedData[baseName]);
176
217
  }
177
218
  return this._sharedData;
178
219
  }
@@ -1095,6 +1136,16 @@ module.exports = class JHipsterBaseGenerator extends PrivateBase {
1095
1136
  this.needleApi.serverGradle.addPlugin(group, name, version);
1096
1137
  }
1097
1138
 
1139
+ /**
1140
+ * A new Gradle plugin to plugin management block in settings.gradle
1141
+ *
1142
+ * @param {string} id - plugin id
1143
+ * @param {string} version - explicit plugin version number
1144
+ */
1145
+ addGradlePluginToPluginManagement(id, version) {
1146
+ this.needleApi.serverGradle.addPluginToPluginManagement(id, version);
1147
+ }
1148
+
1098
1149
  /**
1099
1150
  * Add Gradle plugin to the plugins block
1100
1151
  *
@@ -1160,6 +1211,17 @@ module.exports = class JHipsterBaseGenerator extends PrivateBase {
1160
1211
  this.needleApi.serverGradle.addMavenRepository(url, username, password);
1161
1212
  }
1162
1213
 
1214
+ /**
1215
+ * Add a remote Maven repository to the Gradle plugin management block in settings.gradle
1216
+ *
1217
+ * @param {string} url - url of the repository
1218
+ * @param {string} username - (optional) username of the repository credentials
1219
+ * @param {string} password - (optional) password of the repository credentials
1220
+ */
1221
+ addGradlePluginManagementRepository(url, username, password) {
1222
+ this.needleApi.serverGradle.addPluginManagementRepository(url, username, password);
1223
+ }
1224
+
1163
1225
  /**
1164
1226
  * Generate a date to be used by Liquibase changelogs.
1165
1227
  *
@@ -1520,6 +1582,7 @@ module.exports = class JHipsterBaseGenerator extends PrivateBase {
1520
1582
  args,
1521
1583
  {
1522
1584
  ...this.options,
1585
+ destinationRoot: this._destinationRoot,
1523
1586
  configOptions: this.configOptions,
1524
1587
  ...options,
1525
1588
  },
@@ -1579,8 +1642,7 @@ module.exports = class JHipsterBaseGenerator extends PrivateBase {
1579
1642
  * @return {object} entity definition
1580
1643
  */
1581
1644
  readEntityJson(entityName) {
1582
- const configDir = this.destinationPath(JHIPSTER_CONFIG_DIR);
1583
- const file = this.destinationPath(configDir, `${entityName}.json`);
1645
+ const file = path.join(path.dirname(this.config.path), JHIPSTER_CONFIG_DIR, `${entityName}.json`);
1584
1646
  try {
1585
1647
  return this.fs.readJSON(file);
1586
1648
  } catch (error) {
@@ -1919,15 +1981,6 @@ module.exports = class JHipsterBaseGenerator extends PrivateBase {
1919
1981
  * Prints a JHipster logo.
1920
1982
  */
1921
1983
  printJHipsterLogo() {
1922
- this.log('\n');
1923
- this.log(`${chalk.green(' ██╗')}${chalk.red(' ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗')}`);
1924
- this.log(`${chalk.green(' ██║')}${chalk.red(' ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗')}`);
1925
- this.log(`${chalk.green(' ██║')}${chalk.red(' ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝')}`);
1926
- this.log(`${chalk.green(' ██╗ ██║')}${chalk.red(' ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║')}`);
1927
- this.log(`${chalk.green(' ╚██████╔╝')}${chalk.red(' ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗')}`);
1928
- this.log(`${chalk.green(' ╚═════╝ ')}${chalk.red(' ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝')}\n`);
1929
- this.log(chalk.white.bold(' https://www.jhipster.tech\n'));
1930
- this.log(chalk.white('Welcome to JHipster ') + chalk.yellow(`v${packagejs.version}`));
1931
1984
  this.log(chalk.white(`Application files will be generated in folder: ${chalk.yellow(process.cwd())}`));
1932
1985
  if (process.cwd() === this.getUserHome()) {
1933
1986
  this.log(chalk.red.bold('\n️⚠️ WARNING ⚠️ You are in your HOME folder!'));
@@ -2339,7 +2392,7 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
2339
2392
  return val;
2340
2393
  }
2341
2394
  if (typeof val === 'function') {
2342
- return val(context, this);
2395
+ return val.call(this, context, this);
2343
2396
  }
2344
2397
  throw new Error(`Type not supported ${val}`);
2345
2398
  };
@@ -2547,7 +2600,27 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
2547
2600
  if (this.configOptions.optionsParsed) return;
2548
2601
  this.configOptions.optionsParsed = true;
2549
2602
 
2603
+ // Write new definitions to memfs
2604
+ if (options.applicationWithEntities) {
2605
+ this.config.set({
2606
+ ...this.config.getAll(),
2607
+ ...options.applicationWithEntities.config,
2608
+ });
2609
+ if (options.applicationWithEntities.entities) {
2610
+ const entities = options.applicationWithEntities.entities.map(entity => {
2611
+ const entityName = _.upperFirst(entity.name);
2612
+ const file = this.destinationPath(JHIPSTER_CONFIG_DIR, `${entityName}.json`);
2613
+ this.fs.writeJSON(file, { ...this.fs.readJSON(file), ...entity });
2614
+ return entityName;
2615
+ });
2616
+ this.jhipsterConfig.entities = [...new Set((this.jhipsterConfig.entities || []).concat(entities))];
2617
+ }
2618
+ }
2619
+
2550
2620
  // Load stored options
2621
+ if (options.withGeneratedFlag !== undefined) {
2622
+ this.jhipsterConfig.withGeneratedFlag = options.withGeneratedFlag;
2623
+ }
2551
2624
  if (options.skipJhipsterDependencies !== undefined) {
2552
2625
  this.jhipsterConfig.skipJhipsterDependencies = options.skipJhipsterDependencies;
2553
2626
  }
@@ -2667,6 +2740,14 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
2667
2740
  this.jhipsterConfig.pkType = options.pkType;
2668
2741
  }
2669
2742
 
2743
+ if (options.cacheProvider !== undefined) {
2744
+ this.jhipsterConfig.cacheProvider = options.cacheProvider;
2745
+ }
2746
+
2747
+ if (options.enableHibernateCache !== undefined) {
2748
+ this.jhipsterConfig.enableHibernateCache = options.enableHibernateCache;
2749
+ }
2750
+
2670
2751
  if (options.microfrontend) {
2671
2752
  this.jhipsterConfig.microfrontend = options.microfrontend;
2672
2753
  }
@@ -2770,6 +2851,10 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
2770
2851
  dest.cucumberTests = dest.testFrameworks.includes(CUCUMBER);
2771
2852
  dest.protractorTests = dest.testFrameworks.includes(PROTRACTOR);
2772
2853
  dest.cypressTests = dest.testFrameworks.includes(CYPRESS);
2854
+
2855
+ dest.authenticationType = config.authenticationType;
2856
+ dest.rememberMeKey = config.rememberMeKey;
2857
+ dest.jwtSecretKey = config.jwtSecretKey;
2773
2858
  }
2774
2859
 
2775
2860
  loadDerivedMicroserviceAppConfig(dest = this) {
@@ -2804,6 +2889,10 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
2804
2889
  dest.microfrontend ||
2805
2890
  (dest.applicationTypeMicroservice && !dest.skipClient) ||
2806
2891
  (dest.applicationTypeGateway && dest.microfrontends && dest.microfrontends.length > 0);
2892
+
2893
+ dest.authenticationTypeSession = dest.authenticationType === SESSION;
2894
+ dest.authenticationTypeJwt = dest.authenticationType === JWT;
2895
+ dest.authenticationTypeOauth2 = dest.authenticationType === OAUTH2;
2807
2896
  }
2808
2897
 
2809
2898
  /**
@@ -2864,10 +2953,6 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
2864
2953
 
2865
2954
  dest.buildTool = config.buildTool;
2866
2955
 
2867
- dest.authenticationType = config.authenticationType;
2868
- dest.rememberMeKey = config.rememberMeKey;
2869
- dest.jwtSecretKey = config.jwtSecretKey;
2870
-
2871
2956
  dest.databaseType = config.databaseType;
2872
2957
  dest.devDatabaseType = config.devDatabaseType;
2873
2958
  dest.prodDatabaseType = config.prodDatabaseType;
@@ -2911,10 +2996,6 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
2911
2996
  dest.messageBroker = false;
2912
2997
  }
2913
2998
 
2914
- dest.authenticationTypeSession = dest.authenticationType === SESSION;
2915
- dest.authenticationTypeJwt = dest.authenticationType === JWT;
2916
- dest.authenticationTypeOauth2 = dest.authenticationType === OAUTH2;
2917
-
2918
2999
  dest.buildToolGradle = dest.buildTool === GRADLE;
2919
3000
  dest.buildToolMaven = dest.buildTool === MAVEN;
2920
3001
  dest.buildToolUnknown = !dest.buildToolGradle && !dest.buildToolMaven;
@@ -3048,6 +3129,13 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
3048
3129
  return this.getDefaultConfigForApplicationType();
3049
3130
  }
3050
3131
 
3132
+ /**
3133
+ * JHipster config with default values fallback
3134
+ */
3135
+ get jhipsterConfigWithDefaults() {
3136
+ return _.defaults({}, this.jhipsterConfig, this.jhipsterDefaults);
3137
+ }
3138
+
3051
3139
  /**
3052
3140
  * Get default config based on applicationType
3053
3141
  */
@@ -3058,7 +3146,7 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
3058
3146
  };
3059
3147
  }
3060
3148
 
3061
- setConfigDefaults(defaults = this.jhipsterConfig.applicationType === MICROSERVICE ? defaultConfigMicroservice : defaultConfig) {
3149
+ setConfigDefaults(defaults = this.jhipsterDefaults) {
3062
3150
  const jhipsterVersion = packagejs.version;
3063
3151
  const baseName = this.getDefaultAppName();
3064
3152
  const creationTimestamp = new Date().getTime();
@@ -3176,6 +3264,7 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
3176
3264
  * @param String options - Object containing options.
3177
3265
  */
3178
3266
  jhipsterOptions(options = {}) {
3267
+ options = _.cloneDeep(options);
3179
3268
  Object.entries(options).forEach(([optionName, optionDesc]) => {
3180
3269
  this.option(kebabCase(optionName), optionDesc);
3181
3270
  if (!optionDesc.scope) return;
@@ -3185,6 +3274,8 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
3185
3274
  this.config.set(optionName, optionValue);
3186
3275
  } else if (optionDesc.scope === 'runtime') {
3187
3276
  this.configOptions[optionName] = optionValue;
3277
+ } else if (optionDesc.scope === 'generator') {
3278
+ this[optionName] = optionValue;
3188
3279
  } else {
3189
3280
  throw new Error(`Scope ${optionDesc.scope} not supported`);
3190
3281
  }
@@ -3193,8 +3284,51 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
3193
3284
  });
3194
3285
  }
3195
3286
 
3287
+ getArgsForPriority(priorityName) {
3288
+ if (this.features.priorityArgs) {
3289
+ return [this.getDataArgForPriority(priorityName)];
3290
+ }
3291
+ return this.args;
3292
+ }
3293
+
3294
+ /**
3295
+ */
3296
+ getDataArgForPriority(priorityName) {
3297
+ if (
3298
+ ![
3299
+ LOADING,
3300
+ PREPARING,
3301
+
3302
+ CONFIGURING_EACH_ENTITY,
3303
+ LOADING_EACH_ENTITY,
3304
+ PREPARING_EACH_ENTITY,
3305
+ PREPARING_FIELDS,
3306
+ PREPARING_EACH_ENTITY_FIELD,
3307
+ PREPARING_RELATIONSHIPS,
3308
+ PREPARING_EACH_ENTITY_RELATIONSHIP,
3309
+ POST_PREPARING_EACH_ENTITY,
3310
+
3311
+ DEFAULT,
3312
+ WRITING,
3313
+ WRITING_ENTITIES,
3314
+ POST_WRITING,
3315
+ POST_WRITING_ENTITIES,
3316
+ PRE_CONFLICTS,
3317
+ INSTALL,
3318
+ END,
3319
+ ].includes(priorityName)
3320
+ ) {
3321
+ throw new Error(`${priorityName} data not available`);
3322
+ }
3323
+ if (!this.jhipsterConfig.baseName) {
3324
+ return {};
3325
+ }
3326
+ return { application: this.sharedData.getApplication() };
3327
+ }
3328
+
3196
3329
  /**
3197
3330
  * Create a simple-git instance using current destinationPath as baseDir.
3331
+ * @return {import('simple-git').SimpleGit}
3198
3332
  */
3199
3333
  createGit() {
3200
3334
  return simpleGit({ baseDir: this.destinationPath() }).env({
@@ -24,23 +24,23 @@ const commonPackageJson = require('./common/templates/package.json');
24
24
 
25
25
  // Version of Java
26
26
  const JAVA_VERSION = '11';
27
- const JAVA_COMPATIBLE_VERSIONS = ['11', '12', '13', '14', '15', '16', '17'];
27
+ const JAVA_COMPATIBLE_VERSIONS = ['11', '12', '13', '14', '15', '16', '17', '18'];
28
28
 
29
29
  // Version of Node, NPM
30
- const NODE_VERSION = '16.13.1';
30
+ const NODE_VERSION = '16.14.0';
31
31
  const NPM_VERSION = commonPackageJson.devDependencies.npm;
32
32
  const OPENAPI_GENERATOR_CLI_VERSION = '1.0.13-4.3.1';
33
33
 
34
34
  const GRADLE_VERSION = gradleOptions.GRADLE_VERSION;
35
- const JIB_VERSION = '3.2.0';
35
+ const JIB_VERSION = '3.2.1';
36
36
 
37
37
  // Libraries version
38
- const JHIPSTER_DEPENDENCIES_VERSION = '7.6.0';
38
+ const JHIPSTER_DEPENDENCIES_VERSION = '7.8.1';
39
39
  // The spring-boot version should match the one managed by https://mvnrepository.com/artifact/tech.jhipster/jhipster-dependencies/JHIPSTER_DEPENDENCIES_VERSION
40
- const SPRING_BOOT_VERSION = '2.6.3';
40
+ const SPRING_BOOT_VERSION = '2.6.6';
41
41
  const LIQUIBASE_VERSION = '4.6.1';
42
42
  const LIQUIBASE_DTD_VERSION = LIQUIBASE_VERSION.split('.', 3).slice(0, 2).join('.');
43
- const HIBERNATE_VERSION = '5.6.4.Final';
43
+ const HIBERNATE_VERSION = '5.6.7.Final';
44
44
 
45
45
  const JACOCO_VERSION = '0.8.7';
46
46
  const KAFKA_VERSION = '5.5.7';
@@ -49,34 +49,35 @@ const JACKSON_DATABIND_NULLABLE_VERSION = '0.2.2';
49
49
  // Version of docker images
50
50
  const DOCKER_COMPOSE_FORMAT_VERSION = '3.8';
51
51
  // const DOCKER_JHIPSTER_REGISTRY = 'ghcr.io/jhipster/jhipster-registry:main';
52
- const DOCKER_JHIPSTER_REGISTRY = 'jhipster/jhipster-registry:v7.2.0';
52
+ const DOCKER_JHIPSTER_REGISTRY = 'jhipster/jhipster-registry:v7.3.0';
53
53
  const DOCKER_JHIPSTER_CONTROL_CENTER = 'jhipster/jhipster-control-center:v0.5.0';
54
54
  const DOCKER_JAVA_JRE = 'eclipse-temurin:11-jre-focal';
55
- const DOCKER_MYSQL = 'mysql:8.0.27';
55
+ const DOCKER_MYSQL = 'mysql:8.0.28';
56
56
  const DOCKER_MARIADB = 'mariadb:10.7.1';
57
- const DOCKER_POSTGRESQL = 'postgres:14.1';
58
- const DOCKER_MONGODB = 'mongo:4.4.11';
59
- const DOCKER_COUCHBASE = 'couchbase/server:7.0.0';
60
- const DOCKER_CASSANDRA = 'cassandra:3.11.11';
61
- const DOCKER_MSSQL = 'mcr.microsoft.com/mssql/server:2019-CU14-ubuntu-20.04';
62
- const DOCKER_NEO4J = 'neo4j:4.4.2';
63
- const DOCKER_HAZELCAST_MANAGEMENT_CENTER = 'hazelcast/management-center:4.2021.12-1';
64
- const DOCKER_MEMCACHED = 'memcached:1.6.12-alpine';
57
+ const DOCKER_POSTGRESQL = 'postgres:14.2';
58
+ const DOCKER_MONGODB = 'mongo:4.4.12';
59
+ const DOCKER_COUCHBASE = 'couchbase/server:7.0.3';
60
+ const DOCKER_CASSANDRA = 'cassandra:3.11.12';
61
+ const DOCKER_MSSQL = 'mcr.microsoft.com/mssql/server:2019-CU15-ubuntu-20.04';
62
+ const DOCKER_NEO4J = 'neo4j:4.4.4';
63
+ const DOCKER_HAZELCAST_MANAGEMENT_CENTER = 'hazelcast/management-center:4.2022.01';
64
+ const DOCKER_MEMCACHED = 'memcached:1.6.14-alpine';
65
65
  const DOCKER_REDIS = 'redis:6.2.6';
66
66
  const DOCKER_KEYCLOAK = 'jboss/keycloak:16.1.0'; // The version should match the attribute 'keycloakVersion' from /docker-compose/templates/realm-config/jhipster-realm.json.ejs and /server/templates/src/main/docker/config/realm-config/jhipster-realm.json.ejs
67
67
  const DOCKER_ELASTICSEARCH = 'docker.elastic.co/elasticsearch/elasticsearch:7.15.2'; // The version should be coherent with the one from spring-data-elasticsearch project
68
68
  const DOCKER_KAFKA = `confluentinc/cp-kafka:${KAFKA_VERSION}`;
69
69
  const DOCKER_ZOOKEEPER = `confluentinc/cp-zookeeper:${KAFKA_VERSION}`;
70
- const DOCKER_SONAR = 'sonarqube:9.2.4-community';
71
- const DOCKER_CONSUL = 'consul:1.11.1';
70
+ const DOCKER_SONAR = 'sonarqube:9.3.0-community';
71
+ const DOCKER_CONSUL = 'consul:1.11.3';
72
72
  const DOCKER_CONSUL_CONFIG_LOADER = 'jhipster/consul-config-loader:v0.4.1';
73
- const DOCKER_PROMETHEUS = 'prom/prometheus:v2.32.1';
73
+ const DOCKER_PROMETHEUS = 'prom/prometheus:v2.33.3';
74
74
  const DOCKER_PROMETHEUS_ALERTMANAGER = 'prom/alertmanager:v0.23.0';
75
- const DOCKER_GRAFANA = 'grafana/grafana:8.3.3';
75
+ const DOCKER_GRAFANA = 'grafana/grafana:8.4.1';
76
76
  const DOCKER_JENKINS = 'jenkins/jenkins:lts-jdk11';
77
77
  const DOCKER_SWAGGER_EDITOR = 'swaggerapi/swagger-editor:latest';
78
78
  const DOCKER_PROMETHEUS_OPERATOR = 'quay.io/coreos/prometheus-operator:v0.42.1';
79
79
  const DOCKER_GRAFANA_WATCHER = 'quay.io/coreos/grafana-watcher:v0.0.8';
80
+ const DOCKER_ZIPKIN = 'openzipkin/zipkin:2.23';
80
81
 
81
82
  // Kubernetes versions
82
83
  const KUBERNETES_CORE_API_VERSION = 'v1';
@@ -418,6 +419,7 @@ const constants = {
418
419
  KUBERNETES_INGRESS_API_VERSION,
419
420
  KUBERNETES_ISTIO_NETWORKING_API_VERSION,
420
421
  KUBERNETES_RBAC_API_VERSION,
422
+ DOCKER_ZIPKIN,
421
423
 
422
424
  HELM_KAFKA,
423
425
  HELM_ELASTICSEARCH,
@@ -25,6 +25,7 @@ const Generators = {
25
25
  GENERATOR_AZURE_SPRING_CLOUD: 'azure-spring-cloud',
26
26
  GENERATOR_BASE: 'base',
27
27
  GENERATOR_BOOTSTRAP: 'bootstrap',
28
+ GENERATOR_BOOTSTRAP_APPLICATION: 'bootstrap-application',
28
29
  GENERATOR_CI_CD: 'ci-cd',
29
30
  /* @deprecated */
30
31
  GENERATOR_CICD: 'ci-cd',
@@ -45,6 +46,7 @@ const Generators = {
45
46
  GENERATOR_ENTITY_SERVER: 'entity-server',
46
47
  GENERATOR_EXPORT_JDL: 'export-jdl',
47
48
  GENERATOR_GAE: 'gae',
49
+ GENERATOR_GENERATE_BLUEPRINT: 'generate-blueprint',
48
50
  GENERATOR_GRADLE: 'gradle',
49
51
  GENERATOR_HEROKU: 'heroku',
50
52
  GENERATOR_INFO: 'info',
@@ -88,7 +88,6 @@ const generatedAnnotationTransform = generator => {
88
88
  return passthrough(file => {
89
89
  if (
90
90
  !file.path.endsWith('package-info.java') &&
91
- !file.path.endsWith('MavenWrapperDownloader.java') &&
92
91
  path.extname(file.path) === '.java' &&
93
92
  !isFileStateDeleted(file) &&
94
93
  !file.path.endsWith('GeneratedByJHipster.java')
@@ -16,7 +16,7 @@
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
18
  */
19
- const GRADLE_VERSION = '7.3.1';
19
+ const GRADLE_VERSION = '7.4.2';
20
20
  const GRADLE = 'gradle';
21
21
  const GRADLE_DESCRIPTION = 'Gradle';
22
22
  const BUILD_DESTINATION_VALUE = 'build';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright 2013-2022 the original author or authors from the JHipster project.
3
+ *
4
+ * This file is part of the JHipster project, see https://www.jhipster.tech/
5
+ * for more information.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * https://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+ export { default } from './index.cjs';
@@ -16,6 +16,4 @@
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
18
  */
19
- import generator from './index.js';
20
-
21
- export default generator;
19
+ export { default } from './index.js';
@@ -16,6 +16,4 @@
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
18
  */
19
- import generator from './index.js';
20
-
21
- export default generator;
19
+ export { default } from './index.js';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright 2013-2022 the original author or authors from the JHipster project.
3
+ *
4
+ * This file is part of the JHipster project, see https://www.jhipster.tech/
5
+ * for more information.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * https://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+ export { default } from './index.cjs';
@@ -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
-
20
19
  module.exports.files = {
21
20
  prettier: [
22
21
  {
@@ -30,7 +29,14 @@ module.exports.files = {
30
29
  ],
31
30
  global: [
32
31
  {
33
- templates: ['README.md', 'package.json', '.editorconfig.jhi'],
32
+ templates: [
33
+ 'README.md',
34
+ '.editorconfig.jhi',
35
+ {
36
+ override: false,
37
+ file: 'package.json',
38
+ },
39
+ ],
34
40
  },
35
41
  ],
36
42
  };
@@ -39,7 +45,7 @@ module.exports.commitHooksFiles = {
39
45
  commitHooks: [
40
46
  {
41
47
  templates: [
42
- '.lintstagedrc.js',
48
+ '.lintstagedrc.cjs',
43
49
  {
44
50
  file: '.husky/pre-commit',
45
51
  method: 'copy',
@@ -165,6 +165,11 @@ module.exports = class extends MixedChain {
165
165
 
166
166
  get writing() {
167
167
  return {
168
+ cleanup() {
169
+ if (this.isJhipsterVersionLessThan('7.5.1')) {
170
+ this.removeFile('.lintstagedrc.js');
171
+ }
172
+ },
168
173
  async writeFiles() {
169
174
  if (this.shouldSkipFiles()) return;
170
175
  await this.writeFiles({ sections: files, context: this.application });
@@ -125,4 +125,9 @@ Desktop.ini
125
125
  ######################
126
126
  .eslintcache
127
127
 
128
+ ######################
129
+ # Angular
130
+ ######################
131
+ .angular
132
+
128
133
  <&- fragments.render({ join: '\n\n' }) &>
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright 2013-2022 the original author or authors from the JHipster project.
3
+ *
4
+ * This file is part of the JHipster project, see https://www.jhipster.tech/
5
+ * for more information.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * https://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+ export { default } from './index.cjs';