The warning covers parts of both south and north Wales and is in force until Thursday morning