I would think that switch, or receptacle are both potentially correct answers.
Of course, properly insulated taps could work too.
NEVER a wire nut outside a box, unless listed for direct burial...but then it wouldn;t be EXPOSED, now would it?
BTW, if you've got a copy of the American Electrician's Handbook handy, check out page 4.9, figure 4.10, which shows an illustration of a rotary snap switch: surface mounting type.
Also in that book on page 4.26 are figures 4.43, showing surface wiring switches (tumbler and rotary), and receptacles for exposed NM work.
Pages are for the 13th edition.