Files
firebase-tools/src/commands/target-clear.js
Bryan Kendall 78f11b62ab Master Sync 10/25 (#970)
* Add emulator:run

* Cleanup

* Download emulators if needed

* Cleanup

* Remove unused dep

* Use CACHE_DIR

* Allow FIREBASE_EMULATORS_PATH to override the cache dir

* Format

* Simplify emulator remote storage

* Use fs-extra

* Hide emulator:run behind preview

* Cleanup

* Fix URL

* Remove old commands

* Point at real artifacts

* make emulators executable after downloading

* Allow --yes flag for emulator

* Prompt for emulator download

* Linter

* Emulator CLI per API Review (#318)

* Emulator CLI per API Review

* Cleanup

* Address comments

* Linter

* Add a useful error message for when the emulator cannot start because… (#329)

* Add a useful error message for when the emulator cannot start because Java is not installed

* linter

* action item

* Add start time to profiler dump (#323)

* Set emulator version for initial release (#336)

* Typescript (#338)

* The path structure layout seems like it changed (#341)

* The path structure layout seems like it changed

* Update src/auth.js

Co-Authored-By: ryanpbrewster <RyanPBrewster@gmail.com>

* Update functions init templates to v2.1.0 (#969) (#343)
2018-10-25 16:19:35 -07:00

21 lines
685 B
JavaScript

"use strict";
var clc = require("cli-color");
var Command = require("../command");
var requireConfig = require("../requireConfig");
var utils = require("../utils");
module.exports = new Command("target:clear <type> <target>")
.description("clear all resources from a named resource target")
.before(requireConfig)
.action(function(type, name, options) {
var existed = options.rc.clearTarget(options.project, type, name);
if (existed) {
utils.logSuccess("Cleared " + type + " target " + clc.bold(name));
} else {
utils.logWarning("No action taken. No " + type + " target found named " + clc.bold(name));
}
return Promise.resolve(existed);
});