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
- Host: GitHub
- URL: https://github.com/runnerty/executor-script
- Owner: runnerty
- License: mit
- Created: 2019-10-13T17:48:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-13T17:56:08.000Z (over 6 years ago)
- Last Synced: 2025-03-01T02:38:37.428Z (over 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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