Hey @pmsensi ,
Just to jump in here... it sounds like there are two issues.
I think the first issue is that properties like owners
, verified
, etc. are not returned for local packages.
Those properties are not "package metadata" properties (i.e. stored inside the package), but they're "server metadata" properties (i.e. stored outside the package, on the server). Other server metadata properties are downloadCount
and listed
.
ProGet does not support all of the server metadata properties that nuget.org does; but even if it did, the properties would not be copied from a connector when a package is added to the feed. This is why downloadCount
turns to 0
when cache a package.
However, server metadata properties are "passed through" remote packages.
The "package metadata" properties are contained in the .nuspec
manifest file:
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Microsoft.Playwright.NUnit</id>
<version>1.35.0</version>
<title>Microsoft.Playwright.NUnit</title>
<authors>Microsoft</authors>
<license type="expression">MIT</license>
<licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
<icon>icon.png</icon>
<projectUrl>https://github.com/microsoft/playwright-dotnet</projectUrl>
<description>Playwright enables reliable end-to-end testing for modern web apps. This package brings in additional helpers and fixtures to enable using it within NUnit.</description>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<tags>headless,chrome,firefox,webkit,playwright</tags>
<repository type="git" url="https://github.com/microsoft/playwright-dotnet.git" commit="ca7b02ac910e573666f48d502bfabb1c17639e68"/>
<dependencies>
<group targetFramework=".NETStandard2.0">
<dependency id="Microsoft.Playwright.TestAdapter" version="1.35.0" exclude="Build,Analyzers"/>
<dependency id="Microsoft.Playwright" version="1.35.0" exclude="Build,Analyzers"/>
<dependency id="Microsoft.NET.Test.Sdk" version="16.11.0" exclude="Build,Analyzers"/>
<dependency id="NUnit" version="3.13.2" exclude="Build,Analyzers"/>
<dependency id="NUnit3TestAdapter" version="4.0.0" exclude="Build,Analyzers"/>
</group>
</dependencies>
</metadata>
</package>
The second issue, I think, is that the versions
property is not aggregated. This isn't really feasible/possible to do as a result of the "paged searching" that Dean mentioned.
For example, if you search search a feed for q=foo,take=2
, then ProGet will work as follows:
- Search local packages for
foo
- Return up to 2 search results; if not enough results, then ...
- Forward search to first connector
- Return search results; if not enough, then...
- Forward search to second connector
- Etc...
To get the behavior that you'd like, ProGet would need to:
- Search local packages for
foo
- For each search result, query each connector for a list of all package versions (registrations)
- Aggregate those results into the
version
property - Return up to 2 search results; if not enough result then...
So this is why it's not really possible to get search API to behave like you'd expect.
Hope that helps,
Nanci