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
      = Improved CLI handling for dynamic plugin export

      Previously, the CLI required each dynamic plugin project to define an export-dynamic script for the package-dynamic-plugin command to successfully export the plugin.

      With this update, defining an export-dynamic script is no longer necessary. The package-dynamic-plugin command now automatically attempts to run the export-dynamic-plugin command with default arguments, simplifying the export process.
      Show
      = Improved CLI handling for dynamic plugin export Previously, the CLI required each dynamic plugin project to define an export-dynamic script for the package-dynamic-plugin command to successfully export the plugin. With this update, defining an export-dynamic script is no longer necessary. The package-dynamic-plugin command now automatically attempts to run the export-dynamic-plugin command with default arguments, simplifying the export process.
    • Bug Fix
    • In Progress
    • 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: