You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
maestro/app/classes/state/os/CommandState.js

27 lines
509 B

const State = require('../State')
class CommandState extends State {
static get services() {
return [...super.services, 'output']
}
async apply() {
const cmd = `${this._config.cmd}`
await this._host.run(cmd)
}
async check() {
return false
}
async reverse() {
if ( this._config.reverse ) {
const cmd = `${this._config.reverse}`
await this._host.run(cmd)
}
}
}
module.exports = exports = CommandState