@@ -81,7 +81,7 @@ export class ConnectionResolver {
81
81
componentFilter = ( component : Partial < FileProperties > ) : boolean => isPlainObject ( component )
82
82
) : Promise < ResolveConnectionResult > {
83
83
// Aggregate array of metadata records in the org
84
- const Aggregator : Array < Partial < FileProperties > > = [ ] ;
84
+ let aggregator : Array < Partial < FileProperties > > = [ ] ;
85
85
// Folder component type names. Each array value has the form [type::folder]
86
86
const folderComponentTypes : string [ ] = [ ] ;
87
87
// Child component type names
@@ -121,7 +121,7 @@ export class ConnectionResolver {
121
121
) ;
122
122
}
123
123
124
- Aggregator . push ( component ) ;
124
+ aggregator . push ( component ) ;
125
125
if ( componentType . folderContentType ) {
126
126
const type = this . registry . getTypeByName ( componentType . folderContentType ) . name ;
127
127
const folder = component . fullName ;
@@ -135,23 +135,26 @@ export class ConnectionResolver {
135
135
}
136
136
137
137
if ( folderComponentTypes . length ) {
138
- Aggregator . push ( ...( await this . sendBatchedRequests ( folderComponentTypes ) ) ) ;
138
+ const folderFileProps = await this . sendBatchedRequests ( folderComponentTypes ) ;
139
+ aggregator = aggregator . concat ( folderFileProps ) ;
139
140
}
140
141
141
142
if ( childComponentTypes . size > 0 ) {
142
- Aggregator . push ( ...( await this . sendBatchedRequests ( Array . from ( childComponentTypes ) ) ) ) ;
143
+ const childComponentFileProps = await this . sendBatchedRequests ( Array . from ( childComponentTypes ) ) ;
144
+ aggregator = aggregator . concat ( childComponentFileProps ) ;
143
145
}
144
146
145
147
// If we need to query the list of StandardValueSets (i.e., it's included in this.mdTypeNames)
146
148
// make those requests now.
147
149
if ( shouldQueryStandardValueSets ) {
148
- Aggregator . push ( ...( await this . sendBatchedQueries ( ) ) ) ;
150
+ const svsFileProps = await this . sendBatchedQueries ( ) ;
151
+ aggregator = aggregator . concat ( svsFileProps ) ;
149
152
}
150
153
151
154
getLogger ( ) . debug ( `https request count = ${ requestCount } ` ) ;
152
155
153
156
return {
154
- components : Aggregator . filter ( componentFilter ) . map ( ( component ) => ( {
157
+ components : aggregator . filter ( componentFilter ) . map ( ( component ) => ( {
155
158
fullName : ensureString (
156
159
component . fullName ,
157
160
`Component fullName was not set for ${ component . fileName ?? '<missing filename>' } `
0 commit comments