Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cumulus/common

Package Overview
Dependencies
Maintainers
2
Versions
214
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cumulus/common

Common utilities used across tasks

  • 1.2.0-alpha.c0ebdcd8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
441
increased by226.67%
Maintainers
2
Weekly downloads
 
Created
Source

@cumulus-test/common

Common libraries for interacting with Cumulus ingest

Tasks

Cumulus tasks written in node.js should extend Task to benefit from the protocol parsing and message interpretation it provides. A minimal task class is as follows:


const Task = require('@cumulus-test/common/task');

module.exports = class MyTask extends Task {
  run() {
    // Read inputs
    // this.config contains task configuration with all variables resolved
    // this.message contains the incoming message, with this.message.payload
    // being the input from the previous step

    // Do actual work

    // Return output, which is the incoming message with its payload overwritten
    // to contain the output of this task. The result may optionally be a promise.
    return Object.assign({}, this.message, { payload: someOutput });
  }


  /**
   * Entrypoint for Lambda
   */
  static handler(...args) {
    return MyTask.handle(...args);
  }
}

Several modules provide support for working with Tasks and the message protocol:

General Utilities

Keywords

FAQs

Package last updated on 11 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc