UNPKG

firebase-tools-extra

Version:

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

23 lines (22 loc) 862 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var rtdb_1 = require("../actions/rtdb"); /** * @name databaseSet * store JSON data at the specified path * @param program - Commander program */ function databaseSetCommand(program) { program .command('database:set <path> [infile]') .description('store JSON data at the specified path') .option('-d, --data <data>', 'specify escaped JSON directly') .option('--emulator', 'use RTDB emulator') .option('--debug', 'print verbose debug output to console') .action(function (dbPath, inFile, options) { return rtdb_1.rtdbWrite('set', dbPath, inFile, options) .then(function () { return process.exit(0); }) .catch(function () { return process.exit(1); }); }); } exports.default = databaseSetCommand;