js lib working for entire flow of a command (assuming no server errors)