import { log , Task , action , ParamsFrom } from "./../index" ; export class RunAction extends Task { name = "runAction" ; description = "I will run an action and return the connection object" ; frequency = 0 ; queue = "default" ; async run ( params ) { if ( ! params ) params = { } ; const response = await action . run ( params . action , params . version , params . params ) ; if ( response . error ) { log ( "task error: " + response . error , "error" , { params : JSON . stringify ( params ) , } ) ; } else { log ( "[ action @ task ]" , "debug" , { params : JSON . stringify ( params ) } ) ; } return response ; } }