@@ -1082,6 +1082,15 @@ public static bool TryConvertFromContainerRegistryJson(
10821082 { "NormalizedVersion" , metadata [ "NormalizedVersion" ] . ToString ( ) }
10831083 } ;
10841084
1085+ ParseHttpMetadataType ( metadata [ "Tags" ] as string [ ] , out ArrayList commandNames , out ArrayList cmdletNames , out ArrayList dscResourceNames ) ;
1086+ var resourceHashtable = new Hashtable {
1087+ { nameof ( PSResourceInfo . Includes . Command ) , new PSObject ( commandNames ) } ,
1088+ { nameof ( PSResourceInfo . Includes . Cmdlet ) , new PSObject ( cmdletNames ) } ,
1089+ { nameof ( PSResourceInfo . Includes . DscResource ) , new PSObject ( dscResourceNames ) }
1090+ } ;
1091+
1092+ var includes = new ResourceIncludes ( resourceHashtable ) ;
1093+
10851094 psGetInfo = new PSResourceInfo (
10861095 additionalMetadata : additionalMetadataHashtable ,
10871096 author : metadata [ "Authors" ] as String ,
@@ -1090,7 +1099,7 @@ public static bool TryConvertFromContainerRegistryJson(
10901099 dependencies : metadata [ "Dependencies" ] as Dependency [ ] ,
10911100 description : metadata [ "Description" ] as String ,
10921101 iconUri : null ,
1093- includes : null ,
1102+ includes : includes ,
10941103 installedDate : null ,
10951104 installedLocation : null ,
10961105 isPrerelease : ( bool ) metadata [ "IsPrerelease" ] ,
@@ -1709,6 +1718,12 @@ private static ResourceType ParseHttpMetadataType(
17091718 dscResourceNames = new ArrayList ( ) ;
17101719
17111720 ResourceType pkgType = ResourceType . Module ;
1721+
1722+ if ( tags == null )
1723+ {
1724+ return pkgType ;
1725+ }
1726+
17121727 foreach ( string tag in tags )
17131728 {
17141729 if ( String . Equals ( tag , "PSScript" , StringComparison . InvariantCultureIgnoreCase ) )
0 commit comments