UNPKG

firebase-tools-extra

Version:

Extra functionality for firebase-tools with support for emulators and auth through service account.

23 lines (22 loc) 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var firestore_1 = require("../actions/firestore"); /** * @name firestoreGet * fetch and print JSON data at the specified path of Firestore. Works for both hosted and emulated environments * @param {object} program - Commander program */ function firestoreGetCommand(program) { program .command('firestore:get <path>') .description('fetch and print JSON data at the specified path of Firestore. Works for both hosted and emulated environments') .option('-o, --output <filename>', 'save output to the specified file') .option('--emulator', 'use Firestore emulator') .option('--debug', 'print verbose debug output to console') .action(function (dbPath, options) { return firestore_1.firestoreGet(dbPath, options) .then(function () { return process.exit(0); }) .catch(function () { return process.exit(1); }); }); } exports.default = firestoreGetCommand;