Skip to content

Commit

Permalink
fix(node): provide calling generator
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez committed Aug 18, 2023
1 parent bb9c668 commit 4972b6e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type ProjectNameAndRootFormat = 'as-provided' | 'derived';
export type ProjectGenerationOptions = {
name: string;
projectType: ProjectType;
callingGenerator: string;
callingGenerator: string | undefined;
directory?: string;
importPath?: string;
projectNameAndRootFormat?: ProjectNameAndRootFormat;
Expand Down
1 change: 1 addition & 0 deletions packages/node/src/generators/application/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ async function normalizeOptions(
directory: options.directory,
projectNameAndRootFormat: options.projectNameAndRootFormat,
rootProject: options.rootProject,
callingGenerator: '@nx/node:application',
});
options.rootProject = appProjectRoot === '.';
options.projectNameAndRootFormat = projectNameAndRootFormat;
Expand Down
2 changes: 2 additions & 0 deletions packages/node/src/generators/e2e-project/e2e-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ async function normalizeOptions(
projectNameAndRootFormat: options.rootProject
? 'as-provided'
: options.projectNameAndRootFormat,
// this is an internal generator, don't save defaults
callingGenerator: undefined,
});

return {
Expand Down
1 change: 1 addition & 0 deletions packages/node/src/generators/library/library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ async function normalizeOptions(
directory: options.directory,
importPath: options.importPath,
projectNameAndRootFormat: options.projectNameAndRootFormat,
callingGenerator: '@nx/node:library',
});
options.projectNameAndRootFormat = projectNameAndRootFormat;

Expand Down

0 comments on commit 4972b6e

Please sign in to comment.