From bbdbff09538bf2c363dcea36fc566cbaa1f5d1ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leosvel=20P=C3=A9rez=20Espinosa?= Date: Fri, 18 Aug 2023 11:00:49 +0100 Subject: [PATCH] fix(nest): provide calling generator --- .../src/generators/application/lib/normalize-options.ts | 6 +++--- .../nest/src/generators/library/lib/normalize-options.ts | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/nest/src/generators/application/lib/normalize-options.ts b/packages/nest/src/generators/application/lib/normalize-options.ts index 2b2af84965ad66..3c2d402439da13 100644 --- a/packages/nest/src/generators/application/lib/normalize-options.ts +++ b/packages/nest/src/generators/application/lib/normalize-options.ts @@ -8,20 +8,20 @@ export async function normalizeOptions( tree: Tree, options: ApplicationGeneratorOptions ): Promise { - // TODO(leo): uncomment things below const { projectName: appProjectName, projectRoot: appProjectRoot, - // projectNameAndRootFormat, + projectNameAndRootFormat, } = await determineProjectNameAndRootOptions(tree, { name: options.name, projectType: 'application', directory: options.directory, projectNameAndRootFormat: options.projectNameAndRootFormat, rootProject: options.rootProject, + callingGenerator: '@nx/nest:application', }); options.rootProject = appProjectRoot === '.'; - // options.projectNameAndRootFormat = projectNameAndRootFormat; + options.projectNameAndRootFormat = projectNameAndRootFormat; return { ...options, diff --git a/packages/nest/src/generators/library/lib/normalize-options.ts b/packages/nest/src/generators/library/lib/normalize-options.ts index 1a9fa73ffff31c..032a54c2a5d368 100644 --- a/packages/nest/src/generators/library/lib/normalize-options.ts +++ b/packages/nest/src/generators/library/lib/normalize-options.ts @@ -20,6 +20,7 @@ export async function normalizeOptions( directory: options.directory, importPath: options.importPath, projectNameAndRootFormat: options.projectNameAndRootFormat, + callingGenerator: '@nx/nest:library', }); const fileName = options.simpleName