UNPKG

sfdx-hardis

Version:

Swiss-army-knife Toolbox for Salesforce. Allows you to define a complete CD/CD Pipeline. Orchestrate base commands and assist users with interactive wizards

27 lines 1.27 kB
import { ActionsProvider } from './actionsProvider.js'; import { uxLog } from '../utils/index.js'; import c from 'chalk'; export class ManualAction extends ActionsProvider { getLabel() { return 'ManualAction'; } // eslint-disable-next-line @typescript-eslint/no-unused-vars async checkParameters(cmd) { const instructions = cmd.parameters?.instructions || ''; if (!instructions) { uxLog('warning', this, c.yellow(`[DeploymentActions] No instructions for manual action [${cmd.id}]: ${cmd.label}`)); return { statusCode: 'skipped', skippedReason: 'No instructions provided' }; } return null; } async run(cmd) { const validity = await this.checkValidityIssues(cmd); if (validity) return validity; const instructions = cmd.parameters?.instructions || ''; uxLog('log', this, c.grey(`[DeploymentActions] Manual action [${cmd.id}]: ${cmd.label}\nInstructions:\n${instructions}`)); // Manual actions are not executed automatically. We just record the instructions. return { statusCode: 'manual', skippedReason: 'Manual action - see output for instructions', output: instructions }; } } //# sourceMappingURL=manualAction.js.map