As the wizard of a party, I plan to use the tiny hut spell to keep everyone safe during long rests on the road. However, the out party might be traveling with a group larger than can fit in the hut, and if we are attacked in the night, I'd like to be able to help defend those outside with ranged attacks from inside the safety of the hut. This is easy enough to accomplish with a ranged weapon, but dammit, I'm a wizard! I want to attack with a spell. The problem is that the tiny hut spell says:
Spells and other magical effects can’t extend through the dome or be cast through it.
So as long as I'm hiding inside the hut, it seems that no spell I cast will be able to hurt the attackers outside. But what about catapult, cast on an object that is currently inside the hut and flung in the direction of an enemy outside the hut? Will the catapulted object reach its target, or will the spell's magic, and therefore also the object itself, be stopped as soon as the object exits the tiny hut?
Also, in the unlikely event that the enemy has a spellcaster with the catapult spell, would they be able to use the spell to launch the same object back at me?