Nightmarish Pawnshop Mystic

    fire-station
    TypeScript icon, indicating that this package has built-in type declarations

    0.4.3 • Public • Published

    FireStation

    Preview

    The philosophy behind the CLI is to make it as user-friendly as possible. You won't need to run any commands or pass any arguments to this tool. You just have to run it :)

    The tool aims to make it extremely painless to manage environments for your firebase projects from everything to creating cloud functions to deploying your site.

    The only thing you will need is a firebase project per environment.

    Requirements

    The tool requires that firebase-tools installed globally
    npm i -g firebase-tools
    

    Installation

    npm i fire-station // locally
    or
    npm i fire-station -g //globally
    

    Usage

    The following command will bring up the CLI which is designed to be user-friendly and helpful.

    // if installed globally
    fire-station 
    
    // if installed locally (use the npx module)
    fire-station
    
    // or you could directly path to the cli
    ./node_modules/.bin/fire-station
    

    Current features in the CLI

    The Cli should abstract away the firebase cli in most use cases and provide some additional goodies.

    1. Initialize

      Use this command to initialize fire-station in your project.
      
      Allows you to choose multiple firebase projects you own or have editor permissions on and mark them as 
      "environments".
      Allows you to setup deployments for the following:
      
      1. firebase cloud functions
      2. hosting
      3. realtime database rules
      4. firestore database rules
      5. storage rules
      6. create boilerplate cloud function (Realtime Trigger, Firestore Trigger, HTTP, Auth, Pub Sub Scheduled Function)
      
      Creates a function in the "cloud-functions" directory in your project root and sets up typescript/javascript.
      Creates files to store secrets and environment vars (and passes them to each created function).
      
    2. Deploy

      Allows you to deploy any piece of your configuration across multiple environments.
      
    3. Copy Auth and Realtime database from one environment to another

      Copy an environment on top of another. You can choose to copy over:
      1. Auth
      2. Realtime Database
      3. Firestore
      
    4. Create a backup

       Lets you create named backups of your environment. You can backup the following:
       1. Auth
       2. Realtime Database
       3. Firestore
      
    5. Restore a backup

       Lets you restore one of the named backups you created to an environment. You can restore the following:
       1. Auth
       2. Realtime Database
       3. Firestore
      
    6. Delete secrets

       This option will delete the .fire-station-secrets folder.
      
       Fire-station asks you for service-accounts & auth hashing config and give you clickable links of how to get them.
       The secrets are stored in the .fire-station-secrets folder in the root of your project and are automatically
       marked in your .gitignore file.
      
       fire-station will only ask for secrets when necessary:
       1) hash_configs when copying auth
       2) service-accounts when backing up or restoring firestore
      

    *** Known Bugs *** If you have no functions, the deploy command will fail. If you deploy to multiple environments at once, the deploy command will fail.

    These will be addressed sometime in the future.

    Install

    npm i fire-station

    DownloadsWeekly Downloads

    2

    Version

    0.4.3

    License

    MIT

    Unpacked Size

    305 kB

    Total Files

    92

    Last publish

    Collaborators

    • vvolfster