My bike light was damaged due to acid leak from alkaline batteries. I kept the housing and LEDs but replaced the electronics with a micro USB lithium charger board, a LiPo battery and a switch. I had to make holes for the usb socket and the switch with a drill. Battery should last for about 3 hours. The parts can be acquired online at low cost.
Giant Power 3.7V 200mAh 25C Li-Po Battery For RC Model
USB Lithium Battery Charger Module With Charging And Protection
Spare or salvaged linearly actuated DPDT switch (could be spst)