File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
libs/plugin/src/generators Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export async function addSobaGenerator(tree: Tree) {
2525 logger . info ( 'Adding angular-three-soba...' ) ;
2626 addMetadataJson ( tree , 'angular-three-soba/metadata.json' ) ;
2727
28- const { peerDependencies } = await prompt < { peerDependencies : string [ ] [ ] } > ( {
28+ const { peerDependencies } = await prompt < { peerDependencies : string [ ] } > ( {
2929 type : 'multiselect' ,
3030 name : 'peerDependencies' ,
3131 message : `To know which peer dependencies we need to add, please select the secondary entry points you are planning to use:` ,
@@ -49,11 +49,15 @@ export async function addSobaGenerator(tree: Tree) {
4949 message : 'I am not sure. Let me add all the peer dependencies.' ,
5050 } ,
5151 ] ,
52+ // @ts -expect-error - result is typed for single select but we're using multi select
53+ result ( values ) {
54+ const mapped = this . map ( values ) ;
55+ return ( values as unknown as string [ ] ) . flatMap ( ( value ) => mapped [ value ] ) ;
56+ } ,
5257 } ) ;
5358
5459 // flatten, dedupe peerDependencies, add to packagesToAdd
5560 peerDependencies
56- . flat ( )
5761 . filter ( ( item , index , array ) => array . indexOf ( item ) === index )
5862 . forEach ( ( item ) => {
5963 if ( ! packagesToAdd . includes ( item ) ) {
Original file line number Diff line number Diff line change 11{
2- "$schema" : " https://json-schema.org/schema" ,
32 "$id" : " AddSoba" ,
43 "title" : " Add Soba"
54}
Original file line number Diff line number Diff line change 11{
2- "$schema" : " http://json-schema.org/schema" ,
32 "cli" : " nx" ,
43 "$id" : " Init" ,
54 "title" : " Init Angular Three" ,
You can’t perform that action at this time.
0 commit comments