From b328a56b1bfc3aee4ee4a7e339e3bb6695ac9614 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Mon, 23 Sep 2024 21:50:31 -0300 Subject: [PATCH 01/14] use queueCommandTasks --- generators/angular-audit/generator.js | 4 ++++ generators/client/generator.js | 2 +- generators/java-audit/generator.js | 4 ++++ generators/languages/generator.js | 2 +- generators/server/generator.js | 14 +------------- generators/spring-boot-custom-audit/generator.js | 4 ++++ generators/spring-boot-javers/generator.js | 4 ++++ 7 files changed, 19 insertions(+), 15 deletions(-) diff --git a/generators/angular-audit/generator.js b/generators/angular-audit/generator.js index 3460946..00eab2f 100644 --- a/generators/angular-audit/generator.js +++ b/generators/angular-audit/generator.js @@ -4,6 +4,10 @@ import { clientApplicationTemplatesBlock } from 'generator-jhipster/generators/c export default class extends BaseApplicationGenerator { ngxDiff; + constructor(args, opts, features) { + super(args, opts, { ...features, queueCommandTasks: true }); + } + async beforeQueue() { await this.dependsOnJHipster('bootstrap-application'); } diff --git a/generators/client/generator.js b/generators/client/generator.js index e1bc9ad..58c7962 100644 --- a/generators/client/generator.js +++ b/generators/client/generator.js @@ -2,7 +2,7 @@ import BaseApplicationGenerator from 'generator-jhipster/generators/base-applica export default class extends BaseApplicationGenerator { constructor(args, opts, features) { - super(args, opts, { ...features, sbsBlueprint: true }); + super(args, opts, { ...features, queueCommandTasks: true, sbsBlueprint: true }); } async beforeQueue() { diff --git a/generators/java-audit/generator.js b/generators/java-audit/generator.js index ff86375..d9bb11d 100644 --- a/generators/java-audit/generator.js +++ b/generators/java-audit/generator.js @@ -38,6 +38,10 @@ const ADDITIONAL_FIELDS = [ ]; export default class extends BaseApplicationGenerator { + constructor(args, opts, features) { + super(args, opts, { ...features, queueCommandTasks: true }); + } + async beforeQueue() { await this.dependsOnJHipster('java'); } diff --git a/generators/languages/generator.js b/generators/languages/generator.js index 7621f7b..a2cc2fe 100644 --- a/generators/languages/generator.js +++ b/generators/languages/generator.js @@ -4,7 +4,7 @@ import BaseApplicationGenerator from 'generator-jhipster/generators/base-applica export default class extends BaseApplicationGenerator { constructor(args, opts, features) { - super(args, opts, { ...features, sbsBlueprint: true }); + super(args, opts, { ...features, queueCommandTasks: true, sbsBlueprint: true }); } async beforeQueue() { diff --git a/generators/server/generator.js b/generators/server/generator.js index 6906389..01c3edd 100644 --- a/generators/server/generator.js +++ b/generators/server/generator.js @@ -1,12 +1,11 @@ import BaseApplicationGenerator from 'generator-jhipster/generators/base-application'; -import command from './command.js'; export default class extends BaseApplicationGenerator { initialRun; auditedEntities; constructor(args, opts, features) { - super(args, opts, { ...features, sbsBlueprint: true }); + super(args, opts, { ...features, queueCommandTasks: true, sbsBlueprint: true }); } get [BaseApplicationGenerator.INITIALIZING]() { @@ -14,17 +13,6 @@ export default class extends BaseApplicationGenerator { setInitialRun() { this.initialRun = this.blueprintConfig.auditFramework === undefined; }, - async initializeOptions() { - this.parseJHipsterCommand(command); - }, - }); - } - - get [BaseApplicationGenerator.PROMPTING]() { - return this.asPromptingTaskGroup({ - async promptingTemplateTask() { - await this.prompt(this.prepareQuestions(command.configs)); - }, }); } diff --git a/generators/spring-boot-custom-audit/generator.js b/generators/spring-boot-custom-audit/generator.js index c03f440..259587f 100644 --- a/generators/spring-boot-custom-audit/generator.js +++ b/generators/spring-boot-custom-audit/generator.js @@ -3,6 +3,10 @@ import BaseApplicationGenerator from 'generator-jhipster/generators/base-applica import { javaMainPackageTemplatesBlock, javaTestPackageTemplatesBlock } from 'generator-jhipster/generators/java/support'; export default class extends BaseApplicationGenerator { + constructor(args, opts, features) { + super(args, opts, { ...features, queueCommandTasks: true }); + } + async beforeQueue() { await this.dependsOnJHipster('jhipster-entity-audit:java-audit'); await this.dependsOnJHipster('spring-boot'); diff --git a/generators/spring-boot-javers/generator.js b/generators/spring-boot-javers/generator.js index 3e2c2bb..3cf04fc 100644 --- a/generators/spring-boot-javers/generator.js +++ b/generators/spring-boot-javers/generator.js @@ -4,6 +4,10 @@ import { javaMainPackageTemplatesBlock } from 'generator-jhipster/generators/jav import { getPomVersionProperties } from 'generator-jhipster/generators/server/support'; export default class extends BaseApplicationGenerator { + constructor(args, opts, features) { + super(args, opts, { ...features, queueCommandTasks: true }); + } + async beforeQueue() { await this.dependsOnJHipster('jhipster-entity-audit:java-audit'); await this.dependsOnJHipster('spring-boot'); From 37d0ad0621f8f1c28183fe8453b482e612ed2966 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Mon, 23 Sep 2024 21:50:40 -0300 Subject: [PATCH 02/14] update package-lock --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index d12ea46..b0a30b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "yeoman-test": ">=8.2.0" }, "engines": { - "generator-jhipster": "8.7.1", + "generator-jhipster": "^8.7.1", "node": "^18.19.0 || >= 20.6.1" } }, From 2c221238bfbf50c92ef832fe985fae0218e1954b Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Wed, 9 Oct 2024 14:28:32 -0300 Subject: [PATCH 03/14] Update command.js --- generators/java-audit/command.js | 68 +++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/generators/java-audit/command.js b/generators/java-audit/command.js index ea17f84..4281dd3 100644 --- a/generators/java-audit/command.js +++ b/generators/java-audit/command.js @@ -1,5 +1,71 @@ import { asCommand } from 'generator-jhipster'; export default asCommand({ - configs: {}, + configs: { + auditFramework: { + description: 'Audit framework', + cli: { + type: String, + }, + prompt: { + type: 'list', + message: 'Choose which audit framework you would like to use.', + default: 'custom', + }, + choices: [ + { + name: 'Custom JHipster auditing (works with SQL)', + value: 'custom', + }, + { + name: 'Javers auditing framework (works with SQL and MongoDB)', + value: 'javers', + }, + ], + scope: 'blueprint', + }, + auditPage: { + description: 'Generate client page', + cli: { + type: Boolean, + }, + prompt: { + type: 'confirm', + message: 'Do you want to add an audit log page for entities?', + default: true, + }, + scope: 'blueprint', + }, + auditUpdateType: { + cli: { + type: String, + }, + prompt: generator => ({ + when: answers => (generator.initialRun || generator.options.askAnswered) && ['javers', 'custom'].includes(answers.auditFramework), + type: 'list', + name: 'auditUpdateType', + message: 'Do you want to enable audit for all existing entities?', + choices: [ + { name: 'Yes, update all', value: 'all' }, + { name: 'No, let me choose the entities to update', value: 'selected' }, + ], + default: 'all', + }), + scope: 'generator', + }, + auditedEntities: { + description: 'Entities to be audited', + cli: { + type: Array, + }, + prompt: gen => ({ + when: answers => answers.auditUpdateType === 'selected', + type: 'checkbox', + message: 'Please choose the entities to be audited', + choices: gen.getExistingEntities().map(e => e.name), + default: [], + }), + scope: 'generator', + }, + }, }); From dc7f64c5c9cac705193dd07ed67edcf00ccadf70 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Wed, 9 Oct 2024 14:30:22 -0300 Subject: [PATCH 04/14] Update command.js --- generators/server/command.js | 69 ++---------------------------------- 1 file changed, 2 insertions(+), 67 deletions(-) diff --git a/generators/server/command.js b/generators/server/command.js index 69febfb..2023562 100644 --- a/generators/server/command.js +++ b/generators/server/command.js @@ -2,71 +2,6 @@ import { asCommand } from 'generator-jhipster'; export default asCommand({ options: {}, - configs: { - auditFramework: { - description: 'Audit framework', - cli: { - type: String, - }, - prompt: { - type: 'list', - message: 'Choose which audit framework you would like to use.', - default: 'custom', - }, - choices: [ - { - name: 'Custom JHipster auditing (works with SQL)', - value: 'custom', - }, - { - name: 'Javers auditing framework (works with SQL and MongoDB)', - value: 'javers', - }, - ], - scope: 'blueprint', - }, - auditPage: { - description: 'Generate client page', - cli: { - type: Boolean, - }, - prompt: { - type: 'confirm', - message: 'Do you want to add an audit log page for entities?', - default: true, - }, - scope: 'blueprint', - }, - auditUpdateType: { - cli: { - type: String, - }, - prompt: generator => ({ - when: answers => (generator.initialRun || generator.options.askAnswered) && ['javers', 'custom'].includes(answers.auditFramework), - type: 'list', - name: 'auditUpdateType', - message: 'Do you want to enable audit for all existing entities?', - choices: [ - { name: 'Yes, update all', value: 'all' }, - { name: 'No, let me choose the entities to update', value: 'selected' }, - ], - default: 'all', - }), - scope: 'generator', - }, - auditedEntities: { - description: 'Entities to be audited', - cli: { - type: Array, - }, - prompt: gen => ({ - when: answers => answers.auditUpdateType === 'selected', - type: 'checkbox', - message: 'Please choose the entities to be audited', - choices: gen.getExistingEntities().map(e => e.name), - default: [], - }), - scope: 'generator', - }, - }, + configs: {}, + import: ['jhipster-entity-audit:java-audit'], }); From ff406dc04adc991f8b53bb0ce41443b731e49f31 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Wed, 9 Oct 2024 14:33:46 -0300 Subject: [PATCH 05/14] Update generator.js --- generators/server/generator.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/generators/server/generator.js b/generators/server/generator.js index 01c3edd..c36fdd2 100644 --- a/generators/server/generator.js +++ b/generators/server/generator.js @@ -1,28 +1,14 @@ import BaseApplicationGenerator from 'generator-jhipster/generators/base-application'; export default class extends BaseApplicationGenerator { - initialRun; - auditedEntities; - constructor(args, opts, features) { super(args, opts, { ...features, queueCommandTasks: true, sbsBlueprint: true }); } - get [BaseApplicationGenerator.INITIALIZING]() { - return this.asInitializingTaskGroup({ - setInitialRun() { - this.initialRun = this.blueprintConfig.auditFramework === undefined; - }, - }); - } - get [BaseApplicationGenerator.COMPOSING]() { return this.asComposingTaskGroup({ async composingTask() { - if (this.blueprintConfig.auditFramework && this.blueprintConfig.auditFramework !== 'no') { - const auditedEntities = this.auditUpdateType === 'all' ? this.getExistingEntities().map(e => e.name) : this.auditedEntities; - await this.composeWithJHipster('jhipster-entity-audit:java-audit', { generatorOptions: { auditedEntities } }); - } + await this.composeWithJHipster('jhipster-entity-audit:java-audit'); }, }); } From b86833208363b28ba3694fa1cdb1aa6bd556c4c0 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Wed, 9 Oct 2024 15:21:55 -0300 Subject: [PATCH 06/14] Update generator.js --- generators/java-audit/generator.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/generators/java-audit/generator.js b/generators/java-audit/generator.js index d9bb11d..b1e94c8 100644 --- a/generators/java-audit/generator.js +++ b/generators/java-audit/generator.js @@ -38,6 +38,9 @@ const ADDITIONAL_FIELDS = [ ]; export default class extends BaseApplicationGenerator { + auditUpdateType; + auditedEntities; + constructor(args, opts, features) { super(args, opts, { ...features, queueCommandTasks: true }); } @@ -53,6 +56,8 @@ export default class extends BaseApplicationGenerator { await this.composeWithJHipster('jhipster-entity-audit:spring-boot-javers'); } else if (this.blueprintConfig.auditFramework === 'custom') { await this.composeWithJHipster('jhipster-entity-audit:spring-boot-custom-audit'); + } else { + this.cancelCancelableTasks(); } }, }); @@ -94,7 +99,7 @@ export default class extends BaseApplicationGenerator { get [BaseApplicationGenerator.CONFIGURING_EACH_ENTITY]() { return this.asConfiguringEachEntityTaskGroup({ async configureEntity({ entityName, entityConfig }) { - const { auditedEntities } = this.options; + const auditedEntities = this.auditUpdateType === 'all' ? this.getExistingEntities().map(e => e.name) : this.auditedEntities; entityConfig.enableAudit = auditedEntities?.includes(entityName) || entityConfig.enableAudit; if (!entityConfig.enableAudit) return; From 46c6d5cb5972bd27be01725a641b2a9900a1a9b9 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Wed, 9 Oct 2024 15:27:08 -0300 Subject: [PATCH 07/14] Update generator.js --- generators/java-audit/generator.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/generators/java-audit/generator.js b/generators/java-audit/generator.js index b1e94c8..9bcaacc 100644 --- a/generators/java-audit/generator.js +++ b/generators/java-audit/generator.js @@ -49,6 +49,14 @@ export default class extends BaseApplicationGenerator { await this.dependsOnJHipster('java'); } + get [BaseApplicationGenerator.INITIALIZING]() { + return this.asInitializingTaskGroup({ + setInitialRun() { + this.initialRun = this.blueprintConfig.auditFramework === undefined; + }, + }); + } + get [BaseApplicationGenerator.COMPOSING]() { return this.asComposingTaskGroup({ async composingTask() { From 4f6e52295bf4d1985edb90c9a073ef76c2f43424 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Wed, 9 Oct 2024 15:36:17 -0300 Subject: [PATCH 08/14] Update generator.js --- generators/java-audit/generator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/java-audit/generator.js b/generators/java-audit/generator.js index 9bcaacc..46d96a6 100644 --- a/generators/java-audit/generator.js +++ b/generators/java-audit/generator.js @@ -65,7 +65,7 @@ export default class extends BaseApplicationGenerator { } else if (this.blueprintConfig.auditFramework === 'custom') { await this.composeWithJHipster('jhipster-entity-audit:spring-boot-custom-audit'); } else { - this.cancelCancelableTasks(); + this.cancelCancellableTasks(); } }, }); From 9c3ddaeef6e2a22bcb01ba910c27dbae77723ce9 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Wed, 9 Oct 2024 16:29:38 -0300 Subject: [PATCH 09/14] Update generator.spec.js --- generators/java-audit/generator.spec.js | 1 - 1 file changed, 1 deletion(-) diff --git a/generators/java-audit/generator.spec.js b/generators/java-audit/generator.spec.js index fc5f368..f965224 100644 --- a/generators/java-audit/generator.spec.js +++ b/generators/java-audit/generator.spec.js @@ -34,7 +34,6 @@ describe('SubGenerator java-audit of entity-audit JHipster blueprint', () => { expect(result.getStateSnapshot()).toMatchSnapshot(); }); it('entities should extend AbstractAuditingEntity', () => { - // TODO remove jhi extension result.assertFileContent('src/main/java/com/mycompany/myapp/domain/Audited.java', ' AbstractAuditingEntity<'); }); }); From a0e2921c06ebd80e3a4f928e0800a816ac61e4ce Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Wed, 9 Oct 2024 16:58:30 -0300 Subject: [PATCH 10/14] Update generator.spec.js --- generators/java-audit/generator.spec.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/generators/java-audit/generator.spec.js b/generators/java-audit/generator.spec.js index f965224..250f04e 100644 --- a/generators/java-audit/generator.spec.js +++ b/generators/java-audit/generator.spec.js @@ -10,7 +10,10 @@ describe('SubGenerator java-audit of entity-audit JHipster blueprint', () => { beforeAll(async function () { await helpers .run(SUB_GENERATOR_NAMESPACE) - .withJHipsterConfig({}, [ + .withJHipsterConfig( + { + auditFramework: 'javers', + }, [ { name: 'Audited', enableAudit: true, From be74083a290bd1ad96f0b06f9af81981e83e0431 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Wed, 9 Oct 2024 17:31:08 -0300 Subject: [PATCH 11/14] test adjusts --- .../__snapshots__/generator.spec.js.snap | 96 ++++++++++++++++++- generators/java-audit/generator.spec.js | 62 ++++++------ .../__snapshots__/generator.spec.js.snap | 36 ------- generators/server/generator.spec.js | 5 +- 4 files changed, 132 insertions(+), 67 deletions(-) diff --git a/generators/java-audit/__snapshots__/generator.spec.js.snap b/generators/java-audit/__snapshots__/generator.spec.js.snap index d569f7e..fe0009b 100644 --- a/generators/java-audit/__snapshots__/generator.spec.js.snap +++ b/generators/java-audit/__snapshots__/generator.spec.js.snap @@ -1,6 +1,100 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run > should succeed 1`] = ` +exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run using auditFramework custom > should succeed 1`] = ` +{ + ".jhipster/Audited.json": { + "stateCleared": "modified", + }, + ".yo-rc.json": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/Audited.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/Authority.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/package-info.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuditedAsserts.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuditedTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuditedTestSamples.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuthorityAsserts.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuthorityTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuthorityTestSamples.java": { + "stateCleared": "modified", + }, +} +`; + +exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run using auditFramework javers > should succeed 1`] = ` +{ + ".jhipster/Audited.json": { + "stateCleared": "modified", + }, + ".yo-rc.json": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/Audited.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/Authority.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/package-info.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuditedAsserts.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuditedTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuditedTestSamples.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuthorityAsserts.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuthorityTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuthorityTestSamples.java": { + "stateCleared": "modified", + }, +} +`; + +exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run using auditFramework undefined > should succeed 1`] = ` { ".jhipster/Audited.json": { "stateCleared": "modified", diff --git a/generators/java-audit/generator.spec.js b/generators/java-audit/generator.spec.js index 250f04e..6686411 100644 --- a/generators/java-audit/generator.spec.js +++ b/generators/java-audit/generator.spec.js @@ -6,38 +6,42 @@ const SUB_GENERATOR = 'java-audit'; const SUB_GENERATOR_NAMESPACE = `jhipster-entity-audit:${SUB_GENERATOR}`; describe('SubGenerator java-audit of entity-audit JHipster blueprint', () => { - describe('run', () => { - beforeAll(async function () { - await helpers - .run(SUB_GENERATOR_NAMESPACE) - .withJHipsterConfig( - { - auditFramework: 'javers', - }, [ - { - name: 'Audited', - enableAudit: true, - fields: [ + for (const auditFramework of [undefined, 'javers', 'custom']) { + describe(`run using auditFramework ${auditFramework}`, () => { + beforeAll(async function () { + await helpers + .run(SUB_GENERATOR_NAMESPACE) + .withJHipsterConfig( + { + auditFramework, + }, + [ { - fieldName: 'name', - fieldType: 'String', + name: 'Audited', + enableAudit: true, + fields: [ + { + fieldName: 'name', + fieldType: 'String', + }, + ], }, ], - }, - ]) - .withOptions({ - creationTimestamp: '2022-01-01', - ignoreNeedlesError: true, - }) - .withJHipsterLookup() - .withParentBlueprintLookup(); - }); + ) + .withOptions({ + creationTimestamp: '2022-01-01', + ignoreNeedlesError: true, + }) + .withJHipsterLookup() + .withParentBlueprintLookup(); + }); - it('should succeed', () => { - expect(result.getStateSnapshot()).toMatchSnapshot(); - }); - it('entities should extend AbstractAuditingEntity', () => { - result.assertFileContent('src/main/java/com/mycompany/myapp/domain/Audited.java', ' AbstractAuditingEntity<'); + it('should succeed', () => { + expect(result.getStateSnapshot()).toMatchSnapshot(); + }); + it('entities should extend AbstractAuditingEntity', () => { + result.assertFileContent('src/main/java/com/mycompany/myapp/domain/Audited.java', ' AbstractAuditingEntity<'); + }); }); - }); + } }); diff --git a/generators/server/__snapshots__/generator.spec.js.snap b/generators/server/__snapshots__/generator.spec.js.snap index 21577b5..68f6379 100644 --- a/generators/server/__snapshots__/generator.spec.js.snap +++ b/generators/server/__snapshots__/generator.spec.js.snap @@ -116,18 +116,6 @@ exports[`SubGenerator server of entity-audit JHipster blueprint > run > should s "src/main/java/com/mycompany/myapp/aop/logging/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/audit/AsyncEntityAuditEventWriter.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/audit/EntityAuditEventListener.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/audit/EntityAuditEventWriter.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/audit/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/config/ApplicationProperties.java": { "stateCleared": "modified", }, @@ -182,18 +170,9 @@ exports[`SubGenerator server of entity-audit JHipster blueprint > run > should s "src/main/java/com/mycompany/myapp/domain/Authority.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/domain/EntityAuditEvent.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/domain/User.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/domain/enumeration/EntityAuditAction.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/domain/enumeration/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/domain/package-info.java": { "stateCleared": "modified", }, @@ -209,9 +188,6 @@ exports[`SubGenerator server of entity-audit JHipster blueprint > run > should s "src/main/java/com/mycompany/myapp/repository/AuthorityRepository.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/repository/EntityAuditEventRepository.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/repository/UserRepository.java": { "stateCleared": "modified", }, @@ -287,9 +263,6 @@ exports[`SubGenerator server of entity-audit JHipster blueprint > run > should s "src/main/java/com/mycompany/myapp/web/rest/AuthorityResource.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/web/rest/EntityAuditResource.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/web/rest/PublicUserResource.java": { "stateCleared": "modified", }, @@ -353,9 +326,6 @@ exports[`SubGenerator server of entity-audit JHipster blueprint > run > should s "src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml": { "stateCleared": "modified", }, - "src/main/resources/config/liquibase/changelog/20220101000100_added_entity_EntityAuditEvent.xml": { - "stateCleared": "modified", - }, "src/main/resources/config/liquibase/data/authority.csv": { "stateCleared": "modified", }, @@ -401,9 +371,6 @@ exports[`SubGenerator server of entity-audit JHipster blueprint > run > should s "src/main/webapp/i18n/en/configuration.json": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/entity-audit.json": { - "stateCleared": "modified", - }, "src/main/webapp/i18n/en/error.json": { "stateCleared": "modified", }, @@ -449,9 +416,6 @@ exports[`SubGenerator server of entity-audit JHipster blueprint > run > should s "src/test/java/com/mycompany/myapp/TechnicalStructureTest.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/audit/TestEntityAuditEventWriter.java": { - "stateCleared": "modified", - }, "src/test/java/com/mycompany/myapp/config/AsyncSyncConfiguration.java": { "stateCleared": "modified", }, diff --git a/generators/server/generator.spec.js b/generators/server/generator.spec.js index 10472b6..f546f41 100644 --- a/generators/server/generator.spec.js +++ b/generators/server/generator.spec.js @@ -17,12 +17,15 @@ describe('SubGenerator server of entity-audit JHipster blueprint', () => { blueprint: ['entity-audit'], }) .withJHipsterLookup() - .withParentBlueprintLookup(); + .withMockedGenerators(['jhipster-entity-audit:java-audit']); }); it('should succeed', () => { expect(result.getStateSnapshot()).toMatchSnapshot(); }); + it('should compose with jhipster-entity-audit:java-audit', () => { + result.assertGeneratorComposedOnce('jhipster-entity-audit:java-audit'); + }); it('should not write audit files', () => { expect(result.getStateSnapshot('**/audit/**')).toMatchObject({}); }); From 4aa9a71a969b9c46ee7fe8cdf925c2f169338ad2 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Wed, 9 Oct 2024 17:43:52 -0300 Subject: [PATCH 12/14] test adjusts --- .../__snapshots__/generator.spec.js.snap | 1199 ++++++++++++++++- generators/java-audit/command.js | 4 + generators/java-audit/generator.js | 37 +- generators/java-audit/generator.spec.js | 38 +- .../__snapshots__/generator.spec.js.snap | 3 + generators/server/generator.spec.js | 3 +- 6 files changed, 1205 insertions(+), 79 deletions(-) diff --git a/generators/java-audit/__snapshots__/generator.spec.js.snap b/generators/java-audit/__snapshots__/generator.spec.js.snap index fe0009b..0e38694 100644 --- a/generators/java-audit/__snapshots__/generator.spec.js.snap +++ b/generators/java-audit/__snapshots__/generator.spec.js.snap @@ -2,72 +2,1119 @@ exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run using auditFramework custom > should succeed 1`] = ` { + ".devcontainer/Dockerfile": { + "stateCleared": "modified", + }, + ".devcontainer/devcontainer.json": { + "stateCleared": "modified", + }, + ".editorconfig": { + "stateCleared": "modified", + }, + ".gitattributes": { + "stateCleared": "modified", + }, + ".gitignore": { + "stateCleared": "modified", + }, + ".husky/pre-commit": { + "stateCleared": "modified", + }, + ".jhipster/Audited.json": { + "stateCleared": "modified", + }, + ".lintstagedrc.cjs": { + "stateCleared": "modified", + }, + ".mvn/jvm.config": { + "stateCleared": "modified", + }, + ".mvn/wrapper/maven-wrapper.jar": { + "stateCleared": "modified", + }, + ".mvn/wrapper/maven-wrapper.properties": { + "stateCleared": "modified", + }, + ".prettierignore": { + "stateCleared": "modified", + }, + ".prettierrc": { + "stateCleared": "modified", + }, + ".yo-rc.json": { + "stateCleared": "modified", + }, + "README.md": { + "stateCleared": "modified", + }, + "checkstyle.xml": { + "stateCleared": "modified", + }, + "mvnw": { + "stateCleared": "modified", + }, + "mvnw.cmd": { + "stateCleared": "modified", + }, + "npmw": { + "stateCleared": "modified", + }, + "npmw.cmd": { + "stateCleared": "modified", + }, + "package.json": { + "stateCleared": "modified", + }, + "pom.xml": { + "stateCleared": "modified", + }, + "sonar-project.properties": { + "stateCleared": "modified", + }, + "src/main/docker/app.yml": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/dashboards/JVM.json": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/dashboards/dashboard.yml": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/datasources/datasource.yml": { + "stateCleared": "modified", + }, + "src/main/docker/jhipster-control-center.yml": { + "stateCleared": "modified", + }, + "src/main/docker/jib/entrypoint.sh": { + "stateCleared": "modified", + }, + "src/main/docker/monitoring.yml": { + "stateCleared": "modified", + }, + "src/main/docker/postgresql.yml": { + "stateCleared": "modified", + }, + "src/main/docker/prometheus/prometheus.yml": { + "stateCleared": "modified", + }, + "src/main/docker/services.yml": { + "stateCleared": "modified", + }, + "src/main/docker/sonar.yml": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/ApplicationWebXml.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/JhipsterApp.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/aop/logging/LoggingAspect.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/aop/logging/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/audit/AsyncEntityAuditEventWriter.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/audit/EntityAuditEventListener.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/audit/EntityAuditEventWriter.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/audit/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/ApplicationProperties.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/AsyncConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/CRLFLogConverter.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/CacheConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/Constants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/DatabaseConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/DateTimeFormatConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/JacksonConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/LiquibaseConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/LoggingAspectConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/LoggingConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/SecurityConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/SecurityJwtConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/StaticResourcesWebConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/WebConfigurer.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/AbstractAuditingEntity.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/Audited.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/Authority.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/EntityAuditEvent.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/User.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/enumeration/EntityAuditAction.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/enumeration/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/management/SecurityMetersService.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/management/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/repository/AuditedRepository.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/repository/AuthorityRepository.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/repository/EntityAuditEventRepository.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/repository/UserRepository.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/repository/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/AuthoritiesConstants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/DomainUserDetailsService.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/SecurityUtils.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/SpringSecurityAuditorAware.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/UserNotActivatedException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/EmailAlreadyUsedException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/InvalidPasswordException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/MailService.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/UserService.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/UsernameAlreadyUsedException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/dto/AdminUserDTO.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/dto/PasswordChangeDTO.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/dto/UserDTO.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/dto/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/mapper/UserMapper.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/mapper/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/filter/SpaWebFilter.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/filter/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/AccountResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/AuditedResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/AuthenticateController.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/AuthorityResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/EntityAuditResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/PublicUserResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/UserResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/BadRequestAlertException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/EmailAlreadyUsedException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/ErrorConstants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslator.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/FieldErrorVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/InvalidPasswordException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/LoginAlreadyUsedException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/KeyAndPasswordVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/LoginVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/ManagedUserVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/package-info.java": { + "stateCleared": "modified", + }, + "src/main/resources/banner.txt": { + "stateCleared": "modified", + }, + "src/main/resources/config/application-dev.yml": { + "stateCleared": "modified", + }, + "src/main/resources/config/application-prod.yml": { + "stateCleared": "modified", + }, + "src/main/resources/config/application-tls.yml": { + "stateCleared": "modified", + }, + "src/main/resources/config/application.yml": { + "stateCleared": "modified", + }, + "src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml": { + "stateCleared": "modified", + }, + "src/main/resources/config/liquibase/changelog/20220101000100_added_entity_EntityAuditEvent.xml": { + "stateCleared": "modified", + }, + "src/main/resources/config/liquibase/changelog/20220101000200_added_entity_Audited.xml": { + "stateCleared": "modified", + }, + "src/main/resources/config/liquibase/data/authority.csv": { + "stateCleared": "modified", + }, + "src/main/resources/config/liquibase/data/user.csv": { + "stateCleared": "modified", + }, + "src/main/resources/config/liquibase/data/user_authority.csv": { + "stateCleared": "modified", + }, + "src/main/resources/config/liquibase/fake-data/audited.csv": { + "stateCleared": "modified", + }, + "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", + }, + "src/main/resources/i18n/messages_en.properties": { + "stateCleared": "modified", + }, + "src/main/resources/logback-spring.xml": { + "stateCleared": "modified", + }, + "src/main/resources/templates/error.html": { + "stateCleared": "modified", + }, + "src/main/resources/templates/mail/activationEmail.html": { + "stateCleared": "modified", + }, + "src/main/resources/templates/mail/creationEmail.html": { + "stateCleared": "modified", + }, + "src/main/resources/templates/mail/passwordResetEmail.html": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/activate.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/adminAuthority.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/audited.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/configuration.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/error.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/global.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/health.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/home.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/login.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/logs.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/metrics.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/password.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/register.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/reset.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/sessions.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/settings.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/user-management.json": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/IntegrationTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/TechnicalStructureTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/audit/TestEntityAuditEventWriter.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/AsyncSyncConfiguration.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/CRLFLogConverterTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/EmbeddedSQL.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/PostgreSqlTestContainer.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/SpringBootTestClassOrderer.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/SqlTestContainer.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/SqlTestContainersSpringContextCustomizerFactory.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/StaticResourcesWebConfigurerTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/WebConfigurerTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/WebConfigurerTestController.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/timezone/HibernateTimeZoneIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuditedAsserts.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuditedTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuditedTestSamples.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuthorityAsserts.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuthorityTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AuthorityTestSamples.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/management/SecurityMetersServiceTests.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/repository/timezone/DateTimeWrapper.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/repository/timezone/DateTimeWrapperRepository.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/security/DomainUserDetailsServiceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/security/SecurityUtilsUnitTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/security/jwt/AuthenticationIntegrationTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/security/jwt/JwtAuthenticationTestUtils.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/security/jwt/TokenAuthenticationIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/security/jwt/TokenAuthenticationSecurityMetersIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/service/MailServiceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/service/UserServiceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/service/mapper/UserMapperTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/filter/SpaWebFilterIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/AccountResourceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/AuditedResourceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/AuthenticateControllerIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/AuthorityResourceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/PublicUserResourceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/TestUtil.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/UserResourceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/WithUnauthenticatedMockUser.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslatorIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslatorTestController.java": { + "stateCleared": "modified", + }, + "src/test/resources/META-INF/spring.factories": { + "stateCleared": "modified", + }, + "src/test/resources/config/application-testdev.yml": { + "stateCleared": "modified", + }, + "src/test/resources/config/application-testprod.yml": { + "stateCleared": "modified", + }, + "src/test/resources/config/application.yml": { + "stateCleared": "modified", + }, + "src/test/resources/i18n/messages_en.properties": { + "stateCleared": "modified", + }, + "src/test/resources/junit-platform.properties": { + "stateCleared": "modified", + }, + "src/test/resources/logback.xml": { + "stateCleared": "modified", + }, + "src/test/resources/templates/mail/activationEmail.html": { + "stateCleared": "modified", + }, + "src/test/resources/templates/mail/creationEmail.html": { + "stateCleared": "modified", + }, + "src/test/resources/templates/mail/passwordResetEmail.html": { + "stateCleared": "modified", + }, + "src/test/resources/templates/mail/testEmail.html": { + "stateCleared": "modified", + }, +} +`; + +exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run using auditFramework javers > should succeed 1`] = ` +{ + ".devcontainer/Dockerfile": { + "stateCleared": "modified", + }, + ".devcontainer/devcontainer.json": { + "stateCleared": "modified", + }, + ".editorconfig": { + "stateCleared": "modified", + }, + ".gitattributes": { + "stateCleared": "modified", + }, + ".gitignore": { + "stateCleared": "modified", + }, + ".husky/pre-commit": { + "stateCleared": "modified", + }, ".jhipster/Audited.json": { "stateCleared": "modified", }, - ".yo-rc.json": { + ".lintstagedrc.cjs": { + "stateCleared": "modified", + }, + ".mvn/jvm.config": { + "stateCleared": "modified", + }, + ".mvn/wrapper/maven-wrapper.jar": { + "stateCleared": "modified", + }, + ".mvn/wrapper/maven-wrapper.properties": { + "stateCleared": "modified", + }, + ".prettierignore": { + "stateCleared": "modified", + }, + ".prettierrc": { + "stateCleared": "modified", + }, + ".yo-rc.json": { + "stateCleared": "modified", + }, + "README.md": { + "stateCleared": "modified", + }, + "checkstyle.xml": { + "stateCleared": "modified", + }, + "mvnw": { + "stateCleared": "modified", + }, + "mvnw.cmd": { + "stateCleared": "modified", + }, + "npmw": { + "stateCleared": "modified", + }, + "npmw.cmd": { + "stateCleared": "modified", + }, + "package.json": { + "stateCleared": "modified", + }, + "pom.xml": { + "stateCleared": "modified", + }, + "sonar-project.properties": { + "stateCleared": "modified", + }, + "src/main/docker/app.yml": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/dashboards/JVM.json": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/dashboards/dashboard.yml": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/datasources/datasource.yml": { + "stateCleared": "modified", + }, + "src/main/docker/jhipster-control-center.yml": { + "stateCleared": "modified", + }, + "src/main/docker/jib/entrypoint.sh": { + "stateCleared": "modified", + }, + "src/main/docker/monitoring.yml": { + "stateCleared": "modified", + }, + "src/main/docker/postgresql.yml": { + "stateCleared": "modified", + }, + "src/main/docker/prometheus/prometheus.yml": { + "stateCleared": "modified", + }, + "src/main/docker/services.yml": { + "stateCleared": "modified", + }, + "src/main/docker/sonar.yml": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/ApplicationWebXml.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/JhipsterApp.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/aop/logging/LoggingAspect.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/aop/logging/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/ApplicationProperties.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/AsyncConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/CRLFLogConverter.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/CacheConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/Constants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/DatabaseConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/DateTimeFormatConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/JacksonConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/LiquibaseConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/LoggingAspectConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/LoggingConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/SecurityConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/SecurityJwtConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/StaticResourcesWebConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/WebConfigurer.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/audit/JaversAuthorProvider.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/audit/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/AbstractAuditingEntity.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/Audited.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/Authority.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/User.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/management/SecurityMetersService.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { + "src/main/java/com/mycompany/myapp/management/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/domain/Audited.java": { + "src/main/java/com/mycompany/myapp/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/domain/Authority.java": { + "src/main/java/com/mycompany/myapp/repository/AuditedRepository.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/domain/package-info.java": { + "src/main/java/com/mycompany/myapp/repository/AuthorityRepository.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/package-info.java": { + "src/main/java/com/mycompany/myapp/repository/UserRepository.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { + "src/main/java/com/mycompany/myapp/repository/package-info.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/domain/AuditedAsserts.java": { + "src/main/java/com/mycompany/myapp/security/AuthoritiesConstants.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/domain/AuditedTest.java": { + "src/main/java/com/mycompany/myapp/security/DomainUserDetailsService.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/domain/AuditedTestSamples.java": { + "src/main/java/com/mycompany/myapp/security/SecurityUtils.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/domain/AuthorityAsserts.java": { + "src/main/java/com/mycompany/myapp/security/SpringSecurityAuditorAware.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/domain/AuthorityTest.java": { + "src/main/java/com/mycompany/myapp/security/UserNotActivatedException.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/domain/AuthorityTestSamples.java": { + "src/main/java/com/mycompany/myapp/security/package-info.java": { "stateCleared": "modified", }, -} -`; - -exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run using auditFramework javers > should succeed 1`] = ` -{ - ".jhipster/Audited.json": { + "src/main/java/com/mycompany/myapp/service/EmailAlreadyUsedException.java": { "stateCleared": "modified", }, - ".yo-rc.json": { + "src/main/java/com/mycompany/myapp/service/InvalidPasswordException.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { + "src/main/java/com/mycompany/myapp/service/MailService.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/domain/Audited.java": { + "src/main/java/com/mycompany/myapp/service/UserService.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/domain/Authority.java": { + "src/main/java/com/mycompany/myapp/service/UsernameAlreadyUsedException.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/domain/package-info.java": { + "src/main/java/com/mycompany/myapp/service/dto/AdminUserDTO.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/package-info.java": { + "src/main/java/com/mycompany/myapp/service/dto/PasswordChangeDTO.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/dto/UserDTO.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/dto/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/mapper/UserMapper.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/mapper/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/filter/SpaWebFilter.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/filter/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/AccountResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/AuditedResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/AuthenticateController.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/AuthorityResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JaversEntityAuditResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/PublicUserResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/UserResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/dto/EntityAuditAction.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/dto/EntityAuditEvent.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/dto/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/BadRequestAlertException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/EmailAlreadyUsedException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/ErrorConstants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslator.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/FieldErrorVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/InvalidPasswordException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/LoginAlreadyUsedException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/KeyAndPasswordVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/LoginVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/ManagedUserVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/package-info.java": { + "stateCleared": "modified", + }, + "src/main/resources/banner.txt": { + "stateCleared": "modified", + }, + "src/main/resources/config/application-dev.yml": { + "stateCleared": "modified", + }, + "src/main/resources/config/application-prod.yml": { + "stateCleared": "modified", + }, + "src/main/resources/config/application-tls.yml": { + "stateCleared": "modified", + }, + "src/main/resources/config/application.yml": { + "stateCleared": "modified", + }, + "src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml": { + "stateCleared": "modified", + }, + "src/main/resources/config/liquibase/changelog/20220101000100_added_entity_Audited.xml": { + "stateCleared": "modified", + }, + "src/main/resources/config/liquibase/data/authority.csv": { + "stateCleared": "modified", + }, + "src/main/resources/config/liquibase/data/user.csv": { + "stateCleared": "modified", + }, + "src/main/resources/config/liquibase/data/user_authority.csv": { + "stateCleared": "modified", + }, + "src/main/resources/config/liquibase/fake-data/audited.csv": { + "stateCleared": "modified", + }, + "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", + }, + "src/main/resources/i18n/messages_en.properties": { + "stateCleared": "modified", + }, + "src/main/resources/logback-spring.xml": { + "stateCleared": "modified", + }, + "src/main/resources/templates/error.html": { + "stateCleared": "modified", + }, + "src/main/resources/templates/mail/activationEmail.html": { + "stateCleared": "modified", + }, + "src/main/resources/templates/mail/creationEmail.html": { + "stateCleared": "modified", + }, + "src/main/resources/templates/mail/passwordResetEmail.html": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/activate.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/adminAuthority.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/audited.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/configuration.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/error.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/global.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/health.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/home.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/login.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/logs.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/metrics.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/password.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/register.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/reset.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/sessions.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/settings.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/user-management.json": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/IntegrationTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/TechnicalStructureTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/AsyncSyncConfiguration.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/CRLFLogConverterTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/EmbeddedSQL.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/PostgreSqlTestContainer.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/SpringBootTestClassOrderer.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/SqlTestContainer.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/SqlTestContainersSpringContextCustomizerFactory.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/StaticResourcesWebConfigurerTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/WebConfigurerTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/WebConfigurerTestController.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/timezone/HibernateTimeZoneIT.java": { "stateCleared": "modified", }, "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { @@ -91,6 +1138,108 @@ exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run using "src/test/java/com/mycompany/myapp/domain/AuthorityTestSamples.java": { "stateCleared": "modified", }, + "src/test/java/com/mycompany/myapp/management/SecurityMetersServiceTests.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/repository/timezone/DateTimeWrapper.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/repository/timezone/DateTimeWrapperRepository.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/security/DomainUserDetailsServiceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/security/SecurityUtilsUnitTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/security/jwt/AuthenticationIntegrationTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/security/jwt/JwtAuthenticationTestUtils.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/security/jwt/TokenAuthenticationIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/security/jwt/TokenAuthenticationSecurityMetersIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/service/MailServiceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/service/UserServiceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/service/mapper/UserMapperTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/filter/SpaWebFilterIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/AccountResourceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/AuditedResourceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/AuthenticateControllerIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/AuthorityResourceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/PublicUserResourceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/TestUtil.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/UserResourceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/WithUnauthenticatedMockUser.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslatorIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslatorTestController.java": { + "stateCleared": "modified", + }, + "src/test/resources/META-INF/spring.factories": { + "stateCleared": "modified", + }, + "src/test/resources/config/application-testdev.yml": { + "stateCleared": "modified", + }, + "src/test/resources/config/application-testprod.yml": { + "stateCleared": "modified", + }, + "src/test/resources/config/application.yml": { + "stateCleared": "modified", + }, + "src/test/resources/i18n/messages_en.properties": { + "stateCleared": "modified", + }, + "src/test/resources/junit-platform.properties": { + "stateCleared": "modified", + }, + "src/test/resources/logback.xml": { + "stateCleared": "modified", + }, + "src/test/resources/templates/mail/activationEmail.html": { + "stateCleared": "modified", + }, + "src/test/resources/templates/mail/creationEmail.html": { + "stateCleared": "modified", + }, + "src/test/resources/templates/mail/passwordResetEmail.html": { + "stateCleared": "modified", + }, + "src/test/resources/templates/mail/testEmail.html": { + "stateCleared": "modified", + }, } `; diff --git a/generators/java-audit/command.js b/generators/java-audit/command.js index 4281dd3..fa2858e 100644 --- a/generators/java-audit/command.js +++ b/generators/java-audit/command.js @@ -21,6 +21,10 @@ export default asCommand({ name: 'Javers auditing framework (works with SQL and MongoDB)', value: 'javers', }, + { + name: 'No auditing framework', + value: 'no', + }, ], scope: 'blueprint', }, diff --git a/generators/java-audit/generator.js b/generators/java-audit/generator.js index 46d96a6..c36635f 100644 --- a/generators/java-audit/generator.js +++ b/generators/java-audit/generator.js @@ -1,5 +1,5 @@ import BaseApplicationGenerator from 'generator-jhipster/generators/base-application'; -import { addJavaAnnotation, addJavaImport, javaMainPackageTemplatesBlock } from 'generator-jhipster/generators/java/support'; +import { javaMainPackageTemplatesBlock } from 'generator-jhipster/generators/java/support'; const COMMON_ATTRIBUTES = { // Hides form on create @@ -46,7 +46,7 @@ export default class extends BaseApplicationGenerator { } async beforeQueue() { - await this.dependsOnJHipster('java'); + await this.dependsOnJHipster('jhipster:java:domain'); } get [BaseApplicationGenerator.INITIALIZING]() { @@ -71,39 +71,6 @@ export default class extends BaseApplicationGenerator { }); } - get [BaseApplicationGenerator.LOADING]() { - return this.asLoadingTaskGroup({ - prepareForTemplates({ application }) { - const { auditFramework, auditPage } = this.blueprintConfig; - application.auditFramework = auditFramework; - application.auditPage = auditPage; - }, - }); - } - - get [BaseApplicationGenerator.PREPARING]() { - return this.asPreparingTaskGroup({ - prepareForTemplates({ application }) { - const { auditFramework } = application; - application.auditFrameworkCustom = auditFramework === 'custom'; - application.auditFrameworkJavers = auditFramework === 'javers'; - application.auditFrameworkAny = auditFramework && auditFramework !== 'no'; - }, - editJavaFile({ source }) { - source.editJavaFile = - source.editJavaFile ?? - ((file, { staticImports = [], imports = [], annotations = [] }, ...editFileCallback) => - this.editFile( - file, - ...staticImports.map(classPath => addJavaImport(classPath, { staticImport: true })), - ...imports.map(classPath => addJavaImport(classPath)), - ...annotations.map(annotation => addJavaAnnotation(annotation)), - ...editFileCallback, - )); - }, - }); - } - get [BaseApplicationGenerator.CONFIGURING_EACH_ENTITY]() { return this.asConfiguringEachEntityTaskGroup({ async configureEntity({ entityName, entityConfig }) { diff --git a/generators/java-audit/generator.spec.js b/generators/java-audit/generator.spec.js index 6686411..51f2cab 100644 --- a/generators/java-audit/generator.spec.js +++ b/generators/java-audit/generator.spec.js @@ -11,26 +11,22 @@ describe('SubGenerator java-audit of entity-audit JHipster blueprint', () => { beforeAll(async function () { await helpers .run(SUB_GENERATOR_NAMESPACE) - .withJHipsterConfig( + .withJHipsterConfig({}, [ { - auditFramework, + name: 'Audited', + enableAudit: true, + fields: [ + { + fieldName: 'name', + fieldType: 'String', + }, + ], }, - [ - { - name: 'Audited', - enableAudit: true, - fields: [ - { - fieldName: 'name', - fieldType: 'String', - }, - ], - }, - ], - ) + ]) .withOptions({ creationTimestamp: '2022-01-01', ignoreNeedlesError: true, + auditFramework, }) .withJHipsterLookup() .withParentBlueprintLookup(); @@ -39,9 +35,15 @@ describe('SubGenerator java-audit of entity-audit JHipster blueprint', () => { it('should succeed', () => { expect(result.getStateSnapshot()).toMatchSnapshot(); }); - it('entities should extend AbstractAuditingEntity', () => { - result.assertFileContent('src/main/java/com/mycompany/myapp/domain/Audited.java', ' AbstractAuditingEntity<'); - }); + if (auditFramework) { + it('entities should extend AbstractAuditingEntity', () => { + result.assertFileContent('src/main/java/com/mycompany/myapp/domain/Audited.java', ' AbstractAuditingEntity<'); + }); + } else { + it('entities should not extend AbstractAuditingEntity', () => { + result.assertNoFileContent('src/main/java/com/mycompany/myapp/domain/Audited.java', ' AbstractAuditingEntity<'); + }); + } }); } }); diff --git a/generators/server/__snapshots__/generator.spec.js.snap b/generators/server/__snapshots__/generator.spec.js.snap index 68f6379..f3d18d7 100644 --- a/generators/server/__snapshots__/generator.spec.js.snap +++ b/generators/server/__snapshots__/generator.spec.js.snap @@ -371,6 +371,9 @@ exports[`SubGenerator server of entity-audit JHipster blueprint > run > should s "src/main/webapp/i18n/en/configuration.json": { "stateCleared": "modified", }, + "src/main/webapp/i18n/en/entity-audit.json": { + "stateCleared": "modified", + }, "src/main/webapp/i18n/en/error.json": { "stateCleared": "modified", }, diff --git a/generators/server/generator.spec.js b/generators/server/generator.spec.js index f546f41..b66ec82 100644 --- a/generators/server/generator.spec.js +++ b/generators/server/generator.spec.js @@ -9,7 +9,7 @@ describe('SubGenerator server of entity-audit JHipster blueprint', () => { describe('run', () => { beforeAll(async function () { await helpers - .run(BLUEPRINT_NAMESPACE) + .runJHipster(SUB_GENERATOR) .withJHipsterConfig() .withOptions({ creationTimestamp: '2022-01-01', @@ -17,6 +17,7 @@ describe('SubGenerator server of entity-audit JHipster blueprint', () => { blueprint: ['entity-audit'], }) .withJHipsterLookup() + .withParentBlueprintLookup() .withMockedGenerators(['jhipster-entity-audit:java-audit']); }); From 61a55129aa5f9362dd0d30a1bd109115af48158a Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Wed, 9 Oct 2024 17:54:43 -0300 Subject: [PATCH 13/14] lint fix --- generators/server/generator.spec.js | 1 - 1 file changed, 1 deletion(-) diff --git a/generators/server/generator.spec.js b/generators/server/generator.spec.js index b66ec82..5aff342 100644 --- a/generators/server/generator.spec.js +++ b/generators/server/generator.spec.js @@ -3,7 +3,6 @@ import { beforeAll, describe, expect, it } from 'vitest'; import { defaultHelpers as helpers, result } from 'generator-jhipster/testing'; const SUB_GENERATOR = 'server'; -const BLUEPRINT_NAMESPACE = `jhipster:${SUB_GENERATOR}`; describe('SubGenerator server of entity-audit JHipster blueprint', () => { describe('run', () => { From 4fa22ca3b37bb311cd9c0d5fa91074ffd8d31f9d Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Wed, 9 Oct 2024 22:15:53 -0300 Subject: [PATCH 14/14] test adjusts --- .../__snapshots__/generator.spec.js.snap | 1155 +---------------- .../__snapshots__/generator.spec.js.snap | 543 -------- .../spring-boot-custom-audit/generator.js | 2 +- .../generator.spec.js | 1 + .../__snapshots__/generator.spec.js.snap | 528 -------- generators/spring-boot-javers/generator.js | 2 +- .../spring-boot-javers/generator.spec.js | 1 + 7 files changed, 37 insertions(+), 2195 deletions(-) diff --git a/generators/java-audit/__snapshots__/generator.spec.js.snap b/generators/java-audit/__snapshots__/generator.spec.js.snap index 0e38694..a62a2dc 100644 --- a/generators/java-audit/__snapshots__/generator.spec.js.snap +++ b/generators/java-audit/__snapshots__/generator.spec.js.snap @@ -2,123 +2,15 @@ exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run using auditFramework custom > should succeed 1`] = ` { - ".devcontainer/Dockerfile": { - "stateCleared": "modified", - }, - ".devcontainer/devcontainer.json": { - "stateCleared": "modified", - }, - ".editorconfig": { - "stateCleared": "modified", - }, - ".gitattributes": { - "stateCleared": "modified", - }, - ".gitignore": { - "stateCleared": "modified", - }, - ".husky/pre-commit": { - "stateCleared": "modified", - }, ".jhipster/Audited.json": { "stateCleared": "modified", }, - ".lintstagedrc.cjs": { - "stateCleared": "modified", - }, - ".mvn/jvm.config": { - "stateCleared": "modified", - }, - ".mvn/wrapper/maven-wrapper.jar": { - "stateCleared": "modified", - }, - ".mvn/wrapper/maven-wrapper.properties": { - "stateCleared": "modified", - }, - ".prettierignore": { - "stateCleared": "modified", - }, - ".prettierrc": { - "stateCleared": "modified", - }, ".yo-rc.json": { "stateCleared": "modified", }, - "README.md": { - "stateCleared": "modified", - }, - "checkstyle.xml": { - "stateCleared": "modified", - }, - "mvnw": { - "stateCleared": "modified", - }, - "mvnw.cmd": { - "stateCleared": "modified", - }, - "npmw": { - "stateCleared": "modified", - }, - "npmw.cmd": { - "stateCleared": "modified", - }, - "package.json": { - "stateCleared": "modified", - }, - "pom.xml": { - "stateCleared": "modified", - }, - "sonar-project.properties": { - "stateCleared": "modified", - }, - "src/main/docker/app.yml": { - "stateCleared": "modified", - }, - "src/main/docker/grafana/provisioning/dashboards/JVM.json": { - "stateCleared": "modified", - }, - "src/main/docker/grafana/provisioning/dashboards/dashboard.yml": { - "stateCleared": "modified", - }, - "src/main/docker/grafana/provisioning/datasources/datasource.yml": { - "stateCleared": "modified", - }, - "src/main/docker/jhipster-control-center.yml": { - "stateCleared": "modified", - }, - "src/main/docker/jib/entrypoint.sh": { - "stateCleared": "modified", - }, - "src/main/docker/monitoring.yml": { - "stateCleared": "modified", - }, - "src/main/docker/postgresql.yml": { - "stateCleared": "modified", - }, - "src/main/docker/prometheus/prometheus.yml": { - "stateCleared": "modified", - }, - "src/main/docker/services.yml": { - "stateCleared": "modified", - }, - "src/main/docker/sonar.yml": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/ApplicationWebXml.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/JhipsterApp.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/aop/logging/LoggingAspect.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/aop/logging/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/audit/AsyncEntityAuditEventWriter.java": { "stateCleared": "modified", }, @@ -131,57 +23,6 @@ exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run using "src/main/java/com/mycompany/myapp/audit/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/config/ApplicationProperties.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/AsyncConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/CRLFLogConverter.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/CacheConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/Constants.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/DatabaseConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/DateTimeFormatConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/JacksonConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/LiquibaseConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/LoggingAspectConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/LoggingConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/SecurityConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/SecurityJwtConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/StaticResourcesWebConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/WebConfigurer.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/domain/AbstractAuditingEntity.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/domain/Audited.java": { "stateCleared": "modified", }, @@ -191,9 +32,6 @@ exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run using "src/main/java/com/mycompany/myapp/domain/EntityAuditEvent.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/domain/User.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/domain/enumeration/EntityAuditAction.java": { "stateCleared": "modified", }, @@ -203,1043 +41,116 @@ exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run using "src/main/java/com/mycompany/myapp/domain/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/management/SecurityMetersService.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/management/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/repository/AuditedRepository.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/repository/AuthorityRepository.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/repository/EntityAuditEventRepository.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/repository/UserRepository.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/repository/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/security/AuthoritiesConstants.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/DomainUserDetailsService.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/SecurityUtils.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/SpringSecurityAuditorAware.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/UserNotActivatedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/EmailAlreadyUsedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/InvalidPasswordException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/MailService.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/UserService.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/UsernameAlreadyUsedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/dto/AdminUserDTO.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/dto/PasswordChangeDTO.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/dto/UserDTO.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/dto/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/mapper/UserMapper.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/mapper/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/filter/SpaWebFilter.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/filter/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/AccountResource.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/AuditedResource.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/AuthenticateController.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/AuthorityResource.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/web/rest/EntityAuditResource.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/web/rest/PublicUserResource.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/UserResource.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/BadRequestAlertException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/EmailAlreadyUsedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/ErrorConstants.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslator.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/FieldErrorVM.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/InvalidPasswordException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/LoginAlreadyUsedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/web/rest/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/web/rest/vm/KeyAndPasswordVM.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/vm/LoginVM.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/vm/ManagedUserVM.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/vm/package-info.java": { - "stateCleared": "modified", - }, - "src/main/resources/banner.txt": { - "stateCleared": "modified", - }, - "src/main/resources/config/application-dev.yml": { - "stateCleared": "modified", - }, - "src/main/resources/config/application-prod.yml": { - "stateCleared": "modified", - }, - "src/main/resources/config/application-tls.yml": { - "stateCleared": "modified", - }, - "src/main/resources/config/application.yml": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml": { - "stateCleared": "modified", - }, "src/main/resources/config/liquibase/changelog/20220101000100_added_entity_EntityAuditEvent.xml": { "stateCleared": "modified", }, - "src/main/resources/config/liquibase/changelog/20220101000200_added_entity_Audited.xml": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/data/authority.csv": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/data/user.csv": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/data/user_authority.csv": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/fake-data/audited.csv": { - "stateCleared": "modified", - }, - "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", - }, - "src/main/resources/i18n/messages_en.properties": { + "src/test/java/com/mycompany/myapp/audit/TestEntityAuditEventWriter.java": { "stateCleared": "modified", }, - "src/main/resources/logback-spring.xml": { + "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { "stateCleared": "modified", }, - "src/main/resources/templates/error.html": { + "src/test/java/com/mycompany/myapp/domain/AuditedAsserts.java": { "stateCleared": "modified", }, - "src/main/resources/templates/mail/activationEmail.html": { + "src/test/java/com/mycompany/myapp/domain/AuditedTest.java": { "stateCleared": "modified", }, - "src/main/resources/templates/mail/creationEmail.html": { + "src/test/java/com/mycompany/myapp/domain/AuditedTestSamples.java": { "stateCleared": "modified", }, - "src/main/resources/templates/mail/passwordResetEmail.html": { + "src/test/java/com/mycompany/myapp/domain/AuthorityAsserts.java": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/activate.json": { + "src/test/java/com/mycompany/myapp/domain/AuthorityTest.java": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/adminAuthority.json": { + "src/test/java/com/mycompany/myapp/domain/AuthorityTestSamples.java": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/audited.json": { +} +`; + +exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run using auditFramework javers > should succeed 1`] = ` +{ + ".jhipster/Audited.json": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/configuration.json": { + ".yo-rc.json": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/error.json": { + "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/global.json": { + "src/main/java/com/mycompany/myapp/config/audit/JaversAuthorProvider.java": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/health.json": { + "src/main/java/com/mycompany/myapp/config/audit/package-info.java": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/home.json": { + "src/main/java/com/mycompany/myapp/domain/Audited.java": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/login.json": { + "src/main/java/com/mycompany/myapp/domain/Authority.java": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/logs.json": { + "src/main/java/com/mycompany/myapp/domain/package-info.java": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/metrics.json": { + "src/main/java/com/mycompany/myapp/package-info.java": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/password.json": { + "src/main/java/com/mycompany/myapp/web/rest/JaversEntityAuditResource.java": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/register.json": { + "src/main/java/com/mycompany/myapp/web/rest/dto/EntityAuditAction.java": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/reset.json": { + "src/main/java/com/mycompany/myapp/web/rest/dto/EntityAuditEvent.java": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/sessions.json": { + "src/main/java/com/mycompany/myapp/web/rest/dto/package-info.java": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/settings.json": { + "src/main/java/com/mycompany/myapp/web/rest/package-info.java": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/user-management.json": { + "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/IntegrationTest.java": { + "src/test/java/com/mycompany/myapp/domain/AuditedAsserts.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/TechnicalStructureTest.java": { + "src/test/java/com/mycompany/myapp/domain/AuditedTest.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/audit/TestEntityAuditEventWriter.java": { + "src/test/java/com/mycompany/myapp/domain/AuditedTestSamples.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/config/AsyncSyncConfiguration.java": { + "src/test/java/com/mycompany/myapp/domain/AuthorityAsserts.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/config/CRLFLogConverterTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/EmbeddedSQL.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/PostgreSqlTestContainer.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/SpringBootTestClassOrderer.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/SqlTestContainer.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/SqlTestContainersSpringContextCustomizerFactory.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/StaticResourcesWebConfigurerTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/WebConfigurerTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/WebConfigurerTestController.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/timezone/HibernateTimeZoneIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/domain/AuditedAsserts.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/domain/AuditedTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/domain/AuditedTestSamples.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/domain/AuthorityAsserts.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/domain/AuthorityTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/domain/AuthorityTestSamples.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/management/SecurityMetersServiceTests.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/repository/timezone/DateTimeWrapper.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/repository/timezone/DateTimeWrapperRepository.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/DomainUserDetailsServiceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/SecurityUtilsUnitTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/jwt/AuthenticationIntegrationTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/jwt/JwtAuthenticationTestUtils.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/jwt/TokenAuthenticationIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/jwt/TokenAuthenticationSecurityMetersIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/service/MailServiceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/service/UserServiceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/service/mapper/UserMapperTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/filter/SpaWebFilterIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/AccountResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/AuditedResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/AuthenticateControllerIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/AuthorityResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/PublicUserResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/TestUtil.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/UserResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/WithUnauthenticatedMockUser.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslatorIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslatorTestController.java": { - "stateCleared": "modified", - }, - "src/test/resources/META-INF/spring.factories": { - "stateCleared": "modified", - }, - "src/test/resources/config/application-testdev.yml": { - "stateCleared": "modified", - }, - "src/test/resources/config/application-testprod.yml": { - "stateCleared": "modified", - }, - "src/test/resources/config/application.yml": { - "stateCleared": "modified", - }, - "src/test/resources/i18n/messages_en.properties": { - "stateCleared": "modified", - }, - "src/test/resources/junit-platform.properties": { - "stateCleared": "modified", - }, - "src/test/resources/logback.xml": { - "stateCleared": "modified", - }, - "src/test/resources/templates/mail/activationEmail.html": { - "stateCleared": "modified", - }, - "src/test/resources/templates/mail/creationEmail.html": { - "stateCleared": "modified", - }, - "src/test/resources/templates/mail/passwordResetEmail.html": { - "stateCleared": "modified", - }, - "src/test/resources/templates/mail/testEmail.html": { - "stateCleared": "modified", - }, -} -`; - -exports[`SubGenerator java-audit of entity-audit JHipster blueprint > run using auditFramework javers > should succeed 1`] = ` -{ - ".devcontainer/Dockerfile": { - "stateCleared": "modified", - }, - ".devcontainer/devcontainer.json": { - "stateCleared": "modified", - }, - ".editorconfig": { - "stateCleared": "modified", - }, - ".gitattributes": { - "stateCleared": "modified", - }, - ".gitignore": { - "stateCleared": "modified", - }, - ".husky/pre-commit": { - "stateCleared": "modified", - }, - ".jhipster/Audited.json": { - "stateCleared": "modified", - }, - ".lintstagedrc.cjs": { - "stateCleared": "modified", - }, - ".mvn/jvm.config": { - "stateCleared": "modified", - }, - ".mvn/wrapper/maven-wrapper.jar": { - "stateCleared": "modified", - }, - ".mvn/wrapper/maven-wrapper.properties": { - "stateCleared": "modified", - }, - ".prettierignore": { - "stateCleared": "modified", - }, - ".prettierrc": { - "stateCleared": "modified", - }, - ".yo-rc.json": { - "stateCleared": "modified", - }, - "README.md": { - "stateCleared": "modified", - }, - "checkstyle.xml": { - "stateCleared": "modified", - }, - "mvnw": { - "stateCleared": "modified", - }, - "mvnw.cmd": { - "stateCleared": "modified", - }, - "npmw": { - "stateCleared": "modified", - }, - "npmw.cmd": { - "stateCleared": "modified", - }, - "package.json": { - "stateCleared": "modified", - }, - "pom.xml": { - "stateCleared": "modified", - }, - "sonar-project.properties": { - "stateCleared": "modified", - }, - "src/main/docker/app.yml": { - "stateCleared": "modified", - }, - "src/main/docker/grafana/provisioning/dashboards/JVM.json": { - "stateCleared": "modified", - }, - "src/main/docker/grafana/provisioning/dashboards/dashboard.yml": { - "stateCleared": "modified", - }, - "src/main/docker/grafana/provisioning/datasources/datasource.yml": { - "stateCleared": "modified", - }, - "src/main/docker/jhipster-control-center.yml": { - "stateCleared": "modified", - }, - "src/main/docker/jib/entrypoint.sh": { - "stateCleared": "modified", - }, - "src/main/docker/monitoring.yml": { - "stateCleared": "modified", - }, - "src/main/docker/postgresql.yml": { - "stateCleared": "modified", - }, - "src/main/docker/prometheus/prometheus.yml": { - "stateCleared": "modified", - }, - "src/main/docker/services.yml": { - "stateCleared": "modified", - }, - "src/main/docker/sonar.yml": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/ApplicationWebXml.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/JhipsterApp.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/aop/logging/LoggingAspect.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/aop/logging/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/ApplicationProperties.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/AsyncConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/CRLFLogConverter.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/CacheConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/Constants.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/DatabaseConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/DateTimeFormatConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/JacksonConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/LiquibaseConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/LoggingAspectConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/LoggingConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/SecurityConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/SecurityJwtConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/StaticResourcesWebConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/WebConfigurer.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/audit/JaversAuthorProvider.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/audit/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/domain/AbstractAuditingEntity.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/domain/Audited.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/domain/Authority.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/domain/User.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/domain/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/management/SecurityMetersService.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/management/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/repository/AuditedRepository.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/repository/AuthorityRepository.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/repository/UserRepository.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/repository/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/AuthoritiesConstants.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/DomainUserDetailsService.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/SecurityUtils.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/SpringSecurityAuditorAware.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/UserNotActivatedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/EmailAlreadyUsedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/InvalidPasswordException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/MailService.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/UserService.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/UsernameAlreadyUsedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/dto/AdminUserDTO.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/dto/PasswordChangeDTO.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/dto/UserDTO.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/dto/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/mapper/UserMapper.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/mapper/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/filter/SpaWebFilter.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/filter/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/AccountResource.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/AuditedResource.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/AuthenticateController.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/AuthorityResource.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/JaversEntityAuditResource.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/PublicUserResource.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/UserResource.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/dto/EntityAuditAction.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/dto/EntityAuditEvent.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/dto/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/BadRequestAlertException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/EmailAlreadyUsedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/ErrorConstants.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslator.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/FieldErrorVM.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/InvalidPasswordException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/LoginAlreadyUsedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/vm/KeyAndPasswordVM.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/vm/LoginVM.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/vm/ManagedUserVM.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/vm/package-info.java": { - "stateCleared": "modified", - }, - "src/main/resources/banner.txt": { - "stateCleared": "modified", - }, - "src/main/resources/config/application-dev.yml": { - "stateCleared": "modified", - }, - "src/main/resources/config/application-prod.yml": { - "stateCleared": "modified", - }, - "src/main/resources/config/application-tls.yml": { - "stateCleared": "modified", - }, - "src/main/resources/config/application.yml": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/changelog/20220101000100_added_entity_Audited.xml": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/data/authority.csv": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/data/user.csv": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/data/user_authority.csv": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/fake-data/audited.csv": { - "stateCleared": "modified", - }, - "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", - }, - "src/main/resources/i18n/messages_en.properties": { - "stateCleared": "modified", - }, - "src/main/resources/logback-spring.xml": { - "stateCleared": "modified", - }, - "src/main/resources/templates/error.html": { - "stateCleared": "modified", - }, - "src/main/resources/templates/mail/activationEmail.html": { - "stateCleared": "modified", - }, - "src/main/resources/templates/mail/creationEmail.html": { - "stateCleared": "modified", - }, - "src/main/resources/templates/mail/passwordResetEmail.html": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/activate.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/adminAuthority.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/audited.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/configuration.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/error.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/global.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/health.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/home.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/login.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/logs.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/metrics.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/password.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/register.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/reset.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/sessions.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/settings.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/user-management.json": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/IntegrationTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/TechnicalStructureTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/AsyncSyncConfiguration.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/CRLFLogConverterTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/EmbeddedSQL.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/PostgreSqlTestContainer.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/SpringBootTestClassOrderer.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/SqlTestContainer.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/SqlTestContainersSpringContextCustomizerFactory.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/StaticResourcesWebConfigurerTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/WebConfigurerTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/WebConfigurerTestController.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/timezone/HibernateTimeZoneIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/domain/AuditedAsserts.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/domain/AuditedTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/domain/AuditedTestSamples.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/domain/AuthorityAsserts.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/domain/AuthorityTest.java": { + "src/test/java/com/mycompany/myapp/domain/AuthorityTest.java": { "stateCleared": "modified", }, "src/test/java/com/mycompany/myapp/domain/AuthorityTestSamples.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/management/SecurityMetersServiceTests.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/repository/timezone/DateTimeWrapper.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/repository/timezone/DateTimeWrapperRepository.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/DomainUserDetailsServiceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/SecurityUtilsUnitTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/jwt/AuthenticationIntegrationTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/jwt/JwtAuthenticationTestUtils.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/jwt/TokenAuthenticationIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/jwt/TokenAuthenticationSecurityMetersIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/service/MailServiceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/service/UserServiceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/service/mapper/UserMapperTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/filter/SpaWebFilterIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/AccountResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/AuditedResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/AuthenticateControllerIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/AuthorityResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/PublicUserResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/TestUtil.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/UserResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/WithUnauthenticatedMockUser.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslatorIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslatorTestController.java": { - "stateCleared": "modified", - }, - "src/test/resources/META-INF/spring.factories": { - "stateCleared": "modified", - }, - "src/test/resources/config/application-testdev.yml": { - "stateCleared": "modified", - }, - "src/test/resources/config/application-testprod.yml": { - "stateCleared": "modified", - }, - "src/test/resources/config/application.yml": { - "stateCleared": "modified", - }, - "src/test/resources/i18n/messages_en.properties": { - "stateCleared": "modified", - }, - "src/test/resources/junit-platform.properties": { - "stateCleared": "modified", - }, - "src/test/resources/logback.xml": { - "stateCleared": "modified", - }, - "src/test/resources/templates/mail/activationEmail.html": { - "stateCleared": "modified", - }, - "src/test/resources/templates/mail/creationEmail.html": { - "stateCleared": "modified", - }, - "src/test/resources/templates/mail/passwordResetEmail.html": { - "stateCleared": "modified", - }, - "src/test/resources/templates/mail/testEmail.html": { - "stateCleared": "modified", - }, } `; diff --git a/generators/spring-boot-custom-audit/__snapshots__/generator.spec.js.snap b/generators/spring-boot-custom-audit/__snapshots__/generator.spec.js.snap index e89b2ec..ab5143a 100644 --- a/generators/spring-boot-custom-audit/__snapshots__/generator.spec.js.snap +++ b/generators/spring-boot-custom-audit/__snapshots__/generator.spec.js.snap @@ -2,123 +2,15 @@ exports[`SubGenerator spring-boot-custom-audit of entity-audit JHipster blueprint > run > should succeed 1`] = ` { - ".devcontainer/Dockerfile": { - "stateCleared": "modified", - }, - ".devcontainer/devcontainer.json": { - "stateCleared": "modified", - }, - ".editorconfig": { - "stateCleared": "modified", - }, - ".gitattributes": { - "stateCleared": "modified", - }, - ".gitignore": { - "stateCleared": "modified", - }, - ".husky/pre-commit": { - "stateCleared": "modified", - }, ".jhipster/Audited.json": { "stateCleared": "modified", }, - ".lintstagedrc.cjs": { - "stateCleared": "modified", - }, - ".mvn/jvm.config": { - "stateCleared": "modified", - }, - ".mvn/wrapper/maven-wrapper.jar": { - "stateCleared": "modified", - }, - ".mvn/wrapper/maven-wrapper.properties": { - "stateCleared": "modified", - }, - ".prettierignore": { - "stateCleared": "modified", - }, - ".prettierrc": { - "stateCleared": "modified", - }, ".yo-rc.json": { "stateCleared": "modified", }, - "README.md": { - "stateCleared": "modified", - }, - "checkstyle.xml": { - "stateCleared": "modified", - }, - "mvnw": { - "stateCleared": "modified", - }, - "mvnw.cmd": { - "stateCleared": "modified", - }, - "npmw": { - "stateCleared": "modified", - }, - "npmw.cmd": { - "stateCleared": "modified", - }, - "package.json": { - "stateCleared": "modified", - }, - "pom.xml": { - "stateCleared": "modified", - }, - "sonar-project.properties": { - "stateCleared": "modified", - }, - "src/main/docker/app.yml": { - "stateCleared": "modified", - }, - "src/main/docker/grafana/provisioning/dashboards/JVM.json": { - "stateCleared": "modified", - }, - "src/main/docker/grafana/provisioning/dashboards/dashboard.yml": { - "stateCleared": "modified", - }, - "src/main/docker/grafana/provisioning/datasources/datasource.yml": { - "stateCleared": "modified", - }, - "src/main/docker/jhipster-control-center.yml": { - "stateCleared": "modified", - }, - "src/main/docker/jib/entrypoint.sh": { - "stateCleared": "modified", - }, - "src/main/docker/monitoring.yml": { - "stateCleared": "modified", - }, - "src/main/docker/postgresql.yml": { - "stateCleared": "modified", - }, - "src/main/docker/prometheus/prometheus.yml": { - "stateCleared": "modified", - }, - "src/main/docker/services.yml": { - "stateCleared": "modified", - }, - "src/main/docker/sonar.yml": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/ApplicationWebXml.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/JhipsterApp.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/aop/logging/LoggingAspect.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/aop/logging/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/audit/AsyncEntityAuditEventWriter.java": { "stateCleared": "modified", }, @@ -131,57 +23,6 @@ exports[`SubGenerator spring-boot-custom-audit of entity-audit JHipster blueprin "src/main/java/com/mycompany/myapp/audit/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/config/ApplicationProperties.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/AsyncConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/CRLFLogConverter.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/CacheConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/Constants.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/DatabaseConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/DateTimeFormatConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/JacksonConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/LiquibaseConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/LoggingAspectConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/LoggingConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/SecurityConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/SecurityJwtConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/StaticResourcesWebConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/WebConfigurer.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/domain/AbstractAuditingEntity.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/domain/Audited.java": { "stateCleared": "modified", }, @@ -191,9 +32,6 @@ exports[`SubGenerator spring-boot-custom-audit of entity-audit JHipster blueprin "src/main/java/com/mycompany/myapp/domain/EntityAuditEvent.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/domain/User.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/domain/enumeration/EntityAuditAction.java": { "stateCleared": "modified", }, @@ -203,306 +41,27 @@ exports[`SubGenerator spring-boot-custom-audit of entity-audit JHipster blueprin "src/main/java/com/mycompany/myapp/domain/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/management/SecurityMetersService.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/management/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/repository/AuditedRepository.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/repository/AuthorityRepository.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/repository/EntityAuditEventRepository.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/repository/UserRepository.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/repository/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/security/AuthoritiesConstants.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/DomainUserDetailsService.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/SecurityUtils.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/SpringSecurityAuditorAware.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/UserNotActivatedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/EmailAlreadyUsedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/InvalidPasswordException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/MailService.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/UserService.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/UsernameAlreadyUsedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/dto/AdminUserDTO.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/dto/PasswordChangeDTO.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/dto/UserDTO.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/dto/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/mapper/UserMapper.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/mapper/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/filter/SpaWebFilter.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/filter/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/AccountResource.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/AuditedResource.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/AuthenticateController.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/AuthorityResource.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/web/rest/EntityAuditResource.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/web/rest/PublicUserResource.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/UserResource.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/BadRequestAlertException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/EmailAlreadyUsedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/ErrorConstants.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslator.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/FieldErrorVM.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/InvalidPasswordException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/LoginAlreadyUsedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/web/rest/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/web/rest/vm/KeyAndPasswordVM.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/vm/LoginVM.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/vm/ManagedUserVM.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/vm/package-info.java": { - "stateCleared": "modified", - }, - "src/main/resources/banner.txt": { - "stateCleared": "modified", - }, - "src/main/resources/config/application-dev.yml": { - "stateCleared": "modified", - }, - "src/main/resources/config/application-prod.yml": { - "stateCleared": "modified", - }, - "src/main/resources/config/application-tls.yml": { - "stateCleared": "modified", - }, - "src/main/resources/config/application.yml": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml": { - "stateCleared": "modified", - }, "src/main/resources/config/liquibase/changelog/20220101000100_added_entity_EntityAuditEvent.xml": { "stateCleared": "modified", }, - "src/main/resources/config/liquibase/changelog/20220101000200_added_entity_Audited.xml": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/data/authority.csv": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/data/user.csv": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/data/user_authority.csv": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/fake-data/audited.csv": { - "stateCleared": "modified", - }, - "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", - }, - "src/main/resources/i18n/messages_en.properties": { - "stateCleared": "modified", - }, - "src/main/resources/logback-spring.xml": { - "stateCleared": "modified", - }, - "src/main/resources/templates/error.html": { - "stateCleared": "modified", - }, - "src/main/resources/templates/mail/activationEmail.html": { - "stateCleared": "modified", - }, - "src/main/resources/templates/mail/creationEmail.html": { - "stateCleared": "modified", - }, - "src/main/resources/templates/mail/passwordResetEmail.html": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/activate.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/adminAuthority.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/audited.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/configuration.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/error.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/global.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/health.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/home.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/login.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/logs.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/metrics.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/password.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/register.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/reset.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/sessions.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/settings.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/user-management.json": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/IntegrationTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/TechnicalStructureTest.java": { - "stateCleared": "modified", - }, "src/test/java/com/mycompany/myapp/audit/TestEntityAuditEventWriter.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/config/AsyncSyncConfiguration.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/CRLFLogConverterTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/EmbeddedSQL.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/PostgreSqlTestContainer.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/SpringBootTestClassOrderer.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/SqlTestContainer.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/SqlTestContainersSpringContextCustomizerFactory.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/StaticResourcesWebConfigurerTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/WebConfigurerTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/WebConfigurerTestController.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/timezone/HibernateTimeZoneIT.java": { - "stateCleared": "modified", - }, "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { "stateCleared": "modified", }, @@ -524,107 +83,5 @@ exports[`SubGenerator spring-boot-custom-audit of entity-audit JHipster blueprin "src/test/java/com/mycompany/myapp/domain/AuthorityTestSamples.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/management/SecurityMetersServiceTests.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/repository/timezone/DateTimeWrapper.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/repository/timezone/DateTimeWrapperRepository.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/DomainUserDetailsServiceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/SecurityUtilsUnitTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/jwt/AuthenticationIntegrationTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/jwt/JwtAuthenticationTestUtils.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/jwt/TokenAuthenticationIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/jwt/TokenAuthenticationSecurityMetersIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/service/MailServiceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/service/UserServiceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/service/mapper/UserMapperTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/filter/SpaWebFilterIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/AccountResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/AuditedResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/AuthenticateControllerIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/AuthorityResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/PublicUserResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/TestUtil.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/UserResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/WithUnauthenticatedMockUser.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslatorIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslatorTestController.java": { - "stateCleared": "modified", - }, - "src/test/resources/META-INF/spring.factories": { - "stateCleared": "modified", - }, - "src/test/resources/config/application-testdev.yml": { - "stateCleared": "modified", - }, - "src/test/resources/config/application-testprod.yml": { - "stateCleared": "modified", - }, - "src/test/resources/config/application.yml": { - "stateCleared": "modified", - }, - "src/test/resources/i18n/messages_en.properties": { - "stateCleared": "modified", - }, - "src/test/resources/junit-platform.properties": { - "stateCleared": "modified", - }, - "src/test/resources/logback.xml": { - "stateCleared": "modified", - }, - "src/test/resources/templates/mail/activationEmail.html": { - "stateCleared": "modified", - }, - "src/test/resources/templates/mail/creationEmail.html": { - "stateCleared": "modified", - }, - "src/test/resources/templates/mail/passwordResetEmail.html": { - "stateCleared": "modified", - }, - "src/test/resources/templates/mail/testEmail.html": { - "stateCleared": "modified", - }, } `; diff --git a/generators/spring-boot-custom-audit/generator.js b/generators/spring-boot-custom-audit/generator.js index 259587f..b03d5f5 100644 --- a/generators/spring-boot-custom-audit/generator.js +++ b/generators/spring-boot-custom-audit/generator.js @@ -8,8 +8,8 @@ export default class extends BaseApplicationGenerator { } async beforeQueue() { + await this.dependsOnBootstrapApplicationBase(); await this.dependsOnJHipster('jhipster-entity-audit:java-audit'); - await this.dependsOnJHipster('spring-boot'); } get [BaseApplicationGenerator.CONFIGURING]() { diff --git a/generators/spring-boot-custom-audit/generator.spec.js b/generators/spring-boot-custom-audit/generator.spec.js index 383f52e..b703a88 100644 --- a/generators/spring-boot-custom-audit/generator.spec.js +++ b/generators/spring-boot-custom-audit/generator.spec.js @@ -24,6 +24,7 @@ describe('SubGenerator spring-boot-custom-audit of entity-audit JHipster bluepri .withOptions({ creationTimestamp: '2022-01-01', ignoreNeedlesError: true, + auditFramework: 'custom', }) .withJHipsterLookup() .withParentBlueprintLookup(); diff --git a/generators/spring-boot-javers/__snapshots__/generator.spec.js.snap b/generators/spring-boot-javers/__snapshots__/generator.spec.js.snap index 1198695..47508b5 100644 --- a/generators/spring-boot-javers/__snapshots__/generator.spec.js.snap +++ b/generators/spring-boot-javers/__snapshots__/generator.spec.js.snap @@ -2,282 +2,30 @@ exports[`SubGenerator spring-boot-javers of entity-audit JHipster blueprint > run > should succeed 1`] = ` { - ".devcontainer/Dockerfile": { - "stateCleared": "modified", - }, - ".devcontainer/devcontainer.json": { - "stateCleared": "modified", - }, - ".editorconfig": { - "stateCleared": "modified", - }, - ".gitattributes": { - "stateCleared": "modified", - }, - ".gitignore": { - "stateCleared": "modified", - }, - ".husky/pre-commit": { - "stateCleared": "modified", - }, - ".lintstagedrc.cjs": { - "stateCleared": "modified", - }, - ".mvn/jvm.config": { - "stateCleared": "modified", - }, - ".mvn/wrapper/maven-wrapper.jar": { - "stateCleared": "modified", - }, - ".mvn/wrapper/maven-wrapper.properties": { - "stateCleared": "modified", - }, - ".prettierignore": { - "stateCleared": "modified", - }, - ".prettierrc": { - "stateCleared": "modified", - }, ".yo-rc.json": { "stateCleared": "modified", }, - "README.md": { - "stateCleared": "modified", - }, - "checkstyle.xml": { - "stateCleared": "modified", - }, - "mvnw": { - "stateCleared": "modified", - }, - "mvnw.cmd": { - "stateCleared": "modified", - }, - "npmw": { - "stateCleared": "modified", - }, - "npmw.cmd": { - "stateCleared": "modified", - }, - "package.json": { - "stateCleared": "modified", - }, - "pom.xml": { - "stateCleared": "modified", - }, - "sonar-project.properties": { - "stateCleared": "modified", - }, - "src/main/docker/app.yml": { - "stateCleared": "modified", - }, - "src/main/docker/grafana/provisioning/dashboards/JVM.json": { - "stateCleared": "modified", - }, - "src/main/docker/grafana/provisioning/dashboards/dashboard.yml": { - "stateCleared": "modified", - }, - "src/main/docker/grafana/provisioning/datasources/datasource.yml": { - "stateCleared": "modified", - }, - "src/main/docker/jhipster-control-center.yml": { - "stateCleared": "modified", - }, - "src/main/docker/jib/entrypoint.sh": { - "stateCleared": "modified", - }, - "src/main/docker/monitoring.yml": { - "stateCleared": "modified", - }, - "src/main/docker/postgresql.yml": { - "stateCleared": "modified", - }, - "src/main/docker/prometheus/prometheus.yml": { - "stateCleared": "modified", - }, - "src/main/docker/services.yml": { - "stateCleared": "modified", - }, - "src/main/docker/sonar.yml": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/ApplicationWebXml.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/JhipsterApp.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/aop/logging/LoggingAspect.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/aop/logging/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/ApplicationProperties.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/AsyncConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/CRLFLogConverter.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/CacheConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/Constants.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/DatabaseConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/DateTimeFormatConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/JacksonConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/LiquibaseConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/LoggingAspectConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/LoggingConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/SecurityConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/SecurityJwtConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/StaticResourcesWebConfiguration.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/config/WebConfigurer.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/config/audit/JaversAuthorProvider.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/config/audit/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/config/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/domain/AbstractAuditingEntity.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/domain/Authority.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/domain/User.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/domain/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/management/SecurityMetersService.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/management/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/repository/AuthorityRepository.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/repository/UserRepository.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/repository/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/AuthoritiesConstants.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/DomainUserDetailsService.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/SecurityUtils.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/SpringSecurityAuditorAware.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/UserNotActivatedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/security/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/EmailAlreadyUsedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/InvalidPasswordException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/MailService.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/UserService.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/UsernameAlreadyUsedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/dto/AdminUserDTO.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/dto/PasswordChangeDTO.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/dto/UserDTO.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/dto/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/mapper/UserMapper.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/mapper/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/service/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/filter/SpaWebFilter.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/filter/package-info.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/AccountResource.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/AuthenticateController.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/AuthorityResource.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/web/rest/JaversEntityAuditResource.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/web/rest/PublicUserResource.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/UserResource.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/web/rest/dto/EntityAuditAction.java": { "stateCleared": "modified", }, @@ -287,186 +35,9 @@ exports[`SubGenerator spring-boot-javers of entity-audit JHipster blueprint > ru "src/main/java/com/mycompany/myapp/web/rest/dto/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/web/rest/errors/BadRequestAlertException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/EmailAlreadyUsedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/ErrorConstants.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslator.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/FieldErrorVM.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/InvalidPasswordException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/LoginAlreadyUsedException.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/errors/package-info.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/web/rest/package-info.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/web/rest/vm/KeyAndPasswordVM.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/vm/LoginVM.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/vm/ManagedUserVM.java": { - "stateCleared": "modified", - }, - "src/main/java/com/mycompany/myapp/web/rest/vm/package-info.java": { - "stateCleared": "modified", - }, - "src/main/resources/banner.txt": { - "stateCleared": "modified", - }, - "src/main/resources/config/application-dev.yml": { - "stateCleared": "modified", - }, - "src/main/resources/config/application-prod.yml": { - "stateCleared": "modified", - }, - "src/main/resources/config/application-tls.yml": { - "stateCleared": "modified", - }, - "src/main/resources/config/application.yml": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/data/authority.csv": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/data/user.csv": { - "stateCleared": "modified", - }, - "src/main/resources/config/liquibase/data/user_authority.csv": { - "stateCleared": "modified", - }, - "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", - }, - "src/main/resources/i18n/messages_en.properties": { - "stateCleared": "modified", - }, - "src/main/resources/logback-spring.xml": { - "stateCleared": "modified", - }, - "src/main/resources/templates/error.html": { - "stateCleared": "modified", - }, - "src/main/resources/templates/mail/activationEmail.html": { - "stateCleared": "modified", - }, - "src/main/resources/templates/mail/creationEmail.html": { - "stateCleared": "modified", - }, - "src/main/resources/templates/mail/passwordResetEmail.html": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/activate.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/adminAuthority.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/configuration.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/error.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/global.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/health.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/home.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/login.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/logs.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/metrics.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/password.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/register.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/reset.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/sessions.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/settings.json": { - "stateCleared": "modified", - }, - "src/main/webapp/i18n/en/user-management.json": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/IntegrationTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/TechnicalStructureTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/AsyncSyncConfiguration.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/CRLFLogConverterTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/EmbeddedSQL.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/PostgreSqlTestContainer.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/SpringBootTestClassOrderer.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/SqlTestContainer.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/SqlTestContainersSpringContextCustomizerFactory.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/StaticResourcesWebConfigurerTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/WebConfigurerTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/WebConfigurerTestController.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/config/timezone/HibernateTimeZoneIT.java": { - "stateCleared": "modified", - }, "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { "stateCleared": "modified", }, @@ -479,104 +50,5 @@ exports[`SubGenerator spring-boot-javers of entity-audit JHipster blueprint > ru "src/test/java/com/mycompany/myapp/domain/AuthorityTestSamples.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/management/SecurityMetersServiceTests.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/repository/timezone/DateTimeWrapper.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/repository/timezone/DateTimeWrapperRepository.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/DomainUserDetailsServiceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/SecurityUtilsUnitTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/jwt/AuthenticationIntegrationTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/jwt/JwtAuthenticationTestUtils.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/jwt/TokenAuthenticationIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/security/jwt/TokenAuthenticationSecurityMetersIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/service/MailServiceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/service/UserServiceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/service/mapper/UserMapperTest.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/filter/SpaWebFilterIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/AccountResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/AuthenticateControllerIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/AuthorityResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/PublicUserResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/TestUtil.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/UserResourceIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/WithUnauthenticatedMockUser.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslatorIT.java": { - "stateCleared": "modified", - }, - "src/test/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslatorTestController.java": { - "stateCleared": "modified", - }, - "src/test/resources/META-INF/spring.factories": { - "stateCleared": "modified", - }, - "src/test/resources/config/application-testdev.yml": { - "stateCleared": "modified", - }, - "src/test/resources/config/application-testprod.yml": { - "stateCleared": "modified", - }, - "src/test/resources/config/application.yml": { - "stateCleared": "modified", - }, - "src/test/resources/i18n/messages_en.properties": { - "stateCleared": "modified", - }, - "src/test/resources/junit-platform.properties": { - "stateCleared": "modified", - }, - "src/test/resources/logback.xml": { - "stateCleared": "modified", - }, - "src/test/resources/templates/mail/activationEmail.html": { - "stateCleared": "modified", - }, - "src/test/resources/templates/mail/creationEmail.html": { - "stateCleared": "modified", - }, - "src/test/resources/templates/mail/passwordResetEmail.html": { - "stateCleared": "modified", - }, - "src/test/resources/templates/mail/testEmail.html": { - "stateCleared": "modified", - }, } `; diff --git a/generators/spring-boot-javers/generator.js b/generators/spring-boot-javers/generator.js index 3cf04fc..6050b95 100644 --- a/generators/spring-boot-javers/generator.js +++ b/generators/spring-boot-javers/generator.js @@ -9,8 +9,8 @@ export default class extends BaseApplicationGenerator { } async beforeQueue() { + await this.dependsOnBootstrapApplicationBase(); await this.dependsOnJHipster('jhipster-entity-audit:java-audit'); - await this.dependsOnJHipster('spring-boot'); } get [BaseApplicationGenerator.PREPARING]() { diff --git a/generators/spring-boot-javers/generator.spec.js b/generators/spring-boot-javers/generator.spec.js index ba212ff..06acf4f 100644 --- a/generators/spring-boot-javers/generator.spec.js +++ b/generators/spring-boot-javers/generator.spec.js @@ -13,6 +13,7 @@ describe('SubGenerator spring-boot-javers of entity-audit JHipster blueprint', ( .withJHipsterConfig() .withOptions({ ignoreNeedlesError: true, + auditFramework: 'javers', }) .withJHipsterLookup() .withParentBlueprintLookup();