Bug:Fix file validation issue
[vnfsdk/refrepo.git] / vnfmarket / src / main / webapp / vnfmarket / node_modules / istanbul / lib / command / index.js
1 /*
2  Copyright (c) 2012, Yahoo! Inc.  All rights reserved.
3  Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4  */
5
6 var Factory = require('../util/factory'),
7     factory = new Factory('command', __dirname, true);
8
9 function Command() {}
10 // add register, create, mix, loadAll, getCommandList, resolveCommandName to the Command object
11 factory.bindClassMethods(Command);
12
13 Command.prototype = {
14     toolName: function () {
15         return require('../util/meta').NAME;
16     },
17
18     type: function () {
19         return this.constructor.TYPE;
20     },
21     synopsis: /* istanbul ignore next: base method */ function () {
22         return "the developer has not written a one-line summary of the " + this.type() + " command";
23     },
24     usage: /* istanbul ignore next: base method */ function () {
25         console.error("the developer has not provided a usage for the " + this.type() + " command");
26     },
27     run: /* istanbul ignore next: abstract method */ function (args, callback) {
28         return callback(new Error("run: must be overridden for the " + this.type() + " command"));
29     }
30 };
31
32 module.exports = Command;
33