Violet v1.2: New modularity features

As we have been increasing usage of Violet, we have wanted to provide help for more complex Voice Apps to be built. These have primarily been about more robust support for controllers (along with automatically initializing them) and supporting multiple Conversation Flow Language scripts in a Voice App.

Supporting complex applications has meant adding a few features.

Better support for Controllers

When Voice Scripts are loaded they are also given a set of controllers that can be used in the given script. This release improves support for automatically initializing the controllers. Two methods addFlowScriptEx and loadFlowScriptEx are added which initialize these controllers if they have an initialize method. The initialization method is given a reference to violet. In addition, these methods often need to initialize connections and need to return promises, therefore the added methods also expect and return promises.

Multiple CFL Scripts

As Voice Apps get more complex, we have found it helpful to separate the different parts in the conversation script. Violet now adds support for multiple CFL scripts using the loadFlowScriptEx method. This method also takes advantage of the new addFlowScriptEx method that initializes controllers.