generator-jhipster 8.7.1 → 8.7.2
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/README.md +1 -1
- package/dist/cli/commands.d.mts +89 -89
- package/dist/cli/environment-builder.d.mts +7 -6
- package/dist/cli/environment-builder.mjs +5 -3
- package/dist/cli/jhipster-command.d.mts +2 -2
- package/dist/cli/jhipster-command.mjs +13 -4
- package/dist/cli/program.d.mts +53 -36
- package/dist/cli/program.mjs +41 -32
- package/dist/cli/utils.d.mts +2 -3
- package/dist/cli/utils.mjs +11 -21
- package/dist/generators/angular/generator.js +2 -2
- package/dist/generators/angular/resources/package.json +13 -13
- package/dist/generators/angular/templates/src/main/webapp/app/account/activate/activate.component.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/account/activate/activate.service.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/account/password/password-strength-bar/password-strength-bar.component.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/account/password/password.component.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/account/password/password.service.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/account/password-reset/finish/password-reset-finish.service.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/account/password-reset/init/password-reset-init.component.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/account/password-reset/init/password-reset-init.service.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/account/register/register.component.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/account/register/register.service.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/account/sessions/sessions.component.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/account/sessions/sessions.service.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/account/settings/settings.component.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/admin/configuration/configuration.component.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/admin/configuration/configuration.service.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/admin/gateway/gateway-routes.service.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/admin/gateway/gateway.component.ts.ejs +1 -1
- package/dist/generators/angular/templates/src/main/webapp/app/admin/health/health.component.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/admin/health/health.service.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/admin/health/modal/health-modal.component.ts.ejs +1 -1
- package/dist/generators/angular/templates/src/main/webapp/app/admin/logs/logs.component.ts.ejs +3 -3
- package/dist/generators/angular/templates/src/main/webapp/app/admin/logs/logs.service.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.ts.ejs +1 -1
- package/dist/generators/angular/templates/src/main/webapp/app/admin/metrics/metrics.component.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/admin/metrics/metrics.service.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/admin/tracker/tracker.component.ts.ejs +1 -1
- package/dist/generators/angular/templates/src/main/webapp/app/admin/user-management/delete/user-management-delete-dialog.component.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/admin/user-management/list/user-management.component.ts.ejs +5 -5
- package/dist/generators/angular/templates/src/main/webapp/app/admin/user-management/service/user-management.service.ts.ejs +3 -3
- package/dist/generators/angular/templates/src/main/webapp/app/admin/user-management/update/user-management-update.component.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/app.component.ts.ejs +4 -4
- package/dist/generators/angular/templates/src/main/webapp/app/core/auth/account.service.ts.ejs +7 -7
- package/dist/generators/angular/templates/src/main/webapp/app/core/auth/auth-jwt.service.ts.ejs +3 -3
- package/dist/generators/angular/templates/src/main/webapp/app/core/auth/auth-session.service.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/core/auth/csrf.service.ts.ejs +1 -1
- package/dist/generators/angular/templates/src/main/webapp/app/core/auth/state-storage.service.ts.ejs +3 -3
- package/dist/generators/angular/templates/src/main/webapp/app/core/interceptor/notification.interceptor.ts.ejs +1 -1
- package/dist/generators/angular/templates/src/main/webapp/app/core/tracker/tracker.service.ts.ejs +5 -5
- package/dist/generators/angular/templates/src/main/webapp/app/core/util/alert.service.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/list/_entityFile_.component.ts.ejs +4 -4
- package/dist/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/service/_entityFile_.service.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/home/home.component.ts.ejs +3 -3
- package/dist/generators/angular/templates/src/main/webapp/app/layouts/main/main.component.ts.ejs +7 -7
- package/dist/generators/angular/templates/src/main/webapp/app/layouts/navbar/navbar.component.ts.ejs +7 -7
- package/dist/generators/angular/templates/src/main/webapp/app/layouts/profiles/page-ribbon.component.ts.ejs +1 -1
- package/dist/generators/angular/templates/src/main/webapp/app/layouts/profiles/profile.service.ts.ejs +3 -3
- package/dist/generators/angular/templates/src/main/webapp/app/login/login.component.ts.ejs +3 -3
- package/dist/generators/angular/templates/src/main/webapp/app/login/login.service.ts.ejs +4 -4
- package/dist/generators/angular/templates/src/main/webapp/app/shared/alert/alert-error.component.ts.ejs +3 -3
- package/dist/generators/angular/templates/src/main/webapp/app/shared/alert/alert.component.ts.ejs +1 -1
- package/dist/generators/angular/templates/src/main/webapp/app/shared/auth/has-any-authority.directive.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/shared/language/translate.directive.ts.ejs +2 -2
- package/dist/generators/angular/templates/src/main/webapp/app/shared/language/translation.module.ts.ejs +3 -3
- package/dist/generators/angular/templates/src/main/webapp/app/shared/sort/sort-by.directive.ts.ejs +1 -1
- package/dist/generators/angular/templates/src/main/webapp/app/shared/sort/sort.service.ts.ejs +1 -1
- package/dist/generators/base/api.d.ts +10 -4
- package/dist/generators/base/generator.d.ts +4 -0
- package/dist/generators/base/generator.js +10 -1
- package/dist/generators/base/shared-data.js +2 -0
- package/dist/generators/base/support/faker.d.ts +1 -1
- package/dist/generators/base/support/faker.js +1 -1
- package/dist/generators/base/support/timestamp.js +10 -2
- package/dist/generators/base-application/support/prepare-entity.js +6 -1
- package/dist/generators/base-application/support/prepare-field.js +40 -16
- package/dist/generators/base-application/support/prepare-relationship.d.ts +1 -1
- package/dist/generators/base-application/support/task-type-inference.d.ts +18 -18
- package/dist/generators/base-application/types.d.ts +4 -0
- package/dist/generators/base-core/generator.d.ts +7 -4
- package/dist/generators/base-core/generator.js +31 -35
- package/dist/generators/base-workspaces/generator.d.ts +34 -1
- package/dist/generators/base-workspaces/generator.js +1 -1
- package/dist/generators/base-workspaces/internal/docker-base.js +1 -3
- package/dist/generators/bootstrap/support/eslint-transform.js +2 -2
- package/dist/generators/bootstrap/support/java-unused-imports-transform.js +2 -2
- package/dist/generators/bootstrap/support/prettier-support.js +2 -2
- package/dist/generators/bootstrap-application-base/generator.d.ts +2 -2
- package/dist/generators/bootstrap-application-base/generator.js +19 -5
- package/dist/generators/bootstrap-application-base/utils.d.ts +3 -3
- package/dist/generators/bootstrap-application-base/utils.js +9 -3
- package/dist/generators/bootstrap-workspaces/command.d.ts +12 -2
- package/dist/generators/bootstrap-workspaces/command.js +5 -3
- package/dist/generators/bootstrap-workspaces/generator.d.ts +8 -2
- package/dist/generators/bootstrap-workspaces/generator.js +0 -2
- package/dist/generators/bootstrap-workspaces/index.d.ts +1 -0
- package/dist/generators/bootstrap-workspaces/index.js +1 -0
- package/dist/generators/client/command.d.ts +22 -0
- package/dist/generators/client/command.js +22 -0
- package/dist/generators/client/files-common.js +1 -1
- package/dist/generators/client/generator.js +4 -5
- package/dist/generators/client/prompts.js +10 -9
- package/dist/generators/client/resources/package.json +3 -3
- package/dist/generators/client/templates/webpack/webpack.microfrontend.js.jhi.ejs +16 -5
- package/dist/generators/common/generator.js +2 -2
- package/dist/generators/common/resources/package.json +1 -1
- package/dist/generators/cypress/files.js +6 -0
- package/dist/generators/cypress/templates/src/test/javascript/cypress/e2e/account/login-page.cy.ts.ejs +2 -2
- package/dist/generators/cypress/templates/src/test/javascript/cypress/e2e/account/logout.cy.ts.ejs +39 -0
- package/dist/generators/docker/generator.d.ts +1 -1
- package/dist/generators/docker/templates/docker/keycloak.yml.ejs +2 -1
- package/dist/generators/docker-compose/command.js +9 -1
- package/dist/generators/docker-compose/generator.d.ts +11 -53
- package/dist/generators/docker-compose/generator.js +24 -23
- package/dist/generators/generate-blueprint/command.d.ts +97 -20
- package/dist/generators/generate-blueprint/command.js +28 -0
- package/dist/generators/generate-blueprint/constants.d.ts +2 -2
- package/dist/generators/generate-blueprint/files.d.ts +1 -42
- package/dist/generators/generate-blueprint/files.js +27 -29
- package/dist/generators/generate-blueprint/generator.d.ts +5 -2
- package/dist/generators/generate-blueprint/generator.js +78 -22
- package/dist/generators/generate-blueprint/resources/package.json +3 -3
- package/dist/generators/generate-blueprint/templates/.github/workflows/samples.yml.ejs +6 -8
- package/dist/generators/generate-blueprint/templates/README.md.ejs +12 -2
- package/dist/generators/generate-blueprint/templates/cli/cli-customizations.cjs.ejs +2 -0
- package/dist/generators/generate-blueprint/templates/cli/cli.cjs.ejs +2 -1
- package/dist/generators/generate-blueprint/templates/cli/commands.cjs.ejs +1 -1
- package/dist/generators/generate-blueprint/templates/eslint.config.js.jhi.blueprint.ejs +3 -2
- package/dist/generators/generate-blueprint/templates/generators/generator/command.mjs.ejs +8 -12
- package/dist/generators/generate-blueprint/templates/generators/generator/generator.mjs.jhi.ejs +8 -11
- package/dist/generators/generate-blueprint/templates/generators/generator/generator.spec.mjs.ejs +2 -2
- package/dist/generators/generate-blueprint/templates/generators/generator/index.mjs.ejs +2 -4
- package/dist/generators/generate-blueprint/templates/vitest.config.ts.ejs +0 -1
- package/dist/generators/generator-constants.d.ts +2 -2
- package/dist/generators/generator-constants.js +3 -3
- package/dist/generators/git/command.d.ts +10 -0
- package/dist/generators/git/command.js +10 -0
- package/dist/generators/git/generator.d.ts +5 -4
- package/dist/generators/git/generator.js +6 -4
- package/dist/generators/gradle/generators/node-gradle/templates/buildSrc/src/main/groovy/jhipster.node-gradle-conventions.gradle.ejs +16 -10
- package/dist/generators/gradle/internal/needles.d.ts +3 -1
- package/dist/generators/gradle/internal/needles.js +10 -5
- package/dist/generators/gradle/templates/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/dist/generators/gradle/types.d.ts +3 -2
- package/dist/generators/init/command.d.ts +4 -20
- package/dist/generators/init/command.js +1 -1
- package/dist/generators/init/resources/.node-version +1 -1
- package/dist/generators/java/command.d.ts +3 -5
- package/dist/generators/java/command.js +1 -20
- package/dist/generators/java/generators/bootstrap/command.d.ts +7 -0
- package/dist/generators/java/generators/bootstrap/command.js +7 -0
- package/dist/generators/java/generators/build-tool/generator.js +37 -13
- package/dist/generators/java/generators/graalvm/command.d.ts +5 -0
- package/dist/generators/java/generators/graalvm/command.js +5 -0
- package/dist/generators/java/generators/graalvm/generator.d.ts +9 -0
- package/dist/generators/java/generators/graalvm/generator.js +222 -0
- package/dist/generators/java/generators/graalvm/index.d.ts +20 -0
- package/dist/generators/java/generators/graalvm/index.js +20 -0
- package/dist/generators/java/generators/graalvm/internal/maven-definition.d.ts +8 -0
- package/dist/generators/java/generators/graalvm/internal/maven-definition.js +130 -0
- package/dist/generators/java/generators/graalvm/resources/build.gradle +1 -0
- package/dist/generators/java/generators/graalvm/resources/gradle/libs.versions.toml +5 -0
- package/dist/generators/java/generators/graalvm/templates/README.md.jhi.native.ejs +53 -0
- package/dist/generators/java/generators/graalvm/templates/gradle/native.gradle.ejs +44 -0
- package/dist/generators/java/generators/graalvm/templates/src/main/java/_package_/config/NativeConfiguration.java.ejs +14 -0
- package/dist/generators/java/generators/node/generator.d.ts +6 -18
- package/dist/generators/java/generators/node/generator.js +31 -0
- package/dist/generators/java/generators/openapi-generator/generator.js +2 -2
- package/dist/generators/java/support/util.d.ts +1 -1
- package/dist/generators/java/types.d.ts +4 -1
- package/dist/generators/javascript/generators/bootstrap/command.d.ts +21 -20
- package/dist/generators/javascript/generators/bootstrap/generator.d.ts +1 -2
- package/dist/generators/javascript/generators/bootstrap/generator.js +9 -5
- package/dist/generators/javascript/types.d.ts +9 -2
- package/dist/generators/kubernetes/command.d.ts +12 -0
- package/dist/generators/kubernetes/command.js +12 -0
- package/dist/generators/kubernetes/index.d.ts +1 -0
- package/dist/generators/kubernetes/index.js +1 -0
- package/dist/generators/kubernetes-helm/index.d.ts +1 -0
- package/dist/generators/kubernetes-helm/index.js +1 -0
- package/dist/generators/kubernetes-knative/generator.d.ts +1 -1
- package/dist/generators/kubernetes-knative/index.d.ts +1 -0
- package/dist/generators/kubernetes-knative/index.js +1 -0
- package/dist/generators/languages/entity-files.d.ts +3 -2
- package/dist/generators/languages/entity-files.js +0 -1
- package/dist/generators/languages/generator.d.ts +1 -0
- package/dist/generators/languages/generator.js +1 -0
- package/dist/generators/liquibase/files.js +8 -0
- package/dist/generators/liquibase/generator.d.ts +1 -1
- package/dist/generators/liquibase/generator.js +15 -0
- package/dist/generators/liquibase/templates/src/main/resources/META-INF/native-image/liquibase/reflect-config.json +145 -0
- package/dist/generators/liquibase/templates/src/main/resources/config/liquibase/changelog/add_relationship_constraints.ejs +81 -0
- package/dist/generators/liquibase/templates/src/main/resources/config/liquibase/changelog/added_entity_constraints.xml.ejs +2 -62
- package/dist/generators/liquibase/templates/src/main/resources/config/liquibase/changelog/updated_entity_constraints.xml.ejs +3 -60
- package/dist/generators/maven/generators/frontend-plugin/generator.js +10 -5
- package/dist/generators/maven/types.d.ts +3 -6
- package/dist/generators/project-name/command.d.ts +25 -20
- package/dist/generators/project-name/command.js +20 -4
- package/dist/generators/project-name/generator.d.ts +3 -12
- package/dist/generators/project-name/generator.js +6 -38
- package/dist/generators/react/generator.d.ts +1 -1
- package/dist/generators/react/generator.js +15 -2
- package/dist/generators/react/resources/package.json +25 -24
- package/dist/generators/react/templates/package.json.ejs +0 -3
- package/dist/generators/server/generator.d.ts +1 -7
- package/dist/generators/server/generator.js +22 -50
- package/dist/generators/server/resources/Dockerfile +12 -12
- package/dist/generators/server/resources/gradle/libs.versions.toml +10 -7
- package/dist/generators/server/resources/pom.xml +11 -11
- package/dist/generators/server/types.d.ts +8 -0
- package/dist/generators/spring-boot/cleanup.js +2 -2
- package/dist/generators/spring-boot/command.d.ts +19 -0
- package/dist/generators/spring-boot/command.js +19 -0
- package/dist/generators/spring-boot/generator.d.ts +1 -1
- package/dist/generators/spring-boot/generator.js +4 -1
- package/dist/generators/spring-boot/prompts.js +12 -12
- package/dist/generators/spring-boot/resources/spring-boot-dependencies.pom +107 -106
- package/dist/generators/spring-boot/templates/README.md.jhi.spring-boot.ejs +22 -16
- package/dist/generators/spring-boot/templates/gradle/profile_dev.gradle.ejs +2 -46
- package/dist/generators/spring-boot/templates/gradle/profile_prod.gradle.ejs +1 -47
- package/dist/generators/spring-boot/templates/src/main/java/_package_/Application.java.ejs +4 -1
- package/dist/generators/spring-boot/templates/src/main/java/_package_/config/SecurityConfiguration_imperative.java.ejs +29 -6
- package/dist/generators/spring-boot/templates/src/main/java/_package_/config/SecurityConfiguration_reactive.java.ejs +32 -6
- package/dist/generators/spring-boot/templates/src/main/java/_package_/config/WebConfigurer.java.ejs +13 -8
- package/dist/generators/spring-boot/templates/src/main/java/_package_/domain/User.java.ejs +2 -3
- package/dist/generators/spring-boot/templates/src/main/resources/config/application-dev.yml.ejs +8 -3
- package/dist/generators/spring-boot/templates/src/main/resources/config/application.yml.ejs +4 -2
- package/dist/generators/spring-boot/templates/src/test/java/_package_/_entityPackage_/web/rest/_entityClass_ResourceIT.java.ejs +8 -7
- package/dist/generators/spring-cache/generator.d.ts +2 -1
- package/dist/generators/spring-cache/generator.js +18 -0
- package/dist/generators/spring-cache/resources/gradle/libs.versions.toml +1 -1
- package/dist/generators/spring-cloud/generators/gateway/generator.js +2 -2
- package/dist/generators/spring-data-couchbase/generator.js +2 -2
- package/dist/generators/spring-data-mongodb/generator.d.ts +1 -1
- package/dist/generators/spring-data-relational/files.d.ts +1 -0
- package/dist/generators/spring-data-relational/files.js +6 -0
- package/dist/generators/spring-data-relational/generator.d.ts +2 -1
- package/dist/generators/spring-data-relational/generator.js +63 -2
- package/dist/generators/spring-data-relational/internal/dependencies.d.ts +87 -7
- package/dist/generators/spring-data-relational/internal/dependencies.js +30 -18
- package/dist/generators/spring-data-relational/templates/src/main/java/_package_/_entityPackage_/domain/_persistClass_.java.jhi.spring_data_persistable.ejs +6 -0
- package/dist/generators/spring-data-relational/templates/src/main/java/_package_/_entityPackage_/domain/_persistClass_.java.jhi.spring_data_reactive.ejs +1 -2
- package/dist/generators/spring-data-relational/templates/src/main/java/_package_/config/DatabaseConfiguration.java.ejs +8 -3
- package/dist/generators/spring-data-relational/templates/src/main/java/_package_/config/JacksonNativeConfiguration.java.ejs +98 -0
- package/dist/generators/vue/files-vue.js +4 -1
- package/dist/generators/vue/generator.d.ts +1 -1
- package/dist/generators/vue/generator.js +84 -3
- package/dist/generators/vue/resources/package.json +20 -19
- package/dist/generators/vue/support/update-languages.js +1 -1
- package/dist/generators/vue/templates/module-federation.config.cjs.ejs +55 -0
- package/dist/generators/vue/templates/package.json.ejs +11 -62
- package/dist/generators/vue/templates/src/main/webapp/app/main.ts.ejs +1 -1
- package/dist/generators/vue/templates/vite.config.mts.ejs +15 -21
- package/dist/generators/workspaces/generator.d.ts +20 -9
- package/dist/generators/workspaces/generator.js +3 -3
- package/dist/lib/application/field-types.d.ts +2 -1
- package/dist/lib/command/converter.d.ts +6 -2
- package/dist/lib/command/converter.js +4 -1
- package/dist/lib/command/load.js +1 -0
- package/dist/lib/command/lookup-commands-configs.js +9 -12
- package/dist/lib/command/support/merge-union.d.ts +17 -6
- package/dist/lib/command/types.d.ts +38 -11
- package/dist/lib/eslint/index.d.ts +6 -14
- package/dist/lib/eslint/index.js +1 -2
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +7 -3
- package/dist/lib/jdl/core/parsing/validator.js +2 -2
- package/dist/lib/jhipster/default-application-options.d.ts +83 -15
- package/dist/lib/jhipster/default-application-options.js +26 -27
- package/dist/lib/testing/get-generator.d.ts +1 -0
- package/dist/lib/testing/get-generator.js +6 -2
- package/dist/lib/testing/github-group.d.ts +6 -0
- package/dist/lib/testing/github-group.js +56 -0
- package/dist/lib/testing/github-matrix.d.ts +38 -0
- package/dist/lib/testing/github-matrix.js +72 -0
- package/dist/lib/testing/github.d.ts +1 -0
- package/dist/lib/testing/github.js +6 -2
- package/dist/lib/testing/helpers.d.ts +41 -3
- package/dist/lib/testing/helpers.js +74 -12
- package/dist/lib/testing/index.d.ts +2 -0
- package/dist/lib/testing/index.js +2 -0
- package/dist/lib/testing/support/matcher.d.ts +2 -2
- package/dist/lib/testing/support/matcher.js +3 -3
- package/dist/lib/types/application/application.d.ts +6 -1
- package/dist/lib/types/application/entity.d.ts +3 -1
- package/dist/lib/types/application/field.d.ts +16 -4
- package/dist/lib/types/application/options.d.ts +4 -0
- package/dist/lib/types/application/relationship.d.ts +1 -0
- package/dist/lib/types/application/yo-rc.d.ts +4 -0
- package/dist/lib/types/base/entity.d.ts +1 -0
- package/dist/lib/utils/logger.d.ts +1 -1
- package/dist/lib/utils/yo-rc.d.ts +27 -3
- package/package.json +33 -31
- package/dist/generators/generate-blueprint/templates/vitest.test-setup.ts.ejs +0 -6
- package/dist/generators/vue/templates/webpack/webpack.microfrontend.js.jhi.vue.ejs +0 -45
|
@@ -1,21 +1,98 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
declare const command: {
|
|
2
|
+
readonly configs: {
|
|
3
|
+
readonly caret: {
|
|
4
|
+
readonly cli: {
|
|
5
|
+
readonly description: "Use caret in package.json engines";
|
|
6
|
+
readonly type: BooleanConstructor;
|
|
7
|
+
};
|
|
8
|
+
readonly scope: "storage";
|
|
9
|
+
};
|
|
10
|
+
readonly recreatePackageLock: {
|
|
11
|
+
readonly description: "Recreate package lock";
|
|
12
|
+
readonly cli: {
|
|
13
|
+
readonly type: BooleanConstructor;
|
|
14
|
+
};
|
|
15
|
+
readonly scope: "generator";
|
|
16
|
+
};
|
|
17
|
+
readonly skipWorkflows: {
|
|
18
|
+
readonly description: "Skip github workflows";
|
|
19
|
+
readonly cli: {
|
|
20
|
+
readonly type: BooleanConstructor;
|
|
21
|
+
};
|
|
22
|
+
readonly scope: "generator";
|
|
23
|
+
};
|
|
24
|
+
readonly ignoreExistingGenerators: {
|
|
25
|
+
readonly description: "Ignore existing generators";
|
|
26
|
+
readonly cli: {
|
|
27
|
+
readonly type: BooleanConstructor;
|
|
28
|
+
};
|
|
29
|
+
readonly scope: "generator";
|
|
30
|
+
};
|
|
31
|
+
readonly githubRepository: {
|
|
32
|
+
readonly cli: {
|
|
33
|
+
readonly description: "Github Repository";
|
|
34
|
+
readonly type: StringConstructor;
|
|
35
|
+
};
|
|
36
|
+
readonly scope: "storage";
|
|
37
|
+
};
|
|
38
|
+
readonly githubWorkflows: {
|
|
39
|
+
readonly cli: {
|
|
40
|
+
readonly description: "Generate github workflows";
|
|
41
|
+
readonly type: BooleanConstructor;
|
|
42
|
+
};
|
|
43
|
+
readonly scope: "storage";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
readonly options: {
|
|
47
|
+
readonly generateSnapshots: {
|
|
48
|
+
readonly description: "Generate test snapshots";
|
|
49
|
+
readonly type: BooleanConstructor;
|
|
50
|
+
};
|
|
51
|
+
readonly linkJhipsterDependency: {
|
|
52
|
+
readonly description: "Link JHipster dependency for testing";
|
|
53
|
+
readonly type: BooleanConstructor;
|
|
54
|
+
readonly hide: true;
|
|
55
|
+
};
|
|
56
|
+
readonly subGenerators: {
|
|
57
|
+
readonly description: "Sub generators to generate";
|
|
58
|
+
readonly type: ArrayConstructor;
|
|
59
|
+
readonly scope: "storage";
|
|
60
|
+
};
|
|
61
|
+
readonly additionalSubGenerators: {
|
|
62
|
+
readonly description: "Comma separated additional sub generators to generate";
|
|
63
|
+
readonly type: StringConstructor;
|
|
64
|
+
readonly scope: "storage";
|
|
65
|
+
};
|
|
66
|
+
readonly dynamic: {
|
|
67
|
+
readonly description: "Generate dynamic generators (advanced)";
|
|
68
|
+
readonly type: BooleanConstructor;
|
|
69
|
+
readonly scope: "storage";
|
|
70
|
+
};
|
|
71
|
+
readonly js: {
|
|
72
|
+
readonly description: "Use js extension";
|
|
73
|
+
readonly type: BooleanConstructor;
|
|
74
|
+
readonly scope: "storage";
|
|
75
|
+
};
|
|
76
|
+
readonly localBlueprint: {
|
|
77
|
+
readonly description: "Generate a local blueprint";
|
|
78
|
+
readonly type: BooleanConstructor;
|
|
79
|
+
readonly scope: "storage";
|
|
80
|
+
};
|
|
81
|
+
readonly cli: {
|
|
82
|
+
readonly description: "Generate a cli for the blueprint";
|
|
83
|
+
readonly type: BooleanConstructor;
|
|
84
|
+
readonly scope: "storage";
|
|
85
|
+
};
|
|
86
|
+
readonly allGenerators: {
|
|
87
|
+
readonly description: "Generate every sub generator";
|
|
88
|
+
readonly type: BooleanConstructor;
|
|
89
|
+
readonly scope: "generator";
|
|
90
|
+
};
|
|
91
|
+
readonly allPriorities: {
|
|
92
|
+
readonly description: "Generate every priority";
|
|
93
|
+
readonly type: BooleanConstructor;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
readonly import: readonly ["init"];
|
|
97
|
+
};
|
|
21
98
|
export default command;
|
|
@@ -2,6 +2,34 @@ import { GENERATOR_INIT } from '../generator-list.js';
|
|
|
2
2
|
import { ADDITIONAL_SUB_GENERATORS, ALL_GENERATORS, ALL_PRIORITIES, CLI_OPTION, DYNAMIC, GENERATE_SNAPSHOTS, JS, LINK_JHIPSTER_DEPENDENCY, LOCAL_BLUEPRINT_OPTION, SUB_GENERATORS, } from './constants.js';
|
|
3
3
|
const command = {
|
|
4
4
|
configs: {
|
|
5
|
+
caret: {
|
|
6
|
+
cli: {
|
|
7
|
+
description: 'Use caret in package.json engines',
|
|
8
|
+
type: Boolean,
|
|
9
|
+
},
|
|
10
|
+
scope: 'storage',
|
|
11
|
+
},
|
|
12
|
+
recreatePackageLock: {
|
|
13
|
+
description: 'Recreate package lock',
|
|
14
|
+
cli: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
},
|
|
17
|
+
scope: 'generator',
|
|
18
|
+
},
|
|
19
|
+
skipWorkflows: {
|
|
20
|
+
description: 'Skip github workflows',
|
|
21
|
+
cli: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
},
|
|
24
|
+
scope: 'generator',
|
|
25
|
+
},
|
|
26
|
+
ignoreExistingGenerators: {
|
|
27
|
+
description: 'Ignore existing generators',
|
|
28
|
+
cli: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
},
|
|
31
|
+
scope: 'generator',
|
|
32
|
+
},
|
|
5
33
|
githubRepository: {
|
|
6
34
|
cli: {
|
|
7
35
|
description: 'Github Repository',
|
|
@@ -37,7 +37,7 @@ export declare const defaultSubGeneratorConfig: () => {
|
|
|
37
37
|
priorities: never[];
|
|
38
38
|
};
|
|
39
39
|
export declare const allGeneratorsConfig: () => {
|
|
40
|
-
subGenerators: ("base" | "upgrade" | "info" | "angular" | "react" | "vue" | "maven" | "gradle" | "cypress" | "cucumber" | "gatling" | "spring-websocket" | "languages" | "bootstrap" | "bootstrap-application-base" | "common" | "server" | "client" | "git" | "workspaces" | "spring-boot" | "liquibase" | "java" | "spring-data-relational" | "app" | "base-application" | "base-core" | "base-entity-changes" | "base-workspaces" | "bootstrap-application" | "bootstrap-application-client" | "bootstrap-application-server" | "bootstrap-workspaces" | "ci-cd" | "docker" | "docker-compose" | "entities" | "entity" | "export-jdl" | "feign-client" | "generate-blueprint" | "heroku" | "init" | "
|
|
40
|
+
subGenerators: ("base" | "upgrade" | "info" | "angular" | "react" | "vue" | "maven" | "gradle" | "cypress" | "cucumber" | "gatling" | "spring-websocket" | "languages" | "jdl" | "bootstrap" | "bootstrap-application-base" | "common" | "server" | "client" | "git" | "workspaces" | "spring-boot" | "liquibase" | "java" | "spring-data-relational" | "app" | "base-application" | "base-core" | "base-entity-changes" | "base-workspaces" | "bootstrap-application" | "bootstrap-application-client" | "bootstrap-application-server" | "bootstrap-workspaces" | "ci-cd" | "docker" | "docker-compose" | "entities" | "entity" | "export-jdl" | "feign-client" | "generate-blueprint" | "heroku" | "init" | "kubernetes" | "kubernetes-helm" | "kubernetes-knative" | "project-name" | "spring-cache" | "spring-cloud-stream" | "spring-data-cassandra" | "spring-data-couchbase" | "spring-data-elasticsearch" | "spring-data-mongodb" | "spring-data-neo4j")[];
|
|
41
41
|
additionalSubGenerators: string;
|
|
42
42
|
dynamic: boolean;
|
|
43
43
|
js: boolean;
|
|
@@ -63,7 +63,7 @@ export declare const prompts: () => ({
|
|
|
63
63
|
type: string;
|
|
64
64
|
name: string;
|
|
65
65
|
message: string;
|
|
66
|
-
choices: ("base" | "upgrade" | "info" | "angular" | "react" | "vue" | "maven" | "gradle" | "cypress" | "cucumber" | "gatling" | "spring-websocket" | "languages" | "bootstrap" | "bootstrap-application-base" | "common" | "server" | "client" | "git" | "workspaces" | "spring-boot" | "liquibase" | "java" | "spring-data-relational" | "app" | "base-application" | "base-core" | "base-entity-changes" | "base-workspaces" | "bootstrap-application" | "bootstrap-application-client" | "bootstrap-application-server" | "bootstrap-workspaces" | "ci-cd" | "docker" | "docker-compose" | "entities" | "entity" | "export-jdl" | "feign-client" | "generate-blueprint" | "heroku" | "init" | "
|
|
66
|
+
choices: ("base" | "upgrade" | "info" | "angular" | "react" | "vue" | "maven" | "gradle" | "cypress" | "cucumber" | "gatling" | "spring-websocket" | "languages" | "jdl" | "bootstrap" | "bootstrap-application-base" | "common" | "server" | "client" | "git" | "workspaces" | "spring-boot" | "liquibase" | "java" | "spring-data-relational" | "app" | "base-application" | "base-core" | "base-entity-changes" | "base-workspaces" | "bootstrap-application" | "bootstrap-application-client" | "bootstrap-application-server" | "bootstrap-workspaces" | "ci-cd" | "docker" | "docker-compose" | "entities" | "entity" | "export-jdl" | "feign-client" | "generate-blueprint" | "heroku" | "init" | "kubernetes" | "kubernetes-helm" | "kubernetes-knative" | "project-name" | "spring-cache" | "spring-cloud-stream" | "spring-data-cassandra" | "spring-data-couchbase" | "spring-data-elasticsearch" | "spring-data-mongodb" | "spring-data-neo4j")[];
|
|
67
67
|
pageSize: number;
|
|
68
68
|
loop: boolean;
|
|
69
69
|
default?: undefined;
|
|
@@ -1,43 +1,2 @@
|
|
|
1
1
|
export declare const files: import("../base/api.js").WriteFileSection<any>;
|
|
2
|
-
export declare const generatorFiles:
|
|
3
|
-
generator: ({
|
|
4
|
-
path: string;
|
|
5
|
-
to: (ctx: any) => string;
|
|
6
|
-
templates: ({
|
|
7
|
-
file: string;
|
|
8
|
-
renameTo: (ctx: any) => "generator.mjs.jhi" | "generator.js.jhi";
|
|
9
|
-
} | {
|
|
10
|
-
file: string;
|
|
11
|
-
renameTo: (ctx: any) => "index.mjs" | "index.js";
|
|
12
|
-
})[];
|
|
13
|
-
condition?: undefined;
|
|
14
|
-
transform?: undefined;
|
|
15
|
-
} | {
|
|
16
|
-
path: string;
|
|
17
|
-
condition: (ctx: any) => any;
|
|
18
|
-
to: (ctx: any) => string;
|
|
19
|
-
templates: {
|
|
20
|
-
file: string;
|
|
21
|
-
renameTo: (ctx: any) => "command.mjs" | "command.js";
|
|
22
|
-
}[];
|
|
23
|
-
transform?: undefined;
|
|
24
|
-
} | {
|
|
25
|
-
path: string;
|
|
26
|
-
to: (ctx: any) => string;
|
|
27
|
-
condition: (ctx: any) => boolean;
|
|
28
|
-
templates: {
|
|
29
|
-
file: string;
|
|
30
|
-
renameTo: (ctx: any) => "generator.spec.mjs" | "generator.spec.js";
|
|
31
|
-
}[];
|
|
32
|
-
transform?: undefined;
|
|
33
|
-
} | {
|
|
34
|
-
path: string;
|
|
35
|
-
to: (ctx: any) => string;
|
|
36
|
-
condition(ctx: any): any;
|
|
37
|
-
transform: boolean;
|
|
38
|
-
templates: {
|
|
39
|
-
file: string;
|
|
40
|
-
renameTo: (ctx: any) => string;
|
|
41
|
-
}[];
|
|
42
|
-
})[];
|
|
43
|
-
};
|
|
2
|
+
export declare const generatorFiles: import("../base/api.js").WriteFileSection<any>;
|
|
@@ -29,11 +29,13 @@ export const files = asWriteFilesSection({
|
|
|
29
29
|
'README.md',
|
|
30
30
|
'tsconfig.json',
|
|
31
31
|
'vitest.config.ts',
|
|
32
|
-
'vitest.test-setup.ts',
|
|
33
32
|
'.blueprint/cli/commands.mjs',
|
|
34
33
|
'.blueprint/generate-sample/command.mjs',
|
|
35
34
|
'.blueprint/generate-sample/generator.mjs',
|
|
36
35
|
'.blueprint/generate-sample/index.mjs',
|
|
36
|
+
// Always write cli for devBlueprint usage
|
|
37
|
+
'cli/cli.cjs',
|
|
38
|
+
{ sourceFile: 'cli/cli-customizations.cjs', override: false },
|
|
37
39
|
],
|
|
38
40
|
},
|
|
39
41
|
{
|
|
@@ -42,17 +44,15 @@ export const files = asWriteFilesSection({
|
|
|
42
44
|
'.blueprint/github-build-matrix/build-matrix.mjs',
|
|
43
45
|
'.blueprint/github-build-matrix/generator.mjs',
|
|
44
46
|
'.blueprint/github-build-matrix/index.mjs',
|
|
45
|
-
'.github/workflows/build-cache.yml',
|
|
46
|
-
'.github/workflows/samples.yml',
|
|
47
47
|
],
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
|
-
condition: ctx => !ctx[LOCAL_BLUEPRINT_OPTION] && !ctx.
|
|
51
|
-
templates: ['.
|
|
50
|
+
condition: ctx => !ctx[LOCAL_BLUEPRINT_OPTION] && ctx.githubWorkflows && !ctx.skipWorkflows,
|
|
51
|
+
templates: ['.github/workflows/build-cache.yml', '.github/workflows/samples.yml'],
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
condition: ctx => ctx.
|
|
55
|
-
templates: ['
|
|
54
|
+
condition: ctx => !ctx[LOCAL_BLUEPRINT_OPTION] && !ctx.sampleWritten,
|
|
55
|
+
templates: ['.blueprint/generate-sample/templates/samples/sample.jdl'],
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
condition: ctx => ctx.commands.length > 0,
|
|
@@ -60,30 +60,28 @@ export const files = asWriteFilesSection({
|
|
|
60
60
|
},
|
|
61
61
|
],
|
|
62
62
|
});
|
|
63
|
-
export const generatorFiles = {
|
|
63
|
+
export const generatorFiles = asWriteFilesSection({
|
|
64
64
|
generator: [
|
|
65
65
|
{
|
|
66
66
|
path: 'generators/generator',
|
|
67
67
|
to: ctx => `${ctx.application.blueprintsPath}${ctx.generator}`,
|
|
68
68
|
templates: [
|
|
69
|
-
{
|
|
70
|
-
{ file: 'index.mjs', renameTo: ctx => (ctx.js ? 'index.js' : 'index.mjs') },
|
|
71
|
-
],
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
path: 'generators/generator',
|
|
75
|
-
condition: ctx => ctx.priorities.find(priority => priority.name === 'initializing'),
|
|
76
|
-
to: ctx => `${ctx.application.blueprintsPath}${ctx.generator}`,
|
|
77
|
-
templates: [{ file: 'command.mjs', renameTo: ctx => (ctx.js ? 'command.js' : 'command.mjs') }],
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
path: 'generators/generator',
|
|
81
|
-
to: ctx => `${ctx.application.blueprintsPath}${ctx.generator}`,
|
|
82
|
-
condition: ctx => !ctx.generator.startsWith('entity') && !ctx.application[LOCAL_BLUEPRINT_OPTION],
|
|
83
|
-
templates: [
|
|
69
|
+
{ sourceFile: 'index.mjs', destinationFile: ctx => `index.${ctx.blueprintMjsExtension}` },
|
|
84
70
|
{
|
|
85
|
-
|
|
86
|
-
|
|
71
|
+
sourceFile: 'command.mjs',
|
|
72
|
+
destinationFile: ctx => `command.${ctx.blueprintMjsExtension}`,
|
|
73
|
+
override: data => !data.ignoreExistingGenerators,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
sourceFile: 'generator.mjs.jhi',
|
|
77
|
+
destinationFile: ctx => `generator.${ctx.blueprintMjsExtension}.jhi`,
|
|
78
|
+
override: data => !data.ignoreExistingGenerators,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
condition: data => !data.generator.startsWith('entity') && !data.application[LOCAL_BLUEPRINT_OPTION],
|
|
82
|
+
sourceFile: 'generator.spec.mjs',
|
|
83
|
+
destinationFile: data => `generator.spec.${data.blueprintMjsExtension}`,
|
|
84
|
+
override: data => !data.ignoreExistingGenerators,
|
|
87
85
|
},
|
|
88
86
|
],
|
|
89
87
|
},
|
|
@@ -91,15 +89,15 @@ export const generatorFiles = {
|
|
|
91
89
|
path: 'generators/generator',
|
|
92
90
|
to: ctx => `${ctx.application.blueprintsPath}${ctx.generator}`,
|
|
93
91
|
condition(ctx) {
|
|
94
|
-
return
|
|
92
|
+
return !ctx.written && ctx.priorities.find(priority => priority.name === 'writing');
|
|
95
93
|
},
|
|
96
94
|
transform: false,
|
|
97
95
|
templates: [
|
|
98
96
|
{
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
sourceFile: 'templates/template-file.ejs',
|
|
98
|
+
destinationFile: ctx => `templates/template-file-${ctx.generator}.ejs`,
|
|
101
99
|
},
|
|
102
100
|
],
|
|
103
101
|
},
|
|
104
102
|
],
|
|
105
|
-
};
|
|
103
|
+
});
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import BaseGenerator from '../base-application/index.js';
|
|
2
2
|
export default class extends BaseGenerator {
|
|
3
3
|
application: any;
|
|
4
|
+
recreatePackageLock: boolean;
|
|
5
|
+
skipWorkflows: boolean;
|
|
6
|
+
ignoreExistingGenerators: boolean;
|
|
4
7
|
_beforeQueue(): Promise<void>;
|
|
5
8
|
get initializing(): import("../../lib/types/base/tasks.js").GenericTaskGroup<any, import("../../lib/types/base/tasks.js").TaskParamWithControl, "loadOptions">;
|
|
6
9
|
get prompting(): import("../../lib/types/base/tasks.js").GenericTaskGroup<any, import("../../lib/types/base/tasks.js").TaskParamWithControl, "prompting" | "eachSubGenerator" | "eachAdditionalSubGenerator">;
|
|
7
10
|
get configuring(): import("../../lib/types/base/tasks.js").GenericTaskGroup<any, import("../../lib/types/base/tasks.js").TaskParamWithControl, "requiredConfig" | "conditionalConfig">;
|
|
8
|
-
get composing(): import("../../lib/types/base/tasks.js").GenericTaskGroup<any, import("../../lib/types/base/tasks.js").TaskParamWithControl, "compose">;
|
|
11
|
+
get composing(): import("../../lib/types/base/tasks.js").GenericTaskGroup<any, import("../../lib/types/base/tasks.js").TaskParamWithControl, "compose" | "storeCurrentVersion">;
|
|
9
12
|
get loading(): import("../../lib/types/base/tasks.js").GenericTaskGroup<any, import("../../lib/types/application/tasks.js").TaskParamWithApplicationDefaults<import("../base-application/index.js").Entity<import("../base-application/index.js").Field, never>, import("../../lib/types/application/application.js").ApplicationType<import("../base-application/index.js").Entity<import("../base-application/index.js").Field, never>>>, "load" | "createContext">;
|
|
10
13
|
get preparing(): import("../../lib/types/base/tasks.js").GenericTaskGroup<any, import("../../lib/types/application/tasks.js").PreparingTaskParam<import("../base-application/index.js").Entity<import("../base-application/index.js").Field, never>, import("../../lib/types/application/application.js").ApplicationType<import("../base-application/index.js").Entity<import("../base-application/index.js").Field, never>>>, "prepare" | "prepareCommands" | "preparePath">;
|
|
11
14
|
get writing(): import("../../lib/types/base/tasks.js").GenericTaskGroup<any, import("../../lib/types/application/tasks.js").WritingTaskParam<import("../base-application/index.js").Entity<import("../base-application/index.js").Field, never>, import("../../lib/types/application/application.js").ApplicationType<import("../base-application/index.js").Entity<import("../base-application/index.js").Field, never>>>, "writing" | "cleanup" | "writingGenerators">;
|
|
12
|
-
get postWriting(): import("../../lib/types/base/tasks.js").GenericTaskGroup<any, import("../../lib/types/application/tasks.js").PostWritingTaskParam<import("../base-application/index.js").Entity<import("../base-application/index.js").Field, never>, import("../../lib/types/application/application.js").ApplicationType<import("../base-application/index.js").Entity<import("../base-application/index.js").Field, never>>>, "packageJson" | "addCliToPackageJson" | "addGeneratorJHipsterDependency">;
|
|
15
|
+
get postWriting(): import("../../lib/types/base/tasks.js").GenericTaskGroup<any, import("../../lib/types/application/tasks.js").PostWritingTaskParam<import("../base-application/index.js").Entity<import("../base-application/index.js").Field, never>, import("../../lib/types/application/application.js").ApplicationType<import("../base-application/index.js").Entity<import("../base-application/index.js").Field, never>>>, "upgrade" | "packageJson" | "addCliToPackageJson" | "addGeneratorJHipsterDependency">;
|
|
13
16
|
get postInstall(): import("../../lib/types/base/tasks.js").GenericTaskGroup<any, import("../../lib/types/application/tasks.js").TaskParamWithApplication<import("../base-application/index.js").Entity<import("../base-application/index.js").Field, never>, import("../../lib/types/application/application.js").ApplicationType<import("../base-application/index.js").Entity<import("../base-application/index.js").Field, never>>>, "addSnapshot">;
|
|
14
17
|
get end(): import("../../lib/types/base/tasks.js").GenericTaskGroup<any, import("../../lib/types/application/tasks.js").TaskParamWithApplication<import("../base-application/index.js").Entity<import("../base-application/index.js").Field, never>, import("../../lib/types/application/application.js").ApplicationType<import("../base-application/index.js").Entity<import("../base-application/index.js").Field, never>>>, "end">;
|
|
15
18
|
getSubGeneratorStorage(subGenerator: any): import("yeoman-generator").Storage;
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* See the License for the specific language governing permissions and
|
|
18
18
|
* limitations under the License.
|
|
19
19
|
*/
|
|
20
|
+
import { rm } from 'node:fs/promises';
|
|
20
21
|
import chalk from 'chalk';
|
|
21
22
|
import { camelCase, snakeCase, upperFirst } from 'lodash-es';
|
|
22
23
|
import BaseGenerator from '../base-application/index.js';
|
|
@@ -30,6 +31,9 @@ const { GENERATOR_PROJECT_NAME, GENERATOR_INIT } = GENERATOR_LIST;
|
|
|
30
31
|
const defaultPublishedFiles = ['generators', '!**/__*', '!**/*.snap', '!**/*.spec.?(c|m)js'];
|
|
31
32
|
export default class extends BaseGenerator {
|
|
32
33
|
application;
|
|
34
|
+
recreatePackageLock;
|
|
35
|
+
skipWorkflows;
|
|
36
|
+
ignoreExistingGenerators;
|
|
33
37
|
async _beforeQueue() {
|
|
34
38
|
if (!this.fromBlueprint) {
|
|
35
39
|
await this.composeWithBlueprints();
|
|
@@ -110,6 +114,9 @@ export default class extends BaseGenerator {
|
|
|
110
114
|
}
|
|
111
115
|
get composing() {
|
|
112
116
|
return this.asComposingTaskGroup({
|
|
117
|
+
storeCurrentVersion() {
|
|
118
|
+
this.storeCurrentJHipsterVersion();
|
|
119
|
+
},
|
|
113
120
|
async compose() {
|
|
114
121
|
if (this.jhipsterConfig[LOCAL_BLUEPRINT_OPTION])
|
|
115
122
|
return;
|
|
@@ -152,9 +159,10 @@ export default class extends BaseGenerator {
|
|
|
152
159
|
preparePath() {
|
|
153
160
|
this.application.blueprintsPath = this.application[LOCAL_BLUEPRINT_OPTION] ? '.blueprint/' : 'generators/';
|
|
154
161
|
},
|
|
155
|
-
prepare() {
|
|
162
|
+
prepare({ application }) {
|
|
156
163
|
const { cli, cliName, baseName } = this.application;
|
|
157
164
|
this.application.githubRepository = this.jhipsterConfig.githubRepository ?? `jhipster/generator-jhipster-${baseName}`;
|
|
165
|
+
application.blueprintMjsExtension = this.application.js ? 'js' : 'mjs';
|
|
158
166
|
if (cli) {
|
|
159
167
|
this.application.cliName = cliName ?? `jhipster-${baseName}`;
|
|
160
168
|
}
|
|
@@ -167,19 +175,29 @@ export default class extends BaseGenerator {
|
|
|
167
175
|
get writing() {
|
|
168
176
|
return this.asWritingTaskGroup({
|
|
169
177
|
async cleanup({ control }) {
|
|
170
|
-
await control.cleanupFiles({
|
|
178
|
+
await control.cleanupFiles({
|
|
179
|
+
'8.5.1': ['.eslintrc.json'],
|
|
180
|
+
'8.7.2': ['.eslintignore', 'vitest.test-setup.ts'],
|
|
181
|
+
});
|
|
171
182
|
},
|
|
172
|
-
async writing() {
|
|
183
|
+
async writing({ application }) {
|
|
173
184
|
this.application.sampleWritten = this.jhipsterConfig.sampleWritten;
|
|
185
|
+
const { skipWorkflows, ignoreExistingGenerators } = this;
|
|
174
186
|
await this.writeFiles({
|
|
175
187
|
sections: files,
|
|
176
|
-
context:
|
|
188
|
+
context: {
|
|
189
|
+
...application,
|
|
190
|
+
skipWorkflows,
|
|
191
|
+
ignoreExistingGenerators,
|
|
192
|
+
...this.application,
|
|
193
|
+
},
|
|
177
194
|
});
|
|
178
195
|
this.jhipsterConfig.sampleWritten = true;
|
|
179
196
|
},
|
|
180
|
-
async writingGenerators() {
|
|
197
|
+
async writingGenerators({ application }) {
|
|
181
198
|
if (!this.application[GENERATORS])
|
|
182
199
|
return;
|
|
200
|
+
const { skipWorkflows, ignoreExistingGenerators } = this;
|
|
183
201
|
for (const generator of Object.keys(this.application[GENERATORS])) {
|
|
184
202
|
const subGeneratorStorage = this.getSubGeneratorStorage(generator);
|
|
185
203
|
const subGeneratorConfig = subGeneratorStorage.getAll();
|
|
@@ -191,7 +209,9 @@ export default class extends BaseGenerator {
|
|
|
191
209
|
const customGenerator = !Object.values(GENERATOR_LIST).includes(generator);
|
|
192
210
|
const jhipsterGenerator = customGenerator || subGeneratorConfig.sbs ? 'base-application' : generator;
|
|
193
211
|
const subTemplateData = {
|
|
194
|
-
|
|
212
|
+
...application,
|
|
213
|
+
skipWorkflows,
|
|
214
|
+
ignoreExistingGenerators,
|
|
195
215
|
application: this.application,
|
|
196
216
|
...defaultSubGeneratorConfig(),
|
|
197
217
|
...subGeneratorConfig,
|
|
@@ -216,6 +236,26 @@ export default class extends BaseGenerator {
|
|
|
216
236
|
}
|
|
217
237
|
get postWriting() {
|
|
218
238
|
return this.asPostWritingTaskGroup({
|
|
239
|
+
upgrade({ application }) {
|
|
240
|
+
if (!this.application[GENERATORS])
|
|
241
|
+
return;
|
|
242
|
+
if (!this.isJhipsterVersionLessThan('8.7.2'))
|
|
243
|
+
return;
|
|
244
|
+
for (const generator of Object.keys(this.application[GENERATORS])) {
|
|
245
|
+
const commandFile = `${this.application.blueprintsPath}${generator}/command.${application.blueprintMjsExtension}`;
|
|
246
|
+
this.editFile(commandFile, content => content
|
|
247
|
+
.replace(`/**
|
|
248
|
+
* @type {import('generator-jhipster').JHipsterCommandDefinition}
|
|
249
|
+
*/`, `import { asCommand } from 'generator-jhipster';
|
|
250
|
+
`)
|
|
251
|
+
.replace('const command = ', 'export default asCommand(')
|
|
252
|
+
.replace(`
|
|
253
|
+
};`, '});')
|
|
254
|
+
.replace('export default command;', ''));
|
|
255
|
+
const generatorSpec = `${this.application.blueprintsPath}${generator}/generator.spec.${application.blueprintMjsExtension}`;
|
|
256
|
+
this.editFile(generatorSpec, content => content.replaceAll(/blueprint: '([\w-]*)'/g, "blueprint: ['$1']"));
|
|
257
|
+
}
|
|
258
|
+
},
|
|
219
259
|
packageJson() {
|
|
220
260
|
if (this.jhipsterConfig[LOCAL_BLUEPRINT_OPTION])
|
|
221
261
|
return;
|
|
@@ -270,27 +310,23 @@ export default class extends BaseGenerator {
|
|
|
270
310
|
if (this.jhipsterConfig[LOCAL_BLUEPRINT_OPTION])
|
|
271
311
|
return;
|
|
272
312
|
const { packagejs } = this.application;
|
|
313
|
+
const exactDependency = {
|
|
314
|
+
'generator-jhipster': `${packagejs.version}`,
|
|
315
|
+
};
|
|
316
|
+
const caretDependency = {
|
|
317
|
+
'generator-jhipster': `^${packagejs.version}`,
|
|
318
|
+
};
|
|
273
319
|
if (this.jhipsterConfig.dynamic) {
|
|
274
320
|
this.packageJson.merge({
|
|
275
|
-
devDependencies:
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
peerDependencies: {
|
|
279
|
-
'generator-jhipster': `^${packagejs.version}`,
|
|
280
|
-
},
|
|
281
|
-
engines: {
|
|
282
|
-
'generator-jhipster': `^${packagejs.version}`,
|
|
283
|
-
},
|
|
321
|
+
devDependencies: exactDependency,
|
|
322
|
+
peerDependencies: caretDependency,
|
|
323
|
+
engines: caretDependency,
|
|
284
324
|
});
|
|
285
325
|
}
|
|
286
326
|
else {
|
|
287
327
|
this.packageJson.merge({
|
|
288
|
-
dependencies:
|
|
289
|
-
|
|
290
|
-
},
|
|
291
|
-
engines: {
|
|
292
|
-
'generator-jhipster': `${packagejs.version}`,
|
|
293
|
-
},
|
|
328
|
+
dependencies: exactDependency,
|
|
329
|
+
engines: this.jhipsterConfig.caret ? caretDependency : exactDependency,
|
|
294
330
|
});
|
|
295
331
|
}
|
|
296
332
|
},
|
|
@@ -301,11 +337,16 @@ export default class extends BaseGenerator {
|
|
|
301
337
|
}
|
|
302
338
|
get postInstall() {
|
|
303
339
|
return this.asPostInstallTaskGroup({
|
|
304
|
-
async addSnapshot() {
|
|
340
|
+
async addSnapshot({ control }) {
|
|
305
341
|
const { [LOCAL_BLUEPRINT_OPTION]: localBlueprint } = this.jhipsterConfig;
|
|
306
342
|
const { skipInstall, skipGit, existed, [GENERATE_SNAPSHOTS]: generateSnapshots = !localBlueprint && !skipInstall && !skipGit && !existed, } = this.options;
|
|
307
343
|
if (!generateSnapshots)
|
|
308
344
|
return;
|
|
345
|
+
if (this.recreatePackageLock) {
|
|
346
|
+
await rm(this.destinationPath('package-lock.json'), { force: true });
|
|
347
|
+
await rm(this.destinationPath('node_modules'), { force: true, recursive: true });
|
|
348
|
+
await this.spawnCommand('npm', ['install'], { stdio: 'inherit' });
|
|
349
|
+
}
|
|
309
350
|
try {
|
|
310
351
|
if (this.options[LINK_JHIPSTER_DEPENDENCY]) {
|
|
311
352
|
this.log.verboseInfo('Linking generator-jhipster');
|
|
@@ -323,6 +364,21 @@ This is a new blueprint, executing '${chalk.yellow('npm run update-snapshot')}'
|
|
|
323
364
|
}
|
|
324
365
|
this.log.warn('Fail to generate snapshots');
|
|
325
366
|
}
|
|
367
|
+
if (control.jhipsterOldVersion) {
|
|
368
|
+
// Apply prettier and eslint to fix non generated files on upgrade.
|
|
369
|
+
try {
|
|
370
|
+
await this.spawnCommand('npm', ['run', 'prettier-format']);
|
|
371
|
+
}
|
|
372
|
+
catch {
|
|
373
|
+
// Ignore error
|
|
374
|
+
}
|
|
375
|
+
try {
|
|
376
|
+
await this.spawnCommand('npm', ['run', 'lint-fix']);
|
|
377
|
+
}
|
|
378
|
+
catch {
|
|
379
|
+
// Ignore error
|
|
380
|
+
}
|
|
381
|
+
}
|
|
326
382
|
},
|
|
327
383
|
});
|
|
328
384
|
}
|
|
@@ -26,7 +26,7 @@ jobs:
|
|
|
26
26
|
npm install
|
|
27
27
|
./cli/cli.cjs github-build-matrix
|
|
28
28
|
samples:
|
|
29
|
-
name: ${{ matrix.sample-name }}
|
|
29
|
+
name: ${{ matrix.job-name || matrix.sample-name }}
|
|
30
30
|
runs-on: ubuntu-latest
|
|
31
31
|
needs: build-matrix
|
|
32
32
|
defaults:
|
|
@@ -48,11 +48,9 @@ jobs:
|
|
|
48
48
|
maven-cache: true
|
|
49
49
|
gradle-cache: true
|
|
50
50
|
binary-dir: ${{ github.workspace }}/generator-jhipster-<%= baseName %>/cli/
|
|
51
|
-
-
|
|
52
|
-
run: npm install
|
|
51
|
+
- run: npm install
|
|
53
52
|
working-directory: ${{ github.workspace }}/generator-jhipster-<%= baseName %>
|
|
54
|
-
-
|
|
55
|
-
run: cli.cjs generate-sample ${{ matrix.sample-name }} --skip-jhipster-dependencies --force
|
|
53
|
+
- run: cli.cjs generate-sample ${{ matrix.sample-name }} --skip-jhipster-dependencies ${{ matrix.extra-args }}
|
|
56
54
|
- uses: jhipster/actions/compare-sample@v0
|
|
57
55
|
id: compare
|
|
58
56
|
if: >-
|
|
@@ -60,7 +58,7 @@ jobs:
|
|
|
60
58
|
!contains(github.event.pull_request.labels.*.name, 'pr: disable-compare')
|
|
61
59
|
with:
|
|
62
60
|
generator-path: generator-jhipster-<%= baseName %>
|
|
63
|
-
cmd: cli.cjs generate-sample ${{ matrix.sample-name }} --skip-jhipster-dependencies --
|
|
61
|
+
cmd: cli.cjs generate-sample ${{ matrix.sample-name }} --skip-jhipster-dependencies --skip-install ${{ matrix.extra-args }}
|
|
64
62
|
- run: npm run ci:backend:test
|
|
65
63
|
if: steps.compare.outputs.equals != 'true'
|
|
66
64
|
id: backend
|
|
@@ -73,7 +71,7 @@ jobs:
|
|
|
73
71
|
- run: npm run ci:e2e:run --if-present
|
|
74
72
|
if: steps.compare.outputs.equals != 'true'
|
|
75
73
|
id: e2e
|
|
76
|
-
- name:
|
|
74
|
+
- name: Store backend test failure logs
|
|
77
75
|
uses: actions/upload-artifact@v4
|
|
78
76
|
if: always() && steps.backend.outcome == 'failure'
|
|
79
77
|
with:
|
|
@@ -81,7 +79,7 @@ jobs:
|
|
|
81
79
|
path: |
|
|
82
80
|
${{ github.workspace }}/app/build/test-results/**/*.xml
|
|
83
81
|
${{ github.workspace }}/app/target/surefire-reports
|
|
84
|
-
- name:
|
|
82
|
+
- name: Store cypress screenshots
|
|
85
83
|
uses: actions/upload-artifact@v4
|
|
86
84
|
if: always() && steps.e2e.outcome == 'failure'
|
|
87
85
|
with:
|
|
@@ -46,13 +46,23 @@ npm install -g generator-jhipster-<%= baseName %>
|
|
|
46
46
|
|
|
47
47
|
To use this blueprint, run the below command
|
|
48
48
|
|
|
49
|
-
```bash
|
|
50
49
|
<%_ if (cli) { _%>
|
|
50
|
+
```bash
|
|
51
51
|
<%= cliName %>
|
|
52
|
+
<%_ if (caret) { _%>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
or
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
jhipster --blueprints <%= baseName %>
|
|
59
|
+
```
|
|
60
|
+
<%_ } _%>
|
|
52
61
|
<%_ } else { _%>
|
|
62
|
+
```bash
|
|
53
63
|
jhipster --blueprints <%= baseName %>
|
|
54
|
-
<%_ } _%>
|
|
55
64
|
```
|
|
65
|
+
<%_ } _%>
|
|
56
66
|
|
|
57
67
|
You can look for updated <%= baseName %> blueprint specific options by running
|
|
58
68
|
|
|
@@ -23,10 +23,11 @@ const blueprint = packageFolderName.startsWith('jhipster-') ? `generator-${packa
|
|
|
23
23
|
[blueprint]: version,
|
|
24
24
|
},
|
|
25
25
|
printBlueprintLogo: () => {
|
|
26
|
-
console.log('===================== JHipster <%=
|
|
26
|
+
console.log('===================== JHipster <%= humanizedBaseName %> =====================');
|
|
27
27
|
console.log('');
|
|
28
28
|
},
|
|
29
29
|
lookups: [{ packagePaths: [packagePath] }],
|
|
30
|
+
...require('./cli-customizations.cjs'),
|
|
30
31
|
}).catch(done);
|
|
31
32
|
|
|
32
33
|
process.on('unhandledRejection', up => {
|