This makes sharing data between methods in scripts difficult.
Thoughts
I really like the work that @joernroeder has done on this feature, and I think we're 99% of the way there. It would be great if we could:
figure out a way to run multiple methods on a script at the same time (is this something we should be able to do)?
Share some keys in a contextObject, if the keys correspond to a methods being run on the same script.
we should make sure we get good unit tests around the functionality this time, since some of this broken behavior documented in the README might be regressions?
Running multiple functions with shared state does not work as one would expect, given the documentation that was in the README.
As all functions belong to the same script you can pass objects to the same API instance and receive them later.
State API:
A Script Using the API:
Problem 1
A script has a
this.exited
flag which is set when a script exists, therefore if we run:Only one method will complete execution.
Problem 2
A new contextObject is created as each script is executed:
This makes sharing data between methods in scripts difficult.
Thoughts
I really like the work that @joernroeder has done on this feature, and I think we're 99% of the way there. It would be great if we could: