generator-jhipster 7.9.0 → 7.9.3
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 +15 -1
- package/cli/jhipster.js +0 -0
- package/generators/app/index.js +12 -1
- package/generators/bootstrap/index.js +33 -1
- package/generators/ci-cd/templates/circle.yml.ejs +3 -13
- package/generators/client/files-angular.js +1 -1
- package/generators/client/files-react.js +5 -2
- package/generators/client/files-vue.js +3 -2
- package/generators/client/templates/angular/jest.conf.js.ejs +6 -3
- package/generators/client/templates/angular/package.json +18 -18
- package/generators/client/templates/angular/package.json.ejs +3 -7
- package/generators/client/templates/angular/src/main/webapp/app/admin/admin-routing.module.ts.ejs +1 -1
- package/generators/client/templates/angular/src/main/webapp/app/admin/health/health.model.ts.ejs +1 -1
- package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/update/user-management-update.component.ts.ejs +17 -15
- package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/user-management.model.ts.ejs +2 -2
- package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/user-management.route.ts.ejs +4 -4
- package/generators/client/templates/angular/src/main/webapp/app/core/request/request-util.ts.ejs +4 -2
- package/generators/client/templates/angular/src/main/webapp/app/core/util/data-util.service.ts.ejs +1 -1
- package/generators/client/templates/angular/src/main/webapp/app/core/util/parse-links.service.ts.ejs +1 -1
- package/generators/client/templates/angular/src/main/webapp/app/layouts/navbar/navbar.component.html.ejs +1 -1
- package/generators/client/templates/angular/src/main/webapp/app/shared/filter/filter.component.html.ejs +8 -6
- package/generators/client/templates/angular/src/main/webapp/app/shared/filter/filter.component.ts.ejs +6 -11
- package/generators/client/templates/angular/src/main/webapp/app/shared/filter/filter.model.spec.ts.ejs +227 -25
- package/generators/client/templates/angular/src/main/webapp/app/shared/filter/filter.model.ts.ejs +104 -43
- package/generators/client/templates/angular/src/main/webapp/content/scss/global.scss.ejs +8 -0
- package/generators/client/templates/angular/tsconfig.json.ejs +0 -1
- package/generators/client/templates/angular/tsconfig.spec.json.ejs +2 -3
- package/generators/client/templates/angular/webpack/webpack.microfrontend.js.ejs +0 -3
- package/generators/client/templates/common/package.json +4 -4
- package/generators/client/templates/common/src/main/webapp/swagger-ui/index.html.ejs +1 -1
- package/generators/client/templates/react/jest.conf.js.ejs +2 -2
- package/generators/client/templates/react/package.json +24 -24
- package/generators/client/templates/react/package.json.ejs +3 -7
- package/generators/client/templates/react/src/main/webapp/app/config/store.ts.ejs +0 -6
- package/generators/client/templates/react/src/main/webapp/app/index.tsx.ejs +4 -5
- package/generators/client/templates/react/src/main/webapp/app/modules/administration/administration.reducer.spec.ts.ejs +7 -7
- package/generators/client/templates/react/src/main/webapp/app/modules/administration/administration.reducer.ts.ejs +6 -6
- package/generators/client/templates/react/src/main/webapp/app/modules/administration/index.tsx.ejs +2 -2
- package/generators/client/templates/react/src/main/webapp/app/shared/layout/menus/admin.tsx.ejs +1 -1
- package/generators/client/templates/react/src/main/webapp/app/shared/reducers/authentication.spec.ts.ejs +17 -8
- package/generators/client/templates/react/src/main/webapp/app/shared/reducers/authentication.ts.ejs +1 -1
- package/generators/client/templates/react/src/main/webapp/app/shared/reducers/locale.spec.ts.ejs +176 -19
- package/generators/client/templates/react/src/main/webapp/app/shared/reducers/locale.ts.ejs +46 -13
- package/generators/client/templates/react/webpack/webpack.microfrontend.js.jhi.react.ejs +1 -1
- package/generators/client/templates/vue/package.json +17 -17
- package/generators/client/templates/vue/package.json.ejs +3 -7
- package/generators/client/templates/vue/src/main/webapp/app/core/jhi-navbar/jhi-navbar.component.ts.ejs +2 -1
- package/generators/client/templates/vue/src/main/webapp/app/core/jhi-navbar/jhi-navbar.vue.ejs +1 -1
- package/generators/client/templates/vue/src/main/webapp/app/main.ts.ejs +2 -2
- package/generators/client/templates/vue/src/main/webapp/app/router/admin.ts.ejs +2 -2
- package/generators/client/templates/vue/src/test/javascript/e2e/modules/administration/administration.spec.ts.ejs +1 -1
- package/generators/client/templates/vue/src/test/javascript/e2e/page-objects/administration-page.ts.ejs +1 -1
- package/generators/client/templates/vue/src/test/javascript/e2e/page-objects/navbar-page.ts.ejs +2 -2
- package/generators/client/templates/vue/src/test/javascript/jest.conf.js.ejs +5 -6
- package/generators/client/templates/vue/src/test/javascript/spec/app/account/account.service.spec.ts.ejs +4 -0
- package/generators/client/templates/vue/src/test/javascript/spec/app/shared/alert/alert.service.spec.ts.ejs +106 -3
- package/generators/client/templates/vue/src/test/javascript/spec/app/shared/config/axios-interceptor.spec.ts.ejs +12 -0
- package/generators/client/templates/vue/src/test/javascript/spec/app/shared/config/formatter.spec.ts.ejs +6 -0
- package/generators/client/templates/vue/src/test/javascript/spec/app/shared/sort/sorts.spec.ts.ejs +10 -0
- package/generators/client/templates/vue/webpack/webpack.common.js.ejs +1 -1
- package/generators/client/templates/vue/webpack/webpack.dev.js.ejs +2 -2
- package/generators/common/files.js +5 -4
- package/generators/common/templates/.husky/pre-commit.ejs +0 -0
- package/generators/common/templates/package.json +1 -1
- package/generators/common/templates/sonar-project.properties.ejs +19 -11
- package/generators/cypress/index.js +1 -1
- package/generators/docker-compose/templates/README-DOCKER-COMPOSE.md.ejs +3 -3
- package/generators/docker-compose/templates/docker-compose.yml.ejs +1 -1
- package/generators/docker-compose/templates/realm-config/jhipster-realm.json.ejs +32 -14
- package/generators/entity/index.js +4 -3
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/detail/entity-management-detail.component.html.ejs +1 -1
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/list/entity-management.component.html.ejs +18 -6
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/list/entity-management.component.spec.ts.ejs +1 -1
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/list/entity-management.component.ts.ejs +23 -19
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/service/entity.service.spec.ts.ejs +3 -1
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/service/entity.service.ts.ejs +1 -1
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/update/entity-form.service.ts.ejs +1 -1
- package/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.component.ts.ejs +2 -2
- package/generators/entity-server/templates/src/main/java/package/common/delete_template.ejs +7 -3
- package/generators/entity-server/templates/src/main/java/package/common/get_all_template.ejs +2 -2
- package/generators/entity-server/templates/src/main/java/package/domain/Entity.java.jhi.ejs +15 -5
- package/generators/entity-server/templates/src/main/java/package/domain/Entity.java.jhi.spring_data_persistable.ejs +8 -1
- package/generators/entity-server/templates/src/main/java/package/repository/EntityRepositoryInternalImpl_reactive.java.ejs +5 -0
- package/generators/entity-server/templates/src/main/java/package/service/EntityQueryService.java.ejs +4 -4
- package/generators/entity-server/templates/src/main/java/package/service/EntityService.java.ejs +6 -4
- package/generators/entity-server/templates/src/main/java/package/service/criteria/EntityCriteria.java.ejs +3 -26
- package/generators/entity-server/templates/src/main/java/package/service/dto/EntityDTO.java.ejs +1 -0
- package/generators/entity-server/templates/src/main/java/package/service/impl/EntityServiceImpl.java.ejs +1 -1
- package/generators/entity-server/templates/src/test/java/package/web/rest/EntityResourceIT.java.ejs +33 -28
- package/generators/generate-blueprint/constants.mjs +46 -6
- package/generators/generate-blueprint/esm.mjs +0 -0
- package/generators/generate-blueprint/files.mjs +7 -5
- package/generators/generate-blueprint/generator.mjs +73 -19
- package/generators/generate-blueprint/templates/cli/cli.mjs.ejs +0 -0
- package/generators/generate-blueprint/templates/generators/generator/generator.spec.mjs.ejs +1 -1
- package/generators/generate-blueprint/templates/generators/generator/templates/template-file.ejs +0 -0
- package/generators/generator-base-blueprint.js +23 -1
- package/generators/generator-base-entities.cjs +5 -1
- package/generators/generator-base.js +82 -15
- package/generators/generator-constants.js +17 -23
- package/generators/init/templates/.husky/pre-commit +0 -0
- package/generators/kubernetes/templates/deployment.yml.ejs +1 -1
- package/generators/kubernetes/templates/ingress.yml.ejs +1 -1
- package/generators/kubernetes/templates/istio/gateway.yml.ejs +1 -1
- package/generators/kubernetes/templates/kubectl-apply.sh.ejs +0 -0
- package/generators/kubernetes/templates/kustomize/kustomization.yml.ejs +1 -1
- package/generators/kubernetes/templates/service.yml.ejs +1 -1
- package/generators/kubernetes-knative/templates/istio/gateway.yml.ejs +1 -1
- package/generators/kubernetes-knative/templates/kubectl-apply.sh.ejs +0 -0
- package/generators/kubernetes-knative/templates/service.yml.ejs +3 -3
- package/generators/languages/templates/src/main/webapp/i18n/al/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/ar-ly/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/bg/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/bn/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/by/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/ca/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/cs/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/da/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/de/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/el/activate.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/el/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/el/password.json +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/el/register.json +3 -3
- package/generators/languages/templates/src/main/webapp/i18n/el/tracker.json +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/el/user-management.json +9 -9
- package/generators/languages/templates/src/main/webapp/i18n/en/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/es/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/et/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/fa/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/fi/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/fr/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/gl/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/hi/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/hr/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/hu/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/hy/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/in/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/it/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/ja/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/ko/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/mr/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/my/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/nl/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/pa/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/pl/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/pt-br/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/pt-pt/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/ro/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/ru/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/si/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/sk/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/sr/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/sv/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/ta/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/te/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/th/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/tr/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/ua/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/uz-Latn-uz/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/vi/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/zh-cn/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/zh-tw/health.json.ejs +1 -1
- package/generators/maven/templates/mvnw +0 -0
- package/generators/openshift/templates/deployment.yml.ejs +2 -2
- package/generators/server/cleanup-elasticsearch.js +5 -0
- package/generators/server/files.js +17 -8
- package/generators/server/index.js +0 -2
- package/generators/server/templates/build.gradle.ejs +6 -14
- package/generators/server/templates/gradle/profile_dev.gradle.ejs +1 -1
- package/generators/server/templates/gradle/profile_prod.gradle.ejs +1 -1
- package/generators/server/templates/gradle.properties.ejs +6 -4
- package/generators/server/templates/gradlew +0 -0
- package/generators/server/templates/mvnw +0 -0
- package/generators/server/templates/npmw +0 -0
- package/generators/server/templates/npmw.cmd +31 -29
- package/generators/server/templates/package.json.ejs +2 -2
- package/generators/server/templates/pom.xml.ejs +12 -23
- package/generators/server/templates/sql/common/src/test/java/package/config/MsSqlTestContainer.java.ejs +2 -3
- package/generators/server/templates/src/main/docker/app.yml.ejs +7 -1
- package/generators/server/templates/src/main/docker/config/realm-config/jhipster-realm.json.ejs +32 -14
- package/generators/server/templates/src/main/docker/jhipster-control-center.yml.ejs +1 -1
- package/generators/server/templates/src/main/docker/prometheus/prometheus.yml.ejs +1 -1
- package/generators/server/templates/src/main/java/package/Application.java.ejs +11 -4
- package/generators/server/templates/src/main/java/package/config/CRLFLogConverter.java.ejs +57 -0
- package/generators/server/templates/src/main/java/package/config/EurekaWorkaroundConfiguration.java.ejs +49 -0
- package/generators/server/templates/src/main/java/package/config/LoggingConfiguration.java.ejs +4 -4
- package/generators/server/templates/src/main/java/package/config/SecurityConfiguration.java.ejs +17 -18
- package/generators/server/templates/src/main/java/package/config/SecurityConfiguration_reactive.java.ejs +13 -5
- package/generators/server/templates/src/main/java/package/domain/AbstractAuditingEntity.java.ejs +5 -6
- package/generators/server/templates/src/main/java/package/domain/User.java.ejs +1 -1
- package/generators/server/templates/src/main/java/package/repository/UserRepository.java.ejs +1 -1
- package/generators/server/templates/src/main/java/package/security/oauth2/CustomClaimConverter.java.ejs +13 -6
- package/generators/server/templates/src/main/java/package/service/dto/AdminUserDTO.java.ejs +3 -1
- package/generators/server/templates/src/main/java/package/service/dto/PasswordChangeDTO.java.ejs +5 -1
- package/generators/server/templates/src/main/java/package/service/dto/UserDTO.java.ejs +3 -1
- package/generators/server/templates/src/main/java/package/web/rest/UserResource.java.ejs +15 -42
- package/generators/server/templates/src/main/java/package/web/rest/errors/BadRequestAlertException.java.ejs +1 -0
- package/generators/server/templates/src/main/java/package/web/rest/errors/EmailAlreadyUsedException.java.ejs +1 -0
- package/generators/server/templates/src/main/java/package/web/rest/errors/InvalidPasswordException.java.ejs +1 -0
- package/generators/server/templates/src/main/java/package/web/rest/errors/LoginAlreadyUsedException.java.ejs +1 -0
- 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 +3 -3
- package/generators/server/templates/src/main/resources/config/application.yml.ejs +4 -2
- package/generators/server/templates/src/main/resources/config/liquibase/master.xml.ejs +3 -8
- package/generators/server/templates/src/main/resources/logback-spring.xml.ejs +5 -0
- package/generators/server/templates/src/test/java/package/config/{ElasticsearchReactiveTestConfiguration.java.ejs → ElasticsearchTestConfiguration.java.ejs} +3 -3
- package/generators/server/templates/src/test/java/package/config/ElasticsearchTestContainer.java.ejs +1 -0
- package/generators/server/templates/src/test/java/package/config/JHipsterBlockHoundIntegration.java.ejs +3 -0
- package/generators/server/templates/src/test/java/package/config/TestContainersSpringContextCustomizerFactory.java.ejs +2 -2
- package/generators/sql-constants.js +5 -2
- package/generators/utils.js +43 -3
- package/generators/workspaces/index.js +2 -1
- package/jdl/exporters/jdl-exporter.js +6 -1
- package/jdl/jhipster/application-options.js +2 -1
- package/jdl/jhipster/binary-options.js +2 -2
- package/jdl/jhipster/default-application-options.js +11 -8
- package/jdl/jhipster/entity-options.js +1 -0
- package/jdl/jhipster/search-engine-types.js +1 -0
- package/lib/constants/priorities.cjs +16 -0
- package/lib/constants/priorities.mjs +1 -0
- package/lib/index.js +2 -0
- package/lib/support/base.cjs +2 -1
- package/package.json +7 -6
- package/utils/blueprint.js +10 -0
- package/utils/field.js +9 -9
- package/generators/client/templates/react/src/main/webapp/app/config/translation-middleware.ts.ejs +0 -58
- package/generators/server/templates/.npmrc.ejs +0 -1
|
@@ -31,9 +31,12 @@ import {
|
|
|
31
31
|
PREPARING_PRIORITY,
|
|
32
32
|
WRITING_PRIORITY,
|
|
33
33
|
POST_WRITING_PRIORITY,
|
|
34
|
-
|
|
34
|
+
POST_INSTALL_PRIORITY,
|
|
35
35
|
END_PRIORITY,
|
|
36
|
+
COMPOSING_PRIORITY,
|
|
37
|
+
BASE_PRIORITY_NAMES,
|
|
36
38
|
} from '../../lib/constants/priorities.mjs';
|
|
39
|
+
|
|
37
40
|
import {
|
|
38
41
|
options,
|
|
39
42
|
requiredConfig,
|
|
@@ -42,19 +45,23 @@ import {
|
|
|
42
45
|
allGeneratorsConfig,
|
|
43
46
|
prompts,
|
|
44
47
|
subGeneratorPrompts,
|
|
48
|
+
GENERATE_SNAPSHOTS,
|
|
49
|
+
LINK_JHIPSTER_DEPENDENCY,
|
|
45
50
|
ALL_GENERATORS,
|
|
46
51
|
GENERATORS,
|
|
47
52
|
PRIORITIES,
|
|
48
53
|
SUB_GENERATORS,
|
|
49
54
|
ADDITIONAL_SUB_GENERATORS,
|
|
50
55
|
WRITTEN,
|
|
56
|
+
LOCAL_BLUEPRINT_OPTION,
|
|
57
|
+
ALL_PRIORITIES,
|
|
51
58
|
} from './constants.mjs';
|
|
52
59
|
|
|
53
60
|
import GENERATOR_LIST from '../generator-list.js';
|
|
54
61
|
import { files, generatorFiles } from './files.mjs';
|
|
55
62
|
|
|
56
63
|
const { camelCase, upperFirst, snakeCase } = lodash;
|
|
57
|
-
const { GENERATOR_INIT, GENERATOR_GENERATE_BLUEPRINT } = GENERATOR_LIST;
|
|
64
|
+
const { GENERATOR_PROJECT_NAME, GENERATOR_INIT, GENERATOR_GENERATE_BLUEPRINT } = GENERATOR_LIST;
|
|
58
65
|
|
|
59
66
|
export default class extends BaseBlueprintGenerator {
|
|
60
67
|
constructor(args, opts, features) {
|
|
@@ -73,22 +80,18 @@ export default class extends BaseBlueprintGenerator {
|
|
|
73
80
|
this.config.set(allGeneratorsConfig());
|
|
74
81
|
}
|
|
75
82
|
if (this.options.defaults) {
|
|
76
|
-
this.config.defaults(defaultConfig());
|
|
83
|
+
this.config.defaults(defaultConfig({ config: this.jhipsterConfig }));
|
|
77
84
|
}
|
|
78
|
-
this.config.defaults({
|
|
79
|
-
[SKIP_COMMIT_HOOK]: true,
|
|
80
|
-
});
|
|
81
85
|
}
|
|
82
86
|
|
|
83
87
|
/** @inheritdoc */
|
|
84
88
|
async getPossibleDependencies() {
|
|
85
|
-
return [GENERATOR_INIT];
|
|
89
|
+
return [GENERATOR_PROJECT_NAME, GENERATOR_INIT];
|
|
86
90
|
}
|
|
87
91
|
|
|
88
92
|
async _beforeQueue() {
|
|
89
93
|
if (!this.fromBlueprint) {
|
|
90
|
-
|
|
91
|
-
await this.dependsOnJHipster(GENERATOR_INIT, [], { configure });
|
|
94
|
+
await this.dependsOnJHipster(GENERATOR_PROJECT_NAME);
|
|
92
95
|
await this.composeWithBlueprints(GENERATOR_GENERATE_BLUEPRINT);
|
|
93
96
|
}
|
|
94
97
|
}
|
|
@@ -119,20 +122,30 @@ export default class extends BaseBlueprintGenerator {
|
|
|
119
122
|
await this.prompt(prompts(this), this.config);
|
|
120
123
|
},
|
|
121
124
|
async eachSubGenerator() {
|
|
125
|
+
const { localBlueprint } = this.jhipsterConfig;
|
|
126
|
+
const { [ALL_PRIORITIES]: allPriorities } = this.options;
|
|
122
127
|
const subGenerators = this.config.get(SUB_GENERATORS) || [];
|
|
123
128
|
for (const subGenerator of subGenerators) {
|
|
124
129
|
const subGeneratorStorage = this.getSubGeneratorStorage(subGenerator);
|
|
125
|
-
|
|
130
|
+
if (allPriorities) {
|
|
131
|
+
subGeneratorStorage.defaults({ [PRIORITIES]: BASE_PRIORITY_NAMES });
|
|
132
|
+
}
|
|
133
|
+
await this.prompt(subGeneratorPrompts({ subGenerator, localBlueprint, options: this.options }), subGeneratorStorage);
|
|
126
134
|
}
|
|
127
135
|
},
|
|
128
136
|
async eachAdditionalSubGenerator() {
|
|
137
|
+
const { localBlueprint } = this.jhipsterConfig;
|
|
138
|
+
const { [ALL_PRIORITIES]: allPriorities } = this.options;
|
|
129
139
|
const additionalSubGenerators = this.config.get(ADDITIONAL_SUB_GENERATORS) || '';
|
|
130
140
|
for (const subGenerator of additionalSubGenerators
|
|
131
141
|
.split(',')
|
|
132
142
|
.map(sub => sub.trim())
|
|
133
143
|
.filter(Boolean)) {
|
|
134
144
|
const subGeneratorStorage = this.getSubGeneratorStorage(subGenerator);
|
|
135
|
-
|
|
145
|
+
if (allPriorities) {
|
|
146
|
+
subGeneratorStorage.defaults({ [PRIORITIES]: BASE_PRIORITY_NAMES });
|
|
147
|
+
}
|
|
148
|
+
await this.prompt(subGeneratorPrompts({ subGenerator, localBlueprint, additionalSubGenerator: true }), subGeneratorStorage);
|
|
136
149
|
}
|
|
137
150
|
},
|
|
138
151
|
};
|
|
@@ -148,6 +161,13 @@ export default class extends BaseBlueprintGenerator {
|
|
|
148
161
|
requiredConfig() {
|
|
149
162
|
this.config.defaults(requiredConfig());
|
|
150
163
|
},
|
|
164
|
+
conditionalConfig() {
|
|
165
|
+
if (!this.jhipsterConfig[LOCAL_BLUEPRINT_OPTION]) {
|
|
166
|
+
this.config.defaults({
|
|
167
|
+
[SKIP_COMMIT_HOOK]: true,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
},
|
|
151
171
|
};
|
|
152
172
|
}
|
|
153
173
|
|
|
@@ -156,6 +176,20 @@ export default class extends BaseBlueprintGenerator {
|
|
|
156
176
|
return this.configuring;
|
|
157
177
|
}
|
|
158
178
|
|
|
179
|
+
get composing() {
|
|
180
|
+
return {
|
|
181
|
+
async compose() {
|
|
182
|
+
const configure = this.options.configure || !this.shouldComposeModular() || this.jhipsterConfig[LOCAL_BLUEPRINT_OPTION];
|
|
183
|
+
await this.composeWithJHipster(GENERATOR_INIT, [], { configure });
|
|
184
|
+
},
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
get [COMPOSING_PRIORITY]() {
|
|
189
|
+
if (this.delegateToBlueprint) return {};
|
|
190
|
+
return this.composing;
|
|
191
|
+
}
|
|
192
|
+
|
|
159
193
|
get loading() {
|
|
160
194
|
return {
|
|
161
195
|
createContext() {
|
|
@@ -184,6 +218,9 @@ export default class extends BaseBlueprintGenerator {
|
|
|
184
218
|
}
|
|
185
219
|
}
|
|
186
220
|
},
|
|
221
|
+
preparePath() {
|
|
222
|
+
this.application.blueprintsPath = this.application[LOCAL_BLUEPRINT_OPTION] ? '.blueprint/' : 'generators/';
|
|
223
|
+
},
|
|
187
224
|
};
|
|
188
225
|
}
|
|
189
226
|
|
|
@@ -240,8 +277,8 @@ export default class extends BaseBlueprintGenerator {
|
|
|
240
277
|
|
|
241
278
|
get postWriting() {
|
|
242
279
|
return {
|
|
243
|
-
|
|
244
|
-
if (this.shouldSkipFiles()) return;
|
|
280
|
+
packageJson() {
|
|
281
|
+
if (this.shouldSkipFiles() || this.jhipsterConfig[LOCAL_BLUEPRINT_OPTION]) return;
|
|
245
282
|
const { packagejs } = this.application;
|
|
246
283
|
this.packageJson.merge({
|
|
247
284
|
name: `generator-jhipster-${this.jhipsterConfig.baseName}`,
|
|
@@ -284,7 +321,7 @@ export default class extends BaseBlueprintGenerator {
|
|
|
284
321
|
});
|
|
285
322
|
},
|
|
286
323
|
addCliToPackageJson() {
|
|
287
|
-
if (this.shouldSkipFiles() || !this.jhipsterConfig.cli) return;
|
|
324
|
+
if (this.shouldSkipFiles() || !this.jhipsterConfig.cli || this.jhipsterConfig[LOCAL_BLUEPRINT_OPTION]) return;
|
|
288
325
|
const { baseName, cliName = `jhipster-${baseName}` } = this.application;
|
|
289
326
|
this.packageJson.merge({
|
|
290
327
|
bin: {
|
|
@@ -294,7 +331,7 @@ export default class extends BaseBlueprintGenerator {
|
|
|
294
331
|
});
|
|
295
332
|
},
|
|
296
333
|
addGeneratorJHipsterDependency() {
|
|
297
|
-
if (this.shouldSkipFiles()) return;
|
|
334
|
+
if (this.shouldSkipFiles() || this.jhipsterConfig[LOCAL_BLUEPRINT_OPTION]) return;
|
|
298
335
|
const { packagejs } = this.application;
|
|
299
336
|
if (this.jhipsterConfig.dynamic) {
|
|
300
337
|
this.packageJson.merge({
|
|
@@ -321,30 +358,47 @@ export default class extends BaseBlueprintGenerator {
|
|
|
321
358
|
return this.postWriting;
|
|
322
359
|
}
|
|
323
360
|
|
|
324
|
-
get
|
|
361
|
+
get postInstall() {
|
|
325
362
|
return {
|
|
326
363
|
async addSnapshot() {
|
|
327
|
-
|
|
364
|
+
const { [LOCAL_BLUEPRINT_OPTION]: localBlueprint } = this.jhipsterConfig;
|
|
365
|
+
const {
|
|
366
|
+
skipInstall,
|
|
367
|
+
skipGit,
|
|
368
|
+
existed,
|
|
369
|
+
[GENERATE_SNAPSHOTS]: generateSnapshots = !localBlueprint && !skipInstall && !skipGit && !existed,
|
|
370
|
+
} = this.options;
|
|
371
|
+
if (!generateSnapshots) return;
|
|
372
|
+
|
|
328
373
|
// Generate snapshots to add to git.
|
|
329
374
|
this.log(`
|
|
330
375
|
This is a new blueprint, executing '${chalk.yellow('npm run update-snapshot')}' to generate snapshots and commit to git.`);
|
|
331
376
|
try {
|
|
377
|
+
if (this.options[LINK_JHIPSTER_DEPENDENCY]) {
|
|
378
|
+
await this.spawnCommand('npm', ['link', 'generator-jhipster']);
|
|
379
|
+
}
|
|
332
380
|
await this.spawnCommand('npm', ['run', 'update-snapshot']);
|
|
333
381
|
} catch (error) {
|
|
382
|
+
if (generateSnapshots !== undefined) {
|
|
383
|
+
// We are forcing to generate snapshots fail the generation.
|
|
384
|
+
throw error;
|
|
385
|
+
}
|
|
334
386
|
this.log('Fail to generate snapshots');
|
|
335
387
|
}
|
|
336
388
|
},
|
|
337
389
|
};
|
|
338
390
|
}
|
|
339
391
|
|
|
340
|
-
get [
|
|
392
|
+
get [POST_INSTALL_PRIORITY]() {
|
|
341
393
|
if (this.delegateToBlueprint) return {};
|
|
342
|
-
return this.
|
|
394
|
+
return this.postInstall;
|
|
343
395
|
}
|
|
344
396
|
|
|
345
397
|
get end() {
|
|
346
398
|
return {
|
|
347
399
|
end() {
|
|
400
|
+
if (this.jhipsterConfig[LOCAL_BLUEPRINT_OPTION]) return;
|
|
401
|
+
|
|
348
402
|
this.log(`${chalk.bold.green('##### USAGE #####')}
|
|
349
403
|
To begin to work:
|
|
350
404
|
- launch: ${chalk.yellow.bold('npm install')}
|
|
File without changes
|
package/generators/generate-blueprint/templates/generators/generator/templates/template-file.ejs
CHANGED
|
File without changes
|
|
@@ -39,6 +39,7 @@ const { mergeBlueprints, parseBluePrints, loadBlueprintsFromConfiguration, norma
|
|
|
39
39
|
* Base class for a generator that can be extended through a blueprint.
|
|
40
40
|
*
|
|
41
41
|
* @class
|
|
42
|
+
* @extends {BaseGenerator}
|
|
42
43
|
* @property {import('yeoman-generator/lib/util/storage')} blueprintStorage - Storage for blueprint config (Blueprints only).
|
|
43
44
|
* @property {object} blueprintConfig - Proxy object for blueprintStorage (Blueprints only).
|
|
44
45
|
* @property {import('yeoman-generator')} jhipsterContext - JHipster parent generator (Blueprints only).
|
|
@@ -352,6 +353,24 @@ module.exports = class JHipsterBaseBlueprintGenerator extends BaseGenerator {
|
|
|
352
353
|
return {};
|
|
353
354
|
}
|
|
354
355
|
|
|
356
|
+
/**
|
|
357
|
+
* Priority API stub for blueprints.
|
|
358
|
+
*
|
|
359
|
+
* PostWriting priority should used to customize files.
|
|
360
|
+
*
|
|
361
|
+
* @returns {Object.<string, YeomanTask>} generator tasks
|
|
362
|
+
*/
|
|
363
|
+
get postInstall() {
|
|
364
|
+
return this._postInstall();
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Public API method used by the getter and also by Blueprints
|
|
369
|
+
*/
|
|
370
|
+
_postInstall() {
|
|
371
|
+
return {};
|
|
372
|
+
}
|
|
373
|
+
|
|
355
374
|
/**
|
|
356
375
|
* Priority API stub for blueprints.
|
|
357
376
|
*
|
|
@@ -409,7 +428,10 @@ module.exports = class JHipsterBaseBlueprintGenerator extends BaseGenerator {
|
|
|
409
428
|
this._configureBlueprints();
|
|
410
429
|
}
|
|
411
430
|
|
|
412
|
-
|
|
431
|
+
let blueprints = this.jhipsterConfig.blueprints || [];
|
|
432
|
+
if (this.options.localBlueprint) {
|
|
433
|
+
blueprints = blueprints.concat({ name: '@jhipster/local' });
|
|
434
|
+
}
|
|
413
435
|
for (const blueprint of blueprints) {
|
|
414
436
|
const blueprintGenerator = await this._composeBlueprint(blueprint.name, subGen, extraOptions);
|
|
415
437
|
if (blueprintGenerator) {
|
|
@@ -26,6 +26,7 @@ const {
|
|
|
26
26
|
PREPARING_EACH_ENTITY_FIELD,
|
|
27
27
|
PREPARING_EACH_ENTITY_RELATIONSHIP,
|
|
28
28
|
POST_PREPARING_EACH_ENTITY,
|
|
29
|
+
DEFAULT,
|
|
29
30
|
WRITING_ENTITIES,
|
|
30
31
|
POST_WRITING_ENTITIES,
|
|
31
32
|
} = PRIORITY_NAMES;
|
|
@@ -43,6 +44,9 @@ const {
|
|
|
43
44
|
|
|
44
45
|
/**
|
|
45
46
|
* This is the base class for a generator that generates entities.
|
|
47
|
+
*
|
|
48
|
+
* @class
|
|
49
|
+
* @extends {BaseBlueprintGenerator}
|
|
46
50
|
*/
|
|
47
51
|
class JHipsterBaseEntitiesGenerator extends BaseBlueprintGenerator {
|
|
48
52
|
constructor(args, options, features) {
|
|
@@ -103,7 +107,7 @@ class JHipsterBaseEntitiesGenerator extends BaseBlueprintGenerator {
|
|
|
103
107
|
|
|
104
108
|
getDataArgForPriority(priorityName) {
|
|
105
109
|
const dataArg = super.getDataArgForPriority(priorityName);
|
|
106
|
-
if (priorityName === WRITING_ENTITIES || priorityName === POST_WRITING_ENTITIES) {
|
|
110
|
+
if (priorityName === WRITING_ENTITIES || priorityName === POST_WRITING_ENTITIES || priorityName === DEFAULT) {
|
|
107
111
|
return {
|
|
108
112
|
...dataArg,
|
|
109
113
|
...this.getEntitiesDataToWrite(),
|
|
@@ -119,6 +119,7 @@ const isWin32 = os.platform() === 'win32';
|
|
|
119
119
|
* @param {...EditFileCallback} callbacks
|
|
120
120
|
* @returns {CascatedEditFileCallback} callback for cascated edit
|
|
121
121
|
*/
|
|
122
|
+
|
|
122
123
|
/**
|
|
123
124
|
* This is the Generator base class.
|
|
124
125
|
* This provides all the public API methods exposed via the module system.
|
|
@@ -126,7 +127,10 @@ const isWin32 = os.platform() === 'win32';
|
|
|
126
127
|
*
|
|
127
128
|
* The method signatures in public API should not be changed without a major version change
|
|
128
129
|
*
|
|
130
|
+
* @class
|
|
129
131
|
* @extends {import('yeoman-generator')}
|
|
132
|
+
* @property {import('yeoman-generator/lib/util/storage')} config - Storage for config.
|
|
133
|
+
* @property {object} jhipsterConfig - Proxy object for config.
|
|
130
134
|
*/
|
|
131
135
|
class JHipsterBaseGenerator extends PrivateBase {
|
|
132
136
|
constructor(args, options, features) {
|
|
@@ -2384,24 +2388,64 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
2384
2388
|
}
|
|
2385
2389
|
|
|
2386
2390
|
/**
|
|
2387
|
-
*
|
|
2391
|
+
* Block of files to written.
|
|
2392
|
+
*
|
|
2393
|
+
* @typedef {object} WriteFileBlock
|
|
2394
|
+
* @property {string | function(this: JHipsterBaseGenerator, any): string} [from] - relative path were sources are placed
|
|
2395
|
+
* @property {string | function(this: JHipsterBaseGenerator, any): string} [to=from] - relative path were the files should be written, fallbacks to from/path
|
|
2396
|
+
* @property {string | function(this: JHipsterBaseGenerator, any): string} [path] - same as from
|
|
2397
|
+
* @property {string | function(this: JHipsterBaseGenerator, any, string): string} [renameTo] - generate destinationFile based on sourceFile
|
|
2398
|
+
* @property {boolean | function(this: JHipsterBaseGenerator, any): boolean} [condition=true] - condition to enable to write the block
|
|
2399
|
+
* @property {EditFileCallback[]} transform - transforms (files processing) to be applied
|
|
2400
|
+
*/
|
|
2401
|
+
|
|
2402
|
+
/**
|
|
2403
|
+
* Template file to be written.
|
|
2404
|
+
*
|
|
2405
|
+
* @typedef {object} WriteFileTemplate
|
|
2406
|
+
* @property {string | function(this: JHipsterBaseGenerator, any): string} [sourceFile] - source file
|
|
2407
|
+
* @property {string | function(this: JHipsterBaseGenerator, any): string} [destinationFile] - destination file
|
|
2408
|
+
* @property {string | function(this: JHipsterBaseGenerator, any): string} [file] - deprecated, use sourceFile instead
|
|
2409
|
+
* @property {string | function(this: JHipsterBaseGenerator, any): string} [renameTo] - deprecated, use destinationFile insted
|
|
2410
|
+
* @property {EditFileCallback[]} [transform] - transforms (files processing) to be applied
|
|
2411
|
+
* @property {boolean} [binary] - binary files skips ejs render, ejs extension and file transform
|
|
2412
|
+
* @property {object} [options] - ejs options. Refer to https://ejs.co/#docs
|
|
2413
|
+
*/
|
|
2414
|
+
|
|
2415
|
+
/**
|
|
2416
|
+
* Sections of blocks to be writter.
|
|
2417
|
+
*
|
|
2418
|
+
* @typedef {Record<string, WriteFileBlock> & { _: {
|
|
2419
|
+
* transform: EditFileCallback[]
|
|
2420
|
+
* } }} WriteFileSection
|
|
2421
|
+
*/
|
|
2422
|
+
|
|
2423
|
+
/**
|
|
2424
|
+
* Template options to be passed to ejs renderFile.
|
|
2388
2425
|
*
|
|
2389
|
-
* @
|
|
2390
|
-
* @
|
|
2391
|
-
* @
|
|
2392
|
-
* @
|
|
2393
|
-
* @
|
|
2394
|
-
* @
|
|
2426
|
+
* @typedef {object} WriteFileOptions
|
|
2427
|
+
* @property {WriteFileSection} [sections] - sections to be writter
|
|
2428
|
+
* @property {WriteFileBlock[]} [blocks] - block to be writter
|
|
2429
|
+
* @property {WriteFileTemplate[]} [templates] - templates to be writter
|
|
2430
|
+
* @property {EditFileCallback[]} [transform] - transforms (files processing) to be applied
|
|
2431
|
+
* @property {object} [context=this] - context to be used as template data
|
|
2432
|
+
* @property {string|string[]} [rootTemplatesPath] - path(s) to look for templates.
|
|
2395
2433
|
* Single absolute path or relative path(s) between the templates folder and template path.
|
|
2396
|
-
|
|
2434
|
+
*/
|
|
2435
|
+
|
|
2436
|
+
/**
|
|
2437
|
+
* write the given files using provided options.
|
|
2438
|
+
*
|
|
2439
|
+
* @param {WriteFileOptions} options
|
|
2440
|
+
* @return {Promise<string[]>}
|
|
2397
2441
|
*/
|
|
2398
2442
|
async writeFiles(options) {
|
|
2399
2443
|
const paramCount = Object.keys(options).filter(key => ['sections', 'blocks', 'templates'].includes(key)).length;
|
|
2400
|
-
assert(paramCount > 0, 'One of sections, blocks or
|
|
2401
|
-
assert(paramCount === 1, 'Only one of sections, blocks or
|
|
2444
|
+
assert(paramCount > 0, 'One of sections, blocks or templates is required');
|
|
2445
|
+
assert(paramCount === 1, 'Only one of sections, blocks or templates must be provided');
|
|
2402
2446
|
|
|
2403
2447
|
const { sections, blocks, templates, rootTemplatesPath, context = this, transform: methodTransform = [] } = options;
|
|
2404
|
-
const { _: commonSpec = {} } = sections;
|
|
2448
|
+
const { _: commonSpec = {} } = sections || {};
|
|
2405
2449
|
const { transform: sectionTransform = [] } = commonSpec;
|
|
2406
2450
|
const startTime = new Date();
|
|
2407
2451
|
|
|
@@ -2449,7 +2493,11 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
2449
2493
|
const appendEjs = noEjs === undefined ? !binary && extension !== '.ejs' : !noEjs;
|
|
2450
2494
|
const ejsFile = appendEjs || extension === '.ejs';
|
|
2451
2495
|
|
|
2452
|
-
|
|
2496
|
+
if (typeof destinationFile === 'function') {
|
|
2497
|
+
destinationFile = resolveCallback(destinationFile);
|
|
2498
|
+
} else {
|
|
2499
|
+
destinationFile = appendEjs ? normalizeEjs(destinationFile) : destinationFile;
|
|
2500
|
+
}
|
|
2453
2501
|
|
|
2454
2502
|
let sourceFileFrom;
|
|
2455
2503
|
if (Array.isArray(rootTemplatesAbsolutePath)) {
|
|
@@ -2548,6 +2596,7 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
2548
2596
|
to: blockToCallback,
|
|
2549
2597
|
condition: blockConditionCallback,
|
|
2550
2598
|
transform: blockTransform = [],
|
|
2599
|
+
renameTo: blockRenameTo,
|
|
2551
2600
|
} = block;
|
|
2552
2601
|
assert(typeof block === 'object', `Block must be an object for ${blockSpecPath}`);
|
|
2553
2602
|
assert(Array.isArray(block.templates), `Block templates must be an array for ${blockSpecPath}`);
|
|
@@ -2570,7 +2619,12 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
2570
2619
|
}
|
|
2571
2620
|
if (typeof fileSpec === 'string') {
|
|
2572
2621
|
const sourceFile = path.join(blockPath, fileSpec);
|
|
2573
|
-
|
|
2622
|
+
let destinationFile;
|
|
2623
|
+
if (blockRenameTo) {
|
|
2624
|
+
destinationFile = this.destinationPath(blockRenameTo.call(this, context, fileSpec, this));
|
|
2625
|
+
} else {
|
|
2626
|
+
destinationFile = this.destinationPath(blockTo, fileSpec);
|
|
2627
|
+
}
|
|
2574
2628
|
return { sourceFile, destinationFile, noEjs, transform: derivedTransform };
|
|
2575
2629
|
}
|
|
2576
2630
|
|
|
@@ -2806,13 +2860,16 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
2806
2860
|
if (options.enableTranslation !== undefined) {
|
|
2807
2861
|
this.jhipsterConfig.enableTranslation = options.enableTranslation;
|
|
2808
2862
|
}
|
|
2863
|
+
if (options.autoCrlf !== undefined) {
|
|
2864
|
+
this.jhipsterConfig.autoCrlf = options.autoCrlf;
|
|
2865
|
+
}
|
|
2809
2866
|
if (options.language) {
|
|
2810
2867
|
// workaround double options parsing, remove once generator supports skipping parse options
|
|
2811
2868
|
const languages = options.language.flat();
|
|
2812
2869
|
if (languages.length === 1 && languages[0] === 'false') {
|
|
2813
2870
|
this.jhipsterConfig.enableTranslation = false;
|
|
2814
2871
|
} else {
|
|
2815
|
-
this.jhipsterConfig.languages = [...this.jhipsterConfig.languages, ...languages];
|
|
2872
|
+
this.jhipsterConfig.languages = [...(this.jhipsterConfig.languages || []), ...languages];
|
|
2816
2873
|
}
|
|
2817
2874
|
}
|
|
2818
2875
|
if (options.nativeLanguage) {
|
|
@@ -2917,6 +2974,7 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
2917
2974
|
loadAppConfig(config = _.defaults({}, this.jhipsterConfig, this.jhipsterDefaults), dest = this) {
|
|
2918
2975
|
dest.jhipsterVersion = config.jhipsterVersion;
|
|
2919
2976
|
dest.baseName = config.baseName;
|
|
2977
|
+
dest.projectVersion = process.env.JHI_PROJECT_VERSION || '0.0.1-SNAPSHOT';
|
|
2920
2978
|
dest.applicationType = config.applicationType;
|
|
2921
2979
|
dest.reactive = config.reactive;
|
|
2922
2980
|
dest.jhiPrefix = config.jhiPrefix;
|
|
@@ -3029,6 +3087,8 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
3029
3087
|
dest.clientFrameworkAngular = dest.clientFramework === ANGULAR;
|
|
3030
3088
|
dest.clientFrameworkReact = dest.clientFramework === REACT;
|
|
3031
3089
|
dest.clientFrameworkVue = dest.clientFramework === VUE;
|
|
3090
|
+
dest.clientFrameworkNo = dest.clientFramework === CLIENT_FRAMEWORK_NO;
|
|
3091
|
+
dest.clientFrameworkAny = dest.clientFramework && dest.clientFramework !== CLIENT_FRAMEWORK_NO;
|
|
3032
3092
|
dest.clientThemeNone = dest.clientTheme === 'none';
|
|
3033
3093
|
dest.clientThemePrimary = dest.clientThemeVariant === 'primary';
|
|
3034
3094
|
dest.clientThemeLight = dest.clientThemeVariant === 'light';
|
|
@@ -3095,6 +3155,7 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
3095
3155
|
dest.packageFolder = dest.packageName.replace(/\./g, '/');
|
|
3096
3156
|
}
|
|
3097
3157
|
|
|
3158
|
+
dest.serviceDiscoveryAny = dest.serviceDiscoveryType && dest.serviceDiscoveryType !== NO_SERVICE_DISCOVERY;
|
|
3098
3159
|
// Convert to false for templates.
|
|
3099
3160
|
if (dest.serviceDiscoveryType === NO_SERVICE_DISCOVERY || !dest.serviceDiscoveryType) {
|
|
3100
3161
|
dest.serviceDiscoveryType = false;
|
|
@@ -3169,7 +3230,7 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
3169
3230
|
loadDerivedPlatformConfig(dest = this) {
|
|
3170
3231
|
dest.serviceDiscoveryConsul = dest.serviceDiscoveryType === CONSUL;
|
|
3171
3232
|
dest.serviceDiscoveryEureka = dest.serviceDiscoveryType === EUREKA;
|
|
3172
|
-
dest.serviceDiscoveryAny = dest.
|
|
3233
|
+
dest.serviceDiscoveryAny = dest.serviceDiscoveryType && dest.serviceDiscoveryType !== NO_SERVICE_DISCOVERY;
|
|
3173
3234
|
dest.monitoringELK = dest.monitoring === ELK;
|
|
3174
3235
|
dest.monitoringPrometheus = dest.monitoring === PROMETHEUS;
|
|
3175
3236
|
}
|
|
@@ -3380,6 +3441,8 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
3380
3441
|
if (optionValue !== undefined) {
|
|
3381
3442
|
if (optionDesc.scope === 'storage') {
|
|
3382
3443
|
this.config.set(optionName, optionValue);
|
|
3444
|
+
} else if (optionDesc.scope === 'blueprint') {
|
|
3445
|
+
this.blueprintStorage.set(optionName, optionValue);
|
|
3383
3446
|
} else if (optionDesc.scope === 'runtime') {
|
|
3384
3447
|
this.configOptions[optionName] = optionValue;
|
|
3385
3448
|
} else if (optionDesc.scope === 'generator') {
|
|
@@ -3392,6 +3455,9 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
3392
3455
|
});
|
|
3393
3456
|
}
|
|
3394
3457
|
|
|
3458
|
+
/**
|
|
3459
|
+
* @private
|
|
3460
|
+
*/
|
|
3395
3461
|
getArgsForPriority(priorityName) {
|
|
3396
3462
|
if (this.features.priorityArgs) {
|
|
3397
3463
|
return [this.getDataArgForPriority(priorityName)];
|
|
@@ -3400,6 +3466,7 @@ templates: ${JSON.stringify(existingTemplates, null, 2)}`;
|
|
|
3400
3466
|
}
|
|
3401
3467
|
|
|
3402
3468
|
/**
|
|
3469
|
+
* @private
|
|
3403
3470
|
*/
|
|
3404
3471
|
getDataArgForPriority(priorityName) {
|
|
3405
3472
|
if (
|
|
@@ -28,25 +28,21 @@ const JAVA_COMPATIBLE_VERSIONS = ['11', '12', '13', '14', '15', '16', '17', '18'
|
|
|
28
28
|
const GRADLE_VERSION = gradleOptions.GRADLE_VERSION;
|
|
29
29
|
|
|
30
30
|
// Version of Node, NPM
|
|
31
|
-
const NODE_VERSION = '16.
|
|
31
|
+
const NODE_VERSION = '16.17.0';
|
|
32
32
|
const NPM_VERSION = commonPackageJson.devDependencies.npm;
|
|
33
33
|
const OPENAPI_GENERATOR_CLI_VERSION = '2.5.1';
|
|
34
34
|
|
|
35
35
|
// Libraries version
|
|
36
|
-
const JHIPSTER_DEPENDENCIES_VERSION = '7.9.
|
|
36
|
+
const JHIPSTER_DEPENDENCIES_VERSION = '7.9.3';
|
|
37
37
|
// 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.7.
|
|
39
|
-
const LIQUIBASE_VERSION = '4.
|
|
38
|
+
const SPRING_BOOT_VERSION = '2.7.3';
|
|
39
|
+
const LIQUIBASE_VERSION = '4.15.0';
|
|
40
40
|
// TODO v8: Remove this constant
|
|
41
41
|
const LIQUIBASE_DTD_VERSION = 'latest';
|
|
42
42
|
const HIBERNATE_VERSION = '5.6.10.Final';
|
|
43
43
|
const JACOCO_VERSION = '0.8.8';
|
|
44
44
|
const JACKSON_DATABIND_NULLABLE_VERSION = '0.2.3';
|
|
45
45
|
const JIB_VERSION = '3.2.1';
|
|
46
|
-
// TODO upgrade to h2 v2 once liquibase issues has been addressed
|
|
47
|
-
const H2_VERSION = '1.4.200';
|
|
48
|
-
// Version 0.9.x is not compatible with h2 v1
|
|
49
|
-
const H2_R2DBC_VERSION = '0.8.5.RELEASE';
|
|
50
46
|
|
|
51
47
|
// Version of docker images
|
|
52
48
|
const DOCKER_COMPOSE_FORMAT_VERSION = '3.8';
|
|
@@ -57,49 +53,49 @@ const DOCKER_JHIPSTER_CONTROL_CENTER_VERSION = 'v0.5.0';
|
|
|
57
53
|
const DOCKER_JHIPSTER_CONTROL_CENTER = `jhipster/jhipster-control-center:${DOCKER_JHIPSTER_CONTROL_CENTER_VERSION}`;
|
|
58
54
|
const DOCKER_JAVA_JRE_VERSION = '11-jre-focal';
|
|
59
55
|
const DOCKER_JAVA_JRE = `eclipse-temurin:${DOCKER_JAVA_JRE_VERSION}`;
|
|
60
|
-
const DOCKER_MYSQL_VERSION = '8.0.
|
|
56
|
+
const DOCKER_MYSQL_VERSION = '8.0.30';
|
|
61
57
|
const DOCKER_MYSQL = `mysql:${DOCKER_MYSQL_VERSION}`;
|
|
62
58
|
const DOCKER_MARIADB_VERSION = '10.8.3';
|
|
63
59
|
const DOCKER_MARIADB = `mariadb:${DOCKER_MARIADB_VERSION}`;
|
|
64
|
-
const DOCKER_POSTGRESQL_VERSION = '14.
|
|
60
|
+
const DOCKER_POSTGRESQL_VERSION = '14.5';
|
|
65
61
|
const DOCKER_POSTGRESQL = `postgres:${DOCKER_POSTGRESQL_VERSION}`;
|
|
66
|
-
const DOCKER_MONGODB_VERSION = '4.4.
|
|
62
|
+
const DOCKER_MONGODB_VERSION = '4.4.15';
|
|
67
63
|
const DOCKER_MONGODB = `mongo:${DOCKER_MONGODB_VERSION}`;
|
|
68
64
|
const DOCKER_COUCHBASE_VERSION = '7.0.3';
|
|
69
65
|
const DOCKER_COUCHBASE = `couchbase/server:${DOCKER_COUCHBASE_VERSION}`;
|
|
70
66
|
const DOCKER_CASSANDRA_VERSION = '3.11.13';
|
|
71
67
|
const DOCKER_CASSANDRA = `cassandra:${DOCKER_CASSANDRA_VERSION}`;
|
|
72
|
-
const DOCKER_MSSQL_VERSION = '2019-CU16-ubuntu-20.04';
|
|
68
|
+
const DOCKER_MSSQL_VERSION = '2019-CU16-GDR1-ubuntu-20.04';
|
|
73
69
|
const DOCKER_MSSQL = `mcr.microsoft.com/mssql/server:${DOCKER_MSSQL_VERSION}`;
|
|
74
|
-
const DOCKER_NEO4J_VERSION = '4.4.
|
|
70
|
+
const DOCKER_NEO4J_VERSION = '4.4.9';
|
|
75
71
|
const DOCKER_NEO4J = `neo4j:${DOCKER_NEO4J_VERSION}`;
|
|
76
|
-
const DOCKER_HAZELCAST_MANAGEMENT_CENTER_VERSION = '5.1.
|
|
72
|
+
const DOCKER_HAZELCAST_MANAGEMENT_CENTER_VERSION = '5.1.4';
|
|
77
73
|
const DOCKER_HAZELCAST_MANAGEMENT_CENTER = `hazelcast/management-center:${DOCKER_HAZELCAST_MANAGEMENT_CENTER_VERSION}`;
|
|
78
|
-
const DOCKER_MEMCACHED_VERSION = '1.6.
|
|
74
|
+
const DOCKER_MEMCACHED_VERSION = '1.6.16-alpine';
|
|
79
75
|
const DOCKER_MEMCACHED = `memcached:${DOCKER_MEMCACHED_VERSION}`;
|
|
80
76
|
const DOCKER_REDIS_VERSION = '6.2.7';
|
|
81
77
|
const DOCKER_REDIS = `redis:${DOCKER_REDIS_VERSION}`;
|
|
82
|
-
const DOCKER_KEYCLOAK_VERSION = '
|
|
78
|
+
const DOCKER_KEYCLOAK_VERSION = '19.0.1';
|
|
83
79
|
const DOCKER_KEYCLOAK = `quay.io/keycloak/keycloak:${DOCKER_KEYCLOAK_VERSION}`;
|
|
84
80
|
const DOCKER_ELASTICSEARCH_CONTAINER = 'docker.elastic.co/elasticsearch/elasticsearch';
|
|
85
81
|
// TODO V8 Rename ELASTICSEARCH_VERSION to DOCKER_ELASTICSEARCH_VERSION
|
|
86
82
|
const ELASTICSEARCH_VERSION = '7.17.4'; // The version should be coherent with the one from spring-data-elasticsearch project
|
|
87
83
|
const DOCKER_ELASTICSEARCH = `${DOCKER_ELASTICSEARCH_CONTAINER}:${ELASTICSEARCH_VERSION}`;
|
|
88
84
|
// TODO V8 Rename KAFKA_VERSION to DOCKER_KAFKA_VERSION
|
|
89
|
-
const KAFKA_VERSION = '7.
|
|
85
|
+
const KAFKA_VERSION = '7.2.1';
|
|
90
86
|
const DOCKER_KAFKA = `confluentinc/cp-kafka:${KAFKA_VERSION}`;
|
|
91
87
|
const DOCKER_ZOOKEEPER = `confluentinc/cp-zookeeper:${KAFKA_VERSION}`;
|
|
92
|
-
const DOCKER_SONAR_VERSION = '9.
|
|
88
|
+
const DOCKER_SONAR_VERSION = '9.6.0-community';
|
|
93
89
|
const DOCKER_SONAR = `sonarqube:${DOCKER_SONAR_VERSION}`;
|
|
94
|
-
const DOCKER_CONSUL_VERSION = '1.
|
|
90
|
+
const DOCKER_CONSUL_VERSION = '1.13.1';
|
|
95
91
|
const DOCKER_CONSUL = `consul:${DOCKER_CONSUL_VERSION}`;
|
|
96
92
|
const DOCKER_CONSUL_CONFIG_LOADER_VERSION = 'v0.4.1';
|
|
97
93
|
const DOCKER_CONSUL_CONFIG_LOADER = `jhipster/consul-config-loader:${DOCKER_CONSUL_CONFIG_LOADER_VERSION}`;
|
|
98
|
-
const DOCKER_PROMETHEUS_VERSION = 'v2.
|
|
94
|
+
const DOCKER_PROMETHEUS_VERSION = 'v2.38.0';
|
|
99
95
|
const DOCKER_PROMETHEUS = `prom/prometheus:${DOCKER_PROMETHEUS_VERSION}`;
|
|
100
96
|
const DOCKER_PROMETHEUS_ALERTMANAGER_VERSION = 'v0.24.0';
|
|
101
97
|
const DOCKER_PROMETHEUS_ALERTMANAGER = `prom/alertmanager:${DOCKER_PROMETHEUS_ALERTMANAGER_VERSION}`;
|
|
102
|
-
const DOCKER_GRAFANA_VERSION = '9.0
|
|
98
|
+
const DOCKER_GRAFANA_VERSION = '9.1.0';
|
|
103
99
|
const DOCKER_GRAFANA = `grafana/grafana:${DOCKER_GRAFANA_VERSION}`;
|
|
104
100
|
const DOCKER_JENKINS_VERSION = 'lts-jdk11';
|
|
105
101
|
const DOCKER_JENKINS = `jenkins/jenkins:${DOCKER_JENKINS_VERSION}`;
|
|
@@ -416,8 +412,6 @@ const constants = {
|
|
|
416
412
|
JIB_VERSION,
|
|
417
413
|
JACOCO_VERSION,
|
|
418
414
|
JACKSON_DATABIND_NULLABLE_VERSION,
|
|
419
|
-
H2_VERSION,
|
|
420
|
-
H2_R2DBC_VERSION,
|
|
421
415
|
|
|
422
416
|
// Docker
|
|
423
417
|
DOCKER_COMPOSE_FORMAT_VERSION,
|
|
File without changes
|
|
@@ -116,7 +116,7 @@ spec:
|
|
|
116
116
|
value: <%= app.baseName.toLowerCase() %>
|
|
117
117
|
<%_ } _%>
|
|
118
118
|
<%_ } _%>
|
|
119
|
-
<%_ if (!app.
|
|
119
|
+
<%_ if (!app.serviceDiscoveryAny && app.authenticationTypeJwt) { _%>
|
|
120
120
|
- name: JHIPSTER_SECURITY_AUTHENTICATION_JWT_BASE64_SECRET
|
|
121
121
|
valueFrom:
|
|
122
122
|
secretKeyRef:
|
|
@@ -38,7 +38,7 @@ spec:
|
|
|
38
38
|
name: <%= app.baseName.toLowerCase() %>
|
|
39
39
|
port:
|
|
40
40
|
name: http
|
|
41
|
-
<%_ if (!app.
|
|
41
|
+
<%_ if (!app.serviceDiscoveryAny) { _%>
|
|
42
42
|
<%_ appConfigs.filter(config => config.baseName !== app.baseName).forEach(config => { _%>
|
|
43
43
|
- path: /services/<%= config.baseName.toLowerCase() %>/<%= ingressTypeNginx ? "" : "*" %>
|
|
44
44
|
pathType: Prefix
|
|
@@ -57,7 +57,7 @@ spec:
|
|
|
57
57
|
gateways:
|
|
58
58
|
- <%= app.baseName.toLowerCase() %>-gateway
|
|
59
59
|
http:
|
|
60
|
-
<%_ if (!app.
|
|
60
|
+
<%_ if (!app.serviceDiscoveryAny) { _%>
|
|
61
61
|
<%_ appConfigs.filter(config => config.baseName !== app.baseName).forEach(config => { _%>
|
|
62
62
|
- match:
|
|
63
63
|
- uri:
|
|
File without changes
|
|
@@ -31,7 +31,7 @@ const appOut = appName.concat('-', suffix); _%>
|
|
|
31
31
|
- <%= appOut %>/<%= appName %>-ingress.yml
|
|
32
32
|
<%_ } _%>
|
|
33
33
|
<%_ } _%>
|
|
34
|
-
<%_ if (!appConfig.
|
|
34
|
+
<%_ if (!appConfig.serviceDiscoveryAny && appConfig.authenticationTypeJwt) { _%>
|
|
35
35
|
- <%= appOut %>/jwt-secret.yml
|
|
36
36
|
<%_ } _%>
|
|
37
37
|
<%_ if (monitoringPrometheus) { _%>
|