Could you try to refocus? You didn’t know about pregnancy and you can’t change it, but now you know, so you have time to plan for how to handle maternity leave and a baby etc
If you spend time now being upset over things you cannot change (when she told or not told you about the baby) you won’t have time on what you have control over: preparation, so maybe try to focus on that.
Also maybe you want to dig deeper on what you really upset about. It feels like there’s more to it? Perhaps it’s not even about her telling/not telling