generator-jhipster 8.4.0 → 8.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 (270) hide show
  1. package/dist/generators/angular/resources/package.json +10 -10
  2. package/dist/generators/angular/templates/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.spec.ts.ejs +2 -2
  3. package/dist/generators/angular/templates/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.ts.ejs +3 -6
  4. package/dist/generators/angular/templates/src/main/webapp/app/account/password-reset/init/password-reset-init.component.spec.ts.ejs +2 -2
  5. package/dist/generators/angular/templates/src/main/webapp/app/account/password-reset/init/password-reset-init.component.ts.ejs +3 -6
  6. package/dist/generators/angular/templates/src/main/webapp/app/account/register/register.component.ts.ejs +3 -6
  7. package/dist/generators/angular/templates/src/main/webapp/app/admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.html.ejs +11 -11
  8. package/dist/generators/angular/templates/src/main/webapp/app/admin/user-management/delete/user-management-delete-dialog.component.html.ejs +0 -2
  9. package/dist/generators/angular/templates/src/main/webapp/app/core/auth/user-route-access.service.ts.ejs +1 -1
  10. package/dist/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/delete/_entityFile_-delete-dialog.component.html.ejs +0 -3
  11. package/dist/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/detail/_entityFile_-detail.component.spec.ts.ejs +2 -2
  12. package/dist/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/route/_entityFile_-routing-resolve.service.spec.ts.ejs +2 -2
  13. package/dist/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.spec.ts.ejs +3 -3
  14. package/dist/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.ts.ejs +11 -17
  15. package/dist/generators/angular/templates/src/main/webapp/app/layouts/navbar/active-menu.directive.ts.ejs +3 -3
  16. package/dist/generators/angular/templates/src/main/webapp/app/login/login.component.spec.ts.ejs +2 -2
  17. package/dist/generators/angular/templates/src/main/webapp/app/login/login.component.ts.ejs +3 -4
  18. package/dist/generators/angular/templates/src/main/webapp/app/shared/alert/alert-error.component.spec.ts.ejs +2 -2
  19. package/dist/generators/angular/templates/src/main/webapp/app/shared/auth/has-any-authority.directive.spec.ts.ejs +10 -8
  20. package/dist/generators/angular/templates/src/main/webapp/app/shared/auth/has-any-authority.directive.ts.ejs +3 -8
  21. package/dist/generators/angular/templates/src/main/webapp/app/shared/filter/filter.component.html.ejs +6 -2
  22. package/dist/generators/app/generator.js +4 -13
  23. package/dist/generators/base/generator.js +15 -16
  24. package/dist/generators/base/priorities.js +12 -1
  25. package/dist/generators/base-application/generator.js +14 -2
  26. package/dist/generators/base-application/priorities.js +1 -0
  27. package/dist/generators/base-application/support/prepare-entity.js +7 -8
  28. package/dist/generators/base-application/support/prepare-relationship.js +3 -2
  29. package/dist/generators/base-core/generator.js +40 -9
  30. package/dist/generators/bootstrap-application-base/generator.js +7 -3
  31. package/dist/generators/bootstrap-application-server/generator.js +1 -0
  32. package/dist/generators/client/command.js +2 -2
  33. package/dist/generators/client/generators/common/command.js +5 -0
  34. package/dist/generators/client/generators/common/generator.js +79 -0
  35. package/dist/generators/client/generators/common/index.js +20 -0
  36. package/dist/generators/client/generators/common/templates/src/main/webapp/app/shared/jhipster/headers.ts.ejs +57 -0
  37. package/dist/generators/client/generators/common/templates/src/main/webapp/app/shared/jhipster/problem-details.ts.ejs +51 -0
  38. package/dist/generators/client/resources/package.json +4 -4
  39. package/dist/generators/common/generator.js +5 -0
  40. package/dist/generators/common/resources/package.json +2 -2
  41. package/dist/generators/cypress/templates/src/test/javascript/cypress/e2e/account/login-page.cy.ts.ejs +4 -4
  42. package/dist/generators/cypress/templates/src/test/javascript/cypress/e2e/account/password-page.cy.ts.ejs +2 -2
  43. package/dist/generators/cypress/templates/src/test/javascript/cypress/e2e/account/register-page.cy.ts.ejs +1 -1
  44. package/dist/generators/cypress/templates/src/test/javascript/cypress/e2e/account/reset-password-page.cy.ts.ejs +1 -1
  45. package/dist/generators/cypress/templates/src/test/javascript/cypress/e2e/entity/_entity_.cy.ts.ejs +10 -10
  46. package/dist/generators/docker/templates/docker/mysql.yml.ejs +1 -1
  47. package/dist/generators/docker/templates/docker/realm-config/jhipster-realm.json.ejs +14 -3
  48. package/dist/generators/docker-compose/templates/realm-config/jhipster-realm.json.ejs +14 -3
  49. package/dist/generators/entity/generator.js +2 -10
  50. package/dist/generators/entity/prompts.js +6 -11
  51. package/dist/generators/gatling/README.md +15 -0
  52. package/dist/generators/gatling/templates/src/test/java/gatling/simulations/_entityClass_GatlingTest.java.ejs +2 -10
  53. package/dist/generators/generate-blueprint/command.js +16 -0
  54. package/dist/generators/generate-blueprint/files.js +8 -0
  55. package/dist/generators/generate-blueprint/generator.js +17 -10
  56. package/dist/generators/generate-blueprint/resources/package.json +1 -1
  57. package/dist/generators/generate-blueprint/templates/.blueprint/cli/commands.mjs.ejs +6 -0
  58. package/dist/generators/generate-blueprint/templates/.blueprint/generate-sample/command.mjs.ejs +20 -0
  59. package/dist/generators/generate-blueprint/templates/.blueprint/generate-sample/generator.mjs.ejs +9 -13
  60. package/dist/generators/generate-blueprint/templates/.blueprint/github-build-matrix/build-matrix.mjs.ejs +22 -0
  61. package/dist/generators/generate-blueprint/templates/.blueprint/github-build-matrix/generator.mjs.ejs +24 -0
  62. package/dist/generators/generate-blueprint/templates/.blueprint/github-build-matrix/index.mjs.ejs +1 -0
  63. package/dist/generators/generate-blueprint/templates/.eslintrc.json.ejs +2 -2
  64. package/dist/generators/generate-blueprint/templates/README.md.ejs +16 -8
  65. package/dist/generators/generate-blueprint/templates/vitest.config.ts.ejs +1 -0
  66. package/dist/generators/generator-constants.js +1 -1
  67. package/dist/generators/info/generator.js +1 -3
  68. package/dist/generators/init/generator.js +2 -2
  69. package/dist/generators/init/resources/.node-version +1 -1
  70. package/dist/generators/java/generators/build-tool/command.js +4 -1
  71. package/dist/generators/java/generators/domain/templates/src/main/java/_package_/_entityPackage_/domain/_persistClass_.java.jhi.ejs +1 -5
  72. package/dist/generators/java/generators/domain/templates/src/test/java/_package_/_entityPackage_/domain/_persistClass_Asserts.java.ejs +3 -3
  73. package/dist/generators/java/generators/domain/templates/src/test/java/_package_/_entityPackage_/domain/_persistClass_Test.java.ejs +3 -3
  74. package/dist/generators/java/support/add-java-annotation.js +28 -7
  75. package/dist/generators/java/support/generated-annotation-transform.js +1 -1
  76. package/dist/generators/java/support/index.js +1 -1
  77. package/dist/generators/jdl/generator.js +1 -1
  78. package/dist/generators/kubernetes/files.js +1 -1
  79. package/dist/generators/kubernetes/templates/db/mysql.yml.ejs +0 -1
  80. package/dist/generators/kubernetes/templates/keycloak/keycloak-configmap.yml.ejs +14 -3
  81. package/dist/generators/languages/generator.js +4 -2
  82. package/dist/generators/maven/templates/.mvn/wrapper/maven-wrapper.properties +2 -2
  83. package/dist/generators/maven/templates/mvnw +185 -243
  84. package/dist/generators/maven/templates/mvnw.cmd +121 -180
  85. package/dist/generators/react/generator.js +10 -0
  86. package/dist/generators/react/resources/package.json +24 -24
  87. package/dist/generators/react/templates/src/main/webapp/app/config/axios-interceptor.spec.ts.ejs +1 -1
  88. package/dist/generators/react/templates/src/main/webapp/app/config/axios-interceptor.ts.ejs +1 -1
  89. package/dist/generators/react/templates/src/main/webapp/app/config/notification-middleware.spec.ts.ejs +1 -1
  90. package/dist/generators/react/templates/src/main/webapp/app/config/notification-middleware.ts.ejs +80 -87
  91. package/dist/generators/react/templates/src/main/webapp/app/config/store.ts.ejs +1 -1
  92. package/dist/generators/react/templates/src/main/webapp/app/entities/_entityFolder_/_entityFile_-update.tsx.ejs +3 -3
  93. package/dist/generators/react/templates/src/main/webapp/app/entities/_entityFolder_/_entityFile_.reducer.ts.ejs +12 -7
  94. package/dist/generators/react/templates/src/main/webapp/app/shared/reducers/reducer.utils.ts.ejs +2 -3
  95. package/dist/generators/server/command.js +0 -11
  96. package/dist/generators/server/generator.js +9 -70
  97. package/dist/generators/server/jdl/application-definition.js +3 -1
  98. package/dist/generators/server/resources/Dockerfile +12 -12
  99. package/dist/generators/server/resources/gradle/libs.versions.toml +7 -5
  100. package/dist/generators/server/resources/pom.xml +7 -7
  101. package/dist/generators/server/support/config.js +4 -8
  102. package/dist/generators/server/support/prepare-entity.js +5 -6
  103. package/dist/generators/server/support/relationship.js +5 -2
  104. package/dist/generators/server/templates/build.gradle.ejs +5 -3
  105. package/dist/generators/server/templates/gradle/profile_dev.gradle.ejs +1 -0
  106. package/dist/generators/server/templates/gradle/profile_prod.gradle.ejs +1 -0
  107. package/dist/generators/server/templates/gradle.properties.ejs +1 -1
  108. package/dist/generators/server/templates/pom.xml.ejs +7 -5
  109. package/dist/generators/server/templates/src/main/java/_package_/_entityPackage_/service/dto/_dtoClass_.java.ejs +1 -1
  110. package/dist/generators/server/templates/src/main/java/_package_/config/Constants.java.ejs +0 -2
  111. package/dist/generators/server/templates/src/main/java/_package_/config/SecurityConfiguration_imperative.java.ejs +1 -18
  112. package/dist/generators/server/templates/src/main/java/_package_/config/SecurityConfiguration_reactive.java.ejs +1 -15
  113. package/dist/generators/server/templates/src/main/java/_package_/config/SecurityJwtConfiguration.java.ejs +0 -20
  114. package/dist/generators/server/templates/src/main/java/_package_/security/SecurityUtils.java.ejs +65 -5
  115. package/dist/generators/server/templates/src/main/java/_package_/service/dto/UserDTO.java.ejs +23 -0
  116. package/dist/generators/server/templates/src/main/java/_package_/service/mapper/UserMapper.java.ejs +8 -4
  117. package/dist/generators/server/templates/src/main/java/_package_/web/rest/AccountResource_skipUserManagement.java.ejs +43 -9
  118. package/dist/generators/server/templates/src/main/resources/config/application.yml.ejs +59 -21
  119. package/dist/generators/server/templates/src/main/resources/swagger/api.yml.ejs +1 -1
  120. package/dist/generators/server/templates/src/test/java/_package_/security/DomainUserDetailsServiceIT.java.ejs +31 -13
  121. package/dist/generators/server/templates/src/test/java/_package_/service/mapper/UserMapperTest.java.ejs +84 -17
  122. package/dist/generators/server/templates/src/test/java/_package_/web/rest/AccountResourceIT.java.ejs +62 -6
  123. package/dist/generators/server/templates/src/test/java/_package_/web/rest/AccountResourceIT_oauth2.java.ejs +22 -0
  124. package/dist/generators/server/templates/src/test/resources/config/application.yml.ejs +20 -10
  125. package/dist/generators/spring-boot/command.js +117 -6
  126. package/dist/generators/spring-boot/files.js +0 -5
  127. package/dist/generators/spring-boot/generator.js +40 -7
  128. package/dist/generators/spring-boot/prompts.js +6 -70
  129. package/dist/generators/spring-boot/resources/spring-boot-dependencies.pom +368 -576
  130. package/dist/generators/spring-boot/templates/src/test/java/_package_/_entityPackage_/service/UserServiceIT.java.ejs +47 -11
  131. package/dist/generators/spring-boot/templates/src/test/java/_package_/_entityPackage_/web/rest/PublicUserResourceIT.java.ejs +60 -24
  132. package/dist/generators/spring-boot/templates/src/test/java/_package_/_entityPackage_/web/rest/UserResourceIT.java.ejs +195 -318
  133. package/dist/generators/spring-boot/templates/src/test/java/_package_/_entityPackage_/web/rest/_entityClass_ResourceIT.java.ejs +58 -51
  134. package/dist/generators/spring-cache/internal/dependencies.js +2 -2
  135. package/dist/generators/spring-cache/resources/gradle/libs.versions.toml +1 -1
  136. package/dist/generators/spring-cloud/generators/gateway/command.js +5 -1
  137. package/dist/generators/spring-cloud/generators/gateway/generator.js +13 -0
  138. package/dist/generators/spring-cloud/generators/gateway/jdl/jdl-routes-option.js +6 -0
  139. package/dist/generators/spring-data-cassandra/generator.js +2 -2
  140. package/dist/generators/spring-data-relational/templates/src/test/java/_package_/config/SqlTestContainersSpringContextCustomizerFactory.java.ejs +3 -1
  141. package/dist/generators/vue/resources/package.json +15 -15
  142. package/dist/generators/vue/templates/src/main/webapp/app/admin/tracker/tracker.service.spec.ts.ejs +1 -1
  143. package/dist/generators/vue/templates/src/main/webapp/app/entities/_entityFolder_/_entityFile_-details.vue.ejs +1 -1
  144. package/dist/generators/vue/templates/src/main/webapp/app/entities/_entityFolder_/_entityFile_-update.vue.ejs +1 -1
  145. package/dist/generators/vue/templates/src/main/webapp/app/entities/_entityFolder_/_entityFile_.vue.ejs +1 -1
  146. package/dist/generators/vue/templates/src/main/webapp/app/shared/alert/alert.service.spec.ts.ejs +8 -8
  147. package/dist/generators/vue/templates/src/main/webapp/app/shared/data/data-utils.service.spec.ts.ejs +1 -1
  148. package/dist/generators/vue/templates/tsconfig.app.json.ejs +1 -1
  149. package/dist/generators/vue/templates/vite.config.mts.ejs +5 -4
  150. package/dist/jdl/converters/jdl-to-json/jdl-to-json-basic-entity-converter.js +1 -1
  151. package/dist/jdl/converters/jdl-to-json/jdl-to-json-field-converter.js +4 -4
  152. package/dist/jdl/converters/jdl-to-json/jdl-with-applications-to-json-converter.js +9 -9
  153. package/dist/jdl/converters/jdl-to-json/jdl-without-application-to-json-converter.js +2 -2
  154. package/dist/jdl/converters/json-to-jdl-application-converter.js +1 -1
  155. package/dist/jdl/converters/json-to-jdl-converter.js +6 -5
  156. package/dist/jdl/converters/json-to-jdl-entity-converter.js +14 -14
  157. package/dist/jdl/converters/json-to-jdl-option-converter.js +1 -2
  158. package/dist/jdl/converters/parsed-jdl-to-jdl-object/application-converter.js +1 -1
  159. package/dist/jdl/converters/parsed-jdl-to-jdl-object/option-converter.js +2 -2
  160. package/dist/jdl/converters/parsed-jdl-to-jdl-object/parsed-jdl-to-jdl-object-converter.js +7 -6
  161. package/dist/jdl/converters/parsed-jdl-to-jdl-object/validation-converter.js +1 -1
  162. package/dist/jdl/exporters/applications/jhipster-application-formatter.js +16 -23
  163. package/dist/jdl/exporters/config.js +1 -0
  164. package/dist/jdl/exporters/jhipster-deployment-exporter.js +5 -5
  165. package/dist/jdl/exporters/jhipster-entity-exporter.js +1 -1
  166. package/dist/jdl/jdl-importer.js +22 -20
  167. package/dist/jdl/jhipster/binary-options.js +12 -8
  168. package/dist/jdl/jhipster/json-entity.js +1 -1
  169. package/dist/jdl/models/abstract-jdl-option.js +2 -2
  170. package/dist/jdl/models/jdl-application-configuration-factory.js +2 -0
  171. package/dist/jdl/models/jdl-binary-option.js +2 -2
  172. package/dist/jdl/models/jdl-deployment.js +11 -0
  173. package/dist/jdl/models/jdl-entity.js +1 -1
  174. package/dist/jdl/models/jdl-enum.js +1 -1
  175. package/dist/jdl/models/jdl-enums.js +0 -18
  176. package/dist/jdl/models/jdl-field.js +2 -2
  177. package/dist/jdl/models/jdl-object-wrapper.js +1 -0
  178. package/dist/jdl/models/jdl-object.js +23 -45
  179. package/dist/jdl/models/jdl-options.js +0 -18
  180. package/dist/jdl/models/jdl-relationships.js +8 -16
  181. package/dist/jdl/models/jdl-unary-option.js +1 -1
  182. package/dist/jdl/models/list-jdl-application-configuration-option.js +5 -2
  183. package/dist/jdl/parsing/jdl-ast-builder-visitor.js +12 -0
  184. package/dist/jdl/parsing/jdl-parser.js +14 -0
  185. package/dist/jdl/parsing/lexer/lexer.js +17 -11
  186. package/dist/jdl/parsing/validator.js +16 -2
  187. package/dist/jdl/readers/json-reader.js +1 -1
  188. package/dist/jdl/utils/array-utils.js +6 -0
  189. package/dist/jdl/utils/set-utils.js +3 -2
  190. package/dist/jdl/validators/jdl-without-application-validator.js +2 -2
  191. package/dist/testing/helpers.js +4 -0
  192. package/dist/types/generators/base/api.d.ts +5 -1
  193. package/dist/types/generators/base/generator.d.ts +10 -4
  194. package/dist/types/generators/base/priorities.d.ts +4 -0
  195. package/dist/types/generators/base/shared-data.d.ts +1 -1
  196. package/dist/types/generators/base-application/priorities.d.ts +2 -0
  197. package/dist/types/generators/base-application/support/entity.d.ts +2 -2
  198. package/dist/types/generators/base-application/support/prepare-entity.d.ts +3 -3
  199. package/dist/types/generators/base-application/support/relationship.d.ts +5 -5
  200. package/dist/types/generators/base-core/generator.d.ts +16 -1
  201. package/dist/types/generators/generator-constants.d.ts +1 -1
  202. package/dist/types/generators/java/support/add-java-annotation.d.ts +10 -20
  203. package/dist/types/generators/java/support/doc.d.ts +1 -1
  204. package/dist/types/generators/java/support/index.d.ts +1 -1
  205. package/dist/types/generators/server/support/relationship.d.ts +2 -2
  206. package/dist/types/generators/server/types.d.ts +5 -0
  207. package/dist/types/generators/spring-cloud/generators/gateway/jdl/jdl-routes-option.d.ts +2 -0
  208. package/dist/types/generators/spring-cloud/generators/gateway/types.d.ts +4 -0
  209. package/dist/types/jdl/converters/jdl-to-json/jdl-to-json-field-converter.d.ts +2 -2
  210. package/dist/types/jdl/converters/jdl-to-json/jdl-with-applications-to-json-converter.d.ts +2 -1
  211. package/dist/types/jdl/converters/jdl-to-json/jdl-without-application-to-json-converter.d.ts +3 -1
  212. package/dist/types/jdl/converters/json-to-jdl-application-converter.d.ts +9 -2
  213. package/dist/types/jdl/converters/json-to-jdl-converter.d.ts +3 -3
  214. package/dist/types/jdl/converters/json-to-jdl-entity-converter.d.ts +2 -4
  215. package/dist/types/jdl/converters/parsed-jdl-to-jdl-object/application-converter.d.ts +3 -1
  216. package/dist/types/jdl/converters/parsed-jdl-to-jdl-object/deployment-converter.d.ts +2 -1
  217. package/dist/types/jdl/converters/parsed-jdl-to-jdl-object/entity-converter.d.ts +3 -1
  218. package/dist/types/jdl/converters/parsed-jdl-to-jdl-object/enum-converter.d.ts +2 -1
  219. package/dist/types/jdl/converters/parsed-jdl-to-jdl-object/field-converter.d.ts +2 -1
  220. package/dist/types/jdl/converters/parsed-jdl-to-jdl-object/option-converter.d.ts +3 -3
  221. package/dist/types/jdl/converters/parsed-jdl-to-jdl-object/parsed-jdl-to-jdl-object-converter.d.ts +2 -1
  222. package/dist/types/jdl/converters/parsed-jdl-to-jdl-object/relationship-converter.d.ts +2 -1
  223. package/dist/types/jdl/converters/parsed-jdl-to-jdl-object/types.d.ts +110 -0
  224. package/dist/types/jdl/converters/parsed-jdl-to-jdl-object/validation-converter.d.ts +2 -1
  225. package/dist/types/jdl/converters/types.d.ts +102 -14
  226. package/dist/types/jdl/exporters/applications/jhipster-application-formatter.d.ts +4 -4
  227. package/dist/types/jdl/exporters/config.d.ts +2 -1
  228. package/dist/types/jdl/exporters/export-utils.d.ts +2 -1
  229. package/dist/types/jdl/exporters/jdl-exporter.d.ts +2 -1
  230. package/dist/types/jdl/exporters/jhipster-deployment-exporter.d.ts +3 -1
  231. package/dist/types/jdl/exporters/jhipster-entity-exporter.d.ts +3 -1
  232. package/dist/types/jdl/exporters/types.d.ts +61 -0
  233. package/dist/types/jdl/jhipster/binary-options.d.ts +8 -26
  234. package/dist/types/jdl/jhipster/field-types.d.ts +2 -2
  235. package/dist/types/jdl/jhipster/json-entity.d.ts +2 -2
  236. package/dist/types/jdl/models/abstract-jdl-option.d.ts +14 -9
  237. package/dist/types/jdl/models/boolean-jdl-application-configuration-option.d.ts +1 -1
  238. package/dist/types/jdl/models/integer-jdl-application-configuration-option.d.ts +1 -1
  239. package/dist/types/jdl/models/jdl-application-configuration-factory.d.ts +1 -1
  240. package/dist/types/jdl/models/jdl-application-configuration-option.d.ts +4 -4
  241. package/dist/types/jdl/models/jdl-application-configuration.d.ts +4 -4
  242. package/dist/types/jdl/models/jdl-application-definition.d.ts +4 -4
  243. package/dist/types/jdl/models/jdl-application-entities.d.ts +4 -4
  244. package/dist/types/jdl/models/jdl-application.d.ts +16 -13
  245. package/dist/types/jdl/models/jdl-binary-option.d.ts +5 -3
  246. package/dist/types/jdl/models/jdl-deployment.d.ts +13 -1
  247. package/dist/types/jdl/models/jdl-entity.d.ts +5 -5
  248. package/dist/types/jdl/models/jdl-enum-value.d.ts +4 -4
  249. package/dist/types/jdl/models/jdl-enum.d.ts +9 -5
  250. package/dist/types/jdl/models/jdl-enums.d.ts +6 -5
  251. package/dist/types/jdl/models/jdl-field.d.ts +10 -8
  252. package/dist/types/jdl/models/jdl-object-wrapper.d.ts +25 -0
  253. package/dist/types/jdl/models/jdl-object.d.ts +23 -19
  254. package/dist/types/jdl/models/jdl-options.d.ts +7 -24
  255. package/dist/types/jdl/models/jdl-relationship.d.ts +16 -10
  256. package/dist/types/jdl/models/jdl-relationships.d.ts +5 -5
  257. package/dist/types/jdl/models/jdl-validation.d.ts +3 -3
  258. package/dist/types/jdl/models/list-jdl-application-configuration-option.d.ts +4 -3
  259. package/dist/types/jdl/models/string-jdl-application-configuration-option.d.ts +2 -2
  260. package/dist/types/jdl/parsing/jdl-ast-builder-visitor.d.ts +1 -0
  261. package/dist/types/jdl/parsing/jdl-parser.d.ts +1 -0
  262. package/dist/types/jdl/parsing/jdl-parsing-types.d.ts +23 -0
  263. package/dist/types/jdl/parsing/lexer/lexer.d.ts +6 -2
  264. package/dist/types/jdl/parsing/validator.d.ts +1 -1
  265. package/dist/types/jdl/utils/array-utils.d.ts +1 -0
  266. package/dist/types/jdl/utils/set-utils.d.ts +1 -19
  267. package/dist/types/jdl/validators/deployment-validator.d.ts +2 -1
  268. package/dist/types/testing/helpers.d.ts +13 -3
  269. package/package.json +24 -23
  270. /package/dist/jdl/converters/{types.js → parsed-jdl-to-jdl-object/types.js} +0 -0
@@ -79,6 +79,8 @@ function createJDLConfigurationOption(type, name, value) {
79
79
  return new BooleanJDLApplicationConfigurationOption(name, value);
80
80
  case 'list':
81
81
  return new ListJDLApplicationConfigurationOption(name, value);
82
+ case 'quotedList':
83
+ return new ListJDLApplicationConfigurationOption(name, value, true);
82
84
  /* istanbul ignore next */
83
85
  default:
84
86
  // It should not happen! This is a developer error.
@@ -26,7 +26,7 @@ export default class JDLBinaryOption extends AbstractJDLOption {
26
26
  value;
27
27
  constructor(args) {
28
28
  super(args);
29
- if (args.value == null) {
29
+ if (typeof args.value !== 'string') {
30
30
  throw new Error('A binary option must have a value.');
31
31
  }
32
32
  this.value = args.value;
@@ -46,7 +46,7 @@ export default class JDLBinaryOption extends AbstractJDLOption {
46
46
  return firstPart;
47
47
  }
48
48
  const excludedNames = join(this.excludedNames, ', ');
49
- excludedNames.slice(1, this.excludedNames.length - 1);
49
+ excludedNames.slice(1, this.excludedNames.size - 1);
50
50
  return `${firstPart} except ${excludedNames}`;
51
51
  }
52
52
  }
@@ -24,6 +24,17 @@ const { Options } = deploymentOptions;
24
24
  const arrayTypes = ['appsFolders', 'clusteredDbApps'];
25
25
  const NO_SERVICE_DISCOVERY = serviceDiscoveryTypes.NO;
26
26
  export default class JDLDeployment {
27
+ deploymentType;
28
+ appsFolders;
29
+ directoryPath;
30
+ gatewayType;
31
+ kubernetesServiceType;
32
+ istio;
33
+ ingressDomain;
34
+ ingressType;
35
+ storageType;
36
+ monitoring;
37
+ clusteredDbApps;
27
38
  constructor(args) {
28
39
  if (!args || !args.deploymentType) {
29
40
  throw new Error('The deploymentType is mandatory to create a deployment.');
@@ -32,7 +32,7 @@ export default class JDLEntity {
32
32
  }
33
33
  this.name = merged.name;
34
34
  this.tableName = merged.tableName;
35
- this.fields = merged.fields;
35
+ this.fields = merged.fields ?? {};
36
36
  this.comment = merged.comment;
37
37
  this.annotations = merged.annotations ?? {};
38
38
  }
@@ -29,7 +29,7 @@ export default class JDLEnum {
29
29
  }
30
30
  this.comment = merged.comment;
31
31
  this.name = merged.name;
32
- this.values = new Map(merged.values.map(entry => {
32
+ this.values = new Map(merged.values.map((entry) => {
33
33
  return [entry.key, new JDLEnumValue(entry.key, entry.value, entry.comment)];
34
34
  }));
35
35
  }
@@ -1,21 +1,3 @@
1
- /**
2
- * Copyright 2013-2024 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
1
  export default class JDLEnums {
20
2
  enums;
21
3
  constructor() {
@@ -32,8 +32,8 @@ export default class JDLField {
32
32
  this.name = merged.name;
33
33
  this.type = merged.type;
34
34
  this.comment = merged.comment;
35
- this.validations = merged.validations;
36
- this.options = merged.options;
35
+ this.validations = merged.validations ?? {};
36
+ this.options = merged.options ?? {};
37
37
  }
38
38
  addValidation(validation) {
39
39
  if (!validation) {
@@ -0,0 +1 @@
1
+ export {};
@@ -215,60 +215,38 @@ export default class JDLObject {
215
215
  return this.options.size();
216
216
  }
217
217
  toString() {
218
- let string = '';
219
- if (this.getApplicationQuantity() !== 0) {
220
- string += `${applicationsToString(this.applications)}\n`;
221
- }
222
- if (this.getDeploymentQuantity() !== 0) {
223
- string += `${deploymentsToString(this.deployments)}\n`;
224
- }
225
- if (this.getEntityQuantity() !== 0) {
226
- string += `${entitiesToString(this.entities)}\n`;
227
- }
228
- if (this.getEnumQuantity() !== 0) {
229
- string += `${this.enums.toString()}\n`;
230
- }
231
- if (this.getRelationshipQuantity() !== 0) {
232
- string += `${relationshipsToString(this.relationships)}`;
233
- }
234
- if (this.getOptionQuantity() !== 0) {
235
- string += `\n${optionsToString(this.options)}`;
236
- }
237
- return string;
218
+ return [
219
+ applicationsToString(this.applications),
220
+ deploymentsToString(this.deployments),
221
+ entitiesToString(this.entities),
222
+ this.enums.toString(),
223
+ relationshipsToString(this.relationships),
224
+ optionsToString(this.options),
225
+ ]
226
+ .map(section => section.trim())
227
+ .filter(Boolean)
228
+ .join('\n\n')
229
+ .concat('\n');
238
230
  }
239
231
  }
240
232
  function applicationsToString(applications) {
241
- let string = '';
242
- Object.keys(applications).forEach(applicationName => {
243
- string += `${applications[applicationName].toString()}\n`;
244
- });
245
- return string;
233
+ return Object.values(applications)
234
+ .map(application => application.toString())
235
+ .join('\n');
246
236
  }
247
237
  function deploymentsToString(deployments) {
248
- let string = '';
249
- Object.values(deployments).forEach(deployment => {
250
- string += `${deployment.toString()}\n`;
251
- });
252
- return string;
238
+ return Object.values(deployments)
239
+ .map(deployment => deployment.toString())
240
+ .join('\n');
253
241
  }
254
242
  function entitiesToString(entities) {
255
- let string = '';
256
- Object.keys(entities).forEach(entityName => {
257
- string += `${entities[entityName].toString()}\n`;
258
- });
259
- return string.slice(0, string.length - 1);
243
+ return Object.values(entities)
244
+ .map(entity => entity.toString())
245
+ .join('\n');
260
246
  }
261
247
  function relationshipsToString(relationships) {
262
- const string = relationships.toString();
263
- if (string === '') {
264
- return '';
265
- }
266
- return `${string}\n`;
248
+ return relationships.toString();
267
249
  }
268
250
  function optionsToString(options) {
269
- const string = options.toString();
270
- if (string === '') {
271
- return '';
272
- }
273
- return `${string}\n`;
251
+ return options.toString();
274
252
  }
@@ -1,21 +1,3 @@
1
- /**
2
- * Copyright 2013-2024 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
1
  export default class JDLOptions {
20
2
  options;
21
3
  optionSize;
@@ -91,23 +91,15 @@ export default class JDLRelationships {
91
91
  if (this.size() === 0) {
92
92
  return '';
93
93
  }
94
- let string = '';
95
- Object.keys(this.relationships).forEach(type => {
96
- if (this.relationships[type].size !== 0) {
97
- const result = relationshipTypeToString(this.relationships[type], type);
98
- string += `${result}\n`;
99
- }
100
- });
101
- return string.slice(0, string.length - 1);
94
+ return Object.entries(this.relationships)
95
+ .map(([key, relationships]) => (relationships.size > 0 ? relationshipTypeToString(relationships, key) : undefined))
96
+ .filter(Boolean)
97
+ .join('\n');
102
98
  }
103
99
  }
104
100
  function relationshipTypeToString(relationships, type) {
105
- let relationship = `relationship ${type} {\n`;
106
- relationships.forEach(internalRelationship => {
107
- let lines = internalRelationship.toString().split('\n');
108
- lines = lines.slice(1, lines.length - 1);
109
- relationship += `${lines.join('\n')}\n`;
110
- });
111
- relationship = `${relationship.slice(0, relationship.length - 1)}\n}`;
112
- return relationship;
101
+ const relationshipsLines = [...relationships.values()].map(relationship => relationship.toString().split('\n').slice(1, -1)).flat();
102
+ return `relationship ${type} {
103
+ ${relationshipsLines.join('\n')}
104
+ }`;
113
105
  }
@@ -33,7 +33,7 @@ export default class JDLUnaryOption extends AbstractJDLOption {
33
33
  return firstPart;
34
34
  }
35
35
  const excludedNames = join(this.excludedNames, ', ');
36
- excludedNames.slice(1, this.excludedNames.length - 1);
36
+ excludedNames.slice(1, this.excludedNames.size - 1);
37
37
  return `${firstPart} except ${excludedNames}`;
38
38
  }
39
39
  }
@@ -19,13 +19,16 @@
19
19
  import JDLApplicationConfigurationOption from './jdl-application-configuration-option.js';
20
20
  import { join } from '../utils/set-utils.js';
21
21
  export default class ListJDLApplicationConfigurationOption extends JDLApplicationConfigurationOption {
22
- constructor(name, value) {
22
+ // TODO for v9, use set everywhere
23
+ quoted;
24
+ constructor(name, value, quoted = false) {
23
25
  super(name, new Set(value));
26
+ this.quoted = quoted;
24
27
  }
25
28
  getValue() {
26
29
  return Array.from(this.value);
27
30
  }
28
31
  toString() {
29
- return `${this.name} [${join(this.value, ', ')}]`;
32
+ return `${this.name} [${join(this.value, ', ', this.quoted)}]`;
30
33
  }
31
34
  }
@@ -472,6 +472,9 @@ export default class JDLAstBuilderVisitor extends BaseJDLCSTVisitor {
472
472
  if (context.list) {
473
473
  return this.visit(context.list);
474
474
  }
475
+ if (context.quotedList) {
476
+ return this.visit(context.quotedList);
477
+ }
475
478
  if (context.INTEGER) {
476
479
  return context.INTEGER[0].image;
477
480
  }
@@ -513,6 +516,9 @@ export default class JDLAstBuilderVisitor extends BaseJDLCSTVisitor {
513
516
  if (context.list) {
514
517
  return this.visit(context.list);
515
518
  }
519
+ if (context.quotedList) {
520
+ return this.visit(context.quotedList);
521
+ }
516
522
  if (context.INTEGER) {
517
523
  return context.INTEGER[0].image;
518
524
  }
@@ -535,6 +541,12 @@ export default class JDLAstBuilderVisitor extends BaseJDLCSTVisitor {
535
541
  }
536
542
  return context.NAME.map(namePart => namePart.image, this);
537
543
  }
544
+ quotedList(context) {
545
+ if (!context.STRING) {
546
+ return [];
547
+ }
548
+ return context.STRING.map(namePart => namePart.image.slice(1, -1), this);
549
+ }
538
550
  }
539
551
  function getOptionEntityAndExcludedEntityLists(astResult, option) {
540
552
  let entityList = astResult.list || [];
@@ -72,6 +72,7 @@ export default class JDLParser extends CstParser {
72
72
  this.applicationNamespaceConfigDeclaration();
73
73
  this.namespaceConfigValue();
74
74
  this.qualifiedName();
75
+ this.quotedList();
75
76
  this.list();
76
77
  // very important to call this after all the rules have been defined.
77
78
  // otherwise the parsers may not work correctly as it will lack information
@@ -534,6 +535,7 @@ export default class JDLParser extends CstParser {
534
535
  this.OR([
535
536
  { ALT: () => this.CONSUME(LexerTokens.BOOLEAN) },
536
537
  { ALT: () => this.SUBRULE(this.qualifiedName) },
538
+ { ALT: () => this.SUBRULE(this.quotedList) },
537
539
  { ALT: () => this.SUBRULE(this.list) },
538
540
  { ALT: () => this.CONSUME(LexerTokens.INTEGER) },
539
541
  { ALT: () => this.CONSUME(LexerTokens.STRING) },
@@ -562,6 +564,18 @@ export default class JDLParser extends CstParser {
562
564
  this.CONSUME(LexerTokens.RSQUARE);
563
565
  });
564
566
  }
567
+ quotedList() {
568
+ this.RULE('quotedList', () => {
569
+ this.CONSUME(LexerTokens.LSQUARE);
570
+ this.AT_LEAST_ONE_SEP({
571
+ SEP: LexerTokens.COMMA,
572
+ DEF: () => {
573
+ this.CONSUME(LexerTokens.STRING);
574
+ },
575
+ });
576
+ this.CONSUME(LexerTokens.RSQUARE);
577
+ });
578
+ }
565
579
  applicationSubEntities() {
566
580
  this.RULE('applicationSubEntities', () => {
567
581
  this.CONSUME(LexerTokens.ENTITIES);
@@ -25,11 +25,11 @@ import DeploymentTokens from './deployment-tokens.js';
25
25
  import RelationshipTypeTokens from './relationship-type-tokens.js';
26
26
  import OptionTokens from './option-tokens.js';
27
27
  import createTokenFromConfigCreator from './token-creator.js';
28
- export const tokens = {};
28
+ const _tokens = {};
29
29
  const { BUILT_IN_ENTITY } = relationshipOptions;
30
30
  function createTokenFromConfig(config) {
31
31
  const newToken = createTokenFromConfigCreator(config);
32
- tokens[config.name] = newToken;
32
+ _tokens[config.name] = newToken;
33
33
  return newToken;
34
34
  }
35
35
  // Some categories to make the grammar easier to read
@@ -63,7 +63,7 @@ createTokenFromConfig({
63
63
  createTokenFromConfig({ name: 'CONFIG', pattern: 'config' });
64
64
  createTokenFromConfig({ name: 'ENTITIES', pattern: 'entities' });
65
65
  ApplicationTokens.tokens.forEach(token => {
66
- tokens[token.name] = token;
66
+ _tokens[token.name] = token;
67
67
  });
68
68
  // application must appear AFTER "applicationType" due to shorter common prefix.
69
69
  createTokenFromConfig({ name: 'APPLICATION', pattern: 'application' });
@@ -74,7 +74,7 @@ createTokenFromConfig({
74
74
  categories: [CONFIG_KEY, DEPLOYMENT_KEY],
75
75
  });
76
76
  DeploymentTokens.tokens.forEach(token => {
77
- tokens[token.name] = token;
77
+ _tokens[token.name] = token;
78
78
  });
79
79
  createTokenFromConfig({ name: 'DEPLOYMENT', pattern: 'deployment' });
80
80
  // boolean value constants
@@ -88,16 +88,16 @@ createTokenFromConfig({ name: 'RELATIONSHIP', pattern: 'relationship' });
88
88
  createTokenFromConfig({ name: 'BUILT_IN_ENTITY', pattern: BUILT_IN_ENTITY });
89
89
  // Category For the relationship type key names
90
90
  RelationshipTypeTokens.tokens.forEach(token => {
91
- tokens[token.name] = token;
91
+ _tokens[token.name] = token;
92
92
  });
93
93
  createTokenFromConfig({ name: 'STAR', pattern: '*' });
94
94
  // Options
95
95
  OptionTokens.tokens.forEach(token => {
96
- tokens[token.name] = token;
96
+ _tokens[token.name] = token;
97
97
  });
98
98
  // validations
99
99
  ValidationTokens.tokens.forEach(token => {
100
- tokens[token.name] = token;
100
+ _tokens[token.name] = token;
101
101
  });
102
102
  createTokenFromConfig({ name: 'REGEX', pattern: /\/[^\n\r]*\// });
103
103
  createTokenFromConfig({ name: 'DECIMAL', pattern: /-?\d+\.\d+/ });
@@ -118,10 +118,16 @@ createTokenFromConfig({ name: 'DOT', pattern: '.' });
118
118
  createTokenFromConfig({ name: 'TO', pattern: 'to' });
119
119
  // annotations
120
120
  createTokenFromConfig({ name: 'AT', pattern: '@' });
121
- tokens.UNARY_OPTION = UNARY_OPTION;
122
- tokens.BINARY_OPTION = BINARY_OPTION;
123
- // Imperative the "NAME" token will be added after all the keywords to resolve keywords vs identifier conflict.
124
- tokens.NAME = NAME;
121
+ const typedTokens = {
122
+ UNARY_OPTION,
123
+ BINARY_OPTION,
124
+ // Imperative the "NAME" token will be added after all the keywords to resolve keywords vs identifier conflict.
125
+ NAME,
126
+ };
127
+ export const tokens = {
128
+ ..._tokens,
129
+ ...typedTokens,
130
+ };
125
131
  // with 'ensureOptimizations' the lexer initialization will throw a descriptive error
126
132
  // instead of silently reverting to an unoptimized algorithm.
127
133
  // This will avoid performance regressions.
@@ -377,6 +377,15 @@ class JDLSyntaxValidatorVisitor extends BaseJDLCSTVisitorWithDefaults {
377
377
  return false;
378
378
  }
379
379
  return true;
380
+ case 'quotedList':
381
+ if (actual.name !== 'quotedList') {
382
+ this.errors.push({
383
+ message: `An array of names is expected, but found: "${getFirstToken(actual).image}"`,
384
+ token: getFirstToken(actual),
385
+ });
386
+ return false;
387
+ }
388
+ return true;
380
389
  case 'INTEGER':
381
390
  if (actual.tokenType !== LexerTokens.INTEGER) {
382
391
  this.errors.push({
@@ -414,8 +423,13 @@ class JDLSyntaxValidatorVisitor extends BaseJDLCSTVisitorWithDefaults {
414
423
  if (!validation) {
415
424
  throw Error(`Got an invalid application config property: '${propertyName}'.`);
416
425
  }
417
- if (this.checkExpectedValueType(validation.type, value) && validation.pattern && value.children && value.children.NAME) {
418
- value.children.NAME.forEach(nameTok => this.checkNameSyntax(nameTok, validation.pattern, validation.msg));
426
+ if (this.checkExpectedValueType(validation.type, value) && validation.pattern && value.children) {
427
+ if (value.children.NAME) {
428
+ value.children.NAME.forEach(nameTok => this.checkNameSyntax(nameTok, validation.pattern, validation.msg));
429
+ }
430
+ if (value.children.STRING) {
431
+ value.children.STRING.forEach(nameTok => this.checkNameSyntax(nameTok, validation.pattern, validation.msg));
432
+ }
419
433
  }
420
434
  }
421
435
  checkDeploymentConfigPropSyntax(key, value) {
@@ -51,6 +51,6 @@ export default function parseFromDir(dir) {
51
51
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
52
52
  // @ts-expect-error
53
53
  const jdlObject = convertServerOptionsToJDL(applicationOptions);
54
- const convertedJDLObject = convertEntitiesToJDL({ entities });
54
+ const convertedJDLObject = convertEntitiesToJDL(entities);
55
55
  return mergeJDLObjects(jdlObject, convertedJDLObject);
56
56
  }
@@ -19,3 +19,9 @@
19
19
  export default function deduplicate(array) {
20
20
  return Array.from(new Set(array));
21
21
  }
22
+ export function join(set, separator = ',', quoted = false) {
23
+ if (!set) {
24
+ throw new Error('An Array must be passed so as to join elements.');
25
+ }
26
+ return set.map(val => (quoted ? `"${val}"` : val)).join(separator);
27
+ }
@@ -16,6 +16,7 @@
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
18
  */
19
+ import { join as arrayJoin } from './array-utils.js';
19
20
  export function addAll(set, elements) {
20
21
  if (!set) {
21
22
  throw new Error('A Set must be passed so as to insert elements.');
@@ -26,9 +27,9 @@ export function addAll(set, elements) {
26
27
  elements.forEach(element => set.add(element));
27
28
  return set;
28
29
  }
29
- export function join(set, separator = ',') {
30
+ export function join(set, separator = ',', quoted = false) {
30
31
  if (!set) {
31
32
  throw new Error('A Set must be passed so as to join elements.');
32
33
  }
33
- return Array.from(set).join(separator);
34
+ return arrayJoin(Array.from(set), separator, quoted);
34
35
  }
@@ -89,10 +89,10 @@ export default function createValidator(jdlObject, applicationSettings = {}, log
89
89
  }
90
90
  }
91
91
  const typeCheckingFunction = getTypeCheckingFunction(entityName, applicationSettings);
92
- if (!jdlObject.hasEnum(jdlField.type) && !typeCheckingFunction(jdlField.type)) {
92
+ const isAnEnum = jdlObject.hasEnum(jdlField.type);
93
+ if (!isAnEnum && !typeCheckingFunction(jdlField.type)) {
93
94
  throw new Error(`The type '${jdlField.type}' is an unknown field type for field '${fieldName}' of entity '${entityName}'.`);
94
95
  }
95
- const isAnEnum = jdlObject.hasEnum(jdlField.type);
96
96
  checkForValidationErrors(jdlField, isAnEnum);
97
97
  });
98
98
  }
@@ -53,6 +53,7 @@ const createFiles = (workspaceFolder, configuration, entities) => {
53
53
  ...entityFiles,
54
54
  };
55
55
  };
56
+ export const createJHipsterConfigFiles = (configuration, entities) => createFiles('', configuration, entities);
56
57
  export const createBlueprintFiles = (blueprintPackage, { packageJson, generator = 'test-blueprint', generatorContent, files = {} } = {}) => {
57
58
  generatorContent =
58
59
  generatorContent ??
@@ -85,6 +86,9 @@ class JHipsterRunContext extends RunContext {
85
86
  workspaceApplications = [];
86
87
  commonWorkspacesConfig;
87
88
  generateApplicationsSet = false;
89
+ withOptions(options) {
90
+ return super.withOptions(options);
91
+ }
88
92
  withJHipsterConfig(configuration, entities) {
89
93
  return this.withFiles(createFiles('', { baseName: 'jhipster', creationTimestamp: parseCreationTimestamp('2020-01-01'), ...configuration }, entities));
90
94
  }
@@ -207,7 +207,7 @@ export type ConfigSpec = {
207
207
 
208
208
  cli?: SetOptional<CliOptionSpec, 'name'> & { env?: string };
209
209
  argument?: JHipsterArgumentConfig;
210
- prompt?: PromptSpec | ((CoreGenerator) => PromptSpec);
210
+ prompt?: PromptSpec | ((gen: CoreGenerator & { jhipsterConfigWithDefaults: Record<string, any> }, config: ConfigSpec) => PromptSpec);
211
211
  scope?: 'storage' | 'blueprint' | 'generator';
212
212
  /**
213
213
  * The callback receives the generator as input for 'generator' scope.
@@ -215,6 +215,10 @@ export type ConfigSpec = {
215
215
  * The callback receives blueprintStorage contents as input for 'blueprint' scope.
216
216
  */
217
217
  default?: string | boolean | string[] | ((any) => string | boolean | string[]);
218
+ /**
219
+ * Configure the generator according to the selected configuration.
220
+ */
221
+ configure?: (gen: CoreGenerator) => void;
218
222
  };
219
223
 
220
224
  export type JHipsterArguments = Record<string, JHipsterArgumentConfig>;
@@ -76,6 +76,16 @@ export default class JHipsterBaseBlueprintGenerator<Definition extends BaseGener
76
76
  * Utility method to get typed objects for autocomplete.
77
77
  */
78
78
  asComposingTaskGroup(taskGroup: GenericTaskGroup<this, Definition['composingTaskParam']>): GenericTaskGroup<this, Definition['composingTaskParam']>;
79
+ /**
80
+ * Priority API stub for blueprints.
81
+ *
82
+ * ComposingComponent priority should be used to handle component configuration order.
83
+ */
84
+ get composingComponent(): GenericTaskGroup<this, Definition['composingTaskParam']>;
85
+ /**
86
+ * Utility method to get typed objects for autocomplete.
87
+ */
88
+ asComposingComponentTaskGroup(taskGroup: GenericTaskGroup<this, Definition['composingTaskParam']>): GenericTaskGroup<this, Definition['composingTaskParam']>;
79
89
  /**
80
90
  * Priority API stub for blueprints.
81
91
  *
@@ -207,10 +217,6 @@ export default class JHipsterBaseBlueprintGenerator<Definition extends BaseGener
207
217
  * Utility method to get typed objects for autocomplete.
208
218
  */
209
219
  asEndTaskGroup(taskGroup: GenericTaskGroup<this, Definition['endTaskParam']>): GenericTaskGroup<this, Definition['endTaskParam']>;
210
- /**
211
- * JHipster config with default values fallback
212
- */
213
- get jhipsterConfigWithDefaults(): any;
214
220
  /**
215
221
  * @protected
216
222
  * Composes with blueprint generators, if any.
@@ -45,6 +45,7 @@ export namespace PRIORITY_NAMES {
45
45
  export { PROMPTING };
46
46
  export { CONFIGURING };
47
47
  export { COMPOSING };
48
+ export { COMPOSING_COMPONENT };
48
49
  export { LOADING };
49
50
  export { PREPARING };
50
51
  export { POST_PREPARING };
@@ -64,6 +65,7 @@ export namespace QUEUES {
64
65
  export { PROMPTING as PROMPTING_QUEUE };
65
66
  export { CONFIGURING as CONFIGURING_QUEUE };
66
67
  export { COMPOSING_QUEUE };
68
+ export { COMPOSING_COMPONENT_QUEUE };
67
69
  export { LOADING_QUEUE };
68
70
  export { PREPARING_QUEUE };
69
71
  export { POST_PREPARING_QUEUE };
@@ -83,6 +85,7 @@ declare const PROMPTING: "prompting";
83
85
  declare const CONFIGURING: "configuring";
84
86
  /** Custom priorities */
85
87
  declare const COMPOSING: "composing";
88
+ declare const COMPOSING_COMPONENT: "composingComponent";
86
89
  declare const LOADING: "loading";
87
90
  declare const PREPARING: "preparing";
88
91
  declare const POST_PREPARING: "postPreparing";
@@ -97,6 +100,7 @@ declare const INSTALL: "install";
97
100
  declare const POST_INSTALL: "postInstall";
98
101
  declare const END: "end";
99
102
  declare const COMPOSING_QUEUE: "jhipster:composing";
103
+ declare const COMPOSING_COMPONENT_QUEUE: "jhipster:composingComponent";
100
104
  declare const LOADING_QUEUE: "jhipster:loading";
101
105
  declare const PREPARING_QUEUE: "jhipster:preparing";
102
106
  declare const POST_PREPARING_QUEUE: "jhipster:postPreparing";
@@ -6,7 +6,7 @@ export default class SharedData<ApplicationType extends BaseApplication = BaseAp
6
6
  getSource(): any;
7
7
  getControl(): Control;
8
8
  getApplication(): ApplicationType;
9
- setEntity(entityName: any, entity: any): void;
9
+ setEntity(entityName: string, entity: any): void;
10
10
  hasEntity(entityName: any): boolean;
11
11
  getEntity(entityName: any): any;
12
12
  getEntities(entityNames?: string[]): {
@@ -27,6 +27,7 @@ export const PRIORITY_NAMES: {
27
27
  PROMPTING: string;
28
28
  CONFIGURING: string;
29
29
  COMPOSING: string;
30
+ COMPOSING_COMPONENT: string;
30
31
  LOADING: string;
31
32
  PREPARING: string;
32
33
  POST_PREPARING: string;
@@ -54,6 +55,7 @@ export const QUEUES: {
54
55
  PROMPTING_QUEUE: string;
55
56
  CONFIGURING_QUEUE: string;
56
57
  COMPOSING_QUEUE: string;
58
+ COMPOSING_COMPONENT_QUEUE: string;
57
59
  LOADING_QUEUE: string;
58
60
  PREPARING_QUEUE: string;
59
61
  POST_PREPARING_QUEUE: string;
@@ -16,5 +16,5 @@
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
18
  */
19
- import { Entity } from '../../../jdl/converters/types.js';
20
- export declare const findEntityInEntities: (entityName: string, entities: Entity[]) => Entity | undefined;
19
+ import { JSONEntity } from '../../../jdl/converters/types.js';
20
+ export declare const findEntityInEntities: (entityName: string, entities: JSONEntity[]) => JSONEntity | undefined;