UNPKG

@grouparoo/core

Version:
59 lines (58 loc) 2.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Push = void 0; const actionhero_1 = require("actionhero"); const cli_1 = require("../modules/cli"); const cloudCli_1 = require("../modules/cloudCli"); class Push extends actionhero_1.CLI { constructor() { super(); this.name = "push"; this.description = "Uploads a packaged configuration to a Grouparoo Cloud project"; this.inputs = { projectId: { required: true, description: "Grouparoo Cloud Project ID", letter: "p", }, token: { required: false, description: "Grouparoo Cloud Organization Token. This can also be set by using the GROUPAROO_CLOUD_API_TOKEN environment variable.", letter: "t", }, archivePath: { required: false, default: "./grouparoo.tar.gz", description: "Path to the .tar.gz file that contains the configuration to upload.", letter: "c", }, apply: { required: false, default: false, description: "Should the changes be applied?", letter: "a", }, message: { required: false, description: "Optional message to describe the Configuration.", letter: "m", }, externalUrl: { required: false, description: "Optional external url attached to the Configuration.", letter: "u", }, }; cli_1.GrouparooCLI.timestampOption(this); } preInitialize() { cli_1.GrouparooCLI.setGrouparooRunMode(this); cli_1.GrouparooCLI.setNextDevelopmentMode(); } async run({ params }) { cli_1.GrouparooCLI.logCLI(this.name); await cloudCli_1.CloudCLI.push(params); return true; } } exports.Push = Push;