npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

firebase-engine

v1.5.154

Published

Engine for Backup, Clean and Restore your Firebase Project data

Downloads

173

Readme

firebase-engine

Unlock Peak Performance for Your Firebase Project: A Dynamic Engine for Effortless Backup, Thorough Cleaning, and Seamless Restoration. Tailored for Firebase Firestore, Firebase Storage, and Firebase Auth. Streamline Your Workflow with Unrivaled Efficiency!

npm npm NpmLicense GitHub last commit GitHub release

Install

 npm i firebase-engine -g

Launch parameters

| Name | Short name | Description | | ------------ | ---------- | ------------------------------------------------------------------------------ | | operations | o | backup (b), restore (r) or clean (c). Default: backup | | path | p | Path to service account JSON file | | services | s | firestore (f), storage (s), auth (a), can be separated by commas. Default: all | | backup | b | Path to backup or restore file. Default: ./{$PROJECT_ID + $TIMESTAMP}.backup | | collections | coll | Apply to Collections (in Firestore service). Default: all, if it is not set | | buckets | buck | Apply to Buckets (in Storage service). Default: all, if it is not set | | --nocompress | -nc | Do not use data compression | | --emulators | -em | Use firebase emulators (work for firestore) |

  • collections - the rule also applies to all nested collections and documents

Launch parameters (only for password recovery for users in Firebase.Auth)

| Name | Short name | Description | | --------------------- | ---------- | --------------------------------------------------------------------------------------------------------------- | | algorithm | alg | The password hashing information (algorithm, only SCRYPT). Default: SCRYPT | | base64_signer_key | bsk | The password hashing information (key in base64 encoding). Default: user passwords are not restored if not set. | | base64_salt_separator | bss | The password hashing information (salt separator in base64). Default: Bw== | | rounds | rnd | The password hashing information (rounds). Default: 8 | | mem_cost | mc | The password hashing information (memory cost). Default: 14 |

Use

With full names

 firebase-engine operations="clean, restore" path="./test.json" services="firestore, storage" backup="test.backup"

With one bucket

 firebase-engine operations="clean" path="./test.json" services="storage" buckets="test.appspott.com"

With collection & subcollection

 firebase-engine operations="backup" path="./test.json" services="firestore" collections="authors,books.pages"

With short names and use emulators

 firebase-engine o="b, c" s="f" p="./test.json" b="test.backup" -em

With password recovery for users

 firebase-engine operations="restore" path="./test.json" services="firestore, auth" backup="test.backup" bsk="nMyNs6sFWp0GZ/JSW2tsNGvGZ70oiv13gxO7ub7rxPwK271P945BiZmjrdsBRbgZmzPPgwATLR6FaXq3rUspVg=="

Copy data from project to emulators or from emulators to project

| Name | Short name | Description | | ---------------- | ---------- | ---------------------------------------------------- | | --to-emulators | -to | Copy data from project to emulators (only firestore) | | --from-emulators | -from | Copy data from emulators to project (only firestore) | | path | p | Path to service account JSON file |

With full names

 firebase-engine-emulators path="./test.json" --to-emulators

With short names

 firebase-engine-emulators p="./test.json" -from

Open Source

See source docs

See source

Service Account Key

Get your service account key from IAM Open google IAM

Or from the FIREBASE project Open official firebase docs

WARNING (Password hashes of users)

Firebase API also returns the passwordSalt and passwordHash hashed by the Firebase Auth backend for password users if the user/service account used to generate the request OAuth access token has the firebaseauth.configs.getHashConfig permission. Otherwise the passwordHash and passwordSalt will not be set. Open official firebase docs

WARNING (restoration of subcollections)

I recommend using only the top collection level in the collections parameter. Because you can get shadow document by restoring a subcollection in a non-existent document. To a full database cleanup, including shadow documents, use the command in firebase tools

 firebase firestore:delete -r

LICENSE

Apache-2.0