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 🙏

© 2024 – Pkg Stats / Ryan Hefner

typescript-pipeline

v1.0.4

Published

Allows for assembling queues and processing blocks asyncronously. Handles all wiring. Queues are via plugins.

Downloads

6

Readme

README

What is this package for?

Quick summary

This is a data pipeline framework that runs in NodeJS. The pipeline is composed of processing blocks which have a deifined input contract and a defined output contract. All the block needs to do is handle when an input contract is passed in, and needs to emit the output contract. The routing, queuing, error capture, and pushing to the next processing block are handled for you.

How do I get set up?

  • Installation
    npm install --save typescript-pipeline
  • Configuration
    1. Create the contracts. Each contract should extend "Contract".
      • A contract is just a series of properties.
      • There is a validateStructure() method which needs to be implemented. It should return true or false. This should only check the structure and not be used to validate the values.
    2. Create the processing blocks. Each block needs to extend 'Block'.
      • In the constructor, you should call setInputContract(Class) and setOutputContract(Class) which will tell the pipeline what input and output to expect.
      • Implement the "handle" method which will get a single instance of the defined contract passed in. Outputs are sent by calling this.emit('data',outputContract). This is where the logic for the block resides.
    3. Create a new Pipeline. let pipeline = new Pipeline();
    4. Register the blocks. pipeline.registerBlock(block1);
      • You can only register a block one time. You can have multiple blocks of the same type, but each block can only be assigned once.
    5. Bind the blocks. pipeline.bindBlocks(block1, block2, options, plugin)
      • Binding two blocks creates "mortar" to bind the blocks.
      • The options argument is optional.
        • logContractsToConsole is a boolean and will cause the mortar to dump out all contracts to the console when they first enter the mortar.
      • Specifying a plugin is optional See the plugins section below. If a plugin is not specified, then the mortar acts as a pass-thru the enforces contract types only.

Logic Flow

TBD

Plugins

TBD

Contribution guidelines

  • Writing tests
  • Code review
  • Other guidelines

Who do I talk to?

Please post any bugs or issues to the issues site at [https://bitbucket.org/pythagorasio/typescript-pipeline/issues]