Skip to content

Commit

Permalink
Feature - Amazon Q Code Transform Update (#648)
Browse files Browse the repository at this point in the history
- Update allowedValues for definition to remove spaces from values
- Update Typescript to NOT replace spaces in allowedValues with underscores (reverts [a change](20f0acf#diff-b07a8556bfb0fe92b489e953fc990b016eb2976ebac546cb9cfcc2ae99c19e31L84) in #638)
  • Loading branch information
damntrecky authored Dec 11, 2023
1 parent 21ecf83 commit d0940bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
16 changes: 8 additions & 8 deletions telemetry/definitions/commonDefinitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1041,14 +1041,14 @@
"type": "string",
"description": "Names of the pre-validation errors that can occur in the project",
"allowedValues": [
"No pom.xml file found",
"No Java project found",
"Mixed Java project and another language found",
"Project selected is not Java 8 or Java 11",
"Only Maven projects supported",
"Empty project",
"Non SSO login",
"Project running on backend"
"NoPom",
"NoJavaProject",
"MixedLanguages",
"UnsupportedJavaVersion",
"NonMavenProject",
"EmptyProject",
"NonSsoLogin",
"RemoteRunProject"
]
},
{
Expand Down
5 changes: 1 addition & 4 deletions telemetry/vscode/src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,7 @@ function getArgsFromMetadata(m: MetadataType): string {
name,
kind: StructureKind.TypeAlias,
isExported: true,
type: m.allowedValues.map(v => {
const modifiedVal = typeof v === "string" ? v.replace(/\s/g, "_") : v;
return `'${modifiedVal}'`
}).join(' | '),
type: m.allowedValues.map(v => `'${v}'`).join(' | '),
})
}

Expand Down

0 comments on commit d0940bb

Please sign in to comment.