Uploaded image for project: 'Red Hat Internal Developer Platform'
  1. Red Hat Internal Developer Platform
  2. RHIDP-4828

janus-idp/cli package-dynamic-plugins requires an "export-dynamic" script for each plugin project

Create Doc EPIC for Fe...Prepare for Y ReleasePrepare for Z ReleaseXMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • 1.5.0
    • None
    • Dynamic plugins
    • None
    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide
      Previous versions of the CLI require that each dynamic plugin project defines an "export-dynamic" script that the package-dynamic-plugin command will use to export the dynamic plugin. With this change it is no longer required to define an "export-dynamic" script, the package-dynamic-plugin will attempt to run the export-dynamic-plugin command with default arguments.
      Show
      Previous versions of the CLI require that each dynamic plugin project defines an "export-dynamic" script that the package-dynamic-plugin command will use to export the dynamic plugin. With this change it is no longer required to define an "export-dynamic" script, the package-dynamic-plugin will attempt to run the export-dynamic-plugin command with default arguments.
    • 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.

              stlewis_2 Stan Lewis
              stlewis_2 Stan Lewis
              RHIDP - Dynamic Plugins
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: