cloudcms-cli
Version:
Cloud CMS Command-Line client
40 lines (36 loc) • 1.16 kB
JavaScript
var helper = require("../../../helper");
var AbstractCommand = require("../../abstract");
class CreatePathIndexCommand extends AbstractCommand
{
constructor()
{
super({
"group": "branch",
"name": "create-path-index",
"description": "Creates the path index for a given branch",
"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)
{
// call workhorse function
helper.createPathIndex(options.repositoryId, options.branchId, function(err) {
callback(err);
});
}
}
module.exports = CreatePathIndexCommand;