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 🙏

© 2025 – Pkg Stats / Ryan Hefner

node-red-contrib-protobuf

v1.1.2

Published

Protocol buffer encode/decode nodes.

Readme

node-red-contrib-protobuf

FOSSA Status

This project features protobuf encode/decode nodes. Load a proto file, supply a desired type for encoding or decoding and have fun.

Installation

To install run

npm install --production --save node-red-contrib-protobuf 

Omit the --production flag, in order to install the development dependencies for testing and coverage. Omit --save if you don't want to add it to your package.json.

This node depends on protobufjs as the main package and will install it along with it.

Usage

  1. Place an encode/decode node on a flow
  2. Configure the protofile path pointing to your protobuf file(s)
  3. Either supply a proto type
    1. within the encode/decode configuration
    2. with the msg.protobufType field (takes precedence over node configuration)
  4. Either send a protobuf encoded payload to the decode node or a JSON encoded payload to the encode node

Note on the protofile node The proto file node watches the specified file(s) for changes on the filesystem through nodejs fs API. If the file contents of the .proto-file change on disk, the file becomes reloaded. This may happen multiple times at once due to OS and editor specifics. If multiple comma-separated paths are specified, only the first one is monitored right now to save some resources.

Features

  • Encode JSON payload to protobuf messages
  • Decode protobuf messages to JSON payload
  • Load protobuf file(s) from the local file system
  • Consider protos from one or multiple protobuf files (including inheritance)

Contribution

To setup your local development environment first clone this repository, then use a container runtime to get your node-red environment up and running like this:

podman run -p 1880:1880 -v $(pwd):/tmp/node-red-contrib-protobuf -d --name nodered nodered/node-red

After you saved your changes to the code update the installation within the container with this command:

podman exec -it nodered npm install /tmp/node-red-contrib-protobuf/ && podman restart nodered

Note on SELinux enabled machines it's necessary to allow containers access to your working directory like this: chcon -t container_file_t $(pwd)

Testing and Coverage-Report

First npm install for the dev dependencies. Tests, linting and code coverage are then available through:

npm test
npm run coverage
npm run lint

License

The BSD 3-Clause License

Alexander Wellbrock

FOSSA Status

Roadmap

  • validate type from loaded .proto files
  • allow .proto-path to be a URL
  • expose more configuration parameters from the protobufjs API
  • write tests covering misconfiguration and errors/exceptions
  • enhance the multi-file selection UI