generator-jhipster 7.2.0 → 7.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/environment-builder.js +1 -0
- package/cli/import-jdl.js +3 -2
- package/cli/jdl.js +1 -0
- package/cli/jhipster-command.js +2 -2
- package/cli/program.js +32 -29
- package/generators/app/index.js +35 -26
- package/generators/aws/index.js +8 -8
- package/generators/aws/lib/eb.js +1 -1
- package/generators/azure-app-service/index.js +16 -9
- package/generators/azure-app-service/templates/github/workflows/azure-app-service.yml.ejs +2 -2
- package/generators/azure-spring-cloud/index.js +16 -9
- package/generators/azure-spring-cloud/templates/github/workflows/azure-spring-cloud.yml.ejs +2 -2
- package/generators/bootstrap/index.js +57 -61
- package/generators/ci-cd/index.js +11 -8
- package/generators/ci-cd/templates/github-actions.yml.ejs +1 -1
- package/generators/ci-cd/templates/travis.yml.ejs +9 -4
- package/generators/client/__workflow/devserver-angular.json +1 -1
- package/generators/client/__workflow/devserver-react.json +1 -1
- package/generators/client/__workflow/devserver-vue.json +1 -1
- package/generators/client/files-angular.js +6 -0
- package/generators/client/files-common.js +6 -2
- package/generators/client/files-react.js +13 -2
- package/generators/client/files-vue.js +56 -6
- package/generators/client/index.js +114 -32
- package/generators/client/needle-api/needle-client-angular.js +1 -1
- package/generators/client/needle-api/needle-client-vue.js +57 -7
- package/generators/client/templates/angular/.eslintrc.json.ejs +1 -0
- package/generators/client/templates/angular/package.json +19 -19
- package/generators/client/templates/angular/package.json.ejs +2 -1
- package/generators/client/templates/angular/src/main/webapp/app/account/activate/activate.component.spec.ts.ejs +52 -54
- package/generators/client/templates/angular/src/main/webapp/app/account/activate/activate.service.spec.ts.ejs +65 -0
- package/generators/client/templates/angular/src/main/webapp/app/account/password/password-strength-bar/password-strength-bar.component.spec.ts.ejs +35 -37
- package/generators/client/templates/angular/src/main/webapp/app/account/password/password.component.spec.ts.ejs +78 -80
- package/generators/client/templates/angular/src/main/webapp/app/account/password/password.service.spec.ts.ejs +41 -0
- package/generators/client/templates/angular/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.spec.ts.ejs +73 -75
- package/generators/client/templates/angular/src/main/webapp/app/account/password-reset/finish/password-reset-finish.service.spec.ts.ejs +62 -0
- package/generators/client/templates/angular/src/main/webapp/app/account/password-reset/init/password-reset-init.component.spec.ts.ejs +44 -46
- package/generators/client/templates/angular/src/main/webapp/app/account/password-reset/init/password-reset-init.service.spec.ts.ejs +61 -0
- package/generators/client/templates/angular/src/main/webapp/app/account/register/register.component.spec.ts.ejs +116 -118
- package/generators/client/templates/angular/src/main/webapp/app/account/register/register.service.spec.ts.ejs +66 -0
- package/generators/client/templates/angular/src/main/webapp/app/account/sessions/sessions.component.spec.ts.ejs +75 -77
- package/generators/client/templates/angular/src/main/webapp/app/account/settings/settings.component.spec.ts.ejs +74 -76
- package/generators/client/templates/angular/src/main/webapp/app/admin/configuration/configuration.component.spec.ts.ejs +48 -50
- package/generators/client/templates/angular/src/main/webapp/app/admin/configuration/configuration.service.spec.ts.ejs +50 -52
- package/generators/client/templates/angular/src/main/webapp/app/admin/health/health.component.spec.ts.ejs +45 -47
- package/generators/client/templates/angular/src/main/webapp/app/admin/health/health.service.spec.ts.ejs +66 -0
- package/generators/client/templates/angular/src/main/webapp/app/admin/health/modal/health-modal.component.spec.ts.ejs +99 -101
- package/generators/client/templates/angular/src/main/webapp/app/admin/logs/logs.component.spec.ts.ejs +61 -63
- package/generators/client/templates/angular/src/main/webapp/app/admin/logs/logs.service.spec.ts.ejs +19 -21
- package/generators/client/templates/angular/src/main/webapp/app/admin/metrics/blocks/jvm-memory/jvm-memory.component.html.ejs +2 -2
- package/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics.component.spec.ts.ejs +28 -30
- package/generators/client/templates/angular/src/main/webapp/app/admin/metrics/metrics.service.spec.ts.ejs +62 -64
- package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/delete/user-management-delete-dialog.component.spec.ts.ejs +35 -37
- package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/detail/user-management-detail.component.spec.ts.ejs +40 -42
- package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/list/user-management.component.spec.ts.ejs +87 -89
- package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/service/user-management.service.spec.ts.ejs +41 -43
- package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/update/user-management-update.component.spec.ts.ejs +81 -83
- package/generators/client/templates/angular/src/main/webapp/app/app.module.ts.ejs +3 -0
- package/generators/client/templates/angular/src/main/webapp/app/core/auth/account.service.spec.ts.ejs +178 -180
- package/generators/client/templates/angular/src/main/webapp/app/core/config/application-config.service.ts.ejs +9 -0
- package/generators/client/templates/angular/src/main/webapp/app/entities/user/user.service.spec.ts.ejs +87 -89
- package/generators/client/templates/angular/src/main/webapp/app/home/home.component.spec.ts.ejs +93 -95
- package/generators/client/templates/angular/src/main/webapp/app/layouts/main/main.component.spec.ts.ejs +166 -168
- package/generators/client/templates/angular/src/main/webapp/app/layouts/navbar/navbar.component.spec.ts.ejs +66 -68
- package/generators/client/templates/angular/src/main/webapp/app/layouts/profiles/page-ribbon.component.spec.ts.ejs +27 -29
- package/generators/client/templates/angular/src/main/webapp/app/login/login.component.spec.ts.ejs +112 -114
- package/generators/client/templates/angular/src/main/webapp/app/shared/alert/alert-error.component.spec.ts.ejs +132 -134
- package/generators/client/templates/angular/src/main/webapp/app/shared/alert/alert.component.spec.ts.ejs +29 -31
- package/generators/client/templates/angular/webpack/webpack.custom.js.ejs +2 -3
- package/generators/client/templates/common/README.md.jhi.client.ejs +34 -0
- package/generators/client/templates/common/package.json +7 -7
- package/generators/client/templates/common/webpack/webpack.microfrontend.js.jhi.ejs +56 -0
- package/generators/client/templates/react/.eslintrc.json.ejs +1 -0
- package/generators/client/templates/react/package.json +57 -56
- package/generators/client/templates/react/package.json.ejs +5 -2
- package/generators/client/templates/react/src/main/webapp/app/app.scss.ejs +0 -3
- package/generators/client/templates/react/src/main/webapp/app/modules/account/password/password.tsx.ejs +2 -2
- package/generators/client/templates/react/src/main/webapp/app/modules/administration/configuration/configuration.tsx.ejs +2 -2
- package/generators/client/templates/react/src/main/webapp/app/modules/administration/gateway/gateway.tsx.ejs +2 -2
- package/generators/client/templates/react/src/main/webapp/app/modules/administration/metrics/metrics.tsx.ejs +6 -6
- package/generators/client/templates/react/src/main/webapp/app/modules/administration/user-management/user-management.tsx.ejs +8 -8
- package/generators/client/templates/react/src/main/webapp/app/modules/home/home.tsx.ejs +1 -1
- package/generators/client/templates/react/src/main/webapp/app/shared/layout/header/header.tsx.ejs +1 -1
- package/generators/client/templates/react/src/main/webapp/app/shared/layout/menus/account.tsx.ejs +3 -3
- package/generators/client/templates/react/src/main/webapp/app/shared/layout/menus/admin.tsx.ejs +7 -7
- package/generators/client/templates/react/src/main/webapp/app/shared/layout/menus/menu-components.tsx.ejs +1 -1
- package/generators/client/templates/react/webpack/webpack.dev.js.ejs +17 -1
- package/generators/client/templates/react/webpack/webpack.prod.js.ejs +13 -1
- package/generators/client/templates/vue/.eslintrc.js.ejs +8 -5
- package/generators/client/templates/vue/package.json +40 -49
- package/generators/client/templates/vue/package.json.ejs +14 -18
- package/generators/client/templates/vue/src/main/webapp/app/account/account.service.ts.ejs +6 -5
- package/generators/client/templates/vue/src/main/webapp/app/account/settings/settings.vue.ejs +7 -1
- package/generators/client/templates/vue/src/main/webapp/app/admin/configuration/configuration.service.ts.ejs +1 -1
- package/generators/client/templates/vue/src/main/webapp/app/admin/configuration/configuration.vue.ejs +1 -1
- package/generators/client/templates/vue/src/main/webapp/app/admin/metrics/metrics.component.ts.ejs +1 -1
- package/generators/client/templates/vue/src/main/webapp/app/admin/tracker/tracker.service.ts.ejs +5 -4
- package/generators/client/templates/vue/src/main/webapp/app/admin/user-management/user-management-edit.component.ts.ejs +9 -0
- package/generators/client/templates/vue/src/main/webapp/app/admin/user-management/user-management-view.component.ts.ejs +5 -0
- package/generators/client/templates/vue/src/main/webapp/app/admin/user-management/user-management.component.ts.ejs +5 -0
- package/generators/client/templates/vue/src/main/webapp/app/constants.ts.ejs +16 -6
- package/generators/client/templates/vue/src/main/webapp/app/core/jhi-navbar/jhi-navbar.component.ts.ejs +27 -8
- package/generators/client/templates/vue/src/main/webapp/app/core/jhi-navbar/jhi-navbar.vue.ejs +6 -0
- package/generators/client/templates/vue/src/main/webapp/app/declarations.d.ts.ejs +41 -0
- package/generators/client/templates/vue/src/main/webapp/app/entities/entities-menu.component.ts.ejs +34 -0
- package/generators/client/templates/vue/src/main/webapp/app/entities/entities-menu.vue.ejs +13 -0
- package/generators/client/templates/vue/src/main/webapp/app/entities/entities.component.ts.ejs +14 -0
- package/generators/client/templates/vue/src/main/webapp/app/entities/entities.vue.ejs +5 -0
- package/generators/client/templates/vue/{webpack/utils.js.ejs → src/main/webapp/app/index.ts.ejs} +1 -12
- package/generators/client/templates/vue/src/main/webapp/app/locale/translation.service.ts.ejs +26 -9
- package/generators/client/templates/vue/src/main/webapp/app/main.ts.ejs +23 -11
- package/generators/client/templates/vue/src/main/webapp/app/router/admin.ts.ejs +4 -4
- package/generators/client/templates/vue/src/main/webapp/app/router/entities.ts.ejs +45 -3
- package/generators/client/templates/vue/src/main/webapp/app/router/index.ts.ejs +19 -3
- package/generators/client/templates/vue/src/main/webapp/app/shared/alert/alert.service.ts.ejs +61 -0
- package/generators/client/templates/vue/src/main/webapp/app/shared/config/axios-interceptor.ts.ejs +0 -2
- package/generators/client/templates/vue/src/main/webapp/app/shared/data/data-utils.service.ts.ejs +3 -1
- package/generators/client/templates/vue/src/main/webapp/app/shims-vue.d.ts.ejs +17 -3
- package/generators/client/templates/vue/src/test/javascript/jest.conf.js.ejs +25 -10
- package/generators/client/templates/vue/src/test/javascript/spec/app/account/account.service.spec.ts.ejs +2 -2
- package/generators/client/templates/vue/src/test/javascript/spec/app/account/login-form/login-form.component.spec.ts.ejs +2 -2
- package/generators/client/templates/vue/src/test/javascript/spec/app/admin/tracker/tracker.component.spec.ts.ejs +12 -12
- package/generators/client/templates/vue/src/test/javascript/spec/app/admin/tracker/tracker.service.spec.ts.ejs +2 -1
- package/generators/client/templates/vue/src/test/javascript/spec/app/admin/user-management/user-management-edit.component.spec.ts.ejs +5 -1
- package/generators/client/templates/vue/src/test/javascript/spec/app/admin/user-management/user-management-view.component.spec.ts.ejs +2 -1
- package/generators/client/templates/vue/src/test/javascript/spec/app/admin/user-management/user-management.component.spec.ts.ejs +5 -1
- package/generators/client/templates/vue/src/test/javascript/spec/app/core/jhi-navbar/jhi-navbar.component.spec.ts.ejs +10 -4
- package/generators/client/templates/vue/src/test/javascript/spec/app/entities/entities-menu.spec.ts.ejs +52 -0
- package/generators/client/templates/vue/src/test/javascript/spec/app/microfrontends/entities-menu.component.ts.ejs +4 -0
- package/generators/client/templates/vue/src/test/javascript/spec/app/microfrontends/entities-menu.vue.ejs +7 -0
- package/generators/client/templates/vue/src/test/javascript/spec/app/microfrontends/entities-router.ts.ejs +1 -0
- package/generators/client/templates/vue/src/test/javascript/spec/app/shared/alert/alert.service.spec.ts.ejs +124 -0
- package/generators/client/templates/vue/src/test/javascript/spec/app/shared/config/axios-interceptor.spec.ts.ejs +0 -1
- package/generators/client/templates/vue/tsconfig.json.ejs +6 -10
- package/generators/client/templates/vue/tsconfig.spec.json.ejs +37 -0
- package/generators/client/templates/vue/webpack/config.js.ejs +50 -0
- package/generators/client/templates/vue/webpack/vue.utils.js.ejs +33 -32
- package/generators/client/templates/vue/webpack/webpack.common.js.ejs +152 -126
- package/generators/client/templates/vue/webpack/webpack.dev.js.ejs +19 -76
- package/generators/client/templates/vue/webpack/webpack.microfrontend.js.jhi.vue.ejs +77 -0
- package/generators/client/templates/vue/webpack/webpack.prod.js.ejs +5 -41
- package/generators/cloudfoundry/index.js +9 -9
- package/generators/common/index.js +12 -10
- package/generators/common/templates/.husky/pre-commit +1 -1
- package/generators/common/templates/.prettierrc.ejs +1 -1
- package/generators/common/templates/README.md.jhi.ejs +21 -0
- package/generators/common/templates/package.json +4 -4
- package/generators/cypress/index.js +12 -9
- package/generators/cypress/templates/cypress.json.ejs +9 -2
- package/generators/cypress/templates/src/test/javascript/cypress/plugins/index.ts.ejs +4 -4
- package/generators/cypress/templates/src/test/javascript/cypress/support/commands.ts.ejs +30 -2
- package/generators/cypress/templates/src/test/javascript/cypress/support/entity.ts.ejs +4 -4
- package/generators/cypress/templates/src/test/javascript/cypress/support/index.ts.ejs +1 -1
- package/generators/cypress/templates/src/test/javascript/cypress/support/management.ts.ejs +1 -1
- package/generators/cypress/templates/src/test/javascript/cypress/support/navbar.ts.ejs +1 -1
- package/generators/database-changelog/index.js +33 -22
- package/generators/database-changelog-liquibase/index.js +12 -8
- package/generators/database-changelog-liquibase/templates/src/main/resources/config/liquibase/changelog/updated_entity_constraints.xml.ejs +1 -1
- package/generators/docker-compose/index.js +11 -12
- package/generators/docker-compose/templates/realm-config/jhipster-realm.json.ejs +13 -12
- package/generators/entities/index.js +35 -26
- package/generators/entities-client/index.js +10 -7
- package/generators/entity/index.js +49 -29
- package/generators/entity-client/files.js +7 -16
- package/generators/entity-client/index.js +74 -11
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/delete/entity-management-delete-dialog.component.spec.ts.ejs +42 -44
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/detail/entity-management-detail.component.spec.ts.ejs +58 -60
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/entity-management.module.ts.ejs +1 -1
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/list/entity-management.component.spec.ts.ejs +105 -107
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/list/entity-management.component.ts.ejs +8 -1
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/route/entity-management-routing-resolve.service.spec.ts.ejs +52 -54
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/route/entity-management-routing.module.ts.ejs +1 -1
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/service/entity.service.spec.ts.ejs +173 -175
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/update/entity-management-update.component.html.ejs +2 -4
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/update/entity-management-update.component.spec.ts.ejs +193 -195
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/update/entity-management-update.component.ts.ejs +7 -0
- package/generators/entity-client/templates/common/src/test/javascript/cypress/integration/entity/entity.spec.ts.ejs +269 -109
- package/generators/entity-client/templates/react/src/main/webapp/app/entities/entity-delete-dialog.tsx.ejs +5 -2
- package/generators/entity-client/templates/react/src/main/webapp/app/entities/entity-update.tsx.ejs +17 -14
- package/generators/entity-client/templates/react/src/main/webapp/app/entities/entity.tsx.ejs +11 -13
- package/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity-details.component.ts.ejs +5 -0
- package/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity-update.component.ts.ejs +23 -8
- package/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity-update.vue.ejs +6 -9
- package/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.component.ts.ejs +9 -1
- package/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.model.ts.ejs +1 -1
- package/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.service.ts.ejs +2 -6
- package/generators/entity-client/templates/vue/src/test/javascript/spec/app/entities/entity-details.component.spec.ts.ejs +2 -1
- package/generators/entity-client/templates/vue/src/test/javascript/spec/app/entities/entity-update.component.spec.ts.ejs +8 -1
- package/generators/entity-client/templates/vue/src/test/javascript/spec/app/entities/entity.component.spec.ts.ejs +8 -2
- package/generators/entity-client/templates/vue/src/test/javascript/spec/app/entities/entity.service.spec.ts.ejs +1 -1
- package/generators/entity-i18n/index.js +7 -4
- package/generators/entity-server/files-couchbase.js +2 -2
- package/generators/entity-server/files.js +35 -30
- package/generators/entity-server/index.js +12 -8
- package/generators/entity-server/templates/couchbase/src/main/java/package/repository/EntityRepository.java.ejs +2 -2
- package/generators/entity-server/templates/couchbase/src/main/resources/config/couchmove/changelog/entity.fts.ejs +1 -1
- package/generators/entity-server/templates/src/main/java/package/domain/Entity.java.jhi.ejs +6 -2
- package/generators/entity-server/templates/src/main/java/package/domain/enumeration/Enum.java.ejs +1 -1
- package/generators/entity-server/templates/src/main/java/package/repository/EntityRepository.java.ejs +2 -2
- package/generators/entity-server/templates/src/main/java/package/repository/EntityRepositoryInternalImpl_reactive.java.ejs +17 -30
- package/generators/entity-server/templates/src/main/java/package/repository/EntityRepository_reactive.java.ejs +5 -5
- package/generators/entity-server/templates/src/main/java/package/repository/EntitySqlHelper_reactive.java.ejs +46 -0
- package/generators/entity-server/templates/src/main/java/package/repository/rowmapper/EntityRowMapper.java.ejs +3 -3
- package/generators/entity-server/templates/src/main/java/package/repository/search/EntitySearchRepository.java.ejs +2 -2
- package/generators/entity-server/templates/src/main/java/package/service/EntityQueryService.java.ejs +8 -8
- package/generators/entity-server/templates/src/main/java/package/service/EntityService.java.ejs +4 -4
- package/generators/entity-server/templates/src/main/java/package/service/criteria/EntityCriteria.java.ejs +4 -4
- package/generators/entity-server/templates/src/main/java/package/service/dto/EntityDTO.java.ejs +7 -3
- package/generators/entity-server/templates/src/main/java/package/service/impl/EntityServiceImpl.java.ejs +8 -8
- package/generators/entity-server/templates/src/main/java/package/service/mapper/BaseEntityMapper.java.ejs +1 -1
- package/generators/entity-server/templates/src/main/java/package/service/mapper/EntityMapper.java.ejs +7 -3
- package/generators/entity-server/templates/src/main/java/package/web/rest/EntityResource.java.ejs +51 -53
- package/generators/entity-server/templates/src/test/java/package/domain/EntityTest.java.ejs +1 -1
- package/generators/entity-server/templates/src/test/java/package/repository/search/EntitySearchRepositoryMockConfiguration.java.ejs +1 -1
- package/generators/entity-server/templates/src/test/java/package/service/dto/EntityDTOTest.java.ejs +1 -1
- package/generators/entity-server/templates/src/test/java/package/service/mapper/EntityMapperTest.java.ejs +1 -1
- package/generators/entity-server/templates/src/test/java/package/web/rest/EntityResourceIT.java.ejs +17 -14
- package/generators/gae/index.js +10 -10
- package/generators/generator-base-blueprint.js +14 -46
- package/generators/generator-base-private.js +42 -22
- package/generators/generator-base.js +57 -20
- package/generators/generator-constants.js +29 -21
- package/generators/generator-transforms.js +39 -27
- package/generators/heroku/index.js +27 -48
- package/generators/init/constants.cjs +1 -1
- package/generators/init/templates/.husky/pre-commit +1 -1
- package/generators/java/constants.cjs +1 -1
- package/generators/kubernetes/files.js +3 -0
- package/generators/kubernetes/index.js +10 -10
- package/generators/kubernetes/templates/db/couchbase.yml.ejs +1 -1
- package/generators/kubernetes/templates/deployment.yml.ejs +8 -3
- package/generators/kubernetes/templates/istio/destination-rule.yml.ejs +1 -1
- package/generators/kubernetes/templates/istio/gateway/grafana-gateway.yml.ejs +5 -2
- package/generators/kubernetes/templates/istio/gateway/jhipster-grafana-gateway.yml.ejs +5 -2
- package/generators/kubernetes/templates/istio/gateway/kiali-gateway.yml.ejs +10 -8
- package/generators/kubernetes/templates/istio/gateway/zipkin-gateway.yml.ejs +5 -2
- package/generators/kubernetes/templates/istio/gateway.yml.ejs +7 -5
- package/generators/kubernetes/templates/secret/couchbase-secret.yml.ejs +9 -0
- package/generators/kubernetes-base.js +1 -0
- package/generators/kubernetes-helm/files.js +3 -8
- package/generators/kubernetes-helm/index.js +10 -10
- package/generators/kubernetes-helm/templates/README-KUBERNETES-HELM.md.ejs +0 -1
- package/generators/kubernetes-helm/templates/app/Chart.yml.ejs +27 -0
- package/generators/kubernetes-helm/templates/app/helpers.tpl.ejs +0 -11
- package/generators/kubernetes-helm/templates/app/requirements.yml.ejs +7 -2
- package/generators/kubernetes-helm/templates/app/values.yml.ejs +68 -5
- package/generators/kubernetes-helm/templates/csvc/Chart.yml.ejs +17 -0
- package/generators/kubernetes-helm/templates/csvc/requirements.yml.ejs +2 -2
- package/generators/kubernetes-knative/index.js +10 -10
- package/generators/kubernetes-knative/templates/istio/gateway.yml.ejs +6 -4
- package/generators/kubernetes-knative/templates/service.yml.ejs +1 -1
- package/generators/languages/index.js +13 -13
- package/generators/languages/templates/src/main/webapp/i18n/hr/reset.json.ejs +1 -2
- package/generators/languages/templates/src/main/webapp/i18n/vi/login.json +1 -1
- package/generators/maven/templates/.mvn/wrapper/maven-wrapper.properties +1 -1
- package/generators/openapi-client/index.js +13 -10
- package/generators/openshift/index.js +10 -11
- package/generators/openshift/templates/deployment.yml.ejs +1 -1
- package/generators/page/index.js +12 -10
- package/generators/server/__snapshots__/generator.spec.mjs.snap +12 -0
- package/generators/server/files-sql.js +52 -0
- package/generators/server/files.js +15 -0
- package/generators/server/index.js +100 -33
- package/generators/server/needle-api/needle-server-cache.js +4 -6
- package/generators/server/templates/.mvn/wrapper/maven-wrapper.properties +1 -1
- package/generators/server/templates/build.gradle.ejs +17 -1
- package/generators/server/templates/gradle.properties.ejs +11 -11
- package/generators/server/templates/npmw +1 -1
- package/generators/server/templates/npmw.cmd +1 -1
- package/generators/server/templates/pom.xml.ejs +128 -9
- package/generators/server/templates/settings.gradle.ejs +9 -0
- package/generators/server/templates/sql/reactive/src/main/java/package/repository/UserSqlHelper.java.ejs +48 -0
- package/generators/server/templates/src/main/docker/app.yml.ejs +2 -1
- package/generators/server/templates/src/main/docker/config/realm-config/jhipster-realm.json.ejs +13 -12
- package/generators/server/templates/src/main/java/package/aop/logging/LoggingAspect.java.ejs +1 -1
- package/generators/server/templates/src/main/java/package/config/DatabaseConfiguration_cassandra.java.ejs +0 -6
- package/generators/server/templates/src/main/java/package/config/DatabaseConfiguration_sql.java.ejs +2 -2
- package/generators/server/templates/src/main/java/package/config/JacksonConfiguration.java.ejs +1 -1
- package/generators/server/templates/src/main/java/package/config/LocaleConfiguration.java.ejs +0 -2
- package/generators/server/templates/src/main/java/package/config/SecurityConfiguration.java.ejs +2 -5
- package/generators/server/templates/src/main/java/package/config/SecurityConfiguration_reactive.java.ejs +9 -1
- package/generators/server/templates/src/main/java/package/config/WebConfigurer.java.ejs +0 -1
- package/generators/server/templates/src/main/java/package/management/SecurityMetersService.java.ejs +68 -0
- package/generators/server/templates/src/main/java/package/repository/UserRepository.java.ejs +0 -23
- package/generators/server/templates/src/main/java/package/security/PersistentTokenRememberMeServices.java.ejs +0 -2
- package/generators/server/templates/src/main/java/package/security/jwt/TokenProvider.java.ejs +29 -4
- package/generators/server/templates/src/main/java/package/security/oauth2/CustomClaimConverter.java.ejs +21 -9
- package/generators/server/templates/src/main/java/package/service/UserService.java.ejs +13 -5
- package/generators/server/templates/src/main/resources/config/application-dev.yml.ejs +1 -1
- package/generators/server/templates/src/main/resources/config/application-prod.yml.ejs +1 -1
- package/generators/server/templates/src/main/resources/config/application.yml.ejs +7 -7
- package/generators/server/templates/src/main/resources/static/microservices_index.html.ejs +1 -1
- package/generators/server/templates/src/test/java/package/management/SecurityMetersServiceTests.java.ejs +113 -0
- package/generators/server/templates/src/test/java/package/security/jwt/JWTFilterTest.java.ejs +6 -1
- package/generators/server/templates/src/test/java/package/security/jwt/TokenProviderSecurityMetersTests.java.ejs +198 -0
- package/generators/server/templates/src/test/java/package/security/jwt/TokenProviderTest.java.ejs +13 -3
- package/generators/server/templates/src/test/java/package/security/oauth2/AuthorizationHeaderUtilTest.java.ejs +16 -2
- package/generators/server/templates/src/test/java/package/security/oauth2/CustomClaimConverterIT.java.ejs +63 -0
- package/generators/spring-controller/index.js +9 -7
- package/generators/spring-service/index.js +10 -7
- package/generators/upgrade/index.js +4 -5
- package/generators/utils.js +2 -2
- package/generators/workspaces/index.js +16 -7
- package/jdl/jhipster/default-application-options.js +9 -7
- package/package.json +23 -23
- package/utils/entity.js +21 -4
- package/utils/field.js +12 -2
- package/utils/multi-step-transform/index.js +8 -8
- package/generators/client/templates/react/.npmrc.ejs +0 -1
- package/generators/client/templates/vue/webpack/dev.env.js.ejs +0 -17
- package/generators/client/templates/vue/webpack/env.js.ejs +0 -67
- package/generators/client/templates/vue/webpack/loader.conf.js.ejs +0 -20
- package/generators/client/templates/vue/webpack/prod.env.js.ejs +0 -15
|
@@ -41,15 +41,13 @@ const { formatDateForChangelog } = require('../utils/liquibase');
|
|
|
41
41
|
const { calculateDbNameWithLimit, hibernateSnakeCase } = require('../utils/db');
|
|
42
42
|
const defaultApplicationOptions = require('../jdl/jhipster/default-application-options');
|
|
43
43
|
const databaseTypes = require('../jdl/jhipster/database-types');
|
|
44
|
+
const { ANGULAR_X: ANGULAR, REACT, VUE, NO: CLIENT_FRAMEWORK_NO } = require('../jdl/jhipster/client-framework-types');
|
|
44
45
|
|
|
45
46
|
const JHIPSTER_CONFIG_DIR = constants.JHIPSTER_CONFIG_DIR;
|
|
46
47
|
const MODULES_HOOK_FILE = `${JHIPSTER_CONFIG_DIR}/modules/jhi-hooks.json`;
|
|
47
48
|
const GENERATOR_JHIPSTER = 'generator-jhipster';
|
|
48
49
|
|
|
49
50
|
const SERVER_MAIN_RES_DIR = constants.SERVER_MAIN_RES_DIR;
|
|
50
|
-
const ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
|
|
51
|
-
const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
|
|
52
|
-
const VUE = constants.SUPPORTED_CLIENT_FRAMEWORKS.VUE;
|
|
53
51
|
|
|
54
52
|
const { ORACLE, MYSQL, POSTGRESQL, MARIADB, MSSQL, SQL, MONGODB, COUCHBASE, NEO4J, CASSANDRA, H2_MEMORY, H2_DISK } = databaseTypes;
|
|
55
53
|
const NO_DATABASE = databaseTypes.NO;
|
|
@@ -159,7 +157,13 @@ module.exports = class JHipsterBaseGenerator extends PrivateBase {
|
|
|
159
157
|
* Alternative templatePath that fetches from the blueprinted generator, instead of the blueprint.
|
|
160
158
|
*/
|
|
161
159
|
jhipsterTemplatePath(...args) {
|
|
162
|
-
|
|
160
|
+
try {
|
|
161
|
+
this._jhipsterGenerator = this._jhipsterGenerator || this.env.requireNamespace(this.options.namespace).generator;
|
|
162
|
+
} catch (error) {
|
|
163
|
+
throw new Error(
|
|
164
|
+
`The Namespace ${this.options.namespace} may not be correct. Please check your configuration and ensure your blueprint folder start with "generator-". Detail: ${error}`
|
|
165
|
+
);
|
|
166
|
+
}
|
|
163
167
|
return this.fetchFromInstalledJHipster(this._jhipsterGenerator, 'templates', ...args);
|
|
164
168
|
}
|
|
165
169
|
|
|
@@ -450,8 +454,8 @@ module.exports = class JHipsterBaseGenerator extends PrivateBase {
|
|
|
450
454
|
} else if (clientFramework === VUE) {
|
|
451
455
|
this.needleApi.clientVue.addEntityToRouterImport(entityName, entityFileName, entityFolderName, readOnly);
|
|
452
456
|
this.needleApi.clientVue.addEntityToRouter(entityInstance, entityName, entityFileName, readOnly);
|
|
453
|
-
this.needleApi.clientVue.
|
|
454
|
-
this.needleApi.clientVue.
|
|
457
|
+
this.needleApi.clientVue.addEntityServiceToEntitiesComponentImport(entityName, entityClass, entityFileName, entityFolderName);
|
|
458
|
+
this.needleApi.clientVue.addEntityServiceToEntitiesComponent(entityInstance, entityName);
|
|
455
459
|
}
|
|
456
460
|
}
|
|
457
461
|
|
|
@@ -1862,16 +1866,22 @@ module.exports = class JHipsterBaseGenerator extends PrivateBase {
|
|
|
1862
1866
|
*/
|
|
1863
1867
|
generateKeyStore() {
|
|
1864
1868
|
const done = this.async();
|
|
1865
|
-
|
|
1869
|
+
|
|
1870
|
+
let keystoreFolder = `${SERVER_MAIN_RES_DIR}config/tls/`;
|
|
1871
|
+
if (this.destinationPath) {
|
|
1872
|
+
keystoreFolder = this.destinationPath(keystoreFolder);
|
|
1873
|
+
}
|
|
1874
|
+
const keyStoreFile = `${keystoreFolder}/keystore.p12`;
|
|
1875
|
+
|
|
1866
1876
|
if (this.fs.exists(keyStoreFile)) {
|
|
1867
1877
|
this.log(chalk.cyan(`\nKeyStore '${keyStoreFile}' already exists. Leaving unchanged.\n`));
|
|
1868
1878
|
done();
|
|
1869
1879
|
} else {
|
|
1870
1880
|
try {
|
|
1871
|
-
shelljs.mkdir('-p',
|
|
1881
|
+
shelljs.mkdir('-p', keystoreFolder);
|
|
1872
1882
|
} catch (error) {
|
|
1873
1883
|
// noticed that on windows the shelljs.mkdir tends to sometimes fail
|
|
1874
|
-
fs.mkdir(
|
|
1884
|
+
fs.mkdir(keystoreFolder, { recursive: true }, err => {
|
|
1875
1885
|
if (err) throw err;
|
|
1876
1886
|
});
|
|
1877
1887
|
}
|
|
@@ -2654,7 +2664,7 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
2654
2664
|
}
|
|
2655
2665
|
|
|
2656
2666
|
if (options.microfrontend) {
|
|
2657
|
-
this.
|
|
2667
|
+
this.warning('Microfrontend option is deprecated.');
|
|
2658
2668
|
}
|
|
2659
2669
|
|
|
2660
2670
|
if (options.reactive !== undefined) {
|
|
@@ -2715,7 +2725,7 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
2715
2725
|
* @param {any} config - config to load config from
|
|
2716
2726
|
* @param {any} dest - destination context to use default is context
|
|
2717
2727
|
*/
|
|
2718
|
-
loadAppConfig(config = _.defaults({}, this.jhipsterConfig,
|
|
2728
|
+
loadAppConfig(config = _.defaults({}, this.jhipsterConfig, this.jhipsterDefaults), dest = this) {
|
|
2719
2729
|
dest.jhipsterVersion = config.jhipsterVersion;
|
|
2720
2730
|
dest.baseName = config.baseName;
|
|
2721
2731
|
dest.applicationType = config.applicationType;
|
|
@@ -2735,12 +2745,18 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
2735
2745
|
dest.pages = config.pages;
|
|
2736
2746
|
dest.skipJhipsterDependencies = !!config.skipJhipsterDependencies;
|
|
2737
2747
|
dest.withAdminUi = config.withAdminUi;
|
|
2738
|
-
dest.microfrontend = config.microfrontend;
|
|
2739
2748
|
dest.gatewayServerPort = config.gatewayServerPort;
|
|
2740
2749
|
|
|
2750
|
+
dest.capitalizedBaseName = config.capitalizedBaseName;
|
|
2751
|
+
dest.dasherizedBaseName = config.dasherizedBaseName;
|
|
2752
|
+
dest.humanizedBaseName = config.humanizedBaseName;
|
|
2753
|
+
dest.projectDescription = config.projectDescription;
|
|
2754
|
+
|
|
2741
2755
|
dest.testFrameworks = config.testFrameworks || [];
|
|
2742
2756
|
dest.cypressCoverage = config.cypressCoverage;
|
|
2743
2757
|
|
|
2758
|
+
dest.remotes = Object.entries(config.applications || {}).map(([baseName, config]) => ({ baseName, ...config })) || [];
|
|
2759
|
+
|
|
2744
2760
|
dest.gatlingTests = dest.testFrameworks.includes(GATLING);
|
|
2745
2761
|
dest.cucumberTests = dest.testFrameworks.includes(CUCUMBER);
|
|
2746
2762
|
dest.protractorTests = dest.testFrameworks.includes(PROTRACTOR);
|
|
@@ -2762,11 +2778,22 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
2762
2778
|
if (dest.baseName) {
|
|
2763
2779
|
dest.camelizedBaseName = _.camelCase(dest.baseName);
|
|
2764
2780
|
dest.hipster = this.getHipster(dest.baseName);
|
|
2765
|
-
dest.capitalizedBaseName = _.upperFirst(dest.baseName);
|
|
2766
|
-
dest.dasherizedBaseName = _.kebabCase(dest.baseName);
|
|
2781
|
+
dest.capitalizedBaseName = dest.capitalizedBaseName || _.upperFirst(dest.baseName);
|
|
2782
|
+
dest.dasherizedBaseName = dest.dasherizedBaseName || _.kebabCase(dest.baseName);
|
|
2767
2783
|
dest.lowercaseBaseName = dest.baseName.toLowerCase();
|
|
2768
|
-
dest.humanizedBaseName =
|
|
2784
|
+
dest.humanizedBaseName =
|
|
2785
|
+
dest.humanizedBaseName || (dest.baseName.toLowerCase() === 'jhipster' ? 'JHipster' : _.startCase(dest.baseName));
|
|
2786
|
+
dest.projectDescription = dest.projectDescription || `Description for ${this.baseName}`;
|
|
2787
|
+
dest.endpointPrefix = !dest.applicationType || dest.applicationTypeMicroservice ? `services/${dest.lowercaseBaseName}` : '';
|
|
2769
2788
|
}
|
|
2789
|
+
|
|
2790
|
+
if (dest.remotes) {
|
|
2791
|
+
dest.remotes.forEach(app => this.loadDerivedAppConfig(app));
|
|
2792
|
+
dest.microfrontends = dest.remotes.filter(r => r.clientFramework && r.clientFramework !== CLIENT_FRAMEWORK_NO);
|
|
2793
|
+
}
|
|
2794
|
+
dest.microfrontend =
|
|
2795
|
+
(dest.applicationTypeMicroservice && !dest.skipClient) ||
|
|
2796
|
+
(dest.applicationTypeGateway && dest.microfrontends && dest.microfrontends.length > 0);
|
|
2770
2797
|
}
|
|
2771
2798
|
|
|
2772
2799
|
/**
|
|
@@ -2776,7 +2803,7 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
2776
2803
|
* @param {any} config - config to load config from
|
|
2777
2804
|
* @param {any} dest - destination context to use default is context
|
|
2778
2805
|
*/
|
|
2779
|
-
loadClientConfig(config = _.defaults({}, this.jhipsterConfig,
|
|
2806
|
+
loadClientConfig(config = _.defaults({}, this.jhipsterConfig, this.jhipsterDefaults), dest = this) {
|
|
2780
2807
|
dest.clientPackageManager = config.clientPackageManager;
|
|
2781
2808
|
dest.clientFramework = config.clientFramework;
|
|
2782
2809
|
dest.clientTheme = config.clientTheme;
|
|
@@ -2807,7 +2834,7 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
2807
2834
|
* @param {any} config - config to load config from
|
|
2808
2835
|
* @param {any} dest - destination context to use default is context
|
|
2809
2836
|
*/
|
|
2810
|
-
loadTranslationConfig(config = _.defaults({}, this.jhipsterConfig,
|
|
2837
|
+
loadTranslationConfig(config = _.defaults({}, this.jhipsterConfig, this.jhipsterDefaults), dest = this) {
|
|
2811
2838
|
dest.enableTranslation = config.enableTranslation;
|
|
2812
2839
|
dest.nativeLanguage = config.nativeLanguage;
|
|
2813
2840
|
dest.languages = config.languages;
|
|
@@ -2820,7 +2847,7 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
2820
2847
|
* @param {any} config - config to load config from
|
|
2821
2848
|
* @param {any} dest - destination context to use default is context
|
|
2822
2849
|
*/
|
|
2823
|
-
loadServerConfig(config = _.defaults({}, this.jhipsterConfig,
|
|
2850
|
+
loadServerConfig(config = _.defaults({}, this.jhipsterConfig, this.jhipsterDefaults), dest = this) {
|
|
2824
2851
|
dest.packageName = config.packageName;
|
|
2825
2852
|
dest.packageFolder = config.packageFolder;
|
|
2826
2853
|
dest.serverPort = config.serverPort;
|
|
@@ -2934,7 +2961,7 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
2934
2961
|
[MYSQL, POSTGRESQL, MSSQL, MARIADB].includes(dest.devDatabaseType));
|
|
2935
2962
|
}
|
|
2936
2963
|
|
|
2937
|
-
loadPlatformConfig(config = _.defaults({}, this.jhipsterConfig,
|
|
2964
|
+
loadPlatformConfig(config = _.defaults({}, this.jhipsterConfig, this.jhipsterDefaults), dest = this) {
|
|
2938
2965
|
dest.serviceDiscoveryType = config.serviceDiscoveryType;
|
|
2939
2966
|
dest.monitoring = config.monitoring;
|
|
2940
2967
|
this.loadDerivedPlatformConfig(dest);
|
|
@@ -3004,11 +3031,21 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
3004
3031
|
return this._needleApi;
|
|
3005
3032
|
}
|
|
3006
3033
|
|
|
3034
|
+
/**
|
|
3035
|
+
* Default config based on current applicationType
|
|
3036
|
+
*/
|
|
3037
|
+
get jhipsterDefaults() {
|
|
3038
|
+
return this.getDefaultConfigForApplicationType();
|
|
3039
|
+
}
|
|
3040
|
+
|
|
3007
3041
|
/**
|
|
3008
3042
|
* Get default config based on applicationType
|
|
3009
3043
|
*/
|
|
3010
3044
|
getDefaultConfigForApplicationType(applicationType = this.jhipsterConfig.applicationType) {
|
|
3011
|
-
return {
|
|
3045
|
+
return {
|
|
3046
|
+
...defaultApplicationOptions.getConfigForApplicationType(applicationType),
|
|
3047
|
+
...(applicationType === MICROSERVICE ? defaultConfigMicroservice : defaultConfig),
|
|
3048
|
+
};
|
|
3012
3049
|
}
|
|
3013
3050
|
|
|
3014
3051
|
setConfigDefaults(defaults = this.jhipsterConfig.applicationType === MICROSERVICE ? defaultConfigMicroservice : defaultConfig) {
|
|
@@ -22,10 +22,11 @@ const { ANGULAR_X, REACT, VUE } = require('../jdl/jhipster/client-framework-type
|
|
|
22
22
|
const commonPackageJson = require('./common/templates/package.json');
|
|
23
23
|
|
|
24
24
|
// Version of Java
|
|
25
|
-
const JAVA_VERSION = '11';
|
|
25
|
+
const JAVA_VERSION = '11';
|
|
26
|
+
const JAVA_COMPATIBLE_VERSIONS = ['11', '12', '13', '14', '15', '16', '17'];
|
|
26
27
|
|
|
27
28
|
// Version of Node, NPM
|
|
28
|
-
const NODE_VERSION = '14.
|
|
29
|
+
const NODE_VERSION = '14.18.1';
|
|
29
30
|
const NPM_VERSION = commonPackageJson.devDependencies.npm;
|
|
30
31
|
const OPENAPI_GENERATOR_CLI_VERSION = '1.0.13-4.3.1';
|
|
31
32
|
|
|
@@ -33,10 +34,10 @@ const GRADLE_VERSION = '7.0.2';
|
|
|
33
34
|
const JIB_VERSION = '3.1.4';
|
|
34
35
|
|
|
35
36
|
// Libraries version
|
|
36
|
-
const JHIPSTER_DEPENDENCIES_VERSION = '7.
|
|
37
|
+
const JHIPSTER_DEPENDENCIES_VERSION = '7.4.1';
|
|
37
38
|
// The spring-boot version should match the one managed by https://mvnrepository.com/artifact/tech.jhipster/jhipster-dependencies/JHIPSTER_DEPENDENCIES_VERSION
|
|
38
|
-
const SPRING_BOOT_VERSION = '2.5.
|
|
39
|
-
const LIQUIBASE_VERSION = '4.
|
|
39
|
+
const SPRING_BOOT_VERSION = '2.5.7';
|
|
40
|
+
const LIQUIBASE_VERSION = '4.6.1';
|
|
40
41
|
const LIQUIBASE_DTD_VERSION = LIQUIBASE_VERSION.split('.', 3).slice(0, 2).join('.');
|
|
41
42
|
const HIBERNATE_VERSION = '5.4.32.Final';
|
|
42
43
|
|
|
@@ -46,30 +47,31 @@ const JACKSON_DATABIND_NULLABLE_VERSION = '0.2.1';
|
|
|
46
47
|
|
|
47
48
|
// Version of docker images
|
|
48
49
|
const DOCKER_COMPOSE_FORMAT_VERSION = '3.8';
|
|
49
|
-
const DOCKER_JHIPSTER_REGISTRY = 'jhipster/jhipster-registry:
|
|
50
|
+
// const DOCKER_JHIPSTER_REGISTRY = 'ghcr.io/jhipster/jhipster-registry:main';
|
|
51
|
+
const DOCKER_JHIPSTER_REGISTRY = 'jhipster/jhipster-registry:v7.1.0';
|
|
50
52
|
const DOCKER_JHIPSTER_CONTROL_CENTER = 'jhipster/jhipster-control-center:v0.5.0';
|
|
51
53
|
const DOCKER_JAVA_JRE = 'eclipse-temurin:11-jre-focal';
|
|
52
|
-
const DOCKER_MYSQL = 'mysql:8.0.
|
|
53
|
-
const DOCKER_MARIADB = 'mariadb:10.
|
|
54
|
-
const DOCKER_POSTGRESQL = 'postgres:13.
|
|
55
|
-
const DOCKER_MONGODB = 'mongo:4.4.
|
|
54
|
+
const DOCKER_MYSQL = 'mysql:8.0.27';
|
|
55
|
+
const DOCKER_MARIADB = 'mariadb:10.7.1';
|
|
56
|
+
const DOCKER_POSTGRESQL = 'postgres:13.5';
|
|
57
|
+
const DOCKER_MONGODB = 'mongo:4.4.10';
|
|
56
58
|
const DOCKER_COUCHBASE = 'couchbase/server:7.0.0';
|
|
57
59
|
const DOCKER_CASSANDRA = 'cassandra:3.11.11';
|
|
58
|
-
const DOCKER_MSSQL = 'mcr.microsoft.com/mssql/server:2019-
|
|
59
|
-
const DOCKER_NEO4J = 'neo4j:4.
|
|
60
|
+
const DOCKER_MSSQL = 'mcr.microsoft.com/mssql/server:2019-CU13-ubuntu-20.04';
|
|
61
|
+
const DOCKER_NEO4J = 'neo4j:4.3.7';
|
|
60
62
|
const DOCKER_HAZELCAST_MANAGEMENT_CENTER = 'hazelcast/management-center:4.2021.06';
|
|
61
|
-
const DOCKER_MEMCACHED = 'memcached:1.6.
|
|
62
|
-
const DOCKER_REDIS = 'redis:6.2.
|
|
63
|
-
const DOCKER_KEYCLOAK = 'jboss/keycloak:
|
|
63
|
+
const DOCKER_MEMCACHED = 'memcached:1.6.12-alpine';
|
|
64
|
+
const DOCKER_REDIS = 'redis:6.2.6';
|
|
65
|
+
const DOCKER_KEYCLOAK = 'jboss/keycloak:15.0.2'; // The version should match the attribute 'keycloakVersion' from /docker-compose/templates/realm-config/jhipster-realm.json.ejs and /server/templates/src/main/docker/config/realm-config/jhipster-realm.json.ejs
|
|
64
66
|
const DOCKER_ELASTICSEARCH = 'docker.elastic.co/elasticsearch/elasticsearch:7.13.3'; // The version should be coherent with the one from spring-data-elasticsearch project
|
|
65
67
|
const DOCKER_KAFKA = `confluentinc/cp-kafka:${KAFKA_VERSION}`;
|
|
66
68
|
const DOCKER_ZOOKEEPER = `confluentinc/cp-zookeeper:${KAFKA_VERSION}`;
|
|
67
|
-
const DOCKER_SONAR = 'sonarqube:
|
|
68
|
-
const DOCKER_CONSUL = 'consul:1.
|
|
69
|
+
const DOCKER_SONAR = 'sonarqube:9.1.0-community';
|
|
70
|
+
const DOCKER_CONSUL = 'consul:1.10.4';
|
|
69
71
|
const DOCKER_CONSUL_CONFIG_LOADER = 'jhipster/consul-config-loader:v0.4.1';
|
|
70
|
-
const DOCKER_PROMETHEUS = 'prom/prometheus:v2.
|
|
72
|
+
const DOCKER_PROMETHEUS = 'prom/prometheus:v2.31.1';
|
|
71
73
|
const DOCKER_PROMETHEUS_ALERTMANAGER = 'prom/alertmanager:v0.23.0';
|
|
72
|
-
const DOCKER_GRAFANA = 'grafana/grafana:8.
|
|
74
|
+
const DOCKER_GRAFANA = 'grafana/grafana:8.2.4';
|
|
73
75
|
const DOCKER_JENKINS = 'jenkins/jenkins:lts-jdk11';
|
|
74
76
|
const DOCKER_SWAGGER_EDITOR = 'swaggerapi/swagger-editor:latest';
|
|
75
77
|
const DOCKER_PROMETHEUS_OPERATOR = 'quay.io/coreos/prometheus-operator:v0.42.1';
|
|
@@ -81,7 +83,7 @@ const KUBERNETES_BATCH_API_VERSION = 'batch/v1';
|
|
|
81
83
|
const KUBERNETES_DEPLOYMENT_API_VERSION = 'apps/v1';
|
|
82
84
|
const KUBERNETES_STATEFULSET_API_VERSION = 'apps/v1';
|
|
83
85
|
const KUBERNETES_INGRESS_API_VERSION = 'networking.k8s.io/v1beta1';
|
|
84
|
-
const KUBERNETES_ISTIO_NETWORKING_API_VERSION = 'networking.istio.io/
|
|
86
|
+
const KUBERNETES_ISTIO_NETWORKING_API_VERSION = 'networking.istio.io/v1beta1';
|
|
85
87
|
const KUBERNETES_RBAC_API_VERSION = 'rbac.authorization.k8s.io/v1';
|
|
86
88
|
|
|
87
89
|
// Helm versions
|
|
@@ -93,6 +95,7 @@ const HELM_MYSQL = '^1.4.0';
|
|
|
93
95
|
const HELM_MARIADB = '^6.12.2';
|
|
94
96
|
const HELM_POSTGRESQL = '^6.5.3';
|
|
95
97
|
const HELM_MOGODB_REPLICASET = '^3.10.1';
|
|
98
|
+
const HELM_COUCHBASE_OPERATOR = '^2.2.1';
|
|
96
99
|
|
|
97
100
|
// all constants used throughout all generators
|
|
98
101
|
|
|
@@ -246,10 +249,13 @@ const LANGUAGES = [
|
|
|
246
249
|
name: 'Indonesian',
|
|
247
250
|
dispName: 'Bahasa Indonesia',
|
|
248
251
|
/*
|
|
249
|
-
|
|
252
|
+
JDK <17 ("Indonesian Locale does not comply with ISO 639")
|
|
250
253
|
The locale is set to "in" for Indonesia
|
|
251
254
|
See https://bugs.openjdk.java.net/browse/JDK-6457127
|
|
252
255
|
And https://github.com/jhipster/generator-jhipster/issues/9494
|
|
256
|
+
Java 17 supports 'id' locale, for compatibility with java 11, we will keep legacy 'in' value while we support java 11.
|
|
257
|
+
When running with java 17 users must set 'java.locale.useOldISOCodes=true' environment variable.
|
|
258
|
+
See https://bugs.openjdk.java.net/browse/JDK-8267069.
|
|
253
259
|
*/
|
|
254
260
|
value: 'in',
|
|
255
261
|
localeId: 'id',
|
|
@@ -378,6 +384,7 @@ const constants = {
|
|
|
378
384
|
DOCKER_PROMETHEUS_ALERTMANAGER,
|
|
379
385
|
DOCKER_GRAFANA,
|
|
380
386
|
JAVA_VERSION,
|
|
387
|
+
JAVA_COMPATIBLE_VERSIONS,
|
|
381
388
|
KAFKA_VERSION,
|
|
382
389
|
GRADLE_VERSION,
|
|
383
390
|
|
|
@@ -419,6 +426,7 @@ const constants = {
|
|
|
419
426
|
HELM_MARIADB,
|
|
420
427
|
HELM_POSTGRESQL,
|
|
421
428
|
HELM_MOGODB_REPLICASET,
|
|
429
|
+
HELM_COUCHBASE_OPERATOR,
|
|
422
430
|
};
|
|
423
431
|
|
|
424
432
|
module.exports = constants;
|
|
@@ -18,24 +18,31 @@
|
|
|
18
18
|
*/
|
|
19
19
|
const { State } = require('mem-fs-editor');
|
|
20
20
|
const path = require('path');
|
|
21
|
-
const {
|
|
21
|
+
const { passthrough } = require('p-transform');
|
|
22
22
|
const prettier = require('prettier');
|
|
23
23
|
const prettierPluginJava = require('prettier-plugin-java');
|
|
24
24
|
const prettierPluginPackagejson = require('prettier-plugin-packagejson');
|
|
25
|
+
const { patternSpy } = require('yeoman-environment/transform');
|
|
25
26
|
|
|
26
27
|
const { isFileStateDeleted } = State;
|
|
27
28
|
|
|
28
|
-
const prettierTransform = function (options, generator,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
const prettierTransform = function (options, generator, transformOptions = {}) {
|
|
30
|
+
if (typeof transformOptions === 'boolean') {
|
|
31
|
+
transformOptions = { ignoreErrors: transformOptions };
|
|
32
|
+
}
|
|
33
|
+
const { ignoreErrors = false, extensions = generator.getPrettierExtensions() } = transformOptions;
|
|
34
|
+
return patternSpy(
|
|
35
|
+
async file => {
|
|
36
|
+
if (isFileStateDeleted(file)) {
|
|
37
|
+
return file;
|
|
38
|
+
}
|
|
39
|
+
if (!file.contents) {
|
|
40
|
+
throw new Error(`File content doesn't exist for ${file.relative}`);
|
|
41
|
+
}
|
|
42
|
+
/* resolve from the projects config */
|
|
43
|
+
let fileContent;
|
|
44
|
+
try {
|
|
45
|
+
const resolvedDestinationFileOptions = await prettier.resolveConfig(file.relative);
|
|
39
46
|
const prettierOptions = {
|
|
40
47
|
plugins: [],
|
|
41
48
|
// Config from disk
|
|
@@ -52,27 +59,33 @@ const prettierTransform = function (options, generator, ignoreErrors = false) {
|
|
|
52
59
|
fileContent = file.contents.toString('utf8');
|
|
53
60
|
const data = prettier.format(fileContent, prettierOptions);
|
|
54
61
|
file.contents = Buffer.from(data);
|
|
55
|
-
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
|
|
62
|
+
return file;
|
|
63
|
+
} catch (error) {
|
|
64
|
+
let errorMessage;
|
|
65
|
+
if (fileContent) {
|
|
66
|
+
errorMessage = `Error parsing file ${file.relative}: ${error}
|
|
59
67
|
|
|
60
68
|
At: ${fileContent
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
69
|
+
.split('\n')
|
|
70
|
+
.map((value, idx) => `${idx + 1}: ${value}`)
|
|
71
|
+
.join('\n')}`;
|
|
72
|
+
} else {
|
|
73
|
+
errorMessage = `Unknown prettier error: ${error}`;
|
|
74
|
+
}
|
|
64
75
|
if (ignoreErrors) {
|
|
65
76
|
generator.warning(errorMessage);
|
|
66
|
-
|
|
67
|
-
} else {
|
|
68
|
-
callback(new Error(errorMessage));
|
|
77
|
+
return file;
|
|
69
78
|
}
|
|
70
|
-
|
|
71
|
-
|
|
79
|
+
throw new Error(errorMessage);
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
`**/*.{${extensions}}`,
|
|
83
|
+
{ dot: true }
|
|
84
|
+
).name('jhipster:prettier');
|
|
72
85
|
};
|
|
73
86
|
|
|
74
87
|
const generatedAnnotationTransform = generator => {
|
|
75
|
-
return
|
|
88
|
+
return passthrough(file => {
|
|
76
89
|
if (
|
|
77
90
|
!file.path.endsWith('package-info.java') &&
|
|
78
91
|
!file.path.endsWith('MavenWrapperDownloader.java') &&
|
|
@@ -92,8 +105,7 @@ const generatedAnnotationTransform = generator => {
|
|
|
92
105
|
file.contents = Buffer.from(newContent);
|
|
93
106
|
}
|
|
94
107
|
}
|
|
95
|
-
|
|
96
|
-
});
|
|
108
|
+
}, 'jhipster:generated-by-annotation');
|
|
97
109
|
};
|
|
98
110
|
|
|
99
111
|
module.exports = {
|
|
@@ -39,8 +39,6 @@ const { EUREKA } = require('../../jdl/jhipster/service-discovery-types');
|
|
|
39
39
|
const NO_CACHE_PROVIDER = cacheProviderOptions.NO;
|
|
40
40
|
const execCmd = util.promisify(ChildProcess.exec);
|
|
41
41
|
|
|
42
|
-
let useBlueprints;
|
|
43
|
-
|
|
44
42
|
module.exports = class extends BaseBlueprintGenerator {
|
|
45
43
|
constructor(args, options, features) {
|
|
46
44
|
super(args, options, features);
|
|
@@ -64,8 +62,12 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
64
62
|
this.randomPassword = crypto.randomBytes(20).toString('hex');
|
|
65
63
|
this.herokuSkipBuild = this.options.skipBuild;
|
|
66
64
|
this.herokuSkipDeploy = this.options.skipDeploy || this.options.skipBuild;
|
|
65
|
+
}
|
|
67
66
|
|
|
68
|
-
|
|
67
|
+
async _postConstruct() {
|
|
68
|
+
if (!this.fromBlueprint) {
|
|
69
|
+
await this.composeWithBlueprints(GENERATOR_HEROKU);
|
|
70
|
+
}
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
_initializing() {
|
|
@@ -99,7 +101,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
99
101
|
}
|
|
100
102
|
|
|
101
103
|
get initializing() {
|
|
102
|
-
if (
|
|
104
|
+
if (this.delegateToBlueprint) return {};
|
|
103
105
|
return this._initializing();
|
|
104
106
|
}
|
|
105
107
|
|
|
@@ -191,29 +193,8 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
191
193
|
type: 'list',
|
|
192
194
|
name: 'herokuJavaVersion',
|
|
193
195
|
message: 'Which Java version would you like to use to build and run your app ?',
|
|
194
|
-
choices:
|
|
195
|
-
|
|
196
|
-
value: '1.8',
|
|
197
|
-
name: '1.8',
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
value: '11',
|
|
201
|
-
name: '11',
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
value: '12',
|
|
205
|
-
name: '12',
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
value: '13',
|
|
209
|
-
name: '13',
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
value: '14',
|
|
213
|
-
name: '14',
|
|
214
|
-
},
|
|
215
|
-
],
|
|
216
|
-
default: 1,
|
|
196
|
+
choices: constants.JAVA_COMPATIBLE_VERSIONS.map(version => ({ value: version })),
|
|
197
|
+
default: constants.JAVA_VERSION,
|
|
217
198
|
},
|
|
218
199
|
];
|
|
219
200
|
|
|
@@ -244,6 +225,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
244
225
|
default: 1,
|
|
245
226
|
},
|
|
246
227
|
{
|
|
228
|
+
when: answers => answers.useOkta,
|
|
247
229
|
type: 'input',
|
|
248
230
|
name: 'oktaAdminLogin',
|
|
249
231
|
message: 'Login (valid email) for the JHipster Admin user:',
|
|
@@ -254,27 +236,21 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
254
236
|
return true;
|
|
255
237
|
},
|
|
256
238
|
},
|
|
257
|
-
{
|
|
258
|
-
type: 'confirm',
|
|
259
|
-
name: 'oktaAdminPassword',
|
|
260
|
-
message: `${chalk.blue('Take note of this password!')} You will need it on your first login: ${chalk.blue(
|
|
261
|
-
this.randomPassword
|
|
262
|
-
)}`,
|
|
263
|
-
default: true,
|
|
264
|
-
},
|
|
265
239
|
];
|
|
266
240
|
|
|
267
241
|
return this.prompt(prompts).then(props => {
|
|
268
242
|
this.useOkta = props.useOkta;
|
|
269
|
-
this.
|
|
270
|
-
|
|
243
|
+
if (this.useOkta) {
|
|
244
|
+
this.oktaAdminLogin = props.oktaAdminLogin;
|
|
245
|
+
this.oktaAdminPassword = this.randomPassword;
|
|
246
|
+
}
|
|
271
247
|
});
|
|
272
248
|
},
|
|
273
249
|
};
|
|
274
250
|
}
|
|
275
251
|
|
|
276
252
|
get prompting() {
|
|
277
|
-
if (
|
|
253
|
+
if (this.delegateToBlueprint) return {};
|
|
278
254
|
return this._prompting();
|
|
279
255
|
}
|
|
280
256
|
|
|
@@ -300,14 +276,13 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
300
276
|
herokuJavaVersion: this.herokuJavaVersion,
|
|
301
277
|
useOkta: this.useOkta,
|
|
302
278
|
oktaAdminLogin: this.oktaAdminLogin,
|
|
303
|
-
oktaAdminPassword: this.oktaAdminPassword,
|
|
304
279
|
});
|
|
305
280
|
},
|
|
306
281
|
};
|
|
307
282
|
}
|
|
308
283
|
|
|
309
284
|
get configuring() {
|
|
310
|
-
if (
|
|
285
|
+
if (this.delegateToBlueprint) return {};
|
|
311
286
|
return this._configuring();
|
|
312
287
|
}
|
|
313
288
|
|
|
@@ -327,7 +302,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
327
302
|
}
|
|
328
303
|
|
|
329
304
|
get loading() {
|
|
330
|
-
if (
|
|
305
|
+
if (this.delegateToBlueprint) return {};
|
|
331
306
|
return this._loading();
|
|
332
307
|
}
|
|
333
308
|
|
|
@@ -391,7 +366,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
391
366
|
const regionParams = this.herokuRegion !== 'us' ? ` --region ${this.herokuRegion}` : '';
|
|
392
367
|
|
|
393
368
|
this.log(chalk.bold('\nCreating Heroku application and setting up node environment'));
|
|
394
|
-
const child = ChildProcess.exec(`heroku create ${this.herokuAppName}${regionParams}`, (err, stdout, stderr) => {
|
|
369
|
+
const child = ChildProcess.exec(`heroku create ${this.herokuAppName}${regionParams}`, { timeout: 6000 }, (err, stdout, stderr) => {
|
|
395
370
|
if (err) {
|
|
396
371
|
if (stderr.includes('is already taken')) {
|
|
397
372
|
const prompts = [
|
|
@@ -458,7 +433,11 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
458
433
|
});
|
|
459
434
|
} else {
|
|
460
435
|
this.abort = true;
|
|
461
|
-
|
|
436
|
+
if (stderr.includes('Invalid credentials')) {
|
|
437
|
+
this.log.error("Error: Not authenticated. Run 'heroku login' to login to your heroku account and try again.");
|
|
438
|
+
} else {
|
|
439
|
+
this.log.error(err);
|
|
440
|
+
}
|
|
462
441
|
done();
|
|
463
442
|
}
|
|
464
443
|
} else {
|
|
@@ -598,7 +577,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
598
577
|
}
|
|
599
578
|
|
|
600
579
|
get default() {
|
|
601
|
-
if (
|
|
580
|
+
if (this.delegateToBlueprint) return {};
|
|
602
581
|
return this._default();
|
|
603
582
|
}
|
|
604
583
|
|
|
@@ -645,7 +624,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
645
624
|
}
|
|
646
625
|
|
|
647
626
|
get writing() {
|
|
648
|
-
if (
|
|
627
|
+
if (this.delegateToBlueprint) return {};
|
|
649
628
|
return this._writing();
|
|
650
629
|
}
|
|
651
630
|
|
|
@@ -779,7 +758,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
779
758
|
this.log(chalk.yellow('After you have installed jq execute ./provision-okta-addon.sh manually.'));
|
|
780
759
|
}
|
|
781
760
|
if (curlAvailable && jqAvailable) {
|
|
782
|
-
this.log(chalk.green('Running ./provision-okta-addon.sh to create all required roles and users
|
|
761
|
+
this.log(chalk.green('Running ./provision-okta-addon.sh to create all required roles and users for JHipster.'));
|
|
783
762
|
try {
|
|
784
763
|
await execCmd('./provision-okta-addon.sh');
|
|
785
764
|
this.log(chalk.bold('\nOkta configured successfully!'));
|
|
@@ -850,7 +829,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
850
829
|
this.log(chalk.yellow('After you have installed jq execute ./provision-okta-addon.sh manually.'));
|
|
851
830
|
}
|
|
852
831
|
if (curlAvailable && jqAvailable) {
|
|
853
|
-
this.log(chalk.green('Running ./provision-okta-addon.sh to create all required roles and users
|
|
832
|
+
this.log(chalk.green('Running ./provision-okta-addon.sh to create all required roles and users for JHipster.'));
|
|
854
833
|
try {
|
|
855
834
|
await execCmd('./provision-okta-addon.sh');
|
|
856
835
|
this.log(chalk.bold('\nOkta configured successfully!'));
|
|
@@ -873,7 +852,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
873
852
|
}
|
|
874
853
|
|
|
875
854
|
get end() {
|
|
876
|
-
if (
|
|
855
|
+
if (this.delegateToBlueprint) return {};
|
|
877
856
|
return this._end();
|
|
878
857
|
}
|
|
879
858
|
};
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
const NODE_VERSION = '14.
|
|
19
|
+
const NODE_VERSION = '14.18.1';
|
|
20
20
|
|
|
21
21
|
const PRETTIER_DEFAULT_INDENT = 'prettierDefaultIndent';
|
|
22
22
|
const PRETTIER_DEFAULT_INDENT_DEFAULT_VALUE = 2;
|
|
@@ -20,7 +20,7 @@ const { MAVEN: BUILD_TOOL_MAVEN, MAVEN_DESCRIPTION, BUILD_DESTINATION_VALUE } =
|
|
|
20
20
|
const { GRADLE: BUILD_TOOL_GRADLE, GRADLE_DESCRIPTION } = require('../gradle/constants.cjs');
|
|
21
21
|
|
|
22
22
|
const JAVA_VERSION = '11';
|
|
23
|
-
const JAVA_COMPATIBLE_VERSIONS = ['
|
|
23
|
+
const JAVA_COMPATIBLE_VERSIONS = ['11', '12', '13', '14', '15', '16', '17'];
|
|
24
24
|
const JAVA_APP_VERSION = '0.0.1-SNAPSHOT';
|
|
25
25
|
const JAVA_SOURCE_DIR = 'src/main/java/';
|
|
26
26
|
const JAVA_RESOURCE_DIR = 'src/main/resources/';
|
|
@@ -57,6 +57,9 @@ function writeFiles() {
|
|
|
57
57
|
if (!this.app.serviceDiscoveryType && this.app.authenticationType === JWT) {
|
|
58
58
|
this.template('secret/jwt-secret.yml.ejs', `${appOut}/jwt-secret.yml`);
|
|
59
59
|
}
|
|
60
|
+
if (this.app.prodDatabaseTypeCouchbase) {
|
|
61
|
+
this.template('secret/couchbase-secret.yml.ejs', `${appOut}/templates/couchbase-secret.yml`);
|
|
62
|
+
}
|
|
60
63
|
if (this.monitoring === PROMETHEUS) {
|
|
61
64
|
this.template('monitoring/jhipster-prometheus-sm.yml.ejs', `${appOut}/${appName}-prometheus-sm.yml`);
|
|
62
65
|
}
|