-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WinGet Source COM Api #4813
WinGet Source COM Api #4813
Commits on Sep 16, 2024
-
Implement skeleton for package catalog management
- Update IDL for new runtime classes and methods. - Add files and classes for package catalog operations (add, remove, reset, update). - Update `PackageManager` with async methods for catalog operations. [Compiles successfully]
Configuration menu - View commit details
-
Copy full SHA for 874c523 - Browse repository at this point
Copy the full SHA 874c523View commit details -
Add new vector interfaces for package catalog operations
Introduced new interfaces in the `Microsoft.Management.Deployment` namespace within the `PackageManager.idl` file. Added interfaces for handling collections of `AddPackageCatalogOptions`, `AddPackageCatalogResult`, `RemovePackageCatalogResult`, `ResetPackageCatalogResult`, and `UpdatePackageCatalogResult`.
Configuration menu - View commit details
-
Copy full SHA for 2ba2e77 - Browse repository at this point
Copy the full SHA 2ba2e77View commit details -
Add registration for AddPackageCatalogOptions COM class
- Update `Package.appxmanifest` with a new entry. - Add a new entry in `Microsoft.Management.Deployment.InProc.dll.manifest`. - Define new `constexpr CLSID` values for `AddPackageCatalogOptions` in `Factory.cpp`. - Update `s_nameCLSIDPairs` array to include `AddPackageCatalogOptions`.
Configuration menu - View commit details
-
Copy full SHA for 084e9a7 - Browse repository at this point
Copy the full SHA 084e9a7View commit details -
Add C# WinRT Projection for AddPackageCatalogOptions class
- Add entry to type dictionary in ClassesDefinition.cs. - Introduce CreateAddPackageCatalogOptions method in WinGetProjectionFactory.cs.
Configuration menu - View commit details
-
Copy full SHA for 8dbdbb8 - Browse repository at this point
Copy the full SHA 8dbdbb8View commit details
Commits on Sep 17, 2024
-
[PR Feedback:] Refactor AddPackageCatalogOptions and update PackageMa…
…nager.idl - Renamed `CatalogName` to `Name` and `m_catalogName` to `m_name` in `AddPackageCatalogOptions`. - Removed `Arguments` property and its methods. - Added new boolean property `Explicit` with getter and setter. Updated `PackageManager.idl` to reflect these changes: - Renamed `CatalogName` to `Name` with updated comments. - Removed `Arguments` property. - Added `Explicit` property with explanatory comments. - Updated `RemovePackageCatalogAsync` description to use "catalog". - Removed several `IVector` and `IVectorView` interfaces related to package catalog options and results.
Configuration menu - View commit details
-
Copy full SHA for fb402a1 - Browse repository at this point
Copy the full SHA fb402a1View commit details -
[PR Feedback:] Refactor progress reporting for CatalogPackageAsync me…
…thods - Simplified progress reporting for *CatalogPackageAsync operations in PackageManager by using a double type. - Updated method signatures and removed related enums and structures in PackageManager.cpp, PackageManager.h, and PackageManager.idl.
Configuration menu - View commit details
-
Copy full SHA for bb0923b - Browse repository at this point
Copy the full SHA bb0923bView commit details -
[PR Feedback:] Refactor package catalog operations to async methods
- Introduce new async methods in `PackageCatalogReference` for removing, resetting, and updating package catalogs. - These methods are defined in `PackageCatalogReference.h` and implemented as placeholders in `PackageCatalogReference.cpp`. - Remove corresponding methods from `PackageManager`, shifting responsibility to `PackageCatalogReference`. Update `PackageManager.idl` to reflect these changes: - Add enums and result classes for new operations. - Include new async methods in `PackageCatalogReference`. - Remove outdated methods from `PackageManager`.
Configuration menu - View commit details
-
Copy full SHA for a8e28b7 - Browse repository at this point
Copy the full SHA a8e28b7View commit details
Commits on Sep 24, 2024
-
Refactor PackageCatalogReference methods to remove params
- Refactored RemovePackageCatalogAsync and UpdatePackageCatalogAsync to exclude the catalogName parameter in PackageCatalogReference.cpp, PackageCatalogReference.h, and PackageManager.idl. - This modification eliminates the necessity of passing a catalog name, as the required context is now inherently loaded from PackageCatalogInfor within PackageCatalogReference. Note: These operations are not designed to support actions on multiple PackageCatalog/Source, such as ResetAll, UpdateAll, or RemoveAll. These mass operations are intended only for human interactions. For such operations, consumers are expected to recreate 'all' with a simple set of calls.
Configuration menu - View commit details
-
Copy full SHA for c5ccec2 - Browse repository at this point
Copy the full SHA c5ccec2View commit details -
Remove progress reporting from ResetPackageCatalogAsync
- Remove progress reporting from ResetPackageCatalogAsync. The underlying implementation for ResetPackageCatalog does not support progress in Repository::DropSource(..). Therefore, the reset API is now an async operation without progress. - The return type of the `ResetPackageCatalogAsync` method in the `PackageCatalogReference` class has been changed from `winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Management::Deployment::ResetPackageCatalogResult, double>` to `winrt::Windows::Foundation::IAsyncOperation<winrt::Microsoft::Management::Deployment::ResetPackageCatalogResult>`. This change removes the progress reporting capability from the asynchronous operation. - Corresponding changes have been made in `PackageCatalogReference.h` and `PackageManager.idl` to reflect the new return type. - This simplifies the method's signature and potentially its implementation.
Configuration menu - View commit details
-
Copy full SHA for 16d41d0 - Browse repository at this point
Copy the full SHA 16d41d0View commit details
Commits on Sep 27, 2024
-
Eliminate ResetPackageCatalogAsync in favor of options for RemovePack…
…ageCatalogAsync. - The reset operation is a subset of the remove operation but does not include cleanup. - The remove operation ensures that everything the PackageCatalog writes to the system is cleaned up, in addition to removing the package catalog entry from the winget package catalog list. Conversely, the reset operation only removes the entry without performing any cleanup.
Configuration menu - View commit details
-
Copy full SHA for c2d3a0f - Browse repository at this point
Copy the full SHA c2d3a0fView commit details
Commits on Oct 9, 2024
-
Merge branch 'master' of https://github.com/Madhusudhan-MSFT/winget-cli…
… into user/masudars/WinGet_Source_COM_API
Configuration menu - View commit details
-
Copy full SHA for aeb98ea - Browse repository at this point
Copy the full SHA aeb98eaView commit details -
[MergeConflictFix:] Add new NameCLSIDPair for AddPackageCatalogOptions
- Increased the size of the s_nameCLSIDPairs array from 9 to 10 elements in Factory.cpp within the Microsoft::Management::Deployment::OutOfProc namespace. - Added a new NameCLSIDPair entry for Microsoft.Management.Deployment.AddPackageCatalogOptions. Updated the last entry for Microsoft.Management.Deployment.RepairOptions to include a trailing comma.
Configuration menu - View commit details
-
Copy full SHA for e2021d7 - Browse repository at this point
Copy the full SHA e2021d7View commit details -
Remove package catalog handling logic for the changes expected in the…
… upcoming commit - Removed the implementation details for handling the removal and update of package catalogs in the `PackageCatalogReference` class. - Added TODO comments indicating future implementation plans.
Configuration menu - View commit details
-
Copy full SHA for 6410b49 - Browse repository at this point
Copy the full SHA 6410b49View commit details
Commits on Oct 14, 2024
-
- Introduced a new COM class `RemovePackageCatalogOptions` with corresponding CLSIDs and properties. - Updated project files and headers to include the new class. - Added RemovePackageCatalogAsync method to handle the new functionality in `PackageManager`. - Renamed `UpdatePackageCatalog` to `RefreshPackageCatalog` and - Removed the old `UpdatePackageCatalogResult` class and introduced `RefreshPackageCatalogResult`. - Added new properties to `AddPackageCatalogOptions`.
Configuration menu - View commit details
-
Copy full SHA for c41bb16 - Browse repository at this point
Copy the full SHA c41bb16View commit details -
Configuration menu - View commit details
-
Copy full SHA for aa6de76 - Browse repository at this point
Copy the full SHA aa6de76View commit details -
Fix typo in comment for AcceptSourceAgreements
Corrected a typo in the comment for `AcceptSourceAgreements` from "PacakageCatalog" to "PackageCatalog". This change improves the readability and accuracy of the code documentation.
Configuration menu - View commit details
-
Copy full SHA for ac4ae58 - Browse repository at this point
Copy the full SHA ac4ae58View commit details -
Reformat RemovePackageCatalogAsync method declaration
Reformatted the RemovePackageCatalogAsync method declaration in PackageManager.h for improved readability.
Configuration menu - View commit details
-
Copy full SHA for 0bf0ad4 - Browse repository at this point
Copy the full SHA 0bf0ad4View commit details
Commits on Oct 18, 2024
-
Add new error codes and update method documentation
- Two new error codes, `SourceAgreementsNotAccepted` and `AuthenticationError`, were added to the `AddPackageCatalogResult` - enumeration in the `Microsoft.Management.Deployment` namespace. - The `InvalidOptions` error code was added to the `RemovePackageCatalogResult` enumeration in the same namespace. - The comment for the `RemovePackageCatalogAsync` method was updated to clarify that it unregisters a package catalog and eliminates system artifacts based on the provided options.
Configuration menu - View commit details
-
Copy full SHA for f1a064a - Browse repository at this point
Copy the full SHA f1a064aView commit details -
Add CallbackDispatcherSink class for progress updates
- Introduce CallbackDispatcherSink in AppInstaller namespace to manage and dispatch progress updates to registered callbacks. - Implement methods for initializing, updating, and ending progress, as well as adding and firing callbacks. - Ensure thread-safe access with a mutex. - Minor formatting changes included.
Configuration menu - View commit details
-
Copy full SHA for e988965 - Browse repository at this point
Copy the full SHA e988965View commit details -
Add, Remove and Refresh package catalog operations with error handling
Introduced new functionalities for handling package catalog operations, including adding, refreshing, and removing package catalogs. These operations now feature detailed exception handling, progress reporting, and validation checks. Key changes include: - Added `WINGET_CATALOG_CATCH_STORE` macro in ExecutionContext.h. - Implemented `RefreshPackageCatalogAsync` in PackageCatalogReference.cpp. - Implemented `AddPackageCatalogAsync` and `RemovePackageCatalogAsync` in PackageManager.cpp. - Added various helper functions for status mapping and result creation. - Adjusted includes and formatting for consistency in RemovePackageCatalogOptions.h.
Configuration menu - View commit details
-
Copy full SHA for 8bff63e - Browse repository at this point
Copy the full SHA 8bff63eView commit details -
Add PackageCatalogInterop class for E2E PackageCatalog test operations
- The PackageCatalogInterop class handles package catalog operations for end-to-end tests, including adding, removing, and validating package catalogs. - It addresses edge cases like invalid options, duplicate names, and unaccepted source agreements.
Configuration menu - View commit details
-
Copy full SHA for 9f3fad3 - Browse repository at this point
Copy the full SHA 9f3fad3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a39538 - Browse repository at this point
Copy the full SHA 8a39538View commit details -
Merge branch 'user/masudars/WinGet_Source_COM_API' of https://github.…
…com/Madhusudhan-MSFT/winget-cli into user/masudars/WinGet_Source_COM_API
Configuration menu - View commit details
-
Copy full SHA for 3853876 - Browse repository at this point
Copy the full SHA 3853876View commit details -
Refactor status handling for Add, Remove and Refresh with a Template …
…method - Refactored status handling by introducing a template function `GetPackageCatalogOperationStatus` in `Converters.h`, replacing individual status conversion functions in `PackageCatalogReference.cpp` and `PackageManager.cpp`. - Simplified progress reporting by modifying callbacks to report only the current progress value. - Moved new functions `CheckForDuplicateSource`, `CreateSourceFromOptions`, and `GetMatchingSource` in `PackageManager.cpp` close all the private methods. - Included `<optional>` header to support `std::optional`. - Cleaned up redundant code and improved comments for better clarity.
Configuration menu - View commit details
-
Copy full SHA for 7714865 - Browse repository at this point
Copy the full SHA 7714865View commit details -
Align RepairOptions struct with its UUID attribute
The indentation of the `struct RepairOptions` declaration has been adjusted. Specifically, the indentation level has been decreased by one level, aligning it with the `[uuid(WINGET_OUTOFPROC_COM_CLSID_RepairOptions)]` attribute. This change improves code readability and consistency.
Configuration menu - View commit details
-
Copy full SHA for a0a91ba - Browse repository at this point
Copy the full SHA a0a91baView commit details -
Update contract version to 12 in deployment namespaces for WinGet Pac…
…kageCatalog COM APIs (as it is targetted for 1.10 release) Updated contract version from 11 to 12 in `winrt::Microsoft::Management::Deployment::implementation` and `Microsoft.Management.Deployment` namespaces. Changes include: - Updated comments and attributes in `PackageCatalogReference.h`, `PackageManager.h`, and `PackageManager.idl`. - Modified `contractversion` attribute in `PackageManager.idl` to 12. - Adjusted contract attributes for enums, runtime classes, and methods to version 12. These updates ensure the codebase aligns with the new contract version, incorporating any new features, improvements, or fixes.
Configuration menu - View commit details
-
Copy full SHA for 75c68a2 - Browse repository at this point
Copy the full SHA 75c68a2View commit details -
[SpellCheck_Error] Fix typo in RemovePackageCatalogAsync method comment
Corrected the term "Packagecatalog" to "Package Catalog" in the comment for the RemovePackageCatalogAsync method in the Microsoft.Management.Deployment namespace.
Configuration menu - View commit details
-
Copy full SHA for fead163 - Browse repository at this point
Copy the full SHA fead163View commit details -
Improve clarity of RemoveNonExistingPackageCatalog comment
Updated the comment for the RemoveNonExistingPackageCatalog method to enhance readability and grammatical correctness. Changed "Remove non existing package catalog." to "Remove a non-existent package catalog." to make the purpose of the method clearer.
Configuration menu - View commit details
-
Copy full SHA for 9fef0f8 - Browse repository at this point
Copy the full SHA 9fef0f8View commit details -
Fix for forbidden-pattern error by spellchecking bot.
Updated the comment for the RemoveNonExistingPackageCatalog method to improve clarity. The new comment "Remove a package catalog that is not present" is more straightforward and easier to understand.
Configuration menu - View commit details
-
Copy full SHA for 69462af - Browse repository at this point
Copy the full SHA 69462afView commit details -
Remove <Natvis> element from vcxproj.filters
Deleted the <ItemGroup> containing the <Natvis> element from the Microsoft.Management.Deployment.vcxproj.filters file. This change removes the inclusion of the wil.natvis file, which provided custom visualizations for native types in Visual Studio.
Configuration menu - View commit details
-
Copy full SHA for 016c618 - Browse repository at this point
Copy the full SHA 016c618View commit details
Commits on Oct 21, 2024
-
Refactor error handling that includes logging and update test cases
- Removed WINGET_CATALOG_CATCH_STORE macro from ExecutionContext.h. - Refactored GetPackageCatalogOperationStatus in Converters.h. - Updated PackageCatalogReference.cpp to use HandleException. - Refactored PackageManager.cpp for detailed exception handling. - Added new test cases for insecure URI and invalid type scenarios. - Updated PackageCatalogInterop.cs tests to use InvalidOptions status. - Added comments for admin validation checks in InProc/OutOfProc calls.
Configuration menu - View commit details
-
Copy full SHA for b4db8df - Browse repository at this point
Copy the full SHA b4db8dfView commit details -
Extend group policy tests to include package catalog management opera…
…tion - Introduced `TestClassTearDown` method with `[OneTimeTearDown]` attribute. - Added `AddUpdateRemovePackageCatalog` method for catalog management. - Added `RemovePackageCatalog` method for catalog removal. - Integrated `AddUpdateRemovePackageCatalog` into existing tests.
Configuration menu - View commit details
-
Copy full SHA for 28b0a12 - Browse repository at this point
Copy the full SHA 28b0a12View commit details -
Configuration menu - View commit details
-
Copy full SHA for e1902d9 - Browse repository at this point
Copy the full SHA e1902d9View commit details -
Simplify default source type retrieval in PackageManager
- Integrate the fix from "Fix for Source Argument Validation in SourceWorkflow for Default Source Type" (microsoft#4891). This commit incorporates part of the included fix for consistency. - Updated the method of obtaining the default source type in the winrt::Microsoft::Management::Deployment::implementation namespace within PackageManager.cpp. Replaced the use of ::AppInstaller::Repository::ISourceFactory::GetForType("")->TypeName() with ::AppInstaller::Repository::Source::GetDefaultSourceType(). This change simplifies the process and ensures future-proofing against any changes in the SourceFactory's default type.
Configuration menu - View commit details
-
Copy full SHA for 127b4c7 - Browse repository at this point
Copy the full SHA 127b4c7View commit details
Commits on Oct 23, 2024
-
Remove AcceptSourceAgreements property and related logic
The implementation of PackageCatalogReference already includes the necessary logic to handle AcceptSourceAgreements. The `AcceptSourceAgreements` property has been removed from the `AddPackageCatalogOptions` class and its related files. This includes: - Removal of the property from `AddPackageCatalogOptions.h` and `AddPackageCatalogOptions.cpp`. - Removal of source agreement handling logic in `PackageManager.cpp`. - Removal of `SourceAgreementsNotAccepted` status from `AddPackageCatalogStatus` enum in `PackageManager.idl`. - Removal of the `AddPackageCatalogWithSourceAgreementNotAccepted` test case from `PackageCatalogInterop.cs`. - Removal of handling for `APPINSTALLER_CLI_ERROR_SOURCE_AGREEMENTS_NOT_ACCEPTED` error in `Converters.h` and `PackageManager.cpp`. - Updates to test cases in `GroupPolicyForInterop.cs` and `PackageCatalogInterop.cs` to remove the setting of `AcceptSourceAgreements` to `true`.
Configuration menu - View commit details
-
Copy full SHA for ea785f3 - Browse repository at this point
Copy the full SHA ea785f3View commit details -
[PR Feedback]:Refactor error handling and add admin/system check func…
…tions - Added IsRunningAsAdminOrSystem() in Runtime.h and Runtime.cpp. - Added COM class entry for RemovePackageCatalogOptions in Microsoft.Management.Deployment.InProc.dll.manifest. - Corrected NameCLSIDPair syntax in Factory.cpp. - Added and declared new status mapping functions in Converters.cpp and Converters.h. - Encapsulated GetRefreshPackageCatalogResult in PackageCatalogReference.cpp. - Encapsulated package catalog operation functions in PackageManager.cpp. - Removed ResetPackageCatalogResult class and its implementation. - Updated error codes in PackageCatalogInterop.cs.
Configuration menu - View commit details
-
Copy full SHA for 4dcdc2a - Browse repository at this point
Copy the full SHA 4dcdc2aView commit details -
Fix indentation in RemovePackageCatalogOptions clsid
Corrected the indentation of the `clsid` attribute for the `RemovePackageCatalogOptions` comClass element in the `Microsoft.Management.Deployment.InProc.dll.manifest` file. The `clsid` value itself remains unchanged.
Configuration menu - View commit details
-
Copy full SHA for f92b947 - Browse repository at this point
Copy the full SHA f92b947View commit details -
Refactor argument validation in AddPackageCatalogAsync & RemovePackag…
…eCatalogAsync to throw errors on invalid arguments, following API design guidelines. - Updated `AddPackageCatalogAsync` and `RemovePackageCatalogAsync` in `PackageManager.cpp` to perform argument validation at the beginning of the methods, ensuring early error detection and potential performance improvements. At this stage, we avoid constructing a result object for error codes and simply use a THROW statement to generate an exception for the caller. - Refactored `AddPackageCatalogWithInvalidOptions` and `RemovePackageCatalogWithInvalidOptions` in `PackageCatalogInterop.cs` to be synchronous and directly test for exceptions using `Assert.ThrowsAsync<ArgumentException>`.
Configuration menu - View commit details
-
Copy full SHA for 10f92be - Browse repository at this point
Copy the full SHA 10f92beView commit details
Commits on Oct 24, 2024
-
[PR Feedback:] Refactor progress reporting mechanism
- Removed `CallbackDispatcherSink` and - introduced new progress sink classes: - `CompletionOnlyProgressSink` and - 'PreIndexedPackageCatalogProgressSink`. - Updated project files and existing code to use the new progress sinks, simplifying and improving progress reporting for package catalog operations.
Configuration menu - View commit details
-
Copy full SHA for 1244dd6 - Browse repository at this point
Copy the full SHA 1244dd6View commit details -
[SpellCheck] Fix typo in
OnProgress
method parameter descriptionCorrected a typo in the comment for the `maximum` parameter of the `OnProgress` method in `PackageCatalogProgress.h`. The word "progres" was corrected to "progress".
Configuration menu - View commit details
-
Copy full SHA for 2066dbf - Browse repository at this point
Copy the full SHA 2066dbfView commit details -
Add validation for progressReporter and improve map insertion
- Added validation to ensure that the `progressReporter` function is not null in the constructors of `CompletionOnlyProgressSink` and `PreIndexedPackageCatalogProgressSink`. - If `progressReporter` is null, an `E_INVALIDARG` exception is thrown. - Modified the insertion of the default weight for `AppInstaller::ProgressType::Percent` in `PreIndexedPackageCatalogProgressSink` to use `insert_or_assign` instead of direct assignment for better robustness.
Configuration menu - View commit details
-
Copy full SHA for 16ecf85 - Browse repository at this point
Copy the full SHA 16ecf85View commit details
Commits on Oct 25, 2024
-
[PR Feedback] Refactor error handling and optimize data structures
- Updated data structures for `progressWeights` to account for edge case. - Refined progress reporting logic to handle edge cases and ensure accurate tracking. - Replaced `std::wstring` with `hstring` in Add/Removal headers get a perf. benefits. - Updated exception types in tests to reflect actual exceptions thrown. - Removed unnecessary headers.
Configuration menu - View commit details
-
Copy full SHA for b5eae14 - Browse repository at this point
Copy the full SHA b5eae14View commit details -
Update PackageManager.idl comments for async operations
- Simplified documentation comments for RefreshPackageCatalogAsync, AddPackageCatalogAsync, and RemovePackageCatalogAsync to specify progress as a percentage (0-100). - Removed detailed explanation about progress reporting for "Microsoft.PreIndexed.Package" Package Catalogs (implementation details).
Configuration menu - View commit details
-
Copy full SHA for 340200a - Browse repository at this point
Copy the full SHA 340200aView commit details