Skip to content

ECO-445: add vc integration list command to cli#12251

Merged
kodiakhq[bot] merged 18 commits intomainfrom
jakeuskoski/eco-445-add-vc-integration-list-command-to-cli
Oct 10, 2024
Merged

ECO-445: add vc integration list command to cli#12251
kodiakhq[bot] merged 18 commits intomainfrom
jakeuskoski/eco-445-add-vc-integration-list-command-to-cli

Conversation

@JakeUskoski
Copy link
Copy Markdown

@JakeUskoski JakeUskoski commented Oct 8, 2024

Summary

This PR adds a new sub-command to integration list (also available as ls) which allows a user to view all the Marketplace resources associated with their current team. It provides the resource's name, its current status, the Product name, the Integration's slug, and the connected projects:

> Integrations in acme-marketplace-team:
Name                           Status             Product            Integration        Projects                                                              
redis-cyan-door                ● Available        Redis Cloud        redis              –                                                                     
redis-indigo-yacht             ● Available        Redis Cloud        redis              –                                                                     
supabase-orange-garden         ● Available        Supabase           supabase           –                                                                     
redis-indigo-jacket            ● Available        Redis Cloud        redis              –                                                                     
redis-violet-house             ● Available        Redis Cloud        redis              –                                                                     
edgedb-yellow-dog              ● Available        EdgeDB             edgedb             –                                                                     
redis-rose-door                ● Available        Redis Cloud        redis              –                                                                     
vector-gray-window             ● Available        ACME               vector             –                                                                     
vector-indigo-jacket           ● Available        ACME               vector             –                                                                     
vector-blue-school             ● Available        ACME               vector             –                                                                     
redis-orange-house             ● Available        Redis Cloud        redis              –                                                                     
redis-green-chair              ● Available        Redis Cloud        redis              –                                                                     
redis-indigo-mountain          ● Available        Redis Cloud        redis              –                                                                     
vector-rose-garden             ● Available        ACME               vector             test-repo-4                                                           
vector-violet-kite             ● Available        ACME               vector             –                                                                     
redis-red-tree                 –                  Redis Cloud        redis              –                                                                     
vector-blue-xylophone          ● Available        ACME               vector             –                                                                     
vector-emerald-jacket          ● Available        ACME               vector             –                                                                     
redis-green-yacht              ● Available        Redis Cloud        redis              –                                                                     
vector-rose-book               ● Available        ACME               vector             test-repo-4, example-marketplace-integration, marketplace-user        
redis-gray-ocean               ● Available        Redis Cloud        redis              –                                                                     
redis-orange-car               ● Available        Redis Cloud        redis              –                                                                     
redis-red-house                ● Available        Redis Cloud        redis              test-repo-4                                                           
supabase-lime-kite             ● Available        Supabase           supabase           example-marketplace-integration, test-repo-4                          
supabase-blue-yacht            ● Available        Supabase           supabase           myffff-awesome-project                                                
edgedb-fuchsia-elephant        ● Available        EdgeDB             edgedb             test-repo-4                                                           
edgedb-lime-zebra              ● Available        EdgeDB             edgedb             test-repo-4 
image

Background

This change is related to #12233. As we continue to try and improve the developer experience of interacting with the marketplace via the CLI, it's important that we offer the basic general CRUD activities seen in CLI tools of add, list, and remove (as well as open for how users perform update actions on the resources day-to-day). This PR adds the list functionality to compliment the already existing add, the soon-to-come open, and the coming remove.

Original designs for this subcommand only included the Name, Status, Product, and Integration Slug, but I also included the projects as well as the ability to filter on Integration & on the current project in order to make the list a little easier to use and interact with. A user probably only needs to care about their current project's resources (thus the --current-project/-c flag), but if they're trying to filter down on the full list, --integration also helps narrow down the list when debugging.

Other options that may be helpful & would make good future additions include --status [status] and --project [project-name].

How to test

Build and run locally (or use pnpm dev instead of vc when in the packages/cli folder). Note: for --current-project flag you need a project linked, so if you're using pnpm dev to test the command then you'll need to execute it directly. For this, I took the debugging output of the command being called using pnpm dev to find what it was calling, and used the full path call of [ts-node from node_modules] [full path]/vercel/packages/cli/src/index.ts integration list --current-project to test it in a different folder where I had a linked vercel project ready to test.

vc integration [list/ls] [optional: project-name]
vc integration [list/ls] [optional: project-name] [--integration [supabase/redis/edgedb]]
vc integration [list/ls] --all
vc integration [list/ls] --all [--integration [supabase/redis/edgedb]]

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Oct 8, 2024

🦋 Changeset detected

Latest commit: 8ed0d38

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vercel Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@JakeUskoski JakeUskoski changed the title Jakeuskoski/eco 445 add vc integration list command to cli ECO-445: add vc integration list command to cli Oct 8, 2024
@JakeUskoski
Copy link
Copy Markdown
Author

Note: this PR touches files shared with #12233, and will require a merge conflict resolution between the two.

@JakeUskoski JakeUskoski marked this pull request as ready for review October 8, 2024 18:32
erikareads
erikareads previously approved these changes Oct 8, 2024
trek
trek previously approved these changes Oct 8, 2024
@JakeUskoski JakeUskoski dismissed stale reviews from trek and erikareads via ae2449b October 8, 2024 20:39
erikareads
erikareads previously approved these changes Oct 8, 2024
trek
trek previously approved these changes Oct 9, 2024
dvoytenko
dvoytenko previously approved these changes Oct 9, 2024
erikareads
erikareads previously approved these changes Oct 9, 2024
@kodiakhq kodiakhq bot merged commit 98ed02d into main Oct 10, 2024
@kodiakhq kodiakhq bot deleted the jakeuskoski/eco-445-add-vc-integration-list-command-to-cli branch October 10, 2024 15:07
onsclom pushed a commit that referenced this pull request Oct 10, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## [email protected]

### Minor Changes

- Enable viewing a list of team's Marketplace resources via the `vc
integration list` command (with the alternative alias `vc integration
ls` and basic filtering `--current-project` and `--integration
[integration-slug]`)
([#12251](#12251))

### Patch Changes

- Updated dependencies
\[[`d01c6b98d6f5f2718b69edec71b4aec40822bfe6`](d01c6b9),
[`3a2c2529c642cc2efc11d08a18f2da2ff423b15f`](3a2c252)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Improve parsing of `turbo.json`
([#12266](#12266))

- Fix corepack `packageManager` detection on monorepos
([#12258](#12258))

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`d01c6b98d6f5f2718b69edec71b4aec40822bfe6`](d01c6b9),
[`3a2c2529c642cc2efc11d08a18f2da2ff423b15f`](3a2c252)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`d01c6b98d6f5f2718b69edec71b4aec40822bfe6`](d01c6b9),
[`3a2c2529c642cc2efc11d08a18f2da2ff423b15f`](3a2c252)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Fix corepack `packageManager` detection on monorepos
([#12258](#12258))

## @vercel/[email protected]

### Patch Changes

- Fix corepack `packageManager` detection on monorepos
([#12258](#12258))

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`d01c6b98d6f5f2718b69edec71b4aec40822bfe6`](d01c6b9),
[`3a2c2529c642cc2efc11d08a18f2da2ff423b15f`](3a2c252)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Fix corepack `packageManager` detection on monorepos
([#12258](#12258))

## @vercel/[email protected]

### Patch Changes

- Fix corepack `packageManager` detection on monorepos
([#12258](#12258))

## @vercel/[email protected]

### Patch Changes

- Fix corepack `packageManager` detection on monorepos
([#12258](#12258))

-   Updated dependencies \[]:
    -   @vercel/[email protected]

## @vercel-internals/[email protected]

### Patch Changes

- Updated dependencies
\[[`d01c6b98d6f5f2718b69edec71b4aec40822bfe6`](d01c6b9),
[`3a2c2529c642cc2efc11d08a18f2da2ff423b15f`](3a2c252)]:
    -   @vercel/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
kodiakhq bot pushed a commit that referenced this pull request Oct 30, 2024
## Summary

This PR adds a new sub-command to integration: `remove` (also available as `rm`) which allows a user to uninstall a marketplace integration from the current team. This PR also adds a new command `vc integration-resource` with sub-commands `disconnect` and `remove` (also available as `rm`), which allows a user to unlink a project from a (marketplace integration) resource and to delete a (marketplace integration) resource.

## Background

This change is related to #12233 and #12251. As we continue to try and improve the developer experience of interacting with the marketplace via the CLI, it's important that we offer the basic general CRUD activities seen in CLI tools of `add`, `list`, and `remove` (as well as `open` for how users perform update actions on the resources day-to-day). This PR adds the `remove` functionality to finish off the set of the basic CRUD operations.

Original designs for the CRUD commands lacked detail on a `remove` command. This PR introduces the idea of removing an integration from a team, removing a resource from a team, and removing resources from projects. Since this is a lot of different destructive actions, we thought it best to break apart into multiple commands instead of overloading a single `remove` command (as this PR originally proposed). This way the commands have clear, singular uses, and it's more difficult to accidentally make unintended destructive changes.

## How to test

Build and run locally (or use `pnpm dev` instead of `vc` when in the `packages/cli` folder). You'll also need marketplace integrations installed on a team, and resources for said integrations.

```
vc integration remove <integration>
--
vc integration-resource remove <resource> [--disconnect-all]
--
vc integration-resource disconnect <resource>
vc integration-resource disconnect <resource> <project>
vc integration-resource disconnect <resource> --all
```
QuietCraftsmanship pushed a commit to QuietCraftsmanship/Vercel that referenced this pull request Jul 6, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## [email protected]

### Minor Changes

- Enable viewing a list of team's Marketplace resources via the `vc
integration list` command (with the alternative alias `vc integration
ls` and basic filtering `--current-project` and `--integration
[integration-slug]`)
([#12251](vercel/vercel#12251))

### Patch Changes

- Updated dependencies
\[[`a82a8af02a2c464ec30a00764b09791622268cd7`](vercel/vercel@a82a8af),
[`38cf083ac6fc9a82fd886e76bc2621ed9d89239e`](vercel/vercel@38cf083)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Improve parsing of `turbo.json`
([#12266](vercel/vercel#12266))

- Fix corepack `packageManager` detection on monorepos
([#12258](vercel/vercel#12258))

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`a82a8af02a2c464ec30a00764b09791622268cd7`](vercel/vercel@a82a8af),
[`38cf083ac6fc9a82fd886e76bc2621ed9d89239e`](vercel/vercel@38cf083)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`a82a8af02a2c464ec30a00764b09791622268cd7`](vercel/vercel@a82a8af),
[`38cf083ac6fc9a82fd886e76bc2621ed9d89239e`](vercel/vercel@38cf083)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Fix corepack `packageManager` detection on monorepos
([#12258](vercel/vercel#12258))

## @vercel/[email protected]

### Patch Changes

- Fix corepack `packageManager` detection on monorepos
([#12258](vercel/vercel#12258))

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`a82a8af02a2c464ec30a00764b09791622268cd7`](vercel/vercel@a82a8af),
[`38cf083ac6fc9a82fd886e76bc2621ed9d89239e`](vercel/vercel@38cf083)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Fix corepack `packageManager` detection on monorepos
([#12258](vercel/vercel#12258))

## @vercel/[email protected]

### Patch Changes

- Fix corepack `packageManager` detection on monorepos
([#12258](vercel/vercel#12258))

## @vercel/[email protected]

### Patch Changes

- Fix corepack `packageManager` detection on monorepos
([#12258](vercel/vercel#12258))

-   Updated dependencies \[]:
    -   @vercel/[email protected]

## @vercel-internals/[email protected]

### Patch Changes

- Updated dependencies
\[[`a82a8af02a2c464ec30a00764b09791622268cd7`](vercel/vercel@a82a8af),
[`38cf083ac6fc9a82fd886e76bc2621ed9d89239e`](vercel/vercel@38cf083)]:
    -   @vercel/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

4 participants