scripts/hook_durian.js
/*
    Creates a task (CLDurianTask) only by its name. Works for tasks with only 2 arguments (self + name).
    Tested with:
        * getSerialNumberTask
        * dumpRoseLogsTask (does not work bc of state)
    */
Creates a task (CLDurianTask) only by its name. Works for tasks with only 2 arguments (self + name).
Tested with:
getSerialNumberTask
dumpRoseLogsTask (does not work bc of state)
Creates a task ( CLDurianTask ) only by its name . Works for tasks with only 2 arguments ( self + name ) . Tested with : getSerialNumberTask dumpRoseLogsTask ( does not work bc of state )
createTaskByName(name) {
        var {CLDurianTask} = ObjC.classes;
        var {NSString} = ObjC.classes;
        var taskByName = CLDurianTask[name];
        return taskByName.implementation(CLDurianTask, NSString['stringWithString:'](name));
    }
createTaskByName ( name ) { var { CLDurianTask } = ObjC . classes ; var { NSString } = ObjC . classes ; var taskByName = CLDurianTask [ name ] ; return taskByName . implementation ( CLDurianTask , NSString [ 'stringWithString:' ] ( name ) ) ; }
Creates a task (CLDurianTask) only by its name.
Creates a task ( CLDurianTask ) only by its name .