-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
feat(cli): supports to specify environment(s) and its optional description #634
base: develop
Are you sure you want to change the base?
feat(cli): supports to specify environment(s) and its optional description #634
Conversation
…ptional description while creating project
Impressive work I must say :) @muntaxir4 could you use this parsing style to update the rest of our code? Ideally we would want the commands options that take multiple inputs to be split up in this way |
Using ':' ? The projectEnvironment is having something similar to this. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
I think we are using ',' to separate the different project:environment pair. iguess it was something related to separating things using , |
…ons and trim specified name and desc of an environment
Update:
Now, if we run command like: pnpm start:cli -- project create workspace-1-0 --base-url http://localhost:4200 --api-key ks_87eb7a747bfcd14984cb18643728defb53237d7be95f8bcf -n test-project -e "dev" --environment " stage: Environment for staging" -e "production:Environment for production" The parsed environments would looks like this: {
environments: [
{ name: 'dev', description: null },
{ name: 'stage', description: 'Environment for staging' },
{ name: 'production', description: 'Environment for production' }
]
} Example: pnpm start:cli -- project create workspace-1-0 --base-url http://localhost:4200 --api-key ks_87eb7a747bfcd14984cb18643728defb53237d7be95f8bcf -n test-project-5 -e "dev-test-5 " --environment " stage-project-5: Environment for staging" -e "production-project-5 :Environment for production " Terminal: Database: |
User description
Description
Fixes #617
Add command option to specify one to multiple environments and its optional description.
The option's flag is
-e
(short) or--environment
(long). the description of the option isEnvironment name(s) of the project. Default to Default
.Now the
project create --help
command would give this output:How to test:
Example:
Dependencies
Mention any dependencies/packages used
Future Improvements
Mention any improvements to be done in future related to any file/feature
Mentions
Mention and tag the people
Screenshots of relevant screens
Image 1: Running the test command and the output in terminal
Image 2: Result in database
Image 3: Printing help of the command
Developer's checklist
If changes are made in the code:
Documentation Update
PR Type
Enhancement
Description
Added support for specifying environments during project creation.
Introduced
--environment
option with optional descriptions.Parsed and processed environment input into structured data.
Updated CLI help output to include new option.
Changes walkthrough 📝
create.project.ts
Support specifying environments with optional descriptions
apps/cli/src/commands/project/create.project.ts
--environment
option to specify environments.