UNPKG

projex

Version:
28 lines (27 loc) 1.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const _api_1 = require("../../../api/index"); const _modules_1 = require("../../../modules/index"); const core_1 = require("@oclif/core"); const _shared_1 = require("../../../shared/index"); class Backup extends core_1.Command { static description = `Download the files from the checkout files of a VTEX site`; static examples = [ `${_api_1.Colors.PINK(`${_shared_1.CLI_NAME} vtex cms backup`)}`, `${_api_1.Colors.PINK(`${_shared_1.CLI_NAME} vtex cms backup`)} my-site`, ]; static args = { site: core_1.Args.string({ description: `Specify the account location to use. By default, the command uses the 'default' account of VTEX. This is useful when the account has multiple subhosts.`, }), }; static flags = { ..._shared_1.globalFlags, }; async run() { const { args } = await this.parse(Backup); const { site = _shared_1.VTEX_CMS_DEFAULT_SITE } = args; await (0, _modules_1.backup)(site); } } exports.default = Backup;