Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
fix(nx-mesh): remove additional preset option
Browse files Browse the repository at this point in the history
  • Loading branch information
domjtalbot committed Dec 21, 2022
1 parent 8cc3c07 commit 20d1f1a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/empty-ads-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'nx-mesh': patch
---

Remove additional preset option
3 changes: 1 addition & 2 deletions libs/nx-mesh/src/generators/preset/preset.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ describe('generators/preset', () => {

it('should create a workspace with the graphql-mesh sdk preset', async () => {
await presetGenerator(tree, {
name: 'myorg',
sdkName: 'hello-world',
name: 'hello-world',
compiler: 'tsc',
});

Expand Down
4 changes: 1 addition & 3 deletions libs/nx-mesh/src/generators/preset/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ export async function presetGenerator(
tree: Tree,
options: PresetGeneratorSchema
) {
const { sdkName, ...config } = options;

return await sdkGenerator(tree, { ...config, name: sdkName });
return await sdkGenerator(tree, options);
}

export const presetSchematic = convertNxGenerator(presetGenerator);
Expand Down
4 changes: 1 addition & 3 deletions libs/nx-mesh/src/generators/preset/schema.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import type { SdkGeneratorSchema } from '../sdk/schema';

export interface PresetGeneratorSchema extends SdkGeneratorSchema {
sdkName: string;
}
export type PresetGeneratorSchema = SdkGeneratorSchema;
7 changes: 1 addition & 6 deletions libs/nx-mesh/src/generators/preset/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
},
"x-prompt": "What name would you like to use?"
},
"sdkName": {
"type": "string",
"description": "What would you like to name the SDK?",
"x-prompt": "What would you like to name the SDK?"
},
"directory": {
"description": "The directory of the new sdk.",
"type": "string",
Expand Down Expand Up @@ -156,5 +151,5 @@
"default": false
}
},
"required": ["name", "sdkName"]
"required": ["name"]
}

0 comments on commit 20d1f1a

Please sign in to comment.