cloudcms-cli
Version:
Cloud CMS Command-Line client
46 lines (40 loc) • 1.3 kB
JavaScript
var helper = require("../../../helper");
var AbstractCommand = require("../../abstract");
class ValidateBranchNodesCommand extends AbstractCommand
{
constructor()
{
super({
"group": "branch",
"name": "validate-nodes",
"description": "Runs validation checks against all nodes on a branch and reports any findings",
"schema": {
"properties": [{
"name": "repositoryId",
"type": "string",
"description": "Enter the repository ID",
"required": true,
"args": ["repository", "r"]
}, {
"name": "branchId",
"type": "string",
"description": "Enter the branch ID",
"required": true,
"args": ["branch", "b"]
}]
}
});
}
handle(options, callback)
{
var config = {};
if (options.nodeList) {
config.nodeList = true;
}
// call workhorse function
helper.validateBranchNodes(options.repositoryId, options.branchId, function(err) {
callback(err);
});
}
}
module.exports = ValidateBranchNodesCommand;