From 5528d857bbd713e7908cada918eeef77fde65a97 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sat, 14 Sep 2024 18:34:32 +0200 Subject: [PATCH 01/26] more lint --- generators/spring-boot/command.ts | 20 +++++++++++--------- generators/spring-boot/generator.ts | 26 +++++++++++++++----------- generators/spring-boot/prompts.ts | 2 +- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/generators/spring-boot/command.ts b/generators/spring-boot/command.ts index a1ec5c371531..f3cbca6171ca 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', }, @@ -115,9 +117,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; @@ -198,7 +200,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 4ca2e71fce28..8b38d0544928 100644 --- a/generators/spring-boot/generator.ts +++ b/generators/spring-boot/generator.ts @@ -443,14 +443,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'), + }); }, }); } @@ -500,9 +499,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 59415cbc86d3..16d77e101fdd 100644 --- a/generators/spring-boot/prompts.ts +++ b/generators/spring-boot/prompts.ts @@ -94,7 +94,7 @@ export async function askForServerSideOpts(this: CoreGenerator, { control }) { }); } opts.push({ - value: 'couchbase', + value: COUCHBASE, name: '[BETA] Couchbase', }); opts.push({ From bded3404f938e130e63bb79270d4f7ca2d6817a2 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sat, 14 Sep 2024 20:04:40 +0200 Subject: [PATCH 02/26] 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 f3cbca6171ca..6a9531f60abd 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', }, @@ -117,9 +115,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; @@ -163,14 +161,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; } @@ -200,7 +198,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 1465a08e82b8fde5c0e751103691772493dbaf17 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sat, 14 Sep 2024 22:59:10 +0200 Subject: [PATCH 03/26] keytool fix --- .../angular/support/translate-angular.ts | 14 +- generators/base/types.d.ts | 5 + .../__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 ------------------ 12 files changed, 17 insertions(+), 333 deletions(-) diff --git a/generators/angular/support/translate-angular.ts b/generators/angular/support/translate-angular.ts index a24a67d2139c..33f6bf226326 100644 --- a/generators/angular/support/translate-angular.ts +++ b/generators/angular/support/translate-angular.ts @@ -42,12 +42,9 @@ 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( @@ -305,7 +302,7 @@ export const createTranslationReplacer = (getWebappTranslation: GetWebappTransla { 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'), ''); @@ -318,7 +315,7 @@ export const createTranslationReplacer = (getWebappTranslation: GetWebappTransla 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)) { @@ -335,7 +332,10 @@ export const createTranslationReplacer = (getWebappTranslation: GetWebappTransla 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 450fa3b2e971..54b7ce637398 100644 --- a/generators/base/types.d.ts +++ b/generators/base/types.d.ts @@ -29,6 +29,11 @@ export type Control = BaseApplicationControlProperties & { * @example * cleanupFiles('4.0.0', { '6.0.0': ['file1', 'file2', [application.shouldRemove, 'file3']] }) */ +<<<<<<< HEAD cleanupFiles: (cleanup: CleanupArgumentType) => Promise | ((oldVersion: string, cleanup: CleanupArgumentType) => Promise); getWebappTranslation?: GetWebappTranslationCallback; +======= + cleanupFiles: (cleanup: Record) => Promise; + getWebappTranslation: (s: string, data?: Record) => string; +>>>>>>> 720ca52adc (keytool fix) }; 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 8b38d0544928..a81082477fd8 100644 --- a/generators/spring-boot/generator.ts +++ b/generators/spring-boot/generator.ts @@ -51,6 +51,7 @@ import { APPLICATION_TYPE_MICROSERVICE, applicationTypes, cacheTypes, + clientFrameworkTypes, databaseTypes, fieldTypes, messageBrokerTypes, @@ -71,12 +72,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(); @@ -207,7 +207,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'); } @@ -227,7 +227,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.'); @@ -473,7 +473,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 b644c152aa9b..7c20f28a1ba2 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", }, @@ -739,9 +736,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", }, @@ -1134,9 +1128,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", }, @@ -1520,9 +1511,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", }, @@ -1975,9 +1963,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", }, @@ -2436,9 +2421,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", }, @@ -2852,9 +2834,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", }, @@ -3280,9 +3259,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", }, @@ -3756,9 +3732,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", }, @@ -4202,9 +4175,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 3fb9c12599a0fce4988f7326cd8e6ade3ad36146 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sat, 14 Sep 2024 23:04:08 +0200 Subject: [PATCH 04/26] 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 6a9531f60abd..e53d06fb43ce 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', @@ -109,8 +109,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 7ec7367d6b56eab81c9e8aac2aa3ff8377707960 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sun, 15 Sep 2024 18:28:58 +0200 Subject: [PATCH 05/26] remove some unused generator-angular methods --- generators/angular/generator.ts | 131 ++---------------- generators/angular/types.d.ts | 4 +- generators/client/support/template-utils.ts | 26 ++-- .../needle-client-angular-generator.spec.ts | 21 --- test/needle-api/needle-client-angular.spec.ts | 111 --------------- 5 files changed, 26 insertions(+), 267 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 a4c6351058c5..64e3d277a9d1 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'; @@ -27,7 +26,6 @@ import { clientFrameworkTypes } from '../../lib/jhipster/index.js'; import { generateEntityClientEnumImports as getClientEnumImportsFormat } 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'; @@ -93,8 +91,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'>) => @@ -199,7 +204,6 @@ export default class AngularGenerator extends BaseApplicationGenerator { returnValue = fieldDefaultValue; } } - return returnValue; }, } as any); @@ -317,123 +321,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 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 25d3ee8c77d0..a5625c1908d2 100644 --- a/generators/client/support/template-utils.ts +++ b/generators/client/support/template-utils.ts @@ -77,20 +77,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 dcf3013ff9381384e2a3bef37decb454999bf7fe Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sat, 28 Sep 2024 22:34:09 +0200 Subject: [PATCH 06/26] align method signature --- generators/angular/support/translate-angular.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/angular/support/translate-angular.ts b/generators/angular/support/translate-angular.ts index 33f6bf226326..94f08b68535e 100644 --- a/generators/angular/support/translate-angular.ts +++ b/generators/angular/support/translate-angular.ts @@ -333,7 +333,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); From 73e93be78b7e90e0c811f33bd18dc3e3b337be5a Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Fri, 11 Oct 2024 13:52:48 +0200 Subject: [PATCH 07/26] 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 64e3d277a9d1..6412ada28bd5 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'; @@ -26,6 +26,7 @@ import { clientFrameworkTypes } from '../../lib/jhipster/index.js'; import { generateEntityClientEnumImports as getClientEnumImportsFormat } 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'; @@ -39,10 +40,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 482f6eb1c1a9..a26be12459e6 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/26] make a method optional for blueprint --- generators/base/types.d.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/generators/base/types.d.ts b/generators/base/types.d.ts index 54b7ce637398..0d994ea9acde 100644 --- a/generators/base/types.d.ts +++ b/generators/base/types.d.ts @@ -29,11 +29,7 @@ export type Control = BaseApplicationControlProperties & { * @example * cleanupFiles('4.0.0', { '6.0.0': ['file1', 'file2', [application.shouldRemove, 'file3']] }) */ -<<<<<<< HEAD cleanupFiles: (cleanup: CleanupArgumentType) => Promise | ((oldVersion: string, cleanup: CleanupArgumentType) => Promise); getWebappTranslation?: GetWebappTranslationCallback; -======= - cleanupFiles: (cleanup: Record) => Promise; - getWebappTranslation: (s: string, data?: Record) => string; ->>>>>>> 720ca52adc (keytool fix) + // getWebappTranslation: (s: string, data?: Record) => string; }; From ca3abb73f4dd8f815296b2b2ebbdd9affa791d82 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Fri, 11 Oct 2024 14:19:21 +0200 Subject: [PATCH 09/26] 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 6412ada28bd5..4f5fa3ad5af9 100644 --- a/generators/angular/generator.ts +++ b/generators/angular/generator.ts @@ -235,7 +235,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 a81082477fd8..89b4c5cd2fa8 100644 --- a/generators/spring-boot/generator.ts +++ b/generators/spring-boot/generator.ts @@ -77,6 +77,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(); @@ -473,7 +475,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 7495bf2dec9a1c0b5fb82ed72c793948ea886939 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Fri, 11 Oct 2024 15:01:13 +0200 Subject: [PATCH 10/26] 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 7c20f28a1ba2..b644c152aa9b 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", }, @@ -736,6 +739,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", }, @@ -1128,6 +1134,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", }, @@ -1511,6 +1520,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", }, @@ -1963,6 +1975,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", }, @@ -2421,6 +2436,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", }, @@ -2834,6 +2852,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", }, @@ -3259,6 +3280,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", }, @@ -3732,6 +3756,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", }, @@ -4175,6 +4202,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", }, From 515e5141d8e41f1ec090e671396a388323e42675 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Wed, 30 Oct 2024 21:29:37 +0100 Subject: [PATCH 11/26] generator-specific entity --- generators/angular/generator.ts | 63 +++++++++---------- .../_entityFolder_/_entityFile_.model.ts.ejs | 2 +- .../_entityFile_.test-samples.ts.ejs | 2 +- .../list/_entityFile_.component.spec.ts.ejs | 4 ++ .../service/_entityFile_.service.spec.ts.ejs | 16 ++++- .../_entityFile_-update.component.html.ejs | 4 ++ .../_entityFile_-update.component.spec.ts.ejs | 35 +++++++++++ .../_entityFile_-update.component.ts.ejs | 2 +- .../app/entities/entity-navbar-items.ts.ejs | 2 +- generators/angular/types.d.ts | 53 +++++++++++++++- lib/types/application/entity.d.ts | 5 -- 11 files changed, 145 insertions(+), 43 deletions(-) diff --git a/generators/angular/generator.ts b/generators/angular/generator.ts index 4f5fa3ad5af9..6706bd5e59e5 100644 --- a/generators/angular/generator.ts +++ b/generators/angular/generator.ts @@ -18,7 +18,6 @@ */ 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'; @@ -40,17 +39,15 @@ import { isTranslatedAngularFile, translateAngularFilesTransform, } from './support/index.js'; -import type { AngularApplication } from './types.js'; +import type { AngularApplication, AngularEntity } from './types.js'; const { ANGULAR } = clientFrameworkTypes; export default class AngularGenerator extends BaseApplicationGenerator< - Entity, + AngularEntity, AngularApplication, - DefaultTaskTypes + DefaultTaskTypes > { - localEntities?: any[]; - async beforeQueue() { if (!this.fromBlueprint) { await this.composeWithBlueprints(); @@ -85,6 +82,12 @@ export default class AngularGenerator extends BaseApplicationGenerator< get preparing() { return this.asPreparingTaskGroup({ + prepareApplication({ application }) { + // @ts-ignore + application.getTypescriptKeyType = primaryKey => { + return getTSKeyType(primaryKey); + }; + }, applicationDefauts({ application, applicationDefaults }) { applicationDefaults({ __override__: true, @@ -92,7 +95,6 @@ export default class AngularGenerator extends BaseApplicationGenerator< webappEnumerationsDir: app => `${app.clientSrcDir}app/entities/enumerations/`, angularLocaleId: app => app.nativeLanguageDefinition.angularLocale ?? defaultLanguage.angularLocale!, }); - application.addPrettierExtensions?.(['html', 'css', 'scss']); }, addNeedles({ source, application }) { @@ -107,7 +109,6 @@ export default class AngularGenerator extends BaseApplicationGenerator< const editCallback = addToEntitiesMenu(param); this.editFile(filePath, { ignoreNonExisting }, editCallback); }; - source.addAdminRoute = (args: Omit[0], 'needle'>) => this.editFile( `${application.srcMainWebapp}app/admin/admin.routes.ts`, @@ -178,6 +179,26 @@ export default class AngularGenerator extends BaseApplicationGenerator< ...(entity.entityReadAuthority?.split(',') ?? []), ]), }); + + entity.generateEntityClientEnumImports = fields => { + return getClientEnumImportsFormat(fields, ANGULAR); + }; + + entity.generateTestEntityPrimaryKey = (primaryKey, index) => { + return getTestEntityPrimaryKey(primaryKey, index); + }; + + entity.generateTypescriptTestEntity = (references, additionalFields) => { + return generateTestEntity(references, additionalFields); + }; + + entity.buildAngularFormPath = (reference, prefix = []) => { + return angularFormPath(reference, prefix); + }; + + entity.generateTestEntityId = (primaryKey, index = 0, wrapped = true) => { + return getTestEntityId(primaryKey, index, wrapped); + }; }, }); } @@ -223,9 +244,9 @@ export default class AngularGenerator extends BaseApplicationGenerator< get default() { return this.asDefaultTaskGroup({ - loadEntities() { + loadEntities({ application }) { const entities = this.sharedData.getEntities().map(({ entity }) => entity); - this.localEntities = entities.filter(entity => !entity.builtIn && !entity.skipClient); + application.frontendEntities = entities.filter(entity => !entity.builtIn && !entity.skipClient); }, queueTranslateTransform({ control, application }) { const { enableTranslation, jhiPrefix } = application; @@ -327,26 +348,4 @@ export default class AngularGenerator extends BaseApplicationGenerator< get [BaseApplicationGenerator.END]() { return this.delegateTasksToBlueprint(() => this.end); } - /** - * 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 - * @returns {typeImports:Map} the fields that potentially contains some enum types - */ - generateEntityClientEnumImports(fields) { - return getClientEnumImportsFormat(fields, ANGULAR); - } - - /** - * @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/templates/src/main/webapp/app/entities/_entityFolder_/_entityFile_.model.ts.ejs b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/_entityFile_.model.ts.ejs index 7e70b178d928..a7d61dba6b5d 100644 --- a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/_entityFile_.model.ts.ejs +++ b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/_entityFile_.model.ts.ejs @@ -17,7 +17,7 @@ limitations under the License. -%> <% -const enumImports = this.generateEntityClientEnumImports(fields); +const enumImports = generateEntityClientEnumImports(fields); %> <%_ if (anyFieldIsDateDerived) { _%> import dayjs from 'dayjs/esm'; diff --git a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/_entityFile_.test-samples.ts.ejs b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/_entityFile_.test-samples.ts.ejs index e01295a18213..c918e19e4e2b 100644 --- a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/_entityFile_.test-samples.ts.ejs +++ b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/_entityFile_.test-samples.ts.ejs @@ -17,7 +17,7 @@ limitations under the License. -%> <%_ - const enumImports = this.generateEntityClientEnumImports(fields); + const enumImports = generateEntityClientEnumImports(fields); _%> <%_ if (anyFieldIsDateDerived) { _%> import dayjs from 'dayjs/esm'; diff --git a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/list/_entityFile_.component.spec.ts.ejs b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/list/_entityFile_.component.spec.ts.ejs index 993881549954..3664f3b6b482 100644 --- a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/list/_entityFile_.component.spec.ts.ejs +++ b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/list/_entityFile_.component.spec.ts.ejs @@ -136,7 +136,11 @@ describe('<%= entityAngularName %> Management Component', () => { describe('track<%= primaryKey.nameCapitalized %>', () => { it('Should forward to <%= entityInstance %>Service', () => { +<<<<<<< HEAD const entity = <%- tsPrimaryKeySamples[0] %>; +======= + const entity = <%- generateTestEntityPrimaryKey(primaryKey, 0) %>; +>>>>>>> 6a2ff33b25 (generator-specific entity) jest.spyOn(service, 'get<%= entityAngularName %>Identifier'); const <%= primaryKey.name %> = comp.track<%= primaryKey.nameCapitalized %>(entity); expect(service.get<%= entityAngularName %>Identifier).toHaveBeenCalledWith(entity); diff --git a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/service/_entityFile_.service.spec.ts.ejs b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/service/_entityFile_.service.spec.ts.ejs index 2674a2b7c35c..b55b1ac8359a 100644 --- a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/service/_entityFile_.service.spec.ts.ejs +++ b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/service/_entityFile_.service.spec.ts.ejs @@ -18,7 +18,7 @@ -%> <%_ const tsKeyId = primaryKey.tsSampleValues[0]; -const enumImports = this.generateEntityClientEnumImports(fields); +const enumImports = generateEntityClientEnumImports(fields); _%> import { TestBed } from '@angular/core/testing'; import { provideHttpClientTesting, HttpTestingController } from '@angular/common/http/testing'; @@ -219,7 +219,11 @@ describe('<%= entityAngularName %> Service', () => { }); it('Should return false if one entity is null', () => { +<<<<<<< HEAD const entity1 = <%- tsPrimaryKeySamples[0] %>; +======= + const entity1 = <%- generateTestEntityPrimaryKey(primaryKey, 0) %>; +>>>>>>> 6a2ff33b25 (generator-specific entity) const entity2 = null; const compareResult1 = service.compare<%= entityAngularName %>(entity1, entity2); @@ -230,8 +234,13 @@ describe('<%= entityAngularName %> Service', () => { }); it('Should return false if primaryKey differs', () => { +<<<<<<< HEAD const entity1 = <%- tsPrimaryKeySamples[0] %>; const entity2 = <%- tsPrimaryKeySamples[1] %>; +======= + const entity1 = <%- generateTestEntityPrimaryKey(primaryKey, 0) %>; + const entity2 = <%- generateTestEntityPrimaryKey(primaryKey, 1) %>; +>>>>>>> 6a2ff33b25 (generator-specific entity) const compareResult1 = service.compare<%= entityAngularName %>(entity1, entity2); const compareResult2 = service.compare<%= entityAngularName %>(entity2, entity1); @@ -241,8 +250,13 @@ describe('<%= entityAngularName %> Service', () => { }); it('Should return false if primaryKey matches', () => { +<<<<<<< HEAD const entity1 = <%- tsPrimaryKeySamples[0] %>; const entity2 = <%- tsPrimaryKeySamples[0] %>; +======= + const entity1 = <%- generateTestEntityPrimaryKey(primaryKey, 0) %>; + const entity2 = <%- generateTestEntityPrimaryKey(primaryKey, 0) %>; +>>>>>>> 6a2ff33b25 (generator-specific entity) const compareResult1 = service.compare<%= entityAngularName %>(entity1, entity2); const compareResult2 = service.compare<%= entityAngularName %>(entity2, entity1); diff --git a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.html.ejs b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.html.ejs index 71e772cf744e..0f643e8b9c44 100644 --- a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.html.ejs +++ b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.html.ejs @@ -175,7 +175,11 @@ _%> } <%_ } else { _%> +<<<<<<< HEAD @if (editForm.get(['<%- relationship.propertyName %>'])!.value == null) { +======= + @if (editForm.get([<%- buildAngularFormPath(relationship.reference) %>])!.value == null) { +>>>>>>> 6a2ff33b25 (generator-specific entity) } <%_ } _%> diff --git a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.spec.ts.ejs b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.spec.ts.ejs index 188148b876db..d2716a865679 100644 --- a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.spec.ts.ejs +++ b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.spec.ts.ejs @@ -17,13 +17,22 @@ limitations under the License. -%> <%_ +<<<<<<< HEAD const tsKeyId = primaryKey.tsSampleValues[0]; +======= +const tsKeyId = generateTestEntityId(primaryKey.type); +>>>>>>> 6a2ff33b25 (generator-specific entity) const allRelationshipsByEntityNeedingOptions = Object .values(relationshipsByOtherEntity) .map(relationships => relationships.filter(rel => rel.persistableRelationship && !rel.otherEntity.embedded)) .filter(relationships => relationships.length > 0); +<<<<<<< HEAD const testEntityPrimaryKey0 = tsPrimaryKeySamples[0]; const testEntityPrimaryKey1 = tsPrimaryKeySamples[1]; +======= +const testEntityPrimaryKey0 = generateTestEntityPrimaryKey(primaryKey, 0); +const testEntityPrimaryKey1 = generateTestEntityPrimaryKey(primaryKey, 1); +>>>>>>> 6a2ff33b25 (generator-specific entity) _%> import { ComponentFixture, TestBed } from '@angular/core/testing'; import { provideHttpClient, HttpResponse } from '@angular/common/http'; @@ -95,14 +104,24 @@ describe('<%= entityAngularName %> Management Update Component', () => { <%_ for (const relationship of relationshipsWithCustomSharedOptions) { _%> <%_ const reference = relationship.reference _%> <%_ if (relationship.collection) { _%> +<<<<<<< HEAD const <%= reference.name %> : I<%= otherEntity.entityAngularName %>[] = [<%- otherEntity.tsPrimaryKeySamples[0] %>]; <%_ } else { _%> const <%= reference.name %> : I<%= otherEntity.entityAngularName %> = <%- otherEntity.tsPrimaryKeySamples[0] %>; +======= + const <%= reference.name %> : I<%= otherEntity.entityAngularName %>[] = [<%- generateTestEntityPrimaryKey(otherEntity.primaryKey) %>]; + <%_ } else { _%> + const <%= reference.name %> : I<%= otherEntity.entityAngularName %> = <%- generateTestEntityPrimaryKey(otherEntity.primaryKey) %>; +>>>>>>> 6a2ff33b25 (generator-specific entity) <%_ } _%> <%= entityInstance %>.<%= reference.name %> = <%= reference.name %>; <%_ } _%> +<<<<<<< HEAD const <%= otherEntity.entityInstance %>Collection: I<%= otherEntity.entityAngularName %>[] = [<%- otherEntity.tsPrimaryKeySamples[0] %>]; +======= + const <%= otherEntity.entityInstance %>Collection: I<%= otherEntity.entityAngularName %>[] = [<%- generateTestEntityPrimaryKey(otherEntity.primaryKey) %>]; +>>>>>>> 6a2ff33b25 (generator-specific entity) jest.spyOn(<%= otherEntity.entityInstance %>Service, 'query').mockReturnValue(of(new HttpResponse({ body: <%= otherEntity.entityInstance %>Collection }))); const additional<%= otherEntity.entityAngularNamePlural %> = [ <%_ for (const relationship of relationshipsWithCustomSharedOptions) { _%> @@ -130,10 +149,17 @@ describe('<%= entityAngularName %> Management Update Component', () => { <%_ const reference = relationship.reference _%> it('Should call <%= reference.name %> query and add missing value', () => { const <%= entityInstance %> : I<%= entityAngularName %> = <%- testEntityPrimaryKey1 %>; +<<<<<<< HEAD const <%= reference.name %> : I<%= otherEntity.entityAngularName %> = <%- otherEntity.tsPrimaryKeySamples[0] %>; <%= entityInstance %>.<%= reference.name %> = <%= reference.name %>; const <%= reference.name %>Collection: I<%= otherEntity.entityAngularName %>[] = [<%- otherEntity.tsPrimaryKeySamples[0] %>]; +======= + const <%= reference.name %> : I<%= otherEntity.entityAngularName %> = <%- generateTestEntityPrimaryKey(otherEntity.primaryKey) %>; + <%= entityInstance %>.<%= reference.name %> = <%= reference.name %>; + + const <%= reference.name %>Collection: I<%= otherEntity.entityAngularName %>[] = [<%- generateTestEntityPrimaryKey(otherEntity.primaryKey) %>]; +>>>>>>> 6a2ff33b25 (generator-specific entity) jest.spyOn(<%= otherEntity.entityInstance %>Service, 'query').mockReturnValue(of(new HttpResponse({ body: <%= reference.name %>Collection }))); const expectedCollection: I<%= otherEntity.entityAngularName %>[] = [<%= reference.name %>, ...<%= reference.name %>Collection]; jest.spyOn(<%= otherEntity.entityInstance %>Service, 'add<%= otherEntity.entityAngularName %>ToCollectionIfMissing').mockReturnValue(expectedCollection); @@ -153,7 +179,11 @@ describe('<%= entityAngularName %> Management Update Component', () => { <%_ for (const relationshipsByEntityNeedingOptions of allRelationshipsByEntityNeedingOptions) { _%> <%_ for (const relationship of relationshipsByEntityNeedingOptions) { _%> <%_ const otherEntity = relationship.otherEntity _%> +<<<<<<< HEAD const <%= relationship.relationshipName %>: I<%= otherEntity.entityAngularName %> = <%- otherEntity.tsPrimaryKeySamples[0] %>; +======= + const <%= relationship.relationshipName %>: I<%= otherEntity.entityAngularName %> = <%- generateTestEntityPrimaryKey(otherEntity.primaryKey) %>; +>>>>>>> 6a2ff33b25 (generator-specific entity) <%= entityInstance %>.<%= relationship.reference.name %> = <%= relationship.collection ? `[${relationship.relationshipName}]` : relationship.relationshipName %>; <%_ } _%> <%_ } _%> @@ -254,8 +284,13 @@ _%> _%> describe('compare<%= otherEntity.entityAngularName %>', () => { it('Should forward to <%= otherEntity.entityInstance %>Service', () => { +<<<<<<< HEAD const entity = <%- otherEntity.tsPrimaryKeySamples[0] %>; const entity2 = <%- otherEntity.tsPrimaryKeySamples[1] %>; +======= + const entity = <%- generateTestEntityPrimaryKey(otherEntity.primaryKey, 0) %>; + const entity2 = <%- generateTestEntityPrimaryKey(otherEntity.primaryKey, 1) %>; +>>>>>>> 6a2ff33b25 (generator-specific entity) jest.spyOn(<%= otherEntity.entityInstance %>Service, 'compare<%= otherEntity.entityAngularName %>'); comp.compare<%= otherEntity.entityAngularName %>(entity, entity2); expect(<%= otherEntity.entityInstance %>Service.compare<%= otherEntity.entityAngularName %>).toHaveBeenCalledWith(entity, entity2); diff --git a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.ts.ejs b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.ts.ejs index 3c217954d618..42969d9bd4d9 100644 --- a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.ts.ejs +++ b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.ts.ejs @@ -49,7 +49,7 @@ import { <%= uniqueRel.otherEntityAngularName %>Service } from 'app/entities/<%= } } _%> -<%_ const enumImports = this.generateEntityClientEnumImports(fields); _%> +<%_ const enumImports = generateEntityClientEnumImports(fields); _%> <%_ enumImports.forEach( (importedPath, importedType) => { _%> import { <%- importedType %> } from '<%- importedPath %>'; <%_ }); _%> diff --git a/generators/angular/templates/src/main/webapp/app/entities/entity-navbar-items.ts.ejs b/generators/angular/templates/src/main/webapp/app/entities/entity-navbar-items.ts.ejs index 6ec007d1a2f8..79ea8475b812 100644 --- a/generators/angular/templates/src/main/webapp/app/entities/entity-navbar-items.ts.ejs +++ b/generators/angular/templates/src/main/webapp/app/entities/entity-navbar-items.ts.ejs @@ -19,7 +19,7 @@ import NavbarItem from 'app/layouts/navbar/navbar-item.model'; export const EntityNavbarItems: NavbarItem[] = [ -<%_ for (const entity of this.localEntities) { _%> +<%_ for (const entity of frontendEntities) { _%> { name: '<%= entity.entityAngularName %>', route: '/<%= entity.entityPage %>', diff --git a/generators/angular/types.d.ts b/generators/angular/types.d.ts index b88b53057932..8a3632f76433 100644 --- a/generators/angular/types.d.ts +++ b/generators/angular/types.d.ts @@ -1,6 +1,57 @@ import type { Entity } from '../../lib/types/application/entity.js'; import type { ApplicationType } from '../../lib/types/application/application.js'; +export interface AngularEntity extends Entity { + /** + * generates a value for a primary key type + * @param primaryKey the primary key attribute (or its type) of the entity + * @param index an index to add salt to the value + * @param wrapped if the value should be within quotes + * @returns {string|number|string} + */ + generateTestEntityId: (primaryKey: any, index?: number, wrapped?: boolean) => any; + /** + * @private + * Create a angular form path getter method of reference. + * + * @param {object} reference + * @param {string[]} prefix + * @return {string} + */ + buildAngularFormPath: (reference: any, prefix?: never[]) => string; + /** + * @private + * Generate a test entity instance with faked values. + * + * @param {any} references - references to other entities. + * @param {any} additionalFields - additional fields to add to the entity or with default values that overrides generated values. + */ + generateTypescriptTestEntity: (references: any, additionalFields: any) => string; + /** + * @private + * Generate a test entity, for the PK references (when the PK is a composite, derived key) + * + * @param {any} primaryKey - primary key definition. + * @param {number} [index] - index of the primary key sample, pass undefined for a random key. + */ + generateTestEntityPrimaryKey: (primaryKey: any, index: any) => string; + /** + * 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 + * @returns {typeImports:Map} the fields that potentially contains some enum types + */ + generateEntityClientEnumImports: (fields: any) => Map; + entityAngularAuthorities?: string; + entityAngularReadAuthorities?: string; +} + export type AngularApplication = { angularLocaleId: string; -} & ApplicationType; + frontendEntities: any[]; + /** + * Get the typescript type of a non-composite primary key + * @param primaryKey the primary key of the entity + * @returns {string} the typescript type. + */ + getTypescriptKeyType: (primaryKey: any) => 'string' | 'number'; +} & ApplicationType; diff --git a/lib/types/application/entity.d.ts b/lib/types/application/entity.d.ts index fab73dbe47bb..9fb65b617836 100644 --- a/lib/types/application/entity.d.ts +++ b/lib/types/application/entity.d.ts @@ -27,11 +27,6 @@ import type { FakerWithRandexp } from '../../../generators/base/support/faker.ts import type { Field } from './field.js'; import type { Relationship } from './relationship.js'; -type AngularEntity = { - entityAngularAuthorities?: string; - entityAngularReadAuthorities?: string; -}; - export type PrimaryKey = { name: string; fields: F[]; From e647b9c15aee3612768a705dc6d9ff42ce9d0ec7 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sat, 2 Nov 2024 13:22:03 +0100 Subject: [PATCH 12/26] ensure retrocompatibility --- generators/angular/types-deprecated.d.ts | 24 ++++++++++++++++++++++++ generators/angular/types.d.ts | 18 ++++++++++++++++++ generators/client/types.d.ts | 8 +++++++- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 generators/angular/types-deprecated.d.ts diff --git a/generators/angular/types-deprecated.d.ts b/generators/angular/types-deprecated.d.ts new file mode 100644 index 000000000000..8b87e0995352 --- /dev/null +++ b/generators/angular/types-deprecated.d.ts @@ -0,0 +1,24 @@ +/** + * Copyright 2013-2024 the original author or authors from the JHipster project. + * + * This file is part of the JHipster project, see https://www.jhipster.tech/ + * for more information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * Will be deprecated and merged into AngularApplication + */ +export type PartialAngularApplication = { + angularLocaleId: string; +}; diff --git a/generators/angular/types.d.ts b/generators/angular/types.d.ts index 8a3632f76433..16072576f5b1 100644 --- a/generators/angular/types.d.ts +++ b/generators/angular/types.d.ts @@ -1,3 +1,21 @@ +/** + * Copyright 2013-2024 the original author or authors from the JHipster project. + * + * This file is part of the JHipster project, see https://www.jhipster.tech/ + * for more information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import type { Entity } from '../../lib/types/application/entity.js'; import type { ApplicationType } from '../../lib/types/application/application.js'; diff --git a/generators/client/types.d.ts b/generators/client/types.d.ts index a26be12459e6..a5c0cc65cd02 100644 --- a/generators/client/types.d.ts +++ b/generators/client/types.d.ts @@ -3,11 +3,12 @@ import type { ExportApplicationPropertiesFromCommand } from '../../lib/command/i import type { CypressApplication } from '../cypress/types.js'; import type { JavaScriptApplication, JavaScriptSourceType } from '../javascript/types.js'; import type { PostWritingEntitiesTaskParam } from '../../lib/types/application/tasks.js'; +import type { PartialAngularApplication } from '../angular/types-deprecated.js'; import type Command from './command.ts'; type ApplicationClientProperties = ExportApplicationPropertiesFromCommand; -export type ClientApplication = ApplicationClientProperties & +export type FrontendApplication = ApplicationClientProperties & JavaScriptApplication & CypressApplication & { webappLoginRegExp: string; @@ -16,6 +17,11 @@ export type ClientApplication = ApplicationClientProperties & clientFrameworkBuiltIn?: boolean; }; +/** + * Deprecated in favor of frontend application. + */ +export type ClientApplication = JavaScriptApplication & PartialAngularApplication; + export type ClientResources = { /** * resources added to root file. From 651e77e1f31f0ee7ae14f69bc17ff69ed6fafea2 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sat, 2 Nov 2024 14:23:31 +0100 Subject: [PATCH 13/26] ensure retrocompatibility --- generators/client/types.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/client/types.d.ts b/generators/client/types.d.ts index a5c0cc65cd02..9a63abee9b39 100644 --- a/generators/client/types.d.ts +++ b/generators/client/types.d.ts @@ -20,7 +20,7 @@ export type FrontendApplication = ApplicationClientProperties & /** * Deprecated in favor of frontend application. */ -export type ClientApplication = JavaScriptApplication & PartialAngularApplication; +export type ClientApplication = JavaScriptApplication & PartialAngularApplication & FrontendApplication; export type ClientResources = { /** From 2bbfe5bed22d5b9514e53f490d66e96795dfe1b6 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sat, 2 Nov 2024 15:12:12 +0100 Subject: [PATCH 14/26] update snapshots --- generators/app/__snapshots__/generator.spec.ts.snap | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generators/app/__snapshots__/generator.spec.ts.snap b/generators/app/__snapshots__/generator.spec.ts.snap index ff074562258a..146d4385298e 100644 --- a/generators/app/__snapshots__/generator.spec.ts.snap +++ b/generators/app/__snapshots__/generator.spec.ts.snap @@ -476,6 +476,7 @@ exports[`generator - app with default config should match snapshot 1`] = ` "fakerSeed": undefined, "feignClient": false, "frontendAppName": "jhipsterApp", + "frontendEntities": [], "gatewayRoutes": undefined, "gatewayServerPort": undefined, "gatewayServicesApiAvailable": undefined, @@ -486,6 +487,7 @@ exports[`generator - app with default config should match snapshot 1`] = ` "generateInMemoryUserCredentials": false, "generateSpringAuditor": true, "generateUserManagement": true, + "getTypescriptKeyType": [Function], "githubRepository": undefined, "githubWorkflows": undefined, "graalvmSupport": undefined, @@ -1133,6 +1135,7 @@ exports[`generator - app with gateway should match snapshot 1`] = ` "fakerSeed": undefined, "feignClient": false, "frontendAppName": "jhipsterApp", + "frontendEntities": [], "gatewayRoutes": [], "gatewayServerPort": undefined, "gatewayServicesApiAvailable": true, @@ -1143,6 +1146,7 @@ exports[`generator - app with gateway should match snapshot 1`] = ` "generateInMemoryUserCredentials": false, "generateSpringAuditor": true, "generateUserManagement": true, + "getTypescriptKeyType": [Function], "githubRepository": undefined, "githubWorkflows": undefined, "graalvmSupport": undefined, From 5d2dfbc27030dc9a9a93994a1287c8bb6fdf05f4 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sun, 3 Nov 2024 17:31:57 +0100 Subject: [PATCH 15/26] remove unused method --- .../__snapshots__/generator.spec.ts.snap | 1091 ----------------- generators/angular/generator.ts | 13 +- .../app/__snapshots__/generator.spec.ts.snap | 2 - 3 files changed, 6 insertions(+), 1100 deletions(-) diff --git a/generators/angular/__snapshots__/generator.spec.ts.snap b/generators/angular/__snapshots__/generator.spec.ts.snap index d85869cf2830..2d4871be2bfd 100644 --- a/generators/angular/__snapshots__/generator.spec.ts.snap +++ b/generators/angular/__snapshots__/generator.spec.ts.snap @@ -2997,1097 +2997,6 @@ exports[`generator - angular microservice-oauth2-withAdminUi(true)-skipJhipsterD } `; -exports[`generator - angular monolith-jwt-skipUserManagement(false)-withAdminUi(true)-skipJhipsterDependencies(true)-enableTranslation(true)--websocket(true) should match generated files snapshot 1`] = ` -{ - ".jhipster/EntityWithCustomId.json": { - "stateCleared": "modified", - }, - ".jhipster/Microservice.json": { - "stateCleared": "modified", - }, - ".jhipster/Simple.json": { - "stateCleared": "modified", - }, - ".jhipster/SkipClient.json": { - "stateCleared": "modified", - }, - ".yo-rc.json": { - "stateCleared": "modified", - }, - "angular.json": { - "stateCleared": "modified", - }, - "eslint.config.mjs": { - "stateCleared": "modified", - }, - "jest.conf.js": { - "stateCleared": "modified", - }, - "ngsw-config.json": { - "stateCleared": "modified", - }, - "package.json": { - "stateCleared": "modified", - }, - "src/main/webapp/404.html": { - "stateCleared": "modified", - }, - "src/main/webapp/WEB-INF/web.xml": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/account.route.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/activate/activate.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/activate/activate.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/activate/activate.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/activate/activate.route.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/activate/activate.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/activate/activate.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password-reset/finish/password-reset-finish.route.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password-reset/finish/password-reset-finish.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password-reset/finish/password-reset-finish.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password-reset/init/password-reset-init.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password-reset/init/password-reset-init.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password-reset/init/password-reset-init.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password-reset/init/password-reset-init.route.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password-reset/init/password-reset-init.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password-reset/init/password-reset-init.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password/password-strength-bar/password-strength-bar.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password/password-strength-bar/password-strength-bar.component.scss": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password/password-strength-bar/password-strength-bar.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password/password-strength-bar/password-strength-bar.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password/password.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password/password.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password/password.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password/password.route.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password/password.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/password/password.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/register/register.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/register/register.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/register/register.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/register/register.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/register/register.route.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/register/register.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/register/register.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/settings/settings.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/settings/settings.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/settings/settings.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/account/settings/settings.route.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/admin.routes.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/configuration/configuration.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/configuration/configuration.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/configuration/configuration.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/configuration/configuration.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/configuration/configuration.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/configuration/configuration.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/docs/docs.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/docs/docs.component.scss": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/docs/docs.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/health/health.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/health/health.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/health/health.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/health/health.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/health/health.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/health/health.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/health/modal/health-modal.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/health/modal/health-modal.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/health/modal/health-modal.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/logs/log.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/logs/logs.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/logs/logs.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/logs/logs.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/logs/logs.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/logs/logs.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/jvm-memory/jvm-memory.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/jvm-memory/jvm-memory.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/jvm-threads/jvm-threads.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/jvm-threads/jvm-threads.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/metrics-cache/metrics-cache.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/metrics-cache/metrics-cache.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/metrics-datasource/metrics-datasource.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/metrics-datasource/metrics-datasource.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/metrics-endpoints-requests/metrics-endpoints-requests.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/metrics-endpoints-requests/metrics-endpoints-requests.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/metrics-garbagecollector/metrics-garbagecollector.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/metrics-garbagecollector/metrics-garbagecollector.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/metrics-request/metrics-request.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/metrics-request/metrics-request.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/metrics-system/metrics-system.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/blocks/metrics-system/metrics-system.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/metrics.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/metrics.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/metrics.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/metrics.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/metrics.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/metrics/metrics.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/user-management/delete/user-management-delete-dialog.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/user-management/delete/user-management-delete-dialog.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/user-management/delete/user-management-delete-dialog.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/user-management/detail/user-management-detail.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/user-management/detail/user-management-detail.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/user-management/detail/user-management-detail.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/user-management/list/user-management.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/user-management/list/user-management.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/user-management/list/user-management.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/user-management/service/user-management.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/user-management/service/user-management.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/user-management/update/user-management-update.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/user-management/update/user-management-update.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/user-management/update/user-management-update.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/user-management/user-management.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/admin/user-management/user-management.route.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/app-page-title-strategy.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/app.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/app.config.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/app.constants.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/app.routes.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/config/authority.constants.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/config/datepicker-adapter.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/config/dayjs.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/config/error.constants.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/config/font-awesome-icons.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/config/input.constants.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/config/language.constants.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/config/navigation.constants.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/config/pagination.constants.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/config/translation.config.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/config/uib-pagination.config.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/auth/account.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/auth/account.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/auth/account.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/auth/auth-jwt.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/auth/auth-jwt.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/auth/state-storage.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/auth/user-route-access.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/config/application-config.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/config/application-config.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/interceptor/auth-expired.interceptor.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/interceptor/auth.interceptor.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/interceptor/error-handler.interceptor.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/interceptor/index.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/interceptor/notification.interceptor.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/request/request-util.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/request/request.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/util/alert.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/util/alert.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/util/data-util.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/util/data-util.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/util/event-manager.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/util/event-manager.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/util/operators.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/util/operators.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/util/parse-links.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/core/util/parse-links.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/authority.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/authority.routes.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/authority.test-samples.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/delete/authority-delete-dialog.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/delete/authority-delete-dialog.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/delete/authority-delete-dialog.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/detail/authority-detail.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/detail/authority-detail.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/detail/authority-detail.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/list/authority.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/list/authority.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/list/authority.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/route/authority-routing-resolve.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/route/authority-routing-resolve.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/service/authority.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/service/authority.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/update/authority-form.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/update/authority-form.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/update/authority-update.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/update/authority-update.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/admin/authority/update/authority-update.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-navbar-items.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/delete/entity-with-custom-id-delete-dialog.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/delete/entity-with-custom-id-delete-dialog.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/delete/entity-with-custom-id-delete-dialog.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/detail/entity-with-custom-id-detail.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/detail/entity-with-custom-id-detail.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/detail/entity-with-custom-id-detail.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/entity-with-custom-id.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/entity-with-custom-id.routes.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/entity-with-custom-id.test-samples.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/list/entity-with-custom-id.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/list/entity-with-custom-id.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/list/entity-with-custom-id.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/route/entity-with-custom-id-routing-resolve.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/route/entity-with-custom-id-routing-resolve.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/service/entity-with-custom-id.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/service/entity-with-custom-id.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/update/entity-with-custom-id-form.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/update/entity-with-custom-id-form.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/update/entity-with-custom-id-update.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/update/entity-with-custom-id-update.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity-with-custom-id/update/entity-with-custom-id-update.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/entity.routes.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/delete/microservice-delete-dialog.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/delete/microservice-delete-dialog.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/delete/microservice-delete-dialog.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/detail/microservice-detail.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/detail/microservice-detail.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/detail/microservice-detail.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/list/microservice.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/list/microservice.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/list/microservice.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/microservice.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/microservice.routes.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/microservice.test-samples.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/route/microservice-routing-resolve.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/route/microservice-routing-resolve.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/service/microservice.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/service/microservice.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/update/microservice-form.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/update/microservice-form.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/update/microservice-update.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/update/microservice-update.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/microservice/update/microservice-update.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/delete/simple-delete-dialog.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/delete/simple-delete-dialog.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/delete/simple-delete-dialog.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/detail/simple-detail.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/detail/simple-detail.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/detail/simple-detail.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/list/simple.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/list/simple.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/list/simple.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/route/simple-routing-resolve.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/route/simple-routing-resolve.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/service/simple.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/service/simple.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/simple.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/simple.routes.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/simple.test-samples.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/update/simple-form.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/update/simple-form.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/update/simple-update.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/update/simple-update.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/simple/update/simple-update.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/user/service/user.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/user/service/user.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/user/user.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/entities/user/user.test-samples.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/home/home.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/home/home.component.scss": { - "stateCleared": "modified", - }, - "src/main/webapp/app/home/home.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/home/home.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/error/error.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/error/error.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/error/error.route.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/footer/footer.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/footer/footer.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/main/main.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/main/main.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/main/main.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/navbar/active-menu.directive.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/navbar/navbar-item.model.d.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/navbar/navbar.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/navbar/navbar.component.scss": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/navbar/navbar.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/navbar/navbar.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/profiles/page-ribbon.component.scss": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/profiles/page-ribbon.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/profiles/page-ribbon.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/profiles/profile-info.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/layouts/profiles/profile.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/login/login.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/login/login.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/login/login.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/login/login.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/login/login.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/alert/alert-error.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/alert/alert-error.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/alert/alert-error.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/alert/alert-error.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/alert/alert.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/alert/alert.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/alert/alert.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/auth/has-any-authority.directive.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/auth/has-any-authority.directive.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/date/duration.pipe.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/date/format-medium-date.pipe.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/date/format-medium-date.pipe.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/date/format-medium-datetime.pipe.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/date/format-medium-datetime.pipe.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/date/index.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/filter/filter.component.html": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/filter/filter.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/filter/filter.model.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/filter/filter.model.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/filter/index.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/language/find-language-from-key.pipe.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/language/index.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/language/translate.directive.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/language/translate.directive.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/language/translation.module.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/pagination/index.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/pagination/item-count.component.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/pagination/item-count.component.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/shared.module.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/sort/index.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/sort/sort-by.directive.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/sort/sort-by.directive.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/sort/sort-state.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/sort/sort.directive.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/sort/sort.directive.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/sort/sort.service.spec.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/app/shared/sort/sort.service.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/bootstrap.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/content/css/loading.css": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_0.svg": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_0_head-192.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_0_head-256.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_0_head-384.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_0_head-512.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_1.svg": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_1_head-192.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_1_head-256.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_1_head-384.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_1_head-512.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_2.svg": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_2_head-192.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_2_head-256.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_2_head-384.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_2_head-512.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_3.svg": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_3_head-192.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_3_head-256.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_3_head-384.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/jhipster_family_member_3_head-512.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/images/logo-jhipster.png": { - "stateCleared": "modified", - }, - "src/main/webapp/content/scss/_bootstrap-variables.scss": { - "stateCleared": "modified", - }, - "src/main/webapp/content/scss/global.scss": { - "stateCleared": "modified", - }, - "src/main/webapp/content/scss/vendor.scss": { - "stateCleared": "modified", - }, - "src/main/webapp/declarations.d.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/favicon.ico": { - "stateCleared": "modified", - }, - "src/main/webapp/index.html": { - "stateCleared": "modified", - }, - "src/main/webapp/main.ts": { - "stateCleared": "modified", - }, - "src/main/webapp/manifest.webapp": { - "stateCleared": "modified", - }, - "src/main/webapp/robots.txt": { - "stateCleared": "modified", - }, - "src/main/webapp/swagger-ui/dist/images/throbber.gif": { - "stateCleared": "modified", - }, - "src/main/webapp/swagger-ui/index.html": { - "stateCleared": "modified", - }, - "tsconfig.app.json": { - "stateCleared": "modified", - }, - "tsconfig.json": { - "stateCleared": "modified", - }, - "tsconfig.spec.json": { - "stateCleared": "modified", - }, - "webpack/environment.js": { - "stateCleared": "modified", - }, - "webpack/logo-jhipster.png": { - "stateCleared": "modified", - }, - "webpack/proxy.conf.js": { - "stateCleared": "modified", - }, - "webpack/webpack.custom.js": { - "stateCleared": "modified", - }, -} -`; - -exports[`generator - angular monolith-jwt-skipUserManagement(false)-withAdminUi(true)-skipJhipsterDependencies(true)-enableTranslation(true)--websocket(true) should match source calls snapshot 1`] = ` -{ - "addEntitiesToClient": [ - { - "application": "Application[jhipster]", - "control": "TaskParameter[control]", - "entities": [ - "Entity[Authority]", - "Entity[Simple]", - "Entity[Microservice]", - "Entity[EntityWithCustomId]", - ], - "source": "TaskParameter[source]", - }, - ], -} -`; - exports[`generator - angular monolith-oauth2-withAdminUi(false)-skipJhipsterDependencies(false)-enableTranslation(false)-websocket(false) should match generated files snapshot 1`] = ` { ".jhipster/EntityWithCustomId.json": { diff --git a/generators/angular/generator.ts b/generators/angular/generator.ts index 6706bd5e59e5..50a5b26f2e44 100644 --- a/generators/angular/generator.ts +++ b/generators/angular/generator.ts @@ -22,7 +22,12 @@ 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'; import { clientFrameworkTypes } from '../../lib/jhipster/index.js'; -import { generateEntityClientEnumImports as getClientEnumImportsFormat } from '../client/support/index.js'; +import { + generateTypescriptTestEntity as generateTestEntity, + generateEntityClientEnumImports as getClientEnumImportsFormat, + generateTestEntityId as getTestEntityId, + generateTestEntityPrimaryKey as getTestEntityPrimaryKey, +} 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'; @@ -82,12 +87,6 @@ export default class AngularGenerator extends BaseApplicationGenerator< get preparing() { return this.asPreparingTaskGroup({ - prepareApplication({ application }) { - // @ts-ignore - application.getTypescriptKeyType = primaryKey => { - return getTSKeyType(primaryKey); - }; - }, applicationDefauts({ application, applicationDefaults }) { applicationDefaults({ __override__: true, diff --git a/generators/app/__snapshots__/generator.spec.ts.snap b/generators/app/__snapshots__/generator.spec.ts.snap index 146d4385298e..42b0a045769b 100644 --- a/generators/app/__snapshots__/generator.spec.ts.snap +++ b/generators/app/__snapshots__/generator.spec.ts.snap @@ -487,7 +487,6 @@ exports[`generator - app with default config should match snapshot 1`] = ` "generateInMemoryUserCredentials": false, "generateSpringAuditor": true, "generateUserManagement": true, - "getTypescriptKeyType": [Function], "githubRepository": undefined, "githubWorkflows": undefined, "graalvmSupport": undefined, @@ -1146,7 +1145,6 @@ exports[`generator - app with gateway should match snapshot 1`] = ` "generateInMemoryUserCredentials": false, "generateSpringAuditor": true, "generateUserManagement": true, - "getTypescriptKeyType": [Function], "githubRepository": undefined, "githubWorkflows": undefined, "graalvmSupport": undefined, From 09a802efc3dcdc6cbee7e7a5547b2f3c62645f7f Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sun, 3 Nov 2024 18:52:23 +0100 Subject: [PATCH 16/26] remove unused method --- .../__snapshots__/generator.spec.ts.snap | 1091 +++++++++++++++++ 1 file changed, 1091 insertions(+) diff --git a/generators/angular/__snapshots__/generator.spec.ts.snap b/generators/angular/__snapshots__/generator.spec.ts.snap index 2d4871be2bfd..d85869cf2830 100644 --- a/generators/angular/__snapshots__/generator.spec.ts.snap +++ b/generators/angular/__snapshots__/generator.spec.ts.snap @@ -2997,6 +2997,1097 @@ exports[`generator - angular microservice-oauth2-withAdminUi(true)-skipJhipsterD } `; +exports[`generator - angular monolith-jwt-skipUserManagement(false)-withAdminUi(true)-skipJhipsterDependencies(true)-enableTranslation(true)--websocket(true) should match generated files snapshot 1`] = ` +{ + ".jhipster/EntityWithCustomId.json": { + "stateCleared": "modified", + }, + ".jhipster/Microservice.json": { + "stateCleared": "modified", + }, + ".jhipster/Simple.json": { + "stateCleared": "modified", + }, + ".jhipster/SkipClient.json": { + "stateCleared": "modified", + }, + ".yo-rc.json": { + "stateCleared": "modified", + }, + "angular.json": { + "stateCleared": "modified", + }, + "eslint.config.mjs": { + "stateCleared": "modified", + }, + "jest.conf.js": { + "stateCleared": "modified", + }, + "ngsw-config.json": { + "stateCleared": "modified", + }, + "package.json": { + "stateCleared": "modified", + }, + "src/main/webapp/404.html": { + "stateCleared": "modified", + }, + "src/main/webapp/WEB-INF/web.xml": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/account.route.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/activate/activate.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/activate/activate.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/activate/activate.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/activate/activate.route.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/activate/activate.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/activate/activate.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password-reset/finish/password-reset-finish.route.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password-reset/finish/password-reset-finish.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password-reset/finish/password-reset-finish.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password-reset/init/password-reset-init.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password-reset/init/password-reset-init.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password-reset/init/password-reset-init.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password-reset/init/password-reset-init.route.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password-reset/init/password-reset-init.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password-reset/init/password-reset-init.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password/password-strength-bar/password-strength-bar.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password/password-strength-bar/password-strength-bar.component.scss": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password/password-strength-bar/password-strength-bar.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password/password-strength-bar/password-strength-bar.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password/password.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password/password.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password/password.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password/password.route.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password/password.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/password/password.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/register/register.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/register/register.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/register/register.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/register/register.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/register/register.route.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/register/register.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/register/register.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/settings/settings.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/settings/settings.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/settings/settings.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/account/settings/settings.route.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/admin.routes.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/configuration/configuration.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/configuration/configuration.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/configuration/configuration.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/configuration/configuration.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/configuration/configuration.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/configuration/configuration.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/docs/docs.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/docs/docs.component.scss": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/docs/docs.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/health/health.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/health/health.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/health/health.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/health/health.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/health/health.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/health/health.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/health/modal/health-modal.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/health/modal/health-modal.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/health/modal/health-modal.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/logs/log.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/logs/logs.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/logs/logs.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/logs/logs.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/logs/logs.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/logs/logs.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/jvm-memory/jvm-memory.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/jvm-memory/jvm-memory.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/jvm-threads/jvm-threads.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/jvm-threads/jvm-threads.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/metrics-cache/metrics-cache.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/metrics-cache/metrics-cache.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/metrics-datasource/metrics-datasource.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/metrics-datasource/metrics-datasource.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/metrics-endpoints-requests/metrics-endpoints-requests.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/metrics-endpoints-requests/metrics-endpoints-requests.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/metrics-garbagecollector/metrics-garbagecollector.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/metrics-garbagecollector/metrics-garbagecollector.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/metrics-request/metrics-request.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/metrics-request/metrics-request.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/metrics-system/metrics-system.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/blocks/metrics-system/metrics-system.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/metrics.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/metrics.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/metrics.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/metrics.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/metrics.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/metrics/metrics.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/user-management/delete/user-management-delete-dialog.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/user-management/delete/user-management-delete-dialog.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/user-management/delete/user-management-delete-dialog.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/user-management/detail/user-management-detail.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/user-management/detail/user-management-detail.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/user-management/detail/user-management-detail.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/user-management/list/user-management.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/user-management/list/user-management.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/user-management/list/user-management.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/user-management/service/user-management.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/user-management/service/user-management.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/user-management/update/user-management-update.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/user-management/update/user-management-update.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/user-management/update/user-management-update.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/user-management/user-management.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/admin/user-management/user-management.route.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/app-page-title-strategy.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/app.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/app.config.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/app.constants.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/app.routes.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/config/authority.constants.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/config/datepicker-adapter.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/config/dayjs.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/config/error.constants.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/config/font-awesome-icons.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/config/input.constants.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/config/language.constants.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/config/navigation.constants.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/config/pagination.constants.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/config/translation.config.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/config/uib-pagination.config.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/auth/account.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/auth/account.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/auth/account.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/auth/auth-jwt.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/auth/auth-jwt.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/auth/state-storage.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/auth/user-route-access.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/config/application-config.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/config/application-config.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/interceptor/auth-expired.interceptor.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/interceptor/auth.interceptor.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/interceptor/error-handler.interceptor.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/interceptor/index.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/interceptor/notification.interceptor.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/request/request-util.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/request/request.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/util/alert.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/util/alert.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/util/data-util.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/util/data-util.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/util/event-manager.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/util/event-manager.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/util/operators.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/util/operators.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/util/parse-links.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/core/util/parse-links.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/authority.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/authority.routes.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/authority.test-samples.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/delete/authority-delete-dialog.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/delete/authority-delete-dialog.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/delete/authority-delete-dialog.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/detail/authority-detail.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/detail/authority-detail.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/detail/authority-detail.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/list/authority.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/list/authority.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/list/authority.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/route/authority-routing-resolve.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/route/authority-routing-resolve.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/service/authority.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/service/authority.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/update/authority-form.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/update/authority-form.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/update/authority-update.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/update/authority-update.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/admin/authority/update/authority-update.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-navbar-items.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/delete/entity-with-custom-id-delete-dialog.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/delete/entity-with-custom-id-delete-dialog.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/delete/entity-with-custom-id-delete-dialog.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/detail/entity-with-custom-id-detail.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/detail/entity-with-custom-id-detail.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/detail/entity-with-custom-id-detail.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/entity-with-custom-id.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/entity-with-custom-id.routes.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/entity-with-custom-id.test-samples.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/list/entity-with-custom-id.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/list/entity-with-custom-id.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/list/entity-with-custom-id.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/route/entity-with-custom-id-routing-resolve.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/route/entity-with-custom-id-routing-resolve.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/service/entity-with-custom-id.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/service/entity-with-custom-id.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/update/entity-with-custom-id-form.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/update/entity-with-custom-id-form.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/update/entity-with-custom-id-update.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/update/entity-with-custom-id-update.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity-with-custom-id/update/entity-with-custom-id-update.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/entity.routes.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/delete/microservice-delete-dialog.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/delete/microservice-delete-dialog.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/delete/microservice-delete-dialog.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/detail/microservice-detail.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/detail/microservice-detail.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/detail/microservice-detail.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/list/microservice.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/list/microservice.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/list/microservice.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/microservice.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/microservice.routes.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/microservice.test-samples.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/route/microservice-routing-resolve.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/route/microservice-routing-resolve.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/service/microservice.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/service/microservice.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/update/microservice-form.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/update/microservice-form.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/update/microservice-update.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/update/microservice-update.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/microservice/update/microservice-update.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/delete/simple-delete-dialog.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/delete/simple-delete-dialog.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/delete/simple-delete-dialog.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/detail/simple-detail.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/detail/simple-detail.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/detail/simple-detail.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/list/simple.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/list/simple.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/list/simple.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/route/simple-routing-resolve.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/route/simple-routing-resolve.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/service/simple.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/service/simple.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/simple.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/simple.routes.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/simple.test-samples.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/update/simple-form.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/update/simple-form.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/update/simple-update.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/update/simple-update.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/simple/update/simple-update.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/user/service/user.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/user/service/user.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/user/user.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/entities/user/user.test-samples.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/home/home.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/home/home.component.scss": { + "stateCleared": "modified", + }, + "src/main/webapp/app/home/home.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/home/home.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/error/error.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/error/error.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/error/error.route.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/footer/footer.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/footer/footer.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/main/main.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/main/main.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/main/main.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/navbar/active-menu.directive.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/navbar/navbar-item.model.d.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/navbar/navbar.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/navbar/navbar.component.scss": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/navbar/navbar.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/navbar/navbar.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/profiles/page-ribbon.component.scss": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/profiles/page-ribbon.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/profiles/page-ribbon.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/profiles/profile-info.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/layouts/profiles/profile.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/login/login.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/login/login.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/login/login.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/login/login.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/login/login.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/alert/alert-error.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/alert/alert-error.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/alert/alert-error.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/alert/alert-error.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/alert/alert.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/alert/alert.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/alert/alert.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/auth/has-any-authority.directive.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/auth/has-any-authority.directive.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/date/duration.pipe.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/date/format-medium-date.pipe.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/date/format-medium-date.pipe.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/date/format-medium-datetime.pipe.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/date/format-medium-datetime.pipe.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/date/index.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/filter/filter.component.html": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/filter/filter.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/filter/filter.model.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/filter/filter.model.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/filter/index.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/language/find-language-from-key.pipe.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/language/index.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/language/translate.directive.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/language/translate.directive.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/language/translation.module.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/pagination/index.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/pagination/item-count.component.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/pagination/item-count.component.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/shared.module.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/sort/index.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/sort/sort-by.directive.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/sort/sort-by.directive.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/sort/sort-state.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/sort/sort.directive.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/sort/sort.directive.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/sort/sort.service.spec.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/app/shared/sort/sort.service.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/bootstrap.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/content/css/loading.css": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_0.svg": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_0_head-192.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_0_head-256.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_0_head-384.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_0_head-512.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_1.svg": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_1_head-192.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_1_head-256.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_1_head-384.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_1_head-512.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_2.svg": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_2_head-192.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_2_head-256.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_2_head-384.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_2_head-512.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_3.svg": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_3_head-192.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_3_head-256.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_3_head-384.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/jhipster_family_member_3_head-512.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/images/logo-jhipster.png": { + "stateCleared": "modified", + }, + "src/main/webapp/content/scss/_bootstrap-variables.scss": { + "stateCleared": "modified", + }, + "src/main/webapp/content/scss/global.scss": { + "stateCleared": "modified", + }, + "src/main/webapp/content/scss/vendor.scss": { + "stateCleared": "modified", + }, + "src/main/webapp/declarations.d.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/favicon.ico": { + "stateCleared": "modified", + }, + "src/main/webapp/index.html": { + "stateCleared": "modified", + }, + "src/main/webapp/main.ts": { + "stateCleared": "modified", + }, + "src/main/webapp/manifest.webapp": { + "stateCleared": "modified", + }, + "src/main/webapp/robots.txt": { + "stateCleared": "modified", + }, + "src/main/webapp/swagger-ui/dist/images/throbber.gif": { + "stateCleared": "modified", + }, + "src/main/webapp/swagger-ui/index.html": { + "stateCleared": "modified", + }, + "tsconfig.app.json": { + "stateCleared": "modified", + }, + "tsconfig.json": { + "stateCleared": "modified", + }, + "tsconfig.spec.json": { + "stateCleared": "modified", + }, + "webpack/environment.js": { + "stateCleared": "modified", + }, + "webpack/logo-jhipster.png": { + "stateCleared": "modified", + }, + "webpack/proxy.conf.js": { + "stateCleared": "modified", + }, + "webpack/webpack.custom.js": { + "stateCleared": "modified", + }, +} +`; + +exports[`generator - angular monolith-jwt-skipUserManagement(false)-withAdminUi(true)-skipJhipsterDependencies(true)-enableTranslation(true)--websocket(true) should match source calls snapshot 1`] = ` +{ + "addEntitiesToClient": [ + { + "application": "Application[jhipster]", + "control": "TaskParameter[control]", + "entities": [ + "Entity[Authority]", + "Entity[Simple]", + "Entity[Microservice]", + "Entity[EntityWithCustomId]", + ], + "source": "TaskParameter[source]", + }, + ], +} +`; + exports[`generator - angular monolith-oauth2-withAdminUi(false)-skipJhipsterDependencies(false)-enableTranslation(false)-websocket(false) should match generated files snapshot 1`] = ` { ".jhipster/EntityWithCustomId.json": { From b140c6c0aea72c8e8638f8522a89d66c9ee1f7ff Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Thu, 7 Nov 2024 22:43:15 +0100 Subject: [PATCH 17/26] rebased --- generators/angular/generator.ts | 3 +- .../list/_entityFile_.component.spec.ts.ejs | 4 --- .../service/_entityFile_.service.spec.ts.ejs | 14 -------- .../_entityFile_-update.component.html.ejs | 4 --- .../_entityFile_-update.component.spec.ts.ejs | 35 ------------------- ...pes-deprecated.d.ts => types-partial.d.ts} | 2 +- generators/angular/types.d.ts | 2 +- generators/client/types.d.ts | 2 +- 8 files changed, 5 insertions(+), 61 deletions(-) rename generators/angular/{types-deprecated.d.ts => types-partial.d.ts} (91%) diff --git a/generators/angular/generator.ts b/generators/angular/generator.ts index 50a5b26f2e44..b65e51a518f0 100644 --- a/generators/angular/generator.ts +++ b/generators/angular/generator.ts @@ -41,6 +41,7 @@ import { addItemToAdminMenu, addRoute, addToEntitiesMenu, + buildAngularFormPath as angularFormPath, isTranslatedAngularFile, translateAngularFilesTransform, } from './support/index.js'; @@ -195,7 +196,7 @@ export default class AngularGenerator extends BaseApplicationGenerator< return angularFormPath(reference, prefix); }; - entity.generateTestEntityId = (primaryKey, index = 0, wrapped = true) => { + entity.generateTestEntityId = (primaryKey, index: 0 | 1 | 'random' = 0, wrapped = true) => { return getTestEntityId(primaryKey, index, wrapped); }; }, diff --git a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/list/_entityFile_.component.spec.ts.ejs b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/list/_entityFile_.component.spec.ts.ejs index 3664f3b6b482..993881549954 100644 --- a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/list/_entityFile_.component.spec.ts.ejs +++ b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/list/_entityFile_.component.spec.ts.ejs @@ -136,11 +136,7 @@ describe('<%= entityAngularName %> Management Component', () => { describe('track<%= primaryKey.nameCapitalized %>', () => { it('Should forward to <%= entityInstance %>Service', () => { -<<<<<<< HEAD const entity = <%- tsPrimaryKeySamples[0] %>; -======= - const entity = <%- generateTestEntityPrimaryKey(primaryKey, 0) %>; ->>>>>>> 6a2ff33b25 (generator-specific entity) jest.spyOn(service, 'get<%= entityAngularName %>Identifier'); const <%= primaryKey.name %> = comp.track<%= primaryKey.nameCapitalized %>(entity); expect(service.get<%= entityAngularName %>Identifier).toHaveBeenCalledWith(entity); diff --git a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/service/_entityFile_.service.spec.ts.ejs b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/service/_entityFile_.service.spec.ts.ejs index b55b1ac8359a..d90d0d3bbe49 100644 --- a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/service/_entityFile_.service.spec.ts.ejs +++ b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/service/_entityFile_.service.spec.ts.ejs @@ -219,11 +219,7 @@ describe('<%= entityAngularName %> Service', () => { }); it('Should return false if one entity is null', () => { -<<<<<<< HEAD const entity1 = <%- tsPrimaryKeySamples[0] %>; -======= - const entity1 = <%- generateTestEntityPrimaryKey(primaryKey, 0) %>; ->>>>>>> 6a2ff33b25 (generator-specific entity) const entity2 = null; const compareResult1 = service.compare<%= entityAngularName %>(entity1, entity2); @@ -234,13 +230,8 @@ describe('<%= entityAngularName %> Service', () => { }); it('Should return false if primaryKey differs', () => { -<<<<<<< HEAD const entity1 = <%- tsPrimaryKeySamples[0] %>; const entity2 = <%- tsPrimaryKeySamples[1] %>; -======= - const entity1 = <%- generateTestEntityPrimaryKey(primaryKey, 0) %>; - const entity2 = <%- generateTestEntityPrimaryKey(primaryKey, 1) %>; ->>>>>>> 6a2ff33b25 (generator-specific entity) const compareResult1 = service.compare<%= entityAngularName %>(entity1, entity2); const compareResult2 = service.compare<%= entityAngularName %>(entity2, entity1); @@ -250,13 +241,8 @@ describe('<%= entityAngularName %> Service', () => { }); it('Should return false if primaryKey matches', () => { -<<<<<<< HEAD const entity1 = <%- tsPrimaryKeySamples[0] %>; const entity2 = <%- tsPrimaryKeySamples[0] %>; -======= - const entity1 = <%- generateTestEntityPrimaryKey(primaryKey, 0) %>; - const entity2 = <%- generateTestEntityPrimaryKey(primaryKey, 0) %>; ->>>>>>> 6a2ff33b25 (generator-specific entity) const compareResult1 = service.compare<%= entityAngularName %>(entity1, entity2); const compareResult2 = service.compare<%= entityAngularName %>(entity2, entity1); diff --git a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.html.ejs b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.html.ejs index 0f643e8b9c44..71e772cf744e 100644 --- a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.html.ejs +++ b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.html.ejs @@ -175,11 +175,7 @@ _%> } <%_ } else { _%> -<<<<<<< HEAD @if (editForm.get(['<%- relationship.propertyName %>'])!.value == null) { -======= - @if (editForm.get([<%- buildAngularFormPath(relationship.reference) %>])!.value == null) { ->>>>>>> 6a2ff33b25 (generator-specific entity) } <%_ } _%> diff --git a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.spec.ts.ejs b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.spec.ts.ejs index d2716a865679..188148b876db 100644 --- a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.spec.ts.ejs +++ b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/update/_entityFile_-update.component.spec.ts.ejs @@ -17,22 +17,13 @@ limitations under the License. -%> <%_ -<<<<<<< HEAD const tsKeyId = primaryKey.tsSampleValues[0]; -======= -const tsKeyId = generateTestEntityId(primaryKey.type); ->>>>>>> 6a2ff33b25 (generator-specific entity) const allRelationshipsByEntityNeedingOptions = Object .values(relationshipsByOtherEntity) .map(relationships => relationships.filter(rel => rel.persistableRelationship && !rel.otherEntity.embedded)) .filter(relationships => relationships.length > 0); -<<<<<<< HEAD const testEntityPrimaryKey0 = tsPrimaryKeySamples[0]; const testEntityPrimaryKey1 = tsPrimaryKeySamples[1]; -======= -const testEntityPrimaryKey0 = generateTestEntityPrimaryKey(primaryKey, 0); -const testEntityPrimaryKey1 = generateTestEntityPrimaryKey(primaryKey, 1); ->>>>>>> 6a2ff33b25 (generator-specific entity) _%> import { ComponentFixture, TestBed } from '@angular/core/testing'; import { provideHttpClient, HttpResponse } from '@angular/common/http'; @@ -104,24 +95,14 @@ describe('<%= entityAngularName %> Management Update Component', () => { <%_ for (const relationship of relationshipsWithCustomSharedOptions) { _%> <%_ const reference = relationship.reference _%> <%_ if (relationship.collection) { _%> -<<<<<<< HEAD const <%= reference.name %> : I<%= otherEntity.entityAngularName %>[] = [<%- otherEntity.tsPrimaryKeySamples[0] %>]; <%_ } else { _%> const <%= reference.name %> : I<%= otherEntity.entityAngularName %> = <%- otherEntity.tsPrimaryKeySamples[0] %>; -======= - const <%= reference.name %> : I<%= otherEntity.entityAngularName %>[] = [<%- generateTestEntityPrimaryKey(otherEntity.primaryKey) %>]; - <%_ } else { _%> - const <%= reference.name %> : I<%= otherEntity.entityAngularName %> = <%- generateTestEntityPrimaryKey(otherEntity.primaryKey) %>; ->>>>>>> 6a2ff33b25 (generator-specific entity) <%_ } _%> <%= entityInstance %>.<%= reference.name %> = <%= reference.name %>; <%_ } _%> -<<<<<<< HEAD const <%= otherEntity.entityInstance %>Collection: I<%= otherEntity.entityAngularName %>[] = [<%- otherEntity.tsPrimaryKeySamples[0] %>]; -======= - const <%= otherEntity.entityInstance %>Collection: I<%= otherEntity.entityAngularName %>[] = [<%- generateTestEntityPrimaryKey(otherEntity.primaryKey) %>]; ->>>>>>> 6a2ff33b25 (generator-specific entity) jest.spyOn(<%= otherEntity.entityInstance %>Service, 'query').mockReturnValue(of(new HttpResponse({ body: <%= otherEntity.entityInstance %>Collection }))); const additional<%= otherEntity.entityAngularNamePlural %> = [ <%_ for (const relationship of relationshipsWithCustomSharedOptions) { _%> @@ -149,17 +130,10 @@ describe('<%= entityAngularName %> Management Update Component', () => { <%_ const reference = relationship.reference _%> it('Should call <%= reference.name %> query and add missing value', () => { const <%= entityInstance %> : I<%= entityAngularName %> = <%- testEntityPrimaryKey1 %>; -<<<<<<< HEAD const <%= reference.name %> : I<%= otherEntity.entityAngularName %> = <%- otherEntity.tsPrimaryKeySamples[0] %>; <%= entityInstance %>.<%= reference.name %> = <%= reference.name %>; const <%= reference.name %>Collection: I<%= otherEntity.entityAngularName %>[] = [<%- otherEntity.tsPrimaryKeySamples[0] %>]; -======= - const <%= reference.name %> : I<%= otherEntity.entityAngularName %> = <%- generateTestEntityPrimaryKey(otherEntity.primaryKey) %>; - <%= entityInstance %>.<%= reference.name %> = <%= reference.name %>; - - const <%= reference.name %>Collection: I<%= otherEntity.entityAngularName %>[] = [<%- generateTestEntityPrimaryKey(otherEntity.primaryKey) %>]; ->>>>>>> 6a2ff33b25 (generator-specific entity) jest.spyOn(<%= otherEntity.entityInstance %>Service, 'query').mockReturnValue(of(new HttpResponse({ body: <%= reference.name %>Collection }))); const expectedCollection: I<%= otherEntity.entityAngularName %>[] = [<%= reference.name %>, ...<%= reference.name %>Collection]; jest.spyOn(<%= otherEntity.entityInstance %>Service, 'add<%= otherEntity.entityAngularName %>ToCollectionIfMissing').mockReturnValue(expectedCollection); @@ -179,11 +153,7 @@ describe('<%= entityAngularName %> Management Update Component', () => { <%_ for (const relationshipsByEntityNeedingOptions of allRelationshipsByEntityNeedingOptions) { _%> <%_ for (const relationship of relationshipsByEntityNeedingOptions) { _%> <%_ const otherEntity = relationship.otherEntity _%> -<<<<<<< HEAD const <%= relationship.relationshipName %>: I<%= otherEntity.entityAngularName %> = <%- otherEntity.tsPrimaryKeySamples[0] %>; -======= - const <%= relationship.relationshipName %>: I<%= otherEntity.entityAngularName %> = <%- generateTestEntityPrimaryKey(otherEntity.primaryKey) %>; ->>>>>>> 6a2ff33b25 (generator-specific entity) <%= entityInstance %>.<%= relationship.reference.name %> = <%= relationship.collection ? `[${relationship.relationshipName}]` : relationship.relationshipName %>; <%_ } _%> <%_ } _%> @@ -284,13 +254,8 @@ _%> _%> describe('compare<%= otherEntity.entityAngularName %>', () => { it('Should forward to <%= otherEntity.entityInstance %>Service', () => { -<<<<<<< HEAD const entity = <%- otherEntity.tsPrimaryKeySamples[0] %>; const entity2 = <%- otherEntity.tsPrimaryKeySamples[1] %>; -======= - const entity = <%- generateTestEntityPrimaryKey(otherEntity.primaryKey, 0) %>; - const entity2 = <%- generateTestEntityPrimaryKey(otherEntity.primaryKey, 1) %>; ->>>>>>> 6a2ff33b25 (generator-specific entity) jest.spyOn(<%= otherEntity.entityInstance %>Service, 'compare<%= otherEntity.entityAngularName %>'); comp.compare<%= otherEntity.entityAngularName %>(entity, entity2); expect(<%= otherEntity.entityInstance %>Service.compare<%= otherEntity.entityAngularName %>).toHaveBeenCalledWith(entity, entity2); diff --git a/generators/angular/types-deprecated.d.ts b/generators/angular/types-partial.d.ts similarity index 91% rename from generators/angular/types-deprecated.d.ts rename to generators/angular/types-partial.d.ts index 8b87e0995352..d644bbf8de16 100644 --- a/generators/angular/types-deprecated.d.ts +++ b/generators/angular/types-partial.d.ts @@ -17,7 +17,7 @@ * limitations under the License. */ /** - * Will be deprecated and merged into AngularApplication + * @deprecated Will be deprecated and merged into types.d/AngularApplication */ export type PartialAngularApplication = { angularLocaleId: string; diff --git a/generators/angular/types.d.ts b/generators/angular/types.d.ts index 16072576f5b1..003bc6264e4a 100644 --- a/generators/angular/types.d.ts +++ b/generators/angular/types.d.ts @@ -27,7 +27,7 @@ export interface AngularEntity extends Entity { * @param wrapped if the value should be within quotes * @returns {string|number|string} */ - generateTestEntityId: (primaryKey: any, index?: number, wrapped?: boolean) => any; + generateTestEntityId: (primaryKey: any, index?: 0 | 1 | 'random', wrapped?: boolean) => any; /** * @private * Create a angular form path getter method of reference. diff --git a/generators/client/types.d.ts b/generators/client/types.d.ts index 9a63abee9b39..0f1071ace6d2 100644 --- a/generators/client/types.d.ts +++ b/generators/client/types.d.ts @@ -3,7 +3,7 @@ import type { ExportApplicationPropertiesFromCommand } from '../../lib/command/i import type { CypressApplication } from '../cypress/types.js'; import type { JavaScriptApplication, JavaScriptSourceType } from '../javascript/types.js'; import type { PostWritingEntitiesTaskParam } from '../../lib/types/application/tasks.js'; -import type { PartialAngularApplication } from '../angular/types-deprecated.js'; +import type { PartialAngularApplication } from '../angular/types-partial.js'; import type Command from './command.ts'; type ApplicationClientProperties = ExportApplicationPropertiesFromCommand; From 9db1d9ca42c76e8d9d811002855bbad098ae1260 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sat, 16 Nov 2024 13:42:38 +0100 Subject: [PATCH 18/26] some more improvement --- generators/angular/generator.ts | 3 +-- .../angular/support/translate-angular.ts | 5 +--- .../app/entities/entity-navbar-items.ts.ejs | 2 +- generators/angular/types.d.ts | 2 +- generators/base/types.d.ts | 1 - generators/client/support/template-utils.ts | 24 +++++++++---------- 6 files changed, 15 insertions(+), 22 deletions(-) diff --git a/generators/angular/generator.ts b/generators/angular/generator.ts index b65e51a518f0..a00d55768ede 100644 --- a/generators/angular/generator.ts +++ b/generators/angular/generator.ts @@ -179,7 +179,6 @@ export default class AngularGenerator extends BaseApplicationGenerator< ...(entity.entityReadAuthority?.split(',') ?? []), ]), }); - entity.generateEntityClientEnumImports = fields => { return getClientEnumImportsFormat(fields, ANGULAR); }; @@ -246,7 +245,7 @@ export default class AngularGenerator extends BaseApplicationGenerator< return this.asDefaultTaskGroup({ loadEntities({ application }) { const entities = this.sharedData.getEntities().map(({ entity }) => entity); - application.frontendEntities = entities.filter(entity => !entity.builtIn && !entity.skipClient); + application.angularEntities = entities.filter(entity => !entity.builtIn && !entity.skipClient); }, queueTranslateTransform({ control, application }) { const { enableTranslation, jhiPrefix } = application; diff --git a/generators/angular/support/translate-angular.ts b/generators/angular/support/translate-angular.ts index 94f08b68535e..4f8bb781db79 100644 --- a/generators/angular/support/translate-angular.ts +++ b/generators/angular/support/translate-angular.ts @@ -332,10 +332,7 @@ export const createTranslationReplacer = (getWebappTranslation: GetWebappTransla const minimatch = new Minimatch('**/*{.html,.ts}'); export const isTranslatedAngularFile = file => minimatch.match(file.path); -export const translateAngularFilesTransform = ( - getWebappTranslation: (s: string, val?: Record) => string, - opts: ReplacerOptions | boolean, -) => { +export const translateAngularFilesTransform = (getWebappTranslation: GetWebappTranslationCallback, 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/angular/templates/src/main/webapp/app/entities/entity-navbar-items.ts.ejs b/generators/angular/templates/src/main/webapp/app/entities/entity-navbar-items.ts.ejs index 79ea8475b812..af98e480338a 100644 --- a/generators/angular/templates/src/main/webapp/app/entities/entity-navbar-items.ts.ejs +++ b/generators/angular/templates/src/main/webapp/app/entities/entity-navbar-items.ts.ejs @@ -19,7 +19,7 @@ import NavbarItem from 'app/layouts/navbar/navbar-item.model'; export const EntityNavbarItems: NavbarItem[] = [ -<%_ for (const entity of frontendEntities) { _%> +<%_ for (const entity of angularEntities) { _%> { name: '<%= entity.entityAngularName %>', route: '/<%= entity.entityPage %>', diff --git a/generators/angular/types.d.ts b/generators/angular/types.d.ts index 003bc6264e4a..d87d6d5b8f05 100644 --- a/generators/angular/types.d.ts +++ b/generators/angular/types.d.ts @@ -65,7 +65,7 @@ export interface AngularEntity extends Entity { export type AngularApplication = { angularLocaleId: string; - frontendEntities: any[]; + angularEntities: AngularEntity[]; /** * Get the typescript type of a non-composite primary key * @param primaryKey the primary key of the entity diff --git a/generators/base/types.d.ts b/generators/base/types.d.ts index 0d994ea9acde..450fa3b2e971 100644 --- a/generators/base/types.d.ts +++ b/generators/base/types.d.ts @@ -31,5 +31,4 @@ export type Control = BaseApplicationControlProperties & { */ cleanupFiles: (cleanup: CleanupArgumentType) => Promise | ((oldVersion: string, cleanup: CleanupArgumentType) => Promise); getWebappTranslation?: GetWebappTranslationCallback; - // getWebappTranslation: (s: string, data?: Record) => string; }; diff --git a/generators/client/support/template-utils.ts b/generators/client/support/template-utils.ts index a5625c1908d2..2a348d39ebb2 100644 --- a/generators/client/support/template-utils.ts +++ b/generators/client/support/template-utils.ts @@ -77,21 +77,19 @@ export const generateEntityClientImports = (relationships, dto?, clientFramework * @param {string} clientFramework the client framework, 'angular' or 'react'. * @returns typeImports: Map */ -export const generateEntityClientEnumImports = (fields: Field[] | undefined, clientFramework: string) => { +export const generateEntityClientEnumImports = (fields: Field[], clientFramework: string) => { const typeImports = new Map(); const uniqueEnums = {}; - 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); - } - }); + for (const field of fields) { + 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; }; From 626cfa083c450adb36d0551ffaba07235f2c7c81 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Sat, 16 Nov 2024 13:52:20 +0100 Subject: [PATCH 19/26] fix snapshots --- generators/app/__snapshots__/generator.spec.ts.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generators/app/__snapshots__/generator.spec.ts.snap b/generators/app/__snapshots__/generator.spec.ts.snap index 42b0a045769b..fb01acc8a601 100644 --- a/generators/app/__snapshots__/generator.spec.ts.snap +++ b/generators/app/__snapshots__/generator.spec.ts.snap @@ -218,6 +218,7 @@ exports[`generator - app with default config should match snapshot 1`] = ` "addOpenapiGeneratorPlugin": undefined, "addPrettierExtensions": [Function], "addSpringMilestoneRepository": false, + "angularEntities": [], "angularLocaleId": "en", "anyEntityHasRelationshipWithUser": false, "applicationType": "monolith", @@ -476,7 +477,6 @@ exports[`generator - app with default config should match snapshot 1`] = ` "fakerSeed": undefined, "feignClient": false, "frontendAppName": "jhipsterApp", - "frontendEntities": [], "gatewayRoutes": undefined, "gatewayServerPort": undefined, "gatewayServicesApiAvailable": undefined, @@ -874,6 +874,7 @@ exports[`generator - app with gateway should match snapshot 1`] = ` "addOpenapiGeneratorPlugin": undefined, "addPrettierExtensions": [Function], "addSpringMilestoneRepository": false, + "angularEntities": [], "angularLocaleId": "en", "anyEntityHasRelationshipWithUser": false, "applicationType": "gateway", @@ -1134,7 +1135,6 @@ exports[`generator - app with gateway should match snapshot 1`] = ` "fakerSeed": undefined, "feignClient": false, "frontendAppName": "jhipsterApp", - "frontendEntities": [], "gatewayRoutes": [], "gatewayServerPort": undefined, "gatewayServicesApiAvailable": true, From 6a78aa337f3fcbc3f38c92a6b421b21699f25f47 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Tue, 19 Nov 2024 20:52:11 +0100 Subject: [PATCH 20/26] remove unused methods --- generators/angular/generator.ts | 32 +++---------------------------- generators/angular/types.d.ts | 27 +------------------------- lib/types/application/entity.d.ts | 3 +-- 3 files changed, 5 insertions(+), 57 deletions(-) diff --git a/generators/angular/generator.ts b/generators/angular/generator.ts index a00d55768ede..90da3c05057b 100644 --- a/generators/angular/generator.ts +++ b/generators/angular/generator.ts @@ -22,12 +22,7 @@ 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'; import { clientFrameworkTypes } from '../../lib/jhipster/index.js'; -import { - generateTypescriptTestEntity as generateTestEntity, - generateEntityClientEnumImports as getClientEnumImportsFormat, - generateTestEntityId as getTestEntityId, - generateTestEntityPrimaryKey as getTestEntityPrimaryKey, -} from '../client/support/index.js'; +import { generateEntityClientEnumImports as getClientEnumImportsFormat } 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'; @@ -41,7 +36,6 @@ import { addItemToAdminMenu, addRoute, addToEntitiesMenu, - buildAngularFormPath as angularFormPath, isTranslatedAngularFile, translateAngularFilesTransform, } from './support/index.js'; @@ -49,11 +43,7 @@ import type { AngularApplication, AngularEntity } from './types.js'; const { ANGULAR } = clientFrameworkTypes; -export default class AngularGenerator extends BaseApplicationGenerator< - AngularEntity, - AngularApplication, - DefaultTaskTypes -> { +export default class AngularGenerator extends BaseApplicationGenerator> { async beforeQueue() { if (!this.fromBlueprint) { await this.composeWithBlueprints(); @@ -182,22 +172,6 @@ export default class AngularGenerator extends BaseApplicationGenerator< entity.generateEntityClientEnumImports = fields => { return getClientEnumImportsFormat(fields, ANGULAR); }; - - entity.generateTestEntityPrimaryKey = (primaryKey, index) => { - return getTestEntityPrimaryKey(primaryKey, index); - }; - - entity.generateTypescriptTestEntity = (references, additionalFields) => { - return generateTestEntity(references, additionalFields); - }; - - entity.buildAngularFormPath = (reference, prefix = []) => { - return angularFormPath(reference, prefix); - }; - - entity.generateTestEntityId = (primaryKey, index: 0 | 1 | 'random' = 0, wrapped = true) => { - return getTestEntityId(primaryKey, index, wrapped); - }; }, }); } @@ -245,7 +219,7 @@ export default class AngularGenerator extends BaseApplicationGenerator< return this.asDefaultTaskGroup({ loadEntities({ application }) { const entities = this.sharedData.getEntities().map(({ entity }) => entity); - application.angularEntities = entities.filter(entity => !entity.builtIn && !entity.skipClient); + application.angularEntities = entities.filter(entity => !entity.builtIn && !entity.skipClient) as AngularEntity[]; }, queueTranslateTransform({ control, application }) { const { enableTranslation, jhiPrefix } = application; diff --git a/generators/angular/types.d.ts b/generators/angular/types.d.ts index d87d6d5b8f05..a9007d9d4956 100644 --- a/generators/angular/types.d.ts +++ b/generators/angular/types.d.ts @@ -16,35 +16,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import type { Entity } from '../../lib/types/application/entity.js'; import type { ApplicationType } from '../../lib/types/application/application.js'; +import type { Entity } from '../../lib/types/application/index.js'; export interface AngularEntity extends Entity { - /** - * generates a value for a primary key type - * @param primaryKey the primary key attribute (or its type) of the entity - * @param index an index to add salt to the value - * @param wrapped if the value should be within quotes - * @returns {string|number|string} - */ - generateTestEntityId: (primaryKey: any, index?: 0 | 1 | 'random', wrapped?: boolean) => any; - /** - * @private - * Create a angular form path getter method of reference. - * - * @param {object} reference - * @param {string[]} prefix - * @return {string} - */ - buildAngularFormPath: (reference: any, prefix?: never[]) => string; - /** - * @private - * Generate a test entity instance with faked values. - * - * @param {any} references - references to other entities. - * @param {any} additionalFields - additional fields to add to the entity or with default values that overrides generated values. - */ - generateTypescriptTestEntity: (references: any, additionalFields: any) => string; /** * @private * Generate a test entity, for the PK references (when the PK is a composite, derived key) diff --git a/lib/types/application/entity.d.ts b/lib/types/application/entity.d.ts index 9fb65b617836..1fca34a980fc 100644 --- a/lib/types/application/entity.d.ts +++ b/lib/types/application/entity.d.ts @@ -45,8 +45,7 @@ type ClientSample = Record; export interface Entity extends Omit>, 'relationships'>, - ServerEntity, - AngularEntity { + ServerEntity { changelogDateForRecent: any; /** @experimental */ auditableEntity?: boolean; From 975ff27cdfae427c2b538e909b0f111bd9c71f3d Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Wed, 20 Nov 2024 21:11:23 +0100 Subject: [PATCH 21/26] remove some unused comment --- generators/angular/types.d.ts | 15 +-------------- generators/client/types.d.ts | 2 +- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/generators/angular/types.d.ts b/generators/angular/types.d.ts index a9007d9d4956..bff6810f2e71 100644 --- a/generators/angular/types.d.ts +++ b/generators/angular/types.d.ts @@ -21,14 +21,7 @@ import type { Entity } from '../../lib/types/application/index.js'; export interface AngularEntity extends Entity { /** - * @private - * Generate a test entity, for the PK references (when the PK is a composite, derived key) - * - * @param {any} primaryKey - primary key definition. - * @param {number} [index] - index of the primary key sample, pass undefined for a random key. - */ - generateTestEntityPrimaryKey: (primaryKey: any, index: any) => string; - /** + * @experimental to be replaced with a calculated property * 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 * @returns {typeImports:Map} the fields that potentially contains some enum types @@ -41,10 +34,4 @@ export interface AngularEntity extends Entity { export type AngularApplication = { angularLocaleId: string; angularEntities: AngularEntity[]; - /** - * Get the typescript type of a non-composite primary key - * @param primaryKey the primary key of the entity - * @returns {string} the typescript type. - */ - getTypescriptKeyType: (primaryKey: any) => 'string' | 'number'; } & ApplicationType; diff --git a/generators/client/types.d.ts b/generators/client/types.d.ts index 0f1071ace6d2..7fabf7561219 100644 --- a/generators/client/types.d.ts +++ b/generators/client/types.d.ts @@ -18,7 +18,7 @@ export type FrontendApplication = ApplicationClientProperties & }; /** - * Deprecated in favor of frontend application. + * @deprecated in favor of frontend application. */ export type ClientApplication = JavaScriptApplication & PartialAngularApplication & FrontendApplication; From 19f38c23f1a0000bfdf4e80b62726088e56a224b Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Wed, 20 Nov 2024 21:21:39 +0100 Subject: [PATCH 22/26] more attributes on entity --- generators/spring-boot/command.ts | 2 +- generators/spring-boot/generator.ts | 4 +--- generators/spring-boot/prompts.ts | 2 +- lib/types/application/entity.d.ts | 2 ++ 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/generators/spring-boot/command.ts b/generators/spring-boot/command.ts index e53d06fb43ce..86816058d306 100644 --- a/generators/spring-boot/command.ts +++ b/generators/spring-boot/command.ts @@ -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', diff --git a/generators/spring-boot/generator.ts b/generators/spring-boot/generator.ts index 89b4c5cd2fa8..8ffe091f742a 100644 --- a/generators/spring-boot/generator.ts +++ b/generators/spring-boot/generator.ts @@ -51,7 +51,6 @@ import { APPLICATION_TYPE_MICROSERVICE, applicationTypes, cacheTypes, - clientFrameworkTypes, databaseTypes, fieldTypes, messageBrokerTypes, @@ -72,7 +71,6 @@ 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; @@ -209,7 +207,7 @@ export default class SpringBootGenerator extends BaseApplicationGenerator { return this.asComposingComponentTaskGroup({ async composing() { const { clientFramework, skipClient } = this.jhipsterConfigWithDefaults; - if (!skipClient && clientFramework !== NO_CLIENT) { + if (!skipClient && clientFramework !== 'no') { // When using prompts, clientFramework will only be known after composing priority. await this.composeWithJHipster('jhipster:java:node'); } diff --git a/generators/spring-boot/prompts.ts b/generators/spring-boot/prompts.ts index 16d77e101fdd..59415cbc86d3 100644 --- a/generators/spring-boot/prompts.ts +++ b/generators/spring-boot/prompts.ts @@ -94,7 +94,7 @@ export async function askForServerSideOpts(this: CoreGenerator, { control }) { }); } opts.push({ - value: COUCHBASE, + value: 'couchbase', name: '[BETA] Couchbase', }); opts.push({ diff --git a/lib/types/application/entity.d.ts b/lib/types/application/entity.d.ts index 1fca34a980fc..12349e75f817 100644 --- a/lib/types/application/entity.d.ts +++ b/lib/types/application/entity.d.ts @@ -120,6 +120,8 @@ export interface Entity Date: Mon, 25 Nov 2024 16:59:30 +0100 Subject: [PATCH 23/26] add experimental comment Co-authored-by: Marcelo Shima --- generators/angular/types.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/generators/angular/types.d.ts b/generators/angular/types.d.ts index bff6810f2e71..83036e6f5ed5 100644 --- a/generators/angular/types.d.ts +++ b/generators/angular/types.d.ts @@ -33,5 +33,6 @@ export interface AngularEntity extends Entity { export type AngularApplication = { angularLocaleId: string; + /** @experimental to be replaced with needles */ angularEntities: AngularEntity[]; } & ApplicationType; From b3b41fe5f98883cdae065af442400dd320d73b07 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Thu, 28 Nov 2024 22:21:47 +0100 Subject: [PATCH 24/26] keep all angular types but deprecate --- generators/angular/types-partial.d.ts | 8 ++++++++ lib/types/application/entity.d.ts | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/generators/angular/types-partial.d.ts b/generators/angular/types-partial.d.ts index d644bbf8de16..45913efc6e82 100644 --- a/generators/angular/types-partial.d.ts +++ b/generators/angular/types-partial.d.ts @@ -22,3 +22,11 @@ export type PartialAngularApplication = { angularLocaleId: string; }; + +/** + * @deprecated Will be deprecated and merged into types.d/AngularEntity + */ +export type PartialAngularEntity = { + entityAngularAuthorities?: string; + entityAngularReadAuthorities?: string; +}; diff --git a/lib/types/application/entity.d.ts b/lib/types/application/entity.d.ts index 12349e75f817..8af049b96112 100644 --- a/lib/types/application/entity.d.ts +++ b/lib/types/application/entity.d.ts @@ -24,6 +24,7 @@ import type { Field as BaseField } from '../base/field.js'; import type { Relationship as BaseRelationship } from '../base/relationship.js'; import type { FieldType } from '../../application/field-types.ts'; import type { FakerWithRandexp } from '../../../generators/base/support/faker.ts'; +import type { PartialAngularEntity } from '../../../generators/angular/types-partial.js'; import type { Field } from './field.js'; import type { Relationship } from './relationship.js'; @@ -45,7 +46,8 @@ type ClientSample = Record; export interface Entity extends Omit>, 'relationships'>, - ServerEntity { + ServerEntity, + PartialAngularEntity { changelogDateForRecent: any; /** @experimental */ auditableEntity?: boolean; From 5c1bbeddab93356cafd61b9289315a69ad9502c8 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Wed, 4 Dec 2024 21:34:00 +0100 Subject: [PATCH 25/26] remove duplicate methods --- generators/angular/types.d.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/generators/angular/types.d.ts b/generators/angular/types.d.ts index 83036e6f5ed5..004db4c1fcba 100644 --- a/generators/angular/types.d.ts +++ b/generators/angular/types.d.ts @@ -27,8 +27,6 @@ export interface AngularEntity extends Entity { * @returns {typeImports:Map} the fields that potentially contains some enum types */ generateEntityClientEnumImports: (fields: any) => Map; - entityAngularAuthorities?: string; - entityAngularReadAuthorities?: string; } export type AngularApplication = { From 9acbf83aa6695137ae3ed15dd3953ae38f037103 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Wed, 4 Dec 2024 21:42:38 +0100 Subject: [PATCH 26/26] remove duplicate methods --- generators/angular/types.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/generators/angular/types.d.ts b/generators/angular/types.d.ts index 004db4c1fcba..5ac8bda7d279 100644 --- a/generators/angular/types.d.ts +++ b/generators/angular/types.d.ts @@ -30,7 +30,6 @@ export interface AngularEntity extends Entity { } export type AngularApplication = { - angularLocaleId: string; /** @experimental to be replaced with needles */ angularEntities: AngularEntity[]; } & ApplicationType;