File tree 1 file changed +12
-1
lines changed
packages/angular/cli/utilities
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,16 @@ export async function parseJsonSchemaToCommandDescription(
57
57
}
58
58
} ) ;
59
59
}
60
+ if ( json . isJsonArray ( schema . aliases ) ) {
61
+ schema . aliases . forEach ( value => {
62
+ if ( typeof value == 'string' ) {
63
+ aliases . push ( value ) ;
64
+ }
65
+ } ) ;
66
+ }
67
+ if ( typeof schema . alias == 'string' ) {
68
+ aliases . push ( schema . alias ) ;
69
+ }
60
70
61
71
let longDescription = '' ;
62
72
if ( typeof schema . $longDescription == 'string' && schema . $longDescription ) {
@@ -172,7 +182,8 @@ export async function parseJsonSchemaToOptions(
172
182
173
183
const required = json . isJsonArray ( current . required )
174
184
? current . required . indexOf ( name ) != - 1 : false ;
175
- const aliases = json . isJsonArray ( current . aliases ) ? [ ...current . aliases ] . map ( x => '' + x ) : [ ] ;
185
+ const aliases = json . isJsonArray ( current . aliases ) ? [ ...current . aliases ] . map ( x => '' + x )
186
+ : current . alias ? [ '' + current . alias ] : [ ] ;
176
187
const format = typeof current . format == 'string' ? current . format : undefined ;
177
188
const hidden = ! ! current . hidden ;
178
189
You can’t perform that action at this time.
0 commit comments