An open API service indexing awesome lists of open source software.

https://github.com/runnerty/executor-script

Runnerty module: Script executor
https://github.com/runnerty/executor-script

Last synced: about 1 year ago
JSON representation

Runnerty module: Script executor

Awesome Lists containing this project

README

          

# Script executor for [Runnerty]:

### Configuration sample:

```json
{
"id": "script_default",
"type": "@runnerty-executor-script"
}
```

### Plan sample:

```json
{
"id": "script_default",
"script": "return('hello');"
}
```

```json
{
"id": "script_default",
"script_file": "my_script.js",
"args": { "my_const": "Y", "my_key": "@GV(MY_KEY)" }
}
```

```json
{
"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]`:

```js
return { KEY_ONE: "VAL_ONE", KEY_TWO: "VAL_TWO" };
```

```json
{
"output_share": [
{ "key": "VALUE", "name": "ONE", "value": "@GV(PROCESS_EXEC_KEY_ONE)" },
{ "key": "VALUE", "name": "TWO", "value": "@GV(PROCESS_EXEC_KEY_TWO)" }
]
}
```

[runnerty]: http://www.runnerty.io