Part of EPIC #554. Implemented — under review in #687.
New exported package org.jahia.modules.javascript.modules.engine.sdk with JSServerExtensionInvoker: forEach(type, handler) iterates JS registry entries within one GraalVM context, Invoker.call(...) executes a JS callable and converts results to plain Java — consumer bundles need no polyglot or engine-internal imports (those packages stay unexported). The engine bundle's Export-Package lists only this package.
First consumer: formidable (JS form-field validators executed server-side).
Part of EPIC #554. Implemented — under review in #687.
New exported package
org.jahia.modules.javascript.modules.engine.sdkwithJSServerExtensionInvoker:forEach(type, handler)iterates JS registry entries within one GraalVM context,Invoker.call(...)executes a JS callable and converts results to plain Java — consumer bundles need no polyglot or engine-internal imports (those packages stay unexported). The engine bundle'sExport-Packagelists only this package.First consumer: formidable (JS form-field validators executed server-side).