Verify plugins locally

Export a new front-end system (NFS) plugin with the RHDH 2.1 CLI and test it in RHDH Local before publishing. The CLI stages its assets without a dist-scalprum directory.

Before you begin

  • Your plugin default-exports an NFS feature from a package entry point. A plugin generated by the 2.1 CLI uses its package root.
  • You have a RHDH Local checkout and Podman or Docker available.

The CLI manages its plugin entry in configs/dynamic-plugins/rhdh-cli.generated.local.yaml. Place any additional plugin configuration in dynamic-plugins.override.yaml.

Procedure

  1. From the plugin project root, start RHDH Local and stage the plugin:
    $ npx @red-hat-developer-hub/cli@2.1.0 plugin dev start --configure --rhdh-local-dir <rhdh_local_dir>

    <rhdh_local_dir> is the path to your RHDH Local checkout.

    The --configure option adds the CLI-managed plugin configuration include without replacing your existing user configuration. The CLI prints the application URL when the runtime is ready.

  2. Open the application URL and verify that the plugin’s page or entity card is displayed. For an entity card, open a matching Catalog entity page.
  3. After editing the plugin source, re-export and restage it:
    $ npx @red-hat-developer-hub/cli@2.1.0 plugin dev update
  4. If the plugin does not load, check the installation logs:
    $ npx @red-hat-developer-hub/cli@2.1.0 plugin dev logs --installer
  5. Check the application logs:
    $ npx @red-hat-developer-hub/cli@2.1.0 plugin dev logs
  6. Stop the local runtime after testing:
    $ npx @red-hat-developer-hub/cli@2.1.0 plugin dev stop