Files
jerapah-flow/packages/server/workflows/default/comic-monkeyuser-to-ntfy.yaml
T
nsrb 43e9370638 feat(scripts): enhance script return structure and context handling
- Introduced a new contract for script returns, requiring an object with `output`, `context`, and `skipRemaining` fields.
- Refactored existing scripts to align with the new return structure, ensuring compatibility with the updated context management.
- Added utility functions for normalizing context and step results, improving the handling of script execution context.
- Updated various scripts (e.g., fetch-binary, fetch-html, fetch-http) to return structured output and context, enhancing data flow and usability.
- Improved error handling for script returns, ensuring clearer feedback when invalid structures are returned.

This update significantly enhances the flexibility and clarity of script interactions within workflows.
2026-08-15 22:32:42 +07:00

27 lines
656 B
YAML

name: Comic - monkeyuser to ntfy
scripts:
- script: fetch-html.js
config:
url: "https://www.monkeyuser.com/"
outputVar: "httpResponse"
selector: ".comic img"
jsonata: |
{"url": "https://www.monkeyuser.com" & [attributes.src][0], "title": [attributes.title][0]}
- script: jsonata.js
config:
expression: |
{
"title": data.httpResponse.title,
"message": data.httpResponse.title,
"attach": data.httpResponse.url
}
- fetch-binary.js
- script: ntfy.js
config:
url: https://ntfy.sh/jerapah-flow
triggers:
- type: HTTP
method: POST
path: /new