From 74b38d5a7dcae6eb3442e41b82ad5cf9538d552e Mon Sep 17 00:00:00 2001 From: Tine Kondo Date: Fri, 19 Jul 2024 14:21:00 +0000 Subject: [PATCH] fix: generating projects does not properly consider the option to keep project level wrapper files --- .../src/generators/project/lib/prompt-multi-module-support.ts | 4 ++-- .../src/generators/project/lib/prompt-multi-module-support.ts | 4 ++-- .../src/generators/project/lib/prompt-multi-module-support.ts | 4 ++-- .../src/generators/project/lib/prompt-multi-module-support.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/nx-ktor/src/generators/project/lib/prompt-multi-module-support.ts b/packages/nx-ktor/src/generators/project/lib/prompt-multi-module-support.ts index 9524005b..1b5eae37 100644 --- a/packages/nx-ktor/src/generators/project/lib/prompt-multi-module-support.ts +++ b/packages/nx-ktor/src/generators/project/lib/prompt-multi-module-support.ts @@ -60,9 +60,8 @@ export async function promptForMultiModuleSupport( initial: `${options.projectName}-parent`, }).then((a) => a['parentModuleName']) ).replace(/\//g, '-'); - - options.keepProjectLevelWrapper ??= true; } + options.keepProjectLevelWrapper = !options.transformIntoMultiModule; } else { options.addToExistingParentModule = await prompt({ name: 'addToExistingParentModule', @@ -92,6 +91,7 @@ export async function promptForMultiModuleSupport( }).then((a) => a['parentModuleName']); } } + options.keepProjectLevelWrapper = !options.addToExistingParentModule; } } if ( diff --git a/packages/nx-micronaut/src/generators/project/lib/prompt-multi-module-support.ts b/packages/nx-micronaut/src/generators/project/lib/prompt-multi-module-support.ts index fc34a527..618f4581 100644 --- a/packages/nx-micronaut/src/generators/project/lib/prompt-multi-module-support.ts +++ b/packages/nx-micronaut/src/generators/project/lib/prompt-multi-module-support.ts @@ -59,9 +59,8 @@ export async function promptForMultiModuleSupport( initial: `${options.projectName}-parent`, }).then((a) => a['parentModuleName']) ).replace(/\//g, '-'); - - options.keepProjectLevelWrapper ??= true; } + options.keepProjectLevelWrapper = !options.transformIntoMultiModule; } else { options.addToExistingParentModule = await prompt({ name: 'addToExistingParentModule', @@ -91,6 +90,7 @@ export async function promptForMultiModuleSupport( }).then((a) => a['parentModuleName']); } } + options.keepProjectLevelWrapper = !options.addToExistingParentModule; } } diff --git a/packages/nx-quarkus/src/generators/project/lib/prompt-multi-module-support.ts b/packages/nx-quarkus/src/generators/project/lib/prompt-multi-module-support.ts index b3d9b0d2..5ae1b5ff 100644 --- a/packages/nx-quarkus/src/generators/project/lib/prompt-multi-module-support.ts +++ b/packages/nx-quarkus/src/generators/project/lib/prompt-multi-module-support.ts @@ -59,9 +59,8 @@ export async function promptForMultiModuleSupport( initial: `${options.projectName}-parent`, }).then((a) => a['parentModuleName']) ).replace(/\//g, '-'); - - options.keepProjectLevelWrapper ??= true; } + options.keepProjectLevelWrapper = !options.transformIntoMultiModule; } else { options.addToExistingParentModule = await prompt({ name: 'addToExistingParentModule', @@ -91,6 +90,7 @@ export async function promptForMultiModuleSupport( }).then((a) => a['parentModuleName']); } } + options.keepProjectLevelWrapper = !options.addToExistingParentModule; } } diff --git a/packages/nx-spring-boot/src/generators/project/lib/prompt-multi-module-support.ts b/packages/nx-spring-boot/src/generators/project/lib/prompt-multi-module-support.ts index b9960db0..f66f727b 100644 --- a/packages/nx-spring-boot/src/generators/project/lib/prompt-multi-module-support.ts +++ b/packages/nx-spring-boot/src/generators/project/lib/prompt-multi-module-support.ts @@ -60,9 +60,8 @@ export async function promptForMultiModuleSupport( initial: `${options.projectName}-parent`, }).then((a) => a['multiModuleName']) ).replace(/\//g, '-'); - - options.keepProjectLevelWrapper ??= true; } + options.keepProjectLevelWrapper = !options.transformIntoMultiModule; } else { options.addToExistingParentModule = await prompt({ name: 'addToExistingParentModule', @@ -92,6 +91,7 @@ export async function promptForMultiModuleSupport( }).then((a) => a['parentModuleName']); } } + options.keepProjectLevelWrapper = !options.addToExistingParentModule; } }