UNPKG

cloudcms-cli

Version:
51 lines (47 loc) 1.63 kB
var helper = require("../../../helper"); var AbstractCommand = require("../../abstract"); class ListChangesetsCommand extends AbstractCommand { constructor() { super({ "group": "repository", "name": "list-changesets", "description": "Lists the Changesets in a Repository", "schema": { "properties": [{ "name": "repositoryId", "type": "string", "description": "Enter the repository ID", "required": true, "args": ["repository", "r"] }, { "name": "skip", "type": "number", "description": "Enter the pagination skip", "required": false, "args": ["skip", "s"] }, { "name": "limit", "type": "number", "description": "Enter the pagination limit", "required": false, "args": ["limit", "l"] }, { "name": "sort", "type": "string", "description": "Enter the pagination sort JSON", "required": false, "args": ["sort", "x"] }] } }); } handle(options, callback) { helper.listChangesets(options.repositoryId, options.skip, options.limit, options.sort, function(err) { callback(err); }); } } module.exports = ListChangesetsCommand;