PSResourceGet
PSResourceGet copied to clipboard
PSResourceInfo tags should not include PSResourceGet impl tags
Prerequisites
- [X] Write a descriptive title.
- [X] Make sure you are able to repro it on the latest released version
- [X] Search the existing issues.
Steps to reproduce
PSResourceInfo tags should not include PSResourceGet implementation tags only the ones that the user defined and show up on the gallery.
PSScript
PSModule
PSFunction_*
PSCmdlet_*
PSCommand_*
PSEdition_*
PSIncludes_*
etc
Expected behavior
Azure
Deploy
VM
Actual behavior
Azure
Deploy
VM
PSScript
PSFunction_New-RandomString
PSCommand_New-RandomString
PSFunction_Add-VM
PSCommand_Add-VM
PSIncludes_Function
Error details
n/a
Environment data
1.1.0-preview1
Visuals
No response
That's what the PowerShell Gallery API returns too though.
# Using PSResourceGet
(Find-PSResource -Repository 'PSGallery' -Prerelease -Name 'Microsoft.PowerShell.PSResourceGet' -Debug).'Tags' | Sort-Object
# Using API
(
Invoke-RestMethod -Method 'Get' -Uri (
'https://www.powershellgallery.com/api/v2/FindPackagesById()?$filter=Id+eq+%27Microsoft.PowerShell.PSResourceGet%27+and+IsAbsoluteLatestVersion&$inlinecount=allpages&id=%27Microsoft.PowerShell.PSResourceGet%27'
)
).'properties'.'Tags'.Split(' ') | Sort-Object
What should be done to solve this then?
- Change what the API returns?
- Client, filter out tags returned starting with:
-
PSCmdlet_ -
PSCommand_ -
PSFunction_ -
PSIncludes_
-
The NuGet API shouldn't be changed. This should be done on the client side. Just like how PSGallery removes implementation tags from the tag value.
https://www.powershellgallery.com/packages/Microsoft.PowerShell.PSResourceGet/1.1.0-RC1