@runnerty/executor-script
v1.0.0
Published
Runnerty module: script executor
Downloads
2
Maintainers
Readme
Script executor for Runnerty:
Configuration sample:
{
"id": "script_default",
"type": "@runnerty-executor-script"
}
Plan sample:
{
"id": "script_default",
"script": "return('hello');"
}
{
"id": "script_default",
"script_file": "my_script.js",
"args": { "my_const": "Y", "my_key": "@GV(MY_KEY)" }
}
{
"id": "script_default",
"script": "let res=''; if(args.my_const === 'Y'){res=args.my_key} return(res);",
"args": { "my_const": "Y", "my_key": "@GV(MY_KEY)" }
}
if you create a function that returns string, integer or boolean it will be automatically saved in PROCESS_EXEC_DATA_OUTPUT
.
if you create a function that returns an object or array it will be automatically (JSON.stringify) saved in PROCESS_EXEC_[KEY_NAME]
:
return { KEY_ONE: "VAL_ONE", KEY_TWO: "VAL_TWO" };
{
"output_share": [
{ "key": "VALUE", "name": "ONE", "value": "@GV(PROCESS_EXEC_KEY_ONE)" },
{ "key": "VALUE", "name": "TWO", "value": "@GV(PROCESS_EXEC_KEY_TWO)" }
]
}