#1637 [Graaljs] allow import
Proposed changes
This PR adds the option to use import directive from within JS scripts.
This can be helpful to better organize large scripts and avoid duplication between flows.
This is done through either the env var MAESTRO_GRAALJS_ALLOW_IO or the config graalJsAllowIo.
Specifications
- Scripts that use imports (wether importing or exporting) should be defined with the
mjsextension - The importing path is relative to the execution path of Maestro
- See GraalJs documentation about Modules
Testing
Two integration tests have been added, in order to test cases where it's allowed and not allowed.
Issues fixed
#1637
@Fishbowler I don't understand why the E2E test fails. Would appreciate any help.
Does this replace #2022?
@Fishbowler No, they are 2 different features of the underlying JS engine. One lets you call platform (i.e. JVM) classes from JS and interop with them The other lets you allow access to files and thus use import and modules (which are enabled as part of the ECMAScript but impossible to use due to io restrictions in GraalJS)