UNPKG

@amplience/dc-cli

Version:
33 lines (32 loc) 1.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ContentCloneStep = void 0; const clone_hub_step_1 = require("../model/clone-hub-step"); const path_1 = require("path"); const copy_1 = require("../../content-item/copy"); class ContentCloneStep { getId() { return clone_hub_step_1.CloneHubStepId.Content; } getName() { return 'Clone Content'; } async run(state) { const copySuccess = await (0, copy_1.handler)({ ...state.argv, dir: (0, path_1.join)(state.path, 'content'), logFile: state.logFile }); return copySuccess; } async revert(state) { const revertSuccess = await (0, copy_1.handler)({ ...state.argv, dir: (0, path_1.join)(state.path, 'content'), logFile: state.logFile, revertLog: Promise.resolve(state.revertLog) }); return revertSuccess; } } exports.ContentCloneStep = ContentCloneStep;