Preheat the oven to 375°F. Grease the cavities of a 24-cup mini muffin tin with nonstick cooking spray.
Cut onion in half, then slice halves thinly. You don't want rings.
In a large sauté pan, heat the olive oil and butter over medium heat.
Add the onions, pulling apart each strand, and sauté until tender and caramelized, 25 to 30 minutes. Season with salt, pepper and thyme.
Add the beef broth and bring the mixture to a simmer. Simmer until the liquid has reduced almost entirely. Stir in the heavy cream.
While the onions are cooking, roll out the puff-pastry dough a little to flatten it. Cut the dough into 1½-inch squares and then press a square into each of the cups of the prepared muffin tin.
Place 1 tablespoons of the onion filling into each cup (I found using a fork worked best) and then top with 1 tablespoon grated Gruyère.
Bake until golden brown, 20 to 22 minutes. Let cool for 2-5 minutes, serve.