ECO-443: add vc integration open command to cli#12233
Conversation
🦋 Changeset detectedLatest commit: c56870f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 Those test failures were resolved on main. Updating the branch should resolve it. |
|
Note: |
| ); | ||
| } | ||
|
|
||
| export async function fetchMarketplaceIntegrations( |
There was a problem hiding this comment.
Not blocking but other behaviors like this typically get put in src/util/{command-name}. Would be happy with a follow-up PR.
There was a problem hiding this comment.
Good to know, thanks! This was building on top of the prior work already there. I can migrate that entire client.ts file in a future PR. I may keep it around until after all 3 feature PRs are merged (or until the final feature PR, if the other two are already merged before it's ready), but it'll come down the line.
vc integration open command to cli (with alias vc open)vc integration open command to cli
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 direct access to marketplace integration dashboards via `vc integration open [integration]` command ([#12233](#12233)) - [cli] remove deprecated `certs renew` command ([#12248](#12248)) ### Patch Changes - [cli] track invocation of `vercel alias *` ([#12250](#12250)) - [tests] skip flakey gatsby test ([#12244](#12244)) - Updated dependencies \[[`dfad4af5c65a565e0afe28731d3918d03d5085b2`](dfad4af)]: - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Fix special version specifier handling for `turbo` ([#12249](#12249)) ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`dfad4af5c65a565e0afe28731d3918d03d5085b2`](dfad4af)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`dfad4af5c65a565e0afe28731d3918d03d5085b2`](dfad4af)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`dfad4af5c65a565e0afe28731d3918d03d5085b2`](dfad4af)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[]: - @vercel/[email protected] ## @vercel-internals/[email protected] ### Patch Changes - Updated dependencies \[[`dfad4af5c65a565e0afe28731d3918d03d5085b2`](dfad4af)]: - @vercel/[email protected] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
## 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 ``` <img width="1077" alt="image" src="https://github.com/user-attachments/assets/68af295e-200a-48e4-9afa-a63acf5e876d"> ## 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]] ```
## 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 ```
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 direct access to marketplace integration dashboards via `vc integration open [integration]` command ([#12233](vercel/vercel#12233)) - [cli] remove deprecated `certs renew` command ([#12248](vercel/vercel#12248)) ### Patch Changes - [cli] track invocation of `vercel alias *` ([#12250](vercel/vercel#12250)) - [tests] skip flakey gatsby test ([#12244](vercel/vercel#12244)) - Updated dependencies \[[`71556933dfeec0a870a24140312dd3e20db33fb7`](vercel/vercel@7155693)]: - @vercel/[email protected] - @vercel/[email protected] - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Fix special version specifier handling for `turbo` ([#12249](vercel/vercel#12249)) ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`71556933dfeec0a870a24140312dd3e20db33fb7`](vercel/vercel@7155693)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`71556933dfeec0a870a24140312dd3e20db33fb7`](vercel/vercel@7155693)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`71556933dfeec0a870a24140312dd3e20db33fb7`](vercel/vercel@7155693)]: - @vercel/[email protected] ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[]: - @vercel/[email protected] ## @vercel-internals/[email protected] ### Patch Changes - Updated dependencies \[[`71556933dfeec0a870a24140312dd3e20db33fb7`](vercel/vercel@7155693)]: - @vercel/[email protected] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Summary
This PR adds a new sub-command to integration 'open' which allows a user to directly open the integration provider's dashboard in the browser. This command is only compatible with Marketplace integrations.
Background
The new marketplace integrations set up & manage accounts with the provider's platform on behalf of a vercel team when they are installed by said team, creating a "native integration." These dashboards are then meant to be used by users on the team to manage the integrations in-depth through their first-party development experience.
In order to make the bridge to managing a resource from an integration simpler, we're looking to add this command to allow users to go directly to a given integration dashboard from their project/team's command line.
How to test
Build and link Vercel CLI locally. The 3 integrations supported today are: