Skip to content

Commit

Permalink
feat(nest): update nest generators to support name and directory form…
Browse files Browse the repository at this point in the history
…at option (#19668)

Co-authored-by: FrozenPandaz <[email protected]>
  • Loading branch information
Cammisuli and FrozenPandaz authored Oct 17, 2023
1 parent 81e8d12 commit aa7625b
Show file tree
Hide file tree
Showing 48 changed files with 629 additions and 218 deletions.
16 changes: 11 additions & 5 deletions docs/generated/packages/nest/generators/class.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "class",
"factory": "./src/generators/class/class",
"factory": "./src/generators/class/class#classGeneratorInternal",
"schema": {
"$schema": "http://json-schema.org/schema",
"$id": "NxNestClassGenerator",
Expand All @@ -15,15 +15,20 @@
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use?"
},
"nameAndDirectoryFormat": {
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
"type": "string",
"enum": ["as-provided", "derived"]
},
"project": {
"description": "The Nest project to target.",
"type": "string",
"$default": { "$source": "projectName" },
"alias": "p",
"x-prompt": "What Nest project would you like to target?"
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v18."
},
"directory": {
"description": "Directory where the generated files are placed.",
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
"type": "string",
"aliases": ["dir", "path"]
},
Expand All @@ -41,6 +46,7 @@
},
"flat": {
"description": "Flag to indicate if a directory is created.",
"x-deprecated": "provide the `directory` option instead and use the `as-provided` format. it will be removed in nx v18.",
"type": "boolean",
"default": true
},
Expand All @@ -51,11 +57,11 @@
}
},
"additionalProperties": false,
"required": ["name", "project"],
"required": ["name"],
"presets": []
},
"description": "Run the `class` NestJS generator with Nx project support.",
"implementation": "/packages/nest/src/generators/class/class.ts",
"implementation": "/packages/nest/src/generators/class/class#classGeneratorInternal.ts",
"aliases": [],
"hidden": false,
"path": "/packages/nest/src/generators/class/schema.json",
Expand Down
16 changes: 11 additions & 5 deletions docs/generated/packages/nest/generators/controller.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "controller",
"factory": "./src/generators/controller/controller",
"factory": "./src/generators/controller/controller#controllerGeneratorInternal",
"schema": {
"$schema": "http://json-schema.org/schema",
"$id": "NxNestControllerGenerator",
Expand All @@ -20,10 +20,15 @@
"type": "string",
"$default": { "$source": "projectName" },
"alias": "p",
"x-prompt": "What Nest project would you like to target?"
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v18."
},
"nameAndDirectoryFormat": {
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
"type": "string",
"enum": ["as-provided", "derived"]
},
"directory": {
"description": "Directory where the generated files are placed.",
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
"type": "string",
"aliases": ["dir", "path"]
},
Expand All @@ -41,6 +46,7 @@
},
"flat": {
"description": "Flag to indicate if a directory is created.",
"x-deprecated": "provide the `directory` option instead and use the `as-provided` format. it will be removed in nx v18.",
"type": "boolean",
"default": false
},
Expand All @@ -60,11 +66,11 @@
}
},
"additionalProperties": false,
"required": ["name", "project"],
"required": ["name"],
"presets": []
},
"description": "Run the `controller` NestJS generator with Nx project support.",
"implementation": "/packages/nest/src/generators/controller/controller.ts",
"implementation": "/packages/nest/src/generators/controller/controller#controllerGeneratorInternal.ts",
"aliases": [],
"hidden": false,
"path": "/packages/nest/src/generators/controller/schema.json",
Expand Down
16 changes: 11 additions & 5 deletions docs/generated/packages/nest/generators/decorator.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "decorator",
"factory": "./src/generators/decorator/decorator",
"factory": "./src/generators/decorator/decorator#decoratorGeneratorInternal",
"schema": {
"$schema": "http://json-schema.org/schema",
"$id": "NxNestDecoratorGenerator",
Expand All @@ -15,15 +15,20 @@
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use?"
},
"nameAndDirectoryFormat": {
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
"type": "string",
"enum": ["as-provided", "derived"]
},
"project": {
"description": "The Nest project to target.",
"type": "string",
"$default": { "$source": "projectName" },
"alias": "p",
"x-prompt": "What Nest project would you like to target?"
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v18."
},
"directory": {
"description": "Directory where the generated files are placed.",
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
"type": "string",
"aliases": ["dir", "path"]
},
Expand All @@ -35,6 +40,7 @@
},
"flat": {
"description": "Flag to indicate if a directory is created.",
"x-deprecated": "provide the `directory` option instead and use the `as-provided` format. it will be removed in nx v18.",
"type": "boolean",
"default": true
},
Expand All @@ -45,11 +51,11 @@
}
},
"additionalProperties": false,
"required": ["name", "project"],
"required": ["name"],
"presets": []
},
"description": "Run the `decorator` NestJS generator with Nx project support.",
"implementation": "/packages/nest/src/generators/decorator/decorator.ts",
"implementation": "/packages/nest/src/generators/decorator/decorator#decoratorGeneratorInternal.ts",
"aliases": [],
"hidden": false,
"path": "/packages/nest/src/generators/decorator/schema.json",
Expand Down
16 changes: 11 additions & 5 deletions docs/generated/packages/nest/generators/filter.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "filter",
"factory": "./src/generators/filter/filter",
"factory": "./src/generators/filter/filter#filterGeneratorInternal",
"schema": {
"$schema": "http://json-schema.org/schema",
"$id": "NxNestFilterGenerator",
Expand All @@ -15,15 +15,20 @@
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use?"
},
"nameAndDirectoryFormat": {
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
"type": "string",
"enum": ["as-provided", "derived"]
},
"project": {
"description": "The Nest project to target.",
"type": "string",
"$default": { "$source": "projectName" },
"alias": "p",
"x-prompt": "What Nest project would you like to target?"
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v18."
},
"directory": {
"description": "Directory where the generated files are placed.",
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
"type": "string",
"aliases": ["dir", "path"]
},
Expand All @@ -41,6 +46,7 @@
},
"flat": {
"description": "Flag to indicate if a directory is created.",
"x-deprecated": "provide the `directory` option instead and use the `as-provided` format. it will be removed in nx v18.",
"type": "boolean",
"default": true
},
Expand All @@ -51,11 +57,11 @@
}
},
"additionalProperties": false,
"required": ["name", "project"],
"required": ["name"],
"presets": []
},
"description": "Run the `filter` NestJS generator with Nx project support.",
"implementation": "/packages/nest/src/generators/filter/filter.ts",
"implementation": "/packages/nest/src/generators/filter/filter#filterGeneratorInternal.ts",
"aliases": [],
"hidden": false,
"path": "/packages/nest/src/generators/filter/schema.json",
Expand Down
16 changes: 11 additions & 5 deletions docs/generated/packages/nest/generators/gateway.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gateway",
"factory": "./src/generators/gateway/gateway",
"factory": "./src/generators/gateway/gateway#gatewayGeneratorInternal",
"schema": {
"$schema": "http://json-schema.org/schema",
"$id": "NxNestGatewayGenerator",
Expand All @@ -15,15 +15,20 @@
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use?"
},
"nameAndDirectoryFormat": {
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
"type": "string",
"enum": ["as-provided", "derived"]
},
"project": {
"description": "The Nest project to target.",
"type": "string",
"$default": { "$source": "projectName" },
"alias": "p",
"x-prompt": "What Nest project would you like to target?"
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v18."
},
"directory": {
"description": "Directory where the generated files are placed.",
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
"type": "string",
"aliases": ["dir", "path"]
},
Expand All @@ -41,6 +46,7 @@
},
"flat": {
"description": "Flag to indicate if a directory is created.",
"x-deprecated": "provide the `directory` option instead and use the `as-provided` format. it will be removed in nx v18.",
"type": "boolean",
"default": true
},
Expand All @@ -51,11 +57,11 @@
}
},
"additionalProperties": false,
"required": ["name", "project"],
"required": ["name"],
"presets": []
},
"description": "Run the `gateway` NestJS generator with Nx project support.",
"implementation": "/packages/nest/src/generators/gateway/gateway.ts",
"implementation": "/packages/nest/src/generators/gateway/gateway#gatewayGeneratorInternal.ts",
"aliases": [],
"hidden": false,
"path": "/packages/nest/src/generators/gateway/schema.json",
Expand Down
16 changes: 11 additions & 5 deletions docs/generated/packages/nest/generators/guard.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "guard",
"factory": "./src/generators/guard/guard",
"factory": "./src/generators/guard/guard#guardGeneratorInternal",
"schema": {
"$schema": "http://json-schema.org/schema",
"$id": "NxNestGuardGenerator",
Expand All @@ -15,15 +15,20 @@
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use?"
},
"nameAndDirectoryFormat": {
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
"type": "string",
"enum": ["as-provided", "derived"]
},
"project": {
"description": "The Nest project to target.",
"type": "string",
"$default": { "$source": "projectName" },
"alias": "p",
"x-prompt": "What Nest project would you like to target?"
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v18."
},
"directory": {
"description": "Directory where the generated files are placed.",
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
"type": "string",
"aliases": ["dir", "path"]
},
Expand All @@ -41,6 +46,7 @@
},
"flat": {
"description": "Flag to indicate if a directory is created.",
"x-deprecated": "provide the `directory` option instead and use the `as-provided` format. it will be removed in nx v18.",
"type": "boolean",
"default": true
},
Expand All @@ -51,11 +57,11 @@
}
},
"additionalProperties": false,
"required": ["name", "project"],
"required": ["name"],
"presets": []
},
"description": "Run the `guard` NestJS generator with Nx project support.",
"implementation": "/packages/nest/src/generators/guard/guard.ts",
"implementation": "/packages/nest/src/generators/guard/guard#guardGeneratorInternal.ts",
"aliases": [],
"hidden": false,
"path": "/packages/nest/src/generators/guard/schema.json",
Expand Down
16 changes: 11 additions & 5 deletions docs/generated/packages/nest/generators/interceptor.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "interceptor",
"factory": "./src/generators/interceptor/interceptor",
"factory": "./src/generators/interceptor/interceptor#interceptorGeneratorInternal",
"schema": {
"$schema": "http://json-schema.org/schema",
"$id": "NxNestInterceptorGenerator",
Expand All @@ -15,15 +15,20 @@
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use?"
},
"nameAndDirectoryFormat": {
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
"type": "string",
"enum": ["as-provided", "derived"]
},
"project": {
"description": "The Nest project to target.",
"type": "string",
"$default": { "$source": "projectName" },
"alias": "p",
"x-prompt": "What Nest project would you like to target?"
"x-deprecated": "Provide The `directory` option instead and use the `as-provided` format. the project will be determined from the directory provided. it will be removed in nx v18."
},
"directory": {
"description": "Directory where the generated files are placed.",
"description": "Directory where the generated files are placed. when `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. otherwise, it will be relative to the workspace root.",
"type": "string",
"aliases": ["dir", "path"]
},
Expand All @@ -41,6 +46,7 @@
},
"flat": {
"description": "Flag to indicate if a directory is created.",
"x-deprecated": "provide the `directory` option instead and use the `as-provided` format. it will be removed in nx v18.",
"type": "boolean",
"default": true
},
Expand All @@ -51,11 +57,11 @@
}
},
"additionalProperties": false,
"required": ["name", "project"],
"required": ["name"],
"presets": []
},
"description": "Run the `interceptor` NestJS generator with Nx project support.",
"implementation": "/packages/nest/src/generators/interceptor/interceptor.ts",
"implementation": "/packages/nest/src/generators/interceptor/interceptor#interceptorGeneratorInternal.ts",
"aliases": [],
"hidden": false,
"path": "/packages/nest/src/generators/interceptor/schema.json",
Expand Down
Loading

1 comment on commit aa7625b

@vercel
Copy link

@vercel vercel bot commented on aa7625b Oct 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx.dev
nx-five.vercel.app

Please sign in to comment.