-
Bug
-
Resolution: Done
-
Normal
-
None
-
None
-
1
-
False
-
-
False
-
-
Bug Fix
-
-
-
RHDH Dynamic Plugins 3265, RHDH Dynamic Plugins 3266
Description of problem:
Currently it's a requirement that plugin packages have an "export-dynamic" script defined for the "package-dynamic-plugins" command to work, as seen here. However this requires modifying the plugin package.json, or running npx @janus-idp/cli@latest package export-dynamic-plugin manually for each plugin package first, then running the package-dynamic-plugins command.
To fix this, the package-dynamic-plugins command could first check for the presence of the "export-dynamic" script and use it if present, and if not, instead run npx @janus-idp/cli@latest package export-dynamic-plugin. If the latter fails then the plugin isn't packaged and a warning is logged, much like the current behavior. In some cases it may be that a plugin package will still need an export-dynamic script added because of embedded package requirements.
Steps to Reproduce
Easiest way to see this behavior is to remove the "export-dynamic" command from an existing plugin project and then run "npx @janus-idp/cli package package-dynamic-plugins", the command should log this statement for the plugin.