add recursive dependency scanner for middlewares