From 0812588847ee9be402aa57827df0246d44e96555 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sat, 14 Sep 2024 18:34:32 +0200 Subject: [PATCH 01/10] more lint --- generators/spring-boot/cleanup.ts | 6 +++--- generators/spring-boot/command.ts | 20 +++++++++++--------- generators/spring-boot/generator.ts | 26 +++++++++++++++----------- generators/spring-boot/prompts.ts | 2 +- 4 files changed, 30 insertions(+), 24 deletions(-) diff --git a/generators/spring-boot/cleanup.ts b/generators/spring-boot/cleanup.ts index 9303515105f3..7586b4aea990 100644 --- a/generators/spring-boot/cleanup.ts +++ b/generators/spring-boot/cleanup.ts @@ -179,12 +179,12 @@ export default asWritingTask(async function cleanupTask(this, taskParam) { } if ( application.databaseTypeSql || - (application as any).cacheProviderRedis || + application.cacheProviderRedis || application.databaseTypeMongodb || application.databaseTypeCassandra || - (application as any).searchEngineElasticsearch || + application.searchEngineElasticsearch || application.databaseTypeCouchbase || - (application as any).searchEngineCouchbase || + application.searchEngineCouchbase || application.databaseTypeNeo4j ) { // The condition is too complated, delete and recreate. diff --git a/generators/spring-boot/command.ts b/generators/spring-boot/command.ts index 8ba772e0034e..99315ec21183 100644 --- a/generators/spring-boot/command.ts +++ b/generators/spring-boot/command.ts @@ -20,10 +20,12 @@ import chalk from 'chalk'; import type { JHipsterCommandDefinition } from '../../lib/command/index.js'; import { GENERATOR_JAVA, GENERATOR_LIQUIBASE, GENERATOR_SPRING_DATA_RELATIONAL } from '../generator-list.js'; import { createBase64Secret, createSecret } from '../base/support/secret.js'; -import { applicationTypes, authenticationTypes } from '../../lib/jhipster/index.js'; +import { applicationTypes, authenticationTypes, databaseTypes, serviceDiscoveryTypes } from '../../lib/jhipster/index.js'; const { OAUTH2, SESSION, JWT } = authenticationTypes; +const { CONSUL, EUREKA, NO: NO_SERVICE_DISCOVERY } = serviceDiscoveryTypes; const { GATEWAY, MICROSERVICE } = applicationTypes; +const { SQL, NO: NO_DATABASE, MONGODB, COUCHBASE, CASSANDRA, NEO4J } = databaseTypes; const ALPHANUMERIC_PATTERN = /^[A-Za-z][A-Za-z0-9]*$/; @@ -75,12 +77,12 @@ const command = { when: () => ['gateway', 'microservice'].includes(gen.jhipsterConfigWithDefaults.applicationType), type: 'list', message: 'Which service discovery server do you want to use?', - default: 'consul', + default: CONSUL, }), choices: [ - { value: 'consul', name: 'Consul (recommended)' }, - { value: 'eureka', name: 'JHipster Registry (legacy, uses Eureka, provides Spring Cloud Config support)' }, - { value: 'no', name: 'No service discovery' }, + { value: CONSUL, name: 'Consul (recommended)' }, + { value: EUREKA, name: 'JHipster Registry (legacy, uses Eureka, provides Spring Cloud Config support)' }, + { value: NO_SERVICE_DISCOVERY, name: 'No service discovery' }, ], scope: 'storage', }, @@ -100,9 +102,9 @@ const command = { default: () => gen.jhipsterConfigWithDefaults.authenticationType, }), choices: [ - { value: 'jwt', name: 'JWT authentication (stateless, with a token)' }, - { value: 'oauth2', name: 'OAuth 2.0 / OIDC Authentication (stateful, works with Keycloak and Okta)' }, - { value: 'session', name: 'HTTP Session Authentication (stateful, default Spring Security mechanism)' }, + { value: JWT, name: 'JWT authentication (stateless, with a token)' }, + { value: OAUTH2, name: 'OAuth 2.0 / OIDC Authentication (stateful, works with Keycloak and Okta)' }, + { value: SESSION, name: 'HTTP Session Authentication (stateful, default Spring Security mechanism)' }, ], configure: gen => { const { jwtSecretKey, rememberMeKey, authenticationType, applicationType } = gen.jhipsterConfigWithDefaults; @@ -183,7 +185,7 @@ const command = { type: String, hide: true, }, - choices: ['sql', 'mongodb', 'couchbase', 'cassandra', 'neo4j', 'no'], + choices: [SQL, MONGODB, COUCHBASE, CASSANDRA, NEO4J, NO_DATABASE], scope: 'storage', }, messageBroker: { diff --git a/generators/spring-boot/generator.ts b/generators/spring-boot/generator.ts index f0029a5731f8..cc304f5c5403 100644 --- a/generators/spring-boot/generator.ts +++ b/generators/spring-boot/generator.ts @@ -431,14 +431,13 @@ public void set${javaBeanCase(propertyName)}(${propertyType} ${propertyName}) { } }, prepareFilters({ application, entity }) { - (entity as any).entityJavaFilterableProperties = [ - ...entity.fields.filter(field => field.filterableField), - ...entity.relationships.filter(rel => !application.reactive || (rel.persistableRelationship && !rel.collection)), - ]; - (entity as any).entityJavaCustomFilters = sortedUniqBy( - entity.fields.map(field => field.propertyJavaCustomFilter).filter(Boolean), - 'type', - ); + mutateData(entity, { + entityJavaFilterableProperties: [ + ...entity.fields.filter(field => field.filterableField), + ...entity.relationships.filter(rel => !application.reactive || (rel.persistableRelationship && !rel.collection)), + ], + entityJavaCustomFilters: sortedUniqBy(entity.fields.map(field => field.propertyJavaCustomFilter).filter(Boolean), 'type'), + }); }, }); } @@ -488,9 +487,14 @@ public void set${javaBeanCase(propertyName)}(${propertyType} ${propertyName}) { get postWriting() { return this.asPostWritingTaskGroup({ addJHipsterBomDependencies({ application, source }) { - const { applicationTypeGateway, applicationTypeMicroservice, javaDependencies, jhipsterDependenciesVersion, messageBrokerAny } = - application; - const { serviceDiscoveryAny } = application as any; + const { + applicationTypeGateway, + applicationTypeMicroservice, + javaDependencies, + jhipsterDependenciesVersion, + messageBrokerAny, + serviceDiscoveryAny, + } = application; source.addJavaDefinitions?.( { diff --git a/generators/spring-boot/prompts.ts b/generators/spring-boot/prompts.ts index 8b023b3d559f..5891827f96b1 100644 --- a/generators/spring-boot/prompts.ts +++ b/generators/spring-boot/prompts.ts @@ -103,7 +103,7 @@ export async function askForServerSideOpts(this: CoreGenerator, { control }) { }); } opts.push({ - value: 'couchbase', + value: COUCHBASE, name: '[BETA] Couchbase', }); opts.push({ From 498bf49cf6b0eb219e0f48f6c8118bf76b3114b4 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sat, 14 Sep 2024 20:04:40 +0200 Subject: [PATCH 02/10] rollback on commands constant usage for type inference --- generators/spring-boot/command.ts | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/generators/spring-boot/command.ts b/generators/spring-boot/command.ts index 99315ec21183..bd8540cfebcb 100644 --- a/generators/spring-boot/command.ts +++ b/generators/spring-boot/command.ts @@ -20,12 +20,10 @@ import chalk from 'chalk'; import type { JHipsterCommandDefinition } from '../../lib/command/index.js'; import { GENERATOR_JAVA, GENERATOR_LIQUIBASE, GENERATOR_SPRING_DATA_RELATIONAL } from '../generator-list.js'; import { createBase64Secret, createSecret } from '../base/support/secret.js'; -import { applicationTypes, authenticationTypes, databaseTypes, serviceDiscoveryTypes } from '../../lib/jhipster/index.js'; +import { applicationTypes, authenticationTypes } from '../../lib/jhipster/index.js'; const { OAUTH2, SESSION, JWT } = authenticationTypes; -const { CONSUL, EUREKA, NO: NO_SERVICE_DISCOVERY } = serviceDiscoveryTypes; const { GATEWAY, MICROSERVICE } = applicationTypes; -const { SQL, NO: NO_DATABASE, MONGODB, COUCHBASE, CASSANDRA, NEO4J } = databaseTypes; const ALPHANUMERIC_PATTERN = /^[A-Za-z][A-Za-z0-9]*$/; @@ -77,12 +75,12 @@ const command = { when: () => ['gateway', 'microservice'].includes(gen.jhipsterConfigWithDefaults.applicationType), type: 'list', message: 'Which service discovery server do you want to use?', - default: CONSUL, + default: 'consul', }), choices: [ - { value: CONSUL, name: 'Consul (recommended)' }, - { value: EUREKA, name: 'JHipster Registry (legacy, uses Eureka, provides Spring Cloud Config support)' }, - { value: NO_SERVICE_DISCOVERY, name: 'No service discovery' }, + { value: 'consul', name: 'Consul (recommended)' }, + { value: 'eureka', name: 'JHipster Registry (legacy, uses Eureka, provides Spring Cloud Config support)' }, + { value: 'no', name: 'No service discovery' }, ], scope: 'storage', }, @@ -102,9 +100,9 @@ const command = { default: () => gen.jhipsterConfigWithDefaults.authenticationType, }), choices: [ - { value: JWT, name: 'JWT authentication (stateless, with a token)' }, - { value: OAUTH2, name: 'OAuth 2.0 / OIDC Authentication (stateful, works with Keycloak and Okta)' }, - { value: SESSION, name: 'HTTP Session Authentication (stateful, default Spring Security mechanism)' }, + { value: 'jwt', name: 'JWT authentication (stateless, with a token)' }, + { value: 'oauth2', name: 'OAuth 2.0 / OIDC Authentication (stateful, works with Keycloak and Okta)' }, + { value: 'session', name: 'HTTP Session Authentication (stateful, default Spring Security mechanism)' }, ], configure: gen => { const { jwtSecretKey, rememberMeKey, authenticationType, applicationType } = gen.jhipsterConfigWithDefaults; @@ -148,14 +146,14 @@ const command = { prompt: gen => ({ type: 'confirm', message: 'Do you want to allow relationships with User entity?', - when: ({ authenticationType }) => (authenticationType ?? gen.jhipsterConfigWithDefaults.authenticationType) === 'oauth2', + when: ({ authenticationType }) => (authenticationType ?? gen.jhipsterConfigWithDefaults.authenticationType) === OAUTH2, }), jdl: { type: 'boolean', tokenType: 'BOOLEAN', }, configure: gen => { - if (gen.jhipsterConfig.syncUserWithIdp === undefined && gen.jhipsterConfigWithDefaults.authenticationType === 'oauth2') { + if (gen.jhipsterConfig.syncUserWithIdp === undefined && gen.jhipsterConfigWithDefaults.authenticationType === OAUTH2) { if (gen.isJhipsterVersionLessThan('8.1.1')) { gen.jhipsterConfig.syncUserWithIdp = true; } @@ -185,7 +183,7 @@ const command = { type: String, hide: true, }, - choices: [SQL, MONGODB, COUCHBASE, CASSANDRA, NEO4J, NO_DATABASE], + choices: ['sql', 'mongodb', 'couchbase', 'cassandra', 'neo4j', 'no'], scope: 'storage', }, messageBroker: { From bbcd6029489a39b80a38d20686ec16e6952f9766 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sat, 14 Sep 2024 22:59:10 +0200 Subject: [PATCH 03/10] keytool fix --- generators/angular/cleanup.ts | 2 +- .../angular/support/translate-angular.spec.ts | 2 + .../angular/support/translate-angular.ts | 57 ++++--- generators/base/types.d.ts | 2 +- .../__snapshots__/generator.spec.ts.snap | 12 -- .../__snapshots__/needles.spec.ts.snap | 3 - .../__snapshots__/generator.spec.ts.snap | 6 - generators/spring-boot/generator.ts | 10 +- .../__snapshots__/generator.spec.ts.snap | 30 ---- .../__snapshots__/generator.spec.ts.snap | 30 ---- .../__snapshots__/generator.spec.ts.snap | 30 ---- .../__snapshots__/generator.spec.ts.snap | 30 ---- .../__snapshots__/generator.spec.ts.snap | 30 ---- .../__snapshots__/generator.spec.ts.snap | 150 ------------------ 14 files changed, 43 insertions(+), 351 deletions(-) diff --git a/generators/angular/cleanup.ts b/generators/angular/cleanup.ts index 30e1a7a99c80..0fb879c1f302 100644 --- a/generators/angular/cleanup.ts +++ b/generators/angular/cleanup.ts @@ -120,7 +120,7 @@ export default asWritingTask(function cleanupOldFilesTask(this, { application }) this.removeFile(`${application.clientSrcDir}app/shared/login/login.component.ts`); this.removeFile(`${application.clientSrcDir}app/shared/login/login.component.html`); this.removeFile(`${application.clientSrcDir}app/core/auth/user-route-access-service.ts`); - if (!application.authenticationTypeSession || !(application as any).communicationSpringWebsocket) { + if (!application.authenticationTypeSession || !application.communicationSpringWebsocket) { this.removeFile(`${application.clientSrcDir}app/core/auth/csrf.service.ts`); } this.removeFolder(`${application.clientSrcDir}app/core/login`); diff --git a/generators/angular/support/translate-angular.spec.ts b/generators/angular/support/translate-angular.spec.ts index c4b6f0cd0710..73987f53bcc3 100644 --- a/generators/angular/support/translate-angular.spec.ts +++ b/generators/angular/support/translate-angular.spec.ts @@ -28,10 +28,12 @@ describe('generator - angular - transform', () => { beforeEach(() => { let value = 0; const testImpl = (key, data) => (key === 'blank' ? '' : `translated-value-${key}-${data ? `${inspect(data)}-` : ''}${value++}`); + // @ts-ignore replaceAngularTranslations = createTranslationReplacer(esmocha.fn().mockImplementation(testImpl), { jhiPrefix: 'jhi', enableTranslation: false, }); + // @ts-ignore enabledAngularTranslations = createTranslationReplacer(esmocha.fn().mockImplementation(testImpl), { jhiPrefix: 'jhi', enableTranslation: true, diff --git a/generators/angular/support/translate-angular.ts b/generators/angular/support/translate-angular.ts index 54dfb1eb75d9..99f6675f789c 100644 --- a/generators/angular/support/translate-angular.ts +++ b/generators/angular/support/translate-angular.ts @@ -41,18 +41,15 @@ export type ReplacerOptions = { jhiPrefix: string; enableTranslation: boolean }; * Replace translation key with translation values * * @param {import('../generator-base.js')} generator + * @param getWebappTranslation * @param {string} content * @param {string} regexSource regular expression to find keys - * @param {object} [options] - * @param {number} [options.keyIndex] - * @param {number} [options.replacementIndex] - * @param {any} [options.escape] * @returns {string} */ function replaceTranslationKeysWithText( - getWebappTranslation, - content, - regexSource, + getWebappTranslation: (key: string, val?: Record | undefined) => string, + content: string, + regexSource: string, { keyIndex = 1, replacementIndex = 1, @@ -81,7 +78,11 @@ function replaceTranslationKeysWithText( * @param {string} jsKey * @returns string with jsKey value replaced */ -function replaceJSTranslation(getWebappTranslation, content, jsKey) { +function replaceJSTranslation( + getWebappTranslation: (key: string, val?: Record | undefined) => string, + content: string, + jsKey: string, +) { return replaceTranslationKeysWithText( getWebappTranslation, content, @@ -98,14 +99,14 @@ function replaceJSTranslation(getWebappTranslation, content, jsKey) { * @param {string} content html content * @returns string with pageTitle replaced */ -function replacePageTitles(getWebappTranslation, content) { +function replacePageTitles(getWebappTranslation: (key: string, val?: Record | undefined) => string, content: string) { return replaceJSTranslation(getWebappTranslation, content, 'title'); } /** * @type {function(import('../generator-base.js'), string): string} */ -function replacePlaceholders(getWebappTranslation, content) { +function replacePlaceholders(getWebappTranslation: (key: string, val?: Record | undefined) => string, content: string) { return replaceTranslationKeysWithText(getWebappTranslation, content, PLACEHOLDER_REGEX, { keyIndex: 2 }); } @@ -114,7 +115,7 @@ function replacePlaceholders(getWebappTranslation, content) { * * @type {function(import('../generator-base.js'), string): string} */ -function replaceErrorMessage(getWebappTranslation, content) { +function replaceErrorMessage(getWebappTranslation: (key: string, val?: Record | undefined) => string, content: string) { return replaceJSTranslation(getWebappTranslation, content, 'errorMessage'); } @@ -123,7 +124,7 @@ function replaceErrorMessage(getWebappTranslation, content) { * Or the translation value if translation is disabled. */ const tagTranslation = ( - getWebappTranslation: any, + getWebappTranslation: (key: string, val?: Record | undefined) => string, { enableTranslation, jhiPrefix }: ReplacerOptions, { key, parsedInterpolate, prefix, suffix }: JHITranslateConverterOptions, ) => { @@ -149,7 +150,7 @@ const tagTranslation = ( * Or the translation value if translation is disabled. */ const validationTagTranslation = ( - getWebappTranslation: any, + getWebappTranslation: (key: string, val?: Record | undefined) => string, { enableTranslation, jhiPrefix }: ReplacerOptions, { key, parsedInterpolate, prefix, suffix }: JHITranslateConverterOptions, ) => { @@ -175,7 +176,7 @@ const validationTagTranslation = ( * Or the translation value if translation is disabled. */ const tagPipeTranslation = ( - getWebappTranslation: any, + getWebappTranslation: (key: string, val?: Record | undefined) => string, { enableTranslation, jhiPrefix }: ReplacerOptions, { key, parsedInterpolate, prefix, suffix }: JHITranslateConverterOptions, ) => { @@ -201,7 +202,7 @@ const tagPipeTranslation = ( * Or the translation value if translation is disabled. */ const tagEnumTranslation = ( - getWebappTranslation: any, + getWebappTranslation: (key: string, val?: Record | undefined) => string, { enableTranslation, jhiPrefix }: ReplacerOptions, { key, parsedInterpolate, prefix, suffix }: JHITranslateConverterOptions, ) => { @@ -222,7 +223,7 @@ const tagEnumTranslation = ( * Or the translation value if translation is disabled. */ const pipeTranslation = ( - getWebappTranslation: any, + getWebappTranslation: (key: string, val?: Record | undefined) => string, { enableTranslation }: ReplacerOptions, { key, prefix, suffix }: JHITranslateConverterOptions, ) => { @@ -237,7 +238,7 @@ const pipeTranslation = ( * Get translation value. */ const valueTranslation = ( - getWebappTranslation: any, + getWebappTranslation: (key: string, val?: Record | undefined) => string, _replacerOptions: ReplacerOptions, { filePath, key, prefix, suffix }: JHITranslateConverterOptions, ) => { @@ -256,7 +257,7 @@ const valueTranslation = ( * Or the translation value if translation is disabled. */ const pipeEnumTranslation = ( - getWebappTranslation: any, + getWebappTranslation: (key: string, val?: Record | undefined) => string, { enableTranslation }: ReplacerOptions, { key, parsedInterpolate, prefix, suffix }: JHITranslateConverterOptions, ) => { @@ -274,7 +275,11 @@ const pipeEnumTranslation = ( const replaceImplementations: Record< string, - (getWebappTranslation: any, replacerOpts: ReplacerOptions, translateOpts: JHITranslateConverterOptions) => string + ( + getWebappTranslation: (key: string, val?: Record | undefined) => string, + replacerOpts: ReplacerOptions, + translateOpts: JHITranslateConverterOptions, + ) => string > = { Tag: tagTranslation, TagPipe: tagPipeTranslation, @@ -291,7 +296,10 @@ const replaceImplementations: Record< * @type {import('../generator-base.js').EditFileCallback} * @this {import('../generator-base.js')} */ -export const createTranslationReplacer = (getWebappTranslation, opts: ReplacerOptions | boolean) => { +export const createTranslationReplacer = ( + getWebappTranslation: (key: string, val?: Record | undefined) => string, + opts: ReplacerOptions | boolean, +) => { const htmlJhiTranslateReplacer = createJhiTransformTranslateReplacer(getWebappTranslation, { escapeHtml: true }); const htmlJhiTranslateStringifyReplacer = createJhiTransformTranslateStringifyReplacer(getWebappTranslation); let translationReplacer: ((content: string, filePath: string) => string) | undefined; @@ -309,7 +317,7 @@ export const createTranslationReplacer = (getWebappTranslation, opts: ReplacerOp { prefixPattern: '>\\s*', suffixPattern: '\\s*<' }, ); } - return function replaceAngularTranslations(content, filePath) { + return function replaceAngularTranslations(content: string, filePath: string) { if (filePath.endsWith('.html')) { if (!enableTranslation) { content = content.replace(new RegExp(TRANSLATE_REGEX, 'g'), ''); @@ -322,7 +330,7 @@ export const createTranslationReplacer = (getWebappTranslation, opts: ReplacerOp content = htmlJhiTranslateStringifyReplacer(content); } if (/(:?\.html|.ts)$/.test(filePath)) { - content = translationReplacer?.(content, filePath); + content = translationReplacer ? translationReplacer?.(content, filePath) : content; } if (!enableTranslation) { if (/(:?route|module)\.ts$/.test(filePath)) { @@ -339,7 +347,10 @@ export const createTranslationReplacer = (getWebappTranslation, opts: ReplacerOp const minimatch = new Minimatch('**/*{.html,.ts}'); export const isTranslatedAngularFile = file => minimatch.match(file.path); -export const translateAngularFilesTransform = (getWebappTranslation, opts: ReplacerOptions | boolean) => { +export const translateAngularFilesTransform = ( + getWebappTranslation: (key: string, val?: Record | undefined) => string, + opts: ReplacerOptions | boolean, +) => { const translate = createTranslationReplacer(getWebappTranslation, opts); return passthrough(file => { file.contents = Buffer.from(translate(file.contents.toString(), file.path)); diff --git a/generators/base/types.d.ts b/generators/base/types.d.ts index e4ce9a51f3c0..4a4be7692392 100644 --- a/generators/base/types.d.ts +++ b/generators/base/types.d.ts @@ -24,5 +24,5 @@ export type Control = BaseApplicationControlProperties & { * cleanupFiles({ '6.0.0': ['file1', 'file2', [application.shouldRemove, 'file3']] }) */ cleanupFiles: (cleanup: Record) => Promise; - getWebappTranslation?: (s: string, data?: Record) => string; + getWebappTranslation: (s: string, data?: Record) => string; }; diff --git a/generators/server/__snapshots__/generator.spec.ts.snap b/generators/server/__snapshots__/generator.spec.ts.snap index 28811ab52b30..c799f6ef215a 100644 --- a/generators/server/__snapshots__/generator.spec.ts.snap +++ b/generators/server/__snapshots__/generator.spec.ts.snap @@ -143,9 +143,6 @@ exports[`generator - server composing databaseType option no with jwt should mat "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -376,9 +373,6 @@ exports[`generator - server composing databaseType option no with oauth2 should "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -585,9 +579,6 @@ exports[`generator - server composing databaseType option no with session should "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1022,9 +1013,6 @@ exports[`generator - server with entities should match files snapshot 1`] = ` "src/main/resources/config/liquibase/master.xml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, diff --git a/generators/server/support/__snapshots__/needles.spec.ts.snap b/generators/server/support/__snapshots__/needles.spec.ts.snap index 72f5deddaebb..112c352047a0 100644 --- a/generators/server/support/__snapshots__/needles.spec.ts.snap +++ b/generators/server/support/__snapshots__/needles.spec.ts.snap @@ -293,9 +293,6 @@ exports[`generator - server - support - needles generated project should match s "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, diff --git a/generators/spring-boot/__snapshots__/generator.spec.ts.snap b/generators/spring-boot/__snapshots__/generator.spec.ts.snap index bd7eab354bcc..a12764c89a6d 100644 --- a/generators/spring-boot/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-boot/__snapshots__/generator.spec.ts.snap @@ -227,9 +227,6 @@ exports[`generator - spring-boot with jwt should match generated files snapshot "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -520,9 +517,6 @@ exports[`generator - spring-boot with oauth2 should match generated files snapsh "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, diff --git a/generators/spring-boot/generator.ts b/generators/spring-boot/generator.ts index cc304f5c5403..f1373f02139e 100644 --- a/generators/spring-boot/generator.ts +++ b/generators/spring-boot/generator.ts @@ -52,6 +52,7 @@ import { APPLICATION_TYPE_MICROSERVICE, applicationTypes, cacheTypes, + clientFrameworkTypes, databaseTypes, fieldTypes, messageBrokerTypes, @@ -72,12 +73,11 @@ const { CASSANDRA, COUCHBASE, MONGODB, NEO4J, SQL } = databaseTypes; const { MICROSERVICE, GATEWAY } = applicationTypes; const { KAFKA, PULSAR } = messageBrokerTypes; const { ELASTICSEARCH } = searchEngineTypes; +const { NO: NO_CLIENT } = clientFrameworkTypes; const { BYTES: TYPE_BYTES, BYTE_BUFFER: TYPE_BYTE_BUFFER } = fieldTypes.RelationalOnlyDBTypes; const { CUCUMBER, GATLING } = testFrameworkTypes; export default class SpringBootGenerator extends BaseApplicationGenerator { - fakeKeytool; - async beforeQueue() { if (!this.fromBlueprint) { await this.composeWithBlueprints(); @@ -209,7 +209,7 @@ export default class SpringBootGenerator extends BaseApplicationGenerator { return this.asComposingComponentTaskGroup({ async composing() { const { clientFramework, skipClient } = this.jhipsterConfigWithDefaults; - if (!skipClient && clientFramework !== 'no') { + if (!skipClient && clientFramework !== NO_CLIENT) { // When using prompts, clientFramework will only be known after composing priority. await this.composeWithJHipster('jhipster:java:node'); } @@ -229,7 +229,7 @@ export default class SpringBootGenerator extends BaseApplicationGenerator { get preparing() { return this.asPreparingTaskGroup({ checksWebsocket({ application }) { - const { websocket } = application as any; + const { websocket } = application; if (websocket && websocket !== NO_WEBSOCKET) { if (application.reactive) { throw new Error('Spring Websocket is not supported with reactive applications.'); @@ -461,7 +461,7 @@ public void set${javaBeanCase(propertyName)}(${propertyType} ${propertyName}) { }, async generateKeyStore({ application }) { const keyStoreFile = this.destinationPath(`${application.srcMainResources}config/tls/keystore.p12`); - if (this.fakeKeytool) { + if (application.fakeKeytool) { this.writeDestination(keyStoreFile, 'fake key-tool'); } else { this.validateResult(await generateKeyStore(keyStoreFile, { packageName: application.packageName! })); diff --git a/generators/spring-data-cassandra/__snapshots__/generator.spec.ts.snap b/generators/spring-data-cassandra/__snapshots__/generator.spec.ts.snap index 6c8e9c2af925..00eda5a5bc0c 100644 --- a/generators/spring-data-cassandra/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-cassandra/__snapshots__/generator.spec.ts.snap @@ -299,9 +299,6 @@ exports[`generator - cassandra gateway-jwt-gradle-enableTranslation(true)-com.my "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -667,9 +664,6 @@ exports[`generator - cassandra microservice-jwt-reactive(false)-maven-enableTran "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1020,9 +1014,6 @@ exports[`generator - cassandra microservice-jwt-reactive(true)-gradle-enableTran "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1367,9 +1358,6 @@ exports[`generator - cassandra microservice-oauth2-reactive(true)-gradle-enableT "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1771,9 +1759,6 @@ exports[`generator - cassandra monolith-jwt-reactive(false)-maven-enableTranslat "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2181,9 +2166,6 @@ exports[`generator - cassandra monolith-jwt-reactive(true)-gradle-enableTranslat "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2531,9 +2513,6 @@ exports[`generator - cassandra monolith-oauth2-reactive(false)-maven-enableTrans "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2902,9 +2881,6 @@ exports[`generator - cassandra monolith-oauth2-reactive(true)-gradle-enableTrans "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3306,9 +3282,6 @@ exports[`generator - cassandra monolith-session-reactive(false)-maven-enableTran "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3683,9 +3656,6 @@ exports[`generator - cassandra monolith-session-reactive(true)-gradle-enableTran "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, diff --git a/generators/spring-data-couchbase/__snapshots__/generator.spec.ts.snap b/generators/spring-data-couchbase/__snapshots__/generator.spec.ts.snap index c56fa03dfecc..59e6d6dae827 100644 --- a/generators/spring-data-couchbase/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-couchbase/__snapshots__/generator.spec.ts.snap @@ -323,9 +323,6 @@ exports[`generator - couchbase gateway-jwt-gradle-enableTranslation(true)-com.my "src/main/resources/config/couchmove/changelog/V20220129000210__anothersimple.fts": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -703,9 +700,6 @@ exports[`generator - couchbase microservice-jwt-reactive(false)-maven-enableTran "src/main/resources/config/couchmove/changelog/V20220129000200__anothersimple.n1ql": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1053,9 +1047,6 @@ exports[`generator - couchbase microservice-jwt-reactive(true)-gradle-enableTran "src/main/resources/config/couchmove/changelog/V20220129000200__anothersimple.n1ql": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1400,9 +1391,6 @@ exports[`generator - couchbase microservice-oauth2-reactive(true)-gradle-enableT "src/main/resources/config/couchmove/changelog/V20220129000200__anothersimple.n1ql": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1825,9 +1813,6 @@ exports[`generator - couchbase monolith-jwt-reactive(false)-maven-enableTranslat "src/main/resources/config/couchmove/changelog/V20220129000200__anothersimple.n1ql": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2250,9 +2235,6 @@ exports[`generator - couchbase monolith-jwt-reactive(true)-gradle-enableTranslat "src/main/resources/config/couchmove/changelog/V20220129000210__anothersimple.fts": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2600,9 +2582,6 @@ exports[`generator - couchbase monolith-oauth2-reactive(false)-maven-enableTrans "src/main/resources/config/couchmove/changelog/V20220129000200__anothersimple.n1ql": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2974,9 +2953,6 @@ exports[`generator - couchbase monolith-oauth2-reactive(true)-gradle-enableTrans "src/main/resources/config/couchmove/changelog/V20220129000210__anothersimple.fts": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3399,9 +3375,6 @@ exports[`generator - couchbase monolith-session-reactive(false)-maven-enableTran "src/main/resources/config/couchmove/changelog/V20220129000200__anothersimple.n1ql": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3791,9 +3764,6 @@ exports[`generator - couchbase monolith-session-reactive(true)-gradle-enableTran "src/main/resources/config/couchmove/changelog/V20220129000210__anothersimple.fts": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, diff --git a/generators/spring-data-elasticsearch/__snapshots__/generator.spec.ts.snap b/generators/spring-data-elasticsearch/__snapshots__/generator.spec.ts.snap index d60b89762c7f..6193b31f7b8e 100644 --- a/generators/spring-data-elasticsearch/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-elasticsearch/__snapshots__/generator.spec.ts.snap @@ -320,9 +320,6 @@ exports[`generator - elasticsearch gateway-jwt-gradle-enableTranslation(true)-co "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -736,9 +733,6 @@ exports[`generator - elasticsearch microservice-jwt-reactive(false)-maven-enable "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1128,9 +1122,6 @@ exports[`generator - elasticsearch microservice-jwt-reactive(true)-gradle-enable "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1511,9 +1502,6 @@ exports[`generator - elasticsearch microservice-oauth2-reactive(true)-gradle-ena "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1963,9 +1951,6 @@ exports[`generator - elasticsearch monolith-jwt-reactive(false)-maven-enableTran "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2421,9 +2406,6 @@ exports[`generator - elasticsearch monolith-jwt-reactive(true)-gradle-enableTran "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2834,9 +2816,6 @@ exports[`generator - elasticsearch monolith-oauth2-reactive(false)-maven-enableT "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3259,9 +3238,6 @@ exports[`generator - elasticsearch monolith-oauth2-reactive(true)-gradle-enableT "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3732,9 +3708,6 @@ exports[`generator - elasticsearch monolith-session-reactive(false)-maven-enable "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -4175,9 +4148,6 @@ exports[`generator - elasticsearch monolith-session-reactive(true)-gradle-enable "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, diff --git a/generators/spring-data-mongodb/__snapshots__/generator.spec.ts.snap b/generators/spring-data-mongodb/__snapshots__/generator.spec.ts.snap index 478f7404b4ef..f1b2f3937a7a 100644 --- a/generators/spring-data-mongodb/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-mongodb/__snapshots__/generator.spec.ts.snap @@ -293,9 +293,6 @@ exports[`generator - mongodb gateway-jwt-gradle-enableTranslation(true)-com.myco "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -661,9 +658,6 @@ exports[`generator - mongodb microservice-jwt-reactive(false)-maven-enableTransl "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -999,9 +993,6 @@ exports[`generator - mongodb microservice-jwt-reactive(true)-gradle-enableTransl "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1331,9 +1322,6 @@ exports[`generator - mongodb microservice-oauth2-reactive(true)-gradle-enableTra "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1732,9 +1720,6 @@ exports[`generator - mongodb monolith-jwt-reactive(false)-maven-enableTranslatio "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2139,9 +2124,6 @@ exports[`generator - mongodb monolith-jwt-reactive(true)-gradle-enableTranslatio "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2477,9 +2459,6 @@ exports[`generator - mongodb monolith-oauth2-reactive(false)-maven-enableTransla "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2833,9 +2812,6 @@ exports[`generator - mongodb monolith-oauth2-reactive(true)-gradle-enableTransla "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3234,9 +3210,6 @@ exports[`generator - mongodb monolith-session-reactive(false)-maven-enableTransl "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3608,9 +3581,6 @@ exports[`generator - mongodb monolith-session-reactive(true)-gradle-enableTransl "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, diff --git a/generators/spring-data-neo4j/__snapshots__/generator.spec.ts.snap b/generators/spring-data-neo4j/__snapshots__/generator.spec.ts.snap index 2624cec22893..d3f5218c2433 100644 --- a/generators/spring-data-neo4j/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-neo4j/__snapshots__/generator.spec.ts.snap @@ -299,9 +299,6 @@ exports[`generator - neo4j gateway-jwt-gradle-enableTranslation(true)-com.mycomp "src/main/resources/config/neo4j/migrations/user__user.json": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -664,9 +661,6 @@ exports[`generator - neo4j microservice-jwt-reactive(false)-maven-enableTranslat "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1002,9 +996,6 @@ exports[`generator - neo4j microservice-jwt-reactive(true)-gradle-enableTranslat "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1334,9 +1325,6 @@ exports[`generator - neo4j microservice-oauth2-reactive(true)-gradle-enableTrans "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1738,9 +1726,6 @@ exports[`generator - neo4j monolith-jwt-reactive(false)-maven-enableTranslation( "src/main/resources/config/neo4j/migrations/user__user.json": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2145,9 +2130,6 @@ exports[`generator - neo4j monolith-jwt-reactive(true)-gradle-enableTranslation( "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2480,9 +2462,6 @@ exports[`generator - neo4j monolith-oauth2-reactive(false)-maven-enableTranslati "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2836,9 +2815,6 @@ exports[`generator - neo4j monolith-oauth2-reactive(true)-gradle-enableTranslati "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3240,9 +3216,6 @@ exports[`generator - neo4j monolith-session-reactive(false)-maven-enableTranslat "src/main/resources/config/neo4j/migrations/user__user.json": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3614,9 +3587,6 @@ exports[`generator - neo4j monolith-session-reactive(true)-gradle-enableTranslat "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, diff --git a/generators/spring-data-relational/__snapshots__/generator.spec.ts.snap b/generators/spring-data-relational/__snapshots__/generator.spec.ts.snap index 19111e643025..a7927b0bce05 100644 --- a/generators/spring-data-relational/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-relational/__snapshots__/generator.spec.ts.snap @@ -272,9 +272,6 @@ exports[`generator - sql gateway-jwt-mysql-gradle-enableTranslation(true)-com.my "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -706,9 +703,6 @@ exports[`generator - sql gateway-jwt-oracle-gradle-enableTranslation(true)-com.m "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1128,9 +1122,6 @@ exports[`generator - sql gateway-jwt-postgresql-gradle-enableTranslation(true)-c "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1517,9 +1508,6 @@ exports[`generator - sql gateway-oauth2-mariadb-gradle-enableTranslation(true)-c "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1879,9 +1867,6 @@ exports[`generator - sql gateway-oauth2-mssql-gradle-enableTranslation(true)-com "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2163,9 +2148,6 @@ exports[`generator - sql microservice-jwt-mariadb-reactive(true)-gradle-enableTr "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2429,9 +2411,6 @@ exports[`generator - sql microservice-jwt-mssql-reactive(true)-gradle-enableTran "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2674,9 +2653,6 @@ exports[`generator - sql microservice-jwt-mysql-reactive(false)-maven-enableTran "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2955,9 +2931,6 @@ exports[`generator - sql microservice-jwt-mysql-reactive(true)-gradle-enableTran "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3197,9 +3170,6 @@ exports[`generator - sql microservice-jwt-oracle-reactive(false)-maven-enableTra "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3469,9 +3439,6 @@ exports[`generator - sql microservice-jwt-oracle-reactive(true)-gradle-enableTra "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3699,9 +3666,6 @@ exports[`generator - sql microservice-jwt-postgresql-reactive(false)-maven-enabl "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3980,9 +3944,6 @@ exports[`generator - sql microservice-jwt-postgresql-reactive(true)-gradle-enabl "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -4219,9 +4180,6 @@ exports[`generator - sql microservice-oauth2-mariadb-reactive(false)-maven-enabl "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -4488,9 +4446,6 @@ exports[`generator - sql microservice-oauth2-mariadb-reactive(true)-gradle-enabl "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -4712,9 +4667,6 @@ exports[`generator - sql microservice-oauth2-mssql-reactive(false)-maven-enableT "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -4975,9 +4927,6 @@ exports[`generator - sql microservice-oauth2-mssql-reactive(true)-gradle-enableT "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -5229,9 +5178,6 @@ exports[`generator - sql microservice-oauth2-mysql-reactive(true)-gradle-enableT "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -5483,9 +5429,6 @@ exports[`generator - sql microservice-oauth2-oracle-reactive(true)-gradle-enable "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -5728,9 +5671,6 @@ exports[`generator - sql microservice-oauth2-postgresql-reactive(true)-gradle-en "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -6051,9 +5991,6 @@ exports[`generator - sql monolith-jwt-mariadb-reactive(false)-maven-enableTransl "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -6410,9 +6347,6 @@ exports[`generator - sql monolith-jwt-mariadb-reactive(true)-gradle-enableTransl "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -6763,9 +6697,6 @@ exports[`generator - sql monolith-jwt-mssql-reactive(false)-maven-enableTranslat "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -7122,9 +7053,6 @@ exports[`generator - sql monolith-jwt-mssql-reactive(true)-gradle-enableTranslat "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -7472,9 +7400,6 @@ exports[`generator - sql monolith-jwt-mysql-reactive(false)-maven-enableTranslat "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -7825,9 +7750,6 @@ exports[`generator - sql monolith-jwt-mysql-reactive(true)-gradle-enableTranslat "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -8166,9 +8088,6 @@ exports[`generator - sql monolith-jwt-oracle-reactive(false)-maven-enableTransla "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -8522,9 +8441,6 @@ exports[`generator - sql monolith-jwt-oracle-reactive(true)-gradle-enableTransla "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -8872,9 +8788,6 @@ exports[`generator - sql monolith-jwt-postgresql-reactive(false)-maven-enableTra "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -9231,9 +9144,6 @@ exports[`generator - sql monolith-jwt-postgresql-reactive(true)-gradle-enableTra "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -9500,9 +9410,6 @@ exports[`generator - sql monolith-oauth2-mariadb-reactive(false)-maven-enableTra "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -9799,9 +9706,6 @@ exports[`generator - sql monolith-oauth2-mariadb-reactive(true)-gradle-enableTra "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -10053,9 +9957,6 @@ exports[`generator - sql monolith-oauth2-mssql-reactive(false)-maven-enableTrans "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -10358,9 +10259,6 @@ exports[`generator - sql monolith-oauth2-mssql-reactive(true)-gradle-enableTrans "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -10624,9 +10522,6 @@ exports[`generator - sql monolith-oauth2-mysql-reactive(false)-maven-enableTrans "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -10929,9 +10824,6 @@ exports[`generator - sql monolith-oauth2-mysql-reactive(true)-gradle-enableTrans "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -11192,9 +11084,6 @@ exports[`generator - sql monolith-oauth2-oracle-reactive(false)-maven-enableTran "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -11488,9 +11377,6 @@ exports[`generator - sql monolith-oauth2-oracle-reactive(true)-gradle-enableTran "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -11739,9 +11625,6 @@ exports[`generator - sql monolith-oauth2-postgresql-reactive(false)-maven-enable "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -12044,9 +11927,6 @@ exports[`generator - sql monolith-oauth2-postgresql-reactive(true)-gradle-enable "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -12376,9 +12256,6 @@ exports[`generator - sql monolith-session-mariadb-reactive(false)-maven-enableTr "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -12699,9 +12576,6 @@ exports[`generator - sql monolith-session-mariadb-reactive(true)-gradle-enableTr "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -13019,9 +12893,6 @@ exports[`generator - sql monolith-session-mssql-reactive(false)-maven-enableTran "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -13342,9 +13213,6 @@ exports[`generator - sql monolith-session-mssql-reactive(true)-gradle-enableTran "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -13662,9 +13530,6 @@ exports[`generator - sql monolith-session-mysql-reactive(false)-maven-enableTran "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -13985,9 +13850,6 @@ exports[`generator - sql monolith-session-mysql-reactive(true)-gradle-enableTran "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -14305,9 +14167,6 @@ exports[`generator - sql monolith-session-oracle-reactive(false)-maven-enableTra "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -14625,9 +14484,6 @@ exports[`generator - sql monolith-session-oracle-reactive(true)-gradle-enableTra "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -14942,9 +14798,6 @@ exports[`generator - sql monolith-session-postgresql-reactive(false)-maven-enabl "src/main/resources/config/application.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -15265,9 +15118,6 @@ exports[`generator - sql monolith-session-postgresql-reactive(true)-gradle-enabl "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, - "src/main/resources/config/tls/keystore.p12": { - "stateCleared": "modified", - }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, From 920409e174008fcb5fbec15f62d1d8f617b6ccaa Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sat, 14 Sep 2024 23:04:08 +0200 Subject: [PATCH 04/10] use of some constants in command --- generators/spring-boot/command.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generators/spring-boot/command.ts b/generators/spring-boot/command.ts index bd8540cfebcb..61357656ec9d 100644 --- a/generators/spring-boot/command.ts +++ b/generators/spring-boot/command.ts @@ -23,7 +23,7 @@ import { createBase64Secret, createSecret } from '../base/support/secret.js'; import { applicationTypes, authenticationTypes } from '../../lib/jhipster/index.js'; const { OAUTH2, SESSION, JWT } = authenticationTypes; -const { GATEWAY, MICROSERVICE } = applicationTypes; +const { GATEWAY, MICROSERVICE, MONOLITH } = applicationTypes; const ALPHANUMERIC_PATTERN = /^[A-Za-z][A-Za-z0-9]*$/; @@ -72,7 +72,7 @@ const command = { type: String, }, prompt: gen => ({ - when: () => ['gateway', 'microservice'].includes(gen.jhipsterConfigWithDefaults.applicationType), + when: () => [GATEWAY, MICROSERVICE].includes(gen.jhipsterConfigWithDefaults.applicationType), type: 'list', message: 'Which service discovery server do you want to use?', default: 'consul', @@ -94,8 +94,8 @@ const command = { type: 'list', message: `Which ${chalk.yellow('*type*')} of authentication would you like to use?`, choices: () => - gen.jhipsterConfigWithDefaults.applicationType !== 'monolith' - ? (config.choices as any).filter(({ value }) => value !== 'session') + gen.jhipsterConfigWithDefaults.applicationType !== MONOLITH + ? (config.choices as any).filter(({ value }) => value !== SESSION) : config.choices, default: () => gen.jhipsterConfigWithDefaults.authenticationType, }), From 9fd9ca2aa8cff8cb6a0b63cfeda086d3d2e0b583 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sun, 15 Sep 2024 18:28:58 +0200 Subject: [PATCH 05/10] remove some unused generator-angular methods --- generators/angular/generator.ts | 146 ++---------------- generators/angular/types.d.ts | 4 +- generators/client/support/template-utils.ts | 28 ++-- .../needle-client-angular-generator.spec.ts | 21 --- test/needle-api/needle-client-angular.spec.ts | 111 ------------- 5 files changed, 27 insertions(+), 283 deletions(-) delete mode 100644 test/needle-api/needle-client-angular.spec.ts diff --git a/generators/angular/generator.ts b/generators/angular/generator.ts index 5e8cd9047611..f5f200f86cf3 100644 --- a/generators/angular/generator.ts +++ b/generators/angular/generator.ts @@ -16,7 +16,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { camelCase } from 'lodash-es'; import chalk from 'chalk'; import { isFileStateModified } from 'mem-fs-editor/state'; @@ -33,7 +32,6 @@ import { } from '../client/support/index.js'; import { createNeedleCallback, mutateData } from '../base/support/index.js'; import { writeEslintClientRootConfigFile } from '../javascript/generators/eslint/support/tasks.js'; -import type { PostWritingEntitiesTaskParam } from '../../lib/types/application/tasks.js'; import { cleanupEntitiesFiles, postWriteEntitiesFiles, writeEntitiesFiles } from './entity-files-angular.js'; import { writeFiles } from './files-angular.js'; import cleanupOldFilesTask from './cleanup.js'; @@ -100,8 +98,15 @@ export default class AngularGenerator extends BaseApplicationGenerator { }, addNeedles({ source, application }) { source.addEntitiesToClient = param => { - this.addEntitiesToModule(param); - this.addEntitiesToMenu(param); + const routeTemplatePath = `${param.application.clientSrcDir}app/entities/entity.routes.ts`; + const ignoreNonExistingRoute = chalk.yellow(`Route(s) not added to ${routeTemplatePath}.`); + const addRouteCallback = addEntitiesRoute(param); + this.editFile(routeTemplatePath, { ignoreNonExisting: ignoreNonExistingRoute }, addRouteCallback); + + const filePath = `${application.clientSrcDir}app/layouts/navbar/navbar.component.html`; + const ignoreNonExisting = chalk.yellow('Reference to entities not added to menu.'); + const editCallback = addToEntitiesMenu(param); + this.editFile(filePath, { ignoreNonExisting }, editCallback); }; source.addAdminRoute = (args: Omit[0], 'needle'>) => @@ -196,7 +201,6 @@ export default class AngularGenerator extends BaseApplicationGenerator { returnValue = fieldDefaultValue; } } - return returnValue; }, }); @@ -314,123 +318,6 @@ export default class AngularGenerator extends BaseApplicationGenerator { get [BaseApplicationGenerator.END]() { return this.delegateTasksToBlueprint(() => this.end); } - - /** - * @private - * Add new scss style to the angular application in "vendor.scss". - * - * @param {string} style - scss to add in the file - * @param {string} comment - comment to add before css code - * - * example: - * - * style = '.success {\n @extend .message;\n border-color: green;\n}' - * comment = 'Message' - * - * * ========================================================================== - * Message - * ========================================================================== * - * .success { - * @extend .message; - * border-color: green; - * } - * - */ - addVendorSCSSStyle(style, comment?) { - this.needleApi.clientAngular.addVendorSCSSStyle(style, comment); - } - - /** - * @private - * Add a new lazy loaded module to admin routing file. - * - * @param {string} route - The route for the module. For example 'entity-audit'. - * @param {string} modulePath - The path to the module file. For example './entity-audit/entity-audit.module'. - * @param {string} moduleName - The name of the module. For example 'EntityAuditModule'. - * @param {string} pageTitle - The translation key if i18n is enabled or the text if i18n is disabled for the page title in the browser. - * For example 'entityAudit.home.title' for i18n enabled or 'Entity audit' for i18n disabled. - * If undefined then application global page title is used in the browser title bar. - */ - addAdminRoute(route, modulePath, moduleName, pageTitle) { - this.needleApi.clientAngular.addAdminRoute(route, modulePath, moduleName, pageTitle); - } - - /** - * @private - * Add a new module in the TS modules file. - * - * @param {string} appName - Angular2 application name. - * @param {string} angularName - The name of the new admin item. - * @param {string} folderName - The name of the folder. - * @param {string} fileName - The name of the file. - * @param {boolean} enableTranslation - If translations are enabled or not. - * @param {string} clientFramework - The name of the client framework. - */ - addAngularModule(appName, angularName, folderName, fileName, enableTranslation) { - this.needleApi.clientAngular.addModule(appName, angularName, folderName, fileName, enableTranslation); - } - - /** - * @private - * Add a new icon to icon imports. - * - * @param {string} iconName - The name of the Font Awesome icon. - */ - addIcon(iconName) { - this.needleApi.clientAngular.addIcon(iconName); - } - - /** - * Add a new menu element to the admin menu. - * - * @param {string} routerName - The name of the Angular router that is added to the admin menu. - * @param {string} iconName - The name of the Font Awesome icon that will be displayed. - * @param {boolean} enableTranslation - If translations are enabled or not - * @param {string} translationKeyMenu - i18n key for entry in the admin menu - */ - addElementToAdminMenu(routerName, iconName, enableTranslation, translationKeyMenu = camelCase(routerName), jhiPrefix?) { - this.needleApi.clientAngular.addElementToAdminMenu(routerName, iconName, enableTranslation, translationKeyMenu, jhiPrefix); - } - - addEntitiesToMenu({ application, entities }: Pick) { - const filePath = `${application.clientSrcDir}app/layouts/navbar/navbar.component.html`; - const ignoreNonExisting = chalk.yellow('Reference to entities not added to menu.'); - const editCallback = addToEntitiesMenu({ application, entities }); - - this.editFile(filePath, { ignoreNonExisting }, editCallback); - } - - addEntitiesToModule(param: Pick) { - const filePath = `${param.application.clientSrcDir}app/entities/entity.routes.ts`; - const ignoreNonExisting = chalk.yellow(`Route(s) not added to ${filePath}.`); - const addRouteCallback = addEntitiesRoute(param); - this.editFile(filePath, { ignoreNonExisting }, addRouteCallback); - } - - /** - * @private - * Add new scss style to the angular application in "global.scss - * - * @param {string} style - css to add in the file - * @param {string} comment - comment to add before css code - * - * example: - * - * style = '.jhipster {\n color: #baa186;\n}' - * comment = 'New JHipster color' - * - * * ========================================================================== - * New JHipster color - * ========================================================================== * - * .jhipster { - * color: #baa186; - * } - * - */ - addMainSCSSStyle(style, comment?) { - this.needleApi.clientAngular.addGlobalSCSSStyle(style, comment); - } - /** * Returns the typescript import section of enums referenced by all fields of the entity. * @param fields returns the import of enums that are referenced by the fields @@ -459,7 +346,6 @@ export default class AngularGenerator extends BaseApplicationGenerator { generateTestEntityId(primaryKey, index = 0, wrapped = true) { return getTestEntityId(primaryKey, index, wrapped); } - /** * @private * Generate a test entity, for the PK references (when the PK is a composite, derived key) @@ -493,18 +379,4 @@ export default class AngularGenerator extends BaseApplicationGenerator { buildAngularFormPath(reference, prefix = []) { return angularFormPath(reference, prefix); } - - /** - * @private - * Add a new menu element, at the root of the menu. - * - * @param {string} routerName - The name of the router that is added to the menu. - * @param {string} iconName - The name of the Font Awesome icon that will be displayed. - * @param {boolean} enableTranslation - If translations are enabled or not - * @param {string} clientFramework - The name of the client framework - * @param {string} translationKeyMenu - i18n key for entry in the menu - */ - addElementToMenu(routerName, iconName, enableTranslation, _clientFramework?, translationKeyMenu = camelCase(routerName)) { - this.needleApi.clientAngular.addElementToMenu(routerName, iconName, enableTranslation, translationKeyMenu); - } } diff --git a/generators/angular/types.d.ts b/generators/angular/types.d.ts index 311a20481eaf..bb225f3cda1c 100644 --- a/generators/angular/types.d.ts +++ b/generators/angular/types.d.ts @@ -1 +1,3 @@ -export type AngularApplication = { angularLocaleId: string }; +export type AngularApplication = { + angularLocaleId: string; +}; diff --git a/generators/client/support/template-utils.ts b/generators/client/support/template-utils.ts index ad30cd519080..1b359b752c54 100644 --- a/generators/client/support/template-utils.ts +++ b/generators/client/support/template-utils.ts @@ -20,7 +20,7 @@ import path from 'path'; import { clientFrameworkTypes, fieldTypes } from '../../../lib/jhipster/index.js'; import type { PrimaryKey } from '../../../lib/types/application/entity.js'; -import type { FieldType } from '../../../lib/application/field-types.js'; +import type { Field } from '../../../lib/types/application/index.js'; import { getEntryIfTypeOrTypeAttribute } from './types-utils.js'; const { STRING: TYPE_STRING, UUID: TYPE_UUID } = fieldTypes.CommonDBTypes; @@ -75,20 +75,22 @@ export const generateEntityClientImports = (relationships, dto?, clientFramework * @param {string} clientFramework the client framework, 'angular' or 'react'. * @returns typeImports: Map */ -export const generateEntityClientEnumImports = (fields, clientFramework) => { +export const generateEntityClientEnumImports = (fields: Field[] | undefined, clientFramework: string) => { const typeImports = new Map(); const uniqueEnums = {}; - fields.forEach(field => { - const { enumFileName, fieldType } = field; - if (field.fieldIsEnum && (!uniqueEnums[fieldType] || (uniqueEnums[fieldType] && field.fieldValues.length !== 0))) { - const importType = `${fieldType}`; - const basePath = clientFramework === VUE ? '@' : 'app'; - const modelPath = clientFramework === ANGULAR ? 'entities' : 'shared/model'; - const importPath = `${basePath}/${modelPath}/enumerations/${enumFileName}.model`; - uniqueEnums[fieldType] = field.fieldType; - typeImports.set(importType, importPath); - } - }); + if (fields && fields.forEach) { + fields.forEach(field => { + const { enumFileName, fieldType } = field; + if (field.fieldIsEnum && (!uniqueEnums[fieldType] || (uniqueEnums[fieldType] && field.fieldValues?.length !== 0))) { + const importType = `${fieldType}`; + const basePath = clientFramework === VUE ? '@' : 'app'; + const modelPath = clientFramework === ANGULAR ? 'entities' : 'shared/model'; + const importPath = `${basePath}/${modelPath}/enumerations/${enumFileName}.model`; + uniqueEnums[fieldType] = field.fieldType; + typeImports.set(importType, importPath); + } + }); + } return typeImports; }; diff --git a/test/needle-api/needle-client-angular-generator.spec.ts b/test/needle-api/needle-client-angular-generator.spec.ts index 2a1769bc5d79..3df770391fab 100644 --- a/test/needle-api/needle-client-angular-generator.spec.ts +++ b/test/needle-api/needle-client-angular-generator.spec.ts @@ -13,9 +13,6 @@ const mockAngularBlueprintSubGen = class extends AngularGenerator { get [BaseApplicationGenerator.POST_WRITING_ENTITIES]() { return this.asPostWritingEntitiesTaskGroup({ - addToMenuStep() { - this.addElementToAdminMenu('routerName2', 'iconName2', true); - }, addToModuleStep({ source, application }) { source.addEntitiesToClient({ application, @@ -66,24 +63,6 @@ describe('needle API Angular angular generator : JHipster with blueprint', () => ); }); - it('admin menu contains the admin element added by needle api', () => { - runResult.assertFileContent( - `${CLIENT_MAIN_SRC_DIR}app/layouts/navbar/navbar.component.html`, - ` -
  • - - - Router Name 2 - -
  • -`, - ); - }); - - it('icon imports contains a new icon added by a new admin menu method of needle api ', () => { - runResult.assertFileContent(`${CLIENT_MAIN_SRC_DIR}app/config/font-awesome-icons.ts`, ' faIconName2'); - }); - it('entity module contains the microservice object added by needle api', () => { runResult.assertFileContent( `${CLIENT_MAIN_SRC_DIR}app/entities/entity.routes.ts`, diff --git a/test/needle-api/needle-client-angular.spec.ts b/test/needle-api/needle-client-angular.spec.ts deleted file mode 100644 index 1fe48a971487..000000000000 --- a/test/needle-api/needle-client-angular.spec.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { before, describe, it } from 'esmocha'; -import { basicHelpers as helpers, result as runResult } from '../../lib/testing/index.js'; - -import { CLIENT_MAIN_SRC_DIR } from '../../generators/generator-constants.js'; -import BaseApplicationGenerator from '../../generators/base-application/index.js'; -import AngularGenerator from '../../generators/angular/index.js'; - -const mockBlueprintSubGen = class extends AngularGenerator { - constructor(args, opts, features) { - super(args, opts, features); - this.sbsBlueprint = true; - } - - get [BaseApplicationGenerator.POST_WRITING]() { - return this.asPostWritingTaskGroup({ - addCssStylesProperty() { - this.addMainSCSSStyle('@import style_without_comment;'); - this.addMainSCSSStyle('@import style;', 'my comment'); - this.addVendorSCSSStyle('@import style;', 'my comment'); - this.addVendorSCSSStyle('@import style_without_comment;'); - }, - addToMenuStep() { - this.addElementToMenu('routerName1', 'iconName1', true); - }, - addToModuleStep() { - this.addAngularModule('appName', 'angularName', 'folderName', 'fileName', true); - this.addAdminRoute('entity-audit', './entity-audit/entity-audit.module', 'EntityAuditModule', 'entityAudit.home.title'); - }, - }); - } -}; - -describe('needle API Angular: JHipster angular generator with blueprint', () => { - before(async () => { - await helpers - .runJHipster('angular') - .withJHipsterConfig({ - skipServer: true, - }) - .withOptions({ - blueprint: ['myblueprint'], - }) - .withGenerators([[mockBlueprintSubGen, { namespace: 'jhipster-myblueprint:angular' }]]); - }); - - it('vendor.scss contains the specific change (without comment) added by needle api', () => { - runResult.assertFileContent(`${CLIENT_MAIN_SRC_DIR}content/scss/vendor.scss`, /\n@import style_without_comment;\n/); - }); - - it('global.scss contains the specific change (without comment) added by needle api', () => { - runResult.assertFileContent(`${CLIENT_MAIN_SRC_DIR}content/scss/global.scss`, /\n@import style_without_comment;\n/); - }); - - it('vendor.scss contains the specific change added by needle api', () => { - runResult.assertFileContent(`${CLIENT_MAIN_SRC_DIR}content/scss/vendor.scss`, /\n@import style;\n/); - runResult.assertFileContent( - `${CLIENT_MAIN_SRC_DIR}content/scss/vendor.scss`, - '* ==========================================================================\n' + - 'my comment\n' + - '========================================================================== */\n', - ); - }); - - it('global.scss contains the specific change added by needle api', () => { - runResult.assertFileContent(`${CLIENT_MAIN_SRC_DIR}content/scss/global.scss`, /\n@import style;\n/); - runResult.assertFileContent( - `${CLIENT_MAIN_SRC_DIR}content/scss/global.scss`, - '* ==========================================================================\n' + - 'my comment\n' + - '========================================================================== */\n', - ); - }); - - it('menu contains the element added by needle api', () => { - runResult.assertFileContent( - `${CLIENT_MAIN_SRC_DIR}app/layouts/navbar/navbar.component.html`, - ` - -`, - ); - }); - - it('icon imports contains a new icon added by a new menu method of needle api ', () => { - runResult.assertFileContent(`${CLIENT_MAIN_SRC_DIR}app/config/font-awesome-icons.ts`, ' faIconName1'); - }); - - it('admin routes contains the routing added by needle api', () => { - runResult.assertFileContent( - `${CLIENT_MAIN_SRC_DIR}app/admin/admin.routes.ts`, - ' },\n' + - ' {\n' + - " path: 'entity-audit',\n" + - " data: { pageTitle: 'entityAudit.home.title' },\n" + - " loadChildren: () => import('./entity-audit/entity-audit.module').then(m => m.EntityAuditModule),\n" + - ' },', - ); - }); - - it('app module contains the import and the module added by needle api', () => { - runResult.assertFileContent( - `${CLIENT_MAIN_SRC_DIR}app/app.config.ts`, - "import { appNameangularNameModule } from './folderName/fileName.module';", - ); - runResult.assertFileContent(`${CLIENT_MAIN_SRC_DIR}app/app.config.ts`, 'appNameangularNameModule,'); - }); -}); From 9ed252991ca8162758731f9224a4eecbe5971eb7 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sat, 28 Sep 2024 22:34:09 +0200 Subject: [PATCH 06/10] align method signature --- generators/angular/support/translate-angular.ts | 16 ++++++++-------- generators/client/support/template-utils.ts | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/generators/angular/support/translate-angular.ts b/generators/angular/support/translate-angular.ts index 99f6675f789c..7985bf4879d1 100644 --- a/generators/angular/support/translate-angular.ts +++ b/generators/angular/support/translate-angular.ts @@ -47,7 +47,7 @@ export type ReplacerOptions = { jhiPrefix: string; enableTranslation: boolean }; * @returns {string} */ function replaceTranslationKeysWithText( - getWebappTranslation: (key: string, val?: Record | undefined) => string, + getWebappTranslation: (s: string, val?: Record | undefined) => string, content: string, regexSource: string, { @@ -79,7 +79,7 @@ function replaceTranslationKeysWithText( * @returns string with jsKey value replaced */ function replaceJSTranslation( - getWebappTranslation: (key: string, val?: Record | undefined) => string, + getWebappTranslation: (s: string, val?: Record | undefined) => string, content: string, jsKey: string, ) { @@ -99,14 +99,14 @@ function replaceJSTranslation( * @param {string} content html content * @returns string with pageTitle replaced */ -function replacePageTitles(getWebappTranslation: (key: string, val?: Record | undefined) => string, content: string) { +function replacePageTitles(getWebappTranslation: (s: string, val?: Record | undefined) => string, content: string) { return replaceJSTranslation(getWebappTranslation, content, 'title'); } /** * @type {function(import('../generator-base.js'), string): string} */ -function replacePlaceholders(getWebappTranslation: (key: string, val?: Record | undefined) => string, content: string) { +function replacePlaceholders(getWebappTranslation: (s: string, val?: Record | undefined) => string, content: string) { return replaceTranslationKeysWithText(getWebappTranslation, content, PLACEHOLDER_REGEX, { keyIndex: 2 }); } @@ -115,7 +115,7 @@ function replacePlaceholders(getWebappTranslation: (key: string, val?: Record | undefined) => string, content: string) { +function replaceErrorMessage(getWebappTranslation: (s: string, val?: Record | undefined) => string, content: string) { return replaceJSTranslation(getWebappTranslation, content, 'errorMessage'); } @@ -124,7 +124,7 @@ function replaceErrorMessage(getWebappTranslation: (key: string, val?: Record | undefined) => string, + getWebappTranslation: (s: string, val?: Record | undefined) => string, { enableTranslation, jhiPrefix }: ReplacerOptions, { key, parsedInterpolate, prefix, suffix }: JHITranslateConverterOptions, ) => { @@ -297,7 +297,7 @@ const replaceImplementations: Record< * @this {import('../generator-base.js')} */ export const createTranslationReplacer = ( - getWebappTranslation: (key: string, val?: Record | undefined) => string, + getWebappTranslation: (s: string, val?: Record) => string, opts: ReplacerOptions | boolean, ) => { const htmlJhiTranslateReplacer = createJhiTransformTranslateReplacer(getWebappTranslation, { escapeHtml: true }); @@ -348,7 +348,7 @@ const minimatch = new Minimatch('**/*{.html,.ts}'); export const isTranslatedAngularFile = file => minimatch.match(file.path); export const translateAngularFilesTransform = ( - getWebappTranslation: (key: string, val?: Record | undefined) => string, + getWebappTranslation: (s: string, val?: Record) => string, opts: ReplacerOptions | boolean, ) => { const translate = createTranslationReplacer(getWebappTranslation, opts); diff --git a/generators/client/support/template-utils.ts b/generators/client/support/template-utils.ts index 1b359b752c54..52948a518edb 100644 --- a/generators/client/support/template-utils.ts +++ b/generators/client/support/template-utils.ts @@ -20,6 +20,7 @@ import path from 'path'; import { clientFrameworkTypes, fieldTypes } from '../../../lib/jhipster/index.js'; import type { PrimaryKey } from '../../../lib/types/application/entity.js'; +import type { FieldType } from '../../../lib/application/field-types.js'; import type { Field } from '../../../lib/types/application/index.js'; import { getEntryIfTypeOrTypeAttribute } from './types-utils.js'; From 7e7261a7742e57dc1f91a439b1f45c53a3006347 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Fri, 11 Oct 2024 13:52:48 +0200 Subject: [PATCH 07/10] first use of generics in a generator --- generators/angular/generator.ts | 10 ++++++++-- generators/angular/types.d.ts | 5 ++++- generators/client/types.d.ts | 2 -- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/generators/angular/generator.ts b/generators/angular/generator.ts index f5f200f86cf3..cba5f4911746 100644 --- a/generators/angular/generator.ts +++ b/generators/angular/generator.ts @@ -18,7 +18,7 @@ */ import chalk from 'chalk'; import { isFileStateModified } from 'mem-fs-editor/state'; - +import type { Entity } from '../../lib/types/application/entity.js'; import BaseApplicationGenerator from '../base-application/index.js'; import { GENERATOR_ANGULAR, GENERATOR_CLIENT, GENERATOR_LANGUAGES } from '../generator-list.js'; import { defaultLanguage } from '../languages/support/index.js'; @@ -32,6 +32,7 @@ import { } from '../client/support/index.js'; import { createNeedleCallback, mutateData } from '../base/support/index.js'; import { writeEslintClientRootConfigFile } from '../javascript/generators/eslint/support/tasks.js'; +import type { TaskTypes as DefaultTaskTypes } from '../../lib/types/application/tasks.js'; import { cleanupEntitiesFiles, postWriteEntitiesFiles, writeEntitiesFiles } from './entity-files-angular.js'; import { writeFiles } from './files-angular.js'; import cleanupOldFilesTask from './cleanup.js'; @@ -46,10 +47,15 @@ import { isTranslatedAngularFile, translateAngularFilesTransform, } from './support/index.js'; +import type { AngularApplication } from './types.js'; const { ANGULAR } = clientFrameworkTypes; -export default class AngularGenerator extends BaseApplicationGenerator { +export default class AngularGenerator extends BaseApplicationGenerator< + Entity, + AngularApplication, + DefaultTaskTypes +> { localEntities?: any[]; async beforeQueue() { diff --git a/generators/angular/types.d.ts b/generators/angular/types.d.ts index bb225f3cda1c..b88b53057932 100644 --- a/generators/angular/types.d.ts +++ b/generators/angular/types.d.ts @@ -1,3 +1,6 @@ +import type { Entity } from '../../lib/types/application/entity.js'; +import type { ApplicationType } from '../../lib/types/application/application.js'; + export type AngularApplication = { angularLocaleId: string; -}; +} & ApplicationType; diff --git a/generators/client/types.d.ts b/generators/client/types.d.ts index 35cf78e2b8f8..4aab32bf6ab7 100644 --- a/generators/client/types.d.ts +++ b/generators/client/types.d.ts @@ -1,5 +1,4 @@ import type { addIconImport, addItemToMenu, addRoute } from '../angular/support/needles.js'; -import type { AngularApplication } from '../angular/types.js'; import type { ExportApplicationPropertiesFromCommand } from '../../lib/command/index.js'; import type { CypressApplication } from '../cypress/types.js'; import type { JavaScriptApplication, JavaScriptSourceType } from '../javascript/types.js'; @@ -10,7 +9,6 @@ type ApplicationClientProperties = ExportApplicationPropertiesFromCommand Date: Fri, 11 Oct 2024 14:00:58 +0200 Subject: [PATCH 08/10] make a method optional for blueprint --- generators/base/types.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/base/types.d.ts b/generators/base/types.d.ts index 4a4be7692392..e4ce9a51f3c0 100644 --- a/generators/base/types.d.ts +++ b/generators/base/types.d.ts @@ -24,5 +24,5 @@ export type Control = BaseApplicationControlProperties & { * cleanupFiles({ '6.0.0': ['file1', 'file2', [application.shouldRemove, 'file3']] }) */ cleanupFiles: (cleanup: Record) => Promise; - getWebappTranslation: (s: string, data?: Record) => string; + getWebappTranslation?: (s: string, data?: Record) => string; }; From 362fa872a5538ce195fa5e7f7d9d45f012035197 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Fri, 11 Oct 2024 14:19:21 +0200 Subject: [PATCH 09/10] lint --- generators/angular/generator.ts | 2 +- generators/spring-boot/generator.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/generators/angular/generator.ts b/generators/angular/generator.ts index cba5f4911746..cf13b51d9b05 100644 --- a/generators/angular/generator.ts +++ b/generators/angular/generator.ts @@ -232,7 +232,7 @@ export default class AngularGenerator extends BaseApplicationGenerator< filter: file => isFileStateModified(file) && file.path.startsWith(this.destinationPath()) && isTranslatedAngularFile(file), refresh: false, }, - translateAngularFilesTransform(control.getWebappTranslation, { enableTranslation, jhiPrefix }), + translateAngularFilesTransform(control.getWebappTranslation!, { enableTranslation, jhiPrefix }), ); }, }); diff --git a/generators/spring-boot/generator.ts b/generators/spring-boot/generator.ts index f1373f02139e..a02c979df828 100644 --- a/generators/spring-boot/generator.ts +++ b/generators/spring-boot/generator.ts @@ -78,6 +78,8 @@ const { NO: NO_CLIENT } = clientFrameworkTypes; const { BYTES: TYPE_BYTES, BYTE_BUFFER: TYPE_BYTE_BUFFER } = fieldTypes.RelationalOnlyDBTypes; const { CUCUMBER, GATLING } = testFrameworkTypes; export default class SpringBootGenerator extends BaseApplicationGenerator { + fakeKeytool; + async beforeQueue() { if (!this.fromBlueprint) { await this.composeWithBlueprints(); @@ -461,7 +463,7 @@ public void set${javaBeanCase(propertyName)}(${propertyType} ${propertyName}) { }, async generateKeyStore({ application }) { const keyStoreFile = this.destinationPath(`${application.srcMainResources}config/tls/keystore.p12`); - if (application.fakeKeytool) { + if (this.fakeKeytool) { this.writeDestination(keyStoreFile, 'fake key-tool'); } else { this.validateResult(await generateKeyStore(keyStoreFile, { packageName: application.packageName! })); From 98ec46ba5c41ffb3f82b00328215f47df98629a4 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Fri, 11 Oct 2024 15:01:13 +0200 Subject: [PATCH 10/10] update snapshots --- .../__snapshots__/generator.spec.ts.snap | 12 ++ .../__snapshots__/needles.spec.ts.snap | 3 + .../__snapshots__/generator.spec.ts.snap | 6 + .../__snapshots__/generator.spec.ts.snap | 30 ++++ .../__snapshots__/generator.spec.ts.snap | 30 ++++ .../__snapshots__/generator.spec.ts.snap | 30 ++++ .../__snapshots__/generator.spec.ts.snap | 30 ++++ .../__snapshots__/generator.spec.ts.snap | 30 ++++ .../__snapshots__/generator.spec.ts.snap | 150 ++++++++++++++++++ 9 files changed, 321 insertions(+) diff --git a/generators/server/__snapshots__/generator.spec.ts.snap b/generators/server/__snapshots__/generator.spec.ts.snap index c799f6ef215a..28811ab52b30 100644 --- a/generators/server/__snapshots__/generator.spec.ts.snap +++ b/generators/server/__snapshots__/generator.spec.ts.snap @@ -143,6 +143,9 @@ exports[`generator - server composing databaseType option no with jwt should mat "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -373,6 +376,9 @@ exports[`generator - server composing databaseType option no with oauth2 should "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -579,6 +585,9 @@ exports[`generator - server composing databaseType option no with session should "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1013,6 +1022,9 @@ exports[`generator - server with entities should match files snapshot 1`] = ` "src/main/resources/config/liquibase/master.xml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, diff --git a/generators/server/support/__snapshots__/needles.spec.ts.snap b/generators/server/support/__snapshots__/needles.spec.ts.snap index 112c352047a0..72f5deddaebb 100644 --- a/generators/server/support/__snapshots__/needles.spec.ts.snap +++ b/generators/server/support/__snapshots__/needles.spec.ts.snap @@ -293,6 +293,9 @@ exports[`generator - server - support - needles generated project should match s "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, diff --git a/generators/spring-boot/__snapshots__/generator.spec.ts.snap b/generators/spring-boot/__snapshots__/generator.spec.ts.snap index a12764c89a6d..bd7eab354bcc 100644 --- a/generators/spring-boot/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-boot/__snapshots__/generator.spec.ts.snap @@ -227,6 +227,9 @@ exports[`generator - spring-boot with jwt should match generated files snapshot "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -517,6 +520,9 @@ exports[`generator - spring-boot with oauth2 should match generated files snapsh "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, diff --git a/generators/spring-data-cassandra/__snapshots__/generator.spec.ts.snap b/generators/spring-data-cassandra/__snapshots__/generator.spec.ts.snap index 00eda5a5bc0c..6c8e9c2af925 100644 --- a/generators/spring-data-cassandra/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-cassandra/__snapshots__/generator.spec.ts.snap @@ -299,6 +299,9 @@ exports[`generator - cassandra gateway-jwt-gradle-enableTranslation(true)-com.my "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -664,6 +667,9 @@ exports[`generator - cassandra microservice-jwt-reactive(false)-maven-enableTran "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1014,6 +1020,9 @@ exports[`generator - cassandra microservice-jwt-reactive(true)-gradle-enableTran "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1358,6 +1367,9 @@ exports[`generator - cassandra microservice-oauth2-reactive(true)-gradle-enableT "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1759,6 +1771,9 @@ exports[`generator - cassandra monolith-jwt-reactive(false)-maven-enableTranslat "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2166,6 +2181,9 @@ exports[`generator - cassandra monolith-jwt-reactive(true)-gradle-enableTranslat "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2513,6 +2531,9 @@ exports[`generator - cassandra monolith-oauth2-reactive(false)-maven-enableTrans "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2881,6 +2902,9 @@ exports[`generator - cassandra monolith-oauth2-reactive(true)-gradle-enableTrans "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3282,6 +3306,9 @@ exports[`generator - cassandra monolith-session-reactive(false)-maven-enableTran "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3656,6 +3683,9 @@ exports[`generator - cassandra monolith-session-reactive(true)-gradle-enableTran "src/main/resources/config/cql/drop-keyspace.cql": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, diff --git a/generators/spring-data-couchbase/__snapshots__/generator.spec.ts.snap b/generators/spring-data-couchbase/__snapshots__/generator.spec.ts.snap index 59e6d6dae827..c56fa03dfecc 100644 --- a/generators/spring-data-couchbase/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-couchbase/__snapshots__/generator.spec.ts.snap @@ -323,6 +323,9 @@ exports[`generator - couchbase gateway-jwt-gradle-enableTranslation(true)-com.my "src/main/resources/config/couchmove/changelog/V20220129000210__anothersimple.fts": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -700,6 +703,9 @@ exports[`generator - couchbase microservice-jwt-reactive(false)-maven-enableTran "src/main/resources/config/couchmove/changelog/V20220129000200__anothersimple.n1ql": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1047,6 +1053,9 @@ exports[`generator - couchbase microservice-jwt-reactive(true)-gradle-enableTran "src/main/resources/config/couchmove/changelog/V20220129000200__anothersimple.n1ql": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1391,6 +1400,9 @@ exports[`generator - couchbase microservice-oauth2-reactive(true)-gradle-enableT "src/main/resources/config/couchmove/changelog/V20220129000200__anothersimple.n1ql": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1813,6 +1825,9 @@ exports[`generator - couchbase monolith-jwt-reactive(false)-maven-enableTranslat "src/main/resources/config/couchmove/changelog/V20220129000200__anothersimple.n1ql": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2235,6 +2250,9 @@ exports[`generator - couchbase monolith-jwt-reactive(true)-gradle-enableTranslat "src/main/resources/config/couchmove/changelog/V20220129000210__anothersimple.fts": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2582,6 +2600,9 @@ exports[`generator - couchbase monolith-oauth2-reactive(false)-maven-enableTrans "src/main/resources/config/couchmove/changelog/V20220129000200__anothersimple.n1ql": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2953,6 +2974,9 @@ exports[`generator - couchbase monolith-oauth2-reactive(true)-gradle-enableTrans "src/main/resources/config/couchmove/changelog/V20220129000210__anothersimple.fts": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3375,6 +3399,9 @@ exports[`generator - couchbase monolith-session-reactive(false)-maven-enableTran "src/main/resources/config/couchmove/changelog/V20220129000200__anothersimple.n1ql": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3764,6 +3791,9 @@ exports[`generator - couchbase monolith-session-reactive(true)-gradle-enableTran "src/main/resources/config/couchmove/changelog/V20220129000210__anothersimple.fts": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, diff --git a/generators/spring-data-elasticsearch/__snapshots__/generator.spec.ts.snap b/generators/spring-data-elasticsearch/__snapshots__/generator.spec.ts.snap index 6193b31f7b8e..d60b89762c7f 100644 --- a/generators/spring-data-elasticsearch/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-elasticsearch/__snapshots__/generator.spec.ts.snap @@ -320,6 +320,9 @@ exports[`generator - elasticsearch gateway-jwt-gradle-enableTranslation(true)-co "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -733,6 +736,9 @@ exports[`generator - elasticsearch microservice-jwt-reactive(false)-maven-enable "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1122,6 +1128,9 @@ exports[`generator - elasticsearch microservice-jwt-reactive(true)-gradle-enable "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1502,6 +1511,9 @@ exports[`generator - elasticsearch microservice-oauth2-reactive(true)-gradle-ena "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1951,6 +1963,9 @@ exports[`generator - elasticsearch monolith-jwt-reactive(false)-maven-enableTran "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2406,6 +2421,9 @@ exports[`generator - elasticsearch monolith-jwt-reactive(true)-gradle-enableTran "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2816,6 +2834,9 @@ exports[`generator - elasticsearch monolith-oauth2-reactive(false)-maven-enableT "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3238,6 +3259,9 @@ exports[`generator - elasticsearch monolith-oauth2-reactive(true)-gradle-enableT "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3708,6 +3732,9 @@ exports[`generator - elasticsearch monolith-session-reactive(false)-maven-enable "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -4148,6 +4175,9 @@ exports[`generator - elasticsearch monolith-session-reactive(true)-gradle-enable "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, diff --git a/generators/spring-data-mongodb/__snapshots__/generator.spec.ts.snap b/generators/spring-data-mongodb/__snapshots__/generator.spec.ts.snap index f1b2f3937a7a..478f7404b4ef 100644 --- a/generators/spring-data-mongodb/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-mongodb/__snapshots__/generator.spec.ts.snap @@ -293,6 +293,9 @@ exports[`generator - mongodb gateway-jwt-gradle-enableTranslation(true)-com.myco "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -658,6 +661,9 @@ exports[`generator - mongodb microservice-jwt-reactive(false)-maven-enableTransl "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -993,6 +999,9 @@ exports[`generator - mongodb microservice-jwt-reactive(true)-gradle-enableTransl "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1322,6 +1331,9 @@ exports[`generator - mongodb microservice-oauth2-reactive(true)-gradle-enableTra "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1720,6 +1732,9 @@ exports[`generator - mongodb monolith-jwt-reactive(false)-maven-enableTranslatio "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2124,6 +2139,9 @@ exports[`generator - mongodb monolith-jwt-reactive(true)-gradle-enableTranslatio "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2459,6 +2477,9 @@ exports[`generator - mongodb monolith-oauth2-reactive(false)-maven-enableTransla "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2812,6 +2833,9 @@ exports[`generator - mongodb monolith-oauth2-reactive(true)-gradle-enableTransla "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3210,6 +3234,9 @@ exports[`generator - mongodb monolith-session-reactive(false)-maven-enableTransl "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3581,6 +3608,9 @@ exports[`generator - mongodb monolith-session-reactive(true)-gradle-enableTransl "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, diff --git a/generators/spring-data-neo4j/__snapshots__/generator.spec.ts.snap b/generators/spring-data-neo4j/__snapshots__/generator.spec.ts.snap index d3f5218c2433..2624cec22893 100644 --- a/generators/spring-data-neo4j/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-neo4j/__snapshots__/generator.spec.ts.snap @@ -299,6 +299,9 @@ exports[`generator - neo4j gateway-jwt-gradle-enableTranslation(true)-com.mycomp "src/main/resources/config/neo4j/migrations/user__user.json": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -661,6 +664,9 @@ exports[`generator - neo4j microservice-jwt-reactive(false)-maven-enableTranslat "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -996,6 +1002,9 @@ exports[`generator - neo4j microservice-jwt-reactive(true)-gradle-enableTranslat "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1325,6 +1334,9 @@ exports[`generator - neo4j microservice-oauth2-reactive(true)-gradle-enableTrans "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1726,6 +1738,9 @@ exports[`generator - neo4j monolith-jwt-reactive(false)-maven-enableTranslation( "src/main/resources/config/neo4j/migrations/user__user.json": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2130,6 +2145,9 @@ exports[`generator - neo4j monolith-jwt-reactive(true)-gradle-enableTranslation( "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2462,6 +2480,9 @@ exports[`generator - neo4j monolith-oauth2-reactive(false)-maven-enableTranslati "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2815,6 +2836,9 @@ exports[`generator - neo4j monolith-oauth2-reactive(true)-gradle-enableTranslati "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3216,6 +3240,9 @@ exports[`generator - neo4j monolith-session-reactive(false)-maven-enableTranslat "src/main/resources/config/neo4j/migrations/user__user.json": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3587,6 +3614,9 @@ exports[`generator - neo4j monolith-session-reactive(true)-gradle-enableTranslat "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, diff --git a/generators/spring-data-relational/__snapshots__/generator.spec.ts.snap b/generators/spring-data-relational/__snapshots__/generator.spec.ts.snap index a7927b0bce05..19111e643025 100644 --- a/generators/spring-data-relational/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-relational/__snapshots__/generator.spec.ts.snap @@ -272,6 +272,9 @@ exports[`generator - sql gateway-jwt-mysql-gradle-enableTranslation(true)-com.my "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -703,6 +706,9 @@ exports[`generator - sql gateway-jwt-oracle-gradle-enableTranslation(true)-com.m "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1122,6 +1128,9 @@ exports[`generator - sql gateway-jwt-postgresql-gradle-enableTranslation(true)-c "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1508,6 +1517,9 @@ exports[`generator - sql gateway-oauth2-mariadb-gradle-enableTranslation(true)-c "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -1867,6 +1879,9 @@ exports[`generator - sql gateway-oauth2-mssql-gradle-enableTranslation(true)-com "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2148,6 +2163,9 @@ exports[`generator - sql microservice-jwt-mariadb-reactive(true)-gradle-enableTr "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2411,6 +2429,9 @@ exports[`generator - sql microservice-jwt-mssql-reactive(true)-gradle-enableTran "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2653,6 +2674,9 @@ exports[`generator - sql microservice-jwt-mysql-reactive(false)-maven-enableTran "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -2931,6 +2955,9 @@ exports[`generator - sql microservice-jwt-mysql-reactive(true)-gradle-enableTran "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3170,6 +3197,9 @@ exports[`generator - sql microservice-jwt-oracle-reactive(false)-maven-enableTra "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3439,6 +3469,9 @@ exports[`generator - sql microservice-jwt-oracle-reactive(true)-gradle-enableTra "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3666,6 +3699,9 @@ exports[`generator - sql microservice-jwt-postgresql-reactive(false)-maven-enabl "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -3944,6 +3980,9 @@ exports[`generator - sql microservice-jwt-postgresql-reactive(true)-gradle-enabl "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -4180,6 +4219,9 @@ exports[`generator - sql microservice-oauth2-mariadb-reactive(false)-maven-enabl "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -4446,6 +4488,9 @@ exports[`generator - sql microservice-oauth2-mariadb-reactive(true)-gradle-enabl "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -4667,6 +4712,9 @@ exports[`generator - sql microservice-oauth2-mssql-reactive(false)-maven-enableT "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -4927,6 +4975,9 @@ exports[`generator - sql microservice-oauth2-mssql-reactive(true)-gradle-enableT "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -5178,6 +5229,9 @@ exports[`generator - sql microservice-oauth2-mysql-reactive(true)-gradle-enableT "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -5429,6 +5483,9 @@ exports[`generator - sql microservice-oauth2-oracle-reactive(true)-gradle-enable "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -5671,6 +5728,9 @@ exports[`generator - sql microservice-oauth2-postgresql-reactive(true)-gradle-en "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -5991,6 +6051,9 @@ exports[`generator - sql monolith-jwt-mariadb-reactive(false)-maven-enableTransl "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -6347,6 +6410,9 @@ exports[`generator - sql monolith-jwt-mariadb-reactive(true)-gradle-enableTransl "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -6697,6 +6763,9 @@ exports[`generator - sql monolith-jwt-mssql-reactive(false)-maven-enableTranslat "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -7053,6 +7122,9 @@ exports[`generator - sql monolith-jwt-mssql-reactive(true)-gradle-enableTranslat "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -7400,6 +7472,9 @@ exports[`generator - sql monolith-jwt-mysql-reactive(false)-maven-enableTranslat "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -7750,6 +7825,9 @@ exports[`generator - sql monolith-jwt-mysql-reactive(true)-gradle-enableTranslat "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -8088,6 +8166,9 @@ exports[`generator - sql monolith-jwt-oracle-reactive(false)-maven-enableTransla "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -8441,6 +8522,9 @@ exports[`generator - sql monolith-jwt-oracle-reactive(true)-gradle-enableTransla "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -8788,6 +8872,9 @@ exports[`generator - sql monolith-jwt-postgresql-reactive(false)-maven-enableTra "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -9144,6 +9231,9 @@ exports[`generator - sql monolith-jwt-postgresql-reactive(true)-gradle-enableTra "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -9410,6 +9500,9 @@ exports[`generator - sql monolith-oauth2-mariadb-reactive(false)-maven-enableTra "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -9706,6 +9799,9 @@ exports[`generator - sql monolith-oauth2-mariadb-reactive(true)-gradle-enableTra "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -9957,6 +10053,9 @@ exports[`generator - sql monolith-oauth2-mssql-reactive(false)-maven-enableTrans "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -10259,6 +10358,9 @@ exports[`generator - sql monolith-oauth2-mssql-reactive(true)-gradle-enableTrans "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -10522,6 +10624,9 @@ exports[`generator - sql monolith-oauth2-mysql-reactive(false)-maven-enableTrans "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -10824,6 +10929,9 @@ exports[`generator - sql monolith-oauth2-mysql-reactive(true)-gradle-enableTrans "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -11084,6 +11192,9 @@ exports[`generator - sql monolith-oauth2-oracle-reactive(false)-maven-enableTran "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -11377,6 +11488,9 @@ exports[`generator - sql monolith-oauth2-oracle-reactive(true)-gradle-enableTran "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -11625,6 +11739,9 @@ exports[`generator - sql monolith-oauth2-postgresql-reactive(false)-maven-enable "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -11927,6 +12044,9 @@ exports[`generator - sql monolith-oauth2-postgresql-reactive(true)-gradle-enable "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -12256,6 +12376,9 @@ exports[`generator - sql monolith-session-mariadb-reactive(false)-maven-enableTr "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -12576,6 +12699,9 @@ exports[`generator - sql monolith-session-mariadb-reactive(true)-gradle-enableTr "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -12893,6 +13019,9 @@ exports[`generator - sql monolith-session-mssql-reactive(false)-maven-enableTran "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -13213,6 +13342,9 @@ exports[`generator - sql monolith-session-mssql-reactive(true)-gradle-enableTran "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -13530,6 +13662,9 @@ exports[`generator - sql monolith-session-mysql-reactive(false)-maven-enableTran "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -13850,6 +13985,9 @@ exports[`generator - sql monolith-session-mysql-reactive(true)-gradle-enableTran "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -14167,6 +14305,9 @@ exports[`generator - sql monolith-session-oracle-reactive(false)-maven-enableTra "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -14484,6 +14625,9 @@ exports[`generator - sql monolith-session-oracle-reactive(true)-gradle-enableTra "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -14798,6 +14942,9 @@ exports[`generator - sql monolith-session-postgresql-reactive(false)-maven-enabl "src/main/resources/config/application.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", }, @@ -15118,6 +15265,9 @@ exports[`generator - sql monolith-session-postgresql-reactive(true)-gradle-enabl "src/main/resources/config/bootstrap.yml": { "stateCleared": "modified", }, + "src/main/resources/config/tls/keystore.p12": { + "stateCleared": "modified", + }, "src/main/resources/i18n/messages.properties": { "stateCleared": "modified", },