Skip to content

Conversation

crazytonyli
Copy link
Contributor

What says in the title.

This PR adds install and uninstall methods, which are more appropriate in the context of plugins, as alternatives to api.plugins.create(...) and delete.

@crazytonyli crazytonyli requested a review from jkmassel May 26, 2024 23:27
// MARK: - Convenience Methods

public extension AnyNamespace where T == SparsePlugin {
func install(slug: PluginWpOrgDirectorySlug, status: PluginStatus) async throws -> PluginWithEditContext {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do install, activate, deactivate, and uninstall (or delete)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added activate and deactivate. uninstall is already implemented in the function below.

BTW, just to be super clear, these convenience methods co-exist with the create/update/delete functions. They just provide more appropriate semantic in the context of plugins than the REST verbs.

@crazytonyli crazytonyli requested a review from jkmassel May 27, 2024 21:32
@jkmassel jkmassel force-pushed the swift-package-plugin branch from 802b8f8 to 773e24a Compare May 27, 2024 21:53
@crazytonyli crazytonyli merged commit 1eee96d into trunk May 28, 2024
@crazytonyli crazytonyli deleted the swift-package-plugin branch May 28, 2024 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants