npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dflowng/extensions-loader

v0.0.1

Published

Extensions loader for Data Flow eNGine

Readme

@dflowng/extensions-loader - extension (plugin) loader of Data Flow eNGine

This package is a part of the Data Flow eNGine project.

Extensions in Data Flow eNGine

Some of components of Data Flow eNGine (such as operation and context classes, data types and applications (solutions)) are loaded dynamic as extension components that are defined in extension packages.

Extension package for Data Flow eNGine is a NPM package exporting a JSON document -- manifest of the extension package. Manifest contains list of package dependencies that should be loaded as extension packages (some of extension package dependencies may not be extension packages but just a libraries used by some components defined in the package) and list of extension components defined in the package.

Here is a simple example of a package manifest:

{
    "define": {
        "plugin": ["scripts/myPlugin1.js", "scripts/myPlugin2.js"],
        "operator-class": {
            "vector-constant": {
                "super": "constant",
                "config": {
                    "value-type": "float",
                    "value-size": [4],
                    "value": [0,0,0,0]
                }
            }
        }
    },
    "dependencies": ["@dflowng/ext-default"]
}

Extensions package manifest of which is shown in the example above defines three extension components -- two components of class "plugin" that are described by files in package's subdirectory scripts and the component of class "operator-class" named "vector-constant". Also this package depends on another extensions package named @dflowng/ext-default. The extension package manifest contains no information about version of extension packages this one depends on -- the versions of packages should be defined in package.json.

Loading extensions

To load specific extensions package function loadExtensions(di, package, require) should be called:

// Get function from DI container
const loadExtensions = DI.func('loadExtensions').get();

// Or just using require
// const loadExtensions = require('@dflowng/extensions-loader');

// Load extensions components from package into DI container
loadExtensions(DI, 'package-name', require)
    .then(
        ( ) => console.log('Done.'),
        err => console.error('Error:', err.stack));

This function will load a package (resolving path using given require function) and it's dependencies. For each extension component function defined #func('extensionLoader') is called with the DI container instance passed to the loadExtensions function as first argument and component definition object as second one.

Component definition object includes the following fields:

  • "name" -- name of the component.
  • "type" -- name of component class.
  • "params" -- parameters object. The object at right side of component name if list of components of the class is a object or empty object if list is a array.
  • "basePath" -- path to the directory the manifest file is located in.
  • "require" -- the Module#require(id) function of manifest module.

Default implementation of extensionLoader delegates call to function defined as #func('extensionLoader', definition.type) with the same signature.