You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am looking at the possibility at doing something like mitogen in node.
How it would work, in really broad strokes, is :
Spawn an child node process through sudo/ssh/whatever. Initial code is passed with -e.
This initial code reads commands from stdin, push results on stdout
One command is EVAL, which just evals a javascript string
ESM modules imported by the evaluated code are expected to be imported from the parent context. It therefore needs a loader hook which would communicate (via stdin/stdout) to get the module from the parent
However, it's impossible generally to pass a meaningful --loader argument to the child : think of the case of a read-only file-system where we cannot write a temporary loader.mjs that does the job, for example.
In the Python world, mitogen just dynamically add a module loader. It would be nice if we could do the same thing, something in the lines of :
I am looking at the possibility at doing something like mitogen in node.
How it would work, in really broad strokes, is :
-e
.However, it's impossible generally to pass a meaningful
--loader
argument to the child : think of the case of a read-only file-system where we cannot write a temporary loader.mjs that does the job, for example.In the Python world, mitogen just dynamically add a module loader. It would be nice if we could do the same thing, something in the lines of :
The text was updated successfully, but these errors were encountered: