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
|
@@ -25,8 +25,6 @@ const prettierConfigFiles = require('./files').prettierConfigFiles;
|
|
|
25
25
|
const constants = require('../generator-constants');
|
|
26
26
|
const packageJson = require('../../package.json');
|
|
27
27
|
|
|
28
|
-
let useBlueprints;
|
|
29
|
-
|
|
30
28
|
module.exports = class JHipsterCommonGenerator extends BaseBlueprintGenerator {
|
|
31
29
|
constructor(args, options, features) {
|
|
32
30
|
super(args, options, { unique: 'namespace', ...features });
|
|
@@ -37,8 +35,12 @@ module.exports = class JHipsterCommonGenerator extends BaseBlueprintGenerator {
|
|
|
37
35
|
|
|
38
36
|
this.loadStoredAppOptions();
|
|
39
37
|
this.loadRuntimeOptions();
|
|
38
|
+
}
|
|
40
39
|
|
|
41
|
-
|
|
40
|
+
async _postConstruct() {
|
|
41
|
+
if (!this.fromBlueprint) {
|
|
42
|
+
await this.composeWithBlueprints('common');
|
|
43
|
+
}
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
// Public API method used by the getter and also by Blueprints
|
|
@@ -64,7 +66,7 @@ module.exports = class JHipsterCommonGenerator extends BaseBlueprintGenerator {
|
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
get initializing() {
|
|
67
|
-
if (
|
|
69
|
+
if (this.delegateToBlueprint) return {};
|
|
68
70
|
return this._initializing();
|
|
69
71
|
}
|
|
70
72
|
|
|
@@ -88,7 +90,7 @@ module.exports = class JHipsterCommonGenerator extends BaseBlueprintGenerator {
|
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
get configuring() {
|
|
91
|
-
if (
|
|
93
|
+
if (this.delegateToBlueprint) return {};
|
|
92
94
|
return this._configuring();
|
|
93
95
|
}
|
|
94
96
|
|
|
@@ -122,7 +124,7 @@ module.exports = class JHipsterCommonGenerator extends BaseBlueprintGenerator {
|
|
|
122
124
|
}
|
|
123
125
|
|
|
124
126
|
get loading() {
|
|
125
|
-
if (
|
|
127
|
+
if (this.delegateToBlueprint) return {};
|
|
126
128
|
return this._loading();
|
|
127
129
|
}
|
|
128
130
|
|
|
@@ -137,7 +139,7 @@ module.exports = class JHipsterCommonGenerator extends BaseBlueprintGenerator {
|
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
get preparing() {
|
|
140
|
-
if (
|
|
142
|
+
if (this.delegateToBlueprint) return {};
|
|
141
143
|
return this._preparing();
|
|
142
144
|
}
|
|
143
145
|
|
|
@@ -149,7 +151,7 @@ module.exports = class JHipsterCommonGenerator extends BaseBlueprintGenerator {
|
|
|
149
151
|
}
|
|
150
152
|
|
|
151
153
|
get default() {
|
|
152
|
-
if (
|
|
154
|
+
if (this.delegateToBlueprint) return {};
|
|
153
155
|
return this._default();
|
|
154
156
|
}
|
|
155
157
|
|
|
@@ -173,7 +175,7 @@ module.exports = class JHipsterCommonGenerator extends BaseBlueprintGenerator {
|
|
|
173
175
|
}
|
|
174
176
|
|
|
175
177
|
get writing() {
|
|
176
|
-
if (
|
|
178
|
+
if (this.delegateToBlueprint) return {};
|
|
177
179
|
return this._writing();
|
|
178
180
|
}
|
|
179
181
|
|
|
@@ -195,7 +197,7 @@ module.exports = class JHipsterCommonGenerator extends BaseBlueprintGenerator {
|
|
|
195
197
|
}
|
|
196
198
|
|
|
197
199
|
get postWriting() {
|
|
198
|
-
if (
|
|
200
|
+
if (this.delegateToBlueprint) return {};
|
|
199
201
|
return this._postWriting();
|
|
200
202
|
}
|
|
201
203
|
};
|
|
@@ -46,6 +46,27 @@ This is a "<%= applicationType %>" application intended to be part of a microser
|
|
|
46
46
|
This application is configured for Service Discovery and Configuration with <% if (serviceDiscoveryEureka) { %>the JHipster-Registry<% } %><% if (serviceDiscoveryConsul) { %>Consul<% } %>. On launch, it will refuse to start if it is not able to connect to <% if (serviceDiscoveryEureka) { %>the JHipster-Registry at [http://localhost:8761](http://localhost:8761)<% } %><% if (serviceDiscoveryConsul) { %>Consul at [http://localhost:8500](http://localhost:8500)<% } %>.<% if (serviceDiscoveryEureka) { %> For more information, read our documentation on [Service Discovery and Configuration with the JHipster-Registry][].<% } %><% if (serviceDiscoveryConsul) { %> For more information, read our documentation on [Service Discovery and Configuration with Consul][].<% } %>
|
|
47
47
|
<%_ } _%>
|
|
48
48
|
|
|
49
|
+
## Project Structure
|
|
50
|
+
|
|
51
|
+
Node is required for generation and recommended for development. `package.json` is always generated for a better development experience with prettier, commit hooks, scripts and so on.
|
|
52
|
+
|
|
53
|
+
In the project root, JHipster generates configuration files for tools like git, prettier, eslint, husk, and others that are well known and you can find references in the web.
|
|
54
|
+
|
|
55
|
+
<%_ if (configOptions.backendName === 'Java') { %>
|
|
56
|
+
`/src/*` structure follows default <%= configOptions.backendName %> structure.
|
|
57
|
+
|
|
58
|
+
<%_ } _%>
|
|
59
|
+
- `.yo-rc.json` - Yeoman configuration file
|
|
60
|
+
JHipster configuration is stored in this file at `generator-jhipster` key. You may find `generator-jhipster-*` for specific blueprints configuration.
|
|
61
|
+
- `.yo-resolve` (optional) - Yeoman conflict resolver
|
|
62
|
+
Allows to use a specific action when conflicts are found skipping prompts for files that matches a pattern. Each line should match `[pattern] [action]` with pattern been a [Minimatch](https://github.com/isaacs/minimatch#minimatch) pattern and action been one of skip (default if ommited) or force. Lines starting with `#` are considered comments and are ignored.
|
|
63
|
+
- `.jhipster/*.json` - JHipster entity configuration files
|
|
64
|
+
<%_ if (buildToolMaven) { _%>
|
|
65
|
+
- `npmw` - wrapper to use locally installed npm.
|
|
66
|
+
JHipster installs Node and npm locally using the build tool by default. This wrapper makes sure npm is installed locally and uses it avoiding some differences different versions can cause. By using `./npmw` instead of the traditional `npm` you can configure a Node-less environment to develop your application.
|
|
67
|
+
<%_ } _%>
|
|
68
|
+
- `/src/main/docker` - Docker configurations for the application and services that the application depends on
|
|
69
|
+
|
|
49
70
|
## Development
|
|
50
71
|
|
|
51
72
|
<%_ if (skipClient) { _%>
|
|
@@ -23,7 +23,6 @@ const constants = require('../generator-constants');
|
|
|
23
23
|
const { GENERATOR_CYPRESS } = require('../generator-list');
|
|
24
24
|
const { CYPRESS } = require('../../jdl/jhipster/test-framework-types');
|
|
25
25
|
|
|
26
|
-
let useBlueprints;
|
|
27
26
|
/* eslint-disable consistent-return */
|
|
28
27
|
module.exports = class extends BaseBlueprintGenerator {
|
|
29
28
|
constructor(args, options, features) {
|
|
@@ -34,8 +33,12 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
this.loadRuntimeOptions();
|
|
36
|
+
}
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
async _postConstruct() {
|
|
39
|
+
if (!this.fromBlueprint) {
|
|
40
|
+
await this.composeWithBlueprints(GENERATOR_CYPRESS);
|
|
41
|
+
}
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
// Public API method used by the getter and also by Blueprints
|
|
@@ -48,7 +51,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
get initializing() {
|
|
51
|
-
if (
|
|
54
|
+
if (this.delegateToBlueprint) return {};
|
|
52
55
|
return this._initializing();
|
|
53
56
|
}
|
|
54
57
|
|
|
@@ -75,7 +78,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
75
78
|
}
|
|
76
79
|
|
|
77
80
|
get prompting() {
|
|
78
|
-
if (
|
|
81
|
+
if (this.delegateToBlueprint) return {};
|
|
79
82
|
return this._prompting();
|
|
80
83
|
}
|
|
81
84
|
|
|
@@ -95,7 +98,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
95
98
|
}
|
|
96
99
|
|
|
97
100
|
get loading() {
|
|
98
|
-
if (
|
|
101
|
+
if (this.delegateToBlueprint) return {};
|
|
99
102
|
return this._loading();
|
|
100
103
|
}
|
|
101
104
|
|
|
@@ -110,7 +113,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
110
113
|
}
|
|
111
114
|
|
|
112
115
|
get preparing() {
|
|
113
|
-
if (
|
|
116
|
+
if (this.delegateToBlueprint) return {};
|
|
114
117
|
return this._preparing();
|
|
115
118
|
}
|
|
116
119
|
|
|
@@ -120,7 +123,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
120
123
|
}
|
|
121
124
|
|
|
122
125
|
get default() {
|
|
123
|
-
if (
|
|
126
|
+
if (this.delegateToBlueprint) return {};
|
|
124
127
|
return this._default();
|
|
125
128
|
}
|
|
126
129
|
|
|
@@ -139,7 +142,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
139
142
|
}
|
|
140
143
|
|
|
141
144
|
get writing() {
|
|
142
|
-
if (
|
|
145
|
+
if (this.delegateToBlueprint) return {};
|
|
143
146
|
return this._writing();
|
|
144
147
|
}
|
|
145
148
|
|
|
@@ -227,7 +230,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
227
230
|
}
|
|
228
231
|
|
|
229
232
|
get postWriting() {
|
|
230
|
-
if (
|
|
233
|
+
if (this.delegateToBlueprint) return {};
|
|
231
234
|
return this._postWriting();
|
|
232
235
|
}
|
|
233
236
|
};
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
limitations under the License.
|
|
18
18
|
-%>
|
|
19
19
|
{
|
|
20
|
-
"baseUrl": "http://localhost:<%= serverPort %>/",
|
|
20
|
+
"baseUrl": "http://localhost:<%= gatewayServerPort || serverPort %>/",
|
|
21
21
|
"testFiles": "**/*.spec.ts",
|
|
22
22
|
"supportFile": "<%= CLIENT_TEST_SRC_DIR %>cypress/support/index.ts",
|
|
23
23
|
"video": false,
|
|
@@ -26,7 +26,14 @@
|
|
|
26
26
|
"pluginsFile": "<%= CLIENT_TEST_SRC_DIR %>cypress/plugins/index.ts",
|
|
27
27
|
"screenshotsFolder": "<%= BUILD_DIR %>cypress/screenshots",
|
|
28
28
|
"chromeWebSecurity": <% if(authenticationTypeOauth2) { %>false<% } else { %>true<% } %>,
|
|
29
|
+
<%_ if (clientFrameworkReact) { _%>
|
|
30
|
+
"scrollBehavior": "center",
|
|
31
|
+
<%_ } _%>
|
|
29
32
|
"viewportWidth": 1200,
|
|
30
33
|
"viewportHeight": 720,
|
|
31
|
-
"retries": 2
|
|
34
|
+
"retries": 2<%_ if (authenticationTypeJwt) { _%>,
|
|
35
|
+
"env": {
|
|
36
|
+
"jwtStorageName": "<%= jhiPrefixDashed %>-authenticationToken"
|
|
37
|
+
}
|
|
38
|
+
<%_ } _%>
|
|
32
39
|
}
|
|
@@ -28,20 +28,20 @@
|
|
|
28
28
|
|
|
29
29
|
// This function is called when a project is opened or re-opened (e.g. due to
|
|
30
30
|
// the project's config changing)
|
|
31
|
-
import fs = require('fs')
|
|
31
|
+
import fs = require('fs');
|
|
32
32
|
import { lighthouse, pa11y, prepareAudit } from 'cypress-audit';
|
|
33
33
|
import ReportGenerator = require('lighthouse/report/generator/report-generator');
|
|
34
34
|
/**
|
|
35
35
|
* @type {Cypress.PluginConfig}
|
|
36
36
|
*/
|
|
37
|
-
module.exports = (on
|
|
37
|
+
module.exports = (on<%_ if (cypressCoverage) { _%>, config<%_ } _%>) => {
|
|
38
38
|
// `on` is used to hook into various events Cypress emits
|
|
39
|
-
|
|
39
|
+
<%_ if (cypressCoverage) { _%>// `config` is the resolved Cypress config<%_ } _%>
|
|
40
40
|
on('before:browser:launch', (browser, launchOptions) => {
|
|
41
41
|
prepareAudit(launchOptions);
|
|
42
42
|
if (browser.name === 'chrome' && browser.isHeadless) {
|
|
43
43
|
launchOptions.args.push('--disable-gpu');
|
|
44
|
-
return launchOptions
|
|
44
|
+
return launchOptions;
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
|
|
@@ -104,6 +104,31 @@ export const classValid = <%_ if (clientFrameworkAngular) { _%>'ng-valid';
|
|
|
104
104
|
<%_ } else if (clientFrameworkReact) { _%>'is-valid';
|
|
105
105
|
<%_ } else { _%>'valid';<%_ } _%>
|
|
106
106
|
|
|
107
|
+
Cypress.Commands.add('authenticatedRequest', (data: any) => {
|
|
108
|
+
<%_ if (authenticationTypeJwt) { _%>
|
|
109
|
+
<%_ if (clientFrameworkAngular || clientFrameworkReact) { _%>
|
|
110
|
+
const bearerToken = JSON.parse(sessionStorage.getItem(Cypress.env('jwtStorageName')));
|
|
111
|
+
<%_ } else { _%>
|
|
112
|
+
const bearerToken = sessionStorage.getItem(Cypress.env('jwtStorageName'));
|
|
113
|
+
<%_ } _%>
|
|
114
|
+
return cy.request({
|
|
115
|
+
...data,
|
|
116
|
+
auth: {
|
|
117
|
+
bearer: bearerToken,
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
<%_ } else { _%>
|
|
121
|
+
return cy.getCookie('XSRF-TOKEN').then(csrfCookie => {
|
|
122
|
+
return cy.request({
|
|
123
|
+
...data,
|
|
124
|
+
headers: {
|
|
125
|
+
'X-XSRF-TOKEN': csrfCookie?.value,
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
<%_ } _%>
|
|
130
|
+
});
|
|
131
|
+
|
|
107
132
|
<%_ if (!authenticationTypeOauth2) { _%>
|
|
108
133
|
Cypress.Commands.add('login', (username: string, password: string) => {
|
|
109
134
|
cy.clickOnLoginItem();
|
|
@@ -112,14 +137,17 @@ Cypress.Commands.add('login', (username: string, password: string) => {
|
|
|
112
137
|
cy.get(submitLoginSelector).click();
|
|
113
138
|
});
|
|
114
139
|
|
|
140
|
+
<%_ } _%>
|
|
115
141
|
declare global {
|
|
116
142
|
namespace Cypress {
|
|
117
|
-
interface Chainable
|
|
143
|
+
interface Chainable {
|
|
144
|
+
<%_ if (!authenticationTypeOauth2) { _%>
|
|
118
145
|
login(username: string, password: string): Cypress.Chainable;
|
|
146
|
+
<%_ } _%>
|
|
147
|
+
authenticatedRequest(data: any): Cypress.Chainable;
|
|
119
148
|
}
|
|
120
149
|
}
|
|
121
150
|
}
|
|
122
|
-
<%_ } _%>
|
|
123
151
|
|
|
124
152
|
import 'cypress-audit/commands';
|
|
125
153
|
// Convert this to a module instead of script (allows import/export)
|
|
@@ -75,10 +75,10 @@ Cypress.Commands.add('setFieldSelectToLastOfEntity', (fieldName: string) => {
|
|
|
75
75
|
return cy.get(`[data-cy="${fieldName}"]`).then(select => {
|
|
76
76
|
const selectSize = (select[0] as HTMLSelectElement)?.options?.length || Number(select.attr('size')) || 0;
|
|
77
77
|
if (selectSize > 0) {
|
|
78
|
-
return cy.get(`[data-cy="${fieldName}"] option`).then((options:
|
|
79
|
-
const elements = [...options].map(o => o.label);
|
|
78
|
+
return cy.get(`[data-cy="${fieldName}"] option`).then((options: JQuery<HTMLElement>) => {
|
|
79
|
+
const elements = [...options].map((o: HTMLElement) => (o as HTMLOptionElement).label);
|
|
80
80
|
const lastElement = elements.length - 1;
|
|
81
|
-
cy.get(`[data-cy="${fieldName}"]`).select(
|
|
81
|
+
cy.get(`[data-cy="${fieldName}"]`).select(lastElement).type('{downarrow}');
|
|
82
82
|
});
|
|
83
83
|
} else {
|
|
84
84
|
return cy.get(`[data-cy="${fieldName}"]`).type('{downarrow}');
|
|
@@ -88,7 +88,7 @@ Cypress.Commands.add('setFieldSelectToLastOfEntity', (fieldName: string) => {
|
|
|
88
88
|
|
|
89
89
|
declare global {
|
|
90
90
|
namespace Cypress {
|
|
91
|
-
interface Chainable
|
|
91
|
+
interface Chainable {
|
|
92
92
|
getEntityHeading(entityName: string): Cypress.Chainable;
|
|
93
93
|
getEntityCreateUpdateHeading(entityName: string): Cypress.Chainable;
|
|
94
94
|
getEntityDetailsHeading(entityInstanceName: string): Cypress.Chainable;
|
|
@@ -43,7 +43,7 @@ import './oauth2';
|
|
|
43
43
|
<%_ } _%>
|
|
44
44
|
<%_ if (authenticationTypeSession) { _%>
|
|
45
45
|
Cypress.Cookies.defaults({
|
|
46
|
-
preserve: ['XSRF-TOKEN','SESSION', 'JSESSIONID']
|
|
46
|
+
preserve: ['XSRF-TOKEN','SESSION', 'JSESSIONID']
|
|
47
47
|
})
|
|
48
48
|
<%_ } _%>
|
|
49
49
|
<%_ if (clientFrameworkReact || clientFrameworkVue) { _%>
|
|
@@ -61,7 +61,7 @@ Cypress.Commands.add('clickOnEntityMenuItem', (entityName: string) => {
|
|
|
61
61
|
|
|
62
62
|
declare global {
|
|
63
63
|
namespace Cypress {
|
|
64
|
-
interface Chainable
|
|
64
|
+
interface Chainable {
|
|
65
65
|
clickOnLoginItem(): Cypress.Chainable;
|
|
66
66
|
clickOnLogoutItem(): Cypress.Chainable;
|
|
67
67
|
clickOnRegisterItem(): Cypress.Chainable;
|
|
@@ -28,7 +28,6 @@ const BASE_CHANGELOG = {
|
|
|
28
28
|
removedRelationships: [],
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
let useBlueprints;
|
|
32
31
|
/* eslint-disable consistent-return */
|
|
33
32
|
module.exports = class extends BaseBlueprintGenerator {
|
|
34
33
|
constructor(args, options, features) {
|
|
@@ -45,37 +44,49 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
45
44
|
}
|
|
46
45
|
this.info(`Creating changelog for entities ${this.options.entities}`);
|
|
47
46
|
this.configOptions.oldSharedEntities = this.configOptions.oldSharedEntities || [];
|
|
48
|
-
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
async _postConstruct() {
|
|
50
|
+
if (!this.fromBlueprint) {
|
|
51
|
+
await this.composeWithBlueprints(GENERATOR_DATABASE_CHANGELOG);
|
|
52
|
+
}
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
_default() {
|
|
52
56
|
return {
|
|
53
|
-
calculateChangelogs() {
|
|
57
|
+
async calculateChangelogs() {
|
|
54
58
|
const diff = this._generateChangelogFromFiles();
|
|
55
59
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
60
|
+
await Promise.all(
|
|
61
|
+
diff.map(([fieldChanges, _relationshipChanges]) => {
|
|
62
|
+
if (fieldChanges.type === 'entity-new') {
|
|
63
|
+
return this._composeWithIncrementalChangelogProvider(fieldChanges);
|
|
64
|
+
}
|
|
65
|
+
if (fieldChanges.addedFields.length > 0 || fieldChanges.removedFields.length > 0) {
|
|
66
|
+
return this._composeWithIncrementalChangelogProvider(fieldChanges);
|
|
67
|
+
}
|
|
68
|
+
return undefined;
|
|
69
|
+
})
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
await Promise.all(
|
|
73
|
+
diff.map(([_fieldChanges, relationshipChanges]) => {
|
|
74
|
+
if (
|
|
75
|
+
relationshipChanges &&
|
|
76
|
+
relationshipChanges.incremental &&
|
|
77
|
+
(relationshipChanges.addedRelationships.length > 0 || relationshipChanges.removedRelationships.length > 0)
|
|
78
|
+
) {
|
|
79
|
+
return this._composeWithIncrementalChangelogProvider(relationshipChanges);
|
|
80
|
+
}
|
|
81
|
+
return undefined;
|
|
82
|
+
})
|
|
83
|
+
);
|
|
73
84
|
},
|
|
74
85
|
};
|
|
75
86
|
}
|
|
76
87
|
|
|
77
88
|
get default() {
|
|
78
|
-
if (
|
|
89
|
+
if (this.delegateToBlueprint) return {};
|
|
79
90
|
return this._default();
|
|
80
91
|
}
|
|
81
92
|
|
|
@@ -85,7 +96,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
85
96
|
|
|
86
97
|
_composeWithIncrementalChangelogProvider(databaseChangelog) {
|
|
87
98
|
const skipWriting = !this.options.entities.includes(databaseChangelog.entityName);
|
|
88
|
-
this.composeWithJHipster(GENERATOR_DATABASE_CHANGELOG_LIQUIBASE, {
|
|
99
|
+
return this.composeWithJHipster(GENERATOR_DATABASE_CHANGELOG_LIQUIBASE, {
|
|
89
100
|
databaseChangelog,
|
|
90
101
|
skipWriting,
|
|
91
102
|
configOptions: this.configOptions,
|
|
@@ -35,7 +35,6 @@ const { prepareFieldForTemplates } = require('../../utils/field');
|
|
|
35
35
|
const { prepareRelationshipForTemplates } = require('../../utils/relationship');
|
|
36
36
|
const { prepareFieldForLiquibaseTemplates } = require('../../utils/liquibase');
|
|
37
37
|
|
|
38
|
-
let useBlueprints;
|
|
39
38
|
/* eslint-disable consistent-return */
|
|
40
39
|
module.exports = class extends BaseBlueprintGenerator {
|
|
41
40
|
constructor(args, options, features) {
|
|
@@ -51,7 +50,12 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
51
50
|
|
|
52
51
|
// Set number of rows to be generated
|
|
53
52
|
this.numberOfRows = 10;
|
|
54
|
-
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async _postConstruct() {
|
|
56
|
+
if (!this.fromBlueprint) {
|
|
57
|
+
await this.composeWithBlueprints(GENERATOR_DATABASE_CHANGELOG_LIQUIBASE);
|
|
58
|
+
}
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
_loading() {
|
|
@@ -69,7 +73,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
get loading() {
|
|
72
|
-
if (
|
|
76
|
+
if (this.delegateToBlueprint) return {};
|
|
73
77
|
return this._loading();
|
|
74
78
|
}
|
|
75
79
|
|
|
@@ -149,7 +153,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
149
153
|
}
|
|
150
154
|
|
|
151
155
|
get preparing() {
|
|
152
|
-
if (
|
|
156
|
+
if (this.delegateToBlueprint) return {};
|
|
153
157
|
return this._preparing();
|
|
154
158
|
}
|
|
155
159
|
|
|
@@ -194,7 +198,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
194
198
|
}
|
|
195
199
|
|
|
196
200
|
get preparingRelationships() {
|
|
197
|
-
if (
|
|
201
|
+
if (this.delegateToBlueprint) return {};
|
|
198
202
|
return this._preparingRelationships();
|
|
199
203
|
}
|
|
200
204
|
|
|
@@ -209,7 +213,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
209
213
|
}
|
|
210
214
|
|
|
211
215
|
get default() {
|
|
212
|
-
if (
|
|
216
|
+
if (this.delegateToBlueprint) return {};
|
|
213
217
|
return this._default();
|
|
214
218
|
}
|
|
215
219
|
|
|
@@ -253,7 +257,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
253
257
|
}
|
|
254
258
|
|
|
255
259
|
get writing() {
|
|
256
|
-
if (
|
|
260
|
+
if (this.delegateToBlueprint) return {};
|
|
257
261
|
if (this.options.skipWriting) {
|
|
258
262
|
return {};
|
|
259
263
|
}
|
|
@@ -286,7 +290,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
286
290
|
}
|
|
287
291
|
|
|
288
292
|
get postWriting() {
|
|
289
|
-
if (
|
|
293
|
+
if (this.delegateToBlueprint) return {};
|
|
290
294
|
if (this.options.skipWriting) {
|
|
291
295
|
return {};
|
|
292
296
|
}
|
|
@@ -42,7 +42,7 @@ if (hasFieldConstraint) { _%>
|
|
|
42
42
|
_%>
|
|
43
43
|
<addNotNullConstraint tableName="<%= entityTableName %>"
|
|
44
44
|
columnName="<%= field.columnName %>"
|
|
45
|
-
columnDataType="<%= field.
|
|
45
|
+
columnDataType="<%= field.columnType %>"/>
|
|
46
46
|
<%_ if (field.shouldCreateContentType) { _%>
|
|
47
47
|
<addNotNullConstraint tableName="<%= entityTableName %>"
|
|
48
48
|
columnName="<%= field.columnName %>_content_type"
|
|
@@ -34,13 +34,12 @@ const { GENERATOR_DOCKER_COMPOSE } = require('../generator-list');
|
|
|
34
34
|
|
|
35
35
|
const NO_DATABASE = databaseTypes.NO;
|
|
36
36
|
|
|
37
|
-
let useBlueprints;
|
|
38
|
-
|
|
39
37
|
/* eslint-disable consistent-return */
|
|
40
38
|
module.exports = class extends BaseDockerGenerator {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
async _postConstruct() {
|
|
40
|
+
if (!this.fromBlueprint) {
|
|
41
|
+
await this.composeWithBlueprints(GENERATOR_DOCKER_COMPOSE);
|
|
42
|
+
}
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
_initializing() {
|
|
@@ -81,7 +80,7 @@ module.exports = class extends BaseDockerGenerator {
|
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
get initializing() {
|
|
84
|
-
if (
|
|
83
|
+
if (this.delegateToBlueprint) return {};
|
|
85
84
|
return this._initializing();
|
|
86
85
|
}
|
|
87
86
|
|
|
@@ -90,7 +89,7 @@ module.exports = class extends BaseDockerGenerator {
|
|
|
90
89
|
}
|
|
91
90
|
|
|
92
91
|
get prompting() {
|
|
93
|
-
if (
|
|
92
|
+
if (this.delegateToBlueprint) return {};
|
|
94
93
|
return this._prompting();
|
|
95
94
|
}
|
|
96
95
|
|
|
@@ -118,7 +117,7 @@ module.exports = class extends BaseDockerGenerator {
|
|
|
118
117
|
}
|
|
119
118
|
|
|
120
119
|
get configuring() {
|
|
121
|
-
if (
|
|
120
|
+
if (this.delegateToBlueprint) return {};
|
|
122
121
|
return this._configuring();
|
|
123
122
|
}
|
|
124
123
|
|
|
@@ -264,7 +263,7 @@ module.exports = class extends BaseDockerGenerator {
|
|
|
264
263
|
}
|
|
265
264
|
|
|
266
265
|
get preparing() {
|
|
267
|
-
if (
|
|
266
|
+
if (this.delegateToBlueprint) return {};
|
|
268
267
|
return this._preparing();
|
|
269
268
|
}
|
|
270
269
|
|
|
@@ -277,7 +276,7 @@ module.exports = class extends BaseDockerGenerator {
|
|
|
277
276
|
}
|
|
278
277
|
|
|
279
278
|
get loading() {
|
|
280
|
-
if (
|
|
279
|
+
if (this.delegateToBlueprint) return {};
|
|
281
280
|
return this._loading();
|
|
282
281
|
}
|
|
283
282
|
|
|
@@ -286,7 +285,7 @@ module.exports = class extends BaseDockerGenerator {
|
|
|
286
285
|
}
|
|
287
286
|
|
|
288
287
|
get writing() {
|
|
289
|
-
if (
|
|
288
|
+
if (this.delegateToBlueprint) return {};
|
|
290
289
|
return this._writing();
|
|
291
290
|
}
|
|
292
291
|
|
|
@@ -313,7 +312,7 @@ module.exports = class extends BaseDockerGenerator {
|
|
|
313
312
|
}
|
|
314
313
|
|
|
315
314
|
end() {
|
|
316
|
-
if (
|
|
315
|
+
if (this.delegateToBlueprint) return {};
|
|
317
316
|
return this._end();
|
|
318
317
|
}
|
|
319
318
|
};
|