chore(dependencies): update dependencies

Refactor connect to use middlewares