From d3b89b3805222922a56868a19b7bf72dbbb5a9c8 Mon Sep 17 00:00:00 2001 From: Tine Kondo Date: Wed, 19 Jun 2024 21:08:01 +0000 Subject: [PATCH] feat: remove the prompt to keep project level wrapper (`false` by default) --- packages/nx-ktor/src/generators/preset/schema.json | 2 +- .../generators/project/lib/prompt-multi-module-support.ts | 8 +------- packages/nx-ktor/src/generators/project/schema.json | 2 +- packages/nx-micronaut/src/generators/preset/schema.json | 2 +- .../generators/project/lib/prompt-multi-module-support.ts | 8 +------- packages/nx-micronaut/src/generators/project/schema.json | 2 +- packages/nx-quarkus/src/generators/preset/schema.json | 2 +- .../generators/project/lib/prompt-multi-module-support.ts | 8 +------- packages/nx-quarkus/src/generators/project/schema.json | 2 +- packages/nx-spring-boot/src/generators/preset/schema.json | 2 +- .../generators/project/lib/prompt-multi-module-support.ts | 8 +------- .../nx-spring-boot/src/generators/project/schema.json | 2 +- 12 files changed, 12 insertions(+), 36 deletions(-) diff --git a/packages/nx-ktor/src/generators/preset/schema.json b/packages/nx-ktor/src/generators/preset/schema.json index 2611b00e..6063c3e5 100644 --- a/packages/nx-ktor/src/generators/preset/schema.json +++ b/packages/nx-ktor/src/generators/preset/schema.json @@ -163,7 +163,7 @@ "keepProjectLevelWrapper": { "description": "Keep the `Maven` or `Gradle` wrapper files from child project (when generating a multi-module project). Follow this guide https://t.ly/dZelN for more information.", "type": "boolean", - "default": true + "default": false }, "ktorInitializrUrl": { "type": "string", 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 ea0d7ece..a3ac8f60 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 @@ -37,13 +37,7 @@ export async function promptForMultiModuleSupport(tree: Tree, options: Normalize initial: `${options.projectName}-parent` }).then((a) => a['parentModuleName'])).replace(/\//g, '-'); - options.keepProjectLevelWrapper = await prompt({ - name: 'keepProjectLevelWrapper', - message: - `A root ${buildSystemName} wrapper will be added in the root module '${options.parentModuleName}'. Do you want to keep the one in the generated child module '${options.projectName}'?`, - type: 'confirm', - initial: false - }).then((a) => a['keepProjectLevelWrapper']); + options.keepProjectLevelWrapper ??= false; } } else { diff --git a/packages/nx-ktor/src/generators/project/schema.json b/packages/nx-ktor/src/generators/project/schema.json index c503772d..54034318 100644 --- a/packages/nx-ktor/src/generators/project/schema.json +++ b/packages/nx-ktor/src/generators/project/schema.json @@ -158,7 +158,7 @@ "keepProjectLevelWrapper": { "description": "Keep the `Maven` or `Gradle` wrapper files from child project (when generating a multi-module project). Follow this guide https://t.ly/dZelN for more information.", "type": "boolean", - "default": true + "default": false }, "ktorInitializrUrl": { "type": "string", diff --git a/packages/nx-micronaut/src/generators/preset/schema.json b/packages/nx-micronaut/src/generators/preset/schema.json index 17c44569..c8bcee7c 100644 --- a/packages/nx-micronaut/src/generators/preset/schema.json +++ b/packages/nx-micronaut/src/generators/preset/schema.json @@ -227,7 +227,7 @@ "keepProjectLevelWrapper": { "description": "Keep the `Maven` or `Gradle` wrapper files from child project (when generating a multi-module project). Follow this guide https://t.ly/ov0Y9 for more information.", "type": "boolean", - "default": true + "default": false }, "micronautLaunchUrl": { "type": "string", 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 37a039c8..43ca0b4a 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 @@ -36,13 +36,7 @@ export async function promptForMultiModuleSupport(tree: Tree, options: Normalize initial: `${options.projectName}-parent` }).then((a) => a['parentModuleName'])).replace(/\//g, '-'); - options.keepProjectLevelWrapper = await prompt({ - name: 'keepProjectLevelWrapper', - message: - `A root ${buildSystemName} wrapper will be added in the root module '${options.parentModuleName}'. Do you want to keep the one in the generated child module '${options.projectName}'?`, - type: 'confirm', - initial: false - }).then((a) => a['keepProjectLevelWrapper']); + options.keepProjectLevelWrapper ??= false; } } else { diff --git a/packages/nx-micronaut/src/generators/project/schema.json b/packages/nx-micronaut/src/generators/project/schema.json index 55d746a8..59cbdc4a 100644 --- a/packages/nx-micronaut/src/generators/project/schema.json +++ b/packages/nx-micronaut/src/generators/project/schema.json @@ -231,7 +231,7 @@ "keepProjectLevelWrapper": { "description": "Keep the `Maven` or `Gradle` wrapper files from child project (when generating a multi-module project). Follow this guide https://t.ly/ov0Y9 for more information.", "type": "boolean", - "default": true + "default": false }, "micronautLaunchUrl": { "type": "string", diff --git a/packages/nx-quarkus/src/generators/preset/schema.json b/packages/nx-quarkus/src/generators/preset/schema.json index 4e50f301..d001c4d6 100644 --- a/packages/nx-quarkus/src/generators/preset/schema.json +++ b/packages/nx-quarkus/src/generators/preset/schema.json @@ -127,7 +127,7 @@ "keepProjectLevelWrapper": { "description": "Keep the `Maven` or `Gradle` wrapper files from child project (when generating a multi-module project). Follow this guide https://t.ly/TmKF- for more information.", "type": "boolean", - "default": true + "default": false }, "quarkusInitializerUrl": { "type": "string", 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 41a84c22..b08e716e 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 @@ -36,13 +36,7 @@ export async function promptForMultiModuleSupport(tree: Tree, options: Normalize initial: `${options.projectName}-parent` }).then((a) => a['parentModuleName'])).replace(/\//g, '-'); - options.keepProjectLevelWrapper = await prompt({ - name: 'keepProjectLevelWrapper', - message: - `A root ${buildSystemName} wrapper will be added in the root module '${options.parentModuleName}'. Do you want to keep the one in the generated child module '${options.projectName}'?`, - type: 'confirm', - initial: false - }).then((a) => a['keepProjectLevelWrapper']); + options.keepProjectLevelWrapper ??= false; } } else { diff --git a/packages/nx-quarkus/src/generators/project/schema.json b/packages/nx-quarkus/src/generators/project/schema.json index c190931a..ce4efdf5 100644 --- a/packages/nx-quarkus/src/generators/project/schema.json +++ b/packages/nx-quarkus/src/generators/project/schema.json @@ -131,7 +131,7 @@ "keepProjectLevelWrapper": { "description": "Keep the `Maven` or `Gradle` wrapper files from child project (when generating a multi-module project). Follow this guide https://t.ly/TmKF- for more information.", "type": "boolean", - "default": true + "default": false }, "quarkusInitializerUrl": { "type": "string", diff --git a/packages/nx-spring-boot/src/generators/preset/schema.json b/packages/nx-spring-boot/src/generators/preset/schema.json index c004d7e8..ed9f4b38 100644 --- a/packages/nx-spring-boot/src/generators/preset/schema.json +++ b/packages/nx-spring-boot/src/generators/preset/schema.json @@ -217,7 +217,7 @@ "keepProjectLevelWrapper": { "description": "Keep the `Maven` or `Gradle` wrapper files from child project (when generating a multi-module project). Follow this guide https://t.ly/yvsp1 for more information.", "type": "boolean", - "default": true + "default": false }, "springInitializerUrl": { "type": "string", 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 2bd2108e..a2f8a3ec 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 @@ -35,13 +35,7 @@ export async function promptForMultiModuleSupport(tree: Tree, options: Normalize initial: `${options.projectName}-parent` }).then((a) => a['multiModuleName'])).replace(/\//g, '-'); - options.keepProjectLevelWrapper = await prompt({ - name: 'keepProjectLevelBuildSystemWrapper', - message: - `A root ${buildSystemName} wrapper will be added in the root module '${options.parentModuleName}'. Do you want to keep the one in the generated child module '${options.projectName}'?`, - type: 'confirm', - initial: false - }).then((a) => a['keepProjectLevelBuildSystemWrapper']); + options.keepProjectLevelWrapper ??= false; } } else { diff --git a/packages/nx-spring-boot/src/generators/project/schema.json b/packages/nx-spring-boot/src/generators/project/schema.json index de87a018..25cd6672 100644 --- a/packages/nx-spring-boot/src/generators/project/schema.json +++ b/packages/nx-spring-boot/src/generators/project/schema.json @@ -200,7 +200,7 @@ "keepProjectLevelWrapper": { "description": "Keep the `Maven` or `Gradle` wrapper files from child project (when generating a multi-module project). Follow this guide https://t.ly/yvsp1 for more information.", "type": "boolean", - "default": true + "default": false }, "springInitializerUrl": { "type": "string",