elsoul / skeet

🚀 Open-Source TypeScript Serverless Framework. It supports all kinds of application development, from small-scale tasks to global full-stack scaling💃
https://skeet.dev/
Apache License 2.0
600 stars 20 forks source link

Add command to switch between development and production environment. #206

Open euledge opened 8 months ago

euledge commented 8 months ago

For use cases where different Google cloud and firebase projects are created and deployed in production and staging environments, skeet can use the skeet init --login command to switch between them, but it is not possible to easily switch between them because each execution of this command will cause authentication to firebase. However, each time this command is executed, the user must authenticate to firebase, which makes it difficult to switch easily.

It would be useful to have a command to switch between these two definitions together in the skeet CLI.

Related Resources

euledge commented 8 months ago

Usage image after implementation

Skeet Profile Command manage develop environment profiles.

$ skeet help profile 
Usage: skeet profile [command]

Skeet Profile Command to add new profile or switch profile.

Command:
  add <profile name>   add  new profile
  use <profile name>   switch profile

Add Profile

Run the following command to add a profile for Google Cloud Project and Firebase Project.

$ skeet profile add
Usage: skeet profile add <profileName>

Arguments:
  profileName  Profile Name - e.g. dev

new profile will be created.

Use Profile

If you want to switch a profile to Google Cloud Project and Firebase Project, run the following command.


$ skeet profile use 
Usage: skeet profile use <profileName>

Arguments:
  profileName  Profile Name - e.g. dev