general-runtime icon indicating copy to clipboard operation
general-runtime copied to clipboard

feat: add parsing of objects and array values (CV3-000)

Open zhihil opened this issue 1 year ago • 1 comments

Fixes or implements CV3-000

Brief description. What is this change?

Adds rudimentary support for passing object and array data into a function step. It achieves this by stringifying the object and array values in the runtime state before resolving diagram variables with this stringified value.

At the time of writing, function variable types have not been implemented.

Implementation details. How do you make this change?

Added serializeVariables() to serialize runtime variable state.

Called serializeVariables() before utils.replaceVariables() to ensure that objects are serialized as JSON, rather than "[Object object]"

Setup information

N/A

Deployment Notes

N/A

Related PRs

N/A

Checklist

  • [ ] Breaking changes have been communicated, including:
    • New required environment variables
    • Renaming of interfaces (API routes, request/response interface, etc)
  • [ ] New environment variables have been deployed
  • [ ] Appropriate tests have been written
    • Bug fixes are accompanied by an updated or new test
    • New features are accompanied by a new test

zhihil avatar Feb 21 '24 15:02 zhihil