I've created a node module that produces a
A little bit late but an answer nonetheless.
We ended up going for what is peteb's approach (thanks) of just using it from the appropriate package (the one with the script alias internal to it) and feeding it the external filepath through an argument.
This works because the existing structure for the arguments was:
npm run <script> <arg1> <filepath>
filepath argument was meant to be
%CD%, the output of both is a normal filepath anyway. So any filepath would theoretically work, so long as you don't run into any other problems that would warrant looking for a solution to this problem elsewhere, like the length being too long for the filesystem and whatnot.
Something that might be worth mentioning is that maybe something like this would have been better suited to an environment other than NodeJS. It doesn't look like using a script outside the package it's internal to is a possibility and it might have been better to program an external program to deal with such issues.
I'm not as proficient at NodeJS as a lot of people here on the site are, but maybe an executable containing the code that is invoked by a
.js file could work, if that's at all possible.