Is there any tool outside that allows me to write JavaScript code as Scripts?

Painless is not quite painless. My team has been struggling with painless scripts due to a couple of reasons:

  1. (as far as I know) it's not possible to execute scripts locally - it would be great to write unit tests;
  2. painless misses some useful features like JSON parsing/stringifying.

Other ecosytem tools would be great like LSP.

Well, I started doing some experiments with ANTLR in order to come up with a tool that compiles JavaScript to Painless - using this we would get all the JS ecosystem like LSP and test runners.

I'd like to check with more experienced people if there's a tool like that already or even if there's a plan from Elastic team or something to add this ecosystem to painless itself.

Context: We've been using scripts as transformes in Watcher pipeline