compiler-util icon indicating copy to clipboard operation
compiler-util copied to clipboard

An NX utility, responsible for executing code in the context of an object.

Results 5 compiler-util issues
Sort by recently updated
recently updated
newest added

With the default setup it is easily possible to escape the sandbox: ``` const compiler = require('@nx-js/compiler-util') compiler.compileCode('return this')({}) // returns Object [global] ``` There is a way to protect...

You can escape the sandbox using something like this: ``` const compiler = require('@nx-js/compiler-util'); const code = compiler.compileCode('} { return global.process.env.LOGNAME'); const user = code({}); console.log(user); ```

Thanks for sharing this library! Reading through the code it seems like that user code is run on the main thread, right? Any known issues or recommendations about Running it...

Add a list of contributors to the project.

Since the library has to be imported with "require", I encounter the same issue as here: https://github.com/evanw/esbuild/issues/1921 `Uncaught Error: Dynamic require of "@nx-js/compiler-util" is not supported` Can this library published...