Skip to content

Commit

Permalink
fix(core): remove nameAndDirectoryFormat & directory from generators
Browse files Browse the repository at this point in the history
  • Loading branch information
ndcunningham committed Sep 25, 2024
1 parent 04cf92a commit 6d55a44
Show file tree
Hide file tree
Showing 114 changed files with 603 additions and 933 deletions.
24 changes: 10 additions & 14 deletions docs/generated/packages/expo/generators/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,25 @@
"type": "object",
"examples": [
{
"command": "g @nx/expo:component my-component --directory=mylib/my-component",
"command": "g @nx/expo:component mylib/my-component --name my-component",
"description": "Generate a component in the mylib library"
},
{
"command": "g @nx/expo:component my-component --directory=mylib/my-component --classComponent",
"command": "g @nx/expo:component mylib/my-component --name my-component --classComponent",
"description": "Generate a class component in the mylib library"
}
],
"properties": {
"path": {
"type": "string",
"description": "Path where the component will be generated.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the component be generated?",
"x-priority": "important"
},
"name": {
"type": "string",
"description": "The name of the component.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What name would you like to use for the component?"
},
"js": {
Expand All @@ -40,16 +46,6 @@
"description": "When true, does not create \"spec.ts\" test files for the new component.",
"default": false
},
"directory": {
"type": "string",
"description": "The directory at which to create the component file. When `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. Otherwise, it will be relative to the project root.",
"x-priority": "important"
},
"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"]
},
"export": {
"type": "boolean",
"description": "When true, the component is exported from the project index.ts (if it exists).",
Expand All @@ -64,7 +60,7 @@
"default": false
}
},
"required": ["name"],
"required": ["path"],
"presets": []
},
"description": "Create a component",
Expand Down
26 changes: 7 additions & 19 deletions docs/generated/packages/nest/generators/class.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,16 @@
"cli": "nx",
"type": "object",
"properties": {
"name": {
"description": "The name of the class.",
"path": {
"description": "Path where the class will be generated.",
"type": "string",
"$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"]
"x-prompt": "Where should the class be generated?"
},
"project": {
"description": "The Nest project to target.",
"type": "string",
"$default": { "$source": "projectName" },
"alias": "p",
"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 v20."
},
"directory": {
"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.",
"name": {
"description": "The name of the class.",
"type": "string",
"aliases": ["dir", "path"]
"x-prompt": "What name would you like to use?"
},
"skipFormat": {
"description": "Skip formatting files.",
Expand All @@ -57,7 +45,7 @@
}
},
"additionalProperties": false,
"required": ["name"],
"required": ["path"],
"presets": []
},
"description": "Run the `class` NestJS generator with Nx project support.",
Expand Down
18 changes: 7 additions & 11 deletions docs/generated/packages/nest/generators/controller.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,18 @@
"cli": "nx",
"type": "object",
"properties": {
"path": {
"description": "Path where the controller will be generated.",
"type": "string",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "Where should the controller be generated?"
},
"name": {
"description": "The name of the controller.",
"type": "string",
"$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"]
},
"directory": {
"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"]
},
"skipFormat": {
"description": "Skip formatting files.",
"type": "boolean",
Expand Down Expand Up @@ -53,7 +49,7 @@
}
},
"additionalProperties": false,
"required": ["name"],
"required": ["path"],
"presets": []
},
"description": "Run the `controller` NestJS generator with Nx project support.",
Expand Down
19 changes: 7 additions & 12 deletions docs/generated/packages/nest/generators/decorator.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,16 @@
"cli": "nx",
"type": "object",
"properties": {
"name": {
"description": "The name of the decorator.",
"path": {
"description": "Path where the decorator will be generated.",
"type": "string",
"$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"]
"x-prompt": "Where should the decorator be generated?"
},
"directory": {
"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.",
"name": {
"description": "The name of the decorator.",
"type": "string",
"aliases": ["dir", "path"]
"x-prompt": "What name would you like to use?"
},
"skipFormat": {
"description": "Skip formatting files.",
Expand All @@ -38,7 +33,7 @@
}
},
"additionalProperties": false,
"required": ["name"],
"required": ["path"],
"presets": []
},
"description": "Run the `decorator` NestJS generator with Nx project support.",
Expand Down
19 changes: 7 additions & 12 deletions docs/generated/packages/nest/generators/filter.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,16 @@
"cli": "nx",
"type": "object",
"properties": {
"name": {
"description": "The name of the filter.",
"path": {
"description": "Path where the filter will be generated.",
"type": "string",
"$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"]
"x-prompt": "Where should the filter be generated?"
},
"directory": {
"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.",
"name": {
"description": "The name of the filter.",
"type": "string",
"aliases": ["dir", "path"]
"x-prompt": "What name would you like to use?"
},
"skipFormat": {
"type": "boolean",
Expand All @@ -44,7 +39,7 @@
}
},
"additionalProperties": false,
"required": ["name"],
"required": ["path"],
"presets": []
},
"description": "Run the `filter` NestJS generator with Nx project support.",
Expand Down
19 changes: 7 additions & 12 deletions docs/generated/packages/nest/generators/gateway.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,16 @@
"cli": "nx",
"type": "object",
"properties": {
"name": {
"description": "The name of the gateway.",
"path": {
"description": "Path where the gateway will be generated.",
"type": "string",
"$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"]
"x-prompt": "Where should the gateway be generated?"
},
"directory": {
"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.",
"name": {
"description": "The name of the gateway.",
"type": "string",
"aliases": ["dir", "path"]
"x-prompt": "What name would you like to use?"
},
"skipFormat": {
"description": "Skip formatting files.",
Expand All @@ -44,7 +39,7 @@
}
},
"additionalProperties": false,
"required": ["name"],
"required": ["path"],
"presets": []
},
"description": "Run the `gateway` NestJS generator with Nx project support.",
Expand Down
17 changes: 6 additions & 11 deletions docs/generated/packages/nest/generators/guard.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,16 @@
"cli": "nx",
"type": "object",
"properties": {
"name": {
"description": "The name of the guard.",
"path": {
"description": "Path where the guard will be generated.",
"type": "string",
"$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"]
"x-prompt": "Where should the guard be generated?"
},
"directory": {
"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.",
"name": {
"description": "The name of the guard.",
"type": "string",
"aliases": ["dir", "path"]
"x-prompt": "What name would you like to use?"
},
"skipFormat": {
"description": "Skip formatting files.",
Expand Down
17 changes: 6 additions & 11 deletions docs/generated/packages/nest/generators/interceptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,16 @@
"cli": "nx",
"type": "object",
"properties": {
"name": {
"description": "The name of the interceptor.",
"path": {
"description": "Path where the interceptor will be generated.",
"type": "string",
"$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"]
"x-prompt": "Where should the interceptor be generated?"
},
"directory": {
"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.",
"name": {
"description": "The name of the interceptor.",
"type": "string",
"aliases": ["dir", "path"]
"x-prompt": "What name would you like to use?"
},
"skipFormat": {
"description": "Skip formatting files.",
Expand Down
26 changes: 7 additions & 19 deletions docs/generated/packages/nest/generators/interface.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,16 @@
"cli": "nx",
"type": "object",
"properties": {
"name": {
"description": "The name of the interface.",
"path": {
"description": "Path where the interface will be generated.",
"type": "string",
"$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"]
"x-prompt": "Where should the interface be generated?"
},
"project": {
"description": "The Nest project to target.",
"type": "string",
"$default": { "$source": "projectName" },
"alias": "p",
"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 v20."
},
"directory": {
"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.",
"name": {
"description": "The name of the interface.",
"type": "string",
"aliases": ["dir", "path"]
"x-prompt": "What name would you like to use?"
},
"skipFormat": {
"description": "Skip formatting files.",
Expand All @@ -46,7 +34,7 @@
}
},
"additionalProperties": false,
"required": ["name"],
"required": ["path"],
"presets": []
},
"description": "Run the `interface` NestJS generator with Nx project support.",
Expand Down
19 changes: 7 additions & 12 deletions docs/generated/packages/nest/generators/middleware.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,16 @@
"cli": "nx",
"type": "object",
"properties": {
"name": {
"description": "The name of the middleware.",
"path": {
"description": "Path where the middleware will be generated.",
"type": "string",
"$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"]
"x-prompt": "Where should the middleware be generated?"
},
"directory": {
"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.",
"name": {
"description": "The name of the middleware.",
"type": "string",
"aliases": ["dir", "path"]
"x-prompt": "What name would you like to use?"
},
"skipFormat": {
"description": "Skip formatting files.",
Expand All @@ -44,7 +39,7 @@
}
},
"additionalProperties": false,
"required": ["name"],
"required": ["path"],
"presets": []
},
"description": "Run the `middleware` NestJS generator with Nx project support.",
Expand Down
Loading

0 comments on commit 6d55a44

Please sign in to comment.