The swift quiver spell (PHB, p. 279) makes more non-magical ammunition as it is being used, but is confusing as to when it makes them:
On each of your turns until the spell ends, you can use a bonus action to make two attacks with a weapon that uses ammunition from the quiver. Each time you make such a ranged attack, your quiver magically replaces the piece of ammunition you used with a similar piece of non-magical ammunition.
The confusing part is such a ranged attack may be referencing only bonus action to make two attacks.
Or it may be just stating that you can't use arrows for other purposes than making ranged attacks (like using them as trail markers, to cast conjure volley, or to just fill a pit trap with arrows to cross over).
Valeera the huntress is hidden high atop [evil deity] temple's tower. The mages in the courtyard are about to begin the ritual, as the moon and stars begin to reach optimal alignment. If that Tanar'ri lord is released the kingdom is doomed, but her allies are still far below, climbing the narrow, steep, enemy ridden path. She fears they won't make it in time. Looking at her quiver, she finds a lone arrow tumbling inside. Who knew those tower guards would be so tough, she thinks. She lets a sigh and her lips whisper an ancient elvish curse. Deciding to act on her own even if it costs her life, she moves to an arrow slit with a clear view of the courtyard, casts swift quiver and begins to rain down death on the mages.
Is the intention of the spell (besides giving two extra ranged attacks) to allow the ranger to have an endless supply of ammunition to make ranged attacks with for the duration of the spell?