UNPKG

cloudcms-cli

Version:
40 lines (36 loc) 1.19 kB
var helper = require("../../../helper"); var AbstractCommand = require("../../abstract"); class CreateSnapshotCommand extends AbstractCommand { constructor() { super({ "group": "repository", "name": "create-snapshot", "description": "Creates a snapshot rooted at the given changeset ID.", "schema": { "properties": [{ "name": "repositoryId", "type": "string", "description": "Enter the repository ID", "required": true, "args": ["repository", "r"] }, { "name": "changesetId", "type": "string", "description": "Enter the root changeset ID", "required": true, "args": ["changeset", "c", "root"] }] } }); } handle(options, callback) { // call workhorse function helper.createSnapshot(options.repositoryId, options.changesetId, function(err) { callback(err); }); } } module.exports = CreateSnapshotCommand;