run_command.js 588 B

12345678910111213141516171819
  1. 'use strict';
  2. const CommandOperationV2 = require('./command_v2');
  3. const defineAspects = require('./operation').defineAspects;
  4. const Aspect = require('./operation').Aspect;
  5. class RunCommandOperation extends CommandOperationV2 {
  6. constructor(parent, command, options) {
  7. super(parent, options);
  8. this.command = command;
  9. }
  10. execute(server, callback) {
  11. const command = this.command;
  12. this.executeCommand(server, command, callback);
  13. }
  14. }
  15. defineAspects(RunCommandOperation, [Aspect.EXECUTE_WITH_SELECTION, Aspect.NO_INHERIT_OPTIONS]);
  16. module.exports = RunCommandOperation;