Skip to content

Commit d0940bb

Browse files
authored
Feature - Amazon Q Code Transform Update (#648)
- 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)
1 parent 21ecf83 commit d0940bb

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

telemetry/definitions/commonDefinitions.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,14 +1041,14 @@
10411041
"type": "string",
10421042
"description": "Names of the pre-validation errors that can occur in the project",
10431043
"allowedValues": [
1044-
"No pom.xml file found",
1045-
"No Java project found",
1046-
"Mixed Java project and another language found",
1047-
"Project selected is not Java 8 or Java 11",
1048-
"Only Maven projects supported",
1049-
"Empty project",
1050-
"Non SSO login",
1051-
"Project running on backend"
1044+
"NoPom",
1045+
"NoJavaProject",
1046+
"MixedLanguages",
1047+
"UnsupportedJavaVersion",
1048+
"NonMavenProject",
1049+
"EmptyProject",
1050+
"NonSsoLogin",
1051+
"RemoteRunProject"
10521052
]
10531053
},
10541054
{

telemetry/vscode/src/generate.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ function getArgsFromMetadata(m: MetadataType): string {
8181
name,
8282
kind: StructureKind.TypeAlias,
8383
isExported: true,
84-
type: m.allowedValues.map(v => {
85-
const modifiedVal = typeof v === "string" ? v.replace(/\s/g, "_") : v;
86-
return `'${modifiedVal}'`
87-
}).join(' | '),
84+
type: m.allowedValues.map(v => `'${v}'`).join(' | '),
8885
})
8986
}
9087

0 commit comments

Comments
 (0)