From 28d6e511e2de6a392885b112b40b5acac34da6dd Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Fri, 3 Nov 2023 22:52:01 -0600 Subject: [PATCH 01/59] Upgrade to Spring Boot 3.2 --- .github/actions/setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index a26667e9cb6e..6f6ed741fef5 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -67,7 +67,7 @@ inputs: jhipster-bom-branch: description: 'JHipster BOM branch' required: false - default: auto + default: spring-boot-3.2 jhipster-bom-directory: description: 'JHipster BOM path' required: false From bc0816f3dd5a3aae60fd4d87dfa9233f574a4f29 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Fri, 3 Nov 2023 22:54:23 -0600 Subject: [PATCH 02/59] Add Spring Boot milestone repository --- generators/generator-constants.mts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/generator-constants.mts b/generators/generator-constants.mts index 161a48296c47..413cb4ececf4 100644 --- a/generators/generator-constants.mts +++ b/generators/generator-constants.mts @@ -23,7 +23,7 @@ export const JHIPSTER_DEPENDENCIES_VERSION = '8.0.0-SNAPSHOT'; export const JAVA_VERSION = '17'; export const JAVA_COMPATIBLE_VERSIONS = ['17', '18', '19', '20', '21']; // Force spring milestone repository. Spring Boot milestones are detected. -export const ADD_SPRING_MILESTONE_REPOSITORY = false; +export const ADD_SPRING_MILESTONE_REPOSITORY = true; // Version of Node, NPM export const NODE_VERSION = '18.18.2'; From 291f68c73b8281a50d7bb27a8703c5606fb59e73 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Fri, 3 Nov 2023 22:59:19 -0600 Subject: [PATCH 03/59] Update snapshots --- generators/app/__snapshots__/generator.spec.mts.snap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generators/app/__snapshots__/generator.spec.mts.snap b/generators/app/__snapshots__/generator.spec.mts.snap index 54794c51b9fc..26af5655dd02 100644 --- a/generators/app/__snapshots__/generator.spec.mts.snap +++ b/generators/app/__snapshots__/generator.spec.mts.snap @@ -86,7 +86,7 @@ exports[`generator - app with default config should match snapshot 1`] = ` "SERVER_TEST_SRC_DIR": "src/test/java/", "TEST_DIR": "src/test/", "VUE": "vue", - "addSpringMilestoneRepository": false, + "addSpringMilestoneRepository": true, "angularLocaleId": "en", "applicationType": "monolith", "applicationTypeAny": true, @@ -653,7 +653,7 @@ exports[`generator - app with gateway should match snapshot 1`] = ` "SERVER_TEST_SRC_DIR": "src/test/java/", "TEST_DIR": "src/test/", "VUE": "vue", - "addSpringMilestoneRepository": false, + "addSpringMilestoneRepository": true, "angularLocaleId": "en", "applicationType": "gateway", "applicationTypeAny": true, @@ -1223,7 +1223,7 @@ exports[`generator - app with microservice should match snapshot 1`] = ` "SERVER_TEST_SRC_DIR": "src/test/java/", "TEST_DIR": "src/test/", "VUE": "vue", - "addSpringMilestoneRepository": false, + "addSpringMilestoneRepository": true, "applicationType": "microservice", "applicationTypeAny": true, "applicationTypeGateway": false, From a255504aff5cd5218dbfff0add228cd55acfb168 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Fri, 3 Nov 2023 23:14:54 -0600 Subject: [PATCH 04/59] Add Spring Boot milestone repository to pom.xml --- generators/server/templates/pom.xml.ejs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/generators/server/templates/pom.xml.ejs b/generators/server/templates/pom.xml.ejs index 1134929c71f9..24503742cb7d 100644 --- a/generators/server/templates/pom.xml.ejs +++ b/generators/server/templates/pom.xml.ejs @@ -926,6 +926,28 @@ + <%_ if (addSpringMilestoneRepository) { _%> + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + false + + + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + false + + + + <%_ } _%> api-docs From 25fc421eba2f5aa44cbcadbdd78da43cc455e5e1 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Sat, 4 Nov 2023 12:56:33 -0300 Subject: [PATCH 05/59] update spring-boot to 3.2.0-RC2 --- generators/generator-constants.mts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/generator-constants.mts b/generators/generator-constants.mts index 413cb4ececf4..d50331008fec 100644 --- a/generators/generator-constants.mts +++ b/generators/generator-constants.mts @@ -33,7 +33,7 @@ export const javaDependencies: Record = { /** * spring-boot version should match the one managed by https://mvnrepository.com/artifact/tech.jhipster/jhipster-dependencies/JHIPSTER_DEPENDENCIES_VERSION */ - 'spring-boot': '3.1.5', + 'spring-boot': '3.2.0-RC2', /* * hibernate version should match the one managed by https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/SPRING_BOOT_VERSION * Required due to hibernate-jpamodelgen annotation processor. From 5a44b19073527b83d50fc71202ad49d119885822 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Mon, 20 Nov 2023 14:30:08 -0700 Subject: [PATCH 06/59] Fix deprecated org.springframework.util.Base64Utils --- .../web/rest/_entityClass_ResourceIT.java.ejs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/generators/server/templates/src/test/java/_package_/_entityPackage_/web/rest/_entityClass_ResourceIT.java.ejs b/generators/server/templates/src/test/java/_package_/_entityPackage_/web/rest/_entityClass_ResourceIT.java.ejs index ffdaf118aedc..9d88145bbab1 100644 --- a/generators/server/templates/src/test/java/_package_/_entityPackage_/web/rest/_entityClass_ResourceIT.java.ejs +++ b/generators/server/templates/src/test/java/_package_/_entityPackage_/web/rest/_entityClass_ResourceIT.java.ejs @@ -152,9 +152,6 @@ import org.springframework.test.web.servlet.MockMvc; import org.springframework.transaction.annotation.Transactional; <%_ } _%> <%_ } _%> -<%_ if (anyFieldIsBlobDerived) { _%> -import org.springframework.util.Base64Utils; -<%_ } _%> <%_ if (reactive && (implementsEagerLoadApis || searchEngineElasticsearch)) { _%> import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -190,6 +187,9 @@ import java.time.temporal.ChronoUnit; <%_ if (!reactive && implementsEagerLoadApis) { _%> import java.util.ArrayList; <%_ } _%> +<%_ if (anyFieldIsBlobDerived) { _%> +import java.util.Base64; +<%_ } _%> <%_ if (searchEngineElasticsearch && !reactive) { _%> import java.util.Collections; <%_ if (paginationNo) { _%> @@ -933,7 +933,7 @@ _%> <%= !reactive ? '.andExpect(' : '.' %>jsonPath("$.[*].<%= field.fieldName %>ContentType").value(hasItem(<%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %>_CONTENT_TYPE))<%= !reactive ? ')' : '' %> <%_ } _%> <%= !reactive ? '.andExpect(' : '.' %>jsonPath("$.[*].<%= field.fieldName %>").value(hasItem(<% - if (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64Utils.encodeToString(<% } else + if (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64.Encoder.encodeToString(<% } else if (field.fieldTypeZonedDateTime) { %>sameInstant(<% } else if (field.fieldTypeBigDecimal) { %>sameNumber(<% } %><%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %><% if (field.fieldTypeBinary && !field.blobContentTypeText) { %><% @@ -1020,7 +1020,7 @@ _%> <%= !reactive ? '.andExpect(' : '.' %>jsonPath("$.<%= field.fieldName %>ContentType").value(<%= reactive ? 'is(' : '' %><%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %>_CONTENT_TYPE)) <%_ } _%> <%= !reactive ? '.andExpect(' : '.' %>jsonPath("$.<%= field.fieldName %>").value(<%= reactive ? 'is(' : '' %><% - if (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64Utils.encodeToString(<% } else + if (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64.Encoder.encodeToString(<% } else if (field.fieldTypeZonedDateTime) { %>sameInstant(<% } else if (field.fieldTypeBigDecimal) { %>sameNumber(<% } %><%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %><% if (field.fieldTypeBinary && !field.blobContentTypeText) { %><% @@ -1259,7 +1259,7 @@ _%> .jsonPath("$.[*].<%= field.fieldName %>ContentType").value(hasItem(<%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %>_CONTENT_TYPE)) <%_ } _%> .jsonPath("$.[*].<%= field.fieldName %>").value(hasItem(<% if - (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64Utils.encodeToString(<% } else + (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64.Encoder.encodeToString(<% } else if (field.fieldTypeZonedDateTime) { %>sameInstant(<% } else if (field.fieldTypeBigDecimal) { %>sameNumber(<% } %><%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %><% if (field.fieldTypeBinary && !field.blobContentTypeText) { %><% if (databaseTypeCassandra) { %>.array()<% } %>)<% } else @@ -1301,7 +1301,7 @@ _%> .andExpect(jsonPath("$.[*].<%= field.fieldName %>ContentType").value(hasItem(<%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %>_CONTENT_TYPE))) <%_ } _%> .andExpect(jsonPath("$.[*].<%= field.fieldName %>").value(hasItem(<% - if (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64Utils.encodeToString(<% } else + if (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64.Encoder.encodeToString(<% } else if (field.fieldTypeZonedDateTime) { %>sameInstant(<% } else if (field.fieldTypeBigDecimal) { %>sameNumber(<% } %><%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %><% if (field.fieldTypeBinary && !field.blobContentTypeText) { %><% @@ -1831,7 +1831,7 @@ _%> <%= !reactive ? '.andExpect(' : '.' %>jsonPath("$.[*].<%= field.fieldName %>ContentType").value(hasItem(<%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %>_CONTENT_TYPE))<%= !reactive ? ')' : '' %> <%_ } _%> <%= !reactive ? '.andExpect(' : '.' %>jsonPath("$.[*].<%= field.fieldName %>").value(hasItem(<% - if (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64Utils.encodeToString(<% } else + if (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64.Encoder.encodeToString(<% } else if (field.fieldTypeZonedDateTime) { %>sameInstant(<% } else if (field.fieldTypeBigDecimal) { %>sameNumber(<% } %><%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %><% if (field.fieldTypeBinary && !field.blobContentTypeText) { %><% From 65e2b560b8636c0c258ba9212bb128a7ce0417e1 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Mon, 20 Nov 2023 18:03:21 -0700 Subject: [PATCH 07/59] Base64.Encoder -> Base64.getEncoder() --- .../web/rest/_entityClass_ResourceIT.java.ejs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/generators/server/templates/src/test/java/_package_/_entityPackage_/web/rest/_entityClass_ResourceIT.java.ejs b/generators/server/templates/src/test/java/_package_/_entityPackage_/web/rest/_entityClass_ResourceIT.java.ejs index 9d88145bbab1..3e6acbc522ca 100644 --- a/generators/server/templates/src/test/java/_package_/_entityPackage_/web/rest/_entityClass_ResourceIT.java.ejs +++ b/generators/server/templates/src/test/java/_package_/_entityPackage_/web/rest/_entityClass_ResourceIT.java.ejs @@ -933,7 +933,7 @@ _%> <%= !reactive ? '.andExpect(' : '.' %>jsonPath("$.[*].<%= field.fieldName %>ContentType").value(hasItem(<%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %>_CONTENT_TYPE))<%= !reactive ? ')' : '' %> <%_ } _%> <%= !reactive ? '.andExpect(' : '.' %>jsonPath("$.[*].<%= field.fieldName %>").value(hasItem(<% - if (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64.Encoder.encodeToString(<% } else + if (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64.getEncoder().encodeToString(<% } else if (field.fieldTypeZonedDateTime) { %>sameInstant(<% } else if (field.fieldTypeBigDecimal) { %>sameNumber(<% } %><%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %><% if (field.fieldTypeBinary && !field.blobContentTypeText) { %><% @@ -1020,7 +1020,7 @@ _%> <%= !reactive ? '.andExpect(' : '.' %>jsonPath("$.<%= field.fieldName %>ContentType").value(<%= reactive ? 'is(' : '' %><%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %>_CONTENT_TYPE)) <%_ } _%> <%= !reactive ? '.andExpect(' : '.' %>jsonPath("$.<%= field.fieldName %>").value(<%= reactive ? 'is(' : '' %><% - if (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64.Encoder.encodeToString(<% } else + if (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64.getEncoder().encodeToString(<% } else if (field.fieldTypeZonedDateTime) { %>sameInstant(<% } else if (field.fieldTypeBigDecimal) { %>sameNumber(<% } %><%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %><% if (field.fieldTypeBinary && !field.blobContentTypeText) { %><% @@ -1259,7 +1259,7 @@ _%> .jsonPath("$.[*].<%= field.fieldName %>ContentType").value(hasItem(<%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %>_CONTENT_TYPE)) <%_ } _%> .jsonPath("$.[*].<%= field.fieldName %>").value(hasItem(<% if - (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64.Encoder.encodeToString(<% } else + (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64.getEncoder().encodeToString(<% } else if (field.fieldTypeZonedDateTime) { %>sameInstant(<% } else if (field.fieldTypeBigDecimal) { %>sameNumber(<% } %><%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %><% if (field.fieldTypeBinary && !field.blobContentTypeText) { %><% if (databaseTypeCassandra) { %>.array()<% } %>)<% } else @@ -1301,7 +1301,7 @@ _%> .andExpect(jsonPath("$.[*].<%= field.fieldName %>ContentType").value(hasItem(<%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %>_CONTENT_TYPE))) <%_ } _%> .andExpect(jsonPath("$.[*].<%= field.fieldName %>").value(hasItem(<% - if (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64.Encoder.encodeToString(<% } else + if (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64.getEncoder().encodeToString(<% } else if (field.fieldTypeZonedDateTime) { %>sameInstant(<% } else if (field.fieldTypeBigDecimal) { %>sameNumber(<% } %><%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %><% if (field.fieldTypeBinary && !field.blobContentTypeText) { %><% @@ -1831,7 +1831,7 @@ _%> <%= !reactive ? '.andExpect(' : '.' %>jsonPath("$.[*].<%= field.fieldName %>ContentType").value(hasItem(<%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %>_CONTENT_TYPE))<%= !reactive ? ')' : '' %> <%_ } _%> <%= !reactive ? '.andExpect(' : '.' %>jsonPath("$.[*].<%= field.fieldName %>").value(hasItem(<% - if (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64.Encoder.encodeToString(<% } else + if (field.fieldTypeBinary && !field.blobContentTypeText) { %>Base64.getEncoder().encodeToString(<% } else if (field.fieldTypeZonedDateTime) { %>sameInstant(<% } else if (field.fieldTypeBigDecimal) { %>sameNumber(<% } %><%= 'DEFAULT_' + field.fieldNameUnderscored.toUpperCase() %><% if (field.fieldTypeBinary && !field.blobContentTypeText) { %><% From 56cebf91073faf9b855bbc8854794c148e4c9137 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Mon, 20 Nov 2023 19:06:01 -0700 Subject: [PATCH 08/59] Fix error: Name for argument of type [java.lang.String] not specified, and parameter name information not found in class file either. --- .../_partials_entity_/get_all_template.ejs | 4 ++-- .../web/rest/_entityClass_Resource.java.ejs | 8 ++++---- .../main/java/_package_/web/rest/AccountResource.java.ejs | 2 +- .../java/_package_/web/rest/PublicUserResource.java.ejs | 2 +- .../main/java/_package_/web/rest/UserResource.java.ejs | 8 ++++---- .../errors/ExceptionTranslatorTestController.java.ejs | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/generators/server/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/get_all_template.ejs b/generators/server/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/get_all_template.ejs index 62ed9a9fe68c..7e62f0d21310 100644 --- a/generators/server/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/get_all_template.ejs +++ b/generators/server/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/get_all_template.ejs @@ -75,7 +75,7 @@ _%> } <%_ } else { _%> <%_ if (paginationNo) { _%> - public <% if (reactive) { %>Mono<<% } %>List<<%= instanceType %>><% if (reactive) { %>><% } %> getAll<%= entityClassPlural %>(<% if (fieldsContainNoOwnerOneToOne) { %>@RequestParam(required = false) String filter<% } %><% if (implementsEagerLoadApis && fieldsContainNoOwnerOneToOne) { %>,<% } %><% if (implementsEagerLoadApis) { %>@RequestParam(required = false, defaultValue = "true") boolean eagerload<% } %>) {<%- include('get_all_stream_template', {viaService: viaService}); -%> + public <% if (reactive) { %>Mono<<% } %>List<<%= instanceType %>><% if (reactive) { %>><% } %> getAll<%= entityClassPlural %>(<% if (fieldsContainNoOwnerOneToOne) { %>@RequestParam(name = "filter", required = false) String filter<% } %><% if (implementsEagerLoadApis && fieldsContainNoOwnerOneToOne) { %>,<% } %><% if (implementsEagerLoadApis) { %>@RequestParam(name = "eagerload", required = false, defaultValue = "true") boolean eagerload<% } %>) {<%- include('get_all_stream_template', {viaService: viaService}); -%> log.debug("REST request to get all <%= entityClassPlural %>"); <%_ if (viaService) { _%> return <%= entityInstance %>Service.findAll()<% if (reactive) { %>.collectList()<% } %>; @@ -96,7 +96,7 @@ _%> return <%= entityInstance %>Repository.findAll()<% if (reactive) { %>.collectList()<% } %>; <%_ } _%> <%_ } else { _%> - public <% if (reactive) { %>Mono>>><% } else { %>ResponseEntity>><% } %> getAll<%= entityClassPlural %>(@org.springdoc.core.annotations.ParameterObject Pageable pageable<% if (reactive) { %>, ServerHttpRequest request<% } %><% if (fieldsContainNoOwnerOneToOne) { %>, @RequestParam(required = false) String filter<% } %><% if (implementsEagerLoadApis) { %>, @RequestParam(required = false, defaultValue = "true") boolean eagerload<% } %>) {<%- include('get_all_stream_template', {viaService: viaService}); -%> + public <% if (reactive) { %>Mono>>><% } else { %>ResponseEntity>><% } %> getAll<%= entityClassPlural %>(@org.springdoc.core.annotations.ParameterObject Pageable pageable<% if (reactive) { %>, ServerHttpRequest request<% } %><% if (fieldsContainNoOwnerOneToOne) { %>, @RequestParam(name = "filter", required = false) String filter<% } %><% if (implementsEagerLoadApis) { %>, @RequestParam(name = "eagerload", required = false, defaultValue = "true") boolean eagerload<% } %>) {<%- include('get_all_stream_template', {viaService: viaService}); -%> log.debug("REST request to get a page of <%= entityClassPlural %>"); <%_ if (reactive) { _%> return <%= entityInstance %><%= viaService ? 'Service.countAll' : 'Repository.count' %>().zipWith(<%= entityInstance %><%= viaService ? 'Service.findAll' : 'Repository.findAllBy' %>(pageable)<%= reactiveEntityToDto %>.collectList()) diff --git a/generators/server/templates/src/main/java/_package_/_entityPackage_/web/rest/_entityClass_Resource.java.ejs b/generators/server/templates/src/main/java/_package_/_entityPackage_/web/rest/_entityClass_Resource.java.ejs index 9e69c8216ed4..5cccaad4fdda 100644 --- a/generators/server/templates/src/main/java/_package_/_entityPackage_/web/rest/_entityClass_Resource.java.ejs +++ b/generators/server/templates/src/main/java/_package_/_entityPackage_/web/rest/_entityClass_Resource.java.ejs @@ -219,7 +219,7 @@ public class <%= entityClass %>Resource { */ @PutMapping("/{<%= primaryKey.name %>}") public <% if (reactive) { %>Mono<<% } %>ResponseEntity<<%= instanceType %>><% if (reactive) { %>><% } %> update<%= entityClass %>( - @PathVariable(value = "<%= primaryKey.name %>", required = false) final <%= primaryKey.type %> <%= primaryKey.name %>, + @PathVariable(name = "<%= primaryKey.name %>", value = "<%= primaryKey.name %>", required = false) final <%= primaryKey.type %> <%= primaryKey.name %>, <% if (anyPropertyHasValidation) { %>@Valid <% } %>@RequestBody <%= instanceType %> <%= instanceName %> ) throws URISyntaxException { log.debug("REST request to update <%= entityClass %> : {}, {}", <%= primaryKey.name %>, <%= instanceName %>); @@ -285,7 +285,7 @@ public class <%= entityClass %>Resource { */ @PatchMapping(value = "/{<%= primaryKey.name %>}", consumes = {"application/json", "application/merge-patch+json"}) public <% if (reactive) { %>Mono<<% } %>ResponseEntity<<%= instanceType %>><% if (reactive) { %>><% } %> partialUpdate<%= entityClass %>( - @PathVariable(value = "<%= primaryKey.name %>", required = false) final <%= primaryKey.type %> <%= primaryKey.name %>, + @PathVariable(name = "<%= primaryKey.name %>", value = "<%= primaryKey.name %>", required = false) final <%= primaryKey.type %> <%= primaryKey.name %>, <% if (anyPropertyHasValidation) { %>@NotNull <% } %>@RequestBody <%= instanceType %> <%= instanceName %>) throws URISyntaxException { log.debug("REST request to partial update <%= entityClass %> partially : {}, {}", <%= primaryKey.name %>, <%= instanceName %>); if (<%= instanceName %>.get<%= primaryKey.nameCapitalized %>() == null) { @@ -398,7 +398,7 @@ public class <%= entityClass %>Resource { <%_ if (databaseTypeSql && isUsingMapsId && !viaService) { _%> @Transactional(readOnly = true) <%_ } _%> - public <% if (reactive) { %>Mono<<% } %>ResponseEntity<<%= instanceType %>><% if (reactive) { %>><% } %> get<%= entityClass %>(@PathVariable <%= primaryKey.type %> id) { + public <% if (reactive) { %>Mono<<% } %>ResponseEntity<<%= instanceType %>><% if (reactive) { %>><% } %> get<%= entityClass %>(@PathVariable("id") <%= primaryKey.type %> id) { log.debug("REST request to get <%= entityClass %> : {}", id);<%- include('../../_partials_entity_/get_template', {viaService, returnDirectly:false, implementsEagerLoadApis}); -%> return ResponseUtil.wrapOrNotFound(<%= instanceName %>); } @@ -411,7 +411,7 @@ public class <%= entityClass %>Resource { * @return the {@link ResponseEntity} with status {@code 204 (NO_CONTENT)}. */ @DeleteMapping("/{id}") - public <% if (reactive) { %>Mono<<% } %>ResponseEntity<% if (reactive) { %>><% } %> delete<%= entityClass %>(@PathVariable <%= primaryKey.type %> id) { + public <% if (reactive) { %>Mono<<% } %>ResponseEntity<% if (reactive) { %>><% } %> delete<%= entityClass %>(@PathVariable("id") <%= primaryKey.type %> id) { log.debug("REST request to delete <%= entityClass %> : {}", id); <%- include('../../_partials_entity_/delete_template', {viaService: viaService, fromResource: true}); -%> <%_ if (reactive) { _%> diff --git a/generators/server/templates/src/main/java/_package_/web/rest/AccountResource.java.ejs b/generators/server/templates/src/main/java/_package_/web/rest/AccountResource.java.ejs index a7de202b69a8..81d6298f6227 100644 --- a/generators/server/templates/src/main/java/_package_/web/rest/AccountResource.java.ejs +++ b/generators/server/templates/src/main/java/_package_/web/rest/AccountResource.java.ejs @@ -264,7 +264,7 @@ public class AccountResource { * @throws IllegalArgumentException if the series couldn't be URL decoded. */ @DeleteMapping("/account/sessions/{series}") - public void invalidateSession(@PathVariable String series) { + public void invalidateSession(@PathVariable("series") String series) { String decodedSeries = URLDecoder.decode(series, StandardCharsets.UTF_8); SecurityUtils.getCurrentUserLogin() .flatMap(userRepository::findOneByLogin) diff --git a/generators/server/templates/src/main/java/_package_/web/rest/PublicUserResource.java.ejs b/generators/server/templates/src/main/java/_package_/web/rest/PublicUserResource.java.ejs index bb1a8892a8e3..89c78de4b915 100644 --- a/generators/server/templates/src/main/java/_package_/web/rest/PublicUserResource.java.ejs +++ b/generators/server/templates/src/main/java/_package_/web/rest/PublicUserResource.java.ejs @@ -181,7 +181,7 @@ public class PublicUserResource { * @return the result of the search. */ @GetMapping("/users/_search/{query}") - public <% if(reactive) { %>Mono<<% } %>List<<%= user.dtoClass %>><% if(reactive) { %>><% } %> search(@PathVariable String query) { + public <% if(reactive) { %>Mono<<% } %>List<<%= user.dtoClass %>><% if(reactive) { %>><% } %> search(@PathVariable("query") String query) { <%_ if (searchEngineElasticsearch) { _%> <%_ if (reactive) { _%> return userSearchRepository.search(query).map(<%= user.dtoClass %>::new).collectList(); diff --git a/generators/server/templates/src/main/java/_package_/web/rest/UserResource.java.ejs b/generators/server/templates/src/main/java/_package_/web/rest/UserResource.java.ejs index ada91774af56..93b20d33ef25 100644 --- a/generators/server/templates/src/main/java/_package_/web/rest/UserResource.java.ejs +++ b/generators/server/templates/src/main/java/_package_/web/rest/UserResource.java.ejs @@ -306,13 +306,13 @@ public class UserResource { @GetMapping("/users/{login}") @PreAuthorize("hasAuthority(\"" + AuthoritiesConstants.ADMIN + "\")") <%_ if (reactive) { _%> - public Mono<<%= user.adminUserDto %>> getUser(@PathVariable String login) { + public Mono<<%= user.adminUserDto %>> getUser(@PathVariable("login") String login) { log.debug("REST request to get User : {}", login); return userService.getUserWithAuthoritiesByLogin(login) .map(<%= user.adminUserDto %>::new) .switchIfEmpty(Mono.error(new ResponseStatusException(HttpStatus.NOT_FOUND))); <%_ } else { _%> - public ResponseEntity<<%= user.adminUserDto %>> getUser(@PathVariable @Pattern(regexp = Constants.LOGIN_REGEX) String login) { + public ResponseEntity<<%= user.adminUserDto %>> getUser(@PathVariable("login") @Pattern(regexp = Constants.LOGIN_REGEX) String login) { log.debug("REST request to get User : {}", login); return ResponseUtil.wrapOrNotFound( userService.getUserWithAuthoritiesByLogin(login) @@ -329,12 +329,12 @@ public class UserResource { @DeleteMapping("/users/{login}") @PreAuthorize("hasAuthority(\"" + AuthoritiesConstants.ADMIN + "\")") <%_ if (reactive) { _%> - public Mono> deleteUser(@PathVariable @Pattern(regexp = Constants.LOGIN_REGEX) String login) { + public Mono> deleteUser(@PathVariable("login") @Pattern(regexp = Constants.LOGIN_REGEX) String login) { log.debug("REST request to delete User: {}", login); return userService.deleteUser(login) .then(Mono.just(ResponseEntity.noContent().headers(HeaderUtil.createAlert( applicationName, <% if (enableTranslation) { %> "userManagement.deleted"<% } else { %> "A user is deleted with identifier " + login<% } %>, login)).build())); <%_ } else { _%> - public ResponseEntity deleteUser(@PathVariable @Pattern(regexp = Constants.LOGIN_REGEX) String login) { + public ResponseEntity deleteUser(@PathVariable("login") @Pattern(regexp = Constants.LOGIN_REGEX) String login) { log.debug("REST request to delete User: {}", login); userService.deleteUser(login); return ResponseEntity.noContent().headers(HeaderUtil.createAlert(applicationName, <% if (enableTranslation) { %> "userManagement.deleted"<% } else { %> "A user is deleted with identifier " + login<% } %>, login)).build(); diff --git a/generators/server/templates/src/test/java/_package_/web/rest/errors/ExceptionTranslatorTestController.java.ejs b/generators/server/templates/src/test/java/_package_/web/rest/errors/ExceptionTranslatorTestController.java.ejs index 3deb6b2e4b71..41c5daad47c5 100644 --- a/generators/server/templates/src/test/java/_package_/web/rest/errors/ExceptionTranslatorTestController.java.ejs +++ b/generators/server/templates/src/test/java/_package_/web/rest/errors/ExceptionTranslatorTestController.java.ejs @@ -45,11 +45,11 @@ public class ExceptionTranslatorTestController { } @GetMapping("/missing-servlet-request-part") - public void missingServletRequestPartException(@RequestPart String part) { + public void missingServletRequestPartException(@RequestPart("part") String part) { } @GetMapping("/missing-servlet-request-parameter") - public void missingServletRequestParameterException(@RequestParam String param) { + public void missingServletRequestParameterException(@RequestParam("param") String param) { } @GetMapping("/access-denied") From 37170a92a2d4b70677d971fe30725868448d43a5 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Mon, 20 Nov 2023 20:03:01 -0700 Subject: [PATCH 09/59] Fix Elasticsearch @RequestParam --- .../_entityPackage_/_partials_entity_/search_template.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generators/server/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/search_template.ejs b/generators/server/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/search_template.ejs index 33e6e6236fbe..5b5b273223ff 100644 --- a/generators/server/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/search_template.ejs +++ b/generators/server/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/search_template.ejs @@ -24,10 +24,10 @@ const entityToDtoReference = mapper + '::' + 'toDto'; const entityListToDtoListReference = mapper + '.' + 'toDto'; if (paginationNo) { %> - public <% if (reactive) { %>Mono<<% } %>List<<%= instanceType %>><% if (reactive) { %>><% } %> search<%= entityClassPlural %>(@RequestParam String query) { + public <% if (reactive) { %>Mono<<% } %>List<<%= instanceType %>><% if (reactive) { %>><% } %> search<%= entityClassPlural %>(@RequestParam("query") String query) { log.debug("REST request to search <%= entityClassPlural %> for query {}", query);<%- include('search_stream_template', {viaService: viaService, fromResource: true}); -%> <% } else { %> - public <% if (reactive) { %>Mono<<% } %>ResponseEntity<<%= listOrFlux %><<%= instanceType %>>><% if (reactive) { %>><% } %> search<%= entityClassPlural %>(@RequestParam String query, @org.springdoc.core.annotations.ParameterObject Pageable pageable<% if (reactive) { %>, ServerHttpRequest request<% } %>) { + public <% if (reactive) { %>Mono<<% } %>ResponseEntity<<%= listOrFlux %><<%= instanceType %>>><% if (reactive) { %>><% } %> search<%= entityClassPlural %>(@RequestParam("query") String query, @org.springdoc.core.annotations.ParameterObject Pageable pageable<% if (reactive) { %>, ServerHttpRequest request<% } %>) { log.debug("REST request to search for a page of <%= entityClassPlural %> for query {}", query); <%_ if (reactive) { _%> return <%= entityInstance %><%= viaService ? From 4b318e4d46d9c48aa9231c68942ce4452722aecd Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Mon, 20 Nov 2023 20:03:28 -0700 Subject: [PATCH 10/59] Fix Kafka @RequestParam --- .../java/_package_/web/rest/KafkaResource_imperative.java.ejs | 2 +- .../java/_package_/web/rest/KafkaResource_reactive.java.ejs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/generators/spring-cloud-stream/templates/src/main/java/_package_/web/rest/KafkaResource_imperative.java.ejs b/generators/spring-cloud-stream/templates/src/main/java/_package_/web/rest/KafkaResource_imperative.java.ejs index 5371d6030993..78fe2ea18565 100644 --- a/generators/spring-cloud-stream/templates/src/main/java/_package_/web/rest/KafkaResource_imperative.java.ejs +++ b/generators/spring-cloud-stream/templates/src/main/java/_package_/web/rest/KafkaResource_imperative.java.ejs @@ -43,7 +43,7 @@ public class <%= upperFirstCamelCaseBaseName %>KafkaResource { } @PostMapping("/publish") - public void publish(@RequestParam String message) { + public void publish(@RequestParam("message") String message) { log.debug("REST request the message : {} to send to Kafka topic ", message); streamBridge.send(PRODUCER_BINDING_NAME, message); } diff --git a/generators/spring-cloud-stream/templates/src/main/java/_package_/web/rest/KafkaResource_reactive.java.ejs b/generators/spring-cloud-stream/templates/src/main/java/_package_/web/rest/KafkaResource_reactive.java.ejs index d64810a1d91a..9fce06abcdeb 100644 --- a/generators/spring-cloud-stream/templates/src/main/java/_package_/web/rest/KafkaResource_reactive.java.ejs +++ b/generators/spring-cloud-stream/templates/src/main/java/_package_/web/rest/KafkaResource_reactive.java.ejs @@ -44,7 +44,7 @@ public class <%= upperFirstCamelCaseBaseName %>KafkaResource { } @PostMapping("/publish") - public Mono> publish(@RequestParam String message) { + public Mono> publish(@RequestParam("message") String message) { log.debug("REST request the message : {} to send to Kafka topic", message); streamBridge.send(PRODUCER_BINDING_NAME, message); return Mono.just(ResponseEntity.noContent().build()); From e124a66db6b277bab18e7cc4fa98cde0da9d2ddb Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Mon, 20 Nov 2023 20:43:01 -0700 Subject: [PATCH 11/59] name and value parameters are aliases of each other; remove name --- .../_entityPackage_/web/rest/_entityClass_Resource.java.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generators/server/templates/src/main/java/_package_/_entityPackage_/web/rest/_entityClass_Resource.java.ejs b/generators/server/templates/src/main/java/_package_/_entityPackage_/web/rest/_entityClass_Resource.java.ejs index 5cccaad4fdda..b07673564c9b 100644 --- a/generators/server/templates/src/main/java/_package_/_entityPackage_/web/rest/_entityClass_Resource.java.ejs +++ b/generators/server/templates/src/main/java/_package_/_entityPackage_/web/rest/_entityClass_Resource.java.ejs @@ -219,7 +219,7 @@ public class <%= entityClass %>Resource { */ @PutMapping("/{<%= primaryKey.name %>}") public <% if (reactive) { %>Mono<<% } %>ResponseEntity<<%= instanceType %>><% if (reactive) { %>><% } %> update<%= entityClass %>( - @PathVariable(name = "<%= primaryKey.name %>", value = "<%= primaryKey.name %>", required = false) final <%= primaryKey.type %> <%= primaryKey.name %>, + @PathVariable(value = "<%= primaryKey.name %>", required = false) final <%= primaryKey.type %> <%= primaryKey.name %>, <% if (anyPropertyHasValidation) { %>@Valid <% } %>@RequestBody <%= instanceType %> <%= instanceName %> ) throws URISyntaxException { log.debug("REST request to update <%= entityClass %> : {}, {}", <%= primaryKey.name %>, <%= instanceName %>); @@ -285,7 +285,7 @@ public class <%= entityClass %>Resource { */ @PatchMapping(value = "/{<%= primaryKey.name %>}", consumes = {"application/json", "application/merge-patch+json"}) public <% if (reactive) { %>Mono<<% } %>ResponseEntity<<%= instanceType %>><% if (reactive) { %>><% } %> partialUpdate<%= entityClass %>( - @PathVariable(name = "<%= primaryKey.name %>", value = "<%= primaryKey.name %>", required = false) final <%= primaryKey.type %> <%= primaryKey.name %>, + @PathVariable(value = "<%= primaryKey.name %>", required = false) final <%= primaryKey.type %> <%= primaryKey.name %>, <% if (anyPropertyHasValidation) { %>@NotNull <% } %>@RequestBody <%= instanceType %> <%= instanceName %>) throws URISyntaxException { log.debug("REST request to partial update <%= entityClass %> partially : {}, {}", <%= primaryKey.name %>, <%= instanceName %>); if (<%= instanceName %>.get<%= primaryKey.nameCapitalized %>() == null) { From e2d7e7167059a796564c0e930859974ebe27ba4d Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Mon, 20 Nov 2023 21:17:49 -0700 Subject: [PATCH 12/59] Update property name for Spring Boot 3.2 --- .../templates/src/main/resources/config/application.yml.ejs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generators/server/templates/src/main/resources/config/application.yml.ejs b/generators/server/templates/src/main/resources/config/application.yml.ejs index d8e555407e0f..3b8caef16070 100644 --- a/generators/server/templates/src/main/resources/config/application.yml.ejs +++ b/generators/server/templates/src/main/resources/config/application.yml.ejs @@ -142,6 +142,9 @@ management: export: enabled: true step: 60 + observations: + key-values: + application: ${spring.application.name} metrics: enable: http: true @@ -154,8 +157,6 @@ management: all: true percentiles: all: 0, 0.5, 0.75, 0.95, 0.99, 1.0 - tags: - application: ${spring.application.name} data: repository: autotime: From e7fcd7df348135adeb37baa24d4d87a6b915b578 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Mon, 20 Nov 2023 23:09:04 -0700 Subject: [PATCH 13/59] Change from deprecated UriComponentsBuilder.fromHttpRequest() to ForwardedHeaderUtils.adaptFromForwardedHeaders(request.getURI(), request.getHeaders()) --- .../_partials_entity_/get_all_template.ejs | 10 +++++----- .../_partials_entity_/search_template.ejs | 4 ++-- .../web/rest/_entityClass_Resource.java.ejs | 2 +- .../_package_/web/rest/PublicUserResource.java.ejs | 4 ++-- .../main/java/_package_/web/rest/UserResource.java.ejs | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/generators/server/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/get_all_template.ejs b/generators/server/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/get_all_template.ejs index 7e62f0d21310..7fd4880851e2 100644 --- a/generators/server/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/get_all_template.ejs +++ b/generators/server/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/get_all_template.ejs @@ -35,7 +35,7 @@ _%> return ResponseEntity.ok().body(entityList); <%_ } else { _%> Page<<%= instanceType %>> page = <%= entityInstance %>QueryService.findByCriteria(criteria, pageable); - HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(<% if (!reactive) { %>ServletUriComponentsBuilder.fromCurrentRequest()<% } else { %>UriComponentsBuilder.fromHttpRequest(request)<% } %>, page); + HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(<% if (!reactive) { %>ServletUriComponentsBuilder.fromCurrentRequest()<% } else { %>ForwardedHeaderUtils.adaptFromForwardedHeaders(request.getURI(), request.getHeaders())<% } %>, page); return ResponseEntity.ok().headers(headers).body(page.getContent()); <%_ } _%> <%_ } else { _%> @@ -47,7 +47,7 @@ _%> ResponseEntity.ok() .headers( PaginationUtil.generatePaginationHttpHeaders( - UriComponentsBuilder.fromHttpRequest(request), + ForwardedHeaderUtils.adaptFromForwardedHeaders(request.getURI(), request.getHeaders()), new PageImpl<>(countWithEntities.getT2(), pageable, countWithEntities.getT1()) ) ).body(countWithEntities.getT2()) @@ -104,7 +104,7 @@ _%> ResponseEntity.ok() .headers( PaginationUtil.generatePaginationHttpHeaders( - UriComponentsBuilder.fromHttpRequest(request), + ForwardedHeaderUtils.adaptFromForwardedHeaders(request.getURI(), request.getHeaders()), new PageImpl<>(countWithEntities.getT2(), pageable, countWithEntities.getT1()) ) ).body(countWithEntities.getT2()) @@ -117,10 +117,10 @@ _%> } else { page = <%= entityInstance %><%= viaService ? 'Service' : 'Repository' %>.findAll(pageable)<%= reactiveEntityToDto %>; } - HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(<% if (reactive) { %>UriComponentsBuilder.fromHttpRequest(request)<% } else { %>ServletUriComponentsBuilder.fromCurrentRequest()<% } %>, page); + HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(<% if (reactive) { %>ForwardedHeaderUtils.adaptFromForwardedHeaders(request.getURI(), request.getHeaders())<% } else { %>ServletUriComponentsBuilder.fromCurrentRequest()<% } %>, page); <%_ } else { _%> Page<<%= instanceType %>> page = <%= entityInstance %><%= viaService ? 'Service' : 'Repository' %>.findAll(pageable)<%= reactiveEntityToDto %>; - HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(<% if (reactive) { %>UriComponentsBuilder.fromHttpRequest(request)<% } else { %>ServletUriComponentsBuilder.fromCurrentRequest()<% } %>, page); + HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(<% if (reactive) { %>ForwardedHeaderUtils.adaptFromForwardedHeaders(request.getURI(), request.getHeaders())<% } else { %>ServletUriComponentsBuilder.fromCurrentRequest()<% } %>, page); <%_ } _%> return ResponseEntity.ok().headers(headers).body(page.getContent()); <%_ } _%> diff --git a/generators/server/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/search_template.ejs b/generators/server/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/search_template.ejs index 5b5b273223ff..0247bfecd8b4 100644 --- a/generators/server/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/search_template.ejs +++ b/generators/server/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/search_template.ejs @@ -34,7 +34,7 @@ if (paginationNo) { %> 'Service.' + (searchEngineElasticsearch ? 'searchCount' : 'countAll') : (searchEngineElasticsearch ? 'Search' : '') + 'Repository.count' %>() .map(total -> new PageImpl<>(new ArrayList<>(), pageable, total)) - .map(page -> PaginationUtil.generatePaginationHttpHeaders(UriComponentsBuilder.fromHttpRequest(request), page)) + .map(page -> PaginationUtil.generatePaginationHttpHeaders(ForwardedHeaderUtils.adaptFromForwardedHeaders(request.getURI(), request.getHeaders()), page)) .map(headers -> ResponseEntity.ok().headers(headers).body(<%= entityInstance %><%= viaService ? 'Service' : (searchEngineElasticsearch ? 'Search' : '') + 'Repository' %>.search(query, pageable)<% if (!viaService && dtoMapstruct) { %>.map(<%= entityToDtoReference %>)<% } %>)); <%_ } else { _%> try { @@ -43,7 +43,7 @@ if (paginationNo) { %> <%_ } else { _%> Page<<%= persistClass %>> page = <%= entityInstance %><% if (searchEngineElasticsearch) { %>Search<% } %>Repository.search(query, pageable); <%_ } _%> - HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(<% if (reactive) { %>UriComponentsBuilder.fromHttpRequest(request)<% } else { %>ServletUriComponentsBuilder.fromCurrentRequest()<% } %>, page); + HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(<% if (reactive) { %>ForwardedHeaderUtils.adaptFromForwardedHeaders(request.getURI(), request.getHeaders())<% } else { %>ServletUriComponentsBuilder.fromCurrentRequest()<% } %>, page); return ResponseEntity.ok().headers(headers).body(<% if (!viaService && dtoMapstruct) { %><%= entityListToDtoListReference %>(<% } %>page.getContent()<% if (!viaService && dtoMapstruct) { %>)<% } %>); } catch (RuntimeException e) { <% if (searchEngineElasticsearch) { %> diff --git a/generators/server/templates/src/main/java/_package_/_entityPackage_/web/rest/_entityClass_Resource.java.ejs b/generators/server/templates/src/main/java/_package_/_entityPackage_/web/rest/_entityClass_Resource.java.ejs index b07673564c9b..165af1ab2318 100644 --- a/generators/server/templates/src/main/java/_package_/_entityPackage_/web/rest/_entityClass_Resource.java.ejs +++ b/generators/server/templates/src/main/java/_package_/_entityPackage_/web/rest/_entityClass_Resource.java.ejs @@ -74,7 +74,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.server.reactive.ServerHttpRequest; <%_ } _%> <%_ if (reactive) { _%> -import org.springframework.web.util.UriComponentsBuilder; +import org.springframework.web.util.ForwardedHeaderUtils; <%_ } else { _%> import org.springframework.web.servlet.support.ServletUriComponentsBuilder; <%_ } _%> diff --git a/generators/server/templates/src/main/java/_package_/web/rest/PublicUserResource.java.ejs b/generators/server/templates/src/main/java/_package_/web/rest/PublicUserResource.java.ejs index 89c78de4b915..59d322e29cc8 100644 --- a/generators/server/templates/src/main/java/_package_/web/rest/PublicUserResource.java.ejs +++ b/generators/server/templates/src/main/java/_package_/web/rest/PublicUserResource.java.ejs @@ -59,7 +59,7 @@ import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.web.bind.annotation.*; <%_ if (reactive) { _%> import org.springframework.web.server.ResponseStatusException; -import org.springframework.web.util.UriComponentsBuilder; +import org.springframework.web.util.ForwardedHeaderUtils; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; <%_ } else {_%> @@ -133,7 +133,7 @@ public class PublicUserResource { return userService.countManagedUsers() .map(total -> new PageImpl<>(new ArrayList<>(), pageable, total)) - .map(page -> PaginationUtil.generatePaginationHttpHeaders(UriComponentsBuilder.fromHttpRequest(request), page)) + .map(page -> PaginationUtil.generatePaginationHttpHeaders(ForwardedHeaderUtils.adaptFromForwardedHeaders(request.getURI(), request.getHeaders()), page)) .map(headers -> ResponseEntity.ok().headers(headers).body(userService.getAllPublicUsers(pageable))); } <%_ } else { _%> diff --git a/generators/server/templates/src/main/java/_package_/web/rest/UserResource.java.ejs b/generators/server/templates/src/main/java/_package_/web/rest/UserResource.java.ejs index 93b20d33ef25..ce53ec7899b2 100644 --- a/generators/server/templates/src/main/java/_package_/web/rest/UserResource.java.ejs +++ b/generators/server/templates/src/main/java/_package_/web/rest/UserResource.java.ejs @@ -62,7 +62,7 @@ import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; <%_ if (reactive) { _%> import org.springframework.web.server.ResponseStatusException; -import org.springframework.web.util.UriComponentsBuilder; +import org.springframework.web.util.ForwardedHeaderUtils; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; <%_ } else { _%> @@ -270,7 +270,7 @@ public class UserResource { return userService.countManagedUsers() .map(total -> new PageImpl<>(new ArrayList<>(), pageable, total)) - .map(page -> PaginationUtil.generatePaginationHttpHeaders(UriComponentsBuilder.fromHttpRequest(request), page)) + .map(page -> PaginationUtil.generatePaginationHttpHeaders(ForwardedHeaderUtils.adaptFromForwardedHeaders(request.getURI(), request.getHeaders()), page)) .map(headers -> ResponseEntity.ok().headers(headers).body(userService.getAllManagedUsers(pageable))); <%_ } else { _%> public ResponseEntity>> getAllUsers(@org.springdoc.core.annotations.ParameterObject Pageable pageable) { From 5b394908d61a7c4628355c5276f5ed25e1087f40 Mon Sep 17 00:00:00 2001 From: DanielFran Date: Thu, 23 Nov 2023 17:52:35 +0000 Subject: [PATCH 14/59] Update spring-boot version to 3.2.0 --- generators/generator-constants.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/generator-constants.mjs b/generators/generator-constants.mjs index d057d5a2ba7b..011973fbda98 100644 --- a/generators/generator-constants.mjs +++ b/generators/generator-constants.mjs @@ -36,7 +36,7 @@ export const javaDependencies = { /** * spring-boot version should match the one managed by https://mvnrepository.com/artifact/tech.jhipster/jhipster-dependencies/JHIPSTER_DEPENDENCIES_VERSION */ - 'spring-boot': '3.2.0-RC2', + 'spring-boot': '3.2.0', /* * hibernate version should match the one managed by https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/SPRING_BOOT_VERSION * Required due to hibernate-jpamodelgen annotation processor. From f7a49b37aa1d6a65bd7098c4e69824e2744966a4 Mon Sep 17 00:00:00 2001 From: DanielFran Date: Thu, 23 Nov 2023 17:54:05 +0000 Subject: [PATCH 15/59] Update hibernate version to 6.3.1.Final --- generators/generator-constants.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/generator-constants.mjs b/generators/generator-constants.mjs index 011973fbda98..3d448ad29c6a 100644 --- a/generators/generator-constants.mjs +++ b/generators/generator-constants.mjs @@ -41,7 +41,7 @@ export const javaDependencies = { * hibernate version should match the one managed by https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/SPRING_BOOT_VERSION * Required due to hibernate-jpamodelgen annotation processor. */ - hibernate: '6.2.13.Final', + hibernate: '6.3.1.Final', /* * cassandra driver version should match the one managed by https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/SPRING_BOOT_VERSION * Required due to java-driver-mapper-processor annotation processor. From 7268b2d4c6dce79fda9a797875882113c21937ee Mon Sep 17 00:00:00 2001 From: DanielFran Date: Thu, 23 Nov 2023 17:56:32 +0000 Subject: [PATCH 16/59] Update cassandra driver version to 4.17.0 --- generators/generator-constants.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/generator-constants.mjs b/generators/generator-constants.mjs index 3d448ad29c6a..a0b3757fa3a8 100644 --- a/generators/generator-constants.mjs +++ b/generators/generator-constants.mjs @@ -46,7 +46,7 @@ export const javaDependencies = { * cassandra driver version should match the one managed by https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/SPRING_BOOT_VERSION * Required due to java-driver-mapper-processor annotation processor. */ - cassandra: '4.15.0', + cassandra: '4.17.0', }; Object.freeze(javaDependencies); From b751e0eceefd537268e56b86646e9a75fbdce45f Mon Sep 17 00:00:00 2001 From: DanielFran Date: Thu, 23 Nov 2023 17:58:45 +0000 Subject: [PATCH 17/59] Update elasticsearch client version to 8.10.4 --- generators/generator-constants.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/generator-constants.mjs b/generators/generator-constants.mjs index a0b3757fa3a8..c034211da40b 100644 --- a/generators/generator-constants.mjs +++ b/generators/generator-constants.mjs @@ -51,7 +51,7 @@ export const javaDependencies = { Object.freeze(javaDependencies); // The version should be coherent with the one from spring-data-elasticsearch project -export const ELASTICSEARCH_TAG = '8.7.1'; +export const ELASTICSEARCH_TAG = '8.10.4'; export const ELASTICSEARCH_IMAGE = 'docker.elastic.co/elasticsearch/elasticsearch'; /** From bf69ae16d97b70d998354de2f33f46d2adb38023 Mon Sep 17 00:00:00 2001 From: DanielFran Date: Thu, 23 Nov 2023 18:00:29 +0000 Subject: [PATCH 18/59] Update jhipster-bom version to 8.1.0-SNAPSHOT --- generators/generator-constants.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/generator-constants.mjs b/generators/generator-constants.mjs index c034211da40b..f2331880a731 100644 --- a/generators/generator-constants.mjs +++ b/generators/generator-constants.mjs @@ -18,7 +18,7 @@ */ export const BLUEPRINT_API_VERSION = 'jhipster-8'; // jhipster-bom version -export const JHIPSTER_DEPENDENCIES_VERSION = '8.0.1-SNAPSHOT'; +export const JHIPSTER_DEPENDENCIES_VERSION = '8.1.0-SNAPSHOT'; // Version of Java export const JAVA_VERSION = '17'; export const JAVA_COMPATIBLE_VERSIONS = ['17', '18', '19', '20', '21']; From 8b8f498f3aa3d9bac7f2964479a75679ae14a2e5 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Sat, 25 Nov 2023 16:04:19 -0700 Subject: [PATCH 19/59] Try Hibernate 6.4.0.Final --- generators/generator-constants.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/generator-constants.mjs b/generators/generator-constants.mjs index f2331880a731..68cc975b33bb 100644 --- a/generators/generator-constants.mjs +++ b/generators/generator-constants.mjs @@ -41,7 +41,7 @@ export const javaDependencies = { * hibernate version should match the one managed by https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/SPRING_BOOT_VERSION * Required due to hibernate-jpamodelgen annotation processor. */ - hibernate: '6.3.1.Final', + hibernate: '6.4.0.Final', /* * cassandra driver version should match the one managed by https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/SPRING_BOOT_VERSION * Required due to java-driver-mapper-processor annotation processor. From 2d669964f38edb6b0eca1677b454e0240bb17984 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Sat, 25 Nov 2023 18:05:15 -0700 Subject: [PATCH 20/59] Change back to Hibernate 6.3.1.Final --- generators/generator-constants.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/generator-constants.mjs b/generators/generator-constants.mjs index 68cc975b33bb..f2331880a731 100644 --- a/generators/generator-constants.mjs +++ b/generators/generator-constants.mjs @@ -41,7 +41,7 @@ export const javaDependencies = { * hibernate version should match the one managed by https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/SPRING_BOOT_VERSION * Required due to hibernate-jpamodelgen annotation processor. */ - hibernate: '6.4.0.Final', + hibernate: '6.3.1.Final', /* * cassandra driver version should match the one managed by https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/SPRING_BOOT_VERSION * Required due to java-driver-mapper-processor annotation processor. From 748b7d70b8fbc5efef59415b2965d8992a851d8c Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Sun, 26 Nov 2023 10:12:55 -0700 Subject: [PATCH 21/59] Change Infinispan dependency to infinispan-hibernate-cache-v62 for Hibernate 6.3 --- generators/spring-cache/internal/dependencies.mts | 2 +- generators/spring-cache/templates/gradle/cache.gradle.ejs | 2 +- .../java/_package_/config/CacheFactoryConfiguration.java.ejs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generators/spring-cache/internal/dependencies.mts b/generators/spring-cache/internal/dependencies.mts index 5fd27faf107c..4604291152f8 100644 --- a/generators/spring-cache/internal/dependencies.mts +++ b/generators/spring-cache/internal/dependencies.mts @@ -151,7 +151,7 @@ export const getCacheProviderMavenDefinition: ( javaxCacheApi, { groupId: 'org.infinispan', - artifactId: 'infinispan-hibernate-cache-v60', + artifactId: 'infinispan-hibernate-cache-v62', }, { groupId: 'org.infinispan', diff --git a/generators/spring-cache/templates/gradle/cache.gradle.ejs b/generators/spring-cache/templates/gradle/cache.gradle.ejs index 0eef67f70f84..f9ba0a1b68c4 100644 --- a/generators/spring-cache/templates/gradle/cache.gradle.ejs +++ b/generators/spring-cache/templates/gradle/cache.gradle.ejs @@ -24,7 +24,7 @@ dependencies { implementation "com.hazelcast:hazelcast-spring:${hazelcastSpringVersion}" <%_ } _%> <%_ if (cacheProviderInfinispan) { _%> - implementation "org.infinispan:infinispan-hibernate-cache-v60" + implementation "org.infinispan:infinispan-hibernate-cache-v62" implementation "org.infinispan:infinispan-spring-boot3-starter-embedded" implementation "org.infinispan:infinispan-commons-jakarta" implementation "org.infinispan:infinispan-core-jakarta" diff --git a/generators/spring-cache/templates/src/main/java/_package_/config/CacheFactoryConfiguration.java.ejs b/generators/spring-cache/templates/src/main/java/_package_/config/CacheFactoryConfiguration.java.ejs index 38ccc6178d25..38ccf02535bf 100644 --- a/generators/spring-cache/templates/src/main/java/_package_/config/CacheFactoryConfiguration.java.ejs +++ b/generators/spring-cache/templates/src/main/java/_package_/config/CacheFactoryConfiguration.java.ejs @@ -19,7 +19,7 @@ package <%= packageName %>.config; import org.hibernate.service.ServiceRegistry; -import org.infinispan.hibernate.cache.v60.InfinispanRegionFactory; +import org.infinispan.hibernate.cache.v62.InfinispanRegionFactory; import org.infinispan.manager.EmbeddedCacheManager; import org.springframework.stereotype.Component; From 0f2f2d68a4a37661ff4d47d80ece7ed6ec8def0c Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Sun, 26 Nov 2023 10:22:24 -0700 Subject: [PATCH 22/59] Update snapshots --- generators/spring-cache/__snapshots__/generator.spec.mts.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/spring-cache/__snapshots__/generator.spec.mts.snap b/generators/spring-cache/__snapshots__/generator.spec.mts.snap index 048710ae3320..84780a4a82d2 100644 --- a/generators/spring-cache/__snapshots__/generator.spec.mts.snap +++ b/generators/spring-cache/__snapshots__/generator.spec.mts.snap @@ -287,7 +287,7 @@ exports[`generator - spring-cache infinispan-maven should match source calls 1`] "groupId": "javax.cache", }, { - "artifactId": "infinispan-hibernate-cache-v60", + "artifactId": "infinispan-hibernate-cache-v62", "groupId": "org.infinispan", }, { From ab9fa67b00faf67884506a915807281952401ef1 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Mon, 27 Nov 2023 10:08:29 -0700 Subject: [PATCH 23/59] Use `claims['sub']` for principal expression with JWT authentication --- .../_entityPackage_/repository/_entityClass_Repository.java.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/server/templates/src/main/java/_package_/_entityPackage_/repository/_entityClass_Repository.java.ejs b/generators/server/templates/src/main/java/_package_/_entityPackage_/repository/_entityClass_Repository.java.ejs index 22b280f89da3..7e310841a8a2 100644 --- a/generators/server/templates/src/main/java/_package_/_entityPackage_/repository/_entityClass_Repository.java.ejs +++ b/generators/server/templates/src/main/java/_package_/_entityPackage_/repository/_entityClass_Repository.java.ejs @@ -70,7 +70,7 @@ public interface <%= entityClass %>Repository extends <% if (containsBagRelation <%_ for (const relationship of relationships) { _%> <%_ if (relationship.relationshipManyToOne && relationship.otherEntityUser && databaseTypeSql) { _%> - @Query("select <%= entityInstanceDbSafe %> from <%= persistClass %> <%= entityInstanceDbSafe %> where <%= entityInstanceDbSafe %>.<%= relationship.relationshipFieldName %>.login = ?#{principal.<% if (authenticationTypeOauth2) { %>preferredUsername<% } else { %>username<% } %>}") + @Query("select <%= entityInstanceDbSafe %> from <%= persistClass %> <%= entityInstanceDbSafe %> where <%= entityInstanceDbSafe %>.<%= relationship.relationshipFieldName %>.login = ?#{principal.<% if (authenticationTypeOauth2) { %>preferredUsername<% } else if (authenticationTypeJwt) { %>claims['sub']<% } else { %>username<% } %>}") List<<%= persistClass %>> findBy<%= relationship.relationshipNameCapitalized %>IsCurrentUser(); <%_ } _%> <%_ } _%> From 021959093cc06e73e0f0d393a516664cdcc050c9 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Mon, 27 Nov 2023 19:18:07 -0700 Subject: [PATCH 24/59] Revert using `claims['sub'] for principal expression with JWT authentication --- .../_entityPackage_/repository/_entityClass_Repository.java.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/server/templates/src/main/java/_package_/_entityPackage_/repository/_entityClass_Repository.java.ejs b/generators/server/templates/src/main/java/_package_/_entityPackage_/repository/_entityClass_Repository.java.ejs index 7e310841a8a2..22b280f89da3 100644 --- a/generators/server/templates/src/main/java/_package_/_entityPackage_/repository/_entityClass_Repository.java.ejs +++ b/generators/server/templates/src/main/java/_package_/_entityPackage_/repository/_entityClass_Repository.java.ejs @@ -70,7 +70,7 @@ public interface <%= entityClass %>Repository extends <% if (containsBagRelation <%_ for (const relationship of relationships) { _%> <%_ if (relationship.relationshipManyToOne && relationship.otherEntityUser && databaseTypeSql) { _%> - @Query("select <%= entityInstanceDbSafe %> from <%= persistClass %> <%= entityInstanceDbSafe %> where <%= entityInstanceDbSafe %>.<%= relationship.relationshipFieldName %>.login = ?#{principal.<% if (authenticationTypeOauth2) { %>preferredUsername<% } else if (authenticationTypeJwt) { %>claims['sub']<% } else { %>username<% } %>}") + @Query("select <%= entityInstanceDbSafe %> from <%= persistClass %> <%= entityInstanceDbSafe %> where <%= entityInstanceDbSafe %>.<%= relationship.relationshipFieldName %>.login = ?#{principal.<% if (authenticationTypeOauth2) { %>preferredUsername<% } else { %>username<% } %>}") List<<%= persistClass %>> findBy<%= relationship.relationshipNameCapitalized %>IsCurrentUser(); <%_ } _%> <%_ } _%> From 54a3db294c6393c1eed190a979a00c606f6a8f0b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 23:39:30 +0000 Subject: [PATCH 25/59] build(deps): bump the typescript-eslint group with 2 updates Bumps the typescript-eslint group with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 6.13.1 to 6.13.2 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.13.2/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 6.13.1 to 6.13.2 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.13.2/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: typescript-eslint - dependency-name: "@typescript-eslint/parser" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: typescript-eslint ... Signed-off-by: dependabot[bot] --- package-lock.json | 90 +++++++++++++++++++++++------------------------ package.json | 4 +-- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2893258db75a..d24f01172b10 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,8 +13,8 @@ "@iarna/toml": "3.0.0", "@types/ejs": "3.1.5", "@types/lodash": "4.14.202", - "@typescript-eslint/eslint-plugin": "6.13.1", - "@typescript-eslint/parser": "6.13.1", + "@typescript-eslint/eslint-plugin": "6.13.2", + "@typescript-eslint/parser": "6.13.2", "@yeoman/adapter": "1.4.0", "@yeoman/conflicter": "2.0.0", "@yeoman/namespace": "1.0.0", @@ -3330,15 +3330,15 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.13.1.tgz", - "integrity": "sha512-5bQDGkXaxD46bPvQt08BUz9YSaO4S0fB1LB5JHQuXTfkGPI3+UUeS387C/e9jRie5GqT8u5kFTrMvAjtX4O5kA==", + "version": "6.13.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.13.2.tgz", + "integrity": "sha512-3+9OGAWHhk4O1LlcwLBONbdXsAhLjyCFogJY/cWy2lxdVJ2JrcTF2pTGMaLl2AE7U1l31n8Py4a8bx5DLf/0dQ==", "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.13.1", - "@typescript-eslint/type-utils": "6.13.1", - "@typescript-eslint/utils": "6.13.1", - "@typescript-eslint/visitor-keys": "6.13.1", + "@typescript-eslint/scope-manager": "6.13.2", + "@typescript-eslint/type-utils": "6.13.2", + "@typescript-eslint/utils": "6.13.2", + "@typescript-eslint/visitor-keys": "6.13.2", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -3364,14 +3364,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.13.1.tgz", - "integrity": "sha512-fs2XOhWCzRhqMmQf0eicLa/CWSaYss2feXsy7xBD/pLyWke/jCIVc2s1ikEAtSW7ina1HNhv7kONoEfVNEcdDQ==", - "dependencies": { - "@typescript-eslint/scope-manager": "6.13.1", - "@typescript-eslint/types": "6.13.1", - "@typescript-eslint/typescript-estree": "6.13.1", - "@typescript-eslint/visitor-keys": "6.13.1", + "version": "6.13.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.13.2.tgz", + "integrity": "sha512-MUkcC+7Wt/QOGeVlM8aGGJZy1XV5YKjTpq9jK6r6/iLsGXhBVaGP5N0UYvFsu9BFlSpwY9kMretzdBH01rkRXg==", + "dependencies": { + "@typescript-eslint/scope-manager": "6.13.2", + "@typescript-eslint/types": "6.13.2", + "@typescript-eslint/typescript-estree": "6.13.2", + "@typescript-eslint/visitor-keys": "6.13.2", "debug": "^4.3.4" }, "engines": { @@ -3391,12 +3391,12 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.13.1.tgz", - "integrity": "sha512-BW0kJ7ceiKi56GbT2KKzZzN+nDxzQK2DS6x0PiSMPjciPgd/JRQGMibyaN2cPt2cAvuoH0oNvn2fwonHI+4QUQ==", + "version": "6.13.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.13.2.tgz", + "integrity": "sha512-CXQA0xo7z6x13FeDYCgBkjWzNqzBn8RXaE3QVQVIUm74fWJLkJkaHmHdKStrxQllGh6Q4eUGyNpMe0b1hMkXFA==", "dependencies": { - "@typescript-eslint/types": "6.13.1", - "@typescript-eslint/visitor-keys": "6.13.1" + "@typescript-eslint/types": "6.13.2", + "@typescript-eslint/visitor-keys": "6.13.2" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -3407,12 +3407,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.13.1.tgz", - "integrity": "sha512-A2qPlgpxx2v//3meMqQyB1qqTg1h1dJvzca7TugM3Yc2USDY+fsRBiojAEo92HO7f5hW5mjAUF6qobOPzlBCBQ==", + "version": "6.13.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.13.2.tgz", + "integrity": "sha512-Qr6ssS1GFongzH2qfnWKkAQmMUyZSyOr0W54nZNU1MDfo+U4Mv3XveeLZzadc/yq8iYhQZHYT+eoXJqnACM1tw==", "dependencies": { - "@typescript-eslint/typescript-estree": "6.13.1", - "@typescript-eslint/utils": "6.13.1", + "@typescript-eslint/typescript-estree": "6.13.2", + "@typescript-eslint/utils": "6.13.2", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -3433,9 +3433,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.1.tgz", - "integrity": "sha512-gjeEskSmiEKKFIbnhDXUyiqVma1gRCQNbVZ1C8q7Zjcxh3WZMbzWVfGE9rHfWd1msQtPS0BVD9Jz9jded44eKg==", + "version": "6.13.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.2.tgz", + "integrity": "sha512-7sxbQ+EMRubQc3wTfTsycgYpSujyVbI1xw+3UMRUcrhSy+pN09y/lWzeKDbvhoqcRbHdc+APLs/PWYi/cisLPg==", "engines": { "node": "^16.0.0 || >=18.0.0" }, @@ -3445,12 +3445,12 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.1.tgz", - "integrity": "sha512-sBLQsvOC0Q7LGcUHO5qpG1HxRgePbT6wwqOiGLpR8uOJvPJbfs0mW3jPA3ujsDvfiVwVlWUDESNXv44KtINkUQ==", + "version": "6.13.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.2.tgz", + "integrity": "sha512-SuD8YLQv6WHnOEtKv8D6HZUzOub855cfPnPMKvdM/Bh1plv1f7Q/0iFUDLKKlxHcEstQnaUU4QZskgQq74t+3w==", "dependencies": { - "@typescript-eslint/types": "6.13.1", - "@typescript-eslint/visitor-keys": "6.13.1", + "@typescript-eslint/types": "6.13.2", + "@typescript-eslint/visitor-keys": "6.13.2", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -3471,16 +3471,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.13.1.tgz", - "integrity": "sha512-ouPn/zVoan92JgAegesTXDB/oUp6BP1v8WpfYcqh649ejNc9Qv+B4FF2Ff626kO1xg0wWwwG48lAJ4JuesgdOw==", + "version": "6.13.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.13.2.tgz", + "integrity": "sha512-b9Ptq4eAZUym4idijCRzl61oPCwwREcfDI8xGk751Vhzig5fFZR9CyzDz4Sp/nxSLBYxUPyh4QdIDqWykFhNmQ==", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.13.1", - "@typescript-eslint/types": "6.13.1", - "@typescript-eslint/typescript-estree": "6.13.1", + "@typescript-eslint/scope-manager": "6.13.2", + "@typescript-eslint/types": "6.13.2", + "@typescript-eslint/typescript-estree": "6.13.2", "semver": "^7.5.4" }, "engines": { @@ -3495,11 +3495,11 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.1.tgz", - "integrity": "sha512-NDhQUy2tg6XGNBGDRm1XybOHSia8mcXmlbKWoQP+nm1BIIMxa55shyJfZkHpEBN62KNPLrocSM2PdPcaLgDKMQ==", + "version": "6.13.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.2.tgz", + "integrity": "sha512-OGznFs0eAQXJsp+xSd6k/O1UbFi/K/L7WjqeRoFE7vadjAF9y0uppXhYNQNEqygjou782maGClOoZwPqF0Drlw==", "dependencies": { - "@typescript-eslint/types": "6.13.1", + "@typescript-eslint/types": "6.13.2", "eslint-visitor-keys": "^3.4.1" }, "engines": { diff --git a/package.json b/package.json index bda1fd27e33d..847f1f4187a3 100644 --- a/package.json +++ b/package.json @@ -107,8 +107,8 @@ "@iarna/toml": "3.0.0", "@types/ejs": "3.1.5", "@types/lodash": "4.14.202", - "@typescript-eslint/eslint-plugin": "6.13.1", - "@typescript-eslint/parser": "6.13.1", + "@typescript-eslint/eslint-plugin": "6.13.2", + "@typescript-eslint/parser": "6.13.2", "@yeoman/adapter": "1.4.0", "@yeoman/conflicter": "2.0.0", "@yeoman/namespace": "1.0.0", From 134415b41a9271d2bed6e768d755124025305e15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 23:40:08 +0000 Subject: [PATCH 26/59] build(deps): bump type-fest from 4.8.2 to 4.8.3 Bumps [type-fest](https://github.com/sindresorhus/type-fest) from 4.8.2 to 4.8.3. - [Release notes](https://github.com/sindresorhus/type-fest/releases) - [Commits](https://github.com/sindresorhus/type-fest/compare/v4.8.2...v4.8.3) --- updated-dependencies: - dependency-name: type-fest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index d24f01172b10..41d93e024973 100644 --- a/package-lock.json +++ b/package-lock.json @@ -61,7 +61,7 @@ "run-async": "3.0.0", "semver": "7.5.4", "simple-git": "3.21.0", - "type-fest": "4.8.2", + "type-fest": "4.8.3", "uuid": "9.0.1", "winston": "3.11.0", "yaml": "2.3.4", @@ -14589,9 +14589,9 @@ } }, "node_modules/type-fest": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.8.2.tgz", - "integrity": "sha512-mcvrCjixA5166hSrUoJgGb9gBQN4loMYyj9zxuMs/66ibHNEFd5JXMw37YVDx58L4/QID9jIzdTBB4mDwDJ6KQ==", + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.8.3.tgz", + "integrity": "sha512-//BaTm14Q/gHBn09xlnKNqfI8t6bmdzx2DXYfPBNofN0WUybCEUDcbCWcTa0oF09lzLjZgPphXAsvRiMK0V6Bw==", "engines": { "node": ">=16" }, diff --git a/package.json b/package.json index 847f1f4187a3..5d81d7a62f54 100644 --- a/package.json +++ b/package.json @@ -155,7 +155,7 @@ "run-async": "3.0.0", "semver": "7.5.4", "simple-git": "3.21.0", - "type-fest": "4.8.2", + "type-fest": "4.8.3", "uuid": "9.0.1", "winston": "3.11.0", "yaml": "2.3.4", From 5d19520992b81b4162a48031b7f9bba751f7214c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 23:40:43 +0000 Subject: [PATCH 27/59] build(deps-dev): bump eslint-config-prettier from 9.0.0 to 9.1.0 Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 9.0.0 to 9.1.0. - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v9.0.0...v9.1.0) --- updated-dependencies: - dependency-name: eslint-config-prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 41d93e024973..14d01e47b98b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -86,7 +86,7 @@ "cpy-cli": "5.0.0", "ejs-lint": "2.0.0", "eslint-config-airbnb-base": "15.0.0", - "eslint-config-prettier": "9.0.0", + "eslint-config-prettier": "9.1.0", "eslint-plugin-chai-friendly": "0.7.2", "eslint-plugin-mocha": "10.2.0", "eslint-plugin-prettier": "5.0.1", @@ -6023,9 +6023,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", - "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" diff --git a/package.json b/package.json index 5d81d7a62f54..59739aab057e 100644 --- a/package.json +++ b/package.json @@ -177,7 +177,7 @@ "cpy-cli": "5.0.0", "ejs-lint": "2.0.0", "eslint-config-airbnb-base": "15.0.0", - "eslint-config-prettier": "9.0.0", + "eslint-config-prettier": "9.1.0", "eslint-plugin-chai-friendly": "0.7.2", "eslint-plugin-mocha": "10.2.0", "eslint-plugin-prettier": "5.0.1", From 081ff8119e7a4bafa9bb93cae2acbfed80a058ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 23:41:26 +0000 Subject: [PATCH 28/59] build(deps): bump prettier-plugin-packagejson from 2.4.6 to 2.4.7 Bumps [prettier-plugin-packagejson](https://github.com/matzkoh/prettier-plugin-packagejson) from 2.4.6 to 2.4.7. - [Release notes](https://github.com/matzkoh/prettier-plugin-packagejson/releases) - [Commits](https://github.com/matzkoh/prettier-plugin-packagejson/compare/v2.4.6...v2.4.7) --- updated-dependencies: - dependency-name: prettier-plugin-packagejson dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 26 +++++--------------------- package.json | 2 +- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index 14d01e47b98b..8b34c58ec6e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -54,7 +54,7 @@ "pluralize": "8.0.0", "prettier": "3.1.0", "prettier-plugin-java": "2.5.0", - "prettier-plugin-packagejson": "2.4.6", + "prettier-plugin-packagejson": "2.4.7", "prettier-plugin-properties": "0.3.0", "progress": "2.0.3", "randexp": "0.5.3", @@ -12389,12 +12389,12 @@ } }, "node_modules/prettier-plugin-packagejson": { - "version": "2.4.6", - "resolved": "https://registry.npmjs.org/prettier-plugin-packagejson/-/prettier-plugin-packagejson-2.4.6.tgz", - "integrity": "sha512-5JGfzkJRL0DLNyhwmiAV9mV0hZLHDwddFCs2lc9CNxOChpoWUQVe8K4qTMktmevmDlMpok2uT10nvHUyU59sNw==", + "version": "2.4.7", + "resolved": "https://registry.npmjs.org/prettier-plugin-packagejson/-/prettier-plugin-packagejson-2.4.7.tgz", + "integrity": "sha512-/n1HGcBbuJyTlD3tb2/tW1mT5WIR6FCo+bAijHF6pNoSBf8YoxoskawjSY2ku9/8d6mdzci7oMchziI7CYEWYg==", "dependencies": { "sort-package-json": "2.6.0", - "synckit": "0.8.5" + "synckit": "0.8.6" }, "peerDependencies": { "prettier": ">= 1.16.0" @@ -12405,21 +12405,6 @@ } } }, - "node_modules/prettier-plugin-packagejson/node_modules/synckit": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", - "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", - "dependencies": { - "@pkgr/utils": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, "node_modules/prettier-plugin-properties": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/prettier-plugin-properties/-/prettier-plugin-properties-0.3.0.tgz", @@ -14162,7 +14147,6 @@ "version": "0.8.6", "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.6.tgz", "integrity": "sha512-laHF2savN6sMeHCjLRkheIU4wo3Zg9Ln5YOjOo7sZ5dVQW8yF5pPE5SIw1dsPhq3TRp1jisKRCdPhfs/1WMqDA==", - "dev": true, "dependencies": { "@pkgr/utils": "^2.4.2", "tslib": "^2.6.2" diff --git a/package.json b/package.json index 59739aab057e..b4ce980dd07e 100644 --- a/package.json +++ b/package.json @@ -148,7 +148,7 @@ "pluralize": "8.0.0", "prettier": "3.1.0", "prettier-plugin-java": "2.5.0", - "prettier-plugin-packagejson": "2.4.6", + "prettier-plugin-packagejson": "2.4.7", "prettier-plugin-properties": "0.3.0", "progress": "2.0.3", "randexp": "0.5.3", From 4524125c441d6090eabe479d37f2b284e3e54070 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 23:42:08 +0000 Subject: [PATCH 29/59] build(deps-dev): bump @types/node from 18.19.1 to 18.19.2 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.19.1 to 18.19.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8b34c58ec6e6..51f4bd6fbd42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -78,7 +78,7 @@ "@types/glob": "npm:noist@1.0.0", "@types/minimatch": "npm:noist@1.0.0", "@types/mocha": "10.0.6", - "@types/node": "18.19.1", + "@types/node": "18.19.2", "@types/sinon-chai": "3.2.12", "chai": "4.3.10", "chokidar": "3.5.3", @@ -3244,9 +3244,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.19.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.1.tgz", - "integrity": "sha512-mZJ9V11gG5Vp0Ox2oERpeFDl+JvCwK24PGy76vVY/UgBtjwJWc5rYBThFxmbnYOm9UPZNm6wEl/sxHt2SU7x9A==", + "version": "18.19.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.2.tgz", + "integrity": "sha512-6wzfBdbWpe8QykUkXBjtmO3zITA0A3FIjoy+in0Y2K4KrCiRhNYJIdwAPDffZ3G6GnaKaSLSEa9ZuORLfEoiwg==", "dependencies": { "undici-types": "~5.26.4" } diff --git a/package.json b/package.json index b4ce980dd07e..8a260ba38fbd 100644 --- a/package.json +++ b/package.json @@ -169,7 +169,7 @@ "@types/glob": "npm:noist@1.0.0", "@types/minimatch": "npm:noist@1.0.0", "@types/mocha": "10.0.6", - "@types/node": "18.19.1", + "@types/node": "18.19.2", "@types/sinon-chai": "3.2.12", "chai": "4.3.10", "chokidar": "3.5.3", From 1559b2d6fc6b9d1506ccfd98d273f621c29fc803 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 01:10:18 +0000 Subject: [PATCH 30/59] build(deps-dev): bump the typescript-eslint group Bumps the typescript-eslint group in /generators/react/resources with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 6.13.1 to 6.13.2 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.13.2/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 6.13.1 to 6.13.2 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.13.2/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: typescript-eslint - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: typescript-eslint ... Signed-off-by: dependabot[bot] --- generators/react/resources/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generators/react/resources/package.json b/generators/react/resources/package.json index 3690681d5c97..9197e6c48cfd 100644 --- a/generators/react/resources/package.json +++ b/generators/react/resources/package.json @@ -37,8 +37,8 @@ "@types/react-redux": "7.1.31", "@types/redux": "3.6.31", "@types/webpack-env": "1.18.4", - "@typescript-eslint/eslint-plugin": "6.13.1", - "@typescript-eslint/parser": "6.13.1", + "@typescript-eslint/eslint-plugin": "6.13.2", + "@typescript-eslint/parser": "6.13.2", "autoprefixer": "10.4.16", "browser-sync": "2.29.3", "browser-sync-webpack-plugin": "2.3.0", From fb60af7ff8f12d331d95c87e47a31ba4e189ded7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 02:30:12 +0000 Subject: [PATCH 31/59] build(deps-dev): bump @types/react in /generators/react/resources Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.41 to 18.2.42. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- generators/react/resources/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/react/resources/package.json b/generators/react/resources/package.json index 9197e6c48cfd..0cd8f697b384 100644 --- a/generators/react/resources/package.json +++ b/generators/react/resources/package.json @@ -32,7 +32,7 @@ "@types/jest": "29.5.10", "@types/lodash": "4.14.202", "@types/node": "18.19.2", - "@types/react": "18.2.41", + "@types/react": "18.2.42", "@types/react-dom": "18.2.17", "@types/react-redux": "7.1.31", "@types/redux": "3.6.31", From 72c3effd8be281edf22f697f2e22086568612bac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 03:03:09 +0000 Subject: [PATCH 32/59] build(deps): bump vue from 3.3.9 to 3.3.10 in /generators/vue/resources Bumps [vue](https://github.com/vuejs/core) from 3.3.9 to 3.3.10. - [Release notes](https://github.com/vuejs/core/releases) - [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md) - [Commits](https://github.com/vuejs/core/compare/v3.3.9...v3.3.10) --- updated-dependencies: - dependency-name: vue dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- generators/vue/resources/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/vue/resources/package.json b/generators/vue/resources/package.json index f818a1a3183e..f1edea785558 100644 --- a/generators/vue/resources/package.json +++ b/generators/vue/resources/package.json @@ -13,7 +13,7 @@ "deepmerge": "4.3.1", "js-cookie": "3.0.5", "pinia": "2.1.7", - "vue": "3.3.9", + "vue": "3.3.10", "vue-i18n": "9.8.0", "vue-router": "4.2.5" }, From fde8a924fb88262ea231f9409eba8b28335f52d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 03:04:06 +0000 Subject: [PATCH 33/59] build(deps-dev): bump vite in /generators/vue/resources Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.4 to 5.0.5. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.0.5/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- generators/vue/resources/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/vue/resources/package.json b/generators/vue/resources/package.json index f1edea785558..45825f95592f 100644 --- a/generators/vue/resources/package.json +++ b/generators/vue/resources/package.json @@ -56,7 +56,7 @@ "terser-webpack-plugin": "5.3.9", "ts-loader": "9.5.1", "typescript": "5.3.2", - "vite": "5.0.4", + "vite": "5.0.5", "vitest": "0.34.6", "vitest-sonar-reporter": "0.5.0", "vue-loader": "17.3.1", From 5b4afd8f44335994b7a9139dde28a29a6d75bd5e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 03:41:45 +0000 Subject: [PATCH 34/59] build(deps-dev): bump vitest in /generators/vue/resources (#24472) Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 0.34.6 to 1.0.1. - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Commits](https://github.com/vitest-dev/vitest/commits/v1.0.1/packages/vitest) --- updated-dependencies: - dependency-name: vitest dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- generators/vue/resources/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/vue/resources/package.json b/generators/vue/resources/package.json index 45825f95592f..e628db7df976 100644 --- a/generators/vue/resources/package.json +++ b/generators/vue/resources/package.json @@ -57,7 +57,7 @@ "ts-loader": "9.5.1", "typescript": "5.3.2", "vite": "5.0.5", - "vitest": "0.34.6", + "vitest": "1.0.1", "vitest-sonar-reporter": "0.5.0", "vue-loader": "17.3.1", "vue-style-loader": "4.1.3", From 94aa2c5dab9db531c1482a0cdd0cf69a105bb3b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 03:50:53 +0000 Subject: [PATCH 35/59] build(deps-dev): bump the typescript-eslint group Bumps the typescript-eslint group in /generators/angular/resources with 1 update: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin). - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.13.2/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: typescript-eslint ... Signed-off-by: dependabot[bot] --- generators/angular/resources/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/angular/resources/package.json b/generators/angular/resources/package.json index 70c45ad73d49..0f1e38df3ff9 100644 --- a/generators/angular/resources/package.json +++ b/generators/angular/resources/package.json @@ -25,7 +25,7 @@ "@angular/cli": "17.0.5", "@types/jest": "29.5.10", "@types/node": "18.19.2", - "@typescript-eslint/eslint-plugin": "6.13.1", + "@typescript-eslint/eslint-plugin": "6.13.2", "browser-sync": "2.29.3", "browser-sync-webpack-plugin": "2.3.0", "buffer": "6.0.3", From dc2065fe7b174aab4fbec249d5ff89afc8e21fb3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 07:43:57 +0000 Subject: [PATCH 36/59] build(deps-dev): bump @cypress/code-coverage Bumps [@cypress/code-coverage](https://github.com/cypress-io/code-coverage) from 3.12.12 to 3.12.13. - [Release notes](https://github.com/cypress-io/code-coverage/releases) - [Changelog](https://github.com/cypress-io/code-coverage/blob/master/.releaserc) - [Commits](https://github.com/cypress-io/code-coverage/compare/v3.12.12...v3.12.13) --- updated-dependencies: - dependency-name: "@cypress/code-coverage" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- generators/client/resources/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/client/resources/package.json b/generators/client/resources/package.json index 3ca8e3532631..9c44f12da928 100644 --- a/generators/client/resources/package.json +++ b/generators/client/resources/package.json @@ -3,7 +3,7 @@ "dayjs": "1.11.10" }, "devDependencies": { - "@cypress/code-coverage": "3.12.12", + "@cypress/code-coverage": "3.12.13", "babel-loader": "9.1.3", "babel-plugin-istanbul": "6.1.1", "cypress": "13.6.0", From 42e6d58bc2ac9140bc9a9bb5afb3b82dd9df2ef0 Mon Sep 17 00:00:00 2001 From: Marcelo Boveto Shima Date: Mon, 4 Dec 2023 23:02:03 -0300 Subject: [PATCH 37/59] group more dependencies --- .github/dependabot.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3c459f8ea2b6..b2f7b938e4d4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -86,6 +86,10 @@ updates: angular-eslint: patterns: - '@angular-eslint/*' + fortawesome: + patterns: + - '@fortawesome/fontawesome-svg-core' + - '@fortawesome/free-solid-svg-icons' typescript-eslint: patterns: - '@typescript-eslint/*' @@ -135,6 +139,16 @@ updates: typescript-eslint: patterns: - '@typescript-eslint/*' + fortawesome: + patterns: + - '@fortawesome/fontawesome-svg-core' + - '@fortawesome/free-solid-svg-icons' + react: + patterns: + - '@reduxjs/*' + - '*-redux' + - 'redux' + - 'redux-*' - package-ecosystem: 'npm' directory: '/generators/vue/resources/' @@ -159,6 +173,10 @@ updates: typescript-eslint: patterns: - '@typescript-eslint/*' + fortawesome: + patterns: + - '@fortawesome/fontawesome-svg-core' + - '@fortawesome/free-solid-svg-icons' - package-ecosystem: 'docker' directory: '/generators/server/resources/' From d1d96c1b960052abf4578a5413125570f5eebd33 Mon Sep 17 00:00:00 2001 From: Marcelo Boveto Shima Date: Mon, 4 Dec 2023 19:30:44 -0300 Subject: [PATCH 38/59] split feign client generator --- .../app/__snapshots__/generator.spec.mts.snap | 4 ++ generators/base-core/generator.mts | 13 ++++ .../__snapshots__/generator.spec.mts.snap | 41 +++++++++++ generators/feign-client/cleanup.mts | 30 ++++++++ generators/feign-client/files.mts | 35 +++++++++ generators/feign-client/generator.mts | 72 +++++++++++++++++++ generators/feign-client/generator.spec.mts | 43 +++++++++++ generators/feign-client/index.mts | 19 +++++ .../client}/AuthorizationHeaderUtil.java.ejs | 2 +- .../client/AuthorizedFeignClient.java.ejs | 0 ...uth2InterceptedFeignConfiguration.java.ejs | 0 .../TokenRelayRequestInterceptor.java.ejs | 2 - .../UserFeignClientInterceptor_jwt.java.ejs | 0 .../config/FeignConfiguration.java.ejs | 0 .../AuthorizationHeaderUtilTest.java.ejs | 2 +- generators/feign-client/types-export.d.ts | 1 + .../__snapshots__/generator.spec.mjs.snap | 15 ++++ generators/generator-list.mjs | 1 + .../jdl/__snapshots__/generator.spec.mts.snap | 1 + generators/server/command.mts | 11 +++ generators/server/files.mjs | 34 --------- generators/server/generator.mjs | 38 +++++++++- .../server/jdl/application-definition.mts | 7 +- generators/server/options/feign-client.mts | 28 ++++++++ .../server/options/feign-client.spec.ts | 20 ++++++ generators/server/options/index.mts | 1 + .../__snapshots__/needles.spec.mts.snap | 9 +++ generators/server/support/config.mts | 1 + generators/server/templates/build.gradle.ejs | 1 - generators/server/templates/pom.xml.ejs | 4 -- .../_package_/TechnicalStructureTest.java.ejs | 2 +- .../__snapshots__/generator.spec.mts.snap | 9 --- .../__snapshots__/generator.spec.mts.snap | 9 --- .../__snapshots__/generator.spec.mts.snap | 9 --- .../__snapshots__/generator.spec.mts.snap | 9 --- .../__snapshots__/generator.spec.mts.snap | 9 --- .../__snapshots__/generator.spec.mts.snap | 69 ------------------ jdl/types/types.d.mts | 4 +- .../blog-store.jdl | 2 + .../blog-store.jdl | 2 + test/__snapshots__/api.spec.mjs.snap | 1 + 41 files changed, 396 insertions(+), 164 deletions(-) create mode 100644 generators/feign-client/__snapshots__/generator.spec.mts.snap create mode 100644 generators/feign-client/cleanup.mts create mode 100644 generators/feign-client/files.mts create mode 100644 generators/feign-client/generator.mts create mode 100644 generators/feign-client/generator.spec.mts create mode 100644 generators/feign-client/index.mts rename generators/{server/templates/src/main/java/_package_/security/oauth2 => feign-client/templates/src/main/java/_package_/client}/AuthorizationHeaderUtil.java.ejs (99%) rename generators/{server => feign-client}/templates/src/main/java/_package_/client/AuthorizedFeignClient.java.ejs (100%) rename generators/{server => feign-client}/templates/src/main/java/_package_/client/OAuth2InterceptedFeignConfiguration.java.ejs (100%) rename generators/{server => feign-client}/templates/src/main/java/_package_/client/TokenRelayRequestInterceptor.java.ejs (95%) rename generators/{server => feign-client}/templates/src/main/java/_package_/client/UserFeignClientInterceptor_jwt.java.ejs (100%) rename generators/{server => feign-client}/templates/src/main/java/_package_/config/FeignConfiguration.java.ejs (100%) rename generators/{server/templates/src/test/java/_package_/security/oauth2 => feign-client/templates/src/test/java/_package_/client}/AuthorizationHeaderUtilTest.java.ejs (99%) create mode 100644 generators/feign-client/types-export.d.ts create mode 100644 generators/server/options/feign-client.mts create mode 100644 generators/server/options/feign-client.spec.ts diff --git a/generators/app/__snapshots__/generator.spec.mts.snap b/generators/app/__snapshots__/generator.spec.mts.snap index 36b36cad3357..86ed410e1985 100644 --- a/generators/app/__snapshots__/generator.spec.mts.snap +++ b/generators/app/__snapshots__/generator.spec.mts.snap @@ -48,6 +48,7 @@ Options: --project-version project version to use, this option is not persisted (env: JHI_PROJECT_VERSION) --jhipster-dependencies-version jhipster-dependencies version to use, this option is not persisted (env: JHIPSTER_DEPENDENCIES_VERSION) --application-type Application type to generate (choices: "monolith", "gateway", "microservice") + --feign-client Generate a feign client --with-generated-flag Add a GeneratedByJHipster annotation to all generated java classes and interfaces --dev-database-type Development database --client-framework Provide client framework for the application (choices: "angular", "react", "vue", "no") @@ -442,6 +443,7 @@ exports[`generator - app with default config should match snapshot 1`] = ` "endpointPrefix": "", "entitySuffix": "", "fakerSeed": undefined, + "feignClient": undefined, "frontendAppName": "jhipsterApp", "gatewayServerPort": undefined, "gatlingTests": false, @@ -1010,6 +1012,7 @@ exports[`generator - app with gateway should match snapshot 1`] = ` "endpointPrefix": "", "entitySuffix": "", "fakerSeed": undefined, + "feignClient": undefined, "frontendAppName": "jhipsterApp", "gatewayServerPort": undefined, "gatlingTests": false, @@ -1579,6 +1582,7 @@ exports[`generator - app with microservice should match snapshot 1`] = ` "endpointPrefix": "services/jhipster", "entitySuffix": "", "fakerSeed": undefined, + "feignClient": undefined, "frontendAppName": "jhipsterApp", "gatewayServerPort": undefined, "gatlingTests": false, diff --git a/generators/base-core/generator.mts b/generators/base-core/generator.mts index 4ff0820ce828..405bce47682f 100644 --- a/generators/base-core/generator.mts +++ b/generators/base-core/generator.mts @@ -215,6 +215,19 @@ export default class CoreGenerator extends YeomanGenerator generator.authenticationTypeOauth2, + path: `${SERVER_MAIN_SRC_DIR}_package_/`, + renameTo: moveToJavaPackageSrcDir, + templates: [ + 'client/AuthorizationHeaderUtil.java', + 'client/AuthorizedFeignClient.java', + 'client/OAuth2InterceptedFeignConfiguration.java', + 'client/TokenRelayRequestInterceptor.java', + ], + }, + { + condition: generator => generator.authenticationTypeJwt, + path: `${SERVER_MAIN_SRC_DIR}_package_/`, + renameTo: moveToJavaPackageSrcDir, + templates: ['client/UserFeignClientInterceptor_jwt.java'], + }, + { + condition: generator => generator.authenticationTypeOauth2, + path: `${SERVER_TEST_SRC_DIR}_package_/`, + renameTo: moveToJavaPackageTestDir, + templates: ['client/AuthorizationHeaderUtilTest.java'], + }, + ], +}; diff --git a/generators/feign-client/generator.mts b/generators/feign-client/generator.mts new file mode 100644 index 000000000000..c15bdee3b5c6 --- /dev/null +++ b/generators/feign-client/generator.mts @@ -0,0 +1,72 @@ +/** + * Copyright 2013-2023 the original author or authors from the JHipster project. + * + * This file is part of the JHipster project, see https://www.jhipster.tech/ + * for more information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import BaseApplicationGenerator from '../base-application/index.mjs'; +import { GENERATOR_BOOTSTRAP_APPLICATION, GENERATOR_FEIGN_CLIENT } from '../generator-list.mjs'; +import { feignFiles } from './files.mjs'; +import cleanupTask from './cleanup.mjs'; + +export default class FeignClientGenerator extends BaseApplicationGenerator { + async beforeQueue() { + if (!this.fromBlueprint) { + await this.composeWithBlueprints(GENERATOR_FEIGN_CLIENT); + } + + if (!this.delegateToBlueprint) { + await this.dependsOnJHipster(GENERATOR_BOOTSTRAP_APPLICATION); + } + } + + get writing() { + return this.asWritingTaskGroup({ + cleanupTask, + async writeTask({ application }) { + await this.writeFiles({ + sections: feignFiles, + context: application, + }); + }, + }); + } + + get [BaseApplicationGenerator.WRITING]() { + return this.delegateTasksToBlueprint(() => this.writing); + } + + get postWriting() { + return this.asPostWritingTaskGroup({ + addDependencies({ application, source }) { + const openFeignArtifact = { groupId: 'org.springframework.cloud', artifactId: 'spring-cloud-starter-openfeign' }; + if (application.buildToolMaven) { + source.addMavenDependency?.(openFeignArtifact); + } + if (application.buildToolGradle) { + source.addGradleDependency?.({ + ...openFeignArtifact, + scope: 'implementation', + }); + } + }, + }); + } + + get [BaseApplicationGenerator.POST_WRITING]() { + return this.asPostWritingTaskGroup(this.delegateTasksToBlueprint(() => this.postWriting)); + } +} diff --git a/generators/feign-client/generator.spec.mts b/generators/feign-client/generator.spec.mts new file mode 100644 index 000000000000..eb8ae7d544df --- /dev/null +++ b/generators/feign-client/generator.spec.mts @@ -0,0 +1,43 @@ +import { basename, dirname } from 'path'; +import { fileURLToPath } from 'url'; +import { expect } from 'esmocha'; + +import { checkEnforcements, defaultHelpers as helpers, runResult } from '../../test/support/index.mjs'; +import { shouldSupportFeatures, testBlueprintSupport } from '../../test/support/tests.mjs'; +import Generator from '../server/index.mjs'; + +import { GENERATOR_FEIGN_CLIENT, GENERATOR_SERVER } from '../generator-list.mjs'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + +const generator = basename(__dirname); + +describe('generator - feign-client', () => { + it('generator-list constant matches folder name', async () => { + await expect((await import('../generator-list.mjs')).GENERATOR_FEIGN_CLIENT).toBe(generator); + }); + shouldSupportFeatures(Generator); + describe('blueprint support', () => testBlueprintSupport(generator)); + checkEnforcements({}, GENERATOR_FEIGN_CLIENT); + + describe('with jwt', () => { + before(async () => { + await helpers.runJHipster(GENERATOR_FEIGN_CLIENT).withJHipsterConfig({ authenticationType: 'jwt' }); + }); + + it('should match generated files snapshot', () => { + expect(runResult.getStateSnapshot()).toMatchSnapshot(); + }); + }); + + describe('with oauth2', () => { + before(async () => { + await helpers.runJHipster(GENERATOR_FEIGN_CLIENT).withJHipsterConfig({ authenticationType: 'oauth2' }); + }); + + it('should match generated files snapshot', () => { + expect(runResult.getStateSnapshot()).toMatchSnapshot(); + }); + }); +}); diff --git a/generators/feign-client/index.mts b/generators/feign-client/index.mts new file mode 100644 index 000000000000..cfcecfbd2954 --- /dev/null +++ b/generators/feign-client/index.mts @@ -0,0 +1,19 @@ +/** + * Copyright 2013-2023 the original author or authors from the JHipster project. + * + * This file is part of the JHipster project, see https://www.jhipster.tech/ + * for more information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export { default } from './generator.mjs'; diff --git a/generators/server/templates/src/main/java/_package_/security/oauth2/AuthorizationHeaderUtil.java.ejs b/generators/feign-client/templates/src/main/java/_package_/client/AuthorizationHeaderUtil.java.ejs similarity index 99% rename from generators/server/templates/src/main/java/_package_/security/oauth2/AuthorizationHeaderUtil.java.ejs rename to generators/feign-client/templates/src/main/java/_package_/client/AuthorizationHeaderUtil.java.ejs index 747f37b01eb7..9e6dc8105603 100644 --- a/generators/server/templates/src/main/java/_package_/security/oauth2/AuthorizationHeaderUtil.java.ejs +++ b/generators/feign-client/templates/src/main/java/_package_/client/AuthorizationHeaderUtil.java.ejs @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. -%> -package <%= packageName %>.security.oauth2; +package <%= packageName %>.client; import java.net.URI; import java.time.Duration; diff --git a/generators/server/templates/src/main/java/_package_/client/AuthorizedFeignClient.java.ejs b/generators/feign-client/templates/src/main/java/_package_/client/AuthorizedFeignClient.java.ejs similarity index 100% rename from generators/server/templates/src/main/java/_package_/client/AuthorizedFeignClient.java.ejs rename to generators/feign-client/templates/src/main/java/_package_/client/AuthorizedFeignClient.java.ejs diff --git a/generators/server/templates/src/main/java/_package_/client/OAuth2InterceptedFeignConfiguration.java.ejs b/generators/feign-client/templates/src/main/java/_package_/client/OAuth2InterceptedFeignConfiguration.java.ejs similarity index 100% rename from generators/server/templates/src/main/java/_package_/client/OAuth2InterceptedFeignConfiguration.java.ejs rename to generators/feign-client/templates/src/main/java/_package_/client/OAuth2InterceptedFeignConfiguration.java.ejs diff --git a/generators/server/templates/src/main/java/_package_/client/TokenRelayRequestInterceptor.java.ejs b/generators/feign-client/templates/src/main/java/_package_/client/TokenRelayRequestInterceptor.java.ejs similarity index 95% rename from generators/server/templates/src/main/java/_package_/client/TokenRelayRequestInterceptor.java.ejs rename to generators/feign-client/templates/src/main/java/_package_/client/TokenRelayRequestInterceptor.java.ejs index 2b59f89921fb..d8a8dc85a02c 100644 --- a/generators/server/templates/src/main/java/_package_/client/TokenRelayRequestInterceptor.java.ejs +++ b/generators/feign-client/templates/src/main/java/_package_/client/TokenRelayRequestInterceptor.java.ejs @@ -18,8 +18,6 @@ -%> package <%= packageName %>.client; -import <%= packageName %>.security.oauth2.AuthorizationHeaderUtil; - import feign.RequestInterceptor; import feign.RequestTemplate; diff --git a/generators/server/templates/src/main/java/_package_/client/UserFeignClientInterceptor_jwt.java.ejs b/generators/feign-client/templates/src/main/java/_package_/client/UserFeignClientInterceptor_jwt.java.ejs similarity index 100% rename from generators/server/templates/src/main/java/_package_/client/UserFeignClientInterceptor_jwt.java.ejs rename to generators/feign-client/templates/src/main/java/_package_/client/UserFeignClientInterceptor_jwt.java.ejs diff --git a/generators/server/templates/src/main/java/_package_/config/FeignConfiguration.java.ejs b/generators/feign-client/templates/src/main/java/_package_/config/FeignConfiguration.java.ejs similarity index 100% rename from generators/server/templates/src/main/java/_package_/config/FeignConfiguration.java.ejs rename to generators/feign-client/templates/src/main/java/_package_/config/FeignConfiguration.java.ejs diff --git a/generators/server/templates/src/test/java/_package_/security/oauth2/AuthorizationHeaderUtilTest.java.ejs b/generators/feign-client/templates/src/test/java/_package_/client/AuthorizationHeaderUtilTest.java.ejs similarity index 99% rename from generators/server/templates/src/test/java/_package_/security/oauth2/AuthorizationHeaderUtilTest.java.ejs rename to generators/feign-client/templates/src/test/java/_package_/client/AuthorizationHeaderUtilTest.java.ejs index e79687e6563e..894d8a2478bc 100644 --- a/generators/server/templates/src/test/java/_package_/security/oauth2/AuthorizationHeaderUtilTest.java.ejs +++ b/generators/feign-client/templates/src/test/java/_package_/client/AuthorizationHeaderUtilTest.java.ejs @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. -%> -package <%= packageName %>.security.oauth2; +package <%= packageName %>.client; import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.ArgumentMatchers.*; diff --git a/generators/feign-client/types-export.d.ts b/generators/feign-client/types-export.d.ts new file mode 100644 index 000000000000..91ec213d25dd --- /dev/null +++ b/generators/feign-client/types-export.d.ts @@ -0,0 +1 @@ +export type { default } from '../base-application/types-export.js'; diff --git a/generators/generate-blueprint/__snapshots__/generator.spec.mjs.snap b/generators/generate-blueprint/__snapshots__/generator.spec.mjs.snap index 84c73532b66e..9cdcfb090d3c 100644 --- a/generators/generate-blueprint/__snapshots__/generator.spec.mjs.snap +++ b/generators/generate-blueprint/__snapshots__/generator.spec.mjs.snap @@ -374,6 +374,21 @@ exports[`generator - generate-blueprint with all option should match snapshot 1` "generators/export-jdl/templates/template-file-export-jdl.ejs": { "stateCleared": "modified", }, + "generators/feign-client/command.mjs": { + "stateCleared": "modified", + }, + "generators/feign-client/generator.mjs": { + "stateCleared": "modified", + }, + "generators/feign-client/generator.spec.mjs": { + "stateCleared": "modified", + }, + "generators/feign-client/index.mjs": { + "stateCleared": "modified", + }, + "generators/feign-client/templates/template-file-feign-client.ejs": { + "stateCleared": "modified", + }, "generators/gatling/command.mjs": { "stateCleared": "modified", }, diff --git a/generators/generator-list.mjs b/generators/generator-list.mjs index 518067be085d..5ac138da7e50 100644 --- a/generators/generator-list.mjs +++ b/generators/generator-list.mjs @@ -40,6 +40,7 @@ export const GENERATOR_DOCKER_COMPOSE = 'docker-compose'; export const GENERATOR_ENTITIES = 'entities'; export const GENERATOR_ENTITY = 'entity'; export const GENERATOR_EXPORT_JDL = 'export-jdl'; +export const GENERATOR_FEIGN_CLIENT = 'feign-client'; export const GENERATOR_GATLING = 'gatling'; export const GENERATOR_GENERATE_BLUEPRINT = 'generate-blueprint'; export const GENERATOR_GIT = 'git'; diff --git a/generators/jdl/__snapshots__/generator.spec.mts.snap b/generators/jdl/__snapshots__/generator.spec.mts.snap index 5a74cc35c8e8..7e6eedcae0c4 100644 --- a/generators/jdl/__snapshots__/generator.spec.mts.snap +++ b/generators/jdl/__snapshots__/generator.spec.mts.snap @@ -214,6 +214,7 @@ Options: --project-version project version to use, this option is not persisted (env: JHI_PROJECT_VERSION) --jhipster-dependencies-version jhipster-dependencies version to use, this option is not persisted (env: JHIPSTER_DEPENDENCIES_VERSION) --application-type Application type to generate (choices: "monolith", "gateway", "microservice") + --feign-client Generate a feign client --with-generated-flag Add a GeneratedByJHipster annotation to all generated java classes and interfaces --dev-database-type Development database --client-framework Provide client framework for the application (choices: "angular", "react", "vue", "no") diff --git a/generators/server/command.mts b/generators/server/command.mts index d2887dca51cd..b7ccaadc84fc 100644 --- a/generators/server/command.mts +++ b/generators/server/command.mts @@ -147,6 +147,17 @@ const command: JHipsterCommandDefinition = { }, ], }, + feignClient: { + description: 'Generate a feign client', + cli: { + type: Boolean, + }, + prompt: { + type: 'confirm', + message: 'Do you want to generate a feign client?', + }, + default: false, + }, }, import: [GENERATOR_COMMON, GENERATOR_JAVA, GENERATOR_LIQUIBASE, GENERATOR_SPRING_DATA_RELATIONAL], }; diff --git a/generators/server/files.mjs b/generators/server/files.mjs index 67d3facffdff..696cb02a2f1b 100644 --- a/generators/server/files.mjs +++ b/generators/server/files.mjs @@ -55,39 +55,6 @@ const reactiveConfigFiles = { ], }; -const feignFiles = { - microserviceFeignFiles: [ - { - path: `${SERVER_MAIN_SRC_DIR}_package_/`, - renameTo: moveToJavaPackageSrcDir, - templates: ['config/FeignConfiguration.java'], - }, - { - condition: generator => generator.authenticationTypeOauth2, - path: `${SERVER_MAIN_SRC_DIR}_package_/`, - renameTo: moveToJavaPackageSrcDir, - templates: [ - 'security/oauth2/AuthorizationHeaderUtil.java', - 'client/AuthorizedFeignClient.java', - 'client/OAuth2InterceptedFeignConfiguration.java', - 'client/TokenRelayRequestInterceptor.java', - ], - }, - { - condition: generator => generator.authenticationTypeJwt, - path: `${SERVER_MAIN_SRC_DIR}_package_/`, - renameTo: moveToJavaPackageSrcDir, - templates: ['client/UserFeignClientInterceptor_jwt.java'], - }, - { - condition: generator => generator.authenticationTypeOauth2, - path: `${SERVER_TEST_SRC_DIR}_package_/`, - renameTo: moveToJavaPackageTestDir, - templates: ['security/oauth2/AuthorizationHeaderUtilTest.java'], - }, - ], -}; - const oauth2Files = { oauth2Files: [ { @@ -600,7 +567,6 @@ export const serverFiles = mergeSections( addSectionsCondition(oauth2Files, context => context.authenticationTypeOauth2), addSectionsCondition(gatewayFiles, context => context.applicationTypeGateway), addSectionsCondition(accountFiles, context => context.generateAuthenticationApi), - addSectionsCondition(feignFiles, context => !context.reactive && context.applicationTypeMicroservice), addSectionsCondition(userManagementFiles, context => context.generateUserManagement), addSectionsCondition(imperativeConfigFiles, context => !context.reactive), addSectionsCondition(reactiveConfigFiles, context => context.reactive), diff --git a/generators/server/generator.mjs b/generators/server/generator.mjs index 65c8391069c5..cb75d7ff21c6 100644 --- a/generators/server/generator.mjs +++ b/generators/server/generator.mjs @@ -57,6 +57,7 @@ import { GENERATOR_SPRING_CACHE, GENERATOR_SPRING_WEBSOCKET, GENERATOR_SPRING_DATA_RELATIONAL, + GENERATOR_FEIGN_CLIENT, } from '../generator-list.mjs'; import BaseApplicationGenerator from '../base-application/index.mjs'; import { writeFiles } from './files.mjs'; @@ -94,6 +95,7 @@ import { messageBrokerTypes, clientFrameworkTypes, testFrameworkTypes, + APPLICATION_TYPE_MICROSERVICE, } from '../../jdl/jhipster/index.mjs'; import { stringifyApplicationData } from '../base-application/support/index.mjs'; import { createBase64Secret, createSecret, createNeedleCallback } from '../base/support/index.mjs'; @@ -209,6 +211,25 @@ export default class JHipsterServerGenerator extends BaseApplicationGenerator { configure() { this._configureServer(); }, + feignMigration() { + const { reactive, applicationType, feignClient } = this.jhipsterConfigWithDefaults; + if (feignClient) { + if (reactive) { + this.handleCheckFailure('Feign client is not supported by reactive applications.'); + } + if (applicationType !== APPLICATION_TYPE_MICROSERVICE) { + this.handleCheckFailure('Feign client is only supported by microservice applications.'); + } + } + if ( + feignClient === undefined && + this.isJhipsterVersionLessThan('8.0.1') && + reactive && + applicationType === APPLICATION_TYPE_MICROSERVICE + ) { + this.jhipsterConfig.feignClient = true; + } + }, }); } @@ -219,8 +240,18 @@ export default class JHipsterServerGenerator extends BaseApplicationGenerator { get composing() { return this.asComposingTaskGroup({ async composing() { - const { buildTool, enableTranslation, databaseType, messageBroker, searchEngine, testFrameworks, websocket, cacheProvider } = - this.jhipsterConfigWithDefaults; + const { + buildTool, + enableTranslation, + databaseType, + messageBroker, + searchEngine, + testFrameworks, + websocket, + cacheProvider, + feignClient, + } = this.jhipsterConfigWithDefaults; + if (buildTool === GRADLE) { await this.composeWithJHipster(GENERATOR_GRADLE); } else if (buildTool === MAVEN) { @@ -263,6 +294,9 @@ export default class JHipsterServerGenerator extends BaseApplicationGenerator { if ([EHCACHE, CAFFEINE, HAZELCAST, INFINISPAN, MEMCACHED, REDIS].includes(cacheProvider)) { await this.composeWithJHipster(GENERATOR_SPRING_CACHE); } + if (feignClient) { + await this.composeWithJHipster(GENERATOR_FEIGN_CLIENT); + } }, }); } diff --git a/generators/server/jdl/application-definition.mts b/generators/server/jdl/application-definition.mts index 6c159590be23..2f19d97c477c 100644 --- a/generators/server/jdl/application-definition.mts +++ b/generators/server/jdl/application-definition.mts @@ -20,10 +20,11 @@ import * as _ from 'lodash-es'; import { JDLApplicationConfig, JHipsterOptionDefinition } from '../../../jdl/types/types.mjs'; import databaseMigrationOption from '../options/database-migration.mjs'; import messageBrokerOption from '../options/message-broker.mjs'; +import { feignClientDefinition } from '../options/index.mjs'; const { upperCase, snakeCase } = _; -const jdlOptions: JHipsterOptionDefinition[] = [databaseMigrationOption, messageBrokerOption]; +const jdlOptions: JHipsterOptionDefinition[] = [databaseMigrationOption, messageBrokerOption, feignClientDefinition]; const applicationConfig: JDLApplicationConfig = { tokenConfigs: jdlOptions.map(option => ({ @@ -41,7 +42,9 @@ const applicationConfig: JDLApplicationConfig = { ]), ), optionsValues: Object.fromEntries( - jdlOptions.map(option => [option.name, Object.fromEntries(option.knownChoices.map(choice => [choice, choice]))]), + jdlOptions + .filter(option => option.knownChoices) + .map(option => [option.name, Object.fromEntries(option.knownChoices!.map(choice => [choice, choice]))]), ), optionsTypes: Object.fromEntries( jdlOptions.map(option => [ diff --git a/generators/server/options/feign-client.mts b/generators/server/options/feign-client.mts new file mode 100644 index 000000000000..f3e034d6e632 --- /dev/null +++ b/generators/server/options/feign-client.mts @@ -0,0 +1,28 @@ +/** + * Copyright 2013-2023 the original author or authors from the JHipster project. + * + * This file is part of the JHipster project, see https://www.jhipster.tech/ + * for more information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { JHipsterOptionDefinition } from '../../../jdl/types/types.mjs'; + +export const FEIGN_CLIENT = 'feignClient'; + +export const feignClientDefinition: JHipsterOptionDefinition = { + name: FEIGN_CLIENT, + type: 'boolean', + tokenType: 'BOOLEAN', +}; diff --git a/generators/server/options/feign-client.spec.ts b/generators/server/options/feign-client.spec.ts new file mode 100644 index 000000000000..36a6174fcaa5 --- /dev/null +++ b/generators/server/options/feign-client.spec.ts @@ -0,0 +1,20 @@ +import { expect } from 'esmocha'; +import { createImporterFromContent, ImportState } from '../../../jdl/jdl-importer.js'; +import { FEIGN_CLIENT as optionName } from './index.mjs'; + +describe(`generators - server - jdl - ${optionName}`, () => { + [true, false].forEach(optionValue => { + describe(`with ${optionValue} value`, () => { + let state: ImportState; + + before(() => { + const importer = createImporterFromContent(`application { config { ${optionName} ${optionValue} } }`); + state = importer.import(); + }); + + it('should set expected value', () => { + expect(state.exportedApplicationsWithEntities.jhipster.config[optionName]).toBe(optionValue); + }); + }); + }); +}); diff --git a/generators/server/options/index.mts b/generators/server/options/index.mts index a04201e60136..feb7b6b47e4f 100644 --- a/generators/server/options/index.mts +++ b/generators/server/options/index.mts @@ -19,3 +19,4 @@ export * from './database-migration.mjs'; export * from './message-broker.mjs'; +export * from './feign-client.mjs'; diff --git a/generators/server/support/__snapshots__/needles.spec.mts.snap b/generators/server/support/__snapshots__/needles.spec.mts.snap index 09a1a9d90443..2d3193621a13 100644 --- a/generators/server/support/__snapshots__/needles.spec.mts.snap +++ b/generators/server/support/__snapshots__/needles.spec.mts.snap @@ -89,6 +89,12 @@ exports[`generator - server - support - needles generated project should match s "src/main/java/com/mycompany/myapp/aop/logging/package-info.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/client/UserFeignClientInterceptor.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/client/package-info.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/config/ApplicationProperties.java": { "stateCleared": "modified", }, @@ -110,6 +116,9 @@ exports[`generator - server - support - needles generated project should match s "src/main/java/com/mycompany/myapp/config/DateTimeFormatConfiguration.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/config/FeignConfiguration.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/config/JacksonConfiguration.java": { "stateCleared": "modified", }, diff --git a/generators/server/support/config.mts b/generators/server/support/config.mts index dd72581ce729..2e66e077b635 100644 --- a/generators/server/support/config.mts +++ b/generators/server/support/config.mts @@ -73,6 +73,7 @@ export const loadServerConfig = ({ config, application }: { config: any; applica 'embeddableLaunchScript', 'enableGradleEnterprise', 'gradleEnterpriseHost', + 'feignClient', ]), { packageFolder: ({ packageFolder }) => (packageFolder ? normalizePathEnd(packageFolder) : packageFolder), diff --git a/generators/server/templates/build.gradle.ejs b/generators/server/templates/build.gradle.ejs index a953ad7a8c24..ea7a1bf49901 100644 --- a/generators/server/templates/build.gradle.ejs +++ b/generators/server/templates/build.gradle.ejs @@ -421,7 +421,6 @@ if (addSpringMilestoneRepository) { _%> implementation "org.springframework.cloud:spring-cloud-starter-circuitbreaker-resilience4j" <%_ } _%> implementation "org.springframework.retry:spring-retry" - implementation "org.springframework.cloud:spring-cloud-starter-openfeign" <%_ } _%> <%_ if (serviceDiscoveryAny) { _%> implementation "org.springframework.cloud:spring-cloud-starter-bootstrap" diff --git a/generators/server/templates/pom.xml.ejs b/generators/server/templates/pom.xml.ejs index afe701a50259..f57db9247e31 100644 --- a/generators/server/templates/pom.xml.ejs +++ b/generators/server/templates/pom.xml.ejs @@ -319,10 +319,6 @@ org.springframework.retry spring-retry - - org.springframework.cloud - spring-cloud-starter-openfeign - <%_ } _%> <%_ if (serviceDiscoveryAny) { _%> diff --git a/generators/server/templates/src/test/java/_package_/TechnicalStructureTest.java.ejs b/generators/server/templates/src/test/java/_package_/TechnicalStructureTest.java.ejs index 41d6ab70558b..3221890bfe00 100644 --- a/generators/server/templates/src/test/java/_package_/TechnicalStructureTest.java.ejs +++ b/generators/server/templates/src/test/java/_package_/TechnicalStructureTest.java.ejs @@ -28,7 +28,7 @@ import static com.tngtech.archunit.core.domain.JavaClass.Predicates.belongToAnyO import static com.tngtech.archunit.library.Architectures.layeredArchitecture; <%_ - const hasClientLayer = !reactive && (applicationTypeMicroservice || applicationTypeGateway); + const hasClientLayer = feignClient; const hasDomainLayer = !databaseTypeNo; const hasConstants = !skipUserManagement || databaseTypeSql || databaseTypeMongodb || databaseTypeCouchbase || databaseTypeNeo4j; _%> diff --git a/generators/spring-data-cassandra/__snapshots__/generator.spec.mts.snap b/generators/spring-data-cassandra/__snapshots__/generator.spec.mts.snap index 4aeb8fafd08a..d05c8e4669e4 100644 --- a/generators/spring-data-cassandra/__snapshots__/generator.spec.mts.snap +++ b/generators/spring-data-cassandra/__snapshots__/generator.spec.mts.snap @@ -529,12 +529,6 @@ exports[`generator - cassandra microservice-jwt-reactive(false)-maven-enableTran "src/main/java/tech/jhipster/aop/logging/package-info.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/client/UserFeignClientInterceptor.java": { - "stateCleared": "modified", - }, - "src/main/java/tech/jhipster/client/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/ApplicationProperties.java": { "stateCleared": "modified", }, @@ -550,9 +544,6 @@ exports[`generator - cassandra microservice-jwt-reactive(false)-maven-enableTran "src/main/java/tech/jhipster/config/DateTimeFormatConfiguration.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/config/FeignConfiguration.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/JacksonConfiguration.java": { "stateCleared": "modified", }, diff --git a/generators/spring-data-couchbase/__snapshots__/generator.spec.mts.snap b/generators/spring-data-couchbase/__snapshots__/generator.spec.mts.snap index 3f67a8f47f0e..b74572830af9 100644 --- a/generators/spring-data-couchbase/__snapshots__/generator.spec.mts.snap +++ b/generators/spring-data-couchbase/__snapshots__/generator.spec.mts.snap @@ -553,12 +553,6 @@ exports[`generator - couchbase microservice-jwt-reactive(false)-maven-enableTran "src/main/java/tech/jhipster/aop/logging/package-info.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/client/UserFeignClientInterceptor.java": { - "stateCleared": "modified", - }, - "src/main/java/tech/jhipster/client/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/ApplicationProperties.java": { "stateCleared": "modified", }, @@ -577,9 +571,6 @@ exports[`generator - couchbase microservice-jwt-reactive(false)-maven-enableTran "src/main/java/tech/jhipster/config/DateTimeFormatConfiguration.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/config/FeignConfiguration.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/JacksonConfiguration.java": { "stateCleared": "modified", }, diff --git a/generators/spring-data-elasticsearch/__snapshots__/generator.spec.mts.snap b/generators/spring-data-elasticsearch/__snapshots__/generator.spec.mts.snap index 4b6b40d4e4b1..3382f1f4d716 100644 --- a/generators/spring-data-elasticsearch/__snapshots__/generator.spec.mts.snap +++ b/generators/spring-data-elasticsearch/__snapshots__/generator.spec.mts.snap @@ -583,12 +583,6 @@ exports[`generator - elasticsearch microservice-jwt-reactive(false)-maven-enable "src/main/java/tech/jhipster/aop/logging/package-info.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/client/UserFeignClientInterceptor.java": { - "stateCleared": "modified", - }, - "src/main/java/tech/jhipster/client/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/ApplicationProperties.java": { "stateCleared": "modified", }, @@ -607,9 +601,6 @@ exports[`generator - elasticsearch microservice-jwt-reactive(false)-maven-enable "src/main/java/tech/jhipster/config/ElasticsearchConfiguration.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/config/FeignConfiguration.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/JacksonConfiguration.java": { "stateCleared": "modified", }, diff --git a/generators/spring-data-mongodb/__snapshots__/generator.spec.mts.snap b/generators/spring-data-mongodb/__snapshots__/generator.spec.mts.snap index 3ccdfa386808..65010cdaa464 100644 --- a/generators/spring-data-mongodb/__snapshots__/generator.spec.mts.snap +++ b/generators/spring-data-mongodb/__snapshots__/generator.spec.mts.snap @@ -520,12 +520,6 @@ exports[`generator - mongodb microservice-jwt-reactive(false)-maven-enableTransl "src/main/java/tech/jhipster/aop/logging/package-info.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/client/UserFeignClientInterceptor.java": { - "stateCleared": "modified", - }, - "src/main/java/tech/jhipster/client/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/ApplicationProperties.java": { "stateCleared": "modified", }, @@ -544,9 +538,6 @@ exports[`generator - mongodb microservice-jwt-reactive(false)-maven-enableTransl "src/main/java/tech/jhipster/config/DateTimeFormatConfiguration.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/config/FeignConfiguration.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/JacksonConfiguration.java": { "stateCleared": "modified", }, diff --git a/generators/spring-data-neo4j/__snapshots__/generator.spec.mts.snap b/generators/spring-data-neo4j/__snapshots__/generator.spec.mts.snap index 1ba18a56fa44..237ac147eb86 100644 --- a/generators/spring-data-neo4j/__snapshots__/generator.spec.mts.snap +++ b/generators/spring-data-neo4j/__snapshots__/generator.spec.mts.snap @@ -526,12 +526,6 @@ exports[`generator - neo4j microservice-jwt-reactive(false)-maven-enableTranslat "src/main/java/tech/jhipster/aop/logging/package-info.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/client/UserFeignClientInterceptor.java": { - "stateCleared": "modified", - }, - "src/main/java/tech/jhipster/client/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/ApplicationProperties.java": { "stateCleared": "modified", }, @@ -547,9 +541,6 @@ exports[`generator - neo4j microservice-jwt-reactive(false)-maven-enableTranslat "src/main/java/tech/jhipster/config/DateTimeFormatConfiguration.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/config/FeignConfiguration.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/JacksonConfiguration.java": { "stateCleared": "modified", }, diff --git a/generators/spring-data-relational/__snapshots__/generator.spec.mts.snap b/generators/spring-data-relational/__snapshots__/generator.spec.mts.snap index 74ca3859674e..fbc978a0de7c 100644 --- a/generators/spring-data-relational/__snapshots__/generator.spec.mts.snap +++ b/generators/spring-data-relational/__snapshots__/generator.spec.mts.snap @@ -2671,12 +2671,6 @@ exports[`generator - sql microservice-jwt-mysql-reactive(false)-maven-enableTran "src/main/java/tech/jhipster/aop/logging/package-info.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/client/UserFeignClientInterceptor.java": { - "stateCleared": "modified", - }, - "src/main/java/tech/jhipster/client/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/ApplicationProperties.java": { "stateCleared": "modified", }, @@ -2698,9 +2692,6 @@ exports[`generator - sql microservice-jwt-mysql-reactive(false)-maven-enableTran "src/main/java/tech/jhipster/config/EurekaWorkaroundConfiguration.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/config/FeignConfiguration.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/JacksonConfiguration.java": { "stateCleared": "modified", }, @@ -3215,12 +3206,6 @@ exports[`generator - sql microservice-jwt-oracle-reactive(false)-maven-enableTra "src/main/java/tech/jhipster/aop/logging/package-info.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/client/UserFeignClientInterceptor.java": { - "stateCleared": "modified", - }, - "src/main/java/tech/jhipster/client/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/ApplicationProperties.java": { "stateCleared": "modified", }, @@ -3239,9 +3224,6 @@ exports[`generator - sql microservice-jwt-oracle-reactive(false)-maven-enableTra "src/main/java/tech/jhipster/config/DateTimeFormatConfiguration.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/config/FeignConfiguration.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/JacksonConfiguration.java": { "stateCleared": "modified", }, @@ -3741,12 +3723,6 @@ exports[`generator - sql microservice-jwt-postgresql-reactive(false)-maven-enabl "src/main/java/tech/jhipster/aop/logging/package-info.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/client/UserFeignClientInterceptor.java": { - "stateCleared": "modified", - }, - "src/main/java/tech/jhipster/client/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/ApplicationProperties.java": { "stateCleared": "modified", }, @@ -3765,9 +3741,6 @@ exports[`generator - sql microservice-jwt-postgresql-reactive(false)-maven-enabl "src/main/java/tech/jhipster/config/DateTimeFormatConfiguration.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/config/FeignConfiguration.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/JacksonConfiguration.java": { "stateCleared": "modified", }, @@ -4276,18 +4249,6 @@ exports[`generator - sql microservice-oauth2-mariadb-reactive(false)-maven-enabl "src/main/java/tech/jhipster/aop/logging/package-info.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/client/AuthorizedFeignClient.java": { - "stateCleared": "modified", - }, - "src/main/java/tech/jhipster/client/OAuth2InterceptedFeignConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/tech/jhipster/client/TokenRelayRequestInterceptor.java": { - "stateCleared": "modified", - }, - "src/main/java/tech/jhipster/client/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/ApplicationProperties.java": { "stateCleared": "modified", }, @@ -4309,9 +4270,6 @@ exports[`generator - sql microservice-oauth2-mariadb-reactive(false)-maven-enabl "src/main/java/tech/jhipster/config/EurekaWorkaroundConfiguration.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/config/FeignConfiguration.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/JacksonConfiguration.java": { "stateCleared": "modified", }, @@ -4369,9 +4327,6 @@ exports[`generator - sql microservice-oauth2-mariadb-reactive(false)-maven-enabl "src/main/java/tech/jhipster/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/AuthorizationHeaderUtil.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, @@ -4510,9 +4465,6 @@ exports[`generator - sql microservice-oauth2-mariadb-reactive(false)-maven-enabl "src/test/java/tech/jhipster/security/oauth2/AudienceValidatorTest.java": { "stateCleared": "modified", }, - "src/test/java/tech/jhipster/security/oauth2/AuthorizationHeaderUtilTest.java": { - "stateCleared": "modified", - }, "src/test/java/tech/jhipster/service/UserServiceIT.java": { "stateCleared": "modified", }, @@ -4928,18 +4880,6 @@ exports[`generator - sql microservice-oauth2-mssql-reactive(false)-maven-enableT "src/main/java/tech/jhipster/aop/logging/package-info.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/client/AuthorizedFeignClient.java": { - "stateCleared": "modified", - }, - "src/main/java/tech/jhipster/client/OAuth2InterceptedFeignConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/tech/jhipster/client/TokenRelayRequestInterceptor.java": { - "stateCleared": "modified", - }, - "src/main/java/tech/jhipster/client/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/ApplicationProperties.java": { "stateCleared": "modified", }, @@ -4958,9 +4898,6 @@ exports[`generator - sql microservice-oauth2-mssql-reactive(false)-maven-enableT "src/main/java/tech/jhipster/config/DateTimeFormatConfiguration.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/config/FeignConfiguration.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/config/JacksonConfiguration.java": { "stateCleared": "modified", }, @@ -5018,9 +4955,6 @@ exports[`generator - sql microservice-oauth2-mssql-reactive(false)-maven-enableT "src/main/java/tech/jhipster/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/AuthorizationHeaderUtil.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, @@ -5159,9 +5093,6 @@ exports[`generator - sql microservice-oauth2-mssql-reactive(false)-maven-enableT "src/test/java/tech/jhipster/security/oauth2/AudienceValidatorTest.java": { "stateCleared": "modified", }, - "src/test/java/tech/jhipster/security/oauth2/AuthorizationHeaderUtilTest.java": { - "stateCleared": "modified", - }, "src/test/java/tech/jhipster/service/UserServiceIT.java": { "stateCleared": "modified", }, diff --git a/jdl/types/types.d.mts b/jdl/types/types.d.mts index ffba040b28a3..bfb2a06739ae 100644 --- a/jdl/types/types.d.mts +++ b/jdl/types/types.d.mts @@ -37,8 +37,8 @@ export type JHipsterOptionDefinition = { name: string; type: JDLApplicationOptionTypeValue; tokenType: JDLValidatorOptionType; - tokenValuePattern: RegExp; - knownChoices: string[]; + tokenValuePattern?: RegExp; + knownChoices?: string[]; }; export { JDLValidatorOption }; diff --git a/test-integration/jdl-samples/mf-ng-eureka-jwt-psql-ehcache/blog-store.jdl b/test-integration/jdl-samples/mf-ng-eureka-jwt-psql-ehcache/blog-store.jdl index 4ee3ae348226..9772febc15d9 100644 --- a/test-integration/jdl-samples/mf-ng-eureka-jwt-psql-ehcache/blog-store.jdl +++ b/test-integration/jdl-samples/mf-ng-eureka-jwt-psql-ehcache/blog-store.jdl @@ -56,6 +56,7 @@ application { serverPort 8081 serviceDiscoveryType eureka testFrameworks [cypress] + feignClient true } entities Blog, Post, Tag } @@ -80,6 +81,7 @@ application { serverPort 8082 serviceDiscoveryType eureka testFrameworks [cypress] + feignClient true } entities Product } diff --git a/test-integration/jdl-samples/ms-mf-ng-consul-oauth2-neo4j/blog-store.jdl b/test-integration/jdl-samples/ms-mf-ng-consul-oauth2-neo4j/blog-store.jdl index ac804fa9a70a..6906af0205ef 100644 --- a/test-integration/jdl-samples/ms-mf-ng-consul-oauth2-neo4j/blog-store.jdl +++ b/test-integration/jdl-samples/ms-mf-ng-consul-oauth2-neo4j/blog-store.jdl @@ -53,6 +53,7 @@ application { serverPort 8081 serviceDiscoveryType consul testFrameworks [cypress] + feignClient true } entities Blog, Post, Tag } @@ -74,6 +75,7 @@ application { packageName com.okta.developer.store serverPort 8082 serviceDiscoveryType consul + feignClient true } entities Product } diff --git a/test/__snapshots__/api.spec.mjs.snap b/test/__snapshots__/api.spec.mjs.snap index db09e33aa251..20d2d40ae9ce 100644 --- a/test/__snapshots__/api.spec.mjs.snap +++ b/test/__snapshots__/api.spec.mjs.snap @@ -25,6 +25,7 @@ exports[`public api generator-jhipster/generators should match snapshot 1`] = ` "GENERATOR_ENTITIES": "entities", "GENERATOR_ENTITY": "entity", "GENERATOR_EXPORT_JDL": "export-jdl", + "GENERATOR_FEIGN_CLIENT": "feign-client", "GENERATOR_GATLING": "gatling", "GENERATOR_GENERATE_BLUEPRINT": "generate-blueprint", "GENERATOR_GIT": "git", From 9d76d5a581a9069c19ff35d445794e74332f671f Mon Sep 17 00:00:00 2001 From: Marcelo Boveto Shima Date: Mon, 4 Dec 2023 22:16:06 -0300 Subject: [PATCH 39/59] move OAuthIdpTokenResponseDTO to feign-client --- .../__snapshots__/generator.spec.mts.snap | 3 + generators/feign-client/cleanup.mts | 1 + generators/feign-client/files.mts | 1 + generators/feign-client/generator.spec.mts | 2 +- .../client/AuthorizationHeaderUtil.java.ejs | 1 - ...uth2InterceptedFeignConfiguration.java.ejs | 2 +- .../client}/OAuthIdpTokenResponseDTO.java.ejs | 2 +- .../__snapshots__/generator.spec.mjs.snap | 3 - generators/server/files.mjs | 6 +- .../__snapshots__/generator.spec.mts.snap | 9 --- .../__snapshots__/generator.spec.mts.snap | 9 --- .../__snapshots__/generator.spec.mts.snap | 9 --- .../__snapshots__/generator.spec.mts.snap | 9 --- .../__snapshots__/generator.spec.mts.snap | 9 --- .../__snapshots__/generator.spec.mts.snap | 57 ------------------- 15 files changed, 9 insertions(+), 114 deletions(-) rename generators/{server/templates/src/main/java/_package_/security/oauth2 => feign-client/templates/src/main/java/_package_/client}/OAuthIdpTokenResponseDTO.java.ejs (98%) diff --git a/generators/feign-client/__snapshots__/generator.spec.mts.snap b/generators/feign-client/__snapshots__/generator.spec.mts.snap index 401b2bb0643c..2e183f5e637a 100644 --- a/generators/feign-client/__snapshots__/generator.spec.mts.snap +++ b/generators/feign-client/__snapshots__/generator.spec.mts.snap @@ -28,6 +28,9 @@ exports[`generator - feign-client with oauth2 should match generated files snaps "src/main/java/com/mycompany/myapp/client/OAuth2InterceptedFeignConfiguration.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/client/OAuthIdpTokenResponseDTO.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/client/TokenRelayRequestInterceptor.java": { "stateCleared": "modified", }, diff --git a/generators/feign-client/cleanup.mts b/generators/feign-client/cleanup.mts index 0ed186ea7727..16cd30e3576c 100644 --- a/generators/feign-client/cleanup.mts +++ b/generators/feign-client/cleanup.mts @@ -24,6 +24,7 @@ import type BaseGenerator from '../base-core/index.mjs'; */ export default function cleanupTask(this: BaseGenerator, { application }: any) { if (this.isJhipsterVersionLessThan('8.0.1')) { + this.removeFile(`${application.javaPackageSrcDir}security/oauth2/OAuthIdpTokenResponseDTO.java`); this.removeFile(`${application.javaPackageSrcDir}security/oauth2/AuthorizationHeaderUtil.java`); this.removeFile(`${application.javaPackageTestDir}security/oauth2/AuthorizationHeaderUtilTest.java`); } diff --git a/generators/feign-client/files.mts b/generators/feign-client/files.mts index f316c33792d6..c0591672d14c 100644 --- a/generators/feign-client/files.mts +++ b/generators/feign-client/files.mts @@ -17,6 +17,7 @@ export const feignFiles = { 'client/AuthorizedFeignClient.java', 'client/OAuth2InterceptedFeignConfiguration.java', 'client/TokenRelayRequestInterceptor.java', + 'client/OAuthIdpTokenResponseDTO.java', ], }, { diff --git a/generators/feign-client/generator.spec.mts b/generators/feign-client/generator.spec.mts index eb8ae7d544df..d0f2f74236af 100644 --- a/generators/feign-client/generator.spec.mts +++ b/generators/feign-client/generator.spec.mts @@ -6,7 +6,7 @@ import { checkEnforcements, defaultHelpers as helpers, runResult } from '../../t import { shouldSupportFeatures, testBlueprintSupport } from '../../test/support/tests.mjs'; import Generator from '../server/index.mjs'; -import { GENERATOR_FEIGN_CLIENT, GENERATOR_SERVER } from '../generator-list.mjs'; +import { GENERATOR_FEIGN_CLIENT } from '../generator-list.mjs'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); diff --git a/generators/feign-client/templates/src/main/java/_package_/client/AuthorizationHeaderUtil.java.ejs b/generators/feign-client/templates/src/main/java/_package_/client/AuthorizationHeaderUtil.java.ejs index 9e6dc8105603..ebb5f81c6d91 100644 --- a/generators/feign-client/templates/src/main/java/_package_/client/AuthorizationHeaderUtil.java.ejs +++ b/generators/feign-client/templates/src/main/java/_package_/client/AuthorizationHeaderUtil.java.ejs @@ -25,7 +25,6 @@ import java.util.HashMap; import java.util.Map; import java.util.Optional; -import <%= packageName %>.security.oauth2.OAuthIdpTokenResponseDTO; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.web.client.RestTemplateBuilder; diff --git a/generators/feign-client/templates/src/main/java/_package_/client/OAuth2InterceptedFeignConfiguration.java.ejs b/generators/feign-client/templates/src/main/java/_package_/client/OAuth2InterceptedFeignConfiguration.java.ejs index e42c2b3ce878..a49debe3037c 100644 --- a/generators/feign-client/templates/src/main/java/_package_/client/OAuth2InterceptedFeignConfiguration.java.ejs +++ b/generators/feign-client/templates/src/main/java/_package_/client/OAuth2InterceptedFeignConfiguration.java.ejs @@ -23,7 +23,7 @@ import org.springframework.context.annotation.Bean; import feign.RequestInterceptor; -import <%= packageName %>.security.oauth2.AuthorizationHeaderUtil; +import <%= packageName %>.client.AuthorizationHeaderUtil; public class OAuth2InterceptedFeignConfiguration { diff --git a/generators/server/templates/src/main/java/_package_/security/oauth2/OAuthIdpTokenResponseDTO.java.ejs b/generators/feign-client/templates/src/main/java/_package_/client/OAuthIdpTokenResponseDTO.java.ejs similarity index 98% rename from generators/server/templates/src/main/java/_package_/security/oauth2/OAuthIdpTokenResponseDTO.java.ejs rename to generators/feign-client/templates/src/main/java/_package_/client/OAuthIdpTokenResponseDTO.java.ejs index 562fd1d81e38..9863de618092 100644 --- a/generators/server/templates/src/main/java/_package_/security/oauth2/OAuthIdpTokenResponseDTO.java.ejs +++ b/generators/feign-client/templates/src/main/java/_package_/client/OAuthIdpTokenResponseDTO.java.ejs @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. -%> -package <%= packageName %>.security.oauth2; +package <%= packageName %>.client; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/generators/server/__snapshots__/generator.spec.mjs.snap b/generators/server/__snapshots__/generator.spec.mjs.snap index 018f5e5ed63e..0c01627b5722 100644 --- a/generators/server/__snapshots__/generator.spec.mjs.snap +++ b/generators/server/__snapshots__/generator.spec.mjs.snap @@ -343,9 +343,6 @@ exports[`generator - server composing databaseType option no with oauth2 should "src/main/java/com/mycompany/myapp/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/security/oauth2/package-info.java": { "stateCleared": "modified", }, diff --git a/generators/server/files.mjs b/generators/server/files.mjs index 696cb02a2f1b..02a8c122321a 100644 --- a/generators/server/files.mjs +++ b/generators/server/files.mjs @@ -60,11 +60,7 @@ const oauth2Files = { { path: `${SERVER_MAIN_SRC_DIR}_package_/`, renameTo: moveToJavaPackageSrcDir, - templates: [ - 'security/oauth2/AudienceValidator.java', - 'security/oauth2/JwtGrantedAuthorityConverter.java', - 'security/oauth2/OAuthIdpTokenResponseDTO.java', - ], + templates: ['security/oauth2/AudienceValidator.java', 'security/oauth2/JwtGrantedAuthorityConverter.java'], }, { path: `${SERVER_TEST_SRC_DIR}_package_/`, diff --git a/generators/spring-data-cassandra/__snapshots__/generator.spec.mts.snap b/generators/spring-data-cassandra/__snapshots__/generator.spec.mts.snap index d05c8e4669e4..b4be8b3e3c02 100644 --- a/generators/spring-data-cassandra/__snapshots__/generator.spec.mts.snap +++ b/generators/spring-data-cassandra/__snapshots__/generator.spec.mts.snap @@ -1301,9 +1301,6 @@ exports[`generator - cassandra microservice-oauth2-reactive(true)-gradle-enableT "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2510,9 +2507,6 @@ exports[`generator - cassandra monolith-oauth2-reactive(false)-maven-enableTrans "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2929,9 +2923,6 @@ exports[`generator - cassandra monolith-oauth2-reactive(true)-gradle-enableTrans "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, diff --git a/generators/spring-data-couchbase/__snapshots__/generator.spec.mts.snap b/generators/spring-data-couchbase/__snapshots__/generator.spec.mts.snap index b74572830af9..17c1c98c394a 100644 --- a/generators/spring-data-couchbase/__snapshots__/generator.spec.mts.snap +++ b/generators/spring-data-couchbase/__snapshots__/generator.spec.mts.snap @@ -1343,9 +1343,6 @@ exports[`generator - couchbase microservice-oauth2-reactive(true)-gradle-enableT "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2600,9 +2597,6 @@ exports[`generator - couchbase monolith-oauth2-reactive(false)-maven-enableTrans "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -3034,9 +3028,6 @@ exports[`generator - couchbase monolith-oauth2-reactive(true)-gradle-enableTrans "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, diff --git a/generators/spring-data-elasticsearch/__snapshots__/generator.spec.mts.snap b/generators/spring-data-elasticsearch/__snapshots__/generator.spec.mts.snap index 3382f1f4d716..6be410ec13b8 100644 --- a/generators/spring-data-elasticsearch/__snapshots__/generator.spec.mts.snap +++ b/generators/spring-data-elasticsearch/__snapshots__/generator.spec.mts.snap @@ -1517,9 +1517,6 @@ exports[`generator - elasticsearch microservice-oauth2-reactive(true)-gradle-ena "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2921,9 +2918,6 @@ exports[`generator - elasticsearch monolith-oauth2-reactive(false)-maven-enableT "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -3424,9 +3418,6 @@ exports[`generator - elasticsearch monolith-oauth2-reactive(true)-gradle-enableT "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, diff --git a/generators/spring-data-mongodb/__snapshots__/generator.spec.mts.snap b/generators/spring-data-mongodb/__snapshots__/generator.spec.mts.snap index 65010cdaa464..826e415cd32a 100644 --- a/generators/spring-data-mongodb/__snapshots__/generator.spec.mts.snap +++ b/generators/spring-data-mongodb/__snapshots__/generator.spec.mts.snap @@ -1286,9 +1286,6 @@ exports[`generator - mongodb microservice-oauth2-reactive(true)-gradle-enableTra "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2477,9 +2474,6 @@ exports[`generator - mongodb monolith-oauth2-reactive(false)-maven-enableTransla "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2887,9 +2881,6 @@ exports[`generator - mongodb monolith-oauth2-reactive(true)-gradle-enableTransla "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, diff --git a/generators/spring-data-neo4j/__snapshots__/generator.spec.mts.snap b/generators/spring-data-neo4j/__snapshots__/generator.spec.mts.snap index 237ac147eb86..cdeb0b41d724 100644 --- a/generators/spring-data-neo4j/__snapshots__/generator.spec.mts.snap +++ b/generators/spring-data-neo4j/__snapshots__/generator.spec.mts.snap @@ -1283,9 +1283,6 @@ exports[`generator - neo4j microservice-oauth2-reactive(true)-gradle-enableTrans "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2477,9 +2474,6 @@ exports[`generator - neo4j monolith-oauth2-reactive(false)-maven-enableTranslati "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2893,9 +2887,6 @@ exports[`generator - neo4j monolith-oauth2-reactive(true)-gradle-enableTranslati "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, diff --git a/generators/spring-data-relational/__snapshots__/generator.spec.mts.snap b/generators/spring-data-relational/__snapshots__/generator.spec.mts.snap index fbc978a0de7c..d5f5d49c7654 100644 --- a/generators/spring-data-relational/__snapshots__/generator.spec.mts.snap +++ b/generators/spring-data-relational/__snapshots__/generator.spec.mts.snap @@ -1487,9 +1487,6 @@ exports[`generator - sql gateway-oauth2-mariadb-gradle-enableTranslation(true)-c "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -1870,9 +1867,6 @@ exports[`generator - sql gateway-oauth2-mssql-gradle-enableTranslation(true)-com "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -4330,9 +4324,6 @@ exports[`generator - sql microservice-oauth2-mariadb-reactive(false)-maven-enabl "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -4668,9 +4659,6 @@ exports[`generator - sql microservice-oauth2-mariadb-reactive(true)-gradle-enabl "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -4958,9 +4946,6 @@ exports[`generator - sql microservice-oauth2-mssql-reactive(false)-maven-enableT "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -5296,9 +5281,6 @@ exports[`generator - sql microservice-oauth2-mssql-reactive(true)-gradle-enableT "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -5619,9 +5601,6 @@ exports[`generator - sql microservice-oauth2-mysql-reactive(true)-gradle-enableT "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -5948,9 +5927,6 @@ exports[`generator - sql microservice-oauth2-oracle-reactive(true)-gradle-enable "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -6274,9 +6250,6 @@ exports[`generator - sql microservice-oauth2-postgresql-reactive(true)-gradle-en "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -10154,9 +10127,6 @@ exports[`generator - sql monolith-oauth2-mariadb-reactive(false)-maven-enableTra "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -10534,9 +10504,6 @@ exports[`generator - sql monolith-oauth2-mariadb-reactive(true)-gradle-enableTra "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -10860,9 +10827,6 @@ exports[`generator - sql monolith-oauth2-mssql-reactive(false)-maven-enableTrans "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -11234,9 +11198,6 @@ exports[`generator - sql monolith-oauth2-mssql-reactive(true)-gradle-enableTrans "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -11572,9 +11533,6 @@ exports[`generator - sql monolith-oauth2-mysql-reactive(false)-maven-enableTrans "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -11952,9 +11910,6 @@ exports[`generator - sql monolith-oauth2-mysql-reactive(true)-gradle-enableTrans "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -12287,9 +12242,6 @@ exports[`generator - sql monolith-oauth2-oracle-reactive(false)-maven-enableTran "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -12664,9 +12616,6 @@ exports[`generator - sql monolith-oauth2-oracle-reactive(true)-gradle-enableTran "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -12987,9 +12936,6 @@ exports[`generator - sql monolith-oauth2-postgresql-reactive(false)-maven-enable "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -13361,9 +13307,6 @@ exports[`generator - sql monolith-oauth2-postgresql-reactive(true)-gradle-enable "src/main/java/com/package/security/oauth2/JwtGrantedAuthorityConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/package/security/oauth2/OAuthIdpTokenResponseDTO.java": { - "stateCleared": "modified", - }, "src/main/java/com/package/security/oauth2/package-info.java": { "stateCleared": "modified", }, From 48e986d7f84e6025bc7c0b4635af04c8cd9db599 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Mon, 4 Dec 2023 23:49:14 -0300 Subject: [PATCH 40/59] cleanup OAuthIdpTokenResponseDTO --- generators/server/cleanup.mts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/generators/server/cleanup.mts b/generators/server/cleanup.mts index f6158d25ec26..bb4f51008844 100644 --- a/generators/server/cleanup.mts +++ b/generators/server/cleanup.mts @@ -193,4 +193,10 @@ export default function cleanupOldServerFilesTask(this: BaseGenerator, taskParam this.removeFile(`${application.javaPackageTestDir}config/TestContainersSpringContextCustomizerFactory.java`); } } + + if (this.isJhipsterVersionLessThan('8.0.1')) { + if (application.authenticationTypeOauth2) { + this.removeFile(`${application.javaPackageSrcDir}security/oauth2/OAuthIdpTokenResponseDTO.java`); + } + } } From dbb9317ca49c2b7f98d66049f26198197ba007e8 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Mon, 4 Dec 2023 23:51:09 -0300 Subject: [PATCH 41/59] adjust feign-client cleanup --- generators/feign-client/cleanup.mts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/generators/feign-client/cleanup.mts b/generators/feign-client/cleanup.mts index 16cd30e3576c..c66499831ecc 100644 --- a/generators/feign-client/cleanup.mts +++ b/generators/feign-client/cleanup.mts @@ -24,8 +24,9 @@ import type BaseGenerator from '../base-core/index.mjs'; */ export default function cleanupTask(this: BaseGenerator, { application }: any) { if (this.isJhipsterVersionLessThan('8.0.1')) { - this.removeFile(`${application.javaPackageSrcDir}security/oauth2/OAuthIdpTokenResponseDTO.java`); - this.removeFile(`${application.javaPackageSrcDir}security/oauth2/AuthorizationHeaderUtil.java`); - this.removeFile(`${application.javaPackageTestDir}security/oauth2/AuthorizationHeaderUtilTest.java`); + if (application.authenticationTypeOauth2) { + this.removeFile(`${application.javaPackageSrcDir}security/oauth2/AuthorizationHeaderUtil.java`); + this.removeFile(`${application.javaPackageTestDir}security/oauth2/AuthorizationHeaderUtilTest.java`); + } } } From 9636eb6351da5516190ba0f0a7325ca0e825d3b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 09:29:26 +0000 Subject: [PATCH 42/59] build(deps): bump docker/metadata-action from 5.2.0 to 5.3.0 Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.2.0 to 5.3.0. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/v5.2.0...v5.3.0) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/docker-image-publish-github-registry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image-publish-github-registry.yml b/.github/workflows/docker-image-publish-github-registry.yml index fd5148735516..c537332203a2 100644 --- a/.github/workflows/docker-image-publish-github-registry.yml +++ b/.github/workflows/docker-image-publish-github-registry.yml @@ -67,7 +67,7 @@ jobs: - name: Extract Docker metadata id: meta - uses: docker/metadata-action@v5.2.0 + uses: docker/metadata-action@v5.3.0 with: images: ghcr.io/${{ github.repository }}${{ (steps.login-hub.outcome == 'success' && ',jhipster/jhipster') || ''}} From 2f8735d58b80ca8cd75ea8d06af8840824b101e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 09:34:01 +0000 Subject: [PATCH 43/59] build(deps): bump @vueuse/core in /generators/vue/resources Bumps [@vueuse/core](https://github.com/vueuse/vueuse/tree/HEAD/packages/core) from 10.6.1 to 10.7.0. - [Release notes](https://github.com/vueuse/vueuse/releases) - [Commits](https://github.com/vueuse/vueuse/commits/v10.7.0/packages/core) --- updated-dependencies: - dependency-name: "@vueuse/core" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- generators/vue/resources/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/vue/resources/package.json b/generators/vue/resources/package.json index e628db7df976..cd7745a5cbcc 100644 --- a/generators/vue/resources/package.json +++ b/generators/vue/resources/package.json @@ -5,7 +5,7 @@ "@fortawesome/vue-fontawesome": "3.0.5", "@vuelidate/core": "2.0.3", "@vuelidate/validators": "2.0.4", - "@vueuse/core": "10.6.1", + "@vueuse/core": "10.7.0", "axios": "1.6.2", "bootstrap": "4.6.2", "bootstrap-vue": "2.23.1", From 7a6b9c3f5d0fc7467ceac01fd3fa183ba928db49 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 07:33:49 -0300 Subject: [PATCH 44/59] build(deps-dev): bump vitest-sonar-reporter in /generators/vue/resources (#24478) Bumps [vitest-sonar-reporter](https://github.com/AriPerkkio/vitest-sonar-reporter) from 0.5.0 to 1.0.0. - [Release notes](https://github.com/AriPerkkio/vitest-sonar-reporter/releases) - [Changelog](https://github.com/AriPerkkio/vitest-sonar-reporter/blob/main/CHANGELOG.md) - [Commits](https://github.com/AriPerkkio/vitest-sonar-reporter/compare/v0.5.0...v1.0.0) --- updated-dependencies: - dependency-name: vitest-sonar-reporter dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- generators/vue/resources/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/vue/resources/package.json b/generators/vue/resources/package.json index cd7745a5cbcc..e9bb22aff081 100644 --- a/generators/vue/resources/package.json +++ b/generators/vue/resources/package.json @@ -58,7 +58,7 @@ "typescript": "5.3.2", "vite": "5.0.5", "vitest": "1.0.1", - "vitest-sonar-reporter": "0.5.0", + "vitest-sonar-reporter": "1.0.0", "vue-loader": "17.3.1", "vue-style-loader": "4.1.3", "vue-tsc": "1.8.24", From 8f9ada557d052553049eed8b4066a37d62f17877 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 09:29:20 +0000 Subject: [PATCH 45/59] build(deps): bump actions/labeler from 4 to 5 Bumps [actions/labeler](https://github.com/actions/labeler) from 4 to 5. - [Release notes](https://github.com/actions/labeler/releases) - [Commits](https://github.com/actions/labeler/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/labeler dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 468491ec8f8f..fa2608753233 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -33,6 +33,6 @@ jobs: pull-requests: write # for actions/labeler to add labels to PRs runs-on: ubuntu-latest steps: - - uses: actions/labeler@v4 + - uses: actions/labeler@v5 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' From 53e32718a4f1065612db4a5ad10e589280784619 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 08:36:18 -0300 Subject: [PATCH 46/59] build(deps): bump vitest from 0.34.6 to 1.0.1 in /generators/generate-blueprint/resources (#24475) * build(deps): bump vitest in /generators/generate-blueprint/resources Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 0.34.6 to 1.0.1. - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Commits](https://github.com/vitest-dev/vitest/commits/v1.0.1/packages/vitest) --- updated-dependencies: - dependency-name: vitest dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * update vitest config --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marcelo Shima --- generators/generate-blueprint/resources/package.json | 2 +- generators/generate-blueprint/templates/vitest.config.ts.ejs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/generators/generate-blueprint/resources/package.json b/generators/generate-blueprint/resources/package.json index c2dadba1a35f..7ce1601243bd 100644 --- a/generators/generate-blueprint/resources/package.json +++ b/generators/generate-blueprint/resources/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "vitest": "0.34.6" + "vitest": "1.0.1" } } diff --git a/generators/generate-blueprint/templates/vitest.config.ts.ejs b/generators/generate-blueprint/templates/vitest.config.ts.ejs index fcba4731fcac..d46556a90a3b 100644 --- a/generators/generate-blueprint/templates/vitest.config.ts.ejs +++ b/generators/generate-blueprint/templates/vitest.config.ts.ejs @@ -2,7 +2,7 @@ import { defineConfig, defaultExclude } from 'vitest/config'; export default defineConfig({ test: { - threads: false, + pool: 'forks', hookTimeout: 20000, exclude: [...defaultExclude.filter(val => val !== '**/cypress/**'), '**/templates/**', '**/resources/**'], }, From e47b280b29693f1ca6f15053c52d6a47c9ff3c8a Mon Sep 17 00:00:00 2001 From: Daniel Franco Date: Tue, 5 Dec 2023 14:19:30 +0000 Subject: [PATCH 47/59] Revert "build(deps): bump actions/labeler from 4 to 5" --- .github/workflows/labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index fa2608753233..468491ec8f8f 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -33,6 +33,6 @@ jobs: pull-requests: write # for actions/labeler to add labels to PRs runs-on: ubuntu-latest steps: - - uses: actions/labeler@v5 + - uses: actions/labeler@v4 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' From 3e2bb88e6fecd5f798c1f8ca865044da9e029aa9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 01:36:36 +0000 Subject: [PATCH 48/59] build(deps-dev): bump @types/jest in /generators/react/resources Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 29.5.10 to 29.5.11. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) --- updated-dependencies: - dependency-name: "@types/jest" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- generators/react/resources/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/react/resources/package.json b/generators/react/resources/package.json index 0cd8f697b384..bea1db496d80 100644 --- a/generators/react/resources/package.json +++ b/generators/react/resources/package.json @@ -29,7 +29,7 @@ "devDependencies": { "@module-federation/utilities": "3.0.3-0", "@testing-library/react": "14.1.2", - "@types/jest": "29.5.10", + "@types/jest": "29.5.11", "@types/lodash": "4.14.202", "@types/node": "18.19.2", "@types/react": "18.2.42", From 37b116d018d6923d3e453faee99186eb7f3020fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 01:37:09 +0000 Subject: [PATCH 49/59] build(deps-dev): bump core-js in /generators/react/resources Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.33.3 to 3.34.0. - [Release notes](https://github.com/zloirock/core-js/releases) - [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/zloirock/core-js/commits/v3.34.0/packages/core-js) --- updated-dependencies: - dependency-name: core-js dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- generators/react/resources/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/react/resources/package.json b/generators/react/resources/package.json index bea1db496d80..981cec7440f2 100644 --- a/generators/react/resources/package.json +++ b/generators/react/resources/package.json @@ -43,7 +43,7 @@ "browser-sync": "2.29.3", "browser-sync-webpack-plugin": "2.3.0", "copy-webpack-plugin": "11.0.0", - "core-js": "3.33.3", + "core-js": "3.34.0", "cross-env": "7.0.3", "css-loader": "6.8.1", "css-minimizer-webpack-plugin": "5.0.1", From 4165c118e8b47f7cca3dfd019e89f44e326548c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 02:09:55 +0000 Subject: [PATCH 50/59] build(deps-dev): bump vue-tsc in /generators/vue/resources Bumps [vue-tsc](https://github.com/vuejs/language-tools/tree/HEAD/packages/tsc) from 1.8.24 to 1.8.25. - [Release notes](https://github.com/vuejs/language-tools/releases) - [Changelog](https://github.com/vuejs/language-tools/blob/master/CHANGELOG.md) - [Commits](https://github.com/vuejs/language-tools/commits/v1.8.25/packages/tsc) --- updated-dependencies: - dependency-name: vue-tsc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- generators/vue/resources/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/vue/resources/package.json b/generators/vue/resources/package.json index e9bb22aff081..50165ad93949 100644 --- a/generators/vue/resources/package.json +++ b/generators/vue/resources/package.json @@ -61,7 +61,7 @@ "vitest-sonar-reporter": "1.0.0", "vue-loader": "17.3.1", "vue-style-loader": "4.1.3", - "vue-tsc": "1.8.24", + "vue-tsc": "1.8.25", "webpack": "5.89.0", "webpack-bundle-analyzer": "4.10.1", "webpack-cli": "5.1.4", From 30f6661a3fc2fb23b5e79b919465e0930f20abb0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 03:27:33 +0000 Subject: [PATCH 51/59] build(deps-dev): bump @types/jest in /generators/angular/resources Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 29.5.10 to 29.5.11. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) --- updated-dependencies: - dependency-name: "@types/jest" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- generators/angular/resources/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/angular/resources/package.json b/generators/angular/resources/package.json index 0f1e38df3ff9..c85f4c4eb222 100644 --- a/generators/angular/resources/package.json +++ b/generators/angular/resources/package.json @@ -23,7 +23,7 @@ "@angular-builders/jest": "17.0.0", "@angular-eslint/eslint-plugin": "17.1.1", "@angular/cli": "17.0.5", - "@types/jest": "29.5.10", + "@types/jest": "29.5.11", "@types/node": "18.19.2", "@typescript-eslint/eslint-plugin": "6.13.2", "browser-sync": "2.29.3", From 98955262f7bd832c953fd8355f0747ba53c86cc2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 07:14:22 +0000 Subject: [PATCH 52/59] build(deps-dev): bump cypress in /generators/client/resources Bumps [cypress](https://github.com/cypress-io/cypress) from 13.6.0 to 13.6.1. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md) - [Commits](https://github.com/cypress-io/cypress/compare/v13.6.0...v13.6.1) --- updated-dependencies: - dependency-name: cypress dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- generators/client/resources/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/client/resources/package.json b/generators/client/resources/package.json index 9c44f12da928..dd77ae0e9a73 100644 --- a/generators/client/resources/package.json +++ b/generators/client/resources/package.json @@ -6,7 +6,7 @@ "@cypress/code-coverage": "3.12.13", "babel-loader": "9.1.3", "babel-plugin-istanbul": "6.1.1", - "cypress": "13.6.0", + "cypress": "13.6.1", "cypress-audit": "1.1.0", "eslint-plugin-cypress": "2.15.1", "lighthouse": "11.3.0", From c41abcb7641395a5c48ddb7a616dee2bb345ebec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 09:02:27 +0000 Subject: [PATCH 53/59] build(deps): bump com.gradle.common-custom-user-data-gradle-plugin Bumps com.gradle.common-custom-user-data-gradle-plugin from 1.12 to 1.12.1. --- updated-dependencies: - dependency-name: com.gradle.common-custom-user-data-gradle-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- generators/server/resources/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/server/resources/gradle/libs.versions.toml b/generators/server/resources/gradle/libs.versions.toml index 571128324230..178581133767 100644 --- a/generators/server/resources/gradle/libs.versions.toml +++ b/generators/server/resources/gradle/libs.versions.toml @@ -13,6 +13,6 @@ gradle-modernizer-plugin = { id = 'com.github.andygoossens.gradle-modernizer-plu gradle-enterprise = { id = 'com.gradle.enterprise', version = '3.15.1' } -common-custom-user-data-gradle-plugin = { id = 'com.gradle.common-custom-user-data-gradle-plugin', version = '1.12' } +common-custom-user-data-gradle-plugin = { id = 'com.gradle.common-custom-user-data-gradle-plugin', version = '1.12.1' } gatling-gradle = { id = 'io.gatling.gradle', version = '3.9.5.6' } From ac3db09b8d8b9088242df515d82557bc2f7dd465 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 09:12:05 +0000 Subject: [PATCH 54/59] build(deps): bump com.gradle.enterprise in /generators/server/resources Bumps com.gradle.enterprise from 3.15.1 to 3.16. --- updated-dependencies: - dependency-name: com.gradle.enterprise dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- generators/server/resources/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/server/resources/gradle/libs.versions.toml b/generators/server/resources/gradle/libs.versions.toml index 178581133767..91cc1282ef77 100644 --- a/generators/server/resources/gradle/libs.versions.toml +++ b/generators/server/resources/gradle/libs.versions.toml @@ -11,7 +11,7 @@ spotless-gradle-plugin = { id = 'com.diffplug.spotless', version = '6.23.3' } gradle-modernizer-plugin = { id = 'com.github.andygoossens.gradle-modernizer-plugin', version = '1.9.0' } -gradle-enterprise = { id = 'com.gradle.enterprise', version = '3.15.1' } +gradle-enterprise = { id = 'com.gradle.enterprise', version = '3.16' } common-custom-user-data-gradle-plugin = { id = 'com.gradle.common-custom-user-data-gradle-plugin', version = '1.12.1' } From e5c26e04a466be1c6284c41668e4ce9e22327219 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Wed, 6 Dec 2023 14:18:40 -0700 Subject: [PATCH 55/59] Spring Milestone repo is no longer needed Spring Cloud 2023.0.0 has been released! --- generators/generator-constants.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/generator-constants.mjs b/generators/generator-constants.mjs index f2331880a731..1e36c97cd8d8 100644 --- a/generators/generator-constants.mjs +++ b/generators/generator-constants.mjs @@ -23,7 +23,7 @@ export const JHIPSTER_DEPENDENCIES_VERSION = '8.1.0-SNAPSHOT'; export const JAVA_VERSION = '17'; export const JAVA_COMPATIBLE_VERSIONS = ['17', '18', '19', '20', '21']; // Force spring milestone repository. Spring Boot milestones are detected. -export const ADD_SPRING_MILESTONE_REPOSITORY = true; +export const ADD_SPRING_MILESTONE_REPOSITORY = false // Version of Node, NPM export const NODE_VERSION = '18.18.2'; From ea202b93c1b27ac5380e77847585a1ec2413ab59 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Wed, 6 Dec 2023 14:20:45 -0700 Subject: [PATCH 56/59] Update snapshot --- generators/app/__snapshots__/generator.spec.mts.snap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generators/app/__snapshots__/generator.spec.mts.snap b/generators/app/__snapshots__/generator.spec.mts.snap index 86ed410e1985..9a54ddac450b 100644 --- a/generators/app/__snapshots__/generator.spec.mts.snap +++ b/generators/app/__snapshots__/generator.spec.mts.snap @@ -211,7 +211,7 @@ exports[`generator - app with default config should match snapshot 1`] = ` "SERVER_TEST_SRC_DIR": "src/test/java/", "TEST_DIR": "src/test/", "VUE": "vue", - "addSpringMilestoneRepository": true, + "addSpringMilestoneRepository": false, "angularLocaleId": "en", "applicationType": "monolith", "applicationTypeAny": true, @@ -778,7 +778,7 @@ exports[`generator - app with gateway should match snapshot 1`] = ` "SERVER_TEST_SRC_DIR": "src/test/java/", "TEST_DIR": "src/test/", "VUE": "vue", - "addSpringMilestoneRepository": true, + "addSpringMilestoneRepository": false, "angularLocaleId": "en", "applicationType": "gateway", "applicationTypeAny": true, @@ -1348,7 +1348,7 @@ exports[`generator - app with microservice should match snapshot 1`] = ` "SERVER_TEST_SRC_DIR": "src/test/java/", "TEST_DIR": "src/test/", "VUE": "vue", - "addSpringMilestoneRepository": true, + "addSpringMilestoneRepository": false, "applicationType": "microservice", "applicationTypeAny": true, "applicationTypeGateway": false, From 0bf2f7ad021646e8b6d1df0e08476ba242978dca Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Wed, 6 Dec 2023 14:24:00 -0700 Subject: [PATCH 57/59] Add missing semicolon --- generators/generator-constants.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/generator-constants.mjs b/generators/generator-constants.mjs index 1e36c97cd8d8..1bc396ea1802 100644 --- a/generators/generator-constants.mjs +++ b/generators/generator-constants.mjs @@ -23,7 +23,7 @@ export const JHIPSTER_DEPENDENCIES_VERSION = '8.1.0-SNAPSHOT'; export const JAVA_VERSION = '17'; export const JAVA_COMPATIBLE_VERSIONS = ['17', '18', '19', '20', '21']; // Force spring milestone repository. Spring Boot milestones are detected. -export const ADD_SPRING_MILESTONE_REPOSITORY = false +export const ADD_SPRING_MILESTONE_REPOSITORY = false; // Version of Node, NPM export const NODE_VERSION = '18.18.2'; From 9f9078715606fd25a0f1156cec42a1064fd6acf3 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Wed, 6 Dec 2023 18:29:40 -0700 Subject: [PATCH 58/59] Change `jhipster-bom-branch` to auto --- .github/actions/setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 6f6ed741fef5..a26667e9cb6e 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -67,7 +67,7 @@ inputs: jhipster-bom-branch: description: 'JHipster BOM branch' required: false - default: spring-boot-3.2 + default: auto jhipster-bom-directory: description: 'JHipster BOM path' required: false From 586ffcc999d930fa6bee48d9dba9e7231bcd8803 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Wed, 6 Dec 2023 18:33:26 -0700 Subject: [PATCH 59/59] Remove snapshot and milestone logic Co-authored-by: Marcelo Shima --- generators/server/templates/pom.xml.ejs | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/generators/server/templates/pom.xml.ejs b/generators/server/templates/pom.xml.ejs index f57db9247e31..5e588ba4a2ab 100644 --- a/generators/server/templates/pom.xml.ejs +++ b/generators/server/templates/pom.xml.ejs @@ -923,28 +923,6 @@ - <%_ if (addSpringMilestoneRepository) { _%> - - - spring-milestones - Spring Milestones - https://repo.spring.io/milestone - - false - - - - - - spring-milestones - Spring Milestones - https://repo.spring.io/milestone - - false - - - - <%_ } _%> api-docs