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

@criticalmanufacturing/node-package-bundler

v1.1.0

Published

Connect IoT Package Bundler

Readme

IoT Package Bundler

It is not desirable to have Internet services (NPM, GitHub, etc) as a dependency for the packages that would run on a production environment.

To bypass such dependency, we provide a tool that will pack all the package dependencies from a development environment into a ready-to-be-used package.

The steps this tool executes in background are somehow complicated, but, in a nutshell, it will statically analyze all the dependencies of the package and subsequent dependencies and merge everything into a single index.js file. Some other dependencies, like configurations, certificates, node addons (*.node) are also added into the resulting package, however, to keep everything in a clean state, some post-processing steps are needed and this tool supports them up to some extent.

In a terminal window run:

yo @criticalmanufacturing/iot:packagePacker --help

The following parameters can be supplied:

| Parameter | Type | Default | Description | | ------------- | --------- | ------------------------ | ------------------------------------------------------------ | | i, input | String | ${cwd} | Location of the package to pack (directory where the package.json is located) | | o, output | String | | (optional) When defined, it is the directory where the .tgz package file will be placed | | t, temp | String | ${cwd}\__TEMP__ | Temporary directory where the processed files will be placed | | c, config | String | ${cwd}\packConfig.json | Location where the file with the post-processing instructions is located | | a, addons | String | | Location where the binary addons (\*.node) are located. Required to prepare a package that is cross-platform, cross-architecture and supporting multiple Node versions.Note: Due to the complexity of this option, the usage is not described in this documentation and requires some support from our company | | d, debug | Boolean | false | Activate the debug mode. This mode will not delete the temporary directory allowing the user to properly define the post-processing directives | | v, version | String | | Flag that allows to override the version defined in the package.json into an user-defined value |

Configuration file structure

The configuration is a .json file that identifies the type of package and declare post-packing actions to perform to organize, clean and possibly, fix some issues with the result structure.

{
    "type": "<Package Type>",
    "postActions": [
        { "type": "<ActionType>", "parameter1": "value1", "parameter2": "value2", "...": "..." },
        { "type": "<ActionType>", "parameter1": "value1", "parameter2": "value2", "...": "..." }
    ]
}

Possible Package Types:

| Type | Description | | -------------- | ------------------------------------------------------------ | | TasksPackage | Represents a package used to contain Tasks and Converters. The result package will be ready for runtime (no internet dependencies) and for design-time (all .js, .html, .css, etc) required by the GUI but not required for the runtime. | | Component | Represents a package that is only used for runtime (driver, etc) |

Possible Post Actions:

| Structure | Description | Example | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | DeleteFile(source) | Deletes the file source | { "type": "DeleteFile", "source": "${Temp}/completion.sh.hbs" } | | DeleteFiles(filter, source) | Delete files based on a regular expression filter at source | { "type": "DeleteFiles", "filter": "\\d+\\.index\\.js", "source": "${Temp}/libs" } | | DeleteDirectory(source) | Deletes the directory source | { "type": "DeleteDirectory", "source": "${Temp}/locales" } | | CopyDirectory(source, destination) | Copies the entire directory structure from source into destination | { "type": "CopyDirectory", "source": "font", "destination": "${Temp}/font" } | | CopyFile(file, source, destination) | Copy the file file located in the directory source into the directory destination | { "type": "CopyFile", "source": "${Source}/certificates/default.pem", "destination": "${Temp}/examples" } | | CopyFiles(filter, source, destination) | Copy files based on a regular expression filter from source to destination | { "type": "CopyFiles", "filter": "\\d+\\.index\\.js", "source": "${Source}/certificates", "destination": "${Temp}/examples" } | | MoveFile(file, source, destination) | Moves the file file located in the directory source into the directory destination | { "type": "MoveFile", "file": "client_selfsigned_cert_2048.pem", "source": "${Temp}", "destination": "${Temp}/certificates" } | | MoveFiles(filter, source, destination) | Move files based on a regular expression filter from source to destination| { "type": "MoveFiles", "filter": "\\d+\\.index\\.js", "source": "${Temp}", "destination": "${Temp}/certificates" } | | ReplaceText(source, search, replace, isRegularExpression) | In the file source, tried to find all occurrences of search and replaces them with replace. If isRegularExpression the search is expected to be a valid regular expression.Note: Make sure the replaced value is not captured again by the search value, otherwise, the process will enter into an infinite loop. | { "type": "ReplaceText", "source": "${Temp}/index.js", "search":"\"client_selfsigned_cert_2048.pem\"", "replace": "\"/../certificates/client_selfsigned_cert_2048.pem\"" }{ "type": "ReplaceText", "source": "${Temp}/index.js", "search":"__webpack_require__\\(\\d*\\)\\('HID-hidraw.node'\\)", "replace": "require(__webpack_require__.ab + \"/../lib/hid-hidraw.node\")", "isRegularExpression": true } |

Some tokens can be used in the Post Actions to be replaced according to the environment/command line arguments:

| Token | Description | | ---------------- | --------------------------------------------- | | ${Source} | Source location (argument i, input) | | ${Destination} | Destination location (argument o, output) | | ${Temp} | Temporary location (argument t, temp) | | ${Addons} | Addons location (argument a, addons) |