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

🔨 Check for serverless args order #360

Draft
wants to merge 1 commit into
base: v4/dev
Choose a base branch
from

Conversation

ilovelinux
Copy link

Proposed changes

Since arguments passed to jovo deploy:code serverless {args} are used only on an index-based logic (see code referenced in the issue), they need to be put after serverless.

The additional code checks the order of the arguments before running the deployment. When they are not in the right order, it raises an exception with an explicit and meaningful message about how to use the command in the right way.

Fixes #358

Note: there may be better error messages than the one I chose. Feel free to change it accordingly.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@ilovelinux ilovelinux changed the title 🔨 Check for serverless args order WIP: 🔨 Check for serverless args order Aug 10, 2023
@ilovelinux
Copy link
Author

I put this PR in WIP as I wanted to test its behavior with jovo build:serverless --deploy command, but I can't manage to make it run. I get the same error with the published package, I think it's unrelated to the PR.

Error
% jovo build:serverless --deploy

jovo build:serverless: Build serverless configuration file.
  >> Learn more: https://jovo.tech/marketplace/target-serverless


✔ Generating serverless.yaml
  >> ./serverless.yaml

x Error: --------------------------------------------------------------------------------
›
› Message:
›  Cannot read properties of undefined (reading 'includes')
›
› Module:
›  JovoCliCore
›
›
› If you think this is not on you, you can submit an issue here: https://github.com/jovotech/jovo-cli/issues.

@ilovelinux ilovelinux marked this pull request as draft December 31, 2023 16:33
@ilovelinux ilovelinux changed the title WIP: 🔨 Check for serverless args order 🔨 Check for serverless args order Dec 31, 2023
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.

1 participant