@runnerty/executor-script

1.0.0 • Public • Published

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)" }
  ]
}

Package Sidebar

Install

npm i @runnerty/executor-script

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

9.3 kB

Total Files

8

Last publish

Collaborators

  • coderty