- Introduced a new server package with Fastify for handling API requests and workflows. - Implemented user authentication and authorization with JWT and cookie management. - Added endpoints for managing workflows, runs, and user accounts. - Established a dashboard for monitoring workflow status and statistics. - Included a script sandbox for executing user-defined scripts securely. - Updated README with setup instructions and API documentation. - Configured database migrations for user management. - Enhanced logging capabilities for better traceability.
10 lines
366 B
JavaScript
10 lines
366 B
JavaScript
import jsonata from "jsonata";
|
|
|
|
export default function jsonataFn(ctx) {
|
|
log.info({ctx}, "jsonata: context")
|
|
log.info("jsonata: evaluating expression %s", ctx.config.expression);
|
|
const expression = jsonata(ctx.config.expression);
|
|
const result = expression.evaluate(ctx.data);
|
|
log.info({result}, "jsonata: expression result");
|
|
return result;
|
|
} |