Add the APPLYFIELDEFFECTS function to expressions.
Add a basic deploy mechanism
Move fulcrum-expressions-sandbox stuff into this repo to make it easier to deploy together.
Move more scripts into package.json scripts
The version of expressions-proxy.coffee in this PR will produce exactly what's deployed in S3 if built in fulcrum-expressions-sandbox. This repo has a different version of browserify which showed a larger diff, but in my testing, the differences don't appear to affect anything.
The only missing thing from the original expressions-proxy.coffee was a try/catch:
Once the try catch was added, the output was the same.
To test:
Run yarn deploy (may need USER=). This will deploy expressions to your preview env's S3 bucket.
In fulcrum's skaffold.yaml setValueTemplates block add fulcrum.rails.config.expression_sandbox_url: "https://fulcrumapp-world-{{.USER}}.s3.amazonaws.com/expv1/expressions.html"
Skaffold and make sure data events/calculations work.
Create a form with a classification field with data name type and using the issues classification field (or use a choice field or whatever you want, just make sure the FieldEffects json matches), as well as a text field with data name text.
Try out the new APPLYFIELDEFFECTS function in a data event for that form like:
The version of expressions-proxy.coffee in this PR will produce exactly what's deployed in S3 if built in fulcrum-expressions-sandbox. This repo has a different version of browserify which showed a larger diff, but in my testing, the differences don't appear to affect anything. The only missing thing from the original expressions-proxy.coffee was a try/catch:
Once the try catch was added, the output was the same.
To test:
yarn deploy
(may need USER=setValueTemplates
block addfulcrum.rails.config.expression_sandbox_url: "https://fulcrumapp-world-{{.USER}}.s3.amazonaws.com/expv1/expressions.html"
type
and using the issues classification field (or use a choice field or whatever you want, just make sure the FieldEffects json matches), as well as a text field with data nametext
.