Thinly slice all the onions and place them in the slow cooker bowl. Add the melted butter and chicken base. Cook on low heat for 7 hours. Then, remove the lid and cook for an additional 3 hours.
Dice the bacon and cook it until crispy. Place the cooked bacon on a plate lined with paper towel to absorb any access fat.
In a small bowl, lightly whisk the egg and milk. Set aside.
Preheat the air fryer to 350 degrees.
Unfold the pastry sheet on the work surface lightly dusted with flour. Roll the pastry sheet into an 11x10-inch rectangle. Cut into 4 equal squares.
Divide the cheese, ½ cup caramelized onion, and bacon between each square. Start with the cheese, then onions, bacon finally, top with a few springs of fresh thyme.
Brush the edges with the egg mixture.
Spray the air fryer basket with cooking spray and add one square. Cook for 6-8 minutes. Or until golden brown.
Continue until all pieces have been cooked, enjoy!