The Wayback Machine - https://web.archive.org/web/20201106140815/https://github.com/netlify/js-client/issues/157
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

Feature: consider moving js-client deploy logic to the CLI #157

Open
erezrokah opened this issue Sep 17, 2020 · 2 comments
Open

Feature: consider moving js-client deploy logic to the CLI #157

erezrokah opened this issue Sep 17, 2020 · 2 comments
Labels

Comments

@erezrokah
Copy link
Contributor

@erezrokah erezrokah commented Sep 17, 2020

At the moment most of the CLI deploy command logic in handled by the js-client:

const { fnDir, configPath, statusCb, message: title } = opts

This seems out of place for a client that should be wrapping our open-api spec.
Also, it prevents this client from being browser compatible.

It might makes sense to move that logic to the CLI, since we're already implementing some deploy logic in the CLI as a part of edge handlers:
netlify/cli#1244

@erezrokah erezrokah changed the title Refactor: consider moving js-client deploy logic to the CLI Feature: consider moving js-client deploy logic to the CLI Sep 17, 2020
@ehmicky
Copy link
Contributor

@ehmicky ehmicky commented Sep 17, 2020

💯

@erezrokah
Copy link
Contributor Author

@erezrokah erezrokah commented Sep 24, 2020

Doing this would also allow for better error handling as we could try/catch on each deploy related operation instead of catching everything here:
https://github.com/netlify/cli/blob/7db9ce56c26d25ca43631daaf5d32c3140e15f6a/src/commands/deploy.js#L228

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.