Bluntly, it shouldn't have been.
Kryptonians get their energy from the yellow sun, which is more powerful than the red sun of their homeworld. But they act as solar batteries; they absorb and store the energy. It's not that they only have powers when they are in direct sunlight. If that were true, they'd have no powers at night, or when indoors, or what have you.
If they expend a great deal of power, especially heat vision, they can deplete their store of energy greatly. In the case of the new "Super-flare" ability, it depletes their energy completely, and they need a couple days to replenish their energy stores.
An eclipse would block their ability to replenish their energy, and using their powers would indeed cause them to slowly reduce in strength and power. I'd like to stress the word SLOWLY. Depending on how much she used, if she avoided heat vision, etc, Supergirl should have powers for days, at least. For her to start getting weaker almost immediately was simply lazy writing. Supergirl has PLENTY of fights at night, and has never suddenly gotten weaker cause the sun wasn't beating down on her at every moment.