A promise-aware finite state machine implementation for Ember objects