Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change error message names to product #84

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/selfish-snails-think.md
emlyn-arkahna marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@featureboard/code-generator': patch
'@featureboard/cli': patch
---

Find \*.csproj files as long as they are in a parent folder when trying to find a namespace
Prompt for a namespace if once can't be resolved
Allow users to specify an absolute path for the output file
7 changes: 7 additions & 0 deletions .changeset/warm-ducks-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@featureboard/code-generator': patch
'@featureboard/nx-plugin': patch
---

Change error message names to product
Fix path in executor
8 changes: 4 additions & 4 deletions libs/code-generator/src/lib/code-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ async function getConfig({
if (projectResults.projects.length === 1) {
project = projectResults.projects[0]
console.log(
`One project found. Setting FeatureBoard project to ${project.name}`,
`One project found. Setting FeatureBoard product to ${project.name}`,
)
} else {
const promptResult = await prompts({
type: 'select',
name: 'project',
message: `Pick your FeatureBoard project?`,
message: `Pick your FeatureBoard product?`,
validate: (x) =>
projectResults.projects.map((x) => x.name).includes(x),
choices: projectResults.projects.map((x) => ({
Expand All @@ -114,11 +114,11 @@ async function getConfig({
if (!project)
throw projectResults.projects.length > 0
? new Error(
`Project not specified select one of [${projectResults.projects
`Product not specified select one of [${projectResults.projects
.map((x) => x.name)
.join(', ')}]`,
)
: new Error('Unable to locate Project')
: new Error('Unable to locate Product')

const featuresResult = await getProjectFeatures(apiEndpoint, project, auth)

Expand Down
2 changes: 1 addition & 1 deletion libs/nx-plugin/src/executors/code-gen/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export async function codeGenExecutor(
}
}

tree = tree || new FsTree(projectRoot, context.isVerbose)
tree = tree || new FsTree(context.root, context.isVerbose)

await codeGenerator({
tree: tree,
Expand Down
Loading