@@ -85,6 +85,8 @@ interface InitWithConfigStatusReport extends InitStatusReport {
85
85
paths_ignore : string ;
86
86
/** Comma-separated list of queries sources, from the 'queries' config field or workflow input. */
87
87
queries : string ;
88
+ /** Stringified JSON object of packs, from the 'packs' config field or workflow input. */
89
+ packs : string ;
88
90
/** Comma-separated list of languages for which we are using TRAP caching. */
89
91
trap_cache_languages : string ;
90
92
/** Size of TRAP caches that we downloaded, in bytes. */
@@ -174,13 +176,32 @@ async function sendCompletedStatusReport(
174
176
queries . push ( ...queriesInput . split ( "," ) ) ;
175
177
}
176
178
179
+ let packs : Record < string , string [ ] > = { } ;
180
+ if ( ( config . augmentationProperties . packsInputCombines || ! config . augmentationProperties . packsInput )
181
+ && config . originalUserInput . packs
182
+ ) {
183
+ // If it is an array, that single language analysis we assume
184
+ // there is only a single language being analyzed.
185
+ if ( Array . isArray ( config . originalUserInput . packs ) ) {
186
+ packs [ config . languages [ 0 ] ] = config . originalUserInput . packs ;
187
+ } else {
188
+ packs = config . originalUserInput . packs ;
189
+ }
190
+ }
191
+
192
+ if ( config . augmentationProperties . packsInput ) {
193
+ packs [ config . languages [ 0 ] ] ??= [ ] ;
194
+ packs [ config . languages [ 0 ] ] . push ( ...config . augmentationProperties . packsInput ) ;
195
+ }
196
+
177
197
// Append fields that are dependent on `config`
178
198
const initWithConfigStatusReport : InitWithConfigStatusReport = {
179
199
...initStatusReport ,
180
200
disable_default_queries : disableDefaultQueries ,
181
201
paths,
182
202
paths_ignore : pathsIgnore ,
183
203
queries : queries . join ( "," ) ,
204
+ packs : JSON . stringify ( packs ) ,
184
205
trap_cache_languages : Object . keys ( config . trapCaches ) . join ( "," ) ,
185
206
trap_cache_download_size_bytes : Math . round (
186
207
await getTotalCacheSize ( config . trapCaches , logger ) ,
0 commit comments