- 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.
32 lines
787 B
YAML
32 lines
787 B
YAML
name: Track Gojek Trip
|
|
scripts:
|
|
- script: fetch-http.js
|
|
config:
|
|
url: https://api.gojekapi.com/live/track/491c3132c2cc7043
|
|
method: GET
|
|
headers:
|
|
Content-Type: application/json
|
|
Accept: application/json
|
|
Origin: https://track.gojek.com
|
|
- script: fingerprint.js
|
|
config:
|
|
key: gojek-track-status
|
|
jsonata: data.httpResponse.status
|
|
- script: jsonata.js
|
|
config:
|
|
expression: |
|
|
{
|
|
"title": data.httpResponse.customer_name,
|
|
"message": data.httpResponse.customer_name & " : " & data.httpResponse.status
|
|
}
|
|
- script: ntfy.js
|
|
config:
|
|
url: https://n.0dev.web.id/system
|
|
triggers:
|
|
- type: cron
|
|
schedule: "* * * * *"
|
|
- type: HTTP
|
|
method: GET
|
|
path: /new
|
|
enabled: false
|