A helper class for discovering and interacting with NPM-style modules.

Hierarchy

  • NodeModules

Constructors

Properties

Methods

Constructors

Properties

bus: Bus<Event>
logging: Logging
manager: string

Methods

  • Get the NodeModule entry for the base application.

    Returns Promise<NodeModule>

  • Iterate over packages, recursively, starting with the base application's package.json and fire PackageDiscovered events for any that have a valid Extollo discovery entry.

    Returns Promise<void>

  • Protected

    Recursively discover child-packages from the node_modules root for the given module.

    Fires PackageDiscovered events for valid, discovery-enabled packages.

    Parameters

    • root: UniversalPath

      the path to node_modules

    • module: NodeModule

      the module whose children we are discovering

    • seen: string[] = []

      used to prevent duplicate packages when recursing

    Returns Promise<void>