1.0.0 • Published 4 years ago
firebase-tools-extra v1.0.0
firebase-tools-extra
Extra functionality for firebase-tools with support for emulators and auth through service account
Installation
npm i --save-dev firebase-tools-extra
Setup
- Generate a service account from within the settings section of the Firebase console
- Save the service account to
serviceAccount.json
within your firebase project repo (or setSERVICE_ACCOUNT
environment variable) - Make sure you add
serviceAccount.json
to your.gitignore
so it is not committed as part of your changes - THIS IS EXTREMELY IMPORTANT
To use with emulators:
- Do one of the following:
- Pass the
--emulator
flag along with your command - Set
FIREBASE_DATABASE_EMULATOR_HOST
andFIRESTORE_EMULATOR_HOST
variabes to your environment
- Pass the
- Use firebase-tools-extra the same way you would firebase-tools:
firebase-extra database:get /users
Usage
firebase-tools-extra should be used the same way that firebase-tools is used - the API is as close to the same as possible:
firebase-extra database:get --limit-to-last 10 /users
Tests
To run all unit tests, run yarn test
. This starts emulators, runs tests, then shuts down emulators.
Local Test Dev
- Start emulators:
yarn emulate
- Run tests and watch for changes:
yarn test:watch
(NOTE: if you don't want the file watcher on useyarn test:base
)
Why
firebase-tools does not have the following:
- support for emulators (feature request to add this to
firebase-tools
) - full Firestore interactions including
get
,add
,set
, andupdate
License
MIT
1.0.0
4 years ago
1.0.0-beta.4
4 years ago
1.0.0-beta.3
4 years ago
1.0.0-beta.2
4 years ago
1.0.0-beta
4 years ago
1.0.0-alpha.3
4 years ago
1.0.0-alpha.2
4 years ago
1.0.0-alpha
4 years ago
0.6.0
4 years ago
0.5.3
4 years ago
0.5.2
4 years ago
0.5.1
4 years ago
0.5.0
4 years ago
0.4.0
4 years ago
0.3.0
4 years ago
0.2.1
5 years ago
0.2.0
5 years ago
0.2.0-alpha
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago
0.1.0-alpha.2
5 years ago
0.1.0-alpha
5 years ago
0.0.9
5 years ago
0.0.8
5 years ago
0.0.7
5 years ago
0.0.6
5 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago
0.0.0
6 years ago