+ }
+
+ $packageFiles = $this->expandPackageFiles( $context );
+ if ( $packageFiles ) {
+ // Extract the minimum needed:
+ // - The 'main' pointer (included as-is).
+ // - The 'files' array, simplied to only which files exist (the keys of
+ // this array), and something that represents their non-file content.
+ // For packaged files that reflect files directly from disk, the
+ // 'getFileHashes' method tracks this already.
+ // It is important that the keys of the 'files' array are preserved,
+ // as they affect the module output.
+ $packageFiles['files'] = array_map( function ( $fileInfo ) {
+ return $fileInfo['definitionSummary'] ?? ( $fileInfo['content'] ?? null );
+ }, $packageFiles['files'] );
+ }