Relevant area(s)
WinGet CLI
Description of the new feature / enhancement
Using winget source add users have to specify the source type. This is an additional friction point for users. Since there are only two types of sources available to users - PreIndexedPackage and Rest (the other source types are internal or restricted, e.g msstore) - it should be possible for WinGet to determine which type of source a user is adding even without the argument.
Proposed technical implementation details
Make a head request to the REST endpoint for infromation. If the request matches what is expected for a REST source, use that type. Otherwise, check if a source file is being served. If a file is being served, use PreIndexedPackage. Otherwise, error and request the user to specify the type
Relevant area(s)
WinGet CLI
Description of the new feature / enhancement
Using
winget source addusers have to specify the source type. This is an additional friction point for users. Since there are only two types of sources available to users - PreIndexedPackage and Rest (the other source types are internal or restricted, e.g msstore) - it should be possible for WinGet to determine which type of source a user is adding even without the argument.Proposed technical implementation details
Make a head request to the REST endpoint for infromation. If the request matches what is expected for a REST source, use that type. Otherwise, check if a source file is being served. If a file is being served, use PreIndexedPackage. Otherwise, error and request the user to specify the type