From 1c47564acd253b90e0bab367eebeede223c10c2d Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Tue, 3 Oct 2023 08:23:56 -0300 Subject: [PATCH] fix blueprint cli without generator- prefix --- generators/generate-blueprint/templates/cli/cli.cjs.ejs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generators/generate-blueprint/templates/cli/cli.cjs.ejs b/generators/generate-blueprint/templates/cli/cli.cjs.ejs index e46fe889d684..7e249bb66095 100755 --- a/generators/generate-blueprint/templates/cli/cli.cjs.ejs +++ b/generators/generate-blueprint/templates/cli/cli.cjs.ejs @@ -8,6 +8,7 @@ const { version, bin } = require('../package.json'); const packagePath = dirname(__dirname); const packageFolderName = basename(packagePath); const devBlueprintPath = join(packagePath, '.blueprint'); +const blueprint = packageFolderName.startsWith('jhipster-') ? `generator-${packageFolderName}` : packageFolderName; (async () => { const { runJHipster, done, logger } = await import('generator-jhipster/cli'); @@ -19,7 +20,7 @@ const devBlueprintPath = join(packagePath, '.blueprint'); defaultCommand: 'app', devBlueprintPath, blueprints: { - [packageFolderName]: version, + [blueprint]: version, }, printBlueprintLogo: () => { console.log('===================== JHipster <%= baseName %> =====================');