Crashes on
echo '{"message": "test"}' | publish-to-stream-dev c4iXIHoVSHGadSDBvsLWsw tester1-api-key
because it interprets echo's last new line as unparseable JSON.
Needs something of the likes of
if (!data.trim()) {
return done()
}
Found by @timoxley