-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
refactor(cli): Refactored profile commands into readable blocks #331
Conversation
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
## [2.2.0](v2.1.0...v2.2.0) (2024-07-11) ### 🚀 Features * **api-client:** Added API Client package ([#346](#346)) ([6734e1e](6734e1e)) * **api:** Updated API key ([fbac312](fbac312)) * **platform:** View [secure]s ([#313](#313)) ([97c4541](97c4541)) * **web:** Add Pricing Page ([#243](#243)) ([2c7f1d6](2c7f1d6)) ### 📚 Documentation * **cli:** Added docs for the CLI package ([#329](#329)) ([edad166](edad166)) * **cli:** Added usage docs ([#330](#330)) ([b6963d5](b6963d5)) * Update Discord link ([871b6cd](871b6cd)) * Update README.md ([e66fcd2](e66fcd2)) * **web:** Add documentation about our web package ([#268](#268)) ([3d848e7](3d848e7)) ### 🔧 Miscellaneous Chores * **api:** Updated response types in environment service ([b8a3ddd](b8a3ddd)) * **ci:** Added release scripts for platform and api ([02dae60](02dae60)) * **CI:** Updated action plugin versions ([88bb317](88bb317)) * **CI:** Updated pnpm version in CI file ([2692e88](2692e88)) * **platform:** Fixed env parsing in platform ([d6ffafa](d6ffafa)) * **web:** Update Terms and Conditions and Privacy Policy ([#282](#282)) ([d621dcb](d621dcb)) ### 🔨 Code Refactoring * **api:** Update [secure] and variable fetching endpoints ([7d9acd0](7d9acd0)) * **cli:** Refactored profile commands into readable blocks ([#331](#331)) ([4a8a089](4a8a089)) * **cli:** Updated configuration commands and mechanism ([#310](#310)) ([9079b6d](9079b6d))
## [2.2.0](v2.1.0...v2.2.0) (2024-07-11) ### 🚀 Features * **api-client:** Added API Client package ([#346](#346)) ([6734e1e](6734e1e)) * **api:** Updated API key ([fbac312](fbac312)) * **platform:** View [secure]s ([#313](#313)) ([97c4541](97c4541)) * **web:** Add Pricing Page ([#243](#243)) ([2c7f1d6](2c7f1d6)) ### 📚 Documentation * **cli:** Added docs for the CLI package ([#329](#329)) ([edad166](edad166)) * **cli:** Added usage docs ([#330](#330)) ([b6963d5](b6963d5)) * Update Discord link ([871b6cd](871b6cd)) * Update README.md ([e66fcd2](e66fcd2)) * **web:** Add documentation about our web package ([#268](#268)) ([3d848e7](3d848e7)) ### 🔧 Miscellaneous Chores * **api:** Updated response types in environment service ([b8a3ddd](b8a3ddd)) * **ci:** Added release scripts for platform and api ([02dae60](02dae60)) * **CI:** Updated action plugin versions ([88bb317](88bb317)) * **CI:** Updated pnpm version in CI file ([2692e88](2692e88)) * **platform:** Fixed env parsing in platform ([d6ffafa](d6ffafa)) * **web:** Update Terms and Conditions and Privacy Policy ([#282](#282)) ([d621dcb](d621dcb)) ### 🔨 Code Refactoring * **api:** Update [secure] and variable fetching endpoints ([7d9acd0](7d9acd0)) * **cli:** Refactored profile commands into readable blocks ([#331](#331)) ([4a8a089](4a8a089)) * **cli:** Updated configuration commands and mechanism ([#310](#310)) ([9079b6d](9079b6d))
PR Type
Enhancement, Bug fix
Description
checkProfileExists
,checkIsDefaultProfile
, andgetDefaultProfile
.Changes walkthrough 📝
base.command.ts
Refactor profile default retrieval in BaseCommand
apps/cli/src/commands/base.command.ts
getDefaultProfile
import.profiles.default
withgetDefaultProfile(profiles)
.create.profile.ts
Refactor profile creation logic and method names
apps/cli/src/commands/profile/create.profile.ts
parseInput
method.setProfileData
tosetProfileConfigData
.action
method.delete.profile.ts
Refactor profile deletion with utility functions
apps/cli/src/commands/profile/delete.profile.ts
checkProfileExists
andcheckIsDefaultProfile
utility functions.makeConfirmation
.list.profile.ts
Refactor profile listing and default profile retrieval
apps/cli/src/commands/profile/list.profile.ts
getDefaultProfile
import.printProfile
method.update.profile.ts
Refactor profile update with utility functions
apps/cli/src/commands/profile/update.profile.ts
checkProfileExists
andcheckIsDefaultProfile
utility functions.updateProfileData
method.use.profile.ts
Refactor profile usage with utility function
apps/cli/src/commands/profile/use.profile.ts
checkProfileExists
utility function.profile.ts
Add profile utility functions
apps/cli/src/util/profile.ts
checkProfileExists
,checkIsDefaultProfile
,and
getDefaultProfile
.