Skip to content
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

[cli] Add vercel pull command #6822

Merged
merged 52 commits into from
Oct 19, 2021
Merged

[cli] Add vercel pull command #6822

merged 52 commits into from
Oct 19, 2021

Conversation

jaredpalmer
Copy link
Contributor

@jaredpalmer jaredpalmer commented Oct 11, 2021

Add vercel pull command. Closes https://github.com/vercel/runtimes/issues/142.

CleanShot 2021-10-19 at 08 50 07

It does the following:

  • Pull the .env file (it calls pull internally)
  • Adds the following to .vercel/project.json (which will then be used by vercel build):
    interface ProjectLink {
         projectId: string
         orgId: string
         settings: {
           buildCommand: string | null,
           devCommand:  string | null,
           directoryListing:  string | null,
           outputDirectory:  string | null,
           rootDirectory:  string | null,
           framework: string | null,
         }
     }

This PR also deprecates vc env pull with a warning:

CleanShot 2021-10-19 at 08 50 21

📋 Checklist

  • Help output
  • Flags (need to combine flags from env pull)

Tests

  • The code changed/added as part of this PR has been covered with tests
  • All tests pass locally with yarn test-unit

Code Review

  • This PR has a concise title and thorough description useful to a reviewer
  • Issue from task tracker has a link to this PR

@codecov
Copy link

codecov bot commented Oct 11, 2021

Codecov Report

Merging #6822 (6821953) into main (9e16ce7) will decrease coverage by 5.77%.
The diff coverage is 89.10%.

❗ Current head 6821953 differs from pull request most recent head f84d43e. Consider uploading reports for the commit f84d43e to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6822      +/-   ##
==========================================
- Coverage   55.03%   49.26%   -5.78%     
==========================================
  Files          85      126      +41     
  Lines        3594     4882    +1288     
  Branches      830     1166     +336     
==========================================
+ Hits         1978     2405     +427     
- Misses       1610     2466     +856     
- Partials        6       11       +5     
Impacted Files Coverage Δ
packages/cli/test/mocks/client.ts 88.88% <ø> (ø)
packages/cli/src/commands/pull.ts 80.00% <80.00%> (ø)
packages/cli/test/mocks/team.ts 90.00% <90.00%> (ø)
packages/cli/test/mocks/project.ts 90.90% <90.90%> (ø)
packages/cli/test/helpers/setup-fixture.ts 95.83% <95.83%> (ø)
packages/cli/src/commands/env/pull.ts 76.66% <100.00%> (ø)
...es/cli/src/util/projects/write-project-settings.ts 100.00% <100.00%> (ø)
packages/cli/test/mocks/user.ts 100.00% <100.00%> (ø)
packages/cli/src/util/validate-paths.ts 24.39% <0.00%> (ø)
packages/cli/src/util/input/select-org.ts 85.71% <0.00%> (ø)
... and 39 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e16ce7...f84d43e. Read the comment docs.

@jaredpalmer jaredpalmer marked this pull request as draft October 11, 2021 20:26
@jaredpalmer jaredpalmer marked this pull request as ready for review October 11, 2021 21:42
@TooTallNate TooTallNate changed the title Add vercel pull command [cli] Add vercel pull command Oct 12, 2021
Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

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

Thanks! 🎉

Remember to update the docs to add deprecation notes as well as the new command here: https://vercel.com/docs/cli

Co-authored-by: Steven <steven@ceriously.com>
jaredpalmer and others added 3 commits October 18, 2021 17:44
Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Nathan Rajlich <nathan@tootallnate.net>
Co-authored-by: Nathan Rajlich <nathan@tootallnate.net>
@kodiakhq kodiakhq bot merged commit b88e65c into main Oct 19, 2021
@kodiakhq kodiakhq bot deleted the jp/vercel-pull branch October 19, 2021 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: cli semver: minor PR contains new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants